ocearo-ui 0.1.4 → 0.1.6
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 +1 -1
- package/_next/static/chunks/12.1cb1cb79af19b45c.js +1 -0
- package/_next/static/chunks/138.29fae0d30cbcb865.js +1 -0
- package/_next/static/chunks/145.227304ec9499ce36.js +1 -0
- package/_next/static/chunks/188.479f10852eda524e.js +1 -0
- package/_next/static/chunks/197.132b62dcc182f536.js +1 -0
- package/_next/static/chunks/199.421b63f3aaefc184.js +1 -0
- package/_next/static/chunks/226.7eef725b0fecdaa6.js +151 -0
- package/_next/static/chunks/252.5cd252da0bf0d804.js +1 -0
- package/_next/static/chunks/254.ee9f315db5848794.js +505 -0
- package/_next/static/chunks/268.1fa9ea171c5d8c55.js +1 -0
- package/_next/static/chunks/353.64fb99ba6a6c1163.js +1 -0
- package/_next/static/chunks/412.0ccf21408ebcc7bf.js +1 -0
- package/_next/static/chunks/496.c422606f44c5ff90.js +1 -0
- package/_next/static/chunks/59.47b617df6daa6a8a.js +1 -0
- package/_next/static/chunks/610.2ae9cfb38673bc98.js +1 -0
- package/_next/static/chunks/687.018d8d41c5427710.js +26 -0
- package/_next/static/chunks/728.a5f9c5c5635aab4e.js +1 -0
- package/_next/static/chunks/73.bd15026ac739c79e.js +1 -0
- package/_next/static/chunks/746-5701803ffb58d9ef.js +1 -0
- package/_next/static/chunks/751.a5a27eb6ba09442d.js +1 -0
- package/_next/static/chunks/79.646c5d2a7f1f2df9.js +1 -0
- package/_next/static/chunks/870fdd6f.bae282addcad29d9.js +1 -0
- package/_next/static/chunks/890.b840b9c2709d5ac5.js +1 -0
- package/_next/static/chunks/909.22022bef0ade2b3a.js +1 -0
- package/_next/static/chunks/936.332956628f439341.js +1 -0
- package/_next/static/chunks/app/page-da06733af0871855.js +1 -0
- package/_next/static/chunks/{main-3fc5e29932a06222.js → main-a509d18d035f234f.js} +1 -1
- package/_next/static/chunks/webpack-312c9b9c20b5091b.js +1 -0
- package/_next/static/css/abdd1ffc5585a364.css +3 -0
- package/icons/mediaplayer/amazon.png +0 -0
- package/icons/mediaplayer/deezer.png +0 -0
- package/icons/mediaplayer/disneyplus.png +0 -0
- package/icons/mediaplayer/netflix.png +0 -0
- package/icons/mediaplayer/youtube.png +0 -0
- package/index.html +1 -1
- package/index.txt +2 -2
- package/{ocearo-ui-0.1.4.tgz → ocearo-ui-0.1.6.tgz} +0 -0
- package/package.json +1 -1
- package/_next/static/chunks/870fdd6f-53e4c81d83a336e0.js +0 -1
- package/_next/static/chunks/875-34a16d45b233a109.js +0 -680
- package/_next/static/chunks/app/page-79c9775d94e17ad1.js +0 -1
- package/_next/static/chunks/webpack-6ba3ee57ba412e0f.js +0 -1
- package/_next/static/css/c20c87eb42004889.css +0 -3
- /package/_next/static/chunks/{0f8af13e-59794c1587e7a41d.js → 0f8af13e.19323e6ac5e18a8c.js} +0 -0
- /package/_next/static/chunks/{b536a0f1-7c94f39427c6b177.js → b536a0f1.31846b3e993f8d95.js} +0 -0
- /package/_next/static/{zPPHCJv8uKI8NHlaiuVWV → q6cCRWRSJkrokJfjy41Tl}/_buildManifest.js +0 -0
- /package/_next/static/{zPPHCJv8uKI8NHlaiuVWV → q6cCRWRSJkrokJfjy41Tl}/_ssgManifest.js +0 -0
package/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/ocearo-ui/_next/static/media/4473ecc91f70f139-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/ocearo-ui/_next/static/media/463dafcda517f24f-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/ocearo-ui/_next/static/media/4473ecc91f70f139-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/ocearo-ui/_next/static/media/463dafcda517f24f-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/abdd1ffc5585a364.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-312c9b9c20b5091b.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-5fd12b742601fe8c.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-ddf36b6a7b427a7b.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-40bc40db4e2d9561.js" async=""></script><meta name="robots" content="noindex"/><link rel="manifest" href="./manifest.json"/><meta name="theme-color" content="#4bbcd8"/><link rel="icon" type="image/png" href="./favicon-96x96.png" sizes="96x96"/><link rel="icon" type="image/svg+xml" href="./favicon.svg"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><title>404: This page could not be found.</title><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_873ced __variable_6df010 antialiased"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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-312c9b9c20b5091b.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:HL[\"/ocearo-ui/_next/static/media/4473ecc91f70f139-s.p.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n2:HL[\"/ocearo-ui/_next/static/media/463dafcda517f24f-s.p.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n3:HL[\"/ocearo-ui/_next/static/css/abdd1ffc5585a364.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[2846,[],\"\"]\n6:I[4707,[],\"\"]\n7:I[6423,[],\"\"]\nd:I[1060,[],\"\"]\n8:{\"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\"}\n9:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\na:{\"display\":\"inline-block\"}\nb:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L4\",null,{\"buildId\":\"q6cCRWRSJkrokJfjy41Tl\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"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,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/abdd1ffc5585a364.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"manifest\",\"href\":\"./manifest.json\"}],[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"content\":\"#4bbcd8\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"type\":\"image/png\",\"href\":\"./favicon-96x96.png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"type\":\"image/svg+xml\",\"href\":\"./favicon.svg\"}],[\"$\",\"link\",null,{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",null,{\"rel\":\"apple-touch-icon\",\"sizes\":\"180x180\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",null,{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}]]}],[\"$\",\"body\",null,{\"className\":\"__variable_873ced __variable_6df010 antialiased\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$8\",\"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\":\"$9\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$b\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12],{2012:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var r=n(7437),l=n(2265),a=n(1268),i=n(5217),s=n(3082);let c={waterTemp:{key:"waterTemp",path:"environment.water.temperature",icon:i.L02,label:"Water Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5},airTemp:{key:"airTemp",path:"environment.outside.temperature",icon:i.whq,label:"Air Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5},exhaustTemp:{key:"exhaustTemp",path:"propulsion.main.exhaustTemperature",icon:i.Rpv,label:"Exhaust Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5},fridgeTemp:{key:"fridgeTemp",path:"environment.inside.fridge.temperature",icon:i.jOV,label:"Fridge Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5}},o=e=>{let{mode:t,value:n,icon:l,nightMode:i}=e;return n||0===n?(0,r.jsxs)("div",{className:"flex items-center text-2xl ".concat(i?"text-red-500":"text-white"),children:[(0,r.jsx)(a.G,{icon:l,className:"mr-2"}),(0,r.jsx)("span",{children:c[t].format(n)})]}):null};var u=()=>{let{nightMode:e,getSignalKValue:t}=(0,s.yC)(),[n,a]=(0,l.useState)([]),[i,u]=(0,l.useState)(null),m=(0,l.useMemo)(()=>Object.entries(c).reduce((e,n)=>{let[r,l]=n,a=t(l.path);return e[r]=null!==a?l.transform(a):null,e},{}),[t]);(0,l.useEffect)(()=>{let e=Object.entries(m).filter(e=>{let[t,n]=e;return null!==n}).map(e=>{let[t]=e;return t});a(e),e.length>0&&!e.includes(i)&&u(e[0])},[m,i]);let x=()=>{if(n.length<=1)return;let e=(n.indexOf(i)+1)%n.length;u(n[e])};return 0===n.length?(0,r.jsx)("div",{className:"text-2xl ".concat(e?"text-red-500":"text-white"),children:(0,r.jsx)("span",{children:"NA"})}):(0,r.jsx)("div",{className:"cursor-pointer flex items-center space-x-2",onClick:x,title:"Toggle Temperature Display (".concat(n.length," sensors available)"),role:"button",tabIndex:0,onKeyPress:e=>"Enter"===e.key&&x(),"aria-label":i?c[i].label:"No temperature data available",children:i&&(0,r.jsx)(o,{mode:i,value:m[i],icon:c[i].icon,nightMode:e})})};let m={pressure:{key:"pressure",path:"environment.outside.pressure",icon:i.uM9,format:e=>"".concat(e," hPa"),transform:s.NU},humidity:{key:"humidity",path:"environment.inside.relativeHumidity",icon:i.Zkk,format:e=>"".concat(e.toFixed(1),"%"),transform:e=>100*e},voc:{key:"voc",path:"environment.inside.voc",icon:i.DSs,format:e=>"".concat(e," ppm"),transform:e=>e}},x=e=>{let{mode:t,value:n,icon:l,nightMode:i}=e;return n||0===n?(0,r.jsxs)("div",{className:"flex items-center text-2xl ".concat(i?"text-red-500":"text-white"),children:[(0,r.jsx)(a.G,{icon:l,className:"mr-2"}),(0,r.jsx)("span",{children:m[t].format(n)})]}):null};var d=()=>{let{nightMode:e,getSignalKValue:t}=(0,s.yC)(),[n,a]=(0,l.useState)([]),[i,c]=(0,l.useState)(null),o=(0,l.useMemo)(()=>Object.entries(m).reduce((e,n)=>{let[r,l]=n,a=t(l.path);return e[r]=null!==a?l.transform(a):null,e},{}),[t]);(0,l.useEffect)(()=>{let e=Object.entries(o).filter(e=>{let[t,n]=e;return null!==n}).map(e=>{let[t]=e;return t});a(e),e.length>0&&!e.includes(i)&&c(e[0])},[o,i]);let u=()=>{if(n.length<=1)return;let e=(n.indexOf(i)+1)%n.length;c(n[e])};return 0===n.length?(0,r.jsx)("div",{className:"text-2xl ".concat(e?"text-red-500":"text-white"),children:(0,r.jsx)("span",{children:"NA"})}):(0,r.jsx)("div",{className:"cursor-pointer flex items-center space-x-2",onClick:u,title:"Toggle Environmental Display (".concat(n.length," modes available)"),role:"button",tabIndex:0,onKeyPress:e=>"Enter"===e.key&&u(),children:i&&(0,r.jsx)(x,{mode:i,value:o[i],icon:m[i].icon,nightMode:e})})};let h=e=>{let{icon:t,onClick:n,label:l,textColor:i}=e;return(0,r.jsx)("button",{onClick:n,className:"".concat(i," text-2xl flex items-center justify-center hover:text-gray-300 transition-colors duration-200"),"aria-label":l,children:(0,r.jsx)(a.G,{icon:t})})};var p=e=>{let{setRightView:t,toggleSettings:n,toggleAppMenu:l}=e,{nightMode:a}=(0,s.yC)(),c=a?"text-oNight":"text-white",o=[{section:"left",items:[{icon:i.lnS,onClick:()=>n(),label:"Settings"}]},{section:"center",items:[{icon:i.tLL,onClick:()=>t("navigation"),label:"Navigation"},{icon:i.S9Y,onClick:()=>t("weather"),label:"Weather"},{icon:i.szN,onClick:l,label:"App Menu"},{icon:i.iGi,onClick:()=>t("manual"),label:"Manual"},{icon:i.HLz,onClick:()=>t("instrument"),label:"Instrument"}]}],m=e=>{let t=o.find(t=>t.section===e);return t?t.items.map((t,n)=>(0,r.jsx)(h,{icon:t.icon,onClick:t.onClick,label:t.label,textColor:c},"".concat(e,"-").concat(n))):null};return(0,r.jsxs)("div",{className:"flex items-center justify-between w-full h-full bg-black px-4",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-10",children:[m("left"),(0,r.jsx)(u,{})]}),(0,r.jsx)("div",{className:"flex items-center justify-center space-x-10",children:m("center")}),(0,r.jsx)("div",{className:"flex items-center space-x-10",children:(0,r.jsx)(d,{})})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[138],{9138:function(e,t,l){l.r(t);var n=l(7437),s=l(2265),a=l(3082),i=l(3145),c=l(1268),r=l(5217);t.default=()=>{let{nightMode:e}=(0,a.yC)(),[t,l]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),m=e=>{l(e),d(!1)},x=e=>{window.open(e,"_blank","noopener,noreferrer")};return(0,n.jsx)("div",{className:"bg-rightPaneBg flex flex-col h-full p-6",children:t?(0,n.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4 pb-2 border-b border-gray-700",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:t.name}),(0,n.jsx)("button",{onClick:()=>{l(null),d(!1)},className:"p-2 rounded-full hover:bg-gray-700","aria-label":"Close",children:(0,n.jsx)(c.G,{icon:r.NBC,size:"lg",className:"".concat(e?"text-oNight":"text-white")})})]}),(0,n.jsx)("div",{className:"flex-1 rounded-lg overflow-hidden",children:t.external?(0,n.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-oGray2 rounded-lg p-6 shadow-lg",children:[(0,n.jsx)("div",{className:"w-32 h-32 mb-4 relative",children:(0,n.jsx)(i.default,{src:t.icon,alt:t.name,className:"w-full h-full object-contain",width:128,height:128})}),(0,n.jsx)("p",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:t.name}),(0,n.jsx)("p",{className:"text-sm ".concat(e?"text-oNight":"text-white"," opacity-80 mb-4 text-center"),children:"This service will open in a new browser window"}),(0,n.jsxs)("button",{onClick:()=>x(t.url),className:"px-4 py-2 rounded-md flex items-center ".concat(e?"bg-oNight hover:bg-oRed":"bg-oBlue hover:bg-blue-600"," text-white transition-colors"),children:[(0,n.jsxs)("span",{children:["Open ",t.name]}),(0,n.jsx)(c.G,{icon:r.Xjp,className:"ml-2 text-sm"})]})]}):o?(0,n.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-oGray2 rounded-lg p-6",children:[(0,n.jsxs)("p",{className:"mb-3 ".concat(e?"text-oNight":"text-white"),children:["Unable to embed ",t.name]}),(0,n.jsxs)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"underline flex items-center ".concat(e?"text-oNight hover:text-oRed":"text-white hover:text-blue-300"),children:[(0,n.jsx)("span",{children:"Open in new tab"}),(0,n.jsx)(c.G,{icon:r.Xjp,className:"ml-1 text-sm"})]})]}):(0,n.jsx)("iframe",{src:t.url,title:t.name,className:"w-full h-full rounded-lg border-0",allow:"autoplay; encrypted-media",allowFullScreen:!0,loading:"lazy",onError:()=>{d(!0)}})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"," mb-4"),children:"Media Services"}),(0,n.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-6",children:[{name:"Netflix",url:"https://www.netflix.com",icon:"/icons/mediaplayer/netflix.png",external:!0},{name:"YouTube",url:"https://www.youtube.com",icon:"/icons/mediaplayer/youtube.png",external:!0},{name:"Disney+",url:"https://www.disneyplus.com",icon:"/icons/mediaplayer/disneyplus.png",external:!0},{name:"Prime Video",url:"https://www.primevideo.com",icon:"/icons/mediaplayer/amazon.png",external:!0},{name:"Deezer",url:"https://widget.deezer.com/widget/dark/playlist/1479458365",icon:"/icons/mediaplayer/deezer.png"}].map(t=>(0,n.jsxs)("button",{onClick:()=>m(t),className:"bg-oGray2 p-4 rounded-lg flex flex-col items-center justify-center transition-colors hover:bg-gray-700 shadow-lg",children:[(0,n.jsx)("div",{className:"w-24 h-24 mb-3",children:(0,n.jsx)(i.default,{src:t.icon,alt:t.name,className:"w-full h-full object-contain",width:96,height:96})}),(0,n.jsx)("span",{className:"text-sm font-medium ".concat(e?"text-oNight":"text-white"),children:t.name}),t.external&&(0,n.jsx)(c.G,{icon:r.Xjp,className:"text-sm mt-1 ".concat(e?"text-oNight":"text-white"," opacity-80")})]},t.name))})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[145],{3145:function(e,t,n){n.d(t,{default:function(){return i.a}});var r=n(8461),i=n.n(r)},5878:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return b}});let r=n(7043),i=n(3099),o=n(7437),l=i._(n(2265)),a=r._(n(4887)),u=r._(n(8293)),s=n(5346),d=n(128),f=n(2589);n(1765);let c=n(5523),p=r._(n(5084)),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function m(e,t,n,r,i,o,l){let a=null==e?void 0:e.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function h(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y=(0,l.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:a,width:u,decoding:s,className:d,style:f,fetchPriority:c,placeholder:p,loading:g,unoptimized:y,fill:v,onLoadRef:b,onLoadingCompleteRef:_,setBlurComplete:w,setShowAltText:j,sizesInput:S,onLoad:x,onError:C,...P}=e;return(0,o.jsx)("img",{...P,...h(c),loading:g,width:u,height:a,decoding:s,"data-nimg":v?"fill":"1",className:d,style:f,sizes:i,srcSet:r,src:n,ref:(0,l.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(C&&(e.src=e.src),e.complete&&m(e,p,b,_,w,y,S))},[n,p,b,_,w,C,y,S,t]),onLoad:e=>{m(e.currentTarget,p,b,_,w,y,S)},onError:e=>{j(!0),"empty"!==p&&w(!0),C&&C(e)}})});function v(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...h(n.fetchPriority)};return t&&a.default.preload?(a.default.preload(n.src,r),null):(0,o.jsx)(u.default,{children:(0,o.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let b=(0,l.forwardRef)((e,t)=>{let n=(0,l.useContext)(c.RouterContext),r=(0,l.useContext)(f.ImageConfigContext),i=(0,l.useMemo)(()=>{var e;let t=g||r||d.imageConfigDefault,n=[...t.deviceSizes,...t.imageSizes].sort((e,t)=>e-t),i=t.deviceSizes.sort((e,t)=>e-t),o=null==(e=t.qualities)?void 0:e.sort((e,t)=>e-t);return{...t,allSizes:n,deviceSizes:i,qualities:o}},[r]),{onLoad:a,onLoadingComplete:u}=e,m=(0,l.useRef)(a);(0,l.useEffect)(()=>{m.current=a},[a]);let h=(0,l.useRef)(u);(0,l.useEffect)(()=>{h.current=u},[u]);let[b,_]=(0,l.useState)(!1),[w,j]=(0,l.useState)(!1),{props:S,meta:x}=(0,s.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:b,showAltText:w});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y,{...S,unoptimized:x.unoptimized,placeholder:x.placeholder,fill:x.fill,onLoadRef:m,onLoadingCompleteRef:h,setBlurComplete:_,setShowAltText:j,sizesInput:e.sizes,ref:t}),x.priority?(0,o.jsx)(v,{isAppRouter:!n,imgAttributes:S}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1436:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(7043)._(n(2265)).default.createContext({})},3964:function(e,t){function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},5346:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return a}}),n(1765);let r=n(2550),i=n(128);function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function a(e,t){var n,a;let u,s,d,{src:f,sizes:c,unoptimized:p=!1,priority:g=!1,loading:m,className:h,quality:y,width:v,height:b,fill:_=!1,style:w,overrideSrc:j,onLoad:S,onLoadingComplete:x,placeholder:C="empty",blurDataURL:P,fetchPriority:O,decoding:M="async",layout:z,objectFit:E,objectPosition:I,lazyBoundary:k,lazyRoot:A,...R}=e,{imgConf:D,showAltText:L,blurComplete:N,defaultLoader:U}=t,T=D||i.imageConfigDefault;if("allSizes"in T)u=T;else{let e=[...T.deviceSizes,...T.imageSizes].sort((e,t)=>e-t),t=T.deviceSizes.sort((e,t)=>e-t),r=null==(n=T.qualities)?void 0:n.sort((e,t)=>e-t);u={...T,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===U)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let F=R.loader||U;delete R.loader,delete R.srcSet;let G="__next_img_default"in F;if(G){if("custom"===u.loader)throw Error('Image with src "'+f+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=F;F=t=>{let{config:n,...r}=t;return e(r)}}if(z){"fill"===z&&(_=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[z];e&&(w={...w,...e});let t={responsive:"100vw",fill:"100vw"}[z];t&&!c&&(c=t)}let B="",q=l(v),W=l(b);if("object"==typeof(a=f)&&(o(a)||void 0!==a.src)){let e=o(f)?f.default:f;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(s=e.blurWidth,d=e.blurHeight,P=P||e.blurDataURL,B=e.src,!_){if(q||W){if(q&&!W){let t=q/e.width;W=Math.round(e.height*t)}else if(!q&&W){let t=W/e.height;q=Math.round(e.width*t)}}else q=e.width,W=e.height}}let V=!g&&("lazy"===m||void 0===m);(!(f="string"==typeof f?f:B)||f.startsWith("data:")||f.startsWith("blob:"))&&(p=!0,V=!1),u.unoptimized&&(p=!0),G&&f.endsWith(".svg")&&!u.dangerouslyAllowSVG&&(p=!0),g&&(O="high");let H=l(y),$=Object.assign(_?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:E,objectPosition:I}:{},L?{}:{color:"transparent"},w),J=N||"empty"===C?null:"blur"===C?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:q,heightInt:W,blurWidth:s,blurHeight:d,blurDataURL:P||"",objectFit:$.objectFit})+'")':'url("'+C+'")',Y=J?{backgroundSize:$.objectFit||"cover",backgroundPosition:$.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:J}:{},X=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:o,sizes:l,loader:a}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:u,kind:s}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,l),d=u.length-1;return{sizes:l||"w"!==s?l:"100vw",srcSet:u.map((e,r)=>a({config:t,src:n,quality:o,width:e})+" "+("w"===s?e:r+1)+s).join(", "),src:a({config:t,src:n,quality:o,width:u[d]})}}({config:u,src:f,unoptimized:p,width:q,quality:H,sizes:c,loader:F});return{props:{...R,loading:V?"lazy":m,fetchPriority:O,width:q,height:W,decoding:M,className:h,style:{...$,...Y},sizes:X.sizes,srcSet:X.srcSet,src:j||X.src},meta:{unoptimized:p,priority:g,placeholder:C,fill:_}}}},8293:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return m},defaultHead:function(){return f}});let r=n(7043),i=n(3099),o=n(7437),l=i._(n(2265)),a=r._(n(7421)),u=n(1436),s=n(8701),d=n(3964);function f(e){void 0===e&&(e=!1);let t=[(0,o.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,o.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function c(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(1765);let p=["name","httpEquiv","charSet","itemProp"];function g(e,t){let{inAmpMode:n}=t;return e.reduce(c,[]).reverse().concat(f(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return i=>{let o=!0,l=!1;if(i.key&&"number"!=typeof i.key&&i.key.indexOf("$")>0){l=!0;let t=i.key.slice(i.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(i.type){case"title":case"base":t.has(i.type)?o=!1:t.add(i.type);break;case"meta":for(let e=0,t=p.length;e<t;e++){let t=p[e];if(i.props.hasOwnProperty(t)){if("charSet"===t)n.has(t)?o=!1:n.add(t);else{let e=i.props[t],n=r[t]||new Set;("name"!==t||!l)&&n.has(e)?o=!1:(n.add(e),r[t]=n)}}}}return o}}()).reverse().map((e,t)=>{let r=e.key||t;if(!n&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,l.default.cloneElement(e,t)}return l.default.cloneElement(e,{key:r})})}let m=function(e){let{children:t}=e,n=(0,l.useContext)(u.AmpStateContext),r=(0,l.useContext)(s.HeadManagerContext);return(0,o.jsx)(a.default,{reduceComponentsToState:g,headManager:r,inAmpMode:(0,d.isInAmpMode)(n),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2550:function(e,t){function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:o,objectFit:l}=e,a=r?40*r:t,u=i?40*i:n,s=a&&u?"viewBox='0 0 "+a+" "+u+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+s+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(s?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},2589:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return o}});let r=n(7043)._(n(2265)),i=n(128),o=r.default.createContext(i.imageConfigDefault)},128:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return r}});let n=["default","imgix","cloudinary","akamai","custom"],r={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}},8461:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return u},getImageProps:function(){return a}});let r=n(7043),i=n(5346),o=n(5878),l=r._(n(5084));function a(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let u=o.Image},5084:function(e,t){function n(e){var t;let{config:n,src:r,width:i,quality:o}=e,l=o||(null==(t=n.qualities)?void 0:t.reduce((e,t)=>Math.abs(t-75)<Math.abs(e-75)?t:e))||75;return n.path+"?url="+encodeURIComponent(r)+"&w="+i+"&q="+l}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},5523:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(7043)._(n(2265)).default.createContext(null)},7421:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(2265),i="undefined"==typeof window,o=i?()=>{}:r.useLayoutEffect,l=i?()=>{}:r.useEffect;function a(e){let{headManager:t,reduceComponentsToState:n}=e;function a(){if(t&&t.mountedInstances){let i=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(i,e))}}if(i){var u;null==t||null==(u=t.mountedInstances)||u.add(e.children),a()}return o(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[188],{5723:function(e,t,r){var n=r(7437),a=r(2265),i=r(718),s=r.n(i),o=r(3082),l=r(2079),h=r(5476);let M={TRUE_WIND:1,APP_WIND:1},u=e=>{let{position:t=[0,0,0],rotation:r=[0,0,0],speed:a,color:i="#ffffff",fontSize:s=.5,textPosition:o=[0,.8,0],arrowSize:M=1}=e;return(0,n.jsxs)("group",{position:t,rotation:r,children:[(0,n.jsx)(h.x,{characters:".0123456789",color:i,fontSize:s*M,position:o,font:"fonts/Roboto-Bold.ttf",children:a.toFixed(1)}),(0,n.jsxs)("mesh",{children:[(0,n.jsx)("shapeGeometry",{args:[new l.bnF([new l.FM8(0,0),new l.FM8(.5*M*Math.cos(5*Math.PI/6),.5*M*Math.sin(5*Math.PI/6)),new l.FM8(0,-.577*M),new l.FM8(-.5*M*Math.cos(5*Math.PI/6),.5*M*Math.sin(5*Math.PI/6)),new l.FM8(0,0)])]}),(0,n.jsx)("meshStandardMaterial",{color:i,side:l.ehD})]})]})};u.propTypes={position:s().instanceOf(l.Pa4).isRequired,rotation:s().arrayOf(s().number).isRequired,speed:s().number.isRequired,color:s().string.isRequired,fontSize:s().number.isRequired,textPosition:s().arrayOf(s().number).isRequired};let T=e=>{let{outerRadius:t}=e,{getSignalKValue:r}=(0,o.yC)(),i=Math.PI/2-r("environment.wind.angleTrueGround")||0,s=(0,o.HQ)(r("environment.wind.speedOverGround"))||0,h=Math.PI/2-r("environment.wind.angleApparent")||0,T=(0,o.HQ)(r("environment.wind.speedApparent"))||0,d=(0,a.useMemo)(()=>new l.Pa4((t+.7)*Math.cos(i),0,-(t+.7)*Math.sin(i)),[t,i]),c=(0,a.useMemo)(()=>new l.Pa4((t+.7)*Math.cos(h),0,-(t+.7)*Math.sin(h)),[t,h]);return(0,n.jsxs)("group",{children:[s>0&&(0,n.jsx)(u,{position:d,rotation:[-Math.PI/2,0,-(Math.PI/2-i)],speed:s,color:"blue",fontSize:M.TRUE_WIND}),T>0&&(0,n.jsx)(u,{position:c,rotation:[-Math.PI/2,0,-(Math.PI/2-h)],speed:T,color:o.gK,fontSize:M.APP_WIND})]})};T.propTypes={outerRadius:s().number.isRequired},t.Z=T},7188:function(e,t,r){r.r(t),r.d(t,{default:function(){return P}});var n=r(7437),a=r(2265),i=r(8328),s=r(4725),o=r(5903),l=r(5550),h=r(1909),M=r(3082),u=r(5723),T=r(2079);let d={MOBILE_TEMPLATE:{COLOR:"yellow",WIDTH_FACTOR:.8,LENGTH_FACTOR:2.5,MAX_LENGTH_MULTIPLIER:3.5,CURVATURE_SENSITIVITY:{RUDDER:1.5,WIND:.25,CURRENT:.3,LEEWAY:.15,DRIFT:.1}},NEUTRAL_TEMPLATE:{COLOR:"blue",WIDTH_FACTOR:.7,LENGTH_FACTOR:.9},ANTICOLLISION_TEMPLATE:{COLOR:"red",WIDTH_FACTOR:1.5,LENGTH_FACTOR:.8}};var c=e=>{let{rudderAngle:t=0,sog:r=5,boatWidth:i=2,windSpeed:s=0,windDirection:o=0,currentSpeed:l=0,currentDirection:h=0,leewayAngle:M=0,driftFactor:u=0,maxCurvePoints:c=50}=e,E=(0,a.useRef)(),f=(0,a.useRef)(),I=(0,a.useRef)(),p=(0,a.useCallback)(()=>{let e=e=>T.M8C.degToRad(e),t=e(o),r=e(M),n=Math.cos(t+r)*s*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.WIND,a=Math.sin(t+r)*s*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.WIND,i=e(h),c=Math.cos(i)*l*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.CURRENT,E=Math.sin(i)*l*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.CURRENT;return{x:(n+c)*(1+u*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.DRIFT),z:(a+E)*(1+u*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.DRIFT)}},[s,o,l,h,M,u]),R=(0,a.useCallback)(()=>{let e=i*d.MOBILE_TEMPLATE.MAX_LENGTH_MULTIPLIER,r=Math.min(2*i*d.MOBILE_TEMPLATE.LENGTH_FACTOR,e),n=[],a=1.5*p().x;if(.1>Math.abs(t)){let e=.5*a,t=Math.max(i/Math.tan(T.M8C.degToRad(5+Math.abs(e))),.5*i),s=r/t,o=new T.FM8(e>0?t:-t,0),l=e>0?Math.PI:0;for(let r=0;r<=c;r++){let a=l+r/c*(e>0?s:-s),i=o.x+t*Math.cos(a),h=o.y+t*Math.sin(a);n.push(new T.Pa4(i,0,h))}}else{let e=T.M8C.clamp(1.2*Math.abs(t)+a,0,85),s=i/Math.tan(T.M8C.degToRad(e*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.RUDDER)),o=T.M8C.clamp(r/s,0,1.25*Math.PI);if(t>0){let e=new T.FM8(s,0),t=Math.PI;for(let r=0;r<=c;r++){let a=r/c,i=T.M8C.lerp(t,t+o,a),l=e.x+s*Math.cos(i),h=e.y+s*Math.sin(i);n.push(new T.Pa4(l,0,h))}}else{let e=new T.FM8(-s,0);for(let t=0;t<=c;t++){let r=t/c,a=T.M8C.lerp(0,0-o,r),i=e.x+s*Math.cos(a),l=e.y+s*Math.sin(a);n.push(new T.Pa4(i,0,l))}}}let s=n.map((e,t)=>{let r;(r=0===t?n[1].clone().sub(e):e.clone().sub(n[t-1])).normalize();let a=new T.Pa4(-r.z,0,r.x),s=i/1.8;return{left:e.clone().add(a.multiplyScalar(s)),right:e.clone().sub(a.multiplyScalar(s))}});return[...s.map(e=>e.left),s[s.length-1].right,...s.reverse().map(e=>e.right)]},[i,t,c,p]),P=(0,a.useCallback)(e=>{if("MOBILE_TEMPLATE"===e)return R();let t=d[e],r=2*i*t.LENGTH_FACTOR,n=i*t.WIDTH_FACTOR,a=[],s=Math.floor(c/4);for(let e=0;e<=s;e++){let t=e/s;a.push(new T.Pa4(-n/2,0,-r*t))}a.push(new T.Pa4(n/2,0,-r));for(let e=s;e>=0;e--){let t=e/s;a.push(new T.Pa4(n/2,0,-r*t))}return a},[i,c,R]);return(0,a.useEffect)(()=>{E.current&&f.current&&I.current&&(E.current.geometry.setFromPoints(P("MOBILE_TEMPLATE")),f.current.geometry.setFromPoints(P("NEUTRAL_TEMPLATE")),I.current.geometry.setFromPoints(P("ANTICOLLISION_TEMPLATE")))},[P]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("line",{ref:E,children:[(0,n.jsx)("bufferGeometry",{}),(0,n.jsx)("lineBasicMaterial",{color:d.MOBILE_TEMPLATE.COLOR,linewidth:2})]}),(0,n.jsxs)("line",{ref:f,children:[(0,n.jsx)("bufferGeometry",{}),(0,n.jsx)("lineBasicMaterial",{color:d.NEUTRAL_TEMPLATE.COLOR,linewidth:2})]}),(0,n.jsxs)("line",{ref:I,children:[(0,n.jsx)("bufferGeometry",{}),(0,n.jsx)("lineBasicMaterial",{color:d.ANTICOLLISION_TEMPLATE.COLOR,linewidth:2})]})]})},E=r(718),f=r.n(E),I=r(5476);let p=e=>{let{position:t,rotation:r,speed:a,color:i="#ffffff",fontSize:s=.5,textPosition:o=[0,.8,0],arrowSize:l=1}=e;return(0,n.jsxs)("group",{position:t,rotation:r,children:[(0,n.jsx)(I.x,{characters:"0123456789.",color:i,fontSize:s*l,position:o,font:"fonts/Roboto-Bold.ttf",anchorX:"center",anchorY:"middle",children:a.toFixed(1)}),(0,n.jsxs)("mesh",{children:[(0,n.jsx)("shapeGeometry",{args:[new T.bnF([new T.FM8(0,0),new T.FM8(.5*l*Math.cos(5*Math.PI/6),.5*l*Math.sin(5*Math.PI/6)),new T.FM8(0,-.577*l),new T.FM8(-.5*l*Math.cos(5*Math.PI/6),.5*l*Math.sin(5*Math.PI/6)),new T.FM8(0,0)])]}),(0,n.jsx)("meshStandardMaterial",{color:i,side:T.ehD})]})]})};p.propTypes={position:f().arrayOf(f().number),rotation:f().arrayOf(f().number),speed:f().number.isRequired,color:f().string,fontSize:f().number,textPosition:f().arrayOf(f().number),arrowSize:f().number},p.defaultProps={position:[0,0,0],rotation:[0,0,0],color:"#ffffff",fontSize:.5,textPosition:[0,.8,0],arrowSize:1};let R=e=>{let{outerRadius:t}=e,{getSignalKValue:r}=(0,M.yC)(),i=r("environment.current")||{setTrue:0,drift:0},s=(0,a.useMemo)(()=>{let e=i.setTrue||0;return[(t+.7)*Math.cos(e),0,-(t+.7)*Math.sin(e)]},[t,i.setTrue]);return!i.drift||i.drift<=0?null:(0,n.jsx)("group",{children:(0,n.jsx)(p,{position:s,rotation:[-Math.PI/2,0,-(Math.PI/2-(i.setTrue||0))],speed:i.drift,color:M.FV,arrowSize:1.2})})};R.propTypes={outerRadius:f().number.isRequired};var P=()=>{let e=(0,a.useRef)(),{getSignalKValue:t}=(0,M.yC)(),r=t("steering.rudderAngle")||0,T=t("navigation.speedOverGround")||0,d=t("environment.wind.angleApparent")||0,E=(0,M.HQ)(t("environment.wind.speedApparent"))||0,f=t("environment.current")||{setTrue:0,drift:0};return(0,n.jsxs)(a.Suspense,{fallback:(0,n.jsx)(i.V,{center:!0,children:"Loading..."}),children:[(0,n.jsx)(s.c,{makeDefault:!0,fov:60,near:1,far:1e3,position:[0,1,10]}),(0,n.jsx)(o.z,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4}),(0,n.jsx)(l.qA,{files:"./assets/ocearo_env.hdr",background:!1,intensity:.8}),(0,n.jsx)("ambientLight",{intensity:.6}),(0,n.jsx)("spotLight",{position:[15,30,20],intensity:1.8,angle:Math.PI/6,penumbra:.5,castShadow:!0,"shadow-mapSize-width":1024,"shadow-mapSize-height":1024,"shadow-camera-near":.5,"shadow-camera-far":50,"shadow-bias":-.0001}),(0,n.jsx)("directionalLight",{position:[-10,20,10],intensity:1.5,castShadow:!0,"shadow-mapSize-width":1024,"shadow-mapSize-height":1024,"shadow-camera-near":.5,"shadow-camera-far":50,"shadow-bias":-.0001,color:"#ffd1a6"}),(0,n.jsx)("pointLight",{position:[-10,10,-10],intensity:.7}),(0,n.jsxs)("group",{position:[0,-3,0],children:[(0,n.jsx)(h.Z,{position:[0,0,.7],scale:[.5,.5,.5],ref:e,showSail:!1}),(0,n.jsx)(u.Z,{outerRadius:5}),(0,n.jsx)(R,{outerRadius:5}),(0,n.jsx)("group",{position:[0,0,-5],children:(0,n.jsx)(c,{rudderAngle:r,sog:T,windSpeed:E,windDirection:d,currentSpeed:f.drift,currentDirection:f.setTrue,boatWidth:2,leewayAngle:Math.min(Math.sin(Math.abs(d*Math.PI/180))*E*.02,10),driftFactor:T<.1?0:Math.min(f.drift/T,1),maxCurvePoints:100})})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[197],{2197:function(t,e,i){i.r(e),i.d(e,{default:function(){return p}});var a=i(7437),n=i(2265),o=i(8124),s=i(8328),l=i(4725),r=i(5903),u=i(5550),h=i(2079),d=i(1909),c=i(3082);let g=(t,e,i,a)=>{let n=(i-t)*Math.PI/180,o=(a-e)*Math.PI/180,s=Math.sin(n/2)*Math.sin(n/2)+Math.cos(t*Math.PI/180)*Math.cos(i*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return 2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))*6371e3};var f=()=>{let t=(0,n.useRef)(),[e,i]=(0,n.useState)(null),{getSignalKValue:s}=(0,c.yC)();return(0,n.useEffect)(()=>{let t=s("navigation.position");t&&!e&&i({latitude:t.latitude,longitude:t.longitude})},[s,e]),(0,n.useEffect)(()=>{if(t.current){let e=new h.u9r,i=[];for(let t=0;t<=64;t++){let e=t/64*Math.PI*2;i.push(50*Math.cos(e),0,50*Math.sin(e))}e.setAttribute("position",new h.a$l(i,3)),t.current.geometry=e}},[]),(0,o.F)(()=>{if(t.current&&e){let i=s("navigation.position");if(i){let a=g(e.latitude,e.longitude,e.latitude,i.longitude),n=g(e.latitude,e.longitude,i.latitude,e.longitude),o=i.longitude>e.longitude?a:-a,s=i.latitude>e.latitude?n:-n;t.current.position.set(o,-6.9,s)}}}),(0,a.jsx)("line",{ref:t,children:(0,a.jsx)("lineBasicMaterial",{attach:"material",color:"green",linewidth:2})})},p=()=>{let t=(0,n.useRef)(),{size:e}=(0,o.D)(),i=e.width/e.height;return(0,a.jsxs)(n.Suspense,{fallback:(0,a.jsx)(s.V,{children:"Loading..."}),children:[(0,a.jsx)(l.c,{makeDefault:!0,fov:25,aspect:i,near:1,far:1e3,position:[32,10,-32]}),(0,a.jsx)(r.z,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4}),(0,a.jsx)(u.qA,{files:"./assets/ocearo_env.hdr",background:!1}),(0,a.jsx)("ambientLight",{intensity:.6}),(0,a.jsx)("spotLight",{position:[15,30,20],intensity:2,angle:Math.PI/6,penumbra:.5,castShadow:!0,"shadow-mapSize-width":2048,"shadow-mapSize-height":2048}),(0,a.jsx)("directionalLight",{position:[-10,20,10],intensity:1.5,castShadow:!0,"shadow-mapSize-width":2048,"shadow-mapSize-height":2048}),(0,a.jsx)("pointLight",{position:[-10,10,-10],intensity:.7}),(0,a.jsx)(d.Z,{ref:t,scale:[1.3,1.3,1.3],position:[0,-6,0]}),(0,a.jsx)(f,{}),(0,a.jsxs)("mesh",{rotation:[-Math.PI/2,0,0],position:[0,-7,0],receiveShadow:!0,children:[(0,a.jsx)("planeGeometry",{args:[100,100]}),(0,a.jsx)("shaderMaterial",{uniforms:{uColor:{value:new h.Ilk("#111111")},uBlurRadius:{value:.1}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n uniform vec3 uColor;\n uniform float uBlurRadius;\n varying vec2 vUv;\n\n void main() {\n float distanceToCenter = length(vUv - vec2(0.5));\n float alpha = smoothstep(0.5 - uBlurRadius, 0.5 + uBlurRadius, distanceToCenter);\n gl_FragColor = vec4(uColor, 1.0 - alpha);\n }\n "})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{6199:function(e,t,a){a.r(t);var s=a(7437),l=a(2265),r=a(3082),n=a(5008),i=a(1268),c=a(5217);let o=e=>{let{data:t,dataKey:a,color:l,scale:n,label:i,unit:c,showPoints:o=!1,lineWidth:x=.5}=e,{nightMode:d}=(0,r.yC)(),m=t.filter(e=>null!==e[a]&&void 0!==e[a]);if(0===m.length)return(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:"No data available"});let u=Math.min(...m.map(e=>e[a])),h=Math.max(...m.map(e=>e[a])),g=Math.max(n.min,u-(h-u)*.1),p=Math.min(n.max,h+(h-u)*.1),f=h-u>(n.max-n.min)*.05,b=f?g:n.min,v=f?p:n.max,j=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]-b)/(v-b)*100)),value:e[a],time:e.time}}).filter(e=>null!==e.y),N=j.reduce((e,t,a)=>e+(0===a?"M ".concat(t.x,",").concat(t.y):" L ".concat(t.x,",").concat(t.y)),""),y=Array.from({length:5}).map((e,t)=>({position:t/4*100,value:v-(v-b)/4*t}));return(0,s.jsxs)("div",{className:"h-full w-full relative",children:[(0,s.jsx)("div",{className:"absolute inset-0",children:y.map((e,t)=>(0,s.jsx)("div",{className:"absolute w-full border-t border-gray-300 opacity-20",style:{top:"".concat(e.position,"%")},children:(0,s.jsxs)("span",{className:"absolute -left-10 text-xs ".concat(d?"text-oNight":"text-white"),children:[e.value.toFixed(e.value<10?1:0),c]})},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(d?"text-oNight":"text-white"," transform -translate-x-1/2"),style:{left:"".concat(10*a/(t.length-1)*100,"%"),bottom:"-20px"},children:e.time.split(":").slice(1).join(":")},a))}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-800 bg-opacity-10 rounded"}),f&&(0,s.jsxs)("div",{className:"absolute top-0 right-0 bg-gray-800 bg-opacity-70 px-2 py-1 rounded text-xs text-white",children:["Auto: ",b.toFixed(1)," - ",v.toFixed(1),c]}),(0,s.jsxs)("svg",{className:"w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:[(0,s.jsx)("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:"0.3"}),(0,s.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:"0.05"})]})}),(0,s.jsx)("path",{d:"".concat(N," L ").concat(j[j.length-1].x,",100 L ").concat(j[0].x,",100 Z"),fill:"url(#gradient-".concat(a,")")}),(0,s.jsx)("path",{d:N,fill:"none",stroke:l,strokeWidth:x,strokeLinecap:"round",strokeLinejoin:"round"}),o&&j.map((e,t)=>(0,s.jsx)("circle",{cx:e.x,cy:e.y,r:.5,fill:l,className:"hover:r-4 transition-all duration-150",children:(0,s.jsx)("title",{children:"".concat(i,": ").concat(e.value.toFixed(2)).concat(c)})},t))]})]})},x=e=>{let{socPercentage:t,voltage:a,current:l,temperature:r,isCharging:o}=e,x=(0,n.z)(t),d=t<=n.vp.DANGER_THRESHOLD,m=null!==r;return(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsxs)("div",{className:"relative w-20 h-40 mb-4",children:[(0,s.jsxs)("div",{className:"absolute w-full h-[90%] bottom-0 rounded-md border-2 border-white overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute bottom-0 w-full transition-all duration-700 ".concat(x),style:{height:"".concat(t,"%")}}),(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsxs)("span",{className:"text-xl font-bold text-white drop-shadow-lg",children:[Math.round(t),"%"]})}),d&&(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-4xl animate-pulse text-red-500 opacity-70",children:"⚠️"})})]}),(0,s.jsx)("div",{className:"absolute w-[40%] h-[10%] top-0 left-1/2 -translate-x-1/2 bg-white rounded-t-sm"}),o&&(0,s.jsx)("div",{className:"absolute top-[-1.5rem] left-1/2 -translate-x-1/2 text-yellow-400 animate-pulse",children:(0,s.jsx)(i.G,{icon:c.BDt,size:"xl"})})]}),(0,s.jsxs)("div",{className:"flex ".concat(m?"flex-wrap":""," gap-4 justify-center"),children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("span",{className:"text-xs opacity-70",children:"Voltage"}),(0,s.jsxs)("p",{className:"text-lg font-medium",children:[a.toFixed(1),"V"]})]}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("span",{className:"text-xs opacity-70",children:"Current"}),(0,s.jsxs)("p",{className:"text-lg font-medium",children:[l.toFixed(1),"A"]})]}),m&&(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("span",{className:"text-xs opacity-70",children:"Temp"}),(0,s.jsxs)("p",{className:"text-lg font-medium",children:[r.toFixed(1),"\xb0C"]})]})]})]})},d=e=>{let{value:t,min:a,max:l,label:r,color:n,icon:c}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsxs)("div",{className:"relative w-32 h-16 mb-2",children:[(0,s.jsx)("div",{className:"absolute w-full h-full bg-gray-800 rounded-t-full overflow-hidden"}),(0,s.jsx)("div",{className:"absolute bottom-0 left-0 w-full origin-bottom overflow-hidden",style:{height:"100%",transform:"rotate(".concat(-90+(t-a)/(l-a)*100/100*180,"deg)"),transformOrigin:"bottom center"},children:(0,s.jsx)("div",{className:"absolute bottom-0 left-0 w-0.5 h-full ".concat(n),style:{left:"50%",boxShadow:"0 0 8px 1px currentColor"}})}),[0,25,50,75,100].map(e=>(0,s.jsx)("div",{className:"absolute bottom-0 w-1 h-2 bg-white",style:{left:"".concat(e,"%")}},e)),c&&(0,s.jsx)("div",{className:"absolute top-1 left-1/2 -translate-x-1/2 text-white opacity-70",children:(0,s.jsx)(i.G,{icon:c})}),(0,s.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)("span",{className:"font-bold text-white",children:t.toFixed(1)})})]}),(0,s.jsx)("span",{className:"text-sm opacity-80",children:r})]})};t.default=()=>{let{nightMode:e,getSignalKValue:t}=(0,r.yC)(),a=(0,l.useRef)(performance.now()),m=(0,l.useRef)(performance.now()),u=(0,l.useRef)(0),[h,g]=(0,l.useState)("voltage"),[p,f]=(0,l.useState)("fps"),b=(0,l.useCallback)(()=>{let e=new Date().toLocaleTimeString(),a=t("electrical.batteries.1.voltage")||12,s=t("electrical.batteries.1.capacity.stateOfCharge"),l=t("electrical.batteries.1.current")||5,i=t("electrical.batteries.1.temperature"),c=null!==i?(0,r.G5)(i):null;return{time:e,voltage:a,current:l,stateOfCharge:null!==s?s:(0,n.Si)(a),power:a*l,temperature:c}},[t]),[v,j]=(0,l.useState)(()=>Array(60).fill(null).map(b)),[N,y]=(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})}),w=(0,l.useCallback)(e=>{let a=v[v.length-1],s=t("electrical.batteries.1.voltage")||a.voltage,l=t("electrical.batteries.1.current")||a.current,i=t("electrical.batteries.1.capacity.stateOfCharge"),c=null!==i?i:(0,n.Si)(s),o=t("electrical.batteries.1.temperature");return{time:e,voltage:s,current:l,stateOfCharge:c,power:s*l,temperature:null!==o?(0,r.G5)(o):null}},[t,v]),C=(0,l.useRef)(null);(0,l.useEffect)(()=>{window.__OCEARO_RENDERER&&(C.current=window.__OCEARO_RENDERER)},[]),(0,l.useEffect)(()=>{let e;let t=()=>{let s=new Date().toLocaleTimeString();u.current++;let l=performance.now();if(a.current,l>=m.current+1e3){var r,n,i,c,o,x,d,h;let e=1e3*u.current/(l-m.current),t=e>0?1e3/e:0,a=0,g=0,p=0,f=0,b=0;if(window.performance&&window.performance.memory&&(b=Math.round(window.performance.memory.usedJSHeapSize/1048576)),C.current){let e=C.current.info;a=(null===(r=e.render)||void 0===r?void 0:r.calls)||0,g=(null===(n=e.render)||void 0===n?void 0:n.triangles)||0,p=(null===(i=e.memory)||void 0===i?void 0:i.geometries)||0,f=(null===(c=e.memory)||void 0===c?void 0:c.textures)||0}else if(window.__OCEARO_RENDER_INFO){let e=window.__OCEARO_RENDER_INFO;a=(null===(o=e.render)||void 0===o?void 0:o.calls)||0,g=(null===(x=e.render)||void 0===x?void 0:x.triangles)||0,p=(null===(d=e.memory)||void 0===d?void 0:d.geometries)||0,f=(null===(h=e.memory)||void 0===h?void 0:h.textures)||0}y(l=>[...l.slice(1),{time:s,fps:e,ms:t,drawCalls:a,triangles:g,geometries:p,textures:f,memory:b}]),j(e=>[...e.slice(1),w(s)]),m.current=l,u.current=0}a.current=l,e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[w]);let R={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}},G={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}},O=v[v.length-1],E=(0,n.d3)(O.voltage),_=null!==O.temperature;return(0,s.jsx)("div",{className:"p-6 flex flex-col h-full bg-rightPaneBg",children:(0,s.jsxs)("div",{className:"grid gap-6 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg shadow-lg p-4 flex flex-col md:row-span-2",children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"," mb-6 text-center"),children:[(0,s.jsx)(i.G,{icon:c.RoX,className:"mr-2"}),"Battery Status"]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col justify-between",children:[(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,s.jsx)(x,{socPercentage:O.stateOfCharge,voltage:O.voltage,current:O.current,temperature:O.temperature,isCharging:E})}),(0,s.jsxs)("div",{className:"flex justify-center flex-wrap gap-6 mb-4",children:[(0,s.jsx)(d,{value:O.voltage,min:R.voltage.min,max:R.voltage.max,label:"Voltage",color:"text-blue-500",icon:c.BDt}),(0,s.jsx)(d,{value:O.current,min:R.current.min,max:R.current.max,label:"Current",color:"text-red-500",icon:c.Tr1}),_&&(0,s.jsx)(d,{value:O.temperature,min:R.temperature.min,max:R.temperature.max,label:"Temperature",color:"text-orange-500",icon:c.ccn})]}),(0,s.jsxs)("div",{className:"flex justify-center space-x-3 pt-2 border-t border-gray-700",children:[(0,s.jsxs)("div",{className:"px-3 py-1 rounded-full text-sm flex items-center \n ".concat(E?"bg-green-900 text-green-200":"bg-gray-700 text-gray-300"),children:[(0,s.jsx)(i.G,{icon:c.Tr1,className:"mr-1"}),E?"Charging":"Not Charging"]}),(0,s.jsxs)("div",{className:"px-3 py-1 rounded-full text-sm flex items-center\n ".concat("bg-oGreen"===(0,n.z)(O.stateOfCharge)?"bg-green-900 text-green-200":"bg-oYellow"===(0,n.z)(O.stateOfCharge)?"bg-yellow-700 text-yellow-100":"bg-red-900 text-red-200"),children:[(0,s.jsx)(i.G,{icon:c.RoX,className:"mr-1"}),O.stateOfCharge>=75?"Good":O.stateOfCharge>=30?"Fair":"Low"]})]})]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg shadow-lg p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:"Battery Graph"}),(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("voltage"===h?"bg-blue-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>g("voltage"),children:"Voltage"}),(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("current"===h?"bg-red-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>g("current"),children:"Current"}),(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("soc"===h?"bg-green-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>g("soc"),children:"SoC"}),_&&(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("temperature"===h?"bg-orange-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>g("temperature"),children:"Temp"})]})]}),(0,s.jsxs)("div",{className:"h-64 mt-6 mb-8 relative",children:["voltage"===h&&(0,s.jsx)(o,{data:v,dataKey:"voltage",color:"#3b82f6",scale:R.voltage,label:"Voltage",unit:"V",showPoints:!0}),"current"===h&&(0,s.jsx)(o,{data:v,dataKey:"current",color:"#ef4444",scale:R.current,label:"Current",unit:"A",showPoints:!0}),"soc"===h&&(0,s.jsx)(o,{data:v,dataKey:"stateOfCharge",color:"#22c55e",scale:R.soc,label:"State of Charge",unit:"%",showPoints:!0}),"temperature"===h&&_&&(0,s.jsx)(o,{data:v,dataKey:"temperature",color:"#f97316",scale:R.temperature,label:"Temperature",unit:"\xb0C",showPoints:!0})]})]}),(0,s.jsxs)("div",{className:"bg-oGray2 rounded-lg shadow-lg p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"," flex items-center"),children:[(0,s.jsx)(i.G,{icon:c.zvy,className:"mr-2"}),"3D Performance"]}),(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("fps"===p?"bg-cyan-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>f("fps"),children:"FPS"}),(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("drawCalls"===p?"bg-purple-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>f("drawCalls"),children:"Draw Calls"}),(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("triangles"===p?"bg-indigo-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>f("triangles"),children:"Triangles"}),(0,s.jsx)("button",{className:"px-2 py-1 rounded text-xs ".concat("memory"===p?"bg-emerald-500 text-white":"bg-gray-700 text-gray-300"),onClick:()=>f("memory"),children:"Memory"})]})]}),(0,s.jsxs)("div",{className:"h-56 mt-4 mb-4 relative",children:["fps"===p&&(0,s.jsx)(o,{data:N,dataKey:"fps",color:"#06b6d4",scale:G.fps,label:"FPS",unit:"",lineWidth:.5,showPoints:!0}),"drawCalls"===p&&(0,s.jsx)(o,{data:N,dataKey:"drawCalls",color:"#8b5cf6",scale:G.drawCalls,label:"Draw Calls",unit:"",lineWidth:.5,showPoints:!0}),"triangles"===p&&(0,s.jsx)(o,{data:N,dataKey:"triangles",color:"#6366f1",scale:G.triangles,label:"Triangles",unit:"",lineWidth:.5,showPoints:!0}),"memory"===p&&(0,s.jsx)(o,{data:N,dataKey:"memory",color:"#10b981",scale:G.memory,label:"Memory",unit:"MB",lineWidth:.5,showPoints:!0})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mt-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)(i.G,{icon:c.zvy,className:"text-cyan-500 text-lg"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs ".concat(e?"text-oNight":"text-white"," opacity-70"),children:"FPS / Frame Time"}),(0,s.jsxs)("p",{className:"text-base font-semibold ".concat(e?"text-oNight":"text-white"),children:[N[N.length-1].fps.toFixed(1)," fps /",N[N.length-1].ms.toFixed(1),"ms"]})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)(i.G,{icon:c.dT$,className:"text-purple-500 text-lg"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs ".concat(e?"text-oNight":"text-white"," opacity-70"),children:"Draw Calls"}),(0,s.jsx)("p",{className:"text-base font-semibold ".concat(e?"text-oNight":"text-white"),children:N[N.length-1].drawCalls.toLocaleString()})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)(i.G,{icon:c.hGM,className:"text-indigo-500 text-lg"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs ".concat(e?"text-oNight":"text-white"," opacity-70"),children:"Triangles / Geometries"}),(0,s.jsxs)("p",{className:"text-base font-semibold ".concat(e?"text-oNight":"text-white"),children:[(N[N.length-1].triangles/1e3).toFixed(1),"k /",N[N.length-1].geometries]})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)(i.G,{icon:c.$v3,className:"text-emerald-500 text-lg"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs ".concat(e?"text-oNight":"text-white"," opacity-70"),children:"Memory / Textures"}),(0,s.jsxs)("p",{className:"text-base font-semibold ".concat(e?"text-oNight":"text-white"),children:[N[N.length-1].memory," MB /",N[N.length-1].textures||0]})]})]})]})]})]})})}},5008:function(e,t,a){a.d(t,{Si:function(){return l},d3:function(){return r},vp:function(){return s},z:function(){return n}});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,r=t[a].soc,n=t[a+1].soc;return Math.round(n+(e-l)/(s-l)*(r-n))}return 0},r=e=>e>s.CHARGING_THRESHOLD,n=e=>e>s.WARNING_THRESHOLD?"bg-oGreen":e>s.DANGER_THRESHOLD?"bg-oYellow":"bg-oRed"}}]);
|