@sbb-esta/lyne-elements-experimental 2.11.2 → 3.0.0-next.1

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 (67) hide show
  1. package/core/datetime/date-helper.js +142 -142
  2. package/core/timetable/access-leg-helper.js +52 -49
  3. package/core/timetable/timetable-helper.js +8 -7
  4. package/custom-elements.json +8 -8
  5. package/development/core/datetime/date-helper.js +10 -10
  6. package/development/core/timetable/access-leg-helper.js +15 -12
  7. package/development/core/timetable/timetable-helper.js +7 -6
  8. package/development/{differenceInMinutes-D5Nj8Stc.js → differenceInMinutes-CHSyWiQs.js} +3 -3
  9. package/development/{format-BQfaa1ZT.js → format-D0-yhzi4.js} +26 -22
  10. package/development/{isValid-DvieCZVi.js → isValid-Bo4R7iA7.js} +3 -3
  11. package/development/journey-summary/journey-summary.component.d.ts +5 -3
  12. package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
  13. package/development/journey-summary/journey-summary.component.js +9 -5
  14. package/development/pearl-chain/pearl-chain.component.d.ts +5 -3
  15. package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  16. package/development/pearl-chain/pearl-chain.component.js +43 -29
  17. package/development/pearl-chain-time/pearl-chain-time.component.d.ts +5 -3
  18. package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
  19. package/development/pearl-chain-time/pearl-chain-time.component.js +10 -6
  20. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
  21. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
  22. package/development/seat-reservation/common/mapper/icon-mapper.js +1 -1
  23. package/development/seat-reservation/common/mapper/mapper.js +16 -14
  24. package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +1 -1
  25. package/development/seat-reservation/common/svgs.js +1 -1
  26. package/development/seat-reservation/common/translations/i18n.js +3 -2
  27. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +33 -22
  28. package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +7 -6
  29. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +23 -16
  30. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
  31. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +3 -2
  32. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +8 -7
  33. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +11 -7
  34. package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +3 -2
  35. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +5 -4
  36. package/development/timetable-duration/timetable-duration.component.js +1 -1
  37. package/development/timetable-row/timetable-row.component.d.ts +5 -3
  38. package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
  39. package/development/timetable-row/timetable-row.component.js +93 -59
  40. package/differenceInMinutes-BMqUZdhj.js +23 -0
  41. package/{format-lqeCzmzS.js → format-Dg8rkk7h.js} +442 -438
  42. package/isValid-DJ69OMZJ.js +45 -0
  43. package/journey-summary/journey-summary.component.d.ts +5 -3
  44. package/journey-summary/journey-summary.component.d.ts.map +1 -1
  45. package/journey-summary/journey-summary.component.js +8 -4
  46. package/package.json +2 -2
  47. package/pearl-chain/pearl-chain.component.d.ts +5 -3
  48. package/pearl-chain/pearl-chain.component.d.ts.map +1 -1
  49. package/pearl-chain/pearl-chain.component.js +99 -79
  50. package/pearl-chain-time/pearl-chain-time.component.d.ts +5 -3
  51. package/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
  52. package/pearl-chain-time/pearl-chain-time.component.js +49 -45
  53. package/seat-reservation/common/mapper/mapper.js +54 -50
  54. package/seat-reservation/common/translations/i18n.js +6 -5
  55. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +115 -104
  56. package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +41 -40
  57. package/seat-reservation/seat-reservation/seat-reservation.component.js +87 -78
  58. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +18 -15
  59. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +59 -58
  60. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +75 -71
  61. package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +13 -12
  62. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +24 -23
  63. package/timetable-row/timetable-row.component.d.ts +5 -3
  64. package/timetable-row/timetable-row.component.d.ts.map +1 -1
  65. package/timetable-row/timetable-row.component.js +251 -208
  66. package/differenceInMinutes-CP_C5onR.js +0 -23
  67. package/isValid-Ceq2O0NQ.js +0 -45
@@ -1,36 +1,36 @@
1
- var U = (r) => {
2
- throw TypeError(r);
1
+ var q = (n) => {
2
+ throw TypeError(n);
3
3
  };
4
- var q = (r, o, l) => o.has(r) || U("Cannot " + l);
5
- var R = (r, o, l) => (q(r, o, "read from private field"), l ? l.call(r) : o.get(r)), x = (r, o, l) => o.has(r) ? U("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(r) : o.set(r, l), b = (r, o, l, u) => (q(r, o, "write to private field"), u ? u.call(r, l) : o.set(r, l), l);
4
+ var K = (n, o, c) => o.has(n) || q("Cannot " + c);
5
+ var R = (n, o, c) => (K(n, o, "read from private field"), c ? c.call(n) : o.get(n)), x = (n, o, c) => o.has(n) ? q("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, c), b = (n, o, c, u) => (K(n, o, "write to private field"), u ? u.call(n, c) : o.set(n, c), c);
6
6
  import { __runInitializers as p, __esDecorate as S } from "tslib";
7
- import { SbbLanguageController as K } from "@sbb-esta/lyne-elements/core/controllers.js";
7
+ import { SbbLanguageController as X } from "@sbb-esta/lyne-elements/core/controllers.js";
8
8
  import { forceType as P } from "@sbb-esta/lyne-elements/core/decorators.js";
9
- import { css as X, html as d, nothing as A } from "lit";
10
- import { customElement as J, property as y } from "lit/decorators.js";
11
- import { classMap as Y } from "lit/directives/class-map.js";
12
- import { styleMap as Q } from "lit/directives/style-map.js";
9
+ import { css as J, html as h, nothing as A } from "lit";
10
+ import { customElement as Y, property as y } from "lit/decorators.js";
11
+ import { classMap as Q } from "lit/directives/class-map.js";
12
+ import { styleMap as Z } from "lit/directives/style-map.js";
13
13
  import { getI18nSeatReservation as _ } from "../common.js";
14
- import { SeatReservationBaseElement as Z } from "./seat-reservation-base-element.js";
14
+ import { SeatReservationBaseElement as ee } from "./seat-reservation-base-element.js";
15
15
  import "@sbb-esta/lyne-elements/screen-reader-only.js";
16
16
  import "../seat-reservation-area.js";
17
17
  import "../seat-reservation-graphic.js";
18
18
  import "../seat-reservation-place-control.js";
19
19
  import "../seat-reservation-navigation/seat-reservation-navigation-coach.js";
20
20
  import "./seat-reservation-scoped/seat-reservation-scoped.component.js";
21
- const ee = X`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-vertical-offset: 0;display:block}:host ::part(coach-floor){fill:var(--sbb-color-white)}@media (forced-colors: active){:host ::part(coach-floor){fill:transparent}}.sbb-sr__wrapper--vertical{width:fit-content;position:relative;inset-inline-start:var(--sbb-seat-reservation-vertical-offset);rotate:90deg;transform-origin:top left}.sbb-sr__wrapper--vertical .sbb-sr__parent{overflow-y:hidden}.sbb-sr__wrapper--vertical .sbb-sr__list-coaches{width:100vw}.sbb-sr-navigation--vertical{inset-inline-start:var(--sbb-seat-reservation-vertical-offset);margin-inline-start:1.25rem;position:absolute}.sbb-sr-navigation--vertical .sbb-sr-navigation__list-coaches{flex-direction:column}.sbb-sr-navigation__list-coaches{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;justify-content:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-1x);min-height:3.75rem}.sbb-sr__parent{overflow-x:scroll;padding:3rem 0}.sbb-sr__list-coaches{display:flex;gap:.25rem;padding:0;margin:0;list-style:none}.sbb-sr__item-coach{padding:0;margin:0;position:relative}.sbb-sr-coach-wrapper__table{outline:0}`;
21
+ const te = J`*,:before,:after{box-sizing:border-box}:host{--sbb-seat-reservation-grid-size: 16px;--sbb-seat-reservation-vertical-offset: 0;display:block}:host ::part(coach-floor){fill:var(--sbb-color-white)}@media (forced-colors: active){:host ::part(coach-floor){fill:transparent}}.sbb-sr__wrapper--vertical{width:fit-content;position:relative;inset-inline-start:var(--sbb-seat-reservation-vertical-offset);rotate:90deg;transform-origin:top left}.sbb-sr__wrapper--vertical .sbb-sr__parent{overflow-y:hidden}.sbb-sr__wrapper--vertical .sbb-sr__list-coaches{width:100vw}.sbb-sr-navigation--vertical{inset-inline-start:var(--sbb-seat-reservation-vertical-offset);margin-inline-start:1.25rem;position:absolute}.sbb-sr-navigation--vertical .sbb-sr-navigation__list-coaches{flex-direction:column}.sbb-sr-navigation__list-coaches{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;justify-content:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-1x);min-height:3.75rem}.sbb-sr__parent{overflow-x:scroll;padding:3rem 0}.sbb-sr__list-coaches{display:flex;gap:.25rem;padding:0;margin:0;list-style:none}.sbb-sr__item-coach{padding:0;margin:0;position:relative}.sbb-sr-coach-wrapper__table{outline:0}`;
22
22
  let me = (() => {
23
- var g, m, f, $, C, c;
24
- let r = [J("sbb-seat-reservation")], o, l = [], u, N = Z, T, z = [], O = [], E, k = [], D = [], G, I = [], V = [], B, L = [], F = [], M, H = [], W = [];
25
- return c = class extends N {
23
+ var g, f, m, $, C, d;
24
+ let n = [Y("sbb-seat-reservation")], o, c = [], u, N = ee, T, z = [], O = [], k, D = [], G = [], I, V = [], E = [], B, L = [], F = [], M, H = [], W = [];
25
+ return d = class extends N {
26
26
  constructor() {
27
27
  super(...arguments);
28
28
  x(this, g);
29
- x(this, m);
30
29
  x(this, f);
30
+ x(this, m);
31
31
  x(this, $);
32
32
  x(this, C);
33
- b(this, g, p(this, z, null)), b(this, m, (p(this, O), p(this, k, !0))), b(this, f, (p(this, D), p(this, I, !1))), b(this, $, (p(this, V), p(this, L, null))), b(this, C, (p(this, F), p(this, H, !1))), this._language = (p(this, W), new K(this)), this._notAreaElements = [
33
+ b(this, g, p(this, z, null)), b(this, f, (p(this, O), p(this, D, !0))), b(this, m, (p(this, G), p(this, V, !1))), b(this, $, (p(this, E), p(this, L, null))), b(this, C, (p(this, F), p(this, H, !1))), this._language = (p(this, W), new X(this)), this._notAreaElements = [
34
34
  "DRIVER_AREA_FULL",
35
35
  "COACH_PASSAGE",
36
36
  "COACH_WALL_NO_PASSAGE",
@@ -49,17 +49,17 @@ let me = (() => {
49
49
  }
50
50
  /** The seat reservation navigation can be toggled by this property */
51
51
  get hasNavigation() {
52
- return R(this, m);
52
+ return R(this, f);
53
53
  }
54
54
  set hasNavigation(e) {
55
- b(this, m, e);
55
+ b(this, f, e);
56
56
  }
57
57
  /** Controls the visual representation of seat reservation in a horizonal or vertical alignment */
58
58
  get alignVertical() {
59
- return R(this, f);
59
+ return R(this, m);
60
60
  }
61
61
  set alignVertical(e) {
62
- b(this, f, e);
62
+ b(this, m, e);
63
63
  }
64
64
  /** Maximal number of possible clickable seats */
65
65
  get maxReservations() {
@@ -76,7 +76,8 @@ let me = (() => {
76
76
  b(this, C, e);
77
77
  }
78
78
  willUpdate(e) {
79
- super.willUpdate(e), e.has("hasNavigation") && (this.hasNavigation ? this.shadowRoot?.querySelectorAll("table").forEach((t) => t.removeAttribute("tabindex")) : this.shadowRoot?.querySelectorAll("table").forEach((t) => t.setAttribute("tabindex", "0")));
79
+ var t, i;
80
+ super.willUpdate(e), e.has("hasNavigation") && (this.hasNavigation ? (t = this.shadowRoot) == null || t.querySelectorAll("table").forEach((s) => s.removeAttribute("tabindex")) : (i = this.shadowRoot) == null || i.querySelectorAll("table").forEach((s) => s.setAttribute("tabindex", "0")));
80
81
  }
81
82
  firstUpdated(e) {
82
83
  super.firstUpdated(e), this._componentSetup();
@@ -88,8 +89,9 @@ let me = (() => {
88
89
  this.initNavigationSelectionByScrollEvent();
89
90
  }
90
91
  _initVehicleSeatReservationConstruction() {
91
- const e = JSON.parse(JSON.stringify(this.seatReservation?.coachItems)), t = this.alignVertical ? "sbb-sr__wrapper--vertical" : "";
92
- this._coachesHtmlTemplate = d`
92
+ var i;
93
+ const e = JSON.parse(JSON.stringify((i = this.seatReservation) == null ? void 0 : i.coachItems)), t = this.alignVertical ? "sbb-sr__wrapper--vertical" : "";
94
+ this._coachesHtmlTemplate = h`
93
95
  <div>
94
96
  <sbb-screen-reader-only>
95
97
  <input
@@ -101,7 +103,7 @@ let me = (() => {
101
103
  />
102
104
  </sbb-screen-reader-only>
103
105
 
104
- <div @keydown=${(i) => this.handleKeyboardEvent(i)}>
106
+ <div @keydown=${(s) => this.handleKeyboardEvent(s)}>
105
107
  ${this._renderNavigation()}
106
108
  <div class="sbb-sr__wrapper ${t}">
107
109
  <div id="sbb-sr__parent-area" class="sbb-sr__parent" tabindex="-1">
@@ -125,29 +127,33 @@ let me = (() => {
125
127
  `;
126
128
  }
127
129
  _renderNavigation() {
128
- return this.hasNavigation ? d`
129
- <nav class="${Y({ "sbb-sr-navigation--vertical": this.alignVertical })}">
130
+ var e;
131
+ return this.hasNavigation ? h`
132
+ <nav class="${Q({ "sbb-sr-navigation--vertical": this.alignVertical })}">
130
133
  <ul
131
134
  class="sbb-sr-navigation__list-coaches"
132
135
  aria-label="${_("SEAT_RESERVATION_NAVIGATION", this._language.current)}"
133
136
  >
134
- ${this.seatReservation?.coachItems.map((e, t) => d`<li>
137
+ ${(e = this.seatReservation) == null ? void 0 : e.coachItems.map((t, i) => {
138
+ var s, a;
139
+ return h`<li>
135
140
  <sbb-seat-reservation-navigation-coach
136
- @selectCoach=${(i) => this._onSelectNavCoach(i)}
141
+ @selectCoach=${(r) => this._onSelectNavCoach(r)}
137
142
  @focusCoach=${() => this._onFocusNavCoach()}
138
- index="${t}"
139
- coach-id="${e.id}"
140
- .selected=${this.selectedCoachIndex === t}
141
- .focused=${this.focusedCoachIndex === t}
142
- .propertyIds="${e.propertyIds}"
143
- .travelClass="${e.travelClass}"
144
- ?driver-area="${!e.places?.length}"
145
- ?first="${t === 0}"
146
- ?last="${t === this.seatReservation?.coachItems.length - 1}"
143
+ index="${i}"
144
+ coach-id="${t.id}"
145
+ .selected=${this.selectedCoachIndex === i}
146
+ .focused=${this.focusedCoachIndex === i}
147
+ .propertyIds="${t.propertyIds}"
148
+ .travelClass="${t.travelClass}"
149
+ ?driver-area="${!((s = t.places) != null && s.length)}"
150
+ ?first="${i === 0}"
151
+ ?last="${i === ((a = this.seatReservation) == null ? void 0 : a.coachItems.length) - 1}"
147
152
  ?vertical="${this.alignVertical}"
148
153
  >
149
154
  </sbb-seat-reservation-navigation-coach>
150
- </li>`)}
155
+ </li>`;
156
+ })}
151
157
  </ul>
152
158
  </nav>
153
159
  ` : null;
@@ -158,13 +164,13 @@ let me = (() => {
158
164
  * @returns
159
165
  */
160
166
  _renderCoaches(e) {
161
- return e ? e.map((t, i) => d`
167
+ return e ? e.map((t, i) => h`
162
168
  <li class="sbb-sr__item-coach">${this._renderCoachElement(t, i)}</li>
163
169
  `) : null;
164
170
  }
165
171
  _renderCoachElement(e, t) {
166
172
  const i = this.getCalculatedDimension(e.dimension), s = this._getDescriptionTableCoach(e);
167
- return d` <sbb-seat-reservation-scoped
173
+ return h` <sbb-seat-reservation-scoped
168
174
  scoped-classes="coach-wrapper"
169
175
  height="${i.h}px"
170
176
  width="${i.w}px"
@@ -186,16 +192,16 @@ let me = (() => {
186
192
  </sbb-seat-reservation-scoped>`;
187
193
  }
188
194
  _getRenderedCoachBorders(e, t) {
189
- const i = e.graphicElements, s = 1, a = i?.find((v) => v.icon === "DRIVER_AREA_FULL"), n = a ? e.dimension.w - a.dimension.w - s : e.dimension.w - s * 2, h = t === 0 && a ? a?.dimension.w * this.baseGridSize : this.baseGridSize;
190
- return d`
195
+ const i = e.graphicElements, s = 1, a = i == null ? void 0 : i.find((v) => v.icon === "DRIVER_AREA_FULL"), r = a ? e.dimension.w - a.dimension.w - s : e.dimension.w - s * 2, l = t === 0 && a ? (a == null ? void 0 : a.dimension.w) * this.baseGridSize : this.baseGridSize;
196
+ return h`
191
197
  <sbb-seat-reservation-scoped
192
198
  scoped-classes="coach-border"
193
199
  inset-block-start="${this.coachBorderPadding * -1}px"
194
- inset-inline-start="${h}px"
200
+ inset-inline-start="${l}px"
195
201
  >
196
202
  <sbb-seat-reservation-graphic
197
203
  name="COACH_BORDER_MIDDLE"
198
- width=${n * this.baseGridSize}
204
+ width=${r * this.baseGridSize}
199
205
  height=${(e.dimension.h + this.coachBorderOffset * 2) * this.baseGridSize}
200
206
  ?stretch=${!0}
201
207
  role="presentation"
@@ -209,20 +215,20 @@ let me = (() => {
209
215
  const i = {};
210
216
  for (const s of e.places)
211
217
  i[s.position.y] ? i[s.position.y].push(s) : i[s.position.y] = [s];
212
- return Object.values(i).map((s, a) => d`
218
+ return Object.values(i).map((s, a) => h`
213
219
  <tr id="row-${t}-${s[0].position.y}" data-row-index=${a}>
214
220
  ${this._getRenderedColumnPlaces(s, t)}
215
221
  </tr>
216
222
  `).flatMap((s) => s);
217
223
  }
218
224
  _getRenderedColumnPlaces(e, t) {
219
- return e.sort((i, s) => Number(i.position.x) - Number(s.position.x)), e?.map((i, s) => {
220
- const a = this.getCalculatedDimension(i.dimension), n = this.getCalculatedPosition(i.position), h = this.alignVertical ? -90 : 0;
221
- return d`
225
+ return e.sort((i, s) => Number(i.position.x) - Number(s.position.x)), e == null ? void 0 : e.map((i, s) => {
226
+ const a = this.getCalculatedDimension(i.dimension), r = this.getCalculatedPosition(i.position), l = this.alignVertical ? -90 : 0;
227
+ return h`
222
228
  <sbb-seat-reservation-scoped
223
229
  scoped-classes="graphical-element"
224
- inset-block-start="${n.y}px"
225
- inset-inline-start="${n.x}px"
230
+ inset-block-start="${r.y}px"
231
+ inset-inline-start="${r.x}px"
226
232
  width="${a.w}px"
227
233
  height="${a.h}px"
228
234
  z-index="${i.position.z}"
@@ -240,7 +246,7 @@ let me = (() => {
240
246
  width=${i.dimension.w * this.baseGridSize}
241
247
  height=${i.dimension.h * this.baseGridSize}
242
248
  rotation=${i.rotation ?? A}
243
- text-rotation=${h}
249
+ text-rotation=${l}
244
250
  coach-index=${t}
245
251
  .propertyIds=${i.propertyIds}
246
252
  .preventClick=${this.preventPlaceClick}
@@ -250,15 +256,16 @@ let me = (() => {
250
256
  });
251
257
  }
252
258
  _getRenderedGraphicalElements(e, t) {
253
- return e ? e?.map((i) => {
254
- const s = i.icon ?? "", a = i.rotation || 0, n = this._notFixedRotatableAreaIcons.indexOf(i.icon) === -1, h = this.alignVertical && n ? a - 90 : a;
255
- return this._notAreaElements.findIndex((v) => v === s) > -1 ? this._getRenderElementWithoutArea(i, a, t) : this._getRenderElementWithArea(i, h, t);
259
+ return e ? e == null ? void 0 : e.map((i) => {
260
+ const s = i.icon ?? "", a = i.rotation || 0, r = this._notFixedRotatableAreaIcons.indexOf(i.icon) === -1, l = this.alignVertical && r ? a - 90 : a;
261
+ return this._notAreaElements.findIndex((v) => v === s) > -1 ? this._getRenderElementWithoutArea(i, a, t) : this._getRenderElementWithArea(i, l, t);
256
262
  }) : null;
257
263
  }
258
264
  _getRenderElementWithArea(e, t, i) {
259
- const s = e.icon?.indexOf("TABLE") === -1, a = e.icon && s ? e.icon : null, n = a !== "ENTRY_EXIT", h = e.icon ? _(e.icon, this._language.current) : A, v = this.getCalculatedDimension(e.dimension, i, !0, n), j = this.getCalculatedPosition(e.position, e.dimension, i, !0);
265
+ var U;
266
+ const s = ((U = e.icon) == null ? void 0 : U.indexOf("TABLE")) === -1, a = e.icon && s ? e.icon : null, r = a !== "ENTRY_EXIT", l = e.icon ? _(e.icon, this._language.current) : A, v = this.getCalculatedDimension(e.dimension, i, !0, r), j = this.getCalculatedPosition(e.position, e.dimension, i, !0);
260
267
  let w = "free";
261
- return e.position.y === this.coachBorderOffset * -1 ? w = "upper-border" : e.position.y + e.dimension.h === i.h + this.coachBorderOffset && (w = "lower-border"), d`
268
+ return e.position.y === this.coachBorderOffset * -1 ? w = "upper-border" : e.position.y + e.dimension.h === i.h + this.coachBorderOffset && (w = "lower-border"), h`
262
269
  <sbb-seat-reservation-scoped
263
270
  scoped-classes="graphical-element"
264
271
  inset-block-start="${j.y}px"
@@ -268,16 +275,16 @@ let me = (() => {
268
275
  z-index="${e.position.z}"
269
276
  >
270
277
  <sbb-seat-reservation-area
271
- style=${Q({
278
+ style=${Z({
272
279
  "--sbb-reservation-area-width": e.dimension.w * this.baseGridSize,
273
280
  "--sbb-reservation-area-height": e.dimension.h * this.baseGridSize
274
281
  })}
275
282
  mounting=${w}
276
283
  background="dark"
277
284
  aria-hidden="true"
278
- title=${h}
285
+ title=${l}
279
286
  >
280
- ${a ? d`
287
+ ${a ? h`
281
288
  <sbb-seat-reservation-graphic
282
289
  name=${a}
283
290
  rotation=${t}
@@ -292,8 +299,9 @@ let me = (() => {
292
299
  `;
293
300
  }
294
301
  _getRenderElementWithoutArea(e, t, i) {
295
- const s = this.getCalculatedDimension(e.dimension, i), a = this.getCalculatedPosition(e.position, e.dimension, i), n = e.icon && e.icon.indexOf("DRIVER_AREA") === -1 ? e.icon : e.icon?.concat("_", this.seatReservation.vehicleType);
296
- return d`
302
+ var l;
303
+ const s = this.getCalculatedDimension(e.dimension, i), a = this.getCalculatedPosition(e.position, e.dimension, i), r = e.icon && e.icon.indexOf("DRIVER_AREA") === -1 ? e.icon : (l = e.icon) == null ? void 0 : l.concat("_", this.seatReservation.vehicleType);
304
+ return h`
297
305
  <sbb-seat-reservation-scoped
298
306
  scoped-classes="graphical-element"
299
307
  inset-block-start="${a.y}px"
@@ -303,7 +311,7 @@ let me = (() => {
303
311
  z-index="${e.position.z}"
304
312
  >
305
313
  <sbb-seat-reservation-graphic
306
- name=${n ?? A}
314
+ name=${r ?? A}
307
315
  width=${e.dimension.w * this.baseGridSize}
308
316
  height=${e.dimension.h * this.baseGridSize}
309
317
  rotation=${t}
@@ -314,9 +322,9 @@ let me = (() => {
314
322
  `;
315
323
  }
316
324
  _getRenderedServiceElements(e) {
317
- return e ? e?.map((t) => {
318
- const i = t.icon ? _(t.icon, this._language.current) : null, s = this.getCalculatedDimension(t.dimension), a = this.getCalculatedPosition(t.position), n = t.rotation || 0, h = this.alignVertical ? n - 90 : n;
319
- return d`
325
+ return e ? e == null ? void 0 : e.map((t) => {
326
+ const i = t.icon ? _(t.icon, this._language.current) : null, s = this.getCalculatedDimension(t.dimension), a = this.getCalculatedPosition(t.position), r = t.rotation || 0, l = this.alignVertical ? r - 90 : r;
327
+ return h`
320
328
  <sbb-seat-reservation-scoped
321
329
  scoped-classes="graphical-element"
322
330
  inset-block-start="${a.y}px"
@@ -329,7 +337,7 @@ let me = (() => {
329
337
  name=${t.icon ?? A}
330
338
  width=${t.dimension.w * this.baseGridSize}
331
339
  height=${t.dimension.h * this.baseGridSize}
332
- .rotation=${h}
340
+ .rotation=${l}
333
341
  role="img"
334
342
  aria-hidden="true"
335
343
  title=${i ?? A}
@@ -355,7 +363,8 @@ let me = (() => {
355
363
  this.preventCoachScrollByPlaceClick ? this.focusPlaceElement(this.currSelectedPlace) : this.preselectPlaceInCoach(), this.isAutoScrolling = !1;
356
364
  }
357
365
  _getDescriptionTableCoach(e) {
358
- if (!e.places?.length)
366
+ var a;
367
+ if (!((a = e.places) != null && a.length))
359
368
  return _("COACH_BLOCKED_TABLE_CAPTION", this._language.current, [
360
369
  e.id
361
370
  ]);
@@ -367,28 +376,28 @@ let me = (() => {
367
376
  }
368
377
  _getTitleDescriptionListString(e) {
369
378
  const t = [];
370
- return e?.map((i) => {
379
+ return e == null ? void 0 : e.map((i) => {
371
380
  const s = i.icon;
372
381
  if (!s)
373
382
  return null;
374
- const a = t.indexOf(s) > -1, n = _(i.icon, this._language.current), h = this._notFixedRotatableAreaIcons.indexOf(s) === -1 && this._notAreaElements.indexOf(s) === -1;
375
- return a || t.push(i.icon), n && !a && h ? n : null;
383
+ const a = t.indexOf(s) > -1, r = _(i.icon, this._language.current), l = this._notFixedRotatableAreaIcons.indexOf(s) === -1 && this._notAreaElements.indexOf(s) === -1;
384
+ return a || t.push(i.icon), r && !a && l ? r : null;
376
385
  }).filter((i) => !!i).join(", ");
377
386
  }
378
- }, g = new WeakMap(), m = new WeakMap(), f = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), u = c, (() => {
387
+ }, g = new WeakMap(), f = new WeakMap(), m = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), u = d, (() => {
379
388
  const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(N[Symbol.metadata] ?? null) : void 0;
380
- T = [y({ attribute: "seat-reservation", type: Object })], E = [P(), y({ attribute: "has-navigation", type: Boolean })], G = [P(), y({ attribute: "align-vertical", type: Boolean })], B = [P(), y({ attribute: "max-reservations", type: Number })], M = [P(), y({ attribute: "prevent-place-click", type: Boolean })], S(c, null, T, { kind: "accessor", name: "seatReservation", static: !1, private: !1, access: { has: (t) => "seatReservation" in t, get: (t) => t.seatReservation, set: (t, i) => {
389
+ T = [y({ attribute: "seat-reservation", type: Object })], k = [P(), y({ attribute: "has-navigation", type: Boolean })], I = [P(), y({ attribute: "align-vertical", type: Boolean })], B = [P(), y({ attribute: "max-reservations", type: Number })], M = [P(), y({ attribute: "prevent-place-click", type: Boolean })], S(d, null, T, { kind: "accessor", name: "seatReservation", static: !1, private: !1, access: { has: (t) => "seatReservation" in t, get: (t) => t.seatReservation, set: (t, i) => {
381
390
  t.seatReservation = i;
382
- } }, metadata: e }, z, O), S(c, null, E, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, i) => {
391
+ } }, metadata: e }, z, O), S(d, null, k, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, i) => {
383
392
  t.hasNavigation = i;
384
- } }, metadata: e }, k, D), S(c, null, G, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, i) => {
393
+ } }, metadata: e }, D, G), S(d, null, I, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, i) => {
385
394
  t.alignVertical = i;
386
- } }, metadata: e }, I, V), S(c, null, B, { kind: "accessor", name: "maxReservations", static: !1, private: !1, access: { has: (t) => "maxReservations" in t, get: (t) => t.maxReservations, set: (t, i) => {
395
+ } }, metadata: e }, V, E), S(d, null, B, { kind: "accessor", name: "maxReservations", static: !1, private: !1, access: { has: (t) => "maxReservations" in t, get: (t) => t.maxReservations, set: (t, i) => {
387
396
  t.maxReservations = i;
388
- } }, metadata: e }, L, F), S(c, null, M, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, i) => {
397
+ } }, metadata: e }, L, F), S(d, null, M, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, i) => {
389
398
  t.preventPlaceClick = i;
390
- } }, metadata: e }, H, W), S(null, o = { value: u }, r, { kind: "class", name: u.name, metadata: e }, null, l), u = o.value, e && Object.defineProperty(u, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
391
- })(), c.styles = ee, p(u, l), u;
399
+ } }, metadata: e }, H, W), S(null, o = { value: u }, n, { kind: "class", name: u.name, metadata: e }, null, c), u = o.value, e && Object.defineProperty(u, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
400
+ })(), d.styles = te, p(u, c), u;
392
401
  })();
393
402
  export {
394
403
  me as SbbSeatReservationElement
@@ -1,13 +1,16 @@
1
1
  import { html as d } from "lit";
2
- import { unsafeHTML as a } from "lit/directives/unsafe-html.js";
3
- import { svgs as e, mapIconToSvg as r } from "../common.js";
2
+ import { unsafeHTML as s } from "lit/directives/unsafe-html.js";
3
+ import { svgs as _, mapIconToSvg as r } from "../common.js";
4
4
  import "@sbb-esta/lyne-elements/table.js";
5
5
  import "../seat-reservation-graphic.js";
6
6
  const E = (A) => d`
7
7
  <div class="story-asset">
8
- <span class="story-asset__preview">${a(A)}</span>
8
+ <span class="story-asset__preview">${s(A)}</span>
9
9
  </div>
10
- `, t = (A) => r[A]?.svg ? E(r[A].svg) : r[A]?.svgName ? d`<sbb-icon name="${r[A].svgName}"></sbb-icon>` : null, _ = d`
10
+ `, t = (A) => {
11
+ var e, a;
12
+ return (e = r[A]) != null && e.svg ? E(r[A].svg) : (a = r[A]) != null && a.svgName ? d`<sbb-icon name="${r[A].svgName}"></sbb-icon>` : null;
13
+ }, R = d`
11
14
  <sbb-table-wrapper>
12
15
  <table class="sbb-table">
13
16
  <thead>
@@ -61,7 +64,7 @@ const E = (A) => d`
61
64
  </tbody>
62
65
  </table>
63
66
  </sbb-table-wrapper>
64
- `, s = d`
67
+ `, o = d`
65
68
  <sbb-table-wrapper>
66
69
  <table class="sbb-table">
67
70
  <thead>
@@ -130,7 +133,7 @@ const E = (A) => d`
130
133
  </tbody>
131
134
  </table>
132
135
  </sbb-table-wrapper>
133
- `, R = d`
136
+ `, l = d`
134
137
  <sbb-table-wrapper>
135
138
  <table aria-label="Available Service Icons" class="sbb-table">
136
139
  <thead>
@@ -209,7 +212,7 @@ const E = (A) => d`
209
212
  </tbody>
210
213
  </table>
211
214
  </sbb-table-wrapper>
212
- `, o = d`
215
+ `, T = d`
213
216
  <sbb-table-wrapper>
214
217
  <table class="sbb-table">
215
218
  <thead>
@@ -256,7 +259,7 @@ const E = (A) => d`
256
259
  <td>COACH_PASSAGE</td>
257
260
  </tr>
258
261
  <tr>
259
- <td>${E(e.chassisPassageWaggonBottomRight)}</td>
262
+ <td>${E(_.chassisPassageWaggonBottomRight)}</td>
260
263
  <td>Passage-Waggon Type: Right</td>
261
264
  <td
262
265
  style="background: linear-gradient(90deg, var(--sbb-color-white) 5%, var(--sbb-color-red));"
@@ -275,7 +278,7 @@ const E = (A) => d`
275
278
  <td>COACH_BORDER_MIDDLE</td>
276
279
  </tr>
277
280
  <tr>
278
- <td>${E(e.chassisSeparator)}</td>
281
+ <td>${E(_.chassisSeparator)}</td>
279
282
  <td>Separator</td>
280
283
  <td
281
284
  style="background: linear-gradient(90deg, var(--sbb-color-white) 5%, var(--sbb-color-red))"
@@ -291,7 +294,7 @@ const E = (A) => d`
291
294
  </tbody>
292
295
  </table>
293
296
  </sbb-table-wrapper>
294
- `, L = d`
297
+ `, I = d`
295
298
  <style>
296
299
  .story-asset {
297
300
  width: max-content;
@@ -300,15 +303,15 @@ const E = (A) => d`
300
303
  </style>
301
304
  <h1>List of all currently available assets.</h1>
302
305
  <h2>Interior</h2>
303
- ${_}
306
+ ${R}
304
307
  <h2>Layout</h2>
305
- ${s}
308
+ ${o}
306
309
  <h2>Service Icons</h2>
307
- ${R}
310
+ ${l}
308
311
  <h2>Chassis</h2>
309
- ${o}
312
+ ${T}
310
313
  `;
311
314
  export {
312
- L as assetsTemplate,
315
+ I as assetsTemplate,
313
316
  t as svgImageByOSDMCode
314
317
  };