@digitransit-component/digitransit-component-datetimepicker 0.7.5 → 0.7.7

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/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react"),require("moment-timezone"),require("lodash/debounce"),require("moment/locale/fi"),require("lodash/uniqueId"),require("i18next"),require("@digitransit-component/digitransit-component-icon"),require("react-select"),require("react-modal"),require("react-autosuggest")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","moment-timezone","lodash/debounce","moment/locale/fi","lodash/uniqueId","i18next","@digitransit-component/digitransit-component-icon","react-select","react-modal","react-autosuggest"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@digitransit-component/digitransit-component-datetimepicker"]={},e.PropTypes,e.React,e.moment,e.debounce,null,e.uniqueId,e.i18next,e.Icon,e.Select,e.ReactModal,e.Autosuggest)}(this,(function(e,t,n,i,a,l,o,r,s,d,u,c){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=_(t),m=_(n),f=_(i),y=_(a),b=_(o),g=_(r),h=_(s),x=_(d),v=_(u),w=_(c);var k={parseTypedTime:function(e){let t=e;return 3===t.length&&t.split("").every((e=>Number.isInteger(Number(e))))&&(t=Number(t.slice(0,2))<=23?`${t.slice(0,2)}:${t[2]}`:`${t[0]}:${t.slice(1)}`),t}};var E={"sr-only":"styles_sr-only__BrzYQ","dt-datetimepicker":"styles_dt-datetimepicker__PtoFG",hidden:"styles_hidden__6ySER","datetimepicker-open-container":"styles_datetimepicker-open-container__1dVr5","top-row-container":"styles_top-row-container__cXGjL",closed:"styles_closed__Fqe1r","time-icon":"styles_time-icon__ntgLZ","dropdown-icon":"styles_dropdown-icon__diYYB","close-icon":"styles_close-icon__-MzK5","label-open":"styles_label-open__Gmvov",textbutton:"styles_textbutton__T7wS2",active:"styles_active__4L82E","combobox-left":"styles_combobox-left__Sp4kh","combobox-right":"styles_combobox-right__Hg8kN","departure-or-arrival-container":"styles_departure-or-arrival-container__pJ-Iw","radio-textbutton-label":"styles_radio-textbutton-label__h-zfy","first-radio":"styles_first-radio__FWNoD","radio-textbutton":"styles_radio-textbutton__tsKET","departure-now-button":"styles_departure-now-button__VKMMK","open-button":"styles_open-button__c2B-6","close-button":"styles_close-button__2mfgI","right-edge":"styles_right-edge__29UYw","combobox-container":"styles_combobox-container__CLY9U","combobox-icon":"styles_combobox-icon__-0XPH","date-input-icon":"styles_date-input-icon__KMrj1","time-input-icon":"styles_time-input-icon__qkhC7","datetimepicker-select-container":"styles_datetimepicker-select-container__EVW1l","picker-container":"styles_picker-container__V02r4","combobox-mobile-container":"styles_combobox-mobile-container__u2DSO","mobile-modal-overlay":"styles_mobile-modal-overlay__8vF8L","mobile-modal-content":"styles_mobile-modal-content__fWRgy","top-row":"styles_top-row__h8xy1","modal-title":"styles_modal-title__EA3YD","tab-row":"styles_tab-row__orgwh","radio-tab-label":"styles_radio-tab-label__vIfup","input-row":"styles_input-row__2XXEY","input-container":"styles_input-container__USZlF","time-input-mobile":"styles_time-input-mobile__6e4A5","mobile-input-display":"styles_mobile-input-display__VUMd0","mobile-input-hidden":"styles_mobile-input-hidden__2KIuK",container:"styles_container__ihyhz",suggestion:"styles_suggestion__ZczJa",suggestionHighlighted:"styles_suggestionHighlighted__fzLiW",suggestionsContainerOpen:"styles_suggestionsContainerOpen__ISHXi",input:"styles_input__PAfbH","buttons-row":"styles_buttons-row__-3wsn","ready-button":"styles_ready-button__dH7Qc"};function C({value:e,onChange:t,getDisplay:i,timeChoices:a,validate:l,id:o,label:r,icon:s,disableTyping:d,timeZone:u}){f.default.tz.setDefault(u);const[c,_]=n.useState(i(e)),[p,y]=n.useState(!1);n.useEffect((()=>_(i(e))),[e]);const b=e=>{const n=Number(e);!Number.isNaN(n)&&f.default(n).isValid()&&f.default(n).valueOf()===n&&t(n)},g=a.map((e=>({value:e.toString(),label:i(e)}))),h=g.reduce(((t,n)=>Math.abs(e-t.value)<Math.abs(e-n.value)?t:n)),v=`${o}-input`,w=`${o}-label`;return m.default.createElement(m.default.Fragment,null,m.default.createElement("label",{className:E["combobox-container"],htmlFor:v},m.default.createElement("span",{className:E["sr-only"],id:w},r," ",c),s,m.default.createElement(x.default,{"aria-labelledby":w,ariaLiveMessages:{guidance:()=>".",onChange:()=>"",onFilter:()=>"",onFocus:({context:e,label:t})=>"menu"===e?t:""},options:g,inputId:v,onChange:t=>{if(p){const t=l(c,e);null!==t?(b(t),y(!1)):(_(i(e)),y(!1))}else b(t.value)},components:{IndicatorsContainer:()=>null},className:E["datetimepicker-select-container"],classNamePrefix:"datetimepicker-select",onInputChange:(e,{action:t})=>{if(!d&&"input-change"===t){const t=k.parseTypedTime(e);_(t),y(!0)}},inputValue:!d&&c,value:h,filterOption:()=>!0,controlShouldRenderValue:d,tabSelectsValue:!1,placeholder:"",onFocus:e=>{d||e.target.select()},onBlur:()=>{if(p){const t=l(c,e);null!==t?(b(t),y(!1)):(_(i(e)),y(!1))}},onKeyDown:e=>{["ArrowDown","ArrowUp"].includes(e.key)&&y(!1)},isSearchable:!d})))}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".styles_sr-only__BrzYQ:not(:focus):not(:active) {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n\n.styles_dt-datetimepicker__PtoFG {\n border: none;\n padding: 0;\n margin: 0;\n font-size: 15px;\n font-weight: var(--font-weight-medium); }\n .styles_dt-datetimepicker__PtoFG button, .styles_dt-datetimepicker__PtoFG label {\n font-size: 1em;\n font-weight: inherit; }\n .styles_dt-datetimepicker__PtoFG label button {\n cursor: pointer;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', 'Roboto', Arial, Georgia, Serif; }\n .styles_dt-datetimepicker__PtoFG .styles_hidden__6ySER {\n display: none; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-open-container__1dVr5 {\n background-color: #f4f4f5;\n border-radius: 5px;\n padding: 15px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL {\n display: flex;\n flex-wrap: wrap; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL.styles_closed__Fqe1r {\n margin: 11px 0 6px 18px; }\n @media screen and (max-width: 319px) {\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL {\n margin-left: 14px; } }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_time-icon__ntgLZ svg {\n width: 18px;\n height: 19px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_dropdown-icon__diYYB {\n margin-left: 9px;\n position: relative;\n top: 1px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_dropdown-icon__diYYB svg {\n width: 14px;\n height: 10px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_close-icon__-MzK5 svg {\n width: 12px;\n height: 12px;\n border-radius: 1px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_close-icon__-MzK5 svg path {\n stroke-width: 30; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL label {\n cursor: pointer; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL label.styles_label-open__Gmvov {\n align-items: flex-start;\n display: flex; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL button, .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL label {\n font-size: 1em;\n letter-spacing: -0.5px;\n line-height: 1; }\n .styles_dt-datetimepicker__PtoFG .styles_textbutton__T7wS2 {\n margin-left: 9px;\n margin-top: 1px;\n background: none;\n border: none;\n color: #666666;\n padding: 0; }\n @media screen and (min-width: 768px) {\n .styles_dt-datetimepicker__PtoFG .styles_textbutton__T7wS2 {\n margin-left: 14px; } }\n .styles_dt-datetimepicker__PtoFG .styles_textbutton__T7wS2.styles_active__4L82E {\n color: var(--color); }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-left__Sp4kh {\n position: relative;\n margin-right: 4px;\n width: 63%; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-right__Hg8kN {\n position: relative;\n margin-left: 4px;\n width: 37%; }\n .styles_dt-datetimepicker__PtoFG .styles_departure-or-arrival-container__pJ-Iw {\n height: calc(1rem + 20px);\n background-color: #dddddd;\n border-radius: 8px;\n display: flex;\n width: calc(5px + 13em); }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy {\n color: #333333;\n margin: 2px;\n background: none;\n border-radius: 6px;\n padding: 9px 0;\n width: 50%;\n cursor: pointer;\n height: calc(1rem + 16px);\n text-align: center;\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.03em; }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy.styles_active__4L82E {\n font-weight: 500;\n background: white; }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy:focus-within {\n /* First apply outline that is used in Edge and Firefox */\n outline: 1px dotted #212121;\n /* Then override outline for webkit browsers like Chrome, this has no effect on other browsers */\n outline: 5px auto -webkit-focus-ring-color;\n /* stylelint-disable-line declaration-block-no-duplicate-properties */ }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy.styles_first-radio__FWNoD {\n margin: 0;\n display: flex;\n align-items: flex-start; }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton__tsKET {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n .styles_dt-datetimepicker__PtoFG .styles_departure-now-button__VKMMK {\n font-family: inherit;\n letter-spacing: -0.02em;\n height: calc(1rem + 18px);\n color: var(--color);\n padding: 8px 0;\n width: 6.6875rem;\n background: white;\n border: 1px solid #888888;\n border-radius: 30px;\n margin-left: 11px; }\n .styles_dt-datetimepicker__PtoFG .styles_open-button__c2B-6 {\n display: flex;\n margin-bottom: 0;\n margin-top: -1px;\n padding: 2px 0 2px 0; }\n .styles_dt-datetimepicker__PtoFG button.styles_close-button__2mfgI {\n transition: transform 0.2s;\n position: relative;\n top: -8px;\n right: -8px;\n border: 0;\n font-weight: normal;\n background: none;\n color: var(--color);\n padding: 0;\n line-height: normal; }\n .styles_dt-datetimepicker__PtoFG button.styles_close-button__2mfgI:hover {\n transform: scale(1.2); }\n .styles_dt-datetimepicker__PtoFG .styles_right-edge__29UYw {\n margin-left: auto;\n margin-right: 0;\n position: relative;\n top: -2px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-container__CLY9U {\n cursor: pointer; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH {\n color: var(--color);\n height: 40px;\n position: absolute;\n z-index: 7;\n pointer-events: none; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_date-input-icon__KMrj1 {\n display: flex;\n align-items: center;\n padding: 0;\n margin-left: 14px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_date-input-icon__KMrj1 svg {\n width: 20px;\n height: 18px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_time-input-icon__qkhC7 {\n display: flex;\n align-items: center;\n padding: 0;\n margin-left: 8px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_time-input-icon__qkhC7 svg {\n margin-top: 1px;\n width: 22px;\n height: 22px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l {\n position: relative;\n height: 40px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__control {\n cursor: inherit;\n height: 40px;\n border: 1px solid #888888; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__value-container {\n padding: 0; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__single-value {\n margin: 0 0 0 47px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__input {\n background: inherit;\n position: relative;\n margin-left: 40px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__input input {\n opacity: 1 !important;\n background: inherit;\n box-shadow: none;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.33;\n letter-spacing: -0.5px;\n color: #333333;\n font-family: inherit;\n font-size: 15px;\n font-weight: var(--font-weight-medium); }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__input input:focus {\n box-shadow: none;\n outline: none;\n border: none; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu {\n z-index: 19;\n padding: 0;\n background: #fff;\n max-height: 250px;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: 1px rgba(0, 0, 0, 0.1) solid; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list {\n max-height: 250px;\n padding: 0; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list .datetimepicker-select__option {\n height: 50px;\n border-top: 1px solid #dddddd;\n padding: 13px 0 0 12px;\n letter-spacing: -0.6px;\n color: #333333; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list .datetimepicker-select__option--is-selected {\n background: inherit; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list .datetimepicker-select__option--is-focused {\n background: #dfe5e8; }\n .styles_dt-datetimepicker__PtoFG .styles_picker-container__V02r4 {\n margin: 14px 0 0 0;\n display: flex; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-mobile-container__u2DSO {\n flex-grow: 1; }\n\n.styles_mobile-modal-overlay__8vF8L {\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: rgba(0, 0, 0, 0.6);\n z-index: 1000; }\n\n.styles_mobile-modal-content__fWRgy {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', 'Roboto', Arial, Georgia, Serif;\n background: white;\n width: 89%;\n position: absolute;\n left: 5.5%;\n padding: 31px 20px 33px 20px;\n top: 80px;\n border-radius: 5px; }\n .styles_mobile-modal-content__fWRgy .styles_top-row__h8xy1 {\n display: flex;\n justify-content: space-between;\n margin-bottom: 21px; }\n .styles_mobile-modal-content__fWRgy .styles_top-row__h8xy1 .styles_modal-title__EA3YD {\n font-weight: var(--font-weight-medium);\n font-size: 20px;\n line-height: 18px;\n letter-spacing: -0.5px;\n color: #333333;\n padding: 6px 0 0 8px; }\n .styles_mobile-modal-content__fWRgy .styles_top-row__h8xy1 .styles_departure-now-button__VKMMK {\n background-color: white;\n font-family: inherit;\n padding: 5px 15px;\n border: 1px solid #888888;\n border-radius: 50px;\n font-weight: var(--font-weight-medium);\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.02em;\n color: var(--color); }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh {\n display: flex;\n border: 2px solid #dddddd;\n border-radius: 5px;\n margin-bottom: 16px;\n background-color: #dddddd; }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh .styles_radio-tab-label__vIfup {\n padding: 9px 0;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.5px;\n border-radius: 3px;\n font-weight: normal;\n width: 50%;\n text-align: center;\n color: #333333; }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh .styles_radio-tab-label__vIfup.styles_active__4L82E {\n font-weight: var(--font-weight-medium);\n background-color: #ffffff; }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh .styles_radio-textbutton__tsKET {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY {\n display: flex;\n margin-bottom: 25px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY label:first-child {\n flex-basis: 60%;\n margin-right: 10px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY label:nth-child(2) {\n flex-basis: 40%; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF {\n border: 1px solid #888888;\n border-radius: 5px;\n display: flex;\n align-items: center;\n height: 40px;\n line-height: 1.5;\n font-size: 100%; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF:focus-within {\n background: rgba(0, 122, 201, 0.06);\n border: 2px solid var(--color); }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_combobox-icon__-0XPH {\n height: 18px;\n font-size: 18px;\n padding: 0 0 0 10px;\n border: none;\n position: relative;\n top: 3px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_combobox-icon__-0XPH.styles_time-input-icon__qkhC7 > svg {\n height: 20px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_time-input-mobile__6e4A5 {\n font-family: inherit;\n box-shadow: none;\n font-size: 18px;\n letter-spacing: -0.5px;\n line-height: 20px;\n font-weight: var(--font-weight-medium);\n border: none;\n outline: none;\n background: none;\n width: 50px;\n margin-left: 10px;\n color: #333333;\n height: 1.5265rem; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-display__VUMd0 {\n position: relative;\n left: 10px;\n border: none;\n background: inherit;\n box-shadow: none;\n font-family: inherit;\n font-weight: var(--font-weight-medium);\n font-stretch: normal;\n font-style: normal;\n font-size: 16px;\n line-height: 1.33;\n letter-spacing: -0.5px;\n color: #333333; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-display__VUMd0:focus {\n outline: none;\n box-shadow: none;\n background: none; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-hidden__2KIuK {\n font-size: 16px;\n margin-bottom: 12px;\n height: 0px;\n width: 0;\n background: inherit;\n color: transparent;\n outline: none;\n box-shadow: none;\n border: none; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-hidden__2KIuK:focus {\n outline: none;\n box-shadow: none; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz {\n position: absolute;\n width: calc((100% - 50px) * 0.6);\n height: 25px;\n font-size: 15px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestion__ZczJa {\n list-style: none;\n font-size: 16px;\n font-style: normal;\n font-weight: normal;\n line-height: 49px;\n height: 50px;\n margin: 0;\n padding: 0 0 0 16px;\n color: rgba(0, 0, 0, 0.87);\n background: white; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestionHighlighted__fzLiW {\n background: #dfe5e8; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestionsContainerOpen__ISHXi {\n position: absolute;\n z-index: 19;\n max-height: 250px;\n overflow-x: hidden;\n overflow-y: scroll;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: 1px rgba(0, 0, 0, 0.1) solid;\n top: 42px;\n left: -2px;\n width: 100%;\n font-size: 16px;\n line-height: 1;\n color: rgba(0, 0, 0, 0.87); }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestionsContainerOpen__ISHXi ul {\n padding: 0;\n margin: 0; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_input__PAfbH {\n box-shadow: none;\n border: none;\n background: none;\n font-size: 16px;\n font-weight: var(--font-weight-medium);\n height: 25px;\n display: inline-block;\n font-family: inherit;\n line-height: 1.33;\n color: #333333;\n padding-left: 46px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_input__PAfbH:focus {\n outline: none;\n border: none;\n background: none; }\n .styles_mobile-modal-content__fWRgy .styles_buttons-row__-3wsn {\n display: flex;\n flex-direction: column;\n font-size: 16px;\n font-weight: var(--font-weight-medium); }\n .styles_mobile-modal-content__fWRgy .styles_buttons-row__-3wsn button {\n background-color: white;\n font-family: inherit;\n font-weight: var(--font-weight-medium);\n font-size: 16px;\n letter-spacing: -0.02em;\n width: 100%;\n border-radius: 50px;\n height: 40px;\n color: var(--color);\n border: 1px solid #888888; }\n .styles_mobile-modal-content__fWRgy .styles_buttons-row__-3wsn button.styles_ready-button__dH7Qc {\n color: white;\n background-color: var(--color);\n border: none;\n margin-bottom: 10px; }\n"),"production"!==process.env.NODE_ENV&&(C.propTypes={value:p.default.number.isRequired,onChange:p.default.func.isRequired,getDisplay:p.default.func.isRequired,timeChoices:p.default.arrayOf(p.default.number).isRequired,validate:p.default.func.isRequired,id:p.default.string.isRequired,label:p.default.node.isRequired,icon:p.default.node.isRequired,disableTyping:p.default.bool,timeZone:p.default.string}),C.defaultProps={disableTyping:!1,timeZone:"Europe/Helsinki"};const R={de:{today:"Heute",tomorrow:"Morgen","accessible-close":"Schließe die Auswahl","accessible-closed":"Auswahl geschlossen","accessible-open":"Öffne die Auswahl","accessible-opened":"Auswahl geöffnet","accessible-title":"Datum und Uhrzeitauswahl",arrival:"Ankunft",date:"Datum",departure:"Abfahrt","departure-now":"Abfahrt jetzt","choose-time":"Zeit wählen",ready:"Fertig",time:"Zeit",cancel:"Abbrechen"},en:{today:"Today",tomorrow:"Tomorrow","accessible-close":"Close the picker","accessible-closed":"Timepicker closed","accessible-open":"Open the picker","accessible-opened":"Timepicker opened","accessible-title":"Date and timepicker","accessible-update-instructions":"Changing time parameters will trigger a new search.",arrival:"Arrival",date:"Date",departure:"Departure","departure-now":"Leaving now",time:"Time","choose-time":"Choose time",ready:"Ready",cancel:"Cancel"},fi:{today:"Tänään",tomorrow:"Huomenna","accessible-close":"Sulje valitsin","accessible-closed":"Valitsin suljettu","accessible-open":"Avaa valitsin","accessible-opened":"Valitsin avattu","accessible-title":"Aika- ja päivämäärävalitsin","accessible-update-instructions":"Aikavalintojen muuttaminen laukaisee uuden haun.",arrival:"Perillä",date:"Päivä",departure:"Lähtöaika","departure-now":"Lähtö nyt",time:"Aika","choose-time":"Valitse aika",ready:"Valmis",cancel:"Peruuta"},sv:{today:"I dag",tomorrow:"I morgon","accessible-close":"Stäng väljaren","accessible-closed":"Väljaren stängde","accessible-open":"Öppna väljaren","accessible-opened":"Väljaren öppnade","accessible-title":"Tid- och datumväljaren","accessible-update-instructions":"Om du ändrar tiderna, startas en ny sökning automatiskt.",arrival:"Anländer",date:"Datum",departure:"Avgångstid","departure-now":"Avgår nu",time:"Tid","choose-time":"Välj tid",ready:"Färdig",cancel:"Avbryt"}};const F=["ref"];function N({value:e,getDisplay:t,onChange:i,itemCount:a,startTime:l,id:o,label:r,icon:s,timeZone:d}){f.default.tz.setDefault(d);const[u,c]=n.useState(!1),_=n.useRef(null),p=Array(a).fill().map(((e,t)=>f.default(l).add(t,"day").valueOf())),y=p.map((t=>e-t)).findIndex((e=>e<6e4));n.useLayoutEffect((()=>{u&&_.current&&(_.current.scrollTop=50*y)}),[e,u]);const b=!(navigator.userAgent.toLowerCase().indexOf("android")>-1),g=`${o}-input`,h=`${o}-label`;return m.default.createElement(m.default.Fragment,null,m.default.createElement("label",{className:E["input-container"],htmlFor:g},m.default.createElement("span",null,s),m.default.createElement("span",{className:E["sr-only"],id:h},r),b?m.default.createElement(m.default.Fragment,null,m.default.createElement("select",{className:E["mobile-input-display"],onChange:e=>i(Number(e.target.value)),value:e},p.map((e=>m.default.createElement("option",{key:e,value:e},t(e)))))):m.default.createElement(w.default,{id:o,suggestions:p,getSuggestionValue:e=>e.toString(),renderSuggestion:e=>t(e),onSuggestionsFetchRequested:()=>null,shouldRenderSuggestions:()=>!0,inputProps:{value:t(e),onChange:(e,{newValue:t})=>{i(Number(t))},onFocus:()=>{c(!0)},onBlur:()=>{c(!1)},"aria-labelledby":h,"aria-autocomplete":"none",readOnly:!0},focusInputOnSuggestionClick:!1,onSuggestionsClearRequested:()=>null,renderSuggestionsContainer:({containerProps:e,children:t})=>{const{ref:n}=e,i=function(e,t){if(null==e)return{};var n,i,a={},l=Object.keys(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,F);return m.default.createElement("div",Object.assign({tabIndex:"-1"},i,{ref:e=>{e&&(_.current=e,n(e))}}),t)},theme:E})))}function P({value:e,getDisplay:t,onChange:i,id:a,label:l,icon:o,timeZone:r,validate:s}){const[d,u]=n.useState(t(e));f.default.tz.setDefault(r);const c=`${a}-input`,_=`${a}-label`,p=n.useRef(null);return n.useLayoutEffect((()=>{p.current&&p.current.focus()}),[]),m.default.createElement(m.default.Fragment,null,m.default.createElement("label",{className:E["input-container"],htmlFor:c},m.default.createElement("span",null,o),m.default.createElement("span",{className:E["sr-only"],id:_},l),m.default.createElement("input",{id:c,inputMode:"numeric",type:"text",maxLength:"6",className:E["time-input-mobile"],value:d,onFocus:e=>{e.target.setSelectionRange(0,0)},onChange:t=>{let n=t.target.value;if(n.match(/[0-9]{3}:[0-9]{2}/)&&n.slice(1)===d&&(n=n.charAt(0)),n.length>5)return;const a=k.parseTypedTime(n);u(a);const l=s(a,e);l&&i(l)},ref:p})))}function S({departureOrArrival:e,onNowClick:t,lang:i,color:a,timeZone:l,onSubmit:o,onCancel:r,timestamp:s,getTimeDisplay:d,dateSelectItemCount:u,getDateDisplay:c,validateTime:_,fontWeights:p}){f.default.tz.setDefault(l);const y={lng:i},[x,w]=n.useState(s),[k,C]=n.useState(e);const[R]=n.useState(b.default("datetimepicker-")),F=f.default().startOf("day").hour(f.default(x).hour()).minute(f.default(x).minute()).valueOf();return m.default.createElement(v.default,{appElement:document?document.querySelector("#app"):void 0,isOpen:!0,className:E["mobile-modal-content"],overlayClassName:E["mobile-modal-overlay"]},m.default.createElement("div",{style:{"--color":`${a}`,"--font-weight-medium":p.medium}},m.default.createElement("div",{className:E["top-row"]},m.default.createElement("h3",{className:E["modal-title"]},g.default.t("choose-time",y)),m.default.createElement("button",{type:"button",className:E["departure-now-button"],onClick:t},g.default.t("departure-now",y))),m.default.createElement("div",{className:E["tab-row"]},m.default.createElement("label",{htmlFor:`${R}-modal-departure`,className:`${E["radio-tab-label"]}\n ${E["departure"===k?"active":void 0]}`},g.default.t("departure",y),m.default.createElement("input",{id:`${R}-modal-departure`,name:"departureOrArrival",type:"radio",value:"departure",className:E["radio-textbutton"],onChange:()=>{C("departure")},checked:"departure"===k})),m.default.createElement("label",{htmlFor:`${R}-modal-arrival`,className:`${E["radio-tab-label"]}\n ${E["arrival"===k?"active":void 0]}`},g.default.t("arrival",y),m.default.createElement("input",{id:`${R}-modal-arrival`,name:"departureOrArrival",type:"radio",value:"arrival",className:E["radio-textbutton"],onChange:()=>{C("arrival")},checked:"arrival"===k}))),m.default.createElement("div",{className:E["input-row"]},m.default.createElement(N,{value:x,getDisplay:c,onChange:function(e){w(e)},itemCount:u,startTime:F,id:`${R}-date`,label:g.default.t("date",y),icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["date-input-icon"]}`},m.default.createElement(h.default,{img:"calendar",color:a})),timeZone:l}),m.default.createElement(P,{value:x,getDisplay:d,onChange:function(e){w(e)},id:`${R}-time`,label:g.default.t("time",y),icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["time-input-icon"]}`},m.default.createElement(h.default,{img:"time",color:a})),timeZone:l,validate:_})),m.default.createElement("div",{className:E["buttons-row"]},m.default.createElement("button",{type:"button",className:E["ready-button"],onClick:()=>o(x,k)},g.default.t("ready",y)),m.default.createElement("button",{type:"button",className:E["cancel-button"],onClick:r},g.default.t("cancel",y)))))}function G({timestamp:e,onTimeChange:t,onDateChange:i,departureOrArrival:a,onNowClick:l,onDepartureClick:o,onArrivalClick:r,embedWhenClosed:s,embedWhenOpen:d,lang:u,color:c,timeZone:_,onModalSubmit:p,fontWeights:y,serviceTimeRange:x,onOpen:v,onClose:w,openPicker:k}){f.default.tz.setDefault(_);const[F,N]=n.useState(k||!1),[P,G]=n.useState(e||f.default().valueOf()),[O,q]=n.useState(null),[W]=n.useState(b.default("datetimepicker-")),[T]=n.useState(function(){const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)}()&&function(){if("undefined"==typeof window||null===window)return!1;const e=document.createElement("input");return e.type="date","date"===e.type&&(e.type="time","time"===e.type)}()),X=n.useRef(),$=n.useRef(),A=n.useRef(),D={lng:u};n.useEffect((()=>{Object.keys(R).forEach((e=>g.default.addResourceBundle(e,"translation",R[u])))}),[]),n.useEffect((()=>{f.default.locale(u)}),[u]);const z=null===e;n.useEffect((()=>{z?G(f.default().valueOf()):(O&&(clearInterval(O),q(null)),G(e))}),[e]),n.useEffect((()=>{if(!z)return;O&&clearInterval(O);const e=setInterval((()=>{const t=f.default().valueOf();f.default(P).isSame(t,"minute")||(clearInterval(e),q(null),G(t))}),5e3);return q(e),()=>clearInterval(e)}),[P]);const Z=n.useRef();n.useEffect((()=>{Z.current=F}));const V=e=>{const t=f.default(e);let n;return n=t.isSame(f.default(),"day")?g.default.t("today",D):t.isSame(f.default().add(1,"day"),"day")?g.default.t("tomorrow",D):t.format("dd D.M."),n=`${n.charAt(0).toUpperCase()}${n.slice(1)}`,n},L=e=>f.default(e).format("HH:mm"),M=(e,t)=>{const n=e.trim();if(null!==n.match(/^[0-9]{1,2}(\.|:)[0-9]{2}$/)){const e=n.includes(".")?".":":",i=n.split(e),a=Number(i[0]),l=!Number.isNaN(a)&&a>=0&&a<=23,o=Number(i[1]);if(!(!Number.isNaN(o)&&o>=0&&o<=59)||!l)return null;return f.default(t).hours(a).minutes(o).valueOf()}return null},I=f.default(P),j=f.default(P).startOf("day").valueOf();let H=[];const Y=f.default(j);for(;Y.isSame(j,"day");)H.push(Y.valueOf()),Y.add(15,"minutes");if(null===e){const e=3e5,t=Math.ceil(P/e)*e,n=Array(7).fill().map(((n,i)=>t+i*e)),i=H.map((e=>P-e)).findIndex((e=>e<=0));H.splice(i,0,...n),H=Array.from(new Set(H))}const U=f.default().startOf("day").hour(I.hour()).minute(I.minute()).valueOf(),K=Array(x).fill().map(((e,t)=>f.default(U).add(t,"day").valueOf()));function B(){A.current&&(A.current.innerHTML=g.default.t("accessible-closed",D),setTimeout((()=>{A.current.innerHTML=null}),100))}return m.default.createElement("fieldset",{className:E["dt-datetimepicker"],id:`${W}-root`,style:{"--color":`${c}`,"--font-weight-medium":y.medium}},m.default.createElement("legend",{className:E["sr-only"]},g.default.t("accessible-title",D)),m.default.createElement("span",{className:E["sr-only"]},g.default.t("accessible-update-instructions",D)),m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:F?`${E.hidden} datetimepicker-top-row`:`${E["top-row-container"]} ${E.closed} datetimepicker-top-row`},m.default.createElement("label",{className:E["label-open"],htmlFor:`${W}-open`},m.default.createElement("span",{className:E["time-icon"]},m.default.createElement(h.default,{img:"time",color:c})),m.default.createElement("span",{className:E["sr-only"]},g.default.t("accessible-open",D)),m.default.createElement("span",{role:"alert",className:E["sr-only"],ref:A}),m.default.createElement("button",{id:`${W}-open`,type:"button",className:`${E.textbutton} ${E.active} ${E["open-button"]}`,"aria-controls":`${W}-root`,"aria-expanded":"false",onClick:()=>{N(!0),A.current&&(A.current.innerHTML=g.default.t("accessible-opened",D),setTimeout((()=>{A.current.innerHTML=null}),100)),v&&v()},ref:X},m.default.createElement("span",null,z&&"departure"===a?g.default.t("departure-now",D):m.default.createElement(m.default.Fragment,null,g.default.t("departure"===a?"departure":"arrival",D),` ${f.default().isSame(f.default(P),"day")?"":V(P).toLowerCase()} ${L(P)}`)),m.default.createElement("span",{className:E["dropdown-icon"]},m.default.createElement(h.default,{img:"arrow-dropdown",color:c})))),m.default.createElement("span",{className:E["right-edge"]},s)),m.default.createElement("div",null)),T?F&&m.default.createElement(S,{departureOrArrival:a,onNowClick:()=>{N(!1),B(),l()},lang:u,color:c,onSubmit:(e,t)=>{p(e,t),N(!1),B()},onCancel:()=>{N(!1),B(),w&&w()},getTimeDisplay:L,timeZone:_,timestamp:P,getDateDisplay:V,dateSelectItemCount:x,getDisplay:L,validateTime:M,fontWeights:y}):m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:`${E["datetimepicker-open-container"]} ${F?"":E.hidden}`},m.default.createElement("div",{className:F?`${E["top-row-container"]} datetimepicker-top-row`:`${E.hidden} datetimepicker-top-row`}," ",m.default.createElement("span",{role:"alert",className:E["sr-only"],ref:A}),m.default.createElement("span",null),m.default.createElement("span",{className:E["departure-or-arrival-container"]},m.default.createElement("label",{htmlFor:`${W}-departure`,className:`${E["radio-textbutton-label"]}\n ${E["departure"===a?"active":void 0]}`},g.default.t("departure",D),m.default.createElement("input",{id:`${W}-departure`,name:"departureOrArrival",type:"radio",value:"departure",className:E["radio-textbutton"],onChange:()=>{o()},checked:"departure"===a})),m.default.createElement("label",{htmlFor:`${W}-arrival`,className:`${E["radio-textbutton-label"]}\n ${E["arrival"===a?"active":void 0]}`},g.default.t("arrival",D),m.default.createElement("input",{id:`${W}-arrival`,name:"departureOrArrival",type:"radio",value:"arrival",className:E["radio-textbutton"],onChange:()=>{r()},checked:"arrival"===a}))),m.default.createElement("button",{id:`${W}-now`,type:"button",className:E["departure-now-button"],onClick:()=>{N(!1),B(),w&&w(),l()},ref:$},g.default.t("departure-now",D)),m.default.createElement("span",{className:E["right-edge"]},m.default.createElement("button",{type:"button",className:E["close-button"],"aria-controls":`${W}-root`,"aria-expanded":"true",onClick:()=>{N(!1),B(),w&&w()}},m.default.createElement("span",{className:E["close-icon"]},m.default.createElement(h.default,{img:"close",color:c})),m.default.createElement("span",{className:E["sr-only"]},g.default.t("accessible-close",D))))),m.default.createElement("div",{className:F?`${E["picker-container"]}`:`${E.hidden} datetimepicker-top-row`},m.default.createElement(m.default.Fragment,null,m.default.createElement("span",{className:E["combobox-left"]},m.default.createElement(C,{value:P,onChange:e=>{i(e)},getDisplay:V,timeChoices:K,validate:()=>null,icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["date-input-icon"]}`},m.default.createElement(h.default,{img:"calendar",color:c})),id:`${W}-date`,label:g.default.t("date",D),disableTyping:!0,timeZone:_})),m.default.createElement("span",{className:E["combobox-right"]},m.default.createElement(C,{value:P,onChange:e=>{t(e)},getDisplay:L,timeChoices:H,validate:M,icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["time-input-icon"]}`},m.default.createElement(h.default,{img:"time",color:c})),id:`${W}-time`,label:g.default.t("time",D),timeZone:_}))))),m.default.createElement("span",{className:F?"":E.hidden},d),m.default.createElement("div",{className:F?"datetimepicker-bottom-row-open":""})))}function O({realtime:e,initialArriveBy:t,initialTimestamp:i,onDepartureClick:a,onArrivalClick:l,onTimeChange:o,onDateChange:r,onNowClick:s,embedWhenClosed:d,embedWhenOpen:u,lang:c,color:_,timeZone:p,fontWeights:b,serviceTimeRange:g,onOpen:h,onClose:x,openPicker:v}){f.default.locale(c),f.default.tz.setDefault(p);const w=e?null:f.default().valueOf(),[k,E]=n.useState(i?1e3*i:w),[C,R]=n.useState(!0===t?"arrival":"departure");n.useEffect((()=>{const e=null===k&&void 0===i,n=null===k||void 0===i,a=Math.round(k/1e3)===i;!e&&(n||!a)&&E(void 0===i?null:1e3*i),!t==("arrival"===C)&&R(!0===t?"arrival":"departure")}),[i,t]);const F=y.default((e=>{if(null===e)return E(f.default().valueOf()),void o(Math.round(f.default().valueOf()/1e3),"arrival"===C);E(e),o(Math.round(e/1e3),"arrival"===C)}),10),N=y.default((e=>{if(null===e)return E(f.default().valueOf()),void r(Math.round(f.default().valueOf()/1e3),"arrival"===C);E(e),r(Math.round(e/1e3),"arrival"===C)}),10);return m.default.createElement(G,{timestamp:k,onTimeChange:F,onDateChange:N,departureOrArrival:C,onNowClick:()=>{R("departure");const t=e?null:f.default().valueOf();E(t),s(Math.round(t/1e3))},onDepartureClick:()=>{let e=!1,t=k;if(null===k){const n=f.default().valueOf();E(n),t=n,e=!0}"departure"!==C&&(R("departure"),e=!0),e&&a(Math.round(t/1e3))},onArrivalClick:()=>{let e=!1,t=k;if(null===k){const n=f.default().valueOf();E(n),t=n,e=!0}"arrival"!==C&&(R("arrival"),e=!0),e&&l(Math.round(t/1e3))},embedWhenClosed:d,embedWhenOpen:u,lang:c,color:_,timeZone:p,onModalSubmit:(e,t)=>{E(e),R(t),o(e/1e3,"arrival"===t,!0)},fontWeights:b,serviceTimeRange:g,onOpen:h,onClose:x,openPicker:v})}"production"!==process.env.NODE_ENV&&(N.propTypes={value:p.default.number.isRequired,getDisplay:p.default.func.isRequired,onChange:p.default.func.isRequired,itemCount:p.default.number.isRequired,startTime:p.default.number.isRequired,id:p.default.string.isRequired,label:p.default.string.isRequired,icon:p.default.node,dateTimeCombined:p.default.bool,timeZone:p.default.string}),N.defaultProps={icon:null,dateTimeCombined:!1,timeZone:"Europe/Helsinki"},"production"!==process.env.NODE_ENV&&(P.propTypes={value:p.default.number.isRequired,getDisplay:p.default.func.isRequired,onChange:p.default.func.isRequired,id:p.default.string.isRequired,label:p.default.string.isRequired,icon:p.default.node,timeZone:p.default.string,validate:p.default.func.isRequired}),P.defaultProps={icon:null,timeZone:"Europe/Helsinki"},f.default.locale("en"),g.default.init({lng:"en",resources:{}}),Object.keys(R).forEach((e=>g.default.addResourceBundle(e,"translation",R[e]))),"production"!==process.env.NODE_ENV&&(S.propTypes={timeZone:p.default.string,departureOrArrival:p.default.oneOf(["departure","arrival"]).isRequired,onNowClick:p.default.func.isRequired,lang:p.default.string.isRequired,color:p.default.string,onSubmit:p.default.func.isRequired,onCancel:p.default.func.isRequired,timestamp:p.default.number.isRequired,getTimeDisplay:p.default.func.isRequired,dateSelectItemCount:p.default.number.isRequired,getDateDisplay:p.default.func.isRequired,validateTime:p.default.func.isRequired,fontWeights:p.default.shape({medium:p.default.number.isRequired}).isRequired}),S.defaultProps={color:"#007ac9",timeZone:"Europe/Helsinki"},f.default.locale("en"),g.default.init({lng:"fi",fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}}),"production"!==process.env.NODE_ENV&&(G.propTypes={timestamp:p.default.number,timeZone:p.default.string,onTimeChange:p.default.func.isRequired,onDateChange:p.default.func.isRequired,departureOrArrival:p.default.oneOf(["departure","arrival"]).isRequired,onNowClick:p.default.func.isRequired,onDepartureClick:p.default.func.isRequired,onArrivalClick:p.default.func.isRequired,embedWhenClosed:p.default.node,embedWhenOpen:p.default.node,lang:p.default.string.isRequired,color:p.default.string,onModalSubmit:p.default.func.isRequired,fontWeights:p.default.shape({medium:p.default.number.isRequired}).isRequired,serviceTimeRange:p.default.number,onOpen:p.default.func,onClose:p.default.func,openPicker:p.default.bool}),G.defaultProps={timestamp:null,embedWhenClosed:null,embedWhenOpen:null,color:"#007ac9",timeZone:"Europe/Helsinki",serviceTimeRange:30,onOpen:null,onClose:null,openPicker:void 0},"production"!==process.env.NODE_ENV&&(O.propTypes={realtime:p.default.bool,initialTimestamp:p.default.number,initialArriveBy:p.default.bool,onDepartureClick:p.default.func.isRequired,onArrivalClick:p.default.func.isRequired,onTimeChange:p.default.func.isRequired,onDateChange:p.default.func.isRequired,onNowClick:p.default.func.isRequired,embedWhenClosed:p.default.node,embedWhenOpen:p.default.node,lang:p.default.string,color:p.default.string,timeZone:p.default.string,fontWeights:p.default.shape({medium:p.default.number}),serviceTimeRange:p.default.number,onOpen:p.default.func,onClose:p.default.func,openPicker:p.default.bool}),O.defaultProps={realtime:!1,initialArriveBy:void 0,initialTimestamp:void 0,embedWhenClosed:null,embedWhenOpen:null,lang:"en",color:"#007ac9",timeZone:"Europe/Helsinki",fontWeights:{medium:500},onOpen:null,onClose:null,openPicker:void 0},e.default=O,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react"),require("moment-timezone"),require("lodash/debounce"),require("moment/locale/fi"),require("lodash/uniqueId"),require("i18next"),require("@digitransit-component/digitransit-component-icon"),require("react-select"),require("react-modal"),require("react-autosuggest")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","moment-timezone","lodash/debounce","moment/locale/fi","lodash/uniqueId","i18next","@digitransit-component/digitransit-component-icon","react-select","react-modal","react-autosuggest"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@digitransit-component/digitransit-component-datetimepicker"]={},e.PropTypes,e.React,e.moment,e.debounce,null,e.uniqueId,e.i18next,e.Icon,e.Select,e.ReactModal,e.Autosuggest)}(this,(function(e,t,n,i,a,l,o,r,s,d,c,u){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=_(t),m=_(n),f=_(i),y=_(a),b=_(o),g=_(r),h=_(s),x=_(d),v=_(c),w=_(u);var k={parseTypedTime:function(e){let t=e;return 3===t.length&&t.split("").every((e=>Number.isInteger(Number(e))))&&(t=Number(t.slice(0,2))<=23?`${t.slice(0,2)}:${t[2]}`:`${t[0]}:${t.slice(1)}`),t}};var E={"sr-only":"styles_sr-only__BrzYQ","dt-datetimepicker":"styles_dt-datetimepicker__PtoFG",hidden:"styles_hidden__6ySER","datetimepicker-open-container":"styles_datetimepicker-open-container__1dVr5","top-row-container":"styles_top-row-container__cXGjL",closed:"styles_closed__Fqe1r","time-icon":"styles_time-icon__ntgLZ","dropdown-icon":"styles_dropdown-icon__diYYB","close-icon":"styles_close-icon__-MzK5","label-open":"styles_label-open__Gmvov",textbutton:"styles_textbutton__T7wS2",active:"styles_active__4L82E","combobox-left":"styles_combobox-left__Sp4kh","combobox-right":"styles_combobox-right__Hg8kN","departure-or-arrival-container":"styles_departure-or-arrival-container__pJ-Iw","radio-textbutton-label":"styles_radio-textbutton-label__h-zfy","first-radio":"styles_first-radio__FWNoD","radio-textbutton":"styles_radio-textbutton__tsKET","departure-now-button":"styles_departure-now-button__VKMMK","open-button":"styles_open-button__c2B-6","close-button":"styles_close-button__2mfgI","right-edge":"styles_right-edge__29UYw","combobox-container":"styles_combobox-container__CLY9U","combobox-icon":"styles_combobox-icon__-0XPH","date-input-icon":"styles_date-input-icon__KMrj1","time-input-icon":"styles_time-input-icon__qkhC7","datetimepicker-select-container":"styles_datetimepicker-select-container__EVW1l","picker-container":"styles_picker-container__V02r4","combobox-mobile-container":"styles_combobox-mobile-container__u2DSO","mobile-modal-overlay":"styles_mobile-modal-overlay__8vF8L","mobile-modal-content":"styles_mobile-modal-content__fWRgy","top-row":"styles_top-row__h8xy1","modal-title":"styles_modal-title__EA3YD","tab-row":"styles_tab-row__orgwh","radio-tab-label":"styles_radio-tab-label__vIfup","input-row":"styles_input-row__2XXEY","input-container":"styles_input-container__USZlF","time-input-mobile":"styles_time-input-mobile__6e4A5","mobile-input-display":"styles_mobile-input-display__VUMd0","mobile-input-hidden":"styles_mobile-input-hidden__2KIuK",container:"styles_container__ihyhz",suggestion:"styles_suggestion__ZczJa",suggestionHighlighted:"styles_suggestionHighlighted__fzLiW",suggestionsContainerOpen:"styles_suggestionsContainerOpen__ISHXi",input:"styles_input__PAfbH","buttons-row":"styles_buttons-row__-3wsn","ready-button":"styles_ready-button__dH7Qc"};function C({value:e,onChange:t,getDisplay:i,timeChoices:a,validate:l,id:o,label:r,icon:s,disableTyping:d,timeZone:c,datePicker:u}){f.default.tz.setDefault(c);const[_,p]=n.useState(i(e)),[y,b]=n.useState(!1);n.useEffect((()=>p(i(e))),[e]);const g=e=>{const n=Number(e);!Number.isNaN(n)&&f.default(n).isValid()&&f.default(n).valueOf()===n&&t(n)};const h=a.map((e=>({value:e.toString(),label:i(e)}))),v=h.reduce(((t,n)=>Math.abs(e-t.value)<Math.abs(e-n.value)?t:n)),w=`${o}-input`,C=`${o}-label`;return m.default.createElement(m.default.Fragment,null,m.default.createElement("label",{className:E["combobox-container"],htmlFor:w},m.default.createElement("span",{className:E["sr-only"],id:C},r," ",_),s,m.default.createElement(x.default,{"aria-labelledby":C,ariaLiveMessages:{guidance:()=>".",onChange:()=>"",onFilter:()=>"",onFocus:({context:e,label:t})=>"menu"===e?t:""},options:h,inputId:w,onChange:t=>{if(y){const t=l(_,e);null!==t?(g(t),b(!1)):(p(i(e)),b(!1))}else g(t.value)},components:{IndicatorsContainer:()=>null},className:E["datetimepicker-select-container"],classNamePrefix:"datetimepicker-select",onInputChange:(e,{action:t})=>{var n;if(!d&&(!/[a-zA-Z§ÄäÖö\s]/g.test(n=e)&&(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(n)||n.length<5))&&"input-change"===t){const t=k.parseTypedTime(e);p(t),b(!0)}},inputValue:!d&&_,value:v,filterOption:(e,t)=>!!u||(t.length<1||t.length>5||((e,t)=>{const n=t.length<=2?t:t.split(":")[0],i=/^([0-1]?[0-9]|2[0-3])$/.test(n),a=1===n.length?"0".concat(t):t;return!i||e.label.split(":")[0]===a.split(":")[0]})(e,t)),controlShouldRenderValue:d,tabSelectsValue:!1,placeholder:"",onFocus:e=>{d||e.target.select()},onBlur:()=>{if(y){const t=l(_,e);null!==t?(g(t),b(!1)):(p(i(e)),b(!1))}},onKeyDown:e=>{["ArrowDown","ArrowUp"].includes(e.key)&&b(!1)},isSearchable:!d})))}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".styles_sr-only__BrzYQ:not(:focus):not(:active) {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n\n.styles_dt-datetimepicker__PtoFG {\n border: none;\n padding: 0;\n margin: 0;\n font-size: 15px;\n font-weight: var(--font-weight-medium); }\n .styles_dt-datetimepicker__PtoFG button, .styles_dt-datetimepicker__PtoFG label {\n font-size: 1em;\n font-weight: inherit; }\n .styles_dt-datetimepicker__PtoFG label button {\n cursor: pointer;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', 'Roboto', Arial, Georgia, Serif; }\n .styles_dt-datetimepicker__PtoFG .styles_hidden__6ySER {\n display: none; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-open-container__1dVr5 {\n background-color: #f4f4f5;\n border-radius: 5px;\n padding: 15px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL {\n display: flex;\n flex-wrap: wrap; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL.styles_closed__Fqe1r {\n margin: 11px 0 6px 18px; }\n @media screen and (max-width: 319px) {\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL {\n margin-left: 14px; } }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_time-icon__ntgLZ svg {\n width: 18px;\n height: 19px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_dropdown-icon__diYYB {\n margin-left: 9px;\n position: relative;\n top: 1px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_dropdown-icon__diYYB svg {\n width: 14px;\n height: 10px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_close-icon__-MzK5 svg {\n width: 12px;\n height: 12px;\n border-radius: 1px; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL .styles_close-icon__-MzK5 svg path {\n stroke-width: 30; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL label {\n cursor: pointer; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL label.styles_label-open__Gmvov {\n align-items: flex-start;\n display: flex; }\n .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL button, .styles_dt-datetimepicker__PtoFG .styles_top-row-container__cXGjL label {\n font-size: 1em;\n letter-spacing: -0.5px;\n line-height: 1; }\n .styles_dt-datetimepicker__PtoFG .styles_textbutton__T7wS2 {\n margin-left: 9px;\n margin-top: 1px;\n background: none;\n border: none;\n color: #666666;\n padding: 0; }\n @media screen and (min-width: 768px) {\n .styles_dt-datetimepicker__PtoFG .styles_textbutton__T7wS2 {\n margin-left: 14px; } }\n .styles_dt-datetimepicker__PtoFG .styles_textbutton__T7wS2.styles_active__4L82E {\n color: var(--color); }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-left__Sp4kh {\n position: relative;\n margin-right: 4px;\n width: 63%; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-right__Hg8kN {\n position: relative;\n margin-left: 4px;\n width: 37%; }\n .styles_dt-datetimepicker__PtoFG .styles_departure-or-arrival-container__pJ-Iw {\n height: calc(1rem + 20px);\n background-color: #dddddd;\n border-radius: 8px;\n display: flex;\n width: calc(5px + 13em); }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy {\n color: #333333;\n margin: 2px;\n background: none;\n border-radius: 6px;\n padding: 9px 0;\n width: 50%;\n cursor: pointer;\n height: calc(1rem + 16px);\n text-align: center;\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.03em; }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy.styles_active__4L82E {\n font-weight: 500;\n background: white; }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy:focus-within {\n /* First apply outline that is used in Edge and Firefox */\n outline: 1px dotted #212121;\n /* Then override outline for webkit browsers like Chrome, this has no effect on other browsers */\n outline: 5px auto -webkit-focus-ring-color;\n /* stylelint-disable-line declaration-block-no-duplicate-properties */ }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton-label__h-zfy.styles_first-radio__FWNoD {\n margin: 0;\n display: flex;\n align-items: flex-start; }\n .styles_dt-datetimepicker__PtoFG .styles_radio-textbutton__tsKET {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n .styles_dt-datetimepicker__PtoFG .styles_departure-now-button__VKMMK {\n font-family: inherit;\n letter-spacing: -0.02em;\n height: calc(1rem + 18px);\n color: var(--color);\n padding: 8px 0;\n width: 6.6875rem;\n background: white;\n border: 1px solid #888888;\n border-radius: 30px;\n margin-left: 11px; }\n .styles_dt-datetimepicker__PtoFG .styles_open-button__c2B-6 {\n display: flex;\n margin-bottom: 0;\n margin-top: -1px;\n padding: 2px 0 2px 0; }\n .styles_dt-datetimepicker__PtoFG button.styles_close-button__2mfgI {\n transition: transform 0.2s;\n position: relative;\n top: -8px;\n right: -8px;\n border: 0;\n font-weight: normal;\n background: none;\n color: var(--color);\n padding: 0;\n line-height: normal; }\n .styles_dt-datetimepicker__PtoFG button.styles_close-button__2mfgI:hover {\n transform: scale(1.2); }\n .styles_dt-datetimepicker__PtoFG .styles_right-edge__29UYw {\n margin-left: auto;\n margin-right: 0;\n position: relative;\n top: -2px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-container__CLY9U {\n cursor: pointer; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH {\n color: var(--color);\n height: 40px;\n position: absolute;\n z-index: 7;\n pointer-events: none; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_date-input-icon__KMrj1 {\n display: flex;\n align-items: center;\n padding: 0;\n margin-left: 14px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_date-input-icon__KMrj1 svg {\n width: 20px;\n height: 18px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_time-input-icon__qkhC7 {\n display: flex;\n align-items: center;\n padding: 0;\n margin-left: 8px; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-icon__-0XPH.styles_time-input-icon__qkhC7 svg {\n margin-top: 1px;\n width: 22px;\n height: 22px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l {\n position: relative;\n height: 40px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__control {\n cursor: inherit;\n height: 40px;\n border: 1px solid #888888; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__value-container {\n padding: 0; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__single-value {\n margin: 0 0 0 47px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__input {\n background: inherit;\n position: relative;\n margin-left: 40px; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__input input {\n opacity: 1 !important;\n background: inherit;\n box-shadow: none;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.33;\n letter-spacing: -0.5px;\n color: #333333;\n font-family: inherit;\n font-size: 15px;\n font-weight: var(--font-weight-medium); }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__input input:focus {\n box-shadow: none;\n outline: none;\n border: none; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu {\n z-index: 19;\n padding: 0;\n background: #fff;\n max-height: 250px;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: 1px rgba(0, 0, 0, 0.1) solid; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list {\n max-height: 250px;\n padding: 0; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list .datetimepicker-select__option {\n height: 50px;\n border-top: 1px solid #dddddd;\n padding: 13px 0 0 12px;\n letter-spacing: -0.6px;\n color: #333333; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list .datetimepicker-select__option--is-selected {\n background: inherit; }\n .styles_dt-datetimepicker__PtoFG .styles_datetimepicker-select-container__EVW1l .datetimepicker-select__menu .datetimepicker-select__menu-list .datetimepicker-select__option--is-focused {\n background: #dfe5e8; }\n .styles_dt-datetimepicker__PtoFG .styles_picker-container__V02r4 {\n margin: 14px 0 0 0;\n display: flex; }\n .styles_dt-datetimepicker__PtoFG .styles_combobox-mobile-container__u2DSO {\n flex-grow: 1; }\n\n.styles_mobile-modal-overlay__8vF8L {\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: rgba(0, 0, 0, 0.6);\n z-index: 1000; }\n\n.styles_mobile-modal-content__fWRgy {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', 'Roboto', Arial, Georgia, Serif;\n background: white;\n width: 89%;\n position: absolute;\n left: 5.5%;\n padding: 31px 20px 33px 20px;\n top: 80px;\n border-radius: 5px; }\n .styles_mobile-modal-content__fWRgy .styles_top-row__h8xy1 {\n display: flex;\n justify-content: space-between;\n margin-bottom: 21px; }\n .styles_mobile-modal-content__fWRgy .styles_top-row__h8xy1 .styles_modal-title__EA3YD {\n font-weight: var(--font-weight-medium);\n font-size: 20px;\n line-height: 18px;\n letter-spacing: -0.5px;\n color: #333333;\n padding: 6px 0 0 8px; }\n .styles_mobile-modal-content__fWRgy .styles_top-row__h8xy1 .styles_departure-now-button__VKMMK {\n background-color: white;\n font-family: inherit;\n padding: 5px 15px;\n border: 1px solid #888888;\n border-radius: 50px;\n font-weight: var(--font-weight-medium);\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.02em;\n color: var(--color); }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh {\n display: flex;\n border: 2px solid #dddddd;\n border-radius: 5px;\n margin-bottom: 16px;\n background-color: #dddddd; }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh .styles_radio-tab-label__vIfup {\n padding: 9px 0;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.5px;\n border-radius: 3px;\n font-weight: normal;\n width: 50%;\n text-align: center;\n color: #333333; }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh .styles_radio-tab-label__vIfup.styles_active__4L82E {\n font-weight: var(--font-weight-medium);\n background-color: #ffffff; }\n .styles_mobile-modal-content__fWRgy .styles_tab-row__orgwh .styles_radio-textbutton__tsKET {\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY {\n display: flex;\n margin-bottom: 25px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY label:first-child {\n flex-basis: 60%;\n margin-right: 10px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY label:nth-child(2) {\n flex-basis: 40%; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF {\n border: 1px solid #888888;\n border-radius: 5px;\n display: flex;\n align-items: center;\n height: 40px;\n line-height: 1.5;\n font-size: 100%; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF:focus-within {\n background: rgba(0, 122, 201, 0.06);\n border: 2px solid var(--color); }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_combobox-icon__-0XPH {\n height: 18px;\n font-size: 18px;\n padding: 0 0 0 10px;\n border: none;\n position: relative;\n top: 3px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_combobox-icon__-0XPH.styles_time-input-icon__qkhC7 > svg {\n height: 20px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_time-input-mobile__6e4A5 {\n font-family: inherit;\n box-shadow: none;\n font-size: 18px;\n letter-spacing: -0.5px;\n line-height: 20px;\n font-weight: var(--font-weight-medium);\n border: none;\n outline: none;\n background: none;\n width: 50px;\n margin-left: 10px;\n color: #333333;\n height: 1.5265rem; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-display__VUMd0 {\n position: relative;\n left: 10px;\n border: none;\n background: inherit;\n box-shadow: none;\n font-family: inherit;\n font-weight: var(--font-weight-medium);\n font-stretch: normal;\n font-style: normal;\n font-size: 16px;\n line-height: 1.33;\n letter-spacing: -0.5px;\n color: #333333; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-display__VUMd0:focus {\n outline: none;\n box-shadow: none;\n background: none; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-hidden__2KIuK {\n font-size: 16px;\n margin-bottom: 12px;\n height: 0px;\n width: 0;\n background: inherit;\n color: transparent;\n outline: none;\n box-shadow: none;\n border: none; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_mobile-input-hidden__2KIuK:focus {\n outline: none;\n box-shadow: none; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz {\n position: absolute;\n width: calc((100% - 50px) * 0.6);\n height: 25px;\n font-size: 15px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestion__ZczJa {\n list-style: none;\n font-size: 16px;\n font-style: normal;\n font-weight: normal;\n line-height: 49px;\n height: 50px;\n margin: 0;\n padding: 0 0 0 16px;\n color: rgba(0, 0, 0, 0.87);\n background: white; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestionHighlighted__fzLiW {\n background: #dfe5e8; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestionsContainerOpen__ISHXi {\n position: absolute;\n z-index: 19;\n max-height: 250px;\n overflow-x: hidden;\n overflow-y: scroll;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: 1px rgba(0, 0, 0, 0.1) solid;\n top: 42px;\n left: -2px;\n width: 100%;\n font-size: 16px;\n line-height: 1;\n color: rgba(0, 0, 0, 0.87); }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_suggestionsContainerOpen__ISHXi ul {\n padding: 0;\n margin: 0; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_input__PAfbH {\n box-shadow: none;\n border: none;\n background: none;\n font-size: 16px;\n font-weight: var(--font-weight-medium);\n height: 25px;\n display: inline-block;\n font-family: inherit;\n line-height: 1.33;\n color: #333333;\n padding-left: 46px; }\n .styles_mobile-modal-content__fWRgy .styles_input-row__2XXEY .styles_input-container__USZlF .styles_container__ihyhz .styles_input__PAfbH:focus {\n outline: none;\n border: none;\n background: none; }\n .styles_mobile-modal-content__fWRgy .styles_buttons-row__-3wsn {\n display: flex;\n flex-direction: column;\n font-size: 16px;\n font-weight: var(--font-weight-medium); }\n .styles_mobile-modal-content__fWRgy .styles_buttons-row__-3wsn button {\n background-color: white;\n font-family: inherit;\n font-weight: var(--font-weight-medium);\n font-size: 16px;\n letter-spacing: -0.02em;\n width: 100%;\n border-radius: 50px;\n height: 40px;\n color: var(--color);\n border: 1px solid #888888; }\n .styles_mobile-modal-content__fWRgy .styles_buttons-row__-3wsn button.styles_ready-button__dH7Qc {\n color: white;\n background-color: var(--color);\n border: none;\n margin-bottom: 10px; }\n"),"production"!==process.env.NODE_ENV&&(C.propTypes={value:p.default.number.isRequired,onChange:p.default.func.isRequired,getDisplay:p.default.func.isRequired,timeChoices:p.default.arrayOf(p.default.number).isRequired,validate:p.default.func.isRequired,id:p.default.string.isRequired,label:p.default.node.isRequired,icon:p.default.node.isRequired,disableTyping:p.default.bool,timeZone:p.default.string,datePicker:p.default.bool}),C.defaultProps={disableTyping:!1,timeZone:"Europe/Helsinki",datePicker:!1};const R={de:{today:"Heute",tomorrow:"Morgen","accessible-close":"Schließe die Auswahl","accessible-closed":"Auswahl geschlossen","accessible-open":"Öffne die Auswahl","accessible-opened":"Auswahl geöffnet","accessible-title":"Datum und Uhrzeitauswahl",arrival:"Ankunft",date:"Datum",departure:"Abfahrt","departure-now":"Abfahrt jetzt","choose-time":"Zeit wählen",ready:"Fertig",time:"Zeit",cancel:"Abbrechen"},en:{today:"Today",tomorrow:"Tomorrow","accessible-close":"Close the picker","accessible-closed":"Timepicker closed","accessible-open":"Open the picker","accessible-opened":"Timepicker opened","accessible-title":"Date and timepicker","accessible-update-instructions":"Changing time parameters will trigger a new search.",arrival:"Arrival",date:"Date",departure:"Departure","departure-now":"Leaving now",time:"Time","choose-time":"Choose time",ready:"Ready",cancel:"Cancel"},fi:{today:"Tänään",tomorrow:"Huomenna","accessible-close":"Sulje valitsin","accessible-closed":"Valitsin suljettu","accessible-open":"Avaa valitsin","accessible-opened":"Valitsin avattu","accessible-title":"Aika- ja päivämäärävalitsin","accessible-update-instructions":"Aikavalintojen muuttaminen laukaisee uuden haun.",arrival:"Perillä",date:"Päivä",departure:"Lähtöaika","departure-now":"Lähtö nyt",time:"Aika","choose-time":"Valitse aika",ready:"Valmis",cancel:"Peruuta"},sv:{today:"I dag",tomorrow:"I morgon","accessible-close":"Stäng väljaren","accessible-closed":"Väljaren stängde","accessible-open":"Öppna väljaren","accessible-opened":"Väljaren öppnade","accessible-title":"Tid- och datumväljaren","accessible-update-instructions":"Om du ändrar tiderna, startas en ny sökning automatiskt.",arrival:"Anländer",date:"Datum",departure:"Avgångstid","departure-now":"Avgår nu",time:"Tid","choose-time":"Välj tid",ready:"Färdig",cancel:"Avbryt"}};const F=["ref"];function N({value:e,getDisplay:t,onChange:i,itemCount:a,startTime:l,id:o,label:r,icon:s,timeZone:d}){f.default.tz.setDefault(d);const[c,u]=n.useState(!1),_=n.useRef(null),p=Array(a).fill().map(((e,t)=>f.default(l).add(t,"day").valueOf())),y=p.map((t=>e-t)).findIndex((e=>e<6e4));n.useLayoutEffect((()=>{c&&_.current&&(_.current.scrollTop=50*y)}),[e,c]);const b=!(navigator.userAgent.toLowerCase().indexOf("android")>-1),g=`${o}-input`,h=`${o}-label`;return m.default.createElement(m.default.Fragment,null,m.default.createElement("label",{className:E["input-container"],htmlFor:g},m.default.createElement("span",null,s),m.default.createElement("span",{className:E["sr-only"],id:h},r),b?m.default.createElement(m.default.Fragment,null,m.default.createElement("select",{className:E["mobile-input-display"],onChange:e=>i(Number(e.target.value)),value:e},p.map((e=>m.default.createElement("option",{key:e,value:e},t(e)))))):m.default.createElement(w.default,{id:o,suggestions:p,getSuggestionValue:e=>e.toString(),renderSuggestion:e=>t(e),onSuggestionsFetchRequested:()=>null,shouldRenderSuggestions:()=>!0,inputProps:{value:t(e),onChange:(e,{newValue:t})=>{i(Number(t))},onFocus:()=>{u(!0)},onBlur:()=>{u(!1)},"aria-labelledby":h,"aria-autocomplete":"none",readOnly:!0},focusInputOnSuggestionClick:!1,onSuggestionsClearRequested:()=>null,renderSuggestionsContainer:({containerProps:e,children:t})=>{const{ref:n}=e,i=function(e,t){if(null==e)return{};var n,i,a={},l=Object.keys(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,F);return m.default.createElement("div",Object.assign({tabIndex:"-1"},i,{ref:e=>{e&&(_.current=e,n(e))}}),t)},theme:E})))}function P({value:e,getDisplay:t,onChange:i,id:a,label:l,icon:o,timeZone:r,validate:s}){const[d,c]=n.useState(t(e));f.default.tz.setDefault(r);const u=`${a}-input`,_=`${a}-label`,p=n.useRef(null);return n.useLayoutEffect((()=>{p.current&&p.current.focus()}),[]),m.default.createElement(m.default.Fragment,null,m.default.createElement("label",{className:E["input-container"],htmlFor:u},m.default.createElement("span",null,o),m.default.createElement("span",{className:E["sr-only"],id:_},l),m.default.createElement("input",{id:u,inputMode:"numeric",type:"text",maxLength:"6",className:E["time-input-mobile"],value:d,onFocus:e=>{e.target.setSelectionRange(0,0)},onChange:t=>{let n=t.target.value;if(n.match(/[0-9]{3}:[0-9]{2}/)&&n.slice(1)===d&&(n=n.charAt(0)),n.length>5)return;const a=k.parseTypedTime(n);c(a);const l=s(a,e);l&&i(l)},ref:p})))}function S({departureOrArrival:e,onNowClick:t,lang:i,color:a,timeZone:l,onSubmit:o,onCancel:r,timestamp:s,getTimeDisplay:d,dateSelectItemCount:c,getDateDisplay:u,validateTime:_,fontWeights:p}){f.default.tz.setDefault(l);const y={lng:i},[x,w]=n.useState(s),[k,C]=n.useState(e);const[R]=n.useState(b.default("datetimepicker-")),F=f.default().startOf("day").hour(f.default(x).hour()).minute(f.default(x).minute()).valueOf();return m.default.createElement(v.default,{appElement:document?document.querySelector("#app"):void 0,isOpen:!0,className:E["mobile-modal-content"],overlayClassName:E["mobile-modal-overlay"]},m.default.createElement("div",{style:{"--color":`${a}`,"--font-weight-medium":p.medium}},m.default.createElement("div",{className:E["top-row"]},m.default.createElement("h3",{className:E["modal-title"]},g.default.t("choose-time",y)),m.default.createElement("button",{type:"button",className:E["departure-now-button"],onClick:t},g.default.t("departure-now",y))),m.default.createElement("div",{className:E["tab-row"]},m.default.createElement("label",{htmlFor:`${R}-modal-departure`,className:`${E["radio-tab-label"]}\n ${E["departure"===k?"active":void 0]}`},g.default.t("departure",y),m.default.createElement("input",{id:`${R}-modal-departure`,name:"departureOrArrival",type:"radio",value:"departure",className:E["radio-textbutton"],onChange:()=>{C("departure")},checked:"departure"===k})),m.default.createElement("label",{htmlFor:`${R}-modal-arrival`,className:`${E["radio-tab-label"]}\n ${E["arrival"===k?"active":void 0]}`},g.default.t("arrival",y),m.default.createElement("input",{id:`${R}-modal-arrival`,name:"departureOrArrival",type:"radio",value:"arrival",className:E["radio-textbutton"],onChange:()=>{C("arrival")},checked:"arrival"===k}))),m.default.createElement("div",{className:E["input-row"]},m.default.createElement(N,{value:x,getDisplay:u,onChange:function(e){w(e)},itemCount:c,startTime:F,id:`${R}-date`,label:g.default.t("date",y),icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["date-input-icon"]}`},m.default.createElement(h.default,{img:"calendar",color:a})),timeZone:l}),m.default.createElement(P,{value:x,getDisplay:d,onChange:function(e){w(e)},id:`${R}-time`,label:g.default.t("time",y),icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["time-input-icon"]}`},m.default.createElement(h.default,{img:"time",color:a})),timeZone:l,validate:_})),m.default.createElement("div",{className:E["buttons-row"]},m.default.createElement("button",{type:"button",className:E["ready-button"],onClick:()=>o(x,k)},g.default.t("ready",y)),m.default.createElement("button",{type:"button",className:E["cancel-button"],onClick:r},g.default.t("cancel",y)))))}function G({timestamp:e,onTimeChange:t,onDateChange:i,departureOrArrival:a,onNowClick:l,onDepartureClick:o,onArrivalClick:r,embedWhenClosed:s,embedWhenOpen:d,lang:c,color:u,timeZone:_,onModalSubmit:p,fontWeights:y,serviceTimeRange:x,onOpen:v,onClose:w,openPicker:k}){f.default.tz.setDefault(_);const[F,N]=n.useState(k||!1),[P,G]=n.useState(e||f.default().valueOf()),[O,q]=n.useState(null),[W]=n.useState(b.default("datetimepicker-")),[T]=n.useState(function(){const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)}()&&function(){if("undefined"==typeof window||null===window)return!1;const e=document.createElement("input");return e.type="date","date"===e.type&&(e.type="time","time"===e.type)}()),$=n.useRef(),X=n.useRef(),A=n.useRef(),z={lng:c};n.useEffect((()=>{Object.keys(R).forEach((e=>g.default.addResourceBundle(e,"translation",R[c])))}),[]),n.useEffect((()=>{f.default.locale(c)}),[c]);const D=null===e;n.useEffect((()=>{D?G(f.default().valueOf()):(O&&(clearInterval(O),q(null)),G(e))}),[e]),n.useEffect((()=>{if(!D)return;O&&clearInterval(O);const e=setInterval((()=>{const t=f.default().valueOf();f.default(P).isSame(t,"minute")||(clearInterval(e),q(null),G(t))}),5e3);return q(e),()=>clearInterval(e)}),[P]);const Z=n.useRef();n.useEffect((()=>{Z.current=F}));const V=e=>{const t=f.default(e);let n;return n=t.isSame(f.default(),"day")?g.default.t("today",z):t.isSame(f.default().add(1,"day"),"day")?g.default.t("tomorrow",z):t.format("dd D.M."),n=`${n.charAt(0).toUpperCase()}${n.slice(1)}`,n},L=e=>f.default(e).format("HH:mm"),M=(e,t)=>{const n=e.trim();if(null!==n.match(/^[0-9]{1,2}(\.|:)[0-9]{2}$/)){const e=n.includes(".")?".":":",i=n.split(e),a=Number(i[0]),l=!Number.isNaN(a)&&a>=0&&a<=23,o=Number(i[1]);if(!(!Number.isNaN(o)&&o>=0&&o<=59)||!l)return null;return f.default(t).hours(a).minutes(o).valueOf()}return null},I=f.default(P),j=f.default(P).startOf("day").valueOf();let H=[];const Y=f.default(j);for(;Y.isSame(j,"day");)H.push(Y.valueOf()),Y.add(15,"minutes");if(null===e){const e=3e5,t=Math.ceil(P/e)*e,n=Array(7).fill().map(((n,i)=>t+i*e)),i=H.map((e=>P-e)).findIndex((e=>e<=0));H.splice(i,0,...n),H=Array.from(new Set(H))}const U=f.default().startOf("day").hour(I.hour()).minute(I.minute()).valueOf(),K=Array(x).fill().map(((e,t)=>f.default(U).add(t,"day").valueOf()));function B(){A.current&&(A.current.innerHTML=g.default.t("accessible-closed",z),setTimeout((()=>{A.current.innerHTML=null}),100))}return m.default.createElement("fieldset",{className:E["dt-datetimepicker"],id:`${W}-root`,style:{"--color":`${u}`,"--font-weight-medium":y.medium}},m.default.createElement("legend",{className:E["sr-only"]},g.default.t("accessible-title",z)),m.default.createElement("span",{className:E["sr-only"]},g.default.t("accessible-update-instructions",z)),m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:F?`${E.hidden} datetimepicker-top-row`:`${E["top-row-container"]} ${E.closed} datetimepicker-top-row`},m.default.createElement("label",{className:E["label-open"],htmlFor:`${W}-open`},m.default.createElement("span",{className:E["time-icon"]},m.default.createElement(h.default,{img:"time",color:u})),m.default.createElement("span",{className:E["sr-only"]},g.default.t("accessible-open",z)),m.default.createElement("span",{role:"alert",className:E["sr-only"],ref:A}),m.default.createElement("button",{id:`${W}-open`,type:"button",className:`${E.textbutton} ${E.active} ${E["open-button"]}`,"aria-controls":`${W}-root`,"aria-expanded":"false",onClick:()=>{N(!0),A.current&&(A.current.innerHTML=g.default.t("accessible-opened",z),setTimeout((()=>{A.current.innerHTML=null}),100)),v&&v()},ref:$},m.default.createElement("span",null,D&&"departure"===a?g.default.t("departure-now",z):m.default.createElement(m.default.Fragment,null,g.default.t("departure"===a?"departure":"arrival",z),` ${f.default().isSame(f.default(P),"day")?"":V(P).toLowerCase()} ${L(P)}`)),m.default.createElement("span",{className:E["dropdown-icon"]},m.default.createElement(h.default,{img:"arrow-dropdown",color:u})))),m.default.createElement("span",{className:E["right-edge"]},s)),m.default.createElement("div",null)),T?F&&m.default.createElement(S,{departureOrArrival:a,onNowClick:()=>{N(!1),B(),l()},lang:c,color:u,onSubmit:(e,t)=>{p(e,t),N(!1),B()},onCancel:()=>{N(!1),B(),w&&w()},getTimeDisplay:L,timeZone:_,timestamp:P,getDateDisplay:V,dateSelectItemCount:x,getDisplay:L,validateTime:M,fontWeights:y}):m.default.createElement(m.default.Fragment,null,m.default.createElement("div",{className:`${E["datetimepicker-open-container"]} ${F?"":E.hidden}`},m.default.createElement("div",{className:F?`${E["top-row-container"]} datetimepicker-top-row`:`${E.hidden} datetimepicker-top-row`}," ",m.default.createElement("span",{role:"alert",className:E["sr-only"],ref:A}),m.default.createElement("span",null),m.default.createElement("span",{className:E["departure-or-arrival-container"]},m.default.createElement("label",{htmlFor:`${W}-departure`,className:`${E["radio-textbutton-label"]}\n ${E["departure"===a?"active":void 0]}`},g.default.t("departure",z),m.default.createElement("input",{id:`${W}-departure`,name:"departureOrArrival",type:"radio",value:"departure",className:E["radio-textbutton"],onChange:()=>{o()},checked:"departure"===a})),m.default.createElement("label",{htmlFor:`${W}-arrival`,className:`${E["radio-textbutton-label"]}\n ${E["arrival"===a?"active":void 0]}`},g.default.t("arrival",z),m.default.createElement("input",{id:`${W}-arrival`,name:"departureOrArrival",type:"radio",value:"arrival",className:E["radio-textbutton"],onChange:()=>{r()},checked:"arrival"===a}))),m.default.createElement("button",{id:`${W}-now`,type:"button",className:E["departure-now-button"],onClick:()=>{N(!1),B(),w&&w(),l()},ref:X},g.default.t("departure-now",z)),m.default.createElement("span",{className:E["right-edge"]},m.default.createElement("button",{type:"button",className:E["close-button"],"aria-controls":`${W}-root`,"aria-expanded":"true",onClick:()=>{N(!1),B(),w&&w()}},m.default.createElement("span",{className:E["close-icon"]},m.default.createElement(h.default,{img:"close",color:u})),m.default.createElement("span",{className:E["sr-only"]},g.default.t("accessible-close",z))))),m.default.createElement("div",{className:F?`${E["picker-container"]}`:`${E.hidden} datetimepicker-top-row`},m.default.createElement(m.default.Fragment,null,m.default.createElement("span",{className:E["combobox-left"]},m.default.createElement(C,{value:P,onChange:e=>{i(e)},getDisplay:V,timeChoices:K,validate:()=>null,icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["date-input-icon"]}`},m.default.createElement(h.default,{img:"calendar",color:u})),id:`${W}-date`,label:g.default.t("date",z),disableTyping:!0,timeZone:_,datePicker:!0})),m.default.createElement("span",{className:E["combobox-right"]},m.default.createElement(C,{value:P,onChange:e=>{t(e)},getDisplay:L,timeChoices:H,validate:M,icon:m.default.createElement("span",{className:`${E["combobox-icon"]} ${E["time-input-icon"]}`},m.default.createElement(h.default,{img:"time",color:u})),id:`${W}-time`,label:g.default.t("time",z),timeZone:_}))))),m.default.createElement("span",{className:F?"":E.hidden},d),m.default.createElement("div",{className:F?"datetimepicker-bottom-row-open":""})))}function O({realtime:e,initialArriveBy:t,initialTimestamp:i,onDepartureClick:a,onArrivalClick:l,onTimeChange:o,onDateChange:r,onNowClick:s,embedWhenClosed:d,embedWhenOpen:c,lang:u,color:_,timeZone:p,fontWeights:b,serviceTimeRange:g,onOpen:h,onClose:x,openPicker:v}){f.default.locale(u),f.default.tz.setDefault(p);const w=e?null:f.default().valueOf(),[k,E]=n.useState(i?1e3*i:w),[C,R]=n.useState(!0===t?"arrival":"departure");n.useEffect((()=>{const e=null===k&&void 0===i,n=null===k||void 0===i,a=Math.round(k/1e3)===i;!e&&(n||!a)&&E(void 0===i?null:1e3*i),!t==("arrival"===C)&&R(!0===t?"arrival":"departure")}),[i,t]);const F=y.default((e=>{if(null===e)return E(f.default().valueOf()),void o(Math.round(f.default().valueOf()/1e3),"arrival"===C);E(e),o(Math.round(e/1e3),"arrival"===C)}),10),N=y.default((e=>{if(null===e)return E(f.default().valueOf()),void r(Math.round(f.default().valueOf()/1e3),"arrival"===C);E(e),r(Math.round(e/1e3),"arrival"===C)}),10);return m.default.createElement(G,{timestamp:k,onTimeChange:F,onDateChange:N,departureOrArrival:C,onNowClick:()=>{R("departure");const t=e?null:f.default().valueOf();E(t),s(Math.round(t/1e3))},onDepartureClick:()=>{let e=!1,t=k;if(null===k){const n=f.default().valueOf();E(n),t=n,e=!0}"departure"!==C&&(R("departure"),e=!0),e&&a(Math.round(t/1e3))},onArrivalClick:()=>{let e=!1,t=k;if(null===k){const n=f.default().valueOf();E(n),t=n,e=!0}"arrival"!==C&&(R("arrival"),e=!0),e&&l(Math.round(t/1e3))},embedWhenClosed:d,embedWhenOpen:c,lang:u,color:_,timeZone:p,onModalSubmit:(e,t)=>{E(e),R(t),o(e/1e3,"arrival"===t,!0)},fontWeights:b,serviceTimeRange:g,onOpen:h,onClose:x,openPicker:v})}"production"!==process.env.NODE_ENV&&(N.propTypes={value:p.default.number.isRequired,getDisplay:p.default.func.isRequired,onChange:p.default.func.isRequired,itemCount:p.default.number.isRequired,startTime:p.default.number.isRequired,id:p.default.string.isRequired,label:p.default.string.isRequired,icon:p.default.node,dateTimeCombined:p.default.bool,timeZone:p.default.string}),N.defaultProps={icon:null,dateTimeCombined:!1,timeZone:"Europe/Helsinki"},"production"!==process.env.NODE_ENV&&(P.propTypes={value:p.default.number.isRequired,getDisplay:p.default.func.isRequired,onChange:p.default.func.isRequired,id:p.default.string.isRequired,label:p.default.string.isRequired,icon:p.default.node,timeZone:p.default.string,validate:p.default.func.isRequired}),P.defaultProps={icon:null,timeZone:"Europe/Helsinki"},f.default.locale("en"),g.default.init({lng:"en",resources:{}}),Object.keys(R).forEach((e=>g.default.addResourceBundle(e,"translation",R[e]))),"production"!==process.env.NODE_ENV&&(S.propTypes={timeZone:p.default.string,departureOrArrival:p.default.oneOf(["departure","arrival"]).isRequired,onNowClick:p.default.func.isRequired,lang:p.default.string.isRequired,color:p.default.string,onSubmit:p.default.func.isRequired,onCancel:p.default.func.isRequired,timestamp:p.default.number.isRequired,getTimeDisplay:p.default.func.isRequired,dateSelectItemCount:p.default.number.isRequired,getDateDisplay:p.default.func.isRequired,validateTime:p.default.func.isRequired,fontWeights:p.default.shape({medium:p.default.number.isRequired}).isRequired}),S.defaultProps={color:"#007ac9",timeZone:"Europe/Helsinki"},f.default.locale("en"),g.default.init({lng:"fi",fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}}),"production"!==process.env.NODE_ENV&&(G.propTypes={timestamp:p.default.number,timeZone:p.default.string,onTimeChange:p.default.func.isRequired,onDateChange:p.default.func.isRequired,departureOrArrival:p.default.oneOf(["departure","arrival"]).isRequired,onNowClick:p.default.func.isRequired,onDepartureClick:p.default.func.isRequired,onArrivalClick:p.default.func.isRequired,embedWhenClosed:p.default.node,embedWhenOpen:p.default.node,lang:p.default.string.isRequired,color:p.default.string,onModalSubmit:p.default.func.isRequired,fontWeights:p.default.shape({medium:p.default.number.isRequired}).isRequired,serviceTimeRange:p.default.number,onOpen:p.default.func,onClose:p.default.func,openPicker:p.default.bool}),G.defaultProps={timestamp:null,embedWhenClosed:null,embedWhenOpen:null,color:"#007ac9",timeZone:"Europe/Helsinki",serviceTimeRange:30,onOpen:null,onClose:null,openPicker:void 0},"production"!==process.env.NODE_ENV&&(O.propTypes={realtime:p.default.bool,initialTimestamp:p.default.number,initialArriveBy:p.default.bool,onDepartureClick:p.default.func.isRequired,onArrivalClick:p.default.func.isRequired,onTimeChange:p.default.func.isRequired,onDateChange:p.default.func.isRequired,onNowClick:p.default.func.isRequired,embedWhenClosed:p.default.node,embedWhenOpen:p.default.node,lang:p.default.string,color:p.default.string,timeZone:p.default.string,fontWeights:p.default.shape({medium:p.default.number}),serviceTimeRange:p.default.number,onOpen:p.default.func,onClose:p.default.func,openPicker:p.default.bool}),O.defaultProps={realtime:!1,initialArriveBy:void 0,initialTimestamp:void 0,embedWhenClosed:null,embedWhenOpen:null,lang:"en",color:"#007ac9",timeZone:"Europe/Helsinki",fontWeights:{medium:500},onOpen:null,onClose:null,openPicker:void 0},e.default=O,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=index.js.map