@oicl/openbridge-webcomponents 2.0.0-next.44 → 2.0.0-next.46

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 (37) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +14869 -14889
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +74 -81
  4. package/dist/components/badge/badge.css.js +15 -15
  5. package/dist/navigation-instruments/compass/compass.d.ts +3 -3
  6. package/dist/navigation-instruments/compass/compass.d.ts.map +1 -1
  7. package/dist/navigation-instruments/compass/compass.js +3 -3
  8. package/dist/navigation-instruments/compass/compass.js.map +1 -1
  9. package/dist/navigation-instruments/compass-indicator/compass-indicator.d.ts +12 -0
  10. package/dist/navigation-instruments/compass-indicator/compass-indicator.d.ts.map +1 -1
  11. package/dist/navigation-instruments/compass-indicator/compass-indicator.js +9 -1
  12. package/dist/navigation-instruments/compass-indicator/compass-indicator.js.map +1 -1
  13. package/dist/navigation-instruments/velocity-projection-plot/velocity-projection-plot.d.ts +4 -4
  14. package/dist/navigation-instruments/velocity-projection-plot/velocity-projection-plot.d.ts.map +1 -1
  15. package/dist/navigation-instruments/velocity-projection-plot/velocity-projection-plot.js +15 -14
  16. package/dist/navigation-instruments/velocity-projection-plot/velocity-projection-plot.js.map +1 -1
  17. package/dist/navigation-instruments/watch/environment.d.ts +39 -1
  18. package/dist/navigation-instruments/watch/environment.d.ts.map +1 -1
  19. package/dist/navigation-instruments/watch/environment.js +71 -88
  20. package/dist/navigation-instruments/watch/environment.js.map +1 -1
  21. package/dist/navigation-instruments/watch/watch.d.ts +1 -1
  22. package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
  23. package/dist/navigation-instruments/watch/watch.js +4 -4
  24. package/dist/navigation-instruments/watch/watch.js.map +1 -1
  25. package/dist/navigation-instruments/wind/wind.d.ts +1 -1
  26. package/dist/navigation-instruments/wind/wind.d.ts.map +1 -1
  27. package/dist/navigation-instruments/wind/wind.js +3 -3
  28. package/dist/navigation-instruments/wind/wind.js.map +1 -1
  29. package/dist/navigation-instruments/wind-indicator/wind-indicator.d.ts +63 -9
  30. package/dist/navigation-instruments/wind-indicator/wind-indicator.d.ts.map +1 -1
  31. package/dist/navigation-instruments/wind-indicator/wind-indicator.js +57 -1995
  32. package/dist/navigation-instruments/wind-indicator/wind-indicator.js.map +1 -1
  33. package/dist/navigation-instruments/wind-propulsion/wind-propulsion.d.ts +1 -1
  34. package/dist/navigation-instruments/wind-propulsion/wind-propulsion.d.ts.map +1 -1
  35. package/dist/navigation-instruments/wind-propulsion/wind-propulsion.js +4 -4
  36. package/dist/navigation-instruments/wind-propulsion/wind-propulsion.js.map +1 -1
  37. package/package.json +1 -1
@@ -1,12 +1,74 @@
1
1
  import { svg } from "lit";
2
2
  import { styleMap } from "lit/directives/style-map.js";
3
+ import "../../icons/icon-wind-true-1.js";
4
+ import "../../icons/icon-wind-true-2.js";
5
+ import "../../icons/icon-wind-true-3.js";
6
+ import "../../icons/icon-wind-true-4.js";
7
+ import "../../icons/icon-wind-true-5.js";
8
+ import "../../icons/icon-wind-true-6.js";
9
+ import "../../icons/icon-wind-true-7.js";
10
+ import "../../icons/icon-wind-true-8.js";
11
+ import "../../icons/icon-wind-true-9.js";
12
+ import "../../icons/icon-wind-true-10.js";
13
+ import "../../icons/icon-wind-true-11.js";
14
+ import "../../icons/icon-wind-true-12.js";
15
+ import "../../icons/icon-wind-true-13.js";
16
+ import "../../icons/icon-wind-true-14.js";
17
+ const WIND_ICON_COUNT = 14;
18
+ const WIND_ICON_SCALE = 2;
19
+ const windIconCache = /* @__PURE__ */ new Map();
20
+ function getWindIconSvg(index) {
21
+ const tagName = `obi-wind-true-${index}`;
22
+ const cached = windIconCache.get(tagName);
23
+ if (cached) {
24
+ return cached;
25
+ }
26
+ const ctor = customElements.get(tagName);
27
+ if (!ctor) {
28
+ return null;
29
+ }
30
+ const instance = new ctor();
31
+ const tpl = instance.icon ?? instance.iconCss;
32
+ if (!tpl) {
33
+ return null;
34
+ }
35
+ windIconCache.set(tagName, tpl);
36
+ return tpl;
37
+ }
38
+ function windKnotsToIconIndex(knots) {
39
+ if (knots == null || !Number.isFinite(knots) || knots < 0.5) {
40
+ return 1;
41
+ }
42
+ if (knots < 2.5) {
43
+ return 2;
44
+ }
45
+ if (knots < 47.5) {
46
+ return Math.round(knots / 5) + 2;
47
+ }
48
+ if (knots < 55) {
49
+ return 12;
50
+ }
51
+ if (knots < 65) {
52
+ return 13;
53
+ }
54
+ return WIND_ICON_COUNT;
55
+ }
3
56
  function renderWind(options) {
4
- return renderEnvironment({
5
- filename: `wind-${options.wind + 1}.svg`,
6
- fromDirectionDeg: options.fromDirectionDeg,
7
- radius: options.radius,
8
- color: options.color
9
- });
57
+ const { windKnots, fromDirectionDeg, radius, color } = options;
58
+ const index = windKnotsToIconIndex(windKnots);
59
+ const icon = getWindIconSvg(index);
60
+ if (!icon) {
61
+ return svg``;
62
+ }
63
+ const dirRad = fromDirectionDeg * Math.PI / 180;
64
+ const x = Math.sin(dirRad) * radius;
65
+ const y = -Math.cos(dirRad) * radius;
66
+ const styles = {
67
+ color: color ?? "var(--instrument-regular-secondary-color)"
68
+ };
69
+ return svg`<g style=${styleMap(styles)} transform="translate(${x} ${y}) rotate(${fromDirectionDeg}) translate(${-24} ${-44.8906}) scale(${WIND_ICON_SCALE})">
70
+ ${icon}
71
+ </g>`;
10
72
  }
11
73
  function renderCurrent(options) {
12
74
  return renderEnvironment({
@@ -53,91 +115,12 @@ const environmentSvgs = {
53
115
  <path fill-rule="evenodd" clip-rule="evenodd" d="M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z" fill="var(--instrument-regular-secondary-color)"/>
54
116
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z" fill="var(--instrument-regular-secondary-color)"/>
55
117
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z" fill="var(--instrument-regular-secondary-color)"/>
56
- <path fill-rule="evenodd" clip-rule="evenodd" d="M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z" fill="var(--instrument-regular-secondary-color)"/>`,
57
- "wind-1.svg": svg`<path d="M12 2C6.47715 2 2 6.47715 2 12H3.90476C3.90476 7.52912 7.52912 3.90476 12 3.90476V2Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
58
- <path d="M22 12C22 6.47715 17.5228 2 12 2V3.90476C16.4709 3.90476 20.0952 7.52912 20.0952 12H22Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
59
- <path d="M12 22C17.5228 22 22 17.5228 22 12H20.0952C20.0952 16.4709 16.4709 20.0952 12 20.0952V22Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
60
- <path d="M2 12C2 17.5228 6.47715 22 12 22V20.0952C7.52912 20.0952 3.90476 16.4709 3.90476 12H2Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
61
- <path d="M12 2C6.47715 2 2 6.47715 2 12H3.90476C3.90476 7.52912 7.52912 3.90476 12 3.90476V2Z" fill="var(--instrument-regular-secondary-color)"/>
62
- <path d="M22 12C22 6.47715 17.5228 2 12 2V3.90476C16.4709 3.90476 20.0952 7.52912 20.0952 12H22Z" fill="var(--instrument-regular-secondary-color)"/>
63
- <path d="M12 22C17.5228 22 22 17.5228 22 12H20.0952C20.0952 16.4709 16.4709 20.0952 12 20.0952V22Z" fill="var(--instrument-regular-secondary-color)"/>
64
- <path d="M2 12C2 17.5228 6.47715 22 12 22V20.0952C7.52912 20.0952 3.90476 16.4709 3.90476 12H2Z" fill="var(--instrument-regular-secondary-color)"/>`,
65
- "wind-2.svg": svg`<path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
66
- <path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>`,
67
- "wind-3.svg": svg`<path d="M11 24L13 24L13 7L15 7L12 -1.74846e-07L9 7L11 7L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
68
- <path d="M8 21L8 19L11 19L11 21L8 21Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
69
- <path d="M11 24L13 24L13 7L15 7L12 -1.74846e-07L9 7L11 7L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
70
- <path d="M8 21L8 19L11 19L11 21L8 21Z" fill="var(--instrument-regular-secondary-color)"/>`,
71
- "wind-4.svg": svg`<path d="M11 24L13 24L13 7L15 7L12 -2.62268e-07L9 7L11 7L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
72
- <path d="M6 24L6 22L11 22L11 24L6 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
73
- <path d="M11 24L13 24L13 7L15 7L12 -2.62268e-07L9 7L11 7L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
74
- <path d="M6 24L6 22L11 22L11 24L6 24Z" fill="var(--instrument-regular-secondary-color)"/>`,
75
- "wind-5.svg": svg`<path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
76
- <path d="M5 24L5 22H12V24H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
77
- <path d="M8 21L8 19H12V21H8Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
78
- <path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
79
- <path d="M5 24L5 22H12V24H5Z" fill="var(--instrument-regular-secondary-color)"/>
80
- <path d="M8 21L8 19H12V21H8Z" fill="var(--instrument-regular-secondary-color)"/>`,
81
- "wind-6.svg": svg`<path d="M11 24H13L13 7L15 7L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
82
- <path d="M5 24L5 22H12V24H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
83
- <path d="M5 21L5 19H12V21H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
84
- <path d="M11 24H13L13 7L15 7L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
85
- <path d="M5 24L5 22H12V24H5Z" fill="var(--instrument-regular-secondary-color)"/>
86
- <path d="M5 21L5 19H12V21H5Z" fill="var(--instrument-regular-secondary-color)"/>`,
87
- "wind-7.svg": svg`<path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
88
- <path d="M5 24L5 22H12V24H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
89
- <path d="M5 21L5 19H12V21H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
90
- <path d="M8 18L8 16H12V18H8Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
91
- <path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
92
- <path d="M5 24L5 22H12V24H5Z" fill="var(--instrument-regular-secondary-color)"/>
93
- <path d="M5 21L5 19H12V21H5Z" fill="var(--instrument-regular-secondary-color)"/>
94
- <path d="M8 18L8 16H12V18H8Z" fill="var(--instrument-regular-secondary-color)"/>`,
95
- "wind-8.svg": svg`<path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
96
- <path d="M5 24L5 22H12V24H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
97
- <path d="M5 21L5 19H12V21H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
98
- <path d="M5 18L5 16H12V18H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
99
- <path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
100
- <path d="M5 24L5 22H12V24H5Z" fill="var(--instrument-regular-secondary-color)"/>
101
- <path d="M5 21L5 19H12V21H5Z" fill="var(--instrument-regular-secondary-color)"/>
102
- <path d="M5 18L5 16H12V18H5Z" fill="var(--instrument-regular-secondary-color)"/>`,
103
- "wind-9.svg": svg`<path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
104
- <path d="M5 24L5 22H12V24H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
105
- <path d="M5 21L5 19H12V21H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
106
- <path d="M5 18L5 16H12V18H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
107
- <path d="M8 15L8 13H12V15H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
108
- <path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
109
- <path d="M5 24L5 22H12V24H5Z" fill="var(--instrument-regular-secondary-color)"/>
110
- <path d="M5 21L5 19H12V21H5Z" fill="var(--instrument-regular-secondary-color)"/>
111
- <path d="M5 18L5 16H12V18H5Z" fill="var(--instrument-regular-secondary-color)"/>
112
- <path d="M8 15L8 13H12V15H5Z" fill="var(--instrument-regular-secondary-color)"/>`,
113
- "wind-10.svg": svg`<path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
114
- <path d="M5 24L5 22H12V24H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
115
- <path d="M5 21L5 19H12V21H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
116
- <path d="M5 18L5 16H12V18H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
117
- <path d="M5 15L5 13H12V15H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
118
- <path d="M8 12L8 10H12V12H8Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
119
- <path d="M11 24H13L13 7H15L12 0L9 7H11L11 24Z" fill="var(--instrument-regular-secondary-color)"/>
120
- <path d="M5 24L5 22H12V24H5Z" fill="var(--instrument-regular-secondary-color)"/>
121
- <path d="M5 21L5 19H12V21H5Z" fill="var(--instrument-regular-secondary-color)"/>
122
- <path d="M5 18L5 16H12V18H5Z" fill="var(--instrument-regular-secondary-color)"/>
123
- <path d="M5 15L5 13H12V15H5Z" fill="var(--instrument-regular-secondary-color)"/>
124
- <path d="M8 12L8 10H12V12H8Z" fill="var(--instrument-regular-secondary-color)"/>`,
125
- "wind-11.svg": svg`<path d="M5 22L13 24L13 7H15L12 0L9 7H11L11 20L5 22Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
126
- <path d="M5 22L13 24L13 7H15L12 0L9 7H11L11 20L5 22Z" fill="var(--instrument-regular-secondary-color)"/>`,
127
- "wind-12.svg": svg`<path d="M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
128
- <path d="M5 18L5 16H12V18H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
129
- <path d="M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z" fill="var(--instrument-regular-secondary-color)"/>
130
- <path d="M5 18L5 16H12V18H5Z" fill="var(--instrument-regular-secondary-color)"/>`,
131
- "wind-13.svg": svg`<path d="M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
132
- <path d="M5 18L5 16H12V18H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
133
- <path d="M5 15L5 13H12V15H5Z" stroke="var(--border-silhouette-color)" stroke-width="2"/>
134
- <path d="M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z" fill="var(--instrument-regular-secondary-color)"/>
135
- <path d="M5 18L5 16H12V18H5Z" fill="var(--instrument-regular-secondary-color)"/>
136
- <path d="M5 15L5 13H12V15H5Z" fill="var(--instrument-regular-secondary-color)"/>`
118
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z" fill="var(--instrument-regular-secondary-color)"/>`
137
119
  };
138
120
  export {
139
121
  environmentSvgs,
140
122
  renderCurrent,
141
- renderWind
123
+ renderWind,
124
+ windKnotsToIconIndex
142
125
  };
143
126
  //# sourceMappingURL=environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sources":["../../../src/navigation-instruments/watch/environment.ts"],"sourcesContent":["import {svg, SVGTemplateResult} from 'lit';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nexport function renderWind(options: {\n wind: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n return renderEnvironment({\n filename: `wind-${options.wind + 1}.svg`,\n fromDirectionDeg: options.fromDirectionDeg,\n radius: options.radius,\n color: options.color,\n });\n}\n\nexport function renderCurrent(options: {\n current: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n return renderEnvironment({\n filename: `current-${options.current}.svg`,\n fromDirectionDeg: options.fromDirectionDeg,\n radius: options.radius,\n color: options.color,\n });\n}\n\nfunction renderEnvironment(options: {\n filename: string;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {filename, fromDirectionDeg, radius, color} = options;\n const directionRad = ((fromDirectionDeg - 180) * Math.PI) / 180;\n const symbol = environmentSvgs[filename];\n const styles = color ? {'--instrument-regular-secondary-color': color} : {};\n return svg`<g style=${styleMap(styles)} transform=\"translate(${-Math.sin(directionRad) * radius} ${Math.cos(directionRad) * radius}) rotate(${180 + fromDirectionDeg}) translate(-24, 0) scale(2)\">\n ${symbol}\n </g>`;\n}\n\nexport const environmentSvgs: Record<string, SVGTemplateResult> = {\n 'current-0.svg': svg`<path d=\"M11 2V22H13V2Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 2V22H13V2Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-1.svg': svg`<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-2.svg': svg`<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-3.svg': svg`<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-4.svg': svg`<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-1.svg': svg`<path d=\"M12 2C6.47715 2 2 6.47715 2 12H3.90476C3.90476 7.52912 7.52912 3.90476 12 3.90476V2Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M22 12C22 6.47715 17.5228 2 12 2V3.90476C16.4709 3.90476 20.0952 7.52912 20.0952 12H22Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12H20.0952C20.0952 16.4709 16.4709 20.0952 12 20.0952V22Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M2 12C2 17.5228 6.47715 22 12 22V20.0952C7.52912 20.0952 3.90476 16.4709 3.90476 12H2Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M12 2C6.47715 2 2 6.47715 2 12H3.90476C3.90476 7.52912 7.52912 3.90476 12 3.90476V2Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M22 12C22 6.47715 17.5228 2 12 2V3.90476C16.4709 3.90476 20.0952 7.52912 20.0952 12H22Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12H20.0952C20.0952 16.4709 16.4709 20.0952 12 20.0952V22Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M2 12C2 17.5228 6.47715 22 12 22V20.0952C7.52912 20.0952 3.90476 16.4709 3.90476 12H2Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-2.svg': svg`<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-3.svg': svg`<path d=\"M11 24L13 24L13 7L15 7L12 -1.74846e-07L9 7L11 7L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M8 21L8 19L11 19L11 21L8 21Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24L13 24L13 7L15 7L12 -1.74846e-07L9 7L11 7L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M8 21L8 19L11 19L11 21L8 21Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-4.svg': svg`<path d=\"M11 24L13 24L13 7L15 7L12 -2.62268e-07L9 7L11 7L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M6 24L6 22L11 22L11 24L6 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24L13 24L13 7L15 7L12 -2.62268e-07L9 7L11 7L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M6 24L6 22L11 22L11 24L6 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-5.svg': svg`<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M8 21L8 19H12V21H8Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M8 21L8 19H12V21H8Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-6.svg': svg`<path d=\"M11 24H13L13 7L15 7L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7L15 7L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-7.svg': svg`<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M8 18L8 16H12V18H8Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M8 18L8 16H12V18H8Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-8.svg': svg`<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-9.svg': svg`<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M8 15L8 13H12V15H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M8 15L8 13H12V15H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-10.svg': svg`<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 15L5 13H12V15H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M8 12L8 10H12V12H8Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 24H13L13 7H15L12 0L9 7H11L11 24Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 24L5 22H12V24H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 21L5 19H12V21H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 15L5 13H12V15H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M8 12L8 10H12V12H8Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-11.svg': svg`<path d=\"M5 22L13 24L13 7H15L12 0L9 7H11L11 20L5 22Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 22L13 24L13 7H15L12 0L9 7H11L11 20L5 22Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-12.svg': svg`<path d=\"M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'wind-13.svg': svg`<path d=\"M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 15L5 13H12V15H5Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M5 22L13 24L13 7H15L12 0L9 7H11L11 19L5 22Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 18L5 16H12V18H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path d=\"M5 15L5 13H12V15H5Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n};\n"],"names":[],"mappings":";;AAGO,SAAS,WAAW,SAKL;AACpB,SAAO,kBAAkB;AAAA,IACvB,UAAU,QAAQ,QAAQ,OAAO,CAAC;AAAA,IAClC,kBAAkB,QAAQ;AAAA,IAC1B,QAAQ,QAAQ;AAAA,IAChB,OAAO,QAAQ;AAAA,EAAA,CAChB;AACH;AAEO,SAAS,cAAc,SAKR;AACpB,SAAO,kBAAkB;AAAA,IACvB,UAAU,WAAW,QAAQ,OAAO;AAAA,IACpC,kBAAkB,QAAQ;AAAA,IAC1B,QAAQ,QAAQ;AAAA,IAChB,OAAO,QAAQ;AAAA,EAAA,CAChB;AACH;AAEA,SAAS,kBAAkB,SAKL;AACpB,QAAM,EAAC,UAAU,kBAAkB,QAAQ,UAAS;AACpD,QAAM,gBAAiB,mBAAmB,OAAO,KAAK,KAAM;AAC5D,QAAM,SAAS,gBAAgB,QAAQ;AACvC,QAAM,SAAS,QAAQ,EAAC,wCAAwC,MAAA,IAAS,CAAA;AACzE,SAAO,eAAe,SAAS,MAAM,CAAC,yBAAyB,CAAC,KAAK,IAAI,YAAY,IAAI,MAAM,IAAI,KAAK,IAAI,YAAY,IAAI,MAAM,YAAY,MAAM,gBAAgB;AAAA,MAChK,MAAM;AAAA;AAEZ;AAEO,MAAM,kBAAqD;AAAA,EAChE,iBAAiB;AAAA;AAAA,EAEjB,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAIjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQd,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMd,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMd,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQd,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQd,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUd,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYf,eAAe;AAAA;AAAA,EAEf,eAAe;AAAA;AAAA;AAAA;AAAA,EAIf,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAMjB;"}
1
+ {"version":3,"file":"environment.js","sources":["../../../src/navigation-instruments/watch/environment.ts"],"sourcesContent":["import {svg, SVGTemplateResult} from 'lit';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport '../../icons/icon-wind-true-1.js';\nimport '../../icons/icon-wind-true-2.js';\nimport '../../icons/icon-wind-true-3.js';\nimport '../../icons/icon-wind-true-4.js';\nimport '../../icons/icon-wind-true-5.js';\nimport '../../icons/icon-wind-true-6.js';\nimport '../../icons/icon-wind-true-7.js';\nimport '../../icons/icon-wind-true-8.js';\nimport '../../icons/icon-wind-true-9.js';\nimport '../../icons/icon-wind-true-10.js';\nimport '../../icons/icon-wind-true-11.js';\nimport '../../icons/icon-wind-true-12.js';\nimport '../../icons/icon-wind-true-13.js';\nimport '../../icons/icon-wind-true-14.js';\n\n/**\n * Number of wind barb icons available (`<obi-wind-true-1>` …\n * `<obi-wind-true-14>`).\n *\n * The set follows the standard meteorological wind-barb convention:\n * icon 1 is calm, icon 2 is shaft-only (1 kn bucket), icons 3–11 add\n * one half-barb per 5 kn (5, 10, 15, …, 45 kn), icon 12 is one pennant\n * (50 kn), icons 13–14 add full barbs above the pennant (60 / 70 kn).\n */\nconst WIND_ICON_COUNT = 14;\n\n/** Render scale applied to the 24×24 icon so it matches the historic 48×48 visual footprint on the watch dial. */\nconst WIND_ICON_SCALE = 2;\n\n/**\n * Tip coordinates of the `obi-wind-true-*` icons in their native 24×24 child\n * space. The arrowhead tip is at approximately (12, 22.4453) — this is the\n * anchor point that lands on the watch's periphery radius so the barb tail\n * extends outward only (matching the legacy inline-glyph behavior).\n */\nconst WIND_ICON_TIP_X = 12;\nconst WIND_ICON_TIP_Y = 22.4453;\n\nconst windIconCache = new Map<string, SVGTemplateResult>();\n\nfunction getWindIconSvg(index: number): SVGTemplateResult | null {\n const tagName = `obi-wind-true-${index}`;\n const cached = windIconCache.get(tagName);\n if (cached) {\n return cached;\n }\n const ctor = customElements.get(tagName) as\n | (new () => {icon?: SVGTemplateResult; iconCss?: SVGTemplateResult})\n | undefined;\n if (!ctor) {\n return null;\n }\n const instance = new ctor();\n const tpl: SVGTemplateResult | undefined = instance.icon ?? instance.iconCss;\n if (!tpl) {\n return null;\n }\n windIconCache.set(tagName, tpl);\n return tpl;\n}\n\n/**\n * Maps a wind speed in **knots** to a wind-barb icon index in `[1, 14]`.\n *\n * Implements the designer-confirmed \"Option C\" mapping: speeds round to\n * the nearest 5-knot bucket (with two sub-pennant buckets for calm and\n * near-calm conditions):\n *\n * | Knots range | Icon | Glyph |\n * | ----------- | ---- | -------------------- |\n * | `[0, 0.5)` | 1 | calm |\n * | `[0.5, 2.5)`| 2 | shaft only |\n * | `[2.5, 7.5)`| 3 | shaft + ½ barb |\n * | `[7.5, 12.5)`| 4 | shaft + 1 full barb |\n * | …5-kn steps…| … | … |\n * | `[42.5, 47.5)`| 11 | shaft + 4 full + ½ |\n * | `[47.5, 55)`| 12 | pennant (50 kn) |\n * | `[55, 65)` | 13 | pennant + 1 full barb |\n * | `[65, ∞)` | 14 | pennant + 2 full barbs |\n *\n * The 55 / 65 / 100-knot buckets currently collapse to the nearest\n * available icon; dedicated glyphs are tracked for a follow-up icon\n * refresh. Non-finite / null / undefined inputs fall back to icon 1.\n */\nexport function windKnotsToIconIndex(knots: number | null | undefined): number {\n if (knots == null || !Number.isFinite(knots) || knots < 0.5) {\n return 1;\n }\n if (knots < 2.5) {\n return 2;\n }\n if (knots < 47.5) {\n return Math.round(knots / 5) + 2;\n }\n if (knots < 55) {\n return 12;\n }\n if (knots < 65) {\n return 13;\n }\n return WIND_ICON_COUNT;\n}\n\nexport function renderWind(options: {\n windKnots: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {windKnots, fromDirectionDeg, radius, color} = options;\n const index = windKnotsToIconIndex(windKnots);\n const icon = getWindIconSvg(index);\n if (!icon) {\n return svg``;\n }\n const dirRad = (fromDirectionDeg * Math.PI) / 180;\n const x = Math.sin(dirRad) * radius;\n const y = -Math.cos(dirRad) * radius;\n const tipX = WIND_ICON_TIP_X * WIND_ICON_SCALE;\n const tipY = WIND_ICON_TIP_Y * WIND_ICON_SCALE;\n const styles = {\n color: color ?? 'var(--instrument-regular-secondary-color)',\n };\n return svg`<g style=${styleMap(styles)} transform=\"translate(${x} ${y}) rotate(${fromDirectionDeg}) translate(${-tipX} ${-tipY}) scale(${WIND_ICON_SCALE})\">\n ${icon}\n </g>`;\n}\n\nexport function renderCurrent(options: {\n current: number;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n return renderEnvironment({\n filename: `current-${options.current}.svg`,\n fromDirectionDeg: options.fromDirectionDeg,\n radius: options.radius,\n color: options.color,\n });\n}\n\nfunction renderEnvironment(options: {\n filename: string;\n fromDirectionDeg: number;\n radius: number;\n color?: string;\n}): SVGTemplateResult {\n const {filename, fromDirectionDeg, radius, color} = options;\n const directionRad = ((fromDirectionDeg - 180) * Math.PI) / 180;\n const symbol = environmentSvgs[filename];\n const styles = color ? {'--instrument-regular-secondary-color': color} : {};\n return svg`<g style=${styleMap(styles)} transform=\"translate(${-Math.sin(directionRad) * radius} ${Math.cos(directionRad) * radius}) rotate(${180 + fromDirectionDeg}) translate(-24, 0) scale(2)\">\n ${symbol}\n </g>`;\n}\n\nexport const environmentSvgs: Record<string, SVGTemplateResult> = {\n 'current-0.svg': svg`<path d=\"M11 2V22H13V2Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 2V22H13V2Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-1.svg': svg`<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 7.00002L11 24L13 24L13 7.00005L11 7.00002Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79309 5.20723L12.0002 0.00012207L17.2073 5.20723L15.7931 6.62144L12.0002 2.82855L8.2073 6.62144L6.79309 5.20723Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-2.svg': svg`<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M10.9742 12.0003L10.9742 24.0049L12.9999 24.005L12.9999 12.0004L10.9742 12.0003Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79285 5.20747L12 0.000366211L17.2071 5.20747L15.7928 6.62169L12 2.82879L8.20706 6.62169L6.79285 5.20747Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.99988 10.5861L12.207 5.37903L17.4141 10.5861L15.9999 12.0003L12.207 8.20745L8.41409 12.0003L6.99988 10.5861Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-3.svg': svg`<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path d=\"M11 18L11 24L13 24L13 18L11 18Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n 'current-4.svg': svg`<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" stroke=\"var(--border-silhouette-color)\" stroke-width=\"2\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.79297 5.20711L12.0001 0L17.2072 5.20711L15.793 6.62132L12.0001 2.82843L8.20718 6.62132L6.79297 5.20711Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 10.5858L12.2071 5.37866L17.4142 10.5858L16 12L12.2071 8.20709L8.41421 12L7 10.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 16.5858L12.2071 11.3787L17.4142 16.5858L16 18L12.2071 14.2071L8.41421 18L7 16.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 22.5858L12.2071 17.3787L17.4142 22.5858L16 24L12.2071 20.2071L8.41421 24L7 22.5858Z\" fill=\"var(--instrument-regular-secondary-color)\"/>`,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BA,MAAM,kBAAkB;AAGxB,MAAM,kBAAkB;AAWxB,MAAM,oCAAoB,IAAA;AAE1B,SAAS,eAAe,OAAyC;AAC/D,QAAM,UAAU,iBAAiB,KAAK;AACtC,QAAM,SAAS,cAAc,IAAI,OAAO;AACxC,MAAI,QAAQ;AACV,WAAO;AAAA,EACT;AACA,QAAM,OAAO,eAAe,IAAI,OAAO;AAGvC,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,QAAM,WAAW,IAAI,KAAA;AACrB,QAAM,MAAqC,SAAS,QAAQ,SAAS;AACrE,MAAI,CAAC,KAAK;AACR,WAAO;AAAA,EACT;AACA,gBAAc,IAAI,SAAS,GAAG;AAC9B,SAAO;AACT;AAyBO,SAAS,qBAAqB,OAA0C;AAC7E,MAAI,SAAS,QAAQ,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,KAAK;AAC3D,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,KAAK;AACf,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,M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A;AAEZ;AAEO,MAAM,kBAAqD;AAAA,EAChE,iBAAiB;AAAA;AAAA,EAEjB,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAIjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQnB;"}
@@ -138,7 +138,7 @@ export declare class ObcWatch extends LitElement {
138
138
  crosshairEnabled: boolean;
139
139
  showLabels: boolean;
140
140
  vessels: WatchVessel[];
141
- wind: number | null;
141
+ windKnots: number | null;
142
142
  windFromDirectionDeg: number | null;
143
143
  windSymbolRadius: number | null;
144
144
  windColor: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/watch/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EAMf,MAAM,KAAK,CAAC;AAeb,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAa,cAAc,EAAe,MAAM,aAAa,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAW,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,CAAC;AACvB,OAAO,EACL,OAAO,EACP,WAAW,EAQZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,OAAO,EAAE,WAAW,EAAC,CAAC;AAW9B,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AAGvE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,YAAY,EAAC,CAAC;AAEpD,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB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kC;IAElD,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IA4BzC,oBAAoB,IAAI,IAAI;IAM5B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAmB/C,OAAO,KAAK,eAAe,GAE1B;IAED,OAAO,CAAC,KAAK,CAAK;IAElB,OAAO,CAAC,WAAW;IAgHnB,OAAO,CAAC,mBAAmB;IAkD3B,OAAO,CAAC,eAAe;IAkFvB,OAAO,CAAC,UAAU;IA4ClB,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,QAAQ;IAiBhB,OAAO,CAAC,UAAU;IAaT,MAAM;IA+If,OAAO,CAAC,YAAY;IA2CpB,OAAO,CAAC,SAAS;IA6DjB,OAAO,CAAC,cAAc;IA0GtB,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,4BAA4B;IAoBpC,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -79,7 +79,7 @@ let ObcWatch = class extends LitElement {
79
79
  this.crosshairEnabled = false;
80
80
  this.showLabels = false;
81
81
  this.vessels = [];
82
- this.wind = null;
82
+ this.windKnots = null;
83
83
  this.windFromDirectionDeg = null;
84
84
  this.windSymbolRadius = null;
85
85
  this.current = null;
@@ -525,8 +525,8 @@ let ObcWatch = class extends LitElement {
525
525
  rotation: this.rotation,
526
526
  inside: this.northArrowInside ?? this.tickmarksInside
527
527
  }) : nothing;
528
- const wind = this.wind != null && this.windFromDirectionDeg != null ? svg`<g transform="scale(${this.scaleWindIcon})">${renderWind({
529
- wind: this.wind,
528
+ const wind = this.windKnots != null && this.windFromDirectionDeg != null ? svg`<g transform="scale(${this.scaleWindIcon})">${renderWind({
529
+ windKnots: this.windKnots,
530
530
  fromDirectionDeg: this.windFromDirectionDeg,
531
531
  radius: this.windSymbolRadius ?? 192,
532
532
  color: this.windColor
@@ -835,7 +835,7 @@ __decorateClass([
835
835
  ], ObcWatch.prototype, "vessels", 2);
836
836
  __decorateClass([
837
837
  property({ type: Number })
838
- ], ObcWatch.prototype, "wind", 2);
838
+ ], ObcWatch.prototype, "windKnots", 2);
839
839
  __decorateClass([
840
840
  property({ type: Number })
841
841
  ], ObcWatch.prototype, "windFromDirectionDeg", 2);