@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773388997 → 4.7.0-dev.1773393170
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.
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +76 -65
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +52 -72
- package/autocomplete-grid/autocomplete-grid-button.js +6 -3
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +17 -2
- package/autocomplete-grid/autocomplete-grid-cell.js +7 -4
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +21 -20
- package/autocomplete-grid/autocomplete-grid-optgroup.js +6 -3
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +33 -2
- package/autocomplete-grid/autocomplete-grid-option.js +9 -4
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +22 -2
- package/autocomplete-grid/autocomplete-grid-row.js +7 -4
- package/autocomplete-grid/autocomplete-grid.js +6 -3
- package/autocomplete-grid.js +21 -9
- package/autocomplete-grid.pure.js +15 -7
- package/core/datetime/date-helper.js +191 -2
- package/core/datetime.js +5 -2
- package/core/timetable/access-leg-helper.js +71 -76
- package/core/timetable/timetable-helper.js +11 -9
- package/core/timetable/timetable-properties.js +1 -0
- package/core/timetable.js +7 -3
- package/custom-elements.json +84 -84
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +122 -114
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +70 -92
- package/development/autocomplete-grid/autocomplete-grid-button.js +4 -6
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +29 -2
- package/development/autocomplete-grid/autocomplete-grid-cell.js +5 -7
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +22 -27
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +4 -6
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +109 -2
- package/development/autocomplete-grid/autocomplete-grid-option.js +7 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +91 -2
- package/development/autocomplete-grid/autocomplete-grid-row.js +5 -7
- package/development/autocomplete-grid/autocomplete-grid.js +4 -6
- package/development/autocomplete-grid.js +14 -10
- package/development/autocomplete-grid.pure.js +13 -4
- package/development/core/datetime/date-helper.js +285 -2
- package/development/core/datetime.js +6 -2
- package/development/core/timetable/access-leg-helper.js +82 -104
- package/development/core/timetable/timetable-helper.js +17 -16
- package/development/core/timetable/timetable-properties.js +2 -0
- package/development/core/timetable.js +8 -3
- package/development/differenceInMinutes-B0dawX-5.js +26 -0
- package/development/format-BMkeaqaF.js +1433 -0
- package/development/isValid-BYRch7pV.js +53 -0
- package/development/journey-summary/journey-summary.component.js +288 -2
- package/development/journey-summary.js +5 -8
- package/development/journey-summary.pure.js +5 -2
- package/development/pearl-chain/pearl-chain.component.js +634 -2
- package/development/pearl-chain-time/pearl-chain-time.component.js +306 -2
- package/development/pearl-chain-time.js +5 -8
- package/development/pearl-chain-time.pure.js +5 -2
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +28 -2
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +393 -2
- package/development/pearl-chain-vertical-item.js +5 -8
- package/development/pearl-chain-vertical-item.pure.js +5 -2
- package/development/pearl-chain-vertical.js +5 -8
- package/development/pearl-chain-vertical.pure.js +5 -2
- package/development/pearl-chain.js +5 -8
- package/development/pearl-chain.pure.js +5 -2
- package/development/seat-reservation/common/mapper/icon-mapper.js +71 -168
- package/development/seat-reservation/common/mapper/mapper.js +122 -153
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +559 -570
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +972 -992
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20367 -20334
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1738 -1731
- package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9782 -9741
- package/development/seat-reservation/common/mapper.js +8 -1
- package/development/seat-reservation/common/svgs.js +46 -2
- package/development/seat-reservation/common/translations/i18n.js +900 -1118
- package/development/seat-reservation/common/translations.js +4 -1
- package/development/seat-reservation/common/types.js +2 -0
- package/development/seat-reservation/common.js +11 -7
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1230 -1305
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +859 -2
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +106 -2
- package/development/seat-reservation/seat-reservation-area.js +5 -7
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +34 -35
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +162 -2
- package/development/seat-reservation/seat-reservation-graphic.js +5 -7
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +713 -2
- package/development/seat-reservation/seat-reservation-navigation-coach.js +5 -7
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +131 -2
- package/development/seat-reservation/seat-reservation-navigation-services.js +5 -7
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +601 -2
- package/development/seat-reservation/seat-reservation-place-control.js +5 -7
- package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +22 -2
- package/development/seat-reservation/seat-reservation-scoped.js +5 -7
- package/development/seat-reservation/seat-reservation.js +6 -7
- package/development/seat-reservation.js +28 -15
- package/development/seat-reservation.pure.js +28 -10
- package/development/timetable-duration/timetable-duration.component.js +108 -2
- package/development/timetable-duration.js +5 -8
- package/development/timetable-duration.pure.js +5 -2
- package/development/timetable-row/timetable-row.component.js +781 -2
- package/development/timetable-row.js +13 -8
- package/development/timetable-row.pure.js +12 -2
- package/development/toDate-BWb6Z1JD.js +24 -0
- package/differenceInMinutes-COvvdYsJ.js +23 -0
- package/format-CmKROkbc.js +1186 -0
- package/isValid-m3_OsPaB.js +45 -0
- package/journey-summary/journey-summary.component.js +194 -2
- package/journey-summary.js +4 -5
- package/journey-summary.pure.js +4 -2
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.js +165 -2
- package/pearl-chain-time/pearl-chain-time.component.js +157 -2
- package/pearl-chain-time.js +4 -5
- package/pearl-chain-time.pure.js +4 -2
- package/pearl-chain-vertical/pearl-chain-vertical.component.js +17 -2
- package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +77 -2
- package/pearl-chain-vertical-item.js +4 -5
- package/pearl-chain-vertical-item.pure.js +4 -2
- package/pearl-chain-vertical.js +4 -5
- package/pearl-chain-vertical.pure.js +4 -2
- package/pearl-chain.js +4 -5
- package/pearl-chain.pure.js +4 -2
- package/seat-reservation/common/mapper/icon-mapper.js +71 -71
- package/seat-reservation/common/mapper/mapper.js +89 -95
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +558 -568
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +970 -989
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20366 -20332
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1737 -1729
- package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9781 -9739
- package/seat-reservation/common/mapper.js +9 -3
- package/seat-reservation/common/svgs.js +243 -2
- package/seat-reservation/common/translations/i18n.js +891 -1084
- package/seat-reservation/common/translations.js +4 -2
- package/seat-reservation/common/types.js +1 -0
- package/seat-reservation/common.js +15 -9
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +810 -832
- package/seat-reservation/seat-reservation/seat-reservation.component.js +420 -2
- package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +51 -2
- package/seat-reservation/seat-reservation-area.js +7 -4
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +71 -68
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +75 -2
- package/seat-reservation/seat-reservation-graphic.js +7 -4
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +234 -2
- package/seat-reservation/seat-reservation-navigation-coach.js +7 -4
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +85 -2
- package/seat-reservation/seat-reservation-navigation-services.js +7 -4
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +203 -2
- package/seat-reservation/seat-reservation-place-control.js +7 -4
- package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +13 -2
- package/seat-reservation/seat-reservation-scoped.js +7 -4
- package/seat-reservation/seat-reservation.js +9 -5
- package/seat-reservation.js +39 -17
- package/seat-reservation.pure.js +32 -15
- package/timetable-duration/timetable-duration.component.js +57 -2
- package/timetable-duration.js +4 -5
- package/timetable-duration.pure.js +4 -2
- package/timetable-row/timetable-row.component.js +427 -2
- package/timetable-row.js +13 -6
- package/timetable-row.pure.js +11 -2
- package/toDate-Bw2KTWeq.js +15 -0
- package/autocomplete-grid-cell.component-Dak9wlBr.js +0 -24
- package/autocomplete-grid-option.component-DNRFHOwc.js +0 -37
- package/autocomplete-grid-row.component-DBHZQ0GQ.js +0 -27
- package/date-helper-CGproP5d.js +0 -185
- package/development/autocomplete-grid-cell.component-BBvM4o2H.js +0 -42
- package/development/autocomplete-grid-option.component-QzfM5eIE.js +0 -123
- package/development/autocomplete-grid-row.component-H8sCTCkT.js +0 -104
- package/development/date-helper-8_Y-PuHh.js +0 -520
- package/development/differenceInMinutes-DN_1Rk3O.js +0 -110
- package/development/format-Bbrn2bgo.js +0 -1848
- package/development/isValid-C-HzKv4v.js +0 -178
- package/development/journey-summary.component-uGhZvA4p.js +0 -385
- package/development/pearl-chain-time.component-B8mayTWD.js +0 -415
- package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +0 -435
- package/development/pearl-chain-vertical.component-CswE7b3M.js +0 -39
- package/development/pearl-chain.component-wpsTvoSe.js +0 -704
- package/development/seat-reservation-area.component-BK92ZtFo.js +0 -138
- package/development/seat-reservation-graphic.component-cUnsHh5x.js +0 -193
- package/development/seat-reservation-navigation-coach.component-D6Bglus8.js +0 -828
- package/development/seat-reservation-navigation-services.component-DYJ6Ddkg.js +0 -179
- package/development/seat-reservation-place-control.component-Bg9evKBW.js +0 -726
- package/development/seat-reservation-scoped.component-DRQ_I702.js +0 -31
- package/development/seat-reservation.component-Cq_aJKR0.js +0 -818
- package/development/svgs-C3JMWR26.js +0 -28
- package/development/timetable-duration.component-DI0lET17.js +0 -125
- package/development/timetable-row.component-CAED6Zwc.js +0 -932
- package/development/toDate-Biiv3kyf.js +0 -150
- package/differenceInMinutes-Dr9gRqtu.js +0 -27
- package/format-CM5exOsN.js +0 -1103
- package/isValid-B9oVW3lA.js +0 -36
- package/journey-summary.component-Cq_4kaOp.js +0 -264
- package/pearl-chain-time.component-DGDW5S1c.js +0 -239
- package/pearl-chain-vertical-item.component-G22bWhLU.js +0 -108
- package/pearl-chain-vertical.component-CXIDT5RD.js +0 -21
- package/pearl-chain.component-DmjkVIva.js +0 -194
- package/seat-reservation-area.component-n-9rGn_y.js +0 -75
- package/seat-reservation-graphic.component-YTXRmKt0.js +0 -102
- package/seat-reservation-navigation-coach.component-YJ0vaYmO.js +0 -333
- package/seat-reservation-navigation-services.component-C3xnLJg2.js +0 -127
- package/seat-reservation-place-control.component-DmBAfM6K.js +0 -322
- package/seat-reservation-scoped.component-DPkz6u17.js +0 -17
- package/seat-reservation.component-C_anMkgw.js +0 -364
- package/svgs-D9arBcqr.js +0 -26
- package/timetable-duration.component-DCu8Phts.js +0 -65
- package/timetable-row.component-BVRCB3xK.js +0 -559
- package/toDate-p-Tpkb7t.js +0 -16
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./toDate-p-Tpkb7t.js";
|
|
2
|
-
import { r as t, t as n } from "./differenceInMinutes-Dr9gRqtu.js";
|
|
3
|
-
import { __esDecorate as r, __runInitializers as i } from "tslib";
|
|
4
|
-
import { SbbElement as a } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
5
|
-
import { forceType as o } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
6
|
-
import { boxSizingStyles as s } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
7
|
-
import { css as c, html as l, nothing as u } from "lit";
|
|
8
|
-
import { defaultDateAdapter as d } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
9
|
-
import { property as f } from "lit/decorators.js";
|
|
10
|
-
import { removeTimezoneFromISOTimeString as p } from "./core/datetime.js";
|
|
11
|
-
import { isRideLeg as m } from "./core/timetable.js";
|
|
12
|
-
import { styleMap as h } from "lit/directives/style-map.js";
|
|
13
|
-
//#region node_modules/date-fns/isAfter.js
|
|
14
|
-
function g(t, n) {
|
|
15
|
-
return +e(t) > +e(n);
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region node_modules/date-fns/isBefore.js
|
|
19
|
-
function _(t, n) {
|
|
20
|
-
return +e(t) < +e(n);
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/elements-experimental/pearl-chain/pearl-chain.scss?lit&inline
|
|
24
|
-
var v = c`:host{--sbb-pearl-chain-height:var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small:.125rem;--sbb-pearl-chain-color:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-color-disruption:var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-color-past:var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-leg-width:100%;--sbb-pearl-chain-position-color:var(--sbb-color-primary);--sbb-pearl-chain-bullet-size-start-end:.625rem;--sbb-pearl-chain-bullet-size-stop:.5rem;--sbb-pearl-chain-bullet-color:var(--sbb-background-color-3-inverted);--sbb-pearl-chain-bullet-color-past:var(--lightningcss-light,var(--sbb-color-metal))var(--lightningcss-dark,var(--sbb-color-granite));--sbb-pearl-chain-bullet-color-irrelevant:var(--lightningcss-light,var(--sbb-color-metal))var(--lightningcss-dark,var(--sbb-color-granite));--sbb-pearl-chain-bullet-color-disruption:var(--sbb-color-error);--sbb-pearl-chain-bullet-border-width:var(--sbb-border-width-2x);--sbb-pearl-chain-bullet-animation-duration:1.92s;--sbb-pearl-chain-bullet-animation-easing:ease-out;--sbb-pearl-chain-bullet-crossed-width:.88375rem;--sbb-pearl-chain-bullet-crossed-height:.21875rem;--sbb-pearl-chain-bullet-crossed-border-width:.09375rem;display:block}.sbb-pearl-chain{color:var(--sbb-pearl-chain-color);width:100%;padding-block:calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);flex-wrap:nowrap;justify-content:space-between;padding-inline-end:var(--sbb-pearl-chain-bullet-size-start-end);display:flex;position:relative}.sbb-pearl-chain__bullet{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors:active){.sbb-pearl-chain__bullet{--sbb-pearl-chain-bullet-color:CanvasText}}.sbb-pearl-chain__bullet{content:"";z-index:3;background-color:currentColor;position:absolute;inset-block-start:0}.sbb-pearl-chain__bullet:first-of-type{inset-inline-start:0}.sbb-pearl-chain__bullet:last-of-type{inset-inline-end:0}.sbb-pearl-chain__leg{height:var(--sbb-pearl-chain-height);border-inline-end:var(--sbb-pearl-chain-spacing-small) solid Canvas;width:var(--sbb-pearl-chain-leg-width);background-color:currentColor;flex-grow:0;flex-shrink:0;align-items:center;display:flex;position:relative}@media (forced-colors:active){.sbb-pearl-chain__leg{background-color:canvastext}.sbb-pearl-chain--past .sbb-pearl-chain__leg{background-color:graytext}}.sbb-pearl-chain__leg:last-of-type{border:none}.sbb-pearl-chain__stop{z-index:2;background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%;position:relative}@media (forced-colors:active){.sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color:CanvasText}}.sbb-pearl-chain__stop{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:canvas}.sbb-pearl-chain__bullet--future{background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors:active){.sbb-pearl-chain__bullet--future{--sbb-pearl-chain-bullet-color:CanvasText}}.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{color:var(--sbb-pearl-chain-color-past);--sbb-pearl-chain-bullet-color:var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{--sbb-pearl-chain-bullet-color:GrayText!important;background-color:graytext!important}}.sbb-pearl-chain__bullet--progress{background:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-bullet-color:var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors:active){.sbb-pearl-chain__bullet--progress{--sbb-pearl-chain-bullet-color:GrayText!important}}.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:var(--sbb-pearl-chain-color-disruption);--sbb-pearl-chain-bullet-color:var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{--sbb-pearl-chain-bullet-color:Highlight;color:highlight;background:highlight}}.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color:var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors:active){.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color:Highlight}}.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color:var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors:active){.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color:GrayText!important}}.sbb-pearl-chain__leg--disruption:after{background-color:unset;background-image:linear-gradient(90deg,currentColor 0% 50%,canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media (forced-colors:active){.sbb-pearl-chain__leg--disruption:after{background:unset;border-block-start:.0625rem dashed highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__leg--skipped{color:var(--sbb-pearl-chain-color-disruption)}.sbb-pearl-chain__leg--skipped:after{background-color:unset;background-image:linear-gradient(90deg,currentColor 0% 50%,canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media (forced-colors:active){.sbb-pearl-chain__leg--skipped:after{background:unset;border-block-start:.0625rem dashed highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__stop--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:canvas}.sbb-pearl-chain__stop--departure-skipped:before{content:"";border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width);position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)rotate(45deg)}@media (forced-colors:active){.sbb-pearl-chain__stop--departure-skipped:before{background:highlight}}.sbb-pearl-chain--arrival-skipped,.sbb-pearl-chain--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:canvas}.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{content:"";border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width);position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)rotate(45deg)}@media (forced-colors:active){.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{background:highlight}}.sbb-pearl-chain__leg:after{content:"";border-radius:var(--sbb-pearl-chain-height);z-index:1;background-color:currentColor;position:absolute;inset-block:0;inset-inline-start:0}@media (forced-colors:active){.sbb-pearl-chain__leg:after{background-color:canvastext}.sbb-pearl-chain--past .sbb-pearl-chain__leg:after{background-color:graytext}}.sbb-pearl-chain__leg:last-of-type:after{inset-inline-end:calc(-1 * var(--sbb-pearl-chain-height))}.sbb-pearl-chain__leg--progress:after{background-color:var(--sbb-pearl-chain-color-past);width:var(--sbb-pearl-chain-leg-status)}.sbb-pearl-chain__position{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color:CanvasText}}.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color:var(--sbb-pearl-chain-position-color)}@media (forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-position-color:Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}50%{box-shadow:0 0 0 .1875rem color-mix(in srgb, var(--sbb-pearl-chain-position-color) 20%, transparent)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}}.sbb-pearl-chain__position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite;z-index:4;position:absolute;inset-block-start:-200%;inset-inline-start:var(--sbb-pearl-chain-status-position)}.sbb-pearl-chain__position--no-animation{animation:unset}.sbb-screen-reader-only{clip-path:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`, y = (() => {
|
|
25
|
-
let e = a, c = [], y, b = [], x = [], S, C = [], w = [], T;
|
|
26
|
-
return class extends e {
|
|
27
|
-
constructor() {
|
|
28
|
-
super(...arguments), this.#e = (i(this, c), i(this, b, [])), this.#t = (i(this, x), i(this, C, !1)), this._now = (i(this, w), null);
|
|
29
|
-
}
|
|
30
|
-
static {
|
|
31
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(e[Symbol.metadata] ?? null) : void 0;
|
|
32
|
-
y = [f({ type: Array })], S = [o(), f({
|
|
33
|
-
attribute: "disable-animation",
|
|
34
|
-
type: Boolean
|
|
35
|
-
})], T = [f()], r(this, null, y, {
|
|
36
|
-
kind: "accessor",
|
|
37
|
-
name: "legs",
|
|
38
|
-
static: !1,
|
|
39
|
-
private: !1,
|
|
40
|
-
access: {
|
|
41
|
-
has: (e) => "legs" in e,
|
|
42
|
-
get: (e) => e.legs,
|
|
43
|
-
set: (e, t) => {
|
|
44
|
-
e.legs = t;
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
metadata: t
|
|
48
|
-
}, b, x), r(this, null, S, {
|
|
49
|
-
kind: "accessor",
|
|
50
|
-
name: "disableAnimation",
|
|
51
|
-
static: !1,
|
|
52
|
-
private: !1,
|
|
53
|
-
access: {
|
|
54
|
-
has: (e) => "disableAnimation" in e,
|
|
55
|
-
get: (e) => e.disableAnimation,
|
|
56
|
-
set: (e, t) => {
|
|
57
|
-
e.disableAnimation = t;
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
metadata: t
|
|
61
|
-
}, C, w), r(this, null, T, {
|
|
62
|
-
kind: "setter",
|
|
63
|
-
name: "now",
|
|
64
|
-
static: !1,
|
|
65
|
-
private: !1,
|
|
66
|
-
access: {
|
|
67
|
-
has: (e) => "now" in e,
|
|
68
|
-
set: (e, t) => {
|
|
69
|
-
e.now = t;
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
metadata: t
|
|
73
|
-
}, null, c), t && Object.defineProperty(this, Symbol.metadata, {
|
|
74
|
-
enumerable: !0,
|
|
75
|
-
configurable: !0,
|
|
76
|
-
writable: !0,
|
|
77
|
-
value: t
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
static {
|
|
81
|
-
this.elementName = "sbb-pearl-chain";
|
|
82
|
-
}
|
|
83
|
-
static {
|
|
84
|
-
this.styles = [s, v];
|
|
85
|
-
}
|
|
86
|
-
#e;
|
|
87
|
-
get legs() {
|
|
88
|
-
return this.#e;
|
|
89
|
-
}
|
|
90
|
-
set legs(e) {
|
|
91
|
-
this.#e = e;
|
|
92
|
-
}
|
|
93
|
-
#t;
|
|
94
|
-
get disableAnimation() {
|
|
95
|
-
return this.#t;
|
|
96
|
-
}
|
|
97
|
-
set disableAnimation(e) {
|
|
98
|
-
this.#t = e;
|
|
99
|
-
}
|
|
100
|
-
set now(e) {
|
|
101
|
-
this._now = d.getValidDateOrNull(d.deserialize(e));
|
|
102
|
-
}
|
|
103
|
-
get now() {
|
|
104
|
-
return this._now;
|
|
105
|
-
}
|
|
106
|
-
_getAllDuration(e) {
|
|
107
|
-
return e?.reduce((e, t) => {
|
|
108
|
-
let r = p(t.arrival?.time), i = p(t.departure?.time);
|
|
109
|
-
return r && i ? e + n(p(t.arrival.time), p(t.departure.time)) : e;
|
|
110
|
-
}, 0);
|
|
111
|
-
}
|
|
112
|
-
_isAllCancelled(e) {
|
|
113
|
-
return e?.every((e) => e?.serviceJourney?.serviceAlteration?.cancelled);
|
|
114
|
-
}
|
|
115
|
-
_getRelativeDuration(e, t) {
|
|
116
|
-
let r = p(t.arrival?.time), i = p(t.departure?.time);
|
|
117
|
-
if (r && i) {
|
|
118
|
-
let r = n(p(t.arrival.time), p(t.departure.time)), i = this._getAllDuration(e);
|
|
119
|
-
return i === 0 ? 100 : r / i * 100;
|
|
120
|
-
}
|
|
121
|
-
return 0;
|
|
122
|
-
}
|
|
123
|
-
_getProgress(e, r, i) {
|
|
124
|
-
if (!r?.time || !i?.time) return 0;
|
|
125
|
-
let a = t(r.time, r.delay ?? 0), o = n(t(i.time, i.delay ?? 0), a), s = n(e, a);
|
|
126
|
-
return o && s / o * 100;
|
|
127
|
-
}
|
|
128
|
-
_getStatus(e, n, r) {
|
|
129
|
-
let i = n && n.time && t(n.time, n.delay ?? 0), a = r && r.time && t(r.time, r.delay ?? 0);
|
|
130
|
-
return i && _(i, e) && a && g(a, e) ? "progress" : a && _(a, e) ? "past" : "future";
|
|
131
|
-
}
|
|
132
|
-
_renderPosition(e, t, n) {
|
|
133
|
-
let r = this._getProgress(e, t, n);
|
|
134
|
-
if (r < 0 && r > 100) return;
|
|
135
|
-
let i = () => ({
|
|
136
|
-
"--sbb-pearl-chain-status-position": `${r}%`,
|
|
137
|
-
...r >= 50 ? { transform: "translateX(-100%)" } : {}
|
|
138
|
-
}), a = this.disableAnimation ? "sbb-pearl-chain__position--no-animation" : "";
|
|
139
|
-
return l`<span
|
|
140
|
-
style=${h(i())}
|
|
141
|
-
class="sbb-pearl-chain__position ${a}"
|
|
142
|
-
></span>`;
|
|
143
|
-
}
|
|
144
|
-
render() {
|
|
145
|
-
let e = this.now ?? /* @__PURE__ */ new Date(), t = this.legs?.filter((e) => m(e)), n = t?.length && p(t[0]?.departure?.time), r = n && {
|
|
146
|
-
time: n,
|
|
147
|
-
delay: t[0].departure.delay ?? 0
|
|
148
|
-
}, i = t?.length && p(t[t.length - 1].arrival?.time), a = i && {
|
|
149
|
-
time: i,
|
|
150
|
-
delay: t[t.length - 1]?.arrival.delay ?? 0
|
|
151
|
-
}, o = t && t[0]?.serviceJourney?.stopPoints && t[0]?.serviceJourney?.stopPoints[0].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--departure-skipped" : "", s = (() => {
|
|
152
|
-
let e = t && t[t.length - 1], n = e && e.serviceJourney?.stopPoints;
|
|
153
|
-
return n && n[n.length - 1].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--arrival-skipped" : "";
|
|
154
|
-
})(), c = t && t[0]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--departure-disruption" : "", d = t && t[t.length - 1]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--arrival-disruption" : "", f = r && a && this._getStatus(e, r, a), g = t && f && !c ? "sbb-pearl-chain__bullet--" + f : "", _ = t && f && !d ? "sbb-pearl-chain__bullet--" + this._getStatus(e, void 0, a) : "";
|
|
155
|
-
return this._isAllCancelled(t) ? l`
|
|
156
|
-
<div class="sbb-pearl-chain">
|
|
157
|
-
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
158
|
-
<div class="sbb-pearl-chain__leg sbb-pearl-chain__leg--disruption"></div>
|
|
159
|
-
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
160
|
-
</div>
|
|
161
|
-
` : l`
|
|
162
|
-
<div class="sbb-pearl-chain">
|
|
163
|
-
<span
|
|
164
|
-
class="sbb-pearl-chain__bullet ${g} ${o} ${c}"
|
|
165
|
-
></span>
|
|
166
|
-
${t?.map((n, r) => {
|
|
167
|
-
let { stopPoints: i, serviceAlteration: a } = n?.serviceJourney || {}, o = this._getRelativeDuration(t, n), s = p(n.departure?.time), c = p(n.arrival?.time), d = i && i[i.length - 1]?.stopStatus === "NOT_SERVICED", f = i && i[i.length - 1]?.stopStatus === "PLANNED", m = i && i[0]?.stopStatus === "NOT_SERVICED", g = r > 0 && t[r - 1].serviceJourney.stopPoints, _ = g && g[g.length - 1]?.stopStatus === "NOT_SERVICED", v = d || m && f ? "sbb-pearl-chain__leg--skipped" : "", y = m || _ ? "sbb-pearl-chain__stop--departure-skipped" : "", b = a?.cancelled || a?.partiallyCancelled ? "sbb-pearl-chain__leg--disruption" : "", x = {
|
|
168
|
-
time: s,
|
|
169
|
-
delay: n.departure?.delay ?? 0
|
|
170
|
-
}, S = {
|
|
171
|
-
time: c,
|
|
172
|
-
delay: n.arrival?.delay ?? 0
|
|
173
|
-
}, C = this._getStatus(e, x, S);
|
|
174
|
-
return l` <div
|
|
175
|
-
class="sbb-pearl-chain__leg ${!b && !v && "sbb-pearl-chain__leg--" + C || ""} ${b} ${v}"
|
|
176
|
-
style=${h({
|
|
177
|
-
"--sbb-pearl-chain-leg-width": `${o}%`,
|
|
178
|
-
...C === "progress" && !b && !v ? { "--sbb-pearl-chain-leg-status": `${this._getProgress(e, x, S)}%` } : {}
|
|
179
|
-
})}
|
|
180
|
-
>
|
|
181
|
-
${r > 0 && r < t.length ? l`<span class="sbb-pearl-chain__stop ${y}"></span>` : u}
|
|
182
|
-
${C === "progress" && !b && !v ? this._renderPosition(e, x, S) : u}
|
|
183
|
-
</div>`;
|
|
184
|
-
})}
|
|
185
|
-
<span
|
|
186
|
-
class="sbb-pearl-chain__bullet ${_} ${s} ${d}"
|
|
187
|
-
></span>
|
|
188
|
-
</div>
|
|
189
|
-
`;
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
})();
|
|
193
|
-
//#endregion
|
|
194
|
-
export { y as t };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
-
import { SbbElement as n } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
3
|
-
import { forceType as r } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
4
|
-
import { boxSizingStyles as i } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
5
|
-
import { css as a, html as o } from "lit";
|
|
6
|
-
import { property as s } from "lit/decorators.js";
|
|
7
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-area/seat-reservation-area.scss?lit&inline
|
|
8
|
-
var c = a`:host{--sbb-seat-reservation-area-border-radius:var(--sbb-border-width-4x);--sbb-seat-reservation-area-rotation:0;height:calc(var(--sbb-seat-reservation-area-height) * var(--sbb-seat-reservation-one-px-rem,.0625rem));width:calc(var(--sbb-seat-reservation-area-width) * var(--sbb-seat-reservation-one-px-rem,.0625rem));border:var(--sbb-border-width-1x) solid var(--sbb-color-graphite);border:var(--sbb-border-width-1x) solid var(--lightningcss-light,var(--sbb-color-graphite))var(--lightningcss-dark,var(--sbb-color-granite));border-radius:var(--sbb-seat-reservation-area-border-radius);rotate:calc(var(--sbb-seat-reservation-area-rotation) * 1deg);background-color:var(--sbb-background-color-2);justify-content:center;align-items:center;line-height:normal;display:flex;position:absolute;inset-block-start:calc(var(--sbb-seat-reservation-area-top) * var(--sbb-seat-reservation-one-px-rem,.0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-area-left) * var(--sbb-seat-reservation-one-px-rem,.0625rem))}:host([background=dark]){background-color:var(--sbb-color-milk);background-color:var(--lightningcss-light,var(--sbb-color-milk))var(--lightningcss-dark,var(--sbb-color-iron))}:host([mounting=upper-border]){border-radius:0 0 var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius);border-block-start-width:0}:host([mounting=lower-border]){border-radius:var(--sbb-seat-reservation-area-border-radius) var(--sbb-seat-reservation-area-border-radius) 0 0;border-block-end-width:0}:host([mounting=upper-to-lower-border]){border-block:none;border-radius:0}:host(.sbb-seat-reservation-area--cursor-pointer){cursor:var(--sbb-cursor-pointer)}`, l = (() => {
|
|
9
|
-
let a = n, l, u = [], d = [], f, p = [], m = [];
|
|
10
|
-
return class extends a {
|
|
11
|
-
static {
|
|
12
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(a[Symbol.metadata] ?? null) : void 0;
|
|
13
|
-
l = [r(), s({ reflect: !0 })], f = [r(), s({ reflect: !0 })], e(this, null, l, {
|
|
14
|
-
kind: "accessor",
|
|
15
|
-
name: "mounting",
|
|
16
|
-
static: !1,
|
|
17
|
-
private: !1,
|
|
18
|
-
access: {
|
|
19
|
-
has: (e) => "mounting" in e,
|
|
20
|
-
get: (e) => e.mounting,
|
|
21
|
-
set: (e, t) => {
|
|
22
|
-
e.mounting = t;
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
metadata: t
|
|
26
|
-
}, u, d), e(this, null, f, {
|
|
27
|
-
kind: "accessor",
|
|
28
|
-
name: "background",
|
|
29
|
-
static: !1,
|
|
30
|
-
private: !1,
|
|
31
|
-
access: {
|
|
32
|
-
has: (e) => "background" in e,
|
|
33
|
-
get: (e) => e.background,
|
|
34
|
-
set: (e, t) => {
|
|
35
|
-
e.background = t;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
metadata: t
|
|
39
|
-
}, p, m), t && Object.defineProperty(this, Symbol.metadata, {
|
|
40
|
-
enumerable: !0,
|
|
41
|
-
configurable: !0,
|
|
42
|
-
writable: !0,
|
|
43
|
-
value: t
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
static {
|
|
47
|
-
this.elementName = "sbb-seat-reservation-area";
|
|
48
|
-
}
|
|
49
|
-
static {
|
|
50
|
-
this.styles = [i, c];
|
|
51
|
-
}
|
|
52
|
-
#e = t(this, u, "free");
|
|
53
|
-
get mounting() {
|
|
54
|
-
return this.#e;
|
|
55
|
-
}
|
|
56
|
-
set mounting(e) {
|
|
57
|
-
this.#e = e;
|
|
58
|
-
}
|
|
59
|
-
#t = (t(this, d), t(this, p, "light"));
|
|
60
|
-
get background() {
|
|
61
|
-
return this.#t;
|
|
62
|
-
}
|
|
63
|
-
set background(e) {
|
|
64
|
-
this.#t = e;
|
|
65
|
-
}
|
|
66
|
-
render() {
|
|
67
|
-
return o`<slot></slot>`;
|
|
68
|
-
}
|
|
69
|
-
constructor() {
|
|
70
|
-
super(...arguments), t(this, m);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
})();
|
|
74
|
-
//#endregion
|
|
75
|
-
export { l as t };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
-
import { SbbElement as n } from "@sbb-esta/lyne-elements/core/base-elements.js";
|
|
3
|
-
import { SbbLanguageController as r } from "@sbb-esta/lyne-elements/core/controllers.js";
|
|
4
|
-
import { forceType as i } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
5
|
-
import { boxSizingStyles as a } from "@sbb-esta/lyne-elements/core/styles.js";
|
|
6
|
-
import "@sbb-esta/lyne-elements/icon.js";
|
|
7
|
-
import { css as o, html as s, isServer as c } from "lit";
|
|
8
|
-
import { property as l } from "lit/decorators.js";
|
|
9
|
-
import { mapIconToSvg as u } from "./seat-reservation/common/mapper.js";
|
|
10
|
-
import { classMap as d } from "lit/directives/class-map.js";
|
|
11
|
-
import { getI18nSeatReservation as f } from "./seat-reservation/common/translations.js";
|
|
12
|
-
//#region src/elements-experimental/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.scss?lit&inline
|
|
13
|
-
var p = o`:host{--sbb-seat-reservation-graphic-width:16;--sbb-seat-reservation-graphic-height:16;--sbb-seat-reservation-graphic-rotation:0;--sbb-seat-reservation-graphic-inverse-rotation:0;--sbb-seat-reservation-graphic-position:initial;--sbb-seat-reservation-graphic-left:0;--sbb-seat-reservation-graphic-top:0;--sbb-icon-svg-width:calc(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem,.0625rem));--sbb-icon-svg-height:calc(var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem,.0625rem));width:calc(var(--sbb-seat-reservation-graphic-width) * var(--sbb-seat-reservation-one-px-rem,.0625rem));height:calc(var(--sbb-seat-reservation-graphic-height) * var(--sbb-seat-reservation-one-px-rem,.0625rem));position:var(--sbb-seat-reservation-graphic-position);justify-content:center;align-items:center;display:flex;inset-block-start:calc(var(--sbb-seat-reservation-graphic-top) * var(--sbb-seat-reservation-one-px-rem,.0625rem));inset-inline-start:calc(var(--sbb-seat-reservation-graphic-left) * var(--sbb-seat-reservation-one-px-rem,.0625rem))}:host(.auto-width){--sbb-icon-svg-width:auto;max-width:calc(var(--sbb-seat-reservation-graphic-max-width) * var(--sbb-seat-reservation-one-px-rem,.0625rem));width:auto}:host(.sbb-seat-reservation-graphic--cursor-pointer){cursor:var(--sbb-cursor-pointer)}.sbb-sr-icon,.sbb-sr-graphic{width:inherit;height:inherit;transform-origin:50%;rotate:calc(var(--sbb-seat-reservation-graphic-rotation) * 1deg)}.sbb-sr-icon{color:var(--lightningcss-light,var(--sbb-color-granite))var(--lightningcss-dark,var(--sbb-color-graphite))}.sbb-sr-graphic svg{width:100%;height:100%}.sbb-sr-graphic svg .fix-rotation-inverse{transform-origin:50%;rotate:calc(var(--sbb-seat-reservation-graphic-inverse-rotation) * 1deg)}@media (forced-colors:active){.sbb-sr-graphic svg:not(.color-immutable) [fill]:not([fill=none]){fill:currentColor}.sbb-sr-graphic .no-bg{fill:#0000}}`, m = (() => {
|
|
14
|
-
let o = n, m, h = [], g = [], _, v = [], y = [];
|
|
15
|
-
return class extends o {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments), this.#e = t(this, h, ""), this.#t = (t(this, g), t(this, v, !1)), this._language = (t(this, y), new r(this));
|
|
18
|
-
}
|
|
19
|
-
static {
|
|
20
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;
|
|
21
|
-
m = [i(), l({ attribute: "name" })], _ = [i(), l({
|
|
22
|
-
attribute: "stretch",
|
|
23
|
-
type: Boolean
|
|
24
|
-
})], e(this, null, m, {
|
|
25
|
-
kind: "accessor",
|
|
26
|
-
name: "name",
|
|
27
|
-
static: !1,
|
|
28
|
-
private: !1,
|
|
29
|
-
access: {
|
|
30
|
-
has: (e) => "name" in e,
|
|
31
|
-
get: (e) => e.name,
|
|
32
|
-
set: (e, t) => {
|
|
33
|
-
e.name = t;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
metadata: t
|
|
37
|
-
}, h, g), e(this, null, _, {
|
|
38
|
-
kind: "accessor",
|
|
39
|
-
name: "stretch",
|
|
40
|
-
static: !1,
|
|
41
|
-
private: !1,
|
|
42
|
-
access: {
|
|
43
|
-
has: (e) => "stretch" in e,
|
|
44
|
-
get: (e) => e.stretch,
|
|
45
|
-
set: (e, t) => {
|
|
46
|
-
e.stretch = t;
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
metadata: t
|
|
50
|
-
}, v, y), t && Object.defineProperty(this, Symbol.metadata, {
|
|
51
|
-
enumerable: !0,
|
|
52
|
-
configurable: !0,
|
|
53
|
-
writable: !0,
|
|
54
|
-
value: t
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
static {
|
|
58
|
-
this.elementName = "sbb-seat-reservation-graphic";
|
|
59
|
-
}
|
|
60
|
-
static {
|
|
61
|
-
this.styles = [a, p];
|
|
62
|
-
}
|
|
63
|
-
#e;
|
|
64
|
-
get name() {
|
|
65
|
-
return this.#e;
|
|
66
|
-
}
|
|
67
|
-
set name(e) {
|
|
68
|
-
this.#e = e;
|
|
69
|
-
}
|
|
70
|
-
#t;
|
|
71
|
-
get stretch() {
|
|
72
|
-
return this.#t;
|
|
73
|
-
}
|
|
74
|
-
set stretch(e) {
|
|
75
|
-
this.#t = e;
|
|
76
|
-
}
|
|
77
|
-
render() {
|
|
78
|
-
let e = u[this.name];
|
|
79
|
-
return !e?.svg && !e?.svgName ? null : s`<span
|
|
80
|
-
class="${d({
|
|
81
|
-
"sbb-sr-icon": !!e.svgName,
|
|
82
|
-
"sbb-sr-graphic": !!e.svg
|
|
83
|
-
})}"
|
|
84
|
-
>
|
|
85
|
-
${e.svgName ? s` <sbb-icon
|
|
86
|
-
name="${e.svgName || ""}"
|
|
87
|
-
aria-hidden="false"
|
|
88
|
-
aria-label="${f(e.svgName, this._language.current)}"
|
|
89
|
-
></sbb-icon>` : s`${this._getSvgElement(e.svg)}`}
|
|
90
|
-
</span>`;
|
|
91
|
-
}
|
|
92
|
-
_getSvgElement(e) {
|
|
93
|
-
if (!c) {
|
|
94
|
-
let t = new DOMParser(), n = e || "<svg></svg>", r = t.parseFromString(n, "image/svg+xml").firstElementChild;
|
|
95
|
-
return this.stretch && r?.nodeName.toLowerCase() === "svg" && r.setAttribute("preserveAspectRatio", "none"), r;
|
|
96
|
-
}
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
})();
|
|
101
|
-
//#endregion
|
|
102
|
-
export { m as t };
|