ocearo-ui 0.1.12 → 0.1.14

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/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/c78ab46923ef2f02.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-6800222ed1a234a2.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-50d0a3499460e502.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-35a8eb6f9457406b.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-ed02033afba81a43.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="theme-color" media="(prefers-color-scheme: light)" content="#4bbcd8"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a2e3d"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><meta name="format-detection" content="telephone=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_d559d3 __variable_692ef5 antialiased"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/ocearo-ui/_next/static/chunks/webpack-6800222ed1a234a2.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HC[\"/\",\"\"]\n2:HL[\"/ocearo-ui/_next/static/css/c78ab46923ef2f02.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n5:I[4707,[],\"\"]\n6:I[36423,[],\"\"]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"Hr-CngZPYUr2uKuS2yt4x\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L4\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/c78ab46923ef2f02.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{}],[\"$\",\"body\",null,{\"className\":\"__variable_d559d3 __variable_692ef5 antialiased\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#4bbcd8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#0a2e3d\"}],[\"$\",\"meta\",\"3\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"4\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"5\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"6\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"7\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"9\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"10\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"11\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"12\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"13\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"14\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"15\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",\"16\",{\"name\":\"next-size-adjust\"}]]\n4:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/ac42e9cb9892c616.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-154ad04c6b65cdfa.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-50d0a3499460e502.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-35a8eb6f9457406b.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-ed02033afba81a43.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="theme-color" media="(prefers-color-scheme: light)" content="#4bbcd8"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a2e3d"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><meta name="format-detection" content="telephone=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_d559d3 __variable_692ef5 antialiased"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/ocearo-ui/_next/static/chunks/webpack-154ad04c6b65cdfa.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HC[\"/\",\"\"]\n2:HL[\"/ocearo-ui/_next/static/css/ac42e9cb9892c616.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n5:I[4707,[],\"\"]\n6:I[36423,[],\"\"]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"N96cZS9eZpTU4PbT3MlPa\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L4\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/ac42e9cb9892c616.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{}],[\"$\",\"body\",null,{\"className\":\"__variable_d559d3 __variable_692ef5 antialiased\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#4bbcd8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#0a2e3d\"}],[\"$\",\"meta\",\"3\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"4\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"5\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"6\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"7\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"9\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"10\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"11\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"12\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"13\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"14\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"15\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",\"16\",{\"name\":\"next-size-adjust\"}]]\n4:null\n"])</script></body></html>
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[412],{6412:function(e,t,a){a.r(t),a.d(t,{default:function(){return A}});var l=a(57437),s=a(21276),o=a(36496),n=a(30166),r=a(53082),c=a(72079),i=a(2265),d=a(51268),u=a(35217),h=()=>{let{nightMode:e,setNightMode:t,states:a,toggleState:s}=(0,r.yC)(),o=(0,i.useRef)(a.autopilot),n=e?"text-oNight":"text-oGray",c=e=>{let t={autopilot:"autopilot"===e,anchorWatch:"anchorWatch"===e,parkingMode:"parkingMode"===e};Object.keys(t).forEach(e=>{s(e,t[e])})};return(0,i.useEffect)(()=>{a.autopilot&&!o.current&&s("showPolar",!0),o.current=a.autopilot},[a.autopilot,s]),(0,l.jsxs)("div",{className:"text-lg",children:[(0,l.jsx)("button",{onClick:()=>c("autopilot"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.lnS,className:a.autopilot?"text-oBlue":n})}),(0,l.jsx)("button",{onClick:()=>c("anchorWatch"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.SJR,className:a.anchorWatch?"text-oYellow":n})}),(0,l.jsx)("button",{onClick:()=>c("parkingMode"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.BQ9,className:a.parkingMode?"text-oGreen":n})}),(0,l.jsx)("button",{onClick:()=>t(!e),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.DBF,className:e?"text-oNight":n})}),(0,l.jsx)("button",{onClick:()=>s("showOcean"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.L02,className:a.showOcean?"text-oBlue":n})}),a.autopilot&&!a.showOcean&&(0,l.jsx)("button",{onClick:()=>s("showPolar"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.GTN,className:a.showPolar?"text-oBlue":n})}),a.autopilot&&(0,l.jsx)("button",{onClick:()=>s("ais"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.mDh,className:a.ais?"text-oGreen":n})})]})},x=a(15008);let b={BATTERIES:"batteries",TANKS:"tanks"},p={FRESH_WATER:{id:"freshWater",label:"Fresh Water",path:"tanks.freshWater.0.currentLevel",icon:u.Zkk,color:"bg-oBlue"},FUEL:{id:"fuel",label:"Fuel",path:"tanks.fuel.0.currentLevel",icon:u.q16,color:"bg-oYellow"},BLACK_WATER:{id:"blackWater",label:"Black Water",path:"tanks.blackWater.0.currentLevel",icon:u.NId,color:"bg-oGray"}},m=e=>{let{level:t,type:a}=e,[s,o]=(0,i.useState)(!1),n=Math.max(0,Math.min(100,t)),{label:r,icon:c,color:u}=p[a];return(0,l.jsxs)("div",{className:"flex items-center space-x-3 relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("span",{className:"text-sm",children:(0,l.jsx)(d.G,{icon:c})}),(0,l.jsxs)("div",{className:"relative w-8 h-4 bg-oGray rounded-sm border border-oGray flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute -right-1 w-1 h-3 bg-oGray rounded-sm"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-full ".concat(u," transition-all duration-300 rounded-sm"),style:{width:"".concat(n,"%")}}),(0,l.jsxs)("span",{className:"relative z-10 text-xs text-white font-bold ".concat(n<=20?"text-oRed animate-pulse":""),children:[n,"%"]})]})]}),s&&(0,l.jsxs)("div",{className:"absolute -left-20 top-6 bg-gray-800 text-white px-2 py-1 rounded text-xs whitespace-nowrap z-20",children:[r,": ",n,"%"]})]})},f=e=>{let{batteryLevel:t,batteryNumber:a,voltage:s}=e,[o,n]=(0,i.useState)(!1),r=Math.max(0,Math.min(100,t)),c=(0,x.d3)(s),h=(0,i.useMemo)(()=>(0,x.z)(r),[r]);return(0,l.jsx)("div",{className:"flex items-center space-x-3 relative",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("span",{className:"text-sm",children:(0,l.jsx)(d.G,{icon:u.BDt})}),(0,l.jsxs)("div",{className:"relative w-8 h-4 bg-oGray rounded-sm border border-oGray flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute -right-1 w-1 h-3 bg-oGray rounded-sm"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-full ".concat(h," transition-all duration-300 rounded-sm"),style:{width:"".concat(r,"%")}}),c?(0,l.jsx)("span",{className:"relative z-10 text-xs text-white font-bold",children:"⚡︎"}):(0,l.jsxs)("span",{className:"relative z-10 text-xs text-white font-bold ".concat(r<=x.vp.DANGER_THRESHOLD?"text-oRed animate-pulse":""),children:[r,"%"]})]}),o&&(0,l.jsxs)("div",{className:"absolute -left-20 top-6 bg-gray-800 text-white px-2 py-1 rounded text-xs whitespace-nowrap z-20",children:["Voltage: ",null==s?void 0:s.toFixed(1),"V ",c&&"(Charging)"]})]})})};var v=()=>{let{nightMode:e,getSignalKValue:t}=(0,r.yC)(),[a,s]=(0,i.useState)(b.BATTERIES),o=(0,i.useMemo)(()=>{let e=t("electrical.batteries.1.capacity.stateOfCharge"),a=t("electrical.batteries.1.voltage");return[{level:null===e?(0,x.Si)(a):e,number:1,voltage:a}].filter(e=>null!==e.level)},[t]),n=(0,i.useMemo)(()=>({FRESH_WATER:t(p.FRESH_WATER.path)||40,FUEL:t(p.FUEL.path)||75,BLACK_WATER:t(p.BLACK_WATER.path)||20}),[t]),c=()=>{s(e=>e===b.BATTERIES?b.TANKS:b.BATTERIES)},d=a===b.BATTERIES;return(0,l.jsx)("div",{className:"".concat(e?"text-oNight":"text-oGray"," rounded-lg transition-all duration-300 hover:bg-gray-800/10 cursor-pointer"),onClick:c,role:"button",tabIndex:0,"aria-label":"Toggle between ".concat(d?"tanks":"batteries"," display"),onKeyDown:e=>"Enter"===e.key&&c(),children:d?(0,l.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,l.jsx)(f,{batteryLevel:e.level,batteryNumber:e.number,voltage:e.voltage},e.number))}):(0,l.jsx)("div",{className:"space-y-2",children:Object.keys(p).map(e=>(0,l.jsx)(m,{type:e,level:n[e]},e))})})};let N=(0,n.default)(()=>Promise.all([a.e(918),a.e(226),a.e(687),a.e(250),a.e(909),a.e(413)]).then(a.bind(a,80413)),{loadableGenerated:{webpack:()=>[80413]},ssr:!1}),j=(0,n.default)(()=>Promise.all([a.e(918),a.e(226),a.e(687),a.e(909),a.e(188)]).then(a.bind(a,97188)),{loadableGenerated:{webpack:()=>[97188]},ssr:!1}),g=(0,n.default)(()=>Promise.all([a.e(226),a.e(909),a.e(197)]).then(a.bind(a,62197)),{loadableGenerated:{webpack:()=>[62197]},ssr:!1}),w=(0,n.default)(()=>a.e(751).then(a.bind(a,95751)),{loadableGenerated:{webpack:()=>[95751]}}),E=(0,n.default)(()=>a.e(353).then(a.bind(a,22353)),{loadableGenerated:{webpack:()=>[22353]}}),R=(0,n.default)(()=>a.e(610).then(a.bind(a,48610)),{loadableGenerated:{webpack:()=>[48610]}}),G=(0,n.default)(()=>a.e(59).then(a.bind(a,53059)),{loadableGenerated:{webpack:()=>[53059]}}),k=(0,n.default)(()=>a.e(728).then(a.bind(a,66728)),{loadableGenerated:{webpack:()=>[66728]}}),y=(0,n.default)(()=>a.e(949).then(a.bind(a,76949)),{loadableGenerated:{webpack:()=>[76949]}}),_=()=>{let{gl:e,scene:t}=(0,s.D)();return(0,i.useEffect)(()=>{if(window&&e){window.__OCEARO_RENDERER=e;let t=setInterval(()=>{e&&e.info&&(window.__OCEARO_RENDER_INFO=e.info)},1e3);return()=>{delete window.__OCEARO_RENDERER,delete window.__OCEARO_RENDER_INFO,clearInterval(t)}}},[e,t]),null};var A=()=>{let{states:e}=(0,r.yC)(),[t,a]=(0,i.useState)(null);return(0,l.jsxs)("div",{className:"w-full h-full relative ",children:[(0,l.jsxs)("div",{className:"absolute top-2 left-2 z-10 space-y-0",children:[(0,l.jsx)(h,{}),!e.anchorWatch&&(0,l.jsx)(w,{}),e.anchorWatch&&(0,l.jsx)(G,{})]}),(0,l.jsxs)("div",{className:"absolute top-2 right-2 z-20 flex flex-col items-end",children:[(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(y,{content:t})}),(0,l.jsx)(v,{})]}),(0,l.jsx)("div",{className:"absolute left-2 bottom-2 z-20 flex flex-col items-center",children:(0,l.jsx)(k,{})}),(0,l.jsx)("div",{className:"absolute right-2 bottom-2 z-20 flex flex-col items-center",children:(0,l.jsx)(R,{})}),!e.anchorWatch&&(0,l.jsx)("div",{className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10",children:(0,l.jsx)(E,{})}),(0,l.jsx)("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-full h-full",children:(0,l.jsxs)(o.Xz,{style:{width:"100%",height:"100%"},shadows:!1,dpr:Math.min(window.devicePixelRatio,1.5),performance:{min:.5},gl:{antialias:!0,powerPreference:"low-power",physicallyCorrectLights:!1,toneMapping:c.uL9,toneMappingExposure:1,shadowMap:{enabled:!1},precision:"lowp"},children:[(0,l.jsx)(_,{}),e.parkingMode?(0,l.jsx)(j,{onUpdateInfoPanel:a}):e.anchorWatch?(0,l.jsx)(g,{onUpdateInfoPanel:a}):(0,l.jsx)(N,{onUpdateInfoPanel:a})]})})]})}},15008:function(e,t,a){a.d(t,{Si:function(){return s},d3:function(){return o},vp:function(){return l},z:function(){return n}});let l={WARNING_THRESHOLD:50,DANGER_THRESHOLD:20,CHARGING_THRESHOLD:13.2,MIN_VOLTAGE:10.5,MAX_VOLTAGE:14.4},s=e=>{if(!e||"number"!=typeof e)return 0;if(e>=13)return 100;if(e<=l.MIN_VOLTAGE)return 0;let t=[{voltage:12.85,soc:100},{voltage:12.75,soc:90},{voltage:12.65,soc:80},{voltage:12.55,soc:70},{voltage:12.45,soc:60},{voltage:12.35,soc:50},{voltage:12.25,soc:40},{voltage:12.15,soc:30},{voltage:12.05,soc:20},{voltage:11.95,soc:15},{voltage:11.8,soc:10},{voltage:11.6,soc:5},{voltage:10.5,soc:0}];for(let a=0;a<t.length-1;a++)if(e>=t[a+1].voltage){let l=t[a].voltage,s=t[a+1].voltage,o=t[a].soc,n=t[a+1].soc;return Math.round(n+(e-s)/(l-s)*(o-n))}return 0},o=e=>e>l.CHARGING_THRESHOLD,n=e=>e>l.WARNING_THRESHOLD?"bg-oGreen":e>l.DANGER_THRESHOLD?"bg-oYellow":"bg-oRed"}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[412],{6412:function(e,t,a){a.r(t),a.d(t,{default:function(){return T}});var l=a(57437),s=a(21276),o=a(36496),n=a(30166),r=a(53082),c=a(72079),i=a(2265),d=a(51268),u=a(35217),h=()=>{let{nightMode:e,setNightMode:t,states:a,toggleState:s}=(0,r.yC)(),o=(0,i.useRef)(a.autopilot),n=e?"text-oNight":"text-oGray",c=e=>{let t={autopilot:"autopilot"===e,anchorWatch:"anchorWatch"===e,parkingMode:"parkingMode"===e};Object.keys(t).forEach(e=>{s(e,t[e])})};return(0,i.useEffect)(()=>{a.autopilot&&!o.current&&s("showPolar",!0),o.current=a.autopilot},[a.autopilot,s]),(0,l.jsxs)("div",{className:"text-lg",children:[(0,l.jsx)("button",{onClick:()=>c("autopilot"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.lnS,className:a.autopilot?"text-oBlue":n})}),(0,l.jsx)("button",{onClick:()=>c("anchorWatch"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.SJR,className:a.anchorWatch?"text-oYellow":n})}),(0,l.jsx)("button",{onClick:()=>c("parkingMode"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.BQ9,className:a.parkingMode?"text-oGreen":n})}),(0,l.jsx)("button",{onClick:()=>t(!e),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.DBF,className:e?"text-oNight":n})}),(0,l.jsx)("button",{onClick:()=>s("showOcean"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.L02,className:a.showOcean?"text-oBlue":n})}),a.autopilot&&!a.showOcean&&(0,l.jsx)("button",{onClick:()=>s("showPolar"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.GTN,className:a.showPolar?"text-oBlue":n})}),a.autopilot&&(0,l.jsx)("button",{onClick:()=>s("ais"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.mDh,className:a.ais?"text-oGreen":n})})]})},x=a(15008);let b={BATTERIES:"batteries",TANKS:"tanks"},p={FRESH_WATER:{id:"freshWater",label:"Fresh Water",path:"tanks.freshWater.0.currentLevel",icon:u.Zkk,color:"bg-oBlue"},FUEL:{id:"fuel",label:"Fuel",path:"tanks.fuel.0.currentLevel",icon:u.q16,color:"bg-oYellow"},BLACK_WATER:{id:"blackWater",label:"Black Water",path:"tanks.blackWater.0.currentLevel",icon:u.NId,color:"bg-oGray"}},m=e=>{let{level:t,type:a}=e,[s,o]=(0,i.useState)(!1),n=Math.max(0,Math.min(100,t)),{label:r,icon:c,color:u}=p[a];return(0,l.jsxs)("div",{className:"flex items-center space-x-3 relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("span",{className:"text-sm",children:(0,l.jsx)(d.G,{icon:c})}),(0,l.jsxs)("div",{className:"relative w-8 h-4 bg-oGray rounded-sm border border-oGray flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute -right-1 w-1 h-3 bg-oGray rounded-sm"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-full ".concat(u," transition-all duration-300 rounded-sm"),style:{width:"".concat(n,"%")}}),(0,l.jsxs)("span",{className:"relative z-10 text-xs text-white font-bold ".concat(n<=20?"text-oRed animate-pulse":""),children:[n,"%"]})]})]}),s&&(0,l.jsxs)("div",{className:"absolute -left-20 top-6 bg-gray-800 text-white px-2 py-1 rounded text-xs whitespace-nowrap z-20",children:[r,": ",n,"%"]})]})},f=e=>{let{batteryLevel:t,batteryNumber:a,voltage:s}=e,[o,n]=(0,i.useState)(!1),r=Math.max(0,Math.min(100,t)),c=(0,x.d3)(s),h=(0,i.useMemo)(()=>(0,x.z)(r),[r]);return(0,l.jsx)("div",{className:"flex items-center space-x-3 relative",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("span",{className:"text-sm",children:(0,l.jsx)(d.G,{icon:u.BDt})}),(0,l.jsxs)("div",{className:"relative w-8 h-4 bg-oGray rounded-sm border border-oGray flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute -right-1 w-1 h-3 bg-oGray rounded-sm"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-full ".concat(h," transition-all duration-300 rounded-sm"),style:{width:"".concat(r,"%")}}),c?(0,l.jsx)("span",{className:"relative z-10 text-xs text-white font-bold",children:"⚡︎"}):(0,l.jsxs)("span",{className:"relative z-10 text-xs text-white font-bold ".concat(r<=x.vp.DANGER_THRESHOLD?"text-oRed animate-pulse":""),children:[r,"%"]})]}),o&&(0,l.jsxs)("div",{className:"absolute -left-20 top-6 bg-gray-800 text-white px-2 py-1 rounded text-xs whitespace-nowrap z-20",children:["Voltage: ",null==s?void 0:s.toFixed(1),"V ",c&&"(Charging)"]})]})})};var v=()=>{let{nightMode:e,getSignalKValue:t}=(0,r.yC)(),[a,s]=(0,i.useState)(b.BATTERIES),o=(0,i.useMemo)(()=>{let e=t("electrical.batteries.1.capacity.stateOfCharge"),a=t("electrical.batteries.1.voltage");return[{level:null===e?(0,x.Si)(a):e,number:1,voltage:a}].filter(e=>null!==e.level)},[t]),n=(0,i.useMemo)(()=>({FRESH_WATER:t(p.FRESH_WATER.path)||40,FUEL:t(p.FUEL.path)||75,BLACK_WATER:t(p.BLACK_WATER.path)||20}),[t]),c=()=>{s(e=>e===b.BATTERIES?b.TANKS:b.BATTERIES)},d=a===b.BATTERIES;return(0,l.jsx)("div",{className:"".concat(e?"text-oNight":"text-oGray"," rounded-lg transition-all duration-300 hover:bg-gray-800/10 cursor-pointer"),onClick:c,role:"button",tabIndex:0,"aria-label":"Toggle between ".concat(d?"tanks":"batteries"," display"),onKeyDown:e=>"Enter"===e.key&&c(),children:d?(0,l.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,l.jsx)(f,{batteryLevel:e.level,batteryNumber:e.number,voltage:e.voltage},e.number))}):(0,l.jsx)("div",{className:"space-y-2",children:Object.keys(p).map(e=>(0,l.jsx)(m,{type:e,level:n[e]},e))})})};let N=(0,n.default)(()=>Promise.all([a.e(918),a.e(226),a.e(687),a.e(250),a.e(909),a.e(413)]).then(a.bind(a,80413)),{loadableGenerated:{webpack:()=>[80413]},ssr:!1}),g=(0,n.default)(()=>Promise.all([a.e(918),a.e(226),a.e(687),a.e(909),a.e(188)]).then(a.bind(a,97188)),{loadableGenerated:{webpack:()=>[97188]},ssr:!1}),j=(0,n.default)(()=>Promise.all([a.e(226),a.e(909),a.e(197)]).then(a.bind(a,62197)),{loadableGenerated:{webpack:()=>[62197]},ssr:!1}),w=(0,n.default)(()=>a.e(751).then(a.bind(a,95751)),{loadableGenerated:{webpack:()=>[95751]}}),E=(0,n.default)(()=>a.e(353).then(a.bind(a,22353)),{loadableGenerated:{webpack:()=>[22353]}}),R=(0,n.default)(()=>a.e(610).then(a.bind(a,48610)),{loadableGenerated:{webpack:()=>[48610]}}),G=(0,n.default)(()=>a.e(59).then(a.bind(a,53059)),{loadableGenerated:{webpack:()=>[53059]}}),k=(0,n.default)(()=>a.e(728).then(a.bind(a,66728)),{loadableGenerated:{webpack:()=>[66728]}}),y=(0,n.default)(()=>a.e(487).then(a.bind(a,5487)),{loadableGenerated:{webpack:()=>[5487]}}),_=(0,n.default)(()=>a.e(949).then(a.bind(a,76949)),{loadableGenerated:{webpack:()=>[76949]}}),A=()=>{let{gl:e,scene:t}=(0,s.D)();return(0,i.useEffect)(()=>{if(window&&e){window.__OCEARO_RENDERER=e;let t=setInterval(()=>{e&&e.info&&(window.__OCEARO_RENDER_INFO=e.info)},1e3);return()=>{delete window.__OCEARO_RENDERER,delete window.__OCEARO_RENDER_INFO,clearInterval(t)}}},[e,t]),null};var T=()=>{let{states:e}=(0,r.yC)(),[t,s]=(0,i.useState)(null),[n,d]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{d(!1!==a(63321).Z.getAll().showAttitudeIndicator)},[]),(0,l.jsxs)("div",{className:"w-full h-full relative ",children:[(0,l.jsxs)("div",{className:"absolute top-2 left-2 z-10 space-y-0",children:[(0,l.jsx)(h,{}),!e.anchorWatch&&(0,l.jsx)(w,{}),e.anchorWatch&&(0,l.jsx)(G,{})]}),(0,l.jsxs)("div",{className:"absolute top-2 right-2 z-20 flex flex-col items-end",children:[(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(_,{content:t})}),(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("span",{className:"text-white mr-2 align-top",children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),(0,l.jsx)(v,{})]}),n&&(0,l.jsx)(y,{})]}),(0,l.jsx)("div",{className:"absolute left-2 bottom-2 z-20 flex flex-col items-center",children:(0,l.jsx)(k,{})}),(0,l.jsx)("div",{className:"absolute right-2 bottom-2 z-20 flex flex-col items-center",children:(0,l.jsx)(R,{})}),!e.anchorWatch&&(0,l.jsx)("div",{className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10",children:(0,l.jsx)(E,{})}),(0,l.jsx)("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-full h-full",children:(0,l.jsxs)(o.Xz,{style:{width:"100%",height:"100%"},shadows:!1,dpr:Math.min(window.devicePixelRatio,1.5),performance:{min:.5},gl:{antialias:!0,powerPreference:"low-power",physicallyCorrectLights:!1,toneMapping:c.uL9,toneMappingExposure:1,shadowMap:{enabled:!1},precision:"lowp"},children:[(0,l.jsx)(A,{}),e.parkingMode?(0,l.jsx)(g,{onUpdateInfoPanel:s}):e.anchorWatch?(0,l.jsx)(j,{onUpdateInfoPanel:s}):(0,l.jsx)(N,{onUpdateInfoPanel:s})]})})]})}},15008:function(e,t,a){a.d(t,{Si:function(){return s},d3:function(){return o},vp:function(){return l},z:function(){return n}});let l={WARNING_THRESHOLD:50,DANGER_THRESHOLD:20,CHARGING_THRESHOLD:13.2,MIN_VOLTAGE:10.5,MAX_VOLTAGE:14.4},s=e=>{if(!e||"number"!=typeof e)return 0;if(e>=13)return 100;if(e<=l.MIN_VOLTAGE)return 0;let t=[{voltage:12.85,soc:100},{voltage:12.75,soc:90},{voltage:12.65,soc:80},{voltage:12.55,soc:70},{voltage:12.45,soc:60},{voltage:12.35,soc:50},{voltage:12.25,soc:40},{voltage:12.15,soc:30},{voltage:12.05,soc:20},{voltage:11.95,soc:15},{voltage:11.8,soc:10},{voltage:11.6,soc:5},{voltage:10.5,soc:0}];for(let a=0;a<t.length-1;a++)if(e>=t[a+1].voltage){let l=t[a].voltage,s=t[a+1].voltage,o=t[a].soc,n=t[a+1].soc;return Math.round(n+(e-s)/(l-s)*(o-n))}return 0},o=e=>e>l.CHARGING_THRESHOLD,n=e=>e>l.WARNING_THRESHOLD?"bg-oGreen":e>l.DANGER_THRESHOLD?"bg-oYellow":"bg-oRed"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[487],{5487:function(t,e,i){i.r(e),i.d(e,{default:function(){return s}});var l=i(57437),n=i(2265),a=i(53082);function s(){let t=(0,n.useRef)(null),{nightMode:e,getSignalKValue:i}=(0,a.yC)(),[s,o]=(0,n.useState)("canvas"),[r,c]=(0,n.useState)(0),[h,d]=(0,n.useState)(0),[u,v]=(0,n.useState)(0);return(0,n.useEffect)(()=>{let e;let l=t.current,n=null;if(!l||"canvas"!==s||(n=l.getContext("2d")))return function t(){let l=i("navigation.attitude")||{},o=(0,a.Ux)(null==l?void 0:l.roll)||0,r=(0,a.Ux)(null==l?void 0:l.pitch)||0,h=(0,a.Ux)(null==l?void 0:l.yaw)||0;c(o),d(r),v(h),"canvas"===s&&function(t,e,i){if(!n)return;n.clearRect(0,0,80,80),n.lineWidth=1,n.strokeStyle=a.n5,n.lineWidth=2,n.beginPath(),n.arc(40,40,38,0,2*Math.PI),n.stroke(),n.save(),n.translate(40,40),n.strokeStyle="#FFFFFF",n.lineWidth=1;for(let t=0;t<360;t+=15){let e=t*Math.PI/180,i=t%90==0,l=35-(i?5:2),a=35*Math.cos(e),s=35*Math.sin(e),o=l*Math.cos(e),r=l*Math.sin(e);n.beginPath(),n.moveTo(a,s),n.lineTo(o,r),n.lineWidth=i?1.5:.75,n.stroke()}n.restore(),n.save(),n.beginPath(),n.arc(40,40,32,0,2*Math.PI),n.clip(),n.translate(40,40),n.rotate(t*Math.PI/180);let l=.35555555555555557;n.translate(0,e*l),n.fillStyle=a.n5,n.fillRect(-48,0,96,64),n.beginPath(),n.moveTo(-48,0),n.lineTo(48,0),n.strokeStyle=a.gK,n.lineWidth=1.5,n.stroke(),n.strokeStyle=a.vd,n.lineWidth=.75;for(let t=-60;t<=60;t+=20){if(0===t)continue;let e=-t*l;n.beginPath(),n.moveTo(-7.5,e),n.lineTo(7.5,e),n.stroke()}n.restore(),n.save(),n.translate(40,40),n.rotate(i*Math.PI/180),n.lineWidth=1,n.beginPath(),n.moveTo(0,-10),n.lineTo(5,5),n.lineTo(-5,5),n.closePath(),n.fillStyle=a.gK,n.fill(),n.strokeStyle=a.vd,n.stroke(),n.restore()}(o,r,h),e=requestAnimationFrame(t)}(),()=>{cancelAnimationFrame(e)}},[i,s]),(0,l.jsx)("div",{className:"mt-4 cursor-pointer",style:{width:"".concat(80,"px"),height:"".concat(80,"px"),boxSizing:"content-box"},onClick:()=>{o(t=>"canvas"===t?"text":"canvas")},title:"Click to toggle view",children:"canvas"===s?(0,l.jsx)("canvas",{ref:t,width:80,height:80}):(0,l.jsxs)("div",{className:"text-sm font-bold cursor-pointer flex flex-col items-end w-full ".concat(e?"text-oNight":"text-white"),children:[(0,l.jsxs)("div",{className:"text-right",children:["Roll: ",r.toFixed(1),"\xb0"]}),(0,l.jsxs)("div",{className:"text-right",children:["Pitch: ",h.toFixed(1),"\xb0"]}),(0,l.jsxs)("div",{className:"text-right",children:["Yaw: ",u.toFixed(1),"\xb0"]})]})})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[677],{39677:function(e,t,a){a.r(t),a.d(t,{default:function(){return x}});var s=a(57437),l=a(2265),i=a(53082),r=a(15008),c=a(51268),n=a(35217),d=e=>{let{data:t,dataKey:a,color:l,scale:r,label:c,unit:n,showPoints:d=!1,lineWidth:o=1,fillGradient:x=!1}=e,{nightMode:m}=(0,i.yC)(),h=t.filter(e=>null!==e[a]&&void 0!==e[a]);if(0===h.length)return(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:"No data available"});let g=Math.min(...h.map(e=>e[a])),u=Math.max(...h.map(e=>e[a])),v=Math.max(r.min,g-(u-g)*.1),f=Math.min(r.max,u+(u-g)*.1),j=u-g>(r.max-r.min)*.05,N=j?v:r.min,p=j?f:r.max,b=t.map((e,s)=>{let l=s/(t.length-1)*100;return null===e[a]||void 0===e[a]?{x:l,y:null,value:null,time:e.time}:{x:l,y:100-Math.min(100,Math.max(0,(e[a]-N)/(p-N)*100)),value:e[a],time:e.time}}).filter(e=>null!==e.y),y=b.reduce((e,t,a)=>e+(0===a?"M ".concat(t.x,",").concat(t.y):" L ".concat(t.x,",").concat(t.y)),""),w=Array.from({length:5}).map((e,t)=>({position:t/4*100,value:p-(p-N)/4*t}));return(0,s.jsxs)("div",{className:"h-full w-full relative",children:[(0,s.jsx)("div",{className:"absolute inset-0",children:w.map((e,t)=>(0,s.jsx)("div",{className:"absolute w-full border-t border-gray-300 opacity-40",style:{top:"".concat(e.position,"%")},children:(0,s.jsxs)("span",{className:"absolute text-xs ".concat(m?"text-oNight":"text-white"),children:[e.value.toFixed(e.value<10?1:0),n]})},t))}),(0,s.jsx)("div",{className:"absolute bottom-0 w-full",children:t.filter((e,t)=>t%10==0).map((e,a,l)=>(0,s.jsx)("span",{className:"absolute text-xs ".concat(m?"text-oNight":"text-white"," transform -translate-x-1/2"),style:{left:"".concat(10*a/(t.length-1)*100+10,"%"),bottom:"-20px"},children:e.time.split(":").slice(1).join(":")},a))}),(0,s.jsx)("div",{className:"absolute inset-0 ".concat(x?"rightPaneBg bg-opacity-30":"bg-oGray2 bg-opacity-10"," rounded-lg")}),j&&(0,s.jsxs)("div",{className:"absolute top-0 right-0 bg-oGray2 bg-opacity-70 px-2 py-1 rounded-md text-xs text-white",children:[N.toFixed(1)," - ",p.toFixed(1),n]}),(0,s.jsxs)("svg",{className:"w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"gradient-".concat(a),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:x?"0.5":"0.3"}),(0,s.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:x?"0.1":"0.05"})]}),x&&(0,s.jsxs)("linearGradient",{id:"line-gradient-".concat(a),x1:"0",y1:"0",x2:"1",y2:"0",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:"0.8"}),(0,s.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:"1"})]})]}),(0,s.jsx)("path",{d:"".concat(y," L ").concat(b[b.length-1].x,",100 L ").concat(b[0].x,",100 Z"),fill:"url(#gradient-".concat(a,")"),className:x?"filter drop-shadow-md":""}),(0,s.jsx)("path",{d:y,fill:"none",stroke:x?"url(#line-gradient-".concat(a,")"):l,strokeWidth:x?1.5*o:o,strokeLinecap:"round",strokeLinejoin:"round",className:x?"filter drop-shadow-sm":""}),d&&b.map((e,t)=>(0,s.jsx)("circle",{cx:e.x,cy:e.y,r:x?.8:.5,fill:l,className:"hover:r-4 transition-all duration-150 ".concat(x?"filter drop-shadow-md":""),children:(0,s.jsx)("title",{children:"".concat(c,": ").concat(e.value.toFixed(2)).concat(n)})},t))]})]})},o=a(72079),x=()=>{let{nightMode:e,getSignalKValue:t}=(0,i.yC)(),a=(0,l.useRef)(performance.now()),x=(0,l.useRef)(performance.now()),m=(0,l.useRef)(0),[h,g]=(0,l.useState)("battery"),[u,v]=(0,l.useState)("voltage"),[f,j]=(0,l.useState)("fps"),[N,p]=(0,l.useState)("1"),[b,y]=(0,l.useState)(!1),w=(0,l.useCallback)(()=>{let e=[];for(let a=0;a<=2;a++){let s=t("electrical.batteries.".concat(a,".name")),l=t("electrical.batteries.".concat(a,".voltage"));(s||l)&&e.push({id:a.toString(),name:s||"Battery ".concat(a),hasData:!0})}return 0===e.length&&e.push({id:"1",name:"Main Battery",hasData:!0}),e},[t]),[C,G]=(0,l.useState)(()=>w()),R=(0,l.useCallback)(()=>{let e=new Date().toLocaleTimeString(),a=t("electrical.batteries.".concat(N,".voltage"))||12,s=t("electrical.batteries.".concat(N,".capacity.stateOfCharge")),l=t("electrical.batteries.".concat(N,".current"))||5,c=t("electrical.batteries.".concat(N,".temperature")),n=null!==c?(0,i.G5)(c):null,d=t("electrical.batteries.".concat(N,".chemistry")),o=t("electrical.batteries.".concat(N,".name")),x=t("electrical.batteries.".concat(N,".location")),m=t("electrical.batteries.".concat(N,".dateInstalled")),h=t("electrical.batteries.".concat(N,".manufacturer.name")),g=t("electrical.batteries.".concat(N,".manufacturer.model")),u=t("electrical.batteries.".concat(N,".manufacturer.URL")),v=t("electrical.batteries.".concat(N,".associatedBus")),f=t("electrical.batteries.".concat(N,".voltage.ripple")),j=t("electrical.batteries.".concat(N,".capacity.nominal")),p=t("electrical.batteries.".concat(N,".capacity.actual")),b=t("electrical.batteries.".concat(N,".capacity.remaining")),y=t("electrical.batteries.".concat(N,".capacity.dischargeLimit")),w=t("electrical.batteries.".concat(N,".capacity.stateOfHealth")),C=t("electrical.batteries.".concat(N,".capacity.dischargeSinceFull")),G=t("electrical.batteries.".concat(N,".capacity.timeRemaining")),R=t("electrical.batteries.".concat(N,".lifetimeDischarge")),E=t("electrical.batteries.".concat(N,".lifetimeRecharge")),A="auto"===t("steering.autopilot.state"),O=t("navigation.lights")||!1;return{time:e,voltage:a,current:l,stateOfCharge:null!==s?s:(0,r.Si)(a),power:a*l,temperature:n,autopilotState:A,instrumentsOn:l>.5,navigationLightsOn:O,chemistry:d,name:o,location:x,dateInstalled:m,manufacturer:h,model:g,manufacturerURL:u,associatedBus:v,voltageRipple:f,nominalCapacity:j,actualCapacity:p,remainingCapacity:b,dischargeLimit:y,stateOfHealth:w,dischargeSinceFull:C,timeRemaining:G,lifetimeDischarge:R,lifetimeRecharge:E}},[t,N]),[E,A]=(0,l.useState)(()=>Array(60).fill(null).map(R)),[O,S]=(0,l.useState)(()=>{let e=new Date().toLocaleTimeString();return Array(60).fill({time:e,fps:60,ms:16.67,drawCalls:0,triangles:0,geometries:0,textures:0,memory:0})}),T=(0,l.useCallback)(e=>{let a=E[E.length-1],s=t("electrical.batteries.".concat(N,".voltage"))||a.voltage,l=t("electrical.batteries.".concat(N,".current"))||a.current,c=t("electrical.batteries.".concat(N,".capacity.stateOfCharge")),n=null!==c?c:(0,r.Si)(s),d=t("electrical.batteries.".concat(N,".temperature")),o=null!==d?(0,i.G5)(d):null,x=t("electrical.batteries.".concat(N,".chemistry"))||a.chemistry,m=t("electrical.batteries.".concat(N,".name"))||a.name,h=t("electrical.batteries.".concat(N,".location"))||a.location,g=t("electrical.batteries.".concat(N,".dateInstalled"))||a.dateInstalled,u=t("electrical.batteries.".concat(N,".manufacturer.name"))||a.manufacturer,v=t("electrical.batteries.".concat(N,".manufacturer.model"))||a.model,f=t("electrical.batteries.".concat(N,".manufacturer.URL"))||a.manufacturerURL,j=t("electrical.batteries.".concat(N,".associatedBus"))||a.associatedBus,p=t("electrical.batteries.".concat(N,".voltage.ripple"))||a.voltageRipple,b=t("electrical.batteries.".concat(N,".capacity.nominal"))||a.nominalCapacity,y=t("electrical.batteries.".concat(N,".capacity.actual"))||a.actualCapacity,w=t("electrical.batteries.".concat(N,".capacity.remaining"))||a.remainingCapacity,C=t("electrical.batteries.".concat(N,".capacity.dischargeLimit"))||a.dischargeLimit,G=t("electrical.batteries.".concat(N,".capacity.stateOfHealth"))||a.stateOfHealth,R=t("electrical.batteries.".concat(N,".capacity.dischargeSinceFull"))||a.dischargeSinceFull,A=t("electrical.batteries.".concat(N,".capacity.timeRemaining"))||a.timeRemaining,O=t("electrical.batteries.".concat(N,".lifetimeDischarge"))||a.lifetimeDischarge,S=t("electrical.batteries.".concat(N,".lifetimeRecharge"))||a.lifetimeRecharge;return{time:e,voltage:s,current:l,stateOfCharge:n,power:s*l,temperature:o,autopilotState:"auto"===t("steering.autopilot.state"),instrumentsOn:l>.5,navigationLightsOn:t("navigation.lights")||!1,chemistry:x,name:m,location:h,dateInstalled:g,manufacturer:u,model:v,manufacturerURL:f,associatedBus:j,voltageRipple:p,nominalCapacity:b,actualCapacity:y,remainingCapacity:w,dischargeLimit:C,stateOfHealth:G,dischargeSinceFull:R,timeRemaining:A,lifetimeDischarge:O,lifetimeRecharge:S}},[t,E,N]),L=(0,l.useRef)(null);(0,l.useEffect)(()=>{window.__OCEARO_RENDERER&&(L.current=window.__OCEARO_RENDERER)},[]),(0,l.useEffect)(()=>{let e=setInterval(()=>{G(w())},3e4);return()=>clearInterval(e)},[w]),(0,l.useEffect)(()=>{A(Array(60).fill(null).map(R))},[N,R]),(0,l.useEffect)(()=>{let e;let t=()=>{let s=new Date().toLocaleTimeString();m.current++;let l=performance.now();if(a.current,l>=x.current+1e3){var i,r,c,n,d,o,h,g;let e=1e3*m.current/(l-x.current),t=e>0?1e3/e:0,a=0,u=0,v=0,f=0,j=0;if(window.performance&&window.performance.memory&&(j=Math.round(window.performance.memory.usedJSHeapSize/1048576)),L.current){let e=L.current.info;a=(null===(i=e.render)||void 0===i?void 0:i.calls)||0,u=(null===(r=e.render)||void 0===r?void 0:r.triangles)||0,v=(null===(c=e.memory)||void 0===c?void 0:c.geometries)||0,f=(null===(n=e.memory)||void 0===n?void 0:n.textures)||0}else if(window.__OCEARO_RENDER_INFO){let e=window.__OCEARO_RENDER_INFO;a=(null===(d=e.render)||void 0===d?void 0:d.calls)||0,u=(null===(o=e.render)||void 0===o?void 0:o.triangles)||0,v=(null===(h=e.memory)||void 0===h?void 0:h.geometries)||0,f=(null===(g=e.memory)||void 0===g?void 0:g.textures)||0}S(l=>[...l.slice(1),{time:s,fps:e,ms:t,drawCalls:a,triangles:u,geometries:v,textures:f,memory:j}]),A(e=>[...e.slice(1),T(s)]),x.current=l,m.current=0}a.current=l,e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[T]);let F={voltage:{min:10.5,max:15,step:1},current:{min:-5,max:50,step:5},soc:{min:0,max:100,step:25},temperature:{min:10,max:60,step:10}},M={fps:{min:0,max:60,step:15},drawCalls:{min:0,max:500,step:100},triangles:{min:0,max:5e5,step:1e5},memory:{min:0,max:500,step:100}},I=E[E.length-1],D=(0,r.d3)(I.voltage),P=null!==I.temperature;return(0,s.jsxs)("div",{className:"flex flex-col h-full rightPaneBg overflow-auto",children:[(0,s.jsxs)("div",{className:"flex border-b border-gray-800",children:[(0,s.jsxs)("button",{onClick:()=>g("battery"),className:"flex-1 py-3 px-4 text-sm font-medium flex items-center justify-center transition-all ".concat("battery"===h?"text-green-500 border-b-2 border-green-500":"text-gray-400 hover:text-gray-300"),children:[(0,s.jsx)(c.G,{icon:n.XEC,className:"mr-2"}),"Energy"]}),(0,s.jsxs)("button",{onClick:()=>g("graph"),className:"flex-1 py-3 px-4 text-sm font-medium flex items-center justify-center transition-all ".concat("graph"===h?"text-green-500 border-b-2 border-green-500":"text-gray-400 hover:text-gray-300"),children:[(0,s.jsx)(c.G,{icon:n.Stf,className:"mr-2"}),"Consumption"]}),(0,s.jsxs)("button",{onClick:()=>g("performance"),className:"flex-1 py-3 px-4 text-sm font-medium flex items-center justify-center transition-all ".concat("performance"===h?"text-green-500 border-b-2 border-green-500":"text-gray-400 hover:text-gray-300"),children:[(0,s.jsx)(c.G,{icon:n.ESn,className:"mr-2"}),"Performance"]})]}),(0,s.jsxs)("div",{className:"h-full",children:["battery"===h&&(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1 min-h-0 rightPaneBg",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("h2",{className:"text-xl font-bold text-white flex items-center",children:["Battery information ",I.stateOfCharge.toFixed(0),"%",(0,s.jsx)("button",{className:"ml-2 bg-oGray2 rounded-full w-6 h-6 flex items-center justify-center text-gray-400 hover:bg-oGray focus:outline-none focus:ring-1 focus:ring-green-500",onClick:()=>y(!b),"aria-label":"Battery details",children:(0,s.jsx)(c.G,{icon:n.Fuz,className:"text-xs"})})]}),(0,s.jsx)("div",{className:"flex items-center space-x-2",children:(0,s.jsx)("select",{className:"bg-oGray2 px-2 py-1 rounded text-white text-sm border border-gray-700 focus:outline-none focus:ring-1 focus:ring-green-500",value:N,onChange:e=>p(e.target.value),children:C.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))})})]}),b&&(0,s.jsxs)("div",{className:"bg-oGray2 p-4 rounded-lg mb-6 relative",children:[(0,s.jsx)("button",{className:"absolute top-2 right-2 text-gray-400 hover:text-white",onClick:()=>y(!1),"aria-label":"Close details",children:"\xd7"}),(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-4",children:"BATTERY DETAILS"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[I.name&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"NAME"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.name})]}),I.location&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"LOCATION"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.location})]}),I.manufacturer&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"MAKER"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.manufacturer})]}),I.model&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"MODEL"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.model})]}),I.chemistry&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"CHEMISTRY"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.chemistry})]}),I.dateInstalled&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"INSTALLED"}),(0,s.jsx)("div",{className:"text-sm text-white",children:new Date(I.dateInstalled).toLocaleDateString()})]}),I.associatedBus&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"BUS"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.associatedBus})]}),I.stateOfHealth&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"HEALTH"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(100*I.stateOfHealth).toFixed(0),"%"]})]}),null!==I.timeRemaining&&void 0!==I.timeRemaining&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"REMAINING"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.timeRemaining/3600).toFixed(1)," hrs"]})]})]}),(I.nominalCapacity||I.actualCapacity||I.remainingCapacity)&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-xs mb-2",children:"CAPACITY"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[I.nominalCapacity&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"NOMINAL"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.nominalCapacity/3600).toFixed(1)," Wh"]})]}),I.actualCapacity&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"ACTUAL"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.actualCapacity/3600).toFixed(1)," Wh"]})]}),I.remainingCapacity&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"REMAINING"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.remainingCapacity/3600).toFixed(1)," Wh"]})]})]})]}),(I.lifetimeDischarge||I.lifetimeRecharge)&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-xs mb-2",children:"LIFETIME STATISTICS"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[I.lifetimeDischarge&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"DISCHARGE"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.lifetimeDischarge/3600).toFixed(0)," Ah"]})]}),I.lifetimeRecharge&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"RECHARGE"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.lifetimeRecharge/3600).toFixed(0)," Ah"]})]})]})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col justify-between",children:[(0,s.jsxs)("div",{className:"relative bg-oGray2 rounded-lg p-4 mb-6",children:[(0,s.jsxs)("div",{className:"mb-2 flex justify-between items-center",children:[(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"text-gray-400 text-sm",children:"BATTERY PERCENTAGE"})}),(0,s.jsxs)("div",{className:"px-3 py-1 rounded-lg text-sm ".concat(D?"bg-green-900 text-green-400":"bg-red-900 text-red-400"),children:[(0,s.jsx)(c.G,{icon:D?n.Tr1:n.RoX,className:"mr-2"}),D?"Charging":"Discharging"]})]}),(0,s.jsxs)("div",{className:"h-24 relative mt-4 flex flex-col justify-between",children:[(0,s.jsxs)("div",{className:"flex justify-between text-xs text-gray-400 mb-1",children:[(0,s.jsx)("span",{children:"State of Charge"}),I.dischargeLimit&&(0,s.jsxs)("span",{children:["Discharge Limit: ",(100*I.dischargeLimit).toFixed(0),"%"]})]}),(0,s.jsxs)("div",{className:"h-10 bg-oGray relative rounded-lg overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-red-500 via-yellow-500 to-green-500 opacity-20"}),I.dischargeLimit&&(0,s.jsx)("div",{className:"absolute h-full border-r-2 border-yellow-500 border-dashed",style:{left:"".concat(100*I.dischargeLimit,"%")},children:(0,s.jsx)("div",{className:"absolute -right-1 top-0 w-2 h-2 bg-yellow-500 rounded-full"})}),(0,s.jsx)("div",{className:"h-full ".concat(D?"bg-gradient-to-r from-green-600 to-green-400":"bg-gradient-to-r from-orange-500 via-yellow-400 to-green-500"),style:{width:"".concat(I.stateOfCharge,"%")},children:(0,s.jsxs)("div",{className:"absolute top-0 h-full border-r-2 border-white",style:{left:"".concat(I.stateOfCharge,"%")},children:[(0,s.jsx)("div",{className:"absolute -right-1 top-0 w-2 h-2 bg-white rounded-full"}),(0,s.jsxs)("div",{className:"absolute -right-6 -top-6 bg-oGray2 px-1 py-0.5 rounded text-xs text-white",children:[I.stateOfCharge.toFixed(0),"%"]})]})})]}),(0,s.jsxs)("div",{className:"flex justify-between mt-2",children:[(0,s.jsxs)("div",{className:"text-xs text-white flex items-center",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-red-500 rounded-full mr-1"}),"Empty"]}),(0,s.jsx)("div",{className:"text-xs text-white bg-oGray2 px-2 py-1 rounded",children:D?"Charging":I.timeRemaining?"Time remaining: ".concat((I.timeRemaining/3600).toFixed(1)," h"):"Est. time: ".concat((I.stateOfCharge/(I.current/100)).toFixed(1)," h")}),(0,s.jsxs)("div",{className:"text-xs text-white flex items-center",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-green-500 rounded-full mr-1"}),"Full"]})]})]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-2",children:"POWER CONSUMPTION"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.zvy,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Autopilot"}),I.autopilotState&&(0,s.jsx)("span",{className:"ml-2 px-1.5 py-0.5 bg-green-900 text-green-400 text-xs rounded",children:"Active"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[I.autopilotState?(.4*I.current).toFixed(1):"0.0","%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-blue-500",style:{width:"".concat(I.autopilotState?Math.min(80,.8*I.current):0,"%")}})})]}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.ESn,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Navigation Instruments"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[(.3*I.current).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-cyan-500",style:{width:"".concat(Math.min(60,.6*I.current),"%")}})})]}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.BDt,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Navigation Lights"}),I.navigationLightsOn&&(0,s.jsx)("span",{className:"ml-2 px-1.5 py-0.5 bg-green-900 text-green-400 text-xs rounded",children:"On"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[(I.navigationLightsOn?.2:0).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-amber-500",style:{width:"".concat(I.navigationLightsOn?15:0,"%")}})})]}),P&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.ccn,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Battery Temperature"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[(.01*I.temperature).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-orange-500",style:{width:"".concat(Math.min(30,.5*I.temperature),"%")}})})]}),(0,s.jsxs)("div",{className:"mt-8 rightPaneBg bg-opacity-50 p-3 rounded-lg text-sm",children:[(0,s.jsx)("div",{className:"text-white font-medium mb-2",children:"MARINE POWER SAVING TIPS"}),(0,s.jsxs)("div",{className:"flex items-center text-green-400 mb-1",children:[(0,s.jsx)(c.G,{icon:n.BDt,className:"mr-2"}),(0,s.jsxs)("span",{children:["Turn off navigation lights during daylight to save ~",(.8*I.voltage).toFixed(1)," W"]})]}),(0,s.jsxs)("div",{className:"flex items-center text-green-400 mb-1",children:[(0,s.jsx)(c.G,{icon:n.zvy,className:"mr-2"}),(0,s.jsx)("span",{children:"Use wind vane steering when possible instead of autopilot"})]}),(0,s.jsxs)("div",{className:"flex items-center text-amber-400",children:[(0,s.jsx)(c.G,{icon:n.ESn,className:"mr-2"}),(0,s.jsxs)("span",{children:["Current power usage: ",(I.voltage*I.current).toFixed(1)," W"]})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 mt-6 text-center",children:[(0,s.jsxs)("div",{className:"bg-oGray2 p-3 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"VOLTAGE"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[I.voltage.toFixed(1),"V"]}),I.voltageRipple&&(0,s.jsxs)("div",{className:"text-xs text-gray-400 mt-1",children:["Ripple: ",I.voltageRipple.toFixed(2),"V"]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 p-3 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"CURRENT"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[I.current.toFixed(1),"A"]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 p-3 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"POWER"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[(I.voltage*I.current).toFixed(0),"W"]})]})]})]})]}),"graph"===h&&(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1 min-h-0 rightPaneBg",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-white",children:"Consumption Graph"}),(0,s.jsxs)("div",{className:"flex space-x-2 bg-oGray2 rounded-lg overflow-hidden p-1",children:[(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("voltage"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("voltage"),children:"Voltage"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("current"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("current"),children:"Current"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("soc"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("soc"),children:"SoC %"}),P&&(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("temperature"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("temperature"),children:"Temp"})]})]}),(0,s.jsx)("div",{className:"bg-oGray2 rounded-lg p-4 mb-6",children:(0,s.jsxs)("div",{className:"h-72 relative px-4 pb-6 pt-2 overflow-hidden",children:["voltage"===u&&(0,s.jsx)(d,{data:E,dataKey:"voltage",color:"#3b82f6",scale:F.voltage,label:"Voltage",unit:"V",showPoints:!0,fillGradient:!0}),"current"===u&&(0,s.jsx)(d,{data:E,dataKey:"current",color:"#ef4444",scale:F.current,label:"Current",unit:"A",showPoints:!0,fillGradient:!0}),"soc"===u&&(0,s.jsx)(d,{data:E,dataKey:"stateOfCharge",color:"#22c55e",scale:F.soc,label:"State of Charge",unit:"%",showPoints:!0,fillGradient:!0}),"temperature"===u&&P&&(0,s.jsx)(d,{data:E,dataKey:"temperature",color:"#f97316",scale:F.temperature,label:"Temperature",unit:"\xb0C",showPoints:!0,fillGradient:!0})]})}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-4",children:"DETAILED CONSUMPTION BREAKDOWN"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,s.jsx)("div",{className:"border-l-4 border-green-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"REAL/NOMINAL"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:(()=>{let e=I.nominalCapacity,t=I.actualCapacity,a=I.stateOfHealth;return e&&t?"".concat(((t/e-1)*100).toFixed(1),"%"):a?"".concat((a-100).toFixed(1),"%"):"-0.9%"})()})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-green-500",style:{width:(()=>{let e=I.nominalCapacity,t=I.actualCapacity,a=I.stateOfHealth;return e&&t?"".concat(Math.min(100,Math.max(0,t/e*100)),"%"):a?"".concat(Math.min(100,Math.max(0,a)),"%"):"20%"})()}})})})]})}),(0,s.jsx)("div",{className:"border-l-4 border-blue-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"AVERAGE CONSUMPTION"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[(I.voltage*I.current/1e3).toFixed(1)," kWh/hour"]})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-blue-500",style:{width:"35%"}})})})]})}),(0,s.jsx)("div",{className:"border-l-4 border-orange-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"TEMPERATURE IMPACT"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:P?"".concat((.05*I.temperature).toFixed(1),"%"):"0.0%"})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-orange-500",style:{width:P?"".concat(Math.min(50,I.temperature),"%"):"10%"}})})})]})})]})]})]}),"performance"===h&&(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1 min-h-0 rightPaneBg",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-white",children:"Performance Metrics"}),(0,s.jsxs)("div",{className:"flex space-x-2 bg-oGray2 rounded-lg overflow-hidden p-1",children:[(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("fps"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("fps"),children:"FPS"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("drawCalls"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("drawCalls"),children:"Calls"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("triangles"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("triangles"),children:"Triangles"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("memory"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("memory"),children:"Memory"})]})]}),(0,s.jsx)("div",{className:"bg-oGray2 rounded-lg p-4 mb-6",children:(0,s.jsxs)("div",{className:"h-72 relative px-4 pb-6 pt-2 overflow-hidden rounded-lg",children:["fps"===f&&(0,s.jsx)(d,{data:O,dataKey:"fps",color:"#06b6d4",scale:M.fps,label:"FPS",unit:"",showPoints:!0,fillGradient:!0}),"drawCalls"===f&&(0,s.jsx)(d,{data:O,dataKey:"drawCalls",color:"#8b5cf6",scale:M.drawCalls,label:"Draw Calls",unit:"",showPoints:!0,fillGradient:!0}),"triangles"===f&&(0,s.jsx)(d,{data:O,dataKey:"triangles",color:"#6366f1",scale:M.triangles,label:"Triangles",unit:"",showPoints:!0,fillGradient:!0}),"memory"===f&&(0,s.jsx)(d,{data:O,dataKey:"memory",color:"#10b981",scale:M.memory,label:"Memory",unit:" MB",showPoints:!0,fillGradient:!0})]})}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-4",children:"HARDWARE PERFORMANCE STATS"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsx)("div",{className:"border-l-4 border-cyan-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"CURRENT FPS"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:O[O.length-1].fps.toFixed(1)})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-cyan-500",style:{width:"".concat(Math.min(100,O[O.length-1].fps/60*100),"%")}})})})]})}),(0,s.jsx)("div",{className:"border-l-4 border-purple-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"FRAME TIME"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[O[O.length-1].ms.toFixed(1)," ms"]})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-purple-500",style:{width:"".concat(Math.min(100,100-O[O.length-1].ms/33.33*100),"%")}})})})]})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[(0,s.jsxs)("div",{className:"rightPaneBg bg-opacity-50 p-3 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"DRAW CALLS"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:O[O.length-1].drawCalls})]}),(0,s.jsxs)("div",{className:"rightPaneBg bg-opacity-50 p-3 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"TRIANGLES"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[(O[O.length-1].triangles/1e3).toFixed(1),"k"]})]}),(0,s.jsxs)("div",{className:"rightPaneBg bg-opacity-50 p-3 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"MEMORY"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[O[O.length-1].memory," MB"]})]})]}),(0,s.jsxs)("div",{className:"mt-6 rightPaneBg bg-opacity-50 p-3 rounded-lg text-sm",children:[(0,s.jsx)("div",{className:"text-white font-medium mb-2",children:"SYSTEM INFO"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.zvy,className:"mr-2 text-cyan-400"}),(0,s.jsx)("span",{children:"GPU: WebGL Renderer"})]}),(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.$v3,className:"mr-2 text-green-400"}),(0,s.jsxs)("span",{children:["Textures: ",O[O.length-1].textures||0]})]}),(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.hGM,className:"mr-2 text-purple-400"}),(0,s.jsxs)("span",{children:["Geometries: ",O[O.length-1].geometries||0]})]}),(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.dT$,className:"mr-2 text-blue-400"}),(0,s.jsxs)("span",{children:["Three.js ",o.UZH]})]})]})]})]})]})]})]})}},15008:function(e,t,a){a.d(t,{Si:function(){return l},d3:function(){return i},vp:function(){return s},z:function(){return r}});let s={WARNING_THRESHOLD:50,DANGER_THRESHOLD:20,CHARGING_THRESHOLD:13.2,MIN_VOLTAGE:10.5,MAX_VOLTAGE:14.4},l=e=>{if(!e||"number"!=typeof e)return 0;if(e>=13)return 100;if(e<=s.MIN_VOLTAGE)return 0;let t=[{voltage:12.85,soc:100},{voltage:12.75,soc:90},{voltage:12.65,soc:80},{voltage:12.55,soc:70},{voltage:12.45,soc:60},{voltage:12.35,soc:50},{voltage:12.25,soc:40},{voltage:12.15,soc:30},{voltage:12.05,soc:20},{voltage:11.95,soc:15},{voltage:11.8,soc:10},{voltage:11.6,soc:5},{voltage:10.5,soc:0}];for(let a=0;a<t.length-1;a++)if(e>=t[a+1].voltage){let s=t[a].voltage,l=t[a+1].voltage,i=t[a].soc,r=t[a+1].soc;return Math.round(r+(e-l)/(s-l)*(i-r))}return 0},i=e=>e>s.CHARGING_THRESHOLD,r=e=>e>s.WARNING_THRESHOLD?"bg-oGreen":e>s.DANGER_THRESHOLD?"bg-oYellow":"bg-oRed"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73],{69073:function(e,s,l){l.r(s);var a=l(57437),t=l(2265),n=l(63321);s.default=e=>{var s,l,c,r,i,d,o;let{onSave:m}=e,x=n.Z.getAll(),h=n.Z.getComputedSignalKUrl(),u=n.Z.getBoatsData(),[p,g]=(0,t.useState)(x),[b,j]=(0,t.useState)(x.useAuthentication||!!x.username||!!x.password),[v,N]=(0,t.useState)(x.signalKUrlSet||!1),[f,k]=(0,t.useState)(null),[y,U]=(0,t.useState)(!1),[w,C]=(0,t.useState)({visible:!1,message:""}),S=(0,t.useCallback)(e=>{U(JSON.stringify(e)!==JSON.stringify(x))},[x]);(0,t.useEffect)(()=>{(async()=>{let e=n.Z.getAll();g(e),N(e.signalKUrlSet||!1),j(e.useAuthentication||!!e.username||!!e.password),e.selectedBoat&&k(u.find(s=>s.name===e.selectedBoat)||null)})()},[u]);let E=e=>{let s={...p,...e};g(s),S(s);let l={...s};e.hasOwnProperty("signalKUrlSet")?!1===e.signalKUrlSet&&(l.signalkUrl=h,l.username="",l.password=""):v||e.hasOwnProperty("signalkUrl")?b||(l.username="",l.password=""):(l.signalkUrl=h,l.username="",l.password=""),n.Z.saveConfig(l),null==m||m(l),U(!1),C({visible:!0,message:"Settings saved automatically"}),setTimeout(()=>C({visible:!1,message:""}),2e3)};return(0,a.jsxs)("div",{className:"p-4 text-white",children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold mb-4 flex justify-between items-center",children:["Ocearo Configuration",w.visible&&(0,a.jsx)("span",{className:"text-sm font-normal bg-green-500 text-white px-3 py-1 rounded-full animate-pulse",children:w.message})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Connection Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:v,onChange:e=>{N(e.target.checked),E({signalKUrlSet:e.target.checked})}}),"Set SignalK URL",!v&&(0,a.jsxs)("span",{className:"ml-2",children:["(",h,")"]})]})}),v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"SignalK Server URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",value:p.signalkUrl||"",onChange:e=>E({signalkUrl:e.target.value})})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:b,onChange:e=>{j(e.target.checked),E({useAuthentication:e.target.checked})}}),"Use Authentication"]})}),b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Username:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",value:p.username||"",onChange:e=>E({username:e.target.value})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Password:"}),(0,a.jsx)("input",{type:"password",className:"border p-2 w-full text-black rounded",value:p.password||"",onChange:e=>E({password:e.target.value})})]})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Vessel Settings"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Select Vessel:"}),(0,a.jsxs)("select",{className:"border p-2 w-full text-black rounded",value:p.selectedBoat||"",onChange:e=>{let s=e.target.value;k(u.find(e=>e.name===s)||null),E({selectedBoat:s})},children:[(0,a.jsx)("option",{value:"",children:"-- Select a Vessel --"}),u.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.name))]})]}),f&&(0,a.jsxs)("div",{className:"space-y-2 text-sm text-gray-400",children:[(0,a.jsxs)("div",{children:["3D Model: ",f.modelPath]}),(0,a.jsxs)("div",{children:["Features: ",null===(s=f.capabilities)||void 0===s?void 0:s.join(", ")]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Vessel Color:"}),(0,a.jsx)("input",{type:"color",className:"w-full h-10 rounded",value:p.primaryColor||"#000000",onChange:e=>E({primaryColor:e.target.value})})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:p.metallicEffect||!1,onChange:e=>E({metallicEffect:e.target.checked})}),"Enable Metallic Effect"]})})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Display Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center text-base",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-3 h-5 w-5",checked:p.compassNorthUp||!1,onChange:e=>E({compassNorthUp:e.target.checked})}),(0,a.jsxs)("span",{children:["Compass Mode: North at Top",(0,a.jsx)("div",{className:"text-sm text-gray-400",children:p.compassNorthUp?"North at top (land navigation style)":"North at bottom (marine navigation style)"})]})]})}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center text-base",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-3 h-5 w-5",checked:!1!==p.showAttitudeIndicator,onChange:e=>E({showAttitudeIndicator:e.target.checked})}),(0,a.jsxs)("span",{children:["Show Attitude Indicator",(0,a.jsx)("div",{className:"text-sm text-gray-400",children:!1!==p.showAttitudeIndicator?"Display roll, pitch, and yaw indicator":"Hide attitude indicator"})]})]})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"block text-sm font-medium",children:["AIS Length Scaling Factor",(0,a.jsx)("div",{className:"text-xs text-gray-500",children:"Controls the scaling of AIS boats on the map (0.1 - 2.0)"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)("span",{className:"text-sm",children:"0.1"}),(0,a.jsx)("input",{type:"range",className:"w-full h-10 appearance-none bg-gray-700 rounded-lg outline-none cursor-pointer",style:{WebkitAppearance:"none",appearance:"none",height:"20px",background:"linear-gradient(to right, #1E3A8A, #3B82F6)",borderRadius:"10px"},min:"0.1",max:"2.0",step:"0.1",value:p.aisLengthScalingFactor||.7,onChange:e=>E({aisLengthScalingFactor:parseFloat(e.target.value)})}),(0,a.jsx)("span",{className:"text-sm",children:"2.0"}),(0,a.jsx)("span",{className:"text-base font-semibold bg-blue-500 px-3 py-1 rounded-lg min-w-[3.5rem] text-center",children:p.aisLengthScalingFactor||.7})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Advanced Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:p.debugMode||!1,onChange:e=>E({debugMode:e.target.checked,signalkUrl:h})}),"Debug Mode"]})}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:p.showCustomUrls||!1,onChange:e=>E({showCustomUrls:e.target.checked})}),"Set Custom External Tools URLs"]})}),p.showCustomUrls&&(0,a.jsxs)("div",{className:"space-y-4 p-4 border border-gray-700 rounded-lg",children:[(0,a.jsx)("h3",{className:"text-lg font-medium",children:"Custom External URLs"}),(0,a.jsxs)("p",{className:"text-sm text-gray-400 mb-4",children:["Customize URLs for external tools. Use ",(0,a.jsx)("code",{children:"${signalkUrl}"})," as placeholder for the SignalK URL, and ",(0,a.jsx)("code",{children:"${latitude}"})," or ",(0,a.jsx)("code",{children:"${longitude}"})," for position values. Leave empty to use the default URL."]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Navigation URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"${signalkUrl}/@signalk/freeboard-sk/",value:(null===(l=p.customExternalUrls)||void 0===l?void 0:l.navigation)||"",onChange:e=>{let s={...p.customExternalUrls};s.navigation=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Instrument URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"${signalkUrl}/@mxtommy/kip/",value:(null===(c=p.customExternalUrls)||void 0===c?void 0:c.instrument)||"",onChange:e=>{let s={...p.customExternalUrls};s.instrument=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Dashboard URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"${signalkUrl}/grafana",value:(null===(r=p.customExternalUrls)||void 0===r?void 0:r.dashboard)||"",onChange:e=>{let s={...p.customExternalUrls};s.dashboard=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Webcam 1 URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"https://example.com/webcam1",value:(null===(i=p.customExternalUrls)||void 0===i?void 0:i.webcam1)||"",onChange:e=>{let s={...p.customExternalUrls};s.webcam1=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Webcam 2 URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"https://example.com/webcam2",value:(null===(d=p.customExternalUrls)||void 0===d?void 0:d.webcam2)||"",onChange:e=>{let s={...p.customExternalUrls};s.webcam2=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Weather URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"https://embed.windy.com/embed.html?location=coordinates&lat=${latitude}&lon=${longitude}",value:(null===(o=p.customExternalUrls)||void 0===o?void 0:o.weather)||"",onChange:e=>{let s={...p.customExternalUrls};s.weather=e.target.value,E({customExternalUrls:s})}})]})]})]})]}),(0,a.jsx)("div",{className:"flex space-x-4 pt-4",children:(0,a.jsx)("button",{onClick:()=>{let e=n.Z.getDefaultConfig();g(e),j(!1),e.useAuthentication=!1,N(!1),e.signalKUrlSet=!1,e.showCustomUrls=!1,e.customExternalUrls={},n.Z.saveConfig(e),U(!1)},className:"bg-oRed text-white px-4 py-2 rounded hover:bg-red-600",children:"Reset Configuration"})})]})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[909],{11909:function(e,t,a){a.d(t,{Z:function(){return I}});var o=a(57437),r=a(2265),i=a(21276),s=a(53082),n=a(63321),l=a(41106),m=a(72079);function h(e,t,a){return e/1.9438444924574*Math.pow(t/10,a)*1.9438444924574}var c=a(53359),u=a(31378),g=a(70262),p=new WeakMap,d=new WeakMap;class y{calcShape(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,g._)(this,d,[]);let t=this.chordTackLevel/((0,c._)(this,p)[(0,c._)(this,p).length-1].x-(0,c._)(this,p)[0].x);for(let a of(0,c._)(this,p)){let o=a.clone().multiplyScalar(t);1!==e&&(o.y*=e),(0,c._)(this,d).push(o)}let a=new m.FM8(0,0);for(let e of(0,c._)(this,d))e.y>a.y&&(a=e);this.draftDepth=a.y,this.draftPosition=a.x,this.girth=0;let o=null;for(let e of(0,c._)(this,d))null!==o&&(this.girth+=e.distanceTo(o)),o=e;this.sag=this.chordTackLevel-this.girth,this.entryAngleRad=(0,c._)(this,d)[1].clone().sub((0,c._)(this,d)[0]).angle(),this.exitAngleRad=(0,c._)(this,d)[(0,c._)(this,d).length-1].clone().sub((0,c._)(this,d)[(0,c._)(this,d).length-2]).angle()-2*Math.PI,this.mastAngleRad=this.calcMastAngle(),this.forceAngleRad=(this.entryAngleRad+this.exitAngleRad)/2,this.draftDepthRatio=this.draftDepth/this.chordTackLevel,this.draftPositionRatio=this.draftPosition/this.chordTackLevel}calcMastAngle(){let e=0,t=null,a=this.mastWidth*this.chordTackLevel/this.chordMastTop;for(let o of(0,c._)(this,d)){if(null!==t&&(e+=o.distanceTo(t))>=a)return o.angle();t=o}return NaN}getVerticesAngles(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=(this.girth-t)/(e-1),r=0,i=0,s=[],n=null;for(let l of(0,c._)(this,d)){if(null!==n&&(((i+=l.distanceTo(n))>=r*o+t||a&&i>a)&&(r++,s.push(l.angle())),r>=e))break;n=l}return s}pointAtGirthDistance(e){let t=0,a=null;for(let o of(0,c._)(this,d))if(null!==a&&(t+=o.distanceTo(a)),a=o,t>=e)return a.clone()}constructor(e,t,a,o=1){(0,u._)(this,p,{writable:!0,value:void 0}),(0,u._)(this,d,{writable:!0,value:void 0}),(0,g._)(this,p,[]),(0,g._)(this,d,[]),this.chordMastTop=t,this.chordTackLevel=e,this.mastWidth=a;let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new m.FM8(t*e**2,2*t*e)},i=1.001+.95*(o-1)/10,s=(i-.001)/1e3,n=r(.001),l=r(i).clone().sub(n).angle(),h=new m.FM8(0,0);for(let e=.001;e<=i;e+=s){let t=r(e);t.sub(n),t.rotateAround(h,-l),(0,c._)(this,p).push(t)}this.calcShape(1-.25*(o-1)/10)}}let f=Math.floor(20),_=Math.ceil(160),M={waterlineToMastFootHeight:.45,maxMastRotation:Math.PI/2,maxChordRotationPerSailLevel:Math.PI/3*2};var x=e=>{let{windParams:t={speed:5,hellman:.27},boatParams:a={mastrotation:0,heading:130,speed:5},sailParams:i={mastArea:0,sailArea:0,cunningham:1,angleOfAttack:20}}=e,{getSignalKValue:n}=(0,s.yC)(),l=(0,r.useRef)(),c=(0,r.useRef)(null),u=(0,r.useRef)(0),g=(0,r.useRef)(null),p=(0,r.useRef)(null),d=(0,r.useRef)(),x=(0,r.useRef)({}),P=(0,r.useMemo)(()=>{let e=new m.ZAu,t=new m.b_z(.1,.2,12),a=new m.Wid({color:s.gK,opacity:.5,transparent:!0}),o=new m.Kj0(t,a);return o.position.set(0,-.1,0),e.add(o),e},[]);(0,r.useEffect)(()=>{let e=new m.ZAu,t={};for(let a=0;a<8;a+=.5){let o=P.clone();o.position.set(0,a,0),t[2*a]=o,e.add(o)}return e.position.set(0,0,0),d.current&&d.current.add(e),x.current=t,()=>{e.clear()}},[P]);let b=(e,t)=>{let a=x.current;if(!a){console.error("apparentWindField is not initialized.");return}for(let o=0;o<8;o+=.5){let r=h(e,o,t),i=a[2*o];if(!i){console.warn("Apparent wind field cone at height ".concat(o," is not defined."));continue}i.scale.set(.1*r,r,.1*r),i.rotation.set(0,-Math.PI,Math.PI/2)}},{geometry:j,sailClipWidthPerLevel:v}=(0,r.useMemo)(()=>{let e=new m.u9r,t=[],a=[],o=[];for(let e=0;e<=_;e++){let r,i;let s=Math.min(50*e,8e3);s<900?(r=3600,i=3800+-200*s/900):i=r=3600-3210*(s-900)/7100+600*Math.sin((s-900)/7100*Math.PI);let n=0;for(let o=0;o<f;o++){let l=r/(f-1),m=l*o-i,h=l;m>.1&&(h=m>l?0:l-m),t.push(0===o?0:(n+h)/1e3,s/1e3,0),n=0===o?0:n+h;let c=Math.floor(_/10);a.push(...e%c==0?[.8,0,.047]:[.596,.596,.596])}o.push(i===r?null:i)}let r=[];for(let e=0;e<_;e++)for(let t=1;t<f;t++){let a=e*f+t;r.push(a-1,a,a+f-1,a,a+f,a+f-1)}return e.setAttribute("position",new m.a$l(t,3)),e.setAttribute("color",new m.a$l(a,3)),e.setIndex(r),e.computeVertexNormals(),{geometry:e,sailClipWidthPerLevel:o}},[]),I=(0,r.useMemo)(()=>n("environment.wind.angleApparent")||0,[n]),A=(0,r.useMemo)(()=>n("environment.wind.speedApparent")||0,[n]);return(0,r.useEffect)(()=>{if(!l.current)return;b(A,t.hellman);let e=l.current.geometry,o=e.attributes.position.array;i.cunningham!==g.current&&(p.current=new y(3600,390,200,i.cunningham),g.current=i.cunningham),c.current||(c.current=e.clone());let r=1e3*M.waterlineToMastFootHeight,s=I;for(;s<0;)s+=2*Math.PI;for(;s>=2*Math.PI;)s-=2*Math.PI;let n=s>Math.PI?-1:1,d=s;d>Math.PI&&(d=2*Math.PI-d);let x=m.M8C.degToRad(i.angleOfAttack),P=p.current.mastAngleRad;d<.01&&(x=0);let j=Math.min(d-x+P,M.maxMastRotation),w=new m.Pa4(0,1,0),R=null;for(let e=0;e<=_;e++){h(A,(50*e+r)/1e3,t.hellman);let a=d-x;a<0?a=0:a>Math.PI/2&&(a=Math.PI/2);let i=a-j;R&&i-R>M.maxChordRotationPerSailLevel&&(i=R+M.maxChordRotationPerSailLevel),R=i;let s=v[e],l=p.current.getVerticesAngles(f,200,s);for(let t=1;t<f;t++){let a=(e*f+t)*3,r=new m.Pa4(c.current.attributes.position.array[a],c.current.attributes.position.array[a+1],c.current.attributes.position.array[a+2]);r.applyAxisAngle(w,-(i+l[t])*n),o[a]=r.x,o[a+1]=r.y,o[a+2]=r.z}}e.attributes.position.needsUpdate=!0;let T={...a,mastrotation:j*n};l.current&&l.current.rotateY(u.current-T.mastrotation),u.current=T.mastrotation},[A,I,t.hellman,i.cunningham,i.angleOfAttack,a,v]),(0,o.jsxs)("mesh",{ref:l,position:[0,2,-1],rotation:[0,-Math.PI/2,0],children:[(0,o.jsx)("bufferGeometry",{...j}),(0,o.jsx)("group",{ref:d}),(0,o.jsx)("meshBasicMaterial",{vertexColors:!0,transparent:!0,opacity:.7,side:m.ehD})]})};let P=a(40257).env.ASSET_PREFIX||"./",b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return"".concat(P,"/boats/").concat(e,"/assets/scene-transformed.glb")},j={name:"Default",modelPath:"default",capabilities:["navigation","rudder","sail","color"]},v=(0,r.forwardRef)((e,t)=>{let{showSail:a=!1,onUpdateInfoPanel:h,...c}=e,u=(0,r.useRef)(),g=(0,r.useRef)(),{getSignalKValue:p}=(0,s.yC)(),d=n.Z.getAll(),[y,f]=(0,r.useState)(()=>n.Z.getSelectedBoat()||j);(0,r.useEffect)(()=>{f(n.Z.getSelectedBoat()||j)},[d]);let _=(0,r.useMemo)(()=>b(y.modelPath),[y]),M=(null==y?void 0:y.capabilities)||[],{nodes:v,materials:I}=(0,l.L)(_,"".concat(P,"/draco/")),A=(0,r.useMemo)(()=>({primaryColor:d.primaryColor,metallicEffect:d.metallicEffect||!1}),[d.primaryColor,d.metallicEffect]);(0,r.useEffect)(()=>{if("default"===y.modelPath){if(!(null==I?void 0:I.fiberglass))return;I.fiberglass.color.set(A.primaryColor),I.fiberglass.metalness=A.metallicEffect?1:0,I.fiberglass.roughness=A.metallicEffect?.2:1}else u.current&&u.current.traverse(e=>{e.isMesh&&e.material&&(Array.isArray(e.material)?e.material.forEach(e=>{e.color.set(A.primaryColor),e.metalness=A.metallicEffect?1:0,e.roughness=A.metallicEffect?.2:1}):(e.material.color.set(A.primaryColor),e.material.metalness=A.metallicEffect?1:0,e.material.roughness=A.metallicEffect?.2:1))});Object.values(I).forEach(e=>{e.map&&(e.map.minFilter=m.wem,e.map.magFilter=m.wem,e.map.anisotropy=1)})},[I,A,y,u]);let w=(0,r.useMemo)(()=>new m.yGw,[]),R=(0,r.useMemo)(()=>new m.Pa4(1,0,0),[]);(0,i.F)(()=>{if(!u.current)return;let e=p("navigation.attitude")||{roll:0,pitch:0,yaw:0},t=p("steering.rudderAngle")||0;u.current&&u.current.rotation.set(e.pitch,0,2*Math.PI-e.roll),g.current&&(w.makeRotationFromEuler(new m.USm(-Math.PI/2,Math.PI/2,0)),g.current.setRotationFromMatrix(w),g.current.rotateOnAxis(R,-m.M8C.degToRad(180*t/Math.PI)))});let T=(0,r.useMemo)(()=>{let e={Default:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("mesh",{geometry:v.baba_metal_0.geometry,material:I.metal,position:[.24,.895,-5.546],rotation:[-Math.PI/2,0,1.968],scale:.027}),(0,o.jsx)("mesh",{geometry:v.camadadirek_fiberglass_0.geometry,material:I.fiberglass,position:[0,5.267,-3.711],rotation:[2.054,0,Math.PI],scale:[-.042,.042,4.707]}),(0,o.jsx)("mesh",{geometry:v.camadanyelkeni_bez_0.geometry,material:I.mcaterial,position:[0,5.267,-3.711],rotation:[2.054,0,Math.PI],scale:[-.042,.042,4.707]}),(0,o.jsx)("mesh",{geometry:v.camadaonbaglay_metal_0.geometry,material:I.metal,position:[0,.891,-5.958],rotation:[-Math.PI/2,0,0],scale:.02}),(0,o.jsx)("mesh",{geometry:v.capa_metal_0.geometry,material:I.metal,position:[0,.671,-6.173],rotation:[-Math.PI/2,0,0],scale:.348}),(0,o.jsx)("mesh",{geometry:v.direk_fiberglass_0.geometry,material:I.fiberglass,position:[0,4.315,-1.056],rotation:[Math.PI/2,0,Math.PI],scale:[-.113,.113,5.203]}),(0,o.jsx)("mesh",{geometry:v.duman_ahsap_0.geometry,material:I.ahsap,position:[-.011,.854,3.487],rotation:[Math.PI,0,Math.PI/2],scale:[.045,.045,.011]}),(0,o.jsx)("mesh",{geometry:v.dumenyuvasi_ahsap_0.geometry,material:I.ahsap,position:[-.011,.299,3.441],rotation:[-Math.PI/2,0,1.571],scale:.094}),(0,o.jsx)("mesh",{geometry:v.dumenyuvasi_cam_0.geometry,material:I.material_5,position:[-.011,.299,3.441],rotation:[-Math.PI/2,0,1.571],scale:.094}),(0,o.jsx)("mesh",{geometry:v.dumenyuvasi_fiberglass_0.geometry,material:I.fiberglass,position:[-.011,.299,3.441],rotation:[-Math.PI/2,0,1.571],scale:.094}),(0,o.jsx)("mesh",{geometry:v.govde_fiberglass2_0.geometry,material:I.fiberglass2,position:[0,.32,-.897],rotation:[0,Math.PI/2,0],scale:[5.11,.454,1.212]}),(0,o.jsx)("mesh",{geometry:v.govde_fiberglass_0.geometry,material:I.fiberglass,position:[0,.32,-.897],rotation:[0,Math.PI/2,0],scale:[5.11,.454,1.212]}),(0,o.jsx)("mesh",{geometry:v.govde_metal_0.geometry,material:I.metal,position:[0,.32,-.897],rotation:[0,Math.PI/2,0],scale:[5.11,.454,1.212]}),(0,o.jsx)("mesh",{geometry:v.halattutucu_fiberglass2_0.geometry,material:I.fiberglass2,position:[-1.044,.939,1.809],rotation:[-Math.PI/2,0,0],scale:[.016,.059,.016]}),(0,o.jsx)("mesh",{geometry:v.ip001_metal_0.geometry,material:I.metal,position:[-.231,7.608,-.621],rotation:[-2.322,.222,-1.556],scale:[.007,.007,.011]}),(0,o.jsx)("mesh",{geometry:v.pervan_fiberglass_0.geometry,material:I.fiberglass,position:[0,-1.005,1.561],rotation:[-Math.PI/2,Math.PI/2,0],scale:[.154,.094,.104]}),(0,o.jsx)("mesh",{geometry:v.pervane_metal_0.geometry,material:I.metal,position:[0,-1.122,1.75],scale:.034}),(0,o.jsx)("mesh",{ref:g,geometry:v.rudder_fiberglass_0.geometry,material:I.fiberglass,position:[0,-1.153,3.486],rotation:[-Math.PI/2,Math.PI/2,0],scale:[.573,.262,.262]}),(0,o.jsx)("mesh",{geometry:v.salma_fiberglass_0.geometry,material:I.fiberglass,position:[0,-1.953,-.739],scale:[.149,.108,.756]}),(0,o.jsx)("mesh",{geometry:v.ustcam_cam_0.geometry,material:I.material_5,position:[-.337,.974,-3.127],rotation:[-Math.PI/2,0,0],scale:[-.183,.133,.025]}),(0,o.jsx)("mesh",{geometry:v.ustcam_fiberglass_0.geometry,material:I.fiberglass,position:[-.337,.974,-3.127],rotation:[-Math.PI/2,0,0],scale:[-.183,.133,.025]}),(0,o.jsx)("mesh",{geometry:v.ustgovde_fiberglass_0.geometry,material:I.fiberglass,position:[0,.832,-2.741],rotation:[-Math.PI/2,0,0],scale:[.566,.7,1.212]}),(0,o.jsx)("mesh",{geometry:v.ustgovdekzak_ahsap_0.geometry,material:I.ahsap,position:[0,.862,-2.741],rotation:[-Math.PI/2,0,0],scale:[.566,.7,1.212]}),(0,o.jsx)("mesh",{geometry:v.vinc_metal_0.geometry,material:I.metal,position:[-1.07,.977,2.02],rotation:[-Math.PI/2,0,0],scale:.065}),(0,o.jsx)("mesh",{geometry:v.yancam002_cam_0.geometry,material:I.material_5,position:[-.984,.591,-3.772],rotation:[Math.PI,-1.241,-Math.PI/2],scale:[.095,.28,.014]}),(0,o.jsx)("mesh",{geometry:v.yancam002_fiberglass_0.geometry,material:I.fiberglass,position:[-.984,.591,-3.772],rotation:[Math.PI,-1.241,-Math.PI/2],scale:[.095,.28,.014]}),(0,o.jsx)("mesh",{geometry:v.yankoruma_metal_0.geometry,material:I.metal,position:[-1.641,.946,2.868],rotation:[-Math.PI/2,0,0],scale:[.01,.01,.159]}),(0,o.jsx)("mesh",{geometry:v.yankoruma_metal_0001.geometry,material:I.metal,position:[-1.641,.946,2.868],rotation:[-Math.PI/2,0,0],scale:[.01,.01,.159]}),(0,o.jsx)("mesh",{geometry:v.yankoruma_metal_0002.geometry,material:I.metal,position:[-1.641,.946,2.868],rotation:[-Math.PI/2,0,0],scale:[.01,.01,.159]}),(0,o.jsx)("mesh",{geometry:v.zincir_metal_0.geometry,material:I.metal,position:[-.001,.88,-6.258],rotation:[-1.56,-.031,-.149],scale:.004}),(0,o.jsx)("mesh",{geometry:v.zincir_metal_0001.geometry,material:I.metal,position:[-.001,.88,-6.258],rotation:[-1.56,-.031,-.149],scale:.004}),(0,o.jsx)("mesh",{geometry:v.zincirdeposu_fiberglass2_0.geometry,material:I.fiberglass2,position:[0,.863,-5.779],rotation:[-Math.PI/2,0,0],scale:[.103,.088,.009]}),(0,o.jsx)("mesh",{geometry:v.zincirmakara_metal_0.geometry,material:I.metal,position:[0,.869,-6.305],rotation:[-2.159,1.564,.59],scale:[.01,.01,.016]}),(0,o.jsx)("mesh",{geometry:v.zincirray_ahsap_0.geometry,material:I.ahsap,position:[0,.864,-6.113],rotation:[-Math.PI/2,0,0],scale:[.017,.181,.003]})]}),Optimist:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("mesh",{geometry:v.body_body_0.geometry,material:I.body,position:[-.054,.272,-.022],rotation:[-1.571,.01,.01],scale:[1,5.242,1]}),(0,o.jsx)("mesh",{geometry:v.boom_aluminium_0.geometry,material:I.aluminium,position:[-.019,2.771,.964],rotation:[0,.01,-.01],scale:[.15,.15,4.609]}),(0,o.jsx)("mesh",{geometry:v.rubber_joint__0.geometry,material:I.rubber_joint__0,position:[-.008,1.407,3.453],rotation:[1.571,-.01,-.01],scale:[-.037,.056,.079]}),(0,o.jsx)("mesh",{geometry:v.sail_sail_0.geometry,material:I.sail,position:[.038,8.739,.698],rotation:[2.356,1.557,2.356],scale:[-5.728,4.361,4.361]})]}),Ship:()=>(0,o.jsx)("mesh",{geometry:v.Object_10.geometry,material:I.material_0,position:[0,-.55,0],rotation:[-1.558,.002,3.139],scale:.004}),Windsurf:()=>(0,o.jsx)("mesh",{geometry:v["body_Material_#30_0"].geometry,material:I.Material_30,position:[-.007,0,-.071],rotation:[-Math.PI/2,0,0],scale:.002}),Sailboat:()=>(0,o.jsx)("mesh",{geometry:v.sailboat.geometry,material:I.texture,position:[0,-1.5,0],rotation:[-Math.PI,.011,-Math.PI],scale:.219}),RM1080:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("mesh",{geometry:v.Body_1.geometry,material:I.PaletteMaterial003}),(0,o.jsx)("mesh",{geometry:v.Body_2.geometry,material:I.PaletteMaterial001}),(0,o.jsx)("mesh",{geometry:v.Body_3.geometry,material:I.PaletteMaterial002})]})};return e[y.name]||e.Default},[y.name,v,I]),k=(0,r.useMemo)(()=>({name:y.name||"Sailboat",type:"sailboat",trueWindAngle:p("environment.wind.angleTrueWater")||0,trueWindSpeed:p("environment.wind.speedTrue")||0,appWindAngle:p("environment.wind.angleApparent")||0,appWindSpeed:p("environment.wind.speedApparent")||0,beatAngle:p("performance.beatAngle")||0,polarSpeed:p("performance.polarSpeed")||0,polarSpeedRatio:p("performance.polarSpeedRatio")||0,velocityMadeGood:p("performance.velocityMadeGood")||0,speedThroughWater:p("navigation.speedThroughWater")||0,headingTrue:p("navigation.headingTrue")||0,courseOverGroundTrue:p("navigation.courseOverGroundTrue")||0,position:p("navigation.position")||{latitude:0,longitude:0}}),[p,y.name]),S=e=>{let t=[];return e.name&&t.push("Name: ".concat(e.name)),e.trueWindSpeed&&t.push("Wind: ".concat((0,s.Qj)(e.trueWindSpeed),"kn @ ").concat((0,s.Ux)(e.trueWindAngle),"\xb0")),e.appWindSpeed&&t.push("App Wind: ".concat((0,s.Qj)(e.appWindSpeed),"kn @ ").concat((0,s.Ux)(e.appWindAngle),"\xb0")),e.speedThroughWater&&t.push("Speed: ".concat((0,s.Qj)(e.speedThroughWater),"kn")),void 0!==e.headingTrue&&null!==e.headingTrue&&t.push("Heading: ".concat((0,s.Ux)(e.headingTrue),"\xb0")),void 0!==e.courseOverGroundTrue&&null!==e.courseOverGroundTrue&&t.push("COG: ".concat((0,s.Ux)(e.courseOverGroundTrue),"\xb0")),e.velocityMadeGood&&t.push("VMG: ".concat((0,s.Qj)(e.velocityMadeGood),"kn")),e.polarSpeedRatio&&t.push("Polar: ".concat((100*e.polarSpeedRatio).toFixed(0),"%")),e.position&&void 0!==e.position.latitude&&void 0!==e.position.longitude&&t.push("Position: ".concat(e.position.latitude.toFixed(4),"\xb0, ").concat(e.position.longitude.toFixed(4),"\xb0")),t.join("\n")},[W,E]=(0,r.useState)(!1);return(0,o.jsxs)("group",{...c,ref:u,dispose:null,onClick:()=>{let e=!W;E(e),h&&h(e?S(k):null)},children:[M.includes("sail")&&a&&(0,o.jsx)(x,{}),(0,o.jsx)(T,{})]})});l.L.preload(b(),"".concat(P,"/draco/")),v.displayName="SailBoat3D";var I=v}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{87343:function(e,t,a){Promise.resolve().then(a.bind(a,99670))},53082:function(e,t,a){"use strict";a.d(t,{$:function(){return M},FV:function(){return d},G5:function(){return b},HH:function(){return u},HQ:function(){return w},NU:function(){return x},Qj:function(){return p},Ux:function(){return m},YH:function(){return C},eF:function(){return g},gK:function(){return c},n5:function(){return f},vd:function(){return h},yC:function(){return T}});var n=a(57437),i=a(2265),r=a(14578),l=a(63321),o=a(72079);let s=(0,i.createContext)(),c="#09bfff",u="#cc000c",d="#0fcd4f",g="#ef4444",h="#989898",f="#424242",m=e=>null==e?null:Math.round((180*e/Math.PI+360)%360),p=e=>null==e?null:(e*v).toFixed(1),v=1.94384,b=e=>null!=e?Math.round((e-273.15)*10)/10:null,w=e=>null!=e?Math.round(19.4384*e)/10:null,M=w,x=e=>null!=e?Math.round(e/100*10)/10:null,y={autopilot:!0,anchorWatch:!1,parkingMode:!1,mob:!1,showOcean:!1,ais:!1,showPolar:!0},S={wind:{"environment.wind.angleTrueWater":o.M8C.degToRad(0),"environment.wind.speedTrue":10.288,"environment.wind.angleApparent":o.M8C.degToRad(0),"environment.wind.speedApparent":10.288},temperature:{"environment.water.temperature":290.15,"environment.outside.temperature":294.15,"propulsion.main.exhaustTemperature":368.15,"environment.inside.fridge.temperature":277.15},environment:{"environment.outside.pressure":102300,"environment.inside.relativeHumidity":.74,"environment.inside.voc":.03},performance:{"performance.beatAngle":o.M8C.degToRad(45),"performance.gybeAngle":o.M8C.degToRad(135),"performance.beatAngleVelocityMadeGood":6,"performance.gybeAngleVelocityMadeGood":5,"performance.targetAngle":o.M8C.degToRad(45),"performance.polarSpeed":8,"performance.polarSpeedRatio":.95,"performance.velocityMadeGood":5,"performance.polarVelocityMadeGood":6,"performance.polarVelocityMadeGoodRatio":.9},navigation:{"navigation.speedThroughWater":7,"navigation.headingTrue":o.M8C.degToRad(0),"navigation.courseOverGround":o.M8C.degToRad(20),"navigation.courseGreatCircle.nextPoint.bearingTrue":o.M8C.degToRad(30),"navigation.attitude":{roll:o.M8C.degToRad(5),pitch:o.M8C.degToRad(2),yaw:o.M8C.degToRad(2)}},racing:{"navigation.racing.layline":o.M8C.degToRad(10),"navigation.racing.layline.distance":100,"navigation.racing.layline.time":180,"navigation.racing.oppositeLayline":o.M8C.degToRad(45),"navigation.racing.oppositeLayline.distance":80,"navigation.racing.oppositeLayline.time":180,"navigation.racing.startLineStb":{latitude:0,longitude:0,altitude:0},"navigation.racing.startLinePort":{latitude:0,longitude:0,altitude:0},"navigation.racing.distanceStartline":50,"navigation.racing.timeToStart":120,"navigation.racing.timePortDown":60,"navigation.racing.timePortUp":70,"navigation.racing.timeStbdDown":65,"navigation.racing.timeStbdUp":75},electrical:{"electrical.batteries.1.name":"House Battery","electrical.batteries.1.location":"Under Starboard Bed","electrical.batteries.1.capacity.nominal":768,"electrical.batteries.1.capacity.actual":707,"electrical.batteries.1.capacity.remaining":601,"electrical.batteries.1.capacity.dischargeLimit":.2,"electrical.batteries.1.capacity.timeRemaining":9860,"electrical.batteries.1.lifetimeDischarge":54e4,"electrical.batteries.1.lifetimeRecharge":545e3,"electrical.batteries.1.voltage.ripple":.05,"electrical.batteries.1.chemistry":"LeadAcid","electrical.batteries.1.manufacturer.name":"VARTA","electrical.batteries.1.manufacturer.model":"Professional Dual Purpose RA 595 985","electrical.batteries.1.manufacturer.URL":"https://www.varta-automotive.com","electrical.batteries.1.dateInstalled":"2020-06-15T00:00:00Z","electrical.batteries.1.associatedBus":"House Bus","electrical.batteries.0.name":"Engine Start Battery","electrical.batteries.0.location":"Engine Compartment","electrical.batteries.0.capacity.nominal":888,"electrical.batteries.0.capacity.actual":861,"electrical.batteries.0.chemistry":"LeadAcid","electrical.batteries.0.manufacturer.name":"VARTA","electrical.batteries.0.manufacturer.model":"Blue Dynamic E11","electrical.batteries.0.manufacturer.URL":"https://www.varta-automotive.com","electrical.batteries.0.dateInstalled":"2022-04-10T00:00:00Z","electrical.batteries.0.associatedBus":"Start Bus","navigation.lights":!1,"steering.autopilot.state":"auto"}},C=e=>{let{children:t}=e,[a,c]=(0,i.useState)({}),[u,d]=(0,i.useState)(!1),[g,h]=(0,i.useState)(y),f=e=>a[e]||null,m=(0,i.useRef)(null),p=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=!0,t=async()=>{let e=new Date,t=e.getFullYear(),a=(e.getMonth()+1).toString().padStart(2,"0"),n="tides/larochelle/".concat(a,"_").concat(t,".json"),i=await fetch(n);if(i.ok){let t=await i.json(),a=e.toISOString().split("T")[0];if(t[a]){let e=null,n=null,i=new Date,r=60*i.getHours()+i.getMinutes();if(t[a].forEach(t=>{let[a,i,l,o]=t,[s,c]=i.split(":").map(Number),u=60*s+c;"tide.high"===a&&(!e||Math.abs(r-u)<Math.abs(r-e.timeInMinutes))?e={height:parseFloat(l),time:i,timeInMinutes:u,coef:o}:"tide.low"===a&&(!n||Math.abs(r-u)<Math.abs(r-n.timeInMinutes))&&(n={height:parseFloat(l),time:i,timeInMinutes:u})}),e&&n){let t="".concat(i.getHours().toString().padStart(2,"0"),":").concat(i.getMinutes().toString().padStart(2,"0")),a=P(e.height,n.height,t,e.time,n.time);c(t=>({...t,"environment.tide.heightNow":a,"environment.tide.heightHigh":e.height,"environment.tide.heightLow":n.height,"environment.tide.timeLow":n.time,"environment.tide.timeHigh":e.time,"environment.tide.coeffNow":e.coef}))}else throw Error("Tide data for today is incomplete.")}}else console.warn("No tide data found")};return(async()=>{let{signalkUrl:t,debugMode:a}=l.Z.getAll(),n=()=>{p.current&&clearInterval(p.current);let e=0;p.current=setInterval(()=>{let t=Math.floor(91*Math.random())-45;e=(e+5)%360,c(e=>({...e,"steering.rudderAngle":o.M8C.degToRad(t),...S.temperature,...S.environment,...S.performance,...S.navigation,...S.racing,...S.electrical}))},1e3)};try{let[i,l]=t.replace(/https?:\/\//,"").split(":"),o=new r.default({hostname:i||"localhost",port:parseInt(l)||3e3,useTLS:t.startsWith("https"),reconnect:!0,autoConnect:!1,notifications:!1,deltaStreamBehaviour:"self",sendMeta:"all",wsKeepaliveInterval:10});m.current=o,await o.connect(),o.on("delta",t=>{e&&t.updates.forEach(e=>{e.values&&e.values.forEach(e=>{c(t=>({...t,[e.path]:e.value}))})})}),a&&n()}catch(e){console.error("Failed to connect to SignalK:",e),n()}})(),t(),()=>{e=!1,m.current&&m.current.disconnect(),p.current&&clearInterval(p.current)}},[]),(0,n.jsx)(s.Provider,{value:{getSignalKValue:f,getBoatRotationAngle:()=>{let e=f("navigation.headingTrue")||f("navigation.headingMagnetic");return f("navigation.courseOverGroundTrue")||f("navigation.courseOverGroundMagnetic")||e||0},convertLatLonToXY:(e,t)=>{if(!(null==e?void 0:e.lat)||!(null==e?void 0:e.lon)||!(null==t?void 0:t.lat)||!(null==t?void 0:t.lon))return console.warn("Invalid input to convertLatLonToXY",e,t),{x:0,y:0};let a=t.lat*Math.PI/180,n=t.lon*Math.PI/180,i=e.lat*Math.PI/180,r=e.lon*Math.PI/180-n,l=i-a,o=Math.atan2(Math.sin(r)*Math.cos(i),Math.cos(a)*Math.sin(i)-Math.sin(a)*Math.cos(i)*Math.cos(r)),s=Math.sin(l/2)*Math.sin(l/2)+Math.cos(a)*Math.cos(i)*Math.sin(r/2)*Math.sin(r/2),c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))*6371e3;return{x:c*Math.sin(o),y:c*Math.cos(o)}},nightMode:u,setNightMode:d,states:g,toggleState:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;h(a=>({...a,[e]:void 0!==t?t:!a[e]}))}},children:t})},T=()=>(0,i.useContext)(s),P=function(e,t,a,n,i){let r,l,o,s;if(!a||!n||!i||!/^\d{1,2}:\d{2}$/.test(a)||!/^\d{1,2}:\d{2}$/.test(n)||!/^\d{1,2}:\d{2}$/.test(i))return console.error("Invalid time format provided to calculateTideHeightUsingTwelfths"),(e+t)/2;let c=e=>{let[t,a]=e.split(":").map(Number);return 60*t+a},u=c(n),d=c(i),g=c(a),h=!1;d<=g&&g<=u?(h=!0,r=t,l=e,o=d,s=u):(r=e,l=t,o=u,s=d+(d<u?1440:0));let f=Math.abs(s-o),m=Math.abs(l-r),p=g-o;p<0&&(p+=1440);let v=m/12,b=0;return b=p<=f/6?v*Math.ceil(p/(f/12)):p<=2*f/6?2*v+v*Math.ceil((p-f/6)/(f/12)):p<=3*f/6?5*v:p<=4*f/6?8*v:p<=5*f/6?10*v:m,h?r+b:r-b}},63321:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var n=JSON.parse('{"F":[{"name":"Default","modelPath":"default","capabilities":["navigation","rudder","sail","color"]},{"name":"Optimist","modelPath":"optimist","capabilities":["navigation","ais"]},{"name":"Sailboat","modelPath":"sailboat","capabilities":["navigation","ais"]},{"name":"Ship","modelPath":"ship","capabilities":["navigation","ais"]},{"name":"Windsurf","modelPath":"windsurf","capabilities":["navigation","ais"]}]}');class i{isLocalStorageAvailable(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}loadConfig(){if(this.isLocalStorageAvailable()){let e=localStorage.getItem(this.configKey);if(!e)return this.saveConfig(this.defaultConfig),{...this.defaultConfig};try{return JSON.parse(e)}catch(e){return console.error("Failed to parse stored configuration:",e),{...this.defaultConfig}}}return{...this.inMemoryConfig}}saveConfig(e){this.config={...this.config,...e},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.config}}get(e){return this.config[e]}set(e,t){this.config[e]=t,this.saveConfig(this.config)}resetConfig(){this.config={...this.defaultConfig},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.defaultConfig}}getAll(){return{...this.config}}getDefaultConfig(){return{...this.defaultConfig}}getSelectedBoat(){let e=this.config.selectedBoat;return e?this.getBoatsData().find(t=>t.name===e):[]}getBoatsData(){return n.F}getComputedSignalKUrl(){return this.config.debugMode?"https://demo.signalk.org:443":"".concat(window.location.protocol,"//").concat(window.location.hostname).concat(window.location.port?":"+window.location.port:"")}constructor(){this.defaultConfig={signalkUrl:"http://localhost:3000",username:"",password:"",debugMode:!1,selectedBoat:"Default",primaryColor:null,metallicEffect:!1,aisLengthScalingFactor:.7,compassNorthUp:!1,showCustomUrls:!1,customExternalUrls:{}},this.configKey="ocearoConfig",this.inMemoryConfig={...this.defaultConfig},this.config=this.loadConfig()}}var r=new i},99670:function(e,t,a){"use strict";a.r(t),a.d(t,{VIEW_MODES:function(){return f},default:function(){return p}});var n=a(57437),i=a(2265),r=a(30166),l=a(20376),o=a.n(l),s=a(53082);class c extends i.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({error:e,errorInfo:t}),console.error("Error caught in Error Boundary:",e,t)}render(){if(this.state.hasError){let{error:e,errorInfo:t}=this.state;return(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gray-100 text-gray-900",children:[(0,n.jsx)("h1",{className:"text-3xl font-bold text-red-600 mb-4",children:"Something went wrong."}),(0,n.jsxs)("p",{className:"text-lg mb-2",children:[(0,n.jsx)("strong",{children:"Error:"})," ",e?e.toString():"Unknown error"]}),t&&(0,n.jsxs)("details",{className:"whitespace-pre-wrap bg-gray-200 p-4 rounded-lg mb-4",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-blue-500 underline",children:"Stack Trace"}),(0,n.jsx)("pre",{className:"mt-2",children:t.componentStack})]}),(0,n.jsxs)("div",{className:"flex space-x-4",children:[(0,n.jsx)("button",{onClick:this.handleRefresh,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Refresh Page"}),(0,n.jsx)("button",{onClick:this.handleExitFullscreen,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Exit Fullscreen"})]})]})}return this.props.children}constructor(e){super(e),this.handleRefresh=()=>{window.location.reload()},this.handleExitFullscreen=()=>{document.fullscreenElement&&(window.close(),document.exitFullscreen().catch(e=>{console.error("Failed to exit fullscreen:",e)}))},this.state={hasError:!1,error:null,errorInfo:null}}}let u=(0,r.default)(()=>a.e(252).then(a.bind(a,7252)),{loadableGenerated:{webpack:()=>[7252]},loading:()=>(0,n.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:"Loading..."})}),d=(0,r.default)(()=>Promise.all([a.e(676),a.e(268),a.e(12)]).then(a.bind(a,12012)),{loadableGenerated:{webpack:()=>[12012]}}),g=(0,r.default)(()=>Promise.all([a.e(676),a.e(268),a.e(936)]).then(a.bind(a,72936)),{loadableGenerated:{webpack:()=>[72936]}}),h=(0,r.default)(()=>Promise.all([a.e(676),a.e(689),a.e(268),a.e(496),a.e(412)]).then(a.bind(a,6412)),{loadableGenerated:{webpack:()=>[6412]},loading:()=>(0,n.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,n.jsx)("div",{className:"text-white text-2xl",children:"Loading 3D View..."})}),ssr:!1}),f={BOAT:"boat",APP:"app",SPLIT:"split"},m=()=>window.innerWidth>=1366;function p(){let e=(0,i.useRef)(!1),[t,a]=(0,i.useState)(null),[r,l]=(0,i.useState)("navigation"),[p,v]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t;a(m()?f.SPLIT:f.BOAT),e.current=!0;let n=()=>{clearTimeout(t),t=setTimeout(()=>{a(m()?f.SPLIT:f.BOAT)},250)};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n),clearTimeout(t)}},[]);let M=(0,i.useCallback)(()=>{v(e=>!e)},[]),x=(0,i.useCallback)(e=>{a(e)},[]),y=(0,i.useCallback)((e,t)=>{let a=window.innerWidth/5;t.x>a?x(f.BOAT):t.x<-a?x(f.APP):x(f.SPLIT)},[x]),S=(0,i.useCallback)(()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen().catch(e=>{console.error("Fullscreen error:",e.message)})},[]),C=(0,i.useCallback)(e=>{t===f.BOAT&&x(f.APP),l(e)},[t,x]),T=(0,i.useCallback)(()=>{b?(x(f.BOAT),w(!1)):(C("settings"),w(!0))},[b,x,C]),P=(0,i.useMemo)(()=>null===t?{}:{leftPane:"transition-all duration-300 ".concat(t===f.BOAT?"w-full":t===f.APP?"hidden":"w-2/5"," bg-leftPaneBg h-full relative"),rightPane:"transition-all duration-300 ".concat(t===f.APP?"w-full":t===f.BOAT?"hidden":"w-3/5"," h-full bg-rightPaneBg p-4")},[t]);return e.current?(0,n.jsx)(c,{children:(0,n.jsx)(s.YH,{children:(0,n.jsxs)("div",{className:"h-screen flex flex-col bg-black relative overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,n.jsx)("div",{className:P.leftPane,children:(0,n.jsx)(h,{})}),(0,n.jsx)(o(),{axis:"x",onDrag:y,position:{x:0,y:0},handle:".handle",bounds:"parent",children:(0,n.jsx)("div",{className:"handle w-1 bg-leftPaneBg h-full cursor-col-resize transition-all duration-200 flex items-center justify-center",children:(0,n.jsx)("div",{className:"rounded-full w-3 bg-gray-600 h-40 transition-all duration-200 hover:bg-gray-500"})})}),(0,n.jsx)("div",{className:P.rightPane,children:(0,n.jsx)(u,{view:r})})]}),(0,n.jsx)("div",{className:"w-full h-16 min-h-16 bg-black flex items-center justify-center shrink-0",children:(0,n.jsx)(d,{setRightView:C,toggleAppMenu:M,toggleSettings:T})}),p&&(0,n.jsx)(g,{currentViewMode:t,toggleViewMode:x,handleSetRightView:C,toggleFullscreen:S,setShowAppMenu:v})]})})}):(0,n.jsx)("div",{className:"h-screen bg-black flex items-center justify-center",children:(0,n.jsx)("div",{className:"animate-pulse text-white",children:"Loading..."})})}}},function(e){e.O(0,[870,746,971,117,744],function(){return e(e.s=87343)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ !function(){"use strict";var e,t,n,r,o,c,f,u,i,a={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{a[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=a,e=[],b.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var f=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],u=!0,i=0;i<n.length;i++)f>=o&&Object.keys(b.O).every(function(e){return b.O[e](n[i])})?n.splice(i--,1):(u=!1,o<f&&(f=o));if(u){e.splice(c--,1);var a=r();void 0!==a&&(t=a)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);b.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},b.d(o,c),o},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return"static/chunks/"+(({676:"870fdd6f",689:"b536a0f1",918:"0f8af13e"})[e]||e)+"."+({12:"a4273af9b82657f2",59:"c2dfec0c5e965cb5",73:"a6b96572b40c5751",79:"c90ea1de476d64c2",138:"b9389f70773e44e6",145:"9caac3d586b84999",154:"4e0902ce8b0f7ad1",188:"1839b14fedef7718",197:"bcdd8d0debcb7089",221:"a545399d0aaf207f",226:"8e9a3229837caa21",250:"b26c37701919cf5c",252:"d7cc856ebccc7381",268:"8ed821c518bf7977",274:"f21dd1bea1190823",353:"c2bc481b7d81054f",412:"47bfcc49cfe552a4",413:"69878f8910eb07d8",487:"c2062e37ef29da57",496:"c440e137e5877fb7",610:"44fac6b8e6928564",676:"5b9af4fe6d08a9fb",677:"b3c43a3f32b247f4",687:"798c6b33d9165736",689:"0563944ec53282b3",728:"3987afab39b00f4e",751:"a180d553d77914d3",909:"8d7e692d8852e057",918:"6652bd734d04208b",936:"e779b5632883831e",949:"e273523eaad35cc5",967:"83ea5cd9e6c9bb4c",975:"8821fdf115b619c5"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",b.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var f,u,i=document.getElementsByTagName("script"),a=0;a<i.length;a++){var d=i[a];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){f=d;break}}f||(u=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,b.nc&&f.setAttribute("nonce",b.nc),f.setAttribute("data-webpack",o+n),f.src=b.tu(e)),r[e]=[t];var l=function(t,n){f.onerror=f.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),u&&document.head.appendChild(f)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/ocearo-ui/_next/",f={272:0,476:0},b.f.j=function(e,t){var n=b.o(f,e)?f[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(272|476)$/.test(e))f[e]=0;else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),c=Error();b.l(o,function(t){if(b.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}},"chunk-"+e,e)}}},b.O.j=function(e){return 0===f[e]},u=function(e,t){var n,r,o=t[0],c=t[1],u=t[2],i=0;if(o.some(function(e){return 0!==f[e]})){for(n in c)b.o(c,n)&&(b.m[n]=c[n]);if(u)var a=u(b)}for(e&&e(t);i<o.length;i++)r=o[i],b.o(f,r)&&f[r]&&f[r][0](),f[r]=0;return b.O(a)},(i=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(u.bind(null,0)),i.push=u.bind(null,i.push.bind(i))}();
@@ -1,3 +1,3 @@
1
1
  @font-face{font-family:__geistSans_d559d3;src:url(/ocearo-ui/_next/static/media/4473ecc91f70f139-s.woff) format("woff");font-display:swap;font-weight:100 900}@font-face{font-family:__geistSans_Fallback_d559d3;src:local("Arial");ascent-override:85.83%;descent-override:20.52%;line-gap-override:9.33%;size-adjust:107.19%}.__className_d559d3{font-family:__geistSans_d559d3,__geistSans_Fallback_d559d3}.__variable_d559d3{--font-geist-sans:"__geistSans_d559d3","__geistSans_Fallback_d559d3"}@font-face{font-family:__geistMono_692ef5;src:url(/ocearo-ui/_next/static/media/463dafcda517f24f-s.woff) format("woff");font-display:swap;font-weight:100 900}@font-face{font-family:__geistMono_Fallback_692ef5;src:local("Arial");ascent-override:69.97%;descent-override:16.73%;line-gap-override:7.61%;size-adjust:131.49%}.__className_692ef5{font-family:__geistMono_692ef5,__geistMono_Fallback_692ef5}.__variable_692ef5{--font-geist-mono:"__geistMono_692ef5","__geistMono_Fallback_692ef5"}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
2
2
  ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-20{left:-5rem}.-right-1{right:-.25rem}.-right-6{right:-1.5rem}.-top-6{top:-1.5rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-20{bottom:5rem}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-2{top:.5rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-72{height:18rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\/2{width:50%}.w-2{width:.5rem}.w-2\/5{width:40%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\/5{width:60%}.w-32{width:8rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.min-w-\[3\.5rem\]{min-width:3.5rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-oGray{--tw-border-opacity:1;border-color:rgb(152 152 152/var(--tw-border-opacity,1))}.border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.bg-leftPaneBg{--tw-bg-opacity:1;background-color:rgb(14 14 14/var(--tw-bg-opacity,1))}.bg-oBlue{--tw-bg-opacity:1;background-color:rgb(9 191 255/var(--tw-bg-opacity,1))}.bg-oGray{--tw-bg-opacity:1;background-color:rgb(152 152 152/var(--tw-bg-opacity,1))}.bg-oGray2{--tw-bg-opacity:1;background-color:rgb(66 66 66/var(--tw-bg-opacity,1))}.bg-oGreen{--tw-bg-opacity:1;background-color:rgb(15 205 79/var(--tw-bg-opacity,1))}.bg-oNight{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-oRed{--tw-bg-opacity:1;background-color:rgb(204 0 12/var(--tw-bg-opacity,1))}.bg-oYellow{--tw-bg-opacity:1;background-color:rgb(255 190 0/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.bg-rightPaneBg{--tw-bg-opacity:1;background-color:rgb(30 30 30/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-opacity-10{--tw-bg-opacity:0.1}.bg-opacity-30{--tw-bg-opacity:0.3}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-70{--tw-bg-opacity:0.7}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-green-600{--tw-gradient-from:#16a34a var(--tw-gradient-from-position);--tw-gradient-to:rgba(22,163,74,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from:#f97316 var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,115,22,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500{--tw-gradient-from:#ef4444 var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-yellow-400{--tw-gradient-to:rgba(250,204,21,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#facc15 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-yellow-500{--tw-gradient-to:rgba(234,179,8,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#eab308 var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-green-400{--tw-gradient-to:#4ade80 var(--tw-gradient-to-position)}.to-green-500{--tw-gradient-to:#22c55e var(--tw-gradient-to-position)}.object-contain{object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-2{padding-bottom:.5rem}.pb-6{padding-bottom:1.5rem}.pl-4{padding-left:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-oBlue{--tw-text-opacity:1;color:rgb(9 191 255/var(--tw-text-opacity,1))}.text-oGray{--tw-text-opacity:1;color:rgb(152 152 152/var(--tw-text-opacity,1))}.text-oGreen{--tw-text-opacity:1;color:rgb(15 205 79/var(--tw-text-opacity,1))}.text-oNight{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-oRed{--tw-text-opacity:1;color:rgb(204 0 12/var(--tw-text-opacity,1))}.text-oYellow{--tw-text-opacity:1;color:rgb(255 190 0/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}.drop-shadow-md,.drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--background:#fff;--foreground:#171717}@media (prefers-color-scheme:dark){:root{--background:#0a0a0a;--foreground:#ededed}}body{color:var(--foreground);background:var(--background);font-family:Arial,Helvetica,sans-serif}:root{--primary-color:#1976d2;--accent-color:#ff4081;--warn-color:#f44336;--background-color:#fff;--foreground-color:#000;--foreground-text:#212121}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.hover\:bg-gray-800\/10:hover{background-color:rgba(31,41,55,.1)}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-oGray:hover{--tw-bg-opacity:1;background-color:rgb(152 152 152/var(--tw-bg-opacity,1))}.hover\:bg-oRed:hover{--tw-bg-opacity:1;background-color:rgb(204 0 12/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.hover\:text-oRed:hover{--tw-text-opacity:1;color:rgb(204 0 12/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity,1))}@media (min-width:640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
3
+ */*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-20{left:-5rem}.-right-1{right:-.25rem}.-right-6{right:-1.5rem}.-top-6{top:-1.5rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-20{bottom:5rem}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-2{top:.5rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-72{height:18rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\/2{width:50%}.w-2{width:.5rem}.w-2\/5{width:40%}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\/5{width:60%}.w-32{width:8rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.min-w-\[3\.5rem\]{min-width:3.5rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-oGray{--tw-border-opacity:1;border-color:rgb(152 152 152/var(--tw-border-opacity,1))}.border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.bg-leftPaneBg{--tw-bg-opacity:1;background-color:rgb(14 14 14/var(--tw-bg-opacity,1))}.bg-oBlue{--tw-bg-opacity:1;background-color:rgb(9 191 255/var(--tw-bg-opacity,1))}.bg-oGray{--tw-bg-opacity:1;background-color:rgb(152 152 152/var(--tw-bg-opacity,1))}.bg-oGray2{--tw-bg-opacity:1;background-color:rgb(66 66 66/var(--tw-bg-opacity,1))}.bg-oGreen{--tw-bg-opacity:1;background-color:rgb(15 205 79/var(--tw-bg-opacity,1))}.bg-oNight{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-oRed{--tw-bg-opacity:1;background-color:rgb(204 0 12/var(--tw-bg-opacity,1))}.bg-oYellow{--tw-bg-opacity:1;background-color:rgb(255 190 0/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.bg-rightPaneBg{--tw-bg-opacity:1;background-color:rgb(30 30 30/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-opacity-10{--tw-bg-opacity:0.1}.bg-opacity-30{--tw-bg-opacity:0.3}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-70{--tw-bg-opacity:0.7}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-green-600{--tw-gradient-from:#16a34a var(--tw-gradient-from-position);--tw-gradient-to:rgba(22,163,74,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from:#f97316 var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,115,22,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500{--tw-gradient-from:#ef4444 var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-yellow-400{--tw-gradient-to:rgba(250,204,21,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#facc15 var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-yellow-500{--tw-gradient-to:rgba(234,179,8,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#eab308 var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-green-400{--tw-gradient-to:#4ade80 var(--tw-gradient-to-position)}.to-green-500{--tw-gradient-to:#22c55e var(--tw-gradient-to-position)}.object-contain{object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-2{padding-bottom:.5rem}.pb-6{padding-bottom:1.5rem}.pl-4{padding-left:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-oBlue{--tw-text-opacity:1;color:rgb(9 191 255/var(--tw-text-opacity,1))}.text-oGray{--tw-text-opacity:1;color:rgb(152 152 152/var(--tw-text-opacity,1))}.text-oGreen{--tw-text-opacity:1;color:rgb(15 205 79/var(--tw-text-opacity,1))}.text-oNight{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-oRed{--tw-text-opacity:1;color:rgb(204 0 12/var(--tw-text-opacity,1))}.text-oYellow{--tw-text-opacity:1;color:rgb(255 190 0/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}.drop-shadow-md,.drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--background:#fff;--foreground:#171717}@media (prefers-color-scheme:dark){:root{--background:#0a0a0a;--foreground:#ededed}}body{color:var(--foreground);background:var(--background);font-family:Arial,Helvetica,sans-serif}:root{--primary-color:#1976d2;--accent-color:#ff4081;--warn-color:#f44336;--background-color:#fff;--foreground-color:#000;--foreground-text:#212121}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.hover\:bg-gray-800\/10:hover{background-color:rgba(31,41,55,.1)}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-oGray:hover{--tw-bg-opacity:1;background-color:rgb(152 152 152/var(--tw-bg-opacity,1))}.hover\:bg-oRed:hover{--tw-bg-opacity:1;background-color:rgb(204 0 12/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.hover\:text-oRed:hover{--tw-text-opacity:1;color:rgb(204 0 12/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity,1))}@media (min-width:640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
package/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/c78ab46923ef2f02.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-6800222ed1a234a2.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-50d0a3499460e502.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-35a8eb6f9457406b.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-ed02033afba81a43.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/bd904a5c-fce155daf9e9ba55.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/746-f1a5b23db9004a46.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/app/page-b9d9f5901e5701ed.js" async=""></script><meta name="theme-color" media="(prefers-color-scheme: light)" content="#4bbcd8"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a2e3d"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><meta name="format-detection" content="telephone=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_d559d3 __variable_692ef5 antialiased"><div class="h-screen bg-black flex items-center justify-center"><div class="animate-pulse text-white">Loading...</div></div><script src="/ocearo-ui/_next/static/chunks/webpack-6800222ed1a234a2.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HC[\"/\",\"\"]\n2:HL[\"/ocearo-ui/_next/static/css/c78ab46923ef2f02.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n5:I[19107,[],\"ClientPageRoot\"]\n6:I[99670,[\"870\",\"static/chunks/bd904a5c-fce155daf9e9ba55.js\",\"746\",\"static/chunks/746-f1a5b23db9004a46.js\",\"931\",\"static/chunks/app/page-b9d9f5901e5701ed.js\"],\"default\",1]\n7:I[4707,[],\"\"]\n8:I[36423,[],\"\"]\na:I[61060,[],\"\"]\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"Hr-CngZPYUr2uKuS2yt4x\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"\"],\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L4\",[\"$\",\"$L5\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$6\"}],null],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/c78ab46923ef2f02.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{}],[\"$\",\"body\",null,{\"className\":\"__variable_d559d3 __variable_692ef5 antialiased\",\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#4bbcd8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#0a2e3d\"}],[\"$\",\"meta\",\"3\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"4\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"5\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"6\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"7\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"9\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"10\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"11\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"12\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"13\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"14\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"15\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",\"16\",{\"name\":\"next-size-adjust\"}]]\n4:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preconnect" href="/" crossorigin=""/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/ac42e9cb9892c616.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-154ad04c6b65cdfa.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-50d0a3499460e502.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-35a8eb6f9457406b.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-ed02033afba81a43.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/bd904a5c-fce155daf9e9ba55.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/746-f1a5b23db9004a46.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/app/page-32b46c3e73a86694.js" async=""></script><meta name="theme-color" media="(prefers-color-scheme: light)" content="#4bbcd8"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a2e3d"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json" crossorigin="use-credentials"/><meta name="format-detection" content="telephone=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_d559d3 __variable_692ef5 antialiased"><div class="h-screen bg-black flex items-center justify-center"><div class="animate-pulse text-white">Loading...</div></div><script src="/ocearo-ui/_next/static/chunks/webpack-154ad04c6b65cdfa.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HC[\"/\",\"\"]\n2:HL[\"/ocearo-ui/_next/static/css/ac42e9cb9892c616.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n5:I[19107,[],\"ClientPageRoot\"]\n6:I[99670,[\"870\",\"static/chunks/bd904a5c-fce155daf9e9ba55.js\",\"746\",\"static/chunks/746-f1a5b23db9004a46.js\",\"931\",\"static/chunks/app/page-32b46c3e73a86694.js\"],\"default\",1]\n7:I[4707,[],\"\"]\n8:I[36423,[],\"\"]\na:I[61060,[],\"\"]\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"N96cZS9eZpTU4PbT3MlPa\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"\"],\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L4\",[\"$\",\"$L5\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$6\"}],null],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/ac42e9cb9892c616.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{}],[\"$\",\"body\",null,{\"className\":\"__variable_d559d3 __variable_692ef5 antialiased\",\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#4bbcd8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#0a2e3d\"}],[\"$\",\"meta\",\"3\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"4\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"5\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"6\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"7\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"9\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"10\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"11\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"12\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"13\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"14\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"15\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",\"16\",{\"name\":\"next-size-adjust\"}]]\n4:null\n"])</script></body></html>
package/index.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  2:I[19107,[],"ClientPageRoot"]
2
- 3:I[99670,["870","static/chunks/bd904a5c-fce155daf9e9ba55.js","746","static/chunks/746-f1a5b23db9004a46.js","931","static/chunks/app/page-b9d9f5901e5701ed.js"],"default",1]
2
+ 3:I[99670,["870","static/chunks/bd904a5c-fce155daf9e9ba55.js","746","static/chunks/746-f1a5b23db9004a46.js","931","static/chunks/app/page-32b46c3e73a86694.js"],"default",1]
3
3
  4:I[4707,[],""]
4
4
  5:I[36423,[],""]
5
- 0:["Hr-CngZPYUr2uKuS2yt4x",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/css/c78ab46923ef2f02.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":[["$","head",null,{}],["$","body",null,{"className":"__variable_d559d3 __variable_692ef5 antialiased","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]]}]],null],null],["$L6",null]]]]
5
+ 0:["N96cZS9eZpTU4PbT3MlPa",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/css/ac42e9cb9892c616.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":[["$","head",null,{}],["$","body",null,{"className":"__variable_d559d3 __variable_692ef5 antialiased","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]]}]],null],null],["$L6",null]]]]
6
6
  6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}],["$","meta","1",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"#4bbcd8"}],["$","meta","2",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"#0a2e3d"}],["$","meta","3",{"charSet":"utf-8"}],["$","title","4",{"children":"Ocearo"}],["$","meta","5",{"name":"description","content":"Sailing made smarter"}],["$","link","6",{"rel":"manifest","href":"./manifest.json","crossOrigin":"use-credentials"}],["$","meta","7",{"name":"format-detection","content":"telephone=no"}],["$","meta","8",{"name":"apple-mobile-web-app-capable","content":"yes"}],["$","meta","9",{"name":"apple-mobile-web-app-title","content":"Ocearo"}],["$","meta","10",{"name":"apple-mobile-web-app-status-bar-style","content":"black-translucent"}],["$","link","11",{"rel":"shortcut icon","href":"./favicon.ico"}],["$","link","12",{"rel":"icon","href":"./favicon.ico","type":"image/x-icon"}],["$","link","13",{"rel":"icon","href":"./favicon.svg","type":"image/svg+xml","sizes":"any"}],["$","link","14",{"rel":"icon","href":"./favicon-96x96.png","type":"image/png","sizes":"96x96"}],["$","link","15",{"rel":"apple-touch-icon","href":"./apple-touch-icon.png"}],["$","meta","16",{"name":"next-size-adjust"}]]
7
7
  1:null
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "ocearo-ui",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "private": false,
5
- "description": "Ocean Robot UI: Sailing made smarter",
5
+ "description": "Ocean Robot UI: 3D visualization dashboard for signalk",
6
6
  "license": "Apache-2.0",
7
7
  "author": "Matthieu Laborie",
8
8
  "repository": {
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[677],{39677:function(e,t,a){a.r(t),a.d(t,{default:function(){return x}});var s=a(57437),l=a(2265),i=a(53082),r=a(15008),c=a(51268),n=a(35217),d=e=>{let{data:t,dataKey:a,color:l,scale:r,label:c,unit:n,showPoints:d=!1,lineWidth:o=1,fillGradient:x=!1}=e,{nightMode:m}=(0,i.yC)(),h=t.filter(e=>null!==e[a]&&void 0!==e[a]);if(0===h.length)return(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:"No data available"});let g=Math.min(...h.map(e=>e[a])),u=Math.max(...h.map(e=>e[a])),v=Math.max(r.min,g-(u-g)*.1),f=Math.min(r.max,u+(u-g)*.1),j=u-g>(r.max-r.min)*.05,N=j?v:r.min,p=j?f:r.max,b=t.map((e,s)=>{let l=s/(t.length-1)*100;return null===e[a]||void 0===e[a]?{x:l,y:null,value:null,time:e.time}:{x:l,y:100-Math.min(100,Math.max(0,(e[a]-N)/(p-N)*100)),value:e[a],time:e.time}}).filter(e=>null!==e.y),y=b.reduce((e,t,a)=>e+(0===a?"M ".concat(t.x,",").concat(t.y):" L ".concat(t.x,",").concat(t.y)),""),w=Array.from({length:5}).map((e,t)=>({position:t/4*100,value:p-(p-N)/4*t}));return(0,s.jsxs)("div",{className:"h-full w-full relative",children:[(0,s.jsx)("div",{className:"absolute inset-0",children:w.map((e,t)=>(0,s.jsx)("div",{className:"absolute w-full border-t border-gray-300 opacity-40",style:{top:"".concat(e.position,"%")},children:(0,s.jsxs)("span",{className:"absolute text-xs ".concat(m?"text-oNight":"text-white"),children:[e.value.toFixed(e.value<10?1:0),n]})},t))}),(0,s.jsx)("div",{className:"absolute bottom-0 w-full",children:t.filter((e,t)=>t%10==0).map((e,a,l)=>(0,s.jsx)("span",{className:"absolute text-xs ".concat(m?"text-oNight":"text-white"," transform -translate-x-1/2"),style:{left:"".concat(10*a/(t.length-1)*100+10,"%"),bottom:"-20px"},children:e.time.split(":").slice(1).join(":")},a))}),(0,s.jsx)("div",{className:"absolute inset-0 ".concat(x?"rightPaneBg bg-opacity-30":"bg-oGray2 bg-opacity-10"," rounded-lg")}),j&&(0,s.jsxs)("div",{className:"absolute top-0 right-0 bg-oGray2 bg-opacity-70 px-2 py-1 rounded-md text-xs text-white",children:[N.toFixed(1)," - ",p.toFixed(1),n]}),(0,s.jsxs)("svg",{className:"w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"gradient-".concat(a),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:x?"0.5":"0.3"}),(0,s.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:x?"0.1":"0.05"})]}),x&&(0,s.jsxs)("linearGradient",{id:"line-gradient-".concat(a),x1:"0",y1:"0",x2:"1",y2:"0",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:"0.8"}),(0,s.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:"1"})]})]}),(0,s.jsx)("path",{d:"".concat(y," L ").concat(b[b.length-1].x,",100 L ").concat(b[0].x,",100 Z"),fill:"url(#gradient-".concat(a,")"),className:x?"filter drop-shadow-md":""}),(0,s.jsx)("path",{d:y,fill:"none",stroke:x?"url(#line-gradient-".concat(a,")"):l,strokeWidth:x?1.5*o:o,strokeLinecap:"round",strokeLinejoin:"round",className:x?"filter drop-shadow-sm":""}),d&&b.map((e,t)=>(0,s.jsx)("circle",{cx:e.x,cy:e.y,r:x?.8:.5,fill:l,className:"hover:r-4 transition-all duration-150 ".concat(x?"filter drop-shadow-md":""),children:(0,s.jsx)("title",{children:"".concat(c,": ").concat(e.value.toFixed(2)).concat(n)})},t))]})]})},o=a(72079),x=()=>{let{nightMode:e,getSignalKValue:t}=(0,i.yC)(),a=(0,l.useRef)(performance.now()),x=(0,l.useRef)(performance.now()),m=(0,l.useRef)(0),[h,g]=(0,l.useState)("battery"),[u,v]=(0,l.useState)("voltage"),[f,j]=(0,l.useState)("fps"),[N,p]=(0,l.useState)("1"),[b,y]=(0,l.useState)(!1),w=(0,l.useCallback)(()=>{let e=[];for(let a=1;a<=3;a++){let s=t("electrical.batteries.".concat(a,".name")),l=t("electrical.batteries.".concat(a,".voltage"));(s||l)&&e.push({id:a.toString(),name:s||"Battery ".concat(a),hasData:!0})}return 0===e.length&&e.push({id:"1",name:"Main Battery",hasData:!0}),e},[t]),[G,C]=(0,l.useState)(()=>w()),R=(0,l.useCallback)(()=>{let e=new Date().toLocaleTimeString(),a=t("electrical.batteries.".concat(N,".voltage"))||12,s=t("electrical.batteries.".concat(N,".capacity.stateOfCharge")),l=t("electrical.batteries.".concat(N,".current"))||5,c=t("electrical.batteries.".concat(N,".temperature")),n=null!==c?(0,i.G5)(c):null,d=t("electrical.batteries.".concat(N,".chemistry")),o=t("electrical.batteries.".concat(N,".name")),x=t("electrical.batteries.".concat(N,".location")),m=t("electrical.batteries.".concat(N,".dateInstalled")),h=t("electrical.batteries.".concat(N,".manufacturer.name")),g=t("electrical.batteries.".concat(N,".manufacturer.model")),u=t("electrical.batteries.".concat(N,".manufacturer.URL")),v=t("electrical.batteries.".concat(N,".associatedBus")),f=t("electrical.batteries.".concat(N,".voltage.ripple")),j=t("electrical.batteries.".concat(N,".capacity.nominal")),p=t("electrical.batteries.".concat(N,".capacity.actual")),b=t("electrical.batteries.".concat(N,".capacity.remaining")),y=t("electrical.batteries.".concat(N,".capacity.dischargeLimit")),w=t("electrical.batteries.".concat(N,".capacity.stateOfHealth")),G=t("electrical.batteries.".concat(N,".capacity.dischargeSinceFull")),C=t("electrical.batteries.".concat(N,".capacity.timeRemaining")),R=t("electrical.batteries.".concat(N,".lifetimeDischarge")),E=t("electrical.batteries.".concat(N,".lifetimeRecharge")),A="auto"===t("steering.autopilot.state"),O=t("navigation.lights")||!1;return{time:e,voltage:a,current:l,stateOfCharge:null!==s?s:(0,r.Si)(a),power:a*l,temperature:n,autopilotState:A,instrumentsOn:l>.5,navigationLightsOn:O,chemistry:d,name:o,location:x,dateInstalled:m,manufacturer:h,model:g,manufacturerURL:u,associatedBus:v,voltageRipple:f,nominalCapacity:j,actualCapacity:p,remainingCapacity:b,dischargeLimit:y,stateOfHealth:w,dischargeSinceFull:G,timeRemaining:C,lifetimeDischarge:R,lifetimeRecharge:E}},[t,N]),[E,A]=(0,l.useState)(()=>Array(60).fill(null).map(R)),[O,S]=(0,l.useState)(()=>{let e=new Date().toLocaleTimeString();return Array(60).fill({time:e,fps:60,ms:16.67,drawCalls:0,triangles:0,geometries:0,textures:0,memory:0})}),T=(0,l.useCallback)(e=>{let a=E[E.length-1],s=t("electrical.batteries.".concat(N,".voltage"))||a.voltage,l=t("electrical.batteries.".concat(N,".current"))||a.current,c=t("electrical.batteries.".concat(N,".capacity.stateOfCharge")),n=null!==c?c:(0,r.Si)(s),d=t("electrical.batteries.".concat(N,".temperature")),o=null!==d?(0,i.G5)(d):null,x=t("electrical.batteries.".concat(N,".chemistry"))||a.chemistry,m=t("electrical.batteries.".concat(N,".name"))||a.name,h=t("electrical.batteries.".concat(N,".location"))||a.location,g=t("electrical.batteries.".concat(N,".dateInstalled"))||a.dateInstalled,u=t("electrical.batteries.".concat(N,".manufacturer.name"))||a.manufacturer,v=t("electrical.batteries.".concat(N,".manufacturer.model"))||a.model,f=t("electrical.batteries.".concat(N,".manufacturer.URL"))||a.manufacturerURL,j=t("electrical.batteries.".concat(N,".associatedBus"))||a.associatedBus,p=t("electrical.batteries.".concat(N,".voltage.ripple"))||a.voltageRipple,b=t("electrical.batteries.".concat(N,".capacity.nominal"))||a.nominalCapacity,y=t("electrical.batteries.".concat(N,".capacity.actual"))||a.actualCapacity,w=t("electrical.batteries.".concat(N,".capacity.remaining"))||a.remainingCapacity,G=t("electrical.batteries.".concat(N,".capacity.dischargeLimit"))||a.dischargeLimit,C=t("electrical.batteries.".concat(N,".capacity.stateOfHealth"))||a.stateOfHealth,R=t("electrical.batteries.".concat(N,".capacity.dischargeSinceFull"))||a.dischargeSinceFull,A=t("electrical.batteries.".concat(N,".capacity.timeRemaining"))||a.timeRemaining,O=t("electrical.batteries.".concat(N,".lifetimeDischarge"))||a.lifetimeDischarge,S=t("electrical.batteries.".concat(N,".lifetimeRecharge"))||a.lifetimeRecharge;return{time:e,voltage:s,current:l,stateOfCharge:n,power:s*l,temperature:o,autopilotState:"auto"===t("steering.autopilot.state"),instrumentsOn:l>.5,navigationLightsOn:t("navigation.lights")||!1,chemistry:x,name:m,location:h,dateInstalled:g,manufacturer:u,model:v,manufacturerURL:f,associatedBus:j,voltageRipple:p,nominalCapacity:b,actualCapacity:y,remainingCapacity:w,dischargeLimit:G,stateOfHealth:C,dischargeSinceFull:R,timeRemaining:A,lifetimeDischarge:O,lifetimeRecharge:S}},[t,E,N]),L=(0,l.useRef)(null);(0,l.useEffect)(()=>{window.__OCEARO_RENDERER&&(L.current=window.__OCEARO_RENDERER)},[]),(0,l.useEffect)(()=>{let e=setInterval(()=>{C(w())},3e4);return()=>clearInterval(e)},[w]),(0,l.useEffect)(()=>{A(Array(60).fill(null).map(R))},[N,R]),(0,l.useEffect)(()=>{let e;let t=()=>{let s=new Date().toLocaleTimeString();m.current++;let l=performance.now();if(a.current,l>=x.current+1e3){var i,r,c,n,d,o,h,g;let e=1e3*m.current/(l-x.current),t=e>0?1e3/e:0,a=0,u=0,v=0,f=0,j=0;if(window.performance&&window.performance.memory&&(j=Math.round(window.performance.memory.usedJSHeapSize/1048576)),L.current){let e=L.current.info;a=(null===(i=e.render)||void 0===i?void 0:i.calls)||0,u=(null===(r=e.render)||void 0===r?void 0:r.triangles)||0,v=(null===(c=e.memory)||void 0===c?void 0:c.geometries)||0,f=(null===(n=e.memory)||void 0===n?void 0:n.textures)||0}else if(window.__OCEARO_RENDER_INFO){let e=window.__OCEARO_RENDER_INFO;a=(null===(d=e.render)||void 0===d?void 0:d.calls)||0,u=(null===(o=e.render)||void 0===o?void 0:o.triangles)||0,v=(null===(h=e.memory)||void 0===h?void 0:h.geometries)||0,f=(null===(g=e.memory)||void 0===g?void 0:g.textures)||0}S(l=>[...l.slice(1),{time:s,fps:e,ms:t,drawCalls:a,triangles:u,geometries:v,textures:f,memory:j}]),A(e=>[...e.slice(1),T(s)]),x.current=l,m.current=0}a.current=l,e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[T]);let F={voltage:{min:10.5,max:15,step:1},current:{min:-5,max:50,step:5},soc:{min:0,max:100,step:25},temperature:{min:10,max:60,step:10}},M={fps:{min:0,max:60,step:15},drawCalls:{min:0,max:500,step:100},triangles:{min:0,max:5e5,step:1e5},memory:{min:0,max:500,step:100}},I=E[E.length-1],D=(0,r.d3)(I.voltage),P=null!==I.temperature;return(0,s.jsxs)("div",{className:"flex flex-col h-full rightPaneBg overflow-auto",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center px-4 py-2 bg-oGray2 bg-opacity-50 border-b border-gray-800",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.RoX,className:"mr-2 text-green-500"}),(0,s.jsx)("span",{className:"text-white font-medium",children:"Energy"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,s.jsx)("span",{className:"text-white",children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),(0,s.jsx)("span",{className:"bg-black px-2 py-1 rounded text-white text-sm",children:I.temperature?"".concat(I.temperature.toFixed(0),"\xb0C"):"--\xb0C"})]})]}),(0,s.jsxs)("div",{className:"flex border-b border-gray-800",children:[(0,s.jsxs)("button",{onClick:()=>g("battery"),className:"flex-1 py-3 px-4 text-sm font-medium flex items-center justify-center transition-all ".concat("battery"===h?"text-green-500 border-b-2 border-green-500":"text-gray-400 hover:text-gray-300"),children:[(0,s.jsx)(c.G,{icon:n.XEC,className:"mr-2"}),"Energy"]}),(0,s.jsxs)("button",{onClick:()=>g("graph"),className:"flex-1 py-3 px-4 text-sm font-medium flex items-center justify-center transition-all ".concat("graph"===h?"text-green-500 border-b-2 border-green-500":"text-gray-400 hover:text-gray-300"),children:[(0,s.jsx)(c.G,{icon:n.Stf,className:"mr-2"}),"Consumption"]}),(0,s.jsxs)("button",{onClick:()=>g("performance"),className:"flex-1 py-3 px-4 text-sm font-medium flex items-center justify-center transition-all ".concat("performance"===h?"text-green-500 border-b-2 border-green-500":"text-gray-400 hover:text-gray-300"),children:[(0,s.jsx)(c.G,{icon:n.ESn,className:"mr-2"}),"Performance"]})]}),(0,s.jsxs)("div",{className:"h-full",children:["battery"===h&&(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1 min-h-0 rightPaneBg",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("h2",{className:"text-xl font-bold text-white flex items-center",children:["Battery information ",I.stateOfCharge.toFixed(0),"%",(0,s.jsx)("button",{className:"ml-2 bg-oGray2 rounded-full w-6 h-6 flex items-center justify-center text-gray-400 hover:bg-oGray focus:outline-none focus:ring-1 focus:ring-green-500",onClick:()=>y(!b),"aria-label":"Battery details",children:(0,s.jsx)(c.G,{icon:n.Fuz,className:"text-xs"})})]}),(0,s.jsx)("div",{className:"flex items-center space-x-2",children:(0,s.jsx)("select",{className:"bg-oGray2 px-2 py-1 rounded text-white text-sm border border-gray-700 focus:outline-none focus:ring-1 focus:ring-green-500",value:N,onChange:e=>p(e.target.value),children:G.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))})})]}),b&&(0,s.jsxs)("div",{className:"bg-oGray2 p-4 rounded-lg mb-6 relative",children:[(0,s.jsx)("button",{className:"absolute top-2 right-2 text-gray-400 hover:text-white",onClick:()=>y(!1),"aria-label":"Close details",children:"\xd7"}),(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-4",children:"BATTERY DETAILS"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[I.name&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"NAME"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.name})]}),I.location&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"LOCATION"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.location})]}),I.manufacturer&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"MAKER"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.manufacturer})]}),I.model&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"MODEL"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.model})]}),I.chemistry&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"CHEMISTRY"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.chemistry})]}),I.dateInstalled&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"INSTALLED"}),(0,s.jsx)("div",{className:"text-sm text-white",children:new Date(I.dateInstalled).toLocaleDateString()})]}),I.associatedBus&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"BUS"}),(0,s.jsx)("div",{className:"text-sm text-white",children:I.associatedBus})]}),I.stateOfHealth&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"HEALTH"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(100*I.stateOfHealth).toFixed(0),"%"]})]}),null!==I.timeRemaining&&void 0!==I.timeRemaining&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"w-20 text-xs text-gray-400",children:"REMAINING"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.timeRemaining/3600).toFixed(1)," hrs"]})]})]}),(I.nominalCapacity||I.actualCapacity||I.remainingCapacity)&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-xs mb-2",children:"CAPACITY"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[I.nominalCapacity&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"NOMINAL"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.nominalCapacity/3600).toFixed(1)," Wh"]})]}),I.actualCapacity&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"ACTUAL"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.actualCapacity/3600).toFixed(1)," Wh"]})]}),I.remainingCapacity&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"REMAINING"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.remainingCapacity/3600).toFixed(1)," Wh"]})]})]})]}),(I.lifetimeDischarge||I.lifetimeRecharge)&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-xs mb-2",children:"LIFETIME STATISTICS"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[I.lifetimeDischarge&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"DISCHARGE"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.lifetimeDischarge/3600).toFixed(0)," Ah"]})]}),I.lifetimeRecharge&&(0,s.jsxs)("div",{className:"bg-oGray p-2 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"RECHARGE"}),(0,s.jsxs)("div",{className:"text-sm text-white",children:[(I.lifetimeRecharge/3600).toFixed(0)," Ah"]})]})]})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col justify-between",children:[(0,s.jsxs)("div",{className:"relative bg-oGray2 rounded-lg p-4 mb-6",children:[(0,s.jsxs)("div",{className:"mb-2 flex justify-between items-center",children:[(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"text-gray-400 text-sm",children:"BATTERY PERCENTAGE"})}),(0,s.jsxs)("div",{className:"px-3 py-1 rounded-lg text-sm ".concat(D?"bg-green-900 text-green-400":"bg-red-900 text-red-400"),children:[(0,s.jsx)(c.G,{icon:D?n.Tr1:n.RoX,className:"mr-2"}),D?"Charging":"Discharging"]})]}),(0,s.jsxs)("div",{className:"h-24 relative mt-4 flex flex-col justify-between",children:[(0,s.jsxs)("div",{className:"flex justify-between text-xs text-gray-400 mb-1",children:[(0,s.jsx)("span",{children:"State of Charge"}),I.dischargeLimit&&(0,s.jsxs)("span",{children:["Discharge Limit: ",(100*I.dischargeLimit).toFixed(0),"%"]})]}),(0,s.jsxs)("div",{className:"h-10 bg-oGray relative rounded-lg overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-red-500 via-yellow-500 to-green-500 opacity-20"}),I.dischargeLimit&&(0,s.jsx)("div",{className:"absolute h-full border-r-2 border-yellow-500 border-dashed",style:{left:"".concat(100*I.dischargeLimit,"%")},children:(0,s.jsx)("div",{className:"absolute -right-1 top-0 w-2 h-2 bg-yellow-500 rounded-full"})}),(0,s.jsx)("div",{className:"h-full ".concat(D?"bg-gradient-to-r from-green-600 to-green-400":"bg-gradient-to-r from-orange-500 via-yellow-400 to-green-500"),style:{width:"".concat(I.stateOfCharge,"%")},children:(0,s.jsxs)("div",{className:"absolute top-0 h-full border-r-2 border-white",style:{left:"".concat(I.stateOfCharge,"%")},children:[(0,s.jsx)("div",{className:"absolute -right-1 top-0 w-2 h-2 bg-white rounded-full"}),(0,s.jsxs)("div",{className:"absolute -right-6 -top-6 bg-oGray2 px-1 py-0.5 rounded text-xs text-white",children:[I.stateOfCharge.toFixed(0),"%"]})]})})]}),(0,s.jsxs)("div",{className:"flex justify-between mt-2",children:[(0,s.jsxs)("div",{className:"text-xs text-white flex items-center",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-red-500 rounded-full mr-1"}),"Empty"]}),(0,s.jsx)("div",{className:"text-xs text-white bg-oGray2 px-2 py-1 rounded",children:D?"Charging":I.timeRemaining?"Time remaining: ".concat((I.timeRemaining/3600).toFixed(1)," h"):"Est. time: ".concat((I.stateOfCharge/(I.current/100)).toFixed(1)," h")}),(0,s.jsxs)("div",{className:"text-xs text-white flex items-center",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-green-500 rounded-full mr-1"}),"Full"]})]})]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-2",children:"POWER CONSUMPTION"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.zvy,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Autopilot"}),I.autopilotState&&(0,s.jsx)("span",{className:"ml-2 px-1.5 py-0.5 bg-green-900 text-green-400 text-xs rounded",children:"Active"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[I.autopilotState?(.4*I.current).toFixed(1):"0.0","%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-blue-500",style:{width:"".concat(I.autopilotState?Math.min(80,.8*I.current):0,"%")}})})]}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.ESn,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Navigation Instruments"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[(.3*I.current).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-cyan-500",style:{width:"".concat(Math.min(60,.6*I.current),"%")}})})]}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.BDt,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Navigation Lights"}),I.navigationLightsOn&&(0,s.jsx)("span",{className:"ml-2 px-1.5 py-0.5 bg-green-900 text-green-400 text-xs rounded",children:"On"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[(I.navigationLightsOn?.2:0).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-amber-500",style:{width:"".concat(I.navigationLightsOn?15:0,"%")}})})]}),P&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(c.G,{icon:n.ccn,className:"text-gray-400 mr-2"}),(0,s.jsx)("span",{className:"text-white",children:"Battery Temperature"})]}),(0,s.jsxs)("div",{className:"text-sm text-white font-bold",children:[(.01*I.temperature).toFixed(1),"%"]})]}),(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-orange-500",style:{width:"".concat(Math.min(30,.5*I.temperature),"%")}})})]}),(0,s.jsxs)("div",{className:"mt-8 rightPaneBg bg-opacity-50 p-3 rounded-lg text-sm",children:[(0,s.jsx)("div",{className:"text-white font-medium mb-2",children:"MARINE POWER SAVING TIPS"}),(0,s.jsxs)("div",{className:"flex items-center text-green-400 mb-1",children:[(0,s.jsx)(c.G,{icon:n.BDt,className:"mr-2"}),(0,s.jsxs)("span",{children:["Turn off navigation lights during daylight to save ~",(.8*I.voltage).toFixed(1)," W"]})]}),(0,s.jsxs)("div",{className:"flex items-center text-green-400 mb-1",children:[(0,s.jsx)(c.G,{icon:n.zvy,className:"mr-2"}),(0,s.jsx)("span",{children:"Use wind vane steering when possible instead of autopilot"})]}),(0,s.jsxs)("div",{className:"flex items-center text-amber-400",children:[(0,s.jsx)(c.G,{icon:n.ESn,className:"mr-2"}),(0,s.jsxs)("span",{children:["Current power usage: ",(I.voltage*I.current).toFixed(1)," W"]})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 mt-6 text-center",children:[(0,s.jsxs)("div",{className:"bg-oGray2 p-3 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"VOLTAGE"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[I.voltage.toFixed(1),"V"]}),I.voltageRipple&&(0,s.jsxs)("div",{className:"text-xs text-gray-400 mt-1",children:["Ripple: ",I.voltageRipple.toFixed(2),"V"]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 p-3 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"CURRENT"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[I.current.toFixed(1),"A"]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 p-3 rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"POWER"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[(I.voltage*I.current).toFixed(0),"W"]})]})]})]})]}),"graph"===h&&(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1 min-h-0 rightPaneBg",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-white",children:"Consumption Graph"}),(0,s.jsxs)("div",{className:"flex space-x-2 bg-oGray2 rounded-lg overflow-hidden p-1",children:[(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("voltage"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("voltage"),children:"Voltage"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("current"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("current"),children:"Current"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("soc"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("soc"),children:"SoC %"}),P&&(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("temperature"===u?"bg-oGray text-white":"text-gray-400"),onClick:()=>v("temperature"),children:"Temp"})]})]}),(0,s.jsx)("div",{className:"bg-oGray2 rounded-lg p-4 mb-6",children:(0,s.jsxs)("div",{className:"h-72 relative px-4 pb-6 pt-2 overflow-hidden",children:["voltage"===u&&(0,s.jsx)(d,{data:E,dataKey:"voltage",color:"#3b82f6",scale:F.voltage,label:"Voltage",unit:"V",showPoints:!0,fillGradient:!0}),"current"===u&&(0,s.jsx)(d,{data:E,dataKey:"current",color:"#ef4444",scale:F.current,label:"Current",unit:"A",showPoints:!0,fillGradient:!0}),"soc"===u&&(0,s.jsx)(d,{data:E,dataKey:"stateOfCharge",color:"#22c55e",scale:F.soc,label:"State of Charge",unit:"%",showPoints:!0,fillGradient:!0}),"temperature"===u&&P&&(0,s.jsx)(d,{data:E,dataKey:"temperature",color:"#f97316",scale:F.temperature,label:"Temperature",unit:"\xb0C",showPoints:!0,fillGradient:!0})]})}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-4",children:"DETAILED CONSUMPTION BREAKDOWN"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,s.jsx)("div",{className:"border-l-4 border-green-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"REAL/NOMINAL"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:"-0.9%"})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-green-500",style:{width:"20%"}})})})]})}),(0,s.jsx)("div",{className:"border-l-4 border-blue-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"AVERAGE CONSUMPTION"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[(I.voltage*I.current/100).toFixed(1)," kWh/100km"]})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-blue-500",style:{width:"35%"}})})})]})}),(0,s.jsx)("div",{className:"border-l-4 border-orange-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"TEMPERATURE IMPACT"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:P?"".concat((.05*I.temperature).toFixed(1),"%"):"0.0%"})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-orange-500",style:{width:P?"".concat(Math.min(50,I.temperature),"%"):"10%"}})})})]})})]})]})]}),"performance"===h&&(0,s.jsxs)("div",{className:"p-4 flex flex-col flex-1 min-h-0 rightPaneBg",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-white",children:"Performance Metrics"}),(0,s.jsxs)("div",{className:"flex space-x-2 bg-oGray2 rounded-lg overflow-hidden p-1",children:[(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("fps"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("fps"),children:"FPS"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("drawCalls"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("drawCalls"),children:"Calls"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("triangles"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("triangles"),children:"Triangles"}),(0,s.jsx)("button",{className:"px-3 py-1 rounded text-sm transition-all ".concat("memory"===f?"bg-oGray text-white":"text-gray-400"),onClick:()=>j("memory"),children:"Memory"})]})]}),(0,s.jsx)("div",{className:"bg-oGray2 rounded-lg p-4 mb-6",children:(0,s.jsxs)("div",{className:"h-72 relative px-4 pb-6 pt-2 overflow-hidden rounded-lg",children:["fps"===f&&(0,s.jsx)(d,{data:O,dataKey:"fps",color:"#06b6d4",scale:M.fps,label:"FPS",unit:"",showPoints:!0,fillGradient:!0}),"drawCalls"===f&&(0,s.jsx)(d,{data:O,dataKey:"drawCalls",color:"#8b5cf6",scale:M.drawCalls,label:"Draw Calls",unit:"",showPoints:!0,fillGradient:!0}),"triangles"===f&&(0,s.jsx)(d,{data:O,dataKey:"triangles",color:"#6366f1",scale:M.triangles,label:"Triangles",unit:"",showPoints:!0,fillGradient:!0}),"memory"===f&&(0,s.jsx)(d,{data:O,dataKey:"memory",color:"#10b981",scale:M.memory,label:"Memory",unit:" MB",showPoints:!0,fillGradient:!0})]})}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"text-gray-400 text-sm font-medium mb-4",children:"HARDWARE PERFORMANCE STATS"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsx)("div",{className:"border-l-4 border-cyan-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"CURRENT FPS"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:O[O.length-1].fps.toFixed(1)})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-cyan-500",style:{width:"".concat(Math.min(100,O[O.length-1].fps/60*100),"%")}})})})]})}),(0,s.jsx)("div",{className:"border-l-4 border-purple-500 pl-4",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-gray-400",children:"FRAME TIME"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[O[O.length-1].ms.toFixed(1)," ms"]})]}),(0,s.jsx)("div",{className:"w-1/2",children:(0,s.jsx)("div",{className:"h-2 bg-oGray rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-purple-500",style:{width:"".concat(Math.min(100,100-O[O.length-1].ms/33.33*100),"%")}})})})]})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[(0,s.jsxs)("div",{className:"rightPaneBg bg-opacity-50 p-3 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"DRAW CALLS"}),(0,s.jsx)("div",{className:"text-lg font-bold text-white",children:O[O.length-1].drawCalls})]}),(0,s.jsxs)("div",{className:"rightPaneBg bg-opacity-50 p-3 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"TRIANGLES"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[(O[O.length-1].triangles/1e3).toFixed(1),"k"]})]}),(0,s.jsxs)("div",{className:"rightPaneBg bg-opacity-50 p-3 rounded-lg text-center",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"MEMORY"}),(0,s.jsxs)("div",{className:"text-lg font-bold text-white",children:[O[O.length-1].memory," MB"]})]})]}),(0,s.jsxs)("div",{className:"mt-6 rightPaneBg bg-opacity-50 p-3 rounded-lg text-sm",children:[(0,s.jsx)("div",{className:"text-white font-medium mb-2",children:"SYSTEM INFO"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.zvy,className:"mr-2 text-cyan-400"}),(0,s.jsx)("span",{children:"GPU: WebGL Renderer"})]}),(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.$v3,className:"mr-2 text-green-400"}),(0,s.jsxs)("span",{children:["Textures: ",O[O.length-1].textures||0]})]}),(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.hGM,className:"mr-2 text-purple-400"}),(0,s.jsxs)("span",{children:["Geometries: ",O[O.length-1].geometries||0]})]}),(0,s.jsxs)("div",{className:"flex items-center text-gray-300",children:[(0,s.jsx)(c.G,{icon:n.dT$,className:"mr-2 text-blue-400"}),(0,s.jsxs)("span",{children:["Three.js ",o.UZH]})]})]})]})]})]})]})]})}},15008:function(e,t,a){a.d(t,{Si:function(){return l},d3:function(){return i},vp:function(){return s},z:function(){return r}});let s={WARNING_THRESHOLD:50,DANGER_THRESHOLD:20,CHARGING_THRESHOLD:13.2,MIN_VOLTAGE:10.5,MAX_VOLTAGE:14.4},l=e=>{if(!e||"number"!=typeof e)return 0;if(e>=13)return 100;if(e<=s.MIN_VOLTAGE)return 0;let t=[{voltage:12.85,soc:100},{voltage:12.75,soc:90},{voltage:12.65,soc:80},{voltage:12.55,soc:70},{voltage:12.45,soc:60},{voltage:12.35,soc:50},{voltage:12.25,soc:40},{voltage:12.15,soc:30},{voltage:12.05,soc:20},{voltage:11.95,soc:15},{voltage:11.8,soc:10},{voltage:11.6,soc:5},{voltage:10.5,soc:0}];for(let a=0;a<t.length-1;a++)if(e>=t[a+1].voltage){let s=t[a].voltage,l=t[a+1].voltage,i=t[a].soc,r=t[a+1].soc;return Math.round(r+(e-l)/(s-l)*(i-r))}return 0},i=e=>e>s.CHARGING_THRESHOLD,r=e=>e>s.WARNING_THRESHOLD?"bg-oGreen":e>s.DANGER_THRESHOLD?"bg-oYellow":"bg-oRed"}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73],{69073:function(e,s,l){l.r(s);var a=l(57437),t=l(2265),n=l(63321);s.default=e=>{var s,l,r,c,i,o,d;let{onSave:m}=e,x=n.Z.getAll(),u=n.Z.getComputedSignalKUrl(),h=n.Z.getBoatsData(),[p,g]=(0,t.useState)(x),[b,j]=(0,t.useState)(x.useAuthentication||!!x.username||!!x.password),[v,N]=(0,t.useState)(x.signalKUrlSet||!1),[f,k]=(0,t.useState)(null),[U,y]=(0,t.useState)(!1),[w,C]=(0,t.useState)({visible:!1,message:""}),S=(0,t.useCallback)(e=>{y(JSON.stringify(e)!==JSON.stringify(x))},[x]);(0,t.useEffect)(()=>{(async()=>{let e=n.Z.getAll();g(e),N(e.signalKUrlSet||!1),j(e.useAuthentication||!!e.username||!!e.password),e.selectedBoat&&k(h.find(s=>s.name===e.selectedBoat)||null)})()},[h]);let E=e=>{let s={...p,...e};g(s),S(s);let l={...s};e.hasOwnProperty("signalKUrlSet")?!1===e.signalKUrlSet&&(l.signalkUrl=u,l.username="",l.password=""):v||e.hasOwnProperty("signalkUrl")?b||(l.username="",l.password=""):(l.signalkUrl=u,l.username="",l.password=""),n.Z.saveConfig(l),null==m||m(l),y(!1),C({visible:!0,message:"Settings saved automatically"}),setTimeout(()=>C({visible:!1,message:""}),2e3)};return(0,a.jsxs)("div",{className:"p-4 text-white",children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold mb-4 flex justify-between items-center",children:["Ocearo Configuration",w.visible&&(0,a.jsx)("span",{className:"text-sm font-normal bg-green-500 text-white px-3 py-1 rounded-full animate-pulse",children:w.message})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Connection Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:v,onChange:e=>{N(e.target.checked),E({signalKUrlSet:e.target.checked})}}),"Set SignalK URL",!v&&(0,a.jsxs)("span",{className:"ml-2",children:["(",u,")"]})]})}),v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"SignalK Server URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",value:p.signalkUrl||"",onChange:e=>E({signalkUrl:e.target.value})})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:b,onChange:e=>{j(e.target.checked),E({useAuthentication:e.target.checked})}}),"Use Authentication"]})}),b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Username:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",value:p.username||"",onChange:e=>E({username:e.target.value})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Password:"}),(0,a.jsx)("input",{type:"password",className:"border p-2 w-full text-black rounded",value:p.password||"",onChange:e=>E({password:e.target.value})})]})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Vessel Settings"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Select Vessel:"}),(0,a.jsxs)("select",{className:"border p-2 w-full text-black rounded",value:p.selectedBoat||"",onChange:e=>{let s=e.target.value;k(h.find(e=>e.name===s)||null),E({selectedBoat:s})},children:[(0,a.jsx)("option",{value:"",children:"-- Select a Vessel --"}),h.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.name))]})]}),f&&(0,a.jsxs)("div",{className:"space-y-2 text-sm text-gray-400",children:[(0,a.jsxs)("div",{children:["3D Model: ",f.modelPath]}),(0,a.jsxs)("div",{children:["Features: ",null===(s=f.capabilities)||void 0===s?void 0:s.join(", ")]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Vessel Color:"}),(0,a.jsx)("input",{type:"color",className:"w-full h-10 rounded",value:p.primaryColor||"#000000",onChange:e=>E({primaryColor:e.target.value})})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:p.metallicEffect||!1,onChange:e=>E({metallicEffect:e.target.checked})}),"Enable Metallic Effect"]})})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Display Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center text-base",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-3 h-5 w-5",checked:p.compassNorthUp||!1,onChange:e=>E({compassNorthUp:e.target.checked})}),(0,a.jsxs)("span",{children:["Compass Mode: North at Top",(0,a.jsx)("div",{className:"text-sm text-gray-400",children:p.compassNorthUp?"North at top (land navigation style)":"North at bottom (marine navigation style)"})]})]})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"block text-sm font-medium",children:["AIS Length Scaling Factor",(0,a.jsx)("div",{className:"text-xs text-gray-500",children:"Controls the scaling of AIS boats on the map (0.1 - 2.0)"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)("span",{className:"text-sm",children:"0.1"}),(0,a.jsx)("input",{type:"range",className:"w-full h-10 appearance-none bg-gray-700 rounded-lg outline-none cursor-pointer",style:{WebkitAppearance:"none",appearance:"none",height:"20px",background:"linear-gradient(to right, #1E3A8A, #3B82F6)",borderRadius:"10px"},min:"0.1",max:"2.0",step:"0.1",value:p.aisLengthScalingFactor||.7,onChange:e=>E({aisLengthScalingFactor:parseFloat(e.target.value)})}),(0,a.jsx)("span",{className:"text-sm",children:"2.0"}),(0,a.jsx)("span",{className:"text-base font-semibold bg-blue-500 px-3 py-1 rounded-lg min-w-[3.5rem] text-center",children:p.aisLengthScalingFactor||.7})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Advanced Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:p.debugMode||!1,onChange:e=>E({debugMode:e.target.checked,signalkUrl:u})}),"Debug Mode"]})}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:p.showCustomUrls||!1,onChange:e=>E({showCustomUrls:e.target.checked})}),"Set Custom External Tools URLs"]})}),p.showCustomUrls&&(0,a.jsxs)("div",{className:"space-y-4 p-4 border border-gray-700 rounded-lg",children:[(0,a.jsx)("h3",{className:"text-lg font-medium",children:"Custom External URLs"}),(0,a.jsxs)("p",{className:"text-sm text-gray-400 mb-4",children:["Customize URLs for external tools. Use ",(0,a.jsx)("code",{children:"${signalkUrl}"})," as placeholder for the SignalK URL, and ",(0,a.jsx)("code",{children:"${latitude}"})," or ",(0,a.jsx)("code",{children:"${longitude}"})," for position values. Leave empty to use the default URL."]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Navigation URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"${signalkUrl}/@signalk/freeboard-sk/",value:(null===(l=p.customExternalUrls)||void 0===l?void 0:l.navigation)||"",onChange:e=>{let s={...p.customExternalUrls};s.navigation=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Instrument URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"${signalkUrl}/@mxtommy/kip/",value:(null===(r=p.customExternalUrls)||void 0===r?void 0:r.instrument)||"",onChange:e=>{let s={...p.customExternalUrls};s.instrument=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Dashboard URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"${signalkUrl}/grafana",value:(null===(c=p.customExternalUrls)||void 0===c?void 0:c.dashboard)||"",onChange:e=>{let s={...p.customExternalUrls};s.dashboard=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Webcam 1 URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"https://example.com/webcam1",value:(null===(i=p.customExternalUrls)||void 0===i?void 0:i.webcam1)||"",onChange:e=>{let s={...p.customExternalUrls};s.webcam1=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Webcam 2 URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"https://example.com/webcam2",value:(null===(o=p.customExternalUrls)||void 0===o?void 0:o.webcam2)||"",onChange:e=>{let s={...p.customExternalUrls};s.webcam2=e.target.value,E({customExternalUrls:s})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Weather URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",placeholder:"https://embed.windy.com/embed.html?location=coordinates&lat=${latitude}&lon=${longitude}",value:(null===(d=p.customExternalUrls)||void 0===d?void 0:d.weather)||"",onChange:e=>{let s={...p.customExternalUrls};s.weather=e.target.value,E({customExternalUrls:s})}})]})]})]})]}),(0,a.jsx)("div",{className:"flex space-x-4 pt-4",children:(0,a.jsx)("button",{onClick:()=>{let e=n.Z.getDefaultConfig();g(e),j(!1),e.useAuthentication=!1,N(!1),e.signalKUrlSet=!1,e.showCustomUrls=!1,e.customExternalUrls={},n.Z.saveConfig(e),y(!1)},className:"bg-oRed text-white px-4 py-2 rounded hover:bg-red-600",children:"Reset Configuration"})})]})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[909],{11909:function(e,t,a){a.d(t,{Z:function(){return I}});var o=a(57437),r=a(2265),i=a(21276),s=a(53082),n=a(63321),l=a(41106),m=a(72079);function h(e,t,a){return e/1.9438444924574*Math.pow(t/10,a)*1.9438444924574}var c=a(53359),u=a(31378),g=a(70262),p=new WeakMap,d=new WeakMap;class f{calcShape(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,g._)(this,d,[]);let t=this.chordTackLevel/((0,c._)(this,p)[(0,c._)(this,p).length-1].x-(0,c._)(this,p)[0].x);for(let a of(0,c._)(this,p)){let o=a.clone().multiplyScalar(t);1!==e&&(o.y*=e),(0,c._)(this,d).push(o)}let a=new m.FM8(0,0);for(let e of(0,c._)(this,d))e.y>a.y&&(a=e);this.draftDepth=a.y,this.draftPosition=a.x,this.girth=0;let o=null;for(let e of(0,c._)(this,d))null!==o&&(this.girth+=e.distanceTo(o)),o=e;this.sag=this.chordTackLevel-this.girth,this.entryAngleRad=(0,c._)(this,d)[1].clone().sub((0,c._)(this,d)[0]).angle(),this.exitAngleRad=(0,c._)(this,d)[(0,c._)(this,d).length-1].clone().sub((0,c._)(this,d)[(0,c._)(this,d).length-2]).angle()-2*Math.PI,this.mastAngleRad=this.calcMastAngle(),this.forceAngleRad=(this.entryAngleRad+this.exitAngleRad)/2,this.draftDepthRatio=this.draftDepth/this.chordTackLevel,this.draftPositionRatio=this.draftPosition/this.chordTackLevel}calcMastAngle(){let e=0,t=null,a=this.mastWidth*this.chordTackLevel/this.chordMastTop;for(let o of(0,c._)(this,d)){if(null!==t&&(e+=o.distanceTo(t))>=a)return o.angle();t=o}return NaN}getVerticesAngles(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=(this.girth-t)/(e-1),r=0,i=0,s=[],n=null;for(let l of(0,c._)(this,d)){if(null!==n&&(((i+=l.distanceTo(n))>=r*o+t||a&&i>a)&&(r++,s.push(l.angle())),r>=e))break;n=l}return s}pointAtGirthDistance(e){let t=0,a=null;for(let o of(0,c._)(this,d))if(null!==a&&(t+=o.distanceTo(a)),a=o,t>=e)return a.clone()}constructor(e,t,a,o=1){(0,u._)(this,p,{writable:!0,value:void 0}),(0,u._)(this,d,{writable:!0,value:void 0}),(0,g._)(this,p,[]),(0,g._)(this,d,[]),this.chordMastTop=t,this.chordTackLevel=e,this.mastWidth=a;let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new m.FM8(t*e**2,2*t*e)},i=1.001+.95*(o-1)/10,s=(i-.001)/1e3,n=r(.001),l=r(i).clone().sub(n).angle(),h=new m.FM8(0,0);for(let e=.001;e<=i;e+=s){let t=r(e);t.sub(n),t.rotateAround(h,-l),(0,c._)(this,p).push(t)}this.calcShape(1-.25*(o-1)/10)}}let y=Math.floor(20),_=Math.ceil(160),M={waterlineToMastFootHeight:.45,maxMastRotation:Math.PI/2,maxChordRotationPerSailLevel:Math.PI/3*2};var x=e=>{let{windParams:t={speed:5,hellman:.27},boatParams:a={mastrotation:0,heading:130,speed:5},sailParams:i={mastArea:0,sailArea:0,cunningham:1,angleOfAttack:20}}=e,{getSignalKValue:n}=(0,s.yC)(),l=(0,r.useRef)(),c=(0,r.useRef)(null),u=(0,r.useRef)(0),g=(0,r.useRef)(null),p=(0,r.useRef)(null),d=(0,r.useRef)(),x=(0,r.useRef)({}),b=(0,r.useMemo)(()=>{let e=new m.ZAu,t=new m.b_z(.1,.2,12),a=new m.Wid({color:s.gK,opacity:.5,transparent:!0}),o=new m.Kj0(t,a);return o.position.set(0,-.1,0),e.add(o),e},[]);(0,r.useEffect)(()=>{let e=new m.ZAu,t={};for(let a=0;a<8;a+=.5){let o=b.clone();o.position.set(0,a,0),t[2*a]=o,e.add(o)}return e.position.set(0,0,0),d.current&&d.current.add(e),x.current=t,()=>{e.clear()}},[b]);let P=(e,t)=>{let a=x.current;if(!a){console.error("apparentWindField is not initialized.");return}for(let o=0;o<8;o+=.5){let r=h(e,o,t),i=a[2*o];if(!i){console.warn("Apparent wind field cone at height ".concat(o," is not defined."));continue}i.scale.set(.1*r,r,.1*r),i.rotation.set(0,-Math.PI,Math.PI/2)}},{geometry:v,sailClipWidthPerLevel:j}=(0,r.useMemo)(()=>{let e=new m.u9r,t=[],a=[],o=[];for(let e=0;e<=_;e++){let r,i;let s=Math.min(50*e,8e3);s<900?(r=3600,i=3800+-200*s/900):i=r=3600-3210*(s-900)/7100+600*Math.sin((s-900)/7100*Math.PI);let n=0;for(let o=0;o<y;o++){let l=r/(y-1),m=l*o-i,h=l;m>.1&&(h=m>l?0:l-m),t.push(0===o?0:(n+h)/1e3,s/1e3,0),n=0===o?0:n+h;let c=Math.floor(_/10);a.push(...e%c==0?[.8,0,.047]:[.596,.596,.596])}o.push(i===r?null:i)}let r=[];for(let e=0;e<_;e++)for(let t=1;t<y;t++){let a=e*y+t;r.push(a-1,a,a+y-1,a,a+y,a+y-1)}return e.setAttribute("position",new m.a$l(t,3)),e.setAttribute("color",new m.a$l(a,3)),e.setIndex(r),e.computeVertexNormals(),{geometry:e,sailClipWidthPerLevel:o}},[]),I=(0,r.useMemo)(()=>n("environment.wind.angleApparent")||0,[n]),A=(0,r.useMemo)(()=>n("environment.wind.speedApparent")||0,[n]);return(0,r.useEffect)(()=>{if(!l.current)return;P(A,t.hellman);let e=l.current.geometry,o=e.attributes.position.array;i.cunningham!==g.current&&(p.current=new f(3600,390,200,i.cunningham),g.current=i.cunningham),c.current||(c.current=e.clone());let r=1e3*M.waterlineToMastFootHeight,s=I;for(;s<0;)s+=2*Math.PI;for(;s>=2*Math.PI;)s-=2*Math.PI;let n=s>Math.PI?-1:1,d=s;d>Math.PI&&(d=2*Math.PI-d);let x=m.M8C.degToRad(i.angleOfAttack),b=p.current.mastAngleRad;d<.01&&(x=0);let v=Math.min(d-x+b,M.maxMastRotation),w=new m.Pa4(0,1,0),R=null;for(let e=0;e<=_;e++){h(A,(50*e+r)/1e3,t.hellman);let a=d-x;a<0?a=0:a>Math.PI/2&&(a=Math.PI/2);let i=a-v;R&&i-R>M.maxChordRotationPerSailLevel&&(i=R+M.maxChordRotationPerSailLevel),R=i;let s=j[e],l=p.current.getVerticesAngles(y,200,s);for(let t=1;t<y;t++){let a=(e*y+t)*3,r=new m.Pa4(c.current.attributes.position.array[a],c.current.attributes.position.array[a+1],c.current.attributes.position.array[a+2]);r.applyAxisAngle(w,-(i+l[t])*n),o[a]=r.x,o[a+1]=r.y,o[a+2]=r.z}}e.attributes.position.needsUpdate=!0;let T={...a,mastrotation:v*n};l.current&&l.current.rotateY(u.current-T.mastrotation),u.current=T.mastrotation},[A,I,t.hellman,i.cunningham,i.angleOfAttack,a,j]),(0,o.jsxs)("mesh",{ref:l,position:[0,2,-1],rotation:[0,-Math.PI/2,0],children:[(0,o.jsx)("bufferGeometry",{...v}),(0,o.jsx)("group",{ref:d}),(0,o.jsx)("meshBasicMaterial",{vertexColors:!0,transparent:!0,opacity:.7,side:m.ehD})]})};let b=a(40257).env.ASSET_PREFIX||"./",P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return"".concat(b,"/boats/").concat(e,"/assets/scene-transformed.glb")},v={name:"Default",modelPath:"default",capabilities:["navigation","rudder","sail","color"]},j=(0,r.forwardRef)((e,t)=>{let{showSail:a=!1,onUpdateInfoPanel:h,...c}=e,u=(0,r.useRef)(),g=(0,r.useRef)(),{getSignalKValue:p}=(0,s.yC)(),d=n.Z.getAll(),[f,y]=(0,r.useState)(()=>n.Z.getSelectedBoat()||v);(0,r.useEffect)(()=>{y(n.Z.getSelectedBoat()||v)},[d]);let _=(0,r.useMemo)(()=>P(f.modelPath),[f]),M=(null==f?void 0:f.capabilities)||[],{nodes:j,materials:I}=(0,l.L)(_,"".concat(b,"/draco/")),A=(0,r.useMemo)(()=>({primaryColor:d.primaryColor,metallicEffect:d.metallicEffect||!1}),[d.primaryColor,d.metallicEffect]);(0,r.useEffect)(()=>{if("default"===f.modelPath){if(!(null==I?void 0:I.fiberglass))return;I.fiberglass.color.set(A.primaryColor),I.fiberglass.metalness=A.metallicEffect?1:0,I.fiberglass.roughness=A.metallicEffect?.2:1}else u.current&&u.current.traverse(e=>{e.isMesh&&e.material&&(Array.isArray(e.material)?e.material.forEach(e=>{e.color.set(A.primaryColor),e.metalness=A.metallicEffect?1:0,e.roughness=A.metallicEffect?.2:1}):(e.material.color.set(A.primaryColor),e.material.metalness=A.metallicEffect?1:0,e.material.roughness=A.metallicEffect?.2:1))});Object.values(I).forEach(e=>{e.map&&(e.map.minFilter=m.wem,e.map.magFilter=m.wem,e.map.anisotropy=1)})},[I,A,f,u]);let w=(0,r.useMemo)(()=>new m.yGw,[]),R=(0,r.useMemo)(()=>new m.Pa4(1,0,0),[]);(0,i.F)(()=>{if(!u.current)return;let e=p("navigation.attitude.roll")||0,t=p("steering.rudderAngle")||0;u.current.rotation.z!==e&&(u.current.rotation.z=e),g.current&&(w.makeRotationFromEuler(new m.USm(-Math.PI/2,Math.PI/2,0)),g.current.setRotationFromMatrix(w),g.current.rotateOnAxis(R,-m.M8C.degToRad(180*t/Math.PI)))});let T=(0,r.useMemo)(()=>{let e={Default:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("mesh",{geometry:j.baba_metal_0.geometry,material:I.metal,position:[.24,.895,-5.546],rotation:[-Math.PI/2,0,1.968],scale:.027}),(0,o.jsx)("mesh",{geometry:j.camadadirek_fiberglass_0.geometry,material:I.fiberglass,position:[0,5.267,-3.711],rotation:[2.054,0,Math.PI],scale:[-.042,.042,4.707]}),(0,o.jsx)("mesh",{geometry:j.camadanyelkeni_bez_0.geometry,material:I.mcaterial,position:[0,5.267,-3.711],rotation:[2.054,0,Math.PI],scale:[-.042,.042,4.707]}),(0,o.jsx)("mesh",{geometry:j.camadaonbaglay_metal_0.geometry,material:I.metal,position:[0,.891,-5.958],rotation:[-Math.PI/2,0,0],scale:.02}),(0,o.jsx)("mesh",{geometry:j.capa_metal_0.geometry,material:I.metal,position:[0,.671,-6.173],rotation:[-Math.PI/2,0,0],scale:.348}),(0,o.jsx)("mesh",{geometry:j.direk_fiberglass_0.geometry,material:I.fiberglass,position:[0,4.315,-1.056],rotation:[Math.PI/2,0,Math.PI],scale:[-.113,.113,5.203]}),(0,o.jsx)("mesh",{geometry:j.duman_ahsap_0.geometry,material:I.ahsap,position:[-.011,.854,3.487],rotation:[Math.PI,0,Math.PI/2],scale:[.045,.045,.011]}),(0,o.jsx)("mesh",{geometry:j.dumenyuvasi_ahsap_0.geometry,material:I.ahsap,position:[-.011,.299,3.441],rotation:[-Math.PI/2,0,1.571],scale:.094}),(0,o.jsx)("mesh",{geometry:j.dumenyuvasi_cam_0.geometry,material:I.material_5,position:[-.011,.299,3.441],rotation:[-Math.PI/2,0,1.571],scale:.094}),(0,o.jsx)("mesh",{geometry:j.dumenyuvasi_fiberglass_0.geometry,material:I.fiberglass,position:[-.011,.299,3.441],rotation:[-Math.PI/2,0,1.571],scale:.094}),(0,o.jsx)("mesh",{geometry:j.govde_fiberglass2_0.geometry,material:I.fiberglass2,position:[0,.32,-.897],rotation:[0,Math.PI/2,0],scale:[5.11,.454,1.212]}),(0,o.jsx)("mesh",{geometry:j.govde_fiberglass_0.geometry,material:I.fiberglass,position:[0,.32,-.897],rotation:[0,Math.PI/2,0],scale:[5.11,.454,1.212]}),(0,o.jsx)("mesh",{geometry:j.govde_metal_0.geometry,material:I.metal,position:[0,.32,-.897],rotation:[0,Math.PI/2,0],scale:[5.11,.454,1.212]}),(0,o.jsx)("mesh",{geometry:j.halattutucu_fiberglass2_0.geometry,material:I.fiberglass2,position:[-1.044,.939,1.809],rotation:[-Math.PI/2,0,0],scale:[.016,.059,.016]}),(0,o.jsx)("mesh",{geometry:j.ip001_metal_0.geometry,material:I.metal,position:[-.231,7.608,-.621],rotation:[-2.322,.222,-1.556],scale:[.007,.007,.011]}),(0,o.jsx)("mesh",{geometry:j.pervan_fiberglass_0.geometry,material:I.fiberglass,position:[0,-1.005,1.561],rotation:[-Math.PI/2,Math.PI/2,0],scale:[.154,.094,.104]}),(0,o.jsx)("mesh",{geometry:j.pervane_metal_0.geometry,material:I.metal,position:[0,-1.122,1.75],scale:.034}),(0,o.jsx)("mesh",{ref:g,geometry:j.rudder_fiberglass_0.geometry,material:I.fiberglass,position:[0,-1.153,3.486],rotation:[-Math.PI/2,Math.PI/2,0],scale:[.573,.262,.262]}),(0,o.jsx)("mesh",{geometry:j.salma_fiberglass_0.geometry,material:I.fiberglass,position:[0,-1.953,-.739],scale:[.149,.108,.756]}),(0,o.jsx)("mesh",{geometry:j.ustcam_cam_0.geometry,material:I.material_5,position:[-.337,.974,-3.127],rotation:[-Math.PI/2,0,0],scale:[-.183,.133,.025]}),(0,o.jsx)("mesh",{geometry:j.ustcam_fiberglass_0.geometry,material:I.fiberglass,position:[-.337,.974,-3.127],rotation:[-Math.PI/2,0,0],scale:[-.183,.133,.025]}),(0,o.jsx)("mesh",{geometry:j.ustgovde_fiberglass_0.geometry,material:I.fiberglass,position:[0,.832,-2.741],rotation:[-Math.PI/2,0,0],scale:[.566,.7,1.212]}),(0,o.jsx)("mesh",{geometry:j.ustgovdekzak_ahsap_0.geometry,material:I.ahsap,position:[0,.862,-2.741],rotation:[-Math.PI/2,0,0],scale:[.566,.7,1.212]}),(0,o.jsx)("mesh",{geometry:j.vinc_metal_0.geometry,material:I.metal,position:[-1.07,.977,2.02],rotation:[-Math.PI/2,0,0],scale:.065}),(0,o.jsx)("mesh",{geometry:j.yancam002_cam_0.geometry,material:I.material_5,position:[-.984,.591,-3.772],rotation:[Math.PI,-1.241,-Math.PI/2],scale:[.095,.28,.014]}),(0,o.jsx)("mesh",{geometry:j.yancam002_fiberglass_0.geometry,material:I.fiberglass,position:[-.984,.591,-3.772],rotation:[Math.PI,-1.241,-Math.PI/2],scale:[.095,.28,.014]}),(0,o.jsx)("mesh",{geometry:j.yankoruma_metal_0.geometry,material:I.metal,position:[-1.641,.946,2.868],rotation:[-Math.PI/2,0,0],scale:[.01,.01,.159]}),(0,o.jsx)("mesh",{geometry:j.yankoruma_metal_0001.geometry,material:I.metal,position:[-1.641,.946,2.868],rotation:[-Math.PI/2,0,0],scale:[.01,.01,.159]}),(0,o.jsx)("mesh",{geometry:j.yankoruma_metal_0002.geometry,material:I.metal,position:[-1.641,.946,2.868],rotation:[-Math.PI/2,0,0],scale:[.01,.01,.159]}),(0,o.jsx)("mesh",{geometry:j.zincir_metal_0.geometry,material:I.metal,position:[-.001,.88,-6.258],rotation:[-1.56,-.031,-.149],scale:.004}),(0,o.jsx)("mesh",{geometry:j.zincir_metal_0001.geometry,material:I.metal,position:[-.001,.88,-6.258],rotation:[-1.56,-.031,-.149],scale:.004}),(0,o.jsx)("mesh",{geometry:j.zincirdeposu_fiberglass2_0.geometry,material:I.fiberglass2,position:[0,.863,-5.779],rotation:[-Math.PI/2,0,0],scale:[.103,.088,.009]}),(0,o.jsx)("mesh",{geometry:j.zincirmakara_metal_0.geometry,material:I.metal,position:[0,.869,-6.305],rotation:[-2.159,1.564,.59],scale:[.01,.01,.016]}),(0,o.jsx)("mesh",{geometry:j.zincirray_ahsap_0.geometry,material:I.ahsap,position:[0,.864,-6.113],rotation:[-Math.PI/2,0,0],scale:[.017,.181,.003]})]}),Optimist:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("mesh",{geometry:j.body_body_0.geometry,material:I.body,position:[-.054,.272,-.022],rotation:[-1.571,.01,.01],scale:[1,5.242,1]}),(0,o.jsx)("mesh",{geometry:j.boom_aluminium_0.geometry,material:I.aluminium,position:[-.019,2.771,.964],rotation:[0,.01,-.01],scale:[.15,.15,4.609]}),(0,o.jsx)("mesh",{geometry:j.rubber_joint__0.geometry,material:I.rubber_joint__0,position:[-.008,1.407,3.453],rotation:[1.571,-.01,-.01],scale:[-.037,.056,.079]}),(0,o.jsx)("mesh",{geometry:j.sail_sail_0.geometry,material:I.sail,position:[.038,8.739,.698],rotation:[2.356,1.557,2.356],scale:[-5.728,4.361,4.361]})]}),Ship:()=>(0,o.jsx)("mesh",{geometry:j.Object_10.geometry,material:I.material_0,position:[0,-.55,0],rotation:[-1.558,.002,3.139],scale:.004}),Windsurf:()=>(0,o.jsx)("mesh",{geometry:j["body_Material_#30_0"].geometry,material:I.Material_30,position:[-.007,0,-.071],rotation:[-Math.PI/2,0,0],scale:.002}),Sailboat:()=>(0,o.jsx)("mesh",{geometry:j.sailboat.geometry,material:I.texture,position:[0,-1.5,0],rotation:[-Math.PI,.011,-Math.PI],scale:.219})};return e[f.name]||e.Default},[f.name,j,I]),k=(0,r.useMemo)(()=>({name:f.name||"Sailboat",type:"sailboat",trueWindAngle:p("environment.wind.angleTrueWater")||0,trueWindSpeed:p("environment.wind.speedTrue")||0,appWindAngle:p("environment.wind.angleApparent")||0,appWindSpeed:p("environment.wind.speedApparent")||0,beatAngle:p("performance.beatAngle")||0,polarSpeed:p("performance.polarSpeed")||0,polarSpeedRatio:p("performance.polarSpeedRatio")||0,velocityMadeGood:p("performance.velocityMadeGood")||0,speedThroughWater:p("navigation.speedThroughWater")||0,headingTrue:p("navigation.headingTrue")||0,courseOverGroundTrue:p("navigation.courseOverGroundTrue")||0,position:p("navigation.position")||{latitude:0,longitude:0}}),[p,f.name]),S=e=>{let t=[];return e.name&&t.push("Name: ".concat(e.name)),e.trueWindSpeed&&t.push("Wind: ".concat((0,s.Qj)(e.trueWindSpeed),"kn @ ").concat((0,s.Ux)(e.trueWindAngle),"\xb0")),e.appWindSpeed&&t.push("App Wind: ".concat((0,s.Qj)(e.appWindSpeed),"kn @ ").concat((0,s.Ux)(e.appWindAngle),"\xb0")),e.speedThroughWater&&t.push("Speed: ".concat((0,s.Qj)(e.speedThroughWater),"kn")),void 0!==e.headingTrue&&null!==e.headingTrue&&t.push("Heading: ".concat((0,s.Ux)(e.headingTrue),"\xb0")),void 0!==e.courseOverGroundTrue&&null!==e.courseOverGroundTrue&&t.push("COG: ".concat((0,s.Ux)(e.courseOverGroundTrue),"\xb0")),e.velocityMadeGood&&t.push("VMG: ".concat((0,s.Qj)(e.velocityMadeGood),"kn")),e.polarSpeedRatio&&t.push("Polar: ".concat((100*e.polarSpeedRatio).toFixed(0),"%")),e.position&&void 0!==e.position.latitude&&void 0!==e.position.longitude&&t.push("Position: ".concat(e.position.latitude.toFixed(4),"\xb0, ").concat(e.position.longitude.toFixed(4),"\xb0")),t.join("\n")},[W,E]=(0,r.useState)(!1);return(0,o.jsxs)("group",{...c,ref:u,dispose:null,onClick:()=>{let e=!W;E(e),h&&h(e?S(k):null)},children:[M.includes("sail")&&a&&(0,o.jsx)(x,{}),(0,o.jsx)(T,{})]})});l.L.preload(P(),"".concat(b,"/draco/")),j.displayName="SailBoat3D";var I=j}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{87343:function(e,t,n){Promise.resolve().then(n.bind(n,99670))},53082:function(e,t,n){"use strict";n.d(t,{$:function(){return b},FV:function(){return d},G5:function(){return p},HH:function(){return u},HQ:function(){return v},NU:function(){return w},Qj:function(){return f},Ux:function(){return h},YH:function(){return y},eF:function(){return g},gK:function(){return c},yC:function(){return S}});var a=n(57437),i=n(2265),r=n(14578),l=n(63321),o=n(72079);let s=(0,i.createContext)(),c="#09bfff",u="#cc000c",d="#0fcd4f",g="#ef4444",h=e=>null==e?null:Math.round((180*e/Math.PI+360)%360),f=e=>null==e?null:(e*m).toFixed(1),m=1.94384,p=e=>null!=e?Math.round((e-273.15)*10)/10:null,v=e=>null!=e?Math.round(19.4384*e)/10:null,b=v,w=e=>null!=e?Math.round(e/100*10)/10:null,M={autopilot:!0,anchorWatch:!1,parkingMode:!1,mob:!1,showOcean:!1,ais:!1,showPolar:!0},x={wind:{"environment.wind.angleTrueWater":o.M8C.degToRad(0),"environment.wind.speedTrue":10.288,"environment.wind.angleApparent":o.M8C.degToRad(0),"environment.wind.speedApparent":10.288},temperature:{"environment.water.temperature":290.15,"environment.outside.temperature":294.15,"propulsion.main.exhaustTemperature":368.15,"environment.inside.fridge.temperature":277.15},environment:{"environment.outside.pressure":102300,"environment.inside.relativeHumidity":.74,"environment.inside.voc":.03},performance:{"performance.beatAngle":o.M8C.degToRad(45),"performance.gybeAngle":o.M8C.degToRad(135),"performance.beatAngleVelocityMadeGood":6,"performance.gybeAngleVelocityMadeGood":5,"performance.targetAngle":o.M8C.degToRad(45),"performance.polarSpeed":8,"performance.polarSpeedRatio":.95,"performance.velocityMadeGood":5,"performance.polarVelocityMadeGood":6,"performance.polarVelocityMadeGoodRatio":.9},navigation:{"navigation.speedThroughWater":7,"navigation.headingTrue":o.M8C.degToRad(0),"navigation.courseOverGround":o.M8C.degToRad(20),"navigation.courseGreatCircle.nextPoint.bearingTrue":o.M8C.degToRad(30),"navigation.attitude.roll":o.M8C.degToRad(5)},racing:{"navigation.racing.layline":o.M8C.degToRad(10),"navigation.racing.layline.distance":100,"navigation.racing.layline.time":180,"navigation.racing.oppositeLayline":o.M8C.degToRad(45),"navigation.racing.oppositeLayline.distance":80,"navigation.racing.oppositeLayline.time":180,"navigation.racing.startLineStb":{latitude:0,longitude:0,altitude:0},"navigation.racing.startLinePort":{latitude:0,longitude:0,altitude:0},"navigation.racing.distanceStartline":50,"navigation.racing.timeToStart":120,"navigation.racing.timePortDown":60,"navigation.racing.timePortUp":70,"navigation.racing.timeStbdDown":65,"navigation.racing.timeStbdUp":75},electrical:{"electrical.batteries.1.name":"House Battery","electrical.batteries.1.location":"Under Starboard Bed","electrical.batteries.1.capacity.nominal":768,"electrical.batteries.1.capacity.actual":707,"electrical.batteries.1.capacity.remaining":601,"electrical.batteries.1.capacity.dischargeLimit":.2,"electrical.batteries.1.capacity.timeRemaining":9860,"electrical.batteries.1.lifetimeDischarge":54e4,"electrical.batteries.1.lifetimeRecharge":545e3,"electrical.batteries.1.voltage.ripple":.05,"electrical.batteries.1.chemistry":"LiFePO4","electrical.batteries.1.manufacturer.name":"Mastervolt","electrical.batteries.1.manufacturer.model":"LFD75","electrical.batteries.1.manufacturer.URL":"https://www.mastervolt.com","electrical.batteries.1.dateInstalled":"2023-06-15T00:00:00Z","electrical.batteries.1.associatedBus":"House Bus","electrical.batteries.2.name":"Engine Start Battery","electrical.batteries.2.location":"Engine Compartment","electrical.batteries.2.capacity.nominal":600,"electrical.batteries.2.capacity.actual":582,"electrical.batteries.2.chemistry":"AGM","electrical.batteries.2.manufacturer.name":"Optima","electrical.batteries.2.manufacturer.model":"BlueTop","navigation.lights":!1,"steering.autopilot.state":"auto"}},y=e=>{let{children:t}=e,[n,c]=(0,i.useState)({}),[u,d]=(0,i.useState)(!1),[g,h]=(0,i.useState)(M),f=e=>n[e]||null,m=(0,i.useRef)(null),p=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=!0,t=async()=>{let e=new Date,t=e.getFullYear(),n=(e.getMonth()+1).toString().padStart(2,"0"),a="tides/larochelle/".concat(n,"_").concat(t,".json"),i=await fetch(a);if(i.ok){let t=await i.json(),n=e.toISOString().split("T")[0];if(t[n]){let e=null,a=null,i=new Date,r=60*i.getHours()+i.getMinutes();if(t[n].forEach(t=>{let[n,i,l,o]=t,[s,c]=i.split(":").map(Number),u=60*s+c;"tide.high"===n&&(!e||Math.abs(r-u)<Math.abs(r-e.timeInMinutes))?e={height:parseFloat(l),time:i,timeInMinutes:u,coef:o}:"tide.low"===n&&(!a||Math.abs(r-u)<Math.abs(r-a.timeInMinutes))&&(a={height:parseFloat(l),time:i,timeInMinutes:u})}),e&&a){let t="".concat(i.getHours().toString().padStart(2,"0"),":").concat(i.getMinutes().toString().padStart(2,"0")),n=C(e.height,a.height,t,e.time,a.time);c(t=>({...t,"environment.tide.heightNow":n,"environment.tide.heightHigh":e.height,"environment.tide.heightLow":a.height,"environment.tide.timeLow":a.time,"environment.tide.timeHigh":e.time,"environment.tide.coeffNow":e.coef}))}else throw Error("Tide data for today is incomplete.")}}else console.warn("No tide data found")};return(async()=>{let{signalkUrl:t,debugMode:n}=l.Z.getAll(),a=()=>{p.current&&clearInterval(p.current);let e=0;p.current=setInterval(()=>{let t=Math.floor(91*Math.random())-45;e=(e+5)%360,c(e=>({...e,"steering.rudderAngle":o.M8C.degToRad(t),...x.temperature,...x.environment,...x.performance,...x.navigation,...x.racing,...x.electrical}))},1e3)};try{let[i,l]=t.replace(/https?:\/\//,"").split(":"),o=new r.default({hostname:i||"localhost",port:parseInt(l)||3e3,useTLS:t.startsWith("https"),reconnect:!0,autoConnect:!1,notifications:!1,deltaStreamBehaviour:"self",sendMeta:"all",wsKeepaliveInterval:10});m.current=o,await o.connect(),o.on("delta",t=>{e&&t.updates.forEach(e=>{e.values&&e.values.forEach(e=>{c(t=>({...t,[e.path]:e.value}))})})}),n&&a()}catch(e){console.error("Failed to connect to SignalK:",e),a()}})(),t(),()=>{e=!1,m.current&&m.current.disconnect(),p.current&&clearInterval(p.current)}},[]),(0,a.jsx)(s.Provider,{value:{getSignalKValue:f,getBoatRotationAngle:()=>{let e=f("navigation.headingTrue")||f("navigation.headingMagnetic");return f("navigation.courseOverGroundTrue")||f("navigation.courseOverGroundMagnetic")||e||0},convertLatLonToXY:(e,t)=>{if(!(null==e?void 0:e.lat)||!(null==e?void 0:e.lon)||!(null==t?void 0:t.lat)||!(null==t?void 0:t.lon))return console.warn("Invalid input to convertLatLonToXY",e,t),{x:0,y:0};let n=t.lat*Math.PI/180,a=t.lon*Math.PI/180,i=e.lat*Math.PI/180,r=e.lon*Math.PI/180-a,l=i-n,o=Math.atan2(Math.sin(r)*Math.cos(i),Math.cos(n)*Math.sin(i)-Math.sin(n)*Math.cos(i)*Math.cos(r)),s=Math.sin(l/2)*Math.sin(l/2)+Math.cos(n)*Math.cos(i)*Math.sin(r/2)*Math.sin(r/2),c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))*6371e3;return{x:c*Math.sin(o),y:c*Math.cos(o)}},nightMode:u,setNightMode:d,states:g,toggleState:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;h(n=>({...n,[e]:void 0!==t?t:!n[e]}))}},children:t})},S=()=>(0,i.useContext)(s),C=function(e,t,n,a,i){let r,l,o,s;if(!n||!a||!i||!/^\d{1,2}:\d{2}$/.test(n)||!/^\d{1,2}:\d{2}$/.test(a)||!/^\d{1,2}:\d{2}$/.test(i))return console.error("Invalid time format provided to calculateTideHeightUsingTwelfths"),(e+t)/2;let c=e=>{let[t,n]=e.split(":").map(Number);return 60*t+n},u=c(a),d=c(i),g=c(n),h=!1;d<=g&&g<=u?(h=!0,r=t,l=e,o=d,s=u):(r=e,l=t,o=u,s=d+(d<u?1440:0));let f=Math.abs(s-o),m=Math.abs(l-r),p=g-o;p<0&&(p+=1440);let v=m/12,b=0;return b=p<=f/6?v*Math.ceil(p/(f/12)):p<=2*f/6?2*v+v*Math.ceil((p-f/6)/(f/12)):p<=3*f/6?5*v:p<=4*f/6?8*v:p<=5*f/6?10*v:m,h?r+b:r-b}},63321:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var a=JSON.parse('{"F":[{"name":"Default","modelPath":"default","capabilities":["navigation","rudder","sail","color"]},{"name":"Optimist","modelPath":"optimist","capabilities":["navigation","ais"]},{"name":"Sailboat","modelPath":"sailboat","capabilities":["navigation","ais"]},{"name":"Ship","modelPath":"ship","capabilities":["navigation","ais"]},{"name":"Windsurf","modelPath":"windsurf","capabilities":["navigation","ais"]}]}');class i{isLocalStorageAvailable(){try{return"undefined"!=typeof localStorage}catch(e){return!1}}loadConfig(){if(this.isLocalStorageAvailable()){let e=localStorage.getItem(this.configKey);if(!e)return this.saveConfig(this.defaultConfig),{...this.defaultConfig};try{return JSON.parse(e)}catch(e){return console.error("Failed to parse stored configuration:",e),{...this.defaultConfig}}}return{...this.inMemoryConfig}}saveConfig(e){this.config={...this.config,...e},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.config}}get(e){return this.config[e]}set(e,t){this.config[e]=t,this.saveConfig(this.config)}resetConfig(){this.config={...this.defaultConfig},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.defaultConfig}}getAll(){return{...this.config}}getDefaultConfig(){return{...this.defaultConfig}}getSelectedBoat(){let e=this.config.selectedBoat;return e?this.getBoatsData().find(t=>t.name===e):[]}getBoatsData(){return a.F}getComputedSignalKUrl(){return this.config.debugMode?"https://demo.signalk.org:443":"".concat(window.location.protocol,"//").concat(window.location.hostname).concat(window.location.port?":"+window.location.port:"")}constructor(){this.defaultConfig={signalkUrl:"http://localhost:3000",username:"",password:"",debugMode:!1,selectedBoat:"Default",primaryColor:null,metallicEffect:!1,aisLengthScalingFactor:.7,compassNorthUp:!1,showCustomUrls:!1,customExternalUrls:{}},this.configKey="ocearoConfig",this.inMemoryConfig={...this.defaultConfig},this.config=this.loadConfig()}}var r=new i},99670:function(e,t,n){"use strict";n.r(t),n.d(t,{VIEW_MODES:function(){return f},default:function(){return p}});var a=n(57437),i=n(2265),r=n(30166),l=n(20376),o=n.n(l),s=n(53082);class c extends i.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({error:e,errorInfo:t}),console.error("Error caught in Error Boundary:",e,t)}render(){if(this.state.hasError){let{error:e,errorInfo:t}=this.state;return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gray-100 text-gray-900",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-red-600 mb-4",children:"Something went wrong."}),(0,a.jsxs)("p",{className:"text-lg mb-2",children:[(0,a.jsx)("strong",{children:"Error:"})," ",e?e.toString():"Unknown error"]}),t&&(0,a.jsxs)("details",{className:"whitespace-pre-wrap bg-gray-200 p-4 rounded-lg mb-4",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-blue-500 underline",children:"Stack Trace"}),(0,a.jsx)("pre",{className:"mt-2",children:t.componentStack})]}),(0,a.jsxs)("div",{className:"flex space-x-4",children:[(0,a.jsx)("button",{onClick:this.handleRefresh,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Refresh Page"}),(0,a.jsx)("button",{onClick:this.handleExitFullscreen,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Exit Fullscreen"})]})]})}return this.props.children}constructor(e){super(e),this.handleRefresh=()=>{window.location.reload()},this.handleExitFullscreen=()=>{document.fullscreenElement&&(window.close(),document.exitFullscreen().catch(e=>{console.error("Failed to exit fullscreen:",e)}))},this.state={hasError:!1,error:null,errorInfo:null}}}let u=(0,r.default)(()=>n.e(252).then(n.bind(n,7252)),{loadableGenerated:{webpack:()=>[7252]},loading:()=>(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:"Loading..."})}),d=(0,r.default)(()=>Promise.all([n.e(676),n.e(268),n.e(12)]).then(n.bind(n,12012)),{loadableGenerated:{webpack:()=>[12012]}}),g=(0,r.default)(()=>Promise.all([n.e(676),n.e(268),n.e(936)]).then(n.bind(n,72936)),{loadableGenerated:{webpack:()=>[72936]}}),h=(0,r.default)(()=>Promise.all([n.e(676),n.e(689),n.e(268),n.e(496),n.e(412)]).then(n.bind(n,6412)),{loadableGenerated:{webpack:()=>[6412]},loading:()=>(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,a.jsx)("div",{className:"text-white text-2xl",children:"Loading 3D View..."})}),ssr:!1}),f={BOAT:"boat",APP:"app",SPLIT:"split"},m=()=>window.innerWidth>=1366;function p(){let e=(0,i.useRef)(!1),[t,n]=(0,i.useState)(null),[r,l]=(0,i.useState)("navigation"),[p,v]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t;n(m()?f.SPLIT:f.BOAT),e.current=!0;let a=()=>{clearTimeout(t),t=setTimeout(()=>{n(m()?f.SPLIT:f.BOAT)},250)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a),clearTimeout(t)}},[]);let M=(0,i.useCallback)(()=>{v(e=>!e)},[]),x=(0,i.useCallback)(e=>{n(e)},[]),y=(0,i.useCallback)((e,t)=>{let n=window.innerWidth/5;t.x>n?x(f.BOAT):t.x<-n?x(f.APP):x(f.SPLIT)},[x]),S=(0,i.useCallback)(()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen().catch(e=>{console.error("Fullscreen error:",e.message)})},[]),C=(0,i.useCallback)(e=>{t===f.BOAT&&x(f.APP),l(e)},[t,x]),T=(0,i.useCallback)(()=>{b?(x(f.BOAT),w(!1)):(C("settings"),w(!0))},[b,x,C]),P=(0,i.useMemo)(()=>null===t?{}:{leftPane:"transition-all duration-300 ".concat(t===f.BOAT?"w-full":t===f.APP?"hidden":"w-2/5"," bg-leftPaneBg h-full relative"),rightPane:"transition-all duration-300 ".concat(t===f.APP?"w-full":t===f.BOAT?"hidden":"w-3/5"," h-full bg-rightPaneBg p-4")},[t]);return e.current?(0,a.jsx)(c,{children:(0,a.jsx)(s.YH,{children:(0,a.jsxs)("div",{className:"h-screen flex flex-col bg-black relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,a.jsx)("div",{className:P.leftPane,children:(0,a.jsx)(h,{})}),(0,a.jsx)(o(),{axis:"x",onDrag:y,position:{x:0,y:0},handle:".handle",bounds:"parent",children:(0,a.jsx)("div",{className:"handle w-1 bg-leftPaneBg h-full cursor-col-resize transition-all duration-200 flex items-center justify-center",children:(0,a.jsx)("div",{className:"rounded-full w-3 bg-gray-600 h-40 transition-all duration-200 hover:bg-gray-500"})})}),(0,a.jsx)("div",{className:P.rightPane,children:(0,a.jsx)(u,{view:r})})]}),(0,a.jsx)("div",{className:"w-full h-16 min-h-16 bg-black flex items-center justify-center shrink-0",children:(0,a.jsx)(d,{setRightView:C,toggleAppMenu:M,toggleSettings:T})}),p&&(0,a.jsx)(g,{currentViewMode:t,toggleViewMode:x,handleSetRightView:C,toggleFullscreen:S,setShowAppMenu:v})]})})}):(0,a.jsx)("div",{className:"h-screen bg-black flex items-center justify-center",children:(0,a.jsx)("div",{className:"animate-pulse text-white",children:"Loading..."})})}}},function(e){e.O(0,[870,746,971,117,744],function(){return e(e.s=87343)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- !function(){"use strict";var e,t,n,r,o,c,f,u,a,i={},d={};function l(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,l),r=!1}finally{r&&delete d[e]}return n.exports}l.m=i,e=[],l.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var f=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],u=!0,a=0;a<n.length;a++)f>=o&&Object.keys(l.O).every(function(e){return l.O[e](n[a])})?n.splice(a--,1):(u=!1,o<f&&(f=o));if(u){e.splice(c--,1);var i=r();void 0!==i&&(t=i)}}return t},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},l.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);l.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},l.d(o,c),o},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=function(e){return Promise.all(Object.keys(l.f).reduce(function(t,n){return l.f[n](e,t),t},[]))},l.u=function(e){return"static/chunks/"+(({676:"870fdd6f",689:"b536a0f1",918:"0f8af13e"})[e]||e)+"."+({12:"a4273af9b82657f2",59:"c2dfec0c5e965cb5",73:"8c14d2ab55f3d850",79:"c90ea1de476d64c2",138:"b9389f70773e44e6",145:"9caac3d586b84999",154:"4e0902ce8b0f7ad1",188:"1839b14fedef7718",197:"bcdd8d0debcb7089",221:"a545399d0aaf207f",226:"8e9a3229837caa21",250:"b26c37701919cf5c",252:"d7cc856ebccc7381",268:"8ed821c518bf7977",274:"f21dd1bea1190823",353:"c2bc481b7d81054f",412:"89dae08d020f4499",413:"69878f8910eb07d8",496:"c440e137e5877fb7",610:"44fac6b8e6928564",676:"5b9af4fe6d08a9fb",677:"f1d160b98bf7d630",687:"798c6b33d9165736",689:"0563944ec53282b3",728:"3987afab39b00f4e",751:"a180d553d77914d3",909:"5efafce6b421c83d",918:"6652bd734d04208b",936:"e779b5632883831e",949:"e273523eaad35cc5",967:"83ea5cd9e6c9bb4c",975:"8821fdf115b619c5"})[e]+".js"},l.miniCssF=function(e){},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",l.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var f,u,a=document.getElementsByTagName("script"),i=0;i<a.length;i++){var d=a[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){f=d;break}}f||(u=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,l.nc&&f.setAttribute("nonce",l.nc),f.setAttribute("data-webpack",o+n),f.src=l.tu(e)),r[e]=[t];var b=function(t,n){f.onerror=f.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=b.bind(null,f.onerror),f.onload=b.bind(null,f.onload),u&&document.head.appendChild(f)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},l.tu=function(e){return l.tt().createScriptURL(e)},l.p="/ocearo-ui/_next/",f={272:0,476:0},l.f.j=function(e,t){var n=l.o(f,e)?f[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(272|476)$/.test(e))f[e]=0;else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=l.p+l.u(e),c=Error();l.l(o,function(t){if(l.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}},"chunk-"+e,e)}}},l.O.j=function(e){return 0===f[e]},u=function(e,t){var n,r,o=t[0],c=t[1],u=t[2],a=0;if(o.some(function(e){return 0!==f[e]})){for(n in c)l.o(c,n)&&(l.m[n]=c[n]);if(u)var i=u(l)}for(e&&e(t);a<o.length;a++)r=o[a],l.o(f,r)&&f[r]&&f[r][0](),f[r]=0;return l.O(i)},(a=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(u.bind(null,0)),a.push=u.bind(null,a.push.bind(a))}();