@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773648109 → 4.7.0-dev.1773670972

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 (191) hide show
  1. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +65 -76
  2. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +72 -52
  3. package/autocomplete-grid/autocomplete-grid-button.js +3 -6
  4. package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -17
  5. package/autocomplete-grid/autocomplete-grid-cell.js +4 -7
  6. package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +20 -21
  7. package/autocomplete-grid/autocomplete-grid-optgroup.js +3 -6
  8. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -33
  9. package/autocomplete-grid/autocomplete-grid-option.js +4 -9
  10. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -22
  11. package/autocomplete-grid/autocomplete-grid-row.js +4 -7
  12. package/autocomplete-grid/autocomplete-grid.js +3 -6
  13. package/autocomplete-grid-cell.component-Dak9wlBr.js +24 -0
  14. package/autocomplete-grid-option.component-DNRFHOwc.js +37 -0
  15. package/autocomplete-grid-row.component-DBHZQ0GQ.js +27 -0
  16. package/autocomplete-grid.js +9 -21
  17. package/autocomplete-grid.pure.js +7 -15
  18. package/core/datetime/date-helper.js +2 -191
  19. package/core/datetime.js +2 -5
  20. package/core/timetable/access-leg-helper.js +76 -71
  21. package/core/timetable/timetable-helper.js +9 -11
  22. package/core/timetable/timetable-properties.js +0 -1
  23. package/core/timetable.js +3 -7
  24. package/date-helper-CGproP5d.js +185 -0
  25. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +114 -122
  26. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +92 -70
  27. package/development/autocomplete-grid/autocomplete-grid-button.js +6 -4
  28. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -29
  29. package/development/autocomplete-grid/autocomplete-grid-cell.js +7 -5
  30. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +27 -22
  31. package/development/autocomplete-grid/autocomplete-grid-optgroup.js +6 -4
  32. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -109
  33. package/development/autocomplete-grid/autocomplete-grid-option.js +7 -7
  34. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -91
  35. package/development/autocomplete-grid/autocomplete-grid-row.js +7 -5
  36. package/development/autocomplete-grid/autocomplete-grid.js +6 -4
  37. package/development/autocomplete-grid-cell.component-BBvM4o2H.js +42 -0
  38. package/development/autocomplete-grid-option.component-QzfM5eIE.js +123 -0
  39. package/development/autocomplete-grid-row.component-H8sCTCkT.js +104 -0
  40. package/development/autocomplete-grid.js +10 -14
  41. package/development/autocomplete-grid.pure.js +4 -13
  42. package/development/core/datetime/date-helper.js +2 -285
  43. package/development/core/datetime.js +2 -6
  44. package/development/core/timetable/access-leg-helper.js +104 -82
  45. package/development/core/timetable/timetable-helper.js +16 -17
  46. package/development/core/timetable/timetable-properties.js +0 -2
  47. package/development/core/timetable.js +3 -8
  48. package/development/date-helper-8_Y-PuHh.js +520 -0
  49. package/development/differenceInMinutes-DN_1Rk3O.js +110 -0
  50. package/development/format-Bbrn2bgo.js +1848 -0
  51. package/development/isValid-C-HzKv4v.js +178 -0
  52. package/development/journey-summary/journey-summary.component.js +2 -288
  53. package/development/journey-summary.component-uGhZvA4p.js +385 -0
  54. package/development/journey-summary.js +8 -5
  55. package/development/journey-summary.pure.js +2 -5
  56. package/development/mapper-hWWm7Uke.js +11454 -0
  57. package/development/pearl-chain/pearl-chain.component.js +2 -634
  58. package/development/pearl-chain-time/pearl-chain-time.component.js +2 -306
  59. package/development/pearl-chain-time.component-B8mayTWD.js +415 -0
  60. package/development/pearl-chain-time.js +8 -5
  61. package/development/pearl-chain-time.pure.js +2 -5
  62. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -28
  63. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -393
  64. package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +435 -0
  65. package/development/pearl-chain-vertical-item.js +8 -5
  66. package/development/pearl-chain-vertical-item.pure.js +2 -5
  67. package/development/pearl-chain-vertical.component-CswE7b3M.js +39 -0
  68. package/development/pearl-chain-vertical.js +8 -5
  69. package/development/pearl-chain-vertical.pure.js +2 -5
  70. package/development/pearl-chain.component-wpsTvoSe.js +704 -0
  71. package/development/pearl-chain.js +8 -5
  72. package/development/pearl-chain.pure.js +2 -5
  73. package/development/seat-reservation/common/mapper/icon-mapper.js +168 -71
  74. package/development/seat-reservation/common/mapper/mapper.js +2 -11429
  75. package/development/seat-reservation/common/mapper.js +2 -9
  76. package/development/seat-reservation/common/svgs.js +2 -46
  77. package/development/seat-reservation/common/translations/i18n.js +1118 -900
  78. package/development/seat-reservation/common/translations.js +1 -4
  79. package/development/seat-reservation/common/types.js +0 -2
  80. package/development/seat-reservation/common.js +8 -12
  81. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1307 -1231
  82. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -862
  83. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -106
  84. package/development/seat-reservation/seat-reservation-area.js +7 -5
  85. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +35 -34
  86. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -162
  87. package/development/seat-reservation/seat-reservation-graphic.js +7 -5
  88. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -713
  89. package/development/seat-reservation/seat-reservation-navigation-coach.js +7 -5
  90. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -131
  91. package/development/seat-reservation/seat-reservation-navigation-services.js +7 -5
  92. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -601
  93. package/development/seat-reservation/seat-reservation-place-control.js +7 -5
  94. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -22
  95. package/development/seat-reservation/seat-reservation-scoped.js +7 -5
  96. package/development/seat-reservation/seat-reservation.js +7 -6
  97. package/development/seat-reservation-area.component-ORuli_DC.js +138 -0
  98. package/development/seat-reservation-graphic.component-lZXqHWIz.js +193 -0
  99. package/development/seat-reservation-navigation-coach.component-D2QXTMJJ.js +828 -0
  100. package/development/seat-reservation-navigation-services.component-Bg1adRlU.js +179 -0
  101. package/development/seat-reservation-place-control.component-CwUX-QYO.js +726 -0
  102. package/development/seat-reservation-scoped.component-uLT33P9y.js +31 -0
  103. package/development/seat-reservation.component-MOv5kHDC.js +821 -0
  104. package/development/seat-reservation.js +16 -29
  105. package/development/seat-reservation.pure.js +11 -29
  106. package/development/svgs-kDpBCto5.js +28 -0
  107. package/development/timetable-duration/timetable-duration.component.js +2 -108
  108. package/development/timetable-duration.component-D21SXsQq.js +125 -0
  109. package/development/timetable-duration.js +8 -5
  110. package/development/timetable-duration.pure.js +2 -5
  111. package/development/timetable-row/timetable-row.component.js +2 -781
  112. package/development/timetable-row.component-Y5w8vEwP.js +932 -0
  113. package/development/timetable-row.js +8 -13
  114. package/development/timetable-row.pure.js +2 -12
  115. package/development/toDate-Biiv3kyf.js +150 -0
  116. package/differenceInMinutes-Dr9gRqtu.js +27 -0
  117. package/format-CM5exOsN.js +1103 -0
  118. package/isValid-B9oVW3lA.js +36 -0
  119. package/journey-summary/journey-summary.component.js +2 -194
  120. package/journey-summary.component-Cq_4kaOp.js +264 -0
  121. package/journey-summary.js +5 -4
  122. package/journey-summary.pure.js +2 -4
  123. package/mapper-DkiDDseD.js +11382 -0
  124. package/package.json +2 -2
  125. package/pearl-chain/pearl-chain.component.js +2 -165
  126. package/pearl-chain-time/pearl-chain-time.component.js +2 -157
  127. package/pearl-chain-time.component-DGDW5S1c.js +239 -0
  128. package/pearl-chain-time.js +5 -4
  129. package/pearl-chain-time.pure.js +2 -4
  130. package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -17
  131. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -77
  132. package/pearl-chain-vertical-item.component-G22bWhLU.js +108 -0
  133. package/pearl-chain-vertical-item.js +5 -4
  134. package/pearl-chain-vertical-item.pure.js +2 -4
  135. package/pearl-chain-vertical.component-CXIDT5RD.js +21 -0
  136. package/pearl-chain-vertical.js +5 -4
  137. package/pearl-chain-vertical.pure.js +2 -4
  138. package/pearl-chain.component-DmjkVIva.js +194 -0
  139. package/pearl-chain.js +5 -4
  140. package/pearl-chain.pure.js +2 -4
  141. package/seat-reservation/common/mapper/icon-mapper.js +71 -71
  142. package/seat-reservation/common/mapper/mapper.js +2 -11386
  143. package/seat-reservation/common/mapper.js +3 -9
  144. package/seat-reservation/common/svgs.js +2 -242
  145. package/seat-reservation/common/translations/i18n.js +1084 -891
  146. package/seat-reservation/common/translations.js +2 -4
  147. package/seat-reservation/common/types.js +0 -1
  148. package/seat-reservation/common.js +9 -15
  149. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +834 -812
  150. package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -420
  151. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -51
  152. package/seat-reservation/seat-reservation-area.js +4 -7
  153. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +68 -71
  154. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -75
  155. package/seat-reservation/seat-reservation-graphic.js +4 -7
  156. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -234
  157. package/seat-reservation/seat-reservation-navigation-coach.js +4 -7
  158. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -85
  159. package/seat-reservation/seat-reservation-navigation-services.js +4 -7
  160. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -203
  161. package/seat-reservation/seat-reservation-place-control.js +4 -7
  162. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -13
  163. package/seat-reservation/seat-reservation-scoped.js +4 -7
  164. package/seat-reservation/seat-reservation.js +5 -9
  165. package/seat-reservation-area.component-COD6CXhP.js +75 -0
  166. package/seat-reservation-graphic.component-BNfU5tQM.js +102 -0
  167. package/seat-reservation-navigation-coach.component-Bh9ILq60.js +333 -0
  168. package/seat-reservation-navigation-services.component-QL0UnilZ.js +127 -0
  169. package/seat-reservation-place-control.component-BfnZUyHv.js +322 -0
  170. package/seat-reservation-scoped.component-CY04BT_4.js +17 -0
  171. package/seat-reservation.component-zrQHTRl3.js +364 -0
  172. package/seat-reservation.js +17 -39
  173. package/seat-reservation.pure.js +15 -32
  174. package/svgs-D5DhLHxC.js +26 -0
  175. package/timetable-duration/timetable-duration.component.js +2 -57
  176. package/timetable-duration.component-DaYoJUGS.js +65 -0
  177. package/timetable-duration.js +5 -4
  178. package/timetable-duration.pure.js +2 -4
  179. package/timetable-row/timetable-row.component.js +2 -427
  180. package/timetable-row.component-BDMAEsbR.js +559 -0
  181. package/timetable-row.js +6 -13
  182. package/timetable-row.pure.js +2 -11
  183. package/toDate-p-Tpkb7t.js +16 -0
  184. package/development/differenceInMinutes-B0dawX-5.js +0 -26
  185. package/development/format-BMkeaqaF.js +0 -1433
  186. package/development/isValid-BYRch7pV.js +0 -53
  187. package/development/toDate-BWb6Z1JD.js +0 -24
  188. package/differenceInMinutes-COvvdYsJ.js +0 -23
  189. package/format-CmKROkbc.js +0 -1186
  190. package/isValid-m3_OsPaB.js +0 -45
  191. package/toDate-Bw2KTWeq.js +0 -15
@@ -1,22 +1,10 @@
1
1
  import { SbbAutocompleteGridButtonElement as e } from "./autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js";
2
- import { SbbAutocompleteGridCellElement as o } from "./autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js";
3
- import { SbbAutocompleteGridOptgroupElement as t } from "./autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
4
- import { SbbAutocompleteGridOptionElement as m } from "./autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js";
5
- import { autocompleteGridOptionId as G } from "./autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js";
6
- import { SbbAutocompleteGridRowElement as r } from "./autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js";
7
- import { SbbAutocompleteGridElement as i } from "./autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js";
8
- i.define();
9
- e.define();
10
- o.define();
11
- t.define();
12
- m.define();
13
- r.define();
14
- export {
15
- e as SbbAutocompleteGridButtonElement,
16
- o as SbbAutocompleteGridCellElement,
17
- i as SbbAutocompleteGridElement,
18
- t as SbbAutocompleteGridOptgroupElement,
19
- m as SbbAutocompleteGridOptionElement,
20
- r as SbbAutocompleteGridRowElement,
21
- G as autocompleteGridOptionId
22
- };
2
+ import { t } from "./autocomplete-grid-cell.component-Dak9wlBr.js";
3
+ import { SbbAutocompleteGridOptgroupElement as n } from "./autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
4
+ import { n as r, t as i } from "./autocomplete-grid-option.component-DNRFHOwc.js";
5
+ import { t as a } from "./autocomplete-grid-row.component-DBHZQ0GQ.js";
6
+ import { SbbAutocompleteGridElement as o } from "./autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js";
7
+ import "./autocomplete-grid.pure.js";
8
+ o.define(), e.define(), t.define(), n.define(), i.define(), a.define();
9
+ //#endregion
10
+ export { e as SbbAutocompleteGridButtonElement, t as SbbAutocompleteGridCellElement, o as SbbAutocompleteGridElement, n as SbbAutocompleteGridOptgroupElement, i as SbbAutocompleteGridOptionElement, a as SbbAutocompleteGridRowElement, r as autocompleteGridOptionId };
@@ -1,15 +1,7 @@
1
- import { SbbAutocompleteGridButtonElement as t } from "./autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js";
2
- import { SbbAutocompleteGridCellElement as m } from "./autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js";
3
- import { SbbAutocompleteGridOptgroupElement as l } from "./autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
4
- import { SbbAutocompleteGridOptionElement as i, autocompleteGridOptionId as n } from "./autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js";
5
- import { SbbAutocompleteGridRowElement as d } from "./autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js";
6
- import { SbbAutocompleteGridElement as G } from "./autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js";
7
- export {
8
- t as SbbAutocompleteGridButtonElement,
9
- m as SbbAutocompleteGridCellElement,
10
- G as SbbAutocompleteGridElement,
11
- l as SbbAutocompleteGridOptgroupElement,
12
- i as SbbAutocompleteGridOptionElement,
13
- d as SbbAutocompleteGridRowElement,
14
- n as autocompleteGridOptionId
15
- };
1
+ import { SbbAutocompleteGridButtonElement as e } from "./autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js";
2
+ import { t } from "./autocomplete-grid-cell.component-Dak9wlBr.js";
3
+ import { SbbAutocompleteGridOptgroupElement as n } from "./autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js";
4
+ import { n as r, t as i } from "./autocomplete-grid-option.component-DNRFHOwc.js";
5
+ import { t as a } from "./autocomplete-grid-row.component-DBHZQ0GQ.js";
6
+ import { SbbAutocompleteGridElement as o } from "./autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js";
7
+ export { e as SbbAutocompleteGridButtonElement, t as SbbAutocompleteGridCellElement, o as SbbAutocompleteGridElement, n as SbbAutocompleteGridOptgroupElement, i as SbbAutocompleteGridOptionElement, a as SbbAutocompleteGridRowElement, r as autocompleteGridOptionId };
@@ -1,191 +1,2 @@
1
- import { i18nDurationDay as N, i18nDurationHour as h, i18nDurationMinute as T } from "@sbb-esta/lyne-elements/core/i18n.js";
2
- import { n as w, d as y, i as U } from "../../isValid-m3_OsPaB.js";
3
- import { t as d, c as g, b as m, m as I } from "../../toDate-Bw2KTWeq.js";
4
- import { g as C, a as Y, d as F } from "../../differenceInMinutes-COvvdYsJ.js";
5
- function x(e, t, n) {
6
- const i = d(e, n?.in);
7
- return isNaN(t) ? g(e, NaN) : (t && i.setDate(i.getDate() + t), i);
8
- }
9
- function z(e, t, n) {
10
- return g(e, +d(e) + t);
11
- }
12
- function H(e, t, n) {
13
- return z(e, t * m);
14
- }
15
- function S(e, t, n) {
16
- const [i, s] = w(
17
- n?.in,
18
- e,
19
- t
20
- ), r = M(i, s), a = Math.abs(
21
- y(i, s)
22
- );
23
- i.setDate(i.getDate() - r * a);
24
- const o = +(M(i, s) === -r), u = r * (a - o);
25
- return u === 0 ? 0 : u;
26
- }
27
- function M(e, t) {
28
- const n = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
29
- return n < 0 ? -1 : n > 0 ? 1 : n;
30
- }
31
- function Z(e, t, n) {
32
- const [i, s] = w(
33
- n?.in,
34
- e,
35
- t
36
- ), r = (+i - +s) / m;
37
- return C(n?.roundingMethod)(r);
38
- }
39
- function v(e, t, n) {
40
- return x(e, -t, n);
41
- }
42
- function O(e, t) {
43
- const n = () => g(t?.in, NaN), s = k(e);
44
- let r;
45
- if (s.date) {
46
- const c = W(s.date, 2);
47
- r = j(c.restDateString, c.year);
48
- }
49
- if (!r || isNaN(+r)) return n();
50
- const a = +r;
51
- let o = 0, u;
52
- if (s.time && (o = A(s.time), isNaN(o)))
53
- return n();
54
- if (s.timezone) {
55
- if (u = E(s.timezone), isNaN(u)) return n();
56
- } else {
57
- const c = new Date(a + o), p = d(0, t?.in);
58
- return p.setFullYear(
59
- c.getUTCFullYear(),
60
- c.getUTCMonth(),
61
- c.getUTCDate()
62
- ), p.setHours(
63
- c.getUTCHours(),
64
- c.getUTCMinutes(),
65
- c.getUTCSeconds(),
66
- c.getUTCMilliseconds()
67
- ), p;
68
- }
69
- return d(a + o + u, t?.in);
70
- }
71
- const l = {
72
- dateTimeDelimiter: /[T ]/,
73
- timeZoneDelimiter: /[Z ]/i,
74
- timezone: /([Z+-].*)$/
75
- }, _ = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, b = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, R = /^([+-])(\d{2})(?::?(\d{2}))?$/;
76
- function k(e) {
77
- const t = {}, n = e.split(l.dateTimeDelimiter);
78
- let i;
79
- if (n.length > 2)
80
- return t;
81
- if (/:/.test(n[0]) ? i = n[0] : (t.date = n[0], i = n[1], l.timeZoneDelimiter.test(t.date) && (t.date = e.split(l.timeZoneDelimiter)[0], i = e.substr(
82
- t.date.length,
83
- e.length
84
- ))), i) {
85
- const s = l.timezone.exec(i);
86
- s ? (t.time = i.replace(s[1], ""), t.timezone = s[1]) : t.time = i;
87
- }
88
- return t;
89
- }
90
- function W(e, t) {
91
- const n = new RegExp(
92
- "^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
93
- ), i = e.match(n);
94
- if (!i) return { year: NaN, restDateString: "" };
95
- const s = i[1] ? parseInt(i[1]) : null, r = i[2] ? parseInt(i[2]) : null;
96
- return {
97
- year: r === null ? s : r * 100,
98
- restDateString: e.slice((i[1] || i[2]).length)
99
- };
100
- }
101
- function j(e, t) {
102
- if (t === null) return /* @__PURE__ */ new Date(NaN);
103
- const n = e.match(_);
104
- if (!n) return /* @__PURE__ */ new Date(NaN);
105
- const i = !!n[4], s = f(n[1]), r = f(n[2]) - 1, a = f(n[3]), o = f(n[4]), u = f(n[5]) - 1;
106
- if (i)
107
- return G(t, o, u) ? J(t, o, u) : /* @__PURE__ */ new Date(NaN);
108
- {
109
- const c = /* @__PURE__ */ new Date(0);
110
- return !q(t, r, a) || !B(t, s) ? /* @__PURE__ */ new Date(NaN) : (c.setUTCFullYear(t, r, Math.max(s, a)), c);
111
- }
112
- }
113
- function f(e) {
114
- return e ? parseInt(e) : 1;
115
- }
116
- function A(e) {
117
- const t = e.match(b);
118
- if (!t) return NaN;
119
- const n = D(t[1]), i = D(t[2]), s = D(t[3]);
120
- return K(n, i, s) ? n * m + i * I + s * 1e3 : NaN;
121
- }
122
- function D(e) {
123
- return e && parseFloat(e.replace(",", ".")) || 0;
124
- }
125
- function E(e) {
126
- if (e === "Z") return 0;
127
- const t = e.match(R);
128
- if (!t) return 0;
129
- const n = t[1] === "+" ? -1 : 1, i = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
130
- return P(i, s) ? n * (i * m + s * I) : NaN;
131
- }
132
- function J(e, t, n) {
133
- const i = /* @__PURE__ */ new Date(0);
134
- i.setUTCFullYear(e, 0, 4);
135
- const s = i.getUTCDay() || 7, r = (t - 1) * 7 + n + 1 - s;
136
- return i.setUTCDate(i.getUTCDate() + r), i;
137
- }
138
- const V = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
139
- function $(e) {
140
- return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
141
- }
142
- function q(e, t, n) {
143
- return t >= 0 && t <= 11 && n >= 1 && n <= (V[t] || ($(e) ? 29 : 28));
144
- }
145
- function B(e, t) {
146
- return t >= 1 && t <= ($(e) ? 366 : 365);
147
- }
148
- function G(e, t, n) {
149
- return t >= 1 && t <= 53 && n >= 0 && n <= 6;
150
- }
151
- function K(e, t, n) {
152
- return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
153
- }
154
- function P(e, t) {
155
- return t >= 0 && t <= 59;
156
- }
157
- function Q(e, t, n) {
158
- return H(e, -t);
159
- }
160
- function nt(e) {
161
- if (!e)
162
- return;
163
- const t = O(e);
164
- if (U(t)) {
165
- if (e.includes("Z"))
166
- return new Date(e.replace("Z", ""));
167
- if (e.includes("T")) {
168
- const n = e.split("T");
169
- if (n[1] && (n[1].includes("+") || n[1].includes("-")))
170
- return /* @__PURE__ */ new Date(`${n[0]}T${n[1].split(/[+-]/)[0]}`);
171
- }
172
- return new Date(e);
173
- }
174
- }
175
- const it = (e, t) => {
176
- const n = [], i = [];
177
- let r = Y(0, e);
178
- const a = S(r, 0);
179
- a > 0 && (n.push(`${a} d`), t && i.push(`${a} ${a > 1 ? N.multiple.long[t] : N.single.long[t]}`), r = v(r, a));
180
- const o = Z(r, 0);
181
- o > 0 && (n.push(`${o} h`), t && i.push(`${o} ${o > 1 ? h.multiple.long[t] : h.single.long[t]}`), r = Q(r, o));
182
- const u = F(r, 0);
183
- return u > 0 && (n.push(`${u} min`), t && i.push(`${u} ${u > 1 ? T.multiple.long[t] : T.single.long[t]}`)), {
184
- short: n.join(" "),
185
- long: i.join(" ")
186
- };
187
- };
188
- export {
189
- it as durationToTime,
190
- nt as removeTimezoneFromISOTimeString
191
- };
1
+ import { n as e, t } from "../../date-helper-CGproP5d.js";
2
+ export { t as durationToTime, e as removeTimezoneFromISOTimeString };
package/core/datetime.js CHANGED
@@ -1,5 +1,2 @@
1
- import { durationToTime as m, removeTimezoneFromISOTimeString as r } from "./datetime/date-helper.js";
2
- export {
3
- m as durationToTime,
4
- r as removeTimezoneFromISOTimeString
5
- };
1
+ import { n as e, t } from "../date-helper-CGproP5d.js";
2
+ export { t as durationToTime, e as removeTimezoneFromISOTimeString };
@@ -1,91 +1,96 @@
1
- import { i18nWalkingDistanceDeparture as T, i18nWalkingDistanceArrival as h } from "@sbb-esta/lyne-elements/core/i18n.js";
2
- import { nothing as u, html as f } from "lit";
3
- import { isRideLeg as $, isConnectionLeg as L, extractTimeAndStringFromNoticeText as k } from "./timetable-helper.js";
1
+ import { extractTimeAndStringFromNoticeText as e, isConnectionLeg as t, isRideLeg as n } from "./timetable-helper.js";
4
2
  import "@sbb-esta/lyne-elements/icon.js";
5
- function g(t, r) {
6
- const i = L(t) ? t : null, n = i ? i?.notices?.filter((e) => r.includes(e.name))[0] : null;
7
- return n ? {
8
- duration: i?.duration || 0,
9
- text: n?.text?.template || "",
10
- icon: "walk-small"
11
- } : null;
3
+ import { html as r, nothing as i } from "lit";
4
+ import { i18nWalkingDistanceArrival as a, i18nWalkingDistanceDeparture as o } from "@sbb-esta/lyne-elements/core/i18n.js";
5
+ //#region src/elements-experimental/core/timetable/access-leg-helper.ts
6
+ function s(e, n) {
7
+ let r = t(e) ? e : null, i = r ? r?.notices?.filter((e) => n.includes(e.name))[0] : null;
8
+ return i ? {
9
+ duration: r?.duration || 0,
10
+ text: i?.text?.template || "",
11
+ icon: "walk-small"
12
+ } : null;
12
13
  }
13
- function M(t, r, i, n) {
14
- const e = $(t) ? t?.serviceJourney?.notices?.filter((m) => ["CI"].includes(m.name))[0] : null, c = e && k(e);
15
- return e ? {
16
- duration: (c?.duration || 0) + (r || 0),
17
- text: i ? T[n] : c?.text || "",
18
- icon: i ? "wheelchair-small" : `sa-${e?.name?.toLowerCase()}`
19
- } : null;
14
+ function c(t, r, i, a) {
15
+ let s = n(t) ? t?.serviceJourney?.notices?.filter((e) => ["CI"].includes(e.name))[0] : null, c = s && e(s);
16
+ return s ? {
17
+ duration: (c?.duration || 0) + (r || 0),
18
+ text: i ? o[a] : c?.text || "",
19
+ icon: i ? "wheelchair-small" : `sa-${s?.name?.toLowerCase()}`
20
+ } : null;
20
21
  }
21
- function N(t, r, i, n) {
22
- const e = $(t) ? t?.serviceJourney?.notices?.filter((m) => ["CO"].includes(m.name))[0] : null, c = e && k(e);
23
- return e ? {
24
- duration: (c?.duration || 0) + (r || 0),
25
- text: i ? h[n] : c?.text || "",
26
- icon: i ? "wheelchair-small" : `sa-${e?.name?.toLowerCase()}`
27
- } : null;
22
+ function l(t, r, i, o) {
23
+ let s = n(t) ? t?.serviceJourney?.notices?.filter((e) => ["CO"].includes(e.name))[0] : null, c = s && e(s);
24
+ return s ? {
25
+ duration: (c?.duration || 0) + (r || 0),
26
+ text: i ? a[o] : c?.text || "",
27
+ icon: i ? "wheelchair-small" : `sa-${s?.name?.toLowerCase()}`
28
+ } : null;
28
29
  }
29
- function _(t, r, i, n, e) {
30
- return f`
31
- <span class="sbb-pearl-chain__time-transfer sbb-pearl-chain__time-transfer--${r}-${e}">
32
- <sbb-icon name=${r}></sbb-icon>
33
- <time datetime=${t + "M"}>
30
+ function u(e, t, n, s, c) {
31
+ return r`
32
+ <span class="sbb-pearl-chain__time-transfer sbb-pearl-chain__time-transfer--${t}-${c}">
33
+ <sbb-icon name=${t}></sbb-icon>
34
+ <time datetime=${e + "M"}>
34
35
  <span class="sbb-screen-reader-only">
35
- ${!n && e ? e === "departure" ? T[i] : h[i] : u}
36
- ${n ? f`<span>${n}</span>` : u}&nbsp;
36
+ ${!s && c ? c === "departure" ? o[n] : a[n] : i}
37
+ ${s ? r`<span>${s}</span>` : i}&nbsp;
37
38
  </span>
38
- ${t}
39
+ ${e}
39
40
  <span class="sbb-pearl-chain__time-walktime-prime-symbol" aria-hidden="true">'</span>
40
41
  <span class="sbb-screen-reader-only">min</span>
41
42
  </time>
42
43
  </span>
43
44
  `;
44
45
  }
45
- function p(t, r, i, n) {
46
- return f`
47
- <span class="sbb-pearl-chain__time-walktime sbb-pearl-chain__time-walktime--${n}-${i}">
48
- <sbb-icon name=${n}></sbb-icon>
49
- <time datetime=${t + "M"}>
50
- <span class="sbb-screen-reader-only">${r}</span>
51
- ${t}
46
+ function d(e, t, n, i) {
47
+ return r`
48
+ <span class="sbb-pearl-chain__time-walktime sbb-pearl-chain__time-walktime--${i}-${n}">
49
+ <sbb-icon name=${i}></sbb-icon>
50
+ <time datetime=${e + "M"}>
51
+ <span class="sbb-screen-reader-only">${t}</span>
52
+ ${e}
52
53
  <span class="sbb-pearl-chain__time-walktime-prime-symbol" aria-hidden="true">'</span>
53
54
  </time>
54
55
  </span>
55
56
  `;
56
57
  }
57
- function B(t, r, i, n, e) {
58
- const c = t && t.filter((w) => $(w) || L(w))[0], m = ["YM", "YB", "Y", "YT"], o = g(c, m), s = M(c, r, e, n), d = r ? {
59
- text: T[n],
60
- duration: r,
61
- icon: e ? "wheelchair-small" : "walk-small"
62
- } : null, v = () => o || (d && !s && !o ? d : s || null);
63
- function C() {
64
- return f`
65
- ${o ? p(o.duration, o.text, "left", o.icon) : u}
66
- ${d && !s && !o ? p(d.duration, d.text, "left", d.icon) : u}
67
- ${s ? e ? p(s.duration, s.text, "left", s.icon) : _(s.duration, s.icon, n, s.text, "departure") : u}
58
+ function f(e, f, p, m, h) {
59
+ let g = e && e.filter((e) => n(e) || t(e))[0], _ = [
60
+ "YM",
61
+ "YB",
62
+ "Y",
63
+ "YT"
64
+ ], v = s(g, _), y = c(g, f, h, m), b = f ? {
65
+ text: o[m],
66
+ duration: f,
67
+ icon: h ? "wheelchair-small" : "walk-small"
68
+ } : null, x = () => v || (b && !y && !v ? b : y || null);
69
+ function S() {
70
+ return r`
71
+ ${v ? d(v.duration, v.text, "left", v.icon) : i}
72
+ ${b && !y && !v ? d(b.duration, b.text, "left", b.icon) : i}
73
+ ${y ? h ? d(y.duration, y.text, "left", y.icon) : u(y.duration, y.icon, m, y.text, "departure") : i}
68
74
  `;
69
- }
70
- const A = t && t[t.length - 1], x = (L(A) || $(A)) && A, l = x && g(x, m), a = x && N(x, i, e, n), b = i ? {
71
- text: h[n],
72
- duration: i,
73
- icon: e ? "wheelchair-small" : "walk-small"
74
- } : null, D = () => l || (b && !a && !l ? b : a || null);
75
- function Y() {
76
- return f`
77
- ${l ? p(l.duration, l.text, "right", l.icon) : u}
78
- ${b && !a && !l ? p(b.duration, b.text, "right", b.icon) : u}
79
- ${a ? e ? p(a.duration, a.text, "right", a.icon) : _(a.duration, a.icon, n, a.text, "arrival") : u}
75
+ }
76
+ let C = e && e[e.length - 1], w = (t(C) || n(C)) && C, T = w && s(w, _), E = w && l(w, p, h, m), D = p ? {
77
+ text: a[m],
78
+ duration: p,
79
+ icon: h ? "wheelchair-small" : "walk-small"
80
+ } : null, O = () => T || (D && !E && !T ? D : E || null);
81
+ function k() {
82
+ return r`
83
+ ${T ? d(T.duration, T.text, "right", T.icon) : i}
84
+ ${D && !E && !T ? d(D.duration, D.text, "right", D.icon) : i}
85
+ ${E ? h ? d(E.duration, E.text, "right", E.icon) : u(E.duration, E.icon, m, E.text, "arrival") : i}
80
86
  `;
81
- }
82
- return {
83
- renderDepartureTimeAttribute: C,
84
- renderArrivalTimeAttribute: Y,
85
- departureTimeAttribute: v(),
86
- arrivalTimeAttribute: D()
87
- };
87
+ }
88
+ return {
89
+ renderDepartureTimeAttribute: S,
90
+ renderArrivalTimeAttribute: k,
91
+ departureTimeAttribute: x(),
92
+ arrivalTimeAttribute: O()
93
+ };
88
94
  }
89
- export {
90
- B as getDepartureArrivalTimeAttribute
91
- };
95
+ //#endregion
96
+ export { f as getDepartureArrivalTimeAttribute };
@@ -1,12 +1,10 @@
1
- const r = (t) => t?.__typename === "PTRideLeg", i = (t) => t?.__typename === "PTConnectionLeg", s = (t) => {
2
- const n = t?.text?.template && t.text.template.indexOf("(") + 1, e = t?.text?.template?.substring(n || 0, t?.text?.template.indexOf(")"));
3
- return {
4
- duration: e && +e.substring(0, e.length - 1) || 0,
5
- text: t?.text?.template?.split("(")[0] || ""
6
- };
7
- };
8
- export {
9
- s as extractTimeAndStringFromNoticeText,
10
- i as isConnectionLeg,
11
- r as isRideLeg
1
+ //#region src/elements-experimental/core/timetable/timetable-helper.ts
2
+ var e = (e) => e?.__typename === "PTRideLeg", t = (e) => e?.__typename === "PTConnectionLeg", n = (e) => {
3
+ let t = e?.text?.template && e.text.template.indexOf("(") + 1, n = e?.text?.template?.substring(t || 0, e?.text?.template.indexOf(")"));
4
+ return {
5
+ duration: n && +n.substring(0, n.length - 1) || 0,
6
+ text: e?.text?.template?.split("(")[0] || ""
7
+ };
12
8
  };
9
+ //#endregion
10
+ export { n as extractTimeAndStringFromNoticeText, t as isConnectionLeg, e as isRideLeg };
package/core/timetable.js CHANGED
@@ -1,8 +1,4 @@
1
+ import { extractTimeAndStringFromNoticeText as e, isConnectionLeg as t, isRideLeg as n } from "./timetable/timetable-helper.js";
1
2
  import { getDepartureArrivalTimeAttribute as r } from "./timetable/access-leg-helper.js";
2
- import { extractTimeAndStringFromNoticeText as o, isConnectionLeg as m, isRideLeg as n } from "./timetable/timetable-helper.js";
3
- export {
4
- o as extractTimeAndStringFromNoticeText,
5
- r as getDepartureArrivalTimeAttribute,
6
- m as isConnectionLeg,
7
- n as isRideLeg
8
- };
3
+ import "./timetable/timetable-properties.js";
4
+ export { e as extractTimeAndStringFromNoticeText, r as getDepartureArrivalTimeAttribute, t as isConnectionLeg, n as isRideLeg };
@@ -0,0 +1,185 @@
1
+ import { a as e, i as t, n, t as r } from "./toDate-p-Tpkb7t.js";
2
+ import { n as i, r as a, t as o } from "./isValid-B9oVW3lA.js";
3
+ import { n as s, r as c, t as l } from "./differenceInMinutes-Dr9gRqtu.js";
4
+ import { i18nDurationDay as u, i18nDurationHour as d, i18nDurationMinute as f } from "@sbb-esta/lyne-elements/core/i18n.js";
5
+ //#region node_modules/date-fns/addDays.js
6
+ function p(e, t, i) {
7
+ let a = r(e, i?.in);
8
+ return isNaN(t) ? n(i?.in || e, NaN) : (t && a.setDate(a.getDate() + t), a);
9
+ }
10
+ //#endregion
11
+ //#region node_modules/date-fns/addMilliseconds.js
12
+ function m(e, t, i) {
13
+ return n(i?.in || e, +r(e) + t);
14
+ }
15
+ //#endregion
16
+ //#region node_modules/date-fns/addHours.js
17
+ function h(e, n, r) {
18
+ return m(e, n * t, r);
19
+ }
20
+ //#endregion
21
+ //#region node_modules/date-fns/differenceInDays.js
22
+ function g(e, t, n) {
23
+ let [r, o] = a(n?.in, e, t), s = _(r, o), c = Math.abs(i(r, o));
24
+ r.setDate(r.getDate() - s * c);
25
+ let l = s * (c - Number(_(r, o) === -s));
26
+ return l === 0 ? 0 : l;
27
+ }
28
+ function _(e, t) {
29
+ let n = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
30
+ return n < 0 ? -1 : n > 0 ? 1 : n;
31
+ }
32
+ //#endregion
33
+ //#region node_modules/date-fns/differenceInHours.js
34
+ function v(e, n, r) {
35
+ let [i, o] = a(r?.in, e, n), c = (i - +o) / t;
36
+ return s(r?.roundingMethod)(c);
37
+ }
38
+ //#endregion
39
+ //#region node_modules/date-fns/subDays.js
40
+ function y(e, t, n) {
41
+ return p(e, -t, n);
42
+ }
43
+ //#endregion
44
+ //#region node_modules/date-fns/parseISO.js
45
+ function b(e, t) {
46
+ let i = () => n(t?.in, NaN), a = t?.additionalDigits ?? 2, o = T(e), s;
47
+ if (o.date) {
48
+ let e = E(o.date, a);
49
+ s = D(e.restDateString, e.year);
50
+ }
51
+ if (!s || isNaN(+s)) return i();
52
+ let c = +s, l = 0, u;
53
+ if (o.time && (l = k(o.time), isNaN(l))) return i();
54
+ if (o.timezone) {
55
+ if (u = j(o.timezone), isNaN(u)) return i();
56
+ } else {
57
+ let e = new Date(c + l), n = r(0, t?.in);
58
+ return n.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), n.setHours(e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()), n;
59
+ }
60
+ return r(c + l + u, t?.in);
61
+ }
62
+ var x = {
63
+ dateTimeDelimiter: /[T ]/,
64
+ timeZoneDelimiter: /[Z ]/i,
65
+ timezone: /([Z+-].*)$/
66
+ }, S = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, C = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, w = /^([+-])(\d{2})(?::?(\d{2}))?$/;
67
+ function T(e) {
68
+ let t = {}, n = e.split(x.dateTimeDelimiter), r;
69
+ if (n.length > 2) return t;
70
+ if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], x.timeZoneDelimiter.test(t.date) && (t.date = e.split(x.timeZoneDelimiter)[0], r = e.substr(t.date.length, e.length))), r) {
71
+ let e = x.timezone.exec(r);
72
+ e ? (t.time = r.replace(e[1], ""), t.timezone = e[1]) : t.time = r;
73
+ }
74
+ return t;
75
+ }
76
+ function E(e, t) {
77
+ let n = RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"), r = e.match(n);
78
+ if (!r) return {
79
+ year: NaN,
80
+ restDateString: ""
81
+ };
82
+ let i = r[1] ? parseInt(r[1]) : null, a = r[2] ? parseInt(r[2]) : null;
83
+ return {
84
+ year: a === null ? i : a * 100,
85
+ restDateString: e.slice((r[1] || r[2]).length)
86
+ };
87
+ }
88
+ function D(e, t) {
89
+ if (t === null) return /* @__PURE__ */ new Date(NaN);
90
+ let n = e.match(S);
91
+ if (!n) return /* @__PURE__ */ new Date(NaN);
92
+ let r = !!n[4], i = O(n[1]), a = O(n[2]) - 1, o = O(n[3]), s = O(n[4]), c = O(n[5]) - 1;
93
+ if (r) return L(t, s, c) ? M(t, s, c) : /* @__PURE__ */ new Date(NaN);
94
+ {
95
+ let e = /* @__PURE__ */ new Date(0);
96
+ return !F(t, a, o) || !I(t, i) ? /* @__PURE__ */ new Date(NaN) : (e.setUTCFullYear(t, a, Math.max(i, o)), e);
97
+ }
98
+ }
99
+ function O(e) {
100
+ return e ? parseInt(e) : 1;
101
+ }
102
+ function k(n) {
103
+ let r = n.match(C);
104
+ if (!r) return NaN;
105
+ let i = A(r[1]), a = A(r[2]), o = A(r[3]);
106
+ return R(i, a, o) ? i * t + a * e + o * 1e3 : NaN;
107
+ }
108
+ function A(e) {
109
+ return e && parseFloat(e.replace(",", ".")) || 0;
110
+ }
111
+ function j(n) {
112
+ if (n === "Z") return 0;
113
+ let r = n.match(w);
114
+ if (!r) return 0;
115
+ let i = r[1] === "+" ? -1 : 1, a = parseInt(r[2]), o = r[3] && parseInt(r[3]) || 0;
116
+ return z(a, o) ? i * (a * t + o * e) : NaN;
117
+ }
118
+ function M(e, t, n) {
119
+ let r = /* @__PURE__ */ new Date(0);
120
+ r.setUTCFullYear(e, 0, 4);
121
+ let i = r.getUTCDay() || 7, a = (t - 1) * 7 + n + 1 - i;
122
+ return r.setUTCDate(r.getUTCDate() + a), r;
123
+ }
124
+ var N = [
125
+ 31,
126
+ null,
127
+ 31,
128
+ 30,
129
+ 31,
130
+ 30,
131
+ 31,
132
+ 31,
133
+ 30,
134
+ 31,
135
+ 30,
136
+ 31
137
+ ];
138
+ function P(e) {
139
+ return e % 400 == 0 || e % 4 == 0 && e % 100 != 0;
140
+ }
141
+ function F(e, t, n) {
142
+ return t >= 0 && t <= 11 && n >= 1 && n <= (N[t] || (P(e) ? 29 : 28));
143
+ }
144
+ function I(e, t) {
145
+ return t >= 1 && t <= (P(e) ? 366 : 365);
146
+ }
147
+ function L(e, t, n) {
148
+ return t >= 1 && t <= 53 && n >= 0 && n <= 6;
149
+ }
150
+ function R(e, t, n) {
151
+ return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
152
+ }
153
+ function z(e, t) {
154
+ return t >= 0 && t <= 59;
155
+ }
156
+ //#endregion
157
+ //#region node_modules/date-fns/subHours.js
158
+ function B(e, t, n) {
159
+ return h(e, -t, n);
160
+ }
161
+ //#endregion
162
+ //#region src/elements-experimental/core/datetime/date-helper.ts
163
+ function V(e) {
164
+ if (e && o(b(e))) {
165
+ if (e.includes("Z")) return new Date(e.replace("Z", ""));
166
+ if (e.includes("T")) {
167
+ let t = e.split("T");
168
+ if (t[1] && (t[1].includes("+") || t[1].includes("-"))) return /* @__PURE__ */ new Date(`${t[0]}T${t[1].split(/[+-]/)[0]}`);
169
+ }
170
+ return new Date(e);
171
+ }
172
+ }
173
+ var H = (e, t) => {
174
+ let n = [], r = [], i = c(0, e), a = g(i, 0);
175
+ a > 0 && (n.push(`${a} d`), t && r.push(`${a} ${a > 1 ? u.multiple.long[t] : u.single.long[t]}`), i = y(i, a));
176
+ let o = v(i, 0);
177
+ o > 0 && (n.push(`${o} h`), t && r.push(`${o} ${o > 1 ? d.multiple.long[t] : d.single.long[t]}`), i = B(i, o));
178
+ let s = l(i, 0);
179
+ return s > 0 && (n.push(`${s} min`), t && r.push(`${s} ${s > 1 ? f.multiple.long[t] : f.single.long[t]}`)), {
180
+ short: n.join(" "),
181
+ long: r.join(" ")
182
+ };
183
+ };
184
+ //#endregion
185
+ export { V as n, H as t };