ocearo-ui 0.1.22 → 2.0.0

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.
Files changed (147) hide show
  1. package/404.html +1 -1
  2. package/README.fr.md +118 -158
  3. package/README.md +114 -158
  4. package/__next.__PAGE__.txt +19 -5
  5. package/__next._full.txt +11 -11
  6. package/__next._tree.txt +2 -2
  7. package/_next/static/chunks/0-c2-u5p6bxzo.js +1 -0
  8. package/_next/static/chunks/01atsfq_4opab.js +1 -0
  9. package/_next/static/chunks/0cx639tthxlz4.js +1 -0
  10. package/_next/static/chunks/0h2qsuyze9ds1.js +1 -0
  11. package/_next/static/chunks/0iqdztntvxh3c.js +119 -0
  12. package/_next/static/chunks/0iztd835j5p1n.js +700 -0
  13. package/_next/static/chunks/{2nxsyowmuwpjy.js → 0jfox92up1jvy.js} +1 -1
  14. package/_next/static/chunks/0jpa5m78l0ib0.js +1 -0
  15. package/_next/static/chunks/0kpstejrka-7k.js +1 -0
  16. package/_next/static/chunks/0n95joti2n2py.js +3 -0
  17. package/_next/static/chunks/0oaqe70syw_b5.js +1 -0
  18. package/_next/static/chunks/0ohleay4roayh.js +353 -0
  19. package/_next/static/chunks/0on1skx9l54-9.js +1 -0
  20. package/_next/static/chunks/0w_skktmh3e48.js +1 -0
  21. package/_next/static/chunks/0y-dctk-kmqss.js +1 -0
  22. package/_next/static/chunks/0yiqocv54ogoq.js +1 -0
  23. package/_next/static/chunks/0zlk2mlkvbtj1.js +1 -0
  24. package/_next/static/chunks/0zwc9m4qgtwle.js +1 -0
  25. package/_next/static/chunks/11awvgcou7v4r.js +1 -0
  26. package/_next/static/chunks/144mjqdrx42lq.js +1 -0
  27. package/_next/static/chunks/1d81m3g9jqkob.js +1 -0
  28. package/_next/static/chunks/1ed7ayfg19cjb.js +1 -0
  29. package/_next/static/chunks/1epya-yh2wvj2.js +1 -0
  30. package/_next/static/chunks/1exvcc71cgr4t.js +446 -0
  31. package/_next/static/chunks/1fzzb4jtgv5gg.js +9 -0
  32. package/_next/static/chunks/1g8fbzv0hu0i2.js +1 -0
  33. package/_next/static/chunks/1gaiqhzy_0d7s.js +1 -0
  34. package/_next/static/chunks/1gq4t2dyr7rq3.js +1 -0
  35. package/_next/static/chunks/1l-jew0-1-3eq.js +30 -0
  36. package/_next/static/chunks/1ptj3mv8b_tzs.js +1 -0
  37. package/_next/static/chunks/1w1xks0hp_tlr.js +346 -0
  38. package/_next/static/chunks/1xekc18cyi4sx.js +1 -0
  39. package/_next/static/chunks/1y35unwvy8p98.js +1 -0
  40. package/_next/static/chunks/2aq8orcir5h03.js +1 -0
  41. package/_next/static/chunks/2fdpvhx4oo81h.js +1 -0
  42. package/_next/static/chunks/2g-xpe7xnropn.js +409 -0
  43. package/_next/static/chunks/2kmptoy43h0mx.js +1 -0
  44. package/_next/static/chunks/2n86yq1wz1yx7.js +1 -0
  45. package/_next/static/chunks/2r_h93rt76vka.js +1 -0
  46. package/_next/static/chunks/2rebcvig176xk.js +564 -0
  47. package/_next/static/chunks/2w71oj1brox5z.js +1 -0
  48. package/_next/static/chunks/2wayx8t5r5fi9.js +1 -0
  49. package/_next/static/chunks/2y3d8zopa8r5r.css +3 -0
  50. package/_next/static/chunks/3--qzv1u6c7_7.js +1 -0
  51. package/_next/static/chunks/31lugryguappr.js +1 -0
  52. package/_next/static/chunks/32j_j396qs7be.js +1 -0
  53. package/_next/static/chunks/32yn_fc-es66m.js +22 -0
  54. package/_next/static/chunks/34_oyzp8_pi_m.js +1 -0
  55. package/_next/static/chunks/34wvn5zw0a69w.js +1 -0
  56. package/_next/static/chunks/37t6vg8fb1-z8.js +1 -0
  57. package/_next/static/chunks/3k5itcabq5oqs.js +9 -0
  58. package/_next/static/chunks/3ktj0iemsr1m-.js +1 -0
  59. package/_next/static/chunks/3nm7o0eq5abhg.js +1 -0
  60. package/_next/static/chunks/3s6nzrbk-8mnv.js +31 -0
  61. package/_next/static/chunks/3td9mnhvcj9cq.js +1 -0
  62. package/_next/static/chunks/3xjnsskh0tayo.js +1 -0
  63. package/_next/static/chunks/3zqx8h9yg5-ch.js +1 -0
  64. package/_next/static/chunks/turbopack-1h111qg8l92rw.js +1 -0
  65. package/_not-found/__next._full.txt +12 -12
  66. package/_not-found/__next._not-found.__PAGE__.txt +19 -2
  67. package/_not-found/__next._tree.txt +2 -2
  68. package/_not-found.html +1 -1
  69. package/_not-found.txt +12 -12
  70. package/boats/boats.json +40 -5
  71. package/index.html +1 -1
  72. package/index.txt +11 -11
  73. package/package.json +14 -14
  74. package/settings/__next._full.txt +14 -14
  75. package/settings/__next._tree.txt +2 -2
  76. package/settings/__next.settings.__PAGE__.txt +22 -5
  77. package/settings.html +1 -1
  78. package/settings.txt +14 -14
  79. package/__next._head.txt +0 -6
  80. package/__next._index.txt +0 -5
  81. package/_next/static/chunks/0-z15txb4-uhu.js +0 -409
  82. package/_next/static/chunks/009rlietvsaq2.js +0 -1
  83. package/_next/static/chunks/070stlm97b9a2.js +0 -1
  84. package/_next/static/chunks/0abo2oxxw3hpi.js +0 -1
  85. package/_next/static/chunks/0jzbiie0nzar2.js +0 -1
  86. package/_next/static/chunks/0kinaai2rvd43.js +0 -9
  87. package/_next/static/chunks/0l9s4rhr00adq.js +0 -1
  88. package/_next/static/chunks/0qj7yy4f6sk8y.js +0 -455
  89. package/_next/static/chunks/0ri_um14-5x7u.js +0 -1
  90. package/_next/static/chunks/0uvr7xkt_5uno.js +0 -1
  91. package/_next/static/chunks/0yf1ifg_o1bq6.js +0 -1
  92. package/_next/static/chunks/0zbzk2ob0li1n.js +0 -1
  93. package/_next/static/chunks/0zjxnzbxh76mt.js +0 -1
  94. package/_next/static/chunks/17ma1x64d-211.js +0 -1
  95. package/_next/static/chunks/19xb2y6sgfnza.js +0 -1
  96. package/_next/static/chunks/1bz0tcmhjmjgh.js +0 -1
  97. package/_next/static/chunks/1d4h-sglyo8ft.js +0 -1
  98. package/_next/static/chunks/1gizigk3w6q7j.js +0 -31
  99. package/_next/static/chunks/1ptwltjb3h6jf.js +0 -4
  100. package/_next/static/chunks/1q572rz5m8mb-.js +0 -1
  101. package/_next/static/chunks/1rkf8qtk5-48h.js +0 -1
  102. package/_next/static/chunks/1sq_733weprvs.js +0 -1
  103. package/_next/static/chunks/26e1o1as-77nq.js +0 -172
  104. package/_next/static/chunks/27hn45pv56pv7.js +0 -393
  105. package/_next/static/chunks/28y-j215vt42m.js +0 -1
  106. package/_next/static/chunks/2a0yjir_3mk1m.js +0 -1
  107. package/_next/static/chunks/2atijj_pkc4uc.js +0 -2
  108. package/_next/static/chunks/2ccpehidlaq88.js +0 -1
  109. package/_next/static/chunks/2fy4q1c5l3tpj.js +0 -1
  110. package/_next/static/chunks/2lvvt2f1l5sfu.js +0 -1
  111. package/_next/static/chunks/2lw7kypuhij1_.css +0 -3
  112. package/_next/static/chunks/2nd5amcst4lhp.js +0 -1
  113. package/_next/static/chunks/2pwmb4pkqygy_.js +0 -1
  114. package/_next/static/chunks/2q_83f24jeg0e.js +0 -1
  115. package/_next/static/chunks/2rsdqsatgq9ta.js +0 -1
  116. package/_next/static/chunks/2udirievybq_j.js +0 -1
  117. package/_next/static/chunks/2urimbxg5bqv3.js +0 -1
  118. package/_next/static/chunks/32cbrrsp-x35l.js +0 -1
  119. package/_next/static/chunks/36ra6xjie0dsv.js +0 -9
  120. package/_next/static/chunks/3iuz3f0429awx.js +0 -1
  121. package/_next/static/chunks/3jh1u-s3k0bkk.js +0 -1
  122. package/_next/static/chunks/3jupxlga7r_do.js +0 -1
  123. package/_next/static/chunks/3m57lnggu30tr.js +0 -243
  124. package/_next/static/chunks/3myql5zu0rstt.js +0 -425
  125. package/_next/static/chunks/3rhgquok36e79.js +0 -1
  126. package/_next/static/chunks/42dfiu6iby3fq.js +0 -1
  127. package/_next/static/chunks/43ps2cu5ahf8n.js +0 -3
  128. package/_next/static/chunks/turbopack-0pirmko-w-775.js +0 -1
  129. package/_not-found/__next._head.txt +0 -6
  130. package/_not-found/__next._index.txt +0 -5
  131. package/_not-found/__next._not-found.txt +0 -5
  132. package/boats/ais/ais-30.glb +0 -0
  133. package/boats/ais/ais-31.glb +0 -0
  134. package/boats/ais/ais-35.glb +0 -0
  135. package/boats/ais/ais-36.glb +0 -0
  136. package/boats/ais/ais-37.glb +0 -0
  137. package/boats/ais/ais-40.glb +0 -0
  138. package/boats/ais/ais-50.glb +0 -0
  139. package/boats/ais/ais-60.glb +0 -0
  140. package/boats/ais/ais-70.glb +0 -0
  141. package/boats/ais/ais-80.glb +0 -0
  142. package/settings/__next._head.txt +0 -6
  143. package/settings/__next._index.txt +0 -5
  144. package/settings/__next.settings.txt +0 -5
  145. /package/_next/static/{sct9rcMTcCyBLHTxQQ75- → baa0rBM5TIECz8JV_tLT6}/_buildManifest.js +0 -0
  146. /package/_next/static/{sct9rcMTcCyBLHTxQQ75- → baa0rBM5TIECz8JV_tLT6}/_clientMiddlewareManifest.js +0 -0
  147. /package/_next/static/{sct9rcMTcCyBLHTxQQ75- → baa0rBM5TIECz8JV_tLT6}/_ssgManifest.js +0 -0
@@ -1,425 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43216,e=>{"use strict";let t,i;var n=e.i(31067),r=e.i(71645),a=e.i(90072),o=e.i(28600),s=a,l=a;let d=new l.Box3,u=new l.Vector3;class f extends l.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new l.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new l.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let i=new l.InstancedInterleavedBuffer(t,6,1);return this.setAttribute("instanceStart",new l.InterleavedBufferAttribute(i,3,0)),this.setAttribute("instanceEnd",new l.InterleavedBufferAttribute(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));let n=new l.InstancedInterleavedBuffer(i,2*t,1);return this.setAttribute("instanceColorStart",new l.InterleavedBufferAttribute(n,t,0)),this.setAttribute("instanceColorEnd",new l.InterleavedBufferAttribute(n,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new l.WireframeGeometry(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new l.Box3);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),d.setFromBufferAttribute(t),this.boundingBox.union(d))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new l.Sphere),null===this.boundingBox&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){let i=this.boundingSphere.center;this.boundingBox.getCenter(i);let n=0;for(let r=0,a=e.count;r<a;r++)u.fromBufferAttribute(e,r),n=Math.max(n,i.distanceToSquared(u)),u.fromBufferAttribute(t,r),n=Math.max(n,i.distanceToSquared(u));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}var c=a,p=e.i(8560),h=e.i(31497);class m extends c.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:c.UniformsUtils.clone(c.UniformsUtils.merge([p.UniformsLib.common,p.UniformsLib.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new c.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
2
- #include <common>
3
- #include <fog_pars_vertex>
4
- #include <logdepthbuf_pars_vertex>
5
- #include <clipping_planes_pars_vertex>
6
-
7
- uniform float linewidth;
8
- uniform vec2 resolution;
9
-
10
- attribute vec3 instanceStart;
11
- attribute vec3 instanceEnd;
12
-
13
- #ifdef USE_COLOR
14
- #ifdef USE_LINE_COLOR_ALPHA
15
- varying vec4 vLineColor;
16
- attribute vec4 instanceColorStart;
17
- attribute vec4 instanceColorEnd;
18
- #else
19
- varying vec3 vLineColor;
20
- attribute vec3 instanceColorStart;
21
- attribute vec3 instanceColorEnd;
22
- #endif
23
- #endif
24
-
25
- #ifdef WORLD_UNITS
26
-
27
- varying vec4 worldPos;
28
- varying vec3 worldStart;
29
- varying vec3 worldEnd;
30
-
31
- #ifdef USE_DASH
32
-
33
- varying vec2 vUv;
34
-
35
- #endif
36
-
37
- #else
38
-
39
- varying vec2 vUv;
40
-
41
- #endif
42
-
43
- #ifdef USE_DASH
44
-
45
- uniform float dashScale;
46
- attribute float instanceDistanceStart;
47
- attribute float instanceDistanceEnd;
48
- varying float vLineDistance;
49
-
50
- #endif
51
-
52
- void trimSegment( const in vec4 start, inout vec4 end ) {
53
-
54
- // trim end segment so it terminates between the camera plane and the near plane
55
-
56
- // conservative estimate of the near plane
57
- float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
58
- float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
59
- float nearEstimate = - 0.5 * b / a;
60
-
61
- float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
62
-
63
- end.xyz = mix( start.xyz, end.xyz, alpha );
64
-
65
- }
66
-
67
- void main() {
68
-
69
- #ifdef USE_COLOR
70
-
71
- vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
72
-
73
- #endif
74
-
75
- #ifdef USE_DASH
76
-
77
- vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
78
- vUv = uv;
79
-
80
- #endif
81
-
82
- float aspect = resolution.x / resolution.y;
83
-
84
- // camera space
85
- vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
86
- vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
87
-
88
- #ifdef WORLD_UNITS
89
-
90
- worldStart = start.xyz;
91
- worldEnd = end.xyz;
92
-
93
- #else
94
-
95
- vUv = uv;
96
-
97
- #endif
98
-
99
- // special case for perspective projection, and segments that terminate either in, or behind, the camera plane
100
- // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
101
- // but we need to perform ndc-space calculations in the shader, so we must address this issue directly
102
- // perhaps there is a more elegant solution -- WestLangley
103
-
104
- bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
105
-
106
- if ( perspective ) {
107
-
108
- if ( start.z < 0.0 && end.z >= 0.0 ) {
109
-
110
- trimSegment( start, end );
111
-
112
- } else if ( end.z < 0.0 && start.z >= 0.0 ) {
113
-
114
- trimSegment( end, start );
115
-
116
- }
117
-
118
- }
119
-
120
- // clip space
121
- vec4 clipStart = projectionMatrix * start;
122
- vec4 clipEnd = projectionMatrix * end;
123
-
124
- // ndc space
125
- vec3 ndcStart = clipStart.xyz / clipStart.w;
126
- vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
127
-
128
- // direction
129
- vec2 dir = ndcEnd.xy - ndcStart.xy;
130
-
131
- // account for clip-space aspect ratio
132
- dir.x *= aspect;
133
- dir = normalize( dir );
134
-
135
- #ifdef WORLD_UNITS
136
-
137
- // get the offset direction as perpendicular to the view vector
138
- vec3 worldDir = normalize( end.xyz - start.xyz );
139
- vec3 offset;
140
- if ( position.y < 0.5 ) {
141
-
142
- offset = normalize( cross( start.xyz, worldDir ) );
143
-
144
- } else {
145
-
146
- offset = normalize( cross( end.xyz, worldDir ) );
147
-
148
- }
149
-
150
- // sign flip
151
- if ( position.x < 0.0 ) offset *= - 1.0;
152
-
153
- float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );
154
-
155
- // don't extend the line if we're rendering dashes because we
156
- // won't be rendering the endcaps
157
- #ifndef USE_DASH
158
-
159
- // extend the line bounds to encompass endcaps
160
- start.xyz += - worldDir * linewidth * 0.5;
161
- end.xyz += worldDir * linewidth * 0.5;
162
-
163
- // shift the position of the quad so it hugs the forward edge of the line
164
- offset.xy -= dir * forwardOffset;
165
- offset.z += 0.5;
166
-
167
- #endif
168
-
169
- // endcaps
170
- if ( position.y > 1.0 || position.y < 0.0 ) {
171
-
172
- offset.xy += dir * 2.0 * forwardOffset;
173
-
174
- }
175
-
176
- // adjust for linewidth
177
- offset *= linewidth * 0.5;
178
-
179
- // set the world position
180
- worldPos = ( position.y < 0.5 ) ? start : end;
181
- worldPos.xyz += offset;
182
-
183
- // project the worldpos
184
- vec4 clip = projectionMatrix * worldPos;
185
-
186
- // shift the depth of the projected points so the line
187
- // segments overlap neatly
188
- vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
189
- clip.z = clipPose.z * clip.w;
190
-
191
- #else
192
-
193
- vec2 offset = vec2( dir.y, - dir.x );
194
- // undo aspect ratio adjustment
195
- dir.x /= aspect;
196
- offset.x /= aspect;
197
-
198
- // sign flip
199
- if ( position.x < 0.0 ) offset *= - 1.0;
200
-
201
- // endcaps
202
- if ( position.y < 0.0 ) {
203
-
204
- offset += - dir;
205
-
206
- } else if ( position.y > 1.0 ) {
207
-
208
- offset += dir;
209
-
210
- }
211
-
212
- // adjust for linewidth
213
- offset *= linewidth;
214
-
215
- // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
216
- offset /= resolution.y;
217
-
218
- // select end
219
- vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
220
-
221
- // back to clip space
222
- offset *= clip.w;
223
-
224
- clip.xy += offset;
225
-
226
- #endif
227
-
228
- gl_Position = clip;
229
-
230
- vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
231
-
232
- #include <logdepthbuf_vertex>
233
- #include <clipping_planes_vertex>
234
- #include <fog_vertex>
235
-
236
- }
237
- `,fragmentShader:`
238
- uniform vec3 diffuse;
239
- uniform float opacity;
240
- uniform float linewidth;
241
-
242
- #ifdef USE_DASH
243
-
244
- uniform float dashOffset;
245
- uniform float dashSize;
246
- uniform float gapSize;
247
-
248
- #endif
249
-
250
- varying float vLineDistance;
251
-
252
- #ifdef WORLD_UNITS
253
-
254
- varying vec4 worldPos;
255
- varying vec3 worldStart;
256
- varying vec3 worldEnd;
257
-
258
- #ifdef USE_DASH
259
-
260
- varying vec2 vUv;
261
-
262
- #endif
263
-
264
- #else
265
-
266
- varying vec2 vUv;
267
-
268
- #endif
269
-
270
- #include <common>
271
- #include <fog_pars_fragment>
272
- #include <logdepthbuf_pars_fragment>
273
- #include <clipping_planes_pars_fragment>
274
-
275
- #ifdef USE_COLOR
276
- #ifdef USE_LINE_COLOR_ALPHA
277
- varying vec4 vLineColor;
278
- #else
279
- varying vec3 vLineColor;
280
- #endif
281
- #endif
282
-
283
- vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
284
-
285
- float mua;
286
- float mub;
287
-
288
- vec3 p13 = p1 - p3;
289
- vec3 p43 = p4 - p3;
290
-
291
- vec3 p21 = p2 - p1;
292
-
293
- float d1343 = dot( p13, p43 );
294
- float d4321 = dot( p43, p21 );
295
- float d1321 = dot( p13, p21 );
296
- float d4343 = dot( p43, p43 );
297
- float d2121 = dot( p21, p21 );
298
-
299
- float denom = d2121 * d4343 - d4321 * d4321;
300
-
301
- float numer = d1343 * d4321 - d1321 * d4343;
302
-
303
- mua = numer / denom;
304
- mua = clamp( mua, 0.0, 1.0 );
305
- mub = ( d1343 + d4321 * ( mua ) ) / d4343;
306
- mub = clamp( mub, 0.0, 1.0 );
307
-
308
- return vec2( mua, mub );
309
-
310
- }
311
-
312
- void main() {
313
-
314
- #include <clipping_planes_fragment>
315
-
316
- #ifdef USE_DASH
317
-
318
- if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
319
-
320
- if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
321
-
322
- #endif
323
-
324
- float alpha = opacity;
325
-
326
- #ifdef WORLD_UNITS
327
-
328
- // Find the closest points on the view ray and the line segment
329
- vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
330
- vec3 lineDir = worldEnd - worldStart;
331
- vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
332
-
333
- vec3 p1 = worldStart + lineDir * params.x;
334
- vec3 p2 = rayEnd * params.y;
335
- vec3 delta = p1 - p2;
336
- float len = length( delta );
337
- float norm = len / linewidth;
338
-
339
- #ifndef USE_DASH
340
-
341
- #ifdef USE_ALPHA_TO_COVERAGE
342
-
343
- float dnorm = fwidth( norm );
344
- alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
345
-
346
- #else
347
-
348
- if ( norm > 0.5 ) {
349
-
350
- discard;
351
-
352
- }
353
-
354
- #endif
355
-
356
- #endif
357
-
358
- #else
359
-
360
- #ifdef USE_ALPHA_TO_COVERAGE
361
-
362
- // artifacts appear on some hardware if a derivative is taken within a conditional
363
- float a = vUv.x;
364
- float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
365
- float len2 = a * a + b * b;
366
- float dlen = fwidth( len2 );
367
-
368
- if ( abs( vUv.y ) > 1.0 ) {
369
-
370
- alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
371
-
372
- }
373
-
374
- #else
375
-
376
- if ( abs( vUv.y ) > 1.0 ) {
377
-
378
- float a = vUv.x;
379
- float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
380
- float len2 = a * a + b * b;
381
-
382
- if ( len2 > 1.0 ) discard;
383
-
384
- }
385
-
386
- #endif
387
-
388
- #endif
389
-
390
- vec4 diffuseColor = vec4( diffuse, alpha );
391
- #ifdef USE_COLOR
392
- #ifdef USE_LINE_COLOR_ALPHA
393
- diffuseColor *= vLineColor;
394
- #else
395
- diffuseColor.rgb *= vLineColor;
396
- #endif
397
- #endif
398
-
399
- #include <logdepthbuf_fragment>
400
-
401
- gl_FragColor = diffuseColor;
402
-
403
- #include <tonemapping_fragment>
404
- #include <${h.version>=154?"colorspace_fragment":"encodings_fragment"}>
405
- #include <fog_fragment>
406
- #include <premultiplied_alpha_fragment>
407
-
408
- }
409
- `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}let v=h.version>=125?"uv1":"uv2",g=new s.Vector4,y=new s.Vector3,S=new s.Vector3,x=new s.Vector4,w=new s.Vector4,b=new s.Vector4,E=new s.Vector3,A=new s.Matrix4,_=new s.Line3,L=new s.Vector3,U=new s.Box3,M=new s.Sphere,z=new s.Vector4;function B(e,t,n){return z.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),z.multiplyScalar(1/z.w),z.x=i/n.width,z.y=i/n.height,z.applyMatrix4(e.projectionMatrixInverse),z.multiplyScalar(1/z.w),Math.abs(Math.max(z.x,z.y))}class C extends s.Mesh{constructor(e=new f,t=new m({color:0xffffff*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,i=e.attributes.instanceEnd,n=new Float32Array(2*t.count);for(let e=0,r=0,a=t.count;e<a;e++,r+=2)y.fromBufferAttribute(t,e),S.fromBufferAttribute(i,e),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+y.distanceTo(S);let r=new s.InstancedInterleavedBuffer(n,2,1);return e.setAttribute("instanceDistanceStart",new s.InterleavedBufferAttribute(r,1,0)),e.setAttribute("instanceDistanceEnd",new s.InterleavedBufferAttribute(r,1,1)),this}raycast(e,n){let r,a,o=this.material.worldUnits,l=e.camera;null!==l||o||console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');let d=void 0!==e.params.Line2&&e.params.Line2.threshold||0;t=e.ray;let u=this.matrixWorld,f=this.geometry,c=this.material;if(i=c.linewidth+d,null===f.boundingSphere&&f.computeBoundingSphere(),M.copy(f.boundingSphere).applyMatrix4(u),o)r=.5*i;else{let e=Math.max(l.near,M.distanceToPoint(t.origin));r=B(l,e,c.resolution)}if(M.radius+=r,!1!==t.intersectsSphere(M)){if(null===f.boundingBox&&f.computeBoundingBox(),U.copy(f.boundingBox).applyMatrix4(u),o)a=.5*i;else{let e=Math.max(l.near,U.distanceToPoint(t.origin));a=B(l,e,c.resolution)}U.expandByScalar(a),!1!==t.intersectsBox(U)&&(o?function(e,n){let r=e.matrixWorld,a=e.geometry,o=a.attributes.instanceStart,l=a.attributes.instanceEnd,d=Math.min(a.instanceCount,o.count);for(let a=0;a<d;a++){_.start.fromBufferAttribute(o,a),_.end.fromBufferAttribute(l,a),_.applyMatrix4(r);let d=new s.Vector3,u=new s.Vector3;t.distanceSqToSegment(_.start,_.end,u,d),u.distanceTo(d)<.5*i&&n.push({point:u,pointOnLine:d,distance:t.origin.distanceTo(u),object:e,face:null,faceIndex:a,uv:null,[v]:null})}}(this,n):function(e,n,r){let a=n.projectionMatrix,o=e.material.resolution,l=e.matrixWorld,d=e.geometry,u=d.attributes.instanceStart,f=d.attributes.instanceEnd,c=Math.min(d.instanceCount,u.count),p=-n.near;t.at(1,b),b.w=1,b.applyMatrix4(n.matrixWorldInverse),b.applyMatrix4(a),b.multiplyScalar(1/b.w),b.x*=o.x/2,b.y*=o.y/2,b.z=0,E.copy(b),A.multiplyMatrices(n.matrixWorldInverse,l);for(let n=0;n<c;n++){if(x.fromBufferAttribute(u,n),w.fromBufferAttribute(f,n),x.w=1,w.w=1,x.applyMatrix4(A),w.applyMatrix4(A),x.z>p&&w.z>p)continue;if(x.z>p){let e=x.z-w.z,t=(x.z-p)/e;x.lerp(w,t)}else if(w.z>p){let e=w.z-x.z,t=(w.z-p)/e;w.lerp(x,t)}x.applyMatrix4(a),w.applyMatrix4(a),x.multiplyScalar(1/x.w),w.multiplyScalar(1/w.w),x.x*=o.x/2,x.y*=o.y/2,w.x*=o.x/2,w.y*=o.y/2,_.start.copy(x),_.start.z=0,_.end.copy(w),_.end.z=0;let d=_.closestPointToPointParameter(E,!0);_.at(d,L);let c=s.MathUtils.lerp(x.z,w.z,d),h=c>=-1&&c<=1,m=E.distanceTo(L)<.5*i;if(h&&m){_.start.fromBufferAttribute(u,n),_.end.fromBufferAttribute(f,n),_.start.applyMatrix4(l),_.end.applyMatrix4(l);let i=new s.Vector3,a=new s.Vector3;t.distanceSqToSegment(_.start,_.end,a,i),r.push({point:a,pointOnLine:i,distance:t.origin.distanceTo(a),object:e,face:null,faceIndex:n,uv:null,[v]:null})}}}(this,l,n))}}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(g),this.material.uniforms.resolution.value.set(g.z,g.w))}}class O extends f{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){let t=e.length-3,i=new Float32Array(2*t);for(let n=0;n<t;n+=3)i[2*n]=e[n],i[2*n+1]=e[n+1],i[2*n+2]=e[n+2],i[2*n+3]=e[n+3],i[2*n+4]=e[n+4],i[2*n+5]=e[n+5];return super.setPositions(i),this}setColors(e,t=3){let i=e.length-t,n=new Float32Array(2*i);if(3===t)for(let r=0;r<i;r+=t)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];else for(let r=0;r<i;r+=t)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5],n[2*r+6]=e[r+6],n[2*r+7]=e[r+7];return super.setColors(n,t),this}fromLine(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class P extends C{constructor(e=new O,t=new m({color:0xffffff*Math.random()})){super(e,t),this.isLine2=!0,this.type="Line2"}}let j=r.forwardRef(function({points:e,color:t=0xffffff,vertexColors:i,linewidth:s,lineWidth:l,segments:d,dashed:u,...c},p){var h,v;let g=(0,o.useThree)(e=>e.size),y=r.useMemo(()=>d?new C:new P,[d]),[S]=r.useState(()=>new m),x=(null==i||null==(h=i[0])?void 0:h.length)===4?4:3,w=r.useMemo(()=>{let n=d?new f:new O,r=e.map(e=>{let t=Array.isArray(e);return e instanceof a.Vector3||e instanceof a.Vector4?[e.x,e.y,e.z]:e instanceof a.Vector2?[e.x,e.y,0]:t&&3===e.length?[e[0],e[1],e[2]]:t&&2===e.length?[e[0],e[1],0]:e});if(n.setPositions(r.flat()),i){t=0xffffff;let e=i.map(e=>e instanceof a.Color?e.toArray():e);n.setColors(e.flat(),x)}return n},[e,d,i,x]);return r.useLayoutEffect(()=>{y.computeLineDistances()},[e,y]),r.useLayoutEffect(()=>{u?S.defines.USE_DASH="":delete S.defines.USE_DASH,S.needsUpdate=!0},[u,S]),r.useEffect(()=>()=>{w.dispose(),S.dispose()},[w]),r.createElement("primitive",(0,n.default)({object:y,ref:p},c),r.createElement("primitive",{object:w,attach:"geometry"}),r.createElement("primitive",(0,n.default)({object:S,attach:"material",color:t,vertexColors:!!i,resolution:[g.width,g.height],linewidth:null!=(v=null!=s?s:l)?v:1,dashed:u,transparent:4===x},c)))});e.s(["Line",0,j],43216)},8418,e=>{"use strict";var t=e.i(43476),i=e.i(71645),n=e.i(28600),r=e.i(30297),a=e.i(82897),o=e.i(60099),s=e.i(43257),l=e.i(90072),d=e.i(67561),u=e.i(66326),f=e.i(43216),c=e.i(85709),p=e.i(48390);let h=(e,t)=>{let i=e=>e*Math.PI/180,n=i(t.latitude),r=i(e.latitude);return[6371e3*i(e.longitude-t.longitude)*Math.cos((n+r)/2)/1,-(6371e3*(r-n))/1]},m=()=>{let e=(0,c.useSignalKPath)("navigation.position"),n=(0,c.useSignalKPath)("navigation.anchor.position"),r=(0,c.useSignalKPath)("navigation.anchor.maxRadius"),a=(0,c.useSignalKPath)("navigation.headingTrue"),o=(0,c.useSignalKPath)("navigation.headingMagnetic"),s=(0,c.useSignalKPath)("navigation.courseOverGroundTrue"),[l,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=!1,t=null,i=0,n=!1,r=e=>{t&&clearInterval(t),t=setInterval(a,e)},a=async()=>{if(!n){n=!0;try{let t=await (0,p.getAnchorTrack)();if(e)return;i>=3&&r(15e3),i=0,u(Array.isArray(t?.track)?t.track:[])}catch{if(e)return;3==++i&&r(12e4)}finally{n=!1}}};return a(),r(15e3),()=>{e=!0,t&&clearInterval(t)}},[]);let m=(0,i.useMemo)(()=>n?.latitude!=null&&n?.longitude!=null?{latitude:n.latitude,longitude:n.longitude}:null,[n]),v=Number.isFinite(r)&&r>0,g=(v?r:30)/1,y=(0,i.useMemo)(()=>{if(e?.latitude==null||e?.longitude==null)return null;if(!m)return[0,-6.9,0];let[t,i]=h(m,e);return[t,-6.9,i]},[m,e]),S=(0,i.useMemo)(()=>{let e=a??o??s??0;return Number.isFinite(e)?e:0},[a,o,s]),x=(0,i.useMemo)(()=>{let e=[];for(let t=0;t<=64;t++){let i=t/64*Math.PI*2;e.push([g*Math.cos(i),0,g*Math.sin(i)])}return e},[g]),w=(0,i.useMemo)(()=>x.map(([e,t,i])=>[.8*e,t,.8*i]),[x]),b=(0,i.useMemo)(()=>{if(e?.latitude==null||e?.longitude==null||!l.length)return null;let t=l.filter(e=>Number.isFinite(e?.latitude)&&Number.isFinite(e?.longitude)).map(t=>{let[i,n]=h(t,e);return[i,-6.9+.05,n]});return t.push([0,-6.9+.05,0]),t.length>=2?t:null},[l,e]),E=(0,i.useMemo)(()=>y&&m?[y,[0,-6.9,0]]:null,[y,m]);if(!y)return null;let A=null!==m&&v&&Math.hypot(y[0],y[2])>g;return(0,t.jsxs)("group",{rotation:[0,S,0],children:[(0,t.jsxs)("group",{position:y,children:[(0,t.jsx)(f.Line,{points:x,color:A?d.oRed:d.oYellow,lineWidth:2,transparent:!0,opacity:.7}),(0,t.jsx)(f.Line,{points:w,color:d.oGray,lineWidth:1,dashed:!0,dashSize:2,gapSize:2,transparent:!0,opacity:.35}),(0,t.jsxs)("mesh",{position:[0,.1,0],rotation:[-Math.PI/2,0,0],children:[(0,t.jsx)("circleGeometry",{args:[Math.max(.6,.03*g),16]}),(0,t.jsx)("meshBasicMaterial",{color:d.oYellow,transparent:!0,opacity:.9})]})]}),E&&(0,t.jsx)(f.Line,{points:E,color:d.oGray,lineWidth:1,transparent:!0,opacity:.5}),b&&(0,t.jsx)(f.Line,{points:b,color:A?d.oRed:d.oYellow,lineWidth:2,transparent:!0,opacity:.85})]})};e.s(["default",0,({onUpdateInfoPanel:e})=>{let f=(0,i.useRef)(),{size:c}=(0,n.useThree)(),{nightMode:p}=(0,d.useOcearoContext)(),h=c.width/c.height;return(0,t.jsxs)(i.Suspense,{fallback:(0,t.jsx)(o.Html,{children:"Loading..."}),children:[(0,t.jsx)(a.PerspectiveCamera,{makeDefault:!0,fov:25,aspect:h,near:1,far:1e3,position:[32,10,-32]}),(0,t.jsx)(r.OrbitControls,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4}),(0,t.jsx)(s.Environment,{files:"./assets/ocearo_env.hdr",background:!1}),(0,t.jsx)("ambientLight",{intensity:.2}),(0,t.jsx)("directionalLight",{position:[15,30,20],intensity:1.2,castShadow:!1,color:p?"#b0d8ff":"#ffffff"}),(0,t.jsx)("spotLight",{position:[0,50,100],intensity:.8,angle:.6,penumbra:1,color:p?"#4080ff":"#ffffff"}),(0,t.jsx)("pointLight",{position:[-10,10,-10],intensity:.5}),(0,t.jsx)(u.default,{ref:f,scale:[1.3,1.3,1.3],position:[0,-6,0],onUpdateInfoPanel:e}),(0,t.jsx)(m,{}),(0,t.jsxs)("mesh",{rotation:[-Math.PI/2,0,0],position:[0,-7,0],receiveShadow:!0,children:[(0,t.jsx)("planeGeometry",{args:[100,100]}),(0,t.jsx)("shaderMaterial",{uniforms:{uColor:{value:new l.Color(p?"#050505":"#0a0a0a")},uBlurRadius:{value:.15}},vertexShader:`
410
- varying vec2 vUv;
411
- void main() {
412
- vUv = uv;
413
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
414
- }
415
- `,fragmentShader:`
416
- uniform vec3 uColor;
417
- uniform float uBlurRadius;
418
- varying vec2 vUv;
419
-
420
- void main() {
421
- float distanceToCenter = length(vUv - vec2(0.5));
422
- float alpha = smoothstep(0.5 - uBlurRadius, 0.5 + uBlurRadius, distanceToCenter);
423
- gl_FragColor = vec4(uColor, 1.0 - alpha);
424
- }
425
- `})]})]})}],8418)},69675,e=>{e.n(e.i(8418))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,39896,e=>{"use strict";var t=e.i(43476),a=e.i(71645),i=e.i(67561),r=e.i(46991),l=e.i(85709),n=e.i(72466),s=e.i(49721),o=e.i(68757),c=e.i(88653),d=e.i(46932);e.i(85269);var u=e.i(22831),m=e.i(48390);let p=e=>Number.isFinite(e)?`${(e/1e9).toFixed(1)} GB`:"--",x=(e,t,a)=>Number.isFinite(e)?e>=a?"text-oRed":e>=t?"text-oYellow":"text-oGreen":"text-hud-muted",h=({label:e,value:a,unit:i,percent:r,warn:l,critical:n,icon:o})=>{let c=x(r??a,l,n);return(0,t.jsxs)("div",{className:"tesla-card p-4 bg-hud-elevated rounded-sm border border-hud",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,t.jsxs)("span",{className:"text-hud-secondary text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:o,className:"mr-2 opacity-60"}),e]})}),(0,t.jsxs)("div",{className:`text-3xl font-black gliding-value ${c}`,children:[Number.isFinite(a)?a:"--",(0,t.jsx)("span",{className:"text-sm ml-1 opacity-60",children:i})]}),Number.isFinite(r)&&(0,t.jsx)("div",{className:"mt-3 h-1 bg-hud rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:`h-full transition-all duration-700 ${c.replace("text-","bg-")}`,style:{width:`${Math.min(Math.max(r,0),100)}%`}})})]})},f=()=>{let{t:e}=(0,u.useTranslation)(),[i,r]=(0,a.useState)(null),[l,n]=(0,a.useState)(null),c=(0,a.useCallback)(async()=>{try{let e=await (0,m.makeOcearoCoreApiCall)("/system/metrics?top=8");r(e),n(null)}catch(e){n(e.message)}},[]);if((0,a.useEffect)(()=>{c();let e=setInterval(c,5e3);return()=>clearInterval(e)},[c]),l&&!i)return(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-hud-muted text-sm font-black uppercase tracking-widest",children:e("battery.rpiUnavailable")});let d=i?.cpu??{},f=i?.memory??{},b=i?.disk??{},v=d.throttling,y=v&&(v.underVoltageNow||v.throttledNow||v.softTempLimitNow||v.frequencyCappedNow),g=v&&(v.underVoltageSinceBoot||v.throttledSinceBoot||v.softTempLimitSinceBoot||v.frequencyCappedSinceBoot);return(0,t.jsxs)("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)("span",{className:"text-hud-main text-sm font-black uppercase tracking-widest",children:i?.hostname??"--"}),(0,t.jsxs)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest",children:[e("battery.rpiUptime")," ",(e=>{if(!Number.isFinite(e))return"--";let t=Math.floor(e/86400),a=Math.floor(e%86400/3600),i=Math.floor(e%3600/60);return[t&&`${t}d`,(t||a)&&`${a}h`,`${i}m`].filter(Boolean).join(" ")})(i?.uptimeSeconds)]})]}),y&&(0,t.jsxs)("div",{className:"flex items-center p-3 rounded-sm border border-oRed/40 bg-oRed/10 text-oRed text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:o.faTriangleExclamation,className:"mr-2"}),e(v.softTempLimitNow||v.throttledNow?"battery.rpiThrottlingHeat":"battery.rpiThrottlingPower")]}),!y&&g&&(0,t.jsxs)("div",{className:"flex items-center p-3 rounded-sm border border-oYellow/40 bg-oYellow/10 text-oYellow text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:o.faTriangleExclamation,className:"mr-2"}),e("battery.rpiThrottlingPast")]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)(h,{label:e("battery.rpiTemperature"),icon:o.faTemperatureHalf,value:d.temperature,unit:"°C",percent:d.temperature,warn:70,critical:80}),(0,t.jsx)(h,{label:e("battery.rpiCpu"),icon:o.faMicrochip,value:d.percent,unit:"%",percent:d.percent,warn:70,critical:90}),(0,t.jsx)(h,{label:e("battery.rpiMemory"),icon:o.faMemory,value:f.usedPercent,unit:"%",percent:f.usedPercent,warn:75,critical:90}),(0,t.jsx)(h,{label:e("battery.rpiDisk"),icon:o.faHardDrive,value:b.usedPercent,unit:"%",percent:b.usedPercent,warn:80,critical:92})]}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3 text-center",children:[{label:e("battery.rpiLoad"),value:d.loadAverage?d.loadAverage.join(" "):"--"},{label:e("battery.rpiRam"),value:`${p(f.used)} / ${p(f.total)}`},{label:e("battery.rpiSwap"),value:p(f.swapUsed)}].map(e=>(0,t.jsxs)("div",{className:"tesla-card p-3 bg-hud-elevated rounded-sm border border-hud",children:[(0,t.jsx)("div",{className:"text-hud-muted text-[10px] font-black uppercase tracking-widest",children:e.label}),(0,t.jsx)("div",{className:"text-hud-main text-sm font-black gliding-value mt-1",children:e.value})]},e.label))}),(0,t.jsxs)("div",{className:"tesla-card bg-hud-elevated rounded-sm border border-hud overflow-hidden",children:[(0,t.jsx)("div",{className:"px-4 py-2 border-b border-hud text-hud-secondary text-xs font-black uppercase tracking-widest",children:e("battery.rpiTopProcesses")}),(0,t.jsx)("table",{className:"w-full text-xs font-black",children:(0,t.jsx)("tbody",{className:"divide-y divide-hud",children:(i?.processes??[]).map(e=>{let a;return(0,t.jsxs)("tr",{className:"text-hud-main",children:[(0,t.jsx)("td",{className:"px-4 py-2 truncate max-w-[10rem] normal-case",children:e.name}),(0,t.jsx)("td",{className:"px-2 py-2 text-hud-muted font-mono",children:e.pid}),(0,t.jsx)("td",{className:`px-2 py-2 text-right gliding-value ${x(e.cpuPercent,50,100)}`,children:Number.isFinite(e.cpuPercent)?`${e.cpuPercent}%`:"--"}),(0,t.jsx)("td",{className:"px-4 py-2 text-right text-hud-secondary gliding-value",children:Number.isFinite(a=e.memoryBytes)?`${Math.round(a/1e6)} MB`:"--"})]},e.pid)})})})]})]})};var b=e.i(25949),v=e.i(33369),y=["axis"],g=(0,a.forwardRef)((e,t)=>a.createElement(v.CartesianChart,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:y,tooltipPayloadSearcher:b.arrayTooltipSearcher,categoricalChartProps:e,ref:t})),j=a,N=e.i(7670),w=e.i(97865),k=e.i(72733),A=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function C(){return(C=Object.assign.bind()).apply(null,arguments)}function O(e,t){return"".concat(t,"px ").concat(e,"px")}var P=e.i(36536),E=e.i(69212),I=e.i(86031),S=e.i(94395),$=e.i(81977),R=e.i(79812),T=e.i(41818),D=e.i(844),L=["children"],B=(0,a.createContext)({data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function F(e){var t=e.children,i=function(e,t){if(null==e)return{};var a,i,r=function(e,t){if(null==e)return{};var a={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;a[i]=e[i]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)a=l[i],-1===t.indexOf(a)&&({}).propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,L);return a.createElement(B.Provider,{value:i},t)}var G=e.i(59798),M=e.i(46710),K=e.i(75337),_=e.i(61849),W=e.i(92860),z=e.i(61764),H=(e,t,a,i)=>(0,z.selectAxisWithScale)(e,"xAxis",t,i),V=(e,t,a,i)=>(0,z.selectTicksOfGraphicalItem)(e,"xAxis",t,i),U=(e,t,a,i)=>(0,z.selectAxisWithScale)(e,"yAxis",a,i),Y=(e,t,a,i)=>(0,z.selectTicksOfGraphicalItem)(e,"yAxis",a,i),q=(0,_.createSelector)([M.selectChartLayout,H,U,V,Y],(e,t,a,i,r)=>(0,R.isCategoricalAxis)(e,"xAxis")?(0,R.getBandSizeOfAxis)(t,i,!1):(0,R.getBandSizeOfAxis)(a,r,!1));function X(e){return"line"===e.type}var Z=(0,_.createSelector)([z.selectUnfilteredCartesianItems,(e,t,a,i,r)=>r],(e,t)=>e.filter(X).find(e=>e.id===t)),J=(0,_.createSelector)([M.selectChartLayout,H,U,V,Y,Z,q,W.selectChartDataWithIndexesIfNotInPanoramaPosition4],(e,t,a,i,r,l,n,s)=>{var o,c=s.chartData,d=s.dataStartIndex,u=s.dataEndIndex;if(null!=l&&null!=t&&null!=a&&null!=i&&null!=r&&0!==i.length&&0!==r.length&&null!=n&&("horizontal"===e||"vertical"===e)){var m,p,x,h,f,b,v,y,g=l.dataKey,j=l.data;if(null!=(o=null!=j&&j.length>0?j:null==c?void 0:c.slice(d,u+1))){return p=(m={layout:e,xAxis:t,yAxis:a,xAxisTicks:i,yAxisTicks:r,dataKey:g,bandSize:n,displayedData:o}).layout,x=m.xAxis,h=m.yAxis,f=m.xAxisTicks,b=m.yAxisTicks,v=m.dataKey,y=m.bandSize,m.displayedData.map((e,t)=>{var a=(0,R.getValueByDataKey)(e,v);if("horizontal"===p){var i=(0,R.getCateCoordinateOfLine)({axis:x,ticks:f,bandSize:y,entry:e,index:t}),r=(0,S.isNullish)(a)?null:h.scale.map(a);return{x:i,y:null!=r?r:null,value:a,payload:e}}var l=(0,S.isNullish)(a)?null:x.scale.map(a),n=(0,R.getCateCoordinateOfLine)({axis:h,ticks:b,bandSize:y,entry:e,index:t});return null==l||null==n?null:{x:l,y:n,value:a,payload:e}}).filter(Boolean)}}}),Q=e.i(27241),ee=e.i(95146),et=e.i(30174),ea=e.i(8436),ei=e.i(51883),er=e.i(52734),el=e.i(15549),en=e.i(91187),es=e.i(57999),eo=e.i(43404),ec=e.i(81583),ed=e.i(18519),eu=e.i(29601),em=e.i(18457),ep=e.i(20135),ex=["id"],eh=["type","layout","connectNulls","needClip","shape","strokeDasharray"],ef=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function eb(){return(eb=Object.assign.bind()).apply(null,arguments)}function ev(e,t){if(null==e)return{};var a,i,r=function(e,t){if(null==e)return{};var a={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;a[i]=e[i]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)a=l[i],-1===t.indexOf(a)&&({}).propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function ey(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)}return a}function eg(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(a),!0).forEach(function(t){var i,r,l;i=e,r=t,l=a[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var i=a.call(e,t||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in i?Object.defineProperty(i,r,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[r]=l}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ey(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var ej={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];if(1===t)return e.flatMap(e=>"removed"===e.status?[]:[e.next]);var a=function(e){var t=0,a=0;for(var i of e)"matched"===i.status&&null!=i.prev.x&&null!=i.next.x&&(t+=i.next.x-i.prev.x,a++);return a>0?t/a:0}(e),i=[];for(var r of e)if("matched"===r.status)i.push(eg(eg({},r.next),{},{x:(0,S.interpolate)(r.prev.x,r.next.x,t),y:(0,S.interpolate)(r.prev.y,r.next.y,t)}));else if("added"===r.status)if(null!=r.next.x){var l=r.next.x-a;i.push(eg(eg({},r.next),{},{x:(0,S.interpolate)(l,r.next.x,t),y:r.next.y}))}else i.push(r.next);else if("removed"===r.status&&null!=r.prev.x){var n=r.prev.x+a;i.push(eg(eg({},r.prev),{},{x:(0,S.interpolate)(r.prev.x,n,t),y:r.prev.y}))}return i},animationMatchBy:ea.matchByIndex,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",shape:function(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,i=e.strokeDasharray,r=e.connectNulls,l=function(e,t){if(null==e)return{};var a,i,r=function(e,t){if(null==e)return{};var a={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;a[i]=e[i]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)a=l[i],-1===t.indexOf(a)&&({}).propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,A);if(null!=t){var n,s,o=l.pathRef,c=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(null!=(s=null==o?void 0:o.current)?s:null);n=i?function(e,t,a){var i=a.length%2!=0?[...a,...a]:a,r=i.reduce((e,t)=>e+t,0);if(!r)return O(t,e);for(var l=Math.floor(e/r),n=e%r,s=[],o=0,c=0;o<i.length;c+=null!=(d=i[o])?d:0,++o){var d,u=i[o];if(null!=u&&c+u>n){s=[...i.slice(0,o),n-c];break}}var m=s.length%2==0?[0,t]:[t];return[...function(e,t){for(var a=[],i=0;i<t;++i)a.push(...e);return a}(i,l),...s,...m].map(e=>"".concat(e,"px")).join(", ")}(t,c,"".concat(i).split(/[,\s]+/gim).map(e=>parseFloat(e))):O(c,t)}else null!=i&&(n=String(i));return a.createElement(k.Curve,C({},l,{connectNulls:null!=r&&r,strokeDasharray:n}))},stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:em.DefaultZIndexes.line,type:"linear"},eN=j.memo(e=>{var t=e.dataKey,a=e.data,i=e.stroke,r=e.strokeWidth,l=e.fill,n=e.name,s=e.hide,o=e.unit,c=e.formatter,d=e.tooltipType,u=e.id,m={dataDefinedOnItem:a,getPosition:S.noop,settings:{stroke:i,strokeWidth:r,fill:l,dataKey:t,nameKey:void 0,name:(0,R.getTooltipNameProp)(n,t),hide:s,type:d,color:i,unit:o,formatter:c,graphicalItemId:u}};return j.createElement(D.SetTooltipEntrySettings,{tooltipEntrySettings:m})});function ew(e){var t=e.clipPathId,a=e.points,i=e.props,r=i.dot,l=i.dataKey,n=i.needClip;i.id;var s=ev(i,ex),o=(0,es.svgPropertiesNoEvents)(s);return j.createElement(I.Dots,{points:a,dot:r,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:o,needClip:n,clipPathId:t})}function ek(e){var t=e.showLabels,a=e.children,i=e.points,r=(0,j.useMemo)(()=>null==i?void 0:i.map(e=>{var t,a,i={x:null!=(t=e.x)?t:0,y:null!=(a=e.y)?a:0,width:0,lowerWidth:0,upperWidth:0,height:0};return eg(eg({},i),{},{value:e.value,payload:e.payload,viewBox:i,parentViewBox:void 0,fill:void 0})}),[i]);return j.createElement(E.CartesianLabelListContextProvider,{value:t?r:void 0},a)}function eA(e){var t=e.clipPathId,a=e.pathRef,i=e.points,r=e.props,l=e.animationElapsedTime,n=e.isAnimating,s=e.isEntrance,o=e.visibleLength,c=r.type,d=r.layout,u=r.connectNulls,m=r.needClip,p=r.shape,x=r.strokeDasharray,h=ev(r,eh),f=eg(eg({},(0,eo.svgPropertiesAndEvents)(h)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:i,type:c,layout:d,connectNulls:u,strokeDasharray:null!=x?x:r.strokeDasharray,pathRef:a,animationElapsedTime:l,isAnimating:n,isEntrance:!!r.animateNewValues&&s,visibleLength:o});return j.createElement(j.Fragment,null,(null==i?void 0:i.length)>1&&j.createElement(ed.Shape,{option:p,DefaultShape:ej.shape,shapeProps:f}),j.createElement(ew,{points:i,clipPathId:t,props:r}))}function eC(e){var t,i,r,l,n=e.clipPathId,s=e.props,o=e.pathRef,c=e.previousPointsRef,d=s.points,u=s.isAnimationActive,m=s.animationBegin,p=s.animationDuration,x=s.animationEasing,h=s.animationMatchBy,f=s.animationInterpolateFn,b=s.layout,v=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(o.current),y=(0,et.useAnimationCallbacks)(s.onAnimationStart,s.onAnimationEnd),g=y.isAnimating,N=y.handleAnimationStart,w=y.handleAnimationEnd,k=(t=(0,a.useRef)(0),i=(0,a.useRef)(0),r=(0,a.useRef)(!1),(l=(0,a.useRef)(d)).current!==d&&(t.current=i.current,l.current=d),(0,a.useCallback)((e,a)=>{if(r.current)return null;var l=Math.min((0,P.round)(t.current+e*a),a);return e>0&&a>0&&(i.current=Math.max(i.current,l),l>=a)?(r.current=!0,null):l},[])),A=(0,j.useCallback)(e=>e>0&&v>0,[v]);return j.createElement(ek,{points:d,showLabels:!g},s.children,j.createElement(et.AnimatedItems,{animationInput:d,animationIdPrefix:"recharts-line-",items:d,previousItemsRef:c,isAnimationActive:u,animationBegin:m,animationDuration:p,animationEasing:x,onAnimationStart:N,onAnimationEnd:w,animationInterpolateFn:f,animationMatchBy:h,shouldUpdatePreviousRef:A,layout:b},(e,t,a)=>{var i=g||t<1,r=i?k(t,v):null;return j.createElement(eA,{props:s,points:e,clipPathId:n,pathRef:o,animationElapsedTime:t,isAnimating:i,isEntrance:a,visibleLength:r})}),j.createElement(E.LabelListFromLabelProp,{label:s.label}))}function eO(e){var t=e.clipPathId,a=e.props,i=(0,j.useRef)(null),r=(0,j.useRef)(null);return j.createElement(eC,{props:a,clipPathId:t,previousPointsRef:i,pathRef:r})}var eP=(e,t)=>{var a,i;return{x:null!=(a=e.x)?a:void 0,y:null!=(i=e.y)?i:void 0,value:e.value,errorVal:(0,R.getValueByDataKey)(e.payload,t)}};class eE extends j.Component{render(){var e=this.props,t=e.hide,a=e.dot,i=e.points,r=e.className,l=e.xAxisId,n=e.yAxisId,s=e.top,o=e.left,c=e.width,d=e.height,u=e.id,m=e.needClip,p=e.zIndex;if(t)return null;var x=(0,N.clsx)("recharts-line",r),h=(0,ec.getRadiusAndStrokeWidthFromDot)(a),f=h.r,b=h.strokeWidth,v=(0,$.isClipDot)(a),y=2*f+b,g=m?"url(#clipPath-".concat(v?"":"dots-").concat(u,")"):void 0;return j.createElement(eu.ZIndexLayer,{zIndex:p},j.createElement(w.Layer,{className:x},m&&j.createElement("defs",null,j.createElement(G.GraphicalItemClipPath,{clipPathId:u,xAxisId:l,yAxisId:n}),!v&&j.createElement("clipPath",{id:"clipPath-dots-".concat(u)},j.createElement("rect",{x:o-y/2,y:s-y/2,width:c+y,height:d+y}))),j.createElement(F,{xAxisId:l,yAxisId:n,data:i,dataPointFormatter:eP,errorBarOffset:0},j.createElement(eO,{props:this.props,clipPathId:u}))),j.createElement(T.ActivePoints,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:g}))}}function eI(e){var t=(0,ei.resolveDefaultProps)(e,ej),a=t.activeDot,i=t.animateNewValues,r=t.animationBegin,l=t.animationDuration,n=t.animationEasing,s=t.connectNulls,o=t.dot,c=t.hide,d=t.isAnimationActive,u=t.label,m=t.legendType,p=t.xAxisId,x=t.yAxisId,h=t.id,f=ev(t,ef),b=(0,G.useNeedsClip)(p,x).needClip,v=(0,er.usePlotArea)(),y=(0,M.useChartLayout)(),g=(0,K.useIsPanorama)(),N=(0,Q.useAppSelector)(e=>J(e,p,x,g,h));if("horizontal"!==y&&"vertical"!==y||null==N||null==v)return null;var w=v.height,k=v.width,A=v.x,C=v.y;return j.createElement(eE,eb({},f,{id:h,connectNulls:s,dot:o,activeDot:a,animateNewValues:i,animationBegin:r,animationDuration:l,animationEasing:n,isAnimationActive:d,hide:c,label:u,legendType:m,xAxisId:p,yAxisId:x,points:N,layout:y,height:w,width:k,left:A,top:C,needClip:b}))}var eS=j.memo(function(e){var t=(0,ei.resolveDefaultProps)(e,ej),a=(0,K.useIsPanorama)();return j.createElement(el.RegisterGraphicalItemId,{id:t.id,type:"line"},e=>{var i,r,l,n;return j.createElement(j.Fragment,null,j.createElement(ee.SetLegendPayload,{legendPayload:(i=t.dataKey,r=t.name,l=t.stroke,n=t.legendType,[{inactive:t.hide,dataKey:i,type:n,color:l,value:(0,R.getTooltipNameProp)(r,i),payload:t}])}),j.createElement(eN,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),j.createElement(en.SetCartesianGraphicalItem,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:a}),j.createElement(eI,eb({},t,{id:e})))})},ep.propsAreEqual);eS.displayName="Line";var e$=e.i(85183),eR=e.i(93230),eT=e.i(72526),eD=e.i(34239),eL=e.i(31195),eB=e.i(237),eF=e.i(1725);let eG=({data:e,dataKey:a,color:r,scale:l,label:n,unit:s,showPoints:o=!1,lineWidth:c=2,fillGradient:d=!1})=>{let{nightMode:u}=(0,i.useOcearoContext)();if(0===(e||[]).filter(e=>null!==e[a]&&void 0!==e[a]).length)return(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-hud-muted text-sm",children:"No data available"});let m=e=>{if(!e)return"";let t=e.split(":");return t.length>=3?`${t[1]}:${t[2]}`:e},p=[l?.min!==void 0?l.min:"auto",l?.max!==void 0?l.max:"auto"],x=({active:e,payload:a,label:i})=>e&&a&&a.length?(0,t.jsxs)("div",{className:"bg-hud-bg backdrop-blur-md border border-hud p-3 rounded-lg shadow-lg",children:[(0,t.jsx)("p",{className:"text-hud-secondary text-xs uppercase mb-1",children:i}),(0,t.jsxs)("p",{className:"text-hud-main font-bold text-sm",children:[a[0].value.toFixed(2),s]})]}):null;return(0,t.jsx)("div",{className:"h-full w-full",children:(0,t.jsx)(eL.ResponsiveContainer,{width:"100%",height:"100%",minWidth:0,minHeight:0,children:d?(0,t.jsxs)(eF.AreaChart,{data:e,margin:{top:10,right:10,left:-20,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:`color-${a}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:r,stopOpacity:.3}),(0,t.jsx)("stop",{offset:"95%",stopColor:r,stopOpacity:0})]})}),(0,t.jsx)(eT.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(e$.XAxis,{dataKey:"time",tickFormatter:m,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),(0,t.jsx)(eR.YAxis,{domain:p,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,unit:s}),(0,t.jsx)(eD.Tooltip,{content:(0,t.jsx)(x,{})}),(0,t.jsx)(eB.Area,{type:"monotone",dataKey:a,stroke:r,strokeWidth:c,fillOpacity:1,fill:`url(#color-${a})`,isAnimationActive:!1,dot:!!o&&{r:2,fill:r,strokeWidth:0}})]}):(0,t.jsxs)(g,{data:e,margin:{top:10,right:10,left:-20,bottom:0},children:[(0,t.jsx)(eT.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(e$.XAxis,{dataKey:"time",tickFormatter:m,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),(0,t.jsx)(eR.YAxis,{domain:p,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,unit:s}),(0,t.jsx)(eD.Tooltip,{content:(0,t.jsx)(x,{})}),(0,t.jsx)(eS,{type:"monotone",dataKey:a,stroke:r,strokeWidth:c,dot:!!o&&{r:2,fill:r,strokeWidth:0},isAnimationActive:!1})]})})})};e.s(["default",0,()=>{let{t:e}=(0,u.useTranslation)(),{nightMode:m}=(0,i.useOcearoContext)(),[p,x]=(0,a.useState)("battery"),[h,b]=(0,a.useState)("voltage"),[v,y]=(0,a.useState)("fps"),[g,j]=(0,a.useState)("1"),[N,w]=(0,a.useState)(!1),k=(0,a.useMemo)(()=>[`electrical.batteries.${g}.voltage`,`electrical.batteries.${g}.capacity.stateOfCharge`,`electrical.batteries.${g}.current`,`electrical.batteries.${g}.temperature`,`electrical.batteries.${g}.chemistry`,`electrical.batteries.${g}.name`,`electrical.batteries.${g}.location`,`electrical.batteries.${g}.dateInstalled`,`electrical.batteries.${g}.manufacturer.name`,`electrical.batteries.${g}.manufacturer.model`,`electrical.batteries.${g}.manufacturer.URL`,`electrical.batteries.${g}.associatedBus`,`electrical.batteries.${g}.voltage.ripple`,`electrical.batteries.${g}.capacity.nominal`,`electrical.batteries.${g}.capacity.actual`,`electrical.batteries.${g}.capacity.remaining`,`electrical.batteries.${g}.capacity.dischargeLimit`,`electrical.batteries.${g}.capacity.stateOfHealth`,`electrical.batteries.${g}.capacity.dischargeSinceFull`,`electrical.batteries.${g}.capacity.timeRemaining`,`electrical.batteries.${g}.lifetimeDischarge`,`electrical.batteries.${g}.lifetimeRecharge`,"steering.autopilot.state","navigation.lights"],[g]),A=(0,l.useSignalKPaths)(k),C=(0,a.useMemo)(()=>{let e=A[`electrical.batteries.${g}.voltage`]??null,t=A[`electrical.batteries.${g}.current`]??0,a=A[`electrical.batteries.${g}.capacity.stateOfCharge`],i=A[`electrical.batteries.${g}.temperature`];return{voltage:e??0,current:t,stateOfCharge:null!=a?100*a:null!==e?(0,n.estimateStateOfCharge)(e):0,power:(e??0)*t,temperature:null!==i?(0,r.convertTemperature)(i):null,chemistry:A[`electrical.batteries.${g}.chemistry`],name:A[`electrical.batteries.${g}.name`],location:A[`electrical.batteries.${g}.location`],dateInstalled:A[`electrical.batteries.${g}.dateInstalled`],manufacturer:A[`electrical.batteries.${g}.manufacturer.name`],model:A[`electrical.batteries.${g}.manufacturer.model`],manufacturerURL:A[`electrical.batteries.${g}.manufacturer.URL`],associatedBus:A[`electrical.batteries.${g}.associatedBus`],voltageRipple:A[`electrical.batteries.${g}.voltage.ripple`],nominalCapacity:A[`electrical.batteries.${g}.capacity.nominal`],actualCapacity:A[`electrical.batteries.${g}.capacity.actual`],remainingCapacity:A[`electrical.batteries.${g}.capacity.remaining`],dischargeLimit:A[`electrical.batteries.${g}.capacity.dischargeLimit`],stateOfHealth:A[`electrical.batteries.${g}.capacity.stateOfHealth`],dischargeSinceFull:A[`electrical.batteries.${g}.capacity.dischargeSinceFull`],timeRemaining:A[`electrical.batteries.${g}.capacity.timeRemaining`],lifetimeDischarge:A[`electrical.batteries.${g}.lifetimeDischarge`],lifetimeRecharge:A[`electrical.batteries.${g}.lifetimeRecharge`],autopilotState:"auto"===A["steering.autopilot.state"],navigationLightsOn:A["navigation.lights"]||!1}},[A,g]),O=(0,a.useRef)(performance.now()),P=(0,a.useRef)(0),E=(0,a.useRef)(null),I=(0,a.useRef)(null),[S,$]=(0,a.useState)(()=>Array(60).fill(null).map(()=>({voltage:12,current:0,stateOfCharge:100,temperature:null,time:new Date().toLocaleTimeString()}))),[R,T]=(0,a.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})});(0,a.useEffect)(()=>{window.__OCEARO_RENDERER&&(E.current=window.__OCEARO_RENDERER)},[]),I.current=C,(0,a.useEffect)(()=>{let e,t,a=()=>{P.current++,e=requestAnimationFrame(a)};return e=requestAnimationFrame(a),t=setInterval(()=>{let e=performance.now(),t=e-O.current,a=t>0?1e3*P.current/t:0,i=a>0?1e3/a:0,r=new Date().toLocaleTimeString(),l=0,n=0,s=0,o=0,c=0;window.performance&&window.performance.memory&&(c=Math.round(window.performance.memory.usedJSHeapSize/1048576));let d=E.current?.info||window.__OCEARO_RENDER_INFO;d&&(l=d.render?.calls||0,n=d.render?.triangles||0,s=d.memory?.geometries||0,o=d.memory?.textures||0),T(e=>[...e.slice(1),{time:r,fps:a,ms:i,drawCalls:l,triangles:n,geometries:s,textures:o,memory:c}]),$(e=>[...e.slice(1),{...I.current,time:r}]),O.current=e,P.current=0},1e3),()=>{cancelAnimationFrame(e),clearInterval(t)}},[]);let[D]=(0,a.useState)([{id:"1",nameKey:"battery.houseBattery"},{id:"0",nameKey:"battery.starterBattery"}]),L=(0,n.isBatteryCharging)(C.voltage);return C.temperature,(0,t.jsxs)("div",{className:"flex flex-col h-full bg-rightPaneBg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex border-b border-hud bg-hud-bg",children:[{id:"battery",label:e("battery.energy"),icon:o.faLeaf},{id:"graph",label:e("battery.usage"),icon:o.faChartLine},{id:"performance",label:e("battery.perf"),icon:o.faGaugeHigh},{id:"rpi",label:e("battery.rpi"),icon:o.faMicrochip}].map(e=>(0,t.jsxs)("button",{onClick:()=>x(e.id),className:`flex-1 py-3 px-2 text-xs font-black uppercase flex items-center justify-center transition-all duration-500 ${p===e.id?"text-oGreen border-b-2 border-oGreen bg-hud-bg":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:e.icon,className:"mr-2"}),e.label]},e.id))}),(0,t.jsx)("div",{className:"flex-1 flex flex-col min-h-0",children:(0,t.jsxs)(c.AnimatePresence,{mode:"wait",children:["battery"===p&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4,ease:"easeOut"},className:"p-4 flex flex-col flex-1 min-h-0 overflow-auto scrollbar-hide",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:"text-sm font-black text-hud-main uppercase tracking-[0.2em] flex items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oGreen mr-3 animate-soft-pulse"}),e("battery.powerGridStatus"),(0,t.jsx)("button",{className:"ml-4 bg-hud-elevated rounded-full w-7 h-7 flex items-center justify-center text-hud-secondary tesla-hover focus:outline-none border border-hud shadow-soft",onClick:()=>w(!N),"aria-label":e("battery.batteryDetails"),children:(0,t.jsx)(s.FontAwesomeIcon,{icon:o.faQuestionCircle,className:"text-xs"})})]}),(0,t.jsx)("select",{className:"bg-hud-elevated px-4 py-1.5 rounded-sm text-hud-main text-xs font-black uppercase border border-hud focus:outline-none tesla-hover transition-all duration-500 shadow-soft",value:g,onChange:e=>j(e.target.value),children:D.map(a=>(0,t.jsx)("option",{value:a.id,className:"bg-leftPaneBg text-hud-main",children:e(a.nameKey)},a.id))})]}),(0,t.jsx)(c.AnimatePresence,{children:N&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"tesla-card p-4 mb-4 relative overflow-hidden bg-hud-elevated",children:[(0,t.jsx)("button",{className:"absolute top-2 right-3 text-hud-secondary hover:text-hud-main font-black text-xl",onClick:()=>w(!1),"aria-label":"Close details",children:"×"}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs font-black mb-4 uppercase tracking-widest",children:e("battery.batterySpecs")}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-4",children:[{label:e("battery.identifier"),value:C.name},{label:e("battery.chemistry"),value:C.chemistry},{label:e("battery.manufacturer"),value:C.manufacturer},{label:e("battery.position"),value:C.location},{label:e("battery.busLink"),value:C.associatedBus},{label:e("battery.condition"),value:C.stateOfHealth?`${(100*C.stateOfHealth).toFixed(0)}%`:null}].map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted uppercase font-black tracking-widest mb-0.5",children:e.label}),(0,t.jsx)("div",{className:"text-xs text-hud-main font-black truncate uppercase gliding-value",children:e.value||"N/A"})]},a))}),(C.nominalCapacity||C.actualCapacity||C.remainingCapacity)&&(0,t.jsxs)("div",{className:"mt-4 pt-3 border-t border-hud",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs font-black mb-2 uppercase tracking-widest",children:e("battery.energyCapacity")}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3",children:[{label:e("battery.nominal"),value:C.nominalCapacity},{label:e("battery.actual"),value:C.actualCapacity},{label:e("battery.remaining"),value:C.remainingCapacity}].map((e,a)=>(0,t.jsxs)("div",{className:"bg-hud-bg p-2 rounded text-center tesla-hover",children:[(0,t.jsx)("div",{className:"text-xs text-hud-secondary uppercase font-black mb-1",children:e.label}),(0,t.jsx)("div",{className:"text-xs text-hud-main font-black gliding-value",children:e.value?`${(e.value/3600).toFixed(1)} Wh`:"N/A"})]},a))})]})]})}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"relative tesla-card p-6 bg-hud-bg border border-hud",children:[(0,t.jsxs)("div",{className:"mb-6 flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-hud-secondary text-xs font-black uppercase tracking-[0.2em] opacity-60",children:e("battery.gridNodeStatus")}),(0,t.jsx)("div",{className:`px-3 py-1 rounded-sm text-xs font-black uppercase tracking-widest shadow-soft ${L?"bg-oGreen/10 text-oGreen border border-oGreen/20 animate-soft-pulse":"bg-oRed/10 text-oRed border border-oRed/20"}`,children:L?e("battery.systemInflow"):e("battery.systemOutflow")})]}),(0,t.jsxs)("div",{className:"h-24 relative mt-8 flex flex-col justify-between",children:[(0,t.jsxs)("div",{className:"h-2 bg-hud-elevated relative rounded-full overflow-hidden shadow-inner",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-oRed/10 via-oYellow/10 to-oGreen/10 opacity-30"}),(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${L?"bg-gradient-to-r from-oGreen/60 to-oGreen shadow-[0_0_12px_var(--color-oGreen)]":"bg-gradient-to-r from-oRed/60 via-oYellow/60 to-oGreen/60 shadow-[0_0_12px_var(--color-oGreen)]"}`,style:{width:`${C.stateOfCharge}%`}})]}),(0,t.jsxs)("div",{className:"absolute top-0 flex flex-col items-center transition-all duration-1000",style:{left:`clamp(10%, ${C.stateOfCharge}%, 90%)`,transform:"translateX(-50%)",top:"-12px"},children:[(0,t.jsx)("div",{className:"w-1 h-6 bg-hud-main shadow-[0_0_15px_var(--hud-text-main)] shadow-opacity-80 rounded-full"}),(0,t.jsxs)("div",{className:"mt-8 text-lg font-black text-hud-main gliding-value tracking-tighter",children:[C.stateOfCharge.toFixed(0),"%"]})]}),(0,t.jsxs)("div",{className:"flex justify-between mt-12 text-xs font-black uppercase tracking-[0.2em]",children:[(0,t.jsx)("div",{className:"text-oRed opacity-40",children:e("battery.criticalNode")}),(0,t.jsxs)("div",{className:"text-hud-main bg-hud-elevated px-4 py-1.5 rounded-sm flex items-center shadow-soft border border-hud",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:L?o.faChargingStation:o.faClock,className:"mr-3 text-xs text-oBlue opacity-60"}),(0,t.jsx)("span",{className:"gliding-value opacity-80 tracking-widest",children:L?e("battery.acquiringFullCharge"):C.timeRemaining?e("battery.depletionIn",{hours:(C.timeRemaining/3600).toFixed(1)}):C.voltage>0&&Math.abs(C.current)>0?e("battery.endurance",{hours:(C.stateOfCharge/(Math.abs(C.current)/100)).toFixed(1)}):e("common.na")})]}),(0,t.jsx)("div",{className:"text-oGreen opacity-40",children:e("battery.nominalGrid")})]})]})]}),(0,t.jsxs)("div",{className:"tesla-card p-6 flex-1 bg-hud-bg border border-hud",children:[(0,t.jsxs)("div",{className:"text-hud-secondary text-xs font-black uppercase tracking-[0.2em] mb-8 flex items-center opacity-60",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-oBlue mr-3"}),e("battery.loadDistribution")]}),(0,t.jsx)("div",{className:"space-y-6",children:[{id:"autopilot",icon:o.faMicrochip,label:e("battery.autopilotNode"),color:"bg-oBlue",value:C.autopilotState?.4*Math.abs(C.current):0,state:C.autopilotState},{id:"telemetry",icon:o.faGaugeHigh,label:e("battery.telemetryArray"),color:"bg-oGreen",value:.3*Math.abs(C.current),state:!0}].map((e,a)=>(0,t.jsxs)("div",{className:"tesla-hover p-2 rounded-sm transition-all group",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:e.icon,className:"text-hud-muted mr-3 text-xs opacity-50 group-hover:opacity-100 transition-opacity"}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-black uppercase tracking-widest",children:e.label}),"autopilot"===e.id&&e.state&&(0,t.jsx)("span",{className:"ml-3 px-2 py-0.5 bg-oGreen/10 text-oGreen text-xs font-black uppercase rounded-sm animate-soft-pulse border border-oGreen/20",children:"Sync"})]}),(0,t.jsxs)("div",{className:"text-xs text-hud-main font-black gliding-value tracking-tighter",children:[e.value.toFixed(1),"%"]})]}),(0,t.jsx)("div",{className:"h-1 bg-hud-elevated rounded-full overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full ${e.color} gliding-value opacity-60 group-hover:opacity-100 transition-all duration-700`,style:{width:`${Math.min(100,2.5*e.value)}%`}})})]},a))}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-4 mt-10",children:[{label:e("battery.voltageNode"),value:`${C.voltage.toFixed(1)}V`,color:"text-oBlue"},{label:e("battery.amperageLoad"),value:`${C.current.toFixed(1)}A`,color:"text-oYellow"},{label:e("battery.gridOutput"),value:`${(C.voltage*C.current).toFixed(0)}W`,color:"text-hud-main"}].map((e,a)=>(0,t.jsxs)("div",{className:"bg-hud-elevated p-4 rounded-sm tesla-hover text-center border border-hud",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted uppercase font-black tracking-widest mb-2 opacity-60",children:e.label}),(0,t.jsx)("div",{className:`text-xl font-black gliding-value tracking-tighter ${e.color}`,children:e.value})]},a))})]})]})]},"battery"),"graph"===p&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4,ease:"easeOut"},className:"p-4 flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:"text-sm font-black text-hud-main uppercase tracking-[0.2em] flex items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oBlue mr-3 animate-soft-pulse"}),e("battery.telemetryHistory")]}),(0,t.jsx)("div",{className:"flex bg-hud-elevated rounded-sm p-1 border border-hud shadow-soft",children:["voltage","current","soc"].map(e=>(0,t.jsx)("button",{onClick:()=>b(e),className:`px-4 py-1 rounded-sm text-xs font-black uppercase transition-all duration-500 ${h===e?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:"soc"===e?"SOC %":e},e))})]}),(0,t.jsx)("div",{className:"flex-1 tesla-card p-6 min-h-[220px] bg-hud-bg border border-hud",children:(0,t.jsx)(eG,{data:S,dataKey:h,color:"voltage"===h?"var(--color-oBlue)":"current"===h?"var(--color-oYellow)":"var(--color-oGreen)",unit:"voltage"===h?"V":"current"===h?"A":"%",scale:{voltage:{min:10.5,max:15,step:1},current:{min:-5,max:50,step:5},soc:{min:0,max:100,step:25},power:{min:-60,max:240,step:60},temperature:{min:10,max:60,step:10}}[h]})})]},"graph"),"performance"===p&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4,ease:"easeOut"},className:"p-4 flex flex-col flex-1 min-h-0 overflow-auto scrollbar-hide",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:"text-sm font-black text-hud-main uppercase tracking-[0.2em] flex items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oGreen mr-3 animate-soft-pulse"}),e("battery.systemDiagnostic")]}),(0,t.jsx)("div",{className:"flex bg-hud-elevated rounded-sm p-1 border border-hud shadow-soft",children:["fps","ms","memory"].map(e=>(0,t.jsx)("button",{onClick:()=>y(e),className:`px-4 py-1 rounded-sm text-xs font-black uppercase transition-all duration-500 ${v===e?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 tesla-card p-6 min-h-[200px] mb-6 bg-hud-bg border border-hud",children:(0,t.jsx)(eG,{data:R,dataKey:v,color:"var(--color-oBlue)",unit:"fps"===v?"":"ms"===v?"ms":"MB",scale:{fps:{min:0,max:60,step:15},ms:{min:0,max:33.33,step:10},drawCalls:{min:0,max:500,step:100},triangles:{min:0,max:5e5,step:1e5},memory:{min:0,max:500,step:100}}[v]})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"tesla-card p-6 bg-hud-bg tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted font-black uppercase mb-4 tracking-[0.2em] opacity-60",children:e("battery.graphicsEngine")}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase mb-3",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.drawCalls")}),(0,t.jsx)("span",{className:"gliding-value",children:R[R.length-1].drawCalls})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.geometry")}),(0,t.jsxs)("span",{className:"gliding-value",children:[(R[R.length-1].triangles/1e3).toFixed(1),"k poly"]})]})]}),(0,t.jsxs)("div",{className:"tesla-card p-6 bg-hud-bg tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted font-black uppercase mb-4 tracking-[0.2em] opacity-60",children:e("battery.memoryManagement")}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase mb-3",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.jsHeap")}),(0,t.jsxs)("span",{className:"gliding-value",children:[R[R.length-1].memory," MB"]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.vramTextures")}),(0,t.jsxs)("span",{className:"gliding-value",children:[R[R.length-1].textures," units"]})]})]})]})]},"performance"),"rpi"===p&&(0,t.jsx)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"flex-1 flex flex-col min-h-0",children:(0,t.jsx)(f,{})},"rpi")]})})]})}],39896)},65862,e=>{e.n(e.i(39896))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97069,e=>{"use strict";var t=e.i(43476),i=e.i(67561),a=e.i(46991),l=e.i(71645),n=e.i(85709);e.i(85269);var s=e.i(22831);let o="bg-oBlue";e.s(["default",0,()=>{let{t:e}=(0,s.useTranslation)(),{nightMode:r}=(0,i.useOcearoContext)(),[u,d]=(0,l.useState)(240),c=(0,n.useSignalKPath)("environment.depth.belowKeel"),h=(0,n.useSignalKPath)("environment.depth.belowTransducer"),m=(0,l.useMemo)(()=>c??h??null,[c,h]);(0,l.useEffect)(()=>{let e=()=>{let e=window.innerHeight;d(e<640?Math.min(.25*e,240):Math.min(.35*e,240))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let v=(0,l.useMemo)(()=>null===m?0:Math.min(m/50*100,100),[m]),p=(0,l.useMemo)(()=>null===m?o:m<3?"bg-oRed":m<5?"bg-oYellow":o,[m]),b=r?"text-oNight":"text-hud-main",g=(0,l.useCallback)(e=>null===e?"--":`${(0,a.convertDepthUnit)(e)} ${(0,a.getDepthUnitLabel)()}`,[]);return(0,t.jsxs)("div",{className:"flex flex-col items-center group p-3 transition-all duration-300",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.2em] mb-4 opacity-40 group-hover:opacity-100 transition-opacity ${b}`,children:e("indicators.depth")}),(0,t.jsx)(()=>(0,t.jsx)("div",{className:"w-1.5 bg-hud-elevated rounded-full overflow-hidden mb-2 relative",style:{height:u},role:"progressbar","aria-valuenow":m,"aria-valuemin":"0","aria-valuemax":50,"aria-label":`${e("indicators.waterDepth")}: ${g(m)}`,children:(0,t.jsx)("div",{className:`absolute bottom-0 left-0 w-full transition-all duration-1000 ease-in-out ${p} ${null!=m&&m<3?"animate-pulse":""}`,style:{height:`${v}%`}})}),{}),(0,t.jsx)("div",{className:`text-xs font-black tracking-widest mt-2 ${b} ${null!=m&&m<3?"text-oRed animate-soft-pulse":""}`,children:g(m)})]})}])},14774,e=>{e.n(e.i(97069))}]);
@@ -1,3 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88143,(e,t,r)=>{"use strict";function i({widthInt:e,heightInt:t,blurWidth:r,blurHeight:n,blurDataURL:a,objectFit:l}){let o=r?40*r:e,s=n?40*n:t,u=o&&s?`viewBox='0 0 ${o} ${s}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%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='${u?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return i}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={VALID_LOADERS:function(){return a},imageConfigDefault:function(){return l}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let a=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return u}}),e.r(33525);let i=e.r(43369),n=e.r(88143),a=e.r(87690),l=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function s(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 u({src:e,sizes:t,unoptimized:r=!1,priority:d=!1,preload:c=!1,loading:f,className:m,quality:p,width:g,height:h,fill:x=!1,style:b,overrideSrc:y,onLoad:v,onLoadingComplete:w,placeholder:j="empty",blurDataURL:_,fetchPriority:P,decoding:O="async",layout:N,objectFit:S,objectPosition:C,lazyBoundary:E,lazyRoot:R,...k},z){var M;let I,$,A,{imgConf:D,showAltText:B,blurComplete:T,defaultLoader:F}=z,L=D||a.imageConfigDefault;if("allSizes"in L)I=L;else{let e=[...L.deviceSizes,...L.imageSizes].sort((e,t)=>e-t),t=L.deviceSizes.sort((e,t)=>e-t),r=L.qualities?.sort((e,t)=>e-t);I={...L,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===F)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let U=k.loader||F;delete k.loader,delete k.srcSet;let q="__next_img_default"in U;if(q){if("custom"===I.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
- Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=U;U=t=>{let{config:r,...i}=t;return e(i)}}if(N){"fill"===N&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[N];e&&(b={...b,...e});let r={responsive:"100vw",fill:"100vw"}[N];r&&!t&&(t=r)}let W="",G=s(g),X=s(h);if((M=e)&&"object"==typeof M&&(o(M)||void 0!==M.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(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(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(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(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if($=t.blurWidth,A=t.blurHeight,_=_||t.blurDataURL,W=t.src,!x)if(G||X){if(G&&!X){let e=G/t.width;X=Math.round(t.height*e)}else if(!G&&X){let e=X/t.height;G=Math.round(t.width*e)}}else G=t.width,X=t.height}let V=!d&&!c&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:W)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,V=!1),I.unoptimized&&(r=!0),q&&!I.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let H=s(p),Y=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:C}:{},B?{}:{color:"transparent"},b),Q=T||"empty"===j?null:"blur"===j?`url("data:image/svg+xml;charset=utf-8,${(0,n.getImageBlurSvg)({widthInt:G,heightInt:X,blurWidth:$,blurHeight:A,blurDataURL:_||"",objectFit:Y.objectFit})}")`:`url("${j}")`,J=l.includes(Y.objectFit)?"fill"===Y.objectFit?"100% 100%":"cover":Y.objectFit,K=Q?{backgroundSize:J,backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Q}:{},Z=function({config:e,src:t,unoptimized:r,width:n,quality:a,sizes:l,loader:o}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,i.getDeploymentId)();if(e){let r=t.indexOf("?");if(-1!==r){let i=new URLSearchParams(t.slice(r+1));i.get("dpl")||(i.append("dpl",e),t=t.slice(0,r)+"?"+i.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:s,kind:u}=function({deviceSizes:e,allSizes:t},r,i){if(i){let r=/(^|\s)(1?\d?\d)vw/g,n=[];for(let e;e=r.exec(i);)n.push(parseInt(e[2]));if(n.length){let r=.01*Math.min(...n);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,n,l),d=s.length-1;return{sizes:l||"w"!==u?l:"100vw",srcSet:s.map((r,i)=>`${o({config:e,src:t,quality:a,width:r})} ${"w"===u?r:i+1}${u}`).join(", "),src:o({config:e,src:t,quality:a,width:s[d]})}}({config:I,src:e,unoptimized:r,width:G,quality:H,sizes:t,loader:U}),ee=V?"lazy":f;return{props:{...k,loading:ee,fetchPriority:P,width:G,height:X,decoding:O,className:m,style:{...Y,...K},sizes:Z.sizes,srcSet:Z.srcSet,src:y||Z.src},meta:{unoptimized:r,preload:c||d,placeholder:j,fill:x}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let i=e.r(71645),n="u"<typeof window,a=n?()=>{}:i.useLayoutEffect,l=n?()=>{}:i.useEffect;function o(e){let{headManager:t,reduceComponentsToState:r}=e;function o(){if(t&&t.mountedInstances){let e=i.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return n&&(t?.mountedInstances?.add(e.children),o()),a(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),a(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return g},defaultHead:function(){return c}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let a=e.r(55682),l=e.r(90809),o=e.r(43476),s=l._(e.r(71645)),u=a._(e.r(98879)),d=e.r(42732);function c(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===s.default.Fragment?e.concat(s.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,i,n;return e.reduce(f,[]).reverse().concat(c().reverse()).filter((t=new Set,r=new Set,i=new Set,n={},e=>{let a=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?a=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?a=!1:r.add(e.type);break;case"meta":for(let t=0,r=m.length;t<r;t++){let r=m[t];if(e.props.hasOwnProperty(r))if("charSet"===r)i.has(r)?a=!1:i.add(r);else{let t=e.props[r],i=n[r]||new Set;("name"!==r||!l)&&i.has(t)?a=!1:(i.add(t),n[r]=i)}}}return a})).reverse().map((e,t)=>{let r=e.key||t;return s.default.cloneElement(e,{key:r})})}let g=function({children:e}){let t=(0,s.useContext)(d.HeadManagerContext);return(0,o.jsx)(u.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let i=e.r(55682)._(e.r(71645)),n=e.r(87690),a=i.default.createContext(n.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return i}});let i=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function i(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return i}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let i=e.r(70965),n=e.r(43369);function a({config:e,src:t,width:r,quality:l}){let o=(0,n.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),i=r.get("dpl");if(i){o=i,r.delete("dpl");let n=r.toString();t=t.slice(0,e)+(n?"?"+n:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
- Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let s=(0,i.findClosestQuality)(l,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${s}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}a.__next_img_default=!0;let l=a},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let i=e.r(71645);function n(e,t){let r=(0,i.useRef)(null),n=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=a(e,i)),t&&(n.current=a(t,i))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},85437,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let i=e.r(55682),n=e.r(90809),a=e.r(43476),l=n._(e.r(71645)),o=i._(e.r(74080)),s=i._(e.r(25633)),u=e.r(8927),d=e.r(87690),c=e.r(18556);e.r(33525);let f=e.r(65856),m=i._(e.r(1948)),p=e.r(18581),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function h(e,t,r,i,n,a,l){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&n(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let i=!1,n=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>i,isPropagationStopped:()=>n,persist:()=>{},preventDefault:()=>{i=!0,t.preventDefault()},stopPropagation:()=>{n=!0,t.stopPropagation()}})}i?.current&&i.current(e)}}))}function x(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,l.forwardRef)(({src:e,srcSet:t,sizes:r,height:i,width:n,decoding:o,className:s,style:u,fetchPriority:d,placeholder:c,loading:f,unoptimized:m,fill:g,onLoadRef:b,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:w,sizesInput:j,onLoad:_,onError:P,...O},N)=>{let S=(0,l.useCallback)(e=>{e&&(P&&(e.src=e.src),e.complete&&h(e,c,b,y,v,m,j))},[e,c,b,y,v,P,m,j]),C=(0,p.useMergedRef)(N,S);return(0,a.jsx)("img",{...O,...x(d),loading:f,width:n,height:i,decoding:o,"data-nimg":g?"fill":"1",className:s,style:u,sizes:r,srcSet:t,src:e,ref:C,onLoad:e=>{h(e.currentTarget,c,b,y,v,m,j)},onError:e=>{w(!0),"empty"!==c&&v(!0),P&&P(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...x(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,r),null):(0,a.jsx)(s.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(f.RouterContext),i=(0,l.useContext)(c.ImageConfigContext),n=(0,l.useMemo)(()=>{let e=g||i||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),n=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:n,localPatterns:"u"<typeof window?i?.localPatterns:e.localPatterns}},[i]),{onLoad:o,onLoadingComplete:s}=e,p=(0,l.useRef)(o);(0,l.useEffect)(()=>{p.current=o},[o]);let h=(0,l.useRef)(s);(0,l.useEffect)(()=>{h.current=s},[s]);let[x,v]=(0,l.useState)(!1),[w,j]=(0,l.useState)(!1),{props:_,meta:P}=(0,u.getImgProps)(e,{defaultLoader:m.default,imgConf:n,blurComplete:x,showAltText:w});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b,{..._,unoptimized:P.unoptimized,placeholder:P.placeholder,fill:P.fill,onLoadRef:p,onLoadingCompleteRef:h,setBlurComplete:v,setShowAltText:j,sizesInput:e.sizes,ref:t}),P.preload?(0,a.jsx)(y,{isAppRouter:!r,imgAttributes:_}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return d},getImageProps:function(){return u}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let a=e.r(55682),l=e.r(8927),o=e.r(85437),s=a._(e.r(1948));function u(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=o.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},78847,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(67561),n=e.i(46932),a=e.i(88653),l=e.i(57688),o=e.i(49721),s=e.i(68757);e.i(85269);var u=e.i(22831);e.s(["default",0,()=>{let{t:e}=(0,u.useTranslation)(),{nightMode:d}=(0,i.useOcearoContext)(),[c,f]=(0,r.useState)(null),[m,p]=(0,r.useState)(!1);return(0,t.jsx)("div",{className:"bg-rightPaneBg flex flex-col h-full p-4 overflow-hidden",children:(0,t.jsx)(a.AnimatePresence,{mode:"wait",children:c?(0,t.jsxs)(n.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:`text-sm font-black uppercase tracking-widest flex items-center ${d?"text-oNight":"text-hud-main"}`,children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oBlue mr-3 animate-soft-pulse"}),c.name]}),(0,t.jsx)("button",{onClick:()=>{f(null),p(!1)},className:"p-2 rounded-full text-hud-muted tesla-hover","aria-label":e("common.close"),children:(0,t.jsx)(o.FontAwesomeIcon,{icon:s.faTimes,className:`text-sm ${d?"text-oNight":""}`})})]}),(0,t.jsx)("div",{className:"flex-1 rounded-sm overflow-hidden shadow-soft",children:c.external?(0,t.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center tesla-card p-10 bg-hud-elevated",children:[(0,t.jsx)("div",{className:"w-32 h-32 mb-6 relative group",children:(0,t.jsx)(l.default,{src:c.icon,alt:c.name,className:"w-full h-full object-contain group-hover:scale-110 transition-transform duration-700",width:128,height:128})}),(0,t.jsx)("p",{className:`text-xl font-black uppercase tracking-widest mb-2 ${d?"text-oNight":"text-hud-main"}`,children:c.name}),(0,t.jsx)("p",{className:`text-xs font-black uppercase tracking-widest ${d?"text-oNight":"text-hud-secondary"} opacity-80 mb-8 text-center`,children:e("mediaPlayer.redirecting")}),(0,t.jsxs)("button",{onClick:()=>{var e;return e=c.url,void window.open(e,"_blank","noopener,noreferrer")},className:`px-6 py-2.5 rounded text-xs font-black uppercase tracking-widest flex items-center transition-all duration-500 shadow-soft ${d?"bg-oNight/20 text-oNight hover:bg-oNight/30 border border-oNight/30":"bg-oBlue text-hud-main hover:bg-oBlue/80 shadow-lg shadow-oBlue/20"}`,children:[(0,t.jsx)("span",{children:e("mediaPlayer.launch")}),(0,t.jsx)(o.FontAwesomeIcon,{icon:s.faExternalLinkAlt,className:"ml-3 text-xs"})]})]}):m?(0,t.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center tesla-card p-10 bg-hud-bg",children:[(0,t.jsx)("p",{className:`mb-6 text-sm font-black uppercase tracking-widest ${d?"text-oNight":"text-hud-main"}`,children:e("mediaPlayer.connectionRefused",{name:c.name})}),(0,t.jsxs)("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:`flex items-center text-xs font-black uppercase tracking-widest px-4 py-2 rounded transition-all duration-300 ${d?"text-oNight hover:bg-oNight/10 border border-oNight/20":"text-oBlue hover:bg-oBlue/10 border border-oBlue/20"}`,children:[(0,t.jsx)("span",{children:e("mediaPlayer.openExternalNode")}),(0,t.jsx)(o.FontAwesomeIcon,{icon:s.faExternalLinkAlt,className:"ml-2"})]})]}):(0,t.jsx)("iframe",{src:c.url,title:c.name,className:"w-full h-full rounded-sm border-0 bg-hud-bg",allow:"autoplay; encrypted-media",allowFullScreen:!0,loading:"lazy",onError:()=>{p(!0)}})})]},"viewer"):(0,t.jsxs)(n.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex flex-col h-full",children:[(0,t.jsxs)("h2",{className:`text-sm font-black uppercase tracking-widest mb-6 flex items-center ${d?"text-oNight":"text-hud-main"}`,children:[(0,t.jsx)(o.FontAwesomeIcon,{icon:s.faExternalLinkAlt,className:"mr-3 text-oBlue text-xs"}),e("mediaPlayer.entertainmentNodes")]}),(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4 overflow-auto pb-4 scrollbar-hide",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:"Spotify",url:"https://open.spotify.com/embed/playlist/37i9dQZF1DXcBWIGoYBM5M",icon:"./icons/mediaplayer/spotify.png"},{name:"Deezer",url:"https://widget.deezer.com/widget/dark/playlist/1479458365",icon:"./icons/mediaplayer/deezer.png"}].map(r=>(0,t.jsxs)("button",{onClick:()=>{f(r),p(!1)},className:"tesla-card p-6 flex flex-col items-center justify-center tesla-hover group border border-hud bg-hud-bg",children:[(0,t.jsx)("div",{className:"w-20 h-20 mb-4 relative overflow-hidden flex items-center justify-center",children:(0,t.jsx)(l.default,{src:r.icon,alt:r.name,className:"w-full h-full object-contain group-hover:scale-110 transition-transform duration-700 opacity-80 group-hover:opacity-100",width:80,height:80})}),(0,t.jsx)("span",{className:`text-xs font-black uppercase tracking-widest transition-colors duration-500 ${d?"text-oNight":"text-hud-secondary group-hover:text-hud-main"}`,children:r.name}),r.external&&(0,t.jsx)("div",{className:"mt-2 text-xs font-black text-oBlue opacity-0 group-hover:opacity-100 transition-opacity duration-500 uppercase tracking-tighter",children:e("mediaPlayer.externalNode")})]},r.name))})]},"list")})})}])},13268,e=>{e.n(e.i(78847))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/1gizigk3w6q7j.js","static/chunks/2lvvt2f1l5sfu.js","static/chunks/3jh1u-s3k0bkk.js","static/chunks/2atijj_pkc4uc.js","static/chunks/1ptwltjb3h6jf.js"],runtimeModuleIds:[94553]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/ocearo-ui/_next/",r=function(){if(null!=self.TURBOPACK_ASSET_SUFFIX)return self.TURBOPACK_ASSET_SUFFIX;let e=document?.currentScript?.getAttribute?.("src")??"",t=e.indexOf("?");return t>=0?e.slice(t):""}(),n=["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];var o,i=((o=i||{})[o.Runtime=0]="Runtime",o[o.Parent=1]="Parent",o[o.Update=2]="Update",o);let l=new WeakMap;function s(e,t){this.m=e,this.e=t}let u=s.prototype,a=Object.prototype.hasOwnProperty,c="u">typeof Symbol&&Symbol.toStringTag;function f(e,t,r){a.call(e,t)||Object.defineProperty(e,t,r)}function p(e,t){let r=e[t];return r||(r=h(t),e[t]=r),r}function h(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function d(e,t){f(e,"__esModule",{value:!0}),c&&f(e,c,{value:"Module"});let r=0;for(;r<t.length;){let n=t[r++],o=t[r++];if("number"==typeof o)if(0===o)f(e,n,{value:t[r++],enumerable:!0,writable:!1});else throw Error(`unexpected tag: ${o}`);else"function"==typeof t[r]?f(e,n,{get:o,set:t[r++],enumerable:!0}):f(e,n,{get:o,enumerable:!0})}Object.seal(e)}function m(e,t){(null!=t?p(this.c,t):this.m).exports=e}u.s=function(e,t){let r,n;null!=t?n=(r=p(this.c,t)).exports:(r=this.m,n=this.e),r.namespaceObject=n,d(n,e)},u.j=function(e,t){var r,n;let o,i,s;null!=t?i=(o=p(this.c,t)).exports:(o=this.m,i=this.e);let u=(r=o,n=i,(s=l.get(r))||(l.set(r,s=[]),r.exports=r.namespaceObject=new Proxy(n,{get(e,t){if(a.call(e,t)||"default"===t||"__esModule"===t)return Reflect.get(e,t);for(let e of s){let r=Reflect.get(e,t);if(void 0!==r)return r}},ownKeys(e){let t=Reflect.ownKeys(e);for(let e of s)for(let r of Reflect.ownKeys(e))"default"===r||t.includes(r)||t.push(r);return t}})),s);"object"==typeof e&&null!==e&&u.push(e)},u.v=m,u.n=function(e,t){let r;(r=null!=t?p(this.c,t):this.m).exports=r.namespaceObject=e};let b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,y=[null,b({}),b([]),b(b)];function g(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!y.includes(t);t=b(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),d(t,n),t}function w(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=g(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function O(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function j(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}u.i=w,u.A=function(e){return this.r(e)(w.bind(this))},u.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},u.r=function(e){return B(e,this.m).exports},u.f=function(e){function t(t){if(t=O(t),a.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=O(t),a.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let k=Symbol("turbopack queues"),v=Symbol("turbopack exports"),U=Symbol("turbopack error");function C(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}u.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:i,reject:l,promise:s}=j(),u=Object.assign(s,{[v]:r.exports,[k]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),a={get:()=>u,set(e){e!==u&&(u[v]=e)}};Object.defineProperty(r,"exports",a),Object.defineProperty(r,"namespaceObject",a),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(k in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[v]:{},[k]:e=>e(t)};return e.then(e=>{r[v]=e,C(t)},e=>{r[U]=e,C(t)}),r}}return{[v]:e,[k]:()=>{}}}),r=()=>t.map(e=>{if(e[U])throw e[U];return e[v]}),{promise:i,resolve:l}=j(),s=Object.assign(()=>l(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[k](u)),s.queueCount?i:r()},function(e){e?l(u[U]=e):i(u[v]),C(n)}),n&&-1===n.status&&(n.status=0)};let P=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}P.prototype=URL.prototype,u.U=P,u.z=function(e){throw Error("dynamic usage of require is not supported")},u.g=globalThis;let S=s.prototype,$=new Map;u.M=$;let _=new Map,E=new Map;async function T(e,t,r){let n;if("string"==typeof r)return M(e,t,N(r));let o=r.included||[],i=o.map(e=>!!$.has(e)||_.get(e));if(i.length>0&&i.every(e=>e))return void await Promise.all(i);let l=r.moduleChunks||[],s=l.map(e=>E.get(e)).filter(e=>e);if(s.length>0){if(s.length===l.length)return void await Promise.all(s);let r=new Set;for(let e of l)E.has(e)||r.add(e);for(let n of r){let r=M(e,t,N(n));E.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=M(e,t,N(r.path)),l))E.has(o)||E.set(o,n)}for(let e of o)_.has(e)||_.set(e,n);await n}S.l=function(e){return T(i.Parent,this.m.id,e)};let A=Promise.resolve(void 0),x=new WeakMap;function M(t,r,n){let o=e.loadChunkCached(t,n),l=x.get(o);if(void 0===l){let e=x.set.bind(x,o,A);l=o.then(e).catch(e=>{let o;switch(t){case i.Runtime:o=`as a runtime dependency of chunk ${r}`;break;case i.Parent:o=`from module ${r}`;break;case i.Update:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),x.set(o,l)}return l}function N(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}S.L=function(e){return M(i.Parent,this.m.id,e)},S.R=function(e){let t=this.r(e);return t?.default??t},S.P=function(e){return`/ROOT/${e??""}`},S.q=function(e,t){m.call(this,`${e}${r}`,t)},S.b=function(e,t,o,i){let l="SharedWorker"===e.name,s=[o.map(e=>N(e)).reverse(),r];for(let e of n)s.push(globalThis[e]);let u=new URL(N(t),location.origin),a=JSON.stringify(s);return l?u.searchParams.set("params",a):u.hash="#params="+encodeURIComponent(a),new e(u,i?{...i,type:void 0}:void 0)};let q=/\.js(?:\?[^#]*)?(?:#.*)?$/,K=/\.css(?:\?[^#]*)?(?:#.*)?$/;function L(e){return K.test(e)}u.w=function(t,r,n){return e.loadWebAssembly(i.Parent,this.m.id,t,r,n)},u.u=function(t,r){return e.loadWebAssemblyModule(i.Parent,this.m.id,t,r)};let I={};u.c=I;let B=(e,t)=>{let r=I[e];if(r){if(r.error)throw r.error;return r}return W(e,i.Parent,t.id)};function W(e,t,r){let n=$.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let o=h(e),i=o.exports;I[e]=o;let l=new s(o,i);try{n(l,o,i)}catch(e){throw o.error=e,e}return o.namespaceObject&&o.exports!==o.namespaceObject&&g(o.exports,o.namespaceObject),o}function F(t){let r,n=function(e){if("string"==typeof e)return e;if(e)return{src:e.getAttribute("src")};if("u">typeof TURBOPACK_NEXT_CHUNK_URLS)return{src:TURBOPACK_NEXT_CHUNK_URLS.pop()};throw Error("chunk path empty but not in a worker")}(t[0]);return 2===t.length?r=t[1]:(r=void 0,!function(e,t){let r=1;for(;r<e.length;){let n,o=r+1;for(;o<e.length&&"function"!=typeof e[o];)o++;if(o===e.length)throw Error("malformed chunk format, expected a factory function");let i=e[o];for(let i=r;i<o;i++){let r=e[i],o=t.get(r);if(o){n=o;break}}let l=n??i,s=!1;for(let n=r;n<o;n++){let r=e[n];t.has(r)||(s||(l===i&&Object.defineProperty(i,"name",{value:"module evaluation"}),s=!0),t.set(r,l))}r=o+1}}(t,$)),e.registerChunk(n,r)}let X=new Map;function D(e){let t=X.get(e);if(!t){let r,n;t={resolved:!1,loadingStarted:!1,promise:new Promise((e,t)=>{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},X.set(e,t)}return t}e={async registerChunk(e,r){let n=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(e.src.replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(e);if(D("string"==typeof e?N(e):e.src).resolve(),null!=r){for(let e of r.otherChunks)D(N("string"==typeof e?e:e.path));if(await Promise.all(r.otherChunks.map(e=>T(i.Runtime,n,e))),r.runtimeModuleIds.length>0)for(let e of r.runtimeModuleIds)!function(e,t){let r=I[t];if(r){if(r.error)throw r.error;return}W(t,i.Runtime,e)}(n,e)}},loadChunkCached:(e,t)=>(function(e,t){let r=D(t);if(r.loadingStarted)return r.promise;if(e===i.Runtime)return r.loadingStarted=!0,L(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(L(t));else if(q.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(L(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(q.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let i=fetch(N(r)),{instance:l}=await WebAssembly.instantiateStreaming(i,o);return l.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(N(r));return await WebAssembly.compileStreaming(o)}};let H=globalThis.TURBOPACK;globalThis.TURBOPACK={push:F},H.forEach(F)})();