@digitransit-component/digitransit-component-autosuggest 2.0.3 → 2.0.4
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.development.js +2 -2
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -10,5 +10,5 @@ var z,b;z=this,b=function(M){void 0===M.version&&M.default&&(M=M.default);var z,
|
|
|
10
10
|
//! moment.js locale configuration
|
|
11
11
|
var z="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",z[7],z[8],z[9]];function p(M,p,O,o){var c="";switch(O){case"s":return o?"muutaman sekunnin":"muutama sekunti";case"ss":c=o?"sekunnin":"sekuntia";break;case"m":return o?"minuutin":"minuutti";case"mm":c=o?"minuutin":"minuuttia";break;case"h":return o?"tunnin":"tunti";case"hh":c=o?"tunnin":"tuntia";break;case"d":return o?"päivän":"päivä";case"dd":c=o?"päivän":"päivää";break;case"M":return o?"kuukauden":"kuukausi";case"MM":c=o?"kuukauden":"kuukautta";break;case"y":return o?"vuoden":"vuosi";case"yy":c=o?"vuoden":"vuotta"}return c=function(M,p){return M<10?p?b[M]:z[M]:M}(M,o)+" "+c,c}return M.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:p,ss:p,m:p,mm:p,h:p,hh:p,d:p,dd:p,M:p,MM:p,y:p,yy:p},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},b(kM)})),SM((function(M,z){var b;b=function(M){return M.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(M){var z=M%10;return M+(1==~~(M%100/10)?":e":1===z||2===z?":a":":e")},week:{dow:1,doy:4}})},b(kM)})),SM((function(M,z){var b;b=function(M){
|
|
12
12
|
//! moment.js locale configuration
|
|
13
|
-
function z(M,z,b,p){var O={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[M+" Tage",M+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[M+" Monate",M+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[M+" Jahre",M+" Jahren"]};return z?O[b][0]:O[b][1]}return M.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:z,mm:"%d Minuten",h:z,hh:"%d Stunden",d:z,dd:z,w:z,ww:"%d Wochen",M:z,MM:z,y:z,yy:z},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},b(kM)}));const YM={de:{address:"Adresse","address-place-or-business":"Adress, Ort or Geschäft","add-via-button-label":"Füge Zwischenziel hinzu","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flug",arrival:"Ankunft",back:"Zurück",bikerentalstation:"Leihrad-Station",bus:"Bus",cancel:"Abbrechen","clear-button-label":"Löschen","clear-search-history":"Suchhistorie löschen",currentposition:"Aktuelle Position",delete:"Löschen","delete-old-searches-header":"Wollen Sie die Such-Historie löschen?",departure:"Abfahrt",destination:"Ziel","give-origin":"Start eingeben.","give-destination":"Ziel eingeben.",favourite:"Favoriten",ferry:"Fähre","future-route":"Zukünftige Verbindung",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Eigene Favoriten",loading:"Laden...","minute-short":"min",rail:"Zug",search:"Suche","search-address-or-place":"Suche anhand von Adresse oder Ortsangabe","search-button-label":"Suche","search-destination":"Suche Zielort, Linie or Haltestelle","search-destination-index":"Zielort eingeben","search-destination-results-but-no-search":"Ergebnisse in “Zielort”-Reiter anzeigen","search-no-results":"Kein Ort gefunden.","search-origin":"Suche Startort, Linie oder Haltestelle","search-origin-index":"Startort eingeben","search-position":"Standort ermitteln","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Aktuelle Auswahl: {{selection}}",street:"Straße",subway:"U-Bahn",station:"Station",stop:"Haltestelle","stop-near-you":"Suche Haltestellen und Linien in der Nähe","stop-near-you-bus":"Suche Buslinien or Haltestellen","stop-near-you-citybike":"Suche Leihrad-Stationen","stop-near-you-rail":"Suche Zugverbindungen oder Bahnhöfe","stop-near-you-subway":"Suche U-Bahn-Linien oder Haltestellen","stop-near-you-tram":"Suche Stadtbahn-Haltestellen-Suche","today-at":"Heute um","tomorrow-at":"Morgen um",tram:"Straßenbahn","use-own-position":"Benutze aktuellen Standort","select-from-map":"Wähle Position anhand Karte","select-from-own-locations":"Aus eigenen Favoriten auswählen",venue:"Venue","via-point":"Zwischenziel",where:"Wohin?",place:"Ort"},en:{address:"Address","address-place-or-business":"Address, place or business","add-via-button-label":"Add via point","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flight",arrival:"Arrival",back:"Back",bikepark:"Park & Ride for bikes",bikerentalstation:"Bike station",bus:"bus",cancel:"Cancel",carpark:"Park & Ride","clear-button-label":"Clear","clear-search-history":"Clear search history",currentposition:"Current position",delete:"Delete","delete-old-searches-header":"Do you want to clear the search history?",departure:"Departure",destination:"Destination","give-origin":"Enter your origin.","give-destination":"Enter your destination",favourite:"Favourite",ferry:"Ferry","future-route":"Future route",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Own locations",loading:"Loading...","minute-short":"m",platform:"Platform",rail:"Train",required:"required field",search:"Search","search-address-or-place":"Search by address or place name","search-button-label":"Search","search-destination":"Search destination, route or stop","search-destination-index":"Enter destination","search-destination-results-but-no-search":"View results in the adjacent “Destination” tab","search-no-results":"No location","search-origin":"Search origin, route or stop","search-origin-index":"Enter origin","search-position":"Detect location","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Current selection: {{selection}}",street:"Street",subway:"Metro",station:"Station",stop:"Stop","stop-near-you":"Search stops and routes","stop-near-you-airplane":"Search flights or airports","stop-near-you-bus":"Search bus routes or stops","stop-near-you-citybike":"Search city bike stations","stop-near-you-rail":"Search train routes or stations","stop-near-you-subway":"Search metro routes or stations ","stop-near-you-tram":"Search tram routes or stops","stop-route-station":"Bus and stop search","today-at":"today at","tomorrow-at":"tomorrow at",tram:"Tram",track:"Track","use-own-position":"Use current location","select-from-map":"Select position from map","select-from-own-locations":"Select from own locations",venue:"Venue","via-point":"Via point",where:"Where to?",place:"Location"},fi:{address:"Osoite","address-place-or-business":"Osoite, paikka tai yritys","add-via-button-label":"Lisää välipiste","add-via-duration-button-label":"Aseta välipisteelle {{index}} pysähdyksen kesto","add-via-duration-button-label-close":"Avaa välipisteen {{index}} pysähdyksen kesto valitsin","add-via-duration-button-label-open":"Sulje välipisteen {{index}} pysähdyksen kesto valitsin",airplane:"Lentokone",arrival:"Perillä",back:"Takaisin",vehiclerentalstation:"Pyöräasema",bikepark:"Liityntäpyöräparkki",bus:"bussi",cancel:"Peruuta",carpark:"Liityntäpysäkointi","clear-button-label":"Tyhjennä","clear-search-history":"Tyhjennä hakuhistoria",currentposition:"Tämänhetkinen sijainti",delete:"Poista","delete-old-searches-header":"Haluatko tyhjentää hakuhistorian?",departure:"Lähtöaika",destination:"Määränpää",favourite:"Suosikki",ferry:"Lautta","future-route":"Tuleva reitti","give-origin":"Lähtöpaikka","give-destination":"Määränpää",origin:"Lähtöpaikka","origin-stop-near-you":"Lähtöpaikka",ownlocations:"Omat paikat",loading:"Ladataan...","minute-short":"min",platform:"Laituri",rail:"Juna",required:"pakollinen kenttä",search:"Etsi","search-address-or-place":"Hae osoitteella tai paikan nimellä","search-button-label":"Hae","search-destination":"Hae määränpäätä, linjaa tai pysäkkiä","search-destination-index":"Syötä määränpää","search-destination-results-but-no-search":"Katso tulokset viereiseltä Määränpää-välilehdeltä","search-no-results":"Ei tuloksia","search-origin":"Hae lähtöpaikkaa, linjaa tai pysäkkiä","search-origin-index":"Syötä lähtöpaikka","search-autosuggest-label":"Paikka, linja ja pysäkkihaku.","search-autosuggest-label-instructions-desktop":"Navigoi listassa nuolinäppäimillä ja valitse enterillä.","search-autosuggest-label-instructions-mobile":"Syötä sijainti ja navigoi listassa pyyhkäisemällä.","search-autosuggest-label-move-to-destination":"Valittuasi lähtöpaikan siirrytään suoraan määränpää-kenttään.","search-autosuggest-len":" Löydettiin {{count}} ehdotus","search-autosuggest-len_plural":" Löydettiin {{count}} ehdotusta","search-current-suggestion":"Tämänhetkinen valinta: {{selection}}","search-position":"Paikanna",street:"Katu",subway:"Metro",station:"Asema",stop:"Pysäkki","stop-near-you":"Linja, pysäkki tai asema","stop-near-you-airplane":"Hae lentoja tai lentoasemaa","stop-near-you-bus":"Hae bussilinjaa tai pysäkkiä","stop-near-you-citybike":"Hae kaupunkipyöräasemaa","stop-near-you-rail":"Hae lähijunaa tai asemaa","stop-near-you-subway":"Hae metrolinjaa tai asemaa","stop-near-you-tram":"Hae raitiolinjaa tai pysäkkiä","stop-route-station":"Linja- ja pysäkkihaku","today-at":"tänään klo","tomorrow-at":"huomenna klo",tram:"Raitiovaunu",track:"Raide","use-own-position":"Käytä nykyistä sijaintia","select-from-map":"Valitse sijainti kartalta","select-from-own-locations":"Valitse omista paikoista",venue:"Paikka","via-point":"Välipiste",where:"Minne mennään?",place:"Paikka"},sv:{address:"Adress","address-place-or-business":"Adress, plats eller företag","add-via-button-label":"Lägg till viapunkt","add-via-duration-button-label":"Ställ in varaktighet för viapunkten {{index}}","add-via-duration-button-label-close":"Stäng väljaren för varaktighet vid via-punkten {{index}}","add-via-duration-button-label-open":"Öppna väljaren för varaktighet vid via-punkten {{index}}",airplane:"Flyg",arrival:"Anländer",back:"Tillbaka",bikerentalstation:"Stadscykelstation",bikepark:"Anslutningsparkering för cyklar",bus:"Bussi",cancel:"Avbryt",carpark:"Infartsparkering","clear-button-label":"Töm","clear-search-history":"Töm sökhistoriken",currentposition:"Nuvarande position",delete:"Ta bort","delete-old-searches-header":"Vill du tömma sökhistoriken?",departure:"Avgångstid",destination:"Destination",favourite:"Favorit",ferry:"Färja","future-route":"Framtida rutt","give-destination":"Skriv in din destination","give-origin":"Skriv in din avfärdsplats",origin:"Avfärdsplats","origin-stop-near-you":"Avfärdsplats",ownlocations:"Egna platser",loading:"Laddar...","minute-short":"min",platform:"Plattform",rail:"Tåg",required:"obligatoriskt fält",search:"Sök","search-address-or-place":"Sök med adressen eller platsens namn","search-button-label":"Sök","search-destination":"Sök destination, linje eller hållplats","search-destination-index":"Skriv destination","search-destination-results-but-no-search":"Se resultaten under fliken Destination","search-no-results":"Inga sökresultat","search-origin":"Sök avfärdsplats, linje eller hållplats","search-origin-index":"Skriv avfärdsplats","search-position":"Sök position","search-autosuggest-label":"Plats, linje och hållplatssökning.","search-autosuggest-label-instructions-desktop":"Navigera listan med piltangenterna och välj med Enter-tangeten.","search-autosuggest-label-instructions-mobile":"Ange platsen och navigera i listan genom att svepa.","search-autosuggest-label-move-to-destination":"Efter att du valt avgångsplatsen tas du direkt till Destination-fältet.","search-autosuggest-len":"Hittade {{count}} förslag","search-current-suggestion":"Nuvarande val: {{selection}}",street:"Gata",subway:"Metro",station:"Station",stop:"Hållplats","stop-near-you":"Sök hållplatser eller linjer","stop-near-you-airplane":"Sök flyg eller flygplatser","stop-near-you-bus":"Sök busslinjer eller hållplatser","stop-near-you-citybike":"Sök stadscykelstationer","stop-near-you-rail":"Sök närtåger eller stationer","stop-near-you-subway":"Sök metrolinjer eller stationer","stop-near-you-tram":"Sök spårvagnlinjer eller hållplatser","stop-route-station":"Buss och stopp sökningen","today-at":"i dag kl","tomorrow-at":"i morgon",tram:"Spårvagn",track:"Spår","use-own-position":"Använd min position","select-from-map":"Välj position från kartan","select-from-own-locations":"Välj från egna platser",venue:"Mötesplats","via-point":"Via punkt",where:"Vart vill du åka?",place:"Plats"}};function FM(M,z){void 0===z&&(z={});var b=z.insertAt;if(M&&"undefined"!=typeof document){var p=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");O.type="text/css","top"===b&&p.firstChild?p.insertBefore(O,p.firstChild):p.appendChild(O),O.styleSheet?O.styleSheet.cssText=M:O.appendChild(document.createTextNode(M))}}var UM={container:"styles_container__KXfyb",input:"styles_input__XmNBn",favourite:"styles_favourite__sjGcX",thin:"styles_thin__y3lnY",hasValue:"styles_hasValue__tzCTr",suggestionsContainerOpen:"styles_suggestionsContainerOpen__4AZDX",suggestionsContainer:"styles_suggestionsContainer__3dsEd",suggestionsList:"styles_suggestionsList__esTtR",suggestion:"styles_suggestion__7itfO",suggestionHighlighted:"styles_suggestionHighlighted__XUxvC","autosuggest-input-container":"styles_autosuggest-input-container__ZkKGO",origin:"styles_origin__ivlHi",destination:"styles_destination__y39VH","stop-route-station":"styles_stop-route-station__FneXd","autosuggest-input-icon":"styles_autosuggest-input-icon__uhYGQ","origin-stop-near-you":"styles_origin-stop-near-you__Ekwp-","clear-input":"styles_clear-input__Vx7B4","sr-only":"styles_sr-only__ZOrQT"};FM("input[type='text'] {\n margin: 0; }\n\n.styles_container__KXfyb {\n display: flex;\n width: 100%; }\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 16px;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n display: flex;\n width: 100%;\n height: 44px;\n border-radius: 5px;\n border: solid 1px #888;\n background-color: #fff;\n padding-left: 50px;\n padding-right: 44px;\n line-height: 1.2;\n letter-spacing: -0.5px;\n color: #333;\n box-sizing: border-box;\n -webkit-appearance: none;\n appearance: none; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_favourite__sjGcX {\n padding-left: 47px; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_thin__y3lnY {\n height: 34px; }\n .styles_container__KXfyb .styles_input__XmNBn:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color); }\n @media screen and (min-width: 768px) {\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 15px;\n height: 44px;\n padding-left: 49px; } }\n .styles_container__KXfyb .styles_input__XmNBn::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px; }\n\n.styles_hasValue__tzCTr {\n color: #333; }\n\n.styles_suggestionsContainerOpen__4AZDX {\n width: 100%;\n max-height: 44vh;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: solid 1px rgba(0, 0, 0, 0.1);\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n background-color: white;\n top: calc(3 * 0.875rem + 9px);\n z-index: 20; }\n\n.styles_suggestionsContainer__3dsEd {\n background-color: white;\n z-index: 20; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR li:hover {\n background: #f4f4f5; }\n\n.styles_suggestion__7itfO {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n display: block;\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap; }\n\n.styles_suggestionHighlighted__XUxvC {\n background-color: #f4f4f5; }\n\n.styles_autosuggest-input-container__ZkKGO {\n position: relative;\n width: 100%; }\n .styles_autosuggest-input-container__ZkKGO.styles_origin__ivlHi {\n z-index: 16; }\n .styles_autosuggest-input-container__ZkKGO.styles_destination__y39VH {\n z-index: 10; }\n .styles_autosuggest-input-container__ZkKGO.styles_stop-route-station__FneXd {\n z-index: 9; }\n\n.styles_autosuggest-input-icon__uhYGQ {\n display: flex;\n position: absolute;\n align-items: center;\n width: 16px;\n height: 100%;\n margin-top: 0;\n margin-left: 19px; }\n .styles_autosuggest-input-icon__uhYGQ svg {\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin__ivlHi svg {\n fill: #4ea700;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_destination__y39VH svg {\n fill: #ec5188;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_stop-route-station__FneXd svg, .styles_autosuggest-input-icon__uhYGQ.styles_favourite__sjGcX svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin-stop-near-you__Ekwp- svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n\nbutton.styles_clear-input__Vx7B4 {\n display: flex;\n position: absolute;\n padding: 14px 0;\n right: 0;\n width: 44px;\n height: 100%;\n color: var(--color);\n outline: none;\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.styles_clear-input__Vx7B4 svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.styles_clear-input__Vx7B4:focus {\n background-color: transparent;\n color: inherit;\n /* First apply outline that is used in Edge and Firefox */\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 button.styles_clear-input__Vx7B4:active {\n background-color: transparent;\n color: inherit; }\n button.styles_clear-input__Vx7B4:hover {\n background-color: transparent;\n color: inherit; }\n\n.styles_sr-only__ZOrQT:not(:focus, :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");var jM={"fullscreen-root":"MobileSearch_fullscreen-root__WkMna","combobox-container":"MobileSearch_combobox-container__sRkYS","right-column":"MobileSearch_right-column__erBFe","combobox-icon":"MobileSearch_combobox-icon__xd0iZ","combobox-label":"MobileSearch_combobox-label__OqGpe",container:"MobileSearch_container__k-UVq",input:"MobileSearch_input__HbTUj","clear-input":"MobileSearch_clear-input__ILVwN",hasValue:"MobileSearch_hasValue__NYhZy",suggestion:"MobileSearch_suggestion__UBz5O",suggestionHighlighted:"MobileSearch_suggestionHighlighted__7ef5G",suggestionsContainerOpen:"MobileSearch_suggestionsContainerOpen__g7zkI",suggestionsList:"MobileSearch_suggestionsList__3pEzf","clear-search-history":"MobileSearch_clear-search-history__wblhz","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__f6Rl7","mobile-modal":"MobileSearch_mobile-modal__hNdM6","mobile-modal-content":"MobileSearch_mobile-modal-content__Yzz-V"};FM("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileSearch_fullscreen-root__WkMna {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileSearch_combobox-container__sRkYS {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileSearch_combobox-container__sRkYS .MobileSearch_right-column__erBFe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileSearch_combobox-icon__xd0iZ {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileSearch_combobox-icon__xd0iZ svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileSearch_combobox-label__OqGpe {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileSearch_container__k-UVq {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileSearch_clear-input__ILVwN {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileSearch_clear-input__ILVwN svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileSearch_clear-input__ILVwN:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:active {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileSearch_hasValue__NYhZy {\n color: #333; }\n\n.MobileSearch_suggestion__UBz5O {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileSearch_suggestionHighlighted__7ef5G {\n background-color: #f4f4f5; }\n\n.MobileSearch_suggestionsContainerOpen__g7zkI {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileSearch_suggestionsContainerOpen__g7zkI .MobileSearch_suggestionsList__3pEzf {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileSearch_clear-search-history__wblhz {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileSearch_mobile-modal-overlay__f6Rl7 {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileSearch_mobile-modal__hNdM6 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileSearch_mobile-modal-content__Yzz-V {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n");var GM={"fullscreen-root":"MobileNoScroll_fullscreen-root__zQN50","combobox-container":"MobileNoScroll_combobox-container__RDEiT","right-column":"MobileNoScroll_right-column__0P3qe","combobox-icon":"MobileNoScroll_combobox-icon__LA0rD","combobox-label":"MobileNoScroll_combobox-label__-rYsj",container:"MobileNoScroll_container__CaIIv",input:"MobileNoScroll_input__Opft5","clear-input":"MobileNoScroll_clear-input__-4SQO",hasValue:"MobileNoScroll_hasValue__jR1iW",suggestion:"MobileNoScroll_suggestion__NAWcY",suggestionHighlighted:"MobileNoScroll_suggestionHighlighted__V0GuG",suggestionsContainerOpen:"MobileNoScroll_suggestionsContainerOpen__MRa5Y",suggestionsList:"MobileNoScroll_suggestionsList__NUpJE","clear-search-history":"MobileNoScroll_clear-search-history__Cjj-1","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__LbLie","mobile-modal":"MobileNoScroll_mobile-modal__-Rx-A","mobile-modal-content":"MobileNoScroll_mobile-modal-content__nfrCI"};FM("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_fullscreen-root__zQN50 {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileNoScroll_combobox-container__RDEiT {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileNoScroll_combobox-container__RDEiT .MobileNoScroll_right-column__0P3qe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileNoScroll_combobox-icon__LA0rD {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileNoScroll_combobox-icon__LA0rD svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileNoScroll_combobox-label__-rYsj {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileNoScroll_container__CaIIv {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5 {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileNoScroll_clear-input__-4SQO {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileNoScroll_clear-input__-4SQO svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileNoScroll_clear-input__-4SQO:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:active {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileNoScroll_hasValue__jR1iW {\n color: #333; }\n\n.MobileNoScroll_suggestion__NAWcY {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_suggestionHighlighted__V0GuG {\n background-color: #f4f4f5; }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y .MobileNoScroll_suggestionsList__NUpJE {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileNoScroll_clear-search-history__Cjj-1 {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileNoScroll_mobile-modal-overlay__LbLie {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileNoScroll_mobile-modal__-Rx-A {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileNoScroll_mobile-modal-content__nfrCI {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n scrollbar-width: none;\n /* Firefox */ }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y::-webkit-scrollbar {\n display: none;\n /* Safari and Chrome */ }\n");class VM extends m.default{constructor(M){super(M);const z=this;z.onSuggestionTouchMove=()=>{z.justSelectedSuggestion=!1,z.pressedSuggestion=null}}}const KM=({appElement:M,id:z,closeHandle:p,clearInput:O,value:o,suggestions:c,inputProps:A,fetchFunction:q,renderSuggestion:e,getSuggestionValue:n,ariaLabel:W,label:a,onSuggestionSelected:t,clearOldSearches:d,dialogHeaderText:i,dialogPrimaryButtonText:r,dialogSecondaryButtonText:s,clearInputButtonText:u,focusInput:R,color:f,hoverColor:l,accessiblePrimaryColor:L,searchOpen:N,fontWeights:X,showScroll:h})=>{var m;const g=h?jM:GM,T=`${z}-input`,_=`${z}-label`,[y,S]=b.useState(!1),v=B.default.useRef();b.useEffect((()=>{H.default.setAppElement(M)}),[]);const k=b.useCallback((()=>{p()})),E=(M,z)=>{"clear-search-history"===z.suggestion.type?S(!0):z.suggestion.properties.arrowClicked||t(M,z)},w=M=>{const z=M&&(M.key||M.which||M.keyCode)||"";return!(!z||![13," ","Spacebar"].concat([32,"Enter"]).includes(z))&&(M.preventDefault(),!0)},C=M=>"clear-search-history"===M.type?"":n(M),D=M=>"clear-search-history"===M.type?B.default.createElement("button",{type:"button",className:g["clear-search-history"]},M.labelId):e(M);return R&&null!==(m=v.current)&&void 0!==m&&m.input&&v.current.input.focus(),B.default.createElement(H.default,{isOpen:N,className:g["mobile-modal"],overlayClassName:g["mobile-modal-overlay"],onAfterClose:k,shouldCloseOnEsc:!0},B.default.createElement("div",{className:g["mobile-modal-content"],style:{"--color":`${f}`,"--accessible-primary-color":L,"--hover-color":`${l}`,"--font-weight-medium":X.medium}},B.default.createElement("div",{className:g["combobox-container"],htmlFor:T},B.default.createElement("button",{type:"button",className:g["combobox-icon"],onClick:()=>k(),onKeyDown:M=>w(M)&&k(),"aria-label":s,tabIndex:0},B.default.createElement(x.default,{img:"arrow"})),B.default.createElement("span",{className:g["right-column"]},B.default.createElement("span",{className:g["combobox-label"],id:_},a),B.default.createElement(VM,{alwaysRenderSuggestions:!0,id:z,suggestions:c,onSuggestionsFetchRequested:q,getSuggestionValue:C,renderSuggestion:D,focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>!0,inputProps:F({},A,{className:`${g.input} ${g[z]||""} ${A.value?g.hasValue:""}`,autoFocus:!0}),renderInputComponent:M=>B.default.createElement(B.default.Fragment,null,B.default.createElement("input",Object.assign({"aria-label":W,id:z},M)),o&&B.default.createElement("button",{type:"button",className:g["clear-input"],onClick:O,onKeyDown:M=>w(M)&&O(),"aria-label":u},B.default.createElement(x.default,{img:"close",color:f}))),theme:g,onSuggestionSelected:E,ref:v}))),B.default.createElement(Y.default,{appElement:M,isModalOpen:y,handleClose:()=>S(!1),headerText:i,primaryButtonText:r,secondaryButtonText:s,primaryButtonOnClick:()=>{d(),S(!1)},secondaryButtonOnClick:()=>S(!1),color:f,hoverColor:l,fontWeights:X})))};"production"!==process.env.NODE_ENV&&(KM.propTypes={appElement:N.default.string.isRequired,id:N.default.string.isRequired,closeHandle:N.default.func.isRequired,clearInput:N.default.func.isRequired,value:N.default.string,clearInputButtonText:N.default.string.isRequired,suggestions:N.default.array.isRequired,inputProps:N.default.shape({onChange:N.default.func.isRequired,onBlur:N.default.func.isRequired,value:N.default.string.isRequired,placeholder:N.default.string.isRequired,className:N.default.string.isRequired}).isRequired,fetchFunction:N.default.func.isRequired,getSuggestionValue:N.default.func.isRequired,renderSuggestion:N.default.func.isRequired,onSuggestionSelected:N.default.func.isRequired,label:N.default.string.isRequired,clearOldSearches:N.default.func.isRequired,ariaLabel:N.default.string,dialogHeaderText:N.default.string,dialogPrimaryButtonText:N.default.string,dialogSecondaryButtonText:N.default.string,focusInput:N.default.bool,color:N.default.string,hoverColor:N.default.string,accessiblePrimaryColor:N.default.string.isRequired,searchOpen:N.default.bool.isRequired,fontWeights:N.default.shape({medium:N.default.number.isRequired}).isRequired,showScroll:N.default.bool});var QM,JM=SM((function(M,z){var b;"undefined"!=typeof self&&self,M.exports=(b=B.default,function(){var M={888:function(M,z,b){var p,O;O=void 0!==b.g?b.g:"undefined"!=typeof window?window:this,p=function(){return function(M){var z={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},b=function(){var M={};return Array.prototype.forEach.call(arguments,(function(z){for(var b in z){if(!z.hasOwnProperty(b))return;M[b]=z[b]}})),M},p=function(M){"#"===M.charAt(0)&&(M=M.substr(1));for(var z,b=String(M),p=b.length,O=-1,o="",c=b.charCodeAt(0);++O<p;){if(0===(z=b.charCodeAt(O)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");o+=z>=1&&z<=31||127==z||0===O&&z>=48&&z<=57||1===O&&z>=48&&z<=57&&45===c?"\\"+z.toString(16)+" ":z>=128||45===z||95===z||z>=48&&z<=57||z>=65&&z<=90||z>=97&&z<=122?b.charAt(O):"\\"+b.charAt(O)}return"#"+o},O=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},o=function(z){return z?(b=z,parseInt(M.getComputedStyle(b).height,10)+z.offsetTop):0;var b},c=function(z,b,p){0===z&&document.body.focus(),p||(z.focus(),document.activeElement!==z&&(z.setAttribute("tabindex","-1"),z.focus(),z.style.outline="none"),M.scrollTo(0,b))},A=function(z,b,p,O){if(b.emitEvents&&"function"==typeof M.CustomEvent){var o=new CustomEvent(z,{bubbles:!0,detail:{anchor:p,toggle:O}});document.dispatchEvent(o)}};return function(q,e){var n,W,a,t,d={cancelScroll:function(M){cancelAnimationFrame(t),t=null,M||A("scrollCancel",n)},animateScroll:function(p,q,e){d.cancelScroll();var W=b(n||z,e||{}),i="[object Number]"===Object.prototype.toString.call(p),r=i||!p.tagName?null:p;if(i||r){var s=M.pageYOffset;W.header&&!a&&(a=document.querySelector(W.header));var u,R,f,l=o(a),L=i?p:function(z,b,p,o){var c=0;if(z.offsetParent)do{c+=z.offsetTop,z=z.offsetParent}while(z);return c=Math.max(c-b-p,0),o&&(c=Math.min(c,O()-M.innerHeight)),c}(r,l,parseInt("function"==typeof W.offset?W.offset(p,q):W.offset,10),W.clip),N=L-s,B=O(),X=0,h=function(M,z){var b=z.speedAsDuration?z.speed:Math.abs(M/1e3*z.speed);return z.durationMax&&b>z.durationMax?z.durationMax:z.durationMin&&b<z.durationMin?z.durationMin:parseInt(b,10)}(N,W),m=function(z){u||(u=z),X+=z-u,f=s+N*function(M,z){var b;return"easeInQuad"===M.easing&&(b=z*z),"easeOutQuad"===M.easing&&(b=z*(2-z)),"easeInOutQuad"===M.easing&&(b=z<.5?2*z*z:(4-2*z)*z-1),"easeInCubic"===M.easing&&(b=z*z*z),"easeOutCubic"===M.easing&&(b=--z*z*z+1),"easeInOutCubic"===M.easing&&(b=z<.5?4*z*z*z:(z-1)*(2*z-2)*(2*z-2)+1),"easeInQuart"===M.easing&&(b=z*z*z*z),"easeOutQuart"===M.easing&&(b=1- --z*z*z*z),"easeInOutQuart"===M.easing&&(b=z<.5?8*z*z*z*z:1-8*--z*z*z*z),"easeInQuint"===M.easing&&(b=z*z*z*z*z),"easeOutQuint"===M.easing&&(b=1+--z*z*z*z*z),"easeInOutQuint"===M.easing&&(b=z<.5?16*z*z*z*z*z:1+16*--z*z*z*z*z),M.customEasing&&(b=M.customEasing(z)),b||z}(W,R=(R=0===h?0:X/h)>1?1:R),M.scrollTo(0,Math.floor(f)),function(z,b){var O=M.pageYOffset;if(z==b||O==b||(s<b&&M.innerHeight+O)>=B)return d.cancelScroll(!0),c(p,b,i),A("scrollStop",W,p,q),u=null,t=null,!0}(f,L)||(t=M.requestAnimationFrame(m),u=z)};0===M.pageYOffset&&M.scrollTo(0,0),function(M,z,b){z||history.pushState&&b.updateURL&&history.pushState({smoothScroll:JSON.stringify(b),anchor:M.id},document.title,M===document.documentElement?"#top":"#"+M.id)}(p,i,W),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?c(p,Math.floor(L),!1):(A("scrollStart",W,p,q),d.cancelScroll(!0),M.requestAnimationFrame(m))}}},i=function(z){if(!z.defaultPrevented&&!(0!==z.button||z.metaKey||z.ctrlKey||z.shiftKey)&&"closest"in z.target&&(W=z.target.closest(q))&&"a"===W.tagName.toLowerCase()&&!z.target.closest(n.ignore)&&W.hostname===M.location.hostname&&W.pathname===M.location.pathname&&/#/.test(W.href)){var b,O;try{b=p(decodeURIComponent(W.hash))}catch(M){b=p(W.hash)}if("#"===b){if(!n.topOnEmptyHash)return;O=document.documentElement}else O=document.querySelector(b);(O=O||"#top"!==b?O:document.documentElement)&&(z.preventDefault(),function(z){if(history.replaceState&&z.updateURL&&!history.state){var b=M.location.hash;b=b||"",history.replaceState({smoothScroll:JSON.stringify(z),anchor:b||M.pageYOffset},document.title,b||M.location.href)}}(n),d.animateScroll(O,W))}},r=function(M){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(n)){var z=history.state.anchor;"string"==typeof z&&z&&!(z=document.querySelector(p(history.state.anchor)))||d.animateScroll(z,null,{updateURL:!1})}};return d.destroy=function(){n&&(document.removeEventListener("click",i,!1),M.removeEventListener("popstate",r,!1),d.cancelScroll(),n=null,W=null,a=null,t=null)},function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";d.destroy(),n=b(z,e||{}),a=n.header?document.querySelector(n.header):null,document.addEventListener("click",i,!1),n.updateURL&&n.popstate&&M.addEventListener("popstate",r,!1)}(),d}}(O)}.apply(z,[]),void 0===p||(M.exports=p)},253:function(M,z,b){var p=this&&this.__createBinding||(Object.create?function(M,z,b,p){void 0===p&&(p=b),Object.defineProperty(M,p,{enumerable:!0,get:function(){return z[b]}})}:function(M,z,b,p){void 0===p&&(p=b),M[p]=z[b]}),O=this&&this.__exportStar||function(M,z){for(var b in M)"default"===b||Object.prototype.hasOwnProperty.call(z,b)||p(z,M,b)};Object.defineProperty(z,"__esModule",{value:!0}),O(b(720),z),O(b(646),z),O(b(87),z),O(b(641),z),O(b(91),z),O(b(183),z),O(b(376),z),O(b(45),z),O(b(840),z),O(b(586),z),O(b(219),z),O(b(510),z),O(b(333),z),O(b(23),z),O(b(348),z),O(b(197),z)},87:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useArrowNavigation=void 0;var p=b(156);z.useArrowNavigation=function(M){var z=M.listItems,b=M.onArrowUpOrDown,O=(0,p.useState)(0),o=O[0],c=O[1],A=(0,p.useCallback)((function(M){c(M)}),[z]),q=function(M){var p=M.key;if(null==z?void 0:z.length)if("ArrowUp"===p)b&&b(),M.preventDefault(),A(o>0?o-1:z.length-1);else{if("ArrowDown"!==p)return;b&&b(),M.preventDefault(),o<z.length-1?A(o+1):A(0)}};return(0,p.useEffect)((function(){return window.addEventListener("keydown",q),function(){return window.removeEventListener("keydown",q)}})),(0,p.useEffect)((function(){A(0)}),[z]),{selectedIndex:o}}},333:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useDebounce=void 0;var p=b(156);z.useDebounce=function(M,z){void 0===z&&(z=300);var b=(0,p.useState)(M),O=b[0],o=b[1];return(0,p.useEffect)((function(){var b=setTimeout((function(){o(M)}),z);return function(){clearTimeout(b)}}),[M,z]),O}},23:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useElementSize=void 0;var p=b(156);z.useElementSize=function(){var M,z,b=(0,p.useRef)(null);return[b,{width:null===(M=null==b?void 0:b.current)||void 0===M?void 0:M.clientWidth,height:null===(z=null==b?void 0:b.current)||void 0===z?void 0:z.clientHeight}]},z.default=z.useElementSize},641:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIntersectionObserver=void 0;var p=b(156);z.useIntersectionObserver=function(M){var z=(0,p.useRef)(null),b=(0,p.useState)(!1),O=b[0],o=b[1],c=function(M){var z=M[0];o(z.isIntersecting)};return(0,p.useEffect)((function(){if(window&&window.IntersectionObserver){var b=new IntersectionObserver(c,M),p=z.current;return z.current&&b.observe(z.current),function(){p&&b.unobserve(p)}}o(!1)}),[z,M]),{containerRef:z,isVisible:O}},z.default=z.useIntersectionObserver},91:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsBreakpoint=void 0;var p=b(156),O=b(253),o={xs:1,mobileSmall:320,mobile:375,tablet:768,tabletLarge:920,desktopSmall:1024,desktop:1260,desktopLarge:1440};z.useIsBreakpoint=function(M){var z="string"==typeof M?o[M]:M,b=(0,p.useState)(null),c=b[0],A=b[1],q=(0,p.useCallback)((function(){A(window.innerWidth)}),[]);return(0,p.useEffect)((function(){q()}),[]),(0,O.useOnResize)(q),c>=z},z.default=z.useIsBreakpoint},45:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0});var p=b(156),O={"crazy-egg":"crazyegg.com",youtube:"youtube.com"},o={PrivacyManagerAPI:{action:"getConsentDecision",timestamp:(new Date).getTime(),self:"hsl.fi"}};z.default=function(M){var z=(0,p.useState)(!1),b=z[0],c=z[1],A=function(){var z,b=null===(z=window.truste)||void 0===z?void 0:z.cma;if(b){var p=b.callApi("getConsent","hsl.fi",O[M],"hsl.fi");c("approved"===(null==p?void 0:p.consent))}else console.error("TrustArc api not found, returning isCookieEnabled as false")},q=function(M){if("string"==typeof(null==M?void 0:M.origin)&&M.origin.includes("trustarc")&&"string"==typeof(null==M?void 0:M.data))try{var z=JSON.parse(null==M?void 0:M.data);"submit_preferences"===(null==z?void 0:z.message)&&A()}catch(M){return}};return(0,p.useEffect)((function(){A()}),[M]),(0,p.useEffect)((function(){setTimeout(A,0),setTimeout(A,100),setTimeout(A,1e3)}),[]),(0,p.useEffect)((function(){return window.top.postMessage(JSON.stringify(o),"*"),window.addEventListener("message",q,!1),function(){return window.removeEventListener("message",q)}}),[]),b}},376:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsLoadingAfterError=void 0;var p=b(156);z.useIsLoadingAfterError=function(M,z){var b=(0,p.useState)(z),O=b[0],o=b[1];return(0,p.useEffect)((function(){M||o(z)}),[M,z]),M&&O}},348:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsMobile=void 0;var p=b(91);z.useIsMobile=function(){return!(0,p.useIsBreakpoint)("tablet")},z.default=z.useIsMobile},183:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsomorphicLayoutEffect=void 0;var p=b(156);z.useIsomorphicLayoutEffect="undefined"!=typeof window?p.useLayoutEffect:p.useEffect,z.default=z.useIsomorphicLayoutEffect},586:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOnLoseFocusWithin=void 0;var p=b(156);z.useOnLoseFocusWithin=function(M){var z=M.ref,b=M.callback,O=M.watch;(0,p.useEffect)((function(){var M=function(){var M;if(O)return(null===(M=z.current)||void 0===M?void 0:M.matches(":focus-within"))?void 0:b()};return document.addEventListener("keyup",M),function(){return document.removeEventListener("keyup",M)}}),[b,z,O])},z.default=z.useOnLoseFocusWithin},197:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOnResize=void 0;var p=b(156);z.useOnResize=function(M){(0,p.useEffect)((function(){var z=function(){M(window.innerWidth)};return window.addEventListener("resize",z,{passive:!0}),function(){return window.removeEventListener("resize",z)}}),[])},z.default=z.useOnResize},510:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOnWindowFocus=void 0;var p=b(156);z.useOnWindowFocus=function(M){(0,p.useEffect)((function(){var z=function(){M&&"visible"===document.visibilityState&&M()};return window.addEventListener("visibilitychange",z,!1),function(){return window.removeEventListener("visibilitychange",z)}}),[M])}},720:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOutsideReacter=void 0;var p=b(156);z.useOutsideReacter=function(M,z){function b(b){M.current&&!M.current.contains(b.target)&&z()}(0,p.useEffect)((function(){return document.addEventListener("mousedown",b),function(){document.removeEventListener("mousedown",b)}}))}},219:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0});var p=b(156);z.default=function(){var M=(0,p.useRef)(null);return(0,p.useEffect)((function(){M.current&&(M.current(),M.current=null)})),function(z){M.current=z}}},646:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useScrollLock=void 0;var p=b(156);z.useScrollLock=function(){return{lock:(0,p.useCallback)((function(){var M=window.scrollY+"px",z=document.body;z.style.position="fixed",z.style.top="-"+M}),[]),unlock:(0,p.useCallback)((function(){var M=document.body,z=M.style.top,b=-1*parseInt(z||"0");M.style.position="",M.style.top="",b&&window.scrollTo(0,-1*parseInt(z||"0"))}),[])}}},840:function(M,z,b){var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(z,"__esModule",{value:!0}),z.useSmoothScroll=void 0;var O=b(156),o=p(b(888));z.useSmoothScroll=function(M){var z=(0,O.useRef)(null),b=M.ref,p=M.offset,c=void 0===p?0:p,A=M.speed,q=void 0===A?500:A;return(0,O.useEffect)((function(){z.current=new o.default(null,{speed:q,speedAsDuration:!0})}),[]),(0,O.useCallback)((function(){b&&z.current&&z.current.animateScroll(b.current,null,{offset:function(){return c},updateURL:!1})}),[c,b])}},156:function(M){M.exports=b}},z={};function p(b){var O=z[b];if(void 0!==O)return O.exports;var o=z[b]={exports:{}};return M[b].call(o.exports,o,o.exports,p),o.exports}return p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(M){if("object"==typeof window)return window}}(),p(253)}())})),ZM=(QM=JM)&&QM.__esModule&&Object.prototype.hasOwnProperty.call(QM,"default")?QM.default:QM;HM.locale("en"),X.default.init({fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}});"production"!==process.env.NODE_ENV&&N.default.node;const $M=M=>{if(!M||!M.GTFS.platform)return;const{modes:z,platform:b}=M.GTFS;return[z&&"RAIL"===z[0]?X.default.t("track"):X.default.t("platform"),b]};function Mz(M){if("FutureRoute"!==M.type){if("SelectFromMap"===M.type)return["",X.default.t("select-from-map")];if("CurrentLocation"===M.type)return["",X.default.t("use-own-position")];if("SelectFromOwnLocations"===M.type)return["",X.default.t("select-from-own-locations")];let b,[p,O]=_M(M.properties,!0);if(M.properties.layer.toLowerCase().includes("bikerental")||M.properties.layer.toLowerCase().includes("bikestation")){b=X.default.t("vehiclerentalstation");return[b,p,void 0,M.properties.labelId]}if("bikepark"===M.properties.layer)return b=X.default.t("bikepark"),[b,p,void 0,void 0];if("carpark"===M.properties.layer)return b=X.default.t("carpark"),[b,p,void 0,void 0];if(M.properties.mode)b=X.default.t(M.properties.mode.toLowerCase().replace("favourite",""));else{const z=M.properties.layer.replace("route-","").toLowerCase().replace("favourite","");b=X.default.t(z)}if(M.properties.id&&("stop"===M.properties.layer||"station"===M.properties.layer)){var z;const o=TM(M.properties),c=null===(z=M.properties.addendum)||void 0===z?void 0:z.GTFS.modes,A=$M(M.properties.addendum);return[b,iM(p,o),O,o,c,A]}if("favouriteStop"===M.properties.layer||"favouriteStation"===M.properties.layer){const{address:z,code:o}=M.properties;return[b,z?iM(z.split(",")[0],o):p,O,o,void 0,$M(M.properties.addendum)]}return[b,p,O]}const{origin:b,destination:p}=M.properties,O=b.locality?`, ${b.locality} foobar`:"",o=p.locality?`, ${p.locality}`:"",c=b.name,A=p.name;return[X.default.t("future-route"),`${X.default.t("origin")} ${c}${O} ${X.default.t("destination")} ${A}${o}`,M.translatedText]}function zz(M){const z=HM.unix(M.properties.time);let b=M.properties.arriveBy?X.default.t("arrival"):X.default.t("departure");return b=z.isSame(HM(),"day")?`${b} ${X.default.t("today-at")}`:z.isSame(HM().add(1,"day"),"day")?`${b} ${X.default.t("tomorrow-at")}`:`${b} ${z.format("dd D.M.")}`,b=`${b} ${HM(z).format("HH:mm")}`,b}const bz=M=>"SelectFromOwnLocations"===M.type||"back"===M.type?"":function(M){const z=_M(M,!0);switch(M.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return z[1]||z[0];case"favouriteVehicleRentalStation":case"favouritePlace":return z[0];default:return z.length>1&&""!==z[1]?z.join(", "):z[1]||z[0]}}(M.properties);class pz extends B.default.Component{constructor(M){super(M),this.onChange=(M,{newValue:z,method:b})=>{const p={value:this.fInput||z||"",renderMobileSearch:this.props.isMobile};if(this.fInput=null,this.state.editing){if("enter"!==b||this.state.valid){if(this.state.typingTimer&&clearTimeout(this.state.typingTimer),"type"===b){const M=setTimeout((()=>{this.setState({typing:!1})}),1e3);p.typingTimer=M,p.typing=!0}this.setState(p)}}else p.editing=!0,this.setState(p,(()=>this.fetchFunction({value:z||""})))},this.onBlur=()=>{this.state.renderMobileSearch||(this.state.editing&&this.input.focus(),this.setState({editing:!1,renderMobileSearch:!1,value:this.props.value}))},this.onSelected=(M,z)=>{if(this.state.valid){if("SelectFromOwnLocations"===z.suggestion.type)return void this.setState({sources:["Favourite","Back"],ownPlaces:!0,pendingSelection:z.suggestion.type,value:""},(()=>{this.fetchFunction({value:""})}));if("back"===z.suggestion.type||"FutureRoute"===z.suggestion.type)return void this.setState({sources:this.props.sources,ownPlaces:!1,pendingSelection:z.suggestion.type,suggestionIndex:z.suggestionIndex},(()=>{this.fetchFunction({value:""})}));this.selectionDone=!0,this.setState({editing:!1,value:z.suggestionValue},(()=>{this.input.blur(),this.props.handleViaPoints?this.props.handleViaPoints(z.suggestion,z.suggestionIndex):this.props.onSelect(z.suggestion,this.props.id),this.setState({renderMobileSearch:!1,sources:this.props.sources,ownPlaces:!1,suggestions:[]},(()=>{this.selectionDone=!1})),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange(),this.props.isMobile&&this.closeMobileSearch()}))}else this.setState((M=>({pendingSelection:M.value})),(()=>this.checkPendingSelection()))},this.onSuggestionsClearRequested=()=>{this.setState({suggestions:[],sources:this.props.sources,ownPlaces:!1,editing:!1})},this.checkPendingSelection=()=>{"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection||!this.state.valid?this.state.pendingSelection&&this.state.valid&&this.setState({pendingSelection:null,editing:!1},(()=>{this.state.suggestions.length&&(this.input.blur(),this.props.onSelect(this.state.suggestions[this.state.suggestionIndex],this.props.id),this.props.isMobile&&this.closeMobileSearch(),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange())})):this.setState({pendingSelection:null,editing:!0},(()=>{this.input.focus()}))},this.clearButton=()=>B.default.createElement("button",{type:"button",className:UM["clear-input"],onClick:this.clearInput,"aria-label":X.default.t("clear-button-label")},B.default.createElement(x.default,{img:"close",color:this.props.color})),this.fetchFunction=({value:M,cleanExecuted:z})=>this.setState({valid:!1,cleanExecuted:z||!1},(()=>{if(this.selectionDone)return;const z=I.default(this.props.targets)||this.props.targets.includes("Locations");let b;this.state.ownPlaces?(b=["Locations"],(I.default(this.props.targets)||this.props.targets.includes("Stops"))&&b.push("Stops"),(I.default(this.props.targets)||this.props.targets.includes("VehicleRentalStations"))&&b.push("VehicleRentalStations")):I.default(this.props.targets)||(b=[...this.props.targets],z&&!this.props.isMobile&&(I.default(this.props.sources)||this.props.sources.includes("Favourite"))&&b.push("SelectFromOwnLocations"));((M,z,b,p,O,o,c,A,q,e)=>{A(null),mM(M,z,b,p,O,o,c,A,q,e)})(b,this.state.sources&&this.state.sources.filter((M=>!(z&&"Favourite"===M&&!this.state.ownPlaces&&!this.props.isMobile))),this.props.transportMode,this.props.searchContext,this.props.filterResults,this.props.geocodingSize,{input:M||""},(z=>{if(null==z)return;const b=(z.results||[]).filter((M=>"FutureRoute"!==M.type||"FutureRoute"===M.type&&M.properties.time>HM().unix())).map((M=>{if("CurrentLocation"===M.type||"SelectFromMap"===M.type||"SelectFromOwnLocations"===M.type||"back"===M.type){const z=F({},M);return z.properties.labelId=X.default.t(M.properties.labelId),z}return M}));M!==this.state.value&&M!==this.state.pendingSelection&&"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection&&"FutureRoute"!==this.state.pendingSelection||this.setState({valid:!0,suggestions:b},(()=>this.checkPendingSelection()))}),this.props.pathOpts,this.props.refPoint)})),this.clearInput=()=>{const M={editing:!0,value:"",sources:this.props.sources,ownPlaces:!1,renderMobileSearch:this.props.isMobile};this.setState(M,(()=>this.fetchFunction({value:"",cleanExecuted:!0}))),this.props.onClear&&this.props.onClear(this.props.id),this.input.focus()},this.inputClicked=M=>{if(this.input.focus(),this.clearLocationText(),this.props.isMobile&&this.props.lock(),this.state.editing)this.props.isMobile&&!this.state.renderMobileSearch&&this.setState({renderMobileSearch:!0});else{const z={editing:!0,pendingSelection:null,renderMobileSearch:this.props.isMobile},b={editing:!0,pendingSelection:null,value:M};this.state.suggestions.length?(this.fetchFunction({value:this.state.value}),this.setState(z)):"object"!=typeof M&&M?this.setState(b,(()=>this.fetchFunction({value:M}))):this.setState(z,(()=>this.fetchFunction({value:this.state.value})))}},this.storeInputReference=M=>{null!==M&&(this.input=M.input,this.props.storeRef&&this.props.storeRef(M.input))},this.fillInput=M=>{this.fInput=M.properties.name;const z={editing:!0,value:M.properties.name,checkPendingSelection:M,valid:!0};this.setState(z),this.fetchFunction({value:M.properties.name}),this.input.focus()},this.renderItem=M=>{const z="FutureRoute"===M.type?F({},M,{translatedText:zz(M)}):M,b=Mz(M);return B.default.createElement(E.default,{item:z,content:b,loading:!this.state.valid,isMobile:this.props.isMobile,ariaFavouriteString:X.default.t("favourite"),color:this.props.color,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fillInput:this.fillInput,fontWeights:this.props.fontWeights,getAutoSuggestIcons:this.props.getAutoSuggestIcons,modeIconColors:this.props.modeIconColors,modeSet:this.props.modeSet})},this.closeMobileSearch=()=>{this.props.unlock(),this.setState({renderMobileSearch:!1,value:this.props.value},(()=>{window.scrollTo(0,this.state.scrollY),this.onSuggestionsClearRequested()}))},this.keyDown=M=>{if(this.selectionDone)return;const z=M.key;if("Escape"===z&&this.setState({editing:!1}),this.state.editing)return"Enter"===z&&""!==this.state.value&&this.setState({pendingSelection:!0},(()=>{this.fetchFunction({value:this.state.value})})),void this.inputClicked();if("Enter"!==z&&"ArrowDown"!==z||""!==this.state.value){if("ArrowDown"===z&&""!==this.state.value){const M={editing:!0,value:this.state.value};this.setState(M,(()=>this.fetchFunction({value:this.state.value})))}this.state.editing||this.setState({editing:!0}),"Tab"===z&&this.onBlur()}else this.clearInput()},this.suggestionAsAriaContent=()=>{let M=[];const z=this.state.suggestions[0];return z&&(z.type&&z.type.includes("Favourite")&&M.push(X.default.t("favourite")),M=M.concat(Mz(this.state.suggestions[0]))),[...new Set(M)].join(" - ")},this.clearOldSearches=()=>{const{context:M,clearOldSearches:z,clearFutureRoutes:b}=this.props.searchContext;M&&z&&(z(M),b&&b(M),this.fetchFunction({value:this.state.value}))},this.isOriginDestinationOrViapoint=()=>"origin"===this.props.id||"destination"===this.props.id||"via-point"===this.props.id||"origin-stop-near-you"===this.props.id,this.clearLocationText=()=>{["Valittu sijainti","Nykyinen sijaintisi","Current position","Selected location","Vald position","Använd min position","Min position","Käytä nykyistä sijaintia","Use current location","Your current location"].includes(this.state.value)&&this.clearInput()},this.onFocus=()=>{this.clearLocationText();const M=window.pageYOffset;return this.setState({scrollY:M})},HM.tz.setDefault(M.timeZone),HM.locale(M.lang),this.state={value:M.value,suggestions:[],editing:!1,valid:!0,renderMobileSearch:!1,sources:M.sources,ownPlaces:!1,typingTimer:null,typing:!1,pendingSelection:null,suggestionIndex:0,cleanExecuted:!1,scrollY:0},Object.keys(YM).forEach((M=>{X.default.addResourceBundle(M,"translation",YM[M])}))}shouldComponentUpdate(M,z){return!w.default(z,this.state)||!w.default(M,this.props)}componentDidUpdate(){X.default.language!==this.props.lang&&X.default.changeLanguage(this.props.lang)}UNSAFE_componentWillReceiveProps(M){M.value===this.state.value||this.state.editing||this.setState({value:M.value})}render(){X.default.language!==this.props.lang&&X.default.changeLanguage(this.props.lang);const{value:M,suggestions:z,renderMobileSearch:b,cleanExecuted:p}=this.state,O={placeholder:this.props.translatedPlaceholder?this.props.translatedPlaceholder:X.default.t(this.props.placeholder),value:M,onChange:this.onChange,onBlur:this.onBlur,className:`${UM.input} ${this.props.isMobile&&this.props.transportMode?UM.thin:""} ${UM[this.props.id]||""} ${this.state.value?UM.hasValue:""} ${this.props.inputClassName}`,onKeyDown:this.keyDown,required:this.props.required},o=this.props.id.replace("searchfield-","");let c=this.props.ariaLabel||X.default.t(o);c=c.replace("searchfield-","").concat(".");const A=this.props.required?`${X.default.t("required")}.`:"",q=this.props.isMobile?X.default.t("search-autosuggest-label-instructions-mobile"):X.default.t("search-autosuggest-label-instructions-desktop"),e="origin"===this.props.id?X.default.t("search-autosuggest-label-move-to-destination"):"",n=q.concat(" ").concat(e),W=X.default.t("search-autosuggest-len",{count:z.length}),a=()=>this.suggestionAsAriaContent()||this.props.value?X.default.t("search-current-suggestion",{selection:this.suggestionAsAriaContent()||this.props.value}):"";return B.default.createElement(B.default.Fragment,null,B.default.createElement("span",{className:UM["sr-only"],role:"alert"},!this.state.typing&&this.state.editing&&`${W} ${a()}`),this.props.isMobile&&B.default.createElement(KM,{searchOpen:b,appElement:this.props.appElement,clearOldSearches:this.clearOldSearches,id:this.props.id,clearInput:this.clearInput,value:this.state.value,suggestions:[...z,{type:"clear-search-history",labelId:X.default.t("clear-search-history")}],inputProps:F({},O,{placeholder:this.isOriginDestinationOrViapoint()?X.default.t("address-place-or-business"):O.placeholder}),fetchFunction:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:bz,renderSuggestion:this.renderItem,closeHandle:this.closeMobileSearch,ariaLabel:A.concat(" ").concat(c).concat(" ").concat(a()),label:this.props.mobileLabel?this.props.mobileLabel:X.default.t(this.props.id),onSuggestionSelected:this.onSelected,dialogHeaderText:X.default.t("delete-old-searches-header"),dialogPrimaryButtonText:X.default.t("delete"),dialogSecondaryButtonText:X.default.t("cancel"),clearInputButtonText:X.default.t("clear-button-label"),focusInput:p,color:this.props.color,hoverColor:this.props.hoverColor,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fontWeights:this.props.fontWeights,showScroll:this.props.showScroll}),!b&&B.default.createElement("div",{className:h.default(UM["autosuggest-input-container"],UM[this.props.id]),style:{"--color":`${this.props.color}`,"--hover-color":`${this.props.hoverColor}`}},this.props.icon&&B.default.createElement("div",{className:h.default(UM["autosuggest-input-icon"],UM[this.props.id],this.props.inputClassName&&`${this.props.inputClassName}-input-icon`),"aria-label":A.concat(" ").concat(c).concat(" ").concat(X.default.t("search-autosuggest-label"))},B.default.createElement(x.default,{img:`${this.props.icon}`})),B.default.createElement(m.default,{alwaysRenderSuggestions:this.state.editing,id:this.props.id,suggestions:z,onSuggestionsFetchRequested:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:bz,renderSuggestion:this.renderItem,inputProps:F({},O,{onFocus:this.onFocus}),focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>this.state.editing,highlightFirstSuggestion:!this.state.ownPlaces,theme:UM,renderInputComponent:M=>B.default.createElement(B.default.Fragment,null,B.default.createElement("label",{className:UM["sr-only"],htmlFor:this.props.id},a().concat(" ").concat(A).concat(" ").concat(c).concat(" ").concat(n)),B.default.createElement("input",Object.assign({"aria-label":a().concat(" ").concat(A).concat(" ").concat(c).concat(" ").concat(n),id:this.props.id,onClick:this.inputClicked,onKeyDown:this.keyDown},M)),this.state.value&&this.clearButton()),onSuggestionSelected:this.onSelected,ref:this.storeInputReference})))}}pz.defaultProps={autoFocus:!1,className:"",icon:void 0,value:"",transportMode:void 0,lang:"fi",sources:[],isMobile:!1,color:"#007ac9",hoverColor:"#0062a1",accessiblePrimaryColor:"#0074be",timeZone:"Europe/Helsinki",pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},modeIconColors:{"mode-bus":"#007ac9","mode-rail":"#8c4799","mode-tram":"#008151","mode-metro":"#ed8c00","mode-ferry":"#007A97","mode-citybike":"#f2b62d","mode-funicular":"#ff00ff"},required:!1,modeSet:void 0,showScroll:!1,refPoint:{}},"production"!==process.env.NODE_ENV&&(pz.propTypes={appElement:N.default.string.isRequired,autoFocus:N.default.bool,className:N.default.string,icon:N.default.string,id:N.default.string.isRequired,placeholder:N.default.string.isRequired,translatedPlaceholder:N.default.string,value:N.default.string,searchContext:N.default.any.isRequired,ariaLabel:N.default.string,onSelect:N.default.func,transportMode:N.default.string,filterResults:N.default.func,geocodingSize:N.default.number,onClear:N.default.func,storeRef:N.default.func,handleViaPoints:N.default.func,focusChange:N.default.func,lang:N.default.string,sources:N.default.arrayOf(N.default.string),targets:N.default.arrayOf(N.default.string),isMobile:N.default.bool,color:N.default.string,hoverColor:N.default.string,accessiblePrimaryColor:N.default.string,timeZone:N.default.string,pathOpts:N.default.shape({routesPrefix:N.default.string,stopsPrefix:N.default.string}),mobileLabel:N.default.string,lock:N.default.func.isRequired,unlock:N.default.func.isRequired,refPoint:N.default.shape({address:N.default.string,lat:N.default.number,lon:N.default.number}),inputClassName:N.default.string,fontWeights:N.default.shape({medium:N.default.number}),modeIconColors:N.default.object,getAutoSuggestIcons:N.default.object,required:N.default.bool,modeSet:N.default.string,showScroll:N.default.bool,isEmbedded:N.default.bool});const Oz=(oz=pz,M=>{const{lock:z,unlock:b}=ZM.useScrollLock();return B.default.createElement(oz,Object.assign({lock:z,unlock:b},M))});var oz;M.default=Oz,Object.defineProperty(M,"__esModule",{value:!0})}));
|
|
13
|
+
function z(M,z,b,p){var O={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[M+" Tage",M+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[M+" Monate",M+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[M+" Jahre",M+" Jahren"]};return z?O[b][0]:O[b][1]}return M.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:z,mm:"%d Minuten",h:z,hh:"%d Stunden",d:z,dd:z,w:z,ww:"%d Wochen",M:z,MM:z,y:z,yy:z},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},b(kM)}));const YM={de:{address:"Adresse","address-place-or-business":"Adress, Ort or Geschäft","add-via-button-label":"Füge Zwischenziel hinzu","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flug",arrival:"Ankunft",back:"Zurück",bikerentalstation:"Leihrad-Station",bus:"Bus",cancel:"Abbrechen","clear-button-label":"Löschen","clear-search-history":"Suchhistorie löschen",currentposition:"Aktuelle Position",delete:"Löschen","delete-old-searches-header":"Wollen Sie die Such-Historie löschen?",departure:"Abfahrt",destination:"Ziel","give-origin":"Start eingeben.","give-destination":"Ziel eingeben.",favourite:"Favoriten",ferry:"Fähre","future-route":"Zukünftige Verbindung",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Eigene Favoriten",loading:"Laden...","minute-short":"min",rail:"Zug",search:"Suche","search-address-or-place":"Suche anhand von Adresse oder Ortsangabe","search-button-label":"Suche","search-destination":"Suche Zielort, Linie or Haltestelle","search-destination-index":"Zielort eingeben","search-destination-results-but-no-search":"Ergebnisse in “Zielort”-Reiter anzeigen","search-no-results":"Kein Ort gefunden.","search-origin":"Suche Startort, Linie oder Haltestelle","search-origin-index":"Startort eingeben","search-position":"Standort ermitteln","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Aktuelle Auswahl: {{selection}}",street:"Straße",subway:"U-Bahn",station:"Station",stop:"Haltestelle","stop-near-you":"Suche Haltestellen und Linien in der Nähe","stop-near-you-bus":"Suche Buslinien or Haltestellen","stop-near-you-citybike":"Suche Leihrad-Stationen","stop-near-you-rail":"Suche Zugverbindungen oder Bahnhöfe","stop-near-you-subway":"Suche U-Bahn-Linien oder Haltestellen","stop-near-you-tram":"Suche Stadtbahn-Haltestellen-Suche","today-at":"Heute um","tomorrow-at":"Morgen um",tram:"Straßenbahn","use-own-position":"Benutze aktuellen Standort","select-from-map":"Wähle Position anhand Karte","select-from-own-locations":"Aus eigenen Favoriten auswählen",venue:"Venue","via-point":"Zwischenziel",where:"Wohin?",place:"Ort"},en:{address:"Address","address-place-or-business":"Address, place or business","add-via-button-label":"Add via point","add-via-duration-button-label":"Set stop duration at via point {{index}}","add-via-duration-button-label-close":"Close stop duration selector at via point {{index}}","add-via-duration-button-label-open":"Open stop duration selector at via point {{index}}",airplane:"Flight",arrival:"Arrival",back:"Back",bikepark:"Park & Ride for bikes",bikerentalstation:"Bike station",bus:"bus",cancel:"Cancel",carpark:"Park & Ride","clear-button-label":"Clear","clear-search-history":"Clear search history",currentposition:"Current position",delete:"Delete","delete-old-searches-header":"Do you want to clear the search history?",departure:"Departure",destination:"Destination","give-origin":"Enter your origin.","give-destination":"Enter your destination",favourite:"Favourite",ferry:"Ferry","future-route":"Future route",origin:"Start","origin-stop-near-you":"Start",ownlocations:"Own locations",loading:"Loading...","minute-short":"m",platform:"Platform",rail:"Train",required:"required field",search:"Search","search-address-or-place":"Search by address or place name","search-button-label":"Search","search-destination":"Search destination, route or stop","search-destination-index":"Enter destination","search-destination-results-but-no-search":"View results in the adjacent “Destination” tab","search-no-results":"No location","search-origin":"Search origin, route or stop","search-origin-index":"Enter origin","search-position":"Detect location","search-autosuggest-label":"Venue, place and stopsearch.","search-autosuggest-label-instructions-desktop":"Navigate list with arrow keys and select with enter key.","search-autosuggest-label-instructions-mobile":"Enter the location and navigate in the list by swiping.","search-autosuggest-label-move-to-destination":"After selecting the starting location you are automatically moved to the destination field.","search-autosuggest-len":"There is {{count}} suggestion available","search-autosuggest-len_plural":"There are {{count}} suggestions available","search-current-suggestion":"Current selection: {{selection}}",street:"Street",subway:"Metro",station:"Station",stop:"Stop","stop-near-you":"Search stops and routes","stop-near-you-airplane":"Search flights or airports","stop-near-you-bus":"Search bus routes or stops","stop-near-you-citybike":"Search city bike stations","stop-near-you-rail":"Search train routes or stations","stop-near-you-subway":"Search metro routes or stations ","stop-near-you-tram":"Search tram routes or stops","stop-route-station":"Bus and stop search","today-at":"today at","tomorrow-at":"tomorrow at",tram:"Tram",track:"Track","use-own-position":"Use current location","select-from-map":"Select position from map","select-from-own-locations":"Select from own locations",venue:"Venue","via-point":"Via point",where:"Where to?",place:"Location"},fi:{address:"Osoite","address-place-or-business":"Osoite, paikka tai yritys","add-via-button-label":"Lisää välipiste","add-via-duration-button-label":"Aseta välipisteelle {{index}} pysähdyksen kesto","add-via-duration-button-label-close":"Avaa välipisteen {{index}} pysähdyksen kesto valitsin","add-via-duration-button-label-open":"Sulje välipisteen {{index}} pysähdyksen kesto valitsin",airplane:"Lentokone",arrival:"Perillä",back:"Takaisin",vehiclerentalstation:"Pyöräasema",bikepark:"Liityntäpyöräparkki",bus:"bussi",cancel:"Peruuta",carpark:"Liityntäpysäkointi","clear-button-label":"Tyhjennä","clear-search-history":"Tyhjennä hakuhistoria",currentposition:"Tämänhetkinen sijainti",delete:"Poista","delete-old-searches-header":"Haluatko tyhjentää hakuhistorian?",departure:"Lähtöaika",destination:"Määränpää",favourite:"Suosikki",ferry:"Lautta","future-route":"Tuleva reitti","give-origin":"Lähtöpaikka","give-destination":"Määränpää",origin:"Lähtöpaikka","origin-stop-near-you":"Lähtöpaikka",ownlocations:"Omat paikat",loading:"Ladataan...","minute-short":"min",platform:"Laituri",rail:"Juna",required:"pakollinen kenttä",search:"Etsi","search-address-or-place":"Hae osoitteella tai paikan nimellä","search-button-label":"Hae","search-destination":"Hae määränpäätä, linjaa tai pysäkkiä","search-destination-index":"Syötä määränpää","search-destination-results-but-no-search":"Katso tulokset viereiseltä Määränpää-välilehdeltä","search-no-results":"Ei tuloksia","search-origin":"Hae lähtöpaikkaa, linjaa tai pysäkkiä","search-origin-index":"Syötä lähtöpaikka","search-autosuggest-label":"Paikka, linja ja pysäkkihaku.","search-autosuggest-label-instructions-desktop":"Navigoi listassa nuolinäppäimillä ja valitse enterillä.","search-autosuggest-label-instructions-mobile":"Syötä sijainti ja navigoi listassa pyyhkäisemällä.","search-autosuggest-label-move-to-destination":"Valittuasi lähtöpaikan siirrytään suoraan määränpää-kenttään.","search-autosuggest-len":" Löydettiin {{count}} ehdotus","search-autosuggest-len_plural":" Löydettiin {{count}} ehdotusta","search-current-suggestion":"Tämänhetkinen valinta: {{selection}}","search-position":"Paikanna",street:"Katu",subway:"Metro",station:"Asema",stop:"Pysäkki","stop-near-you":"Linja, pysäkki tai asema","stop-near-you-airplane":"Hae lentoja tai lentoasemaa","stop-near-you-bus":"Hae bussilinjaa tai pysäkkiä","stop-near-you-citybike":"Hae kaupunkipyöräasemaa","stop-near-you-rail":"Hae lähijunaa tai asemaa","stop-near-you-subway":"Hae metrolinjaa tai asemaa","stop-near-you-tram":"Hae raitiolinjaa tai pysäkkiä","stop-route-station":"Linja- ja pysäkkihaku","today-at":"tänään klo","tomorrow-at":"huomenna klo",tram:"Raitiovaunu",track:"Raide","use-own-position":"Käytä nykyistä sijaintia","select-from-map":"Valitse sijainti kartalta","select-from-own-locations":"Valitse omista paikoista",venue:"Paikka","via-point":"Välipiste",where:"Minne mennään?",place:"Paikka"},sv:{address:"Adress","address-place-or-business":"Adress, plats eller företag","add-via-button-label":"Lägg till viapunkt","add-via-duration-button-label":"Ställ in varaktighet för viapunkten {{index}}","add-via-duration-button-label-close":"Stäng väljaren för varaktighet vid via-punkten {{index}}","add-via-duration-button-label-open":"Öppna väljaren för varaktighet vid via-punkten {{index}}",airplane:"Flyg",arrival:"Anländer",back:"Tillbaka",bikerentalstation:"Stadscykelstation",bikepark:"Anslutningsparkering för cyklar",bus:"Bussi",cancel:"Avbryt",carpark:"Infartsparkering","clear-button-label":"Töm","clear-search-history":"Töm sökhistoriken",currentposition:"Nuvarande position",delete:"Ta bort","delete-old-searches-header":"Vill du tömma sökhistoriken?",departure:"Avgångstid",destination:"Destination",favourite:"Favorit",ferry:"Färja","future-route":"Framtida rutt","give-destination":"Skriv in din destination","give-origin":"Skriv in din avfärdsplats",origin:"Avfärdsplats","origin-stop-near-you":"Avfärdsplats",ownlocations:"Egna platser",loading:"Laddar...","minute-short":"min",platform:"Plattform",rail:"Tåg",required:"obligatoriskt fält",search:"Sök","search-address-or-place":"Sök med adressen eller platsens namn","search-button-label":"Sök","search-destination":"Sök destination, linje eller hållplats","search-destination-index":"Skriv destination","search-destination-results-but-no-search":"Se resultaten under fliken Destination","search-no-results":"Inga sökresultat","search-origin":"Sök avfärdsplats, linje eller hållplats","search-origin-index":"Skriv avfärdsplats","search-position":"Sök position","search-autosuggest-label":"Plats, linje och hållplatssökning.","search-autosuggest-label-instructions-desktop":"Navigera listan med piltangenterna och välj med Enter-tangeten.","search-autosuggest-label-instructions-mobile":"Ange platsen och navigera i listan genom att svepa.","search-autosuggest-label-move-to-destination":"Efter att du valt avgångsplatsen tas du direkt till Destination-fältet.","search-autosuggest-len":"Hittade {{count}} förslag","search-current-suggestion":"Nuvarande val: {{selection}}",street:"Gata",subway:"Metro",station:"Station",stop:"Hållplats","stop-near-you":"Sök hållplatser eller linjer","stop-near-you-airplane":"Sök flyg eller flygplatser","stop-near-you-bus":"Sök busslinjer eller hållplatser","stop-near-you-citybike":"Sök stadscykelstationer","stop-near-you-rail":"Sök närtåger eller stationer","stop-near-you-subway":"Sök metrolinjer eller stationer","stop-near-you-tram":"Sök spårvagnlinjer eller hållplatser","stop-route-station":"Buss och stopp sökningen","today-at":"i dag kl","tomorrow-at":"i morgon",tram:"Spårvagn",track:"Spår","use-own-position":"Använd min position","select-from-map":"Välj position från kartan","select-from-own-locations":"Välj från egna platser",venue:"Mötesplats","via-point":"Via punkt",where:"Vart vill du åka?",place:"Plats"}};function FM(M,z){void 0===z&&(z={});var b=z.insertAt;if(M&&"undefined"!=typeof document){var p=document.head||document.getElementsByTagName("head")[0],O=document.createElement("style");O.type="text/css","top"===b&&p.firstChild?p.insertBefore(O,p.firstChild):p.appendChild(O),O.styleSheet?O.styleSheet.cssText=M:O.appendChild(document.createTextNode(M))}}var UM={container:"styles_container__KXfyb",input:"styles_input__XmNBn",favourite:"styles_favourite__sjGcX",thin:"styles_thin__y3lnY",hasValue:"styles_hasValue__tzCTr",suggestionsContainerOpen:"styles_suggestionsContainerOpen__4AZDX",suggestionsContainer:"styles_suggestionsContainer__3dsEd",suggestionsList:"styles_suggestionsList__esTtR",suggestion:"styles_suggestion__7itfO",suggestionHighlighted:"styles_suggestionHighlighted__XUxvC","autosuggest-input-container":"styles_autosuggest-input-container__ZkKGO",origin:"styles_origin__ivlHi",destination:"styles_destination__y39VH","stop-route-station":"styles_stop-route-station__FneXd","autosuggest-input-icon":"styles_autosuggest-input-icon__uhYGQ","origin-stop-near-you":"styles_origin-stop-near-you__Ekwp-","clear-input":"styles_clear-input__Vx7B4","sr-only":"styles_sr-only__ZOrQT"};FM("input[type='text'] {\n margin: 0; }\n\n.styles_container__KXfyb {\n display: flex;\n width: 100%; }\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 16px;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n display: flex;\n width: 100%;\n height: 44px;\n border-radius: 5px;\n border: solid 1px #888;\n background-color: #fff;\n padding-left: 50px;\n padding-right: 44px;\n line-height: 1.2;\n letter-spacing: -0.5px;\n color: #333;\n box-sizing: border-box;\n -webkit-appearance: none;\n appearance: none; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_favourite__sjGcX {\n padding-left: 47px; }\n .styles_container__KXfyb .styles_input__XmNBn.styles_thin__y3lnY {\n height: 34px; }\n .styles_container__KXfyb .styles_input__XmNBn:focus {\n background: #fff;\n outline: none;\n border: solid 1px var(--color);\n box-shadow: 0 0 2px 1px var(--hover-color); }\n @media screen and (min-width: 768px) {\n .styles_container__KXfyb .styles_input__XmNBn {\n font-size: 15px;\n height: 44px;\n padding-left: 49px; } }\n .styles_container__KXfyb .styles_input__XmNBn::placeholder {\n color: #666;\n opacity: 1;\n font-size: 15px; }\n\n.styles_hasValue__tzCTr {\n color: #333; }\n\n.styles_suggestionsContainerOpen__4AZDX {\n width: 100%;\n max-height: 44vh;\n border-radius: 5px;\n box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.06);\n border: solid 1px rgba(0, 0, 0, 0.1);\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n background-color: white;\n top: calc(3 * 0.875rem + 9px);\n z-index: 20; }\n\n.styles_suggestionsContainer__3dsEd {\n background-color: white;\n z-index: 20; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background: white; }\n .styles_suggestionsContainer__3dsEd .styles_suggestionsList__esTtR li:hover {\n background: #f4f4f5; }\n\n.styles_suggestion__7itfO {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n display: block;\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap; }\n\n.styles_suggestionHighlighted__XUxvC {\n background-color: #f4f4f5; }\n\n.styles_autosuggest-input-container__ZkKGO {\n position: relative;\n width: 100%; }\n .styles_autosuggest-input-container__ZkKGO.styles_origin__ivlHi {\n z-index: 16; }\n .styles_autosuggest-input-container__ZkKGO.styles_destination__y39VH {\n z-index: 10; }\n .styles_autosuggest-input-container__ZkKGO.styles_stop-route-station__FneXd {\n z-index: 9; }\n\n.styles_autosuggest-input-icon__uhYGQ {\n display: flex;\n position: absolute;\n align-items: center;\n width: 16px;\n height: 100%;\n margin-top: 0;\n margin-left: 19px; }\n .styles_autosuggest-input-icon__uhYGQ svg {\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin__ivlHi svg {\n fill: #4ea700;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_destination__y39VH svg {\n fill: #ec5188;\n width: 16px;\n height: 24px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_stop-route-station__FneXd svg, .styles_autosuggest-input-icon__uhYGQ.styles_favourite__sjGcX svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n .styles_autosuggest-input-icon__uhYGQ.styles_origin-stop-near-you__Ekwp- svg {\n fill: #888;\n width: 16px;\n height: 16px; }\n\nbutton.styles_clear-input__Vx7B4 {\n display: flex;\n position: absolute;\n padding: 14px 0;\n right: 0;\n width: 44px;\n height: 100%;\n color: var(--color);\n outline: none;\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.styles_clear-input__Vx7B4 svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.styles_clear-input__Vx7B4:focus {\n background-color: transparent;\n color: inherit;\n /* First apply outline that is used in Edge and Firefox */\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 button.styles_clear-input__Vx7B4:active {\n background-color: transparent;\n color: inherit; }\n button.styles_clear-input__Vx7B4:hover {\n background-color: transparent;\n color: inherit; }\n\n.styles_sr-only__ZOrQT:not(:focus, :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");var jM={"fullscreen-root":"MobileSearch_fullscreen-root__WkMna","combobox-container":"MobileSearch_combobox-container__sRkYS","right-column":"MobileSearch_right-column__erBFe","combobox-icon":"MobileSearch_combobox-icon__xd0iZ","combobox-label":"MobileSearch_combobox-label__OqGpe",container:"MobileSearch_container__k-UVq",input:"MobileSearch_input__HbTUj","clear-input":"MobileSearch_clear-input__ILVwN",hasValue:"MobileSearch_hasValue__NYhZy",suggestion:"MobileSearch_suggestion__UBz5O",suggestionHighlighted:"MobileSearch_suggestionHighlighted__7ef5G",suggestionsContainerOpen:"MobileSearch_suggestionsContainerOpen__g7zkI",suggestionsList:"MobileSearch_suggestionsList__3pEzf","clear-search-history":"MobileSearch_clear-search-history__wblhz","mobile-modal-overlay":"MobileSearch_mobile-modal-overlay__f6Rl7","mobile-modal":"MobileSearch_mobile-modal__hNdM6","mobile-modal-content":"MobileSearch_mobile-modal-content__Yzz-V"};FM("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileSearch_fullscreen-root__WkMna {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileSearch_combobox-container__sRkYS {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileSearch_combobox-container__sRkYS .MobileSearch_right-column__erBFe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileSearch_combobox-icon__xd0iZ {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileSearch_combobox-icon__xd0iZ svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileSearch_combobox-label__OqGpe {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileSearch_container__k-UVq {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none; }\n .MobileSearch_container__k-UVq .MobileSearch_input__HbTUj:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileSearch_clear-input__ILVwN {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileSearch_clear-input__ILVwN svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileSearch_clear-input__ILVwN:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:active {\n background-color: transparent;\n color: inherit; }\n button.MobileSearch_clear-input__ILVwN:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileSearch_hasValue__NYhZy {\n color: #333; }\n\n.MobileSearch_suggestion__UBz5O {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileSearch_suggestionHighlighted__7ef5G {\n background-color: #f4f4f5; }\n\n.MobileSearch_suggestionsContainerOpen__g7zkI {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileSearch_suggestionsContainerOpen__g7zkI .MobileSearch_suggestionsList__3pEzf {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileSearch_clear-search-history__wblhz {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileSearch_mobile-modal-overlay__f6Rl7 {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileSearch_mobile-modal__hNdM6 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileSearch_mobile-modal__hNdM6.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileSearch_mobile-modal-content__Yzz-V {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n");var GM={"fullscreen-root":"MobileNoScroll_fullscreen-root__zQN50","combobox-container":"MobileNoScroll_combobox-container__RDEiT","right-column":"MobileNoScroll_right-column__0P3qe","combobox-icon":"MobileNoScroll_combobox-icon__LA0rD","combobox-label":"MobileNoScroll_combobox-label__-rYsj",container:"MobileNoScroll_container__CaIIv",input:"MobileNoScroll_input__Opft5","clear-input":"MobileNoScroll_clear-input__-4SQO",hasValue:"MobileNoScroll_hasValue__jR1iW",suggestion:"MobileNoScroll_suggestion__NAWcY",suggestionHighlighted:"MobileNoScroll_suggestionHighlighted__V0GuG",suggestionsContainerOpen:"MobileNoScroll_suggestionsContainerOpen__MRa5Y",suggestionsList:"MobileNoScroll_suggestionsList__NUpJE","clear-search-history":"MobileNoScroll_clear-search-history__Cjj-1","mobile-modal-overlay":"MobileNoScroll_mobile-modal-overlay__LbLie","mobile-modal":"MobileNoScroll_mobile-modal__-Rx-A","mobile-modal-content":"MobileNoScroll_mobile-modal-content__nfrCI"};FM("input[type='text'] {\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_fullscreen-root__zQN50 {\n display: flex;\n flex-direction: column;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: #fff;\n z-index: 1000; }\n\n.MobileNoScroll_combobox-container__RDEiT {\n margin: 15px 10px 0;\n border: solid #888 1px;\n display: flex;\n align-items: center;\n border-radius: 5px;\n height: 60px;\n justify-content: space-between; }\n .MobileNoScroll_combobox-container__RDEiT .MobileNoScroll_right-column__0P3qe {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding-top: 9px; }\n\n.MobileNoScroll_combobox-icon__LA0rD {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 52px;\n border: 0;\n background: none; }\n .MobileNoScroll_combobox-icon__LA0rD svg {\n fill: #007ac9;\n width: 14px;\n height: 21px;\n transform: rotate(-180deg); }\n\n.MobileNoScroll_combobox-label__-rYsj {\n position: relative;\n top: -2px;\n font-size: 12px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.2px;\n color: #333; }\n\n.MobileNoScroll_container__CaIIv {\n display: flex;\n align-items: center;\n width: 100%; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5 {\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n width: 100%;\n position: relative;\n padding-bottom: 7px;\n top: 2px;\n border: none;\n height: 26px;\n font-weight: normal;\n box-shadow: none;\n font-size: 16px;\n letter-spacing: -0.5px;\n color: #666;\n -webkit-appearance: none;\n appearance: none; }\n .MobileNoScroll_container__CaIIv .MobileNoScroll_input__Opft5:focus {\n outline: none;\n border: none;\n box-shadow: none;\n background: #fff; }\n\nbutton.MobileNoScroll_clear-input__-4SQO {\n display: flex;\n align-items: center;\n right: 0;\n padding: 0 15px 7px 0;\n height: 26px;\n color: var(--color);\n border: 0;\n margin: 0;\n justify-content: center;\n text-align: left;\n background: none;\n border-style: none;\n border-width: 0;\n cursor: pointer;\n font-family: inherit;\n background-color: transparent;\n transition: none; }\n button.MobileNoScroll_clear-input__-4SQO svg {\n fill: var(--color);\n width: 16px;\n height: 16px; }\n button.MobileNoScroll_clear-input__-4SQO:focus {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:active {\n background-color: transparent;\n color: inherit; }\n button.MobileNoScroll_clear-input__-4SQO:hover {\n background-color: transparent;\n color: inherit; }\n\n.MobileNoScroll_hasValue__jR1iW {\n color: #333; }\n\n.MobileNoScroll_suggestion__NAWcY {\n font-size: 15px;\n min-height: 50px;\n letter-spacing: -0.6px;\n color: #333;\n font-weight: 500;\n background: #fff;\n margin: 0;\n padding: 0; }\n\n.MobileNoScroll_suggestionHighlighted__V0GuG {\n background-color: #f4f4f5; }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n display: flex;\n position: absolute;\n margin-bottom: auto;\n z-index: 20;\n width: 100vw;\n max-height: calc(100% - 75px);\n height: 100%;\n top: 75px;\n left: 0;\n overflow-x: hidden;\n overflow-y: scroll; }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y .MobileNoScroll_suggestionsList__NUpJE {\n width: 100vw;\n list-style: none;\n padding-left: 0;\n margin: 0;\n background: #f4f4f5; }\n\n.MobileNoScroll_clear-search-history__Cjj-1 {\n display: flex;\n font-family: 'Gotham Rounded A', 'Gotham Rounded B', Roboto, Arial, Georgia, serif;\n margin-top: auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 62px;\n background: #f4f4f5;\n color: var(--accessible-primary-color);\n font-size: 15px;\n font-weight: var(--font-weight-medium);\n letter-spacing: -0.42px;\n border: none;\n border-top: 1px solid #ddd; }\n\n.MobileNoScroll_mobile-modal-overlay__LbLie {\n z-index: 9999;\n top: 0;\n left: 0;\n right: unset;\n bottom: unset;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n background-color: white;\n position: fixed; }\n\n.MobileNoScroll_mobile-modal__-Rx-A {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--after-open > div {\n transform: translateY(0); }\n .MobileNoScroll_mobile-modal__-Rx-A.ReactModal__Content--before-close > div {\n transform: translateY(10%); }\n\n.MobileNoScroll_mobile-modal-content__nfrCI {\n position: fixed;\n width: 100%;\n height: 100%;\n outline: none;\n background-color: #fff;\n transition: transform 0.25s;\n transform: translateY(10%); }\n\n.MobileNoScroll_suggestionsContainerOpen__MRa5Y {\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n scrollbar-width: none;\n /* Firefox */ }\n .MobileNoScroll_suggestionsContainerOpen__MRa5Y::-webkit-scrollbar {\n display: none;\n /* Safari and Chrome */ }\n");class VM extends m.default{constructor(M){super(M);const z=this;z.onSuggestionTouchMove=()=>{z.justSelectedSuggestion=!1,z.pressedSuggestion=null}}}const KM=({appElement:M,id:z,closeHandle:p,clearInput:O,value:o,suggestions:c,inputProps:A,fetchFunction:q,renderSuggestion:e,getSuggestionValue:n,ariaLabel:W,label:a,onSuggestionSelected:t,clearOldSearches:d,dialogHeaderText:i,dialogPrimaryButtonText:r,dialogSecondaryButtonText:s,clearInputButtonText:u,focusInput:R,color:f,hoverColor:l,accessiblePrimaryColor:L,searchOpen:N,fontWeights:X,showScroll:h})=>{var m;const g=h?jM:GM,T=`${z}-input`,_=`${z}-label`,[y,S]=b.useState(!1),v=B.default.useRef();b.useEffect((()=>{H.default.setAppElement(M)}),[]);const k=b.useCallback((()=>{p()})),E=(M,z)=>{"clear-search-history"===z.suggestion.type?S(!0):z.suggestion.properties.arrowClicked||t(M,z)},w=M=>{const z=M&&(M.key||M.which||M.keyCode)||"";return!(!z||![13," ","Spacebar"].concat([32,"Enter"]).includes(z))&&(M.preventDefault(),!0)},C=M=>"clear-search-history"===M.type?"":n(M),D=M=>"clear-search-history"===M.type?B.default.createElement("button",{type:"button",className:g["clear-search-history"]},M.labelId):e(M);return R&&null!==(m=v.current)&&void 0!==m&&m.input&&v.current.input.focus(),B.default.createElement(H.default,{isOpen:N,className:g["mobile-modal"],overlayClassName:g["mobile-modal-overlay"],onAfterClose:k,shouldCloseOnEsc:!0},B.default.createElement("div",{className:g["mobile-modal-content"],style:{"--color":`${f}`,"--accessible-primary-color":L,"--hover-color":`${l}`,"--font-weight-medium":X.medium}},B.default.createElement("div",{className:g["combobox-container"],htmlFor:T},B.default.createElement("button",{type:"button",className:g["combobox-icon"],onClick:()=>k(),onKeyDown:M=>w(M)&&k(),"aria-label":s,tabIndex:0},B.default.createElement(x.default,{img:"arrow"})),B.default.createElement("span",{className:g["right-column"]},B.default.createElement("span",{className:g["combobox-label"],id:_},a),B.default.createElement(VM,{alwaysRenderSuggestions:!0,id:z,suggestions:c,onSuggestionsFetchRequested:q,getSuggestionValue:C,renderSuggestion:D,focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>!0,inputProps:F({},A,{className:`${g.input} ${g[z]||""} ${A.value?g.hasValue:""}`,autoFocus:!0}),renderInputComponent:M=>B.default.createElement(B.default.Fragment,null,B.default.createElement("input",Object.assign({"aria-label":W,id:z},M)),o&&B.default.createElement("button",{type:"button",className:g["clear-input"],onClick:O,onKeyDown:M=>w(M)&&O(),"aria-label":u},B.default.createElement(x.default,{img:"close",color:f}))),theme:g,onSuggestionSelected:E,ref:v}))),B.default.createElement(Y.default,{appElement:M,isModalOpen:y,handleClose:()=>S(!1),headerText:i,primaryButtonText:r,secondaryButtonText:s,primaryButtonOnClick:()=>{d(),S(!1)},secondaryButtonOnClick:()=>S(!1),color:f,hoverColor:l,fontWeights:X})))};"production"!==process.env.NODE_ENV&&(KM.propTypes={appElement:N.default.string.isRequired,id:N.default.string.isRequired,closeHandle:N.default.func.isRequired,clearInput:N.default.func.isRequired,value:N.default.string,clearInputButtonText:N.default.string.isRequired,suggestions:N.default.array.isRequired,inputProps:N.default.shape({onChange:N.default.func.isRequired,onBlur:N.default.func.isRequired,value:N.default.string.isRequired,placeholder:N.default.string.isRequired,className:N.default.string.isRequired}).isRequired,fetchFunction:N.default.func.isRequired,getSuggestionValue:N.default.func.isRequired,renderSuggestion:N.default.func.isRequired,onSuggestionSelected:N.default.func.isRequired,label:N.default.string.isRequired,clearOldSearches:N.default.func.isRequired,ariaLabel:N.default.string,dialogHeaderText:N.default.string,dialogPrimaryButtonText:N.default.string,dialogSecondaryButtonText:N.default.string,focusInput:N.default.bool,color:N.default.string,hoverColor:N.default.string,accessiblePrimaryColor:N.default.string.isRequired,searchOpen:N.default.bool.isRequired,fontWeights:N.default.shape({medium:N.default.number.isRequired}).isRequired,showScroll:N.default.bool});var QM,JM=SM((function(M,z){var b;"undefined"!=typeof self&&self,M.exports=(b=B.default,function(){var M={888:function(M,z,b){var p,O;O=void 0!==b.g?b.g:"undefined"!=typeof window?window:this,p=function(){return function(M){var z={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},b=function(){var M={};return Array.prototype.forEach.call(arguments,(function(z){for(var b in z){if(!z.hasOwnProperty(b))return;M[b]=z[b]}})),M},p=function(M){"#"===M.charAt(0)&&(M=M.substr(1));for(var z,b=String(M),p=b.length,O=-1,o="",c=b.charCodeAt(0);++O<p;){if(0===(z=b.charCodeAt(O)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");o+=z>=1&&z<=31||127==z||0===O&&z>=48&&z<=57||1===O&&z>=48&&z<=57&&45===c?"\\"+z.toString(16)+" ":z>=128||45===z||95===z||z>=48&&z<=57||z>=65&&z<=90||z>=97&&z<=122?b.charAt(O):"\\"+b.charAt(O)}return"#"+o},O=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},o=function(z){return z?(b=z,parseInt(M.getComputedStyle(b).height,10)+z.offsetTop):0;var b},c=function(z,b,p){0===z&&document.body.focus(),p||(z.focus(),document.activeElement!==z&&(z.setAttribute("tabindex","-1"),z.focus(),z.style.outline="none"),M.scrollTo(0,b))},A=function(z,b,p,O){if(b.emitEvents&&"function"==typeof M.CustomEvent){var o=new CustomEvent(z,{bubbles:!0,detail:{anchor:p,toggle:O}});document.dispatchEvent(o)}};return function(q,e){var n,W,a,t,d={cancelScroll:function(M){cancelAnimationFrame(t),t=null,M||A("scrollCancel",n)},animateScroll:function(p,q,e){d.cancelScroll();var W=b(n||z,e||{}),i="[object Number]"===Object.prototype.toString.call(p),r=i||!p.tagName?null:p;if(i||r){var s=M.pageYOffset;W.header&&!a&&(a=document.querySelector(W.header));var u,R,f,l=o(a),L=i?p:function(z,b,p,o){var c=0;if(z.offsetParent)do{c+=z.offsetTop,z=z.offsetParent}while(z);return c=Math.max(c-b-p,0),o&&(c=Math.min(c,O()-M.innerHeight)),c}(r,l,parseInt("function"==typeof W.offset?W.offset(p,q):W.offset,10),W.clip),N=L-s,B=O(),X=0,h=function(M,z){var b=z.speedAsDuration?z.speed:Math.abs(M/1e3*z.speed);return z.durationMax&&b>z.durationMax?z.durationMax:z.durationMin&&b<z.durationMin?z.durationMin:parseInt(b,10)}(N,W),m=function(z){u||(u=z),X+=z-u,f=s+N*function(M,z){var b;return"easeInQuad"===M.easing&&(b=z*z),"easeOutQuad"===M.easing&&(b=z*(2-z)),"easeInOutQuad"===M.easing&&(b=z<.5?2*z*z:(4-2*z)*z-1),"easeInCubic"===M.easing&&(b=z*z*z),"easeOutCubic"===M.easing&&(b=--z*z*z+1),"easeInOutCubic"===M.easing&&(b=z<.5?4*z*z*z:(z-1)*(2*z-2)*(2*z-2)+1),"easeInQuart"===M.easing&&(b=z*z*z*z),"easeOutQuart"===M.easing&&(b=1- --z*z*z*z),"easeInOutQuart"===M.easing&&(b=z<.5?8*z*z*z*z:1-8*--z*z*z*z),"easeInQuint"===M.easing&&(b=z*z*z*z*z),"easeOutQuint"===M.easing&&(b=1+--z*z*z*z*z),"easeInOutQuint"===M.easing&&(b=z<.5?16*z*z*z*z*z:1+16*--z*z*z*z*z),M.customEasing&&(b=M.customEasing(z)),b||z}(W,R=(R=0===h?0:X/h)>1?1:R),M.scrollTo(0,Math.floor(f)),function(z,b){var O=M.pageYOffset;if(z==b||O==b||(s<b&&M.innerHeight+O)>=B)return d.cancelScroll(!0),c(p,b,i),A("scrollStop",W,p,q),u=null,t=null,!0}(f,L)||(t=M.requestAnimationFrame(m),u=z)};0===M.pageYOffset&&M.scrollTo(0,0),function(M,z,b){z||history.pushState&&b.updateURL&&history.pushState({smoothScroll:JSON.stringify(b),anchor:M.id},document.title,M===document.documentElement?"#top":"#"+M.id)}(p,i,W),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?c(p,Math.floor(L),!1):(A("scrollStart",W,p,q),d.cancelScroll(!0),M.requestAnimationFrame(m))}}},i=function(z){if(!z.defaultPrevented&&!(0!==z.button||z.metaKey||z.ctrlKey||z.shiftKey)&&"closest"in z.target&&(W=z.target.closest(q))&&"a"===W.tagName.toLowerCase()&&!z.target.closest(n.ignore)&&W.hostname===M.location.hostname&&W.pathname===M.location.pathname&&/#/.test(W.href)){var b,O;try{b=p(decodeURIComponent(W.hash))}catch(M){b=p(W.hash)}if("#"===b){if(!n.topOnEmptyHash)return;O=document.documentElement}else O=document.querySelector(b);(O=O||"#top"!==b?O:document.documentElement)&&(z.preventDefault(),function(z){if(history.replaceState&&z.updateURL&&!history.state){var b=M.location.hash;b=b||"",history.replaceState({smoothScroll:JSON.stringify(z),anchor:b||M.pageYOffset},document.title,b||M.location.href)}}(n),d.animateScroll(O,W))}},r=function(M){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(n)){var z=history.state.anchor;"string"==typeof z&&z&&!(z=document.querySelector(p(history.state.anchor)))||d.animateScroll(z,null,{updateURL:!1})}};return d.destroy=function(){n&&(document.removeEventListener("click",i,!1),M.removeEventListener("popstate",r,!1),d.cancelScroll(),n=null,W=null,a=null,t=null)},function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";d.destroy(),n=b(z,e||{}),a=n.header?document.querySelector(n.header):null,document.addEventListener("click",i,!1),n.updateURL&&n.popstate&&M.addEventListener("popstate",r,!1)}(),d}}(O)}.apply(z,[]),void 0===p||(M.exports=p)},253:function(M,z,b){var p=this&&this.__createBinding||(Object.create?function(M,z,b,p){void 0===p&&(p=b),Object.defineProperty(M,p,{enumerable:!0,get:function(){return z[b]}})}:function(M,z,b,p){void 0===p&&(p=b),M[p]=z[b]}),O=this&&this.__exportStar||function(M,z){for(var b in M)"default"===b||Object.prototype.hasOwnProperty.call(z,b)||p(z,M,b)};Object.defineProperty(z,"__esModule",{value:!0}),O(b(720),z),O(b(646),z),O(b(87),z),O(b(641),z),O(b(91),z),O(b(183),z),O(b(376),z),O(b(45),z),O(b(840),z),O(b(586),z),O(b(219),z),O(b(510),z),O(b(333),z),O(b(23),z),O(b(348),z),O(b(197),z)},87:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useArrowNavigation=void 0;var p=b(156);z.useArrowNavigation=function(M){var z=M.listItems,b=M.onArrowUpOrDown,O=(0,p.useState)(0),o=O[0],c=O[1],A=(0,p.useCallback)((function(M){c(M)}),[z]),q=function(M){var p=M.key;if(null==z?void 0:z.length)if("ArrowUp"===p)b&&b(),M.preventDefault(),A(o>0?o-1:z.length-1);else{if("ArrowDown"!==p)return;b&&b(),M.preventDefault(),o<z.length-1?A(o+1):A(0)}};return(0,p.useEffect)((function(){return window.addEventListener("keydown",q),function(){return window.removeEventListener("keydown",q)}})),(0,p.useEffect)((function(){A(0)}),[z]),{selectedIndex:o}}},333:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useDebounce=void 0;var p=b(156);z.useDebounce=function(M,z){void 0===z&&(z=300);var b=(0,p.useState)(M),O=b[0],o=b[1];return(0,p.useEffect)((function(){var b=setTimeout((function(){o(M)}),z);return function(){clearTimeout(b)}}),[M,z]),O}},23:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useElementSize=void 0;var p=b(156);z.useElementSize=function(){var M,z,b=(0,p.useRef)(null);return[b,{width:null===(M=null==b?void 0:b.current)||void 0===M?void 0:M.clientWidth,height:null===(z=null==b?void 0:b.current)||void 0===z?void 0:z.clientHeight}]},z.default=z.useElementSize},641:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIntersectionObserver=void 0;var p=b(156);z.useIntersectionObserver=function(M){var z=(0,p.useRef)(null),b=(0,p.useState)(!1),O=b[0],o=b[1],c=function(M){var z=M[0];o(z.isIntersecting)};return(0,p.useEffect)((function(){if(window&&window.IntersectionObserver){var b=new IntersectionObserver(c,M),p=z.current;return z.current&&b.observe(z.current),function(){p&&b.unobserve(p)}}o(!1)}),[z,M]),{containerRef:z,isVisible:O}},z.default=z.useIntersectionObserver},91:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsBreakpoint=void 0;var p=b(156),O=b(253),o={xs:1,mobileSmall:320,mobile:375,tablet:768,tabletLarge:920,desktopSmall:1024,desktop:1260,desktopLarge:1440};z.useIsBreakpoint=function(M){var z="string"==typeof M?o[M]:M,b=(0,p.useState)(null),c=b[0],A=b[1],q=(0,p.useCallback)((function(){A(window.innerWidth)}),[]);return(0,p.useEffect)((function(){q()}),[]),(0,O.useOnResize)(q),c>=z},z.default=z.useIsBreakpoint},45:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0});var p=b(156),O={"crazy-egg":"crazyegg.com",youtube:"youtube.com"},o={PrivacyManagerAPI:{action:"getConsentDecision",timestamp:(new Date).getTime(),self:"hsl.fi"}};z.default=function(M){var z=(0,p.useState)(!1),b=z[0],c=z[1],A=function(){var z,b=null===(z=window.truste)||void 0===z?void 0:z.cma;if(b){var p=b.callApi("getConsent","hsl.fi",O[M],"hsl.fi");c("approved"===(null==p?void 0:p.consent))}else console.error("TrustArc api not found, returning isCookieEnabled as false")},q=function(M){if("string"==typeof(null==M?void 0:M.origin)&&M.origin.includes("trustarc")&&"string"==typeof(null==M?void 0:M.data))try{var z=JSON.parse(null==M?void 0:M.data);"submit_preferences"===(null==z?void 0:z.message)&&A()}catch(M){return}};return(0,p.useEffect)((function(){A()}),[M]),(0,p.useEffect)((function(){setTimeout(A,0),setTimeout(A,100),setTimeout(A,1e3)}),[]),(0,p.useEffect)((function(){return window.top.postMessage(JSON.stringify(o),"*"),window.addEventListener("message",q,!1),function(){return window.removeEventListener("message",q)}}),[]),b}},376:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsLoadingAfterError=void 0;var p=b(156);z.useIsLoadingAfterError=function(M,z){var b=(0,p.useState)(z),O=b[0],o=b[1];return(0,p.useEffect)((function(){M||o(z)}),[M,z]),M&&O}},348:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsMobile=void 0;var p=b(91);z.useIsMobile=function(){return!(0,p.useIsBreakpoint)("tablet")},z.default=z.useIsMobile},183:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useIsomorphicLayoutEffect=void 0;var p=b(156);z.useIsomorphicLayoutEffect="undefined"!=typeof window?p.useLayoutEffect:p.useEffect,z.default=z.useIsomorphicLayoutEffect},586:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOnLoseFocusWithin=void 0;var p=b(156);z.useOnLoseFocusWithin=function(M){var z=M.ref,b=M.callback,O=M.watch;(0,p.useEffect)((function(){var M=function(){var M;if(O)return(null===(M=z.current)||void 0===M?void 0:M.matches(":focus-within"))?void 0:b()};return document.addEventListener("keyup",M),function(){return document.removeEventListener("keyup",M)}}),[b,z,O])},z.default=z.useOnLoseFocusWithin},197:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOnResize=void 0;var p=b(156);z.useOnResize=function(M){(0,p.useEffect)((function(){var z=function(){M(window.innerWidth)};return window.addEventListener("resize",z,{passive:!0}),function(){return window.removeEventListener("resize",z)}}),[])},z.default=z.useOnResize},510:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOnWindowFocus=void 0;var p=b(156);z.useOnWindowFocus=function(M){(0,p.useEffect)((function(){var z=function(){M&&"visible"===document.visibilityState&&M()};return window.addEventListener("visibilitychange",z,!1),function(){return window.removeEventListener("visibilitychange",z)}}),[M])}},720:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useOutsideReacter=void 0;var p=b(156);z.useOutsideReacter=function(M,z){function b(b){M.current&&!M.current.contains(b.target)&&z()}(0,p.useEffect)((function(){return document.addEventListener("mousedown",b),function(){document.removeEventListener("mousedown",b)}}))}},219:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0});var p=b(156);z.default=function(){var M=(0,p.useRef)(null);return(0,p.useEffect)((function(){M.current&&(M.current(),M.current=null)})),function(z){M.current=z}}},646:function(M,z,b){Object.defineProperty(z,"__esModule",{value:!0}),z.useScrollLock=void 0;var p=b(156);z.useScrollLock=function(){return{lock:(0,p.useCallback)((function(){var M=window.scrollY+"px",z=document.body;z.style.position="fixed",z.style.top="-"+M}),[]),unlock:(0,p.useCallback)((function(){var M=document.body,z=M.style.top,b=-1*parseInt(z||"0");M.style.position="",M.style.top="",b&&window.scrollTo(0,-1*parseInt(z||"0"))}),[])}}},840:function(M,z,b){var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(z,"__esModule",{value:!0}),z.useSmoothScroll=void 0;var O=b(156),o=p(b(888));z.useSmoothScroll=function(M){var z=(0,O.useRef)(null),b=M.ref,p=M.offset,c=void 0===p?0:p,A=M.speed,q=void 0===A?500:A;return(0,O.useEffect)((function(){z.current=new o.default(null,{speed:q,speedAsDuration:!0})}),[]),(0,O.useCallback)((function(){b&&z.current&&z.current.animateScroll(b.current,null,{offset:function(){return c},updateURL:!1})}),[c,b])}},156:function(M){M.exports=b}},z={};function p(b){var O=z[b];if(void 0!==O)return O.exports;var o=z[b]={exports:{}};return M[b].call(o.exports,o,o.exports,p),o.exports}return p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(M){if("object"==typeof window)return window}}(),p(253)}())})),ZM=(QM=JM)&&QM.__esModule&&Object.prototype.hasOwnProperty.call(QM,"default")?QM.default:QM;HM.locale("en"),X.default.init({fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}});"production"!==process.env.NODE_ENV&&N.default.node;const $M=M=>{if(!M||!M.GTFS.platform)return;const{modes:z,platform:b}=M.GTFS;return[z&&"RAIL"===z[0]?X.default.t("track"):X.default.t("platform"),b]};function Mz(M){if("FutureRoute"!==M.type){if("SelectFromMap"===M.type)return["",X.default.t("select-from-map")];if("CurrentLocation"===M.type)return["",X.default.t("use-own-position")];if("SelectFromOwnLocations"===M.type)return["",X.default.t("select-from-own-locations")];let b,[p,O]=_M(M.properties,!0);if(M.properties.layer.toLowerCase().includes("bikerental")||M.properties.layer.toLowerCase().includes("bikestation")){b=X.default.t("vehiclerentalstation");return[b,p,void 0,M.properties.labelId]}if("bikepark"===M.properties.layer)return b=X.default.t("bikepark"),[b,p,void 0,void 0];if("carpark"===M.properties.layer)return b=X.default.t("carpark"),[b,p,void 0,void 0];if(M.properties.mode)b=X.default.t(M.properties.mode.toLowerCase().replace("favourite",""));else{const z=M.properties.layer.replace("route-","").toLowerCase().replace("favourite","");b=X.default.t(z)}if(M.properties.id&&("stop"===M.properties.layer||"station"===M.properties.layer)){var z;const o=TM(M.properties),c=null===(z=M.properties.addendum)||void 0===z?void 0:z.GTFS.modes,A=$M(M.properties.addendum);return[b,iM(p,o),O,o,c,A]}if("favouriteStop"===M.properties.layer||"favouriteStation"===M.properties.layer){const{address:z,code:o}=M.properties;return[b,z?iM(z.split(",")[0],o):p,O,o,void 0,$M(M.properties.addendum)]}return[b,p,O]}const{origin:b,destination:p}=M.properties,O=b.locality?`, ${b.locality} foobar`:"",o=p.locality?`, ${p.locality}`:"",c=b.name,A=p.name;return[X.default.t("future-route"),`${X.default.t("origin")} ${c}${O} ${X.default.t("destination")} ${A}${o}`,M.translatedText]}function zz(M){const z=HM.unix(M.properties.time);let b=M.properties.arriveBy?X.default.t("arrival"):X.default.t("departure");return b=z.isSame(HM(),"day")?`${b} ${X.default.t("today-at")}`:z.isSame(HM().add(1,"day"),"day")?`${b} ${X.default.t("tomorrow-at")}`:`${b} ${z.format("dd D.M.")}`,b=`${b} ${HM(z).format("HH:mm")}`,b}const bz=M=>"SelectFromOwnLocations"===M.type||"back"===M.type?"":function(M){const z=_M(M,!0);switch(M.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return z[1]||z[0];case"favouriteVehicleRentalStation":case"favouritePlace":return z[0];default:return z.length>1&&""!==z[1]?z.join(", "):z[1]||z[0]}}(M.properties);class pz extends B.default.Component{constructor(M){super(M),this.onChange=(M,{newValue:z,method:b})=>{const p={value:this.fInput||z||"",renderMobileSearch:this.props.isMobile};if(this.fInput=null,this.state.editing){if("enter"!==b||this.state.valid){if(this.state.typingTimer&&clearTimeout(this.state.typingTimer),"type"===b){const M=setTimeout((()=>{this.setState({typing:!1})}),1e3);p.typingTimer=M,p.typing=!0}this.setState(p)}}else p.editing=!0,this.setState(p,(()=>this.fetchFunction({value:z||""})))},this.onBlur=()=>{this.state.renderMobileSearch||(this.state.editing&&this.input.focus(),this.setState({editing:!1,renderMobileSearch:!1,value:this.props.value}))},this.onSelected=(M,z)=>{if(this.state.valid){if("SelectFromOwnLocations"===z.suggestion.type)return void this.setState({sources:["Favourite","Back"],ownPlaces:!0,pendingSelection:z.suggestion.type,value:""},(()=>{this.fetchFunction({value:""})}));if("back"===z.suggestion.type||"FutureRoute"===z.suggestion.type)return void this.setState({sources:this.props.sources,ownPlaces:!1,pendingSelection:z.suggestion.type,suggestionIndex:z.suggestionIndex},(()=>{this.fetchFunction({value:""})}));this.selectionDone=!0,this.setState({editing:!1,value:z.suggestionValue},(()=>{this.input.blur(),this.props.handleViaPoints?this.props.handleViaPoints(z.suggestion,z.suggestionIndex):this.props.onSelect(z.suggestion,this.props.id),this.setState({renderMobileSearch:!1,sources:this.props.sources,ownPlaces:!1,suggestions:[]},(()=>{this.selectionDone=!1})),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange(),this.props.isMobile&&this.closeMobileSearch()}))}else this.setState((M=>({pendingSelection:M.value})),(()=>this.checkPendingSelection()))},this.onSuggestionsClearRequested=()=>{this.setState({suggestions:[],sources:this.props.sources,ownPlaces:!1,editing:!1})},this.checkPendingSelection=()=>{"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection||!this.state.valid?this.state.pendingSelection&&this.state.valid&&this.setState({pendingSelection:null,editing:!1},(()=>{this.state.suggestions.length&&(this.input.blur(),this.props.onSelect(this.state.suggestions[this.state.suggestionIndex],this.props.id),this.props.isMobile&&this.closeMobileSearch(),!this.props.focusChange||this.props.isMobile&&!this.props.isEmbedded||this.props.focusChange())})):this.setState({pendingSelection:null,editing:!0},(()=>{this.input.focus()}))},this.clearButton=()=>B.default.createElement("button",{type:"button",className:UM["clear-input"],onClick:this.clearInput,"aria-label":X.default.t("clear-button-label")},B.default.createElement(x.default,{img:"close",color:this.props.color})),this.fetchFunction=({value:M,cleanExecuted:z})=>this.setState({valid:!1,cleanExecuted:z||!1},(()=>{if(this.selectionDone)return;const z=I.default(this.props.targets)||this.props.targets.includes("Locations");let b;this.state.ownPlaces?(b=["Locations"],(I.default(this.props.targets)||this.props.targets.includes("Stops"))&&b.push("Stops"),(I.default(this.props.targets)||this.props.targets.includes("VehicleRentalStations"))&&b.push("VehicleRentalStations")):I.default(this.props.targets)||(b=[...this.props.targets],z&&!this.props.isMobile&&(I.default(this.props.sources)||this.props.sources.includes("Favourite"))&&b.push("SelectFromOwnLocations"));((M,z,b,p,O,o,c,A,q,e)=>{A(null),mM(M,z,b,p,O,o,c,A,q,e)})(b,this.state.sources&&this.state.sources.filter((M=>!(z&&"Favourite"===M&&!this.state.ownPlaces&&!this.props.isMobile))),this.props.transportMode,this.props.searchContext,this.props.filterResults,this.props.geocodingSize,{input:M||""},(z=>{if(null==z)return;const b=(z.results||[]).filter((M=>"FutureRoute"!==M.type||"FutureRoute"===M.type&&M.properties.time>HM().unix())).map((M=>{if("CurrentLocation"===M.type||"SelectFromMap"===M.type||"SelectFromOwnLocations"===M.type||"back"===M.type){const z=F({},M);return z.properties.labelId=X.default.t(M.properties.labelId),z}return M}));M!==this.state.value&&M!==this.state.pendingSelection&&"SelectFromOwnLocations"!==this.state.pendingSelection&&"back"!==this.state.pendingSelection&&"FutureRoute"!==this.state.pendingSelection||this.setState({valid:!0,suggestions:b},(()=>this.checkPendingSelection()))}),this.props.pathOpts,this.props.refPoint)})),this.clearInput=()=>{const M={editing:!0,value:"",sources:this.props.sources,ownPlaces:!1,renderMobileSearch:this.props.isMobile};this.setState(M,(()=>this.fetchFunction({value:"",cleanExecuted:!0}))),this.props.onClear&&this.props.onClear(this.props.id),this.input.focus()},this.inputClicked=M=>{if(this.input.focus(),this.clearLocationText(),this.props.isMobile&&this.props.lock(),this.state.editing)this.props.isMobile&&!this.state.renderMobileSearch&&this.setState({renderMobileSearch:!0});else{const z={editing:!0,pendingSelection:null,renderMobileSearch:this.props.isMobile},b={editing:!0,pendingSelection:null,value:M};this.state.suggestions.length?(this.fetchFunction({value:this.state.value}),this.setState(z)):"object"!=typeof M&&M?this.setState(b,(()=>this.fetchFunction({value:M}))):this.setState(z,(()=>this.fetchFunction({value:this.state.value})))}},this.storeInputReference=M=>{null!==M&&(this.input=M.input,this.props.storeRef&&this.props.storeRef(M.input))},this.fillInput=M=>{this.fInput=M.properties.name;const z={editing:!0,value:M.properties.name,checkPendingSelection:M,valid:!0};this.setState(z),this.fetchFunction({value:M.properties.name}),this.input.focus()},this.renderItem=M=>{const z="FutureRoute"===M.type?F({},M,{translatedText:zz(M)}):M,b=Mz(M);return B.default.createElement(E.default,{item:z,content:b,loading:!this.state.valid,isMobile:this.props.isMobile,ariaFavouriteString:X.default.t("favourite"),color:this.props.color,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fillInput:this.fillInput,fontWeights:this.props.fontWeights,getAutoSuggestIcons:this.props.getAutoSuggestIcons,modeIconColors:this.props.modeIconColors,modeSet:this.props.modeSet})},this.closeMobileSearch=()=>{this.props.unlock(),this.setState({renderMobileSearch:!1,value:this.props.value},(()=>{window.scrollTo(0,this.state.scrollY),this.onSuggestionsClearRequested()}))},this.keyDown=M=>{if(this.selectionDone)return;const z=M.key;if("Escape"===z&&this.setState({editing:!1}),this.state.editing)return"Enter"===z&&""!==this.state.value&&this.setState({pendingSelection:!0},(()=>{this.fetchFunction({value:this.state.value})})),void this.inputClicked();if("Enter"!==z&&"ArrowDown"!==z||""!==this.state.value){if("ArrowDown"===z&&""!==this.state.value){const M={editing:!0,value:this.state.value};this.setState(M,(()=>this.fetchFunction({value:this.state.value})))}this.state.editing||this.setState({editing:!0}),"Tab"===z&&this.onBlur()}else this.clearInput()},this.suggestionAsAriaContent=()=>{let M=[];const z=this.state.suggestions[0];return z&&(z.type&&z.type.includes("Favourite")&&M.push(X.default.t("favourite")),M=M.concat(Mz(this.state.suggestions[0]))),[...new Set(M)].join(" - ")},this.clearOldSearches=()=>{const{context:M,clearOldSearches:z,clearFutureRoutes:b}=this.props.searchContext;M&&z&&(z(M),b&&b(M),this.fetchFunction({value:this.state.value}))},this.isOriginDestinationOrViapoint=()=>"origin"===this.props.id||"destination"===this.props.id||"via-point"===this.props.id||"origin-stop-near-you"===this.props.id,this.clearLocationText=()=>{["Valittu sijainti","Nykyinen sijaintisi","Current position","Selected location","Vald position","Använd min position","Min position","Käytä nykyistä sijaintia","Use current location","Your current location"].includes(this.state.value)&&this.clearInput()},this.onFocus=()=>{this.clearLocationText();const M=window.pageYOffset;return this.setState({scrollY:M})},HM.tz.setDefault(M.timeZone),HM.locale(M.lang),this.state={value:M.value,suggestions:[],editing:!1,valid:!0,renderMobileSearch:!1,sources:M.sources,ownPlaces:!1,typingTimer:null,typing:!1,pendingSelection:null,suggestionIndex:0,cleanExecuted:!1,scrollY:0},Object.keys(YM).forEach((M=>{X.default.addResourceBundle(M,"translation",YM[M])}))}shouldComponentUpdate(M,z){return!w.default(z,this.state)||!w.default(M,this.props)}componentDidUpdate(){X.default.language!==this.props.lang&&X.default.changeLanguage(this.props.lang)}UNSAFE_componentWillReceiveProps(M){M.value===this.state.value||this.state.editing||this.setState({value:M.value})}render(){X.default.language!==this.props.lang&&X.default.changeLanguage(this.props.lang);const{value:M,suggestions:z,renderMobileSearch:b,cleanExecuted:p}=this.state,O={placeholder:this.props.translatedPlaceholder?this.props.translatedPlaceholder:X.default.t(this.props.placeholder),value:M,onChange:this.onChange,onBlur:this.onBlur,className:`${UM.input} ${this.props.isMobile&&this.props.transportMode?UM.thin:""} ${UM[this.props.id]||""} ${this.state.value?UM.hasValue:""} ${this.props.inputClassName}`,onKeyDown:this.keyDown,required:this.props.required},o=this.props.id.replace("searchfield-","");let c=this.props.ariaLabel||X.default.t(o);c=c.replace("searchfield-","").concat(".");const A=this.props.required?`${X.default.t("required")}.`:"",q=this.props.isMobile?X.default.t("search-autosuggest-label-instructions-mobile"):X.default.t("search-autosuggest-label-instructions-desktop"),e="origin"===this.props.id?X.default.t("search-autosuggest-label-move-to-destination"):"",n=q.concat(" ").concat(e),W=X.default.t("search-autosuggest-len",{count:z.length}),a=()=>this.suggestionAsAriaContent()||this.props.value?X.default.t("search-current-suggestion",{selection:this.suggestionAsAriaContent().toLowerCase()||this.props.value}):"";return B.default.createElement(B.default.Fragment,null,B.default.createElement("span",{className:UM["sr-only"],role:"alert"},!this.state.typing&&this.state.editing&&`${W} ${a()}`),this.props.isMobile&&B.default.createElement(KM,{searchOpen:b,appElement:this.props.appElement,clearOldSearches:this.clearOldSearches,id:this.props.id,clearInput:this.clearInput,value:this.state.value,suggestions:[...z,{type:"clear-search-history",labelId:X.default.t("clear-search-history")}],inputProps:F({},O,{placeholder:this.isOriginDestinationOrViapoint()?X.default.t("address-place-or-business"):O.placeholder}),fetchFunction:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:bz,renderSuggestion:this.renderItem,closeHandle:this.closeMobileSearch,ariaLabel:A.concat(" ").concat(c).concat(" ").concat(a()),label:this.props.mobileLabel?this.props.mobileLabel:X.default.t(this.props.id),onSuggestionSelected:this.onSelected,dialogHeaderText:X.default.t("delete-old-searches-header"),dialogPrimaryButtonText:X.default.t("delete"),dialogSecondaryButtonText:X.default.t("cancel"),clearInputButtonText:X.default.t("clear-button-label"),focusInput:p,color:this.props.color,hoverColor:this.props.hoverColor,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fontWeights:this.props.fontWeights,showScroll:this.props.showScroll}),!b&&B.default.createElement("div",{className:h.default(UM["autosuggest-input-container"],UM[this.props.id]),style:{"--color":`${this.props.color}`,"--hover-color":`${this.props.hoverColor}`}},this.props.icon&&B.default.createElement("div",{className:h.default(UM["autosuggest-input-icon"],UM[this.props.id],this.props.inputClassName&&`${this.props.inputClassName}-input-icon`),"aria-label":A.concat(" ").concat(c).concat(" ").concat(X.default.t("search-autosuggest-label"))},B.default.createElement(x.default,{img:`${this.props.icon}`})),B.default.createElement(m.default,{alwaysRenderSuggestions:this.state.editing,id:this.props.id,suggestions:z,onSuggestionsFetchRequested:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:bz,renderSuggestion:this.renderItem,inputProps:F({},O,{onFocus:this.onFocus}),focusInputOnSuggestionClick:!0,shouldRenderSuggestions:()=>this.state.editing,highlightFirstSuggestion:!this.state.ownPlaces,theme:UM,renderInputComponent:M=>B.default.createElement(B.default.Fragment,null,B.default.createElement("label",{className:UM["sr-only"],htmlFor:this.props.id},a().concat(" ").concat(A).concat(" ").concat(c).concat(" ").concat(n)),B.default.createElement("input",Object.assign({"aria-label":a().concat(" ").concat(A).concat(" ").concat(c).concat(" ").concat(n),id:this.props.id,onClick:this.inputClicked,onKeyDown:this.keyDown},M)),this.state.value&&this.clearButton()),onSuggestionSelected:this.onSelected,ref:this.storeInputReference})))}}pz.defaultProps={autoFocus:!1,className:"",icon:void 0,value:"",transportMode:void 0,lang:"fi",sources:[],isMobile:!1,color:"#007ac9",hoverColor:"#0062a1",accessiblePrimaryColor:"#0074be",timeZone:"Europe/Helsinki",pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},modeIconColors:{"mode-bus":"#007ac9","mode-rail":"#8c4799","mode-tram":"#008151","mode-metro":"#ed8c00","mode-ferry":"#007A97","mode-citybike":"#f2b62d","mode-funicular":"#ff00ff"},required:!1,modeSet:void 0,showScroll:!1,refPoint:{}},"production"!==process.env.NODE_ENV&&(pz.propTypes={appElement:N.default.string.isRequired,autoFocus:N.default.bool,className:N.default.string,icon:N.default.string,id:N.default.string.isRequired,placeholder:N.default.string.isRequired,translatedPlaceholder:N.default.string,value:N.default.string,searchContext:N.default.any.isRequired,ariaLabel:N.default.string,onSelect:N.default.func,transportMode:N.default.string,filterResults:N.default.func,geocodingSize:N.default.number,onClear:N.default.func,storeRef:N.default.func,handleViaPoints:N.default.func,focusChange:N.default.func,lang:N.default.string,sources:N.default.arrayOf(N.default.string),targets:N.default.arrayOf(N.default.string),isMobile:N.default.bool,color:N.default.string,hoverColor:N.default.string,accessiblePrimaryColor:N.default.string,timeZone:N.default.string,pathOpts:N.default.shape({routesPrefix:N.default.string,stopsPrefix:N.default.string}),mobileLabel:N.default.string,lock:N.default.func.isRequired,unlock:N.default.func.isRequired,refPoint:N.default.shape({address:N.default.string,lat:N.default.number,lon:N.default.number}),inputClassName:N.default.string,fontWeights:N.default.shape({medium:N.default.number}),modeIconColors:N.default.object,getAutoSuggestIcons:N.default.object,required:N.default.bool,modeSet:N.default.string,showScroll:N.default.bool,isEmbedded:N.default.bool});const Oz=(oz=pz,M=>{const{lock:z,unlock:b}=ZM.useScrollLock();return B.default.createElement(oz,Object.assign({lock:z,unlock:b},M))});var oz;M.default=Oz,Object.defineProperty(M,"__esModule",{value:!0})}));
|
|
14
14
|
//# sourceMappingURL=index.js.map
|