(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{"9lYf":function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var i=r("9Wjo"),a=r("KuF8"),h=function(){function t(t,e){this.flightState=t,this.generalState=e,this.generalHelper=new a.a}return t.prototype.createExpressSearchRequest=function(t,e){var r,a={};return new i.c,a.Parameters=new i.b,a.TUI="",a.SecType="",a.Process="",a.Source="LV",a.Mode="SY",a.ADT=Number(this.flightState.thirdPartySearchURLParams.Adult),a.CHD=Number(this.flightState.thirdPartySearchURLParams.Child),a.INF=Number(this.flightState.thirdPartySearchURLParams.Infant),a.Cabin=this.flightState.thirdPartySearchURLParams.Cabin,a.FareType=e||this.flightState.thirdPartySearchURLParams.TripType,a.Trips=this.getTripArray(t),a.Parameters.IsDirect=!1,a.Parameters.Airlines="",a.Parameters.GroupType="",a.Parameters.Refundable="",a.Parameters.Airlines=this.flightState.thirdPartySearchURLParams.AirlinesCollection,a.Parameters.JourneyKey="DM"!=this.flightState.thirdPartySearchURLParams.TripType?this.flightState.thirdPartySearchURLParams.JourneyKey:"",a.Parameters.FareKey="DM"!=this.flightState.thirdPartySearchURLParams.TripType?this.getFareKey():"",a.Parameters.PaxCategory="",a.Parameters.FromAPI=this.flightState.thirdPartySearchURLParams.FromAPI,"undefined"!=typeof sessionStorage&&sessionStorage.getItem("reissue")&&"undefined"!=sessionStorage.getItem("reissue")&&(r=JSON.parse(sessionStorage.getItem("reissue")),a.Parameters.AvailType=r.reissuetype,a.Parameters.RefType="PNR",a.Parameters.RefID=r.pnr,a.Parameters.Airlines=this.generalHelper.isIntLCCFlight(r.airline)?"6E,SG,G8":r.airline,a.ClientID=this.generalState.ClientID?this.generalState.ClientID:this.generalHelper.getClientId()),a},t.prototype.getFareKey=function(){var t=this.flightState&&this.flightState.thirdPartySearchURLParams&&this.flightState.thirdPartySearchURLParams.DisplayedPrice?this.flightState.thirdPartySearchURLParams.DisplayedPrice:"";if(this.generalState.WebSettings&&this.generalState.WebSettings[0]){var e=this.generalState.WebSettings[0].filter((function(t){return"ThirdPartySearchConvinientFee"==t.Key}));if(e&&e.length>0&&e[0]&&Number(e[0].Value)&&Number(e[0].Value)>0){var r=(Number(this.flightState.thirdPartySearchURLParams.Adult)+Number(this.flightState.thirdPartySearchURLParams.Child))*Number(e[0].Value);t=this.flightState&&this.flightState.thirdPartySearchURLParams&&this.flightState.thirdPartySearchURLParams.DisplayedPrice?(Number(this.flightState.thirdPartySearchURLParams.DisplayedPrice)-r).toString():""}}return this.flightState.thirdPartySearchURLParams.FareKey?this.flightState.thirdPartySearchURLParams.FareKey.replace(this.flightState.thirdPartySearchURLParams.DisplayedPrice,t):""},t.prototype.getTripArray=function(t){var e=this,r=[],i={};return"IM"!=this.flightState.thirdPartySearchURLParams.TripType?(i.From=this.flightState.thirdPartySearchURLParams.Trips[t].From,i.FromArptName=this.flightState.thirdPartySearchURLParams.Trips[t].FromArptName,i.FromCity=this.flightState.thirdPartySearchURLParams.Trips[t].FromCity?this.flightState.thirdPartySearchURLParams.Trips[t].FromCity:this.flightState.AllAirports&&i&&i.From?this.flightState.AllAirports.find((function(t){return t.Code==i.From})).CityName:"",i.OnwardDate=this.flightState.thirdPartySearchURLParams.Trips[t].OnwardDate,i.OrderId=this.flightState.thirdPartySearchURLParams.Trips[t].OrderId,i.ReturnDate=this.flightState.thirdPartySearchURLParams.Trips[t].ReturnDate,i.TUI=this.flightState.thirdPartySearchURLParams.Trips[t].TUI,i.To=this.flightState.thirdPartySearchURLParams.Trips[t].To,i.ToArptName=this.flightState.thirdPartySearchURLParams.Trips[t].ToArptName,i.ToCity=this.flightState.thirdPartySearchURLParams.Trips[t].ToCity?this.flightState.thirdPartySearchURLParams.Trips[t].ToCity:this.flightState.AllAirports&&i&&i.To?this.flightState.AllAirports.find((function(t){return t.Code==i.To})).CityName:"",r.push(i)):this.flightState.thirdPartySearchURLParams.Trips.forEach((function(t){(i={}).From=t.From,i.FromArptName=t.FromArptName,i.FromCity=t.FromCity?t.FromCity:e.flightState.AllAirports&&i&&i.From?e.flightState.AllAirports.find((function(t){return t.Code==i.From})).CityName:"",i.OnwardDate=t.OnwardDate,i.OrderId=t.OrderId,i.ReturnDate=t.ReturnDate,i.TUI=t.TUI,i.To=t.To,i.ToArptName=t.ToArptName,i.ToCity=t.ToCity?t.ToCity:e.flightState.AllAirports&&i&&i.To?e.flightState.AllAirports.find((function(t){return t.Code==i.To})).CityName:"",r.push(i)})),r},t.prototype.createSmartPricerRequest=function(t,e){var r=this,i={};if(i.ClientID=this.generalState.ClientID,i.Mode="SS",i.Options="",i.Source="SF",i.TripType=this.getTripType(t),i.Trips=[],"DM"==this.flightState.thirdPartySearchURLParams.TripType){var a={};a.Amount=t[e].NetFare,a.Index=t[e].Index,a.OrderID=e+1,a.TUI=this.flightState.SearchResTUI[e],i.Trips.push(a)}else t.forEach((function(e,a){var h={};h.Amount=e.NetFare,h.Index=e.Index,h.OrderID=a+1,h.TUI=r.getTUI(t),i.Trips.push(h)}));return i},t.prototype.getTripType=function(t){var e=this.flightState.thirdPartySearchURLParams.TripType;return"RT"==this.flightState.thirdPartySearchURLParams.TripType&&t[0].isRSF&&(e="RS"),e},t.prototype.getTUI=function(t){var e=this.flightState.TUI;return"RT"==this.flightState.thirdPartySearchURLParams.TripType&&t[0].isRSF&&(e=this.flightState.TUIRSF),e},t.prototype.createSmartPricerRequestMetaSession=function(t){var e={};if(e.ClientID=this.generalState.ClientID,e.Mode="SS",e.Options="",e.Source="SF",e.TripType=this.flightState.metaSessionURLParams.TripType,e.Trips=[],"DM"==this.flightState.metaSessionURLParams.TripType){var r={};r.Amount=this.flightState.metaSessionURLParams.Trips[t].Amount,r.Index=this.flightState.metaSessionURLParams.Trips[t].Index,r.OrderID=this.flightState.metaSessionURLParams.Trips[t].OrderID,r.TUI=this.flightState.metaSessionURLParams.Trips[t].TUI,e.Trips.push(r)}else this.flightState.metaSessionURLParams.Trips.forEach((function(t,r){var i={};i.Amount=t.Amount,i.Index=t.Index,i.OrderID=t.OrderID,i.TUI=t.TUI,e.Trips.push(i)}));return e},t}()},Ze3n:function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var i=r("mrSG"),a=r("AytR"),h=r("wd/R"),s=function(){function t(t,e,r){this.flightState=t,this.generalState=e,this.route=r,this.getFromSession=function(t){try{if("undefined"!=typeof sessionStorage)return JSON.parse(sessionStorage.getItem(t||""));if("undefined"!=typeof localStorage)return JSON.parse(localStorage.getItem(t||""))}catch(e){}},this.flightSort=function(t,e,r){if(r)return r.sort((function(r,i){if(e)return r[t]i[t]?1:0})),r}}return t.prototype.createMetaSessionURLState=function(){var t=this;return new Promise((function(e,r){var i={};t.route.queryParams.subscribe((function(e){i&&(i.MetaSessionMerchantID=e.merchantID,i.ClientID="",i.Mode="SS",i.Source="SF",i.TripType=e.tripType.trim(),i.Trips=t.createTripsMetaSession(e),i.RedirectID=e.redirectID,i.UtmMedium=e.utmMedium,i.UtmSource=e.utmSource,i.UtmCampaign=e.utmCampaign)})),e(i)}))},t.prototype.createTripsMetaSession=function(t){var e=[];if("ON"==t.tripType)(a={}).Amount=Number(t.amount),a.Index=t.index.trim(),a.OrderID=Number(t.orderID.trim()),a.TUI=t.tui.trim(),e.push(a);else for(var r=t.amount.split("_").length,i=0;i-1?t.tui.split("_")[i].trim():t.tui,e.push(a)}return e},t.prototype.createSearchURLState=function(){var t=this;return new Promise((function(e,r){var i={};t.route.queryParams.subscribe((function(e){i&&(i.Adult=e.Adult,i.Cabin=t.getCabin(e.Cabin1),i.Child=e.Child,i.OnwardMAC=e.Carrier1,i.DisplayedPrice=t.getNetFare(e),i.OnwardFlightNumber=e.FlightNumber1,i.From=e.Origin1,i.Infant=e.Infant,i.OnwardDate=e.DepartureDate1,i.ReturnDate=t.getReturnDate(e),i.ReturnFlightNumber=t.getReturnFlightNumber(e),i.ReturnMAC=t.getReturnFlightMAC(e),i.TUI="",i.To=t.getToSector(e),i.TripType=t.getTripType(e),i.UserCurrency=e.DisplayedPriceCurrency,i.UserLanguage=e.UserLanguage,i.Connections=t.createConnectionsList(e),i.Trips=t.createTrips(e),i.JourneyKey=t.createJourneyKey(e),i.FareKey=t.createFareKey(e),i.ConnectionsCount=t.getConnectionsCount(e),i.AirlinesCollection=t.getAirlineCollection(e),i.FromAPI=!e.FromAPI||e.FromAPI)})),e(i)}))},t.prototype.getAirlineCollection=function(t){var e="";return Object.keys(t).filter((function(t){return t.includes("Carrier")})).forEach((function(r,i){e.split(",").includes(t[r])||(e+=t[r],e+=",")})),e.slice(0,-1)},t.prototype.createFareKey=function(t){for(var e="",r="",i=Object.keys(t).filter((function(t){return t.includes("Slice")})),a=1;a<=i.length;a++){var h=t["Slice"+a].split(",").length;e="";for(var s=1;s<=h;s++){var n;n=1==a&&1==s?t.DisplayedPrice:"0",e=s==t["Slice"+a].split(",").length?e+"INR,"+t["BookingCode"+t["Slice"+a].split(",")[s-1]]+","+n:e+"INR,"+t["BookingCode"+t["Slice"+a].split(",")[s-1]]+","+n+"~"}a==i.length?r+=e:r=r+e+"|"}return r},t.prototype.createJourneyKey=function(t){for(var e="",r="",i=Object.keys(t).filter((function(t){return t.includes("Slice")})),a=1;a<=i.length;a++){var h=t["Slice"+a].split(",").length;e="";for(var s=1;s<=h;s++)e=s==t["Slice"+a].split(",").length?e+t["Origin"+t["Slice"+a].split(",")[s-1]]+"-"+t["Destination"+t["Slice"+a].split(",")[s-1]]+","+t["FlightNumber"+t["Slice"+a].split(",")[s-1]]+","+t["Carrier"+t["Slice"+a].split(",")[s-1]]+","+t["DepartureDate"+t["Slice"+a].split(",")[s-1]]+","+this.getCabin(t["Cabin"+t["Slice"+a].split(",")[s-1]]):e+t["Origin"+t["Slice"+a].split(",")[s-1]]+"-"+t["Destination"+t["Slice"+a].split(",")[s-1]]+","+t["FlightNumber"+t["Slice"+a].split(",")[s-1]]+","+t["Carrier"+t["Slice"+a].split(",")[s-1]]+","+t["DepartureDate"+t["Slice"+a].split(",")[s-1]]+","+this.getCabin(t["Cabin"+t["Slice"+a].split(",")[s-1]])+"~";a==i.length?r+=e:r=r+e+"|"}return r},t.prototype.getNetFare=function(t){return"INR"==t.DisplayedPriceCurrency?t.DisplayedPrice:this.convertCurrency(Number(t.DisplayedPrice),t.DisplayedPriceCurrency).toString()},t.prototype.convertCurrency=function(t,e){var r=t,i=e;if(i&&i.trim()!="INR".trim()){var a=this.getFromSession("currencyexchangerates");if(a){var h=a.filter((function(t){return t.BaseCurrency=="INR".trim()&&t.ConvertedCurrency==i.trim()}));null!=h&&h.length&&(r=Math.round(1/h[0].ExchangeRate*t))}}return r},t.prototype.getCabin=function(t){var e="",r=t.replace(" ","").replace("%20","");return"Economy"===r?e="E":"PremiumEconomy"===r?e="PE":"First"===r||"FirstClass"===r?e="F":"Business"!==r&&"BusinessClass"!==r||(e="B"),e},t.prototype.getReturnDate=function(t){return"RT"==this.getTripType(t)?t["DepartureDate"+t.Slice2.split(",")[0]]:""},t.prototype.getReturnFlightNumber=function(t){return"RT"==this.getTripType(t)?t["FlightNumber"+t.Slice2.split(",")[0]]:""},t.prototype.getReturnFlightMAC=function(t){return"RT"==this.getTripType(t)?t["Carrier"+t.Slice2.split(",")[0]]:""},t.prototype.getToSector=function(t){return t["Destination"+t.Slice1.split(",")[t.Slice1.split(",").length-1]]},t.prototype.getTripType=function(t){var e=Object.keys(t).filter((function(t){return t.includes("Slice")})),r="";return e&&1==e.length?r="ON":e&&2==e.length&&"RoundTrip"==t.TripType?r="RT":e&&e.length>1&&"RoundTrip"!=t.TripType&&(r="MC"),r},t.prototype.getConnectionsCount=function(t){var e=[];return Object.keys(t).filter((function(t){return t.includes("Slice")})).forEach((function(r,i){var a={},h=t[r].split(",");a.SliceCount=i+1,a.connectionLength=h.length-1,e.push(a)})),e},t.prototype.createConnectionsList=function(t){var e=this,r=[],a=this.createSliceArray(t);return i.__spread(new Set(a.map((function(t){return t.key})))).forEach((function(i){t[i].split(",").forEach((function(i,a){if(a>0){var h={ArrivalDate:""};h.BookingCode=t["BookingCode"+i],h.Cabin=e.getCabin(t["Cabin"+i]),h.DepartureDate=t["DepartureDate"+i],h.FlightNumber=t["FlightNumber"+i],h.From=t["Origin"+i],h.MAC=t["Carrier"+i],h.To=t["Destination"+i],h.TripType=e.getSegmentTripType(t,i),r.push(h)}}))})),r},t.prototype.createTrips=function(t){var e=[];if("ON"==this.getTripType(t)||"RT"==this.getTripType(t)){var r={};r.From=t.Origin1,r.FromArptName="",r.FromCity="",r.OnwardDate=t.DepartureDate1,r.ReturnDate="RT"==this.getTripType(t)?this.getReturnDate(t):"",r.To=this.getToSector(t),r.ToArptName="",r.ToCity="",e.push(r)}else"MC"==this.getTripType(t)&&Object.keys(t).filter((function(t){return t.includes("Slice")})).forEach((function(r){var i={};i.FlightNumber=t["FlightNumber"+t[r].split(",")[0]],i.From=t["Origin"+t[r].split(",")[0]],i.FromArptName="",i.FromCity="",i.MAC=t["Carrier"+t[r].split(",")[0]],i.OnwardDate=t["DepartureDate"+t[r].split(",")[0]],i.ReturnDate="",i.To=t["Destination"+t[r].split(",")[t[r].split(",").length-1]],i.ToArptName="",i.ToCity="",e.push(i)}));return e},t.prototype.createSliceArray=function(t){var e=Object.keys(t).filter((function(t){return t.includes("Slice")})),r=[];return e.forEach((function(e){t[e].split(",").length>1&&t[e].split(",").forEach((function(t){r.push({key:e,value:Number(t)})}))})),r},t.prototype.getSegmentTripType=function(t,e){var r="";return t.Slice1.includes(e)?r="Onward":t.Slice2.includes(e)&&(r="Return"),r},t.prototype.countryCheck=function(){try{var t="";return"ON"==this.flightState.SearchType?a.a.CountrySettings.domCountrySettings.forEach((function(e){"ON"==e.searchtype&&(t=e.country)})):"RS"==this.flightState.SearchType||"RT"==this.flightState.SearchType?a.a.CountrySettings.domCountrySettings.forEach((function(e){"RT"==e.searchtype&&(t=e.country)})):"MC"!=this.flightState.SearchType&&"DM"!=this.flightState.SearchType||a.a.CountrySettings.domCountrySettings.forEach((function(e){"MC"==e.searchtype&&(t=e.country)})),t}catch(e){}},t.prototype.setSectorType=function(t){var e=this;return new Promise((function(r,i){for(var a=!1,h=0;h3&&t.match(/\[(.*?)\]/)&&(t=t.match(/\[(.*?)\]/)[1]),this.flightState&&this.flightState.AllAirports&&(e=this.flightState.AllAirports.find((function(e){return e.Code==t}))),e},t.prototype.getSelectedFlightList=function(){var t=this,e=[];if("ON"==this.flightState.thirdPartySearchURLParams.TripType){var r={};this.flightState.SearchResult&&this.isAnyTripsOfJourneyExist()&&(r=this.flightState.SearchResult.Trips[0].Journey.filter((function(e){return e.FlightNo.trim()==t.flightState.thirdPartySearchURLParams.OnwardFlightNumber&&e.NetFare==Number(t.flightState.thirdPartySearchURLParams.DisplayedPrice.toString())&&e.MAC==t.flightState.thirdPartySearchURLParams.OnwardMAC&&e.Connections.length==t.flightState.thirdPartySearchURLParams.Connections.filter((function(t){return"Onward"==t.TripType})).length}))[0]),r&&e.push(r)}else if("RT"==this.flightState.thirdPartySearchURLParams.TripType){var i=[];if("I"==this.flightState.SectorType)this.flightState.SearchResult&&this.isAnyTripsOfJourneyExist()&&this.flightState.SearchResult.Trips.forEach((function(r,a){var h={};0==a&&(h=r.Journey.filter((function(e){return e.isRSF&&e.FlightNo.trim()==t.flightState.thirdPartySearchURLParams.OnwardFlightNumber&&e.NetFare==Number(t.flightState.thirdPartySearchURLParams.DisplayedPrice.toString())&&e.MAC==t.flightState.thirdPartySearchURLParams.OnwardMAC&&e.Connections.length==t.flightState.thirdPartySearchURLParams.Connections.filter((function(t){return"Onward"==t.TripType})).length}))[0]),1==a&&(h=r.Journey.filter((function(e){return e.isRSF&&e.FlightNo.trim()==t.flightState.thirdPartySearchURLParams.ReturnFlightNumber&&e.MAC==t.flightState.thirdPartySearchURLParams.ReturnMAC&&e.Connections.length==t.flightState.thirdPartySearchURLParams.Connections.filter((function(t){return"Return"==t.TripType})).length}))[0]),h&&i.push(h),a==t.flightState.SearchResult.Trips.length-1&&i.length==t.flightState.SearchResult.Trips.length&&(e=i)}));else if("D"==this.flightState.SectorType&&this.flightState.SearchResult&&this.flightState.SearchResultRSF&&this.isAnyTripsOfJourneyExist()){var a=this.getSelectedJourneyList(this.flightState.SearchResult.Trips);if(a&&a.length==this.flightState.SearchResult.Trips.length)e=a;else{var h=this.getSelectedJourneyList(this.flightState.SearchResultRSF.Trips);h&&h.length==this.flightState.SearchResult.Trips.length&&(e=h,this.flightState.thirdPartySearchURLParams.TripType="RS")}}}else if("DM"==this.flightState.thirdPartySearchURLParams.TripType||"IM"==this.flightState.thirdPartySearchURLParams.TripType){var s=this.getSelectedJourneyList(this.flightState.SearchResult.Trips);s&&s.length==this.flightState.SearchResult.Trips.length&&(e=s)}return e},t.prototype.getSelectedFlightListFromResponse=function(){var t=this,e=[],r=[];return"ON"==this.flightState.thirdPartySearchURLParams.TripType&&this.flightState.SearchResult&&this.isAnyTripsOfJourneyExist()?this.flightState.SearchResult.Trips.forEach((function(i,a){var h;(h=i.Journey[0])&&r.push(h),a==t.flightState.SearchResult.Trips.length-1&&r.length==t.flightState.SearchResult.Trips.length&&(e=r)})):"RT"==this.flightState.thirdPartySearchURLParams.TripType&&("I"==this.flightState.SectorType&&this.flightState.SearchResult&&this.isAnyTripsOfJourneyExist()?e=this.getCheapestJourneyArray():"D"==this.flightState.SectorType&&(this.isAnyTripsOfJourneyExistRSF()&&this.flightState.SearchResultRSF.Trips.forEach((function(e,r){e.Journey.map((function(t){return t.isRSF=!0})),t.flightState.SearchResult.Trips[r].Journey=t.flightState.SearchResult.Trips[r].Journey.concat(e.Journey)})),e=this.getCheapestJourneyArray())),e},t.prototype.getCheapestJourneyArray=function(t){var e=[],r=[],i=[];return this.flightState.SearchResult.Trips.forEach((function(e,a){e&&e.Journey&&e.Journey.length>0&&(t&&"RS"==t?e.Journey.filter((function(t){return t.isRSF}))[0]&&i.push(e.Journey.filter((function(t){return t.isRSF}))[0]):t&&"RT"==t?e.Journey.filter((function(t){return!t.isRSF}))[0]&&r.push(e.Journey.filter((function(t){return!t.isRSF}))[0]):(e.Journey.filter((function(t){return!t.isRSF}))[0]&&r.push(e.Journey.filter((function(t){return!t.isRSF}))[0]),e.Journey.filter((function(t){return t.isRSF}))[0]&&i.push(e.Journey.filter((function(t){return t.isRSF}))[0])))})),r[0]&&2==r.length&&i[0]&&2==i.length?e=this.normalResAmount(i)0&&2==i.length?e=i:r&&r.length>0&&2==r.length&&(e=r),e},t.prototype.normalResAmount=function(t){var e=0;return t.forEach((function(t){t&&(e+=Number(t.NetFare))})),e},t.prototype.getSelectedJourneyList=function(t){var e=this,r=[],i=[];if(t&&t.length>0){var a={},s=[];t.forEach((function(t,n){"RT"==e.flightState.thirdPartySearchURLParams.TripType&&0==n&&(a=t.Journey.filter((function(t){return t.FlightNo.trim()==e.flightState.thirdPartySearchURLParams.OnwardFlightNumber&&t.MAC==e.flightState.thirdPartySearchURLParams.OnwardMAC&&t.Connections.length==e.flightState.thirdPartySearchURLParams.Connections.filter((function(t){return"Onward"==t.TripType})).length}))[0]),"RT"==e.flightState.thirdPartySearchURLParams.TripType&&1==n&&(a=t.Journey.filter((function(t){return t.FlightNo.trim()==e.flightState.thirdPartySearchURLParams.ReturnFlightNumber&&t.MAC==e.flightState.thirdPartySearchURLParams.ReturnMAC&&t.Connections.length==e.flightState.thirdPartySearchURLParams.Connections.filter((function(t){return"Return"==t.TripType})).length}))[0]),"DM"!=e.flightState.thirdPartySearchURLParams.TripType&&"IM"!=e.flightState.thirdPartySearchURLParams.TripType||(s=t.Journey.filter((function(t){return t.FlightNo.trim()==e.flightState.thirdPartySearchURLParams.Trips[n].FlightNumber&&t.MAC==e.flightState.thirdPartySearchURLParams.Trips[n].MAC&&h(t.DepartureTime).format("YYYY-MM-DD")==e.flightState.thirdPartySearchURLParams.Trips[n].OnwardDate&&t.Connections.length==e.flightState.thirdPartySearchURLParams.ConnectionsCount[n].connectionLength}))),("DM"==e.flightState.thirdPartySearchURLParams.TripType||"IM"==e.flightState.thirdPartySearchURLParams.TripType&&s&&s.length>0)&&i.push(s),a&&r.push(a)}))}if("DM"==this.flightState.thirdPartySearchURLParams.TripType||"IM"==this.flightState.thirdPartySearchURLParams.TripType&&i.length>0&&i.length==this.flightState.SearchResult.Trips.length){for(var n=this.cartesian(i),o=0,l=!1,S=0;S0&&e[0]&&Number(e[0].Value)&&Number(e[0].Value)>0&&(t=Number(this.flightState.thirdPartySearchURLParams.DisplayedPrice)-Number(e[0].Value))}return t},t.prototype.isAnyTripsOfJourneyExistRSF=function(){var t=!1;return this.flightState.SearchResultRSF&&this.flightState.SearchResultRSF.Trips&&this.flightState.SearchResultRSF.Trips.length>0&&this.flightState.SearchResultRSF.Trips.forEach((function(e){e&&e.Journey&&e.Journey.length>0&&(t=!0)})),t},t.prototype.isAnyTripsOfJourneyExist=function(){var t=this,e=!1;if("ON"==this.flightState.thirdPartySearchURLParams.TripType&&this.flightState.SearchResult.Trips)this.flightState.SearchResult.Trips.forEach((function(t){t&&t.Journey&&t.Journey.length>0&&(e=!0)}));else if("RT"==this.flightState.thirdPartySearchURLParams.TripType&&"I"==this.flightState.SectorType&&this.flightState.SearchResult.Trips&&this.flightState.SearchResult.Trips[0]&&this.flightState.SearchResult.Trips[1]&&this.flightState.SearchResult.Trips[0].Journey.length>0&&this.flightState.SearchResult.Trips[1].Journey.length>0)e=!0;else if("RT"==this.flightState.thirdPartySearchURLParams.TripType&&"D"==this.flightState.SectorType&&(this.flightState.SearchResult.Trips&&this.flightState.SearchResult.Trips[0]&&this.flightState.SearchResult.Trips[1]&&this.flightState.SearchResult.Trips[0].Journey.length>0&&this.flightState.SearchResult.Trips[1].Journey.length>0||this.flightState.SearchResultRSF.Trips&&this.flightState.SearchResultRSF.Trips[0]&&this.flightState.SearchResultRSF.Trips[1]&&this.flightState.SearchResultRSF.Trips[0].Journey.length>0&&this.flightState.SearchResultRSF.Trips[1].Journey.length>0))e=!0;else if("DM"==this.flightState.thirdPartySearchURLParams.TripType||"IM"==this.flightState.thirdPartySearchURLParams.TripType&&this.flightState.SearchResult.Trips){var r=0;this.flightState.SearchResult.Trips.forEach((function(i,a){i&&i.Journey&&i.Journey.length>0&&r++,a==t.flightState.SearchResult.Trips.length-1&&r==t.flightState.SearchResult.Trips.length&&(e=!0)}))}return e},t.prototype.isAnyTripsExistInDomAndIntRTNormal=function(t){var e=!1;return"RT"==t?"D"==this.flightState.SectorType?(this.flightState&&this.flightState.SearchResult&&this.flightState.SearchResult.Trips&&this.flightState.SearchResult.Trips[0]&&this.flightState.SearchResult.Trips[0].Journey.length>0&&this.flightState.SearchResult.Trips[1]&&this.flightState.SearchResult.Trips[1].Journey.length>0||this.flightState&&this.flightState.SearchResultRSF&&this.flightState.SearchResultRSF.Trips&&this.flightState.SearchResultRSF.Trips[0]&&this.flightState.SearchResultRSF.Trips[0].Journey.length>0&&this.flightState.SearchResultRSF.Trips[1]&&this.flightState.SearchResultRSF.Trips[1].Journey.length>0)&&(e=!0):"I"==this.flightState.SectorType&&this.flightState&&this.flightState.SearchResult&&this.flightState.SearchResult.Trips&&this.flightState.SearchResult.Trips[0]&&this.flightState.SearchResult.Trips[0].Journey.length>0&&this.flightState.SearchResult.Trips[1]&&this.flightState.SearchResult.Trips[1].Journey.length>0&&(e=!0):"ON"==t&&this.flightState&&this.flightState.SearchResult&&this.flightState.SearchResult.Trips&&this.flightState.SearchResult.Trips[0]&&this.flightState.SearchResult.Trips[0].Journey.length>0&&(e=!0),e},t.prototype.getDisplayURL=function(t,e){return"/flight/display/"+this.getSectors()+"/"+this.getDate()+"/"+this.flightState.thirdPartySearchURLParams.Adult+"_"+this.flightState.thirdPartySearchURLParams.Child+"_"+this.flightState.thirdPartySearchURLParams.Infant+"/"+this.flightState.SectorType+"/"+this.getTripTypeInURL()+"/"+this.flightState.thirdPartySearchURLParams.Cabin+"/false/false/"+this.getTUI(t,e)},t.prototype.getTripTypeInURL=function(){return"DM"==this.flightState.thirdPartySearchURLParams.TripType||"IM"==this.flightState.thirdPartySearchURLParams.TripType?"MC":this.flightState.thirdPartySearchURLParams.TripType},t.prototype.getSectors=function(){var t=this,e="";return"ON"==this.flightState.thirdPartySearchURLParams.TripType||"RT"==this.flightState.thirdPartySearchURLParams.TripType?e=this.flightState.thirdPartySearchURLParams.From+"-"+this.flightState.thirdPartySearchURLParams.To:"DM"!=this.flightState.thirdPartySearchURLParams.TripType&&"IM"!=this.flightState.thirdPartySearchURLParams.TripType||this.flightState.thirdPartySearchURLParams.Trips.forEach((function(r,i){e+=r.From+"-"+r.To,i