@sabstravtech/obtservices 0.0.2 → 0.0.19010300
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/README.md +9 -12
- package/{dist/obtservices/angular → angular}/components/basket-panel.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/classes/environment.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/classes/event-messenager.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/classes/helpers.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/basket-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/cabhire-quote-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/carhire-availability-detail.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/carhire-quote-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/conferma-office-names.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/conferma-quicklist.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/eurostar-quote.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/flight-quote.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-rail-cards.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-rail-station.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-risk-alerts.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-user-company-offices.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-user-recent-searches.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/get-users-baskets-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/getMiAutoSugestions.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/hotel-avaliability-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/hotel-quote-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/irl-quote-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/lounge-quote.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/parking-quote-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/rail-quote-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-airlines-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-airports-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-cities.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-conferma-cities.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-depots.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-hotel-chains.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-postcodes.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-rail-stations.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/search-users-can-book-for-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/user-addresses.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/user-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/user-message.fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/user-products-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/fetchers/user-ui-configs-fetcher.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/enterprise-basket.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/hotel-avallibility.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/http-call.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/logon.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/modal-opener.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/my-bookings.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/route-happy.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/search.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/storage.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/user.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/services/webtoken.service.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/testers/postcode-validate.tester.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/testers/validate-mi-free-value.tester.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/accept-new-price.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/add-item-to-basket.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/addUserToBasketItem.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/book-basket-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/create-basket-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/move-basket-item-to-basket.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/remove-basket-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/remove-item-from-basket.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/remove-recent-search.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/remove-user-address.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/revalidate-basket-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/save-recent-search.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/save-user-address.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/send-basket-for-approval.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/set-basket-item-lead-passenger.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/set-basket-item-mi-group.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/set-basket-item-mi-value-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/set-payment-option.updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/update-basket-notes-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/lib/vendor/updaters/update-basket-title-updater.d.ts +1 -1
- package/{dist/obtservices/angular → angular}/obtservices.module.d.ts +1 -1
- package/angular/package.json +11 -0
- package/angular/sabstravtech-obtservices-angular.metadata.json +1 -0
- package/base/package.json +11 -0
- package/{dist/obtservices/base/obtservices-base.metadata.json → base/sabstravtech-obtservices-base.metadata.json} +1 -1
- package/{dist/obtservices/bundles/obtservices-angular.umd.js → bundles/sabstravtech-obtservices-angular.umd.js} +11 -10
- package/bundles/sabstravtech-obtservices-angular.umd.js.map +1 -0
- package/{dist/obtservices/bundles/obtservices-angular.umd.min.js → bundles/sabstravtech-obtservices-angular.umd.min.js} +2 -2
- package/bundles/sabstravtech-obtservices-angular.umd.min.js.map +1 -0
- package/{dist/obtservices/bundles/obtservices-base.umd.js → bundles/sabstravtech-obtservices-base.umd.js} +3 -3
- package/bundles/sabstravtech-obtservices-base.umd.js.map +1 -0
- package/{dist/obtservices/bundles/obtservices-base.umd.min.js → bundles/sabstravtech-obtservices-base.umd.min.js} +2 -2
- package/{dist/obtservices/bundles/obtservices-base.umd.min.js.map → bundles/sabstravtech-obtservices-base.umd.min.js.map} +1 -1
- package/{dist/obtservices/bundles/obtservices.umd.js → bundles/sabstravtech-obtservices.umd.js} +3 -3
- package/bundles/sabstravtech-obtservices.umd.js.map +1 -0
- package/bundles/sabstravtech-obtservices.umd.min.js +2 -0
- package/bundles/sabstravtech-obtservices.umd.min.js.map +1 -0
- package/{dist/obtservices/esm2015 → esm2015}/angular/components/basket-panel.js +1 -1
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/classes/environment.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/classes/event-messenager.js +2 -2
- package/esm2015/angular/lib/vendor/classes/helpers.js +82 -0
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/basket-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/cabhire-quote-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/carhire-availability-detail.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/carhire-quote-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/conferma-office-names.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/conferma-quicklist.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/eurostar-quote.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/flight-quote.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-rail-cards.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-rail-station.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-risk-alerts.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-user-company-offices.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-user-recent-searches.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/get-users-baskets-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/getMiAutoSugestions.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/hotel-avaliability-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/hotel-quote-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/irl-quote-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/lounge-quote.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/parking-quote-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/rail-quote-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-airlines-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-airports-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-cities.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-conferma-cities.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-depots.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-hotel-chains.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-postcodes.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-rail-stations.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/search-users-can-book-for-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/user-addresses.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/user-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/user-message.fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/user-products-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/fetchers/user-ui-configs-fetcher.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/enterprise-basket.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/hotel-avallibility.service.js +2 -2
- package/esm2015/angular/lib/vendor/services/http-call.service.js +220 -0
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/logon.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/modal-opener.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/my-bookings.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/route-happy.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/search.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/storage.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/user.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/services/webtoken.service.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/testers/postcode-validate.tester.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/testers/validate-mi-free-value.tester.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/accept-new-price.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/add-item-to-basket.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/addUserToBasketItem.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/book-basket-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/create-basket-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/move-basket-item-to-basket.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/remove-basket-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/remove-item-from-basket.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/remove-recent-search.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/remove-user-address.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/revalidate-basket-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/save-recent-search.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/save-user-address.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/send-basket-for-approval.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/set-basket-item-lead-passenger.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/set-basket-item-mi-group.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/set-basket-item-mi-value-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/set-payment-option.updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/update-basket-notes-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/updaters/update-basket-title-updater.js +2 -2
- package/{dist/obtservices/esm2015 → esm2015}/angular/obtservices.module.js +3 -3
- package/esm2015/angular/sabstravtech-obtservices-angular.js +18 -0
- package/esm2015/base/sabstravtech-obtservices-base.js +9 -0
- package/esm2015/sabstravtech-obtservices.js +5 -0
- package/{dist/obtservices/fesm2015/obtservices-angular.js → fesm2015/sabstravtech-obtservices-angular.js} +7 -6
- package/fesm2015/sabstravtech-obtservices-angular.js.map +1 -0
- package/{dist/obtservices/fesm2015/obtservices-base.js → fesm2015/sabstravtech-obtservices-base.js} +1 -1
- package/fesm2015/sabstravtech-obtservices-base.js.map +1 -0
- package/{dist/obtservices/fesm2015/obtservices.js → fesm2015/sabstravtech-obtservices.js} +1 -1
- package/fesm2015/sabstravtech-obtservices.js.map +1 -0
- package/package.json +23 -87
- package/{dist/obtservices/obtservices.metadata.json → sabstravtech-obtservices.metadata.json} +1 -1
- package/dist/obtservices/README.md +0 -24
- package/dist/obtservices/angular/obtservices-angular.metadata.json +0 -1
- package/dist/obtservices/angular/package.json +0 -11
- package/dist/obtservices/base/package.json +0 -11
- package/dist/obtservices/bundles/obtservices-angular.umd.js.map +0 -1
- package/dist/obtservices/bundles/obtservices-angular.umd.min.js.map +0 -1
- package/dist/obtservices/bundles/obtservices-base.umd.js.map +0 -1
- package/dist/obtservices/bundles/obtservices.umd.js.map +0 -1
- package/dist/obtservices/bundles/obtservices.umd.min.js +0 -2
- package/dist/obtservices/bundles/obtservices.umd.min.js.map +0 -1
- package/dist/obtservices/esm2015/angular/lib/vendor/classes/helpers.js +0 -81
- package/dist/obtservices/esm2015/angular/lib/vendor/services/http-call.service.js +0 -220
- package/dist/obtservices/esm2015/angular/obtservices-angular.js +0 -18
- package/dist/obtservices/esm2015/base/obtservices-base.js +0 -9
- package/dist/obtservices/esm2015/obtservices.js +0 -5
- package/dist/obtservices/fesm2015/obtservices-angular.js.map +0 -1
- package/dist/obtservices/fesm2015/obtservices-base.js.map +0 -1
- package/dist/obtservices/fesm2015/obtservices.js.map +0 -1
- package/dist/obtservices/package.json +0 -23
- /package/{dist/obtservices/angular → angular}/classes.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/components/with-component.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/components.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/data.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/fetchers.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/lib/vendor/types/graphql.angular.types.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/public_api.d.ts +0 -0
- /package/{dist/obtservices/angular/obtservices-angular.d.ts → angular/sabstravtech-obtservices-angular.d.ts} +0 -0
- /package/{dist/obtservices/angular → angular}/services.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/types.d.ts +0 -0
- /package/{dist/obtservices/angular → angular}/updaters.d.ts +0 -0
- /package/{dist/obtservices/base → base}/classes.d.ts +0 -0
- /package/{dist/obtservices/base → base}/fetchers.d.ts +0 -0
- /package/{dist/obtservices/base → base}/interfaces.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/base-enterprise.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/base-network-call.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/basket-info-mi-details.impl.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/bookable-basket.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/cabhire-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/carhire-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/enviroment.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/eurostar-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/eurostar-search-type.enum.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/event-messenager.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/flight-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/flight-search-type.enum.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/helpers.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/hotel-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/irl-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/limited-cache.class.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/lounges-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/management-info-and-valid.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/modal-types.enum.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/parking-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/rail-direction.enum.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/rail-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/routehappy-request.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/routehappy-response.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/supplementary-booking-info-impl.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/user-favourite.enum.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/classes/validator.checker.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/basket-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/cabhire-quote-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/carhire-availability-detail.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/carhire-quote-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/conferma-office-names.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/conferma-quicklist.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/eurostar-quote.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/flight-quote.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-rail-cards.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-rail-station.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-risk-alerts.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-user-company-offices.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-user-recent-searches.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/get-users-baskets-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/getMiAutoSugestions.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/hotel-avaliability-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/hotel-quote-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/irl-quote-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/list-fetchable-enterprise.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/lounge-quote.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/object-fetchable-enterprise.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/parking-quote-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/rail-quote-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-airlines.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-airports-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-cities.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-conferma-cities.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-depots.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-hotel-chains.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-postcodes.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-rail-stations.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/search-users-can-book-for-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/user-addresses.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/user-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/user-message.fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/user-products-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/fetchers/user-ui-configs-fetcher.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Icabhire-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Icarhire-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Ienterprise-basket.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Ieurostar-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Iflight-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Ihotel-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Iirl-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Ilounges-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Imybookings.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Iparking-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Irail-enterprise-search.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Isearch.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Isupplementary-booking-info-impl.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/Iuser.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/car-hire-classes.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/car-hire-filters.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/car-hire-sort.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/cheapest-price.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/code-name.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/flight-filters.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/flight-multi-destination.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-airport-express-stations.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-basket-item.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-journey-leg.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-recent-search-args.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-selected-ticket.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-ticket-group.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/rail-ticket-groups.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/search-objects.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/select-filter.interface.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/user.data.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/interfaces/value-display.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/models/login.model.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/models/regexp.model.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/models/traveller.object.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/enterprise-basket.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/hotel-avallibility.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/http-call.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/logon.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/modal-opener.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/my-bookings.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/routehappy.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/search.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/storage.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/url.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/user.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/services/webtoken.service.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/testers/base.tester.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/testers/postcode-validate.tester.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/testers/validate-mi-free-value.tester.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/types/graphql.types.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/types/types.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/accept-new-price.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/add-item-to-basket.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/addUserToBasketItem.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/book-basket-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/create-basket-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/move-basket-item-to-basket.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/object-updater-enterprise.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/remove-basket-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/remove-item-from-basket.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/remove-recent-search-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/remove-user-address-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/revalidate-basket-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/save-recent-search-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/save-user-address.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/send-basket-for-approval.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/set-basket-item-lead-passenger.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/set-basket-item-mi-group.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/set-basket-item-mi-value-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/set-basket-item-paymenr-option.updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/update-basket-notes-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/lib/vendor/updaters/update-basket-title-updater.d.ts +0 -0
- /package/{dist/obtservices/base → base}/models.d.ts +0 -0
- /package/{dist/obtservices/base → base}/public_api.d.ts +0 -0
- /package/{dist/obtservices/base/obtservices-base.d.ts → base/sabstravtech-obtservices-base.d.ts} +0 -0
- /package/{dist/obtservices/base → base}/services.d.ts +0 -0
- /package/{dist/obtservices/base → base}/testers.d.ts +0 -0
- /package/{dist/obtservices/base → base}/types.d.ts +0 -0
- /package/{dist/obtservices/base → base}/updaters.d.ts +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/classes.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/components/with-component.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/components.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/data.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/fetchers.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/data/airports.data.json +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/data/flight-booking.data.json +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/lib/vendor/types/graphql.angular.types.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/public_api.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/services.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/types.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/angular/updaters.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/classes.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/fetchers.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/interfaces.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/base-enterprise.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/base-network-call.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/basket-info-mi-details.impl.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/bookable-basket.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/cabhire-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/carhire-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/enviroment.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/eurostar-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/eurostar-search-type.enum.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/event-messenager.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/flight-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/flight-search-type.enum.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/helpers.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/hotel-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/irl-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/limited-cache.class.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/lounges-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/management-info-and-valid.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/modal-types.enum.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/parking-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/rail-direction.enum.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/rail-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/routehappy-request.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/routehappy-response.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/supplementary-booking-info-impl.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/user-favourite.enum.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/classes/validator.checker.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/data/countries.json +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/data/euro-stations.json +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/basket-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/cabhire-quote-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/carhire-availability-detail.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/carhire-quote-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/conferma-office-names.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/conferma-quicklist.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/eurostar-quote.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/flight-quote.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-rail-cards.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-rail-station.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-risk-alerts.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-user-company-offices.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-user-recent-searches.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/get-users-baskets-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/getMiAutoSugestions.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/hotel-avaliability-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/hotel-quote-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/irl-quote-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/list-fetchable-enterprise.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/lounge-quote.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/object-fetchable-enterprise.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/parking-quote-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/rail-quote-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-airlines.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-airports-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-cities.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-conferma-cities.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-depots.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-hotel-chains.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-postcodes.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-rail-stations.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/search-users-can-book-for-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/user-addresses.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/user-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/user-message.fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/user-products-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/fetchers/user-ui-configs-fetcher.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Icabhire-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Icarhire-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Ienterprise-basket.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Ieurostar-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Iflight-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Ihotel-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Iirl-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Ilounges-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Imybookings.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Iparking-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Irail-enterprise-search.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Isearch.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Isupplementary-booking-info-impl.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/Iuser.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/car-hire-classes.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/car-hire-filters.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/car-hire-sort.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/cheapest-price.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/code-name.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/flight-filters.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/flight-multi-destination.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-airport-express-stations.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-basket-item.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-journey-leg.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-recent-search-args.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-selected-ticket.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-ticket-group.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/rail-ticket-groups.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/search-objects.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/select-filter.interface.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/user.data.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/interfaces/value-display.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/models/login.model.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/models/regexp.model.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/models/traveller.object.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/enterprise-basket.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/hotel-avallibility.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/http-call.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/logon.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/modal-opener.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/my-bookings.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/routehappy.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/search.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/storage.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/url.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/user.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/services/webtoken.service.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/testers/base.tester.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/testers/postcode-validate.tester.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/testers/validate-mi-free-value.tester.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/types/graphql.types.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/types/types.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/accept-new-price.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/add-item-to-basket.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/addUserToBasketItem.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/book-basket-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/create-basket-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/move-basket-item-to-basket.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/object-updater-enterprise.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/remove-basket-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/remove-item-from-basket.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/remove-recent-search-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/remove-user-address-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/revalidate-basket-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/save-recent-search-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/save-user-address.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/send-basket-for-approval.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/set-basket-item-lead-passenger.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/set-basket-item-mi-group.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/set-basket-item-mi-value-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/set-basket-item-paymenr-option.updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/update-basket-notes-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/lib/vendor/updaters/update-basket-title-updater.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/models.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/public_api.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/services.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/testers.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/types.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/base/updaters.js +0 -0
- /package/{dist/obtservices/esm2015 → esm2015}/public_api.js +0 -0
- /package/{dist/obtservices/public_api.d.ts → public_api.d.ts} +0 -0
- /package/{dist/obtservices/obtservices.d.ts → sabstravtech-obtservices.d.ts} +0 -0
- /package/{dist/obtservices/tsconfig.lib.tsbuildinfo → tsconfig.lib.tsbuildinfo} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("rxjs/operators"),require("lodash"),require("moment"),require("ajv")):"function"==typeof define&&define.amd?define("obtservices/base",["exports","rxjs","rxjs/operators","lodash","moment","ajv"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).obtservices=e.obtservices||{},e.obtservices.base={}),e.rxjs,e.rxjs.operators,e._,e.moment,e.Ajv)}(this,(function(e,t,r,i,n,o){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(i),u=a(n),c=a(o),l=function(){function e(e,r){void 0===r&&(r=null),this.storageService=e,this._cheapestResultPrice={amount:null,currencyCode:null},this.isValid=new t.BehaviorSubject(!1),this.results=new t.BehaviorSubject([]),this.messages=new t.BehaviorSubject([]),this.messagesInfo=new t.BehaviorSubject([]),this.validationMessages=[],this.infoMessages=[],this.isLoading=new t.BehaviorSubject(!1),this.tempParams={},this.doChecks=!0,this.fullResults=[],this.mapper=function(e){return e},r&&(this.mapper=r)}return Object.defineProperty(e.prototype,"cheapestPrice",{get:function(){return this._cheapestResultPrice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalUserSearch",{get:function(){return this._originalUserSearch},enumerable:!1,configurable:!0}),e.prototype.updateTempParams=function(e){this.doChecks=!1,Object.assign(this,e),this._cheapestResultPrice=null,this.doChecks=!0},e.prototype._startSearch=function(e){var t=this;return this.isLoading.next(!0),this.fullResults=[],new Promise((function(n,o){try{e.pipe(r.take(1)).subscribe((function(e){console.log("Got results",i.cloneDeep(e)),t.fullResults=t.mapper(e),t._cheapestResultPrice=t.updateLowestPrice(t.fullResults),t.storageService.setSessionItem(t.resultsSessionName,t.makeSessionResults(t.fullResults)),t.results.next(t.fullResults),n(0!==t.fullResults.length)}),(function(e){t.results.next([]),n(!1),t.isLoading.next(!1)}),(function(){t.isLoading.next(!1)}))}catch(e){t.storageService.setSessionItem(t.resultsSessionName,[]),t.isLoading.next(!1),t.results.next([]),o(e)}}))},e.prototype.reset=function(){this.storageService.removeSessionItem(this.resultsSessionName),this.fullResults=[],this.results.next([]),this.resetQuery()},e.prototype.makeSessionResults=function(e){return e},e}(),d=function(){function e(t){this.value=t,this._component=null,e[t]=this}return Object.defineProperty(e.prototype,"component",{get:function(){return this._component},set:function(e){this._component&&console.warn("Compnent already set for "+this.value,this._component,e),this._component=e},enumerable:!1,configurable:!0}),e}();d.ModalErrorComponent=new d("ModalErrorComponent"),d.ModalNetWorkErrorComponent=new d("ModalNetworkErrorComponent"),d.BaseModalComponent=new d("BaseModalComponent"),d.AutoLogout=new d("AutoLogout"),d.RiskAlertDetail=new d("RiskAlertDetailModalComponent");var p=function(){function e(e){this.modelService=e}return e.prototype.checkError=function(e){if(e)throw this.modelService.open(d.ModalNetWorkErrorComponent,{},{error:e}),e},e.prototype.processCall=function(e){var i=this;return e.pipe(r.take(1),r.map((function(e){return i.checkError(e.error),i.getDataFromResult(e)})),r.catchError((function(e){return i.checkError(e),t.of({})})))},e}(),h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("rxjs/operators"),require("lodash"),require("moment"),require("ajv")):"function"==typeof define&&define.amd?define("@sabstravtech/obtservices/base",["exports","rxjs","rxjs/operators","lodash","moment","ajv"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).sabstravtech=e.sabstravtech||{},e.sabstravtech.obtservices=e.sabstravtech.obtservices||{},e.sabstravtech.obtservices.base={}),e.rxjs,e.rxjs.operators,e._,e.moment,e.Ajv)}(this,(function(e,t,r,i,n,o){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(i),u=a(n),c=a(o),l=function(){function e(e,r){void 0===r&&(r=null),this.storageService=e,this._cheapestResultPrice={amount:null,currencyCode:null},this.isValid=new t.BehaviorSubject(!1),this.results=new t.BehaviorSubject([]),this.messages=new t.BehaviorSubject([]),this.messagesInfo=new t.BehaviorSubject([]),this.validationMessages=[],this.infoMessages=[],this.isLoading=new t.BehaviorSubject(!1),this.tempParams={},this.doChecks=!0,this.fullResults=[],this.mapper=function(e){return e},r&&(this.mapper=r)}return Object.defineProperty(e.prototype,"cheapestPrice",{get:function(){return this._cheapestResultPrice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalUserSearch",{get:function(){return this._originalUserSearch},enumerable:!1,configurable:!0}),e.prototype.updateTempParams=function(e){this.doChecks=!1,Object.assign(this,e),this._cheapestResultPrice=null,this.doChecks=!0},e.prototype._startSearch=function(e){var t=this;return this.isLoading.next(!0),this.fullResults=[],new Promise((function(n,o){try{e.pipe(r.take(1)).subscribe((function(e){console.log("Got results",i.cloneDeep(e)),t.fullResults=t.mapper(e),t._cheapestResultPrice=t.updateLowestPrice(t.fullResults),t.storageService.setSessionItem(t.resultsSessionName,t.makeSessionResults(t.fullResults)),t.results.next(t.fullResults),n(0!==t.fullResults.length)}),(function(e){t.results.next([]),n(!1),t.isLoading.next(!1)}),(function(){t.isLoading.next(!1)}))}catch(e){t.storageService.setSessionItem(t.resultsSessionName,[]),t.isLoading.next(!1),t.results.next([]),o(e)}}))},e.prototype.reset=function(){this.storageService.removeSessionItem(this.resultsSessionName),this.fullResults=[],this.results.next([]),this.resetQuery()},e.prototype.makeSessionResults=function(e){return e},e}(),d=function(){function e(t){this.value=t,this._component=null,e[t]=this}return Object.defineProperty(e.prototype,"component",{get:function(){return this._component},set:function(e){this._component&&console.warn("Compnent already set for "+this.value,this._component,e),this._component=e},enumerable:!1,configurable:!0}),e}();d.ModalErrorComponent=new d("ModalErrorComponent"),d.ModalNetWorkErrorComponent=new d("ModalNetworkErrorComponent"),d.BaseModalComponent=new d("BaseModalComponent"),d.AutoLogout=new d("AutoLogout"),d.RiskAlertDetail=new d("RiskAlertDetailModalComponent");var p=function(){function e(e){this.modelService=e}return e.prototype.checkError=function(e){if(e)throw this.modelService.open(d.ModalNetWorkErrorComponent,{},{error:e}),e},e.prototype.processCall=function(e){var i=this;return e.pipe(r.take(1),r.map((function(e){return i.checkError(e.error),i.getDataFromResult(e)})),r.catchError((function(e){return i.checkError(e),t.of({})})))},e}(),h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function f(e,t,r,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,r,a):n(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function g(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))}function v(e,t){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(6===o[0]&&a.label<n[1]){a.label=n[1],n=o;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(o);break}n[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(S(arguments[t]));return e}Object.create;var T,P,_,A,D,k,O,F,N,I,R,E,M,B,L,j,w,x,U,V,H,G,Y,Q,W,K,q,J,z,X,Z,$,ee,te=function(){};!function(e){e.BeforeSearch="BEFORE_SEARCH",e.AfterSearch="AFTER_SEARCH"}(T||(T={})),function(e){e.CheckIn="CheckIn",e.HandCarry="HandCarry"}(P||(P={})),function(e){e.Open="OPEN",e.Booked="BOOKED",e.BookingFailed="BOOKING_FAILED"}(_||(_={})),function(e){e.Open="OPEN",e.Booked="BOOKED",e.AwaitingApproval="AWAITING_APPROVAL",e.Approved="APPROVED",e.Disapproved="DISAPPROVED",e.PartiallyBooked="PARTIALLY_BOOKED",e.BookingFailed="BOOKING_FAILED"}(A||(A={})),function(e){e.Root="ROOT",e.Tmc="TMC",e.Company="COMPANY",e.Office="OFFICE",e.CompanyGroup="COMPANY_GROUP",e.SelfBook="SELF_BOOK",e.Booker="BOOKER",e.Traveller="TRAVELLER",e.BookerWithSelf="BOOKER_WITH_SELF"}(D||(D={})),function(e){e.Any="Any",e.DdaCar="DDACar",e.CoachLarge="CoachLarge",e.CoachSmall="CoachSmall",e.Economy="Economy",e.EconomyCoach="EconomyCoach",e.EconomyMpvSmall="EconomyMPVSmall",e.EconomyMpvLarge="EconomyMPVLarge",e.EconomySuv="EconomySUV",e.ExecutiveCar="ExecutiveCar",e.ExecutiveSuv="ExecutiveSUV",e.GreenCar="GreenCar",e.GreenExecutive="GreenExecutive",e.GreenSuv="GreenSUV",e.SmallMpv="SmallMPV",e.MediumMpv="MediumMPV",e.LargeMpv="LargeMPV",e.StandardCar="StandardCar",e.Suv="SUV",e.BlackCab="BlackCab",e.TaxiSuv="TaxiSUV"}(k||(k={})),function(e){e.Mini="Mini",e.MiniElite="MiniElite",e.Economy="Economy",e.EconomyElite="EconomyElite",e.Compact="Compact",e.CompactElite="CompactElite",e.Intermediate="Intermediate",e.IntermediateElite="IntermediateElite",e.Standard="Standard",e.StandardElite="StandardElite",e.Fullsize="Fullsize",e.FullsizeElite="FullsizeElite",e.Premium="Premium",e.PremiumElite="PremiumElite",e.Luxury="Luxury",e.LuxuryElite="LuxuryElite",e.Oversize="Oversize",e.Special="Special"}(O||(O={})),function(e){e.Manual="Manual",e.Auto="Auto"}(F||(F={})),function(e){e.TwoToThreeDoor="TwoToThreeDoor",e.TwoOrFourDoor="TwoOrFourDoor",e.FourToFiveDoor="FourToFiveDoor",e.WagonOrEstate="WagonOrEstate",e.PassengerVan="PassengerVan",e.Limousine="Limousine",e.Sport="Sport",e.Convertible="Convertible",e.Suv="SUV",e.OpenAirAllTerrain="OpenAirAllTerrain",e.Special="Special",e.PickUpRegularCab="PickUpRegularCab",e.PickUpExtendedCab="PickUpExtendedCab",e.SpecialOfferCar="SpecialOfferCar",e.Coupe="Coupe",e.MonospaceEuropeanUse="MonospaceEuropeanUse",e.MotorHome="MotorHome",e.TwoWheelVehicle="TwoWheelVehicle",e.Roadster="Roadster"}(N||(N={})),function(e){e.Company="COMPANY",e.Office="OFFICE",e.User="USER"}(I||(I={})),function(e){e.Pending="Pending",e.Enabled="Enabled",e.Disabled="Disabled"}(R||(R={})),function(e){e.Aed="AED",e.Afn="AFN",e.All="ALL",e.Amd="AMD",e.Ang="ANG",e.Aoa="AOA",e.Ars="ARS",e.Aud="AUD",e.Awg="AWG",e.Azn="AZN",e.Bam="BAM",e.Bbd="BBD",e.Bdt="BDT",e.Bgn="BGN",e.Bhd="BHD",e.Bif="BIF",e.Bmd="BMD",e.Bnd="BND",e.Bob="BOB",e.Bov="BOV",e.Brl="BRL",e.Bsd="BSD",e.Btn="BTN",e.Bwp="BWP",e.Byn="BYN",e.Bzd="BZD",e.Cad="CAD",e.Cdf="CDF",e.Che="CHE",e.Chf="CHF",e.Chw="CHW",e.Clf="CLF",e.Clp="CLP",e.Cny="CNY",e.Cop="COP",e.Cou="COU",e.Crc="CRC",e.Cuc="CUC",e.Cup="CUP",e.Cve="CVE",e.Czk="CZK",e.Djf="DJF",e.Dkk="DKK",e.Dop="DOP",e.Dzd="DZD",e.Egp="EGP",e.Ern="ERN",e.Etb="ETB",e.Eur="EUR",e.Fjd="FJD",e.Fkp="FKP",e.Gbp="GBP",e.Gel="GEL",e.Ghs="GHS",e.Gip="GIP",e.Gmd="GMD",e.Gnf="GNF",e.Gtq="GTQ",e.Gyd="GYD",e.Hkd="HKD",e.Hnl="HNL",e.Hrk="HRK",e.Htg="HTG",e.Huf="HUF",e.Idr="IDR",e.Ils="ILS",e.Inr="INR",e.Iqd="IQD",e.Irr="IRR",e.Isk="ISK",e.Jmd="JMD",e.Jod="JOD",e.Jpy="JPY",e.Kes="KES",e.Kgs="KGS",e.Khr="KHR",e.Kmf="KMF",e.Kpw="KPW",e.Krw="KRW",e.Kwd="KWD",e.Kyd="KYD",e.Kzt="KZT",e.Lak="LAK",e.Lbp="LBP",e.Lkr="LKR",e.Lrd="LRD",e.Lsl="LSL",e.Lyd="LYD",e.Mad="MAD",e.Mdl="MDL",e.Mga="MGA",e.Mkd="MKD",e.Mmk="MMK",e.Mnt="MNT",e.Mop="MOP",e.Mru="MRU",e.Mur="MUR",e.Mvr="MVR",e.Mwk="MWK",e.Mxn="MXN",e.Mxv="MXV",e.Myr="MYR",e.Mzn="MZN",e.Nad="NAD",e.Ngn="NGN",e.Nio="NIO",e.Nok="NOK",e.Npr="NPR",e.Nzd="NZD",e.Omr="OMR",e.Pab="PAB",e.Pen="PEN",e.Pgk="PGK",e.Php="PHP",e.Pkr="PKR",e.Pln="PLN",e.Pyg="PYG",e.Qar="QAR",e.Ron="RON",e.Rsd="RSD",e.Rub="RUB",e.Rwf="RWF",e.Sar="SAR",e.Sbd="SBD",e.Scr="SCR",e.Sdg="SDG",e.Sek="SEK",e.Sgd="SGD",e.Shp="SHP",e.Sll="SLL",e.Sos="SOS",e.Srd="SRD",e.Ssp="SSP",e.Stn="STN",e.Svc="SVC",e.Syp="SYP",e.Szl="SZL",e.Thb="THB",e.Tjs="TJS",e.Tmt="TMT",e.Tnd="TND",e.Top="TOP",e.Try="TRY",e.Ttd="TTD",e.Twd="TWD",e.Tzs="TZS",e.Uah="UAH",e.Ugx="UGX",e.Usd="USD",e.Usn="USN",e.Uyi="UYI",e.Uyu="UYU",e.Uzs="UZS",e.Vef="VEF",e.Vnd="VND",e.Vuv="VUV",e.Wst="WST",e.Xaf="XAF",e.Xag="XAG",e.Xau="XAU",e.Xba="XBA",e.Xbb="XBB",e.Xbc="XBC",e.Xbd="XBD",e.Xcd="XCD",e.Xdr="XDR",e.Xof="XOF",e.Xpd="XPD",e.Xpf="XPF",e.Xpt="XPT",e.Xsu="XSU",e.Xts="XTS",e.Xua="XUA",e.Xxx="XXX",e.Yer="YER",e.Zar="ZAR",e.Zmw="ZMW",e.Zwl="ZWL"}(E||(E={})),function(e){e.K="K",e.M="M"}(M||(M={})),function(e){e.Cancellation="Cancellation",e.Change="Change",e.NoShow="NoShow",e.Upgrade="Upgrade",e.Other="Other"}(B||(B={})),function(e){e.Flexible="Flexible",e.Lowest="Lowest",e.Negotiated="Negotiated",e.NonNegotiated="NonNegotiated",e.Leisure="Leisure",e.RequestFareRules="RequestFareRules",e.SelectAndPro="SelectAndPro"}(L||(L={})),function(e){e.Any="Any",e.LiteEconomy="LiteEconomy",e.EconomyRestricted="EconomyRestricted",e.EconomyNoBags="EconomyNoBags",e.Economy="Economy",e.PremiumEconomy="PremiumEconomy",e.Business="Business",e.PremiumBusiness="PremiumBusiness",e.First="First",e.PremiumFirst="PremiumFirst"}(j||(j={})),function(e){e.Infant="Infant",e.Child="Child",e.Adult="Adult",e.Senior="Senior"}(w||(w={})),function(e){e.All="All",e.First="First",e.Standard="Standard"}(x||(x={})),function(e){e.ReturnJourney="ReturnJourney",e.SingleJourney="SingleJourney"}(U||(U={})),function(e){e.Renfe="Renfe",e.BeNe="BeNe",e.Ntv="Ntv"}(V||(V={})),function(e){e.Placeholder="placeholder",e.Complete="complete"}(H||(H={})),function(e){e.Adult="ADULT",e.Child="CHILD",e.Infant="INFANT"}(G||(G={})),function(e){e.M="M",e.F="F"}(Y||(Y={})),function(e){e.Mobile="MOBILE",e.Landline="LANDLINE",e.Fax="FAX",e.Other="OTHER"}(Q||(Q={})),function(e){e.All="All",e.First="First",e.Standard="Standard"}(W||(W={})),function(e){e.ReturnJourney="ReturnJourney",e.SingleJourney="SingleJourney",e.DualSingleJourney="DualSingleJourney",e.OpenReturnJourney="OpenReturnJourney"}(K||(K={})),function(e){e.Origin="Origin",e.Intermediate="Intermediate",e.Destination="Destination",e.Unknown="Unknown"}(q||(q={})),function(e){e.RequestStop="RequestStop",e.PickUpOnly="PickUpOnly",e.SetDownOnly="SetDownOnly",e.Normal="Normal",e.Passing="Passing",e.Unknown="Unknown"}(J||(J={})),function(e){e.Placeholder="placeholder",e.Complete="complete"}(z||(z={})),function(e){e.Low="Low",e.Moderate="Moderate",e.Medium="Medium",e.High="High",e.Extreme="Extreme"}(X||(X={})),function(e){e.Flight="FLIGHT",e.Eurostar="EUROSTAR",e.InternationalRail="INTERNATIONAL_RAIL",e.Rail="RAIL",e.Hotel="HOTEL",e.Car="CAR",e.Lounge="LOUNGE",e.FastTrack="FAST_TRACK",e.Parking="PARKING",e.Cab="CAB",e.Coach="COACH"}(Z||(Z={})),function(e){e.All="ALL",e.Mock="MOCK",e.Lightning="LIGHTNING",e.App="APP"}($||($={})),function(e){e.FreeText="FREE_TEXT",e.AutoSuggest="AUTO_SUGGEST",e.Hidden="HIDDEN"}(ee||(ee={}));var re,ie,ne,oe,ae,se,ue,ce,le=function(e){function r(r){var i=e.call(this)||this;return i.isLoading=new t.BehaviorSubject(!1),i.search=function(e){return t.of([])},Object.assign(i,r),i}return m(r,e),Object.defineProperty(r.prototype,"selectedValues",{get:function(){return this._selectedValues},set:function(e){Object.is(this._selectedValues,e)||(this._selectedValues=e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},set:function(e){this.setValue(e)},enumerable:!1,configurable:!0}),r.prototype.isValid=function(){return!this.mandatory||0!==this.selectedValues.length},r.prototype.hasErrors=function(e){var t=this;return new Promise((function(r,i){r(!t.mandatory||e&&0!==e.length?null:{hasErrors:!0})}))},r}(te),de=function(e){function t(t,r){var i,n=this;return(n=e.call(this,t)||this).basketService=r,n.tempValue=n.selectedValues&&(null===(i=n.selectedValues[0])||void 0===i?void 0:i.freeValue)||"",n}return m(t,e),t.prototype.getValue=function(){return this.tempValue},t.prototype.setValue=function(e){this.tempValue!==e&&(this.tempValue=e,this.selectedValues=[{freeValue:e,basketLevelValue:this.perBooking,userLevelValue:this.perPassenger}])},t.prototype.save=function(e,t){this.basketService.setMiFreeValue(e,this,this.selectedValues[0]?this.selectedValues[0].freeValue:"",t)},t.prototype.hasErrors=function(t){var r=this;return new Promise((function(i,n){if(!r.mandatory||t&&0!==t.length||i({hasErrors:!0}),r.valueMask&&t)return r.basketService.validateFreeValeMi(r,t).then((function(e){i(e?null:{hasErrors:!0})}));r.values.length>0?i(r.values.find((function(e){return e.value===t}))?null:{hasErrors:!0}):i(e.prototype.hasErrors.call(r,t))}))},t}(le),pe=function(e){function i(i,n){var o,a=this;return(a=e.call(this,i)||this).basketService=n,a.search=function(e){return e.pipe(r.debounceTime(300),r.distinctUntilChanged(),r.switchMap((function(e){return e.length>2?a.basketService.getMiAutoSugestions(a.id,e,a.isLoading):t.of(a.avaliableItems)})),r.tap((function(e){a.avaliableItems=e})))},(null===(o=a.values)||void 0===o?void 0:o.length)>0&&(a.avaliableItems=a.values),a}return m(i,e),i.prototype.getValue=function(){return this.selectedValues[0]?this.selectedValues[0].value.id:"__NONE"},i.prototype.hasErrors=function(e){return y(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.avaliableItems.find((function(t){return t.id===e}))?null:{hasErrors:!0}]}))}))},i.prototype.setValue=function(e){var t=this.avaliableItems.find((function(t){return t.id===e}));this.selectedValues=t?[{value:{id:t.id,label:t.label,value:t.value,default:t.default,fixed:t.fixed,agentOnly:t.agentOnly},basketLevelValue:this.perBooking,userLevelValue:this.perPassenger}]:[]},i.prototype.save=function(e,t){this.basketService.setMiSelectedValue(e,this,this.selectedValues[0].value.id,t)},i}(le),he=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.getValue=function(){return""},t.prototype.setValue=function(e){},t.prototype.save=function(e,t){},t}(le),me=function(e,t){switch(e.uiPresentation){case ee.FreeText:return new de(e,t);case ee.AutoSuggest:return new pe(e,t);case ee.Hidden:return new he(e)}return null},fe=function(e,t,r){var i=this;this.basketService=t,this.helpers=r,this.isValidObservers=[],this.basketItem=e;var n=e.managementInfo.reduce((function(e,t){var r=me(t,i.basketService);return i.isValidObservers.push(r),t.perBooking?e.perItem.push(r):e.perUser.push(r),e}),{perItem:[],perUser:[]}),o=n.perItem,a=n.perUser;this.miPerItem=o,this.miPerUser=e.users.reduce((function(e,t){return e[t.id]={managementInfo:i.helpers.clone(a).map((function(e){var t=me(e,i.basketService);return i.isValidObservers.push(t),t}))},e}),{}),this.users=Object.keys(this.miPerUser)};(re=e.LogoutEnum||(e.LogoutEnum={}))[re.LOGOUT=0]="LOGOUT",re[re.STAYIN=1]="STAYIN",(ie=e.LocationTypes||(e.LocationTypes={})).City="City",ie.Office="Office",ie.Airport="Airport",ie.TrainStation="Train Station",ie.Postcode="Postcode",ie.Shortlist="Shortlist",(ne=e.BreatfastTypes||(e.BreatfastTypes={})).BreakfastIncluded="BreakfastIncluded",ne.BreakfastNotIncluded="BreakfastNotIncluded",(oe=e.HotelPolicyEnum||(e.HotelPolicyEnum={})).cancellation="cancellation",oe.deposit="deposit",oe.disabledAccess="disabledAccess",oe.general="general",oe.guarantee="guarantee",oe.refundAvailable="refundAvailable",(ae=e.BookingStatus||(e.BookingStatus={}))[ae.Loading=0]="Loading",ae[ae.AddingItems=1]="AddingItems",ae[ae.AddingTravellers=2]="AddingTravellers",ae[ae.AddingLeadPassenger=3]="AddingLeadPassenger",ae[ae.Failed=4]="Failed",ae[ae.Revalidate=5]="Revalidate",ae[ae.RevalidatingError=6]="RevalidatingError",ae[ae.ChooseMIGroup=7]="ChooseMIGroup",ae[ae.ProvideMi=8]="ProvideMi",ae[ae.SendForApproval=9]="SendForApproval",ae[ae.AwaitingApproval=10]="AwaitingApproval",ae[ae.ApprovedPaymentOption=11]="ApprovedPaymentOption",ae[ae.ApprovedSupplemtal=12]="ApprovedSupplemtal",ae[ae.ApprovedBook=13]="ApprovedBook",ae[ae.PartiallyBooked=14]="PartiallyBooked",ae[ae.Complete=15]="Complete",(se=e.SchemaFormat||(e.SchemaFormat={})).array="array",se.datetime="date-time",se.integer="integer",se.object="object",se.select="select",se.string="string",se.boolean="boolean",se.countryCode="countryCode",(e.Widgets||(e.Widgets={})).COUNTRY_CODE="COUNTRY_CODE",(ue=e.FlightDirectionEnum||(e.FlightDirectionEnum={}))[ue.Outbound=1]="Outbound",ue[ue.Inbound=0]="Inbound",(ce=e.EurostarClassEnum||(e.EurostarClassEnum={})).ANY="Any",ce.BUSINESS_PREMIER="BusinessPremier",ce.STANDARD_PREMIER="StandardPremier",ce.STANDARD="Standard";var ge,ye,ve,be="("+["breakfast not included","breakfast is not included","Breakfast isn't included","Does not include breakfast","EXCL","exel Breakfast","Breakfast Costs","no breakfast"].join(")|(")+")",Se="("+["BREAKFAST INCLUDED","breakfast","BB","B&B","Bead and breakfast","Bed and breakfast","Bed&Break","INCLUDES BREAK","INCL BED AND BRE","BRKFST","BED AND BRKFST"].join(")|(")+")",Ce=new RegExp(Se,"i"),Te=new RegExp(be,"i");(ge=e.SearchHandler||(e.SearchHandler={})).AVAILABILITY="Availability",ge.FEMALE_FRIENDLY="SOLO Female Friendly",ge.CTM_GREEN_CHOICE="CTM Greener Choice",ge.BREAKFAST_INCLUDED="BreakfastIncluded",ge.BREAKFAST_NOT_INCLUDED="BreakfastNotIncluded",ge.CLIENT="Client",ge.AGENCY="Agency",ge.ANY="Any",(ye=e.MenuSlideEnum||(e.MenuSlideEnum={})).IN="in",ye.OUT="out",ye.FLAT="flat",(ve=e.RiskLevelRanking||(e.RiskLevelRanking={})).Low="1",ve.Moderate="2",ve.Medium="3",ve.High="4",ve.Extreme="5";var Pe;(Pe=e.ServiceProvider||(e.ServiceProvider={})).Confirma="Conferma",Pe.Evolvi="Evolvi",Pe.SabreCarHire="Sabre Car Hire",Pe.Lounges="Holiday Extras Lounges",Pe.FastTrack="Holiday Extras Fast Track",Pe.Parking="Holiday Extras Parking",Pe.CMAC="CMAC",Pe.FarelogixLFGNDC="Farelogix LFG NDC",Pe.BaNdc="BA NDC",Pe.EurostarSabre="Eurostar (Sabre)";var _e,Ae,De,ke=function(){function r(r,i){this.basketService=r,this.helpers=i,this.status=new t.BehaviorSubject(e.BookingStatus.Loading),this.basket=new t.BehaviorSubject({}),this.needsToViewMi=!0,this.isUpdating=new t.BehaviorSubject(!1),this.id=null}return r.prototype.loadBasket=function(r){this.id=r,this.basket=new t.BehaviorSubject({}),this.status.next(e.BookingStatus.Loading),this.isUpdating.next(!0),this._loadBasket(r)},r.prototype._loadBasket=function(e){var t=this;this.basketService.loadBasket(e),this.basketService.subsribeToBasket(e,{next:function(e){t.basket.next(e),t.updateBasket(e)},error:function(e){t.basket.error(e),console.error(e)},complete:function(){t.basket.complete(),console.log("Basket completed")}})},r.prototype.updateBasket=function(t){switch(this.isUpdating.next(!1),t.status){case A.Open:this.workoutOpenState(t);break;case A.AwaitingApproval:this.status.next(this.workoutState(t,e.BookingStatus.AwaitingApproval));break;case A.Approved:this.status.next(this.workoutApprovedState(t));break;case A.Booked:this.status.next(this.workoutState(t,e.BookingStatus.Complete));break;case A.BookingFailed:this.status.next(this.workoutState(t,e.BookingStatus.Failed));break;case A.Disapproved:case A.PartiallyBooked:this.status.next(e.BookingStatus.Failed);break;default:var r=t.status;console.log(r)}},r.prototype.sendBasketForApproval=function(){this.basketService.sendBasketForApproval(this.id)},r.prototype.workoutApprovedState=function(t){var r=e.BookingStatus.ApprovedBook;if(t.basketItems.find((function(e){var t;return(null===(t=e.availablePaymentMethods)||void 0===t?void 0:t.length)>0&&!e.selectedPaymentMethod})))return this.workoutState(t,e.BookingStatus.ApprovedPaymentOption);console.log(t.suppInfo);var i=t.suppInfo.find((function(e){return e.hasDetails}));return console.log(i),i&&(r=e.BookingStatus.ApprovedSupplemtal),this.workoutState(t,r)},r.prototype.workoutState=function(t,r){return t.validated?r:(this._hasInvalidPrice(t),e.BookingStatus.Revalidate)},r.prototype.workoutOpenState=function(t){if(0!==t.basketItems.length)if(this._needsCorrectTravellers(t))this.status.next(e.BookingStatus.AddingTravellers);else{if(!this._needLeadPassengers(t))return t.validated?void(this._needsMiGroups(t)?this.status.next(e.BookingStatus.ChooseMIGroup):this.helpers.needsMi(t,this.needsToViewMi)?this.status.next(e.BookingStatus.ProvideMi):this.status.next(e.BookingStatus.SendForApproval)):(this._hasInvalidPrice(t),void this.status.next(e.BookingStatus.Revalidate));this.status.next(e.BookingStatus.AddingLeadPassenger)}else this.status.next(e.BookingStatus.AddingItems)},r.prototype.revalidate=function(){this.basketService.revalidate(this.id)},r.prototype.addTravellers=function(e,t,r,i){void 0===i&&(i=0),this.isUpdating.next(!0),this.basketService.addTravellers(e.id,t,r,i)},r.prototype.setLeadPassenger=function(e,t,r,i){void 0===i&&(i=0),this.isUpdating.next(!0),this.basketService.setLeadPassenger(e.id,t,r,i)},r.prototype.setBasketItemMiGroup=function(e,t){this.isUpdating.next(!0),this.basketService.setBasketItemMiGroup(e,t.basketItem.id,t.value)},r.prototype.saveMiGroup=function(e){var t=this;this.isUpdating.next(!0),e.forEach((function(e){t.setBasketItemMiGroup(t.id,e)}))},r.prototype.saveMi=function(e){this.needsToViewMi=!1,this.isUpdating.next(!0),e&&this.basketService.saveMiData(this.id,e)},r.prototype.removeExpiredItems=function(){this.isUpdating.next(!0),this.basketService.removeExpiredItems(this.id)},r.prototype.setBasketItemPaymentOption=function(e,t){return this.isUpdating.next(!0),this.basketService.setBasketItemPaymentOption(this.basket.value,e,t)},r.prototype.bookBasket=function(e){this.isUpdating.next(!0),e&&this.basketService.bookBasket(this.id,e)},r.prototype._needsMiGroups=function(e){return!!e.basketItems.find((function(e){return e.miGroupsAvailable.length>0&&!e.miGroupSelected}))},r.prototype._needsCorrectTravellers=function(e){var t=this;return!!e.basketItems.find((function(e){var r=t._splitTravellers(e);return!(r.adults.length===e.adults&&r.children.length===e.children&&r.infants.length===e.infants)}))},r.prototype._hasInvalidPrice=function(e){return!!e.basketItems.find((function(e){return!e.latestValidationPriceDifference||e.expired}))},r.prototype._needLeadPassengers=function(e){return!!e.basketItems.find((function(e){return!e.leadPassenger}))},r.prototype._splitTravellers=function(e){var t=this;return(e.userPassengerTypes||[]).reduce((function(r,i,n){switch(i.passengerType){case G.Adult:r.adults.push(t._findUser(e.users,Number(i.id)));break;case G.Child:r.children.push(t._findUser(e.users,Number(i.id)));break;case G.Infant:r.infants.push(t._findUser(e.users,Number(i.id)))}return r}),{adults:[],children:[],infants:[]})},r.prototype._findUser=function(e,t){return e.find((function(e){return Number(e.id)===t}))},r.prototype.getId=function(){return this.id},r}();(_e=e.TaxiFormMode||(e.TaxiFormMode={})).ADDRESS="location",_e.STATION="station",(Ae=e.AirportSearchMode||(e.AirportSearchMode={})).PICKUP="Airport Pick Up",Ae.DROPOFF="Airport drop off",(De=e.ActionType||(e.ActionType={})).GET="get",De.SAVE="save",De.DELETE="delete";var Oe,Fe=function(i){function n(r,o,a,s,c){var l=i.call(this,a)||this;l.cabfetcher=r,l.helpers=o,l.searchService=s,l.basketService=c,l.type=Z.Cab,l.airportChange=new t.Subject,l.transTypes=[{key:k.Any,value:"Any (1-8 Passengers)",id:8},{key:k.StandardCar,value:"Saloon Car (1-4 Passengers)",id:4},{key:k.BlackCab,value:"Hackney Carriage (1-4 Passengers)",id:4},{key:k.DdaCar,value:"Dda - wheelchair accessible (1-4 Passengers)",id:4},{key:k.MediumMpv,value:"People Carrier (1-7 Passengers)",id:7},{key:k.ExecutiveCar,value:"Executive (1-4 Passengers)",id:4}],l.attributes=[{enabled:!1,key:"wheelchair",value:"Wheelchair (On Request)"},{enabled:!1,key:"call_on_arrival",value:"Call On Arrival"},{enabled:!1,key:"meet_and_greet",value:"Meet And Greet (Charge Applies)"},{enabled:!1,key:"wait_and_return",value:"Wait And Return"}],l.searchTypes=["One-way"],l.airportSearchTypes=["Airport drop off","Airport Pick Up"],l.criteria=["Pick Up Time"],l.mode=e.TaxiFormMode.ADDRESS,l.minSelectDate=u.default(),l._date=null,l.selectedPlaces=[],l._vias=[null,null,null,null],l._searchType=l.searchTypes[0],l._airportSearchType=e.AirportSearchMode.DROPOFF,l._searchCriteria=l.criteria[0],l._outboundDateTime=l.helpers.round(u.default(),u.default.duration(15,"minutes")),l._returnDateTime=l.helpers.round(u.default(),u.default.duration(15,"minutes")),l._flightNumber="",l._terminal=null,l._time=null,l.resultsSessionName=n.STORAGE_SESSION_RESULTS,l.getPassengers=function(){var e=l.adults,t=l.children,r=e+" Adult";return 1!==Number(e)&&(r+="s"),1===Number(t)&&(r+=", "+t+" Child"),Number(t)>1&&(r+=", "+t+" Children"),r};var d=a.getSessionItem(n.STORAGE_SESSION_PARAMS)||{tempParams:{}};l.updateTempParams(s.makeCabHireQuery(d.tempParams)),d.tempParams.fromAddress&&(l.fromAddress=d.tempParams.fromAddress),d.tempParams.toAddress&&(l.toAddress=d.tempParams.toAddress),s.shouldAddTravellerSubscription()&&s.travellerInformation.subscribe((function(e){l.travellers=e;var t=l.helpers.selectedTravellers(e,Z.Cab);l.tempParams.adults=t.adults.length,l.tempParams.children=t.children.length,l._isValid()}));var p=a.getSessionItemAsList(l.resultsSessionName)||[];return l.fullResults=p,l._cheapestResultPrice=l.updateLowestPrice(p),l.results.next(p||[]),l._isValid(),l.outboundVisibility=new t.BehaviorSubject(!1),l.inboundVisibility=new t.BehaviorSubject(!1),l}return m(n,i),Object.defineProperty(n.prototype,"fromLocation",{get:function(){return this._fromLocation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"toLocation",{get:function(){return this._toLocation},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"date",{get:function(){return this._date},set:function(e){this._date=e,this._updateDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"searchType",{get:function(){return this._searchType},set:function(e){this._searchType=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"airportSearchType",{get:function(){return this._airportSearchType},set:function(e){this._airportSearchType=e,(this.fromAddress||this.toAddress)&&this.switchFromAndToLocation()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fromLocationType",{get:function(){return this.tempParams.fromLocationType},set:function(e){this.tempParams.fromLocationType=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"toLocationType",{get:function(){return this.tempParams.toLocationType},set:function(e){this.tempParams.toLocationType=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"searchCriteria",{get:function(){return this._searchCriteria},set:function(e){this._searchCriteria=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"outboundDateTime",{get:function(){return this._outboundDateTime},set:function(e){this._outboundDateTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"returnDateTime",{get:function(){return this._returnDateTime},set:function(e){this._returnDateTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"flightNumber",{get:function(){return this._flightNumber},set:function(e){this._flightNumber=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"airport",{get:function(){return this.tempParams.airport},set:function(e){this.tempParams.airport=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"terminal",{get:function(){return this._terminal},set:function(e){this._terminal=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"time",{get:function(){return this._time},set:function(e){this._time=e,this._updateDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"departs",{get:function(){return this.tempParams.departs},set:function(e){this.tempParams.departs=e.isValid?e:null,e&&e.isValid()&&(this._date=this.helpers.momentToNgDate(e),this._time=this.helpers.formatTimeColon(e)),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"adults",{get:function(){return this.tempParams.adults},set:function(e){this.tempParams.adults=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"children",{get:function(){return this.tempParams.children},set:function(e){this.tempParams.children=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"infants",{get:function(){return this.tempParams.infants},set:function(e){this.tempParams.infants=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"countryCode",{get:function(){return this.tempParams.countryCode},set:function(e){this.tempParams.countryCode=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"vias",{get:function(){return this._vias},set:function(e){this._vias=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"viasFrom",{get:function(){return this.tempParams.viasFrom},set:function(e){this.tempParams.viasFrom=e,this._vias[0]=e?this.createCabHireLocation(e):null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"viasTo",{get:function(){return this.tempParams.viasTo},set:function(e){this.tempParams.viasTo=e,this._vias[1]=e?this.createCabHireLocation(e):null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"vehicleType",{get:function(){return this.tempParams.vehicleType},set:function(e){this.tempParams.vehicleType=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fromAddress",{get:function(){return this.tempParams.fromAddress},set:function(e){this.tempParams.fromAddress=e,this._fromLocation=e?this.createCabHireLocation(e):null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fromStation",{get:function(){return this.tempParams.fromStation},set:function(e){this.tempParams.fromStation=e,this._fromLocation=e?{address:e.destination,postcode:e.postcode}:null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"toAddress",{get:function(){return this.tempParams.toAddress},set:function(e){this.tempParams.toAddress=e,this._toLocation=e?this.createCabHireLocation(e):null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"toStation",{get:function(){return this.tempParams.toStation},set:function(e){this.tempParams.toStation=e,this._toLocation=e?{address:e.destination,postcode:e.postcode}:null,this._isValid()},enumerable:!1,configurable:!0}),n.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeCabHireQuery()),this._isValid()},n.prototype.resetParams=function(){this.reset(),this.resetQuery(),this.results.next([])},n.prototype._isValid=function(){this.doChecks&&(this.storageService.setSessionItem(n.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams}),this.validationMessages=[],this.tempParams.fromAddress||this.validationMessages.push("From - Enter a location or postcode."),this.tempParams.toAddress||this.validationMessages.push("To - Enter a location or postcode."),this.tempParams.departs.unix()<u.default().unix()&&this.validationMessages.push("Taxi journey cannot be in the past."),this.tempParams.adults+this.tempParams.children<1&&this.validationMessages.push("There must be at least 1 traveller"),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages))},n.prototype._updateDateTime=function(){this._date&&this._time&&(this.departs=this.helpers.ngDateToMoment(this._date,this._time))},n.prototype.startSearch=function(){if(this.results.next([]),this.isValid.value){var e=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(e)),this._startSearch(this.cabfetcher.fetchList(this.helpers.removeNulls(e)))}return Promise.resolve(!1)},n.prototype.getRecentSearchQuery=function(e){return{serviceType:Z.Cab,searchArgs:e,travelDate:this.departs.format(),travellers:this.helpers.getTravellersId(this.travellers)}},n.prototype.startRecentSearch=function(e){var r=this;this.departs=u.default(e.searchArgs.departs),this.vehicleType=e.searchArgs.vehicleType,t.combineLatest([this.getStationOrAirport(e.searchArgs.fromLocation.address),this.getStationOrAirport(e.searchArgs.toLocation.address)]).subscribe((function(t){var i=S(t,2),n=i[0],o=i[1];n.length?(r.fromStation=r.getStationOrAirportAdress(n[0]),r.fromAddress=r.convertStationOrAirportLocation(e.searchArgs.fromLocation.address,e.searchArgs.fromLocation.postcode)):r.fromAddress=r.convertAddressLocation(e.searchArgs.fromLocation.address,e.searchArgs.fromLocation.postcode),o.length?(r.toStation=r.getStationOrAirportAdress(o[0]),r.toAddress=r.convertStationOrAirportLocation(e.searchArgs.toLocation.address,e.searchArgs.toLocation.postcode)):r.toAddress=r.convertAddressLocation(e.searchArgs.toLocation.address,e.searchArgs.toLocation.postcode),e.searchArgs.vias[0]&&r.getStationOrAirport(e.searchArgs.vias[0].address).subscribe((function(t){t.length?r.viasFrom=r.convertStationOrAirportLocation(e.searchArgs.vias[0].address,e.searchArgs.vias[0].postcode):r.viasFrom=r.convertAddressLocation(e.searchArgs.vias[0].address,e.searchArgs.vias[0].postcode),r.searchService.startSearches()})),e.searchArgs.vias[1]&&r.getStationOrAirport(e.searchArgs.vias[1].address).subscribe((function(t){t.length?r.viasTo=r.convertStationOrAirportLocation(e.searchArgs.vias[1].address,e.searchArgs.vias[1].postcode):r.viasTo=r.convertAddressLocation(e.searchArgs.vias[1].address,e.searchArgs.vias[1].postcode),r.searchService.startSearches()})),r.searchService.startSearches()}))},n.prototype.getSearchQuery=function(){var e={adults:this.tempParams.adults,children:this.tempParams.children,departs:this.tempParams.departs,fromLocation:this.createCabHireLocation(this.tempParams.fromAddress),toLocation:this.createCabHireLocation(this.tempParams.toAddress),infants:0,vehicleType:this.vehicleType,vias:this._vias};return this.helpers.removeNulls(e)},n.prototype.updateOutboundAddress=function(e,t){this.tempParams.fromAddress=this.getAddressFormat(e,t)},n.prototype.updateInboundAddress=function(e,t){this.tempParams.toAddress=this.getAddressFormat(e,t)},n.prototype.createCabHireLocation=function(e){return{address:[null==e?void 0:e.Terminal,null==e?void 0:e.House,null==e?void 0:e.Street,null==e?void 0:e.Town,null==e?void 0:e.Country].filter((function(e){return!!e})).join(","),postcode:null==e?void 0:e.PostCode}},n.prototype.matchAddresses=function(){this._toLocation=this.createCabHireLocation(this.tempParams.toAddress),this._fromLocation=this.createCabHireLocation(this.tempParams.fromAddress),this._isValid()},n.prototype.sortBy=function(e){var t=this.helpers.clone(this.fullResults);t=e?t.sort((function(e,t){return t.price-e.price})):t.sort((function(e,t){return e.price-t.price})),this.results.next(t)},n.prototype.getAddressFormat=function(e,t){return{House:this.getAddressFromPlaceDetails(e,["floor","street_number","premise"]),Street:this.getAddressFromPlaceDetails(e,["route","street_name","establishment"]),Town:this.getAddressFromPlaceDetails(e,["postal_town","administrative_area_level_2","locality"]),PostCode:this.getAddressFromPlaceDetails(e,["postal_code"]),Country:this.getAddressFromPlaceDetails(e,["country"]),placeDescription:t}},n.prototype.getAddressFromPlaceDetails=function(e,t){var r,i,n=null;if(e&&Array.isArray(e)){var o=function(t){var r=e.filter((function(e){return Array.isArray(e.types)&&e.types.includes(t)}))[0];if(r)return n=r.long_name,"break"};try{for(var a=b(t),s=a.next();!s.done;s=a.next()){if("break"===o(s.value))break}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}return n},n.prototype.getAddressFromAirportDetails=function(e,t){console.log(e);var r=null;return e&&(r={Country:e.country,Street:e.road,PostCode:e.postcode,Town:e.city,placeDescription:t,House:t}),r},n.prototype.setLocationFromAirport=function(t,r){var i=this.getAddressFromAirportDetails(t,r);this.mode===e.TaxiFormMode.STATION&&(this.airportSearchType===e.AirportSearchMode.PICKUP?this.fromAddress=i:this.toAddress=i)},n.prototype.addToSelectedPlaces=function(e){this.selectedPlaces.push(e)},n.prototype.setOutboundFormVisibility=function(e){this.outboundVisibility.next(e)},n.prototype.setInboundFormVisibility=function(e){this.inboundVisibility.next(e)},n.prototype.getOutboundFormVisibility=function(){return this.outboundVisibility},n.prototype.getInboundFormVisibility=function(){return this.inboundVisibility},n.prototype.updateFromPreviousSearches=function(e){var t;null===(t=e[Z.Flight])||void 0===t||t.searchQuery},n.prototype.getTransType=function(){var e,t=this.tempParams.vehicleType;return(null===(e=this.transTypes.find((function(e){return e.key===t})))||void 0===e?void 0:e.value)||""},n.prototype.getStationOrAirport=function(e){return this.searchService.getStationsAndAirportsList(e,null,this.isLoading).pipe(r.take(1),r.map((function(e){return e})))},n.prototype.getStationOrAirportAdress=function(t){return t.type===e.LocationTypes.Airport||t.type===e.LocationTypes.TrainStation?{name:t.name}:void 0},n.prototype.convertStationOrAirportLocation=function(e,t){return{House:e,PostCode:t}},n.prototype.convertAddressLocation=function(e,t){for(var r=e.split(","),i="",n=r[r.length-2],o=1;o<r.length-2;o++)i+=r[o]+" ";return{Country:e.slice(-2),House:r[0],PostCode:t,Street:i,Town:n}},n.prototype.addCabHireToBasket=function(e,t){return y(this,void 0,void 0,(function(){var r,i;return v(this,(function(n){switch(n.label){case 0:return e.unavailable?[2,Promise.resolve(!1)]:[4,this.basketService.getDefaultBasket()];case 1:return r=n.sent(),(i=null==r?void 0:r.subject.value)?[2,this.basketService.addToBasket({adults:t.adults,basket:i.id,service:e.sourceId.toString(),detail:{id:e.id,departs:t.departs.format(),supplierName:e.supplierName,estimatedCO2:e.estimatedCO2,fromLocation:{address:t.fromLocation.address,postcode:t.fromLocation.postcode},toLocation:{address:t.toLocation.address,postcode:t.toLocation.postcode},vehicleType:t.vehicleType},price:e.price,currency:e.currency,searchQuery:t,co2PerItem:e.co2PerItem,co2PerPassenger:e.co2PerPassenger,outboundDate:t.departs.format()},r,this.searchService,this.travellers)]:[2,Promise.resolve(!1)]}}))}))},n.prototype.switchFromAndToLocation=function(){var e=Object.assign({},this.toAddress),t=Object.assign({},this.fromAddress);this.fromAddress=e,this.toAddress=t},n.prototype.updateLowestPrice=function(e){if(!e.length)return null;var t=e[0].currency;return e.reduce((function(e,t){var r=t.price;return e.amount>r&&(e.amount=r),e}),{amount:Number.MAX_SAFE_INTEGER,currencyCode:t})},n}(l);Fe.STORAGE_SESSION_PARAMS="search_cab",Fe.STORAGE_SESSION_RESULTS="results_cab",(Oe=e.SortTypesCar||(e.SortTypesCar={})).price="price",Oe.brand="brand",Oe.size="size",Oe.preferred="preferred",Oe.expensive="expensive";var Ne=function(i){function n(t,r,o,a,s,c){var l=i.call(this,s)||this;l.carhirefetcher=t,l.carHireAvailabilityDetailFetcher=r,l.helpers=o,l.basketService=a,l.searchService=c,l._carTypeCodes=[["B","2-3 Door",N.TwoToThreeDoor],["C","2/4 Door",N.TwoOrFourDoor],["D","4-5 Door",N.FourToFiveDoor],["W","Wagon / Estate",N.WagonOrEstate],["V","Passenger Van",N.PassengerVan],["L","Limousine",N.Limousine],["S","Sport",N.Sport],["T","Convertible",N.Convertible],["F","SUV",N.Suv],["J","Open Air All Terrain",N.OpenAirAllTerrain],["X","Special",N.Special],["P","Pickup Regular Cab",N.PickUpRegularCab],["Q","Pickup Extended Cab",N.PickUpExtendedCab],["Z","Special Offer Car",N.SpecialOfferCar],["E","Coupe",N.Coupe],["M","Monospace (Europe)",N.MonospaceEuropeanUse],["R","Recreational Vehicle",N.Suv],["H","Motor Home",N.MotorHome],["Y","2-Wheel Vehicle",N.TwoWheelVehicle],["N","Roadster",N.Roadster],["G","Crossover",N.Suv],["K","Commercial Van / Truck",N.PassengerVan]],l._carAirConditionTypes=[["Any","Any",null],["Y","Yes",!0],["N","No",!1]],l._carTransmissionCodes=[["M","Manual",F.Manual],["N","Manual 4-Wheel Drive",F.Manual],["C","Manual All-Wheel Drive",F.Manual],["A","Automatic",F.Auto],["B","Automatic 4-Wheel Drive",F.Auto],["D","Automatic All- Wheel Drive",F.Auto]],l._vendors=[{code:"-",name:"Any"},{code:"AC",name:"Ace Rent A Car"},{code:"AD",name:"Advantage Rent A Car"},{code:"AL",name:"Alamo"},{code:"ZI",name:"Avis"},{code:"AT",name:"Atesa"},{code:"ZD",name:"Budget Rent A Car"},{code:"CI",name:"Citer Rent A Car"},{code:"ZR",name:"Dollar Rent A Car"},{code:"DF",name:"Driving Force"},{code:"EY",name:"Economy Rent A Car"},{code:"ET",name:"Enterprise"},{code:"EP",name:"Europcar"},{code:"IM",name:"Europcar Southafrica"},{code:"EZ",name:"Ez Rent A Car"},{code:"FF",name:"Firefly"},{code:"FX",name:"Fox Rent A Car"},{code:"GN",name:"Guerin Car Rental"},{code:"ZE",name:"Hertz"},{code:"LM",name:"L & M Car Rental"},{code:"LL",name:"Localiza"},{code:"MW",name:"Midway Car Rental"},{code:"ZL",name:"National Car Rental System"},{code:"NC",name:"Nextcar"},{code:"NU",name:"Nu Car Rentals"},{code:"ZA",name:"Payless Car Rental"},{code:"PR",name:"Priceless"},{code:"RW",name:"Rent A Wreck"},{code:"SX",name:"Sixt"},{code:"TE",name:"Tempest"},{code:"XF",name:"Test-S Cross Galileo"},{code:"XG",name:"Test-S Cross Trng"},{code:"ZT",name:"Thrifty Car Rental"},{code:"PM",name:"Travelport Test Code"},{code:"SV",name:"U-Save Auto Rental"},{code:"WF",name:"Woodford"}],l._car_classes=[{code:"M",name:"Mini",key:O.Mini,value:"10"},{code:"N",name:"Mini Elite",key:O.MiniElite,value:"20"},{code:"E",name:"Economy",key:O.Economy,value:"30"},{code:"H",name:"Economy Elite",key:O.EconomyElite,value:"40"},{code:"C",name:"Compact",key:O.Compact,value:"50"},{code:"D",name:"Compact Elite",key:O.CompactElite,value:"60"},{code:"I",name:"Intermediate",key:O.Intermediate,value:"70"},{code:"J",name:"Intermediate Elite",key:O.IntermediateElite,value:"80"},{code:"S",name:"Standard",key:O.Standard,value:"90"},{code:"R",name:"Standard Elite",key:O.StandardElite,value:"100"},{code:"F",name:"Full Size",key:O.Fullsize,value:"110"},{code:"G",name:"Full Size Elite",key:O.FullsizeElite,value:"120"},{code:"P",name:"Premium",key:O.Premium,value:"130"},{code:"U",name:"Premium Elite",key:O.PremiumElite,value:"140"},{code:"L",name:"Luxury",key:O.Luxury,value:"150"},{code:"W",name:"Luxury Elite",key:O.LuxuryElite,value:"160"},{code:"O",name:"Oversize",key:O.Oversize,value:"170"},{code:"X",name:"Special",key:O.Special,value:"180"}],l._location_types=[e.LocationTypes.City,e.LocationTypes.Airport,e.LocationTypes.Postcode],l.carClassMap={mini:0,"mini elite":1,economy:2,"economy elite":3,compact:4,"compact special":5,"compact elite":6,intermediate:7,"intermediate elite":8,standard:9,"standard elite":10,"full size":11,"full size elite":12,premium:13,"premium elite":14,luxury:15,"luxury elite":16,oversize:17,special:18},l.type=Z.Car,l._sorting_options=[{value:0,display:"Cheapest First"},{value:1,display:"Most Expensive First"},{value:2,display:"Preferred First"}],l._minDate={day:u.default().date(),month:u.default().month()+1,year:u.default().year()},l._minInDate={day:u.default().date(),month:u.default().month()+1,year:u.default().year()},l._pickup_date=null,l._pickup_time=null,l._dropoff_date=null,l._dropoff_time=null,l.resultsSessionName=n.STORAGE_SESSION_RESULTS;var d=s.getSessionItem(n.STORAGE_SESSION_PARAMS)||{tempParams:{}};l.updateTempParams(c.makeCarHireQuery(d.tempParams)),c.shouldAddTravellerSubscription()&&c.travellerInformation.subscribe((function(e){var t=l.helpers.selectedTravellers(e,Z.Car);l.adults=t.adults.length,l.children=t.children.length,l.travellers=e,l._isValid()}));var p=s.getSessionItemAsList(l.resultsSessionName)||[];return l.fullResults=o.clone(p||[]),l._cheapestResultPrice=l.updateLowestPrice(p),l.results.next(p),l}return m(n,i),Object.defineProperty(n.prototype,"adults",{get:function(){return this.tempParams.adults},set:function(e){this.tempParams.adults=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"children",{get:function(){return this.tempParams.children},set:function(e){this.tempParams.children=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"estimatedMileage",{get:function(){return this.tempParams.estimatedMileage},set:function(e){this.tempParams.estimatedMileage=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pickupTime",{get:function(){return this._pickupTime},set:function(e){this._pickupTime=e,this._updateNgbPickupDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropoffTime",{get:function(){return this._dropoffTime},set:function(e){this._dropoffTime=e,this._updateNgbDropoffDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"postcodePickupRaw",{get:function(){return this.tempParams.postcodePickupRaw},set:function(e){this.tempParams.postcodePickupRaw=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"postcodeDropoffRaw",{get:function(){return this.tempParams.postcodeDropoffRaw},set:function(e){this.tempParams.postcodeDropoffRaw=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cityPickupDepot",{get:function(){return this.tempParams.cityPickupDepot},set:function(e){this.tempParams.cityPickupDepot=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cityDropoffDepot",{get:function(){return this.tempParams.cityDropoffDepot},set:function(e){this.tempParams.cityDropoffDepot=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"postcodePickup",{get:function(){return this.tempParams.postcodePickup},set:function(t){this.tempParams.postcodePickup=t,this.tempParams.postcodePickup&&(this.tempParams.locationType=e.LocationTypes.Postcode),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"postcodeDropoff",{get:function(){return this.tempParams.postcodeDropoff},set:function(e){this.tempParams.postcodeDropoff=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cityPickup",{get:function(){return this.tempParams.cityPickup},set:function(t){this.tempParams.cityPickup=t,this.tempParams.cityPickup&&(this.tempParams.locationType=e.LocationTypes.City,console.log(this.tempParams.locationType)),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cityDropoff",{get:function(){return this.tempParams.cityDropoff},set:function(e){this.tempParams.cityDropoff=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minDate",{get:function(){return this._minDate},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minInDate",{get:function(){return this._minInDate},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pickup_country",{get:function(){return this.tempParams.pickup_country},set:function(e){this.tempParams.pickup_country=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropoff_country",{get:function(){return this.tempParams.dropoff_country},set:function(e){this.tempParams.dropoff_country=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pickup_location",{get:function(){return this.tempParams.pickup_location},set:function(t){this.tempParams.pickup_location=t,this.tempParams.pickup_location&&(this.tempParams.locationType=e.LocationTypes.Airport),this.return_to_pickup&&(this.dropoff_location=t),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropoff_location",{get:function(){return this.tempParams.dropoff_location},set:function(e){this.tempParams.dropoff_location=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ngbPickupDate",{get:function(){return this._ngbPickupDate},set:function(e){this._ngbPickupDate=e,this._updateNgbPickupDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ngbDropoffDate",{get:function(){return this._ngbDropoffDate},set:function(e){this._ngbDropoffDate=e,this._updateNgbDropoffDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pickup_datetime",{get:function(){return this.tempParams.pickup_datetime},set:function(e){this.tempParams.pickup_datetime=e;try{e&&e.isValid()&&(this._ngbPickupDate=this.helpers.momentToNgDate(e),this._pickupTime=u.default(e).format("HH:mm")?u.default(e).format("HH:mm"):"07:30"),this._minInDate={day:e.date(),month:e.month()+1,year:e.year()},e.isSameOrAfter(this.tempParams.dropoff_datetime)&&(this.dropoff_datetime=this.dropoff_datetime.set("date",e.date()).set("month",e.month()).set("year",e.year()))}catch(e){}this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropoff_datetime",{get:function(){return this.tempParams.dropoff_datetime},set:function(e){this.tempParams.dropoff_datetime=e,e&&e.isValid()&&(this._ngbDropoffDate=this.helpers.momentToNgDate(e),this._dropoffTime=u.default(e).format("HH:mm")?u.default(e).format("HH:mm"):"08:30"),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pickup_date",{get:function(){return this._pickup_date},set:function(e){this._pickup_date=e,this._updatePickupDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pickup_time",{get:function(){return this._pickup_time},set:function(e){this._pickup_time=e,this._updatePickupDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropoff_date",{get:function(){return this._dropoff_date},set:function(e){this._dropoff_date=e,this._updateDropoffDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropoff_time",{get:function(){return this._dropoff_time},set:function(e){this._dropoff_time=e,this._updateDropoffDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"return_to_pickup",{get:function(){return this.tempParams.return_to_pickup},set:function(e){this.tempParams.return_to_pickup=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenVendor",{get:function(){return this.tempParams.chosenVendor},set:function(e){this.tempParams.chosenVendor=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"carClass",{get:function(){return this.tempParams.carClass},set:function(e){this.tempParams.carClass=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"carType",{get:function(){return this.tempParams.carType},set:function(e){this.tempParams.carType=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"transmission",{get:function(){return this.tempParams.transmission},set:function(e){this.tempParams.transmission=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"airCon",{get:function(){return this.tempParams.airCon},set:function(e){this.tempParams.airCon=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"locationType",{get:function(){return this.tempParams.locationType},set:function(e){this.tempParams.locationType=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"timeArray",{get:function(){return this._timeArray=this._timeArray||Array(96).fill(0).map((function(e,t){return{value:Math.floor(t/4).toString().padStart(2,"0")+":"+(t%4*15).toString().padStart(2,"0"),display:Math.floor(t/4).toString().padStart(2,"0")+":"+(t%4*15).toString().padStart(2,"0")}})),this._timeArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"carAirConditionTypes",{get:function(){return this._carAirConditionTypes},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"carTransmissionCodes",{get:function(){return this._carTransmissionCodes},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"carTypeCodes",{get:function(){return this._carTypeCodes},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"vendors",{get:function(){return this._vendors},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sortingOptions",{get:function(){return this._sorting_options},enumerable:!1,configurable:!0}),n.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeCarHireQuery()),this.estimatedMileage=null,this._isValid()},n.prototype._isValid=function(){var t,r,i;if(this.doChecks){switch(this.storageService.setSessionItem(n.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams}),this.validationMessages=[],this.locationType){case e.LocationTypes.Airport:this.pickup_location&&this.pickup_location.destination||this.validationMessages.push("Please supply a pickup location"),this.dropoff_location&&this.dropoff_location.destination||this.validationMessages.push("Please supply a dropoff location");break;case e.LocationTypes.City:this.cityPickup||this.validationMessages.push("Please supply a pickup city"),this.cityDropoff||this.validationMessages.push("Please supply a dropoff city");break;case e.LocationTypes.Postcode:this.postcodePickup||this.validationMessages.push("Please supply a pickup depot"),this.postcodeDropoff||this.validationMessages.push("Please supply a dropoff depot")}this.estimatedMileage&&this.estimatedMileage<=0&&this.validationMessages.push("Estimated Milage must be a positive number.");try{this.pickup_datetime||this.validationMessages.push("Please supply a pickup time and date"),this.dropoff_datetime||this.validationMessages.push("Please supply a drop off time and date"),(null===(t=this.dropoff_datetime)||void 0===t?void 0:t.isSameOrBefore(this.pickup_datetime,"minute"))&&this.validationMessages.push("Dropoff date/time cannot be before or the same as pickup date/time"),(null===(r=this.pickup_datetime)||void 0===r?void 0:r.isBefore(u.default()))&&this.validationMessages.push("Pickup date/time must be after present date/time"),(null===(i=this.dropoff_datetime)||void 0===i?void 0:i.isBefore(u.default()))&&this.validationMessages.push("Dropoff date/time must be after present date/time")}catch(e){}this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages)}},n.prototype.startSearch=function(){if(this.results.next([]),this.isValid.value){var e=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(this.getSearchQuery())),this._startSearch(this.carhirefetcher.fetchList(this.helpers.removeNulls(e)))}return Promise.resolve(!1)},n.prototype.getRecentSearchQuery=function(t){var r=t;switch(this.locationType){case e.LocationTypes.City:r.city={pickupName:this.cityPickup.name,pickupCountryCode:this.cityPickup.countryCode,pickupCity:this.cityPickup.id.toString(),pickupLatitude:this.cityPickup.latitude,pickupLongitude:this.cityPickup.longitude,dropOffName:this.cityDropoff.name,dropoffCountryCode:this.cityDropoff.countryCode,dropoffCity:this.cityDropoff.id.toString(),dropOffLatitude:this.cityDropoff.latitude,dropOffLongitude:this.cityDropoff.longitude,pickupAddressLines:this.cityPickupDepot.addressLines[0],pickupCityName:this.cityPickupDepot.cityName,pickupExtendedLocationCode:this.cityPickupDepot.extendedLocationCode,pickupLocationCode:this.cityPickupDepot.locationCode,pickupVendor:this.cityPickupDepot.vendor,pickupVendorCode:this.cityPickupDepot.vendorCode,dropOffAddressLines:this.cityDropoffDepot.addressLines[0],dropOffCityName:this.cityDropoffDepot.cityName,dropOffExtendedLocationCode:this.cityDropoffDepot.extendedLocationCode,dropOffLocationCode:this.cityDropoffDepot.locationCode,dropOffVendor:this.cityDropoffDepot.vendor,dropOffVendorCode:this.cityDropoffDepot.vendorCode};break;case e.LocationTypes.Postcode:r.depot={vendorCode:this.postcodePickup.vendorCode,pickupLocationCode:this.postcodePickup.locationCode,pickupExtendedLocationCode:this.postcodePickup.extendedLocationCode,pickupAddressLines:this.postcodePickup.addressLines[0],pickupCityName:this.postcodePickup.cityName,pickupVendor:this.postcodePickup.vendor,dropOffLocationCode:this.postcodeDropoff.locationCode,dropOffExtendedLocationCode:this.postcodeDropoff.extendedLocationCode,dropoffAddressLines:this.postcodeDropoff.addressLines[0],dropoffCityName:this.postcodeDropoff.cityName,dropoffVendor:this.postcodeDropoff.vendor,pickupPostCode:this.postcodePickupRaw.name,pickupLatitude:this.postcodePickupRaw.latitude,pickupLongitude:this.postcodePickupRaw.longitude,dropoffPostCode:this.postcodeDropoffRaw.name,dropoffLatitude:this.postcodeDropoffRaw.latitude,dropoffLongitude:this.postcodeDropoffRaw.longitude}}return{serviceType:Z.Car,searchArgs:r,travelDate:this.pickup_datetime.format(),travellers:this.helpers.getTravellersId(this.travellers)}},n.prototype.startRecentSearch=function(e){this.chosenVendor=e.searchArgs.vendor,this.carClass=e.searchArgs.class,this.carType=e.searchArgs.type,this.transmission=e.searchArgs.transmission,this.airCon=e.searchArgs.aircon,this.estimatedMileage=e.searchArgs.estimatedDailyDistance,this.dropoff_datetime=u.default(e.searchArgs.dropoffDateTime),this.pickup_datetime=u.default(e.searchArgs.pickupDateTime),e.searchArgs.city?this.getParamsForCarbyCity(e):e.searchArgs.airport?this.getParamsForCarbyAirport(e):e.searchArgs.depot&&this.getParamsForCarbyPostCode(e)},n.prototype.getParamsForCarbyAirport=function(r){var i=this;this.locationType=e.LocationTypes.Airport,t.combineLatest([this.searchService.getAirportByCode(r.searchArgs.airport.pickupCode),this.searchService.getAirportByCode(r.searchArgs.airport.dropoffCode)]).subscribe((function(e){var t,r,n,o,a,s,u,c,l,d,p,h,m=S(e,2),f=m[0],g=m[1];f&&g&&(i.dropoff_location={destination:f.iataMatch.name,gateway:f.iataMatch.iata,terminals:i.searchService.processTerminals(g.iataMatch.terminals),country:null===(r=null===(t=f.iataMatch)||void 0===t?void 0:t.locationDetails)||void 0===r?void 0:r.country,postcode:null===(o=null===(n=f.iataMatch)||void 0===n?void 0:n.locationDetails)||void 0===o?void 0:o.postcode,countryCode:null===(s=null===(a=f.iataMatch)||void 0===a?void 0:a.locationDetails)||void 0===s?void 0:s.countryCode},i.pickup_location={destination:g.iataMatch.name,gateway:g.iataMatch.iata,terminals:i.searchService.processTerminals(g.iataMatch.terminals),country:null===(c=null===(u=g.iataMatch)||void 0===u?void 0:u.locationDetails)||void 0===c?void 0:c.country,postcode:null===(d=null===(l=g.iataMatch)||void 0===l?void 0:l.locationDetails)||void 0===d?void 0:d.postcode,countryCode:null===(h=null===(p=g.iataMatch)||void 0===p?void 0:p.locationDetails)||void 0===h?void 0:h.countryCode},i.dropoff_country=i.dropoff_location.countryCode,i.pickup_country=i.pickup_location.countryCode,i.searchService.startSearches())}))},n.prototype.getParamsForCarbyCity=function(t){this.locationType=e.LocationTypes.City,this.cityPickup={countryCode:t.searchArgs.city.pickupCountryCode,id:t.searchArgs.city.pickupCity,name:t.searchArgs.city.pickupName,type:e.LocationTypes.City,latitude:t.searchArgs.city.pickupLatitude,longitude:t.searchArgs.city.pickupLongitude},this.cityDropoff={countryCode:t.searchArgs.city.dropoffCountryCode,id:t.searchArgs.city.dropoffCity,name:t.searchArgs.city.dropOffName,type:e.LocationTypes.City,latitude:t.searchArgs.city.dropOffLatitude,longitude:t.searchArgs.city.dropOffLongitude},this.cityDropoffDepot={addressLines:[t.searchArgs.city.dropOffAddressLines],cityName:t.searchArgs.city.dropOffCityName,extendedLocationCode:t.searchArgs.city.dropOffExtendedLocationCode,locationCode:t.searchArgs.city.dropOffLocationCode,vendor:t.searchArgs.city.dropOffVendor,vendorCode:t.searchArgs.city.dropOffVendorCode},this.cityPickupDepot={addressLines:[t.searchArgs.city.pickupAddressLines],cityName:t.searchArgs.city.pickupCityName,extendedLocationCode:t.searchArgs.city.pickupExtendedLocationCode,locationCode:t.searchArgs.city.pickupLocationCode,vendor:t.searchArgs.city.pickupVendor,vendorCode:t.searchArgs.city.pickupVendorCode},this.searchService.startSearches()},n.prototype.getParamsForCarbyPostCode=function(t){this.locationType=e.LocationTypes.Postcode,this.postcodeDropoff={addressLines:[t.searchArgs.depot.dropoffAddressLines],vendorCode:t.searchArgs.depot.vendorCode,locationCode:t.searchArgs.depot.dropOffLocationCode,extendedLocationCode:t.searchArgs.depot.dropOffExtendedLocationCode,cityName:t.searchArgs.depot.dropoffCityName,vendor:t.searchArgs.depot.dropoffVendor},this.postcodeDropoffRaw={name:t.searchArgs.depot.dropoffPostCode,type:e.LocationTypes.Postcode,latitude:t.searchArgs.depot.dropoffLatitude,longitude:t.searchArgs.depot.dropoffLongitude},this.postcodePickup={addressLines:[t.searchArgs.depot.pickupAddressLines],vendorCode:t.searchArgs.depot.vendorCode,locationCode:t.searchArgs.depot.pickupLocationCode,extendedLocationCode:t.searchArgs.depot.pickupExtendedLocationCode,cityName:t.searchArgs.depot.pickupCityName,vendor:t.searchArgs.depot.pickupVendor},this.postcodePickupRaw={name:t.searchArgs.depot.pickupPostCode,type:e.LocationTypes.Postcode,latitude:t.searchArgs.depot.pickupLatitude,longitude:t.searchArgs.depot.pickupLongitude},this.searchService.startSearches()},n.prototype.getSearchQuery=function(){var t={};switch(this.locationType){case e.LocationTypes.Airport:t.airport={pickupCode:"",dropoffCode:""},t.airport.pickupCode=this.pickup_location.gateway,t.airport.dropoffCode=this.return_to_pickup?this.pickup_location.gateway:this.dropoff_location.gateway;break;case e.LocationTypes.City:t.city={pickupCountryCode:this.cityPickup.countryCode,pickupCity:this.cityPickup.id.toString(),dropoffCountryCode:this.cityDropoff.countryCode,dropoffCity:this.cityDropoff.id.toString()};break;case e.LocationTypes.Postcode:t.depot={vendorCode:this.postcodePickup.vendorCode,pickupLocationCode:this.postcodePickup.locationCode,pickupExtendedLocationCode:this.postcodePickup.extendedLocationCode,dropOffLocationCode:this.postcodeDropoff.locationCode,dropOffExtendedLocationCode:this.postcodeDropoff.extendedLocationCode}}return t.dropoffDateTime=this.dropoff_datetime,t.pickupDateTime=this.pickup_datetime,t.aircon=this.airCon||null,t.vendor="-"===this.chosenVendor?null:this.chosenVendor,t.transmission=this.transmission||null,t.class=this.carClass||null,t.type=this.carType||null,t.estimatedDailyDistance=this.estimatedMileage||null,t.estimatedDailyDistanceUnits=this.estimatedMileage?M.M:null,this.helpers.removeNulls(t)},n.prototype.getCarClasses=function(){return t.of(this._car_classes)},n.prototype.getLocationTypes=function(){return t.of(this._location_types)},n.prototype.filterResults=function(e,t){var r=this,i=this.helpers.clone(this.fullResults);i=i.filter((function(t){var i=r.getPrice(t);return i>=e.minPrice&&i<=e.maxPrice})),i=this.filterByTransmissionType(e.transmissions,i),i=this.filterByAirconType(e.airConditioning,i),i=this.filterByCarType(e.types,i),i=this.filterByCompany(e.companies,i),i=this.sortResults(t,i),this.results.next(i)},n.prototype.filterByCompany=function(e,t){var r=e.filter((function(e){return e.selected}));return r.length&&(t=t.filter((function(e){return r.find((function(t){return t.value.toString().toLowerCase()===e.identifiers.vendor.toLowerCase()}))}))),t},n.prototype.filterByCarType=function(e,t){var r=e.filter((function(e){return e.selected}));return r.length&&(t=t.filter((function(e){return r.find((function(t){return t.value.toString().toLowerCase()===e.displayRecord.vehicle.class.toLowerCase()}))}))),t},n.prototype.filterByTransmissionType=function(e,t){var r=e.find((function(e){return e.selected}));if(r&&"Y"!==r.value)try{t=t.filter((function(e){return e.identifiers.vehType[2].toLowerCase()===r.value.toString().toLowerCase()}))}catch(e){console.error("+++ Error filtering transmissions: "+e+" +++")}return t},n.prototype.filterByAirconType=function(e,t){var r=e.find((function(e){return e.selected}));if(r&&"A"!==r.value)try{t=t.filter((function(e){return e.identifiers.vehType[3].toLowerCase()===r.value.toString().toLowerCase()}))}catch(e){console.error("+++ Error filtering aircons: "+e+" +++")}return t},n.prototype.sortResults=function(e,t){var r=this,i=this.helpers.clone(t||this.results.value);switch(e){case 0:i=i.sort((function(e,t){return r.getPrice(e)-r.getPrice(t)}));break;case 1:i=i.sort((function(e,t){return r.getPrice(t)-r.getPrice(e)}));break;case 2:break;case 3:i=this.sortByBrand(i);break;case 4:i=this.sortBySize(i)}return this.results.next(i),i},n.prototype.sortExpensive=function(e){var t=this,r=this.helpers.clone(e||this.results.value).sort((function(e,r){return t.getPrice(r)-t.getPrice(e)}));return this.results.next(r),r},n.prototype.sortCheapest=function(e){var t=this,r=this.helpers.clone(e||this.results.value).sort((function(e,r){return t.getPrice(e)-t.getPrice(r)}));return this.results.next(r),r},n.prototype.sortBySize=function(e){var t=this,r=this.helpers.clone(e||this.results.value).sort((function(e,r){var i,n;return i=t.carClassMap[e.displayRecord.vehicle.class.toLowerCase()],n=t.carClassMap[r.displayRecord.vehicle.class.toLowerCase()],i>=0&&n>=0?i-n:-1}));return this.results.next(r),r},n.prototype.sortByBrand=function(e){var t=this.helpers.clone(e||this.results.value).sort((function(e,t){var r=e.identifiers.vendor,i=t.identifiers.vendor;switch(r){case"ZE":r="HE";break;case"ZI":r="AV"}switch(i){case"ZE":i="HE";break;case"ZI":i="AV"}return r<i?-1:r>i?1:0}));return this.results.next(t),t},n.prototype.getPrice=function(e){try{return Number(e.displayRecord.charges[0].amount)}catch(e){}return 0},n.prototype.getMinPrice=function(e){var t=this;return e.reduce((function(e,r){var i=t.getPrice(r);return i<e&&(e=i),e}),Number.MAX_SAFE_INTEGER)},n.prototype.getMaxPrice=function(e){var t=this;return e.reduce((function(e,r){var i=t.getPrice(r);return i>e&&(e=i),e}),Number.MIN_SAFE_INTEGER)},n.prototype.updateFromPreviousSearches=function(e){var t;null===(t=e[Z.Flight])||void 0===t||t.searchQuery},n.prototype._updatePickupDateTime=function(){if(this._pickup_date&&this._pickup_time){var e=this.helpers.ngDateToMoment(this._pickup_date,this._pickup_time);this.pickup_datetime=e.isValid()?e:null,this._isValid()}},n.prototype._updateDropoffDateTime=function(){if(this._dropoff_date&&this._dropoff_time){var e=this.helpers.ngDateToMoment(this._dropoff_date,this._dropoff_time);this.dropoff_datetime=e.isValid()?e:null,this._isValid()}},n.prototype._updateNgbPickupDateTime=function(){if(this._ngbPickupDate&&this._pickupTime){var e=this.helpers.ngDateToMoment(this._ngbPickupDate,this._pickupTime);this.pickup_datetime=e.isValid()?e:null,this._isValid()}},n.prototype._updateNgbDropoffDateTime=function(){if(this._ngbDropoffDate&&this._dropoffTime){var e=this.helpers.ngDateToMoment(this._ngbDropoffDate,this._dropoffTime);this.dropoff_datetime=e.isValid()?e:null,this._isValid()}},n.prototype.isOverNight=function(){var e=this.pickup_datetime.date();return this.dropoff_datetime.date()-e>=1},n.prototype.updateLowestPrice=function(e){return e.length?{amount:this.getMinPrice(e),currencyCode:e[0].displayRecord.charges[0].currencyCode}:null},n.prototype.getCarHireAvailabilityDetail=function(e,t){return t.value||t.next(!0),this.carHireAvailabilityDetailFetcher.fetchList({locationDetails:e}).pipe(r.take(1),r.map((function(e){return t.value&&t.next(!1),e})))},n.prototype.addCarHireToBasket=function(t,r){var i,n;return y(this,void 0,void 0,(function(){var o,a,s,u,c,l,d,p;return v(this,(function(h){switch(h.label){case 0:return t.unavailable?[2,Promise.resolve(!1)]:[4,this.basketService.getDefaultBasket()];case 1:return o=h.sent(),(a=null==o?void 0:o.subject.value)?(s=t.co2PerItem,u=t.co2PerPassenger,c=t.displayRecord,l=t.identifiers,d=t.sourceId,p=parseFloat(null!==(n=null===(i=null==c?void 0:c.charges[0])||void 0===i?void 0:i.amount)&&void 0!==n?n:"0"),[2,this.basketService.addToBasket({adults:this.adults,basket:a.id,service:d.toString(),detail:{pickUpDatetime:new Date(c.pickup).toISOString(),dropOffDatetime:new Date(c.dropoff).toISOString(),pickUpLocation:{iata:this.locationType===e.LocationTypes.Airport?l.locationCode:"",name:c.pickupLocation.name,address:c.pickupLocation.topLine+", "+c.pickupLocation.city,postcode:c.pickupLocation.postCode},dropOffLocation:{iata:this.locationType===e.LocationTypes.Airport?l.dropOffLocation:"",name:c.returnLocation.name,address:c.returnLocation.topLine+", "+c.returnLocation.city,postcode:c.returnLocation.postCode},car:{type:c.vehicle.type,manualTransmission:c.vehicle.transmission.includes(F.Manual)},vendorName:c.vendor.name,identifiers:{dropOffLocation:l.dropOffLocation,locationCode:l.locationCode,locationName:l.locationName,vehType:l.vehType,vendor:l.vendor}},price:p,currency:"GBP",searchQuery:r,co2PerItem:s,co2PerPassenger:u,outboundDate:new Date(c.pickup).toISOString()},o,this.searchService,this.travellers)]):[2,Promise.resolve(!1)]}}))}))},n}(l);Ne.STORAGE_SESSION_PARAMS="carhire_params",Ne.STORAGE_SESSION_RESULTS="carhire_results";var Ie,Re,Ee,Me=function(){this.numberHotelToPreload=Number.MAX_SAFE_INTEGER,this.numberOfHotelsToFetch=5,this.autoFetchHotelTimeout=50,this.autoLogoutTime=60,this.hotelAvalibilityTimeout=2e3,this.maxBasketNumber=5},Be=function(e){},Le={next:Be},je=function(){function e(){this.events={}}return e.prototype.getEmmitter=function(e){return this.events[e]=this.events[e]||new t.Subject,this.events[e]},e.prototype.emit=function(e,t){(this.events[e]||Le).next(t)},e}();(Ie=e.FlightSearchType||(e.FlightSearchType={})).return="return",Ie.oneWay="oneWay",Ie.multiCity="multiCity",(Re=e.TimeWindow||(e.TimeWindow={})).Anytime="Anytime",Re.Depart="Depart By",Re.Arrive="Arrive By",(Ee=e.SortTypes||(e.SortTypes={})).CheapestFirst="C",Ee.MostExpensiveFirst="M",Ee.FastestFirst="F",Ee.PreferredFirst="P",Ee.LowestEmissions="L";var we=function(r){function i(n,o,a,s,c,l){var d=r.call(this,c,(function(t){if(d.flightsToGroup={},d.grouped=t.grouped||[],d.resultQuery=d.getSearchQuery(),delete d.resultQuery.withGrouped,t&&d.searchService.isFlightsGrouped()){d.groupedObject=(t.multi||[]).reduce((function(e,t){return e.concat(t.results)}),t.journeys).map((function(e){return Object.assign(e,{seleced:!1,canSelect:!0})}));var r=(t.grouped||[]).reduce((function(t,r,i){var n,o=r.boundIndicator===e.FlightDirectionEnum.Outbound,a={direction:r.boundIndicator,classes:(n={},n[j.EconomyNoBags]=null,n[j.EconomyRestricted]=null,n[j.Economy]=null,n[j.Business]=null,n[j.First]=null,n[j.PremiumEconomy]=null,n),originAirport:"",originAirportName:"",destinationAirport:"",destinationAirportName:"",departDateTime:"",arrivalDateTime:"",outboundTotalDuration:0,inboundTotalDuration:0,outlegs:null,inlegs:null,outlegsCount:0,inlegsCount:0,dataSource:"",preferred:!1,outboundFlightNumber:"",operator:"",operatorFull:"",inboundFlightNumber:"",isReturn:!1},s=r.flights;return Object.keys(s).filter((function(e){return"_"!==e[0]})).forEach((function(e){var t,r;if(s[e].length){var n,u=s[e].reduce((function(e,t,r){(d.flightsToGroup[t]=d.flightsToGroup[t]||[]).push(i);var n=d.groupedObject[t];return o?d.createGroupedItem(a,n.source,n.outboundFlights,n.outboundTotalDuration,n.inboundFlights,n.inboundTotalDuration):d.createGroupedItem(a,n.source,n.inboundFlights,n.inboundTotalDuration,n.outboundFlights,n.outboundTotalDuration),n&&e.push(n),e}),[]);switch(e){case j.LiteEconomy:case j.Economy:n=j.Economy;break;case j.EconomyNoBags:n=j.EconomyNoBags;break;case j.EconomyRestricted:n=j.EconomyRestricted;break;case j.PremiumBusiness:case j.Business:n=j.Business;break;case j.PremiumFirst:case j.First:n=j.First;break;case j.PremiumEconomy:n=j.PremiumEconomy;break;default:console.log("something went wrong")}var c=d.getMinFlightPriceForBrand(u),l=d.getMaxFlightPriceForBrand(u);(null===(r=null===(t=a.classes[n])||void 0===t?void 0:t.flights)||void 0===r?void 0:r.length)?(a.classes[n].flights.concat(u),a.classes[n].minprice=Math.min(a.classes[n].minprice,c),a.classes[n].maxprice=Math.max(a.classes[n].maxprice,l)):a.classes[n]={flights:u,minprice:c,maxprice:l,currency:u[0].total.currency}}})),a&&t.push(a),t}),[]);return console.log("Processed Grouped data",r),r}return t?[t]:[]}))||this;d.flightfetcher=n,d.helpers=o,d.basketService=s,d.searchService=l,d.type=Z.Flight,d.avaliableClasses=new t.BehaviorSubject([]),d.timeCriteriaOptions=new t.BehaviorSubject([]),d.flightOperators=new t.BehaviorSubject([]),d._negotiated=!1,d._nearby_airports=!1,d._sortArray=[{display:"Cheapest First",value:e.SortTypes.CheapestFirst},{display:"Most Expensive First",value:e.SortTypes.MostExpensiveFirst},{display:"Fastest First",value:e.SortTypes.FastestFirst},{display:"Preferred Fares First",value:e.SortTypes.PreferredFirst},{display:"Lowest Co2 Emissions First",value:e.SortTypes.LowestEmissions}],d._fareTypeArray=[{value:L.Flexible,display:"Flexible"},{value:L.Leisure,display:"Leisure"},{value:L.Lowest,display:"Lowest"},{value:L.Negotiated,display:"Negotiated"},{value:L.NonNegotiated,display:"Non-Negotiated"},{value:L.RequestFareRules,display:"Request Fare Rules"},{value:L.SelectAndPro,display:"Select & Pro"}],d.minimumOutBoundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},d.minimumInBoundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},d.flightsToGroup={},d.grouped=null,d.travellers=null,d.resultsSessionName=i.STORAGE_SESSION_RESULTS,d._showHotelForm=!1,d._hotelSearchRequested=!1,d._multiDestination=[];var p=c.getSessionItem(i.STORAGE_SESSION_PARAMS)||{tempParams:{},originalUserSearch:{}},h=l.makeFlightQuery(p.tempParams);if(d.updateTempParams(h),d._originalUserSearch=p.originalUserSearch,l.shouldAddTravellerSubscription()&&l.travellerInformation.subscribe((function(e){d.travellers=e;var t=d.helpers.selectedTravellers(e,Z.Flight);d.tempParams.adults=t.adults.length,d.tempParams.children=t.children.length,d.updateTravellers(),d._isValid()})),a.changeUser.subscribe((function(t){d.timeCriteriaOptions.next([e.TimeWindow.Anytime,e.TimeWindow.Arrive,e.TimeWindow.Depart]),d.flightOperators.next([{code:"BA",name:"British Airways"}]),d.updateAvaliableClasses()})),d.updateTravellers(),d.isValid.value){var m=c.getSessionItem(d.resultsSessionName)||{results:[],groupData:{},grouped:[],query:{}};d.fullResults=d.helpers.clone(m.results),d.flightsToGroup=m.groupData||{},d.resultQuery=m.query,d.results.next(m.results||[])}return d.negotiated=d.tempParams.fareType===L.Negotiated,d}return m(i,r),Object.defineProperty(i.prototype,"timeArray",{get:function(){return this._timeArray=this._timeArray||Array(96).fill(0).map((function(e,t){return{value:Math.floor(t/4).toString().padStart(2,"0")+":"+(t%4*15).toString().padStart(2,"0"),display:Math.floor(t/4).toString().padStart(2,"0")+":"+(t%4*15).toString().padStart(2,"0")}})),this._timeArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preferredCarriers",{get:function(){return this.tempParams.preferredCarriers},set:function(e){this.tempParams.preferredCarriers=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator1",{get:function(){return this.tempParams.preferredCarriers[0]},set:function(e){this.tempParams.preferredCarriers[0]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator2",{get:function(){return this.tempParams.preferredCarriers[1]},set:function(e){this.tempParams.preferredCarriers[1]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator3",{get:function(){return this.tempParams.preferredCarriers[2]},set:function(e){this.tempParams.preferredCarriers[2]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator4",{get:function(){return this.tempParams.preferredCarriers[3]},set:function(e){this.tempParams.preferredCarriers[3]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minDate",{get:function(){return this._minDate=this._minDate||this.helpers.momentToNgDate(u.default()),this._minDate},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"adults",{get:function(){return this.tempParams.adults},set:function(e){this.tempParams.adults=Number(e),this.updateTravellers()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"children",{get:function(){return this.tempParams.children},set:function(e){this.tempParams.children=Number(e),this.updateTravellers()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departLocation",{get:function(){return this.tempParams.departLocation},set:function(e){this.tempParams.departLocation=e,"string"==typeof e?this._originAirport="":e&&e.gateway?this._originAirport=e.gateway:this._originAirport=null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"queryOriginAiport",{get:function(){return this._originAirport},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"queryDestinationAiport",{get:function(){return this._destinationAirport},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departDate",{get:function(){return this._outDate},set:function(e){this._outDate=e,this.outBoundDate=this.helpers.ngDateToMoment(this._outDate,this._outTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departTime",{get:function(){return this._outTime},set:function(e){this._outTime=e,this.outBoundDate=this.helpers.ngDateToMoment(this._outDate,this._outTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outBoundDate",{get:function(){return this.tempParams.outBoundDate},set:function(e){this.tempParams.outBoundDate=e.isValid()?e:null,this.minimumInBoundDate={year:e.year(),month:e.month()+1,day:e.date()},this.tempParams.outBoundDate&&this.tempParams.inboundDate&&this.tempParams.outBoundDate.isAfter(this.tempParams.inboundDate)&&(this.inboundDate=u.default(this.tempParams.outBoundDate).add(1,"day")),this._outDate=this.helpers.momentToNgDate(e),this._outTime=this.helpers.formatTimeColon(e),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"returnDate",{get:function(){return this._inDate},set:function(e){this._inDate=e,this.inboundDate=this.helpers.ngDateToMoment(this._inDate,this._inTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arriveTime",{get:function(){return this._inTime},set:function(e){this._inTime=e,this.inboundDate=this.helpers.ngDateToMoment(this._inDate,this._inTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inboundDate",{get:function(){return this.tempParams.inboundDate},set:function(e){this.tempParams.inboundDate=e.isValid()?e:null,this._inDate=this.helpers.momentToNgDate(e),this._inTime=this.helpers.formatTimeColon(e),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arriveLocation",{get:function(){return this.tempParams.arriveLocation},set:function(e){this.tempParams.arriveLocation=e,"string"==typeof e?this._destinationAirport="":e&&e.gateway?this._destinationAirport=e.gateway:this._destinationAirport=null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cabinClass",{get:function(){return this.tempParams.cabinClass},set:function(e){this.tempParams.cabinClass=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"returnCabinClass",{get:function(){return this.tempParams.returnCabinClass},set:function(e){this.tempParams.returnCabinClass=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"chosenSearchType",{get:function(){return this.tempParams.chosenSearchType},set:function(e){this.tempParams.chosenSearchType=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isReturn",{get:function(){return this.tempParams.chosenSearchType===e.FlightSearchType.return},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outTimeCriteria",{get:function(){return this.tempParams.outTimeCriteria},set:function(e){this.tempParams.outTimeCriteria=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inTimeCriteria",{get:function(){return this.tempParams.inTimeCriteria},set:function(e){this.tempParams.inTimeCriteria=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxConnections",{get:function(){return this.tempParams.maxConnections},set:function(e){this.tempParams.maxConnections=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"multiDestination",{get:function(){return this.tempParams.multiDestination},set:function(e){this.tempParams.multiDestination=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"showHotelForm",{get:function(){return this._showHotelForm},set:function(e){this._showHotelForm=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"hotelSearchRequested",{get:function(){return this._hotelSearchRequested},set:function(e){this._hotelSearchRequested=e},enumerable:!1,configurable:!0}),i.prototype.setMultiDestinationQuery=function(e){var t=this;return this.helpers.clone(e).reduce((function(e,r){var i={};return i.orig=r.orig.gateway,i.dest=r.dest.gateway,i.date=t.helpers.formatIsoDate(r.date),e.push(i),e}),[])},Object.defineProperty(i.prototype,"sortDropdownValues",{get:function(){return this._sortArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fareTypesValues",{get:function(){return this._fareTypeArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fareType",{get:function(){return this.tempParams.fareType},set:function(e){this.tempParams.fareType=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"negotiated",{get:function(){return this._negotiated},set:function(e){this._negotiated=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"includeNearbyAirports",{get:function(){return this.tempParams.includeNearbyAirports},set:function(e){this.tempParams.includeNearbyAirports=e},enumerable:!1,configurable:!0}),i.prototype.createGroupedItem=function(e,t,r,i,n,o){if((null==r?void 0:r.length)&&!e.departDateTime){var a=r[0],s=r[r.length-1];e.originAirport=a.originAirport,e.originAirportName=a.originAirportName,e.destinationAirport=s.destinationAirport,e.destinationAirportName=s.destinationAirportName,e.departDateTime=a.dateTimeDeparting,e.arrivalDateTime=s.dateTimeArriving,e.outboundTotalDuration=i,e.dataSource=t,e.operator=a.marketingCarrier,e.operatorFull=a.marketingCarrierName,e.outlegsCount=r.length,e.outlegs=r,e.outboundFlightNumber=this.helpers.joinFromAttribute("-","marketingFlightNumber",r),e.isReturn=!1}(null==n?void 0:n.length)&&!e.inboundTotalDuration&&(e.inboundTotalDuration=o,e.inlegsCount=n.length,e.inlegs=n,e.inboundFlightNumber=this.helpers.joinFromAttribute("-","operatingFlightNumber",n),e.isReturn=!0)},i.prototype.makeSessionResults=function(e){return{results:e,groupData:this.flightsToGroup,grouped:this.grouped,query:this.resultQuery}},i.prototype.getMaxFlightPriceForBrand=function(e){var t=0;return e.forEach((function(e){var r;t<(null===(r=null==e?void 0:e.total)||void 0===r?void 0:r.price)&&(t=e.total.price)})),t},i.prototype.getMinFlightPriceForBrand=function(e){var t=Number.MAX_SAFE_INTEGER;return e.forEach((function(e){var r;t>(null===(r=null==e?void 0:e.total)||void 0===r?void 0:r.price)&&(t=e.total.price)})),t},i.prototype.resetQuery=function(e){void 0===e&&(e=!0),this.updateTempParams(this.searchService.makeFlightQuery()),e&&this._isValid()},i.prototype.resetParams=function(){this.reset(),this.resetQuery()},i.prototype._isValid=function(){this.doChecks&&(this.storageService.setSessionItem(i.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch}),this.validationMessages=[],this.tempParams.chosenSearchType===e.FlightSearchType.multiCity?this.multiCityValidation():(this._originAirport||this.validationMessages.push("Please add in a departure location"),this._destinationAirport||this.validationMessages.push("Please add in an arrival destination"),this.tempParams.outBoundDate.isAfter(u.default())||this.validationMessages.push("Departure date can not be in the past"),this._originAirport&&this._destinationAirport&&this._destinationAirport===this._originAirport&&this.validationMessages.push("Origin and destination airport cannot be the same"),this.isReturn&&this.tempParams.outBoundDate.isSameOrAfter(this.tempParams.inTimeCriteria)&&this.validationMessages.push("Return date must be after the departure date"),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages)))},i.prototype.multiCityValidation=function(){var e=!1,t=!1,r=!1;this.tempParams.multiDestination.map((function(i,n){i.orig||(e=!0,n<2&&(t=!0)),i.orig===i.dest&&(r=!0)})),u.default(this.tempParams.multiDestination[0].date).isAfter(u.default())||this.validationMessages.push("Departure date can not be in the past"),t&&this.validationMessages.push("Please select landing airport(s)"),e&&this.validationMessages.push("Please select take off airport(s)"),r&&this.validationMessages.push("Take off and landing location(s) cannot be the same")},i.prototype.startSearch=function(){if(this.results.next([]),this._isValid(),this.isValid.value){this._originalUserSearch=Object.freeze(Object.assign({},this.tempParams)),this.storageService.setSessionItem(i.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch});var e=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(e)),this._startSearch(this.flightfetcher.fetchList(e))}return Promise.resolve(!1)},i.prototype.getRecentSearchQuery=function(e){return{serviceType:Z.Flight,searchArgs:e,travelDate:this.outBoundDate.format(),travellers:this.helpers.getTravellersId(this.travellers)}},i.prototype.startRecentSearch=function(r){var i=this;r.searchArgs.outboundDate&&(this.outBoundDate=this.convertRecentSearchDateTime(r.searchArgs.outboundDate,r.searchArgs.outboundDepartureTimeWindow)),r.searchArgs.returnDate&&(this.inboundDate=this.convertRecentSearchDateTime(r.searchArgs.returnDate,r.searchArgs.returnDepartureTimeWindow)),this.fareType=r.searchArgs.fareType,this.maxConnections=r.searchArgs.maxConnections,r.searchArgs.outboundCabinClass&&(this.cabinClass=r.searchArgs.outboundCabinClass[0]),r.searchArgs.returnCabinClass&&(this.returnCabinClass=r.searchArgs.returnCabinClass[0]),this.includeNearbyAirports=!!r.searchArgs.includeNearbyAirports,this.chosenSearchType=r.searchArgs.returnTrip?e.FlightSearchType.return:e.FlightSearchType.oneWay,r.searchArgs.outboundDepartureTimeWindow?this.outTimeCriteria=e.TimeWindow.Depart:r.searchArgs.outboundArrivalTimeWindow?this.outTimeCriteria=e.TimeWindow.Arrive:this.outTimeCriteria=e.TimeWindow.Anytime,r.searchArgs.returnDepartureTimeWindow?this.inTimeCriteria=e.TimeWindow.Depart:r.searchArgs.returnArrivalTimeWindow?this.inTimeCriteria=e.TimeWindow.Arrive:this.inTimeCriteria=e.TimeWindow.Anytime,t.combineLatest([this.searchService.getAirportByCode(r.searchArgs.originAirport),this.searchService.getAirportByCode(r.searchArgs.destinationAirport)]).subscribe((function(e){var t,n,o,a,s,u,c,l,d,p,h,m,f=S(e,2),g=f[0],y=f[1];if(g&&y){if(i.departLocation={destination:g.iataMatch.name,gateway:g.iataMatch.iata,terminals:i.searchService.processTerminals(g.iataMatch.terminals),country:null===(n=null===(t=g.iataMatch)||void 0===t?void 0:t.locationDetails)||void 0===n?void 0:n.country,postcode:null===(a=null===(o=g.iataMatch)||void 0===o?void 0:o.locationDetails)||void 0===a?void 0:a.postcode,countryCode:null===(u=null===(s=g.iataMatch)||void 0===s?void 0:s.locationDetails)||void 0===u?void 0:u.countryCode},i.arriveLocation={destination:y.iataMatch.name,gateway:y.iataMatch.iata,terminals:i.searchService.processTerminals(y.iataMatch.terminals),country:null===(l=null===(c=y.iataMatch)||void 0===c?void 0:c.locationDetails)||void 0===l?void 0:l.country,postcode:null===(p=null===(d=y.iataMatch)||void 0===d?void 0:d.locationDetails)||void 0===p?void 0:p.postcode,countryCode:null===(m=null===(h=y.iataMatch)||void 0===h?void 0:h.locationDetails)||void 0===m?void 0:m.countryCode},r.searchArgs.preferredCarriers){var v=[];r.searchArgs.preferredCarriers.map((function(e){i.searchService.getAirlinesList(e).subscribe((function(t){t.map((function(t){t.code===e&&v.push(t)})),i.preferredCarriers=v,i.searchService.startSearches()}))}))}i.searchService.startSearches()}})),this.searchService.startSearches()},i.prototype.makeDepartureTimeWindow=function(t,r,i){return r===e.TimeWindow.Depart?i?this.helpers.makeTimeWindow(t,-2,2):this.helpers.makeTimeWindow(t,0,4):null},i.prototype.makeArrivalTimeWindow=function(t,r,i){return r!==e.TimeWindow.Arrive?null:i?this.helpers.makeTimeWindow(t,-2,2):this.helpers.makeTimeWindow(t,0,4)},i.prototype.convertRecentSearchDateTime=function(e,t){if(t){var r=t.split("-");return u.default(e).add(u.default.duration(this.helpers.hhmmToTime(r[0]))).clone().add(2,"hour")}return u.default(e)},i.prototype.getSearchQuery=function(){var t=this.tempParams.chosenSearchType===e.FlightSearchType.multiCity;this._multiDestination=t?this.setMultiDestinationQuery(this.tempParams.multiDestination):null,this._multiDestination=this.tempParams.chosenSearchType===e.FlightSearchType.multiCity?this.setMultiDestinationQuery(this.tempParams.multiDestination):[];var r=this.searchService.isFlightsGrouped();return this.helpers.removeNulls(Object.assign({},t?{multiDestination:this._multiDestination}:{originAirport:this._originAirport,destinationAirport:this._destinationAirport,outboundDate:this.helpers.formatIsoDate(this.tempParams.outBoundDate),outboundDepartureTimeWindow:this.makeDepartureTimeWindow(this.tempParams.outBoundDate,this.tempParams.outTimeCriteria,r),outboundArrivalTimeWindow:this.makeArrivalTimeWindow(this.tempParams.outBoundDate,this.tempParams.outTimeCriteria,r)},{passengers:this._passengers,returnTrip:this.isReturn,outboundCabinClass:this.tempParams.cabinClass?[this.tempParams.cabinClass]:null,requireFreeBag:null,maxConnections:this.tempParams.maxConnections,includeNearbyAirports:this.tempParams.includeNearbyAirports,preferredCarriers:this.tempParams.preferredCarriers.map((function(e){return(null==e?void 0:e.code)?e.code:null})),fareType:this.tempParams.fareType,withGrouped:r},this.isReturn?{returnDate:this.helpers.formatIsoDate(this.tempParams.inboundDate),returnDepartureTimeWindow:this.makeDepartureTimeWindow(this.tempParams.inboundDate,this.tempParams.inTimeCriteria,r),returnArrivalTimeWindow:this.makeArrivalTimeWindow(this.tempParams.inboundDate,this.tempParams.inTimeCriteria,r),returnCabinClass:this.tempParams.returnCabinClass?[this.tempParams.returnCabinClass]:null}:{}))},i.prototype.updateTravellers=function(){for(var e=[],t=0;t<this.tempParams.adults;t+=1)e.push({type:w.Adult});for(t=0;t<this.tempParams.children;t+=1)e.push({type:w.Child});this._passengers=e,this._isValid()},i.prototype.updateAvaliableClasses=function(){this.avaliableClasses.next([{name:"Any",type:j.Any},{name:"Economy",type:j.Economy},{name:"Premium",type:j.PremiumEconomy},{name:"Business",type:j.Business},{name:"First",type:j.First}])},i.prototype.sortResults=function(t,r){var i=this.helpers.clone(r||this.fullResults);switch(t){case e.SortTypes.CheapestFirst:i=i.sort((function(e,t){return e.total.price-t.total.price}));break;case e.SortTypes.MostExpensiveFirst:i=i.sort((function(e,t){return t.total.price-e.total.price}));break;case e.SortTypes.FastestFirst:i=i.sort((function(e,t){return e.outboundTotalDuration+(e.inboundTotalDuration?e.inboundTotalDuration:0)-(t.outboundTotalDuration+(t.inboundTotalDuration?t.inboundTotalDuration:0))}));break;case e.SortTypes.LowestEmissions:i=i.sort((function(e,t){return e.co2PerItem-t.co2PerItem}));break;default:console.error("+++ Unknown sorting method: "+t+" +++")}return i},i.prototype.updateFromPreviousSearches=function(e){},i.prototype.getTotalBaggage=function(e){var t=0,r=JSON.parse(e.additional);return r&&r.outboundFlights?r.outboundFlights.forEach((function(e){e.baggage.forEach((function(e){e.allowance&&e.allowance>t&&(t=e.allowance)}))})):r&&r.baggageAllowance&&r.baggageAllowance.forEach((function(e){e.baggage.qty&&Number(e.baggage.qty)>t&&(t=Number(e.baggage.qty))})),t},i.prototype.filterResults=function(e,t,r){console.log("+++ Applying Filters to flights: ",e," +++");var i=this.helpers.clone(r);return this.isReturn&&(i=i.filter((function(e){return e.inboundFlights&&e.inboundFlights.length}))),i=this.filterResultsByStops(e.stops,i),i=this.filterResultsByAirline(e.airlines,i),i=this.filterResultsByClass(e.classes,i),i=this.filterByDepartureAirport(e.depatureAirport,i),i=this.filterByDepartureReturnAirport(e.depatureReturnAirport,i),i=this.filterByArrivalAirport(e.arrivalAirport,i),i=this.filterByArrivalReturnAirport(e.arrivalReturnAirport,i),i=this.filterByPrice(e.minPrice,e.maxPrice,i),i=this.filterByFlightNumber(e.flightNumber,i),i=this.filterByBaggage(e.baggage,i),i=this.filterByDepartureTime(e.minDepartureTime,e.maxDepartureTime,i),i=this.filterByReturnDepartureTime(e.minReturnDepartureTime,e.maxReturnDepartureTime,i),i=this.filterByArrivalTime(e.minArrivalTime,e.maxArrivalTime,i),i=this.filterByReturnArrivalTime(e.minReturnArrivalTime,e.maxReturnArrivalTime,i),i=this.filterByDuration(e.minDuration,e.maxDuration,i),i=this.filterByDuration(e.minReturnDuration,e.maxReturnDuration,i,!0),i=this.sortResults(t,i)},i.prototype.transformMin=function(e){var t=60*Number(e)/100;return(t=t%1<.5?Math.floor(t):Math.ceil(t)).toString().padStart(2,"0")},i.prototype.filterByDuration=function(e,t,r,i){return void 0===i&&(i=!1),r=r.filter((function(r){var n,o=0;return i||r.outboundFlights.forEach((function(e){o+=e.totalDuration})),(null===(n=r.inboundFlights)||void 0===n?void 0:n.length)&&i&&r.inboundFlights.forEach((function(e){o+=e.totalDuration})),o>=e&&o<=t}))},i.prototype.filterByDepartureTime=function(e,t,r){var i=this;return r=r.filter((function(r){var n=Number(u.default(r.outboundFlights[0].dateTimeDeparting).format("HHmm")),o=Number(Math.floor(Number(e/100)).toString()+i.transformMin(Math.ceil(Number(e%100)))),a=Number(Math.floor(Number(t/100)).toString()+i.transformMin(Math.ceil(Number(t%100))));return n>=o&&n<=a}))},i.prototype.filterByReturnDepartureTime=function(e,t,r){if(!e&&!t)return r;var i=Number(Math.floor(Number(e/100)).toString()+this.transformMin(Math.ceil(Number(e%100)))),n=Number(Math.floor(Number(t/100)).toString()+this.transformMin(Math.ceil(Number(t%100))));return r=r.filter((function(e){if(!e.inboundFlights||!e.inboundFlights[0])return!0;var t=Number(u.default(e.inboundFlights[0].dateTimeDeparting).format("HHmm"));return t>=i&&t<=n}))},i.prototype.filterByReturnArrivalTime=function(e,t,r){if(!e&&!t)return r;var i=Number(Math.floor(Number(e/100)).toString()+this.transformMin(Math.ceil(Number(e%100)))),n=Number(Math.floor(Number(t/100)).toString()+this.transformMin(Math.ceil(Number(t%100))));return r=r.filter((function(e){if(!e.inboundFlights||!e.inboundFlights[0])return!0;var t=Number(u.default(e.inboundFlights[e.inboundFlights.length-1].dateTimeArriving).format("HHmm"));return t>=i&&t<=n}))},i.prototype.filterByArrivalTime=function(e,t,r){var i=Number(Math.floor(Number(e/100)).toString()+this.transformMin(Math.ceil(Number(e%100)))),n=Number(Math.floor(Number(t/100)).toString()+this.transformMin(Math.ceil(Number(t%100))));return r=r.filter((function(e){var t=Number(u.default(e.outboundFlights[e.outboundFlights.length-1].dateTimeArriving).format("HHmm"));return t>=i&&t<=n}))},i.prototype.filterByBaggage=function(e,t){var r=this,i=e.filter((function(e){return e.selected}));return(null==i?void 0:i.length)>=1&&i.length!==e.length&&(t=t.filter((function(e){try{var t=r.getTotalBaggage(e);return i.find((function(e){return e.value===t}))}catch(e){return console.error("+++ Error determening baggage: ${error} +++"),!1}}))),t},i.prototype.filterByPrice=function(e,t,r){return r=r.filter((function(r){return r.total.price>=e&&r.total.price<=t}))},i.prototype.filterResultsByStops=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t=e.outboundFlights.length-1;return r.find((function(e){return e.value===t}))}))),t},i.prototype.filterResultsByAirline=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){return r.find((function(t){return t.value===e.outboundFlights[0].operatingCarrier}))}))),t},i.prototype.filterResultsByClass=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){return r.find((function(t){return t.value===e.outboundFlights[0].cabinClass}))}))),t},i.prototype.filterByDepartureAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){return r.find((function(t){return t.value===e.outboundFlights[0].originAirport}))}))),t},i.prototype.filterByArrivalAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t=e.outboundFlights[e.outboundFlights.length-1].destinationAirport;return r.find((function(e){return e.value===t}))}))),t},i.prototype.filterByDepartureReturnAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t;return!(null===(t=e.inboundFlights)||void 0===t?void 0:t.length)||r.find((function(t){return t.value===e.inboundFlights[0].originAirport}))}))),t},i.prototype.filterByArrivalReturnAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t;if(!(null===(t=e.inboundFlights)||void 0===t?void 0:t.length))return!0;var i=e.inboundFlights[e.inboundFlights.length-1].destinationAirport;return r.find((function(e){return e.value===i}))}))),t},i.prototype.filterByFlightNumber=function(e,t){return e&&(t=t.filter((function(t){var r,i,n=t.outboundFlights.find((function(t){return t.operatingFlightNumber.toUpperCase().includes(e.toUpperCase())}));return(null===(r=t.inboundFlights)||void 0===r?void 0:r.length)&&(i=t.inboundFlights.find((function(t){return t.operatingFlightNumber.toUpperCase().includes(e.toUpperCase())}))),n||i}))),t},i.prototype.createFilters=function(e){void 0===e&&(e=[]);var t=this.getMinPrice(e),r=this.getMaxPrice(e);return{stops:this.getAllStops(e),mustInclude:[],classes:this.getAllClasses(e),airlines:this.getAllAirlines(e),travelPolicy:[],depatureAirport:this.getAllDepartureAirports(e),arrivalAirport:this.getAllArrivalAirports(e),minPrice:t,maxPrice:r,depatureReturnAirport:this.getAllDepartureAirports(e,!0),arrivalReturnAirport:this.getAllArrivalAirports(e,!0),baggage:this.getBaggage(e),fareTypes:[],minDuration:this.getMinDuration(e),maxDuration:this.getMaxDuration(e),minReturnDuration:this.getMinDuration(e,!0),maxReturnDuration:this.getMaxDuration(e,!0),minDepartureTime:this.getMinDepartureTime(e),maxDepartureTime:this.getMaxDepartureTime(e),minArrivalTime:this.getMinArrivalTime(e),maxArrivalTime:this.getMaxArrivalTime(e),minReturnDepartureTime:this.getMinReturnDepartureTime(e),maxReturnDepartureTime:this.getMaxReturnDepartureTime(e),maxReturnArrivalTime:this.getMaxReturnArrivalTime(e),minReturnArrivalTime:this.getMinReturnArrivalTime(e),flightNumber:""}},i.prototype.getMinDuration=function(e,t){void 0===t&&(t=!1);var r=0;return e.forEach((function(e){var i,n=0;t||e.outboundFlights.forEach((function(e){n+=e.totalDuration})),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&e.inboundFlights.forEach((function(e){n+=e.totalDuration})),(!r||n<r)&&(r=n)})),r},i.prototype.getMaxDuration=function(e,t){void 0===t&&(t=!1);var r=0;return e.forEach((function(e){var i,n=0;t||e.outboundFlights.forEach((function(e){n+=e.totalDuration})),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&e.inboundFlights.forEach((function(e){n+=e.totalDuration})),(!r||n>r)&&(r=n)})),r},i.prototype.getMinArrivalTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[e.outboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)})),t},i.prototype.getMinReturnArrivalTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights.length){var r=Number(u.default(e.inboundFlights[e.inboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)}})),t},i.prototype.getMaxReturnArrivalTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights.length){var r=Number(u.default(e.inboundFlights[e.inboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)}})),t},i.prototype.getMaxArrivalTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[e.outboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)})),t},i.prototype.getMinDepartureTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)})),t},i.prototype.getMinReturnDepartureTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights[0]){var r=Number(u.default(e.inboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)}})),t},i.prototype.getMaxReturnDepartureTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights[0]){var r=Number(u.default(e.inboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)}})),t},i.prototype.getMaxDepartureTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)})),t},i.prototype.getBaggage=function(e){var t={};return e.forEach((function(e){var r,i,n,o,a,s;try{if(e.baggageAllowance.length){var u=+(null===(r=e.baggageAllowance[0])||void 0===r?void 0:r.qty);e.inboundFlights.length&&(e.baggageAllowance[1]&&+e.baggageAllowance[1].qty>u?u=+(null===(i=e.baggageAllowance[1])||void 0===i?void 0:i.qty):+(null===(n=e.baggageAllowance[0])||void 0===n?void 0:n.qty)>u&&(u=+(null===(o=e.baggageAllowance[0])||void 0===o?void 0:o.qty))),+(null===(a=e.baggageAllowance[0])||void 0===a?void 0:a.qty)>u&&(u=+(null===(s=e.baggageAllowance[0])||void 0===s?void 0:s.qty)),t[u]={selected:!1,value:u,display:u+" bag"+(1!==u?"s":"")}}}catch(e){console.error("+++ Error parsing additional flight data: "+e+" +++")}})),Object.values(t)},i.prototype.getMinPrice=function(e){var t;return e.forEach((function(e){(!t||e.total.price<t)&&(t=e.total.price)})),t},i.prototype.getMaxPrice=function(e){var t;return e.forEach((function(e){(!t||e.total.price>t)&&(t=e.total.price)})),t},i.prototype.getAllStops=function(e){var t={};return e.forEach((function(e){var r=e.outboundFlights.length-1;t[r]={value:r,display:r+" stop"+(1!==r?"s":""),selected:!1}})),Object.values(t)},i.prototype.getAllClasses=function(e){var t=[];return e.forEach((function(e){e.outboundFlights.forEach((function(e){t[e.cabinClass]={value:e.cabinClass,display:e.cabinClass,selected:!1}})),e.inboundFlights&&e.inboundFlights.forEach((function(e){t[e.cabinClass]={value:e.cabinClass,display:e.cabinClass,selected:!1}}))})),Object.values(t)},i.prototype.getAllDepartureAirports=function(e,t){void 0===t&&(t=!1);var r={};return e.forEach((function(e){var i;e.outboundFlights.length&&!t&&(r[e.outboundFlights[0].originAirport]={value:e.outboundFlights[0].originAirport,display:e.outboundFlights[0].originAirportName,selected:!1}),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&(r[e.inboundFlights[0].originAirport]={value:e.inboundFlights[0].originAirport,display:e.inboundFlights[0].originAirportName,selected:!1})})),Object.values(r)},i.prototype.getAllArrivalAirports=function(e,t){void 0===t&&(t=!1);var r={};return e.forEach((function(e){var i;e.outboundFlights.length&&!t&&(r[e.outboundFlights[e.outboundFlights.length-1].destinationAirport]={value:e.outboundFlights[e.outboundFlights.length-1].destinationAirport,display:e.outboundFlights[e.outboundFlights.length-1].destinationAirportName,selected:!1}),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&(r[e.inboundFlights[e.inboundFlights.length-1].destinationAirport]={value:e.inboundFlights[e.inboundFlights.length-1].destinationAirport,display:e.inboundFlights[e.inboundFlights.length-1].destinationAirportName,selected:!1})})),Object.values(r)},i.prototype.getAllAirlines=function(e){var t={};return e.forEach((function(e){e.outboundFlights.forEach((function(e){t[e.operatingCarrier]={value:e.operatingCarrier,display:e.operatingCarrierName,selected:!1}})),e.inboundFlights&&e.inboundFlights.forEach((function(e){t[e.operatingCarrier]={value:e.operatingCarrier,display:e.operatingCarrierName,selected:!1}}))})),Object.values(t)},i.prototype.updateLowestPrice=function(e){return null},i.prototype.selectGroupedFlight=function(t,r){return y(this,void 0,void 0,(function(){var i,n,o,a=this;return v(this,(function(s){switch(s.label){case 0:return[4,this.basketService.getDefaultBasket()];case 1:return i=s.sent(),(n=null==i?void 0:i.subject.value)&&this.originalUserSearch.chosenSearchType===e.FlightSearchType.oneWay&&r===e.FlightDirectionEnum.Outbound?(this.doBooking(i,t,{outboundFlights:t.outboundFlights.map((function(e,t){return a.makeSchemaFlights(e,"outbound",0,t)})),inboundFlights:[],journeyType:"single"},t.outboundFlights[0].dateTimeDeparting),[2]):(n&&this.originalUserSearch.chosenSearchType===e.FlightSearchType.return&&r===e.FlightDirectionEnum.Outbound&&(t.selected?(this.results.next(this.fullResults),this.selectedGroupFlight=null):(this.selectedGroupFlight=t,o=this.flightsToGroup[t.uid],this.results.next(this.fullResults.filter((function(e,t){return o.includes(t)})))),t.selected=!t.selected),n&&this.originalUserSearch.chosenSearchType===e.FlightSearchType.return&&r===e.FlightDirectionEnum.Inbound&&this.selectedGroupFlight&&(this.doBooking(i,t,{outboundFlights:C(t.outboundFlights.map((function(e,t){return a.makeSchemaFlights(e,"outbound",0,t)}))),inboundFlights:C(t.inboundFlights.map((function(e,t){return a.makeSchemaFlights(e,"inbound",0,t)}))),journeyType:"roundtrip"},t.outboundFlights[0].dateTimeDepartingUTC,t.inboundFlights[0].dateTimeDepartingUTC),this.selectedGroupFlight.selected=!1,this.results.next(this.fullResults)),[2])}}))}))},i.prototype.doBooking=function(e,t,r,i,n){var o=t.sourceId,a=t.co2PerItem,s=t.co2PerPassenger,u=t.total,c={adults:this.adults,basket:e.id,children:this.children,co2PerItem:a,co2PerPassenger:s,currency:u.currency,detail:r,price:u.price,searchQuery:this.resultQuery,service:o.toString(),outboundDate:i};n&&(c.inboundDate=n),this.basketService.addToBasket(c,e,this.searchService,this.travellers)},i.prototype.makeSchemaFlights=function(e,t,r,i){return{cabinClass:e.cabinClass,dateTimeArriving:e.dateTimeArriving,dateTimeArrivingUTC:e.dateTimeArrivingUTC,dateTimeDeparting:e.dateTimeDeparting,dateTimeDepartingUTC:e.dateTimeDepartingUTC,destinationAirport:e.destinationAirport,journeyInfo:{flightGroup:t,groupIndex:r,segmentIndex:i},marketingCarrier:e.marketingCarrier,marketingFlightNumber:e.marketingFlightNumber,operatingCarrier:e.operatingCarrier,operatingFlightNumber:e.operatingFlightNumber,originAirport:e.originAirport,totalDuration:e.totalDuration}},i.prototype.addFlightJourneysToBasket=function(e){return y(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,l,d=this;return v(this,(function(p){switch(p.label){case 0:return e.unavailable?[2,Promise.resolve(!1)]:[4,this.basketService.getDefaultBasket()];case 1:return t=p.sent(),(null==t?void 0:t.subject.value)?(r=e.sourceId,i=e.co2PerItem,n=e.co2PerPassenger,o=e.total,a=u.default(e.outboundFlights[0].dateTimeDeparting),s=e.inboundFlights.length?u.default(e.inboundFlights[0].dateTimeDeparting):null,c={outboundFlights:C(e.outboundFlights.map((function(e,t){return d.makeSchemaFlights(e,"outbound",0,t)}))),inboundFlights:C(e.inboundFlights.map((function(e,t){return d.makeSchemaFlights(e,"inbound",0,t)}))),journeyType:"single"},l={adults:this.adults,basket:t.id,children:this.children,co2PerItem:i,co2PerPassenger:n,currency:o.currency,detail:c,price:o.price,searchQuery:this.resultQuery,service:r.toString(),outboundDate:a.format()},s&&(l.inboundDate=s.format(),c.journeyType="roundtrip"),[2,this.basketService.addToBasket(l,t,this.searchService,this.travellers)]):[2,Promise.resolve(!1)]}}))}))},i}(l);we.STORAGE_SESSION_PARAMS="search_flight",we.STORAGE_SESSION_RESULTS="results_flight";var xe=function(e,t){this.key=e,this.value=t,this.next=null,this.pre=null},Ue=function(){function e(e){void 0===e&&(e=10),this.size=e,this.cache={},this.count=0,this.head=new xe("",null);var t=new xe("",null);this.head.next=t,t.pre=this.head}return e.prototype.get=function(e){return this.cache[e]?this.cache[e].value:null},e.prototype.set=function(e,t){var r=this.cache[e];r?(r.value=t,this.deleteItem(r),this.addToHead(r)):(this.cache[e]=new xe(e,t),this.addToHead(this.cache[e]))},e.prototype.hasKey=function(e){return this.cache.hasOwnProperty(e)},e.prototype.deleteItem=function(e){e.pre.next=e.next,e.next.pre=e.pre},e.prototype.addToHead=function(e){e.next=this.head.next,e.next.pre=e,e.pre=this.head,this.head.next=e},e}();function Ve(){return function(e,t,r){var i=new Ue,n=r.value;r.value=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=JSON.stringify(e);return i.hasKey(r)||i.set(r,n.apply(this,e)),i.get(r)}}}var He,Ge=function(){function t(){}return t.prototype.minToHour=function(e){return Math.floor(e/60)+"h "+e%60+"m"},t.prototype.makeColonTime=function(e){return e.substring(0,2)+":"+e.substring(2,4)},t.prototype.nonNullMin=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce((function(t,r){return r&&r[e]&&t.min>Number(r[e])?{item:r,min:Number(r[e])}:t}),{min:Number.MAX_SAFE_INTEGER,item:null}).item},t.prototype.joinByComma=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return s.default.isEmpty(t)&&(e+=t+","),e}),"").slice(0,-1)},t.prototype.mutuallyInclude=function(e,t){try{return e.includes(t)||t.includes(e)}catch(e){return console.warn("Trying to mutually compare undefined variable."),!1}},t.prototype.findByKey=function(e,t,r){return e.filter((function(e){return e[t]===r})).pop()},t.prototype.dateToNgDate=function(e){return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}},t.prototype.convertToYYMMDD=function(e){return e.length>6?this.formatDate(this.yyyymmddTimeToMoment(e)):e},t.prototype.formatDateToMMDDYYY=function(e){return u.default(e).format(t.MMDDYY_DATE)},t.prototype.formatDate=function(e){return(e=u.default(e)).format(t.DATE_FORMAT)},t.prototype.formatTime=function(e){try{return e.format(t.TIME_FORMAT)}catch(e){console.error(e)}},t.prototype.formatTimeColon=function(e){return(e=u.default(e)).format(t.TIME_FORMAT_COLON)},t.prototype.formatIsoDate=function(e){return(e=u.default(e)).format(t.ISO_DATA_FORMAT)},t.prototype.formatIsoDateTime=function(e){return(e=u.default(e)).format(t.ISO_DATA_FORMAT_TIME)},t.prototype.formatIsoDateNoHyphans=function(e){return(e=u.default(e)).format(t.ISO_DATA_FORMAT_NO_HYPHANS)},t.prototype.generateTimesList=function(e,t,r){void 0===e&&(e=0),void 0===t&&(t=24),void 0===r&&(r=15);for(var i=[],n=0;n<t-e;n++)for(var o=0;o<60;o+=r)i.push(u.default({hour:n,minute:o}).format("HH:mm"));return i},t.prototype.momentToNgDate=function(e){return e=u.default(e),this.dateToNgDate(e.toDate())},t.prototype.ngDateToDate=function(e){return new Date(e.year,e.month-1,e.day)},t.prototype.ngDateToMoment=function(e,t){var r=u.default(this.ngDateToDate(e));if(t){var i=t.split(":");2===i.length?r.set("hours",Number(i[0])).set("minutes",Number(i[1])):r.set("hours",Number(t.substr(0,2))).set("minutes",Number(t.substr(2,2)))}return r},t.prototype.todayToNgbDateStruct=function(){var e=u.default();return{year:e.year(),month:e.month()+1,day:e.date()}},t.prototype.objectToArray=function(e){return Object.keys(e).map((function(t){return e[t]}))},t.prototype.yyyymmddToDate=function(e){return new Date(Number(e.substring(0,4)),Number(e.substring(4,6))-1,Number(e.substring(6,8)))},t.prototype.yyyymmddToMoment=function(e){return u.default(this.yyyymmddToDate(e))},t.prototype.yymmddToMoment=function(e){return u.default(e,"YYMMDD")},t.prototype.yymmddToNgbDate=function(e){return this.momentToNgDate(this.yymmddToMoment(e))},t.prototype.yymmdd_hhmmToMoment=function(e,t){return u.default(e+" "+t,"YYMMDD HHmm")},t.prototype.yyyymmdd_hhmmToMoment=function(e,t){return u.default(e+" "+t,"YYYYMMDD HHmm")},t.prototype.yyyymmddToNgDate=function(e){return this.dateToNgDate(this.yyyymmddToDate(e))},t.prototype.yyyymmddTimeToNgDate=function(e,t){var r=this.yyyymmddToMoment(e).add(Number(t.substring(0,2)),"hours").add(Number(t.substring(2,4)),"minutes");return this.momentToNgDate(r)},t.prototype.yyyymmddTimeToMoment=function(e){return 6===e.length?u.default(""+e,"YYMMDD"):u.default(""+e,"YYYYMMDD")},t.prototype.hhmmToTime=function(e){return e.substring(0,2)+":"+e.substring(2,4)},t.prototype.dateStringToyyyymmdd=function(e){if("string"!=typeof e)return null;var t=/(\d{4})[-\/]?(\d{2})[-\/]?(\d{2})/.exec(e);return t?""+t[1]+t[2]+t[3]:null},t.prototype.timeStringTohh_mm=function(e){if("string"!=typeof e)return null;var t=/(\d{2})[:-]?(\d{2})/.exec(e);return t?t[1]+":"+t[2]:null},t.prototype.stringToBool=function(e){return e&&"false"!==e&&"0"!==e&&"no"!==e&&"n"!==e},t.prototype.clone=function(e){return s.default.cloneDeep(e)},t.prototype.replaceKeysInText=function(e,t){return Object.keys(t).reduce((function(e,r){return e.replace("%"+r,t[r])}),e)},t.prototype.getNextMinuets=function(e,t){return void 0===e&&(e=u.default()),void 0===t&&(t=15),e.minute(Math.ceil(e.minute()/t)*t),e.format("HH:mm")},t.prototype.getNumberOnceValue=function(e){var t=this.guid();return t+"_"+hex_hmac_md5(e,t)},t.prototype.guid=function(){for(var e="",t=0;t<32;t++)e+=this.s4();return e},t.prototype.s4=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},t.prototype.capitaliseFirstLetter=function(e){return e.length>0?e[0].toUpperCase()+e.slice(1).toLowerCase():""},t.prototype.fromObject=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.shift(),i=0;r&&i<e.length;i+=1)r=r[e[i]];return r},t.prototype.momentRoundMinutes=function(e,t){var r=(e=u.default(e).startOf("minutes")).minutes()%t;return 0!==r&&(r=t-r),e.add(r,"minute")},t.prototype.round=function(e,t){return u.default(Math.ceil(+e/+t)*+t)},t.prototype.icsFold=function(e){return e.split(/\r\n/g).map((function(e){var t="";for(e=e.trim();e.length>72;)t+=e.slice(0,72)+"\r\n",e=" "+e.slice(72).trim();return e.trim()&&(t+=e),t})).join("\r\n")},t.prototype.splitAddressLine=function(e,t){var r={line:e.replace(/\s+/g," ").trim(),residue:""};if(r.line.length>t){var i=r.line.slice(0,t).lastIndexOf(",");i>0?(r.residue=r.line.slice(i+1).trim(),r.line=r.line.slice(0,i).trim()):(i=r.line.slice(0,t).lastIndexOf(" "))>0?(r.residue=r.line.slice(i+1).trim(),r.line=r.line.slice(0,i)):(r.residue=r.line.slice(t),r.line=r.line.slice(0,t))}return r},t.prototype.daysBetween=function(e,t){return t.diff(e,"days")},t.prototype.mapPromise=function(e,t,r){for(var i=e[Symbol.iterator](),n=[],o=[],a=0,s=function(){var e=i.next();if(!e.done){var r=a++;return Promise.resolve(t(e.value,r)).then((function(e){return n[r]=e,s()}))}};!r||o.length<=r;){var u=s();if(!u)break;o.push(u)}return Promise.all(o).then((function(){return n}))},t.prototype.mapSeriesPromise=function(e,t){return this.mapPromise(e,t,1)},t.prototype.obj2queryString=function(e){return s.default.reduce(e,(function(e,t,r){return""!==e&&(e+="&"),""+e+encodeURIComponent(r)+"="+encodeURIComponent(t)}),"")},t.prototype.stripPunctuation=function(e){return e.replace(/[^a-zA-Z0-9\s]/g,"")},t.prototype.replaceAll=function(e,t,r){return e?e.replace(new RegExp(t,"g"),r):null},t.prototype.dateTime=function(e,t){var r=e.match(/.{1,2}/g),i=t.match(/.{1,2}/g);return"20"+r[0]+"-"+r[1]+"-"+r[2]+"T"+i[0]+":"+i[1]+":00"},t.prototype.alternateJSONStringify=function(e){var t=JSON.stringify(e);return t=t.replace(/"/g,"`")},t.prototype.ConvertObjectToArray=function(e){var t=s.default.values(e);return t=s.default.flatten(t)},t.prototype.addDay=function(e){var t=new Date(e.year,e.month-1,e.day+1);return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}},t.prototype.hashCode=function(e){for(var t=0,r=0;r<e.length;r+=1){t=(t<<5)-t+e.charCodeAt(r),t&=t}return t.toString()},t.prototype.MMddyyToNgb=function(e){return this.momentToNgDate(u.default(e,t.MMDDYY_DATE))},t.prototype.selectedChildrenTravellers=function(e,t){switch(t){case Z.Hotel:case Z.Cab:return[]}return e.filter((function(e){return e.isChild}))},t.prototype.selectedTravellers=function(e,t){switch(t){case Z.Hotel:case Z.Cab:return{adults:e,children:[],infants:[]};default:return e.reduce((function(e,t){return t.isChild?t.isInfant?e.infants.push(t):e.children.push(t):e.adults.push(t),e}),{adults:[],children:[],infants:[]})}},t.prototype.selectedAdultTravellers=function(e,t){switch(t){case Z.Hotel:case Z.Cab:return e}return e.filter((function(e){return!e.isChild&&!e.isInfant}))},t.prototype._isChild=function(e,r){return e instanceof Date?u.default().add(-r,"years").isBefore(u.default(e,t.ISO_DATA_FORMAT),"day"):e.isChild},t.prototype.isChildFlight=function(e){return this._isChild(e,16)},t.prototype.isChildRail=function(e){return this._isChild(e,12)},t.prototype.isChildEurostar=function(e){return this._isChild(e,12)},t.prototype.uniqBy=function(e,t){return s.default.uniqBy(e,t)},t.prototype.isChild=function(e,t){switch(t){case Z.Flight:return this._isChild(e,16);case Z.Rail:return this._isChild(e,12);case Z.Coach:return this._isChild(e,15);case Z.Lounge:return this._isChild(e,12);case Z.Hotel:case Z.Cab:default:return!1}},t.prototype.isInfant=function(e,t){switch(t){case Z.Flight:case Z.Rail:case Z.Coach:case Z.Lounge:return this._isChild(e,0);case Z.Hotel:case Z.Cab:default:return!1}},t.prototype.getAgeType=function(e,t){return this.isChild(e,t)?"C":"A"},t.prototype.getMaxChildAge=function(e){switch(e){case Z.Flight:return u.default().add(-15,"years").format(t.MMDDYY_DATE);case Z.Rail:return u.default().add(-11,"years").format(t.MMDDYY_DATE);case Z.Coach:return u.default().add(-14,"years").format(t.MMDDYY_DATE);case Z.Lounge:return u.default().add(-11,"years").format(t.MMDDYY_DATE)}},t.prototype.getDefaultAdultAge=function(e){switch(e){case Z.Flight:return u.default().add(-26,"years").format(t.MMDDYY_DATE);case Z.Rail:return u.default().add(-22,"years").format(t.MMDDYY_DATE);case Z.Coach:return u.default().add(-25,"years").format(t.MMDDYY_DATE);case Z.Lounge:return u.default().add(-22,"years").format(t.MMDDYY_DATE);case Z.Hotel:case Z.Cab:return u.default().add(-18,"years").format(t.MMDDYY_DATE)}return u.default().add(-18,"years").format(t.MMDDYY_DATE)},t.prototype.transform=function(e,t,r){return s.default.transform(e,t,r)},t.prototype.arrayToObject=function(e,t){return e.filter((function(e){return!!e})).reduce((function(e,r){if(r&&r[t])return e[r[t]]=r,e}),{})},t.prototype.arrayToObjectArray=function(e,t){return e.filter((function(e){return!!e})).reduce((function(e,r){if(r&&r[t])return e[r[t]]=e[r[t]]||[],e[r[t]].push(r),e}),{})},t.prototype.getTerminals=function(e){return e.terminals},t.prototype.fieldFromObject=function(e,t){return(t||"").split(".").reduce((function(e,t){return e&&e[t]?e[t]:""}),e)},t.prototype.mapFieldFromObject=function(e){return function(t){return t[e]}},t.prototype.removeNulls=function(e){return Object.keys(e).reduce((function(t,r){var i=e[r],n=Array.isArray(i)?i.filter((function(e){return!!e}))||null:i;return(null!=n&&"null"!==n||Array.isArray(n)&&n.length>0)&&(t[r]=n),t}),{})},t.prototype.getTravellersId=function(e){if(e)return e.reduce((function(e,t,r){return 0===r?[t.id]:C(e,[t.id])}),[])},t.prototype.sanitizeMomentDates=function(e,t){var r,i;void 0===t&&(t=!1);var n=Object.assign({},e);try{for(var o=b(Object.entries(n)),a=o.next();!a.done;a=o.next()){var s=S(a.value,2),c=s[0],l=s[1];u.default.isMoment(l)&&(n[c]=n[c].toISOString())}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return t&&(console.log("-- sanitizeMomentDates() called --"),console.log("original query: ",e),console.log("sanitized query: ",n)),n},t.prototype.toStrings=function(e,t){var r=this;return Object.entries(t.properties||{}).reduce((function(i,n){var o=S(n,2),a=o[0],s=o[1],u=r._formatValue(e[a],s,(t.required||[]).includes(a));return null!==u&&(i[a]=u),i}),{})},t.prototype._formatValue=function(e,t,r){switch(t.type){case"integer":var i=Number.parseInt(e,10);return Number.isNaN(i)?r?0:null:i;case"string":var n=e?e.toString():null;return n&&n.length>0?n:r?"":null;case"object":return e?this.toStrings(e,t):r?{}:null;case"array":default:return e}},t.prototype.makeTimeWindow=function(e,t,r){var i=e.clone().add(t,"hour"),n=e.clone().add(r,"hour");return this.formatTime(i)+"-"+this.formatTime(n)},t.prototype.inRange=function(e,t){return e>=t.min&&e<=t.max},t.prototype.makeUsers=function(e){return e.map((function(e){return{id:e.id,passengerType:e.isChild?G.Child:e.isInfant?G.Infant:G.Adult}}))},t.prototype.makeMomentDayTime=function(e,t,r){var i=u.default();return void 0!==e&&i.add(e,"day"),void 0!==t&&i.set("hours",t),void 0!==r&&i.set("minutes",r),i},t.prototype.sanatizeReturns=function(e,t,r){var i=Object.assign({},e,t);return(r||[]).reduce((function(e,t){var r=e[t];return e[t]=r?"string"==typeof r?u.default(r):r:u.default(),e}),i)},t.prototype.miIsValid=function(e){return 0===e.length||!!e.find((function(e){return e.isValid()}))},t.prototype.isMiValid=function(e,t){var r=this,i=Object.values(t||{});return this.miIsValid(e)&&(0===i.length||!!i.find((function(e){return r.miIsValid(e.managementInfo)})))},t.prototype.needsMi=function(e,t){var r=this;return e.basketInfoMiDetails.length>0&&(t||!e.basketInfoMiDetails.find((function(e){return r.isMiValid(e.miPerItem,e.miPerUser)})))},t.prototype.findService=function(e,t){return Object.values(e).reduce((function(e,r){return e||r.find((function(e){return e.id===t}))}),null)},t.prototype.allTrue=function(e,t){return e.filter(t).length===e.length},t.prototype.joinFromAttribute=function(e,t,r){return r.map((function(e){return e[t]})).join(e)},t.prototype.splitUpArray=function(e,t,r){void 0===r&&(r=!0);var i=s.default.cloneDeep(e),n=[];if(i.length>t){for(;i.length>=t;)n.push(i.splice(0,t));i.length&&r&&n.push(i)}else n=i;return n},t.prototype.getTimeDifference=function(e,t){return u.default(e).diff(u.default(t),"minutes")},t.prototype.dayDifference=function(e,t){var r=u.default(t).startOf("day").diff(u.default(e).startOf("day"),"day");return r>0?r.toString():""},t.prototype.makeFareRules=function(t,r){var i=r===e.FlightDirectionEnum.Outbound?t.outboundFlights:t.inboundFlights;return{rules:i.reduce((function(e,t){var r,i,n,o,a;return e.cancellation=e.cancellation.concat((null===(r=t.fareConditions)||void 0===r?void 0:r.cancellation)||[]),e.change=e.change.concat((null===(i=t.fareConditions)||void 0===i?void 0:i.change)||[]),e.noShow=e.noShow.concat((null===(n=t.fareConditions)||void 0===n?void 0:n.noShow)||[]),e.upgrade=e.upgrade.concat((null===(o=t.fareConditions)||void 0===o?void 0:o.upgrade)||[]),e.other=e.other.concat((null===(a=t.fareConditions)||void 0===a?void 0:a.other)||[]),e}),{cancellation:[],change:[],noShow:[],upgrade:[],other:[]}),flights:i}},t.prototype.generateIcsFileContents=function(e){return["BEGIN:VCALENDAR\r\n","PRODID:-//Micros Travel//SABS Corporate - MMXIII//EN\r\n","VERSION:2.0\r\n","METHOD:REQUEST\r\n",this.generateIcsFileBodyContent(e),"END:VCALENDAR\r\n"].join("")},t.prototype.generateIcsFileBodyContent=function(e){var t=[];return e.map((function(e,r){var i={dStart:"",dEnd:"",locationFrom:"",locationTo:"",basketId:"",description:"",serviceType:"",summary:""};switch(e.service.type){case Z.Lounge:var n=e.adults,o=e.children,a=e.bookingThirdPartyReference,s=e.detail,c=e.service;i.basketId=e.id,i.dStart=null==s?void 0:s.arrivalDatetime,i.dEnd="",i.summary="Airport Lounge - "+s.name,i.serviceType=c.type.toLowerCase(),i.description=["Lounge: "+s.name+"\r\n","Starts: "+s.arrivalDatetime+"\r\n","Adults: "+n+"\r\n","Children: "+o+"\r\n","Booking Ref: "+a].join("");break;case Z.Cab:case Z.Car:case Z.Coach:case Z.FastTrack:case Z.Flight:case Z.Hotel:case Z.InternationalRail:case Z.Parking:case Z.Rail:}t.push(["BEGIN:VEVENT\r\n",i.dStart?"DTSTART:"+u.default(i.dStart).format("YYYYMMDDTHHmmss")+"\r\n":"",i.dEnd?"DTEND:"+u.default(i.dEnd).format("YYYYMMDDTHHmmss")+"\r\n":"",'ORGANIZER;CN="Do not reply to this email":mailto:do_not_reply@sabscorp.com\r\n',i.locationTo&&i.locationFrom?"LOCATION: "+i.locationTo+" to "+i.locationFrom+" \r\n":"","TRANSP:OPAQUE\r\n","SEQUENCE:0\r\n","UID:"+i.serviceType+"_"+r+"_"+i.basketId+"@sabscorp.com\r\n","DTSTAMP:"+u.default().format("YYYYMMDDTHHmmss")+"\r\n","DESCRIPTION:"+i.description+"\r\n","SUMMARY:"+i.summary+"\r\n","END:VEVENT\r\n"].join(""))})),t.join("")},t.prototype.downloadIcs=function(e,t){var r=document.createElement("a");r.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),r.setAttribute("download",e),r.setAttribute("target","_blank"),r.style.display="none",r.click()},t.prototype.splitStringOnCapitals=function(e,t){void 0===t&&(t=!1);var r=e.split(/(?=[A-Z])/);return t?r.join(" "):r},t}();Ge.READ_DATE_FORMAT="dd, D MMM YYYY",Ge.READ_TIME_FORMAT="HH:mm",Ge.DATE_FORMAT="YYMMDD",Ge.ISO_DATA_FORMAT="YYYY-MM-DD",Ge.ISO_DATA_FORMAT_TIME="YYYY-MM-DD HH:mm",Ge.ISO_DATA_FORMAT_NO_HYPHANS="YYYYMMDD",Ge.TIME_FORMAT="HHmm",Ge.TIME_FORMAT_COLON="HH:mm",Ge.MMDDYY_DATE="DDMMYYYY",f([Ve(),g("design:type",Function),g("design:paramtypes",[String,String]),g("design:returntype",Number)],Ge.prototype,"getTimeDifference",null),f([Ve(),g("design:type",Function),g("design:paramtypes",[String,String]),g("design:returntype",String)],Ge.prototype,"dayDifference",null),f([Ve(),g("design:type",Function),g("design:paramtypes",[Object,Number]),g("design:returntype",void 0)],Ge.prototype,"makeFareRules",null),(He=e.URLS||(e.URLS={})).AccessToken="accessToken",He.LOGOUT_URL="logout",He.Refresh="refreshToken",He.CONFERMA_THUMBNAIL_URL="https://ssl.conferma.com/Images/PropertyThumbnails/",He.CONFIRMA_PHOTO_URL="/confermainfo/Info.aspx?mode=media&key=MICROSSABS&id=",He.CONFIRMA_INFO_URL="/confermainfo/Info.aspx?mode=hotel&key=MICROSSABS&id=",He.RECOVER_PASSWORD_URL="password/getResetToken",He.RESET_PASSWORD="password/resetByToken";var Ye,Qe,We=function(){this.priceRange={min:0,max:0},this.distanceRange={min:0,max:0},this.chain=[],this.amenitytype=[],this.preferred=[],this.extra=[],this.hotelName="",this.breakfastType=[]};(Ye=e.HotelView||(e.HotelView={})).LIST="list",Ye.MAP="map",(Qe=e.SortTypesHotel||(e.SortTypesHotel={})).distance="distance",Qe.name="name",Qe.price="price";var Ke=function(i){function n(r,o,a,s,c,l,d,p,h,m,f){var g=i.call(this,d,(function(e){return g.results_details.maxDistance=0,g.results_details.chains=new Set,e.map((function(e,t){return g.results_details.maxDistance=Math.max(g.results_details.maxDistance,e.location.distance),g.filters.distanceRange.max=g.results_details.maxDistance,g.results_details.chains.add(e.group),t<g.environment.numberHotelToPreload&&g.avaliabilityService.getAvailabilityForId(g.makeHotelAvalilityObject(e)),Object.assign({sortedTags:g.sortTags(e.tags),Details:{distance_airport:0,distance_metro:0,distance_rail:0,airport_details:{name:"Not returned"},metro_details:{name:"Not returned"},rail_details:{name:"Not returned"}}},e)}))}))||this;g.hotelFetcher=r,g.helpers=o,g.userService=a,g.environment=s,g.avaliabilityService=c,g.basketService=l,g.searchService=p,g.httpCallService=h,g.quickListFetcher=m,g.getRailStationFetcher=f,g.type=Z.Hotel,g.location_types=new t.BehaviorSubject([]),g.offices=new t.BehaviorSubject([]),g.lastActivePage=new t.BehaviorSubject(null),g.galleries={},g.occupied=0,g.results_details={chains:new Set,amenities:[],maxDistance:0},g.filterChange=new t.Subject,g.selectItemMapView=new t.Subject,g.display={minprice:Number.NEGATIVE_INFINITY,maxprice:Number.POSITIVE_INFINITY,filters:{breakfastType:[]}},g.min_date={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},g.min_return_date={year:u.default().year(),month:u.default().month()+1,day:u.default().date()+1},g.localFilters=new We,g.currentView=e.HotelView.LIST,g._max_no_of_rooms=4,g._max_rooms_array=new Array(g._max_no_of_rooms).fill(0),g._max_no_of_occupants=2,g._max_occupant_array=new Array(g._max_no_of_occupants).fill(0),g._distance_list=[1,2,5,10,20,25],g._default_currency=null,g.resultsSessionName=n.STORAGE_SESSION_RESULTS,g.query={},g.filterResults=function(){g.results.next(g.fullResults.filter((function(e){return g.inPriceRange(e)&&g.inDistanceRange(e)&&g.containsHotelname(e)&&g.hasChain(e)&&g.breakfastTypeFilter(e)})))},g.filterLighteningResults=function(){g.results.next(g.fullResults.filter((function(e){return g.inLighteningPriceRange(e)&&g.containsHotelname(e)&&g.hasChain(e)&&g.hasPreferred(e)&&g.breakfastTypeFilter(e)&&g.getExtraFilter(e)&&g.getAmenitiesFilter(e)})))},g.results_details.chains=new Set;var y=d.getSessionItem(n.STORAGE_SESSION_PARAMS)||{tempParams:{}};g.default_currency=g.tempParams.currency?g.tempParams.currency:g._default_currency,g.updateTempParams(p.makeHotelQuery(y.tempParams)),p.shouldAddTravellerSubscription()&&p.travellerInformation.subscribe((function(e){g.travellers=e;var t=g.helpers.selectedTravellers(e,Z.Hotel);g.tempParams.no_of_occupants=t.adults.length,g.travellers=e,g._isValid()}));var v=d.getSessionItemAsList(g.resultsSessionName)||[];return v.slice(0,g.environment.numberHotelToPreload).forEach((function(e){g.avaliabilityService.getAvailabilityForId(g.makeHotelAvalilityObject(e))})),v.forEach((function(e){g.results_details.chains.add(e.group)})),g.fullResults=v,g.results.next(v),g._isValid(),g.userService.changeUser.subscribe((function(t){g.location_types.next([e.LocationTypes.Airport,e.LocationTypes.City,e.LocationTypes.Office,e.LocationTypes.Shortlist,e.LocationTypes.TrainStation]),p.shouldFetchAllOffices()&&g.offices.next([])})),g.localFilters=new We,g.avaliabilityService.fetching.subscribe((function(e){if(!e){var t=g.avaliabilityService.maxPriceForCurrency("GBP");t>0&&(g.filters.priceRange.max=t,g.localFilters.priceRange.max=t),g._cheapestResultPrice=g.updateLowestPrice(v)}})),g}return m(n,i),Object.defineProperty(n.prototype,"chains",{get:function(){return C(this.results_details.chains)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"amenities",{get:function(){return C(this.results_details.amenities)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxDistance",{get:function(){return this.filters.distanceRange.max=Math.ceil(Math.max.apply(Math,this.results.value.map((function(e){return e.location.distance})))),this.results_details.maxDistance=this.filters.distanceRange.max,this.results_details.maxDistance},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxPrice",{get:function(){return Math.ceil(this.filters.priceRange.max)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currency",{get:function(){return this.tempParams.currency},set:function(e){this.tempParams.currency=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"checkin_date_ngb",{get:function(){return this._checkin_date_ngb},set:function(e){this._checkin_date_ngb=e,this.tempParams.checkin_date=this.helpers.ngDateToMoment(e),this.checkin_date=this.helpers.ngDateToMoment(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"checkout_date_ngb",{get:function(){return this._checkout_date_ngb},set:function(e){this._checkout_date_ngb=e,this.tempParams.checkout_date=this.helpers.ngDateToMoment(e),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"checkin_date",{get:function(){return this.tempParams.checkin_date},set:function(e){e&&e.isValid()&&(this.tempParams.checkin_date=u.default(e),this._checkin_date_ngb=this.helpers.momentToNgDate(e),e.isSameOrBefore(this.tempParams.checkout_date)&&(this.checkout_date=u.default(e).add(1,"day")),this._isValid())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"checkout_date",{get:function(){return this.tempParams.checkout_date},set:function(e){e&&e.isValid()&&(this.tempParams.checkout_date=e,this.checkout_date_ngb=this.helpers.momentToNgDate(e),this._isValid())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"no_of_rooms",{get:function(){return this.tempParams.no_of_rooms},set:function(e){e>4||e<1||(this.tempParams.no_of_rooms=e,this._isValid())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"no_of_occupants",{get:function(){return this.tempParams.no_of_occupants},set:function(e){e<1||e>3||(this.tempParams.no_of_occupants=e,this._isValid())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"default_currency",{get:function(){return this.tempParams.currency},set:function(e){this.tempParams.currency=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"location",{get:function(){return this.tempParams.location},set:function(e){this.tempParams.location=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"formatted_location",{get:function(){return this.tempParams.location?this.tempParams.location.destination:"No Location Set"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"distance",{get:function(){return this.tempParams.distance},set:function(e){this.tempParams.distance=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prefered_hotels_only",{get:function(){return this.tempParams.prefered_hotels_only},set:function(e){this.tempParams.prefered_hotels_only=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"country",{get:function(){return this.tempParams.country},set:function(e){this.tempParams.country=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"postcode",{get:function(){return this.tempParams.postcode},set:function(e){this.tempParams.postcode=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trainsStation",{get:function(){return this.tempParams.trainsStation},set:function(e){this.tempParams.trainsStation=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"office",{get:function(){return this.tempParams.office},set:function(e){this.tempParams.office=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hotel_name",{get:function(){return this.tempParams.hotel_name},set:function(e){this.tempParams.hotel_name=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hotel_chain",{get:function(){return this.tempParams.hotel_chain},set:function(e){this.tempParams.hotel_chain=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"max_rooms_array",{get:function(){return this._max_rooms_array},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"max_occupant_array",{get:function(){return this._max_occupant_array},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"distance_list",{get:function(){return this._distance_list},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"location_type_select",{get:function(){return this.tempParams.location_type_select},set:function(e){this.tempParams.location_type_select=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"filters",{get:function(){return this.localFilters},enumerable:!1,configurable:!0}),n.prototype.makeLocations=function(e){return this.helpers.arrayToObjectArray(e,"distanceType")},n.prototype.sortTags=function(e){var t=this;return e?C(e).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return Object.assign(Object.assign({},e),{icon:t.environment.tagMap[e.name]||e.icon})})):[]},n.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeHotelQuery()),this.localFilters=new We,this.results_details={chains:new Set,amenities:[],maxDistance:0},this._isValid()},n.prototype._isValid=function(){var t,r,i,o,a;if(this.doChecks){switch(this.storageService.setSessionItem(n.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams}),this.min_return_date=this.helpers.momentToNgDate(this.tempParams.checkin_date),this.tempParams.checkin_date.isSameOrAfter(this.tempParams.checkout_date)&&(this.checkout_date=u.default(this.tempParams.checkin_date).add(1,"day")),this.validationMessages=[],this.tempParams.location_type_select){case e.LocationTypes.City:this.country||this.validationMessages.push("Please select country"),this.location||this.postcode||this.validationMessages.push("Please select a hotel location or enter a postcode.");break;case e.LocationTypes.Office:(null===(t=this.tempParams.location)||void 0===t?void 0:t.office)||this.validationMessages.push("Please select an office.");break;case e.LocationTypes.Airport:if(null===(r=this.tempParams)||void 0===r?void 0:r.location){(null===(i=this.tempParams.location.airport)||void 0===i?void 0:i.gateway)||this.validationMessages.push("Please select a airport.");break}this.validationMessages.push("Please select a airport.");break;case e.LocationTypes.TrainStation:if(null===(o=this.tempParams)||void 0===o?void 0:o.location){(null===(a=this.tempParams.location.railstation)||void 0===a?void 0:a.stationCode)||this.validationMessages.push("Please select a train station.");break}this.validationMessages.push("Please select a train station.");break;case e.LocationTypes.Shortlist:this.country||this.validationMessages.push("Please select country")}this.checkout_date&&this.checkout_date.isSameOrBefore(this.checkin_date)&&this.validationMessages.push("Checkout date must be after checkin date"),this.checkout_date&&this.checkout_date.isBefore(u.default())&&this.validationMessages.push("Checkout date must not be in the past"),this.checkin_date&&this.checkin_date.isBefore(u.default())&&this.validationMessages.push("Checkin date must not be in the past"),this.checkout_date&&this.checkin_date&&this.checkin_date.isAfter(this.checkout_date)&&this.validationMessages.push("Checkout data must be after the checkin date");var s=this.no_of_occupants/this.no_of_rooms;1!==s&&2!==s&&this.validationMessages.push("Occupants per room must be 1 or 2, if you have an odd number of travellers (greater than one), the no of rooms must be equal"),console.log(this.validationMessages),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages)}},n.prototype.startSearch=function(){if(this.results.next([]),this.avaliabilityService.reset(),this.isValid.value){this.buildQuery();var t=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(this.getSearchQuery())),this._startSearch(this.tempParams.location_type_select===e.LocationTypes.Shortlist?this.quickListFetcher.fetchList({countryCode:this.country.cCode}):this.hotelFetcher.fetchList(t))}return Promise.resolve(!1)},n.prototype.getRecentSearchQuery=function(e){var t;return(null===(t=this.location)||void 0===t?void 0:t.name)&&(e.cityName=this.location.name),{serviceType:Z.Hotel,searchArgs:e,travelDate:this.checkin_date.format(),travellers:this.helpers.getTravellersId(this.travellers)}},n.prototype.startRecentSearch=function(t){var i=this;this.currency=t.searchArgs.currency,this.distance=t.searchArgs.distance,this.no_of_rooms=t.searchArgs.rooms,this.checkin_date=u.default(t.searchArgs.startDate),this.checkout_date=u.default(t.searchArgs.endDate),this.hotel_name=t.searchArgs.hotelName,t.searchArgs.groupName&&(this.hotel_chain={name:t.searchArgs.groupName}),t.searchArgs.iata?(this.location_type_select=e.LocationTypes.Airport,this.searchService.getAirportByCode(t.searchArgs.iata).subscribe((function(e){var t={airport:{gateway:e.iataMatch.iata}};i.location=Object.assign(Object.assign({},t),e.iataMatch),i.searchService.startSearches()}))):t.searchArgs.latitude&&t.searchArgs.longitude||t.searchArgs.postOrZipCode?(this.location_type_select=e.LocationTypes.City,this.country={cCode:t.searchArgs.countryCode,cName:""},t.searchArgs.latitude&&t.searchArgs.longitude?this.location={name:t.searchArgs.cityName,latitude:t.searchArgs.latitude,longitude:t.searchArgs.longitude}:t.searchArgs.postOrZipCode&&(this.postcode={name:t.searchArgs.postOrZipCode,type:e.LocationTypes.Postcode}),this.searchService.startSearches()):t.searchArgs.officeId?(this.location_type_select=e.LocationTypes.Office,this.searchService.getOfficeNames(this.isLoading).pipe(r.take(1)).subscribe((function(e){if(e){var r=e.find((function(e){return e.id===t.searchArgs.officeId}));i.office={id:t.searchArgs.officeId,name:r.name},i.searchService.startSearches()}}))):t.searchArgs.trainStationCode?(this.location_type_select=e.LocationTypes.TrainStation,this.getRailStationByCode(t.searchArgs.trainStationCode).subscribe((function(e){i.trainsStation=e,i.searchService.startSearches()}))):(this.location_type_select=e.LocationTypes.Shortlist,this.country={cCode:t.searchArgs.countryCode,cName:""},this.searchService.startSearches())},n.prototype.getRailStationByCode=function(e){return e?this.getRailStationFetcher.fetchList({id:null,code:e}).pipe(r.take(1)):t.of()},n.prototype.getSearchQuery=function(){return this.buildQuery(),this.helpers.removeNulls(this.query)},n.prototype.buildQuery=function(){var t,r,i={startDate:this.tempParams.checkin_date.format("YYYY-MM-DD"),endDate:this.tempParams.checkout_date.format("YYYY-MM-DD"),rooms:this.tempParams.no_of_rooms,adults:this.tempParams.no_of_occupants,currency:this.tempParams.currency?this.tempParams.currency:null,distance:this.tempParams.distance,distanceType:M.M,maxResults:100};switch(this.getRoomNumber(),console.log(this.location),this.tempParams.location_type_select){case e.LocationTypes.Airport:i.iata=this.tempParams.location.airport.gateway;break;case e.LocationTypes.City:i.countryCode=this.country.cCode,this.location?(i.latitude=this.location.latitude,i.longitude=this.location.longitude):this.postcode&&(i.postOrZipCode=this.postcode.name);break;case e.LocationTypes.TrainStation:i.trainStationCode=this.location.railstation.stationCode;break;case e.LocationTypes.Office:i.officeId=+(null===(t=this.location.office)||void 0===t?void 0:t.id);break;case e.LocationTypes.Shortlist:i.countryCode=this.country.cCode}this.hotel_name&&(i.hotelName=this.tempParams.hotel_name),this.hotel_chain&&(i.groupName=null===(r=this.tempParams.hotel_chain)||void 0===r?void 0:r.name),this.query=i},n.prototype.makeHotelAvalilityObject=function(e){return{hotel:e.id,startDate:this.helpers.formatIsoDate(this.checkin_date),endDate:this.helpers.formatIsoDate(this.checkout_date),rooms:this.no_of_rooms,occupants:this.no_of_occupants,currency:"GBP"}},n.prototype.inPriceRange=function(e){var t=this.avaliabilityService.getAvailabilityValue(e);return!!t&&(this.helpers.inRange(t.maxprice,this.filters.priceRange)&&this.helpers.inRange(t.minprice,this.filters.priceRange))},n.prototype.inDistanceRange=function(e){return 0===this.filters.distanceRange.max||this.helpers.inRange(e.location.distance,this.filters.distanceRange)},n.prototype.containsHotelname=function(e){var t=this.filters.hotelName.toLowerCase();return!(t&&t.length>0)||e.name.toLowerCase().includes(t)},n.prototype.inLighteningPriceRange=function(e){var t=this.avaliabilityService.getAvailabilityValue(e);if(t&&0!==Object.keys(t).length){var r,i=0,n=this.helpers.inRange(t.prpn,this.filters.priceRange);return i=(null==t?void 0:t.maxprice)?t.maxprice:null==t?void 0:t.rooms.reduce((function(e,t){return e>t.total?e:t.total}),0),r=this.helpers.inRange(i,this.filters.priceRange),n&&r}return!0},n.prototype.hasChain=function(e){var t=(this.filters.chain||[]).map((function(e){return e.toLowerCase()}));return!t||!t.length||!!t.find((function(t){return e.group.toLowerCase().includes(t)}))},n.prototype.breakfastTypeFilter=function(t){if(!this.filters.breakfastType.length)return!0;var r=this.avaliabilityService.getAvailabilityForId(this.makeHotelAvalilityObject(t));if(!r&&!r.value)return!1;var i=r.value,n=this.filters.breakfastType.includes(e.SearchHandler.BREAKFAST_INCLUDED),o=this.filters.breakfastType.includes(e.SearchHandler.BREAKFAST_NOT_INCLUDED);return!!i.rooms.filter((function(e){return n&&o?e:n?e.rateDescription.match(Ce)&&!e.rateDescription.match(Te):o?!e.rateDescription.match(Ce)||e.rateDescription.match(Te):void 0})).length},n.prototype.byMostExpensive=function(){this.sortByPrice(!1)},n.prototype.sortByPrice=function(e,t){var r=this;void 0===e&&(e=!0),void 0===t&&(t=!1);var i=this.fullResults,n=[],o=[];i.map((function(e){var t;(null===(t=r.avaliabilityService.getAvailabilityValue(e))||void 0===t?void 0:t.prpn)?n.push(e):o.push(e)})),n.sort((function(t,i){var n,o,a=null===(n=r.avaliabilityService.getAvailabilityValue(t))||void 0===n?void 0:n.prpn,s=null===(o=r.avaliabilityService.getAvailabilityValue(i))||void 0===o?void 0:o.prpn;return e?a>s?1:s>a?-1:0:a<s?1:s<a?-1:0}));var a=C(n,o);this.results.next(a),t&&(console.log("++ sortByPrice() called ++"),console.log("++ hotel ++",i),console.log("++ hotelsWithPrices ++",n),console.log("++ hotelsWithoutPrices ++",o),console.log("++ sortedHotels ++",a))},n.prototype.sortByName=function(){this.results.next(this.results.value.sort((function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())})))},n.prototype.sortByDistance=function(){var e=this.results.value||[];e=e.sort((function(e,t){return Number(e.location.distance)-Number(t.location.distance)})),this.results.next(e)},n.prototype.byPreferred=function(){var e=this,t=this.results.value||[];t=t.sort((function(t,r){return e.preferredToInt(r)-e.preferredToInt(t)})),this.results.next(t)},n.prototype.preferredToInt=function(e){return(e.preferred.client?1:0)+(e.preferred.consumer?2:0)},n.prototype.intToPreferred=function(e){return{client:1==(1&e),consumer:2==(2&e)}},n.prototype.addFilter=function(e,t){this.localFilters[t].push(e)},n.prototype.removeFilter=function(e,t){var r=this.localFilters;Array.isArray(r[t])&&(r[t]=r[t].filter((function(t){return e!==t})))},n.prototype.resetFilters=function(){this.localFilters.chain=[],this.localFilters.amenitytype=[],this.localFilters.preferred=[],this.localFilters.extra=[],this.localFilters.hotelName="",this.localFilters.breakfastType=[]},n.prototype.updateFromPreviousSearches=function(e){var t;null===(t=e[Z.Flight])||void 0===t||t.searchQuery},n.prototype.hasPreferred=function(t){var r=this.filters.preferred;return!(r.length&&!r.includes(e.SearchHandler.ANY))||(r.includes(e.SearchHandler.AGENCY)&&r.includes(e.SearchHandler.CLIENT)?!0===t.preferred.consumer&&!0===t.preferred.client:r.includes(e.SearchHandler.AGENCY)?!0===t.preferred.consumer:r.includes(e.SearchHandler.CLIENT)?!0===t.preferred.client:void 0)},n.prototype.getmaxPriceForCurrency=function(e){return this.avaliabilityService.maxPriceForCurrency(e)},n.prototype.getExtraFilter=function(t){var r=this;return this.filters.extra.includes(e.SearchHandler.AVAILABILITY)?!0===t.unavailable:!this.filters.extra.includes(e.SearchHandler.FEMALE_FRIENDLY)||t.tags.filter((function(t){return!t.name||r.convertToOneString(t.name).toLowerCase().includes(r.convertToOneString(e.SearchHandler.FEMALE_FRIENDLY).toLowerCase())})).length>0},n.prototype.getAmenitiesFilter=function(e){var t=this,r=!0;return this.filters.amenitytype.forEach((function(i){var n=e.tags.filter((function(e){if(e.name)return!!t.convertToOneString(e.name).toLowerCase().includes(t.convertToOneString(i).toLowerCase())}));return r=!!(n&&n.length>0)})),r},n.prototype.convertToOneString=function(e){return e.replace(/[^a-zA-Z]/g,"")},n.prototype.getImages=function(i){var n=this,o=this.environment.hostBaseUrl+e.URLS.CONFIRMA_PHOTO_URL+i.split(",")[0];return this.galleries[i]?t.of(this.galleries[i]):this.httpCallService.get(o,{responseType:"text"}).pipe(r.map((function(e){if(!e)throw Error("Gallery for "+i+" can not be loaded.");var t=document.createElement("div");t.innerHTML=e;var r=Array.from(t.getElementsByTagName("img")).reduce((function(e,t){return t.src.includes("https://www.vfmii.com/")&&e.push(t.src),e}),[]);if(!r.length)throw Error("There is no media content provided for this hotel "+i);return n.galleries[i]=r})))},n.prototype.addPaginationPage=function(e){var t="PaginationPageCount";return this.storageService.setSessionItem(t,e),this.storageService.getSessionItem(t)},n.prototype.toggleView=function(){this.currentView===e.HotelView.LIST?this.currentView=e.HotelView.MAP:this.currentView=e.HotelView.LIST},n.prototype.calcDayDiff=function(){var e=u.default(this.checkout_date),t=u.default(this.checkin_date);return e.startOf().diff(t.startOf(),"days")},n.prototype.updateLowestPrice=function(e){var t=Object.keys(this.avaliabilityService.currencies);if(!e.length&&!t.length||!t.length)return null;var r=t[0];return{amount:this.avaliabilityService.currencies[r].minprice,currencyCode:r}},n.prototype.getRoomNumber=function(){for(var e=[],t=0;t<Number(this.tempParams.no_of_rooms);t++){var r={Adults:this.calcRoomOccupancy(this.tempParams.no_of_rooms,this.tempParams.no_of_occupants),Children:0,Infants:0};e.push(r)}for(var i=[],n=0;n<e.length;n++)for(var o=0;o<e[n].Adults;o++)i.push(n+1)},n.prototype.calcRoomOccupancy=function(e,t){console.log("No of Travellers: "+t+"| No of rooms: "+e+" | Assigned: "+this.occupied);var r=Math.ceil(t/e);return t-this.occupied<r&&(console.log("We have run out of occupiers!"),r=t-this.occupied),r<=0&&(r=1),this.occupied+=r,r},n.prototype.addHotelRoomToBasket=function(e,t,r,i){return y(this,void 0,void 0,(function(){var i,n,o,a,s,u,c,l;return v(this,(function(d){switch(d.label){case 0:return e.unavailable?[2,Promise.resolve(!1)]:(r.startDate=new Date(r.startDate).toISOString(),r.endDate=new Date(r.endDate).toISOString(),delete(i=Object.assign({},r)).adults,[4,this.basketService.getDefaultBasket()]);case 1:return n=d.sent(),(o=null==n?void 0:n.subject.value)?(a=e.address,s=t.rateDescription,u=t.roomDescription,c=t.roomId,l=t.roomType,[2,this.basketService.addToBasket({adults:r.adults,basket:o.id,service:e.sourceId.toString(),detail:{checkIn:r.startDate,checkOut:r.endDate,hotelAddress:{streetName:a.addressLine1,town:a.addressLine2,county:a.addressLine3,postcode:a.postOrZipCode,countryCode:a.countryCode},hotelDescription:e.group,hotelName:e.name,numberOfRooms:r.rooms,rateDescription:s,roomDescription:u,roomId:c,roomType:l},price:t.total,currency:t.currencyCode,searchQuery:i,outboundDate:r.startDate},n,this.searchService,this.travellers)]):[2,Promise.resolve(!1)]}}))}))},n}(l);Ke.MAX_HOTEL_ROOMS=4,Ke.STORAGE_SESSION_PARAMS="search_hotel",Ke.STORAGE_SESSION_RESULTS="results_hotel";var qe=function(e){function r(i,n,o,a,s){var c=e.call(this,a)||this;c.loungefetcher=i,c.helpers=n,c.basketService=o,c.searchService=s,c.type=Z.Lounge,c.terminals=new t.BehaviorSubject([]),c._flightNumber=null,c._selectedTerminal="",c.min_date={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},c._date=null,c._time=null,c.resultsSessionName=r.STORAGE_SESSION_RESULTS;var l=a.getSessionItem(r.STORAGE_SESSION_PARAMS)||{tempParams:{}};c.updateTempParams(s.makeLoungesQuery(l.tempParams)),s.shouldAddTravellerSubscription()&&s.travellerInformation.subscribe((function(e){var t=c.helpers.selectedTravellers(e,Z.Lounge);c.tempParams.adults=t.adults.length,c.tempParams.children=t.children.length,c.travellers=e,c._isValid()}));var d=a.getSessionItemAsList(c.resultsSessionName)||[];return c._cheapestResultPrice=c.updateLowestPrice(d),c.results.next(d||[]),c}return m(r,e),Object.defineProperty(r.prototype,"adults",{get:function(){return this.tempParams.adults},set:function(e){this.tempParams.adults=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"children",{get:function(){return this.tempParams.children},set:function(e){this.tempParams.children=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"infants",{get:function(){return this.tempParams.infants},set:function(e){this.tempParams.infants=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"flightNumber",{get:function(){return this._flightNumber},set:function(e){this._flightNumber=e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"locationCode",{get:function(){return this.tempParams.locationCode},set:function(e){var t;this.tempParams.locationCode=e;var r=null===(t=this.terminals)||void 0===t?void 0:t.value;"string"==typeof e?(this._locationCode="",this.terminal=null,this.terminals.next([]),this.selectedTerminal=null,this._isValid()):e&&e.gateway?(this._locationCode=e.gateway,this.terminal=null,this.terminals.next(e.terminals),1===r.length&&(this.selectedTerminal=r[0].key),this._isValid()):(this._locationCode=null,this.terminal=null,this.selectedTerminal=null,this.terminals.next([]),this._isValid())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"terminal",{get:function(){return this.tempParams.terminal?this.tempParams.terminal.toString():null},set:function(e){this.tempParams.terminal=e;var t=this.terminals.value.find((function(t,r){if(t.value===e)return!0}));t?this.selectedTerminal=t.key:this.terminals.value&&this.terminals.value.length>0?this.selectedTerminal=this.terminals.value[0].key:this.selectedTerminal="Any Terminal",this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectedTerminal",{get:function(){return this._selectedTerminal},set:function(e){this._selectedTerminal=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"date",{get:function(){return this._date},set:function(e){this._date=e,this._updateDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"time",{get:function(){return this._time},set:function(e){this._time=e,this._updateDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"arrivalDatetime",{get:function(){return this.tempParams.arrivalDatetime},set:function(e){e.isValid()?(this.tempParams.arrivalDatetime=e,this._date=this.helpers.momentToNgDate(e),this._time=this.helpers.formatTimeColon(e)):this.tempParams.arrivalDatetime=null,this._isValid()},enumerable:!1,configurable:!0}),r.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeLoungesQuery()),this._isValid()},r.prototype.getSearchQuery=function(){var e={adults:this.tempParams.adults,children:this.tempParams.children,infants:this.tempParams.infants,locationCode:this._locationCode,terminal:"Any"===this.tempParams.terminal?null:this.tempParams.terminal,arrivalDatetime:this.tempParams.arrivalDatetime};return this.helpers.removeNulls(e)},r.prototype._isValid=function(){this.doChecks&&(this.storageService.setSessionItem(r.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,travellers:this.travellers}),this.validationMessages=[],this._locationCode&&""!==this._locationCode||this.validationMessages.push("You must select airport first."),this.tempParams.arrivalDatetime.unix()<u.default().unix()&&this.validationMessages.push("Outward journey cannot be in the past."),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages))},r.prototype._updateDateTime=function(){if(this._date&&this._time){var e=this.helpers.ngDateToMoment(this._date,this._time);this.tempParams.arrivalDatetime=e.isValid()?e:null,this._isValid()}},r.prototype.startSearch=function(){if(this.results.next([]),this.isValid.value){var e=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(e)),this._startSearch(this.loungefetcher.fetchList(this.helpers.removeNulls(e)))}return Promise.resolve(!1)},r.prototype.getRecentSearchQuery=function(e){return{serviceType:Z.Lounge,searchArgs:e,travelDate:this.arrivalDatetime.format(),travellers:this.helpers.getTravellersId(this.travellers)}},r.prototype.startRecentSearch=function(e){var t=this;this.arrivalDatetime=u.default(e.searchArgs.arrivalDatetime),this.terminal=e.searchArgs.terminal,this.searchService.getAirportByCode(e.searchArgs.locationCode).subscribe((function(e){var r,i,n,o,a,s;e&&(t.locationCode={country:null===(i=null===(r=e.iataMatch)||void 0===r?void 0:r.locationDetails)||void 0===i?void 0:i.country,countryCode:null===(o=null===(n=e.iataMatch)||void 0===n?void 0:n.locationDetails)||void 0===o?void 0:o.countryCode,destination:e.iataMatch.name,gateway:e.iataMatch.iata,postcode:null===(s=null===(a=e.iataMatch)||void 0===a?void 0:a.locationDetails)||void 0===s?void 0:s.postcode,terminals:t.searchService.processTerminals(e.iataMatch.terminals)},t.searchService.startSearches())})),this.searchService.startSearches()},r.prototype.sortByPrice=function(e,t){void 0===t&&(t=[]);var r=C(this.fullResults);r.length||(r=t),r=this.sortResultsPrice(r,e),this.results.next(r)},r.prototype.sortResultsPrice=function(e,t){var r=C(e);return r=t?r.sort((function(e,t){return t.price-e.price})):r.sort((function(e,t){return e.price-t.price}))},r.prototype.sortByTerminal=function(e){void 0===e&&(e=[]);var t=C(this.fullResults);t.length||(t=e);this.results.next(t.sort((function(e,t){return-1})))},r.prototype.updateFromPreviousSearches=function(e){var t;null===(t=e[Z.Flight])||void 0===t||t.searchQuery},r.prototype.addLoungeToBasket=function(e,t){return y(this,void 0,void 0,(function(){var r,i;return v(this,(function(n){switch(n.label){case 0:return e.unavailable?[2,Promise.resolve(!1)]:[4,this.basketService.getDefaultBasket()];case 1:return r=n.sent(),(i=null==r?void 0:r.subject.value)?[2,this.basketService.addToBasket({adults:t.adults,children:t.children,infants:t.infants,basket:i.id,service:e.sourceId.toString(),detail:{arrivalDatetime:t.arrivalDatetime.format(),locationCode:e.code,name:e.name,airportIata:null==t?void 0:t.locationCode},price:e.price,currency:e.currency,searchQuery:t,outboundDate:t.arrivalDatetime.format()},r,this.searchService,this.travellers)]:[2,Promise.resolve(!1)]}}))}))},r.prototype.updateLowestPrice=function(e){if(!e.length)return null;var t=e[0].currency;return e.reduce((function(e,t){var r=t.price;return e.amount>r&&(e.amount=r),e}),{amount:Number.MAX_SAFE_INTEGER,currencyCode:t})},r}(l);qe.STORAGE_SESSION_PARAMS="search_lounge",qe.STORAGE_SESSION_RESULTS="results_lounge";var Je,ze,Xe,Ze,$e={AirportFirst:"You must select airport first.",InvardJourney:"Inward journey cannot be in the past.",OutwardJourney:"Outward journey cannot be in the past.",DateOverlapped:"Inward Journey can not be before outward journey"},et=function(e){function r(i,n,o,a,s){var c=e.call(this,a)||this;c.parkingfetcher=i,c.helpers=n,c.basketService=o,c.searchService=s,c.type=Z.Parking,c.terminals=new t.BehaviorSubject([]),c.listViewToggle=new t.BehaviorSubject(null),c.parkingFiltersText={onAirport:"On Airport",meetAndGreet:"Meet and greet",parkAndRide:"Park and ride",parkAndStroll:"Park and stroll",carParkedForYou:"Car parked for you"},c._selectedTerminal="",c.min_date={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},c.min_return_date={year:u.default().year(),month:u.default().month()+1,day:u.default().date()+1},c.resultsSessionName=r.STORAGE_SESSION_RESULTS,c._outdate=null,c._outtime=null,c._indate=null,c._intime=null;var l=a.getSessionItem(r.STORAGE_SESSION_PARAMS)||{tempParams:{}};c.updateTempParams(s.makeParkingQuery(l.tempParams));var d=a.getSessionItemAsList(c.resultsSessionName)||[];return c.results.next(d),c._cheapestResultPrice=c.updateLowestPrice(d),s.shouldAddTravellerSubscription()&&s.travellerInformation.subscribe((function(e){c.travellers=e,c._isValid()})),c}return m(r,e),Object.defineProperty(r.prototype,"outdate",{get:function(){return this._outdate},set:function(e){this._outdate=e,this._outdate&&this._outdate&&(this.arrivalDatetime=this.helpers.ngDateToMoment(this._outdate,this._outtime))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"outtime",{get:function(){return this._outtime},set:function(e){this._outtime=e,this._outdate&&this._outtime&&(this.arrivalDatetime=this.helpers.ngDateToMoment(this._outdate,this._outtime))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"departDatetime",{get:function(){return this.tempParams.departDatetime},set:function(e){this.tempParams.departDatetime=e.isValid()?e:null,e&&e.isValid()&&(this._indate=this.helpers.momentToNgDate(e),this._intime=this.helpers.formatTimeColon(e)),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"indate",{get:function(){return this._indate},set:function(e){this._indate=e,this._indate&&this._intime&&(this.departDatetime=this.helpers.ngDateToMoment(this._indate,this._intime))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"intime",{get:function(){return this._intime},set:function(e){this._intime=e,this.departDatetime=this.helpers.ngDateToMoment(this._indate,this._intime)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"arrivalDatetime",{get:function(){var e;return null===(e=this.tempParams)||void 0===e?void 0:e.arrivalDatetime},set:function(e){if(this.tempParams.arrivalDatetime=e.isValid?e:null,e&&e.isValid()&&(this._outdate=this.helpers.momentToNgDate(e),this._outtime=this.helpers.formatTimeColon(e),this.departDatetime&&this.departDatetime.isSameOrBefore(this.arrivalDatetime))){var t=this.arrivalDatetime.clone();this.departDatetime=t}this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"outFlightNumber",{get:function(){var e;return null===(e=this.tempParams)||void 0===e?void 0:e.outFlightNumber},set:function(e){this.tempParams.outFlightNumber=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"recommended",{get:function(){var e;return!!(null===(e=this.tempParams)||void 0===e?void 0:e.recommended)},set:function(e){this.tempParams.recommended=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onAirport",{get:function(){var e;return!!(null===(e=this.tempParams)||void 0===e?void 0:e.onAirport)},set:function(e){this.tempParams.onAirport=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"meetAndGreet",{get:function(){var e;return!!(null===(e=this.tempParams)||void 0===e?void 0:e.meetAndGreet)},set:function(e){this.tempParams.meetAndGreet=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parkAndRide",{get:function(){var e;return!!(null===(e=this.tempParams)||void 0===e?void 0:e.parkAndRide)},set:function(e){this.tempParams.parkAndRide=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parkAndStroll",{get:function(){var e;return!!(null===(e=this.tempParams)||void 0===e?void 0:e.parkAndStroll)},set:function(e){this.tempParams.parkAndStroll=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"carParkedForYou",{get:function(){var e;return!!(null===(e=this.tempParams)||void 0===e?void 0:e.carParkedForYou)},set:function(e){this.tempParams.carParkedForYou=e||null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"terminal",{get:function(){return this.tempParams.terminal?this.tempParams.terminal.toString():null},set:function(e){this.tempParams.terminal=e;var t=this.terminals.value.find((function(t,r){if(t.value===e)return!0}));t?this.selectedTerminal=t.key:this.terminals.value&&this.terminals.value.length>0?this.selectedTerminal=this.terminals.value[0].key:this.selectedTerminal="Any Terminal",this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"locationCode",{get:function(){return this.tempParams.locationCode},set:function(e){this.tempParams.locationCode=e,"string"==typeof e?(this._locationCode=null,this.terminal=null,this.terminals.next([]),this.selectedTerminal=null,this._isValid()):e&&e.gateway?(this._locationCode=e.gateway,this.terminal=null,this.terminals.next(e.terminals),1===e.terminals.length&&(this.selectedTerminal=e.terminals[0].key),this._isValid()):(this._locationCode=null,this.terminal=null,this.terminals.next([]),this.selectedTerminal=null,this._isValid())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selectedTerminal",{get:function(){return this._selectedTerminal},set:function(e){this._selectedTerminal=e},enumerable:!1,configurable:!0}),r.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeParkingQuery()),this._isValid()},r.prototype._isValid=function(){var e,t,i;this.doChecks&&(this.storageService.setSessionItem(r.STORAGE_SESSION_PARAMS,{location:this._locationCode,travellers:this.travellers,tempParams:this.tempParams}),this.validationMessages=[],this._locationCode&&""!==this._locationCode||this.validationMessages.push($e.AirportFirst),(null===(e=this.tempParams)||void 0===e?void 0:e.arrivalDatetime.unix())<u.default().unix()&&this.validationMessages.push($e.InvardJourney),(null===(t=this.tempParams)||void 0===t?void 0:t.departDatetime.unix())<u.default().unix()&&this.validationMessages.push($e.OutwardJourney),(null===(i=this.tempParams.departDatetime)||void 0===i?void 0:i.isBefore(this.tempParams.arrivalDatetime))&&this.validationMessages.push($e.DateOverlapped),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages))},r.prototype.startSearch=function(){if(this.results.next([]),this.isValid.value){var e=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(e)),this._startSearch(this.parkingfetcher.fetchList(this.helpers.removeNulls(e)))}return Promise.resolve(!1)},r.prototype.getRecentSearchQuery=function(e){return{serviceType:Z.Parking,searchArgs:e,travelDate:this.arrivalDatetime.format(),travellers:this.helpers.getTravellersId(this.travellers)}},r.prototype.startRecentSearch=function(e){var t=this;this.arrivalDatetime=u.default(e.searchArgs.arrivalDatetime),this.departDatetime=u.default(e.searchArgs.departDatetime),this.outFlightNumber=e.searchArgs.outFlightNumber,this.terminal=e.searchArgs.terminal,this.searchService.getAirportByCode(e.searchArgs.locationCode).subscribe((function(e){var r,i,n,o,a,s;e&&(t.locationCode={country:null===(i=null===(r=e.iataMatch)||void 0===r?void 0:r.locationDetails)||void 0===i?void 0:i.country,countryCode:null===(o=null===(n=e.iataMatch)||void 0===n?void 0:n.locationDetails)||void 0===o?void 0:o.countryCode,destination:e.iataMatch.name,gateway:e.iataMatch.iata,postcode:null===(s=null===(a=e.iataMatch)||void 0===a?void 0:a.locationDetails)||void 0===s?void 0:s.postcode,terminals:t.searchService.processTerminals(e.iataMatch.terminals)},t.searchService.startSearches())})),this.searchService.startSearches()},r.prototype.getSearchQuery=function(){var e={arrivalDatetime:this.tempParams.arrivalDatetime,departDatetime:this.tempParams.departDatetime,locationCode:this._locationCode,outFlightNumber:this.tempParams.outFlightNumber,recommended:this.tempParams.recommended,onAirport:this.tempParams.onAirport,meetAndGreet:this.tempParams.meetAndGreet,parkAndRide:this.tempParams.parkAndRide,parkAndStroll:this.tempParams.parkAndStroll,carParkedForYou:this.tempParams.carParkedForYou,terminal:"Any"===this.tempParams.terminal?null:this.tempParams.terminal};return this.helpers.removeNulls(e)},r.prototype.sortByPrice=function(e){var t=this.helpers.clone(this.results.value)||[];t=e?t.sort((function(e,t){return t.price-e.price})):t.sort((function(e,t){return e.price-t.price})),this.results.next(t)},r.prototype.updateFromPreviousSearches=function(e){var t;null===(t=e[Z.Flight])||void 0===t||t.searchQuery},r.prototype.addParkingToBasket=function(e,t){return y(this,void 0,void 0,(function(){var r,i;return v(this,(function(n){switch(n.label){case 0:return[4,this.basketService.getDefaultBasket()];case 1:return r=n.sent(),(i=null==r?void 0:r.subject.value)?[2,this.basketService.addToBasket({adults:1,basket:i.id,service:e.sourceId.toString(),detail:{arrivalDatetime:t.arrivalDatetime.format(),departDatetime:t.departDatetime.format(),locationCode:e.carPark.code,name:e.carPark.name,requiredInfo:e.requiredInfo,airportIata:t.locationCode},price:e.price,currency:e.currency,searchQuery:t,outboundDate:t.arrivalDatetime.format(),inboundDate:t.departDatetime.format()},r,this.searchService,this.travellers)]:[2,Promise.resolve(!1)]}}))}))},r.prototype.updateLowestPrice=function(e){if(!e.length)return null;var t=e[0].currency;return e.reduce((function(e,t){var r=t.price;return e.amount>r&&(e.amount=r),e}),{amount:Number.MAX_SAFE_INTEGER,currencyCode:t})},r}(l);et.STORAGE_SESSION_PARAMS="search_parking",et.STORAGE_SESSION_RESULTS="results_parking",(Je=e.RailDirection||(e.RailDirection={})).Outbound="out",Je.Inbound="in",(ze=e.EurostarSearchType||(e.EurostarSearchType={})).return="return",ze.oneWay="oneWay",(Xe=e.SortTypesEurostar||(e.SortTypesEurostar={})).CheapestFirst="C",Xe.EarliestFirst="E",(Ze=e.SortMethod||(e.SortMethod={})).sortByPrice="sortByPrice",Ze.sortByDate="sortByDate";var tt,rt,it=function(r){function i(n,o,a,s,c,l){var d=r.call(this,c,(function(e){return d.resultQuery=d.getSearchQuery(),delete d.resultQuery.withGrouped,e&&d.searchService.isFlightsGrouped()?[(e.journeys||[]).reduce((function(e,t){if(t.outboundFlights.length){var r=d.formatEurostarResults(t.outboundFlights,t.total);r.co2PerPassenger=t.co2PerPassenger,r.co2PerItem=t.co2PerItem,r.sourceId=t.sourceId,r.total=t.total,r.duration=d.minToHour(t.outboundTotalDuration),e.outbound.find((function(e){return e.dateDeparture===r.dateDeparture}))||e.outbound.push(r)}if(t.inboundFlights.length){var i=d.formatEurostarResults(t.inboundFlights,t.total);i.co2PerPassenger=t.co2PerPassenger,i.co2PerItem=t.co2PerItem,i.sourceId=t.sourceId,i.total=t.total,i.duration=d.minToHour(t.inboundTotalDuration),e.inbound.find((function(e){return e.dateDeparture===i.dateDeparture}))||e.inbound.push(i)}return e}),{outbound:[],inbound:[]})]:e?[e]:[]}))||this;d.eurostarFetcher=n,d.helpers=o,d.basketService=s,d.searchService=l,d.type=Z.Eurostar,d.avaliableClasses=new t.BehaviorSubject([]),d.timeCriteriaOptions=new t.BehaviorSubject([]),d.flightOperators=new t.BehaviorSubject([]),d._negotiated=!1,d._nearby_airports=!1,d._sortArray=[{title:"Price",method:e.SortMethod.sortByPrice,icon:"ico-dollar",dir:!0,code:e.SortTypesEurostar.CheapestFirst},{title:"Time",method:e.SortMethod.sortByDate,icon:"ico-calendar",dir:!0,code:e.SortTypesEurostar.EarliestFirst}],d._fareTypeArray=[{value:L.Flexible,display:"Flexible"},{value:L.Leisure,display:"Leisure"},{value:L.Lowest,display:"Lowest"},{value:L.Negotiated,display:"Negotiated"},{value:L.NonNegotiated,display:"Non-Negotiated"},{value:L.RequestFareRules,display:"Request Fare Rules"},{value:L.SelectAndPro,display:"Select & Pro"}],d.minimumOutBoundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},d.minimumInBoundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},d.searchTypes=[{value:e.EurostarSearchType.return,display:"Return"},{value:e.EurostarSearchType.oneWay,display:"One-way"}],d.flightsToGroup={},d.grouped=null,d.travellers=null,d.resultsSessionName=i.STORAGE_SESSION_RESULTS,d._displayAddHotel=!1,d._multiDestination=[],d.minToHour=function(e){return Math.floor(e/60)+"h "+e%60+"m"};var p=c.getSessionItem(i.STORAGE_SESSION_PARAMS)||{tempParams:{},originalUserSearch:{}},h=l.makeEurostarQuery(p.tempParams);d.updateTempParams(h),d._originalUserSearch=p.originalUserSearch,l.shouldAddTravellerSubscription()&&l.travellerInformation.subscribe((function(e){d.travellers=e;var t=d.helpers.selectedTravellers(e,Z.Eurostar);d.tempParams.adults=t.adults.length,d.tempParams.children=t.children.length,d.updateTravellers(),d._isValid()})),a.changeUser.subscribe((function(t){d.timeCriteriaOptions.next([e.TimeWindow.Anytime,e.TimeWindow.Arrive,e.TimeWindow.Depart]),d.updateAvaliableClasses()})),d.updateTravellers();var m=c.getSessionItem(d.resultsSessionName)||{results:[],groupData:{},grouped:[],query:{}};return d.fullResults=d.helpers.clone(m.results),d.flightsToGroup=m.groupData||{},d.resultQuery=m.query,d.results.next(m.results||[]),d._isValid(),d.negotiated=d.tempParams.fareType===L.Negotiated,d}return m(i,r),Object.defineProperty(i.prototype,"displayAddHotel",{get:function(){return this._displayAddHotel},set:function(e){this._displayAddHotel=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"timeArray",{get:function(){return this._timeArray=this._timeArray||Array(96).fill(0).map((function(e,t){return{value:Math.floor(t/4).toString().padStart(2,"0")+":"+(t%4*15).toString().padStart(2,"0"),display:Math.floor(t/4).toString().padStart(2,"0")+":"+(t%4*15).toString().padStart(2,"0")}})),this._timeArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preferredCarriers",{get:function(){return this.tempParams.preferredCarriers},set:function(e){this.tempParams.preferredCarriers=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator1",{get:function(){return this.tempParams.preferredCarriers[0]},set:function(e){this.tempParams.preferredCarriers[0]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator2",{get:function(){return this.tempParams.preferredCarriers[1]},set:function(e){this.tempParams.preferredCarriers[1]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator3",{get:function(){return this.tempParams.preferredCarriers[2]},set:function(e){this.tempParams.preferredCarriers[2]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"operator4",{get:function(){return this.tempParams.preferredCarriers[3]},set:function(e){this.tempParams.preferredCarriers[3]=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"minDate",{get:function(){return this._minDate=this._minDate||this.helpers.momentToNgDate(u.default()),this._minDate},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"adults",{get:function(){return this.tempParams.adults},set:function(e){this.tempParams.adults=Number(e),this.updateTravellers()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"children",{get:function(){return this.tempParams.children},set:function(e){this.tempParams.children=Number(e),this.updateTravellers()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departLocation",{get:function(){return this.tempParams.departLocation},set:function(e){this.tempParams.departLocation=e,"string"==typeof e?this._originAirport="":e&&e.gateway?this._originAirport=e.gateway:this._originAirport=null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"queryOriginAiport",{get:function(){return this._originAirport},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"queryDestinationAiport",{get:function(){return this._destinationAirport},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departDate",{get:function(){return this._outDate},set:function(e){this._outDate=e,this.outBoundDate=this.helpers.ngDateToMoment(this._outDate,this._outTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departTime",{get:function(){return this._outTime},set:function(e){this._outTime=e,this.outBoundDate=this.helpers.ngDateToMoment(this._outDate,this._outTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outBoundDate",{get:function(){return this.tempParams.outBoundDate},set:function(e){e=u.default(e),this.tempParams.outBoundDate=e.isValid()?e:null,this.minimumInBoundDate={year:e.year(),month:e.month()+1,day:e.date()},this.tempParams.outBoundDate&&this.tempParams.inboundDate&&this.tempParams.outBoundDate.isAfter(this.tempParams.inboundDate)&&(this.inboundDate=u.default(this.tempParams.outBoundDate).add(1,"day")),this._outDate=this.helpers.momentToNgDate(e),this._outTime=this.helpers.formatTimeColon(e),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"returnDate",{get:function(){return this._inDate},set:function(e){this._inDate=e,this.inboundDate=this.helpers.ngDateToMoment(this._inDate,this._inTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arriveTime",{get:function(){return this._inTime},set:function(e){this._inTime=e,this.inboundDate=this.helpers.ngDateToMoment(this._inDate,this._inTime)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inboundDate",{get:function(){return this.tempParams.inboundDate},set:function(e){e=u.default(e),this.tempParams.inboundDate=e.isValid()?e:null,this._inDate=this.helpers.momentToNgDate(e),this._inTime=this.helpers.formatTimeColon(e),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arriveLocation",{get:function(){return this.tempParams.arriveLocation},set:function(e){this.tempParams.arriveLocation=e,"string"==typeof e?this._destinationAirport="":e&&e.gateway?this._destinationAirport=e.gateway:this._destinationAirport=null,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cabinClass",{get:function(){return this.tempParams.cabinClass},set:function(e){this.tempParams.cabinClass=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"returnCabinClass",{get:function(){return this.tempParams.returnCabinClass},set:function(e){this.tempParams.returnCabinClass=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"chosenSearchType",{get:function(){return this.tempParams.chosenSearchType},set:function(e){this.tempParams.chosenSearchType=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isReturn",{get:function(){return this.tempParams.chosenSearchType===e.EurostarSearchType.return},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outTimeCriteria",{get:function(){return this.tempParams.outTimeCriteria},set:function(e){this.tempParams.outTimeCriteria=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inTimeCriteria",{get:function(){return this.tempParams.inTimeCriteria},set:function(e){this.tempParams.inTimeCriteria=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"maxConnections",{get:function(){return this.tempParams.maxConnections},set:function(e){this.tempParams.maxConnections=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"multiDestination",{get:function(){return this.tempParams.multiDestination},set:function(e){this.tempParams.multiDestination=e,this._isValid()},enumerable:!1,configurable:!0}),i.prototype.setMultiDestinationQuery=function(e){var t=this;return this.helpers.clone(e).reduce((function(e,r){var i={};return i.orig=r.orig.gateway,i.dest=r.dest.gateway,i.date=t.helpers.formatIsoDate(r.date),e.push(i),e}),[])},Object.defineProperty(i.prototype,"sortDropdownValues",{get:function(){return this._sortArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fareTypesValues",{get:function(){return this._fareTypeArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fareType",{get:function(){return this.tempParams.fareType},set:function(e){this.tempParams.fareType=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"negotiated",{get:function(){return this._negotiated},set:function(e){this._negotiated=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"includeNearbyAirports",{get:function(){return this.tempParams.includeNearbyAirports},set:function(e){this.tempParams.includeNearbyAirports=e},enumerable:!1,configurable:!0}),i.prototype.formatEurostarResults=function(t,r){var i=this,n={dateArrival:null,dateDeparture:null,duration:null,timeArrival:null,timeDeparture:null,co2PerItem:0,co2PerPassenger:0,sourceId:null,total:null,uid:null,businessPremierFare:{class:null,fare:null,isDisabled:!0,price:NaN,currency:"GBP"},standardFare:{class:null,fare:null,isDisabled:!0,price:NaN,currency:"GBP"},standardPremierFare:{class:null,fare:null,isDisabled:!0,price:NaN,currency:"GBP"}};return t.forEach((function(t,o){switch(n.dateArrival=t.dateTimeArriving,n.dateDeparture=t.dateTimeDeparting,n.duration=i.minToHour(t.totalDuration),n.timeArrival=u.default(t.dateTimeArriving).format("HH:mm"),n.timeDeparture=u.default(t.dateTimeDeparting).format("HH:mm"),n.uid=o,t.fareInfo.title){case e.EurostarClassEnum.STANDARD:n.standardFare.isDisabled=!1,n.standardFare.fare=t,n.standardFare.price=r.price,n.standardFare.currency=r.currency,n.standardFare.class=t.cabinClass;break;case e.EurostarClassEnum.STANDARD_PREMIER:n.standardPremierFare.isDisabled=!1,n.standardPremierFare.fare=t,n.standardPremierFare.price=r.price,n.standardPremierFare.currency=r.currency,n.standardPremierFare.class=t.cabinClass;break;case e.EurostarClassEnum.BUSINESS_PREMIER:n.businessPremierFare.isDisabled=!1,n.businessPremierFare.fare=t,n.businessPremierFare.price=r.price,n.businessPremierFare.currency=r.currency,n.businessPremierFare.class=t.cabinClass;break;default:console.log("new class to be implemented: ",t.fareInfo.title)}})),n},i.prototype.resetQuery=function(e){void 0===e&&(e=!0),this.updateTempParams(this.searchService.makeEurostarQuery()),e&&this._isValid()},i.prototype.resetParams=function(){this.reset(),this.resetQuery()},i.prototype._isValid=function(){this.doChecks&&(this.storageService.setSessionItem(i.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch}),this.validationMessages=[],this._originAirport||this.validationMessages.push("Please add in a departutre location"),this._destinationAirport||this.validationMessages.push("Please add in a arrival destination"),this.tempParams.outBoundDate.isAfter(u.default())||this.validationMessages.push("Departure date can not be in the past"),this._originAirport&&this._destinationAirport&&this._destinationAirport===this._originAirport&&this.validationMessages.push("Origin and destination station cannot be the same"),this.isReturn&&this.tempParams.outBoundDate.isSameOrAfter(this.tempParams.inTimeCriteria)&&this.validationMessages.push("Return date must be after the departure date"),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages))},i.prototype.startSearch=function(){return this.results.next([]),this._isValid(),this.isValid.value?(this._originalUserSearch=Object.freeze(Object.assign({},this.tempParams)),this.storageService.setSessionItem(i.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch}),this._startSearch(this.eurostarFetcher.fetchList(this.getSearchQuery()))):Promise.resolve(!1)},i.prototype.startRecentSearch=function(e){},i.prototype.makeDepartureTimeWindow=function(t,r){return r===e.TimeWindow.Depart?this.helpers.makeTimeWindow(t,-2,2):null},i.prototype.makeArrivalTimeWindow=function(t,r){return r!==e.TimeWindow.Arrive?null:this.helpers.makeTimeWindow(t,-2,2)},i.prototype.getSearchQuery=function(){return this.helpers.removeNulls(Object.assign({},{originAirport:this._originAirport,destinationAirport:this._destinationAirport,outboundDate:this.helpers.formatIsoDate(this.tempParams.outBoundDate),outboundDepartureTimeWindow:this.makeDepartureTimeWindow(this.tempParams.outBoundDate,this.tempParams.outTimeCriteria),outboundArrivalTimeWindow:this.makeArrivalTimeWindow(this.tempParams.outBoundDate,this.tempParams.outTimeCriteria)},{passengers:this._passengers,returnTrip:this.isReturn,outboundCabinClass:this.tempParams.cabinClass?[this.tempParams.cabinClass]:null,requireFreeBag:null,maxConnections:this.tempParams.maxConnections,includeNearbyAirports:this.tempParams.includeNearbyAirports,preferredCarriers:this.tempParams.preferredCarriers.map((function(e){return(null==e?void 0:e.code)?e.code:null})),fareType:this.tempParams.fareType,withGrouped:null},this.isReturn?{returnDate:this.helpers.formatIsoDate(this.tempParams.inboundDate),returnDepartureTimeWindow:this.makeDepartureTimeWindow(this.tempParams.inboundDate,this.tempParams.inTimeCriteria),returnArrivalTimeWindow:this.makeArrivalTimeWindow(this.tempParams.inboundDate,this.tempParams.inTimeCriteria),returnCabinClass:this.tempParams.returnCabinClass?[this.tempParams.returnCabinClass]:null}:{}))},i.prototype.updateTravellers=function(){for(var e=[],t=0;t<this.tempParams.adults;t+=1)e.push({type:w.Adult});for(t=0;t<this.tempParams.children;t+=1)e.push({type:w.Child});this._passengers=e,this._isValid()},i.prototype.updateAvaliableClasses=function(){this.avaliableClasses.next([{name:"Any",type:e.EurostarClassEnum.ANY},{name:"Standard (semi flexible)",type:e.EurostarClassEnum.STANDARD},{name:"Standard premier (semi flexible)",type:e.EurostarClassEnum.STANDARD_PREMIER},{name:"Business premier (fully flexible)",type:e.EurostarClassEnum.BUSINESS_PREMIER}])},i.prototype.sortResults=function(t,r){var i=this.helpers.clone(r||this.fullResults);switch(t){case e.SortTypesEurostar.CheapestFirst:i=this.sortByPrice(i);break;case e.SortTypesEurostar.EarliestFirst:i=this.sortByDate(i);break;default:console.error("+++ Unknown sorting method: "+t+" +++")}this.results.next(i)},i.prototype.sortByDate=function(e){var t=function(e,t){return u.default(e.timeDeparture,"HH:mm").unix()-u.default(t.timeDeparture,"HH:mm").unix()};return[{outbound:e[0].outbound.sort(t),inbound:e[0].inbound.sort(t)}]},i.prototype.sortByPrice=function(e,t){var r=function(e,r){var i=+e.standardFare.price||+e.standardPremierFare.price||+e.businessPremierFare.price,n=+r.standardFare.price||+r.standardPremierFare.price||+r.businessPremierFare.price;return t?n-i:i-n};return[{outbound:e[0].outbound.sort(r),inbound:e[0].inbound.sort(r)}]},i.prototype.updateFromPreviousSearches=function(e){var t;null===(t=e[Z.Flight])||void 0===t||t.searchQuery},i.prototype.getTotalBaggage=function(e){var t=0,r=JSON.parse(e.additional);return r&&r.outboundFlights?r.outboundFlights.forEach((function(e){e.baggage.forEach((function(e){e.allowance&&e.allowance>t&&(t=e.allowance)}))})):r&&r.baggageAllowance&&r.baggageAllowance.forEach((function(e){e.baggage.qty&&Number(e.baggage.qty)>t&&(t=Number(e.baggage.qty))})),t},i.prototype.transformMin=function(e){var t=60*Number(e)/100;return(t=t%1<.5?Math.floor(t):Math.ceil(t)).toString().padStart(2,"0")},i.prototype.filterByDuration=function(e,t,r,i){return void 0===i&&(i=!1),r=r.filter((function(r){var n,o=0;return i||r.outboundFlights.forEach((function(e){o+=e.totalDuration})),(null===(n=r.inboundFlights)||void 0===n?void 0:n.length)&&i&&r.inboundFlights.forEach((function(e){o+=e.totalDuration})),o>=e&&o<=t}))},i.prototype.filterByDepartureTime=function(e,t,r){var i=this;return r=r.filter((function(r){var n=Number(u.default(r.outboundFlights[0].dateTimeDeparting).format("HHmm")),o=Number(Math.floor(Number(e/100)).toString()+i.transformMin(Math.ceil(Number(e%100)))),a=Number(Math.floor(Number(t/100)).toString()+i.transformMin(Math.ceil(Number(t%100))));return n>=o&&n<=a}))},i.prototype.filterByReturnDepartureTime=function(e,t,r){if(!e&&!t)return r;var i=Number(Math.floor(Number(e/100)).toString()+this.transformMin(Math.ceil(Number(e%100)))),n=Number(Math.floor(Number(t/100)).toString()+this.transformMin(Math.ceil(Number(t%100))));return r=r.filter((function(e){if(!e.inboundFlights||!e.inboundFlights[0])return!0;var t=Number(u.default(e.inboundFlights[0].dateTimeDeparting).format("HHmm"));return t>=i&&t<=n}))},i.prototype.filterByReturnArrivalTime=function(e,t,r){if(!e&&!t)return r;var i=Number(Math.floor(Number(e/100)).toString()+this.transformMin(Math.ceil(Number(e%100)))),n=Number(Math.floor(Number(t/100)).toString()+this.transformMin(Math.ceil(Number(t%100))));return r=r.filter((function(e){if(!e.inboundFlights||!e.inboundFlights[0])return!0;var t=Number(u.default(e.inboundFlights[e.inboundFlights.length-1].dateTimeArriving).format("HHmm"));return t>=i&&t<=n}))},i.prototype.filterByArrivalTime=function(e,t,r){var i=Number(Math.floor(Number(e/100)).toString()+this.transformMin(Math.ceil(Number(e%100)))),n=Number(Math.floor(Number(t/100)).toString()+this.transformMin(Math.ceil(Number(t%100))));return r=r.filter((function(e){var t=Number(u.default(e.outboundFlights[e.outboundFlights.length-1].dateTimeArriving).format("HHmm"));return t>=i&&t<=n}))},i.prototype.filterByBaggage=function(e,t){var r=this,i=e.filter((function(e){return e.selected}));return(null==i?void 0:i.length)>=1&&i.length!==e.length&&(t=t.filter((function(e){try{var t=r.getTotalBaggage(e);return i.find((function(e){return e.value===t}))}catch(e){return console.error("+++ Error determening baggage: ${error} +++"),!1}}))),t},i.prototype.filterByPrice=function(e,t,r){return r=r.filter((function(r){return r.total.price>=e&&r.total.price<=t}))},i.prototype.filterResultsByStops=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t=e.outboundFlights.length-1;return r.find((function(e){return e.value===t}))}))),t},i.prototype.filterResultsByAirline=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){return r.find((function(t){return t.value===e.outboundFlights[0].operatingCarrier}))}))),t},i.prototype.filterResultsByClass=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){return r.find((function(t){return t.value===e.outboundFlights[0].cabinClass}))}))),t},i.prototype.filterByDepartureAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){return r.find((function(t){return t.value===e.outboundFlights[0].originAirport}))}))),t},i.prototype.filterByArrivalAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t=e.outboundFlights[e.outboundFlights.length-1].destinationAirport;return r.find((function(e){return e.value===t}))}))),t},i.prototype.filterByDepartureReturnAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t;return!(null===(t=e.inboundFlights)||void 0===t?void 0:t.length)||r.find((function(t){return t.value===e.inboundFlights[0].originAirport}))}))),t},i.prototype.filterByArrivalReturnAirport=function(e,t){var r=e.filter((function(e){return e.selected}));return(null==r?void 0:r.length)>=1&&r.length!==e.length&&(t=t.filter((function(e){var t;if(!(null===(t=e.inboundFlights)||void 0===t?void 0:t.length))return!0;var i=e.inboundFlights[e.inboundFlights.length-1].destinationAirport;return r.find((function(e){return e.value===i}))}))),t},i.prototype.createFilters=function(e){void 0===e&&(e=[]);var t=this.getMinPrice(e),r=this.getMaxPrice(e);return{stops:this.getAllStops(e),mustInclude:[],classes:this.getAllClasses(e),airlines:this.getAllAirlines(e),travelPolicy:[],depatureAirport:this.getAllDepartureAirports(e),arrivalAirport:this.getAllArrivalAirports(e),minPrice:t,maxPrice:r,depatureReturnAirport:this.getAllDepartureAirports(e,!0),arrivalReturnAirport:this.getAllArrivalAirports(e,!0),baggage:this.getBaggage(e),fareTypes:[],minDuration:this.getMinDuration(e),maxDuration:this.getMaxDuration(e),minReturnDuration:this.getMinDuration(e,!0),maxReturnDuration:this.getMaxDuration(e,!0),minDepartureTime:this.getMinDepartureTime(e),maxDepartureTime:this.getMaxDepartureTime(e),minArrivalTime:this.getMinArrivalTime(e),maxArrivalTime:this.getMaxArrivalTime(e),minReturnDepartureTime:this.getMinReturnDepartureTime(e),maxReturnDepartureTime:this.getMaxReturnDepartureTime(e),maxReturnArrivalTime:this.getMaxReturnArrivalTime(e),minReturnArrivalTime:this.getMinReturnArrivalTime(e),flightNumber:""}},i.prototype.getMinDuration=function(e,t){void 0===t&&(t=!1);var r=0;return e.forEach((function(e){var i,n=0;t||e.outboundFlights.forEach((function(e){n+=e.totalDuration})),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&e.inboundFlights.forEach((function(e){n+=e.totalDuration})),(!r||n<r)&&(r=n)})),r},i.prototype.getMaxDuration=function(e,t){void 0===t&&(t=!1);var r=0;return e.forEach((function(e){var i,n=0;t||e.outboundFlights.forEach((function(e){n+=e.totalDuration})),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&e.inboundFlights.forEach((function(e){n+=e.totalDuration})),(!r||n>r)&&(r=n)})),r},i.prototype.getMinArrivalTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[e.outboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)})),t},i.prototype.getMinReturnArrivalTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights.length){var r=Number(u.default(e.inboundFlights[e.inboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)}})),t},i.prototype.getMaxReturnArrivalTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights.length){var r=Number(u.default(e.inboundFlights[e.inboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)}})),t},i.prototype.getMaxArrivalTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[e.outboundFlights.length-1].dateTimeArriving).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)})),t},i.prototype.getMinDepartureTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)})),t},i.prototype.getMinReturnDepartureTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights[0]){var r=Number(u.default(e.inboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.floor(r/100),(!t||r<t)&&(t=r)}})),t},i.prototype.getMaxReturnDepartureTime=function(e){var t;return e.forEach((function(e){if(e.inboundFlights&&e.inboundFlights[0]){var r=Number(u.default(e.inboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)}})),t},i.prototype.getMaxDepartureTime=function(e){var t;return e.forEach((function(e){var r=Number(u.default(e.outboundFlights[0].dateTimeDeparting).format("HHmm"));r=100*Math.ceil(r/100),(!t||r>t)&&(t=r)})),t},i.prototype.getBaggage=function(e){var t={};return e.forEach((function(e){try{var r=JSON.parse(e.additional),i=0;r&&r.outboundFlights?r.outboundFlights.forEach((function(e){e.baggage.forEach((function(e){e.allowance&&e.allowance>i&&(i=e.allowance)}))})):r&&r.baggageAllowance&&r.baggageAllowance.forEach((function(e){e.baggage.qty&&Number(e.baggage.qty)>i&&(i=Number(e.baggage.qty))})),t[i]={selected:!1,value:i,display:i+" bag"+(1!==i?"s":"")}}catch(e){console.error("+++ Error parsing additional flight data: "+e+" +++")}})),Object.values(t)},i.prototype.getMinPrice=function(e){var t;return e.forEach((function(e){(!t||e.total.price<t)&&(t=e.total.price)})),t},i.prototype.getMaxPrice=function(e){var t;return e.forEach((function(e){(!t||e.total.price>t)&&(t=e.total.price)})),t},i.prototype.getAllStops=function(e){var t={};return e.forEach((function(e){var r=e.outboundFlights.length-1;t[r]={value:r,display:r+" stop"+(1!==r?"s":""),selected:!1}})),Object.values(t)},i.prototype.getAllClasses=function(e){var t=[];return e.forEach((function(e){e.outboundFlights.forEach((function(e){t[e.cabinClass]={value:e.cabinClass,display:e.cabinClass,selected:!1}})),e.inboundFlights&&e.inboundFlights.forEach((function(e){t[e.cabinClass]={value:e.cabinClass,display:e.cabinClass,selected:!1}}))})),Object.values(t)},i.prototype.getAllDepartureAirports=function(e,t){void 0===t&&(t=!1);var r={};return e.forEach((function(e){var i;e.outboundFlights.length&&!t&&(r[e.outboundFlights[0].originAirport]={value:e.outboundFlights[0].originAirport,display:e.outboundFlights[0].originAirportName,selected:!1}),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&(r[e.inboundFlights[0].originAirport]={value:e.inboundFlights[0].originAirport,display:e.inboundFlights[0].originAirportName,selected:!1})})),Object.values(r)},i.prototype.getAllArrivalAirports=function(e,t){void 0===t&&(t=!1);var r={};return e.forEach((function(e){var i;e.outboundFlights.length&&!t&&(r[e.outboundFlights[e.outboundFlights.length-1].destinationAirport]={value:e.outboundFlights[e.outboundFlights.length-1].destinationAirport,display:e.outboundFlights[e.outboundFlights.length-1].destinationAirportName,selected:!1}),(null===(i=e.inboundFlights)||void 0===i?void 0:i.length)&&t&&(r[e.inboundFlights[e.inboundFlights.length-1].destinationAirport]={value:e.inboundFlights[e.inboundFlights.length-1].destinationAirport,display:e.inboundFlights[e.inboundFlights.length-1].destinationAirportName,selected:!1})})),Object.values(r)},i.prototype.getAllAirlines=function(e){var t={};return e.forEach((function(e){e.outboundFlights.forEach((function(e){t[e.operatingCarrier]={value:e.operatingCarrier,display:e.operatingCarrierName,selected:!1}})),e.inboundFlights&&e.inboundFlights.forEach((function(e){t[e.operatingCarrier]={value:e.operatingCarrier,display:e.operatingCarrierName,selected:!1}}))})),Object.values(t)},i.prototype.selectGroupedEurostar=function(t,r,i){return y(this,void 0,void 0,(function(){var n,o,a;return v(this,(function(s){switch(s.label){case 0:return[4,this.basketService.getDefaultBasket()];case 1:return n=s.sent(),(o=null==n?void 0:n.subject.value)&&this.originalUserSearch.chosenSearchType===e.EurostarSearchType.oneWay&&i===e.FlightDirectionEnum.Outbound?(this.doBooking(n,t,{outboundFlights:[this.makeSchemaFlights(r.fare,"outbound",0)],inboundFlights:[],journeyType:"single"},t.dateDeparture),[2]):(o&&this.originalUserSearch.chosenSearchType===e.EurostarSearchType.return&&i===e.FlightDirectionEnum.Outbound&&(this.selectedGroupEurostar=t,this.selectedEurostarFare=r,a=t.uid,this.results.next(this.fullResults.map((function(e){var t=e.outbound.filter((function(e,t){return a===t}));return{inbound:e.inbound,outbound:t}})))),o&&this.originalUserSearch.chosenSearchType===e.EurostarSearchType.return&&i===e.FlightDirectionEnum.Inbound&&this.selectedGroupEurostar&&(this.doBooking(n,t,{outboundFlights:[this.makeSchemaFlights(this.selectedEurostarFare.fare,"outbound",0)],inboundFlights:[this.makeSchemaFlights(r.fare,"inbound",0)],journeyType:"roundtrip"},t.dateDeparture,this.selectedGroupEurostar.dateArrival),this.results.next(this.fullResults)),[2])}}))}))},i.prototype.updateLowestPrice=function(e){return null},i.prototype.doBooking=function(e,t,r,i,n){var o=t.sourceId,a=t.co2PerItem,s=t.co2PerPassenger,u=t.total,c={adults:this.adults,basket:e.id,children:this.children,co2PerItem:a,co2PerPassenger:s,currency:u.currency,detail:r,price:u.price,searchQuery:this.resultQuery,service:o.toString(),outboundDate:i};n&&(c.inboundDate=n),this.basketService.addToBasket(c,e,this.searchService,this.travellers)},i.prototype.makeSchemaFlights=function(e,t,r,i){return{cabinClass:e.cabinClass,dateTimeArriving:e.dateTimeArriving,dateTimeArrivingUTC:e.dateTimeArrivingUTC,dateTimeDeparting:e.dateTimeDeparting,dateTimeDepartingUTC:e.dateTimeDepartingUTC,destinationAirport:e.destinationAirport,journeyInfo:{flightGroup:t,groupIndex:r,segmentIndex:i},marketingCarrier:e.marketingCarrier,marketingFlightNumber:e.marketingFlightNumber,operatingCarrier:e.operatingCarrier,operatingFlightNumber:e.operatingFlightNumber,originAirport:e.originAirport,totalDuration:e.totalDuration,fareType:e.fareInfo.title}},i.prototype.createGroupedItem=function(e,t,r,i,n,o){if((null==r?void 0:r.length)&&!e.departDateTime){var a=r[0],s=r[r.length-1];e.originAirport=a.originAirport,e.originAirportName=a.originAirportName,e.destinationAirport=s.destinationAirport,e.destinationAirportName=s.destinationAirportName,e.departDateTime=a.dateTimeDeparting,e.arrivalDateTime=s.dateTimeArriving,e.outboundTotalDuration=i,e.dataSource=t,e.operator=a.operatingCarrier,e.operatorFull=a.operatingCarrierName,e.outlegsCount=r.length,e.outlegs=r,e.outboundFlightNumber=this.helpers.joinFromAttribute("-","operatingFlightNumber",r),e.isReturn=!1}(null==n?void 0:n.length)&&!e.inboundTotalDuration&&(e.inboundTotalDuration=o,e.inlegsCount=n.length,e.inlegs=n,e.inboundFlightNumber=this.helpers.joinFromAttribute("-","operatingFlightNumber",n),e.isReturn=!0)},i.prototype.makeSessionResults=function(e){return{results:e,groupData:this.flightsToGroup,grouped:this.grouped,query:this.resultQuery}},i.prototype.getMinFlightPriceForBrand=function(e){var t=Number.MAX_SAFE_INTEGER;return e.forEach((function(e){var r;t>(null===(r=null==e?void 0:e.total)||void 0===r?void 0:r.price)&&(t=e.total.price)})),t},i.prototype.getMaxFlightPriceForBrand=function(e){var t=0;return e.forEach((function(e){var r;t<(null===(r=null==e?void 0:e.total)||void 0===r?void 0:r.price)&&(t=e.total.price)})),t},i.prototype.isOverNight=function(){var e=this.outBoundDate.date();return this.inboundDate.date()-e>=1},i.prototype.addEurostarJourneysToBasket=function(e){return y(this,void 0,void 0,(function(){var t,r,i,n,o,a,s,c,l,d=this;return v(this,(function(p){switch(p.label){case 0:return e.unavailable?[2,Promise.resolve(!1)]:[4,this.basketService.getDefaultBasket()];case 1:return t=p.sent(),(null==t?void 0:t.subject.value)?(r=e.sourceId,i=e.co2PerItem,n=e.co2PerPassenger,o=e.total,a=u.default(e.outboundFlights[0].dateTimeDeparting),s=e.inboundFlights.length?u.default(e.inboundFlights[0].dateTimeDeparting):null,c={outboundFlights:C(e.outboundFlights.map((function(e,t){return d.makeSchemaFlights(e,"outbound",0,t)}))),inboundFlights:C(e.inboundFlights.map((function(e,t){return d.makeSchemaFlights(e,"inbound",0,t)}))),journeyType:"single"},l={adults:this.adults,basket:t.id,children:this.children,co2PerItem:i,co2PerPassenger:n,currency:o.currency,detail:c,price:o.price,searchQuery:this.resultQuery,service:r.toString(),outboundDate:a.format()},s&&(l.inboundDate=s.format(),c.journeyType="roundtrip"),[2,this.basketService.addToBasket(l,t,this.searchService,this.travellers)]):[2,Promise.resolve(!1)]}}))}))},i}(l);it.STORAGE_SESSION_PARAMS="search_eurostar",it.STORAGE_SESSION_RESULTS="results_eurostar",(tt=e.RailSearchCriteria||(e.RailSearchCriteria={})).Depart="Depart After",tt.Arrive="Arrive Before",(rt=e.RailTicketOptionType||(e.RailTicketOptionType={})).Return="Return",rt.Single="Single";var nt,ot=function(i){function n(t,r,o,a,s,c){var l=i.call(this,s)||this;l.Railfetcher=t,l.getRailStationFetcher=r,l.helpers=o,l.basketService=a,l.searchService=c,l.resultsSessionName=n.STORAGE_SESSION_RESULTS,l.searchTypes=[{display:"Return",value:K.ReturnJourney},{display:"One-Way",value:K.SingleJourney}],l.classTypes=[{display:"Any",value:W.All},{display:"Standard",value:W.Standard},{display:"First",value:W.First}],l.airportExpressStations=[{code:"HP1-3",name:"Heathrow T1-3 - Paddington"},{code:"HP4",name:"Heathrow T4 - Paddington"},{code:"HP5",name:"Heathrow T5 - Paddington"},{code:"PH1-3",name:"Paddington - Heathrow T1-3"},{code:"PH4",name:"Paddington - Heathrow T4"},{code:"PH5",name:"Paddington - Heathrow T5"},{code:"GV",name:"Gatwick - Victoria"},{code:"VG",name:"Victoria - Gatwick"},{code:"SL",name:"Stansted - Liverpool Street"},{code:"LS",name:"Liverpool Street - Stansted"}],l.airportExpressStationsCodes={"HP1-3":{dep:"HXX",arr:"PAD"},"PH1-3":{dep:"PAD",arr:"HXX"},HP4:{dep:"HAF",arr:"PAD"},PH4:{dep:"PAD",arr:"HAF"},HP5:{dep:"HWV",arr:"PAD"},PH5:{dep:"PAD",arr:"HWV"},GV:{dep:"GTW",arr:"VIC"},VG:{dep:"VIC",arr:"GTW"},SL:{dep:"SSD",arr:"LST"},LS:{dep:"LST",arr:"SSD"}},l.railCriteria=[e.RailSearchCriteria.Depart,e.RailSearchCriteria.Arrive],l.travelCards=[{display:"Young persons railcard",value:"YNG"},{display:"Disability railcard",value:"DIS"},{display:"Family railcard",value:"FAM"},{display:"Forces railcard",value:"HMF"},{display:"Travel agency discount",value:"TAD"}],l.removePassingPointsFromResults=!0,l.type=Z.Rail,l.minOutboundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},l.minInboundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},l.maxDate={year:u.default().add("month",6).year(),month:u.default().add("month",6).month(),day:u.default().add("month",6).date()},l._outbound_date=null,l._outbound_time=null,l._return_date=null,l._return_time=null,l._cheapestStandard=null,l._cheapestFirst=null;var d=s.getSessionItem(n.STORAGE_SESSION_PARAMS)||{query:{},tempParams:{},originalUserSearch:{}};l.updateTempParams(l.searchService.makeRailQuery(d.tempParams)),l._originalUserSearch=d.originalUserSearch,l._originalUserSearch&&l._originalUserSearch.chosenSearchType&&(l.chosenSearchType=l._originalUserSearch.chosenSearchType),c.shouldAddTravellerSubscription()&&c.travellerInformation.subscribe((function(e){l.travellers=e;var t=l.helpers.selectedTravellers(e,Z.Rail);l.tempParams.noOfAdults=t.adults.length,l.tempParams.noOfChildren=t.children.length,l.travellers=e,l._isValid()})),l._isValid();var p=s.getSessionItemAsList(l.resultsSessionName)||[];return l._cheapestResultPrice=l.updateLowestPrice(p),l.results.next(p||[]),l}return m(n,i),Object.defineProperty(n.prototype,"chosenTicketGroup",{get:function(){return this._chosenTicketGroup},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenTotalPrice",{get:function(){return this._chosenOutboundTicket?this._chosenInboundTicket?this._chosenOutboundTicket.singleOrReturn===e.RailTicketOptionType.Return&&this._chosenInboundTicket.singleOrReturn===e.RailTicketOptionType.Return?this._chosenOutboundTicket.price:this._chosenOutboundTicket.price+this._chosenInboundTicket.price:this._chosenOutboundTicket.price:0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenTickets",{get:function(){return{Outbound:this._chosenOutboundTicket,Inbound:this._chosenInboundTicket}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenOutboundJourney",{get:function(){return this._chosenOutboundJourney},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenInboundJourney",{get:function(){return this._chosenInboundJourney},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"openReturn",{get:function(){return this.tempParams.openReturn},set:function(e){this.tempParams.openReturn=e,e&&(this.tempParams.chosenSearchType=K.OpenReturnJourney),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenSearchType",{get:function(){return this.tempParams.chosenSearchType},set:function(e){this.tempParams.chosenSearchType=e,e===K.SingleJourney&&(this.openReturn=!1),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"noOfAdults",{get:function(){return this.tempParams.noOfAdults},set:function(e){this.tempParams.noOfAdults=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"noOfChildren",{get:function(){return this.tempParams.noOfChildren},set:function(e){this.tempParams.noOfChildren=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"travellingTo",{get:function(){return this.tempParams.travellingTo},set:function(e){var t;this.tempParams.travellingTo=e,this._travellingTo="",(null===(t=null==e?void 0:e.railstation)||void 0===t?void 0:t.id)&&(this._travellingTo=e.railstation.id),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"travellingFrom",{get:function(){return this.tempParams.travellingFrom},set:function(e){var t;this.tempParams.travellingFrom=e,this._travellingFrom="",(null===(t=null==e?void 0:e.railstation)||void 0===t?void 0:t.id)&&(this._travellingFrom=e.railstation.id),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenRailClass",{get:function(){return this.tempParams.chosenSearchClass},set:function(e){this.tempParams.chosenSearchClass=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"chosenSearchClass",{get:function(){return this.tempParams.chosenSearchClass},set:function(e){this.tempParams.chosenSearchClass=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"extraTime",{get:function(){return this.tempParams.extraTime},set:function(e){this.tempParams.extraTime=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"via",{get:function(){return this.tempParams.via},set:function(e){this.tempParams.via=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"viaLocation",{get:function(){return this.tempParams.viaLocation},set:function(e){var t;this.tempParams.viaLocation=e,this._viaLocation="",(null===(t=null==e?void 0:e.railstation)||void 0===t?void 0:t.id)&&(this._viaLocation=e.railstation.id),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"outBoundDateTime",{get:function(){return this.tempParams.outBoundDateTime},set:function(e){this.tempParams.outBoundDateTime=e,e&&e.isValid()&&(this._outbound_date=this.helpers.momentToNgDate(e),this._outbound_time=u.default(e).format("HHmm")?u.default(e).format("HHmm"):"0700"),this.minInboundDate={year:e.year(),month:e.month()+1,day:e.date()},this.outBoundDateTime&&this.inBoundDateTime&&this.outBoundDateTime.isAfter(this.inBoundDateTime)&&(this.inBoundDateTime=this.inBoundDateTime.set("date",e.date()).set("month",e.month()).set("year",e.year())),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"outboundCriteria",{get:function(){return this.tempParams.outboundCriteria},set:function(e){this.tempParams.outboundCriteria=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"inBoundDateTime",{get:function(){return this.tempParams.inBoundDateTime},set:function(e){this.tempParams.inBoundDateTime=e,e&&e.isValid()&&(this._return_date=this.helpers.momentToNgDate(e),this._return_time=u.default(e).format("HHmm")?u.default(e).format("HHmm"):"1600"),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"outbound_date",{get:function(){return this._outbound_date},set:function(e){this._outbound_date=e,this._updateOutboundDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"outbound_time",{get:function(){return this._outbound_time},set:function(e){this._outbound_time=e,this._updateOutboundDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"return_date",{get:function(){return this._return_date},set:function(e){this._return_date=e,this._updateReturnDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"return_time",{get:function(){return this._return_time},set:function(e){this._return_time=e,this._updateReturnDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"returnCriteria",{get:function(){return this.tempParams.returnCriteria},set:function(e){this.tempParams.returnCriteria=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"carnetTicket",{get:function(){return this.tempParams.carnetTicket},set:function(e){this.tempParams.carnetTicket=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disableAutoDiscounts",{get:function(){return this.tempParams.disableAutoDiscounts},set:function(e){this.tempParams.disableAutoDiscounts=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prioritiseByPrice",{get:function(){return this.tempParams.prioritiseByPrice},set:function(e){this.tempParams.prioritiseByPrice=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"applyRailcards",{get:function(){return this.tempParams.applyRailcards},set:function(e){this.tempParams.applyRailcards=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"railCards",{get:function(){return this.tempParams.railCards},set:function(e){this.tempParams.railCards=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"timeArray",{get:function(){return this._timeArray=this._timeArray||Array(48).fill(0).map((function(e,t){return{value:Math.floor(t/2).toString().padStart(2,"0")+(t%2*30).toString().padStart(2,"0"),display:Math.floor(t/2).toString().padStart(2,"0")+":"+(t%2*30).toString().padStart(2,"0")}})),this._timeArray},enumerable:!1,configurable:!0}),n.prototype.getAirportExpressStations=function(){return this.airportExpressStations},Object.defineProperty(n.prototype,"airportExpressStation",{get:function(){return this.tempParams.airportExpressStation},set:function(e){this.tempParams.airportExpressStation=e,this._setAirportExpressStations(),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isAirportExpress",{get:function(){return this.tempParams.isAirportExpress},set:function(e){this.tempParams.isAirportExpress=e,this.tempParams.openReturn=e,this.tempParams.chosenSearchType=e?K.OpenReturnJourney:K.ReturnJourney,this._isValid()},enumerable:!1,configurable:!0}),n.prototype.setAirportExpressStationIds=function(e){var t=e.departureLocationId,r=e.arrivalLocationId;t&&r&&(this._travellingFrom=t,this._travellingTo=r,this._isValid())},Object.defineProperty(n.prototype,"cheapestStandard",{get:function(){return this._cheapestStandard},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cheapestFirst",{get:function(){return this._cheapestFirst},enumerable:!1,configurable:!0}),n.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeRailQuery()),this._isValid()},n.prototype._setAirportExpressStations=function(){var e=this.airportExpressStationsCodes[this.airportExpressStation];console.log("--- Parsed Station is :",e),e&&(this._travellingFrom=e.dep,this._travellingTo=e.arr)},n.prototype._isValid=function(){var e,t;this.storageService.setSessionItem(n.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch}),this.validationMessages=[];var r=u.default();this._travellingFrom||this.validationMessages.push("Please Enter a From Location."),this._travellingTo||this.validationMessages.push("Please Enter a To Location."),(null===(e=this.outBoundDateTime)||void 0===e?void 0:e.isBefore(r))&&this.validationMessages.push("Departure Date/Time cannot be in the past."),this.chosenSearchType!==K.ReturnJourney&&this.chosenSearchType!==K.DualSingleJourney||(null===(t=this.inBoundDateTime)||void 0===t?void 0:t.isSameOrBefore(this.outBoundDateTime))&&this.validationMessages.push("Return Date/Time must be after Departure Date/Time"),this.via&&(this.tempParams.viaLocation||this.validationMessages.push("Please enter a via location.")),this.tempParams.noOfAdults+this.tempParams.noOfChildren<1&&this.validationMessages.push("There must be at least 1 traveller"),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages)},n.prototype.startSearch=function(){var e=this;if(this.results.next([]),this.isValid.value){this._originalUserSearch=Object.freeze(Object.assign({},this.tempParams)),this.storageService.setSessionItem(n.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch});var t=this.getSearchQuery();return this.searchService.saveRecentSearch(this.getRecentSearchQuery(t)),this._startSearch(this.Railfetcher.fetchList(t).pipe(r.map((function(t){return e.removePassingPointsFromResults&&(t=e._removeCallingPoints(t)),t}))))}return Promise.resolve(!1)},n.prototype.getRecentSearchQuery=function(e){var t=e;return this.isAirportExpress&&(t.isAirportExpress=this.isAirportExpress),this.airportExpressStation&&(t.airportExpressStation=this.airportExpressStation),{serviceType:Z.Rail,searchArgs:t,travelDate:this.outBoundDateTime.format(),travellers:this.helpers.getTravellersId(this.travellers)}},n.prototype.startRecentSearch=function(e){var r,i,n=this;this.chosenSearchType=e.searchArgs.journeyType,this.chosenSearchClass=e.searchArgs.class,this.extraTime=e.searchArgs.extraTimeToChange,this.isAirportExpress=e.searchArgs.isAirportExpress,this.airportExpressStation=e.searchArgs.airportExpressStation,this.outBoundDateTime=e.searchArgs.outboundDepartureDateTime?u.default(e.searchArgs.outboundDepartureDateTime):u.default(e.searchArgs.outboundArrivalDateTime),this.outboundCriteria=this.getCriteria(e.searchArgs.outboundDepartureDateTime,e.searchArgs.outboundArrivalDateTime),e.searchArgs.journeyType===K.ReturnJourney&&(this.inBoundDateTime=e.searchArgs.returnDepartureDateTime?u.default(e.searchArgs.returnDepartureDateTime):u.default(e.searchArgs.returnArrivalDateTime),this.returnCriteria=this.getCriteria(e.searchArgs.returnDepartureDateTime,e.searchArgs.returnArrivalDateTime)),e.searchArgs.journeyType===K.OpenReturnJourney&&(this.openReturn=!0),this.applyRailcards=!!(null===(i=null===(r=e.searchArgs)||void 0===r?void 0:r.railCardQualifiers)||void 0===i?void 0:i.length),this.applyRailcards&&(this.railCards=e.searchArgs.railCardQualifiers),t.combineLatest([this.getRailStationById(e.searchArgs.departureLocationId),this.getRailStationById(e.searchArgs.arrivalLocationId)]).subscribe((function(t){var r=S(t,2),i=r[0],o=r[1];i&&o&&(n.travellingTo={name:o.name,railstation:{id:o.id,name:o.name,nlcCode:o.nlcCode,stationCode:o.stationCode,trainlineCode:o.trainlineCode,trainlineUniqueCode:o.trainlineUniqueCode}},n.travellingFrom={name:i.name,railstation:{id:i.id,name:i.name,nlcCode:i.nlcCode,stationCode:i.stationCode,trainlineCode:i.trainlineCode,trainlineUniqueCode:i.trainlineUniqueCode}},e.searchArgs.viaLocationId&&(n.via=!0,n.getRailStationById(e.searchArgs.viaLocationId).subscribe((function(e){n.viaLocation={name:e.name,railstation:{id:e.id,name:e.name,nlcCode:e.nlcCode,stationCode:e.stationCode,trainlineCode:e.trainlineCode,trainlineUniqueCode:e.trainlineUniqueCode}},n.searchService.startSearches()}))),n.searchService.startSearches())}))},n.prototype._removeCallingPoints=function(e){return e[0].outbound=e[0].outbound.map((function(e){return e.segments.map((function(e){return e.callingPoints=e.callingPoints.filter((function(e){return e.stoppingPattern!==n.PASSING_POINT})),e})),e})),e},n.prototype._updateOutboundDateTime=function(){if(this._outbound_date&&this._outbound_time){var e=this.helpers.ngDateToMoment(this._outbound_date,this._outbound_time);this.outBoundDateTime=e.isValid()?e:null,this._isValid()}},n.prototype._updateReturnDateTime=function(){if(this._return_date&&this._return_time){var e=this.helpers.ngDateToMoment(this._return_date,this._return_time);this.inBoundDateTime=e.isValid()?e:null,this._isValid()}},n.prototype.getSearchQuery=function(){var t,r={countryCode:"GB",journeyType:this.tempParams.chosenSearchType,adults:this.tempParams.noOfAdults,arrivalLocationId:this._travellingTo,departureLocationId:this._travellingFrom,children:this.tempParams.noOfChildren,class:this.tempParams.chosenSearchClass,extraTimeToChange:this.tempParams.extraTime,outboundArrivalDateTime:this.tempParams.outBoundDateTime,outboundDepartureDateTime:this.tempParams.outBoundDateTime,returnArrivalDateTime:this.tempParams.inBoundDateTime,returnDepartureDateTime:this.tempParams.inBoundDateTime,viaLocationId:this._viaLocation,railCardQualifiers:null===(t=this.tempParams.railCards)||void 0===t?void 0:t.map((function(e){return e.code}))};switch(0===this.tempParams.noOfChildren&&(r.children=null),""===this._viaLocation&&(r.viaLocationId=null),this.tempParams.outboundCriteria){case e.RailSearchCriteria.Depart:r.outboundArrivalDateTime=null;break;case e.RailSearchCriteria.Arrive:r.outboundDepartureDateTime=null;break;default:console.warn("+++ Unknown Criteria: "+this.tempParams.outboundCriteria+" +++")}switch(this.tempParams.returnCriteria){case e.RailSearchCriteria.Depart:r.returnArrivalDateTime=null;break;case e.RailSearchCriteria.Arrive:r.returnDepartureDateTime=null;break;default:console.warn("+++ Unknown Criteria: "+this.tempParams.returnCriteria+" +++")}switch(this.tempParams.chosenSearchType){case K.SingleJourney:case K.OpenReturnJourney:r.returnDepartureDateTime=null,r.returnArrivalDateTime=null}return this.helpers.removeNulls(r)},n.prototype.getRailStationById=function(e){return e?this.getRailStationFetcher.fetchList({id:e}).pipe(r.take(1)):t.of()},n.prototype.getCriteria=function(t,r){return t?e.RailSearchCriteria.Depart:r?e.RailSearchCriteria.Arrive:null},n.prototype.createTicketGroups=function(t){var r=this,i={},n="";this._canCombine={};var o=this.setTicketsGroups(t[0].outbound),a=this.setTicketsGroups(t[0].return);o=this.sortTicketPrices(o),a=this.sortTicketPrices(a),Object.keys(o).map((function(t){o[t].map((function(o){n=""+o.type+o.singleOrReturn;var a=o.identifiers.journeyIdentifier,s={};if(s[a]={price:o.price,isChild:!1,fareIdentifier:o.identifiers.fareIdentifier,availableSeats:o.availableSeats},i[t]){if(r.updateCanCombine(o),s[o.identifiers.journeyIdentifier].isChild=!1,i[o.type].header.price===o.price)i[o.type].resultIndifiers.push(a),i[o.type].resultIndifiersPrices=Object.assign(Object.assign({},i[o.type].resultIndifiersPrices),s);else if(o.price){i[o.type].resultIndifiers.includes(a)||(i[o.type].resultIndifiers.push(a),i[o.type].resultIndifiersPrices=Object.assign(Object.assign({},i[o.type].resultIndifiersPrices),s)),s[a].isChild=!0;var u={header:o,children:[],open:!1,direction:e.RailDirection.Outbound,resultIndifiers:[a],resultIndifiersPrices:s,child:!0,ticketId:n,selectedIndicies:[],disabledIndicies:[],showLimitedSeats:!1};i[o.type].children.push(u)}}else r._canCombine[o.type]={},r.updateCanCombine(o),i[o.type]={header:o,children:[],open:!1,direction:e.RailDirection.Outbound,resultIndifiers:[a],resultIndifiersPrices:s,child:!1,ticketId:n,selectedIndicies:[],disabledIndicies:[],showLimitedSeats:!1}}))})),Object.keys(a).map((function(t){a[t].map((function(t){n=""+t.type+t.singleOrReturn;var o=t.identifiers.journeyIdentifier,a={};if(a[o]={price:t.price,isChild:!0,fareIdentifier:t.identifiers.fareIdentifier,availableSeats:t.availableSeats},i[t.type]&&t.price&&t.price!==i[t.type].header.price){r.updateCanCombine(t),a[o].isChild=!0;var s={header:t,children:[],open:!1,direction:e.RailDirection.Inbound,resultIndifiers:[o],resultIndifiersPrices:a,child:!0,ticketId:n,selectedIndicies:[],disabledIndicies:[],showLimitedSeats:!1};i[t.type].children.push(s)}else i[t.type]?t.price&&t.price!==i[t.type].header.price||(r.updateCanCombine(t),i[t.type].resultIndifiers.push(o),a[o].isChild=!1,i[t.type].resultIndifiersPrices=Object.assign(Object.assign({},i[t.type].resultIndifiersPrices),a)):(r.updateCanCombine(t),i[t.type]={header:t,children:[],open:!1,direction:e.RailDirection.Inbound,resultIndifiers:[o],resultIndifiersPrices:a,child:!1,ticketId:n,selectedIndicies:[],disabledIndicies:[],showLimitedSeats:!1})}))}));var s=Object.assign({},i);return i=this.combineChildTickets(s)},n.prototype.combineChildTickets=function(e){for(var t=Object.values(e),r=0;r<t.length;r++){for(var i={},n=0;n<t[r].children.length;n++){var o=t[r].children[n],a=o.header.identifiers.fareIdentifier;i[a]?(i[a].resultIndifiers.push(o.resultIndifiers[0]),i[a].resultIndifiersPrices=Object.assign(Object.assign({},i[a].resultIndifiersPrices),o.resultIndifiersPrices)):i[a]=o}e[t[r].header.type].children=Object.values(i)}return e=this.sortTicketChildrenPrices(e)},n.prototype.setTicketsGroups=function(e){var t={};return e.forEach((function(e){e.providers.forEach((function(e){e.ticketOptions.forEach((function(e){t[e.type]?t[e.type].push(e):t[e.type]=[e]}))}))})),t},n.prototype.updateFromPreviousSearches=function(e){},n.prototype.updateCanCombine=function(e){var t=this;(e.identifiers.allowedWith||[]).forEach((function(r){t._canCombine[e.type][r.journeyIdentifier]?t._canCombine[e.type][r.journeyIdentifier].push(r.fareIdentifier):t._canCombine[e.type][r.journeyIdentifier]=[r.fareIdentifier]}))},n.prototype.toggleTicketSelect=function(t,r,i,n,o,a){var s=this;if(console.log(t),t){this._chosenTicketGroup=t;var u=Object.keys(a),c=null,l=[],d=[],p=!1;return u.forEach((function(t){var u=a[t];u.ticketId===n&&u.selectedIndicies.includes(i)?"departs"===r?(u.selectedIndicies=[],l=[],d=[],s._chosenInboundTicket=null,s._chosenInboundJourney=null,s._chosenTicketGroup=null,u.children.forEach((function(e){e.selectedIndicies=[]}))):(u.selectedIndicies=u.selectedIndicies.filter((function(e){return e!==i})),d=d.filter((function(e){return e!==u.header}))):(u.ticketId===n&&u.header.identifiers.fareIdentifier===o&&"departs"===r?((u=s.clearUnneededTickets(r,u,i)).selectedIndicies.push(i),"departs"===r?l.push(u.header):d.push(u.header),c=u.header):"departs"===r?u.selectedIndicies=[]:n.includes(u.header.type)&&(c=u.header),u.children.forEach((function(t){t.selectedIndicies.includes(i)?"departs"===r?(t.selectedIndicies=[],l=[],d=[],s._chosenInboundTicket=null,s._chosenInboundJourney=null,p=!0):(t.selectedIndicies=t.selectedIndicies.filter((function(e){return e!==i})),d=d.filter((function(e){return e!==u.header}))):t.ticketId===n&&t.header.identifiers.fareIdentifier===o?"departs"===r&&t.direction!==e.RailDirection.Inbound||"departs"!==r&&t.direction===e.RailDirection.Inbound?((t=s.clearUnneededTickets(r,t,i)).selectedIndicies.push(i),"departs"===r?l.push(t.header):d.push(t.header),c=t.header):p&&(t.selectedIndicies=[]):t.selectedIndicies=[]})))})),"departs"===r?(this._chosenOutboundTicket=this.helpers.clone(c),l.length?this._chosenOutboundJourney=this.results.value[0].outbound.find((function(e){return e.identifiers.journeyIdentifier===i})):this._chosenOutboundJourney=null,this._chosenInboundTicket&&this._chosenOutboundTicket.singleOrReturn===e.RailTicketOptionType.Return&&this._chosenOutboundTicket.identifiers.fareIdentifier!==this._chosenInboundTicket.identifiers.fareIdentifier&&(console.warn("+++ Cannot combine fares, clearing inbound... +++"),this._chosenInboundTicket=null,this._chosenInboundJourney=null)):"returns"===r&&(this._chosenInboundTicket=this.helpers.clone(c),this._chosenInboundTicket?this._chosenInboundJourney=this.results.value[0].return.find((function(e){return e.identifiers.journeyIdentifier===i})):this._chosenInboundJourney=null),a}},n.prototype.canCombine=function(t,r){var i;try{if(this._chosenOutboundTicket&&this._chosenOutboundTicket.singleOrReturn===e.RailTicketOptionType.Return&&Number(t)>5)return!(!(null===(i=this._canCombine[this._chosenOutboundTicket.type][Number(t)])||void 0===i?void 0:i.includes(r))||this._chosenOutboundTicket.identifiers.fareIdentifier!==r)}catch(e){console.error("+++ Error combining rail fares: ",e," +++")}return!1},n.prototype.clearUnneededTickets=function(e,t,r){return t.selectedIndicies="returns"===e?t.selectedIndicies.filter((function(e){return Number(e)<=5||e===r})):t.selectedIndicies.filter((function(e){return Number(e)>5||e===r})),t},n.prototype.getRailStation=function(e,i){return 3===e.length?(null==i||i.next(!0),this.getRailStationFetcher.fetchList({code:e}).pipe(r.tap((function(){return null==i?void 0:i.next(!1)})),r.take(1))):t.of()},n.prototype.getSelectedRailTicketOption=function(e,t,r){return e.providers[r].ticketOptions.find((function(e){return e.type===t.header.type&&(e.price===t.header.price||e.identifiers.fareIdentifier===t.header.identifiers.fareIdentifier)}))},n.prototype.getLegsFromRailJourneyOption=function(e){var t=[];return(null==e?void 0:e.segments.length)&&(t=e.segments.map((function(e){return{operator:e.operator,departureDateTime:e.departDateTime,departureStationName:e.depart,arrivalDateTime:e.arriveDateTime,arrivalStationName:e.arrive}}))),t},n.prototype.addSingleJourneyToBasket=function(e,t,r,i){return y(this,void 0,void 0,(function(){var n,o,a,s,u,c,l;return v(this,(function(d){switch(d.label){case 0:return r.ticketExtras&&(n=this.createTicketExtrasObject(r.ticketExtras[0])),r.unsellable?[2,Promise.resolve(!1)]:[4,this.basketService.getDefaultBasket()];case 1:return o=d.sent(),(a=null==o?void 0:o.subject.value)?(s=this.getSelectedRailTicketOption(r,i,0),u=this.getLegsFromRailJourneyOption(r),c=s.ticketQueueList.map((function(e){return{id:e.id,name:e.name,type:e.type}})),l={basket:a.id,service:e,detail:{accountsList:s.accountsList.map((function(e){return{id:e.id,description:e.description}})),outwardDetail:{arrivalDateTime:r.arriveDateTime,arrivalStationName:r.to,departureDateTime:r.departDateTime,departureStationName:r.from,supplierTickets:[{supplierName:r.providers[0].name,ticketDescription:s.type,price:s.price,legs:u}]},transactionIdentifier:r.identifiers.transactionIdentifier,outbound:{fareIdentifiers:[s.identifiers.fareIdentifier],journeyIdentifier:s.identifiers.journeyIdentifier},ticketQueueList:c},adults:t.adults,price:s.price,currency:s.currency,searchQuery:t,co2PerItem:r.co2PerItem,co2PerPassenger:r.co2PerPassenger,outboundDate:r.departDateTime},n&&(l.detail.outbound.ticketExtras=n),[2,this.basketService.addToBasket(l,o,this.searchService,this.travellers)]):[2,Promise.resolve(!1)]}}))}))},n.prototype.addReturnJourneyToBasket=function(e,t,r,i,n){return y(this,void 0,void 0,(function(){var o,a,s,u,c,l,d,p,h,m;return v(this,(function(f){switch(f.label){case 0:return r.unsellable?[2,Promise.resolve(!1)]:(i.ticketExtras&&(o=this.createTicketExtrasObject(i.ticketExtras[0])),r.ticketExtras&&(a=this.createTicketExtrasObject(r.ticketExtras[0])),[4,this.basketService.getDefaultBasket()]);case 1:return s=f.sent(),(u=null==s?void 0:s.subject.value)?(c=this.getSelectedRailTicketOption(r,n,0),l=this.getSelectedRailTicketOption(i,n,0),d=this.getLegsFromRailJourneyOption(r),p=this.getLegsFromRailJourneyOption(i),h=c.ticketQueueList.map((function(e){return{id:e.id,name:e.name,type:e.type}})),m={basket:u.id,service:e,detail:{accountsList:c.accountsList.map((function(e){return{id:e.id,description:e.description}})),outwardDetail:{arrivalDateTime:r.arriveDateTime,arrivalStationName:r.to,departureDateTime:r.departDateTime,departureStationName:r.from,supplierTickets:[{supplierName:r.providers[0].name,ticketDescription:c.type,price:c.price,legs:d}]},inwardDetail:{arrivalDateTime:i.arriveDateTime,arrivalStationName:i.to,departureDateTime:i.departDateTime,departureStationName:i.from,supplierTickets:[{supplierName:i.providers[0].name,ticketDescription:c.type,legs:p}]},transactionIdentifier:r.identifiers.transactionIdentifier,outbound:{fareIdentifiers:[c.identifiers.fareIdentifier],journeyIdentifier:c.identifiers.journeyIdentifier},ticketQueueList:h,return:{fareIdentifiers:[l.identifiers.fareIdentifier],journeyIdentifier:l.identifiers.journeyIdentifier}},adults:t.adults,price:n.header.price,currency:c.currency,searchQuery:t,co2PerItem:r.co2PerItem,co2PerPassenger:r.co2PerPassenger,outboundDate:r.arriveDateTime,inboundDate:i.arriveDateTime},o&&(m.detail.return.ticketExtras=o),a&&(m.detail.outbound.ticketExtras=a),[2,this.basketService.addToBasket(m,s,this.searchService,this.travellers)]):[2,Promise.resolve(!1)]}}))}))},n.prototype.createTicketExtrasObject=function(e){return[{type:e.description,location:e.location,date:e.date}]},n.prototype.sortTicketPrices=function(e){var t=Object.assign({},e);return Object.keys(t).map((function(e){t[e].sort((function(e,t){var r=e.price,i=t.price;return r<i?-1:r>i?1:0}))})),t},n.prototype.sortTicketChildrenPrices=function(e){var t=Object.assign({},e);return Object.keys(t).map((function(e){t[e].children.sort((function(e,t){var r=e.header.price,i=t.header.price;return r<i?-1:r>i?1:0}))})),t},n.prototype.updateLowestPrice=function(e){if(!e.length)return null;var t;try{t=e[0].outbound[0].providers[0].ticketOptions[0].currency}catch(e){t="GBP"}return{amount:this.findCheapestTicket(e),currencyCode:t}},n.prototype.findCheapestTicket=function(e){var t=this;if(this._cheapestFirst=null,this._cheapestStandard=null,!e.length)return null;var r=[];return e.map((function(e){e.outbound.map((function(e){e.providers.map((function(e){var i=e.ticketOptions[0].price;e.ticketOptions.map((function(e){var n,o,a=e.price,s=e.class;"First"===s&&((null===(n=t._cheapestFirst)||void 0===n?void 0:n.price)>a||!t._cheapestFirst)?t._cheapestFirst=e:"Standard"===s&&((null===(o=t._cheapestStandard)||void 0===o?void 0:o.price)>a||!t._cheapestStandard)&&(t._cheapestStandard=e),a===i&&r.push(i)}))}))}))})),Math.min.apply(Math,C(r))},n.prototype.calculateTimeDifferenceInMins=function(e){return this.helpers.getTimeDifference(e.arriveDateTime,e.departDateTime).toString()},n.prototype.ticketIsAnETicket=function(e){return!!e.ticketQueueList.find((function(e){return"eTicket"===e.type}))||null},n.prototype.clearChosenTickets=function(){this._chosenInboundTicket=null,this._chosenOutboundTicket=null,this._chosenInboundJourney=null,this._chosenOutboundJourney=null,this._chosenTicketGroup=null},n}(l);ot.STORAGE_SESSION_PARAMS="search_rail",ot.STORAGE_SESSION_RESULTS="rail_results",ot.PASSING_POINT="Passing",(nt=e.IrlSearchCriteria||(e.IrlSearchCriteria={})).Depart="Depart After",nt.Arrive="Arrive Before";var at=function(t){function i(r,n,o,a,s){var c=t.call(this,a)||this;c.Irlfetcher=r,c.helpers=n,c.basketService=o,c.searchService=s,c.resultsSessionName=i.STORAGE_SESSION_RESULTS,c.searchTypes=[{display:"Return",value:U.ReturnJourney},{display:"One-Way",value:U.SingleJourney}],c.classTypes=[{display:"Any",value:x.All},{display:"Standard",value:x.Standard},{display:"First",value:x.First}],c.ageRanges=[{key:"child",value:"Child (0-3)"},{key:"child",value:"Child (4-5)"},{key:"child",value:"Child (6-11)"},{key:"youth",value:"Youth (12-14)"},{key:"youth",value:"Youth (15-25)"},{key:"adult",value:"Adult (26-59)"},{key:"senior",value:"Senior (60+)"}],c.railCriteria=[e.IrlSearchCriteria.Depart,e.IrlSearchCriteria.Arrive],c.travelCards=[{display:"Young persons railcard",value:"YNG"},{display:"Disability railcard",value:"DIS"},{display:"Family railcard",value:"FAM"},{display:"Forces railcard",value:"HMF"},{display:"Travel agency discount",value:"TAD"}],c.type=Z.InternationalRail,c.minOutboundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},c.minInboundDate={year:u.default().year(),month:u.default().month()+1,day:u.default().date()},c._supplier=null,c._countryCode=null,c._class=null,c._outboundDepartureDateTime=null,c._departureLocationId=null,c._arrivalLocationId=null,c._adults=0,c._children=0,c._returnDepartureDateTime=null,c._ageRange=null,c._outbound_date=null,c._outbound_time=null,c._return_date=null,c._return_time=null,c._cheapestStandard=null,c._cheapestFirst=null,c._irlClass=null,c._journeytype=null;var l=a.getSessionItem(i.STORAGE_SESSION_PARAMS)||{query:{},tempParams:{},originalUserSearch:{}};c.updateTempParams(c.searchService.makeIrlQuery(l.tempParams)),c._originalUserSearch=l.originalUserSearch,s.shouldAddTravellerSubscription()&&s.travellerInformation.subscribe((function(e){c.travellers=e;var t=c.helpers.selectedTravellers(e,Z.Rail);c.tempParams.adults=t.adults.length,c.tempParams.children=t.children.length,c.travellers=e,c._isValid()})),c._isValid();var d=a.getSessionItemAsList(c.resultsSessionName)||[];return c._cheapestResultPrice=c.updateLowestPrice(d),c.results.next(d||[]),c}return m(i,t),Object.defineProperty(i.prototype,"noOfAdults",{get:function(){return this.tempParams.adults},set:function(e){this.tempParams.adults=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"noOfChildren",{get:function(){return this.tempParams.children},set:function(e){this.tempParams.children=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"travellingTo",{get:function(){return this.tempParams.arrivalLocationId},set:function(e){var t;this.tempParams.arrivalLocationId=e,this._travellingTo="",(null===(t=null==e?void 0:e.railstation)||void 0===t?void 0:t.id)&&(this._travellingTo=e.railstation.id),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"travellingFrom",{get:function(){return this.tempParams.departureLocationId},set:function(e){var t;this.tempParams.departureLocationId=e,this._travellingFrom="",(null===(t=null==e?void 0:e.railstation)||void 0===t?void 0:t.id)&&(this._travellingFrom=e.railstation.id),this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"supplier",{get:function(){return this._supplier},set:function(e){this._supplier=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"countryCode",{get:function(){return this._countryCode},set:function(e){this._countryCode=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"class",{get:function(){return this._class},set:function(e){this._class=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outboundDepartureDateTime",{get:function(){return this._outboundDepartureDateTime},set:function(e){this._outboundDepartureDateTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"departureLocationId",{get:function(){return this._departureLocationId},set:function(e){this._departureLocationId=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arrivalLocationId",{get:function(){return this._arrivalLocationId},set:function(e){this._arrivalLocationId=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"adults",{get:function(){return this._adults},set:function(e){this._adults=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"children",{get:function(){return this._children},set:function(e){this._children=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"returnDepartureDateTime",{get:function(){return this._returnDepartureDateTime},set:function(e){this._returnDepartureDateTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"ageRange",{get:function(){return this._ageRange},set:function(e){this._ageRange=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"chosenSearchClass",{get:function(){return this.tempParams.class},set:function(e){this.tempParams.class=e,this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outBoundDateTime",{get:function(){return this.tempParams.outboundDepartureDateTime},set:function(e){this.tempParams.outboundDepartureDateTime=u.default(e),this.minInboundDate={year:e.year(),month:e.month()+1,day:e.date()},this._isValid()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outbound_date",{get:function(){return this._outbound_date},set:function(e){this._outbound_date=e,this._updateOutboundDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"outbound_time",{get:function(){return this._outbound_time},set:function(e){this._outbound_time=e,this._updateOutboundDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"return_date",{get:function(){return this._return_date},set:function(e){this._return_date=e,this._updateReturnDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"return_time",{get:function(){return this._return_time},set:function(e){this._return_time=e,this._updateReturnDateTime()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"timeArray",{get:function(){return this._timeArray=this._timeArray||Array(48).fill(0).map((function(e,t){return{value:Math.floor(t/2).toString().padStart(2,"0")+(t%2*30).toString().padStart(2,"0"),display:Math.floor(t/2).toString().padStart(2,"0")+":"+(t%2*30).toString().padStart(2,"0")}})),this._timeArray},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cheapestStandard",{get:function(){return this._cheapestStandard},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cheapestFirst",{get:function(){return this._cheapestFirst},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"irlClass",{get:function(){return this._irlClass},set:function(e){this._irlClass=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"journeyType",{get:function(){return this._journeytype},set:function(e){this._journeytype=e},enumerable:!1,configurable:!0}),i.prototype.resetQuery=function(){this.updateTempParams(this.searchService.makeIrlQuery()),this._isValid()},i.prototype._isValid=function(){var e;this.storageService.setSessionItem(i.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch}),this.validationMessages=[];var t=u.default();this._travellingFrom||this.validationMessages.push("Please Enter a From Location."),this._travellingTo||this.validationMessages.push("Please Enter a To Location."),(null===(e=this.outBoundDateTime)||void 0===e?void 0:e.isBefore(t))&&this.validationMessages.push("Departure Date/Time cannot be in the past."),this.tempParams.adults+this.tempParams.children<1&&this.validationMessages.push("There must be at least 1 traveller"),this.isValid.next(0===this.validationMessages.length),this.messages.next(this.validationMessages)},i.prototype.startSearch=function(){return this.results.next([]),this.isValid.value?(this._originalUserSearch=Object.freeze(Object.assign({},this.tempParams)),this.storageService.setSessionItem(i.STORAGE_SESSION_PARAMS,{tempParams:this.tempParams,originalUserSearch:this.originalUserSearch}),this._startSearch(this.Irlfetcher.fetchList(this.getSearchQuery()).pipe(r.map((function(e){return e}))))):Promise.resolve(!1)},i.prototype.startRecentSearch=function(e){this.startSearch()},i.prototype._updateOutboundDateTime=function(){if(this._outbound_date&&this._outbound_time){var e=this.helpers.ngDateToMoment(this._outbound_date,this._outbound_time);this.outBoundDateTime=e.isValid()?e:null,this._isValid()}},i.prototype._updateReturnDateTime=function(){if(this._return_date&&this._return_time){this.helpers.ngDateToMoment(this._return_date,this._return_time);this._isValid()}},i.prototype.getSearchQuery=function(){var e={supplier:this.supplier,countryCode:"GB",class:this.irlClass,outboundDepartureDateTime:this.tempParams.outboundDepartureDateTime,departureLocationId:this._travellingFrom,arrivalLocationId:this._travellingTo,adults:this.tempParams.adults,children:this.tempParams.children,returnDepartureDateTime:this.tempParams.returnDepartureDateTime,journeyType:this.tempParams.journeyType};switch(0===this.tempParams.children&&(e.children=null),this.tempParams.journeyType){case U.SingleJourney:e.returnDepartureDateTime=null}return this.helpers.removeNulls(e)},i.prototype.combineChildTickets=function(e){for(var t=Object.values(e),r=0;r<t.length;r++){for(var i={},n=0;n<t[r].children.length;n++){var o=t[r].children[n],a=o.header.identifiers.fareIdentifier;i[a]?(i[a].resultIndifiers.push(o.resultIndifiers[0]),i[a].resultIndifiersPrices=Object.assign(Object.assign({},i[a].resultIndifiersPrices),o.resultIndifiersPrices)):i[a]=o}e[t[r].header.type].children=Object.values(i)}return e},i.prototype.setTicketsGroups=function(e){var t={};return e.forEach((function(e){e.providers.forEach((function(e){e.ticketOptions.forEach((function(e){t[e.type]?t[e.type].push(e):t[e.type]=[e]}))}))})),t},i.prototype.updateFromPreviousSearches=function(e){},i.prototype.updateCanCombine=function(e){var t=this;(e.identifiers.allowedWith||[]).forEach((function(r){t._canCombine[e.type][r.journeyIdentifier]?t._canCombine[e.type][r.journeyIdentifier].push(r.fareIdentifier):t._canCombine[e.type][r.journeyIdentifier]=[r.fareIdentifier]}))},i.prototype.clearUnneededTickets=function(e,t,r){return t.selectedIndicies="returns"===e?t.selectedIndicies.filter((function(e){return Number(e)<=5||e===r})):t.selectedIndicies.filter((function(e){return Number(e)>5||e===r})),t},i.prototype.getLegsFromRailJourneyOption=function(e){var t=[];return(null==e?void 0:e.segments.length)&&(t=e.segments.map((function(e){return{operator:e.operator,departureDateTime:e.departDateTime,departureStationName:e.depart,arrivalDateTime:e.arriveDateTime,arrivalStationName:e.arrive}}))),t},i.prototype.updateLowestPrice=function(e){if(!e.length)return null;var t=e[0].outbound[0].providers[0].cheapestTicket.currency;return{amount:this.findCheapestTicket(e),currencyCode:t}},i.prototype.findCheapestTicket=function(e){var t=this;if(this._cheapestFirst=null,this._cheapestStandard=null,!e.length)return null;var r=[];return e.map((function(e){e.outbound.map((function(e){e.providers.map((function(e){var i=e.cheapestTicket.price;e.ticketOptions.map((function(e){var n,o,a=e.price,s=e.class;"First"===s&&((null===(n=t._cheapestFirst)||void 0===n?void 0:n.price)>a||!t._cheapestFirst)?t._cheapestFirst=e:"Standard"===s&&((null===(o=t._cheapestStandard)||void 0===o?void 0:o.price)>a||!t._cheapestStandard)&&(t._cheapestStandard=e),a===i&&r.push(i)}))}))}))})),Math.min.apply(Math,C(r))},i}(l);at.STORAGE_SESSION_PARAMS="search_irl",at.STORAGE_SESSION_RESULTS="irl_results",at.PASSING_POINT="Passing";var st={type:"string"},ut={type:"object",properties:{countryCode:st,areaCode:st,number:st,extension:st},required:["countryCode","areaCode","number","extension"]},ct={type:"object",properties:{numberOrName:st,street:st,town:st,county:st,postcode:st,countryCode:st},required:["numberOrName","street","town","county","postcode","countryCode"]},lt=function(){function e(e){this.helpers=e,this.details={numberOrName:"",street:"",town:"",county:"",postcode:"",countryCode:"GB"},this.bookingAddress=new t.BehaviorSubject([])}return e.prototype.updateDetails=function(e){var t=this;this.bookingAddress.next(e.map((function(e){return t.helpers.sanatizeReturns(t.details,e)})))},e}(),dt=function(){function e(e){this.helpers=e,this.details={countryCode:"",areaCode:"",number:"",extension:""},this.bookingPhoneNUmber=new t.BehaviorSubject([])}return e.prototype.updateDetails=function(e){var t=this;this.bookingPhoneNUmber.next(e.map((function(e){return t.helpers.sanatizeReturns(t.details,e)})))},e}(),pt=function(){function e(e,t,r,i,n,o){this.user=e,this.getUserFetcher=t,this.helpers=r,this.perPassengerPhoneNumber=i,this.perPassengerAddress=n,this.perPassengerSupplementaryBookingInfoSchema=o,this.userDetails=null,this.userInfo={id:e.id,address:null,phoneNumber:null,supplementaryInfo:null}}return Object.defineProperty(e.prototype,"id",{get:function(){return this.user.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userAddress",{get:function(){return null===this.userInfo.address&&this.setUpUserInfo(),this.userInfo.address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userPhoneNumber",{get:function(){return null===this.userInfo.address&&this.setUpUserInfo(),this.userInfo.phoneNumber},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userSupplementaryInfo",{get:function(){return null===this.userInfo.supplementaryInfo&&this.setUpUserInfo(),this.userInfo.supplementaryInfo},enumerable:!1,configurable:!0}),e.prototype.setUpUserInfo=function(){var e=this;this.userInfo.address=new lt(this.helpers),this.userInfo.phoneNumber=new dt(this.helpers),this.userInfo.supplementaryInfo=this.perPassengerSupplementaryBookingInfoSchema,this.user.id&&this.getUserFetcher.fetchOne({id:this.user.id}).pipe(r.take(1)).subscribe((function(t){t&&(e.userDetails=t,e.userInfo.address.updateDetails(null==t?void 0:t.addresses),e.userInfo.phoneNumber.updateDetails(null==t?void 0:t.phoneNumbers))}))},e}(),ht=function(){function t(e,t,r){var i=this;this.basketItem=e,this.helpers=t,this.hasDetails=!1,this.basketItem.perPassengerSupplementaryBookingInfoSchema=e.perPassengerSupplementaryBookingInfoSchema?this.processSchema(this.basketItem.perPassengerSupplementaryBookingInfoSchema):null,this.userInfo=this.basketItem.users.map((function(e){return new pt(e,r,t,i.basketItem.perPassengerPhoneNumber,i.basketItem.perPassengerAddress,i.basketItem.perPassengerSupplementaryBookingInfoSchema)})),this.address=new lt(this.helpers),this.phoneNumber=new dt(this.helpers),this.basketItem.perItemSupplementaryBookingInfoSchema=this.basketItem.perItemSupplementaryBookingInfoSchema?this.processSchema(this.basketItem.perItemSupplementaryBookingInfoSchema||{}):null}return Object.defineProperty(t.prototype,"perItemAddress",{get:function(){return!!this.basketItem.perItemAddress},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"perItemPhoneNumber",{get:function(){return!!this.basketItem.perItemPhoneNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"perItemSupplementarySchema",{get:function(){return this.basketItem.perItemSupplementaryBookingInfoSchema},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"perPassengerAddress",{get:function(){return!!this.basketItem.perPassengerAddress},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"perPassengerPhoneNumber",{get:function(){return!!this.basketItem.perPassengerPhoneNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"perPassengerSupplementaryBookingInfoSchema",{get:function(){return this.basketItem.perPassengerSupplementaryBookingInfoSchema},enumerable:!1,configurable:!0}),t.prototype.processSchema=function(t){var r=this;return console.warn("processing: ",t),t=this.helpers.clone(t),this.hasDetails=this.perItemAddress||this.perItemPhoneNumber||this.perPassengerAddress||this.perPassengerPhoneNumber,Object.keys(t.properties||{}).forEach((function(i){console.log("here: ",i),r.hasDetails=!0;var n=t.properties[i];"object"===n.type&&(t.properties[i]=Object.assign(Object.assign({},r.processSchema(n)),{format:e.SchemaFormat.object})),n.format=n.format||r.schemaWidgetToFormat(n.widget)||r.schemaTypeToFormat(n.type),n.oneOf&&n.oneOf.length>0&&(n.format=e.SchemaFormat.select)})),console.log("+++ has Details: "+this.hasDetails+" +++"),t},t.prototype.schemaWidgetToFormat=function(t){switch(t){case e.Widgets.COUNTRY_CODE:return e.SchemaFormat.countryCode;default:return null}},t.prototype.schemaTypeToFormat=function(t){switch(t){case"string":return e.SchemaFormat.string;case"integer":return e.SchemaFormat.integer;case"object":return e.SchemaFormat.object;case"array":return e.SchemaFormat.array;case"boolean":return e.SchemaFormat.boolean;default:return e.SchemaFormat.string}},t.prototype.createSupplemtalBookingInformation=function(e){var t=this,r={basketItem:this.basketItem.id,userInfo:[],supplementaryInfo:{},paymentMethodDetails:{}};return void 0!==e.perItemAddress&&(r.address=this.helpers.toStrings(e.perItemAddress,ct)),void 0!==e.perItemPhoneNumber&&(r.phoneNumber=this.helpers.toStrings(e.perItemPhoneNumber,ut)),void 0!==e.perItemSupplementarySchema&&(r.supplementaryInfo=this.helpers.toStrings(e.perItemSupplementarySchema,this.perItemSupplementarySchema)),r.userInfo=this.userInfo.map((function(r,i){var n={id:r.id,supplementaryInfo:{}},o=e["user_"+i]||{};return void 0!==o.perPassengerAddress&&(n.address=t.helpers.toStrings(o.perPassengerAddress,ct)),void 0!==o.perPassengerPhoneNumber&&(n.phoneNumber=t.helpers.toStrings(o.perPassengerPhoneNumber,ut)),void 0!==o.perPassengerSupplementaryBookingInfoSchema&&(n.supplementaryInfo=t.helpers.toStrings(o.perPassengerSupplementaryBookingInfoSchema,t.perPassengerSupplementaryBookingInfoSchema)),n})),r},t}(),mt=function(e){this.value=e};mt.MaxFlightClass=new mt("MaxFlightClass"),mt.SSO_no_password=new mt("SSO_no_password");var ft,gt=function(e){this.value=e};gt.non=new gt("non"),gt.EVI=new gt("evi"),(ft=e.IncludedType||(e.IncludedType={})).Leg="leg",ft.Photo="photo",ft.PhotoAttachment="photo_attachment",ft.Upa="upa";var yt=function(e){function t(t,r){var i=e.call(this,r)||this;return i.query=t,i}return m(t,e),t.prototype.fetchOne=function(e){return this.processCall(this.query.fetch(e))},t}(p),vt=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.getUserBasket},t}(yt),bt=function(e){function t(t,r,i){var n=e.call(this,i)||this;return n.query=t,n.helpers=r,n}return m(t,e),t.prototype.fetchList=function(e){return this.processCall(this.query.fetch(e))},t.prototype.fetchKeyedObject=function(e,t){var i=this;return this.processCall(this.query.fetch(t)).pipe(r.map((function(t){return t?i.helpers.arrayToObject(t,e):null})))},t.prototype.fetchKeyedObjectArray=function(e,t){var i=this;return this.processCall(this.query.fetch(t)).pipe(r.map((function(t){return t?i.helpers.arrayToObjectArray(t,e):null})))},t}(p),St=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchCabHire)||void 0===r?void 0:r.results},t}(bt),Ct=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchCarHire)||void 0===r?void 0:r.results},t}(bt),Tt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.carHireAvailabilityDetailRequest},t}(bt),Pt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchFlightsV2)||void 0===r?void 0:r.results},t}(bt),_t=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getRailStation},t}(bt),At=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.getUserBaskets},t}(bt),Dt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.getUserRecentSearches},t}(bt),kt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.getUserMIAutoSuggestValues},t}(bt),Ot=function(e){function i(t,r,i){return e.call(this,t,r,i)||this}return m(i,e),i.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getMultipleHotelsAvailability.results},i.prototype.processCall=function(e){var i=this;return e.pipe(r.take(1),r.map((function(e){return i.checkError(e.errors),i.getDataFromResult(e)})),r.catchError((function(e){return i.checkError(e),t.of({})})))},i}(bt),Ft=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchHotels)||void 0===r?void 0:r.results},t}(bt),Nt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchLounges)||void 0===r?void 0:r.results},t}(bt),It=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchParking)||void 0===r?void 0:r.results},t}(bt),Rt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchRail)||void 0===r?void 0:r.results},t}(bt),Et=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchIrl)||void 0===r?void 0:r.results},t}(bt),Mt=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.searchAirlines},t}(yt),Bt=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.searchAirports},t}(yt),Lt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.searchCities},t}(bt),jt=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.searchConfermaCities},t}(yt),wt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return[null===(t=e.data)||void 0===t?void 0:t.getPostcodeDetails]},t}(bt),xt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.searchRailStations},t}(bt),Ut=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.searchUserCanBookFor},t}(bt),Vt=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.getUser},t}(yt),Ht=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getUserMessages},t}(bt),Gt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getUserServices},t}(bt),Yt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getUserUIConfigs.all},t}(bt),Qt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getUserAddresses},t}(bt),Wt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.getCarHireDepots},t}(bt),Kt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.getUserCompanyOffices},t}(bt),qt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t.searchHotelChains},t}(bt),Jt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getConfermaOfficeNames},t}(bt),zt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.getUserCurrentCarbonAllowance},t}(bt),Xt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getRiskAlerts},t}(bt),Zt=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=e.data)||void 0===t?void 0:t.getConfermaQuicklist)||void 0===r?void 0:r.results},t}(bt),$t=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.getRailcards},t}(bt),er=function(e){function t(t,r,i){return e.call(this,t,r,i)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t,r;return null===(r=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchEurostar)||void 0===r?void 0:r.results},t}(bt),tr=function(){};tr.WHITE_CHARS=/[\r\n\t\s]/gm,tr.CAPS=/([A-Z])/g,tr.EMAIL_VALIDATOR=/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/,tr.UK_POSTCODE=/^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z]))))\s?[0-9][A-Za-z]{2})$/,tr.EMAIL_REGEX="^(([^<>()\\[\\]\\.,;:\\s@']+(\\.[^<>()\\[\\]\\.,;:\\s@']+)*)|('.+'))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}))$";var rr,ir=function(e){function t(t,r,i,n,o){void 0===o&&(o="Invalid username or password. Please try again");var a=e.call(this,o)||this;return a.reason=t,a.data=r,a.statusText=i,a.error=n,a.name="LoginError",a}return m(t,e),t}(Error);(rr=e.LoginErrorReason||(e.LoginErrorReason={}))[rr.PASSWORD_EXPIRED=0]="PASSWORD_EXPIRED",rr[rr.PASSWORD_CHANGE=1]="PASSWORD_CHANGE",rr[rr.LOGED_IN=2]="LOGED_IN",rr[rr.AUTH_ERROR=3]="AUTH_ERROR",rr[rr.SSO=4]="SSO";var nr,or=function(){function e(e,t,r){this.username=e,this.password=t,this.overwrite="",r&&(this.overwrite="1")}return e.prototype.getAgent=function(){return"Agent="+encodeURIComponent(this.username.toLowerCase())},e.prototype.getPasswd=function(){return"Passwd="+encodeURIComponent(this.password)},e.prototype.getToken=function(){return"token="+encodeURIComponent(this.token)},e.prototype.getTokenStr=function(){try{return this.getAgent()+"&"+this.getPasswd()+"&overwrite="+this.overwrite+"&"+this.getToken()}catch(e){console.error("Sorry there is no enough information to get token string.")}},e.prototype.getChangePassTokenStr=function(){try{return("\n "+this.getAgent()+"&\n oldpasswd="+encodeURIComponent(this.oldPassword)+"&\n newpasswd="+encodeURIComponent(this.password)+"&\n cnfpasswd="+encodeURIComponent(this.confirmPassword)+"&\n "+this.getToken()).replace(tr.WHITE_CHARS,"")}catch(e){console.error("Sorry there is no enough information to get token string.",e)}},e.prototype.getResetPassTokenStr=function(){try{return("\n newpasswd="+encodeURIComponent(this.password)+"&\n cnfpasswd="+encodeURIComponent(this.confirmPassword)+"&\n "+this.getToken()).replace(tr.WHITE_CHARS,"")}catch(e){console.error("Sorry there is no enough information to get token string.",e)}},e}(),ar=function(){function e(){}return e.hasItem=function(e){return!!e},e.fullname=function(e){return[e.title,e.forename,e.surname].filter(this.hasItem).join(" ")},e.makeTravellerObjectFromUser=function(e){return{id:e.user_id.toString(),forename:e.forename,surname:e.surname,email:e.username,title:e.title,isChild:!1,isInfant:!1,childDOB:null,guest:!1,name:e.surname+" "+e.forename}},e.equals=function(e,t){return e.email===t.email},e.compare=function(t,r){var i=e.fullname(t),n=e.fullname(r);return i===n?0:i<n?-1:1},e}(),sr=function(){function e(e,r,i,n){this.helpers=r,this.basketService=i,this.getUserFetcher=n,Object.assign(this,{subject:new t.BehaviorSubject(Object.assign(Object.assign({},e),{prices:{},mixedCurrency:!1,count:0,miGroups:[],basketInfoMiDetails:[],suppInfo:[]})),tempid:e.id,id:e.id,title:e.title,prices:{},mixedCurrency:!1,count:0,miGroups:[],basketInfoMiDetails:[],suppInfo:[]}),this.next(e)}return e.prototype.destructor=function(){this.subject.complete()},e.prototype.next=function(e){var t,r=this;if((e=this.helpers.clone(e)).status!==A.Approved||void 0!==e.basketItems[0].perItemPhoneNumber){this.id=e.id,this.title=e.title;var i=Object.assign(Object.assign({},e),(e.basketItems||[]).reduce((function(e,t,i){var n,o;return e.prices[t.currency]||(e.prices[t.currency]=0),e.prices[t.currency]+=t.price,e.suppInfo.push(new ht(t,r.helpers,r.getUserFetcher)),t.miGroupsAvailable&&t.miGroupsAvailable.length>0&&e.miGroups.push({type:t.service.type,options:t.miGroupsAvailable,basketItem:t,value:t.miGroupSelected||""}),(null===(n=t.managementInfo)||void 0===n?void 0:n.length)>0&&(null===(o=t.users)||void 0===o?void 0:o.length)>0&&e.basketInfoMiDetails.push(new fe(t,r.basketService,r.helpers)),e}),{prices:{},mixedCurrency:!1,count:(null===(t=e.basketItems)||void 0===t?void 0:t.length)||0,miGroups:[],basketInfoMiDetails:[],suppInfo:[]}));i.mixedCurrency=Object.keys(i.prices).length>1,this.subject.next(i)}else this.basketService.getBasket({id:e.id,withSupplemental:!0}).subscribe((function(e){r.next(e)}))},e}(),ur=function(){function i(r,i,n,o,a,s,u,c,l,d,p,h,m,f,g,y,v,b,S,C,T,P,_,A){var D=this;this.acceptNewPriceUpdater=r,this.addItemToBasketUpdater=i,this.addUserToBasketItem=n,this.basketCreator=o,this.basketFetcher=a,this.bookBasketUpdater=s,this.deleteBasketUpdater=u,this.getMiAutoSugestionFetcher=c,this.helpers=l,this.removeItemFromBasketUpdater=d,this.revalidateBasketUpdater=p,this.setBasketItemMiGroupUpdater=h,this.setBasketItemMiValueUpdater=m,this.validateMiFreeValue=f,this.sendBasketForApprovalUpdater=g,this.getUserFetcher=y,this.getUserBasketsFetcher=v,this.SetBasketItemLeadPassenger=b,this.moveItemToADifferentBasket=S,this.updateBasketNotesUpdater=C,this.updateBasketTitleUpdater=T,this.setPaymentMethodUpdater=P,this.userService=_,this.modalService=A,this.currentBaskets=[],this.highlightBasketItemsEmitter=new t.Subject,this.basketChangeEmitter=new t.BehaviorSubject(""),this.baskets=new t.BehaviorSubject([]),this.basketList=[{type:Z.Flight,text:"FLIGHTS",price:0},{type:Z.Rail,text:"RAIL",price:0},{type:Z.Hotel,text:"HOTELS",price:0},{type:Z.Cab,text:"TAXIS",price:0},{type:Z.Car,text:"CARS",price:0},{type:Z.InternationalRail,text:"EUROSTAR",price:0},{type:Z.Parking,text:"PARKING",price:0},{type:Z.Lounge,text:"LOUNGES",price:0},{type:Z.Coach,text:"COACH",price:0},{type:Z.FastTrack,text:"FAST_TRACK",price:0}],this.basketPrices=new t.BehaviorSubject({total:null,list:this.basketList}),this.menuState=e.MenuSlideEnum.OUT,this.userService.changeUser.subscribe({next:function(e){D.reset()}})}return Object.defineProperty(i.prototype,"currentBasketID",{get:function(){return this.basketChangeEmitter.value},set:function(e){e!==this.currentBasketID&&this.basketChangeEmitter.next(e)},enumerable:!1,configurable:!0}),i.prototype.reset=function(){var e=this;this.userService.getfullUserDetails(!1).userData.value?this.getUserBasketsFetcher.fetchList({basketStatus:A.Open,user:this.userService.getfullUserDetails(!0).userData.value.user_id.toString()}).pipe(r.take(1)).subscribe((function(t){e.currentBaskets=t.map((function(t){if(t){var r=e.findBasket(t.id);return r||(r=new sr(t,e.helpers,e,e.getUserFetcher),e.currentBaskets.push(r)),r}})),e.baskets.next(e.currentBaskets),e.currentBaskets.length>0?e.currentBasketID=e.currentBaskets[0].id:e.currentBasketID=null,e.basketChangeEmitter.next(e.currentBasketID)}),(function(e){console.error(e)})):(this.currentBaskets.forEach((function(e){return e.subject.unsubscribe()})),this.currentBaskets=[],this.currentBasketID=null,this.baskets.next(this.currentBaskets),this.basketChangeEmitter.next(this.currentBasketID))},i.prototype.getAllOpenBaskets=function(e){return y(this,void 0,void 0,(function(){var t=this;return v(this,(function(i){return[2,this.getUserBasketsFetcher.fetchList({basketStatus:A.Open,user:e}).pipe(r.take(1),r.map((function(r){if(r.length)r.forEach((function(e){if(!t.findBasket(e.id)){var r=new sr(e,t.helpers,t,t.getUserFetcher);t.currentBaskets.push(r)}}));else{var i=new sr({id:e,basketItems:[]},t.helpers,t,t.getUserFetcher);t.currentBaskets.push(i)}return r}))).toPromise()]}))}))},i.prototype.addToBasket=function(e,t,i,n){return void 0===n&&(n=[]),y(this,void 0,void 0,(function(){var o=this;return v(this,(function(a){return(null==n?void 0:n.length)>0&&(e.users=this.helpers.makeUsers(n),e.leadPassenger=e.users[0].id),(e=this.checkDetails(e))&&t&&this.addItemToBasketUpdater.updateOne(e).pipe(r.take(1)).subscribe((function(r){t.next(Object.assign(Object.assign({},t.subject.value),r));var n=o.userService.findService(e.service).type;i.search_objects[n].booking_chosen=!0,i.search_objects[n].chosen=!1;var a=r.basketItems;o.highlightBasketItemsEmitter.next(a),o.basketChangeEmitter.next(o.currentBasketID)}),(function(e){console.error(e),t.subject.next(t.subject.value)})),[2,!1]}))}))},i.prototype.loadBasket=function(e){var t=this.findBasket(e);t||(t=new sr({id:e,basketItems:[]},this.helpers,this,this.getUserFetcher),this.currentBaskets.push(t)),this.basketFetcher.fetchOne({id:e}).subscribe((function(e){t.next(e)}))},i.prototype.subsribeToBasket=function(e,t){var r=this.findBasket(e);r&&r.subject.subscribe(t)},i.prototype.removeExpiredItems=function(e){var t=this;this.findBasket(e).subject.value.basketItems.filter((function(e){return 0!==e.latestValidationPriceDifference||e.expired})).forEach((function(r){t.removeBasketItem(e,r)}))},i.prototype.removeBasketItem=function(e,t){var r=this,i=this.findBasket(e);this.removeItemFromBasketUpdater.updateOne({basketItem:t.id}).subscribe((function(t){i.next(Object.assign(Object.assign({},i.subject.value),t)),r.basketChangeEmitter.next(e)}))},i.prototype.getDefaultBasket=function(e){return void 0===e&&(e=!1),y(this,void 0,void 0,(function(){return v(this,(function(t){switch(t.label){case 0:return null,[4,this.findOrCreateBasket(this.currentBasketID,e).then((function(e){return e}))];case 1:return[2,t.sent()]}}))}))},i.prototype.findBasket=function(e){return this.currentBaskets.find((function(t){return t.id===e||t.tempid===e}))},i.prototype.findOrCreateBasket=function(e,t){return void 0===t&&(t=!1),y(this,void 0,void 0,(function(){var r,i;return v(this,(function(n){switch(n.label){case 0:return r=null,e?[3,7]:[4,this.getAllOpenBaskets(this.userService.getfullUserDetails(!0).userData.value.user_id.toString())];case 1:return(null==(i=n.sent())?void 0:i.length)?[3,3]:[4,this.createBasket()];case 2:return r=n.sent(),this.currentBaskets.push(r),this.baskets.next(this.currentBaskets),[3,6];case 3:return"BOOKED"!==(r=this.findBasket(i[0].id)).subject.value.status||t?[3,5]:(console.warn("+++ Retrieved basket is in booked status - creating a new one +++"),[4,this.createBasket()]);case 4:r=n.sent(),this.currentBaskets.push(r),n.label=5;case 5:this.baskets.next(this.currentBaskets),n.label=6;case 6:return[3,8];case 7:r=this.findBasket(e),n.label=8;case 8:return[2,r]}}))}))},i.prototype.createBasket=function(){return y(this,void 0,void 0,(function(){var e,t,r;return v(this,(function(i){switch(i.label){case 0:return e={id:"TEMPID_"+u.default().unix().toString(),owner:null,reference:null,title:null,notes:null,createdAt:null,updatedAt:null,basketItems:[],status:null,validated:!1},t=new sr(e,this.helpers,this,this.getUserFetcher),[4,this.createBasketOnDB(t)];case 1:return r=i.sent(),this.currentBaskets.push(r),this.baskets.next(this.currentBaskets),this.basketChangeEmitter.next(r.id),[2,r]}}))}))},i.prototype.createBasketOnDB=function(e){var t=this;return new Promise((function(i,n){t.basketCreator.updateOne({}).pipe(r.take(1)).subscribe((function(t){e.id=t.id,e.next(t),i(e)}),(function(e){n(e)}),(function(){}))}))},i.prototype.toggleMenu=function(){this.menuState===e.MenuSlideEnum.IN||this.menuState===e.MenuSlideEnum.FLAT?this.menuState=e.MenuSlideEnum.OUT:this.menuState=e.MenuSlideEnum.IN},i.prototype.closeMenu=function(){this.menuState=e.MenuSlideEnum.IN},i.prototype.getLatestBasketItemForTypes=function(e){return(e||[]).reduce((function(e,t){return e[t.service.type]=t,e}),{})},i.prototype.checkDetails=function(e){var t=this.userService.findService(e.service);if(!t)return console.error("Unable to find service for basket item : "+e.service),null;var r=new c.default,i=r.compile(t.detailSchema),n=r.compile(t.searchQuerySchema);if(e.searchQuery=this.helpers.sanitizeMomentDates(e.searchQuery),!n(e.searchQuery)){var o="Item searchQuery is not valid for "+t.name+" search schema.";return console.warn("searchSchema",t.searchQuerySchema),console.warn("item.searchQuery",e.searchQuery),console.log(n.errors),this.modalService.open(d.ModalErrorComponent,{},{error:o}),null}if(!i(e.detail)){o="Item detail is not valid for "+t.name+" detail schema.";return console.warn("detailSchema",t.detailSchema),console.warn("item.detail",e.detail),console.log("Schema errors",i.errors),this.modalService.open(d.ModalErrorComponent,{},{error:o}),null}return e},i.prototype.getNumberItemsForBasket=function(e){return void 0===e&&(e=null),(null==(e=e||this.findBasket(this.currentBasketID))?void 0:e.subject.value.basketItems.length)||0},i.prototype.removeBasket=function(e){return y(this,void 0,void 0,(function(){var t=this;return v(this,(function(i){switch(i.label){case 0:return e?[4,this.deleteBasketUpdater.updateOne({id:e}).pipe(r.take(1),r.switchMap((function(r){var i,n;return null===(i=t.findBasket(e))||void 0===i||i.destructor(),t.currentBaskets=t.currentBaskets.filter((function(t){return t.id!==e})),t.baskets.next(t.currentBaskets),e===t.currentBasketID&&(t.currentBasketID=(null===(n=t.currentBaskets[0])||void 0===n?void 0:n.id)||null,t.basketChangeEmitter.next(t.currentBasketID)),r}))).toPromise()]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},i.prototype.continueSearchAndBook=function(e,t,r){var i=this.getLatestBasketItemForTypes(e),n=r.getHighestSearchPriorityObject(i);return n?(r.searches[n.type].updateFromPreviousSearches(i),[n.searchUrl]):t},i.prototype.addTravellers=function(e,t,r,i){var n=this;void 0===i&&(i=0);var o=this.findBasket(e);if(i<r.length){var a=r[i],s=a.isChild?G.Child:a.isInfant?G.Infant:G.Adult;this.addUserToBasketItem.updateOne({basketItem:t.id,users:[{id:a.id,passengerType:s}],withSupplemental:!1}).subscribe((function(){}),(function(){}),(function(){n.addTravellers(o.id,t,r,i+1)}))}else this.basketFetcher.fetchOne({id:o.id}).subscribe((function(e){o.subject.next(Object.assign(Object.assign({},o.subject.value),e))}),(function(e){}),(function(){o.next(o.subject.value)}))},i.prototype.setLeadPassenger=function(e,t,r,i){var n=this;void 0===i&&(i=0);var o=this.findBasket(e);i<1?this.SetBasketItemLeadPassenger.updateOne({id:t.id,user:r.id,withSupplemental:!1}).subscribe((function(){}),(function(){}),(function(){n.setLeadPassenger(o.id,t,r,i+1)})):this.basketFetcher.fetchOne({id:o.id}).subscribe((function(e){o.subject.next(Object.assign(Object.assign({},o.subject.value),e))}),(function(e){}),(function(){o.next(o.subject.value)}))},i.prototype.updateBasket=function(e,t){var i=this;return new Promise((function(n,o){t.pipe(r.take(1)).subscribe((function(t){i.findBasket(e).next(t),n()}),(function(t){console.error(t);var r=i.findBasket(e);r.next(r.subject.value),o(t)}),(function(){}))}))},i.prototype.revalidate=function(e){this.updateBasket(e,this.revalidateBasketUpdater.updateOne({id:e}))},i.prototype.setBasketItemMiGroup=function(e,t,r){this.updateBasket(e,this.setBasketItemMiGroupUpdater.updateOne({basketItem:t,group:r}))},i.prototype.acceptNewPrice=function(e,t){this.updateBasket(e,this.acceptNewPriceUpdater.updateOne({id:t.id}))},i.prototype.validateFreeValeMi=function(e,t){var r=this;return new Promise((function(i,n){r.validateMiFreeValue.test({mi:e.id,freeValue:t}).subscribe(i,n)}))},i.prototype.setMiFreeValue=function(e,t,i,n){void 0===n&&(n=null);var o=this.findBasket(e),a={mi:t.id,miFreeValue:i};n&&(a.user=n),this.setBasketItemMiValueUpdater.updateOne(a).pipe(r.take(1)).subscribe((function(e){o.next(e)}),(function(e){}),(function(){o.next(o.subject.value)}))},i.prototype.setMiSelectedValue=function(e,t,r,i){void 0===i&&(i=null);var n={mi:t.id,miValue:r};i&&(n.user=i),this.updateBasket(e,this.setBasketItemMiValueUpdater.updateOne(n))},i.prototype.getMiAutoSugestions=function(e,t,i){return null==i||i.next(!0),this.getMiAutoSugestionFetcher.fetchList({mi:e,partialLabel:t}).pipe(r.tap((function(e){null==i||i.next(!1)})))},i.prototype.saveMiData=function(e,t){t.forEach((function(t){t.miPerItem.forEach((function(t){t.save(e,null)})),t.users.forEach((function(r){t.miPerUser[r].managementInfo.forEach((function(t){t.save(e,r)}))}))}))},i.prototype.sendBasketForApproval=function(e){this.updateBasket(e,this.sendBasketForApprovalUpdater.updateOne({basket:e}).pipe(r.take(1)))},i.prototype.setBasketItemPaymentOption=function(e,t,r){return this.updateBasket(e.id,this.setPaymentMethodUpdater.updateOne({basketItem:t.id,paymentMethod:r}))},i.prototype.bookBasket=function(e,t){this.updateBasket(e,this.bookBasketUpdater.updateOne({id:e,supplementaryInfo:t}))},i.prototype.moveBasketItem=function(e,t,r){var i=this;this.moveItemToADifferentBasket.updateOne({basketItem:t.id,newBasket:r}).subscribe((function(){i.loadBasket(e),i.loadBasket(r)}))},i.prototype.updateBasketNotes=function(e,t){this.updateBasket(e,this.updateBasketNotesUpdater.updateOne({id:e,notes:t}))},i.prototype.updateBasketTitle=function(e,t){this.updateBasket(e,this.updateBasketTitleUpdater.updateOne({id:e,newTitle:t}))},i.prototype.getBasket=function(e){return this.basketFetcher.fetchOne(e)},i.prototype.atLeastOneSearchChosen=function(){var e=this.findBasket(this.currentBasketID);return(null==e?void 0:e.subject.value.basketItems.length)>0},i.prototype.getBasketStats=function(e){var t,r,i,n=this,o=(null===(i=null===(r=null===(t=this.baskets.value[e])||void 0===t?void 0:t.subject)||void 0===r?void 0:r.value)||void 0===i?void 0:i.prices)||{},a=Object.keys(o)[0];return a?(this.basketPrices.value.currency=a,this.basketPrices.value.total=this.baskets.value[e].subject.value.prices[a]):this.basketPrices.value.total=0,this.basketPrices.value.list.forEach((function(t){var r,i,o;t.price=null===(o=null===(i=null===(r=n.baskets.value[e])||void 0===r?void 0:r.subject)||void 0===i?void 0:i.value)||void 0===o?void 0:o.basketItems.filter((function(e){return e.service.type===t.type})).reduce((function(e,t){return e+t.price}),0)})),this.basketPrices},i}(),cr="results_hotel_avallibility",lr=function(){function e(e,r,i,n){this.avalibilityFethcer=e,this.sessionStorage=r,this.helpers=i,this.environment=n,this.data=null,this.behaviours={},this.toFetch=[],this.fetching=new t.BehaviorSubject(!1),this.currencies={}}return e.prototype.readFromSession=function(){var e=this,r=this.sessionStorage.getSessionItem(cr)||{};return Object.values(r).forEach((function(r){e.behaviours[r.hotelId]=new t.BehaviorSubject(r)})),r},e.prototype.reset=function(){var e=this;this.data={},this.currencies={},this.sessionStorage.removeSessionItem(cr),Object.values(this.data).forEach((function(t){e.behaviours[t.hotelId].complete(),delete e.behaviours[t.hotelId]})),this.behaviours={}},e.prototype.getAvailabilityForId=function(e){return this.data=this.data||this.readFromSession(),this.behaviours[e.hotel]||this._getAvailabilityForId(e)},e.prototype.getAvailabilityValue=function(e){var t;return this.data=this.data||this.readFromSession(),(null===(t=this.behaviours[e.id])||void 0===t?void 0:t.value)||{}},e.prototype._getAvailabilityForId=function(e){return this.timeout&&(window.clearTimeout(this.timeout),this.timeout=0),this.fetching.value||(this.timeout=window.setTimeout(this.fetchAvalilbility.bind(this),this.environment.autoFetchHotelTimeout)),this.toFetch.push(e),!this.fetching.value&&this.toFetch.length>=this.environment.numberOfHotelsToFetch&&this.fetchAvalilbility(),this.behaviours[e.hotel]=new t.BehaviorSubject(null),this.behaviours[e.hotel]},e.prototype.fetchAvalilbility=function(){var e=this;this.fetching.next(!0),this.timeout&&(window.clearTimeout(this.timeout),this.timeout=0);var t=this.toFetch.slice(0,this.environment.numberOfHotelsToFetch);this.toFetch=this.toFetch.slice(this.environment.numberOfHotelsToFetch),console.log("Hotels still to fetch",this.toFetch.length);var i={hotel:t.map((function(e){return e.hotel})),currency:t[0].currency,endDate:t[0].endDate,startDate:t[0].startDate,occupants:t[0].occupants,rooms:t[0].rooms};this.avalibilityFethcer.fetchList(i).pipe(r.take(1)).subscribe((function(t){t.forEach((function(t){(t=e.helpers.clone(t)).rooms=(t.rooms||[]).filter((function(e){return e.total>0})).map((function(t){return(t=e.helpers.clone(t)).LocalPrice=t.currencyConversion?t.currencyConversion.localTotal:t.total,t.LocalCurrency=t.currencyConversion?t.currencyConversion.localCode:t.currencyCode,t})),t.currencies=t.rooms.reduce((function(t,r){return r.currencyConversion&&(t[r.currencyConversion.convertedCode]=t[r.currencyConversion.convertedCode]||{maxprice:Number.MIN_VALUE,minprice:Number.MAX_VALUE},t[r.currencyConversion.convertedCode].maxprice=Math.max(t[r.currencyConversion.convertedCode].maxprice,r.currencyConversion.convertedTotal),t[r.currencyConversion.convertedCode].minprice=Math.min(t[r.currencyConversion.convertedCode].minprice,r.currencyConversion.convertedTotal),e.currencies[r.currencyConversion.convertedCode]=e.currencies[r.currencyConversion.convertedCode]||{maxprice:Number.MIN_VALUE,minprice:Number.MAX_VALUE},e.currencies[r.currencyConversion.convertedCode].minprice=Math.ceil(Math.min(e.currencies[r.currencyConversion.convertedCode].minprice,r.currencyConversion.convertedTotal)),e.currencies[r.currencyConversion.convertedCode].maxprice=Math.ceil(Math.max(e.currencies[r.currencyConversion.convertedCode].maxprice,r.currencyConversion.convertedTotal))),t}),{});var r=t.rooms.map(e.helpers.mapFieldFromObject("total"));r.length||r.push(0),t.minprice=Math.min.apply(Math,C(r)),t.maxprice=Math.max.apply(Math,C(r)),t.rooms=t.rooms,(null==t?void 0:t.hotelId)&&(e.data[t.hotelId]=t,e.behaviours[t.hotelId].next(t))})),e.sessionStorage.setSessionItem(cr,t),e.toFetch.length>0?setTimeout((function(){e.fetchAvalilbility()}),e.environment.hotelAvalibilityTimeout):e.fetching.next(!1)}))},e.prototype.maxPriceForCurrency=function(e){return(this.currencies[e]||{maxprice:Number.MAX_VALUE,minprice:Number.MIN_VALUE}).maxprice},e.prototype.numberOfHotelsWithPrice=function(){var e,t,r=0;if(this.data)try{for(var i=b(Object.entries(this.data)),n=i.next();!n.done;n=i.next()){var o=S(n.value,2),a=(o[0],o[1]);(null==a?void 0:a.prpn)&&r++}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r},e}(),dr=function(){function e(){}return e.prototype.serialize=function(e){return Object.keys(e).reduce((function(t,r){return(t.length?t+"&":"")+r+"="+encodeURIComponent("object"==typeof e[r]?JSON.stringify(e[r]):e[r])}),"")},e}(),pr="USER_SIGNEDOUT",hr=function(){function e(e,r,i,n,o){this.userUiConfigsFetcher=e,this.userProductsFetcher=r,this.userMessagesFetcher=i,this.storageService=n,this.helpers=o,this.fullUserDetails={bookingAllowedFor:"",messages:new t.BehaviorSubject(null),travllerObject:new t.BehaviorSubject(null),userConfigs:new t.BehaviorSubject(null),userData:new t.BehaviorSubject(null),userServices:new t.BehaviorSubject(null)},this.changeUser=new t.BehaviorSubject(null)}return e.prototype.setUser=function(e){var t=this,r=this.fullUserDetails.userData.value;r&&r.username===e.username||(this.userUiConfigsFetcher.fetchKeyedObject("key").subscribe((function(e){t.fullUserDetails.userConfigs.next(e),t.checkEmitUser()}),(function(e){console.error(e)})),this.userProductsFetcher.fetchKeyedObjectArray("type").subscribe((function(e){t.fullUserDetails.userServices.next(e),t.checkEmitUser()})),this.userMessagesFetcher.fetchList().subscribe((function(e){t.fullUserDetails.messages.next(e),t.checkEmitUser()}),(function(e){console.error(e)})),this.fullUserDetails.travllerObject.next(ar.makeTravellerObjectFromUser(e))),this.fullUserDetails.userData.next(e),this.storageService.setSessionItem("lightning_user_data",e)},e.prototype.checkEmitUser=function(){this.fullUserDetails.userConfigs.value&&this.fullUserDetails.userData.value&&this.fullUserDetails.userServices.value&&this.fullUserDetails.messages.value&&this.changeUser.next(this.fullUserDetails)},e.prototype.getfullUserDetails=function(e){return void 0===e&&(e=!1),this._getFullUserDetails()},e.prototype._getFullUserDetails=function(){return this.fullUserDetails||this.storageService.getSessionItem("lightning_user_data")},e.prototype.getUserDropdownInfo=function(){var e={name:"Unable to retrieve name.",email:"Unable to rerieve email",account_type:"Unknown",title:""},t=this.getUsersFullname(),r=this.getUserEmail(),i=this.getUserBookingType(),n=this.getUserTitle();return t&&(e.name=t),r&&(e.email=r),i&&(e.account_type=i),n&&(e.title=n),e},e.prototype.getUserTitle=function(){var e=this.getfullUserDetails();return e&&e.userData?e.userData.value.title:""},e.prototype.getUserEmail=function(){var e=this.getfullUserDetails();return e&&e.userData?e.userData.value.username:""},e.prototype.getUserBookingType=function(){var e=this.getfullUserDetails();return e&&e.userData?e.userData.value.booker_type:null},e.prototype.getUsersFullname=function(){var e=this.getfullUserDetails();return!(!e||!e.userData)&&e.userData.value.forename+" "+e.userData.value.surname},e.prototype.getUsersTitleAndFullName=function(){var e=this.getfullUserDetails();return!(!e||!e.userData)&&e.userData.value.title+" "+e.userData.value.forename+" "+e.userData.value.surname},e.prototype.getUserFavoriteValue=function(e,t){void 0===t&&(t=gt.non);var r=this.fullUserDetails.userConfigs.value;return this.helpers.fromObject(r,e.value,"config",e.value)},e.prototype.getUserFavoriteNumber=function(e,t){void 0===t&&(t=gt.non);var r=this.fullUserDetails.userConfigs.value;return this.helpers.fromObject(r,e.value,"config","value")},e.prototype.isUserFavoriteSet=function(e,t){void 0===t&&(t=gt.non);var r=this.fullUserDetails.userConfigs.value;return this.helpers.fromObject(r,e.value,"config","value")},e.prototype.createSelfTraveller=function(){return this.fullUserDetails.travllerObject.value},e.prototype.travellerIsUser=function(e){return!1},e.prototype.emptyUserData=function(){this.fullUserDetails.userData.next(null),this.fullUserDetails.userConfigs.next(null),this.fullUserDetails.userServices.next(null),this.fullUserDetails.messages.next(null),this.changeUser.next(this.fullUserDetails)},e.prototype.createGuestUser=function(e,t,r,i,n,o,a,s,u,c,l){return{isChild:u,isInfant:c,childDOB:l,guest:!0,id:"",forename:t,surname:r,email:i,title:e,name:[e,t,r].join(" ")}},e.prototype.userIsClient=function(){return!0},e.prototype.hasIgnorePolicy=function(){return!1},e.prototype.useAgentCanBookFor=function(){return!0},e.prototype.canBook=function(e){var t=this.fullUserDetails.userServices.value;return t&&!!t[e]},e.prototype.isTraveller=function(){return this.fullUserDetails.userData.value.booker_type===D.Traveller},e.prototype.userIsAgent=function(){return this.fullUserDetails.userData.value.booker_type===D.Company},e.prototype.userIsAdmin=function(){return this.fullUserDetails.userData.value.admin},e.prototype.userIsCompanyAdmin=function(){return this.fullUserDetails.userData.value.company_admin},e.prototype.isSelfBook=function(){return this.fullUserDetails.userData.value.booker_type===D.SelfBook},e.prototype.isBooker=function(){return this.fullUserDetails.userData.value.booker_type===D.Booker},e.prototype.getUserId=function(){return this.fullUserDetails.userData.value.user_id},e.prototype.userHasServiceProvider=function(e,t){return!!this.fullUserDetails.userServices.value&&!!(this.fullUserDetails.userServices.value[e]||[]).find((function(e){return e.name===t}))},e.prototype.findService=function(e){return this.fullUserDetails.userServices.value?this.helpers.findService(this.fullUserDetails.userServices.value,e):null},e}(),mr=function(){function i(e,t,r,i,n,o,a){this.userService=e,this.modalService=t,this.http=r,this.router=i,this.eventMessenager=n,this.storageService=o,this.environment=a,this.loading=!1,this.isLoggedIn=!1,this.redirectUrl="",this.refreshPromise=null}return i.prototype.checkLogin=function(){return this.refreshToken()},i.prototype.refreshToken=function(){var t=this;return this.refreshPromise=this.refreshPromise||new Promise((function(i,n){t.clearRefresh(),t.http.formEncodedPostNoErrorHandling(e.URLS.Refresh,{}).pipe(r.take(1),r.map((function(e){return t.handleResponse(e)}))).subscribe((function(e){if("string"==typeof e){if(i(!1),"login"!==t.router.url)t.modalService.open(d.BaseModalComponent,{},{title:"Auto Logout",body:"",isLoading:!1,options:{buttonCancel:!1,buttonOk:!0,buttonOkText:"Continue"}}).then((function(){t.logout(),i(!1)}))}else i(!0),t.setRefresh()}),(function(e){i(!1)}))})).then((function(e){return t.refreshPromise=null,e})).catch((function(e){throw t.refreshPromise=null,e})),this.refreshPromise},i.prototype.clearRefresh=function(){this.timeoutSubscription&&(clearTimeout(this.timeoutSubscription),this.timeoutSubscription=null)},i.prototype.setRefresh=function(){this.timeoutSubscription=window.setTimeout(this.refreshToken.bind(this),1e3*this.environment.authRefreshTimeout)},i.prototype.login=function(t,i,n){var o=this;return this.userService.emptyUserData(),this.storageService.clearSessionData(),this.clearRefresh(),this.http.formEncodedPostNoErrorHandling(e.URLS.AccessToken,{username:t,password:i}).pipe(r.take(1),r.map((function(e,t){return o.setRefresh(),o.handleResponse(e)})))},i.prototype.handleResponse=function(e){return"object"==typeof e&&e.jwt&&(this.userService.setUser(e.jwtObject),delete e.jwt,delete e.jwtObject),e},i.prototype.cookieLogin=function(e){return t.of(null)},i.prototype.logout=function(){var t=this;this.userService.isUserFavoriteSet(mt.SSO_no_password);this.clearRefresh(),this.isLoggedIn=!1,this.userService.emptyUserData(),this.storageService.clearSessionData(),this.http.post(e.URLS.LOGOUT_URL).subscribe((function(e){e.LogoutSuccess||console.warn("You're not logged in, cannot log out.")}),(function(){t.eventMessenager.emit(pr,{}),t.userService.isUserFavoriteSet(mt.SSO_no_password)?t.router.navigate(["logOutDigitsUser"]):t.router.navigate(["logon"])}))},i.prototype.changePassword=function(e){return t.of(null)},i.prototype.resetPassword=function(t,r){return this.http.formEncodedPost(e.URLS.RESET_PASSWORD,{passwordResetToken:t,newPassword:r})},i.prototype.recoverPassword=function(t){return this.http.formEncodedPost(e.URLS.RECOVER_PASSWORD_URL,{username:""+t},"text")},i.prototype.handleError=function(e){var t={error:e};this.modalService.open(d.ModalErrorComponent,{},t)},i}(),fr=function(){function e(){this.openModalEvent=new t.Subject}return e.prototype.open=function(e,t,r){var i=this;return void 0===t&&(t=null),void 0===r&&(r=null),new Promise((function(n,o){i.openModalEvent.next({type:e,data:r||{},options:t||{},results:n})}))},e.prototype.subscribe=function(e){return this.openModalEvent.subscribe(e)},e}(),gr=function(){function e(e,r){var i,n;this.getUserBasketsFetcher=e,this.searchUserCanBookFor=r,this.baskets=new t.BehaviorSubject([]),this._basketStatusIconClasses=((i={})[A.Approved]="ico-tick",i[A.AwaitingApproval]="ico-clock",i[A.BookingFailed]="ico-deny",i[A.Disapproved]="ico-deny",i[A.Open]="ico-calendar",i[A.PartiallyBooked]="ico-deny",i[A.Booked]="ico-deny",i),this._serviceTypeIconClasses=((n={})[Z.Cab]="ico-m-taxi",n[Z.Car]="ico-car",n[Z.Coach]="ico-bus",n[Z.Flight]="ico-flight",n[Z.Hotel]="ico-bed",n[Z.FastTrack]="",n[Z.InternationalRail]="ico-rail",n[Z.Lounge]="ico-material ico-lounge",n[Z.Parking]="ico-material ico-parking",n[Z.Rail]="ico-rail",n[Z.Eurostar]="ico-rail",n)}return e.prototype.getUserBaskets=function(e,t){var i=this;t.next(!0),this.getUserBasketsFetcher.fetchList(e).pipe(r.take(1)).subscribe((function(e){i.baskets.next(e),t.next(!1)}),(function(e){console.error(e),t.next(!1)}))},e.prototype.getSearchUserCanBookFor=function(e,i){return e.length>2?(i.next(!0),this.searchUserCanBookFor.fetchList({email:e}).pipe(r.take(1),r.map((function(e){return i.next(!1),e})))):t.of([])},e.prototype.getServiceTypeFilters=function(e){var t,r,i=[];try{for(var n=b(Object.entries(e.search_objects)),o=n.next();!o.done;o=n.next()){var a=S(o.value,1)[0];i.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return i},e.prototype.getBasketStatusFilters=function(){var e=[];return Object.values(A).forEach((function(t){return e.push(t)})),e},e.prototype.getServiceTypeFilterVanityName=function(e){switch(e){case Z.Cab:return"Taxi";case Z.InternationalRail:return"European Rail";default:return e}},e.prototype.getBasketStatusIconClass=function(e){return this._basketStatusIconClasses[e]||"ico-exclamation"},e.prototype.getServiceTypeIconClass=function(e){return this._serviceTypeIconClasses[e.service.type]||"ico-exclamation"},e.prototype.getTotalPriceForBasketItems=function(e){return e.reduce((function(e,t){return e+t.price}),0)},e.prototype.getTravellerNamesFromBasketItems=function(e){var t=[];return e.map((function(e){return e.users.map((function(e){return t.push(e.forename+" "+e.surname)}))})),t=C(new Set(t))},e.prototype.allBasketItemsMatchStatus=function(e,t){return e.every((function(e){return e.status===t}))},e.prototype.getHotelAddress=function(e){var t=e.county,r=e.postcode,i=e.streetName,n=e.town,o=[];return i&&o.push(i),n&&o.push(n),t&&o.push(t),r&&o.push(r),o.join(", ")},e.prototype.getHotelLocation=function(e){var t=e.county,r=e.town,i=[];return r&&i.push(r),t&&i.push(t),i.join(", ")},e}(),yr=[{cName:"Afghanistan",dCode:"93",cCode:"AF"},{cName:"Aland Islands",dCode:"358",cCode:"AX"},{cName:"Albania",dCode:"355",cCode:"AL"},{cName:"Algeria",dCode:"213",cCode:"DZ"},{cName:"AmericanSamoa",dCode:"1684",cCode:"AS"},{cName:"Andorra",dCode:"376",cCode:"AD"},{cName:"Angola",dCode:"244",cCode:"AO"},{cName:"Anguilla",dCode:"1264",cCode:"AI"},{cName:"Antarctica",dCode:"672",cCode:"AQ"},{cName:"Antigua and Barbuda",dCode:"1268",cCode:"AG"},{cName:"Argentina",dCode:"54",cCode:"AR"},{cName:"Armenia",dCode:"374",cCode:"AM"},{cName:"Aruba",dCode:"297",cCode:"AW"},{cName:"Australia",dCode:"61",cCode:"AU"},{cName:"Austria",dCode:"43",cCode:"AT"},{cName:"Azerbaijan",dCode:"994",cCode:"AZ"},{cName:"Bahamas",dCode:"1242",cCode:"BS"},{cName:"Bahrain",dCode:"973",cCode:"BH"},{cName:"Bangladesh",dCode:"880",cCode:"BD"},{cName:"Barbados",dCode:"1246",cCode:"BB"},{cName:"Belarus",dCode:"375",cCode:"BY"},{cName:"Belgium",dCode:"32",cCode:"BE"},{cName:"Belize",dCode:"501",cCode:"BZ"},{cName:"Benin",dCode:"229",cCode:"BJ"},{cName:"Bermuda",dCode:"1441",cCode:"BM"},{cName:"Bhutan",dCode:"975",cCode:"BT"},{cName:"Bolivia, Plurinational State of",dCode:"591",cCode:"BO"},{cName:"Bosnia and Herzegovina",dCode:"387",cCode:"BA"},{cName:"Botswana",dCode:"267",cCode:"BW"},{cName:"Brazil",dCode:"55",cCode:"BR"},{cName:"British Indian Ocean Territory",dCode:"246",cCode:"IO"},{cName:"Brunei Darussalam",dCode:"673",cCode:"BN"},{cName:"Bulgaria",dCode:"359",cCode:"BG"},{cName:"Burkina Faso",dCode:"226",cCode:"BF"},{cName:"Burundi",dCode:"257",cCode:"BI"},{cName:"Cambodia",dCode:"855",cCode:"KH"},{cName:"Cameroon",dCode:"237",cCode:"CM"},{cName:"Canada",dCode:"1",cCode:"CA"},{cName:"Cape Verde",dCode:"238",cCode:"CV"},{cName:"Cayman Islands",dCode:" 345",cCode:"KY"},{cName:"Central African Republic",dCode:"236",cCode:"CF"},{cName:"Chad",dCode:"235",cCode:"TD"},{cName:"Chile",dCode:"56",cCode:"CL"},{cName:"China",dCode:"86",cCode:"CN"},{cName:"Christmas Island",dCode:"61",cCode:"CX"},{cName:"Cocos (Keeling) Islands",dCode:"61",cCode:"CC"},{cName:"Colombia",dCode:"57",cCode:"CO"},{cName:"Comoros",dCode:"269",cCode:"KM"},{cName:"Congo",dCode:"242",cCode:"CG"},{cName:"Congo, The Democratic Republic of the Congo",dCode:"243",cCode:"CD"},{cName:"Cook Islands",dCode:"682",cCode:"CK"},{cName:"Costa Rica",dCode:"506",cCode:"CR"},{cName:"Cote d'Ivoire",dCode:"225",cCode:"CI"},{cName:"Croatia",dCode:"385",cCode:"HR"},{cName:"Cuba",dCode:"53",cCode:"CU"},{cName:"Cyprus",dCode:"357",cCode:"CY"},{cName:"Czech Republic",dCode:"420",cCode:"CZ"},{cName:"Denmark",dCode:"45",cCode:"DK"},{cName:"Djibouti",dCode:"253",cCode:"DJ"},{cName:"Dominica",dCode:"1767",cCode:"DM"},{cName:"Dominican Republic",dCode:"1849",cCode:"DO"},{cName:"Ecuador",dCode:"593",cCode:"EC"},{cName:"Egypt",dCode:"20",cCode:"EG"},{cName:"El Salvador",dCode:"503",cCode:"SV"},{cName:"Equatorial Guinea",dCode:"240",cCode:"GQ"},{cName:"Eritrea",dCode:"291",cCode:"ER"},{cName:"Estonia",dCode:"372",cCode:"EE"},{cName:"Ethiopia",dCode:"251",cCode:"ET"},{cName:"Falkland Islands (Malvinas)",dCode:"500",cCode:"FK"},{cName:"Faroe Islands",dCode:"298",cCode:"FO"},{cName:"Fiji",dCode:"679",cCode:"FJ"},{cName:"Finland",dCode:"358",cCode:"FI"},{cName:"France",dCode:"33",cCode:"FR"},{cName:"French Guiana",dCode:"594",cCode:"GF"},{cName:"French Polynesia",dCode:"689",cCode:"PF"},{cName:"Gabon",dCode:"241",cCode:"GA"},{cName:"Gambia",dCode:"220",cCode:"GM"},{cName:"Georgia",dCode:"995",cCode:"GE"},{cName:"Germany",dCode:"49",cCode:"DE"},{cName:"Ghana",dCode:"233",cCode:"GH"},{cName:"Gibraltar",dCode:"350",cCode:"GI"},{cName:"Greece",dCode:"30",cCode:"GR"},{cName:"Greenland",dCode:"299",cCode:"GL"},{cName:"Grenada",dCode:"1473",cCode:"GD"},{cName:"Guadeloupe",dCode:"590",cCode:"GP"},{cName:"Guam",dCode:"1671",cCode:"GU"},{cName:"Guatemala",dCode:"502",cCode:"GT"},{cName:"Guernsey",dCode:"44",cCode:"GG"},{cName:"Guinea",dCode:"224",cCode:"GN"},{cName:"Guinea-Bissau",dCode:"245",cCode:"GW"},{cName:"Guyana",dCode:"595",cCode:"GY"},{cName:"Haiti",dCode:"509",cCode:"HT"},{cName:"Holy See (Vatican City State)",dCode:"379",cCode:"VA"},{cName:"Honduras",dCode:"504",cCode:"HN"},{cName:"Hong Kong",dCode:"852",cCode:"HK"},{cName:"Hungary",dCode:"36",cCode:"HU"},{cName:"Iceland",dCode:"354",cCode:"IS"},{cName:"India",dCode:"91",cCode:"IN"},{cName:"Indonesia",dCode:"62",cCode:"ID"},{cName:"Iran, Islamic Republic of Persian Gulf",dCode:"98",cCode:"IR"},{cName:"Iraq",dCode:"964",cCode:"IQ"},{cName:"Ireland",dCode:"353",cCode:"IE"},{cName:"Isle of Man",dCode:"44",cCode:"IM"},{cName:"Israel",dCode:"972",cCode:"IL"},{cName:"Italy",dCode:"39",cCode:"IT"},{cName:"Jamaica",dCode:"1876",cCode:"JM"},{cName:"Japan",dCode:"81",cCode:"JP"},{cName:"Jersey",dCode:"44",cCode:"JE"},{cName:"Jordan",dCode:"962",cCode:"JO"},{cName:"Kazakhstan",dCode:"77",cCode:"KZ"},{cName:"Kenya",dCode:"254",cCode:"KE"},{cName:"Kiribati",dCode:"686",cCode:"KI"},{cName:"Korea, Democratic People's Republic of Korea",dCode:"850",cCode:"KP"},{cName:"Korea, Republic of South Korea",dCode:"82",cCode:"KR"},{cName:"Kuwait",dCode:"965",cCode:"KW"},{cName:"Kyrgyzstan",dCode:"996",cCode:"KG"},{cName:"Laos",dCode:"856",cCode:"LA"},{cName:"Latvia",dCode:"371",cCode:"LV"},{cName:"Lebanon",dCode:"961",cCode:"LB"},{cName:"Lesotho",dCode:"266",cCode:"LS"},{cName:"Liberia",dCode:"231",cCode:"LR"},{cName:"Libyan Arab Jamahiriya",dCode:"218",cCode:"LY"},{cName:"Liechtenstein",dCode:"423",cCode:"LI"},{cName:"Lithuania",dCode:"370",cCode:"LT"},{cName:"Luxembourg",dCode:"352",cCode:"LU"},{cName:"Macao",dCode:"853",cCode:"MO"},{cName:"Macedonia",dCode:"389",cCode:"MK"},{cName:"Madagascar",dCode:"261",cCode:"MG"},{cName:"Malawi",dCode:"265",cCode:"MW"},{cName:"Malaysia",dCode:"60",cCode:"MY"},{cName:"Maldives",dCode:"960",cCode:"MV"},{cName:"Mali",dCode:"223",cCode:"ML"},{cName:"Malta",dCode:"356",cCode:"MT"},{cName:"Marshall Islands",dCode:"692",cCode:"MH"},{cName:"Martinique",dCode:"596",cCode:"MQ"},{cName:"Mauritania",dCode:"222",cCode:"MR"},{cName:"Mauritius",dCode:"230",cCode:"MU"},{cName:"Mayotte",dCode:"262",cCode:"YT"},{cName:"Mexico",dCode:"52",cCode:"MX"},{cName:"Micronesia, Federated States of Micronesia",dCode:"691",cCode:"FM"},{cName:"Moldova",dCode:"373",cCode:"MD"},{cName:"Monaco",dCode:"377",cCode:"MC"},{cName:"Mongolia",dCode:"976",cCode:"MN"},{cName:"Montenegro",dCode:"382",cCode:"ME"},{cName:"Montserrat",dCode:"1664",cCode:"MS"},{cName:"Morocco",dCode:"212",cCode:"MA"},{cName:"Mozambique",dCode:"258",cCode:"MZ"},{cName:"Myanmar",dCode:"95",cCode:"MM"},{cName:"Namibia",dCode:"264",cCode:"NA"},{cName:"Nauru",dCode:"674",cCode:"NR"},{cName:"Nepal",dCode:"977",cCode:"NP"},{cName:"Netherlands",dCode:"31",cCode:"NL"},{cName:"Netherlands Antilles",dCode:"599",cCode:"AN"},{cName:"New Caledonia",dCode:"687",cCode:"NC"},{cName:"New Zealand",dCode:"64",cCode:"NZ"},{cName:"Nicaragua",dCode:"505",cCode:"NI"},{cName:"Niger",dCode:"227",cCode:"NE"},{cName:"Nigeria",dCode:"234",cCode:"NG"},{cName:"Niue",dCode:"683",cCode:"NU"},{cName:"Norfolk Island",dCode:"672",cCode:"NF"},{cName:"Northern Mariana Islands",dCode:"1670",cCode:"MP"},{cName:"Norway",dCode:"47",cCode:"NO"},{cName:"Oman",dCode:"968",cCode:"OM"},{cName:"Pakistan",dCode:"92",cCode:"PK"},{cName:"Palau",dCode:"680",cCode:"PW"},{cName:"Palestinian Territory, Occupied",dCode:"970",cCode:"PS"},{cName:"Panama",dCode:"507",cCode:"PA"},{cName:"Papua New Guinea",dCode:"675",cCode:"PG"},{cName:"Paraguay",dCode:"595",cCode:"PY"},{cName:"Peru",dCode:"51",cCode:"PE"},{cName:"Philippines",dCode:"63",cCode:"PH"},{cName:"Pitcairn",dCode:"872",cCode:"PN"},{cName:"Poland",dCode:"48",cCode:"PL"},{cName:"Portugal",dCode:"351",cCode:"PT"},{cName:"Puerto Rico",dCode:"1939",cCode:"PR"},{cName:"Qatar",dCode:"974",cCode:"QA"},{cName:"Romania",dCode:"40",cCode:"RO"},{cName:"Russia",dCode:"7",cCode:"RU"},{cName:"Rwanda",dCode:"250",cCode:"RW"},{cName:"Reunion",dCode:"262",cCode:"RE"},{cName:"Saint Barthelemy",dCode:"590",cCode:"BL"},{cName:"Saint Helena, Ascension and Tristan Da Cunha",dCode:"290",cCode:"SH"},{cName:"Saint Kitts and Nevis",dCode:"1869",cCode:"KN"},{cName:"Saint Lucia",dCode:"1758",cCode:"LC"},{cName:"Saint Martin",dCode:"590",cCode:"MF"},{cName:"Saint Pierre and Miquelon",dCode:"508",cCode:"PM"},{cName:"Saint Vincent and the Grenadines",dCode:"1784",cCode:"VC"},{cName:"Samoa",dCode:"685",cCode:"WS"},{cName:"San Marino",dCode:"378",cCode:"SM"},{cName:"Sao Tome and Principe",dCode:"239",cCode:"ST"},{cName:"Saudi Arabia",dCode:"966",cCode:"SA"},{cName:"Senegal",dCode:"221",cCode:"SN"},{cName:"Serbia",dCode:"381",cCode:"RS"},{cName:"Seychelles",dCode:"248",cCode:"SC"},{cName:"Sierra Leone",dCode:"232",cCode:"SL"},{cName:"Singapore",dCode:"65",cCode:"SG"},{cName:"Slovakia",dCode:"421",cCode:"SK"},{cName:"Slovenia",dCode:"386",cCode:"SI"},{cName:"Solomon Islands",dCode:"677",cCode:"SB"},{cName:"Somalia",dCode:"252",cCode:"SO"},{cName:"South Africa",dCode:"27",cCode:"ZA"},{cName:"South Sudan",dCode:"211",cCode:"SS"},{cName:"South Georgia and the South Sandwich Islands",dCode:"500",cCode:"GS"},{cName:"Spain",dCode:"34",cCode:"ES"},{cName:"Sri Lanka",dCode:"94",cCode:"LK"},{cName:"Sudan",dCode:"249",cCode:"SD"},{cName:"SuricName",dCode:"597",cCode:"SR"},{cName:"Svalbard and Jan Mayen",dCode:"47",cCode:"SJ"},{cName:"Swaziland",dCode:"268",cCode:"SZ"},{cName:"Sweden",dCode:"46",cCode:"SE"},{cName:"Switzerland",dCode:"41",cCode:"CH"},{cName:"Syrian Arab Republic",dCode:"963",cCode:"SY"},{cName:"Taiwan",dCode:"886",cCode:"TW"},{cName:"Tajikistan",dCode:"992",cCode:"TJ"},{cName:"Tanzania, United Republic of Tanzania",dCode:"255",cCode:"TZ"},{cName:"Thailand",dCode:"66",cCode:"TH"},{cName:"Timor-Leste",dCode:"670",cCode:"TL"},{cName:"Togo",dCode:"228",cCode:"TG"},{cName:"Tokelau",dCode:"690",cCode:"TK"},{cName:"Tonga",dCode:"676",cCode:"TO"},{cName:"Trinidad and Tobago",dCode:"1868",cCode:"TT"},{cName:"Tunisia",dCode:"216",cCode:"TN"},{cName:"Turkey",dCode:"90",cCode:"TR"},{cName:"Turkmenistan",dCode:"993",cCode:"TM"},{cName:"Turks and Caicos Islands",dCode:"1649",cCode:"TC"},{cName:"Tuvalu",dCode:"688",cCode:"TV"},{cName:"Uganda",dCode:"256",cCode:"UG"},{cName:"Ukraine",dCode:"380",cCode:"UA"},{cName:"United Arab Emirates",dCode:"971",cCode:"AE"},{cName:"United Kingdom",dCode:"44",cCode:"GB"},{cName:"United States",dCode:"1",cCode:"US"},{cName:"Uruguay",dCode:"598",cCode:"UY"},{cName:"Uzbekistan",dCode:"998",cCode:"UZ"},{cName:"Vanuatu",dCode:"678",cCode:"VU"},{cName:"Venezuela, Bolivarian Republic of Venezuela",dCode:"58",cCode:"VE"},{cName:"Vietnam",dCode:"84",cCode:"VN"},{cName:"Virgin Islands, British",dCode:"1284",cCode:"VG"},{cName:"Virgin Islands, U.S.",dCode:"1340",cCode:"VI"},{cName:"Wallis and Futuna",dCode:"681",cCode:"WF"},{cName:"Yemen",dCode:"967",cCode:"YE"},{cName:"Zambia",dCode:"260",cCode:"ZM"},{cName:"Zimbabwe",dCode:"263",cCode:"ZW"}],vr=[{gateway:"QDH",destination:"Ashford International (Kent) (QDH)"},{gateway:"ZYR",destination:"Brussels Midi (ZYR)"},{gateway:"XQE",destination:"Ebbsfleet International (Kent) (XQE)"},{gateway:"XDB",destination:"Lille Europe (XDB)"},{gateway:"QQS",destination:"London St Pancras International (QQS)"},{gateway:"XED",destination:"Marne La Vallee (Disneyland) (XED)"},{gateway:"XPG",destination:"Paris Gare du Nord (XPG)"}];(nr=e.TravellerSearchTypes||(e.TravellerSearchTypes={})).email="email",nr.name="name",nr.employeeNumber="employeeNumber";var br=function(){function i(e,r,n,o,a,u,c,l,d,p,h,m,f,g,y,v,b,S,C,T,P,_,A,D,k,O,F,N,I,R,E,M,B,L,j,w,x,U,V,H,G,Y){var Q,W=this;this.searchAirportsFetcher=e,this.searchAirlinesFetcher=r,this.storageService=n,this.userService=o,this.router=a,this.helpers=u,this.hotelAvalibilityService=c,this.citiesFetcher=l,this.confermaCitiesFetcher=d,this.postcodeFetcher=p,this.railStationFetcher=h,this.saveUserAddressUpdater=m,this.userAddressesFetcher=f,this.basketService=g,this.getUserCompanyOfficesFetcher=y,this.searchHotelChainsFetcher=v,this.baseValidateIsPostcodeValidTester=b,this.depotFetcher=S,this.confermaOfficeNamesFetcher=C,this.baseDeleteUserAddressUpdater=T,this.baseDeleteRecentSearchUpdater=P,this.baseSaveRecentSearchUpdater=_,this.getUserCurrentCarbonAllowanceFetcher=A,this.getRailStationFetcher=j,this.riskAlertsFetcher=x,this.quicklistFetcher=U,this.getUserRecentSearchesFetcher=V,this.getRailCardsFetcher=H,this.searchUsersCanBookForFetcher=Y,this.traveller_error=!1,this.travellerInformation=new t.BehaviorSubject([]),this.errors=new t.BehaviorSubject([]),this.searchLoadingDone=new t.BehaviorSubject(!1),this.searchTimedOut=new t.BehaviorSubject(!1),this.newSearchStarted=new t.BehaviorSubject(!1),this.firstLoad=!0,this.highest_search_priority=8,this.show_errors=!1,this.travellerValidationMessages=[],this.search_loading=!1,this.search_airport_loading=!1,this.selectedTravellers=[],this.selectedPlaces=[],this.countries=yr,this.eurostations=s.default.toArray(vr),console.log("Enterpise search service being inited"),this.searches=((Q={})[Z.Lounge]=new qe(k,u,g,n,this),Q[Z.Parking]=new et(O,u,g,n,this),Q[Z.Flight]=new we(N,u,o,g,n,this),Q[Z.Hotel]=new Ke(I,u,o,D,c,g,n,this,F,U,j),Q[Z.Car]=new Ne(R,E,u,g,n,this),Q[Z.Cab]=new Fe(M,u,n,this,g),Q[Z.InternationalRail]=new at(L,u,g,n,this),Q[Z.FastTrack]=null,Q[Z.Coach]=null,Q[Z.Rail]=new ot(B,j,u,g,n,this),Q[Z.Eurostar]=new it(G,u,o,g,n,this),Q),console.log("Newly created search objects: ",this.searches),this.search_objects=this.helpers.clone(this.init_search_objects()),this.selectedTravellers=this.storageService.getSessionItemAsList(i.SESSION_TRAVELLER),this.travellerInformation.next(this.selectedTravellers),o.fullUserDetails.userServices.subscribe((function(e){e&&(W.search_objects=Object.keys(W.search_objects).reduce((function(t,r){return t[r].enabled=!!e&&!!e[r],t}),W.search_objects))})),Array.isArray(this.countries)&&(this.countries=this.countries.sort((function(e,t){return e.cName<t.cName?-1:e.cName>t.cName?1:0}))),w.autoLogoutConfig=this.getAutoLogoutConfig()}return i.prototype.reset=function(){Object.values(this.searches).forEach((function(e){null==e||e.reset()})),this.removeAllTravellers(),this.basketService.reset()},i.prototype.getUserCurrentCarbonAllowance=function(e,t){t&&t.next(!0);var i={user:e};return this.getUserCurrentCarbonAllowanceFetcher.fetchList(i).pipe(r.take(1),r.map((function(e){return e})))},i.prototype.getRiskAlerts=function(e,t,i,n,o,a,s){n&&n.next(!0);var u={minLevel:e,maxLevel:t,countryIsoCode:i};return this.riskAlertsFetcher.fetchList(u).pipe(r.take(1),r.map((function(e){return n&&n.next(!1),e})))},i.prototype.getAirportsList=function(e,i,n,o,a,s){var u=this;if(e.length>2){n&&n.next(!0);var c={query:e};return i&&(c.countryCode=i),"boolean"==typeof o&&(c.hasLounge=o),"boolean"==typeof a&&(c.hasParking=a),"boolean"==typeof s&&(c.hasFastTrack=s),this.searchAirportsFetcher.fetchOne(c).pipe(r.take(1),r.map((function(e){if(n&&n.next(!1),e&&e.generalMatches)return u.helpers.clone(e.generalMatches).map((function(e){var t,r,i;return{destination:e.name,gateway:e.iata,terminals:u.processTerminals(e.terminals),country:null===(t=null==e?void 0:e.locationDetails)||void 0===t?void 0:t.country,postcode:null===(r=null==e?void 0:e.locationDetails)||void 0===r?void 0:r.postcode,countryCode:null===(i=null==e?void 0:e.locationDetails)||void 0===i?void 0:i.countryCode}}))})))}return t.of([])},i.prototype.getAirlinesList=function(e,i){var n=this;if(e.length>=2){i&&i.next(!0);var o={query:e};return this.searchAirlinesFetcher.fetchOne(o).pipe(r.take(1),r.map((function(e){if(i&&i.next(!1),e&&e.generalMatches)return n.helpers.clone(e.generalMatches).map((function(e){return{code:e.iata,name:e.name}}))})))}return t.of([])},i.prototype.getAirportLocations=function(t,i,n,o,a,s){return this.getAirportsList(t,i,n,o,a,s).pipe(r.map((function(t){return t.map((function(t){return{name:t.destination,type:e.LocationTypes.Airport,airport:t}}))})))},i.prototype.getCityLocations=function(e,t,r,i){if(!(e.length<=2))return i?this.getConfermaCityLocations(e,t,r):this._getCityLocations(e,t,r)},i.prototype._getCityLocations=function(t,i,n){null==n||n.next(!0);var o={query:t};i&&(o.countryCode=i);return this.citiesFetcher.fetchList(o).pipe(r.take(1),r.map((function(t){var r=t.map((function(t){return{name:t.name,longitude:t.coordinates.longitude,latitude:t.coordinates.latitude,type:e.LocationTypes.City,countryCode:t.countryCode,id:t.id}}));return null==n||n.next(!1),r})))},i.prototype.getConfermaCityLocations=function(t,i,n){null==n||n.next(!0);var o={cityName:t};i&&(o.countryCode=i);return this.confermaCitiesFetcher.fetchOne(o).pipe(r.take(1),r.map((function(t){var r=t.suggestions.map((function(t){return{name:t.name,longitude:t.longitude,latitude:t.latitude,type:e.LocationTypes.City,countryCode:t.countryCode}}));return null==n||n.next(!1),r})))},i.prototype.getCarHireDepots=function(e,t,r){null==r||r.next(!0);return this.depotFetcher.fetchList({latitude:e,longitude:t})},i.prototype.getPostcodeList=function(i){return tr.UK_POSTCODE.test(i)?this.postcodeFetcher.fetchList({postcode:i}).pipe(r.map((function(t){return t.map((function(t){return{name:t.postcode,type:e.LocationTypes.Postcode,latitude:t.latitude,longitude:t.longitude}}))}))):t.of([])},i.prototype.addToSelectedPlaces=function(e){this.selectedPlaces.push(e)},i.prototype.getSelectedPlaceById=function(e){return this.selectedPlaces.find((function(t){return t.place_id===e}))},i.prototype.getOfficeLocations=function(i){if(i.length>2){return this.getUserCompanyOfficesFetcher.fetchList().pipe(r.take(1),r.map((function(t){return t.map((function(t){return{name:t.name,office:t.addresses[0],type:e.LocationTypes.Office}}))})))}return t.of([])},i.prototype.getStationLocations=function(i,n){return i.length>2?(null==n||n.next(!0),this.railStationFetcher.fetchList({query:i}).pipe(r.take(1),r.map((function(t){return n&&n.next(!1),t.map((function(t){return{type:e.LocationTypes.TrainStation,name:t.name,railstation:t}}))})))):t.of([])},i.prototype.getHotelLocationsList=function(e,i,n){return e.length>2?tr.UK_POSTCODE.test(e)?this.getPostcodeList(e):((null==n?void 0:n.value)||n.next(!0),t.forkJoin([this.getAirportLocations(e,i,n),this.getCityLocations(e,i,n),this.getStationLocations(e,n),this.getOfficeLocations(e)]).pipe(r.map((function(e){return(null==n?void 0:n.value)&&n.next(!1),e.reduce((function(e,t){return e.push.apply(e,C(t)),e}),[])})))):t.of([])},i.prototype.getStationsAndAirportsList=function(e,i,n){return e.length>2?((null==n?void 0:n.value)||n.next(!0),t.forkJoin([this.getAirportLocations(e,i,n),this.getStationLocations(e,n)]).pipe(r.map((function(e){return(null==n?void 0:n.value)&&n.next(!1),e.reduce((function(e,t){return e.push.apply(e,C(t)),e}),[])})))):t.of([])},i.prototype.removeTraveller=function(e){this._removeTraveller(e),this.storageService.setSessionItem(i.SESSION_TRAVELLER,this.selectedTravellers),this.updateTravellerInformation()},i.prototype._removeTraveller=function(e){this.selectedTravellers=this.selectedTravellers.filter((function(t){return!ar.equals(t,e)}))},i.prototype.removeAllTravellers=function(){var e=this;console.log("remove all travellers called!"),console.log(this.selectedTravellers),this.selectedTravellers||(this.selectedTravellers=[]),this.selectedTravellers.forEach((function(t){e._removeTraveller(t)})),this.storageService.setSessionItem(i.SESSION_TRAVELLER,this.selectedTravellers),this.updateTravellerInformation()},i.prototype.addTraveller=function(e){this.travellerAlreadyAdded(e)||this.currentNoOfTravellersGreaterOrEqualToMax()||(this.selectedTravellers.push(e),this.storageService.setSessionItem(i.SESSION_TRAVELLER,this.selectedTravellers),this.updateTravellerInformation())},i.prototype.currentNoOfTravellersGreaterOrEqualToMax=function(){return this.selectedTravellers.length>=this.maxTravellers()},i.prototype.maxTravellers=function(){return this.canUseTravellerProfile()?1:8},i.prototype.travellerAlreadyAdded=function(e){return!!this.selectedTravellers.find((function(t){return ar.equals(t,e)}))},i.prototype.canUseTravellerProfile=function(){return!1},i.prototype.getCurrentNoOfTravellers=function(){return this.selectedTravellers.length},i.prototype.updateTravellerInformation=function(){this.storageService.setSessionItem(i.SESSION_TRAVELLER,this.selectedTravellers),this.travellerInformation.next(C(this.selectedTravellers))},i.prototype.determineHighestSearchPriority=function(){return this.highest_search_priority=this._getHighestSearchPriorityObject().highest},i.prototype.getHighestSearchPriorityObject=function(e){return this._getHighestSearchPriorityObject(e).currentItem},i.prototype._getHighestSearchPriorityObject=function(e){return void 0===e&&(e={}),Object.values(this.search_objects).reduce((function(t,r){var i=t.highest,n=t.currentItem;if(r.chosen&&r.priority<i){if(!e[r.type])return{highest:r.priority,currentItem:r};r.chosen=!1}return{highest:i,currentItem:n}}),{highest:Number.MAX_SAFE_INTEGER,currentItem:null})},i.prototype.getSelectedOptions=function(){var e=this;return Object.keys(this.search_objects).reduce((function(t,r){return e.search_objects[r].chosen&&t.push(r),t}),[])},i.prototype.hasSimpleGuests=function(){return!1},i.prototype.setGetMeThereSearchObjects=function(){console.log("+++ Setting GetMeThere Search Objects +++"),this.search_objects=this.helpers.clone(this.getMeThereSearchObjects())},i.prototype.resetSearchParams=function(){console.log("Reseting Search Params!"),this.search_objects=this.helpers.clone(this.init_search_objects()),this.storageService.setSessionItem(i.SESSION_TRAVELLER,this.search_objects),Object.values(this.searches).forEach((function(e){e.reset()}))},i.prototype.canSearch=function(e){return this.determineHighestSearchPriority(),!!(this.search_objects[e]&&(console.log("can search here"),this.search_objects[e].chosen&&this.hasHighestSearchPriority(this.search_objects[e].priority)))&&(console.log(e+" can be searched"),!0)},i.prototype.hasHighestSearchPriority=function(e){return this.determineHighestSearchPriority(),e<=this.highest_search_priority},i.prototype.getAllErrorMessages=function(){var e=this.travellerValidationMessages;return this.search_objects[Z.Lounge].chosen&&this.canSearch(Z.Lounge)&&e.push.apply(e,C(this.searches[Z.Lounge].validationMessages)),this.search_objects[Z.Car].chosen&&this.canSearch(Z.Car)&&e.push.apply(e,C(this.searches[Z.Car].validationMessages)),this.search_objects[Z.Rail].chosen&&this.canSearch(Z.Rail)&&e.push.apply(e,C(this.searches[Z.Rail].validationMessages)),this.search_objects[Z.Parking].chosen&&this.canSearch(Z.Parking)&&e.push.apply(e,C(this.searches[Z.Parking].validationMessages)),this.search_objects[Z.Cab].chosen&&this.canSearch(Z.Cab)&&e.push.apply(e,C(this.searches[Z.Cab].validationMessages)),this.search_objects[Z.Hotel].chosen&&this.canSearch(Z.Hotel)&&e.push.apply(e,C(this.searches[Z.Hotel].validationMessages)),this.errors.next(e),e},i.prototype.travellersContainUser=function(){var e=this;return!!this.selectedTravellers.find((function(t){return t.id===e.userService.getUserId().toString()}))},i.prototype.validateTravellers=function(){switch(this.travellerValidationMessages=[],this.userService.fullUserDetails.userData.value.booker_type){case D.SelfBook:1===this.selectedTravellers.length&&this.travellersContainUser()||this.travellerValidationMessages.push("Current user must be a traveller");break;case D.BookerWithSelf:this.selectedTravellers.length<1&&this.travellersContainUser()||(this.travellerValidationMessages.push("Please add your self."),this.traveller_error=!0);break;case D.Booker:case D.Company:case D.CompanyGroup:case D.Office:case D.Tmc:case D.Root:this.selectedTravellers.length>=1||(this.travellerValidationMessages.push("Please select at least one traveller"),this.traveller_error=!0);break;default:return this.travellerValidationMessages.push("Unrecognised user type! - Please contact support."),!1}return 0===this.travellerValidationMessages.length},i.prototype.findPaxInTravellers=function(e){return this.selectedTravellers.find((function(t){return e===t.email}))},i.prototype.validateForms=function(){var e=this._findSearchObtect();return this.getAllErrorMessages(),!!e&&(this.errors.next(this.searches[e.type].messages.value),this.validateTravellers()&&this.searches[e.type].isValid.value)},i.prototype._findSearchObtect=function(){var e=this;return Object.values(this.search_objects).find((function(t){return!!t&&t.priority===e.highest_search_priority}))},i.prototype.startSearches=function(){var e,t=this;this.newSearchStarted.next(!0),this.search_loading=!0,(e=this._findSearchObtect())&&(e.chosen=!0),e&&!this.router.url.includes(e.resultUrl)&&this.router.navigate([e.resultUrl]);var r=this;setTimeout((function(){r.search_loading&&(r.search_loading=!1,r.searchTimedOut.next(!0),r.searchLoadingDone.next(!0))}),12e3);try{Promise.all(Object.values(this.searches).map((function(e){return e&&t.search_objects[e.type]&&t.search_objects[e.type].chosen?e.startSearch():Promise.resolve(!1)}))).finally((function(){t.search_loading=!1,t.searchLoadingDone.next(!0)}))}catch(e){console.error(e),this.search_loading=!1,this.searchLoadingDone.next(!0)}},i.prototype.getTaxiStationLocations=function(e,r){return e.length<3?t.of([]):t.of([{destination:"Manchester Airpot",isairport:!0,supplier_code:"MAN",address:"Manchester Airport",postcode:"M90 1QX"},{destination:"Manchester Piccadilly",isairport:!1,supplier_code:"MMAN",address:"Manchester Piccadilly",postcode:"M1 2PZ"},{destination:"London Heathrow",isairport:!0,supplier_code:"LHR",address:"London Heathrow Airport",postcode:"TW6 1EW"}])},i.prototype.getAddresses=function(e){return t.of([{House:"Cecil Court",Street:"28-36 Cecil Road",Town:"Hale",PostCode:"WA15 9PB",Country:"UK"}])},i.prototype.getUserAddresses=function(e){return this.userAddressesFetcher.fetchList().pipe(r.take(1),r.map((function(e){return e.map((function(e){return{ID:e.id,House:e.numberOrName,Street:e.street,Town:e.town,PostCode:e.postcode,Country:e.countryCode}}))})))},i.prototype.deleteUserAddressByID=function(e){return this.baseDeleteUserAddressUpdater.updateOne({id:e})},i.prototype.getHotelChain=function(e,i){if(e.length>2){null==i||i.next(!0);return this.searchHotelChainsFetcher.fetchList({query:e}).pipe(r.take(1),r.map((function(e){var t=e.map((function(e){return{name:e}}));return null==i||i.next(!1),t})))}return t.of([])},i.prototype.getOfficeNames=function(e){return this.confermaOfficeNamesFetcher.fetchList().pipe(r.take(1),r.map((function(e){var t;if(e)return null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.map((function(e){return{id:e.id,name:e.name}}))})))},i.prototype.getRailCards=function(){return this.getRailCardsFetcher.fetchList().pipe(r.take(1),r.map((function(e){if(e)return null==e?void 0:e.map((function(e){return{name:e.name,code:e.code}}))})))},i.prototype.getAirportByCode=function(e){return e?this.searchAirportsFetcher.fetchOne({query:e}).pipe(r.take(1),r.map((function(e){return e}))):t.of()},i.prototype.init_search_objects=function(){return{}},i.prototype.getMeThereSearchObjects=function(){return{}},i.prototype.getSelectedtravellers=function(){return this.selectedTravellers},i.prototype.resetSearchObjects=function(){this.search_objects=this.helpers.clone(this.init_search_objects())},i.prototype.processTerminals=function(e){var t=[];return e.includes("1")||e.includes("2")||e.includes("3")||e.includes("4")||e.includes("5")?(t.push({key:"Any Terminal",value:"Any"}),e.forEach((function(e){t.push({key:"Terminal "+e,value:""+e})}))):1===e.length?t.push({key:e[0]+" Terminal",value:"Any"}):(t.push({key:"Any Terminal",value:"Any"}),e.forEach((function(e){t.push({key:e+" Terminal",value:""+e})}))),t},i.prototype.saveUserAddress=function(e){return y(this,void 0,void 0,(function(){return v(this,(function(t){switch(t.label){case 0:return e?[4,this.saveUserAddressUpdater.updateOne(e).toPromise()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},i.prototype.canBook=function(e){return!!this.userService.canBook(e)},i.prototype.isPostcodeVaild=function(e){return this.baseValidateIsPostcodeValidTester.test({postcode:e})},i.prototype.makeCabHireQuery=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i={adults:0,airport:null,children:0,countryCode:null,departs:this.helpers.makeMomentDayTime(),fromAddress:null,fromStation:null,fromLocationType:e.TaxiFormMode.ADDRESS,infants:0,toAddress:null,toStation:null,toLocationType:e.TaxiFormMode.ADDRESS,vehicleType:k.Any,viasFrom:null,viasTo:null};return this.helpers.sanatizeReturns(i,Object.assign.apply(Object,C([{}],t)),["departs"])},i.prototype.makeCarHireQuery=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={adults:0,airCon:null,carClass:null,carType:null,children:0,chosenVendor:null,cityDropoff:null,cityDropoffDepot:null,cityPickup:null,cityPickupDepot:null,dropoff_country:"GB",dropoff_datetime:null,dropoff_location:null,estimatedMileage:null,locationType:null,pickup_country:null,pickup_datetime:null,pickup_location:null,postcodeDropoff:null,postcodeDropoffRaw:null,postcodePickup:null,postcodePickupRaw:null,return_to_pickup:!0,transmission:null};return this.helpers.sanatizeReturns(r,Object.assign.apply(Object,C([{}],e)),["pickup_datetime","dropoff_datetime"])},i.prototype.makeFlightQuery=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this.helpers.makeMomentDayTime(),n=this.helpers.makeMomentDayTime(1),o=this.helpers.momentRoundMinutes(i,30),a=this.helpers.momentRoundMinutes(n,30),s={adults:0,arriveLocation:null,cabinClass:j.Any,children:0,chosenSearchType:null,departLocation:null,fareType:L.Flexible,inboundDate:o,inTimeCriteria:e.TimeWindow.Depart,maxConnections:null,includeNearbyAirports:!1,multiDestination:[],outBoundDate:a,outTimeCriteria:e.TimeWindow.Depart,preferredCarriers:[null,null,null,null],returnCabinClass:j.Any};return this.helpers.sanatizeReturns(s,Object.assign.apply(Object,C([{}],t)),["outBoundDate","inboundDate"])},i.prototype.makeHotelQuery=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i={checkin_date:u.default().set("hour",23).set("minute",59),checkout_date:u.default().add(1,"day").set("hour",23).set("minute",59),country:{cCode:"GB",cName:"United Kingdom"},currency:"GBP",distance:5,hotel_availability:null,hotel_chain:null,hotel_name:null,location_type_select:e.LocationTypes.Airport,location:null,no_of_occupants:1,no_of_rooms:1,office:null,postcode:null,prefered_hotels_only:!1,trainsStation:null};return this.helpers.sanatizeReturns(i,Object.assign.apply(Object,C([{}],t)),["checkin_date","checkout_date"])},i.prototype.makeLoungesQuery=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={adults:0,arrivalDatetime:u.default(),children:0,infants:0,locationCode:null,terminal:null};return this.helpers.sanatizeReturns(r,Object.assign.apply(Object,C([{}],e)),["arrivalDatetime"])},i.prototype.makeParkingQuery=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.helpers.makeMomentDayTime(),i=this.helpers.makeMomentDayTime(1),n=this.helpers.momentRoundMinutes(r,30),o=this.helpers.momentRoundMinutes(i,30),a={arrivalDatetime:n,carParkedForYou:null,departDatetime:o,locationCode:null,meetAndGreet:null,onAirport:null,outFlightNumber:null,parkAndRide:null,parkAndStroll:null,recommended:null,terminal:null};return this.helpers.sanatizeReturns(a,Object.assign.apply(Object,C([{}],e)),["arrivalDatetime","departDatetime"])},i.prototype.makeRailQuery=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this.helpers.momentRoundMinutes(u.default(),30),n={airportExpressStation:null,applyRailcards:!1,carnetTicket:!1,chosenSearchClass:W.All,chosenSearchType:K.ReturnJourney,disableAutoDiscounts:!1,extraTime:!1,inBoundDateTime:i,isAirportExpress:!1,noOfAdults:0,noOfChildren:0,openReturn:!1,outboundCriteria:e.RailSearchCriteria.Depart,outBoundDateTime:i,prioritiseByPrice:!1,returnCriteria:e.RailSearchCriteria.Depart,travellingFrom:null,travellingTo:null,via:!1,viaLocation:null,railCards:null};return this.helpers.sanatizeReturns(n,Object.assign.apply(Object,C([{}],t)),["inBoundDateTime","outBoundDateTime"])},i.prototype.makeIrlQuery=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.helpers.momentRoundMinutes(u.default(),30),i={supplier:null,countryCode:"",class:null,outboundDepartureDateTime:r,departureLocationId:null,arrivalLocationId:null,adults:0,children:0,returnDepartureDateTime:r,journeyType:null};return this.helpers.sanatizeReturns(i,Object.assign.apply(Object,C([{}],e)),["returnDepartureDateTime","outboundDepartureDateTime"])},i.prototype.makeEurostarQuery=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this.helpers.makeMomentDayTime(),n=this.helpers.makeMomentDayTime(1),o=this.helpers.momentRoundMinutes(i,30),a=this.helpers.momentRoundMinutes(n,30),s={adults:0,arriveLocation:null,cabinClass:j.Any,children:0,chosenSearchType:e.EurostarSearchType.return,departLocation:null,fareType:L.Flexible,inboundDate:o,inTimeCriteria:e.TimeWindow.Depart,maxConnections:null,includeNearbyAirports:!1,multiDestination:[],outBoundDate:a,outTimeCriteria:e.TimeWindow.Depart,preferredCarriers:[null,null,null,null],returnCabinClass:j.Any};return this.helpers.sanatizeReturns(s,Object.assign.apply(Object,C([{}],t)),["outBoundDate","inboundDate"])},i.prototype.shouldAddTravellerSubscription=function(){return!1},i.prototype.getAutoLogoutConfig=function(){return{}},i.prototype.shouldFetchAllOffices=function(){return!1},i.prototype.isFlightsGrouped=function(){return!1},i.prototype.getCountryFullNameFromCountryCode=function(e){for(var t=0;t<this.countries.length;t++){var r=this.countries[t];if(r.cCode===e)return r.cName}return"Unknown"},i.prototype.getUserRecentSearches=function(e,t){null==t||t.next(!0);var i={serviceType:e};return this.getUserRecentSearchesFetcher.fetchList(i).pipe(r.take(1),r.map((function(e){var r=e.map((function(e){return{id:e.id,name:e.name,serviceType:e.serviceType,searchArgs:e.searchArgs,createdAt:e.createdAt,updatedAt:e.updatedAt,travelDate:e.travelDate,travellers:e.travellers}}));return null==t||t.next(!1),r})))},i.prototype.deleteRecentSearchByID=function(e){return this.baseDeleteRecentSearchUpdater.updateOne({id:e})},i.prototype.saveRecentSearch=function(e){e&&this.baseSaveRecentSearchUpdater.updateOne(e).pipe(r.take(1)).subscribe()},i.prototype.lookupEurostarStations=function(e){return console.log("term| ",e),""===e?t.of(this.eurostations):t.of(this.eurostations.filter((function(t){return t.destination.toLowerCase().indexOf(e.toLowerCase())>-1})))},i.prototype.searchTravellers=function(t,i){var n=this.userService.getUserBookingType();if(this.traveller_error=!1,n&&n!==D.SelfBook&&n!==D.Traveller&&t.length>=1){var o=t.toLowerCase().match(/([\w])+/g),a={};switch(i){case e.TravellerSearchTypes.name:a.userName=o.length>1?o[0]:t;break;case e.TravellerSearchTypes.email:a.email=t;break;case e.TravellerSearchTypes.employeeNumber:a.employeeId=t}return this.searchUsersCanBookForFetcher.fetchList(a).pipe(r.map((function(e){return e?e.sort((function(e,t){return e.surname<t.surname?-1:e.surname>t.surname?1:0})):[]})))}},i}();br.SESSION_TRAVELLER="search_travellers";var Sr=function(){},Cr=function(){function t(e,t){this.modalOpenerService=e,this._jwtToken=null,this.timer=null,this.timeoutDuration=3600,this.autoLogoutConfig={},this.timeOutDuration=t.autoLogoutTime}return Object.defineProperty(t.prototype,"timeOutDuration",{set:function(e){this.timeoutDuration=60*e-60},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jwtToken",{set:function(e){e!==this.jwtToken&&(this._jwtToken=e)},enumerable:!1,configurable:!0}),t.prototype._updateTimer=function(){var e=this;window.clearTimeout(this.timer),this.timer=null,console.log("Resetting auto log out"),this.timer=window.setTimeout((function(){e.checkToLogout()}),6e4)},t.prototype.checkToLogout=function(){var t=this;u.default().unix(),this.lastUpdated.unix(),this.timeoutDuration;u.default().unix()-this.lastUpdated.unix()>this.timeoutDuration?(this.timer=null,this.lastUpdated=u.default(),this.modalOpenerService.open(d.AutoLogout,this.autoLogoutConfig,{}).then((function(r){r!==e.LogoutEnum.LOGOUT?t._updateTimer():t._jwtToken=null}))):this._updateTimer()},t}(),Tr=function(){function e(e,t){this.httpService=e,this.helpers=t}return e.prototype.getAmenitiesForFlight=function(e){return new t.BehaviorSubject([])},e.prototype.parseAmenities=function(e){var t=e.linked,r=function(e,t){return t.find((function(t){return t.id==e}))};return e.data.map((function(e){var i=r(e.links.segments[0],t.segments);return{seat:r(i.links.seat.toString(),t.seats),wifi:r(i.links.wifi.toString(),t.wifis),power:r(i.links.power.toString(),t.entertainments),entertainment:r(i.links.entertainment.toString(),t.entertainments),fresh_food:r(i.links.fresh_food.toString(),t.fresh_foods),beverage:r(i.links.beverage.toString(),t.beverages),layout:r(i.links.layout.toString(),t.layouts),aircraft:r(i.links.aircraft.toString(),t.aircrafts)}}))},e.prototype.convertClassString=function(e){switch(e){case"ECONOMY":return"ECON";case"PREMIUM ECONOMY":return"PREMECON";case"BUSINESS":return"BUSINESS";case"FIRST":return"FIRST";default:return"ECON"}},e.prototype.getUpasForFlight=function(e){var r=this,i=new t.BehaviorSubject([]);return e.LegDetails.map((function(e){return{segments:[{dep:e.depPoint,arr:e.arrPoint,carrier:e.touropID,flt_no:e.transNo.substr(e.touropID.length),dep_date:r.helpers.formatIsoDate(r.helpers.yymmddToMoment(e.dateDep)),cabin_id:r.convertClass(e.seatClassBasic.toUpperCase())}]}})),i},e.prototype.convertClass=function(e){switch(e){case"ECONOMY":return 1;case"PREMIUM ECONOMY":return 2;case"BUSINESS":return 3;case"FIRST":return 4;default:return 1}},e.prototype.parseResponse=function(e){var t=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join("_")},r=function(e){return e.attributes},i=e.included.reduce((function(e,r){return e[t(r.type,r.id)]=r,e}),{}),n=function(e){return i[function(e){return t(e.type,e.id)}(e)]};return e.data.relationships.legs.data.map((function(e){var t=n(e).relationships.leg_fares.data.map(n).filter((function(e){return!!e.relationships.fare.data}));return{brands:t.map((function(e){return n(e.relationships.fare.data)})).map(r),upas:t.map((function(e){return e.relationships.leg_fare_segments.data.map(n)})).map((function(e){return e.map((function(e){return e.relationships.upas.data.map(n).map((function(e){return{id:e.id,details:r(e)}})).reduce((function(e,t){return e[t.id]=t.details,e}),{})}))}))}}))},e}();f([Ve(),g("design:type",Function),g("design:paramtypes",[Object]),g("design:returntype",t.BehaviorSubject)],Tr.prototype,"getAmenitiesForFlight",null),f([Ve(),g("design:type",Function),g("design:paramtypes",[Object]),g("design:returntype",t.BehaviorSubject)],Tr.prototype,"getUpasForFlight",null);var Pr=function(e){function t(t,r){var i=e.call(this,r)||this;return i.query=t,i}return m(t,e),t.prototype.test=function(e){return this.processCall(this.query.fetch(e))},t}(p),_r=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.validateUserMIFreeValue},t}(Pr),Ar=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.isPostcodeValid},t}(Pr),Dr=function(e){function t(t,r){var i=e.call(this,r)||this;return i.query=t,i}return m(t,e),t.prototype.updateOne=function(e){return this.processCall(this.query.mutate(e))},t}(p),kr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.acceptNewPrice},t}(Dr),Or=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.addItemToBasket},t}(Dr),Fr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.addUserToBasketItem},t}(Dr),Nr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.bookBasket},t}(Dr),Ir=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.createBasket},t}(Dr),Rr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.moveItemToADifferentBasket},t}(Dr),Er=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.deleteBasket},t}(Dr),Mr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.removeItemFromBasket},t}(Dr),Br=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.deleteUserAddress},t}(Dr),Lr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.deleteRecentSearch},t}(Dr),jr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.revalidateBasket},t}(Dr),wr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.saveUserAddress},t}(Dr),xr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.sendBasketForApproval},t}(Dr),Ur=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.setBasketItemLeadPassenger},t}(Dr),Vr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.setBasketItemMIGroup},t}(Dr),Hr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.setBasketItemMIValue},t}(Dr),Gr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.updateBasketTitle},t}(Dr),Yr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.baseUpdateBasketNotes},t}(Dr),Qr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){var t;return null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.saveRecentSearch},t}(Dr),Wr=function(e){function t(t,r){return e.call(this,t,r)||this}return m(t,e),t.prototype.getDataFromResult=function(e){return e.data.setBasketItemPaymentMethod},t}(Dr);e.AbstractHttpCallService=dr,e.AddressImpl=lt,e.AuthInfo=or,e.BaseAcceptNewPriceUpdater=kr,e.BaseAddItemToBasketUpdater=Or,e.BaseAddUserToBasketItemUpdater=Fr,e.BaseBookBasketUpdater=Nr,e.BaseCabhireQuoteFetcher=St,e.BaseCarHireAvailabilityDetailFetcher=Tt,e.BaseCarhireQuoteFetcher=Ct,e.BaseConfermaOfficeNamesFetcher=Jt,e.BaseCreateBasketUpdater=Ir,e.BaseDeleteBasketUpdater=Er,e.BaseDeleteRecentSearchUpdater=Lr,e.BaseDeleteUserAddressUpdater=Br,e.BaseEnterpriseBasketService=ur,e.BaseEnterpriseMyBookingsService=gr,e.BaseEnterpriseSearch=l,e.BaseEnterpriseSearchService=br,e.BaseEnvironment=Me,e.BaseEurostarQuoteFetcher=er,e.BaseEventMessenager=je,e.BaseFlightQuoteFetcher=Pt,e.BaseGetBasketFetcher=vt,e.BaseGetMiAutoSugestionFetcher=kt,e.BaseGetRailStationFetcher=_t,e.BaseGetRailcardsFetcher=$t,e.BaseGetRiskAlertsFetcher=Xt,e.BaseGetUserBasketsFetcher=At,e.BaseGetUserCompanyOfficesFetcher=Kt,e.BaseGetUserCurrentCarbonAllowanceFetcher=zt,e.BaseGetUserFetcher=Vt,e.BaseGetUserRecentSearchesFetcher=Dt,e.BaseHelperRoutines=Ge,e.BaseHotelAvalibilityQuoteFetcher=Ot,e.BaseHotelAvalibilityService=lr,e.BaseHotelQuoteFetcher=Ft,e.BaseIrlQuoteFetcher=Et,e.BaseLogonService=mr,e.BaseLoungeQuoteFetcher=Nt,e.BaseModalOpenerService=fr,e.BaseNetworkCall=p,e.BaseParkingQuoteFetcher=It,e.BaseRailQuoteFetcher=Rt,e.BaseRemoveItemFromBasketUpdater=Mr,e.BaseRevalidateBasketUpdater=jr,e.BaseRouteHappyService=Tr,e.BaseSaveRecentSearchUpdater=Qr,e.BaseSaveUserAddressUpdater=wr,e.BaseSearchAirlinesFetcher=Mt,e.BaseSearchAirportsFetcher=Bt,e.BaseSearchCityFetcher=Lt,e.BaseSearchConfermaCityFetcher=jt,e.BaseSearchConfermaQuicklistFetcher=Zt,e.BaseSearchDepotFetcher=Wt,e.BaseSearchHotelChainsFetcher=qt,e.BaseSearchPostcodeFetcher=wt,e.BaseSearchRailStationsFetcher=xt,e.BaseSearchUsersCanBookForFetcher=Ut,e.BaseSendBasketForApprovalUpdater=xr,e.BaseSetBasketItemLeadPassengerUpdater=Ur,e.BaseSetBasketItemMiGroupUpdater=Vr,e.BaseSetBasketItemMiValueUpdater=Hr,e.BaseSetPaymentOptionUpdater=Wr,e.BaseStorageService=Sr,e.BaseUpdateBasketNoteUpdater=Yr,e.BaseUpdateBasketTitleUpdater=Gr,e.BaseUserAddressesFetcher=Qt,e.BaseUserMessagesFetcher=Ht,e.BaseUserProductsFetcher=Gt,e.BaseUserService=hr,e.BaseUserUiConfigsFetcher=Yt,e.BaseValidateIsPostcodeValidTester=Ar,e.BaseValidateMiFreeValueTester=_r,e.BaseWebTokenService=Cr,e.BasemoveBasketItemToBasket=Rr,e.BasketInfoMiDetailsImpl=fe,e.BookableBasket=ke,e.CabHireEnterpriseSearch=Fe,e.CarhireEnterpriseSearch=Ne,e.EurostarEnterpriseSearch=it,e.FlightEnterpriseSearch=we,e.HotelEnterpriseSearch=Ke,e.HotelFilters=We,e.IRLEnterpriseSearch=at,e.InternalBasket=sr,e.LimitedCache=Ue,e.LoginError=ir,e.LoungesEnterpriseSearch=qe,e.MAX_TRAVELLERS=8,e.ManagementInfoAndIsValid=le,e.Memorise=Ve,e.ModalTypes=d,e.ParkingEnterpriseSearch=et,e.PhoneNumberImpl=dt,e.RailEnterpriseSearch=ot,e.RegExps=tr,e.SupplementaryBookingInfoImpl=ht,e.Suppliers=gt,e.TravellerObject=ar,e.USER_SIGNEDIN="USER_SIGNEDIN",e.USER_SIGNEDOUT=pr,e.UserFavorurite=mt,e.UserInfoImpl=pt,e.ValidatorChecker=te,e.defaultValidations=$e,e.excludedExpression=Te,e.filtersKeys={chain:"chain",preferred:"preferred",amenitytype:"amenitytype",distanceRange:"distanceRange",extra:"extra",hotelName:"hotelName",priceRange:"priceRange",breakfastType:"breakfastType"},e.includedExpression=Ce,e.makeManagamentInfo=me,e.ɵ0=Be,e.ɵd=bt,e.ɵe=yt,e.ɵf=Dr,e.ɵg=Pr,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
|
-
//# sourceMappingURL=obtservices-base.umd.min.js.map
|
|
16
|
+
//# sourceMappingURL=sabstravtech-obtservices-base.umd.min.js.map
|