@sbb-esta/lyne-elements-experimental 3.7.0 → 3.9.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 (52) hide show
  1. package/custom-elements.json +155 -19
  2. package/development/journey-summary/journey-summary.component.js +1 -1
  3. package/development/pearl-chain/pearl-chain.component.js +9 -4
  4. package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
  5. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +9 -4
  6. package/development/seat-reservation/common/mapper/icon-mapper.d.ts +0 -6
  7. package/development/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  8. package/development/seat-reservation/common/mapper/icon-mapper.js +2 -1
  9. package/development/seat-reservation/common/svgs.js +5 -5
  10. package/development/seat-reservation/common/types.d.ts +8 -0
  11. package/development/seat-reservation/common/types.d.ts.map +1 -1
  12. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +24 -6
  13. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  14. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +109 -22
  15. package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  16. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +58 -35
  17. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +4 -2
  18. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  19. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +27 -44
  20. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -1
  21. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +1 -3
  22. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  23. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +54 -10
  24. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -1
  25. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +46 -6
  26. package/development/timetable-row/timetable-row.component.js +7 -7
  27. package/journey-summary/journey-summary.component.js +1 -1
  28. package/package.json +2 -2
  29. package/pearl-chain/pearl-chain.component.js +1 -1
  30. package/pearl-chain-time/pearl-chain-time.component.js +1 -1
  31. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +17 -17
  32. package/seat-reservation/common/mapper/icon-mapper.d.ts +0 -6
  33. package/seat-reservation/common/mapper/icon-mapper.d.ts.map +1 -1
  34. package/seat-reservation/common/mapper/icon-mapper.js +1 -0
  35. package/seat-reservation/common/svgs.js +10 -10
  36. package/seat-reservation/common/types.d.ts +8 -0
  37. package/seat-reservation/common/types.d.ts.map +1 -1
  38. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts +24 -6
  39. package/seat-reservation/seat-reservation/seat-reservation-base-element.d.ts.map +1 -1
  40. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +230 -165
  41. package/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
  42. package/seat-reservation/seat-reservation/seat-reservation.component.js +66 -67
  43. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +10 -10
  44. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.d.ts.map +1 -1
  45. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +37 -54
  46. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +5 -5
  47. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts +1 -3
  48. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
  49. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +91 -93
  50. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +22 -22
  51. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +49 -49
  52. package/timetable-row/timetable-row.component.js +56 -56
@@ -1,37 +1,46 @@
1
- var ve = (h) => {
2
- throw TypeError(h);
1
+ var ve = (n) => {
2
+ throw TypeError(n);
3
3
  };
4
- var fe = (h, d, u) => d.has(h) || ve("Cannot " + u);
5
- var g = (h, d, u) => (fe(h, d, "read from private field"), u ? u.call(h) : d.get(h)), v = (h, d, u) => d.has(h) ? ve("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(h) : d.set(h, u), o = (h, d, u, w) => (fe(h, d, "write to private field"), w ? w.call(h, u) : d.set(h, u), u);
6
- import { __runInitializers as r, __esDecorate as f } from "tslib";
7
- import { isArrowKeyOrPageKeysPressed as Se } from "@sbb-esta/lyne-elements/core/a11y.js";
4
+ var fe = (n, d, u) => d.has(n) || ve("Cannot " + u);
5
+ var g = (n, d, u) => (fe(n, d, "read from private field"), u ? u.call(n) : d.get(n)), v = (n, d, u) => d.has(n) ? ve("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(n) : d.set(n, u), r = (n, d, u, T) => (fe(n, d, "write to private field"), T ? T.call(n, u) : d.set(n, u), u);
6
+ import { __runInitializers as l, __esDecorate as f } from "tslib";
7
+ import { isArrowKeyOrPageKeysPressed as Ce } from "@sbb-esta/lyne-elements/core/a11y.js";
8
8
  import { forceType as C } from "@sbb-esta/lyne-elements/core/decorators.js";
9
- import { LitElement as Ce, isServer as xe } from "lit";
10
- import { property as S, state as T, eventOptions as Ie } from "lit/decorators.js";
11
- import { mapPlaceInfosToPlaceSelection as pe, mapPlaceAndCoachToSeatReservationPlaceSelection as me, mapCoachInfosToCoachSelection as be } from "../common/mapper.js";
12
- var x;
13
- (function(h) {
14
- h.right = "right", h.left = "left";
15
- })(x || (x = {}));
16
- let we = (() => {
17
- var I, p, m, b, _, y, P, A, R, k, E, N, n;
18
- let h = Ce, d = [], u, w = [], B = [], D, z = [], F = [], G, V = [], O = [], L, W = [], X = [], H, K = [], U = [], q, M = [], $ = [], j, J = [], Q = [], Y, Z = [], ee = [], te, ie = [], se = [], ae, ce = [], oe = [], re, le = [], he = [], ne, de = [], ue = [], ge;
19
- return n = class extends h {
9
+ import { LitElement as pe, isServer as xe } from "lit";
10
+ import { property as S, state as w, eventOptions as Ie } from "lit/decorators.js";
11
+ import { mapIconToSvg as Se, mapPlaceInfosToPlaceSelection as me, mapPlaceAndCoachToSeatReservationPlaceSelection as _e, mapCoachInfosToCoachSelection as be } from "../common/mapper.js";
12
+ var p;
13
+ (function(n) {
14
+ n.right = "right", n.left = "left";
15
+ })(p || (p = {}));
16
+ const ye = 3, Pe = [
17
+ "sa-vo",
18
+ "sa-rs",
19
+ "sa-abteilkinderwagen",
20
+ "sa-wr",
21
+ "sa-fa",
22
+ "sa-bz",
23
+ "sa-rz"
24
+ ];
25
+ let Be = (() => {
26
+ var x, I, m, _, b, y, P, A, R, E, N, k, h;
27
+ let n = pe, d = [], u, T = [], D = [], B, z = [], F = [], O, V = [], G = [], L, W = [], X = [], H, K = [], U = [], q, M = [], $ = [], j, Y = [], J = [], Q, Z = [], ee = [], te, se = [], ie = [], ae, ce = [], oe = [], re, le = [], ne = [], he, de = [], ue = [], ge;
28
+ return h = class extends n {
20
29
  constructor() {
21
30
  super(...arguments);
31
+ v(this, x);
22
32
  v(this, I);
23
- v(this, p);
24
33
  v(this, m);
25
- v(this, b);
26
34
  v(this, _);
35
+ v(this, b);
27
36
  v(this, y);
28
37
  v(this, P);
29
38
  v(this, A);
30
39
  v(this, R);
31
- v(this, k);
32
40
  v(this, E);
33
41
  v(this, N);
34
- o(this, I, (r(this, d), r(this, w, null))), o(this, p, (r(this, B), r(this, z, !0))), o(this, m, (r(this, F), r(this, V, !1))), o(this, b, (r(this, O), r(this, W, 16))), o(this, _, (r(this, X), r(this, K, null))), o(this, y, (r(this, U), r(this, M, -1))), o(this, P, (r(this, $), r(this, J, -1))), o(this, A, (r(this, Q), r(this, Z, !1))), o(this, R, (r(this, ee), r(this, ie, -1))), o(this, k, (r(this, se), r(this, ce, -1))), o(this, E, (r(this, oe), r(this, le, -1))), o(this, N, (r(this, he), r(this, de, -1))), this.coachBorderPadding = (r(this, ue), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.currScrollDirection = x.right, this.maxCalcCoachsWidth = 0, this.scrollCoachsAreaWidth = 0, this.scrollNavigationAreaDim = 0, this.triggerCoachPositionsCollection = [], this.firstTabElement = null, this.lastTabElement = null, this.navigationScrollArea = null, this.coachScrollArea = null, this.currSelectedPlace = null, this.currSelectedPlaceElementId = null, this.currSelectedCoachIndex = -1, this.currSelectedDeckIndex = 0, this.preventCoachScrollByPlaceClick = !1, this.selectedSeatReservationPlaces = {
42
+ v(this, k);
43
+ r(this, x, (l(this, d), l(this, T, null))), r(this, I, (l(this, D), l(this, z, !0))), r(this, m, (l(this, F), l(this, V, !1))), r(this, _, (l(this, G), l(this, W, 16))), r(this, b, (l(this, X), l(this, K, null))), r(this, y, (l(this, U), l(this, M, -1))), r(this, P, (l(this, $), l(this, Y, -1))), r(this, A, (l(this, J), l(this, Z, !1))), r(this, R, (l(this, ee), l(this, se, -1))), r(this, E, (l(this, ie), l(this, ce, -1))), r(this, N, (l(this, oe), l(this, le, -1))), r(this, k, (l(this, ne), l(this, de, -1))), this.coachBorderPadding = (l(this, ue), 6), this.gapBetweenCoaches = 4, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.gapBetweenCoachDecks = 48, this.coachNavButtonDim = 0, this.coachNavData = [], this.currScrollDirection = p.right, this.maxCalcCoachsWidth = 0, this.scrollCoachsAreaWidth = 0, this.scrollNavigationAreaDim = 0, this.triggerCoachPositionsCollection = [], this.firstTabElement = null, this.lastTabElement = null, this.navigationScrollArea = null, this.coachScrollArea = null, this.currSelectedPlace = null, this.currSelectedPlaceElementId = null, this.currSelectedCoachIndex = -1, this.currSelectedDeckIndex = 0, this.preventCoachScrollByPlaceClick = !1, this.selectedSeatReservationPlaces = {
35
44
  seats: [],
36
45
  bicycles: []
37
46
  }, this.seatReservationWithoutNavigationHasFocus = !1, this.isCoachGridFocusable = !1, this.isAutoScrolling = !1, this.isKeyboardNavigation = !1, this.hasMultipleDecks = !1, this.keyboardNavigationEvents = {
@@ -41,91 +50,101 @@ let we = (() => {
41
50
  ArrowDown: "ArrowDown",
42
51
  Tab: "Tab",
43
52
  Enter: "Enter"
53
+ }, this._prepareServiceIconsNavigation = (e) => {
54
+ if (!e)
55
+ return [];
56
+ const t = e?.map(function(s) {
57
+ return {
58
+ pId: s,
59
+ svgName: Se[s]?.svgName ? Se[s]?.svgName : ""
60
+ };
61
+ }).filter((s) => Pe.indexOf(s.svgName) !== -1).filter((s, i, a) => a.map((o) => o.svgName).indexOf(s.svgName) === i).map((s) => s.pId).slice(0, ye);
62
+ return t || [];
44
63
  };
45
64
  }
46
65
  /** The seat reservations array contains all coaches and places */
47
66
  get seatReservations() {
48
- return g(this, I);
67
+ return g(this, x);
49
68
  }
50
69
  set seatReservations(e) {
51
- o(this, I, e);
70
+ r(this, x, e);
52
71
  }
53
72
  /** The seat reservation navigation can be toggled by this property */
54
73
  get hasNavigation() {
55
- return g(this, p);
74
+ return g(this, I);
56
75
  }
57
76
  set hasNavigation(e) {
58
- o(this, p, e);
77
+ r(this, I, e);
59
78
  }
60
79
  /** The seat reservation area is aligned vertically */
61
80
  get alignVertical() {
62
81
  return g(this, m);
63
82
  }
64
83
  set alignVertical(e) {
65
- o(this, m, e);
84
+ r(this, m, e);
66
85
  }
67
86
  /** The seat reservation area's base grid size */
68
87
  get baseGridSize() {
69
- return g(this, b);
88
+ return g(this, _);
70
89
  }
71
90
  set baseGridSize(e) {
72
- o(this, b, e);
91
+ r(this, _, e);
73
92
  }
74
93
  /** The seat reservation area's width */
75
94
  get height() {
76
- return g(this, _);
95
+ return g(this, b);
77
96
  }
78
97
  set height(e) {
79
- o(this, _, e);
98
+ r(this, b, e);
80
99
  }
81
100
  /** Maximal number of possible clickable seats */
82
101
  get maxSeatReservations() {
83
102
  return g(this, y);
84
103
  }
85
104
  set maxSeatReservations(e) {
86
- o(this, y, e);
105
+ r(this, y, e);
87
106
  }
88
107
  /** Maximal number of possible clickable bicycle places */
89
108
  get maxBicycleReservations() {
90
109
  return g(this, P);
91
110
  }
92
111
  set maxBicycleReservations(e) {
93
- o(this, P, e);
112
+ r(this, P, e);
94
113
  }
95
114
  /** Any click functionality is prevented */
96
115
  get preventPlaceClick() {
97
116
  return g(this, A);
98
117
  }
99
118
  set preventPlaceClick(e) {
100
- o(this, A, e);
119
+ r(this, A, e);
101
120
  }
102
121
  get preselectCoachIndex() {
103
122
  return g(this, R);
104
123
  }
105
124
  set preselectCoachIndex(e) {
106
- o(this, R, e);
125
+ r(this, R, e);
107
126
  }
108
127
  get selectedCoachIndex() {
109
- return g(this, k);
128
+ return g(this, E);
110
129
  }
111
130
  set selectedCoachIndex(e) {
112
- o(this, k, e);
131
+ r(this, E, e);
113
132
  }
114
133
  get focusedCoachIndex() {
115
- return g(this, E);
134
+ return g(this, N);
116
135
  }
117
136
  set focusedCoachIndex(e) {
118
- o(this, E, e);
137
+ r(this, N, e);
119
138
  }
120
139
  //Sets the hover style when scrolling to a coach
121
140
  get hoveredScrollCoachIndex() {
122
- return g(this, N);
141
+ return g(this, k);
123
142
  }
124
143
  set hoveredScrollCoachIndex(e) {
125
- o(this, N, e);
144
+ r(this, k, e);
126
145
  }
127
146
  willUpdate(e) {
128
- if (super.willUpdate(e), e.has("seatReservations") && (this.hasMultipleDecks = this.seatReservations?.length > 1, this._initSeatReservationPlaceSelection()), e.has("baseGridSize") && (this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent()), e.has("height") && this.height) {
147
+ if (super.willUpdate(e), e.has("seatReservations") && (this.hasMultipleDecks = this.seatReservations?.length > 1, this._initPrepareSeatReservationData(), this._initSeatReservationPlaceSelection()), e.has("baseGridSize") && (this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent()), e.has("height") && this.height) {
129
148
  const t = this.seatReservations[this.currSelectedDeckIndex] || null;
130
149
  t?.coachItems.length && (this.baseGridSize = this.height / t.coachItems[0].dimension.h, this.coachBorderOffset = this.coachBorderPadding / this.baseGridSize, this.style?.setProperty("--sbb-seat-reservation-grid-size", `${this.baseGridSize}px`), this.initNavigationSelectionByScrollEvent());
131
150
  }
@@ -140,33 +159,33 @@ let we = (() => {
140
159
  * Data can be prepared once for the entire component
141
160
  * in order to avoid recurring iteration processes in rendering.
142
161
  */
143
- initPrepairSeatReservationData() {
144
- this._determineBaseFontSize(), this._prepairCoachDriverArea();
162
+ _initPrepareSeatReservationData() {
163
+ this._determineBaseFontSize(), this.hasMultipleDecks && this._initEmptyCoachDeckOffsets(), this._prepareNavigationCoachData();
145
164
  }
146
165
  /* Init scroll event handling for coach navigation */
147
166
  initNavigationSelectionByScrollEvent() {
148
167
  this.firstTabElement = this.shadowRoot?.querySelector("#first-tab-element"), this.lastTabElement = this.shadowRoot?.querySelector("#last-tab-element"), this.coachScrollArea = this.shadowRoot?.querySelector("#sbb-sr__wrapper-scrollarea"), this.navigationScrollArea = this.shadowRoot?.querySelector("#sbb-sr-navigation");
149
168
  const e = this.seatReservations ? this.seatReservations[this.currSelectedDeckIndex] : null;
150
169
  if (e && e.coachItems.length > 0) {
151
- const t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding, i = (this.seatReservations.length - 1) * this.gapBetweenCoachDecks;
152
- this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length + i}`), this.style?.setProperty("--sbb-seat-reservation-decks", `${this.seatReservations.length}`);
170
+ const t = e.coachItems[0].dimension.h * this.baseGridSize + this.coachBorderPadding, s = (this.seatReservations.length - 1) * this.gapBetweenCoachDecks;
171
+ this.style?.setProperty("--sbb-seat-reservation-height", `${t * this.seatReservations.length + s}`), this.style?.setProperty("--sbb-seat-reservation-decks", `${this.seatReservations.length}`);
153
172
  }
154
173
  if (this.navigationScrollArea) {
155
174
  this.scrollNavigationAreaDim = this.alignVertical ? this.navigationScrollArea.getBoundingClientRect().height : this.navigationScrollArea.getBoundingClientRect().width;
156
175
  const t = this.navigationScrollArea.querySelector("ul > li");
157
176
  if (t) {
158
- const i = t?.getBoundingClientRect();
159
- this.coachNavButtonDim = this.alignVertical ? i.height : i.width;
177
+ const s = t?.getBoundingClientRect();
178
+ this.coachNavButtonDim = this.alignVertical ? s.height : s.width;
160
179
  }
161
180
  }
162
181
  if (this.coachScrollArea && e) {
163
182
  let t = 0;
164
- this.scrollCoachsAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((i) => {
165
- const s = t, c = this.getCalculatedDimension(i.dimension).w;
166
- return t += c + this.gapBetweenCoaches, {
167
- start: s,
183
+ this.scrollCoachsAreaWidth = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, this.triggerCoachPositionsCollection = e.coachItems.map((s) => {
184
+ const i = t, a = this.getCalculatedDimension(s.dimension).w;
185
+ return t += a + this.gapBetweenCoaches, {
186
+ start: i,
168
187
  end: t,
169
- width: c
188
+ width: a
170
189
  };
171
190
  }), this.maxCalcCoachsWidth = t;
172
191
  }
@@ -205,30 +224,30 @@ let we = (() => {
205
224
  return;
206
225
  }
207
226
  }
208
- if (this.currSelectedCoachIndex !== -1 && Se(e))
227
+ if (this.currSelectedCoachIndex !== -1 && Ce(e))
209
228
  switch (e.preventDefault(), t) {
210
229
  case this.keyboardNavigationEvents.ArrowLeft:
211
230
  {
212
- const i = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown : t;
213
- this._navigateToPlaceByKeyboard(i);
231
+ const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowDown : t;
232
+ this._navigateToPlaceByKeyboard(s);
214
233
  }
215
234
  break;
216
235
  case this.keyboardNavigationEvents.ArrowRight:
217
236
  {
218
- const i = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp : t;
219
- this._navigateToPlaceByKeyboard(i);
237
+ const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowUp : t;
238
+ this._navigateToPlaceByKeyboard(s);
220
239
  }
221
240
  break;
222
241
  case this.keyboardNavigationEvents.ArrowUp:
223
242
  {
224
- const i = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft : t;
225
- this._navigateToPlaceByKeyboard(i);
243
+ const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowLeft : t;
244
+ this._navigateToPlaceByKeyboard(s);
226
245
  }
227
246
  break;
228
247
  case this.keyboardNavigationEvents.ArrowDown:
229
248
  {
230
- const i = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight : t;
231
- this._navigateToPlaceByKeyboard(i);
249
+ const s = this.alignVertical ? this.keyboardNavigationEvents.ArrowRight : t;
250
+ this._navigateToPlaceByKeyboard(s);
232
251
  }
233
252
  break;
234
253
  }
@@ -263,16 +282,16 @@ let we = (() => {
263
282
  const e = this._getPlaceHtmlElement();
264
283
  e && (e.setAttribute("keyfocus", "unfocus"), this._setCurrSelectedPlaceElementId(null), this.currSelectedPlace = null);
265
284
  }
266
- getCalculatedDimension(e, t, i, s) {
267
- return t && !i && (e.h += this.coachBorderOffset * 2), s && (e.h += this.coachBorderOffset), {
285
+ getCalculatedDimension(e, t, s, i) {
286
+ return t && !s && (e.h += this.coachBorderOffset * 2), i && (e.h += this.coachBorderOffset), {
268
287
  w: this.baseGridSize * e.w,
269
288
  h: this.baseGridSize * e.h
270
289
  };
271
290
  }
272
- getCalculatedPosition(e, t, i, s) {
273
- if (i && t) {
274
- const c = s ? i.h : i.h + this.coachBorderOffset;
275
- e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === c && (e.y += this.coachBorderOffset);
291
+ getCalculatedPosition(e, t, s, i) {
292
+ if (s && t) {
293
+ const a = i ? s.h : s.h + this.coachBorderOffset;
294
+ e.y === 0 ? e.y -= this.coachBorderOffset : e.y + t.h === a && (e.y += this.coachBorderOffset);
276
295
  }
277
296
  return {
278
297
  x: this.baseGridSize * e.x,
@@ -283,12 +302,12 @@ let we = (() => {
283
302
  /**
284
303
  * Counts all available seats together depending on the seat type
285
304
  *
286
- * @param coachIndex
305
+ * @param places
287
306
  * @returns An Object with count of free seats and free bicycle places
288
307
  */
289
308
  getAvailableFreePlacesNumFromCoach(e) {
290
- const t = { seats: 0, bicycles: 0 }, i = this.seatReservations[this.currSelectedDeckIndex].coachItems[e].places?.reduce((s, c) => (c.state !== "FREE" || (c.type === "SEAT" ? s.seats++ : s.bicycles++), s), t);
291
- return i || t;
309
+ const t = { seats: 0, bicycles: 0 }, s = e?.reduce((i, a) => (a.state !== "FREE" || (a.type === "SEAT" ? i.seats++ : i.bicycles++), i), t);
310
+ return s || t;
292
311
  }
293
312
  /**
294
313
  * At the end of a scroll Event from the coach scrollable area,
@@ -306,10 +325,10 @@ let we = (() => {
306
325
  _scrollToSelectedNavigationButton(e) {
307
326
  setTimeout(() => {
308
327
  if (this.hoveredScrollCoachIndex = e, this.hasNavigation && this.navigationScrollArea) {
309
- const t = this.scrollNavigationAreaDim / 2, s = e * this.coachNavButtonDim - t + this.coachNavButtonDim;
328
+ const t = this.scrollNavigationAreaDim / 2, i = e * this.coachNavButtonDim - t + this.coachNavButtonDim;
310
329
  this.navigationScrollArea.scrollTo({
311
- top: this.alignVertical ? s : 0,
312
- left: this.alignVertical ? 0 : s,
330
+ top: this.alignVertical ? i : 0,
331
+ left: this.alignVertical ? 0 : i,
313
332
  behavior: "smooth"
314
333
  });
315
334
  }
@@ -319,7 +338,7 @@ let we = (() => {
319
338
  * Sets the new ScrollDirection by the new given target coach index.
320
339
  */
321
340
  _setScrollDirectionByCoachIndex() {
322
- this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ? x.right : x.left;
341
+ this.currScrollDirection = this.currSelectedCoachIndex > this.selectedCoachIndex ? p.right : p.left;
323
342
  }
324
343
  /**
325
344
  * Returns the scroll start or end position X from the selected coach.
@@ -329,7 +348,7 @@ let we = (() => {
329
348
  */
330
349
  _getCoachScrollPositionX() {
331
350
  const e = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex];
332
- return this.isKeyboardNavigation && this.currScrollDirection === x.left && e.width > this.scrollCoachsAreaWidth ? e.end - this.scrollCoachsAreaWidth : e.start;
351
+ return this.isKeyboardNavigation && this.currScrollDirection === p.left && e.width > this.scrollCoachsAreaWidth ? e.end - this.scrollCoachsAreaWidth : e.start;
333
352
  }
334
353
  /**
335
354
  * Sets the focus on the HTML table (grid) caption element so that the heading is read out when using a ScreenReader.
@@ -346,8 +365,8 @@ let we = (() => {
346
365
  * @returns boolean
347
366
  */
348
367
  _isScrollableToSelectedCoach() {
349
- const e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, i = this.maxCalcCoachsWidth - t, s = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex], c = e === this.triggerCoachPositionsCollection[this.currSelectedCoachIndex].start;
350
- return (e < i || e > s.start) && !c;
368
+ const e = this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft, t = this.alignVertical ? this.coachScrollArea.getBoundingClientRect().height : this.coachScrollArea.getBoundingClientRect().width, s = this.maxCalcCoachsWidth - t, i = this.triggerCoachPositionsCollection[this.currSelectedCoachIndex], a = e === this.triggerCoachPositionsCollection[this.currSelectedCoachIndex].start;
369
+ return (e < s || e > i.start) && !a;
351
370
  }
352
371
  /**
353
372
  * Returns the coach index which is currently visible in the scroll area
@@ -355,7 +374,7 @@ let we = (() => {
355
374
  */
356
375
  _getCoachIndexByScrollTriggerPosition() {
357
376
  const t = (this.alignVertical ? this.coachScrollArea.scrollTop : this.coachScrollArea.scrollLeft) + this.scrollCoachsAreaWidth / 2;
358
- return this.triggerCoachPositionsCollection.findIndex((i) => t >= i.start && t <= i.end);
377
+ return this.triggerCoachPositionsCollection.findIndex((s) => t >= s.start && t <= s.end);
359
378
  }
360
379
  /**
361
380
  * Get the first place of current selected coach by table cell coordinate 0-0 id.
@@ -363,8 +382,8 @@ let we = (() => {
363
382
  */
364
383
  _getFirstPlaceInSelecedCoach() {
365
384
  let e = null;
366
- const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], i = "cell-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-0-0", s = this.shadowRoot?.querySelector("#" + i)?.querySelector("sbb-seat-reservation-place-control")?.getAttribute("text") || null;
367
- return t && s && (e = t.places?.find((c) => c.number === s) || null), e;
385
+ const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex], s = "cell-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-0-0", i = this.shadowRoot?.querySelector("#" + s)?.querySelector("sbb-seat-reservation-place-control")?.getAttribute("text") || null;
386
+ return t && i && (e = t.places?.find((a) => a.number === i) || null), e;
368
387
  }
369
388
  _getSwitchedCoachDeckIndexByKeyNavigation(e, t) {
370
389
  return !this.currSelectedPlace || e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft ? null : e === this.keyboardNavigationEvents.ArrowDown && this.currSelectedPlace.position.y + 2 === t.dimension.h && this.seatReservations[this.currSelectedDeckIndex + 1] ? this.currSelectedDeckIndex + 1 : e === this.keyboardNavigationEvents.ArrowUp && this.currSelectedPlace.position.y === 0 && this.seatReservations[this.currSelectedDeckIndex - 1] ? this.currSelectedDeckIndex - 1 : null;
@@ -377,40 +396,40 @@ let we = (() => {
377
396
  */
378
397
  _getClosestPlaceByKeyDirection(e) {
379
398
  const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[this.currSelectedCoachIndex];
380
- let i = null, s = t.places, c = null;
381
- if (s)
399
+ let s = null, i = t.places, a = null;
400
+ if (i)
382
401
  if (this.currSelectedPlaceElementId) {
383
402
  if (this.currSelectedPlace) {
384
- const l = { ...this.currSelectedPlace.position };
385
- e && (c = this._getSwitchedCoachDeckIndexByKeyNavigation(e, t), c !== null && (s = this.seatReservations[c].coachItems[this.currSelectedCoachIndex].places || [], l.y = c < this.currSelectedDeckIndex ? t.dimension.h : -1));
386
- for (const a of s)
387
- e ? a.number !== this.currSelectedPlace?.number && (e === this.keyboardNavigationEvents.ArrowRight && (a.position.y === l.y || a.position.y === l.y - 1) && a.position.x > l.x && (!i || a.position.x < i.position.x) || e === this.keyboardNavigationEvents.ArrowDown && (a.position.x === l.x || a.position.x === l.x + 1) && a.position.y > l.y && (!i || a.position.y < i.position.y) || e === this.keyboardNavigationEvents.ArrowLeft && (a.position.y === l.y || a.position.y === l.y + 1) && a.position.x < l.x && (!i || a.position.x > i.position.x) || e === this.keyboardNavigationEvents.ArrowUp && (a.position.x === l.x || a.position.x === l.x - 1) && a.position.y < l.y && (!i || a.position.y > i.position.y)) && (i = a) : (this.currScrollDirection === x.right && a.position.y === l.y && (!i || a.position.x < i.position.x) || this.currScrollDirection === x.left && a.position.y === l.y && (!i || a.position.x > i.position.x)) && (i = a);
388
- c !== null && i && (this.currSelectedDeckIndex = c);
403
+ const o = { ...this.currSelectedPlace.position };
404
+ e && (a = this._getSwitchedCoachDeckIndexByKeyNavigation(e, t), a !== null && (i = this.seatReservations[a].coachItems[this.currSelectedCoachIndex].places || [], o.y = a < this.currSelectedDeckIndex ? t.dimension.h : -1));
405
+ for (const c of i)
406
+ e ? c.number !== this.currSelectedPlace?.number && (e === this.keyboardNavigationEvents.ArrowRight && (c.position.y === o.y || c.position.y === o.y - 1) && c.position.x > o.x && (!s || c.position.x < s.position.x) || e === this.keyboardNavigationEvents.ArrowDown && (c.position.x === o.x || c.position.x === o.x + 1) && c.position.y > o.y && (!s || c.position.y < s.position.y) || e === this.keyboardNavigationEvents.ArrowLeft && (c.position.y === o.y || c.position.y === o.y + 1) && c.position.x < o.x && (!s || c.position.x > s.position.x) || e === this.keyboardNavigationEvents.ArrowUp && (c.position.x === o.x || c.position.x === o.x - 1) && c.position.y < o.y && (!s || c.position.y > s.position.y)) && (s = c) : (this.currScrollDirection === p.right && c.position.y === o.y && (!s || c.position.x < s.position.x) || this.currScrollDirection === p.left && c.position.y === o.y && (!s || c.position.x > s.position.x)) && (s = c);
407
+ a !== null && s && (this.currSelectedDeckIndex = a);
389
408
  }
390
409
  } else
391
410
  return this._getFirstPlaceInSelecedCoach();
392
- return i;
411
+ return s;
393
412
  }
394
413
  // Handling for Tab navigation if an place is selected inside the coach.
395
414
  // This controls the focused coach from the current selected coach.
396
415
  _navigateCoachNavigationByKeyboard(e) {
397
- const t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex, i = e === "NEXT_TAB" ? this.getNextAvailableCoachIndex(t) : this.getPrevAvailableCoachIndex(t);
398
- if (t === i) {
416
+ const t = this.focusedCoachIndex === -1 ? this.currSelectedCoachIndex === -1 ? 0 : this.currSelectedCoachIndex : this.focusedCoachIndex, s = e === "NEXT_TAB" ? this.getNextAvailableCoachIndex(t) : this.getPrevAvailableCoachIndex(t);
417
+ if (t === s) {
399
418
  this.unfocusPlaceElement(), this.seatReservationWithoutNavigationHasFocus = !1, e === "NEXT_TAB" ? this.lastTabElement.focus() : this.firstTabElement.focus();
400
419
  return;
401
420
  }
402
421
  if (this.hasNavigation) {
403
- const s = this._getPlaceHtmlElement(), c = s ? s.getAttribute("keyfocus") === "focus" : !1;
422
+ const i = this._getPlaceHtmlElement(), a = i ? i.getAttribute("keyfocus") === "focus" : !1;
404
423
  if (e === "PREV_TAB" && this.selectedCoachIndex === t)
405
- if (c) {
424
+ if (a) {
406
425
  this.focusedCoachIndex = t, this.unfocusPlaceElement();
407
426
  return;
408
427
  } else
409
- this.focusedCoachIndex = i;
410
- else i !== this.currSelectedCoachIndex ? this.focusedCoachIndex = i : (this.focusedCoachIndex = -1, this.selectedCoachIndex = i, c ? this.focusPlaceElement(this.currSelectedPlace) : (this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid()));
411
- this._scrollToSelectedNavigationButton(i);
428
+ this.focusedCoachIndex = s;
429
+ else s !== this.currSelectedCoachIndex ? this.focusedCoachIndex = s : (this.focusedCoachIndex = -1, this.selectedCoachIndex = s, a ? this.focusPlaceElement(this.currSelectedPlace) : (this.isCoachGridFocusable = !0, this._setFocusToSelectedCoachGrid()));
430
+ this._scrollToSelectedNavigationButton(s);
412
431
  } else
413
- this.scrollToSelectedNavCoach(i);
432
+ this.scrollToSelectedNavCoach(s);
414
433
  }
415
434
  _navigateToPlaceByKeyboard(e) {
416
435
  if (this.preventCoachScrollByPlaceClick = !1, this.isKeyboardNavigation = !0, this.focusedCoachIndex !== -1 && (this.focusedCoachIndex = -1), !this.preventPlaceClick) {
@@ -418,8 +437,8 @@ let we = (() => {
418
437
  if (t)
419
438
  this.focusPlaceElement(t);
420
439
  else if (e === this.keyboardNavigationEvents.ArrowRight || e === this.keyboardNavigationEvents.ArrowLeft || this.alignVertical && (e === this.keyboardNavigationEvents.ArrowUp || e === this.keyboardNavigationEvents.ArrowDown)) {
421
- const i = e === this.keyboardNavigationEvents.ArrowRight ? this.getNextAvailableCoachIndex() : this.getPrevAvailableCoachIndex();
422
- this.scrollToSelectedNavCoach(i);
440
+ const s = e === this.keyboardNavigationEvents.ArrowRight ? this.getNextAvailableCoachIndex() : this.getPrevAvailableCoachIndex();
441
+ this.scrollToSelectedNavCoach(s);
423
442
  }
424
443
  }
425
444
  }
@@ -432,28 +451,28 @@ let we = (() => {
432
451
  return t > 0 ? t - 1 : t;
433
452
  }
434
453
  updateSelectedSeatReservationPlaces(e) {
435
- const t = e.placeType === "SEAT" ? "seats" : "bicycles", i = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, s = this.selectedSeatReservationPlaces[t], c = this._updateSelectedSeatReservationPlaces(s, i, e);
436
- this.selectedSeatReservationPlaces[t] = c, this.dispatchEvent(new CustomEvent("selectedplaces", {
454
+ const t = e.placeType === "SEAT" ? "seats" : "bicycles", s = e.placeType === "SEAT" ? this.maxSeatReservations : this.maxBicycleReservations, i = this.selectedSeatReservationPlaces[t], a = this._updateSelectedSeatReservationPlaces(i, s, e);
455
+ this.selectedSeatReservationPlaces[t] = a, this.dispatchEvent(new CustomEvent("selectedplaces", {
437
456
  bubbles: !0,
438
457
  composed: !0,
439
458
  detail: this.selectedSeatReservationPlaces
440
459
  }));
441
460
  }
442
- _updateSelectedSeatReservationPlaces(e, t, i) {
443
- if (i.state === "SELECTED") {
444
- const s = this._getSeatReservationPlaceSelection(i);
445
- s && e.push(s);
461
+ _updateSelectedSeatReservationPlaces(e, t, s) {
462
+ if (s.state === "SELECTED") {
463
+ const i = this._getSeatReservationPlaceSelection(s);
464
+ i && e.push(i);
446
465
  } else
447
- e = e.filter((s) => s.id !== i.id);
466
+ e = e.filter((i) => i.id !== s.id);
448
467
  if (t > -1 && e.length > t) {
449
- const s = t > 0 ? i : void 0;
450
- e = this._resetAllPlaceSelections(e, s);
468
+ const i = t > 0 ? s : void 0;
469
+ e = this._resetAllPlaceSelections(e, i);
451
470
  }
452
471
  return e;
453
472
  }
454
473
  updateCurrentSelectedPlaceInCoach(e) {
455
- const t = e.coachIndex, i = this.seatReservations[this.currSelectedDeckIndex].coachItems[t].places?.find((s) => s.number == e.number);
456
- i && (this.currSelectedCoachIndex = t, this.currSelectedPlace = i, this.currSelectedCoachIndex !== this.selectedCoachIndex && this.updateCurrentSelectedCoach(), this._setCurrSelectedPlaceElementId(i));
474
+ const t = e.coachIndex, s = this.seatReservations[this.currSelectedDeckIndex].coachItems[t].places?.find((i) => i.number == e.number);
475
+ s && (this.currSelectedCoachIndex = t, this.currSelectedPlace = s, this.currSelectedCoachIndex !== this.selectedCoachIndex && this.updateCurrentSelectedCoach(), this._setCurrSelectedPlaceElementId(s));
457
476
  }
458
477
  updateCurrentSelectedCoach() {
459
478
  this.selectedCoachIndex = this.currSelectedCoachIndex, this.focusedCoachIndex = -1;
@@ -464,15 +483,43 @@ let we = (() => {
464
483
  detail: e
465
484
  }));
466
485
  }
486
+ /**
487
+ * In the case of coach layouts with different decks,
488
+ * it is necessary to extend the offset with empty coaches
489
+ * in order to create a stable vehicle layout.
490
+ *
491
+ * [ooo]-[ooo]-[ooo]
492
+ * [ooo]-[ooo]-[ooo]-[ooo]-[ooo]
493
+ */
494
+ _initEmptyCoachDeckOffsets() {
495
+ const e = Array(this.seatReservations.length - 1).fill(0);
496
+ this.seatReservations[this.seatReservations.length - 1].coachItems.forEach((s) => {
497
+ for (let i = 0; i < this.seatReservations.length - 1; i++) {
498
+ const a = this.seatReservations[i].coachItems[e[i]];
499
+ if (s.id != a?.id) {
500
+ const o = {
501
+ ...s,
502
+ places: void 0,
503
+ propertyIds: void 0,
504
+ graphicElements: void 0,
505
+ serviceElements: void 0,
506
+ travelClass: []
507
+ };
508
+ this.seatReservations[i].coachItems.splice(e[i], 0, o);
509
+ }
510
+ e[i]++;
511
+ }
512
+ });
513
+ }
467
514
  /**
468
515
  * Initialization of SeatReservationPlaceSelection Array based on the transferred places
469
516
  * that have the state SELECTED within the seatReservation object
470
517
  */
471
518
  _initSeatReservationPlaceSelection() {
472
- this.seatReservations?.forEach((e) => e.coachItems.map((t, i) => {
473
- t.places?.filter((s) => s.state === "SELECTED")?.forEach((s) => {
474
- const c = pe(s, e.deckCoachIndex, i), l = this._getSeatReservationPlaceSelection(c);
475
- l && (l.placeType === "SEAT" ? this.selectedSeatReservationPlaces.seats.push(l) : this.selectedSeatReservationPlaces.bicycles.push(l));
519
+ this.seatReservations?.forEach((e) => e.coachItems.map((t, s) => {
520
+ t.places?.filter((i) => i.state === "SELECTED")?.forEach((i) => {
521
+ const a = me(i, e.deckCoachIndex, s), o = this._getSeatReservationPlaceSelection(a);
522
+ o && (o.placeType === "SEAT" ? this.selectedSeatReservationPlaces.seats.push(o) : this.selectedSeatReservationPlaces.bicycles.push(o));
476
523
  });
477
524
  }));
478
525
  }
@@ -482,22 +529,22 @@ let we = (() => {
482
529
  * @param currSelectedPlace
483
530
  */
484
531
  _resetAllPlaceSelections(e, t) {
485
- for (const i of e)
486
- if (!t || t.id !== i.id) {
487
- const s = this.shadowRoot?.getElementById(i.id);
488
- s && s.setAttribute("state", "FREE");
532
+ for (const s of e)
533
+ if (!t || t.id !== s.id) {
534
+ const i = this.shadowRoot?.getElementById(s.id);
535
+ i && i.setAttribute("state", "FREE");
489
536
  }
490
- return t ? e = e.filter((i) => i.id === t.id) : e = [], e;
537
+ return t ? e = e.filter((s) => s.id === t.id) : e = [], e;
491
538
  }
492
539
  _getSeatReservationPlaceSelection(e) {
493
- const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e.coachIndex], i = t.places?.find((s) => s.number === e.number);
494
- return i ? me(i, t, e.deckIndex, e.coachIndex) : null;
540
+ const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e.coachIndex], s = t.places?.find((i) => i.number === e.number);
541
+ return s ? _e(s, t, e.deckIndex, e.coachIndex) : null;
495
542
  }
496
543
  _getSeatReservationSelectedCoach(e) {
497
544
  if (!this.seatReservations[this.currSelectedDeckIndex].coachItems[e])
498
545
  return null;
499
- const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e], i = this.getAvailableFreePlacesNumFromCoach(e);
500
- return be(e, t, i);
546
+ const t = this.seatReservations[this.currSelectedDeckIndex].coachItems[e], s = this.getAvailableFreePlacesNumFromCoach(t.places);
547
+ return be(e, t, s);
501
548
  }
502
549
  _setCurrSelectedPlaceElementId(e) {
503
550
  e ? this.currSelectedPlaceElementId = "seat-reservation__place-button-" + this.currSelectedDeckIndex + "-" + this.currSelectedCoachIndex + "-" + e.number : this.currSelectedPlaceElementId = null;
@@ -513,23 +560,41 @@ let we = (() => {
513
560
  }
514
561
  }
515
562
  /**
516
- * Prepares all coaches with the values for whether there is a driver area left or right
563
+ * Prepares data for displaying navigation area.
564
+ * Calculates the values which are not going to change during use of a component:
565
+ * - coach id
566
+ * - list of service icons
567
+ * - class (first, second, any)
568
+ * - whether there is a driver area left or right
517
569
  * */
518
- _prepairCoachDriverArea() {
519
- this.seatReservations.forEach((e, t) => {
520
- this.seatReservations[t].coachItems = e.coachItems.map((i) => {
521
- const s = i.graphicElements?.filter((c) => c.icon === "DRIVER_AREA");
522
- if (s && s.length > 0) {
523
- const c = s.find((a) => a.position.x === 0) || !1, l = s.find((a) => a.position.x > 0) || !1;
524
- i.driverAreaSide = {
525
- left: !!c,
526
- right: !!l
527
- };
528
- }
529
- return i;
570
+ _prepareNavigationCoachData() {
571
+ this.seatReservations[this.seatReservations.length - 1].coachItems.forEach((t, s) => {
572
+ const i = [], a = [], o = [];
573
+ this.seatReservations.map((c) => c.coachItems[s]).forEach((c) => {
574
+ i.push(...c.travelClass), a.push(...c.propertyIds ? c.propertyIds : []), o.push(...c.places ? c.places : []);
575
+ }), this.coachNavData.push({
576
+ id: t.id,
577
+ travelClass: this._prepareTravelClassNavigation(i),
578
+ propertyIds: this._prepareServiceIconsNavigation(a),
579
+ isDriverArea: t.places ? t.places.length === 0 : !0,
580
+ driverAreaSide: this._prepareDriverAreaSideNavigation(t),
581
+ freePlaces: this.getAvailableFreePlacesNumFromCoach(o)
530
582
  });
531
583
  });
532
584
  }
585
+ _prepareTravelClassNavigation(e) {
586
+ return e.indexOf("FIRST") !== -1 ? "FIRST" : e.indexOf("SECOND") !== -1 ? "SECOND" : "ANY_CLASS";
587
+ }
588
+ _prepareDriverAreaSideNavigation(e) {
589
+ const t = e.graphicElements?.filter((s) => s.icon === "DRIVER_AREA");
590
+ if (t && t.length > 0) {
591
+ const s = t.find((a) => a.position.x === 0) || !1, i = t.find((a) => a.position.x > 0) || !1;
592
+ return {
593
+ left: !!s,
594
+ right: !!i
595
+ };
596
+ }
597
+ }
533
598
  /**
534
599
  * Returns the current selected place HTML element by currSelectedPlaceElementId.
535
600
  * @returns HTMLElement or null
@@ -537,38 +602,38 @@ let we = (() => {
537
602
  _getPlaceHtmlElement() {
538
603
  return this.currSelectedPlaceElementId && this.shadowRoot?.getElementById(this.currSelectedPlaceElementId) || null;
539
604
  }
540
- }, I = new WeakMap(), p = new WeakMap(), m = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), y = new WeakMap(), P = new WeakMap(), A = new WeakMap(), R = new WeakMap(), k = new WeakMap(), E = new WeakMap(), N = new WeakMap(), (() => {
541
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
542
- u = [S({ attribute: "seat-reservations", type: Array })], D = [C(), S({ attribute: "has-navigation", type: Boolean })], G = [C(), S({ attribute: "align-vertical", type: Boolean, reflect: !0, useDefault: !0 })], L = [C(), S({ attribute: "base-grid-size", type: Number })], H = [C(), S({ attribute: "height", type: Number })], q = [C(), S({ attribute: "max-seat-reservations", type: Number })], j = [C(), S({ attribute: "max-bicycle-reservations", type: Number })], Y = [C(), S({ attribute: "prevent-place-click", type: Boolean })], te = [C(), S({ attribute: "preselect-coach-index", type: Number })], ae = [T()], re = [T()], ne = [T()], ge = [Ie({ passive: !0 })], f(n, null, u, { kind: "accessor", name: "seatReservations", static: !1, private: !1, access: { has: (t) => "seatReservations" in t, get: (t) => t.seatReservations, set: (t, i) => {
543
- t.seatReservations = i;
544
- } }, metadata: e }, w, B), f(n, null, D, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, i) => {
545
- t.hasNavigation = i;
546
- } }, metadata: e }, z, F), f(n, null, G, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, i) => {
547
- t.alignVertical = i;
548
- } }, metadata: e }, V, O), f(n, null, L, { kind: "accessor", name: "baseGridSize", static: !1, private: !1, access: { has: (t) => "baseGridSize" in t, get: (t) => t.baseGridSize, set: (t, i) => {
549
- t.baseGridSize = i;
550
- } }, metadata: e }, W, X), f(n, null, H, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, i) => {
551
- t.height = i;
552
- } }, metadata: e }, K, U), f(n, null, q, { kind: "accessor", name: "maxSeatReservations", static: !1, private: !1, access: { has: (t) => "maxSeatReservations" in t, get: (t) => t.maxSeatReservations, set: (t, i) => {
553
- t.maxSeatReservations = i;
554
- } }, metadata: e }, M, $), f(n, null, j, { kind: "accessor", name: "maxBicycleReservations", static: !1, private: !1, access: { has: (t) => "maxBicycleReservations" in t, get: (t) => t.maxBicycleReservations, set: (t, i) => {
555
- t.maxBicycleReservations = i;
556
- } }, metadata: e }, J, Q), f(n, null, Y, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, i) => {
557
- t.preventPlaceClick = i;
558
- } }, metadata: e }, Z, ee), f(n, null, te, { kind: "accessor", name: "preselectCoachIndex", static: !1, private: !1, access: { has: (t) => "preselectCoachIndex" in t, get: (t) => t.preselectCoachIndex, set: (t, i) => {
559
- t.preselectCoachIndex = i;
560
- } }, metadata: e }, ie, se), f(n, null, ae, { kind: "accessor", name: "selectedCoachIndex", static: !1, private: !1, access: { has: (t) => "selectedCoachIndex" in t, get: (t) => t.selectedCoachIndex, set: (t, i) => {
561
- t.selectedCoachIndex = i;
562
- } }, metadata: e }, ce, oe), f(n, null, re, { kind: "accessor", name: "focusedCoachIndex", static: !1, private: !1, access: { has: (t) => "focusedCoachIndex" in t, get: (t) => t.focusedCoachIndex, set: (t, i) => {
563
- t.focusedCoachIndex = i;
564
- } }, metadata: e }, le, he), f(n, null, ne, { kind: "accessor", name: "hoveredScrollCoachIndex", static: !1, private: !1, access: { has: (t) => "hoveredScrollCoachIndex" in t, get: (t) => t.hoveredScrollCoachIndex, set: (t, i) => {
565
- t.hoveredScrollCoachIndex = i;
566
- } }, metadata: e }, de, ue), f(n, null, ge, { kind: "method", name: "coachAreaScrollend", static: !1, private: !1, access: { has: (t) => "coachAreaScrollend" in t, get: (t) => t.coachAreaScrollend }, metadata: e }, null, d), e && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
567
- })(), n.events = {
605
+ }, x = new WeakMap(), I = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), b = new WeakMap(), y = new WeakMap(), P = new WeakMap(), A = new WeakMap(), R = new WeakMap(), E = new WeakMap(), N = new WeakMap(), k = new WeakMap(), (() => {
606
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(n[Symbol.metadata] ?? null) : void 0;
607
+ u = [S({ attribute: "seat-reservations", type: Array })], B = [C(), S({ attribute: "has-navigation", type: Boolean })], O = [C(), S({ attribute: "align-vertical", type: Boolean, reflect: !0, useDefault: !0 })], L = [C(), S({ attribute: "base-grid-size", type: Number })], H = [C(), S({ attribute: "height", type: Number })], q = [C(), S({ attribute: "max-seat-reservations", type: Number })], j = [C(), S({ attribute: "max-bicycle-reservations", type: Number })], Q = [C(), S({ attribute: "prevent-place-click", type: Boolean })], te = [C(), S({ attribute: "preselect-coach-index", type: Number })], ae = [w()], re = [w()], he = [w()], ge = [Ie({ passive: !0 })], f(h, null, u, { kind: "accessor", name: "seatReservations", static: !1, private: !1, access: { has: (t) => "seatReservations" in t, get: (t) => t.seatReservations, set: (t, s) => {
608
+ t.seatReservations = s;
609
+ } }, metadata: e }, T, D), f(h, null, B, { kind: "accessor", name: "hasNavigation", static: !1, private: !1, access: { has: (t) => "hasNavigation" in t, get: (t) => t.hasNavigation, set: (t, s) => {
610
+ t.hasNavigation = s;
611
+ } }, metadata: e }, z, F), f(h, null, O, { kind: "accessor", name: "alignVertical", static: !1, private: !1, access: { has: (t) => "alignVertical" in t, get: (t) => t.alignVertical, set: (t, s) => {
612
+ t.alignVertical = s;
613
+ } }, metadata: e }, V, G), f(h, null, L, { kind: "accessor", name: "baseGridSize", static: !1, private: !1, access: { has: (t) => "baseGridSize" in t, get: (t) => t.baseGridSize, set: (t, s) => {
614
+ t.baseGridSize = s;
615
+ } }, metadata: e }, W, X), f(h, null, H, { kind: "accessor", name: "height", static: !1, private: !1, access: { has: (t) => "height" in t, get: (t) => t.height, set: (t, s) => {
616
+ t.height = s;
617
+ } }, metadata: e }, K, U), f(h, null, q, { kind: "accessor", name: "maxSeatReservations", static: !1, private: !1, access: { has: (t) => "maxSeatReservations" in t, get: (t) => t.maxSeatReservations, set: (t, s) => {
618
+ t.maxSeatReservations = s;
619
+ } }, metadata: e }, M, $), f(h, null, j, { kind: "accessor", name: "maxBicycleReservations", static: !1, private: !1, access: { has: (t) => "maxBicycleReservations" in t, get: (t) => t.maxBicycleReservations, set: (t, s) => {
620
+ t.maxBicycleReservations = s;
621
+ } }, metadata: e }, Y, J), f(h, null, Q, { kind: "accessor", name: "preventPlaceClick", static: !1, private: !1, access: { has: (t) => "preventPlaceClick" in t, get: (t) => t.preventPlaceClick, set: (t, s) => {
622
+ t.preventPlaceClick = s;
623
+ } }, metadata: e }, Z, ee), f(h, null, te, { kind: "accessor", name: "preselectCoachIndex", static: !1, private: !1, access: { has: (t) => "preselectCoachIndex" in t, get: (t) => t.preselectCoachIndex, set: (t, s) => {
624
+ t.preselectCoachIndex = s;
625
+ } }, metadata: e }, se, ie), f(h, null, ae, { kind: "accessor", name: "selectedCoachIndex", static: !1, private: !1, access: { has: (t) => "selectedCoachIndex" in t, get: (t) => t.selectedCoachIndex, set: (t, s) => {
626
+ t.selectedCoachIndex = s;
627
+ } }, metadata: e }, ce, oe), f(h, null, re, { kind: "accessor", name: "focusedCoachIndex", static: !1, private: !1, access: { has: (t) => "focusedCoachIndex" in t, get: (t) => t.focusedCoachIndex, set: (t, s) => {
628
+ t.focusedCoachIndex = s;
629
+ } }, metadata: e }, le, ne), f(h, null, he, { kind: "accessor", name: "hoveredScrollCoachIndex", static: !1, private: !1, access: { has: (t) => "hoveredScrollCoachIndex" in t, get: (t) => t.hoveredScrollCoachIndex, set: (t, s) => {
630
+ t.hoveredScrollCoachIndex = s;
631
+ } }, metadata: e }, de, ue), f(h, null, ge, { kind: "method", name: "coachAreaScrollend", static: !1, private: !1, access: { has: (t) => "coachAreaScrollend" in t, get: (t) => t.coachAreaScrollend }, metadata: e }, null, d), e && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
632
+ })(), h.events = {
568
633
  selectedplaces: "selectedplaces",
569
634
  selectedcoach: "selectedcoach"
570
- }, n;
635
+ }, h;
571
636
  })();
572
637
  export {
573
- we as SeatReservationBaseElement
638
+ Be as SeatReservationBaseElement
574
639
  };