{"version":3,"names":["calendarI18n","key","de","en","it","fr","nl","calendar2021Css","calendar2022Css","defaultCalendarCss","Calendar","constructor","hostRef","this","today","Date","visible","daysList","date","focusedDate","undefined","currentMonth","nextMonthDisabled","prevMonthDisabled","mode","inputSelector","disabledBefore","disabledAfter","disableSaturdays","disableSundays","disableWeekends","disableHolidays","componentWillLoad","lang","findLocale","el","i18n","setLang","add","dateInput","parentNode","querySelector","setHours","updateCurrentMonth","componentDidLoad","mutationObserver","addMutationObserver","updateContainerPosition","componentWillUpdate","disconnectedCallback","_a","disconnect","handleKeydown","e","hide","preventDefault","changeFocusedDate","composedPath","includes","shadowRoot","selectFocusedDate","setDateInput","focusCalendar","_b","show","focus","toggle","style","display","classList","rect","getBoundingClientRect","top","height","left","scrollIntoView","block","remove","setDate","addMonths","addDays","newFocusedDateDay","isLastDayOfMonth","getDate","newFocusedDate","getFullYear","getMonth","snapToRange","updateDisabled","isSameMonth","moveFocusToActiveElement","activeElement","contains","currentDate","push","isDateDisabled","onDayClick","value","formatDate","dateChanged","emit","getDay","isAustrianHoliday","render","h","class","tabindex","onClick","stopPropagation","get","months","type","title","name","width","disabled","svgStyle","transform","map","isSameDate","active","focused","minDate","maxDate","a","b","dateFieldI18n","dateField2021Css","dateField2022Css","defaultDateFieldCss","DateField","daysValid","previousBtnDisabled","nextBtnDisabled","fieldIsValid","fieldIsDirty","fieldIsEmpty","htmlId","htmlIdPrefix","label","screenReaderLabel","startDateValue","startDate","required","valid","errorMessageId","novalidate","formDataChangedHandler","formDataChanged","setPreviousAndNextButtonState","disabledBeforeChanged","calendarEl","disabledAfterChanged","disableSaturdaysChanged","newValue","setNextActiveDate","disableSundaysChanged","disableWeekendsChanged","disableHolidaysChanged","htmlIdInternal","Math","random","toString","substring","hasLabelOutside","addDaysDate","now","setMinutes","setSeconds","setMilliseconds","isNaN","valueOf","form","closestAcrossShadow","addEventListener","formData","append","formatIsoDate","dateFieldEl","document","createElement","setAttribute","dateChangedHandler","body","validate","handleBodyClick","handleFocusOut","event","relatedTarget","datefieldActiveHandler","myDate","detail","getTime","Promise","resolve","getValue","setFocus","onFieldInput","parseDate","onFieldKeyDown","onFieldFocus","datefieldActive","onFieldBlur","onFieldChange","onPreviousBtnClick","setTimeout","onNextBtnClick","onPreviousBtnKeyDown","shiftKey","keyCode","firstElementLostFocusBackwards","onCalendarBtnClick","days","step","sign","abs","addDaysToDate","isValid","length","validationStatus","renderValidationMessages","id","onMouseLeave","error","htmlFor","autocomplete","onKeyDown","onInput","onChange","onFocus","onBlur","placeholder"],"sources":["node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/calendar/calendar-i18n.js","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/calendar/calendar-2021.css?tag=oebbx-calendar&mode=2021&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/calendar/calendar-2022.css?tag=oebbx-calendar&mode=2022&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/calendar/calendar.css?tag=oebbx-calendar&mode=default&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/calendar/calendar.js","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/date-field/date-field-i18n.js","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/date-field/date-field-2021.css?tag=oebbx-date-field&mode=2021&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/date-field/date-field-2022.css?tag=oebbx-date-field&mode=2022&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/date-field/date-field.css?tag=oebbx-date-field&mode=default&encapsulation=shadow","node_modules/@oebb-web-team/oebb-web-components/dist/collection/components/date-field/date-field.js"],"sourcesContent":["export const calendarI18n = [\n {\n key: 'previous-month',\n de: 'Vorheriger Monat',\n en: 'Previous month',\n it: 'Mese precedente',\n fr: 'Mois précédent',\n nl: 'Vorige maand',\n },\n {\n key: 'next-month',\n de: 'Nächster Monat',\n en: 'Next month',\n it: 'Il prossimo mese',\n fr: 'Mois suivant',\n nl: 'Volgende maand',\n },\n {\n key: 'close-calendar',\n de: 'Kalender schließen',\n en: 'Close calendar',\n it: 'Chiudi il calendario',\n fr: 'Fermer le calendrier',\n nl: 'Sluit kalender',\n }\n];\n//# sourceMappingURL=calendar-i18n.js.map\n","/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\nbutton {\n font-size: inherit;\n}\n\n.calendar-header {\n display: flex;\n align-items: center;\n height: 5rem;\n}\n.calendar-header h3 {\n flex: 1 0 auto;\n margin: 0;\n padding-left: 0.65rem;\n font-size: 1rem;\n font-weight: bold;\n}\n.calendar-header button {\n width: 2.5rem;\n background: none;\n border: none;\n cursor: pointer;\n fill: #2d3237;\n}\n.calendar-header button svg {\n display: inline-block;\n vertical-align: baseline;\n width: 1rem;\n height: 1rem;\n margin-top: 0.125rem;\n}\n.calendar-header button:disabled {\n cursor: not-allowed;\n fill: #babdc0;\n}\n.calendar-header .calendar__close-btn {\n position: absolute;\n top: -0.5rem;\n right: 1.25rem;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 1.875rem;\n height: 1.875rem;\n background-color: #ffffff;\n border-radius: 50%;\n opacity: 0;\n}\n.calendar-header .calendar__close-btn:focus {\n opacity: 1;\n}\n\n.header {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-gap: 0.5rem;\n margin: 0 -0.5rem;\n padding: 0 0.75rem 0.35rem;\n list-style: none;\n color: #64696e;\n font-size: 0.875rem;\n text-align: center;\n border-bottom: 1px solid currentColor;\n}\n\n.days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-gap: 0.5rem;\n margin: 0.2rem 0 0;\n padding: 0.25rem;\n list-style: none;\n}\n.days li {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 2rem;\n border: 0;\n margin: 0;\n padding: 0;\n text-align: center;\n}\n.days li button {\n position: relative;\n display: block;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background: none;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n color: #64696e;\n font-size: 0.875rem;\n}\n.days li button:hover, .days li button.focused {\n background-color: #dce1e6;\n}\n.days li button.today::before {\n position: absolute;\n top: 50%;\n left: 50%;\n content: \"\";\n display: block;\n width: calc(100% + 0.125rem);\n height: calc(100% + 0.125rem);\n border: 1px solid #878c91;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n}\n.days li button.active {\n background-color: #e2002a;\n color: #ffffff;\n}\n.days li button.active.today::before {\n border-color: #e2002a;\n}\n.days li.dow-1 {\n grid-column: 1;\n}\n.days li.dow-2 {\n grid-column: 2;\n}\n.days li.dow-3 {\n grid-column: 3;\n}\n.days li.dow-4 {\n grid-column: 4;\n}\n.days li.dow-5 {\n grid-column: 5;\n}\n.days li.dow-6 {\n grid-column: 6;\n}\n.days li.dow-0 {\n grid-column: 7;\n}\n.days li.disabled button {\n cursor: not-allowed;\n color: #babdc0;\n}\n.days li.disabled button:not(.focused):hover {\n background-color: transparent;\n}\n\n.calendar-footer {\n display: none;\n}\n\n:host {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n transform: translateY(-2px);\n padding-bottom: 2rem;\n padding-right: 2rem;\n display: none;\n}\n\n.calendar {\n position: absolute;\n z-index: 10;\n background-color: #ffffff;\n border: 1px solid #2d3237;\n box-shadow: 0 10px 20px rgba(45, 50, 55, 0.2);\n list-style: none;\n transform: translateY(-2px);\n position: initial;\n transform: unset;\n width: calc(18.5rem + 2px);\n padding: 0 0.5rem 0.25rem;\n box-sizing: border-box;\n}","/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\nbutton {\n font-size: inherit;\n}\n\n.calendar-header {\n display: flex;\n align-items: center;\n height: 5rem;\n}\n.calendar-header h3 {\n flex: 1 0 auto;\n margin: 0;\n padding-left: 0.65rem;\n font-size: 1rem;\n font-weight: bold;\n}\n.calendar-header button {\n width: 2.5rem;\n background: none;\n border: none;\n cursor: pointer;\n fill: #2d3237;\n}\n.calendar-header button svg {\n display: inline-block;\n vertical-align: baseline;\n width: 1rem;\n height: 1rem;\n margin-top: 0.125rem;\n}\n.calendar-header button:disabled {\n cursor: not-allowed;\n fill: #babdc0;\n}\n.calendar-header .calendar__close-btn {\n position: absolute;\n top: -0.5rem;\n right: 1.25rem;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 1.875rem;\n height: 1.875rem;\n background-color: #ffffff;\n border-radius: 50%;\n opacity: 0;\n}\n.calendar-header .calendar__close-btn:focus {\n opacity: 1;\n}\n\n.header {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-gap: 0.5rem;\n margin: 0 -0.5rem;\n padding: 0 0.75rem 0.35rem;\n list-style: none;\n color: #64696e;\n font-size: 0.875rem;\n text-align: center;\n border-bottom: 1px solid currentColor;\n}\n\n.days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-gap: 0.5rem;\n margin: 0.2rem 0 0;\n padding: 0.25rem;\n list-style: none;\n}\n.days li {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 2rem;\n border: 0;\n margin: 0;\n padding: 0;\n text-align: center;\n}\n.days li button {\n position: relative;\n display: block;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background: none;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n color: #64696e;\n font-size: 0.875rem;\n}\n.days li button:hover, .days li button.focused {\n background-color: #dce1e6;\n}\n.days li button.today::before {\n position: absolute;\n top: 50%;\n left: 50%;\n content: \"\";\n display: block;\n width: calc(100% + 0.125rem);\n height: calc(100% + 0.125rem);\n border: 1px solid #878c91;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n}\n.days li button.active {\n background-color: #e2002a;\n color: #ffffff;\n}\n.days li button.active.today::before {\n border-color: #e2002a;\n}\n.days li.dow-1 {\n grid-column: 1;\n}\n.days li.dow-2 {\n grid-column: 2;\n}\n.days li.dow-3 {\n grid-column: 3;\n}\n.days li.dow-4 {\n grid-column: 4;\n}\n.days li.dow-5 {\n grid-column: 5;\n}\n.days li.dow-6 {\n grid-column: 6;\n}\n.days li.dow-0 {\n grid-column: 7;\n}\n.days li.disabled button {\n cursor: not-allowed;\n color: #babdc0;\n}\n.days li.disabled button:not(.focused):hover {\n background-color: transparent;\n}\n\n.calendar-footer {\n display: none;\n}\n\n:host {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n display: none;\n transform: translateY(var(--form-input-outline-width));\n}\n\n.calendar {\n z-index: 10;\n background: var(--form-input-bg);\n border: 1px solid var(--form-input-border-color);\n border-radius: var(--form-input-border-radius);\n box-shadow: 0 10px 20px rgba(var(--form-input-border-color), 0.2);\n width: calc(18.5rem + 2px);\n padding: 0 0.5rem 0.25rem;\n box-sizing: border-box;\n}\n.calendar .calendar-header button {\n fill: var(--form-calendar-button-color);\n}\n.calendar .calendar-header button:disabled {\n fill: var(--form-calendar-disabled-color);\n}\n.calendar .calendar-header .calendar__close-btn {\n background-color: var(--form-calendar-button-bg);\n}\n.calendar .header {\n color: var(--form-calendar-color);\n}\n.calendar .days li button {\n color: var(--form-calendar-color);\n}\n.calendar .days li button:hover, .calendar .days li button.focused {\n background-color: var(--form-calendar-day-hover);\n}\n.calendar .days li button.today::before {\n border-color: var(--form-calendar-today-border);\n}\n.calendar .days li button.active {\n background-color: var(--form-calendar-active-bg);\n color: var(--form-calendar-active-color);\n}\n.calendar .days li button.active.today::before {\n border-color: var(--form-calendar-active-bg);\n}\n.calendar .days li.disabled button {\n color: var(--form-calendar-disabled-color);\n}","*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\n\n:host {\n\tdisplay: none;\n\tposition: absolute;\n\ttop: 30px;\n\tleft: 0;\n\twidth: 296px;\n\tmin-height: 200px;\n\tbackground: #fbfbfb;\n\tz-index: 2;\n\tbox-sizing: border-box;\n\n\toverflow:hidden;\n\tpadding:0;\n\twhite-space: normal;\n}\n\n.calendar{\n\tbox-sizing: border-box;\n\tborder:1px solid #999;\n}\n\n.calendar:focus{\n\tborder:1px solid #000;\n\toutline:0;\n}\n\n.fields-panel{\n\tmin-height: 100px;\n\tbackground: #fff;\n\tbox-sizing: border-box;\n}\n\nh3 {\n\ttext-align: center;\n\tfont-size: 22px;\n\tpadding-top: 12px;\n\tpadding-bottom: 12px;\n\tmargin: 0;\n\tbackground: #e0e0e0;\n}\n\nth {\n\ttext-align: center;\n\tmin-width: 42px;\n\tborder: 0;\n\tmargin: 0;\n\tbackground-color: #d7d7d7;\n}\n\n​td {\n\ttext-align: center;\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.calendar button.focus:focusring{\n outline:0;\n}\n\n.calendar-header {\n\tposition: relative;\n\tbox-sizing: border-box;\n}\n\n.calendar-header button {\n\tdisplay: inline-block;\n\tposition: absolute;\n\ttop: 50%;\n\tmargin-top: -16px;\n\tborder: none;\n\tbackground: transparent;\n\tpadding: 6px 12px;\n\tcursor: pointer;\n\toutline:0;\n}\n\n.not-in-month,\n.disabled {\n\topacity:0.4;\n}\n\n.calendar-header button:active,\n.calendar-header button:focus,\n.calendar-header button:hover {\n\toutline: 0;\n\tfill: var(--oebb-accent-color, #e2002a);\n}\n\n.calendar-header button:disabled {\n\topacity: 0.4;\n\tcursor: not-allowed;\n\tfill: #000000;\n}\n\n.calendar-header button:active {\n\tpadding: 7px 11px 5px 13px;\n}\n\n.calendar-header button.next-btn {\n\tright: 0;\n}\n\n.calendar-header button.previous-btn {\n\tleft: 0;\n}\n\n.main-content .calendar ul,\nul {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style-type: none;\n\twidth: 294px;\n\tposition: relative;\n\tbox-sizing: border-box;\n}\n\nul.header {\n\theight: 42px;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n}\n\n.main-content .calendar li,\nli {\n\tdisplay: inline-block;\n\tfont-size: 20px;\n\twidth: 42px;\n\theight: 42px;\n\tposition: relative;\n}\n\nli button {\n\tdisplay: inline-block;\n\ttext-align: center;\n\twidth: 42px;\n\theight: 42px;\n\tline-height: 42px;\n\tbox-sizing: border-box;\n\tbackground: white;\n\tborder: 1px solid #fff;\n}\n\nul.header li {\n\tbackground: #cccccc;\n\tborder: 1px solid #cccccc;\n\tdisplay: inline-block;\n\ttext-align: center;\n\twidth: 42px;\n\theight: 42px;\n\tline-height: 42px;\n\tbox-sizing: border-box;\n\tcolor: #000;\n\toverflow: hidden;\n}\n\nul.days {\n\tbackground: #ffffff;\n}\n\nli.dow-2:first-child {\n\tmargin-left: 42px;\n}\n\nli.dow-3:first-child {\n\tmargin-left: 84px;\n}\n\nli.dow-4:first-child {\n\tmargin-left: 126px;\n}\n\nli.dow-5:first-child {\n\tmargin-left: 168px;\n}\n\nli.dow-6:first-child {\n\tmargin-left: 210px;\n}\n\nli.dow-0:first-child {\n\tmargin-left: 252px;\n}\n\nli.dow-0 button {\n\tcolor: #e2002a;\n}\n\nli button.today {\n\tborder: 1px solid #cccccc;\n\tfont-weight: bold;\n}\n\n.days li button {\n\tcursor: pointer;\n\tfont-size: 16px;\n}\n\n.days button:focus,\n.days button.focused,\n.days button:hover {\n\tbackground-color: #e0e0e0;\n\tborder: 1px solid #e0e0e0;\n\toutline: 0;\n}\n\n.days button:active {\n\toutline:0;\n}\n\nli button.active {\n\tcolor: var(--oebb-accent-color, #e2002a);\n\tbackground-color: #fff;\n\tborder: 1px solid var(--oebb-accent-color, #e2002a);\n}\n\n.days button.active:focus {\n\tcolor: var(--oebb-accent-color, #e2002a);\n\tbackground-color: #fff;\n\tborder: 1px solid var(--oebb-accent-color, #e2002a);\n}\n\n.days button.active:hover {\n\tcolor: #fff;\n\tbackground-color: var(--oebb-accent-color, #e2002a);\n\tborder: 1px solid var(--oebb-accent-color, #e2002a);\n}\n\n.days button:disabled {\n\tcursor: not-allowed;\n}\n\n.calendar-footer {\n\tbackground: #e0e0e0;\n\tbox-sizing: border-box;\n}\n\nbutton.footer-btn {\n\tborder: none;\n\tbackground: transparent;\n\tposition: relative;\n\tpadding: 6px;\n\ttext-transform: uppercase;\n\twidth:auto;\n}\n\nbutton.footer-btn:focus,\nbutton.footer-btn:hover {\n\ttext-decoration: underline;\n\toutline: 0;\n}\n\nbutton.footer-btn:active {\n\tpadding: 7px 5px 5px 7px;\n}\n\n.calendar-header .calendar__close-btn {\n\tposition: absolute;\n\ttop: -0.5rem;\n\tright: 1.25rem;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\twidth: 1.875rem;\n\theight: 1.875rem;\n\tbackground-color: #ffffff;\n\tborder-radius: 50%;\n\topacity: 0;\n}\n\n.calendar-header .calendar__close-btn:focus {\n\topacity: 1;\n}","import { h } from '@stencil/core';\nimport { addMutationObserver, updateContainerPosition } from \"../../utils/dom\";\nimport { calendarI18n } from './calendar-i18n';\nimport { i18n, findLocale } from '../../utils/I18n';\nimport { formatDate, months, isAustrianHoliday, isLastDayOfMonth } from '../../utils/date';\nexport class Calendar {\n constructor() {\n this.today = new Date();\n this.visible = false;\n this.daysList = [];\n this.date = new Date();\n this.focusedDate = undefined;\n this.currentMonth = undefined;\n this.nextMonthDisabled = undefined;\n this.prevMonthDisabled = undefined;\n this.mode = undefined;\n this.inputSelector = undefined;\n this.disabledBefore = undefined;\n this.disabledAfter = undefined;\n this.disableSaturdays = false;\n this.disableSundays = false;\n this.disableWeekends = false;\n this.disableHolidays = false;\n }\n componentWillLoad() {\n this.lang = findLocale(this.el);\n i18n.setLang(this.lang);\n i18n.add(calendarI18n);\n if (this.inputSelector) {\n this.dateInput = this.el.parentNode.querySelector(this.inputSelector);\n }\n this.date = new Date();\n this.today = new Date();\n if (this.disabledBefore)\n this.disabledBefore.setHours(0, 0, 0, 0);\n if (this.disabledAfter)\n this.disabledAfter.setHours(0, 0, 0, 0);\n this.updateCurrentMonth();\n }\n componentDidLoad() {\n if (this.mode === '2022') {\n this.mutationObserver = addMutationObserver(() => updateContainerPosition(this.dateInput, this.el));\n }\n }\n componentWillUpdate() {\n if (this.disabledBefore)\n this.disabledBefore.setHours(0, 0, 0, 0);\n if (this.disabledAfter)\n this.disabledAfter.setHours(0, 0, 0, 0);\n }\n disconnectedCallback() {\n var _a;\n (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n handleKeydown(e) {\n if (e.key === 'Escape') {\n this.hide();\n }\n else if (e.key === 'ArrowLeft') {\n e.preventDefault();\n this.changeFocusedDate(0, -1);\n }\n else if (e.key === 'ArrowRight') {\n e.preventDefault();\n this.changeFocusedDate(0, 1);\n }\n else if (e.key === 'ArrowUp') {\n e.preventDefault();\n this.changeFocusedDate(0, -7);\n }\n else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this.changeFocusedDate(0, 7);\n }\n else if (e.key === 'Enter') {\n if (!e.composedPath().includes(this.el.shadowRoot.querySelector('.calendar-header'))) {\n // Catch enter only if it didn't originate from the header buttons\n e.preventDefault();\n this.selectFocusedDate();\n }\n }\n }\n async setDateInput(dateInput) {\n this.dateInput = dateInput;\n }\n async focusCalendar() {\n var _a, _b;\n await this.show();\n (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('.calendar')) === null || _b === void 0 ? void 0 : _b.focus();\n }\n async toggle() {\n return this.visible ? this.hide() : this.show();\n }\n async show() {\n var _a;\n if (!this.visible && this.date) {\n // If calendar was hidden jump to the previously selected date\n this.focusedDate = null;\n }\n this.el.style.display = 'inline-block';\n this.visible = true;\n (_a = this.dateInput) === null || _a === void 0 ? void 0 : _a.classList.add('calendar-open');\n switch (this.mode) {\n case 'default':\n const rect = this.dateInput.getBoundingClientRect();\n this.el.style.top = rect.height + 6 + 'px';\n this.el.style.left = '0';\n break;\n case '2022':\n updateContainerPosition(this.dateInput, this.el);\n break;\n }\n this.updateCurrentMonth();\n this.el.scrollIntoView({ block: 'nearest' });\n }\n async hide() {\n var _a;\n this.el.style.display = 'none';\n this.visible = false;\n (_a = this.dateInput) === null || _a === void 0 ? void 0 : _a.classList.remove('calendar-open');\n }\n async setDate(date) {\n this.date = date;\n this.focusedDate = null;\n this.updateCurrentMonth();\n }\n changeFocusedDate(addMonths = 0, addDays = 0) {\n var _a;\n const focusedDate = (_a = this.focusedDate) !== null && _a !== void 0 ? _a : this.date;\n const newFocusedDateDay = isLastDayOfMonth(focusedDate) ? 1 : focusedDate.getDate();\n const newFocusedDate = new Date(focusedDate.getFullYear(), focusedDate.getMonth() + addMonths, newFocusedDateDay + addDays);\n this.focusedDate = snapToRange(newFocusedDate, this.disabledBefore, this.disabledAfter);\n this.updateCurrentMonth();\n }\n updateDisabled() {\n // Determine whether prev/next month are enabled\n this.prevMonthDisabled = this.currentMonth <= this.disabledBefore;\n this.nextMonthDisabled = isSameMonth(this.currentMonth, this.disabledAfter);\n this.moveFocusToActiveElement();\n }\n moveFocusToActiveElement() {\n const activeElement = this.el.shadowRoot.activeElement;\n if (!activeElement) {\n return;\n }\n if (this.prevMonthDisabled && activeElement.classList.contains('previous-btn')) {\n // Button for previous month is focused, but will be disabled\n this.el.focus();\n }\n else if (this.nextMonthDisabled && activeElement.classList.contains('next-btn')) {\n // Button for next month is focused, but will be disabled\n this.el.focus();\n }\n }\n updateCurrentMonth() {\n var _a;\n const focusedDate = (_a = this.focusedDate) !== null && _a !== void 0 ? _a : this.date;\n if (isSameMonth(focusedDate, this.currentMonth)) {\n // Focused date matches the shown month, only update the month switches\n this.updateDisabled();\n return;\n }\n // Store the requested month\n this.currentMonth = new Date(focusedDate.getFullYear(), focusedDate.getMonth(), 1);\n // Determine whether prev/next month are enabled\n this.updateDisabled();\n // Collect dates until the last date of the requested month is reached\n this.daysList = [];\n let currentDate = this.currentMonth;\n while (currentDate.getMonth() === this.currentMonth.getMonth()) {\n this.daysList.push(currentDate);\n currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate() + 1);\n }\n }\n selectFocusedDate() {\n if (!this.focusedDate) {\n this.hide();\n }\n else if (!this.isDateDisabled(this.focusedDate)) {\n this.onDayClick(this.focusedDate);\n }\n }\n onDayClick(date) {\n this.date = date;\n this.dateInput.value = formatDate(date);\n this.dateChanged.emit(date);\n this.hide();\n }\n isDateDisabled(date) {\n date.setHours(0, 0, 0, 0);\n if (date < this.disabledBefore || date > this.disabledAfter) {\n return true;\n }\n if (this.disableSaturdays && (date.getDay() == 6)) {\n return true;\n }\n if (this.disableSundays && (date.getDay() == 0)) {\n return true;\n }\n if (this.disableHolidays && isAustrianHoliday(date)) {\n return true;\n }\n if (this.disableWeekends && (date.getDay() == 0 || date.getDay() == 6)) {\n return true;\n }\n }\n render() {\n return (h(\"div\", { class: \"calendar\", tabindex: \"-1\", onClick: (e) => e.stopPropagation() }, h(\"div\", { class: \"calendar-header\" }, h(\"h3\", null, i18n.get(months[this.currentMonth.getMonth()]), ' ', this.currentMonth.getFullYear()), h(\"button\", { type: \"button\", class: \"calendar__close-btn\", title: i18n.get('close-calendar', 'Kalender schließen'), onClick: () => this.hide() }, h(\"oebbx-icon\", { name: \"close\", width: \"24\", height: \"24\", \"aria-hidden\": \"true\" }), h(\"span\", { class: \"screen-reader-text\" }, i18n.get('close-calendar', 'Kalender schließen'))), h(\"button\", { type: \"button\", class: \"previous-btn\", title: i18n.get('previous-month', 'Vorheriger Monat'), disabled: this.prevMonthDisabled, onClick: () => this.changeFocusedDate(-1) }, h(\"oebbx-icon\", { name: \"triangle\", width: \"20\", height: \"20\", svgStyle: { transform: 'rotate(180deg)' }, \"aria-hidden\": \"true\" }), h(\"span\", { class: \"screen-reader-text\" }, i18n.get('previous-month', 'Vorheriger Monat'))), h(\"button\", { type: \"button\", class: \"next-btn\", title: i18n.get('next-month', 'Nächster Monat'), disabled: this.nextMonthDisabled, onClick: () => this.changeFocusedDate(1) }, h(\"oebbx-icon\", { name: \"triangle\", width: \"20\", height: \"20\", \"aria-hidden\": \"true\" }), h(\"span\", { class: \"screen-reader-text\" }, i18n.get('next-month', 'Nächster Monat')))), h(\"ul\", { class: \"header\" }, h(\"li\", null, i18n.get('monday', 'MO')), h(\"li\", null, i18n.get('tuesday', 'DI')), h(\"li\", null, i18n.get('wednesday', 'MI')), h(\"li\", null, i18n.get('thursday', 'DO')), h(\"li\", null, i18n.get('friday', 'FR')), h(\"li\", null, i18n.get('saturday', 'SA')), h(\"li\", { class: \"sunday\" }, i18n.get('sunday', 'SO'))), h(\"ul\", { class: \"days\", tabindex: -1 }, this.daysList.map(date => (h(\"li\", { class: {\n 'disabled': this.isDateDisabled(date),\n [`dow-${date.getDay()}`]: true,\n } }, h(\"button\", { type: \"button\", tabindex: isSameDate(date, this.date) || isSameDate(date, this.focusedDate) ? \"0\" : \"-1\", class: {\n 'today': isSameDate(date, this.today),\n 'active': isSameDate(date, this.date),\n 'focused': isSameDate(date, this.focusedDate),\n }, disabled: this.isDateDisabled(date), onClick: () => this.onDayClick(date) }, date.getDate()))))), h(\"div\", { class: \"calendar-footer\" }, h(\"button\", { type: \"button\", class: \"footer-btn\", onClick: () => this.onDayClick(new Date()) }, i18n.get('today', 'heute')))));\n }\n static get is() { return \"oebbx-calendar\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"2021\": [\"calendar-2021.scss\"],\n \"2022\": [\"calendar-2022.scss\"],\n \"default\": [\"calendar.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"2021\": [\"calendar-2021.css\"],\n \"2022\": [\"calendar-2022.css\"],\n \"default\": [\"calendar.css\"]\n };\n }\n static get properties() {\n return {\n \"mode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"mode\",\n \"reflect\": false\n },\n \"inputSelector\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"input-selector\",\n \"reflect\": false\n },\n \"disabledBefore\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Date\",\n \"resolved\": \"Date\",\n \"references\": {\n \"Date\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n }\n },\n \"disabledAfter\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Date\",\n \"resolved\": \"Date\",\n \"references\": {\n \"Date\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n }\n },\n \"disableSaturdays\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-saturdays\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableSundays\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-sundays\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableWeekends\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-weekends\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableHolidays\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-holidays\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get states() {\n return {\n \"date\": {},\n \"focusedDate\": {},\n \"currentMonth\": {},\n \"nextMonthDisabled\": {},\n \"prevMonthDisabled\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"dateChanged\",\n \"name\": \"dateChanged\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setDateInput\": {\n \"complexType\": {\n \"signature\": \"(dateInput: HTMLInputElement) => Promise\",\n \"parameters\": [{\n \"tags\": [],\n \"text\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n },\n \"HTMLInputElement\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"focusCalendar\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n },\n \"HTMLElement\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"toggle\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"show\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"hide\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"setDate\": {\n \"complexType\": {\n \"signature\": \"(date: Date) => Promise\",\n \"parameters\": [{\n \"tags\": [],\n \"text\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n },\n \"Date\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get listeners() {\n return [{\n \"name\": \"keydown\",\n \"method\": \"handleKeydown\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\nfunction snapToRange(date, minDate, maxDate) {\n if (!date) {\n return null;\n }\n if (minDate && maxDate && minDate > maxDate) {\n return null;\n }\n if (minDate && minDate > date) {\n return minDate;\n }\n if (maxDate && maxDate < date) {\n return maxDate;\n }\n return date;\n}\nfunction isSameMonth(a, b) {\n return a && b && a.getMonth() === b.getMonth() && a.getFullYear() === b.getFullYear();\n}\nfunction isSameDate(a, b) {\n return isSameMonth(a, b) && a.getDate() === b.getDate();\n}\n//# sourceMappingURL=calendar.js.map\n","export const dateFieldI18n = [\n {\n key: 'date-format',\n de: 'Format TT.MM.JJJJ',\n en: 'format YYYY.MM.DD',\n },\n {\n // Not used for mode=2021\n key: 'date-previous',\n de: 'Vorheriger Tag',\n en: 'Previous day',\n },\n {\n // Not used for mode=2021\n key: 'date-next',\n de: 'Nächster Tag',\n en: 'Next day',\n },\n {\n key: 'open-calendar',\n de: 'Kalender öffnen',\n en: 'Open calendar',\n it: 'Calendario aperto',\n fr: 'Ouvrir le calendrier',\n nl: 'Open kalender',\n },\n {\n key: 'date-missing',\n de: 'Wählen Sie bitte ein Datum aus.',\n en: 'Please select a date.',\n it: 'Selezionare una data.',\n fr: 'Veuillez sélectionner une date.',\n nl: 'Kies een datum.',\n },\n {\n key: 'date-invalid',\n de: 'Das Datum ist ungültig.',\n en: 'The date is invalid.',\n it: 'Selezionare una data.',\n fr: 'Veuillez sélectionner une date.',\n nl: 'Kies een datum.',\n },\n];\n//# sourceMappingURL=date-field-i18n.js.map\n","/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\n:host {\n display: inline-block;\n}\n\n.oebb-date-field {\n position: relative;\n display: inline-block;\n width: 100%;\n}\n.oebb-date-field input {\n --border-color: #2d3237;\n padding: 1.125rem 0.875rem;\n background-color: #ffffff;\n border: 1px solid var(--border-color);\n border-radius: 3px;\n box-sizing: border-box;\n -webkit-appearance: none;\n color: #000000;\n font-size: 1rem;\n font-family: inherit;\n width: 100%;\n background: linear-gradient(-90deg, #f4f4f4 50px, transparent 50px, transparent), linear-gradient(-90deg, #b1b1b1 51px, transparent 2px, transparent);\n}\n.oebb-date-field input:focus, .oebb-date-field input:hover {\n outline: 1px solid var(--border-color);\n outline-offset: 0;\n}\n.oebb-date-field input::placeholder {\n color: transparent;\n}\n.oebb-date-field label {\n position: absolute;\n top: 50%;\n left: 0.525rem;\n z-index: 10;\n padding: 0 0.35rem;\n background-color: #ffffff;\n cursor: text;\n transform: translateY(-50%);\n transition: top 0.25s ease, left 0.25s, font-size 0.25s ease, color 0.25s ease;\n color: #64696e;\n top: 0;\n color: #000000;\n font-size: 0.875rem;\n}\n.oebb-date-field button {\n position: absolute;\n top: 51.5%;\n right: 0.85rem;\n width: 1.5rem;\n height: 1.5rem;\n margin: 0;\n padding: 0;\n background: none;\n border: none;\n cursor: pointer;\n transform: translateY(-50%);\n text-align: center;\n}\n.oebb-date-field button oebbx-icon {\n display: inline-block;\n width: 1.4rem;\n height: 1.4rem;\n margin-top: 1.5px;\n}\n.oebb-date-field button oebbx-icon svg {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.oebb-date-field oebbx-calendar {\n z-index: 30;\n}\n\n.oebb-date-field--invalid.oebb-date-field--has-focus input,\n.oebb-date-field--invalid input {\n --border-color: #e2002a;\n color: #e2002a;\n border-color: #e2002a;\n}\n.oebb-date-field--invalid.oebb-date-field--has-focus label,\n.oebb-date-field--invalid label {\n color: #e2002a;\n}\n.oebb-date-field--invalid.oebb-date-field--has-focus path,\n.oebb-date-field--invalid path {\n fill: #e2002a;\n}\n\n.oebb-date-field--invalid-message {\n color: #e2002a;\n}","/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\n/* Default Colors */\n/* CI/CD Colors */\n/* 2021 TS Colors */\n/* Scrollbars */\n:host {\n display: inline-block;\n}\n\n.oebb-date-field {\n position: relative;\n display: inline-block;\n width: 100%;\n}\n.oebb-date-field input::placeholder {\n opacity: 0;\n}\n.oebb-date-field input:focus + .form-label-text, .oebb-date-field input:not(:placeholder-shown) + .form-label-text {\n top: 0;\n padding: 0 0.25rem;\n background: linear-gradient(to bottom, var(--form-container-bg) 50%, var(--form-input-bg) 50%);\n line-height: 1;\n font-size: var(--form-floating-size);\n letter-spacing: var(--form-floating-spacing);\n}\n.oebb-date-field .form-label-text {\n position: absolute;\n top: calc(var(--form-input-height) / 2);\n left: 1rem;\n transform: translateY(-50%);\n color: var(--form-input-placeholder-color);\n transition-duration: 300ms;\n z-index: 1;\n}\n.oebb-date-field input {\n width: 100%;\n min-height: var(--form-input-height);\n padding: 0 var(--form-input-padding-right) 0 var(--form-input-padding-left);\n border: 1px solid var(--form-input-border-color);\n border-radius: var(--form-input-border-radius);\n background: var(--form-input-bg);\n color: var(--form-input-color);\n font-family: inherit;\n font-size: inherit;\n box-sizing: border-box;\n}\n.oebb-date-field input::placeholder {\n color: var(--form-input-placeholder-color);\n}\n.oebb-date-field button {\n position: absolute;\n top: calc(var(--form-input-height) / 2);\n right: var(--form-icon-right);\n width: 1em;\n height: 1em;\n line-height: 1em;\n transform: translateY(-50%);\n font-size: var(--form-icon-size);\n color: var(--form-icon-color);\n pointer-events: none;\n cursor: pointer;\n padding: 0;\n border: none;\n background: none;\n pointer-events: initial;\n}\n.oebb-date-field button oebbx-icon {\n display: block;\n width: 100%;\n height: 100%;\n}\n.oebb-date-field button oebbx-icon svg {\n display: inline-block;\n width: 100%;\n height: 100%;\n}\n.oebb-date-field path {\n fill: currentColor;\n}\n.oebb-date-field oebbx-calendar {\n z-index: 30;\n transform: translateY(var(--form-input-outline-width));\n}\n.oebb-date-field:focus-within input, .oebb-date-field input.calendar-open {\n border-color: var(--form-input-focus-border);\n outline: var(--form-input-outline-width) solid var(--form-input-outline-color);\n box-shadow: var(--form-input-box-shadow, none);\n}\n.oebb-date-field--invalid input {\n color: var(--form-invalid-color);\n border-color: var(--form-invalid-color);\n}\n.oebb-date-field--invalid .form-label-text, .oebb-date-field--invalid button {\n color: var(--form-invalid-color);\n}\n.oebb-date-field--invalid-message {\n color: var(--form-invalid-color);\n}","*:focus {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n*:focus:not(:focus-visible) {\n\toutline: none;\n}\n\n*:focus-visible {\n\toutline: var(--oebb-outline, 2px dotted var(--oebb-accent-color, #e2002a));\n\toutline-offset: var(--oebb-outline-offset, 2px);\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.invisible {\n\tvisibility: hidden;\n}\n\n.offscreen {\n\tposition: absolute;\n\tleft: -1000em;\n}\n\n.screen-reader-text {\n\tposition: absolute;\n\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\n\tborder: 0;\n\tclip-path: inset(50%);\n\n\twhite-space: nowrap;\n}\n\n.screen-reader-text--focusable:active,\n.screen-reader-text--focusable:focus {\n\tposition: relative;\n\n\twidth: auto;\n\theight: auto;\n\tmargin: 0;\n\toverflow: visible;\n\n\tclip-path: none;\n\n\twhite-space: inherit;\n}\n\n/** @deprecated */\n/** \".is-tabbing\" should be added via JavaScript and shows the outline. Used with class to not show outline on clicking elements. */\n.is-tabbing button::-moz-focus-inner,\n:host(.is-tabbing) button::-moz-focus-inner {\n\tborder: 0;\n}\n\n.is-tabbing--focus,\n.is-tabbing a:focus,\n.is-tabbing button:focus,\n.is-tabbing div:focus,\n.is-tabbing input:focus,\n.is-tabbing input:focus ~ span[role=\"presentation\"],\n:host(.is-tabbing) a:focus,\n:host(.is-tabbing) button:focus,\n:host(.is-tabbing) div:focus,\n:host(.is-tabbing) input:focus,\n:host(.is-tabbing) input:focus ~ span[role=\"presentation\"] {\n\toutline: 2px dotted #e2002a;\n\toutline-offset: 2px;\n\tz-index: 10;\n}\n\n\n:host {\n\tposition: relative;\n\tz-index: 10;\n\n\tdisplay: inline-block;\n\tmin-width: 295px;\n\tpadding: 0;\n\tbox-sizing: border-box;\n\n\tbackground: transparent;\n\twhite-space: nowrap;\n\tfont-size: 0;\n}\n\n.date-field {\n\tposition: relative;\n\twidth: calc(100% - 35px);\n\tbox-sizing: border-box;\n\ttop: 0;\n\tleft:0;\n\tborder: 1px solid #ccc;\n\tfont-size:0;\n}\n\n.date-field.focus {\n\tborder: 1px solid #ccc;\n\tbox-shadow: 0 1px 10px 0 rgba(50, 50, 50, 0.75);\n}\n\ninput[type=text]{\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tfont-size: 16px;\n\theight: 32px;\n\tline-height: 32px;\n\tborder: none;\n\tpadding:0 36px 0 86px;\n\ttext-align: left;\n\twidth: 100%;\n\tmin-width: 222px;\n}\n\ninput:focus {\n\toutline: 0;\n\tfont-size: 16px;\n}\n\ninput:active,\ninput:hover {\n\toutline: 0;\n}\n\ninput[type=text].label-outside {\n\tpadding: 0;\n\ttext-align: center;\n}\n\nbutton {\n\tdisplay: inline-block;\n\tposition:absolute;\n\ttop:0;\n\tbox-sizing: border-box;\n\tborder: none;\n\tbackground: #efefef;\n\twidth:32px;\n\theight:32px;\n\tfill: #6a6a6a;\n\tcursor: pointer;\n}\n\nbutton:first-child{\n\tleft: 0;\n}\n\nbutton:last-child{\n\tright :0;\n}\n\nbutton:hover,\nbutton:focus {\n\tbackground: #f5f5f5;\n\tfill: #000;\n}\n\nbutton:focus {\n\toutline: var(--oebb-outline);\n\toutline-offset: var(--oebb-outline-offset);\n}\n\nbutton:focus:not(:focus-visible) {\n\toutline: none;\n}\n\nbutton:focus-visible {\n\toutline: var(--oebb-outline);\n\toutline-offset: var(--oebb-outline-offset);\n}\n\nbutton[disabled],\nbutton[disabled]:focus,\nbutton[disabled]:hover {\n\tbackground: #efefef;\n\tcursor: not-allowed;\n\tfill: #aaa;\n}\n\n.calendar-btn{\n\tposition: absolute;\n\ttop: 50%;\n\tright: 0;\n\ttransform: translateY(-50%);\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tbackground: transparent;\n\twidth: 35px;\n\tfill: #6a6a6a;\n\tcursor: pointer;\n\tborder:1px solid transparent;\n\tpadding: 0;\n}\n\n.calendar-btn:hover,\n.calendar-btn:focus {\n\toutline: 0;\n\tbackground: transparent;\n\tfill: #000;\n}\n\nlabel {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tbox-sizing: border-box;\n\theight: 32px;\n\tline-height: 30px;\n\tleft: 35px;\n\ttop:0;\n\tfont-size: 16px;\n\tcolor: #666;\n\tpadding-top:1px;\n}\n\nbutton{\n\tfont-size: 14px;\n}\n\n.error{\n\tfont-size:16px;\n}\n\n.error,\n.error * {\n\tcolor: #E2002A;\n}\n\n.error g {\n\tcolor: #ffffff;\n\tfill: #E2002A;\n}\n\n.error input[type=text] {\n\tborder-color: #E2002A;\n\tcolor: #E2002A;\n}\n\n.date-validation-error{\n\tposition: relative;\n\ttop:-30px;\n}\n\n.fm-label-danger {\n\tborder: 1px solid #bd352e;\n\tbackground: #f2d7d5;\n\tdisplay: inline-block;\n\tmargin-top: 6px;\n\tmargin-right: 6px;\n\tpadding: .3em .6em .3em .6em;\n\tfont-size: 12px;\n\tfont-weight: bold;\n\tline-height: 1;\n\tcolor: #bd352e;\n\ttext-align: center;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tborder-radius: 0;\n}\n","import { h, } from '@stencil/core';\nimport { addDaysToDate, closestAcrossShadow, findLocale, formatDate, formatIsoDate, i18n, isAustrianHoliday, parseDate } from '../../utils';\nimport { dateFieldI18n } from './date-field-i18n';\nexport class DateField {\n constructor() {\n this.daysValid = true;\n this.previousBtnDisabled = false;\n this.nextBtnDisabled = false;\n this.fieldIsValid = undefined;\n this.fieldIsDirty = undefined;\n this.fieldIsEmpty = undefined;\n this.name = undefined;\n this.mode = undefined;\n this.htmlId = undefined;\n this.htmlIdPrefix = 'oebb-date-field-';\n this.label = i18n.get('date', 'Datum');\n this.screenReaderLabel = false;\n this.startDateValue = undefined;\n this.startDate = undefined;\n this.required = true;\n this.valid = false;\n this.errorMessageId = undefined;\n this.addDays = undefined;\n this.disabledBefore = undefined;\n this.disabledAfter = undefined;\n this.disableSaturdays = false;\n this.novalidate = false;\n this.disableSundays = false;\n this.disableWeekends = false;\n this.disableHolidays = false;\n }\n //@Event() datefieldActive: EventEmitter;\n formDataChangedHandler() {\n //\tconsole.log('trigger formDataChanged');\n this.formDataChanged.emit({\n name: this.name,\n value: this.date,\n valid: this.fieldIsValid && (!this.required || !this.fieldIsEmpty),\n });\n if (this.date)\n this.setPreviousAndNextButtonState(this.date);\n }\n disabledBeforeChanged(disabledBefore) {\n if (this.mode === '2022') {\n this.calendarEl.disabledBefore = disabledBefore;\n }\n }\n disabledAfterChanged(disabledAfter) {\n if (this.mode === '2022') {\n this.calendarEl.disabledAfter = disabledAfter;\n }\n }\n disableSaturdaysChanged(newValue) {\n if (this.mode === '2022') {\n this.calendarEl.disableSaturdays = newValue;\n }\n if (newValue && this.date.getDay() == 6) {\n this.setNextActiveDate(1);\n this.dateChanged.emit(this.date);\n this.formDataChangedHandler();\n }\n }\n disableSundaysChanged(newValue) {\n if (this.mode === '2022') {\n this.calendarEl.disableSundays = newValue;\n }\n if (newValue && this.date.getDay() == 0) {\n this.setNextActiveDate(1);\n }\n }\n disableWeekendsChanged(newValue) {\n if (this.mode === '2022') {\n this.calendarEl.disableWeekends = newValue;\n }\n if (newValue && (this.date.getDay() == 6 || this.date.getDay() == 0)) {\n this.setNextActiveDate(1);\n this.dateChanged.emit(this.date);\n this.formDataChangedHandler();\n }\n }\n disableHolidaysChanged(newValue) {\n if (this.mode === '2022') {\n this.calendarEl.disableHolidays = newValue;\n }\n if (newValue && isAustrianHoliday(this.date)) {\n this.setNextActiveDate(1);\n this.dateChanged.emit(this.date);\n this.formDataChangedHandler();\n }\n }\n componentWillLoad() {\n this.lang = findLocale(this.el);\n this.htmlIdInternal = this.htmlId\n ? this.htmlId\n : this.htmlIdPrefix + Math.random().toString(36).substring(2, 6);\n this.hasLabelOutside = this.htmlId ? true : false;\n i18n.setLang(this.lang);\n i18n.add(dateFieldI18n);\n if (this.addDays && this.addDays > 0) {\n this.addDaysDate = new Date(Date.now() + 60000 * 60 * 24 * this.addDays);\n this.addDaysDate.setMinutes(0);\n this.addDaysDate.setHours(0);\n this.addDaysDate.setSeconds(0);\n this.addDaysDate.setMilliseconds(0);\n }\n if (this.startDateValue) {\n this.startDate = new Date(this.startDateValue);\n }\n if (this.startDate && isNaN(this.startDate.valueOf())) {\n this.startDate = null;\n }\n if (this.mode == '2021') {\n if (!this.startDate)\n this.startDate = new Date();\n }\n if (this.startDate) {\n this.date = this.startDate;\n }\n this.setPreviousAndNextButtonState(this.date);\n this.fieldIsValid = true;\n this.fieldIsEmpty = !this.date;\n const form = closestAcrossShadow(this.el, 'form');\n form === null || form === void 0 ? void 0 : form.addEventListener('formdata', e => {\n if (this.name && this.date && this.fieldIsValid) {\n return e.formData.append(this.name, formatIsoDate(this.date));\n }\n });\n }\n componentDidLoad() {\n this.dateFieldEl = this.el.shadowRoot.querySelector('.js-oebb-date-field');\n this.dateInput = this.el.shadowRoot.querySelector('input');\n if (this.mode === '2022') {\n this.calendarEl = document.createElement('oebbx-calendar');\n this.calendarEl.setAttribute('mode', this.mode);\n this.calendarEl.setAttribute('lang', this.lang);\n this.calendarEl.setAttribute('tabindex', '-1');\n this.calendarEl.setAttribute('aria-hidden', 'true');\n this.calendarEl.disabledBefore = this.disabledBefore;\n this.calendarEl.disabledAfter = this.disabledAfter;\n this.calendarEl.disableSaturdays = this.disableSaturdays;\n this.calendarEl.disableSundays = this.disableSundays;\n this.calendarEl.disableWeekends = this.disableWeekends;\n this.calendarEl.disableHolidays = this.disableHolidays;\n // noinspection JSIgnoredPromiseFromCall\n this.calendarEl.setDateInput(this.dateInput);\n // The @Listen annotation below won't work anymore since the calendar is somewhere else in the DOM\n this.calendarEl.addEventListener('dateChanged', (e) => this.dateChangedHandler(e));\n // Append at the end of the body\n document.body.append(this.calendarEl);\n }\n else {\n this.calendarEl = this.el.shadowRoot.querySelector('oebbx-calendar');\n }\n if (this.date) {\n this.dateInput.value = formatDate(this.date);\n this.calendarEl.setDate(this.date);\n }\n }\n componentWillUpdate() {\n if (this.required && this.fieldIsEmpty && this.startDate) {\n this.date = this.startDate;\n this.dateInput.value = formatDate(this.date);\n this.validate();\n }\n }\n disconnectedCallback() {\n var _a;\n if (this.mode === '2022') {\n (_a = this.calendarEl) === null || _a === void 0 ? void 0 : _a.remove();\n }\n }\n handleBodyClick(e) {\n if (!e.composedPath().includes(this.el)) {\n this.calendarEl.hide();\n }\n }\n handleFocusOut(event) {\n var _a;\n event.preventDefault();\n if (!((_a = this.calendarEl) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget))) {\n // The 2022 style calendar is located somewhere else in the DOM, we need to check if the focus moved there\n this.calendarEl.hide();\n }\n }\n datefieldActiveHandler(event) {\n event.stopPropagation();\n //console.log(\"datefieldActive\", event)\n if (!event.composedPath().includes(this.el)) {\n this.calendarEl.hide();\n }\n }\n dateChangedHandler(event) {\n if (this.addDays) {\n let myDate = event.detail;\n if (myDate.getTime() >= this.addDaysDate.getTime()) {\n this.daysValid = true;\n this.date = myDate;\n }\n else {\n this.daysValid = false;\n event.stopPropagation();\n }\n }\n this.date = event.detail;\n this.calendarEl.setDate(this.date);\n this.validate();\n this.setPreviousAndNextButtonState(event.detail);\n this.formDataChangedHandler();\n }\n async setDate(date) {\n this.date = date;\n this.dateInput.value = formatDate(this.date);\n this.calendarEl.setDate(this.date);\n this.fieldIsDirty = true;\n this.validate();\n this.formDataChangedHandler();\n }\n async getDate() {\n return Promise.resolve(this.date);\n }\n async getValue() {\n return Promise.resolve(this.dateInput.value);\n }\n async setFocus() {\n this.el.shadowRoot.querySelector('input').focus();\n }\n async onFieldInput() {\n this.date = parseDate(this.dateInput.value);\n }\n onFieldKeyDown(e) {\n switch (e.key) {\n case 'ArrowDown':\n this.calendarEl.focusCalendar();\n e.preventDefault();\n break;\n case 'Escape':\n this.calendarEl.hide();\n break;\n }\n }\n onFieldFocus(e) {\n e.stopPropagation();\n this.dateFieldEl.classList.add('focus');\n if (this.mode == '2021' || this.mode === '2022') {\n this.datefieldActive.emit(this.name);\n this.calendarEl.show();\n }\n }\n onFieldBlur() {\n this.dateFieldEl.classList.remove('focus');\n }\n onFieldChange() {\n this.date = parseDate(this.dateInput.value);\n if (this.date && this.date.toString() !== 'Invalid Date') {\n this.dateInput.value = formatDate(this.date);\n this.fieldIsDirty = true;\n this.validate();\n if (this.fieldIsValid) {\n if (this.disabledBefore &&\n this.date.setHours(0, 0, 0, 0) <\n this.disabledBefore.setHours(0, 0, 0, 0))\n this.setNextActiveDate(1);\n if (this.disabledAfter &&\n this.date.setHours(0, 0, 0, 0) >\n this.disabledAfter.setHours(0, 0, 0, 0))\n this.setNextActiveDate(-1);\n if (this.disableSaturdays && this.date.getDay() == 6)\n this.setNextActiveDate(1);\n if (this.disableSundays && this.date.getDay() == 0)\n this.setNextActiveDate(1);\n if (this.disableWeekends &&\n (this.date.getDay() == 6 || this.date.getDay() == 0))\n this.setNextActiveDate(1);\n if (this.disableHolidays && isAustrianHoliday(this.date))\n this.setNextActiveDate(1);\n this.dateChanged.emit(this.date);\n }\n else if (this.novalidate) {\n this.dateChanged.emit(this.date);\n }\n this.formDataChangedHandler();\n }\n else {\n this.fieldIsDirty = true;\n this.validate();\n this.formDataChangedHandler();\n }\n }\n onPreviousBtnClick(e) {\n e.stopPropagation(); // Stop bubbling to not trigger document click event which removes 'is-tabbing' class\n if (!this.date)\n this.date = new Date();\n this.setNextActiveDate(-1);\n this.dateInput.value = '';\n setTimeout(() => {\n this.dateInput.value = formatDate(this.date);\n }, 10); // Timeout for screen reader to read whole date\n this.dateChanged.emit(this.date);\n }\n onNextBtnClick(e) {\n e.stopPropagation(); // Stop bubbling to not trigger document click event which removes 'is-tabbing' class\n if (!this.date)\n this.date = new Date();\n this.setNextActiveDate(1);\n this.dateInput.value = '';\n setTimeout(() => {\n this.dateInput.value = formatDate(this.date);\n }, 10); // Timeout for screen reader to read whole date\n this.dateChanged.emit(this.date);\n this.formDataChangedHandler();\n }\n onPreviousBtnKeyDown(e) {\n if (e.shiftKey && e.keyCode === 9) {\n this.firstElementLostFocusBackwards.emit();\n }\n }\n onCalendarBtnClick(e) {\n e.stopPropagation();\n this.datefieldActive.emit(this.name);\n this.calendarEl.toggle();\n //this.datefieldActive.emit(this.name)\n }\n setNextActiveDate(days) {\n const step = Math.sign(days);\n days = Math.abs(days);\n while (days > 0) {\n this.date = addDaysToDate(step, this.date);\n if (this.disableWeekends && this.date.getDay() == 6)\n continue;\n if (this.disableWeekends && this.date.getDay() == 0)\n continue;\n if (this.disableSundays && this.date.getDay() == 0)\n continue;\n if (this.disableSaturdays && this.date.getDay() == 6)\n continue;\n if (this.disableHolidays && isAustrianHoliday(this.date))\n continue;\n days--;\n }\n }\n setPreviousAndNextButtonState(date) {\n if (this.disabledBefore &&\n date.setHours(0, 0, 0, 0) ==\n this.disabledBefore.setHours(0, 0, 0, 0)) {\n this.previousBtnDisabled = true;\n }\n else {\n this.previousBtnDisabled = false;\n }\n if (this.disabledAfter &&\n date.setHours(0, 0, 0, 0) == this.disabledAfter.setHours(0, 0, 0, 0)) {\n this.nextBtnDisabled = true;\n }\n else {\n this.nextBtnDisabled = false;\n }\n }\n /** Gibt den Validierungsstatus als Boolean zurück. */\n async isValid() {\n if (!this.fieldIsDirty) {\n await this.validate();\n this.fieldIsDirty = true;\n }\n return Promise.resolve(this.fieldIsValid && (!this.required || !this.fieldIsEmpty));\n }\n validate() {\n if (!this.date && this.dateInput.value.length > 0) {\n this.fieldIsValid = false;\n this.fieldIsEmpty = false;\n }\n else if (!this.date) {\n this.fieldIsValid = true;\n this.fieldIsEmpty = true;\n }\n else if (!this.date || this.date.toString() == 'Invalid Date') {\n this.fieldIsValid = false;\n this.fieldIsEmpty = false;\n }\n else {\n let validationStatus = true;\n if (validationStatus && this.disabledAfter) {\n if (this.disabledAfter.setHours(0, 0, 0, 0) < this.date.setHours(0, 0, 0, 0)) {\n //console.log(\"disabledAfter: \" + this.disabledAfter)\n //\tconsole.log(\"date: \" + this.date)\n validationStatus = false;\n }\n }\n if (validationStatus && this.disabledBefore) {\n if (this.disabledBefore.setHours(0, 0, 0, 0) > this.date.setHours(0, 0, 0, 0)) {\n //\tconsole.log(\"disabledBefore: \" + this.disabledAfter)\n //\t\tconsole.log(\"date: \" + this.date)\n validationStatus = false;\n }\n }\n this.fieldIsValid = validationStatus;\n this.fieldIsEmpty = false;\n }\n }\n renderValidationMessages() {\n if (this.novalidate)\n return;\n if (!this.fieldIsDirty) {\n return null;\n }\n if (this.required && this.fieldIsEmpty) {\n return (h(\"div\", { id: this.errorMessageId, class: \"oebb-date-field--invalid-message\" }, i18n.get('date-missing', 'Wählen Sie bitte ein Datum aus.')));\n }\n if (!this.fieldIsValid) {\n return (h(\"div\", { id: this.errorMessageId, class: \"oebb-date-field--invalid-message\" }, i18n.get('date-invalid', 'Das Datum ist ungültig.')));\n }\n return null;\n }\n onMouseLeave(e) {\n e.stopPropagation();\n //this.calendarEl.hide();\n }\n render() {\n if (this.mode && (this.mode == '2021' || this.mode === '2022')) {\n return [\n h(\"div\", { onMouseLeave: (e) => this.onMouseLeave(e), class: {\n 'oebb-date-field': true,\n 'js-oebb-date-field': true,\n error: !this.daysValid,\n 'oebb-date-field--invalid': (!this.fieldIsValid || (this.required && this.fieldIsEmpty)) && this.fieldIsDirty,\n } }, !this.hasLabelOutside && this.mode === '2021' ? (h(\"label\", { htmlFor: this.htmlIdInternal, id: this.htmlIdInternal + '-label', class: {\n 'screen-reader-text': this.screenReaderLabel,\n } }, this.label)) : (''), h(\"input\", { type: \"text\", id: this.htmlIdInternal, name: \"oebb-date-field-input\", autocomplete: \"off\", class: {\n 'oebb-date-field-input': true,\n }, onKeyDown: (e) => this.onFieldKeyDown(e), onInput: () => this.onFieldInput(), onChange: () => this.onFieldChange(), onFocus: (e) => this.onFieldFocus(e), onBlur: () => this.onFieldBlur(), placeholder: this.mode === '2022' ? this.label : '', \"aria-label\": `${this.label} ${i18n.get('date-format', 'Format TT.MM.JJJJ')}`, \"aria-live\": \"polite\", \"aria-required\": this.required + '' }), this.mode === '2022' ? (h(\"label\", { htmlFor: this.htmlIdInternal, id: this.htmlIdInternal + '-label', class: \"form-label-text\" }, this.label)) : null, h(\"button\", { tabindex: \"-1\", \"aria-hidden\": \"true\", onClick: (e) => this.onCalendarBtnClick(e) }, h(\"slot\", { name: \"icon\" }, h(\"oebbx-icon\", { name: \"calendar\" })), h(\"span\", { class: \"screen-reader-text\" }, i18n.get('open-calendar', 'Kalender öffnen'))), this.mode === '2021' ? h(\"oebbx-calendar\", { mode: this.mode, lang: this.lang, \"input-selector\": '#' + this.htmlIdInternal, tabindex: \"-1\", \"aria-hidden\": \"true\", disabledBefore: this.disabledBefore, disabledAfter: this.disabledAfter, disableSaturdays: this.disableSaturdays, disableSundays: this.disableSundays, disableWeekends: this.disableWeekends, disableHolidays: this.disableHolidays }) : null),\n this.renderValidationMessages()\n ];\n }\n return [\n h(\"div\", { class: {\n 'date-field': true,\n 'js-oebb-date-field': true,\n error: !this.daysValid,\n 'oebb-date-field--invalid': (!this.fieldIsValid || (this.required && this.fieldIsEmpty)) && this.fieldIsDirty,\n } }, h(\"button\", { type: \"button\", onClick: (e) => this.onPreviousBtnClick(e), onKeyDown: (e) => this.onPreviousBtnKeyDown(e), disabled: this.previousBtnDisabled }, h(\"span\", { class: \"screen-reader-text\" }, i18n.get('date-previous', 'Vorheriger Tag')), h(\"oebbx-icon\", { name: \"triangle\", svgStyle: { transform: 'rotate(180deg)' }, \"aria-hidden\": \"true\" })), !this.hasLabelOutside ? (h(\"label\", { htmlFor: this.htmlIdInternal, class: { 'screen-reader-text': this.screenReaderLabel } }, i18n.get('date', 'Datum'), \":\")) : (''), h(\"input\", { type: \"text\", name: \"date\", id: this.htmlIdInternal, value: \"\", onInput: () => this.onFieldInput(), onChange: () => this.onFieldChange(), onFocus: (e) => this.onFieldFocus(e), onBlur: () => this.onFieldBlur(), \"aria-label\": i18n.get('date-format', 'Datum Format TT.MM.JJJJ'), \"aria-live\": \"polite\", \"aria-required\": this.required + '', \"aria-invalid\": this.novalidate ? false : !this.valid + '', \"aria-describedby\": this.errorMessageId, class: { 'label-outside': this.hasLabelOutside } }), h(\"button\", { type: \"button\", onClick: (e) => this.onNextBtnClick(e), disabled: this.nextBtnDisabled }, h(\"span\", { class: \"screen-reader-text\" }, i18n.get('date-next', 'Nächster Tag')), h(\"oebbx-icon\", { name: \"triangle\", width: \"16\", height: \"16\", \"aria-hidden\": \"true\" }))),\n h(\"button\", { type: \"button\", class: \"calendar-btn\", onClick: (e) => this.onCalendarBtnClick(e), tabindex: \"-1\", \"aria-hidden\": \"true\" }, h(\"span\", { class: \"screen-reader-text\" }, i18n.get('open-calendar', 'Kalender öffnen')), h(\"oebbx-icon\", { name: \"calendar\", width: \"24\", height: \"24\", \"aria-hidden\": \"true\" })),\n h(\"oebbx-calendar\", { lang: this.lang, \"input-selector\": '#' + this.htmlIdInternal, \"aria-hidden\": \"true\", disabledBefore: this.disabledBefore, disabledAfter: this.disabledAfter, disableSaturdays: this.disableSaturdays, disableSundays: this.disableSundays, disableWeekends: this.disableWeekends, disableHolidays: this.disableHolidays }),\n !this.daysValid && this.addDaysDate ? (h(\"div\", null, h(\"span\", { class: \"fm-label-danger\" }, [\n i18n.get('date-valid-from-1', 'Das Datum ist erst ab ') +\n formatDate(this.addDaysDate) +\n i18n.get('date-valid-from-2', 'gültig.'),\n ]))) : (''),\n ];\n }\n static get is() { return \"oebbx-date-field\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"2021\": [\"date-field-2021.scss\"],\n \"2022\": [\"date-field-2022.scss\"],\n \"default\": [\"date-field.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"2021\": [\"date-field-2021.css\"],\n \"2022\": [\"date-field-2022.css\"],\n \"default\": [\"date-field.css\"]\n };\n }\n static get properties() {\n return {\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"name\",\n \"reflect\": false\n },\n \"mode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"mode\",\n \"reflect\": false\n },\n \"htmlId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"html-id\",\n \"reflect\": false\n },\n \"htmlIdPrefix\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"html-id-prefix\",\n \"reflect\": false,\n \"defaultValue\": \"'oebb-date-field-'\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"label\",\n \"reflect\": false,\n \"defaultValue\": \"i18n.get('date', 'Datum')\"\n },\n \"screenReaderLabel\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"screen-reader-label\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"startDateValue\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"start-date-value\",\n \"reflect\": false\n },\n \"startDate\": {\n \"type\": \"unknown\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"Date\",\n \"resolved\": \"Date\",\n \"references\": {\n \"Date\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n }\n },\n \"required\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"required\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"valid\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"valid\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"errorMessageId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"error-message-id\",\n \"reflect\": false\n },\n \"addDays\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"add-days\",\n \"reflect\": false\n },\n \"disabledBefore\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Date\",\n \"resolved\": \"Date\",\n \"references\": {\n \"Date\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n }\n },\n \"disabledAfter\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Date\",\n \"resolved\": \"Date\",\n \"references\": {\n \"Date\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n }\n },\n \"disableSaturdays\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-saturdays\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"novalidate\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"novalidate\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableSundays\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-sundays\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableWeekends\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-weekends\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableHolidays\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"attribute\": \"disable-holidays\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get states() {\n return {\n \"daysValid\": {},\n \"previousBtnDisabled\": {},\n \"nextBtnDisabled\": {},\n \"fieldIsValid\": {},\n \"fieldIsDirty\": {},\n \"fieldIsEmpty\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"datefieldActive\",\n \"name\": \"datefieldActive\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"formDataChanged\",\n \"name\": \"formDataChanged\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"firstElementLostFocusBackwards\",\n \"name\": \"firstElementLostFocusBackwards\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"dateChanged\",\n \"name\": \"dateChanged\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setDate\": {\n \"complexType\": {\n \"signature\": \"(date: Date) => Promise\",\n \"parameters\": [{\n \"tags\": [],\n \"text\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n },\n \"Date\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"getDate\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n },\n \"Date\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"getValue\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"onFieldInput\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": []\n }\n },\n \"isValid\": {\n \"complexType\": {\n \"signature\": \"() => Promise\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\"\n }\n },\n \"return\": \"Promise\"\n },\n \"docs\": {\n \"text\": \"Gibt den Validierungsstatus als Boolean zur\\u00FCck.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabledBefore\",\n \"methodName\": \"disabledBeforeChanged\"\n }, {\n \"propName\": \"disabledAfter\",\n \"methodName\": \"disabledAfterChanged\"\n }, {\n \"propName\": \"disableSaturdays\",\n \"methodName\": \"disableSaturdaysChanged\"\n }, {\n \"propName\": \"disableSundays\",\n \"methodName\": \"disableSundaysChanged\"\n }, {\n \"propName\": \"disableWeekends\",\n \"methodName\": \"disableWeekendsChanged\"\n }, {\n \"propName\": \"disableHolidays\",\n \"methodName\": \"disableHolidaysChanged\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"click\",\n \"method\": \"handleBodyClick\",\n \"target\": \"window\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"focusout\",\n \"method\": \"handleFocusOut\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"datefieldActive\",\n \"method\": \"datefieldActiveHandler\",\n \"target\": \"window\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"dateChanged\",\n \"method\": \"dateChangedHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=date-field.js.map\n"],"mappings":"oRAAO,MAAMA,EAAe,CAC1B,CACEC,IAAK,iBACLC,GAAI,mBACJC,GAAI,iBACJC,GAAI,kBACJC,GAAI,iBACJC,GAAI,gBAEN,CACEL,IAAK,aACLC,GAAI,iBACJC,GAAI,aACJC,GAAI,mBACJC,GAAI,eACJC,GAAI,kBAEN,CACEL,IAAK,iBACLC,GAAI,qBACJC,GAAI,iBACJC,GAAI,uBACJC,GAAI,uBACJC,GAAI,mBCvBR,MAAMC,EAAkB,msHCAxB,MAAMC,EAAkB,8gJCAxB,MAAMC,EAAqB,uiJ,MCKdC,EAAQ,MACnB,WAAAC,CAAAC,G,mDACEC,KAAKC,MAAQ,IAAIC,KACjBF,KAAKG,QAAU,MACfH,KAAKI,SAAW,GAChBJ,KAAKK,KAAO,IAAIH,KAChBF,KAAKM,YAAcC,UACnBP,KAAKQ,aAAeD,UACpBP,KAAKS,kBAAoBF,UACzBP,KAAKU,kBAAoBH,UACzBP,KAAKW,KAAOJ,UACZP,KAAKY,cAAgBL,UACrBP,KAAKa,eAAiBN,UACtBP,KAAKc,cAAgBP,UACrBP,KAAKe,iBAAmB,MACxBf,KAAKgB,eAAiB,MACtBhB,KAAKiB,gBAAkB,MACvBjB,KAAKkB,gBAAkB,K,CAEzB,iBAAAC,GACEnB,KAAKoB,KAAOC,EAAWrB,KAAKsB,IAC5BC,EAAKC,QAAQxB,KAAKoB,MAClBG,EAAKE,IAAItC,GACT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