PageSourceSearch

https://hyperdart.com/hd/_next/static/chunks/39910258.70b382ec5cb63901.js

js hyperdart.com collected 2026-09-24 14:45:50 UTC 168,068 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9036],{9774:(e,t,r)=>{r.r(t),r.d(t,{default:()=>rY,makeTheme:()=>rq});var n,a,i,o,l,s=r(14232),c=r(92181),u=r(49106),p=r(17023),d=r(82230),m=r(48676),g=r(32238),h=r(75731),f=r(44957),y=r(18310),x=r(49524),v=r(36610),b=r(55858),C=r(58347),S=r(4622),E=r(91136),w=r(45342),A=r(41452),k=r(82702),D=r(31303),T=r(33578),N=r(83808),R=r(62112),P=r(69750),O=r(7703),F=r(44308),M=r(61827),I=r(50886),W=r(49796),L=r(66134),z=r(99358),j=r(54524),B=r(32025),H=r(6520),_=r(79585),X=r(11072),U=r(76078),q=r(93582),Y=r(585),G=r(83766),J=r(64420),$=r(14734),Q=r(38129),V=r(26455),K=r(22950),Z=r(2712),ee=r(94592),et=r(94085),er=r(4468),en=r(85644),ea=r(94094),ei=r(95313),eo=r(81578),el=r(46618),es=r(38719),ec=r(64716),eu=r(79718),ep=r(55877),ed=r(96053),em=r(84254);let eg=e=>{let t,r=new Set,n=(e,n)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=n?n:"object"!=typeof a||null===a)?a:Object.assign({},t,a),r.forEach(r=>r(t,e))}},a=()=>t,i={setState:n,getState:a,getInitialState:()=>o,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},o=t=e(n,a,i);return i};var eh={exports:{}},ef={},ey={exports:{}},ex={};eh.exports=function(){if(l)return ef;l=1;var e=(o||(o=1,ey.exports=function(){if(i)return ex;i=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=s.useState,r=s.useEffect,n=s.useLayoutEffect,a=s.useDebugValue;function o(t){var r=t.getSnapshot;t=t.value;try{var n=r();return!e(t,n)}catch(e){return!0}}var l="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,i){var l=i(),s=t({inst:{value:l,getSnapshot:i}}),c=s[0].inst,u=s[1];return n(function(){c.value=l,c.getSnapshot=i,o(c)&&u({inst:c})},[e,l,i]),r(function(){return o(c)&&u({inst:c}),e(function(){o(c)&&u({inst:c})})},[e]),a(l),l};return ex.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:l,ex}()),ey.exports),t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,n=s.useRef,a=s.useEffect,c=s.useMemo,u=s.useDebugValue;return ef.useSyncExternalStoreWithSelector=function(e,i,o,l,s){var p=n(null);if(null===p.current){var d={hasValue:!1,value:null};p.current=d}else d=p.current;var m=r(e,(p=c(function(){function e(e){if(!a){if(a=!0,r=e,e=l(e),void 0!==s&&d.hasValue){var i=d.value;if(s(i,e))return n=i}return n=e}if(i=n,t(r,e))return i;var o=l(e);return void 0!==s&&s(i,o)?(r=e,i):(r=e,n=o)}var r,n,a=!1,c=void 0===o?null:o;return[function(){return e(i())},null===c?void 0:function(){return e(c())}]},[i,o,l,s]))[0],p[1]);return a(function(){d.hasValue=!0,d.value=m},[m]),u(m),m},ef}();var ev=(n=eh.exports)&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;let{useDebugValue:eb}=s,{useSyncExternalStoreWithSelector:eC}=ev,eS=!1;function eE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ew(e,t,r,n,a,i,o){try{var l=e[i](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,a)}function eA(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){ew(i,n,a,o,l,"next",e)}function l(e){ew(i,n,a,o,l,"throw",e)}o(void 0)})}}function ek(e,t,r){return t=eP(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,eF()?Reflect.construct(t,r||[],eP(e).constructor):t.apply(e,r))}function eD(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eT(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eB(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eN(e,t,r){return(t=eB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eR(){return(eR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
1).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function eP(e){return(eP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eO(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ez(e,t)}function eF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eF=function(){return!!e})()}function eM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eM(Object(r),!0).forEach(function(t){eN(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eM(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eW(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function i(r,n,a,i){var s=Object.create((n&&n.prototype instanceof l?n:l).prototype);return eL(s,"_invoke",function(r,n,a){var i,l,s,c=0,u=a||[],p=!1,d={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,o}};function m(r,n){for(l=r,s=n,t=0;!p&&c&&!a&&t<u.length;t++){var a,i=u[t],m=d.p,g=i[2];r>3?(a=g===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=m&&((a=r<2&&m<i[1])?(l=0,d.v=n,d.n=i[1]):m<g&&(a=r<3||i[0]>n||n>g)&&(i[4]=r,i[5]=n,d.n=g,l=0))}if(a||r>1)return o;throw p=!0,n}return function(a,u,g){if(c>1)throw TypeError("Generator is already running");for(p&&1===u&&m(u,g),l=u,s=g;(t=l<2?e:s)||!p;){i||(l?l<3?(l>1&&(d.n=-1),m(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(a="next"),t=i[a]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+a+"' method"),l=1);i=e}else if((t=(p=d.n<0)?s:r.call(n,d))!==o)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:p}}}(r,a,i),!0),s}var o={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=c.prototype=l.prototype=Object.create([][n]?t(t([][n]())):(eL(t={},n,function(){return this}),t));function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,eL(e,a,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,eL(u,"constructor",c),eL(c,"constructor",s),s.displayName="GeneratorFunction",eL(c,a,"GeneratorFunction"),eL(u),eL(u,a,"Generator"),eL(u,n,function(){return this}),eL(u,"toString",function(){return"[object Generator]"}),(eW=function(){return{w:i,m:p}})()}function eL(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}(eL=function(e,t,r,n){function i(t,r){eL(e,t,function(e){return this._invoke(t,r,e)})}t?a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function ez(e,t){return(ez=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ej(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eE(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eE(e,t):void 0}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eB(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function eH(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function e_(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}let eX={};function eU(e,t){let r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??eX.weekStartsOn??eX.locale?.options?.weekStartsOn??0,n=eH(e),a=n.getDay();return n.setDate(n.getDate()-(7*(a<r)+a-r)),n.setHours(0,0,0,0),n}function eq(e){return eU(e,{weekStartsOn:1})}function eY(e){let t=eH(e),r=t.getFullYear(),n=e_(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let a=eq(n),i=e_(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);let o=eq(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function eG(e){let t=eH(e);return t.setHours(0,0,0,0),t}function eJ(e){let t=eH(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),e-r}let e$={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eQ(e){return (t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}let eV={date:eQ({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eQ({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eQ({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eK={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eZ(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{let t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function e0(e){return(t,r={})=>{let n,a=r.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;let l=o[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(s,e=>e.test(l)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(s,e=>e.test(l));return n=e.valueCallback?e.valueCallback(c):c,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(l.length)}}}let e1={code:"en-US",formatDistance:(e,t,r)=>{let n,a=e$[e];
1if(n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix)if(r.comparison&&r.comparison>0)return"in "+n;else return n+" ago";return n},formatLong:eV,formatRelative:(e,t,r,n)=>eK[e],localize:{ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:eZ({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eZ({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:eZ({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eZ({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eZ({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{let r=e.match(a.matchPattern);if(!r)return null;let n=r[0],i=e.match(a.parsePattern);if(!i)return null;let o=a.valueCallback?a.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(n.length)}}),era:e0({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:e0({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:e0({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:e0({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:e0({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function e2(e,t){let r=eH(e),n=r.getFullYear(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??eX.firstWeekContainsDate??eX.locale?.options?.firstWeekContainsDate??1,i=e_(e,0);i.setFullYear(n+1,0,a),i.setHours(0,0,0,0);let o=eU(i,t),l=e_(e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);let s=eU(l,t);return r.getTime()>=o.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function e4(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}
1let e5={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return e4("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):e4(r+1,2)},d:(e,t)=>e4(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>e4(e.getHours()%12||12,t.length),H:(e,t)=>e4(e.getHours(),t.length),m:(e,t)=>e4(e.getMinutes(),t.length),s:(e,t)=>e4(e.getSeconds(),t.length),S(e,t){let r=t.length;return e4(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},e6={G:function(e,t,r){let n=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return e5.y(e,t)},Y:function(e,t,r,n){let a=e2(e,n),i=a>0?a:1-a;return"YY"===t?e4(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):e4(i,t.length)},R:function(e,t){return e4(eY(e),t.length)},u:function(e,t){return e4(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return e4(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return e4(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return e5.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return e4(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let a,i,o,l,s=Math.round((eU(a=eH(e),n)-(i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??eX.firstWeekContainsDate??eX.locale?.options?.firstWeekContainsDate??1,o=e2(a,n),(l=e_(a,0)).setFullYear(o,0,i),l.setHours(0,0,0,0),eU(l,n)))/6048e5)+1;return"wo"===t?r.ordinalNumber(s,{unit:"week"}):e4(s,t.length)},I:function(e,t,r){let n,a,i,o=Math.round((eq(n=eH(e))-(a=eY(n),(i=e_(n,0)).setFullYear(a,0,4),i.setHours(0,0,0,0),eq(i)))/6048e5)+1;return"Io"===t?r.ordinalNumber(o,{unit:"week"}):e4(o,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):e5.d(e,t)},D:function(e,t,r){var n;let a,i,o,l,s,c=(a=eH(e),i=eH(a),(o=e_(a,0)).setFullYear(i.getFullYear(),0,1),o.setHours(0,0,0,0),n=o,l=eG(a),s=eG(n),Math.round((l-eJ(l)-(s-eJ(s)))/864e5)+1);return"Do"===t?r.ordinalNumber(c,{unit:"dayOfYear"}):e4(c,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return e4(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return e4(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return e4(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n,a=e.getHours();switch(n=12===a?"noon":0===a?"midnight":a/12>
1=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n,a=e.getHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return e5.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):e5.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):e4(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):e4(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):e5.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):e5.s(e,t)},S:function(e,t){return e5.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return e8(n);case"XXXX":case"XX":return e9(n);default:return e9(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return e8(n);case"xxxx":case"xx":return e9(n);default:return e9(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+e3(n,":");default:return"GMT"+e9(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+e3(n,":");default:return"GMT"+e9(n,":")}},t:function(e,t,r){return e4(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,r){return e4(e.getTime(),t.length)}};function e3(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return 0===i?r+String(a):r+String(a)+t+e4(i,2)}function e8(e,t){return e%60==0?(e>0?"-":"+")+e4(Math.abs(e)/60,2):e9(e,t)}function e9(e,t=""){let r=Math.abs(e);return(e>0?"-":"+")+e4(Math.trunc(r/60),2)+t+e4(r%60,2)}let e7=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},te=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},tt={p:te,P:(e,t)=>{let r,n=e.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return e7(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",e7(a,t)).replace("{{time}}",te(i,t))}},tr=/^D+$/,tn=/^Y+$/,ta=["D","DD","YY","YYYY"],ti=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,to=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tl=/^'([^]*?)'?$/,ts=/''/g,tc=/[a-zA-Z]/;function tu(e,t,r){let n=eX.locale??e1,a=eX.firstWeekContainsDate??eX.locale?.options?.firstWeekContainsDate??1,i=eX.weekStartsOn??eX.locale?.options?.weekStartsOn??0,o=eH(e);if(!((o instanceof Date||"object"==typeof o&&"[object Date]"===Object.prototype.toString.call(o)||"number"==typeof o)&&!isNaN(Number(eH(o)))))throw RangeError("Invalid time value");let l=t.match(to).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,tt[t])(e,n.formatLong):e}).join("").match(ti).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var r;let t;return{isToken:!1,value:(t=(r=e).match(tl))?t[1].replace(ts,"'"):r}}if(e6[t])return{isToken:!0,value:e};if(t.match(tc))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});n.localize.preprocessor&&(l=n.localize.preprocessor(o,l));let s={firstWeekContainsDate:a,weekStartsOn:i,locale:n};return l.map(r=>{if(!r.isToken)return r.value;let a=r.value;return(tn.test(a)||tr.test(a))&&function(e,t,r){var n,a,i;let o,l=(n=e,a=t,i=r,o="Y"===n[0]?"years":"days of the month",`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${a}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(l),ta.includes(e))throw RangeError(l)}(a,t,String(e)),(0,e6[a[0]])(o,a,n.localize,s)}).join("")}var tp="/flightBooking",td={FLIGHT_SEARCH:tp+"/searchId",FLIGHT_SEARCH_RESULTS:tp+"/flights",FLIGHT_BOOK:tp+"/book",AUTOCOMPLETE_NEARBY_AIRPORT:tp+"/getcityinfo",AUTOCOMPLETE_NEARBY_AIRPORT_LAT_LONG:tp+"/getNearbyAirports",AUTOCOMPLETE_CITY:tp+"/autocomplete"},tm=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1",r=t.includes("."),n=ej(t.split("."),2),a=n[0],i=n[1];return(e=a.replace(/\B(?=(\d{3})+(?!\d))/g,","),r)?e+"."+i:e},tg=function(e){var t=[];if(e.outboundinfo.route.length>1){var r=e.outboundinfo.route.length-1;e.outboundinfo.route.forEach(function(e,n){0===n?t.push(e.destinationcode):n!==r&&t.push(e.destinationcode)})}var n=[];if(e.returninfo.route.length>1){var a=e.returninfo.route.length-1;e.returninfo.route.forEach(function(e,t){0===t?n.push(e.destinationcode):t!==a&&n.push(e.destinationcode)})}return{outboundLayovers:t,returnFlightLayovers:n}},th=function(e){var t=e.route[0].arrivaltime,r=e.route[1].departuretime-t,n=Math.floor(r/36e5),a=Math.floor(r%36e5/6e4),i="".concat(n.toString().padStart(2,"0"),"h ").concat(a.toString().padStart(2,"0"),"m");return" ".concat(i)},tf=(e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { use
1Store } from 'zustand'`.");let t="function"==typeof e?e?eg(e):eg:e,r=(e,r)=>(function(e,t=e=>e,r){r&&!eS&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),eS=!0);let n=eC(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return eb(n),n})(t,e,r);return Object.assign(r,t),r})(function(e){return{currencyRates:{},setCurrencyRates:function(t){return e({currencyRates:t})},userCurrency:{currencyName:"usd",currencySymbol:"$"},setUserCurrency:function(t){return e({userCurrency:t})}}}),ty="__APP_SERVER",tx=function(e,t,r,n,a,i,o,l,s,c,u){var p={adults:l,children:s,infants:c,currency:"usd",trip_class:u,outBoundDate:null,outBoundDestination:n,outBoundOrigin:t},d="string"==typeof a?new Date(a):a;if(p.outBoundDate=d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2),"roundtrip"==o){p.returnDestination=t,p.returnOrigin=n;var m="string"==typeof i?new Date(i):i;p.returnDate=m.getFullYear()+"-"+("0"+(m.getMonth()+1)).slice(-2)+"-"+("0"+m.getDate()).slice(-2)}return p},tv=function(e,t,r,n,a,i,o,l,s,c,u,p,d,m,g){var h={oldtickets:null,oldorigindestiairports:{outboundOrigin:{},outboundDestination:{},returnOrigin:{},returnDestination:{},applyToReturn:!0},oldairlines:{},oldarrivaltimeminmax:{outboundArrivalMin:Number.MAX_SAFE_INTEGER,outboundArrivalMax:0,returnArrivalMin:Number.MAX_SAFE_INTEGER,returnArrivalMax:0},oldairlinesInfo:{},oldairportsInfo:{},isLastResArrived:!1},f={duration:null,origincode:null,departuretime:null,convertedDeptTime:null,destinationcode:null,arrivaltime:null,convertedArrTime:null,carriers:[],route:[],daysdifference:null,departureminuteofday:null,arrivalminuteofday:null},y=["oneway","roundtrip"];return(h=eI(eI({},h),{},{isLastResArrived:e.some(function(e){return 1===Object.keys(e).length&&e.hasOwnProperty("search_id")})}),r===m&&void 0!==e&&0!==e.length&&e[0].proposals&&!0===d)?(e.map(function(e,r){if(void 0!==e.proposals&&0!==e.proposals.length){for(var l in e.airports)if(l in p==!1){var s={name:e.airports[l].name,city:e.airports[l].city,country:e.airports[l].country};p[l]=s}for(var d in e.airlines)d in u==!1&&(u[d]=e.airlines[d].name),d in i==!1&&(i[d]=!0);var m=c,x=a;e.proposals.map(function(t,r){var a,i=t.sign,l=t.terms&&Object.keys(t.terms)[0]?Object.keys(t.terms)[0]:[],s=null;if(i in o==!1){var c={sign:"",minprice:Number.MAX_SAFE_INTEGER,totalduration:0,outboundinfo:f,returninfo:f,providers:[]};if(c.sign=t.sign,c.outboundinfo=tE(t,0),c.totalduration+=c.outboundinfo.duration,g===y[1]&&(c.returninfo=tE(t,1),c.totalduration+=c.returninfo.duration),m=tw(m,c.outboundinfo,c.returninfo,g,y),x=tA(x,c.outboundinfo,c.returninfo,g,y),t.terms[l]){a=e.gates_info[l].label;var u=(t.terms[l].currency||"usd").toLowerCase(),p=t.terms[l].price,d=tf.getState().currencyRates,h=p;"usd"===u?h=p:d&&d[u]&&d.usd?h=p*d[u]/d.usd:"rub"===u&&n&&(h=p/n);var v={name:a,price:s=h,originalPrice:p,originalCurrency:u,deeplinkurl:t.terms[l].url};s<c.minprice&&(c.minprice=Math.round(s),c.bestPriceOriginal={amount:p,currency:u}),c.providers.push(v),o[i]=c}}else if(t.terms[l]){a=e.gates_info[l].label;var b=(t.terms[l].currency||"usd").toLowerCase(),C=t.terms[l].price,S=tf.getState().currencyRates,E=C;"usd"===b?E=C:S&&S[b]&&S.usd?E=C*S[b]/S.usd:"rub"===b&&n&&(E=C/n);var w={name:a,price:s=E,originalPrice:C,originalCurrency:b,deeplinkurl:t.terms[l].url},A=o[i];s<A.minprice&&(A.minprice=Math.round(s),A.bestPriceOriginal={amount:C,currency:b}),A.providers.push(w)}});var v=new Set,b=function(e){e&&!p[e]&&(v.add(e),p[e]={city:e,name:e,country:""})};Object.keys(x.outboundOrigin).forEach(b),Object.keys(x.outboundDestination).forEach(b),Object.keys(x.returnOrigin).forEach(b),Object.keys(x.returnDestination).forEach(b),Object.values(o).forEach(function(e){e.outboundinfo.route.forEach(function(e){b(e.origincode),b(e.destinationcode)}),e.returninfo.route&&e.returninfo.route.forEach(function(e){b(e.origincode),b(e.destinationcode)})}),v.size>0&&(console.error("UUID: ".concat(t)),console.error("Missing Airport",Array.from(v))),h.oldtickets=o,h.oldorigindestiairports=x,h.oldairlines=i,h.oldarrivaltimeminmax=m,h.oldairlinesInfo=u,h.oldairportsInfo=p}}),h):null},tb=function(e){for(var t=0;t<e.length;++t){var r,n=e[t];t<e.length-1&&(n.layoverafterthis=Math.floor((r=e[t+1].departuretime/1e3-e[t].arrivaltime/1e3)/3600)+"h "+r%3600/60+"m layover in ")}return e},tC=function(e,t){var r=t%864e5,n=e-t,a=0,i=0;return n<0?Math.abs(n)>
1=r&&(a=a-1-parseInt((Math.abs(n)-r)/864e5)):n>=(i=864e5-r)&&(a=a+1+parseInt((n-i)/864e5)),0!==a?a>0?"+".concat(a):"-".concat(a):0},tS=function(e){var t=new Date(e).getUTCHours(),r=new Date(e).getUTCMinutes();return r<10&&(r="0"+r),t>12?((t-=12)<10&&(t="0"+t),t=t+":"+r+"p"):t<12?(t<10&&(t="0"+t),t=t+":"+r+"a"):12===t&&(t=t+":"+r+"p"),t},tE=function(e,t){var r={duration:null,origincode:null,departuretime:null,convertedDeptTime:null,destinationcode:null,arrivaltime:null,convertedArrTime:null,carriers:[],route:[],daysdifference:null,departureminuteofday:null,arrivalminuteofday:null};r.origincode=e.segments_airports[t][0],r.destinationcode=e.segments_airports[t][1],r.departuretime=1e3*e.segments_time[t][0],r.arrivaltime=1e3*e.segments_time[t][1],r.duration=e.segment_durations[t],e.segment[t].flight.map(function(e,t){var n={airlinecode:"",flightno:"",origincode:"",departuretime:"",convertedDeptTime:null,duration:"",destinationcode:"",arrivaltime:"",convertedArrTime:null,layoverafterthis:null,daysdifferenceArrival:null,daysdifferenceDeparture:null};n.airlinecode=e.operating_carrier,n.flightno=e.number,n.origincode=e.departure,n.destinationcode=e.arrival,n.departuretime=1e3*e.local_departure_timestamp,n.arrivaltime=1e3*e.local_arrival_timestamp,n.duration=Math.floor(e.duration/60)+"h "+e.duration%60+"m",n.daysdifferenceArrival=tC(n.arrivaltime,r.departuretime),n.daysdifferenceDeparture=tC(n.departuretime,r.departuretime),n.convertedDeptTime=tS(n.departuretime),n.convertedArrTime=tS(n.arrivaltime),r.route.push(n),r.carriers.includes(n.airlinecode)||r.carriers.push(n.airlinecode)}),r.route=tb(r.route),r.daysdifference=tC(r.arrivaltime,r.departuretime),r.convertedDeptTime=tS(r.departuretime),r.convertedArrTime=tS(r.arrivaltime);var n=new Date(r.departuretime);return r.departureminuteofday=60*n.getUTCHours()+n.getUTCMinutes(),n=new Date(r.arrivaltime),r.arrivalminuteofday=60*n.getUTCHours()+n.getUTCMinutes(),r},tw=function(e,t,r,n,a){var i={outboundArrivalMax:e.outboundArrivalMax,outboundArrivalMin:e.outboundArrivalMin,returnArrivalMax:e.returnArrivalMax,returnArrivalMin:e.returnArrivalMin};return t.arrivaltime>e.outboundArrivalMax&&(i.outboundArrivalMax=t.arrivaltime),t.arrivaltime<e.outboundArrivalMin&&(i.outboundArrivalMin=t.arrivaltime),n===a[1]&&(r.arrivaltime>e.returnArrivalMax&&(i.returnArrivalMax=r.arrivaltime),r.arrivaltime<e.returnArrivalMin&&(i.returnArrivalMin=r.arrivaltime)),i},tA=function(e,t,r,n,a){var i={outboundOrigin:e.outboundOrigin,outboundDestination:e.outboundDestination,returnOrigin:e.returnOrigin,returnDestination:e.returnDestination};return t.origincode in e.outboundOrigin==!1&&(i.outboundOrigin[t.origincode]=!0),t.destinationcode in e.outboundDestination==!1&&(i.outboundDestination[t.destinationcode]=!0),n===a[1]&&(r.origincode in e.returnOrigin==!1&&(i.returnOrigin[r.origincode]=!0),r.destinationcode in e.returnDestination==!1&&(i.returnDestination[r.destinationcode]=!0)),i},tk=function(e,t){var r;return new Date(r=(r=null!=t&&""!==t?new Date(t):new Date).setDate(r.getDate()+e))},tD=function(e,t){"Price"===t?e.sort(function(e,t){return e.minprice<t.minprice?-1:e.minprice>t.minprice?1:e.totalduration<t.totalduration?-1:e.totalduration>t.totalduration?1:e.outboundinfo.departuretime<t.outboundinfo.departuretime?-1:+(e.outboundinfo.departuretime>t.outboundinfo.departuretime)}):"Fastest"===t&&e.sort(function(e,t){return e.totalduration<t.totalduration?-1:+(e.totalduration>t.totalduration)})},tT=function(e,t){var r=t.direct,n=t.oneStop,a=t.twoPlus;if(!r&&!n&&!a)return 1;var i=e.outboundinfo.route.length,o=e.returninfo.route.length,l=Math.max(i-1,o>0?o-1:0);return r&&0===l||n&&1===l||a&&l>=2?1:0},tN=function(e,t,r,n,a,i){if(e.outboundinfo.origincode in t||e.outboundinfo.destinationcode in r)return 0;if("roundtrip"===i){if(e.returninfo.origincode in n)return 0;else if(e.returninfo.destinationcode in a)return 0}return 1},tR=function(e,t,r){for(var n=0;n<e.outboundinfo.carriers.length;++n)if(e.outboundinfo.carriers[n]in t)return 0;if("roundtrip"===r){for(var a=0;a<e.returninfo.carriers.length;++a)if(e.returninfo.carriers[a]in t)return 0}return 1},tP=function(e){return"https://images.kiwi.com/airlines/64x64/".concat(e,".png")},tO=function(e){function t(e){var r;return eD(this,t),eN(r=ek(this,t,[e]),"changetravellers",function(e,t){var n=r.state.adultsCount,a=r.
1state.childrenCount,i=r.state.infantsCount,o=n+a+i;"Adults"===e?"increase"===t?9===o?r.setState({error:"Up to 9 travellers allowed"}):r.setState({adultsCount:n+1,error:null}):"decrease"===t&&(1===n?r.setState({error:"At least 1 adult required"}):(r.setState({adultsCount:n-1,error:null}),i===n&&r.setState({infantsCount:i-1,error:null}))):"Children"===e?"increase"===t?9===o?r.setState({error:"Up to 9 travellers allowed"}):r.setState({childrenCount:a+1,error:null}):"decrease"===t&&a>0&&r.setState({childrenCount:a-1,error:null}):"Infants"===e&&("increase"===t?9===o?r.setState({error:"Up to 9 travellers allowed"}):n<=i?r.setState({error:"Number of infants cannot be more than adults"}):r.setState({infantsCount:i+1,error:null}):"decrease"===t&&i>0&&r.setState({infantsCount:i-1,error:null}))}),r.state={anchorEl:null,adultsCount:Number(r.props.adultsCount),childrenCount:Number(r.props.childrenCount),infantsCount:Number(r.props.infantsCount),error:null},r}return eO(t,e),eT(t,[{key:"componentDidUpdate",value:function(e){(Number(e.adultsCount)!==Number(this.props.adultsCount)||Number(e.childrenCount)!==Number(this.props.childrenCount)||Number(e.infantsCount)!==Number(this.props.infantsCount))&&this.setState({adultsCount:Number(this.props.adultsCount),childrenCount:Number(this.props.childrenCount),infantsCount:Number(this.props.infantsCount)})}},{key:"handleClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleClose",value:function(){this.setState({anchorEl:null,error:null}),this.props.handler(this.state.adultsCount,this.state.infantsCount,this.state.childrenCount)}},{key:"renderTravellerRow",value:function(e,t,r,n){var a=this.props.classes;return s.createElement(j.A,{disableRipple:!0,style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:24,minWidth:320}},s.createElement("div",{style:{display:"flex",alignItems:"center"}},s.createElement(t,{className:a.iconColor}),s.createElement("span",{className:a.travellersoption},e)),s.createElement("div",{style:{display:"flex",alignItems:"center",gap:14}},s.createElement(_.A,{className:a.plusminus,onClick:this.changetravellers.bind(this,n,"decrease")}),s.createElement("span",{className:a.textColor,style:{minWidth:18,textAlign:"center",fontWeight:600}},r),s.createElement(H.A,{className:a.plusminus,onClick:this.changetravellers.bind(this,n,"increase")})))}},{key:"render",value:function(){var e=this.props.classes;return s.createElement("div",{className:e.triggerContainer,style:{width:this.props.isHomepage?"100%":"fit-content"}},s.createElement(C.A,{container:!0,onClick:this.handleClick.bind(this),style:{display:"flex",alignItems:"center",width:this.props.isHomepage?"100%":"fit-content",minWidth:130,justifyContent:"space-between"}},s.createElement("div",{style:{paddingLeft:10},className:e.textColor},"Travellers"),s.createElement("div",{style:{display:"flex",flexDirection:"row"}},s.createElement("div",{style:{display:"flex",alignItems:"center"},className:e.textColor},Number(this.state.adultsCount)+Number(this.state.infantsCount)+Number(this.state.childrenCount)),s.createElement(z.A,{style:{padding:2},className:e.textColor},s.createElement(B.A,null)))),s.createElement(L.A,{anchorEl:this.state.anchorEl,keepMounted:!0,open:!!this.state.anchorEl,onClose:this.handleClose.bind(this)},this.renderTravellerRow("Adults (above 12y)",q.A,this.state.adultsCount,"Adults"),this.renderTravellerRow("Children (2y-12y)",X.A,this.state.childrenCount,"Children"),this.renderTravellerRow("Infants (below 2y)",U.A,this.state.infantsCount,"Infants"),s.createElement(C.A,{className:e.errorText},this.state.error)))}}])}(s.Component),tF=(0,d.A)(function(e){return{travellersoption:{fontSize:"15px",fontWeight:"500",minWidth:"150px",paddingLeft:"10px"},travellersgridpadding:{padding:"10px"},plusminus:{border:"1px solid ".concat((0,c.X4)(e.palette.primary.main,.25)),background:(0,c.X4)(e.palette.primary.main,.12),borderRadius:"50%",padding:3,boxSizing:"content-box",cursor:"pointer",textAlign:"center",color:e.palette.primary.main},selectedoption:{fontSize:"14px",fontWeight:"600",paddingLeft:"5px",display:"flex",alignItems:"center",textAlign:"center",color:e.palette.text.secondary},secondaryText:{fontSize:"14px",fontWeight:"600",paddingLeft:"15px",textAlign:"start",color:e.palette.text.secondary},iconColor:{color:e.palette.text.secondary},centeredText:{display:"flex",alignItems:"center"},textColor:{color:e.palette.text.primary},triggerContainer:{border:"1px solid lightgray",borderRadius:e.shape.borderRadius,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:40},errorText:{fontSize:13,color:e.palette.error.main,textAlign:"center",marginBottom:10}}})(tO),tM=function(e){function t(e){var r;return eD(this,t),(r=ek(this,t,[e])).state={anchorEl:null},r}return eO(t,e),eT(t,[{key:"handleClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleCloseAndUpdate",value:function(e){this.setState({anchorEl:null}),this.props.handler(e)}},{key:"handleClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this,t=this.props.classes;return s.createElement(C.A,{className:t.triggerContainer},s.createElement(C.A,{container:!0,onClick:this.handleClick.bind(this),alignItems:"center",style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",paddingLeft:10}},s.createElement("div",{className:t.textColor},this.props.selected),s.createElement(z.A,{style:{padding:2},className:t.textColor},s.createElement(B.A,null))),s.createElement(L.A,{anchorEl:this.state.anchorEl,keepMounted:!0,open:!!this.state.anchorEl,onClose:this.handleClose.bind(this)},s.createElement(j.A,{onClick:function(){e.handleCloseAndUpdate("Economy")},key:"1"},"Economy"),s.createElement(j.A,{onClick:function(){e.handleCloseAndUpdate("Business")},key:"2"},"Business")))}}])}(s.Component),tI=(0,d.A)(function(e){return{selectedoption:{fontSize:"14px",fontWeight:"600",paddingLeft:"5px",textAlign:"start",color:e.palette.text.secondary},secondaryText:{fontSize:"14px",fontWeight:"600",paddingLeft:"5px",textAlign:"start",color:e.palette.text.secondary},iconColor:{color:e.palette.text.secondary},textColor:{color:e.palette.text.primary},triggerContainer:{border:"1px solid lightgray",borderRadius:e.shape.borderRadius,width:"100%",height:40,display:"flex",alignItems:"center"}}})(tM),tW=(0,d.A)(function(e){return{rootPaperQuickPanel:{width:"auto",maxHeight:"500px",marginBottom:"25px",position:"relative",top:0,left:0,isolation:"isolate"},coverhead:{width:"100%",backgroundColor:"rgba(240, 95, 64, 0.15)",borderRadius:"10px",overflow:"hidden"},coverbody:{width:"100%",height:"25%",position:"absolute",background:"linear-gradient(#F05F40, #F05F40)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px",borderBottomLeftRadius:"50% 40%",borderBottomRightRadius:"50% 40%",transform:"translate(0%, -0%)"},mainContent:{height:"80%",borderRadius:"10px",margin:"20px auto",display:"flex",flexDirection:"column",top:"8%",position:"relative",zIndex:1,backgroundColor:e.palette.background.paper,padding:20,"@media (max-width: 700px)":{margin:"16px auto",padding:"16px 12px"}},fromTo:{color:"#989898",fontWeight:600,marginBottom:4},toFromDesk:{display:"flex",flexDirection:"row"},inputWrapperMobile:{display:"flex",flexDirection:"column",position:"relative"}
1,inputWrapperDesk:{display:"flex",flexDirection:"row",gap:"15px",justifyContent:"center",position:"relative"},inputDivMobile:{},inputDiv:{border:"1px solid lightgray",height:40,borderRadius:12,width:"100%",display:"flex",alignItems:"center"},toogleIconMobile:{textAlign:"center",borderRadius:"7px",boxShadow:"0px 0px 5px lightgray",position:"absolute",top:"38px",right:"20px",padding:2,backgroundColor:e.palette.background.paper},toogleIconDesk:{textAlign:"center",borderRadius:"7px",boxShadow:"0px 0px 5px lightgray",position:"absolute",top:"6px",backgroundColor:e.palette.background.paper},searchCont:{backgroundColor:"#F05F40",width:"130px",borderRadius:12,margin:"20px auto",display:"flex",justifyContent:"center",color:"white",fontSize:15,padding:"4px 2px",cursor:"pointer"},travelClassCont:{display:"flex",flexDirection:"row",gap:8},source:{marginLeft:"8px",color:"gray",fontWeight:"normal"},divSource:{display:"flex",marginBottom:"8px"},textColor:{color:e.palette.text.primary},marginNormal:{padding:"0px",margin:"0px",color:e.palette.text.primary,"& input":{padding:"9px 4px",margin:"0px",fontSize:"13px"},"& .MuiOutlinedInput-root":{borderRadius:"4px",height:"40px"},"& .MuiIconButton-root":{padding:"4px"}},wrapper:{height:"40px"},inpStyle:{padding:"0px",margin:"0px"},iconColor:{color:"gray"}}},{withTheme:!0})(s.memo(function(e){var t=e.classes,r=window.innerWidth<351,n=(0,d.A)({root:{color:"gray","&$checked":{color:"#F05F40"}},checked:{}})(function(e){return s.createElement(M.A,eR({color:"default",size:"small"},e))}),a=function(){return s.createElement("div",null,s.createElement(S.A,{component:"fieldset"},s.createElement(E.A,{row:!0,"aria-label":"trip",name:"trip",style:{marginLeft:"10px",marginBottom:"10px"},value:e.tripType,onChange:function(){return e.toggleTripType()}},s.createElement(w.A,{value:"oneway",control:s.createElement(n,null),label:"One-way",style:{padding:"0px 10px 0px 0px",borderRadius:"20px",height:"30px",color:"oneway"===e.tripType?"#F05F40":"#989898",backgroundColor:"oneway"===e.tripType?"#F8EDEB":"transparent"}}),s.createElement(w.A,{value:"roundtrip",control:s.createElement(n,null),label:"Return",style:{padding:"0px 10px 0px 0px",borderRadius:"20px",height:"30px",color:"roundtrip"===e.tripType?"#F05F40":"#989898",backgroundColor:"roundtrip"===e.tripType?"#F8EDEB":"transparent"}}))))},i=function(){return s.createElement("div",null,s.createElement(A.A,{sx:{display:{xs:"block",sm:"none"}}},s.createElement(k.A,{className:t.fromTo},"From"),s.createElement("div",{className:t.inputWrapperMobile},s.createElement("div",{id:"from",className:t.inputDiv,onClick:function(){e.toggleSearchScreen("from")}},s.createElement(k.A,{className:t.textColor,style:{display:"inline",paddingLeft:15,fontSize:14}},e.originCity?"".concat(e.originCity):"From Where?"," ",e.originAirportCode&&"(".concat(e.originAirportCode,")"))),s.createElement("div",{className:t.toogleIconMobile},s.createElement(z.A,{"aria-label":"Swap origin and destination",onClick:function(){return e.toggleOriginDestinationCities()},style:{color:"#F05F40",margin:"0px",padding:"6px",transform:"rotate(90deg)"}},s.createElement(W.A,{fontSize:"30px"}))),s.createElement(k.A,{className:t.fromTo,style:{marginTop:6}},"To"),s.createElement("div",{id:"to",className:t.inputDiv,onClick:function(){e.toggleSearchScreen("to")}},s.createElement(k.A,{style:{display:"inline",paddingLeft:15,fontSize:14},className:t.textColor},e.destinationCity?"".concat(e.destinationCity):"To Where?"," ",e.destinationAirportCode&&"(".concat(e.destinationAirportCode,")"))))),s.createElement(A.A,{sx:{display:{xs:"none",sm:"block"}}},s.createElement("div",{className:t.toFromDesk},s.createElement(k.A,{className:t.fromTo,style:{width:"100%"}},"From"),s.createElement(k.A,{className:t.fromTo,style:{paddingLeft:16,width:"100%"}},"To")),s.createElement("div",{className:t.inputWrapperDesk},s.createElement("div",{id:"from",className:t.inputDiv,onClick:function(){e.toggleSearchScreen("from")}},s.createElement(k.A,{className:t.textColor,style:{display:"inline",paddingLeft:15,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.originCity?"".concat(e.originCity):"From Where?"," ",e.originAirportCode&&"(".concat(e.originAirportCode,")"))),s.createElement("div",{className:t.toogleIconDesk},s.createElement(z.A,{"aria-label":"Swap origin and destination",onClick:function(){return e.toggleOriginDestinationCities()},style:{color:"#F05F40",margin:"0px",padding:"4px",transform:"rotate(90deg)"}},s.createElement(W.A,{fontSize:"small"}))),s.createElement("div",{id:"to",className:t.inputDiv,onClick:function(){e.toggleSearchScreen("to")}},s.createElement(k.A,{style:{display:"inline",paddingLeft:15,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},className:t.textColor},e.destinationCity?"".concat(e.destinationCity):"To Where?"," ",e.destinationAirportCode&&"(".concat(e.destinationAirportCode,")"))))))},o=function(){var r=(0,D.A)("(max-width: 700px)"),n=ej(s.useState(null),2),a=n[0],i=n[1],o=ej(s.useState(null),2),l=o[0],c=o[1],u=new Date(new Date().setFullYear(new Date().getFullYear()+1)),p=e.departureDate instanceof Date&&!isNaN(e.departureDate)?e.departureDate:null,d=e.returnDate instanceof Date&&!isNaN(e.returnDate)?e.returnDate:null,m=function(e,r,n){return s.createElement("div",{className:t.inputDiv,onClick:n,style:{cursor:"pointer",paddingLeft:12,gap:8}},s.createElement(f.A,{style:{color:r?"#F05F40":"#989898",fontSize:20}}),s.createElement(k.A,{className:r?t.textColor:void 0,style:eI({fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},r?{}:{color:"#989898"})},r?tu(r,"dd MMM yyyy"):e))};return s.createElement("div",null,s.createElement("div",{className:t.toFromDesk,style:{marginTop:r?15:20,marginBottom:8*!r}},s.createElement(k.A,{className:t.fromTo,style:{width:"100%"}},"Departure"),s.createElement(k.A,{className:t.fromTo,style:{paddingLeft:16,width:"100%"}},"Return")),s.createElement(C.A,{container:!0,spacing:1},s.createElement(C.A,{size:6},m("Departure",p,function(e){return i(e.currentTarget)})),s.createElement(C.A,{size:6},m("Return",d,function(e){return c(e.currentTarget)}))),s.createElement(x.$J,{dateAdapter:b.h},s.createElement(y.Ay,{open:!!a,anchorEl:a,onClose:function(){return i(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},s.createElement(v.x,{value:p,disablePast:!0,maxDate:u,onChange:function(t){e.setDepartureDate(t),i(null)}})),s.createElement(y.Ay,{open:!!l,anchorEl:l,onClose:function(){return c(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},s.createElement(v.x,{value:d,disablePast:!0,minDate:p||void 0,maxDate:u,onChange:function(t){e.setReturnDate(t),c(null)}}))))},l=function(n){n.isHomepage;var a=(0,D.A)("(max-width: 700px)");return r?s.createElement("div",null,s.createElement("div",{className:t.toFromDesk,style:{marginTop:a?15:20,marginBottom:8*!a,flexDirection:"column"}},s.createElement(k.A,{className:t.fromTo,style:{width:"100%"}},"Travellers")),s.createElement("div",{className:t.travelClassCont},s.createElement(tF,{handler:e.applyTravellers,adultsCount:e.adultsCount,childrenCount:e.childrenCount,infantsCount:e.infantsCount,isHomepage:!0})),s.createElement("div",{className:t.toFromDesk,style:{marginTop:a?15:20,marginBottom:8*!a,flexDirection:"column"}},s.createElement(k.A,{className:t.fromTo,style:{width:"100%"}},"Class")),s.createElement("div",{className:t.travelClassCont,style:{height:40}},s.createElement(tI,{selected:e.travelClass,handler:e.changeTravelClass,isHomepage:!0}))):s.createElement("div",null,s.createElement("div",{className:t.toFromDesk,style:{marginTop:a?15:20,marginBottom:8*!a}},s.createElement(k.A,{className:t.fromTo,style:{width:"100%"}},"Travellers"),s.createElement(k.A,{className:t.fromTo,style:{paddingLeft:16,width:"100%"}},"Class")),s.createElement("div",{className:t.travelClassCont},s.createElement(tF,{handler:e.applyTravellers,adultsCount:e.adultsCount,childrenCount:e.childrenCount,infantsCount:e.infantsCount,isHomepage:!0}),s.createElement(tI,{selected:e.travelClass,handler:e.changeTravelClass,isHomepage:!0})))},c=function(){var r=null===e.departureDate||""===e.originCity||""===e.originAirportCode||""===e.destinationCity||""===e.destinationAirportCode||e.originAirportCode===e.destinationAirportCode||e.tripType===e.trips[1]&&(null===e.returnDate||e.returnDate<e.departureDate),n=function(){r||e.redirectToDetail
1s()};return s.createElement("div",{className:t.searchCont,style:r?{backgroundColor:"lightgray"}:{},onClick:function(){return n()}},s.createElement(k.A,null,"Search Flight"))};return s.createElement(function(){var r=(0,D.A)("(max-width: 700px)");return s.createElement(T.A,{className:t.rootPaperQuickPanel},s.createElement("div",{className:t.coverhead},s.createElement("div",{className:t.coverbody}),s.createElement("div",{className:t.mainContent,style:{width:r?"94%":"85%"}},s.createElement(a,null),s.createElement(i,null),s.createElement(o,null),s.createElement(l,{isHomepage:e.isHomepage}),s.createElement(c,null))))},null)})),tL={rootPaperMobile:{width:"100%",minHeight:500,maxWidth:"500px",margin:"auto"},rootPaper:{width:"100%",minHeight:500,maxWidth:"1240px",margin:h.componentMargin}},tz=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"13px",height:"13px",flexShrink:0}},s.createElement("circle",{cx:"12",cy:"12",r:"9"}),s.createElement("polyline",{points:"12 7 12 12 15 14"}))},tj=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"currentColor",style:{width:"14px",height:"14px"}},s.createElement("path",{d:"M12 2c-.7 0-1 1-1 2v6L3 14v2l8-2v4l-2 1.5V21l3-1 3 1v-1.5L13 18v-4l8 2v-2l-8-4V4c0-1-.3-2-1-2Z"}))},tB=function(e){function t(e){return eD(this,t),ek(this,t,[e])}return eO(t,e),eT(t,[{key:"render",value:function(){var e=this.props,t=e.classes,r=e.formatTimeAMPM,n=this.props.route;return s.createElement(s.Fragment,null,s.createElement("div",{className:t.legWrap},s.createElement("div",{className:t.airlineRow},s.createElement("img",{src:tP(n.airlinecode),className:t.logo,alt:n.airlinecode}),s.createElement("span",null,this.props.airlinesInfo[n.airlinecode],s.createElement("em",{className:t.flightMeta}," ","| ",n.airlinecode," ",n.flightno))),s.createElement("div",{className:t.legGrid},s.createElement("div",{className:t.rail},s.createElement("span",{className:t.rnode}),s.createElement("span",{className:t.rline},s.createElement(tj,null)),s.createElement("span",{className:t.rnode})),s.createElement("div",{className:t.legContent},s.createElement("div",{className:t.lrow},s.createElement("span",{className:t.lrowTime},r(n.convertedDeptTime),0!==n.daysdifferenceDeparture&&s.createElement("sup",{className:t.dayOffset},"+",n.daysdifferenceDeparture)),s.createElement("span",{className:t.lrowAp},this.props.airportsInfo[n.origincode].city," – ",n.origincode)),s.createElement("div",{className:"".concat(t.lrow," ").concat(t.lrowDur)},s.createElement("span",null,n.duration)),s.createElement("div",{className:t.lrow},s.createElement("span",{className:t.lrowTime},r(n.convertedArrTime),0!==n.daysdifferenceArrival&&s.createElement("sup",{className:t.dayOffset},"+",n.daysdifferenceArrival)),s.createElement("span",{className:t.lrowAp},this.props.airportsInfo[n.destinationcode].city," – ",n.destinationcode)))
1)),null!==n.layoverafterthis&&s.createElement("div",{className:t.layover},s.createElement("span",{className:t.layoverPill},s.createElement(tz,null),n.layoverafterthis,this.props.layoverCity," (",this.props.layoverCityCode,")")))}}])}(s.Component),tH=(0,d.A)(function(e){return{legWrap:{padding:"0 0 4px"},airlineRow:{display:"flex",alignItems:"center",gap:"9px",fontSize:"13px",fontWeight:600,color:e.palette.text.primary,margin:"14px 0 10px","&:first-child":{marginTop:0}},logo:{height:"20px",width:"20px",borderRadius:"4px",objectFit:"contain"},legGrid:{display:"grid",gridTemplateColumns:"26px 1fr",gap:"13px"},rail:{display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"4px"},rnode:{width:"8px",height:"8px",borderRadius:"50%",border:"2px solid ".concat(e.palette.text.secondary),background:e.palette.background.paper,flexShrink:0},rline:{flex:1,width:"2px",minHeight:"30px",margin:"4px 0",background:"repeating-linear-gradient(".concat(e.palette.divider," 0 3px, transparent 3px 7px)"),display:"flex",alignItems:"center",justifyContent:"center",color:e.palette.text.secondary},legContent:{display:"flex",flexDirection:"column"},lrow:{display:"flex",alignItems:"baseline",gap:"9px"},lrowTime:{fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"13.5px",letterSpacing:"-0.01em",minWidth:"74px",color:e.palette.text.primary},lrowAp:{fontSize:"12.5px",color:e.palette.text.secondary,fontWeight:500},lrowDur:{padding:"8px 0",fontSize:"11.5px",color:e.palette.text.secondary,fontWeight:500,minHeight:"30px",alignItems:"center"},layover:{display:"flex",alignItems:"center",gap:"8px",margin:"10px 0 10px 39px",fontSize:"12px",fontWeight:600,color:e.palette.warning.main},layoverPill:{background:(0,c.X4)(e.palette.warning.main,.1),padding:"5px 11px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},flightMeta:{fontStyle:"normal",color:e.palette.text.secondary,fontWeight:500},dayOffset:{fontSize:"9px",color:e.palette.primary.main,fontWeight:700,marginLeft:"1px"}}})(tB),t_=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"14px",height:"14px"}},s.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),s.createElement("polyline",{points:"12 5 19 12 12 19"}))},tX=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"14px",height:"14px"}},s.createElement("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),s.createElement("polyline",{points:"12 19 5 12 12 5"}))},tU=function(e){function t(e){var r;return eD(this,t),eN(r=ek(this,t,[e]),"handleChange",function(e,t){r.setState({value:t})}),eN(r,"handleChangeIndex",function(e){r.setState({value:e})}),r.state={value:0},r}return eO(t,e),eT(t,[{key:"render",value:function(){var e=this.props.classes;return s.createElement(s.Fragment,null,s.createElement(A.A,{sx:{display:{xs:"block",md:"none"}}},s.createElement(Y.A,{value:this.state.value,onChange:this.handleChange,indicatorColor:"primary",textColor:"inherit",variant:"fullWidth",className:e.tabs},s.createElement(G.A,{label:"Outbound"}),s.createElement(G.A,{label:"Return"})),s.createElement("div",{className:e.legsPad},0===this.state.value?this.props.outboundjsx:this.props.returnjsx)),s.createElement(A.A,{sx:{display:{xs:"none",md:"block"}}},s.createElement("div",{className:e.cols},s.createElement("div",{className:e.col},s.createElement("div",{className:e.colHead},s.createElement("span",{className:e.dirOut},s.createElement(t_,null)),"Outbound"),s.createElement("div",{className:e.legsPad},this.props.outboundjsx)),s.createElement("div",{className:"".concat(e.col," ").concat(e.colDivider)},s.createElement("div",{className:e.colHead},s.createElement("span",{className:e.dirRet},s.createElement(tX,null)),"Return"),s.createElement("div",{className:e.legsPad},this.props.returnjsx)))))}}])}(s.Component),tq=(0,d.A)(function(e){var t,r="dark"===e.palette.mode?"#FFFFFF":"#15171C";return{cols:eN({display:"grid",gridTemplateColumns:"1fr 1fr",borderTop:"1px dashed ".concat(e.palette.divider)},e.breakpoints.down("sm"),{gridTemplateColumns:"1fr"}),col:{padding:"0 0 20px"},colDivider:eN({borderLeft:"1px solid ".concat(e.palette.divider)},e.breakpoints.down("sm"),{borderLeft:"none",borderTop:"1px solid ".concat(e.palette.divider)}),colHead:{fontFamily:"'Sora', sans-serif",fontWeight:600,fontSize:"13px",textAlign:"center",padding:"12px",color:e.palette.text.primary,background:"dark"===e.palette.mode?(0,c.X4)(e.palette.common.white,.03):null!=(t=e.palette.background.cardContainer)?t:e.palette.background.paper,borderBottom:"1px solid ".concat(e.palette.divider),display:"flex",alignItems:"center",justifyContent:"center",gap:"7px"},dirOut:{color:r},dirRet:{color:r},legsPad:{padding:"16px 20px 0"},tabs:{borderBottom:"1px solid ".concat(e.palette.divider)}}})(tU),tY=(0,d.A)(function(e){var t="dark"===e.palette.mode?"#FFFFFF":"#15171C";return{lineWrap:{position:"relative",width:"100%",height:"14px",display:"flex",alignItems:"center"},dashedLine:{position:"absolute",left:0,right:0,top:"50%",transform:"translateY(-50%)",height:"2px",backgroundImage:"linear-gradient(90deg, ".concat(e.palette.divider," 60%, transparent 0)"),backgroundSize:"8px 2px",backgroundRepeat:"repeat-x"},dotOrigin:{width:"6px",height:"6px",borderRadius:"50%",background:t,flexShrink:0,zIndex:1},dotStop:{width:"10px",height:"10px",background:e.palette.background.paper,border:"2.5px solid ".concat(e.palette.warning.main),borderRadius:"50%",boxShadow:"0 0 0 3px ".concat((0,c.X4)(e.palette.warning.main,.15)),flexShrink:0,zIndex:2},dotDest:{width:"6px",height:"6px",borderRadius:"50%",background:t,flexShrink:0,zIndex:1},seg:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1}}})(function(e){var t=e.classes,r=e.noOfStops,n=[];n.push(s.createElement("span",{key:"origin",className:t.dotOrigin}));for(var a=0;a<r;a++)n.push(s.createElement("span",{key:"seg-".concat(a),className:t.
1seg})),n.push(s.createElement("span",{key:"stop-".concat(a),className:t.dotStop}));return n.push(s.createElement("span",{key:"final-seg",className:t.seg})),n.push(s.createElement("span",{key:"dest",className:t.dotDest})),s.createElement("div",{className:t.lineWrap},s.createElement("div",{className:t.dashedLine}),n)});function tG(e){var t=e.suppliedCurrency;e.suppliedCurrencySymbol;var r=e.value,n=tf(function(e){return e.currencyRates}),a=tf(function(e){return e.userCurrency}),i=a?a.currencyName:"usd",o=(a?a.currencySymbol:"$")+Math.floor(n[t]*Number(r)/n[i]);return s.createElement("span",null,tm(o))}var tJ=!1,t$=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"14px",height:"14px"}},s.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),s.createElement("polyline",{points:"12 5 19 12 12 19"}))},tQ=function(e){var t=e.color;return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"12px",height:"12px",color:t}},s.createElement("path",{d:"M17 3l4 4-4 4M21 7H7M7 21l-4-4 4-4M3 17h14"}))},tV=function(e){var t=e.expanded;return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"15px",height:"15px",transition:"transform .42s cubic-bezier(.2,.8,.2,1)",transform:t?"rotate(180deg)":"none",flexShrink:0}},s.createElement("polyline",{points:"6 9 12 15 18 9"}))},tK=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"12px",height:"12px",flexShrink:0}},s.createElement("circle",{cx:"9",cy:"7",r:"3"}),s.createElement("circle",{cx:"17",cy:"9",r:"2.4"}),s.createElement("path",{d:"M3 20c0-3 3-5 6-5s6 2 6 5M15 20c0-2 .8-3.4 2-4"}))},tZ=function(e){var t=e.color;return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"11px",height:"11px",flexShrink:0}},s.createElement("polyline",{points:"20 6 9 17 4 12"}))},t0=function(){return s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{width:"13px",height:"13px",flexShrink:0}},s.createElement("path",{d:"M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6l8-3Z"}),s.createElement("polyline",{points:"9 12 11 14 15 10"}))},t1=["#e0533a","#2b6fd6","#475569","#7c3aed","#d97706","#0891b2","#be185d","#92400e"],t2=function(e){function t(e){var r;if(eD(this,t),eN(r=ek(this,t,[e]),"getFormattedDuration",function(e){return s.createElement(s.Fragment,null,s.createElement("span",{style:{fontSize:"16px"}},Math.floor(e/60),"h ",e%60,"m"))}),eN(r,"formatTimeAMPM",function(e){var t=ej(e.split(":"),2),r=t[0],n=t[1],a=n.slice(0,2),i=n.slice(2).toLowerCase();return"".concat(r,":").concat(a).concat("a"===i?"am":"pm")}),eN(r,"splitTime",function(e){var t=r.formatTimeAMPM(e);return{time:t.slice(0,-2),meridian:t.slice(-2)}}),eN(r,"summaryJSX",function(e){var t=r.props.classes,n=r.props.ticket,a=tg(n),i=0!==n.returninfo.route.length,o="returninfo"===e,l=a.outboundLayovers,c=a.returnFlightLayovers;if(0===n[e].route.length)return null;var u=n[e].route.length-1,p=0===u?"Non Stop":1===u?"1 Stop":"".concat(u," Stops"),d=o?c:l,m=r.splitTime(n[e].convertedDeptTime),g=r.splitTime(n[e].convertedArrTime),h=u>0?s.createElement("div",{className:t.stopsBadge},s.createElement("b",null,p),d.length>0&&s.createElement(s.Fragment,null,s.createElement("span",{className:t.stopSep}),d.join(" \xb7 ")),1===u&&d.length>0&&s.createElement(A.A,{component:"span",sx:{display:{xs:"none",sm:"inline"}}},s.createElement("span",{className:t.stopSep}),th(n[e]).trim())):s.createElement("div",{className:t.nonStopText},"Non Stop"),f="".concat(n[e].carriers[0]).concat(u>0?" \xb7 ".concat(p.toLowerCase()," via ").concat(d[0]||""):" \xb7 Non stop");return s.createElement("div",{className:"".concat(t.journeySection," ").concat(i&&o?t.journeySectionReturn:"")},s.createElement("div",{className:t.airlineHeader},i&&s.createElement("span",{className:o?t.tagRet:t.tagOut},o?"Return":"Depart"),s.createElement("div",{className:t.logoWrap},s.createElement("img",{src:tP(n[e].carriers[0]),className:t.logo,alt:n[e].carriers[0]})),s.createElement("div",null,r.airlineJSX(),!i&&s.createElement("div",{className:t.airlineSub},f))),s.createElement("div",{className:t.route},s.createElement("div",{className:t.routeEnd},s.createElement("div",{className:t.iataCode},n[e].origincode),s.createElement(A.A,{component:"div",className:t.routeCity,sx:{display:{xs:"none",sm:"block"}}},r.props.airportsInfo[n[e].origincode].city),s.createElement("div",{className:t.routeTime},m.time,s.createElement("small",null,m.meridian))),s.createElement("div",{className:t.pathSection},s.createElement("div",{className:t.pathDur},Math.floor(n[e].duration/60),"h ",n[e].duration%60,"m"),s.createElement(tY,{noOfStops:u}),h),s.createElement("div",{className:"".concat(t.routeEnd," ").concat(t.routeEndArr)},s.createElement("div",{className:t.iataCode},n[e].destinationcode),s.createElement(A.A,{component:"div",className:t.routeCity,sx:{display:{xs:"none",sm:"block"}}},r.props.airportsInfo[n[e].destinationcode].city),s.createElement("div",{className:t.routeTime},g.time,s.createElement("small",null,g.meridian),0!==n[e].daysdifference&&s.createElement("sup",{className:t.nextDay},"+",n[e].daysdifference)))))}),eN(r,"priceJSX",function(){var e=r.props.classes,t=r.props.ticket,n=0!==t.returninfo.route.length;return s.createElement(s.Fragment,null,s.createElement("div",{className:e.priceLabel},"Total fare"),s.createElement("div",{className:e.priceFrom},"from"),s.createElement(k.A,{className:n?e.minPriceReturn:e.minPrice},s.createElement(tG,{suppliedCurrency:t.bestPriceOriginal?t.bestPriceOriginal.currency:"usd",suppliedCurrencySymbol:"$",value:t.bestPriceOriginal?t.bestPriceOriginal.amount:t.minprice})),s.createElement("div",{className:e.priceSub},"incl. taxes"),s.createElement(A.A,{className:e.farePartners},s.createElement(tK,null),t.providers.length," booking options"))}),eN(r,"airlineJSX",function(){var e=r.props.classes,t=r.props.ticket,n=null;n=1===t.outboundinfo.carriers.length?r.props.airlinesInfo[r.props.ticket.outboundinfo.carriers[0]]:"Multi Airline";var a=null;return 0!==t.returninfo.route.length&&(1===t.returninfo.carriers.length?r.props.airlinesInfo[r.props.ticket.outboundinfo.carriers[0]]!==r.props.airlinesInfo[r.props.ticket.returninfo.carriers[0]]&&(a=r.props.airlinesInfo[r.props.ticket.returninfo.carriers[0]]):a="Multi Airline"),a?s.createElement(k.A,{className:e.airlineName},n," / ",a):s.createElement(k.A,{className:e.airlineName},n)}),eN(r,"expandedJSXforRendering",function(){var e=r.props.classes,t=null,n=null,a=null,i=r.props.ticket;if(!0===r.state.display){for(var o=i.outboundinfo.route,l=i.returninfo.route,c=[],u=o.length,p=0;p<u;++p){var d=null;
1p<o.length-1&&(d=o[p+1].origincode);var m=s.createElement(tH,{originalDepartureTime:i.outboundinfo.departuretime,originalArrivalTime:i.outboundinfo.arrivaltime,route:o[p],airlinesInfo:r.props.airlinesInfo,airportsInfo:r.props.airportsInfo,layoverCity:null!==d?r.props.airportsInfo[d].city:null,layoverCityCode:null!==d?d:null,formatTimeAMPM:r.formatTimeAMPM,key:p});c.push(m)}if(t=s.createElement(C.A,{container:!0,key:"1"},c),0!==l.length){c=[],u=l.length;for(var g=0;g<u;++g){var h=null;g<l.length-1&&(h=l[g+1].origincode);var f=s.createElement(tH,{originalDepartureTime:i.returninfo.departuretime,originalArrivalTime:i.returninfo.arrivaltime,route:l[g],airlinesInfo:r.props.airlinesInfo,airportsInfo:r.props.airportsInfo,layoverCity:null!==h?r.props.airportsInfo[h].city:null,layoverCityCode:null!==h?h:null,formatTimeAMPM:r.formatTimeAMPM,key:g});c.push(f)}n=s.createElement(C.A,{container:!0,key:"2"},c)}i.providers.sort(function(e,t){return e.price<t.price?-1:+(e.price>t.price)});var y=i.providers.slice(0,r.state.providerstoshow),x=r.state.providerstoshow<i.providers.length,v=x?i.providers[r.state.providerstoshow]:null;a=s.createElement(A.A,{className:e.offersSection,key:"3"},s.createElement(A.A,{className:e.offersHead},s.createElement(k.A,{className:e.offersTitle},"Book through our partners"),s.createElement(k.A,{className:e.offersCount},y.length," offer",1!==y.length?"s":""," \xb7 redirected to partner site")),s.createElement(A.A,{className:e.offerGrid},y.map(function(t,n){var a=0===n,i=t1[n%t1.length];return s.createElement(A.A,{key:n,className:"".concat(e.offerCard," ").concat(a?e.offerCardBest:"")},a&&s.createElement("span",{className:e.bestBadge},"Best price"),s.createElement(A.A,{className:e.offerTop},s.createElement(A.A,{className:e.offerAvatar,style:{background:i}},t.name[0].toUpperCase()),s.createElement(A.A,null,s.createElement(k.A,{className:e.offerName},t.name),t.note&&s.createElement(A.A,{className:e.offerNote},s.createElement(tZ,{color:r.props.theme.palette.text.primary}),t.note))),s.createElement(A.A,{className:e.offerBottom},s.createElement(k.A,{className:"".concat(e.offerPrice," ").concat(a?e.offerPriceBest:"")},s.createElement(tG,{suppliedCurrency:t.originalCurrency||"usd",suppliedCurrencySymbol:"$",value:t.originalPrice||Math.round(t.price)})),s.createElement(N.A,{className:"".concat(e.bookBtn," ").concat(a?"":e.bookBtnGhost),onClick:function(){return r.fetchURLandRedirect(t.deeplinkurl,n)}},r.state.isBookLoading[n]?s.createElement(R.A,{size:14,color:"inherit"}):s.createElement(s.Fragment,null,"Book",a&&s.createElement(t$,null)))))}),x&&s.createElement(A.A,{className:e.moreTile,onClick:function(){return r.viewMoreProvidersHandler(i.providers.length)}},s.createElement(k.A,{className:e.moreTileCount},"+",i.providers.length-y.length," more"),v&&s.createElement(k.A,{className:e.moreTileFrom},"from\xa0",s.createElement(tG,{suppliedCurrency:v.originalCurrency||"usd",suppliedCurrencySymbol:"$",value:v.originalPrice||Math.round(v.price)})),s.createElement(k.A,{className:e.moreTileCta},"View all",s.createElement(t$,null)))),x&&s.createElement(A.A,{className:e.viewMoreButton,onClick:function(){return r.viewMoreProvidersHandler(i.providers.length)}},"View all ",i.providers.length," options",s.createElement(t$,null)),s.createElement(A.A,{className:e.offersFooter},s.createElement(t0,null),"Prices are pulled live from partner APIs and may change at checkout."));var b=[];return 0===l.length?b.push(t):b.push(s.createElement(tq,{key:"2",outboundjsx:t,returnjsx:n})),b.push(a),b}}),eN(r,"fetchURLandRedirect",function(e,t){var n;r.setState(function(e){return{isBookLoading:eI(eI({},e.isBookLoading),{},eN({},t,!0))}}),(n=r.props.searchID,fetch(h.HDComponent.generateURL(td.FLIGHT_BOOK+"?searchId=".concat(n,"&deeplinkCode=").concat(e),ty),{credentials:"include"}).then(function(e){return e.json()}).then(function(e){return e.url}).catch(function(e){console.log("[ServiceClass] getAutoCompleteCityAPI error",e)})).then(function(e){if((0,h.isNativeAvailable)()){r.setState(function(e){return{isBookLoading:eI(eI({},e.isBookLoading),{},eN({},t,!1))}});var n=document.createElement("a");n.href=e,n.click()}else{r.setState(function(e){return{isBookLoading:eI(eI({},e.isBookLoading),{},eN({},t,!1))}});var a=window.open();return a.target="_blank",a.location=e,!1}})}),eN(r,"viewMoreProvidersHandler",function(e){e>r.state.providerstoshow&&r.setState({providerstoshow:e})}),eN(r,"clickhandler",function(){r.state.expanded?r.setState({expanded:!1,providerstoshow:3}):r.setState({display:!0,expanded:!0})}),r.state={providerstoshow:3,display:!1,expanded:!1,url:"",isBookLoading:{}},!tJ&&"u">typeof document){tJ=!0;var n=document.createElement("link");n.rel="stylesheet",n.href="https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;
1800&family=Hanken+Grotesk:wght@400;500;600;700&display=swap",document.head.appendChild(n)}return r}return eO(t,e),eT(t,[{key:"render",value:function(){var e=this.props.classes,t=0!==this.props.ticket.returninfo.route.length;return s.createElement("div",{className:"".concat(e.ticketWrap," ").concat(this.state.expanded?e.ticketOpen:"")},s.createElement("div",{className:e.summary,onClick:this.clickhandler},s.createElement("div",{className:e.main},this.summaryJSX("outboundinfo"),t&&this.summaryJSX("returninfo")),s.createElement("div",{className:e.stub},s.createElement("div",{className:e.stubPricing},t&&s.createElement("div",{className:e.tripType},s.createElement(tQ,{color:this.props.theme.palette.text.secondary}),"Round trip"),this.priceJSX()))),s.createElement("div",{className:e.toggle,onClick:this.clickhandler},s.createElement("span",null,this.state.expanded?"Hide flight details":"View prices & flight details"),s.createElement(tV,{expanded:this.state.expanded})),s.createElement("div",{className:"".concat(e.drawer," ").concat(this.state.expanded?e.drawerExpanded:"")},s.createElement("div",{className:e.drawerInner},this.expandedJSXforRendering())))}}])}(h.HDComponent),t4=(0,d.A)(function(e){var t,r,n="dark"===e.palette.mode,a=e.palette.divider,i=e.palette.background.default,o=e.palette.background.paper,l=n?"#FFFFFF":"#15171C",s=n?"#15171C":"#FFFFFF",u=e.palette.common.black,p="@media (max-width:920px)";return{ticketWrap:{position:"relative",background:"linear-gradient(180deg, ".concat(o," 0%, ").concat(i," 100%)"),border:"1px solid ".concat(a),borderRadius:null!=(t=e.shape.borderRadiusCard)?t:22,boxShadow:"0 1px 2px ".concat((0,c.X4)(u,.04),", 0 18px 40px -18px ").concat((0,c.X4)(u,.28)),overflow:"hidden",marginBottom:"12px",transition:"box-shadow .4s ease","&::after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",borderRadius:"inherit",backgroundImage:"radial-gradient(".concat((0,c.X4)(u,.018)," 1px, transparent 1px)"),backgroundSize:"9px 9px",mixBlendMode:"multiply",opacity:.6}},ticketOpen:{boxShadow:"0 1px 2px ".concat((0,c.X4)(u,.05),", 0 34px 60px -24px ").concat((0,c.X4)(u,.34))},summary:eN({display:"grid",gridTemplateColumns:"minmax(0, 1fr) 160px",cursor:"pointer"},e.breakpoints.down("sm"),{gridTemplateColumns:"1fr"}),main:eN({minWidth:0,padding:"22px 22px 18px 22px"},e.breakpoints.down("sm"),{padding:"18px 16px 16px"}),journeySection:{},journeySectionReturn:{borderTop:"1px solid ".concat(a),paddingTop:"14px",marginTop:"14px"},airlineHeader:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"14px"},tagOut:{fontSize:"10px",fontWeight:700,letterSpacing:".1em",textTransform:"uppercase",color:s,background:l,padding:"3px 8px",borderRadius:"6px",whiteSpace:"nowrap",flexShrink:0},tagRet:{fontSize:"10px",fontWeight:700,letterSpacing:".1em",textTransform:"uppercase",color:l,background:"transparent",border:"1px solid ".concat((0,c.X4)(l,.35)),padding:"2px 7px",borderRadius:"6px",whiteSpace:"nowrap",flexShrink:0},logoWrap:{width:"30px",height:"30px",borderRadius:"8px",overflow:"hidden",flexShrink:0,background:e.palette.background.paper,border:"1px solid ".concat(a),display:"flex",alignItems:"center",justifyContent:"center",boxShadow:e.shadows[1]},logo:{height:"22px",width:"22px",objectFit:"contain",borderRadius:"4px"},airlineName:{fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"15px",letterSpacing:"-.02em",color:e.palette.text.primary,margin:0},airlineSub:{fontSize:"11px",color:e.palette.text.secondary,fontWeight:500,marginTop:"2px"},route:{display:"grid",gridTemplateColumns:"auto minmax(0, 1fr) auto",alignItems:"center",gap:"14px"},routeEnd:{},routeEndArr:{textAlign:"right"},iataCode:{fontSize:"11px",fontWeight:700,letterSpacing:".14em",color:e.palette.text.secondary,textTransform:"uppercase"},routeCity:{fontSize:"11.5px",color:e.palette.text.secondary,fontWeight:500,marginTop:"1px",opacity:.8},routeTime:{fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"24px",letterSpacing:"-.03em",marginTop:"8px",lineHeight:1,color:e.palette.text.primary,"& small":{fontSize:"13px",fontWeight:600,color:e.palette.text.secondary,marginLeft:"1px"}},nextDay:{fontSize:"10px",fontWeight:700,color:e.palette.warning.main,verticalAlign:"super",marginLeft:"2px"},pathSection:{display:"flex",flexDirection:"column",alignItems:"center",gap:"7px",minWidth:0},pathDur:{fontFamily:"'Sora', sans-serif",fontWeight:600,fontSize:"12px",color:e.palette.text.primary,letterSpacing:"-.01em"},stopsBadge:{display:"flex",alignItems:"center",gap:"4px",fontSize:"10.5px",fontWeight:600,letterSpacing:".02em",color:e.palette.warning.main,background:(0,c.X4)(e.palette.warning.main,.12),padding:"2px 9px",borderRadius:"20px",whiteSpace:"normal",flexWrap:"wrap",justifyContent:"center",textAlign:"center","& b":{fontWeight:700}},stopSep:{display:"inline-block",width:"3px",height:"3px",borderRadius:"50%",background:"currentColor",opacity:.55,margin:"0 2px",verticalAlign:"middle"},nonStopText:{fontSize:"10.5px",fontWeight:600,color:l,letterSpacing:".02em"},stub:eN({position:"relative",background:n?(0,c.X4)(l,.06):"linear-gradient(180deg, ".concat((0,c.X4)(l,.04),", ").concat((0,c.X4)(l,.012),")"),borderLeft:"2px dashed ".concat(a),display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",ga
1p:"3px",padding:"22px 18px","&::before":{content:'""',position:"absolute",left:"-9px",top:"-9px",width:"18px",height:"18px",borderRadius:"50%",background:i,border:"1px solid ".concat(a)},"&::after":{content:'""',position:"absolute",left:"-9px",bottom:"-9px",width:"18px",height:"18px",borderRadius:"50%",background:i,border:"1px solid ".concat(a)}},e.breakpoints.down("sm"),{borderLeft:"none",borderTop:"2px dashed ".concat(a),flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"16px 20px","&::before":{top:"-9px",left:"-9px"},"&::after":{top:"-9px",left:"auto",right:"-9px",bottom:"auto"}}),stubPricing:eN({width:"100%"},e.breakpoints.down("sm"),{width:"auto"}),tripType:{fontSize:"10px",fontWeight:700,letterSpacing:".08em",textTransform:"uppercase",color:e.palette.text.secondary,display:"flex",alignItems:"center",gap:"5px",marginBottom:"4px"},priceLabel:{fontSize:"10px",fontWeight:600,letterSpacing:".1em",textTransform:"uppercase",color:e.palette.text.secondary},minPrice:{fontFamily:"'Sora', sans-serif",fontWeight:800,fontSize:"24px",letterSpacing:"-.03em",color:l,lineHeight:1.1},minPriceReturn:{fontFamily:"'Sora', sans-serif",fontWeight:800,fontSize:"24px",letterSpacing:"-.03em",color:l,lineHeight:1.1},priceSub:{fontSize:"10.5px",color:e.palette.text.secondary,fontWeight:500},priceFrom:{fontSize:"11px",fontWeight:600,color:e.palette.text.secondary,marginTop:"6px"},farePartners:{marginTop:"10px",fontSize:"11px",fontWeight:600,color:l,display:"flex",alignItems:"center",gap:"5px"},btn:eN({width:"100%",border:"none",borderRadius:e.shape.borderRadius,padding:"10px 12px",cursor:"pointer",fontFamily:"'Sora', sans-serif",fontWeight:600,fontSize:"13px",color:s,background:l,boxShadow:"0 8px 18px -8px ".concat((0,c.X4)(u,.35),", inset 0 1px 0 ").concat((0,c.X4)(e.palette.common.white,.12)),display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",transition:"transform .2s ease, filter .2s ease, box-shadow .2s ease","&:hover":{transform:"translateY(-1px)",filter:"brightness(1.06)",boxShadow:"0 12px 24px -8px ".concat((0,c.X4)(u,.45))},"&:active":{transform:"translateY(0)"}},e.breakpoints.down("sm"),{width:"auto",padding:"10px 20px"}),toggle:{display:"flex",alignItems:"center",justifyContent:"center",gap:"7px",padding:"9px",borderTop:"1px solid ".concat(a),cursor:"pointer",fontSize:"12px",fontWeight:600,color:e.palette.text.secondary,background:n?(0,c.X4)(e.palette.common.white,.02):null!=(r=e.palette.background.cardContainer)?r:e.palette.background.paper,transition:"background .2s, color .2s",userSelect:"none","&:hover":{background:n?(0,c.X4)(e.palette.common.white,.05):(0,c.X4)(l,.04),color:e.palette.text.primary}},drawer:{display:"grid",gridTemplateRows:"0fr",transition:"grid-template-rows .45s cubic-bezier(.2,.8,.2,1)"},drawerExpanded:{gridTemplateRows:"1fr"},drawerInner:{overflow:"hidden"},offersSection:eN({padding:"8px 24px 26px",borderTop:"1px solid ".concat(a)},p,{padding:"8px 14px 20px"}),offersHead:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"10px",margin:"14px 0",flexWrap:"wrap"},offersTitle:{fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"14px",letterSpacing:"-.01em",color:e.palette.text.primary},offersCount:{fontSize:"11.5px",color:e.palette.text.secondary,fontWeight:500},offerGrid:eN({display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:"12px"},p,{gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:"10px","& > *:last-child:nth-child(odd)":{gridColumn:"1 / -1"},"& > *:last-child:nth-child(odd) $offerBottom":{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},"& > *:last-child:nth-child(odd) $bookBtn":{width:"auto",minWidth:"104px"}}),offerCard:eN({position:"relative",minWidth:0,border:"1px solid ".concat(a),borderRadius:e.shape.borderRadius,padding:"16px",background:e.palette.background.paper,display:"flex",flexDirection:"column",gap:"14px",transition:"transform .25s, box-shadow .25s, border-color .25s","&:hover":{transform:"translateY(-3px)",boxShadow:"0 14px 28px -16px ".concat((0,c.X4)(u,.3))}},p,{padding:"15px 11px 12px",gap:"10px","&:hover":{transform:"none",boxShadow:"none"}}),offerCardBest:{borderColor:(0,c.X4)(l,.35),background:n?(0,c.X4)(l,.06):"linear-gradient(180deg, ".concat((0,c.X4)(l,.04),", ").concat(o,")"),boxShadow:"0 0 0 1px ".concat((0,c.X4)(l,.18))},bestBadge:eN({position:"absolute",top:"-9px",left:"16px",fontSize:"9.5px",fontWeight:800,letterSpacing:".08em",textTransform:"uppercase",color:s,background:l,padding:"4px 9px",borderRadius:"20px",boxShadow:"0 5px 12px -5px ".concat((0,c.X4)(u,.5)),whiteSpace:"nowrap"},p,{top:"-8px",left:"10px",fontSize:"8.5px",padding:"3px 7px"}),offerTop:eN({display:"flex",alignItems:"center",gap:"10px",minWidth:0},p,{gap:"8px"}),offerAvatar:eN({width:"34px",height:"34px",borderRadius:"9px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"14px",color:e.palette.common.white},p,{width:"28px",height:"28px",borderRadius:"8px",fontSize:"12px"}),offerName:eN({fontFamily:"'Sora', sans-serif",fontWeight:600,fontSize:"13.5px",letterSpacing:"-.01em",color:e.palette.text.primary},p,{fontSize:"12.5px",lineHeight:1.25,overflowWrap:"anywhere"}),offerNote:eN({fontSize:"11px",color:e.palette.text.secondary,fontWeight:500,marginTop:"2px",display:"flex",alignItems:"center",gap:"4px"},p,{fontSize:"10px"}),offerBottom:eN({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"10px",marginTop:"auto"},p,{flexDirection:"column",alignItems:"stretch",gap:"9px"}),offerPrice:eN({fontFamily:"'Sora', sans-serif",fontWeight:800,fontSize:"19px",letterSpacing:"-.03em",color:e.palette.text.primary},p,{fontSize:"16.5px"}),offerPriceBest:{color:l},bookBtn:eN(eN({border:"none",borderRadius:e.shape.borderRadius,padding:"8px 14px",cursor:"pointer",fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"12px",letterSpacing:".02em",color:s,background:l,boxShadow:"0 7px 16px -7px ".concat((0,c.X4)(u,.4),", inset 0 1px 0 ").concat((0,c.X4)(e.palette.common.white,.15)),transition:"transform .18s ease, filter .18s ease",minWidth:"unset",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"},p,{width:"100%",padding:"8px 10px",fontSize:"11.5px"}),"&:hover",{transform:"translateY(-1px)",filter:"brightness(1.06)",background:l,boxShadow:"0 10px 22px -8px ".concat((0,c.X4)(u,.5),", inset 0 1px 0 ").concat((0,c.X4)(e.palette.common.white,.15))}),bookBtnGhost:{background:"transparent",color:l,boxShadow:"inset 0 0 0 1.6px ".concat((0,c.X4)(l,.4)),"&:hover":{background:(0,c.X4)(l,.06),filter:"none",transform:"translateY(-1px)",boxShadow:"inset 0 0 0 1.6px ".concat((0,c.X4)(l,.55))}},offersFooter:{marginTop:"13px",fontSize:"11px",color:e.palette.text.secondary,display:"flex",alignItems:"center",gap:"6px"},moreTile:eN({display:"none"},p,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"3px",minWidth:0,padding:"15px 11px",borderRadius:e.shape.borderRadius,border:"1.5px dashed ".concat((0,c.X4)(l,.3)),background:n?(0,c.X4)(l,.05):(0,c.X4)(l,.03),cursor:"pointer",userSelect:"none",textAlign:"center",transition:"background .2s, border-color .2s","&:active":{background:(0,c.X4)(l,.1),borderColor:(0,c.X4)(l,.5)}}),moreTileCount:{fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"14px",letterSpacing:"-.01em",color:e.palette.text.primary},moreTileFrom:{fontSize:"11.5px",fontWeight:500,color:e.palette.text.secondary,display:"flex",alignItems:"center"},moreTileCta:{marginTop:"6px",fontFamily:"'Sora', sans-serif",fontWeight:700,fontSize:"12px",color:l,display:"flex",alignItems:"center",gap:"4px"},viewMoreButton:eN({display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",marginTop:"16px",padding:"10px 20px",borderRadius:e.shape.borderRadius,border:"1.5px solid ".concat((0,c.X4)(l,.35)),background:n?(0,c.X4)(l,.06):(0,c.X4)(l,.03),fontSize:"12.5px",fontWeight:600,color:l,cursor:"pointer",transition:"background .2s, border-color .2s, transform .15s",userSelect:"none","&:hover":{background:(0,c.X4)(l,.1),borderColor:(0,c.X4)(l,.6),transform:"translateY(-1px)"}},p,{display:"none"}),providers:{},providerName:{}
1,providerPrice:{},bookFlightButton:{},center:{display:"flex",alignItems:"center",justifyContent:"center"},bold:{fontWeight:"bold"},expansionPanelShadow:{},expansionPanelDetail:{},expandIcon:{},origDestiCode:{},marginTop:{},noOfStops:{},returnSummaryPadding:{},p:{}}},{withTheme:!0})(t2),t5=function(e){function t(e){var r;return eD(this,t),eN(r=ek(this,t,[e]),"handleOutboundDeparture",function(e,t){r.setState({outboundDepartureRange:t})}),eN(r,"handleOutboundArrival",function(e,t){r.setState({outboundArrivalRange:t})}),eN(r,"handleReturnDeparture",function(e,t){r.setState({returnDepartureRange:t})}),eN(r,"handleReturnArrival",function(e,t){r.setState({returnArrivalRange:t})}),eN(r,"applyIfDesktop",function(){r.props.applyhandler(r.state)}),eN(r,"valueTextForDeparture",function(e){if(48==(e/=30))return"23:59";var t=(e<20?"0":"")+Math.floor(e/2),r=e%2==0?"00":"30";return"".concat(t,":").concat(r)}),eN(r,"valueTextForArrival",function(e){var t=new Date(e);return"".concat(t.toUTCString().substring(0,3),", ").concat(t.toUTCString().substring(16,22))}),eN(r,"generateTimeSliderJSX",function(e,t,n,a,i,o,l){var c=r.props.classes,u=null;return u=0===e[0]&&0===e[1]?[n,a]:e,s.createElement(C.A,{container:!0,key:"1",style:"return"===l?{marginTop:10}:void 0},s.createElement(C.A,{container:!0,size:{xs:12}},s.createElement(C.A,{size:{xs:12}},s.createElement(k.A,{className:c.arrivaldeparture},"Departure from ",i)),s.createElement(C.A,{size:{xs:12}},s.createElement(k.A,{className:c.displaytime},r.valueTextForDeparture(t[0])," -"," ",r.valueTextForDeparture(t[1])))),s.createElement(C.A,{size:{xs:12}},s.createElement($.Ay,{value:t||"",onChange:"outbound"===l?r.handleOutboundDeparture:r.handleReturnDeparture,onChangeCommitted:r.applyIfDesktop,className:c.sliderpadding,style:{color:"#f05f40",padding:"8px 0px 4px 0px"},sx:{"& .MuiSlider-rail":{height:3},"& .MuiSlider-track":{height:3,border:"none"},"& .MuiSlider-thumb":{width:13,height:13}},min:0,max:1440,step:30})),s.createElement(C.A,{container:!0,size:{xs:12},style:{marginTop:6}},s.createElement(C.A,{size:{xs:12}},s.createElement(k.A,{className:c.arrivaldeparture},"Arrival at ",o)),s.createElement(C.A,{size:{xs:12}},s.createElement(k.A,{className:c.displaytime},r.valueTextForArrival(u[0])," -"," ",r.valueTextForArrival(u[1])))),s.createElement(C.A,{size:{xs:12}},s.createElement($.Ay,{value:u||null,onChange:"outbound"===l?r.handleOutboundArrival:r.handleReturnArrival,onChangeCommitted:r.applyIfDesktop,className:c.sliderpadding,style:{color:"#f05f40",padding:"8px 0px 4px 0px"},sx:{"& .MuiSlider-rail":{height:3},"& .MuiSlider-track":{height:3,border:"none"},"& .MuiSlider-thumb":{width:13,height:13}},min:n,max:a,step:18e5})))}),r.state={outboundDepartureRange:r.props.filterTimeRange.outboundDepartureRange,outboundArrivalRange:r.props.filterTimeRange.outboundArrivalRange,returnDepartureRange:r.props.filterTimeRange.returnDepartureRange,returnArrivalRange:r.props.filterTimeRange.returnArrivalRange},r}return eO(t,e),eT(t,[{key:"componentDidUpdate",value:function(e,t){e.filterTimeRange!==this.props.filterTimeRange&&this.setState({outboundDepartureRange:this.props.filterTimeRange.outboundDepartureRange,outboundArrivalRange:this.props.filterTimeRange.outboundArrivalRange,returnDepartureRange:this.props.filterTimeRange.returnDepartureRange,returnArrivalRange:this.props.filterTimeRange.returnArrivalRange})}},{key:"render",value:function(){return this.props.classes,s.createElement(s.Fragment,null,s.createElement(C.A,{container:!0,style:{padding:"10px 16px"}},this.generateTimeSliderJSX(this.state.outboundArrivalRange,this.state.outboundDepartureRange,this.props.arrivalTimeRanges.outboundArrivalMin,this.props.arrivalTimeRanges.outboundArrivalMax,this.props.originCity,this.props.destinationCity,"outbound"),"roundtrip"===this.props.tripType?this.generateTimeSliderJSX(this.state.returnArrivalRange,this.state.returnDepartureRange,this.props.arrivalTimeRanges.returnArrivalMin,this.props.arrivalTimeRanges.returnArrivalMax,this.props.destinationCity,this.props.originCity,"return"):null),s.createElement(P.A,null))}}])}(s.Component),t6=(0,d.A)(function(e){return{arrivaldeparture:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},drawerheader:{fontSize:"22px",margin:"0px 0px 10px 10px",fontWeight:"500"},displaytime:{color:"gray"}}})(t5),t3=(0,d.A)(function(e){return{drawerheader:{fontSize:"22px",margin:"0px 0px 10px 10px",fontWeight:"500"},displayprice:{color:"gray"}}})(function(e){e.classes;
1var t=e.minPrice,r=e.maxPrice,n=e.applyhandler,a=ej((0,s.useState)(e.priceRange||[0,1e4]),2),i=a[0],o=a[1],l=(0,u.A)(),c=tf(function(e){return e.currencyRates}),p=tf(function(e){return e.userCurrency});(0,s.useEffect)(function(){(e.priceRange!==i||e.minPrice!==t||e.maxPrice!==r)&&o(e.priceRange||[e.minPrice||0,e.maxPrice||1e4])},[e.priceRange,e.minPrice,e.maxPrice]);var d=function(e){var t=p?p.currencyName:"usd";return tm((p?p.currencySymbol:"$")+Math.floor((c.usd||1)*Number(e)/(c[t]||1)))};return s.createElement(s.Fragment,null,s.createElement("div",{style:{padding:"10px 16px"}},s.createElement(k.A,{style:{fontWeight:600,fontSize:15,color:l.palette.text.primary,marginBottom:6}},"Price Range"),s.createElement("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4}},s.createElement("div",{style:{padding:"4px 12px",borderRadius:16,backgroundColor:"dark"===l.palette.mode?"rgba(255,255,255,0.06)":"#f5f5f5"}},s.createElement(k.A,{style:{fontSize:13,fontWeight:500,color:l.palette.text.secondary,whiteSpace:"nowrap"}},d(i[0]))),s.createElement("div",{style:{width:12,height:1,backgroundColor:"dark"===l.palette.mode?"rgba(255,255,255,0.2)":"#ccc"}}),s.createElement("div",{style:{padding:"4px 12px",borderRadius:16,backgroundColor:"dark"===l.palette.mode?"rgba(255,255,255,0.06)":"#f5f5f5"}},s.createElement(k.A,{style:{fontSize:13,fontWeight:500,color:l.palette.text.secondary,whiteSpace:"nowrap"}},d(i[1])))),s.createElement("div",{style:{padding:"0 4px"}},s.createElement($.Ay,{value:i,onChange:function(e,t){o(t)},onChangeCommitted:function(){n(i)},style:{color:"#F05F40",padding:"10px 0px 6px 0px"},sx:{"& .MuiSlider-rail":{height:3},"& .MuiSlider-track":{height:3,border:"none"},"& .MuiSlider-thumb":{width:13,height:13}},min:t||0,max:r||1e4,step:10}))),s.createElement(P.A,null))}),t8=(0,d.A)(function(e){return{}})(function(e){var t=e.selectedStops,r=e.onChange;e.classes;var n=e.minPrices;e.onSelectOnly;var a=(0,u.A)(),i=function(e){r(e,!t[e])};return s.createElement(s.Fragment,null,s.createElement("div",{style:{padding:"10px 16px"}},s.createElement(k.A,{style:{fontWeight:600,fontSize:15,color:a.palette.text.primary,marginBottom:8}},"Stops"),s.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4}},[{label:"Direct",name:"direct"},{label:"1 Stop",name:"oneStop"},{label:"2+ Stops",name:"twoPlus"}].map(function(e){var r=t[e.name]||!1;return s.createElement("div",{key:e.name,onClick:function(){return i(e.name)},style:{display:"flex",flexDirection:"row",alignItems:"center",gap:12,padding:"6px 12px",borderRadius:12,cursor:"pointer",backgroundColor:r?"rgba(240, 95, 64, 0.06)":"transparent",border:r?"1px solid rgba(240, 95, 64, 0.25)":"1px solid transparent",transition:"all 0.2s ease"}},s.createElement("div",{style:{width:22,height:22,borderRadius:6,border:r?"2px solid #F05F40":"2px solid ".concat("dark"===a.palette.mode?"#555":"#ccc"),backgroundColor:r?"#F05F40":"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",flexShrink:0}},r&&s.createElement(J.A,{style:{color:"#fff",fontSize:16}})),s.createElement("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0}},s.createElement(k.A,{style:{fontSize:14,fontWeight:r?500:400,color:r?a.palette.text.primary:a.palette.text.secondary,transition:"all 0.2s ease"}},e.label)),n&&n[e.name].amount!==1/0&&s.createElement("div",{style:{padding:"3px 10px",borderRadius:16,backgroundColor:"dark"===a.palette.mode?"rgba(255,255,255,0.06)":"#f5f5f5",flexShrink:0}},s.createElement(k.A,{style:{fontSize:12,fontWeight:500,color:a.palette.text.secondary,whiteSpace:"nowrap"}},s.createElement(tG,{suppliedCurrency:n[e.name].currency,value:n[e.name].amount}))))}))),s.createElement(P.A,null))}),t9=void 0,t7=(0,d.A)({root:{color:"#808080","&$checked":{color:"#F05F40"},padding:"2px"},checked:{}})(function(e){return s.createElement(M.A,eR({color:"default"},e))}),re=function(e){var t=e.label,r=e.SortBy,n=e.fn;e.classes;var a=e.theme,i=r===t;return s.createElement("div",{onClick:function(e){e.stopPropagation(),n(t)},style:{cursor:"pointer",padding:"8px 14px",borderRadius:12,color:i?a.palette.text.primary:a.palette.text.secondary,backgroundColor:i?"rgba(240, 95, 64, 0.1)":"transparent",border:i?"1px solid rgba(240, 95, 64, 0.25)":"1px solid ".concat("dark"===a.palette.mode?"rgba(255,255,255,0.08)":"#eee"),textAlign:"left",width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",gap:8,transition:"all 0.2s ease"}},s.createElement(t7,{checked:i}),s.createElement(k.A,{style:{fontSize:14,fontWeight:i?500:400}},t))},rt=function(e){var t=e.airlinesListJSX,r=e.theme,n=ej(s.useState(!1),2),a=n[0],i=n[1];if(t.length<=6)return s.createElement("div",{style:{display:"flex",flexDirection:"column"}},t);var o=a?t:t.slice(0,6),l=t.length-6;return s.createElement("div",{style:{display:"flex",flexDirection:"column"}},o,s.createElement("div",{onClick:function(e){e.stopPropagation(),i(!a)},style:{cursor:"pointer",padding:"8px 0",marginTop:4,display:"flex",justifyContent:"center",alignItems:"center",color:"#F05F40",transition:"all 0.2s ease",userSelect:"none",borderRadius:8,backgroundColor:(r.palette.mode,"rgba(240, 95, 64, 0.05)")}},s.createElement(k.A,{style:{fontSize:13,fontWeight:500}},a?"Show less":"Show ".concat(l," more airlines"))))},rr=function(e,t,r,n,a,i,o,l,c,u,p,d,m,g,h,f,y,x,v,b,S,E,w,A,D,T,N,R){var F=R.classes,M=R.theme,I=[];void 0!==T&&void 0!==N&&I.push(s.createElement("div",{style:{padding:"16px 16px 0 16px",display:"flex",alignItems:"center",gap:8}},s.createElement("div",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 12px",borderRadius:20,backgroundColor:"rgba(240, 95, 64, 0.08)",border:"1px solid rgba(240, 95, 64, 0.15)"}},s.createElement(k.A,{variant:"body2",style:{fontWeight:600,fontSize:13,color:"#F05F40"}},T),s.createElement(k.A,{variant:"body2",style:{fontWeight:400,fontSize:13,color:M.palette.text.secondary}},"of ",N," flights"))));var W=function(){var e=document.getElementById("filterDivRef");e&&e.scrollIntoView({behavior:"smooth"})};I.push(s.createElement(s.Fragment,null,s.createElement("div",{style:{padding:"16px 16px 12px 16px"}},s.createElement(k.A,{style:{fontWeight:600,fontSize:15,color:M.palette.text.primary,marginBottom:12}},"Sort By"),s.createElement("div",{style:{display:"flex",flexDirection:"row",gap:8,flexWrap:"wrap"}},s.createElement(re,{label:"Price",SortBy:e,fn:h,theme:M,classes:F}),s.createElement(re,{label:"Fastest",SortBy:e,fn:h,theme:M,classes:F}))),s.createElement(P.A,null)));I.push(s.createElement(s.Fragment,null,s.createElement("div",{style:{padding:"16px 16px 8px 16px",display:"flex",alignItems:"center",gap:8},id:"filterDivRef"},s.createElement("div",{style:{width:3,height:20,borderRadius:2,backgroundColor:"#F05F40"}}),s.createElement(k.A,{style:{fontSize:17,fontWeight:700,color:M.palette.text.primary,letterSpacing:"0.3px"}},"Filters"))));var L={direct:{amount:1/0,currency:"usd"},oneStop:{amount:1/0,currency:"usd"},twoPlus:{amount:1/0,currency:"usd"}};
1(R.tickets?Object.values(R.tickets):[]).forEach(function(e){var t=e.bestPriceOriginal?e.bestPriceOriginal.amount:e.minprice,r=e.bestPriceOriginal?e.bestPriceOriginal.currency:"usd",n=e.outboundinfo.route.length,a=e.returninfo.route.length,i=Math.max(n-1,a>0?a-1:0);0===i?t<L.direct.amount&&(L.direct={amount:t,currency:r}):1===i?t<L.oneStop.amount&&(L.oneStop={amount:t,currency:r}):i>=2&&t<L.twoPlus.amount&&(L.twoPlus={amount:t,currency:r})}),I.push(s.createElement(t8,{selectedStops:t,onChange:f,onSelectOnly:y,minPrices:L}));I.push(s.createElement(t3,{priceRange:E,minPrice:w,maxPrice:A,applyhandler:D}));I.push(s.createElement(t6,{filterTimeRange:r,applyhandler:n,originCity:a,destinationCity:i,tripType:o,openDrawer:l.bind(t9),arrivalTimeRanges:c}));for(var z=null,j=s.createElement("div",{style:{margin:"10px 0px"}},s.createElement(k.A,{color:"text.secondary"}," Origin Airports")),B=Object.keys(u.outboundOrigin),H=[],_=0;_<B.length;++_)H.push(s.createElement(C.A,{container:!0,direction:"row",key:Math.random()},s.createElement(C.A,{size:{xs:2}},s.createElement("div",{onClick:function(e){return e.stopPropagation()}},s.createElement(O.A,{icon:s.createElement("span",{style:{height:"30px",width:"25px",padding:"9px 0px 0px 0px"}}),color:"primary",style:{padding:"9px 9px 9px 0px"},checkedIcon:s.createElement(J.A,null),checked:u.outboundOrigin[B[_]],onChange:p.bind(t9,B[_],"outboundOrigin")}))),s.createElement(C.A,{size:{xs:10}},s.createElement(C.A,null,s.createElement(k.A,{style:{marginTop:5}},S[B[_]].city," |"," ",B[_])),s.createElement(C.A,null,s.createElement(k.A,{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},S[B[_]].name)))));for(var X=s.createElement("div",{style:{margin:"10px 0px"}},s.createElement(k.A,{color:"text.secondary"}," Destination Airports")),U=Object.keys(u.outboundDestination),q=[],Y=0;Y<U.length;++Y)q.push(s.createElement(C.A,{container:!0,direction:"row",key:Math.random()},s.createElement(C.A,{size:{xs:2}},s.createElement("div",{onClick:function(e){return e.stopPropagation()}},s.createElement(O.A,{icon:s.createElement("span",{style:{height:"30px",width:"25px",padding:"9px 0px 0px 0px"}}),color:"primary",style:{padding:"9px 9px 9px 0px"},checkedIcon:s.createElement(J.A,null),checked:u.outboundDestination[U[Y]],onChange:p.bind(t9,U[Y],"outboundDestination")}))),s.createElement(C.A,{size:{xs:10}},s.createElement(C.A,null,s.createElement(k.A,{style:{marginTop:5}},S[U[Y]].city," |"," ",U[Y])),s.createElement(C.A,null,s.createElement(k.A,{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},S[U[Y]].name)))));var G=null,$=[],Q=null,V=[];if(!1===u.applyToReturn){G=s.createElement(C.A,{container:!0,style:{padding:"16px"},size:{xs:!0}},s.createElement(k.A,{color:"text.secondary"}," Origin Airports (Return)"));for(var K=Object.keys(u.returnOrigin),Z=0;Z<K.length;++Z)$.push(s.createElement(C.A,{container:!0,direction:"row",key:Math.random()},s.createElement(C.A,{size:{xs:2}},s.createElement("div",{onClick:function(e){return e.stopPropagation()}},s.createElement(O.A,{icon:s.createElement("span",{style:{height:"30px",width:"25px",padding:"9px 0px 0px 0px"}}),style:{padding:"9px 9px 9px 0px"},color:"primary",checkedIcon:s.createElement(J.A,null),checked:u.returnOrigin[K[Z]],onChange:p.bind(t9,K[Z],"returnOrigin")}))),s.createElement(C.A,{size:{xs:10}},s.createElement(C.A,null,s.createElement(k.A,{style:{marginTop:5}},S[K[Z]].city," | ",K[Z])),s.createElement(C.A,null,s.createElement(k.A,{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},S[K[Z]].name)))));Q=s.createElement(C.A,{container:!0,style:{padding:"16px"},size:{xs:!0}},s.createElement(k.A,{color:"text.secondary"}," ","Destination Airports (Return)"));for(var ee=Object.keys(u.returnDestination),et=0;et<ee.length;++et)V.push(s.createElement(C.A,{container:!0,direction:"row",key:Math.random()},s.createElement(C.A,{size:{xs:2}},s.createElement("div",{onClick:function(e){return e.stopPropagation()}},s.createElement(O.A,{icon:s.createElement("span",{style:{height:"30px",width:"25px",padding:"9px 0px 0px 0px"}}),style:{padding:"9px 9px 9px 0px"},color:"primary",checkedIcon:s.createElement(J.A,null),checked:u.returnDestination[ee[et]],onChange:p.bind(t9,ee[et],"returnDestination")}))),s.createElement(C.A,{size:{xs:10}},s.createElement(C.A,null,s.createElement(k.A,{style:{marginTop:5}},S[ee[et]].city," |"," ",ee[et])),s.createElement(C.A,null,s.createElement(k.A,{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},S[ee[et]].name)))))}var er=[];"roundtrip"===o&&!1===u.applyToReturn&&(er.push(G),er.push($),er.push(Q),er.push(V)),er.push(j),er.push(H),er.push(X),er.push(q),I.push(s.createElement(s.Fragment,null,s.createElement(C.A,{container:!0,direction:"column",style:{padding:16}},er),s.createElement(P.A,null)));var en=[],ea=Object.keys(d);ea.sort(function(e,t){return b[e]<b[t]?-1:+(b[e]>b[t])});for(var ei=!0,eo=!1,el=0,es=function(e){var t=d[ea[e]];en.push(s.createElement("div",{key:Math.random(),onClick:function(t){t.stopPropagation(),m.call(t9,ea[e])},style:{display:"flex",flexDirection:"row",alignItems:"center",gap:12,padding:"10px 12px",marginBottom:6,borderRadius:12,cursor:"pointer",backgroundColor:t?"rgba(240, 95, 64, 0.06)":"transparent",border:t?"1px solid rgba(240, 95, 64, 0.25)":"1px solid transparent",transition:"all 0.2s ease"}},s.createElement("div",{style:{width:22,height:22,borderRadius:6,border:t?"2px solid #F05F40":"2px solid ".concat("dark"===M.palette.mode?"#555":"#ccc"),backgroundColor:t?"#F05F40":"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",flexShrink:0}},t&&s.createElement(J.A,{style:{color:"#fff",fontSize:16}}
1)),s.createElement("div",{style:{width:36,height:36,borderRadius:8,backgroundColor:"dark"===M.palette.mode?"rgba(255,255,255,0.08)":"#f5f5f5",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden"}},s.createElement("img",{style:{height:24,width:24,objectFit:"contain"},src:tP(ea[e]),alt:""})),s.createElement(k.A,{style:{fontSize:14,fontWeight:t?500:400,color:t?M.palette.text.primary:M.palette.text.secondary,transition:"all 0.2s ease",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},b[ea[e]]))),!1===d[ea[e]]&&(ei=!1,el++)},ec=0;ec<ea.length;++ec)es(ec);el===ea.length&&(eo=!0);var eu=ea.length-el,ep=s.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:8,marginBottom:12}},s.createElement("div",{onClick:function(e){e.stopPropagation(),g.call(t9,ei)},style:{cursor:"pointer",padding:"6px 16px",borderRadius:20,fontSize:13,fontWeight:500,color:ei?"#F05F40":"#fff",backgroundColor:ei?"rgba(240, 95, 64, 0.1)":"#F05F40",border:"1px solid rgba(240, 95, 64, 0.3)",transition:"all 0.2s ease",userSelect:"none",whiteSpace:"nowrap",flexShrink:0}},s.createElement(k.A,{style:{fontSize:13,fontWeight:500}},ei?"Deselect All":"Select All")),s.createElement("div",{onClick:function(e){e.stopPropagation(),g.call(t9,!eo)},style:{cursor:"pointer",padding:"6px 16px",borderRadius:20,fontSize:13,fontWeight:500,color:M.palette.text.secondary,backgroundColor:"dark"===M.palette.mode?"rgba(255,255,255,0.06)":"#f5f5f5",border:"1px solid ".concat("dark"===M.palette.mode?"rgba(255,255,255,0.1)":"#e0e0e0"),transition:"all 0.2s ease",userSelect:"none",whiteSpace:"nowrap",flexShrink:0}},s.createElement(k.A,{style:{fontSize:13,fontWeight:500}},"Clear")));return I.push(s.createElement("div",{style:{padding:"16px"}},s.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:14}},s.createElement(k.A,{style:{fontWeight:600,fontSize:15,color:M.palette.text.primary}},"Airlines"),s.createElement(k.A,{style:{fontSize:12,fontWeight:500,color:M.palette.text.secondary,whiteSpace:"nowrap"}},eu," of ",ea.length," selected")),ep,s.createElement(rt,{airlinesListJSX:en,theme:M}))),I.push(window.innerWidth<600?s.createElement("div",null):s.createElement(k.A,{className:F.scrollto,style:{fontSize:"12px",margin:"0px 16px",cursor:"pointer"},onClick:function(){return W()}},"Scroll to Top")),I};(0,d.A)(function(e){return{scrollto:{color:e.palette.primary.main}}},{withTheme:!0})(rr);var rn=function(e){function t(){var e;eD(this,t);for(var r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];return eN(e=ek(this,t,[].concat(n)),"getFilteredFlights",function(){var t=Object.values(e.props.tickets);if(0===t.length)return[];var r=e.props.nearbyAirports,n=[],a=[],i=[],o=[];for(var l in r.outboundOrigin)!1===r.outboundOrigin[l]&&(n[l]=1);for(var s in r.outboundDestination)!1===r.outboundDestination[s]&&(a[s]=1);if("roundtrip"===e.props.tripType)if(!1===r.applyToReturn){for(var c in r.returnOrigin)!1===r.returnOrigin[c]&&(i[c]=1);for(var u in r.returnDestination)!1===r.returnDestination[u]&&(o[u]=1)}else i=a,o=n;var p=e.props.airlines,d={};for(var m in p)!1===p[m]&&(d[m]=1);for(var g=[],h=1,f=1,y=1,x=1,v=0;v<t.length;++v){h=1,f=1,y=1,h=tT(t[v],e.props.selectedStops),f=tN(t[v],n,a,i,o,e.props.tripType),y=tR(t[v],d,e.props.tripType),b=t[v],C=e.props.filterTimeRange,S=e.props.tripType,x=b.outboundinfo.departureminuteofday<C.outboundDepartureRange[0]||b.outboundinfo.departureminuteofday>C.outboundDepartureRange[1]||0!==C.outboundArrivalRange[0]&&(b.outboundinfo.arrivaltime<C.outboundArrivalRange[0]||b.outboundinfo.arrivaltime>C.outboundArrivalRange[1])||"roundtrip"===S&&(b.returninfo.departureminuteofday<C.returnDepartureRange[0]||b.returninfo.departureminuteofday>C.returnDepartureRange[1]||0!==C.returnArrivalRange[0]&&(b.returninfo.arrivaltime<C.returnArrivalRange[0]||b.returninfo.arrivaltime>C.returnArrivalRange[1]))?0:1;var b,C,S,E,w,A,k=(E=t[v],w=e.props.priceRange[0],A=e.props.priceRange[1],E.minprice<w||E.minprice>A?0:1);h&&f&&y&&x&&k&&g.push(t[v])}return g}),eN(e,"returnJSX",function(){var t=e.props.classes,r=e.getFilteredFlights();if(0===r.length)return null;tD(r,e.props.flightSortBy);var n=[];if(r.length>0){var a=0;a=r.length<e.props.noOfItemsToDisplay?r.length:e.props.noOfItemsToDisplay;for(var i=0;i<a;++i){var o=s.createElement(t4,{ticket:r[i],key:i,searchID:e.props.searchID,airlinesInfo:e.props.airlinesInfo,airportsInfo:e.props.airportsInfo});n.push(o)}var l=null;l=e.props.totalcount>e.props.noOfItemsToDisplay&&n&&n.length>0&&n.length>=e.props.noOfItemsToDisplay&&s.createElement("div",{style:{padding:"0px 10px 10px 10px"}},s.createElement(N.A,{variant:"contained",disabled:!e.props.loadMoreDataVisible,className:t.buttonLoadMore,onClick:e.props.loadMoreData},"Load More Flights")),n.push(l)}return n}),eN(e,"resetFilters",function(){}),e}
1return eO(t,e),eT(t,[{key:"componentDidUpdate",value:function(e,t){var r=window.innerWidth<600;(e.sidebarLeftPosition!==this.props.sidebarLeftPosition||e.sidebarTopPosition!==this.props.sidebarTopPosition)&&this.props.sidebarLeftPosition&&(0===this.props.arrivalTimeRanges.outboundArrivalMax||"roundtrip"===this.props.tripType&&0===this.props.arrivalTimeRanges.returnArrivalMax?h.useHDStore.getState().setSecondaryMenu(""):h.useHDStore.getState().setSecondaryMenu({preventAutoClose:!0,menu:s.createElement("div",{style:{overflowX:"hidden"}},rr(this.props.flightSortBy,this.props.selectedStops,this.props.filterTimeRange,this.props.applyTimeRangeFilter,this.props.originCity,this.props.destinationCity,this.props.tripType,this.props.openDrawer,this.props.arrivalTimeRanges,this.props.nearbyAirports,this.props.applyAirportFilter,this.props.airlines,this.props.applyAirlinesFilter,this.props.selectAllAirlines,this.props.sortOnChange,this.props.stopOnChange,this.props.stopOnSelectOnly,this.props.originAirportCode,this.props.destinationAirportCode,this.props.airlinesInfo,this.props.airportsInfo,this.props.priceRange,this.props.minPrice,this.props.maxPrice,this.props.applyPriceFilter,this.getFilteredFlights().length,Object.values(this.props.tickets).length,this.props))})),(e.flightSortBy!==this.props.flightSortBy||e.selectedStops!==this.props.selectedStops||e.filterTimeRange!==this.props.filterTimeRange||e.tripType!==this.props.tripType||e.openDrawer!==this.props.openDrawer||JSON.stringify(e.arrivalTimeRanges)!==JSON.stringify(this.props.arrivalTimeRanges)||JSON.stringify(e.nearbyAirports)!==JSON.stringify(this.props.nearbyAirports)||JSON.stringify(e.airlines)!==JSON.stringify(this.props.airlines)||JSON.stringify(e.tickets)!==JSON.stringify(this.props.tickets)||JSON.stringify(e.airlinesInfo)!==JSON.stringify(this.props.airlinesInfo)||JSON.stringify(e.airportsInfo)!==JSON.stringify(this.props.airportsInfo))&&(this.props.isLoading&&0===Object.values(this.props.tickets).length?h.useHDStore.getState().setSecondaryMenu(""):this.props.arrivalTimeRanges&&this.props.tickets&&Object.values(this.props.tickets).length>0&&(r||this.props.sidebarLeftPosition)&&(0===this.props.arrivalTimeRanges.outboundArrivalMax||"roundtrip"===this.props.tripType&&0===this.props.arrivalTimeRanges.returnArrivalMax?h.useHDStore.getState().setSecondaryMenu(""):h.useHDStore.getState().setSecondaryMenu({preventAutoClose:!0,menu:s.createElement("div",{style:{overflowX:"hidden"}},rr(this.props.flightSortBy,this.props.selectedStops,this.props.filterTimeRange,this.props.applyTimeRangeFilter,this.props.originCity,this.props.destinationCity,this.props.tripType,this.props.openDrawer,this.props.arrivalTimeRanges,this.props.nearbyAirports,this.props.applyAirportFilter,this.props.airlines,this.props.applyAirlinesFilter,this.props.selectAllAirlines,this.props.sortOnChange,this.props.stopOnChange,this.props.stopOnSelectOnly,this.props.originAirportCode,this.props.destinationAirportCode,this.props.airlinesInfo,this.props.airportsInfo,this.props.priceRange,this.props.minPrice,this.props.maxPrice,this.props.applyPriceFilter,this.getFilteredFlights().length,Object.values(this.props.tickets).length,this.props))})))}},{key:"render",value:function(){var e=this,t=this.props,r=t.classes,n=t.tickets,a=this.returnJSX(),i=Object.values(n);return window.innerWidth,s.createElement("div",{className:r.root,style:{width:"100%",display:"flex",flexDirection:"column"}},this.props.isLoading&&i.length>0?s.createElement(F.A,{variant:"indeterminate",color:"primary",className:r.progressbar}):null,a&&0===a.length?s.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",margin:"auto"}},s.createElement(k.A,{className:r.loaderText},"No flights available for the selected filters!"),s.createElement(k.A,{onClick:function(){return e.resetFilters()}},"Total ",s.createElement("span",null,i.length)," results")):s.createElement(s.Fragment,null,s.createElement("div",{className:r.paperData},a)))}}])}(h.HDComponent),ra=(0,d.A)(function(e){return{root:{display:"flex",flexDirection:"column"},paperNoData:{overflow:"hidden",height:"100px",textAlign:"center",position:"relative",width:"100%",top:"56px"},paperData:{width:"100%"},fabButtonSm:eN({zIndex:"5",position:"fixed",bottom:66,right:10,opacity:1,width:"48px",height:"48px"},e.breakpoints.up("md"),{display:"none"}),fabButtonMd:eN({zIndex:"5",position:"fixed",bottom:66,right:10,opacity:1,width:"48px",height:"48px"},e.breakpoints.down("sm"),{display:"none"}),plus:{margin:"0 auto",fontSize:"1.3rem",display:"inherit"},drawerPaper:{position:"absolute",top:"0px",width:"220px",overflowX:"hidden",zIndex:100,height:"auto"},drawerPaperXs:{width:"60%"},drawerRootXs:eN({},e.breakpoints.up("md"),{display:"none"}),drawer:{flexShrink:0,whiteSpace:"nowrap"},drawerOpen:{right:"230px",margin:"1px"}
1,drawerClose:{overflowX:"hidden",width:0},toolbar:{display:"block",alignItems:"center",justifyContent:"flex-end",padding:"0 16px"},buttonLoadMore:{background:e.palette.primary.main,display:"flex",color:e.palette.primary.contrastText,width:"100%",margin:"auto",maxWidth:"720px","&:hover":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText}}}},{withTheme:!0})(rn),ri={maxHeight:"500px",marginBottom:"25px",backgroundColor:"rgba(240, 95, 64, 0.15)",display:"flex",flexDirection:"column",padding:"10px 20px"},ro={fontWeight:600,marginBottom:4,width:"100%"},rl={display:"flex",flexDirection:"row",width:"100%",maxWidth:350,gap:10},rs={display:"flex",flexDirection:"row",gap:"15px",justifyContent:"center",position:"relative",width:"100%",maxWidth:350},rc={width:"100%",maxWidth:350},ru={display:"flex",flexDirection:"row",gap:8},rp={border:"1px solid lightgray",height:40,borderRadius:12,width:"100%",display:"flex",alignItems:"center"},rd={textAlign:"center",borderRadius:"7px",boxShadow:"0px 0px 5px lightgray",position:"absolute",top:"6px",backgroundColor:"#F05F40"},rm={maxWidth:180},rg={display:"flex",flexWrap:"wrap",width:"100%",gap:12},rh={display:"flex",gap:10,flexWrap:"nowrap"},rf={backgroundColor:"#F05F40",width:"130px",borderRadius:12,height:"30px",marginTop:"30px",merginLeft:"0px",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:15,padding:"2px 2px",cursor:"pointer"};function ry(e){var t=e.classes;e.baseURL;var r=e.originCity,n=e.originAirportCode,a=e.destinationCity,i=e.destinationAirportCode,o=e.departureDate,l=e.returnDate,c=e.tripType,u=e.adultsCount,p=e.childrenCount,g=e.infantsCount,h=e.travelClass,C=e.history,A=(0,d.A)({root:{color:"#989898","&$checked":{color:"#F05F40"}},checked:{}})(function(e){return s.createElement(M.A,eR({color:"default",size:"small"},e))}),D=function(e){return e.length<9?e:e.slice(0,9)+"..."},N=function(){var t=(0,m.A)(function(e){return{textColor:{color:e.palette.text.primary}}})();return s.createElement("div",{style:rc},s.createElement("div",{style:rl},s.createElement(k.A,{style:eI(eI({},ro),{},{width:"100%"}),className:t.textColor},"From"),s.createElement(k.A,{style:eI(eI({},ro),{},{paddingLeft:16,width:"100%"}),className:t.textColor},"To")),s.createElement("div",{style:rs},s.createElement("div",{id:"from",style:rp,onClick:function(){e.toggleSearchScreen("from")}},s.createElement(k.A,{style:{display:"inline",paddingLeft:15},className:t.textColor},e.originCity?"".concat(D(e.originCity)):"From Where?"," ",e.originAirportCode&&"(".concat(e.originAirportCode,")"))),s.createElement("div",{style:rd},s.createElement(z.A,{"aria-label":"Swap origin and destination",onClick:function(){return e.toggleOriginDestinationCities()},style:{color:"white",margin:"0px",padding:"4px",transform:"rotate(90deg)"}},s.createElement(W.A,{fontSize:"small",style:{color:"white"}}))),s.createElement("div",{id:"to",style:rp,onClick:function(){e.toggleSearchScreen("to")}},s.createElement(k.A,{style:{display:"inline",paddingLeft:15},className:t.textColor},e.destinationCity?"".concat(D(e.destinationCity)):"To Where?"," ",e.destinationAirportCode&&"(".concat(e.destinationAirportCode,")")))))},R=function(){var t=(0,m.A)(function(e){return{textColor:{color:e.palette.text.primary}}})(),r=ej(s.useState(null),2),n=r[0],a=r[1],i=ej(s.useState(null),2),o=i[0],l=i[1],c=new Date(new Date().setFullYear(new Date().getFullYear()+1)),u=e.departureDate instanceof Date&&!isNaN(e.departureDate)?e.departureDate:null,p=e.returnDate instanceof Date&&!isNaN(e.returnDate)?e.returnDate:null,d=function(e,r,n){return s.createElement("div",{style:eI(eI({},rp),{},{cursor:"pointer",paddingLeft:12,gap:8}),onClick:n},s.createElement(f.A,{style:{color:r?"#F05F40":"#989898",fontSize:20}}),s.createElement(k.A,{className:r?t.textColor:void 0,style:eI({fontSize:13,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},r?{}:{color:"#989898"})},r?tu(r,"dd MMM yyyy"):e))};return s.createElement("div",{style:rh},s.createElement("div",{style:eI(eI({},rm),{},{flex:1})},s.createElement(k.A,{style:ro,className:t.textColor},"Departure"),d("Departure",u,function(e){return a(e.currentTarget)})),s.createElement("div",{style:eI(eI({},rm),{},{flex:1})},s.createElement(k.A,{style:ro,className:t.textColor},"Return"),d("Return",p,function(e){return l(e.currentTarget)})),s.createElement(x.$J,{dateAdapter:b.h},s.createElement(y.Ay,{open:!!n,anchorEl:n,onClose:function(){return a(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},s.createElement(v.x,{value:u,disablePast:!0,maxDate:c,onChange:function(t){e.setDepartureDate(t),a(null)}}
1)),s.createElement(y.Ay,{open:!!o,anchorEl:o,onClose:function(){return l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},s.createElement(v.x,{value:p,disablePast:!0,minDate:u||void 0,maxDate:c,onChange:function(t){e.setReturnDate(t),l(null)}}))))},P=function(){var t=(0,m.A)(function(e){return{textColor:{color:e.palette.text.primary}}})();return s.createElement("div",null,s.createElement("div",{style:rl},s.createElement(k.A,{className:t.textColor,style:eI(eI({},ro),{},{minWidth:"130px"})},"Travellers"),s.createElement(k.A,{style:ro,className:t.textColor},"Class")),s.createElement("div",{style:ru},s.createElement(tF,{handler:e.applyTravellers,adultsCount:e.adultsCount,childrenCount:e.childrenCount,infantsCount:e.infantsCount,isHomepage:e.isHomepage}),s.createElement(tI,{selected:e.travelClass,handler:e.changeTravelClass,isHomepage:e.isHomepage})))},O=function(){var t=null===e.departureDate||""===e.originCity||""===e.originAirportCode||""===e.destinationCity||""===e.destinationAirportCode||e.originAirportCode===e.destinationAirportCode||e.tripType===e.trips[1]&&(null===e.returnDate||e.returnDate<e.departureDate),d=function(){if(!t){var e="flightbooking?"+"flightType=".concat(c,"&")+"fromCity=".concat(r,"&")+"fromAirportCode=".concat(n,"&")+"toCity=".concat(a,"&")+"toAirportCode=".concat(i,"&")+"adultsCount=".concat(u,"&")+"childrenCount=".concat(p,"&")+"infantsCount=".concat(g,"&")+"travelClass=".concat(h,"&")+"departureDate=".concat(encodeURIComponent(o),"&")+"returnDate=".concat(encodeURIComponent(l));console.log("detailedurl",e),C.push(e)}};return s.createElement("div",{style:t?eI(eI({},rf),{},{backgroundColor:"lightgray"}):rf,onClick:function(){return d()}},s.createElement(k.A,null,"Update Search"))};return s.createElement("div",{className:t.root},s.createElement(T.A,{style:ri},s.createElement(function(){var t=(0,m.A)(function(e){return{textColor:{color:e.palette.text.primary}}})();return s.createElement("div",null,s.createElement(S.A,{component:"fieldset"},s.createElement(E.A,{row:!0,"aria-label":"trip",name:"trip",style:{marginLeft:"0px",marginBottom:"10px"},value:e.tripType,onChange:function(){return e.toggleTripType()}},s.createElement(w.A,{value:"oneway",control:s.createElement(A,null),label:"One-way",style:{padding:"0px 10px 0px 0px",borderRadius:"20px",height:"30px",backgroundColor:"transparent"},className:t.textColor}),s.createElement(w.A,{value:"roundtrip",control:s.createElement(A,null),label:"Return",style:{padding:"0px 10px 0px 0px",borderRadius:"20px",height:"30px",backgroundColor:"transparent"},className:t.textColor}))))},null),s.createElement(function(){return s.createElement("div",{style:rg},s.createElement(N,null),s.createElement(R,null),s.createElement(P,{isHomepage:!0}),s.createElement(O,null))},null)))}var rx={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:10,padding:"40px 20px 60px",margin:"auto",maxWidth:420},rv={width:72,height:72,borderRadius:"50%",backgroundColor:"rgba(240, 95, 64, 0.15)",display:"flex",alignItems:"center",justifyContent:"center"},rb={fontSize:36,color:"#F05F40"},rC={fontSize:"1.15rem",fontWeight:600},rS={fontSize:"0.9rem",lineHeight:1.5};function rE(){return s.createElement("div",{style:rx},s.createElement("div",{style:rv},s.createElement(Q.A,{style:rb})),s.createElement(k.A,{color:"text.primary",style:rC},"No flights found for this search"),s.createElement(k.A,{color:"text.secondary",style:rS},"We couldn't find any flights for the selected route and dates. Please check your travel dates and try again."))}function rw(e){var t=e.classes,r=ej((0,s.useState)(0),2),n=r[0],a=r[1],i=Object.values(e.tickets),o=window.innerWidth<600;return s.createElement("div",{style:o?tL.rootPaperMobile:tL.rootPaper},e.expandSearchPanel?s.createElement(ry,e):null,e.isLoading&&0===i.length?s.createElement(function(){return s.createElement(A.A,{className:t.secondLoader},s.createElement(k.A,{className:t.loaderText},"We are working on getting the best results for you..."),s.createElement(R.A,{size:50,style:{color:"orangered",margin:"auto"}}))},null):null,s.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:o?"center":"left",paddingLeft:o?0:"0px"}},s.createElement(ra,eR({},e,{sidebarLeftPosition:n,sidebarTopPosition:100*!!e.expandSearchPanel})),!o&&i.length>0?s.createElement(function(){var e=(0,s.useRef)(null);return(0,s.useEffect)(function(){var t=function(){e.current&&a(e.current.getBoundingClientRect().left)};return t(),window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}},[]),s.createElement("div",{ref:e,style:{border:"0px solid black",width:"0%",height:"400px"}})},null):null),!1===e.isLoading&&0===i.length&&(e.searchError||""!==e.searchsignature)?s.createElement(rE,null):null)}function rA(e){var t=new URLSearchParams(window.location.search),r=t.get("fromCity"),n=t.get("fromAirportCode"),a=t.get("toCity"),i=t.get("toAirportCode"),o=decodeURIComponent(t.get("departureDate")),l=decodeURIComponent(t.get("returnDate")),c=t.get("flightType"),u=Number(t.get("adultsCount")),p=Number(t.get("childrenCount")),d=Number(t.get("infantsCount")),m=t.get("travelClass");return console.log("departureDate",o,"returnDate",l),(0,s.useEffect)(function(){r&&a&&e.createbody(r,n,a,i,o,l,c,u,p,d,m)},[n,i,o,l,c,u,p,d,m]),s.createElement(rw,eR({},e,{isHomepage:!1}))}var rk=function(e){var t=[{name:"Flights",icon:s.createElement(V.A,null)},{name:"Hotels",icon:s.createElement(K.A,null)}
1],r=e.history,n=(0,u.A)(),a=ej((0,s.useState)("Flights"),2),i=a[0];a[1];var o={container:{width:"100%",maxWidth:"800px",margin:"0 auto",padding:"2px",fontFamily:"Inter, Arial, sans-serif",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},tabGrid:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"16px",padding:"20px",marginBottom:"24px",justifyItems:"center"},tabButton:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"16px 25px",borderRadius:"16px",border:"none",backgroundColor:n.palette.background.paper,boxShadow:n.shadows[1],cursor:"pointer",transition:"all 0.3s ease",fontSize:"12px",fontWeight:"600",color:n.palette.text.secondary,minWidth:"30px"},tabButtonActive:{backgroundColor:n.palette.primary.main,color:n.palette.primary.contrastText,boxShadow:"0 10px 20px ".concat((0,c.X4)(n.palette.primary.main,.4))},tabIcon:{fontSize:"32px",marginBottom:"8px"},searchCard:{backgroundColor:n.palette.background.paper,boxShadow:n.shadows[2]},contentPlaceholder:{textAlign:"center",color:n.palette.text.secondary}},l=function(e){var t=e.name,r=e.icon,n=e.active,a=e.onClick,i=eI(eI({},o.tabButton),n?o.tabButtonActive:{});return s.createElement("div",null,s.createElement("button",{style:i,onClick:function(){return a(t)}},s.createElement("div",{style:o.tabIcon},r),s.createElement("div",null,t)))};return s.createElement("div",{style:o.container},s.createElement("div",{style:o.tabGrid},t.map(function(e){return s.createElement(l,{key:e.name,name:e.name,icon:e.icon,active:e.name===i,onClick:function(){"Hotels"==e.name&&r.push("/hotel/app")}})})),"Flights"===i?s.createElement(tW,eR({},e,{isHomePage:!0})):s.createElement("div",{style:o.contentPlaceholder},s.createElement("p",null,i," search coming soon!")))},rD=(0,d.A)(function(e){return{rootPaper:eN(eN(eN({},e.breakpoints.up("md"),{borderRadius:"0px"}),"width","100%"),e.breakpoints.up("md"),{margin:h.componentMargin}),rootPaperQuickPanel:{width:"auto",maxHeight:"500px",marginBottom:"25px"},secondLoader:{width:"100%",minHeight:"300px",display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center"},loaderPaper:{margin:"auto",marginTop:5},loaderText:{margin:"auto",marginBottom:10,fontSize:"1.2rem",color:"gray",textAlign:"center"},summaryDiv:{top:0,position:"sticky",zIndex:"100",margin:"4px"},progressbar:{position:"sticky",top:0,marginBottom:4},radioPadding:eN({textAlign:"center",display:"inline",margin:"0px 0px 12px 0px"},e.breakpoints.up("md"),{margin:"0px 0px 24px 0px"}),toggleRoot:{"&:nth-child(1)":{borderWidth:"1px 0px 1px 1px"},"&:last-child":{borderWidth:"1px 1px 1px 0px"}},checked:{color:"white!important",backgroundColor:"".concat(e.palette.primary.main,"!important")},divCity:{border:"1px solid grey",padding:"8px 10px",borderRadius:"4px",margin:"8px 0px",display:"flex"},iconColor:{color:"gray"},marginNormal:{marginTop:0},toolbarComponent:{padding:"10px",width:"200px",textAlign:"center",margin:"0 auto"},searchFlightButton:{position:"relative",top:"20px",margin:"0 auto"},collapseIcon:{border:"1px solid ".concat(e.palette.grey[700]),borderRadius:"20px",position:"relative",right:"20px",bottom:"15px"},divSeeMore:{display:"flex",cursor:"pointer",alignItems:"center",marginTop:"5px"},buttonLoadMore:{background:e.palette.primary.main,display:"flex",color:e.palette.primary.contrastText,width:"100%",maxWidth:"720px","&:hover":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText}}}},{withTheme:!0})(function(e){var t=!!new URLSearchParams(window.location.search).get("flightType");return s.createElement(s.Fragment,null,e.quickPanel?s.createElement(tW,eR({},e,{isHomepage:!0})):t?s.createElement(rA,e):s.createElement(rk,eR({},e,{isHomepage:!1})))}),rT=(0,d.A)(function(e){return{iconColor:e.palette.primary.main,textColor:e.palette.text.primary}})(function(e){var t=e.classes,r=e.expandSearchPanel;e.theme;var n=window.innerWidth>599&&window.innerWidth<961,a=window.innerWidth<400,i=null,o=Number(e.adultsCount)+Number(e.childrenCount)+Number(e.infantsCount);i=o,1===o?i+=" Traveller ":i+=" Travellers ";var l=e.departureDate.toDateString().slice(0,3)+", "+e.departureDate.toDateString().slice(4,10)+" ",c="";e.tripType===e.trips[1]&&(c=" - "+e.returnDate.toDateString().slice(0,3)+", "+e.returnDate.toDateString().slice(4,10)+" ");var u=function(){e.editMode(!r)};return s.createElement(s.Fragment,null,n?s.createElement("div",{style:{width:"90%",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"}},s.createElement(k.A,{style:{fontSize:16,textAlign:"center",fontWeight:600},color:"text.secondary"},"Edit"),s.createElement(z.A,{style:{color:t.iconColor},onClick:function(){return u()}},s.createElement(Z.A,null))):s.createElement("div",{style:{width:a?"80%":"90%",position:"relative"}}
1,s.createElement("div",null,s.createElement(k.A,{className:t.textColor,style:{fontWeight:500,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},e.originCity+" - "+e.destinationCity),s.createElement(k.A,{className:t.textColor,style:{fontSize:14,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},l+c+"| "+i+"| "+e.travelClass)),s.createElement(z.A,{style:{position:"absolute",right:a?-50:0,top:0,color:t.iconColor},onClick:function(){return u()}},s.createElement(Z.A,null))))}),rN={cursor:"pointer"},rR={opacity:.5,paddingRight:"4px"},rP={marginLeft:"56px"};function rO(e){var t=e.recentSearches,r=e.recentSearchSearchScreen;return s.createElement("div",null,t.map(function(e,t){return s.createElement(eu.Ay,{key:t,style:rN,onClick:function(){return r(e.origin.originCity,e.origin.originAirportCode,e.destination.destinationCity,e.destination.destinationAirportCode,new Date(e.dates.departureDate)<new Date?tk(3):new Date(e.dates.departureDate),null!==e.dates.returnDate?new Date(e.dates.returnDate)<new Date?tk(4):new Date(e.dates.returnDate):null,e.tripType,e.travellerCount.adults,e.travellerCount.children,e.travellerCount.infants,e.travelClass)}},s.createElement(ec.A,{primary:e.dates.returnDate?s.createElement("div",{style:{display:"flex"}},s.createElement(ed.A,{style:rR}),s.createElement("span",{style:{paddingRight:"4px"}},s.createElement(ep.A,{style:rR})),s.createElement("span",null," ",e.origin.originCity+", "+e.origin.originAirportCode+" - "+e.destination.destinationCity+", "+e.destination.destinationAirportCode)):s.createElement("div",{style:{display:"flex"}},s.createElement(ed.A,{style:rR}),s.createElement("span",{style:{paddingRight:"4px"}},s.createElement(em.A,{style:rR})),s.createElement("span",null," ",e.origin.originCity+", "+e.origin.originAirportCode+" - "+e.destination.destinationCity+", "+e.destination.destinationAirportCode)),secondary:e.dates.returnDate?e.dates.departureDate+" | "+e.dates.returnDate:e.dates.departureDate,style:rP}))}))}function rF(e){var t=e.list,r=e.fromToSuggestionHandler;return s.createElement("div",null,t.map(function(e,t){return s.createElement(s.Fragment,{key:t},s.createElement(eu.Ay,{style:{padding:"0px 16px"},key:t+50,onClick:function(){return r(e.primaryCityName,e.airportIATA)}},s.createElement(ec.A,{primary:s.createElement("span",null," ",e.primaryCityName||"",", ",e.countryName||null),secondary:e.primaryAirportName+" | "+e.airportIATA})),s.createElement(eu.Ay,{style:{color:"orangered"}},e.cityDeviation?s.createElement("div",null,s.createElement("span",{style:{}},"".concat(e.cityDeviation.toFixed(2),"km"))," away from ",s.createElement("span",{style:{fontWeight:"bold"}},e.selectedCity)):null),s.createElement(P.A,null)," ")}))}var rM=function(e,t){var r;return function(){for(var n=this,a=arguments.length,i=Array(a),o=0;o<a;o++)i[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){e.apply(n,i)},t)}},rI=function(e){function t(e){var r,n;return eD(this,t),eN(r=ek(this,t,[e]),"handleResize",function(){r.setState({isSmallScreen:window.innerWidth<600})}),eN(r,"fetchsuggestion",function(e,t){!(e.length<2)&&fetch(h.HDComponent.generateURL(td.AUTOCOMPLETE_CITY+"?city=".concat(e),ty),{credentials:"include"}).then(function(e){return e.json()}).then(function(e){var t=[];return e&&e.length>0&&e.map(function(e){var r={iata:e.iata,cityName_TP:e.cityName_TP,countryName_TP:e.countryName_TP,name_TP:e.name_TP,cityDeviation:e.cityDeviation,selectedCity:e.selectedCity};t.push(r)}),t}).catch(function(e){console.log("[ServiceClass] getAutoCompleteCityAPI error",e)}).then(function(e){if(e.length>0||0===e.length){for(var t=[],n=0;n<e.length;++n){var a={airportIATA:e[n].iata,primaryAirportName:e[n].name_TP,primaryCityName:e[n].cityName_TP,countryName:e[n].countryName_TP,cityDeviation:e[n].cityDeviation,selectedCity:e[n].selectedCity};t.push(a)}r.setState({suggestionsList:t,recentSearch:[]})}}).catch(function(e){console.log("Error in auto complete...",e)})}),eN(r,"fetchNearbyAirports",function(e,t){!(e.length<2)&&fetch(h.HDComponent.generateURL(td.AUTOCOMPLETE_NEARBY_AIRPORT+"?city=".concat(e),ty),{credentials:"include"}).then(function(e){return e.json()}).then(function(e){var t=[];return e&&e.length>0&&e.map(function(e){var r={iata:e.iata,cityName_TP:e.cityName_TP,countryName_TP:e.countryName_TP,name_TP:e.name_TP,cityDeviation:e.cityDeviation,selectedCity:e.selectedCity};t.push(r)}),t}
1).catch(function(e){console.log("[ServiceClass] getAutoCompleteCityAPI error",e)}).then(function(e){if(e.length>0||0===e.length){for(var t=[],n=0;n<e.length;++n)!function(){var a={airportIATA:e[n].iata,primaryAirportName:e[n].name_TP,primaryCityName:e[n].cityName_TP,countryName:e[n].countryName_TP,cityDeviation:e[n].cityDeviation,selectedCity:e[n].selectedCity};r.state.suggestionsList.some(function(e){return e.airportIATA===a.airportIATA})||t.push(a)}();r.setState({nearbyAirportsList:t,recentSearch:[]})}}).catch(function(e){console.log("Error in auto complete...",e)})}),eN(r,"debouncedFetchSuggestionFrom",rM(function(e){r.fetchsuggestion(e,"from"),r.fetchNearbyAirports(e,"from")},600)),eN(r,"debouncedFetchSuggestionTo",rM(function(e){r.fetchsuggestion(e,"to"),r.fetchNearbyAirports(e,"to")},600)),eN(r,"setquerytermforflyingfromto",function(e){e.persist(),"from"===e.target.id&&r.state.chipPresentOrigin&&r.setState({chipPresentOrigin:!1}),"to"===e.target.id&&r.state.chipPresentDestination&&r.setState({chipPresentDestination:!1}),"from"===e.target.id?r.setState({flyingfromqueryterm:e.target.value?e.target.value.trim():""},function(){r.debouncedFetchSuggestionFrom(r.state.flyingfromqueryterm)}):"to"===e.target.id&&r.setState({flyingtoqueryterm:e.target.value?e.target.value.trim():""},function(){r.debouncedFetchSuggestionTo(r.state.flyingtoqueryterm)})}),"u">typeof Storage&&localStorage.getItem("recentSearch")&&(n=JSON.parse(localStorage.getItem("recentSearch"))),r.state={chipPresentOrigin:!0,chipPresentDestination:!0,recentSearch:n||null,suggestionsList:[],nearbyAirportsList:[],isSmallScreen:window.innerWidth<600},r}return eO(t,e),eT(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"render",value:function(){var e=this,t=this.props.classes,r=this.state.isSmallScreen;return s.createElement("div",null,s.createElement(ee.A,{fullScreen:r,open:this.props.enableSearchScreen,className:t.maxWidth,classes:{paper:t.dialogPaper},onClose:function(){return e.props.togglehandler("back")}},s.createElement(en.A,{position:"sticky",className:t.appBar},s.createElement(ea.A,{style:"to"===this.props.searchScreenType?{display:r?"block":"flex"}:{display:"inline-flex"}},r&&s.createElement(z.A,{edge:"start",color:"inherit",onClick:function(){return e.props.togglehandler("back")}},s.createElement(eo.A,null)),"to"===this.props.searchScreenType&&s.createElement(s.Fragment,null,s.createElement(el.A,{className:t.iconColor}),s.createElement(et.A,{size:"small",label:s.createElement(k.A,{color:""==this.props.originCity?"text.secondary":"text.primary",style:{display:"inline"}},this.props.originCity?"".concat(this.props.originCity):"From Where?"," ",this.props.originAirportCode&&"(".concat(this.props.originAirportCode,")")),classes:{root:t.componentChipRoot}})),s.createElement(I.A,{type:"text",autoComplete:"off",id:this.props.searchScreenType,placeholder:this.state.chipPresentOrigin?"From where ? ":"To where ? ",autoFocus:!0,disableUnderline:!0,fullWidth:!0,defaultValue:" ",style:"to"===this.props.searchScreenType?{marginLeft:"40px"}:{marginLeft:"0px"},classes:"from"===this.props.searchScreenType&&this.state.chipPresentOrigin||"to"===this.props.searchScreenType&&this.state.chipPresentDestination?{input:t.input}:null,onChange:this.setquerytermforflyingfromto,startAdornment:"from"===this.props.searchScreenType?s.createElement(s.Fragment,null,s.createElement(el.A,{className:t.iconColor}),this.state.chipPresentOrigin&&s.createElement(s.Fragment,null,s.createElement(et.A,{size:"small",label:s.createElement(k.A,{color:""==this.props.originCity?"text.secondary":"text.primary",style:{display:"inline"}},this.props.originCity?"".concat(this.props.originCity):"From Where?"," ",this.props.originAirportCode&&"(".concat(this.props.originAirportCode,")")),classes:{root:t.componentChipRoot}}))):s.createElement(s.Fragment,null,s.createElement(es.A,{className:t.iconColor}),this.state.chipPresentDestination&&s.createElement(s.Fragment,null,s.createElement(et.A,{size:"small",label:s.createElement(k.A,{style:{display:"inline"},color:""==this.props.destinationCity?"text.secondary":"text.primary"},this.props.destinationCity?"".concat(this.props.destinationCity):"To Where?"," ",this.props.destinationAirportCode&&"(".concat(this.props.destinationAirportCode,")")),classes:{root:t.componentChipRoot}})))}),!r&&s.createElement(z.A,{edge:"end",color:"inherit",onClick:function(){return e.props.togglehandler("back")},style:{marginLeft:"auto"}},s.createElement(ei.A,null)))),s.createElement(er.A,null,this.state.recentSearch&&this.state.recentSearch.length>0&&s.createElement(rO,{recentSearches:this.state.recentSearch,recentSearchSearchScreen:this.props.recentSearchSearchScreen}),this.state.suggestionsList&&this.state.suggestionsList.length>0&&s.createElement(rF,{list:this.state.suggestionsList,fromToSuggestionHandler:this.props.fromToSuggestionHandler}),this.state.nearbyAirportsList&&this.state.nearbyAirportsList.length>0&&s.createElement(rF,{list:this.state.nearbyAirportsList,fromToSuggestionHandler:this.props.fromToSuggestionHandler}))))}}])}(s.Component),rW=(0,d.A)(function(e){return{componentChipRoot:{borderRadius:2,backgroundColor:e.palette.primary.light},appBar:{position:"sticky",top:0},title:{marginLeft:e.spacing(2),flex:1},maxWidth:eN({},e.breakpoints.up("md"),{margin:"0 auto",maxWidth:780}),iconColor:{opacity:.5,paddingRight:"4px"},secondary:{marginLeft:"56px"},input:eN({width:"100px!important"},e.breakpoints.up("md"),{width:"100%"}),secondaryNearbyAirports:{marginLeft:"28px"},customPlaceholder:eN(eN({},e.breakpoints.down("sm"),{width:"54%"}),"marginLeft","2px"),cursor:{cursor:"pointer"},dialogPaper:eN(eN({overflowX:"hidden"},e.breakpoints.up("sm"),{minWidth:320}),e.breakpoints.up("md"),{minWidth:700,height:"80vh",overflowY:"auto","&::-webkit-scrollbar":{display:"none"}})}})(rI),rL=function(e,t){var r={};if(e.departureDate){var n=new Date(e.departureDate);isNaN(n)||(r.departureDate=n)}if(e.returnDate){var a=new Date(e.returnDate);
1isNaN(a)||(r.returnDate=a)}return e.tripType&&(r.tripType="round_trip"===e.tripType?"roundtrip":"oneway","oneway"===r.tripType&&(r.returnDate=null)),e.cabinClass&&(r.travelClass="business"===e.cabinClass?"Business":"Economy"),e.passengerCount&&(r.adultsCount=e.passengerCount),e.budget&&("number"==typeof e.budget.min&&(r.minPrice=e.budget.min),"number"==typeof e.budget.max&&(r.maxPrice=e.budget.max),("number"==typeof e.budget.min||"number"==typeof e.budget.max)&&(r.priceRange=["number"==typeof e.budget.min?e.budget.min:t.minPrice,"number"==typeof e.budget.max?e.budget.max:t.maxPrice])),r},rz=function(e){if(!e)return null;var t=eI({},e);return Array.isArray(e.entities)?t.entities=e.entities.filter(function(e){if(!e||!e.entityInfo)return!1;var t=(e.entityInfo.geo||{}).city||e.entityInfo.airportCity;return"string"==typeof t&&t.trim().length>0}):t.entities=[],t},rj=function(e,t,r){var n=function(){return e.index<t.index?[e,t]:[t,e]};try{var a=r.queryTerm||r.genericQuery||"";if(!a&&r.queryObject&&r.queryObject.queryTerm&&(a=r.queryObject.queryTerm),!a)return n();var i=decodeURIComponent(a).toLowerCase(),o=i.indexOf("from "),l=i.indexOf("to "),s=(e.city||"").toLowerCase(),c=(t.city||"").toLowerCase(),u=i.indexOf(s),p=i.indexOf(c);if(-1===u||-1===p)return n();if(-1!==o&&-1!==l)if(o<l)return u<p?[e,t]:[t,e];else return u<p?[t,e]:[e,t];if(-1!==o){var d=u>o?u-o:1/0,m=p>o?p-o:1/0;if(d!==1/0||m!==1/0)return d<m?[e,t]:[t,e]}if(-1!==l){var g=u>l?u-l:1/0,h=p>l?p-l:1/0;if(g!==1/0||h!==1/0)return g<h?[t,e]:[e,t]}return n()}catch(e){return console.error("Error resolving origin destination",e),n()}},rB=function(e,t){try{var r=t.queryTerm||t.genericQuery||"";if(!r&&t.queryObject&&t.queryObject.queryTerm&&(r=t.queryObject.queryTerm),!r)return"unknown";var n=decodeURIComponent(r).toLowerCase(),a=(e.city||"").toLowerCase(),i=n.indexOf(a);if(-1===i)return"unknown";var o=n.indexOf("from "),l=n.indexOf("to "),s=-1!==o&&i>o?i-o:1/0,c=-1!==l&&i>l?i-l:1/0;if(s===1/0&&c===1/0)return"unknown";return s<c?"origin":"destination"}catch(e){return console.error("Error determining single entity role",e),"unknown"}},rH=function(e,t){var r=Math.floor(Number(e));return Number.isFinite(r)&&r>=0?r:t},r_=function(e,t,r){var n={adults:rH(e,1),children:rH(t,0),infants:rH(r,0)},a=Math.min(Math.max(n.adults,1),9),i=9-a,o=Math.min(n.children,i);i-=o;var l=Math.min(n.infants,a,i),s=a!==n.adults||o!==n.children||l!==n.infants;return{adults:a,children:o,infants:l,changed:s}},rX=function(e){function t(e){if(eD(this,t),eN(i=ek(this,t,[e]),"temporaryCityUpdate",function(e,t){i.setState({originAirportCode:"",originCity:e||i.state.originCity,destinationAirportCode:"",destinationCity:t||i.state.destinationCity})}),eN(i,"updateStateFromFilters",function(e){var t=rL(e,i.state);Object.keys(t).length>0&&i.setState(t)}),eN(i,"parseEntity",function(e){var t=e.entityInfo.geo||{};return{qid:e.IDs&&e.IDs.wikiQID||null,city:t.city||e.entityInfo.airportCity,lat:t.lat||"",long:t.long||"",country:t.country||"",index:e.index,isAirport:"AIRPORTS IATA"===e.wgName&&!!e.entityInfo.airportCity,airportCode:e.sourceID,airportCity:e.entityInfo.airportCity}}),eN(i,"extractFilters",function(e){var t=e.filters||e.queryObject&&e.queryObject.filters||null;return t&&i.updateStateFromFilters(t),t}),eN(i,"autocompleteCityLatLongFromEntities",function(e,t){i.autocompleteCityLatLong(e&&e.lat||null,e&&e.long||null,e&&e.country||null,e&&e.qid||null,e&&e.city||null,t&&t.lat||null,t&&t.long||null,t&&t.country||null,t&&t.qid||null,t&&t.city||null)}),eN(i,"resolveCityPair",function(e,t){i.temporaryCityUpdate(e.city,t.city),e.isAirport&&t.isAirport?i.setState({originCity:e.airportCity,originAirportCode:e.airportCode,destinationCity:t.airportCity,destinationAirportCode:t.airportCode}):e.isAirport?(i.setState({originCity:e.airportCity,originAirportCode:e.airportCode}),i.autocompleteCityLatLongFromEntities(null,t)):t.isAirport?(i.setState({destinationCity:t.airportCity,destinationAirportCode:t.airportCode}),i.autocompleteCityLatLongFromEntities(e,null)):i.autocompleteCityLatLongFromEntities(e,t)}),eN(i,"resolveSingleCityWithGeolocation",(r=eA(eW().m(function e(t,r,n){var a,o,l,s,c;return eW().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a=!1,o=!1,"origin"===(l=rB(r,t))?a=!0:"destination"===l?o=!0:(a=n&&"boolean"==typeof n.hasOrigin?n.hasOrigin:!!(t.genericQuery&&t.genericQuery.includes("from")),o=n&&"boolean"==typeof n.hasDestination?n.hasDestination:!!(t.genericQuery&&t.genericQuery.includes("to"))),!(!a&&!o)){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,h.HDComponent.getLocation();case 2:c={city:(s=e.v.position).city,lat:s.coords.latitude,long:s.coords.longitude,country:s.country,qid:"",isAirport:!1},a?i.resolveCityPair(r,c):i.resolveCityPair(c,r),e.n=4;break;case 3:e.p=3,console.error(e.v);case 4:return e.a(2)}},e,null,[[1,3]])}
1)),function(e,t,n){return r.apply(this,arguments)})),eN(i,"getSourceAndDestination",(n=eA(eW().m(function e(t){var r,n,a,o,l,c,u,p;return eW().w(function(e){for(;;)switch(e.n){case 0:if(!(!(r=rz(t))||!r.entities||0===r.entities.length)){e.n=1;break}return e.a(2);case 1:if(n=i.extractFilters(r),o=(a=r.entities.map(i.parseEntity))[0],!(l=a.slice(1).find(function(e){return e.city!==o.city}))){e.n=2;break}u=(c=ej(rj(o,l,r),2))[0],p=c[1],i.resolveCityPair(u,p),e.n=3;break;case 2:return e.n=3,i.resolveSingleCityWithGeolocation(r,o,n);case 3:h.useHDStore.getState().setHeader(s.createElement(rT,{departureDate:i.state.departureDate,returnDate:i.state.returnDate,adultsCount:i.state.adultsCount,childrenCount:i.state.childrenCount,infantsCount:i.state.infantsCount,travelClass:i.state.travelClass,originCity:i.state.originCity,destinationCity:i.state.destinationCity,editMode:i.editMode,trips:i.state.trips,tripType:i.state.tripType,expandSearchPanel:i.state.expandSearchPanel}));case 4:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})),eN(i,"autocompleteCityLatLong",(a=eA(eW().m(function e(t,r,n,a,o,l,s,c,u,p){var d,m;return eW().w(function(e){for(;;)switch(e.n){case 0:return d=function(){var e=eA(eW().m(function e(t,r,n,a,o,l){var s,c,u;return eW().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,fetch(h.HDComponent.generateURL(td.AUTOCOMPLETE_NEARBY_AIRPORT_LAT_LONG+"?geonameLatitude=".concat(r,"&geonameLongitude=").concat(n,"&geonameCountry=").concat(a,"&cityName=").concat(l).concat(o?"&qid=".concat(o):""),ty),{credentials:"include"}).then(function(e){return e.json()}).then(function(e){var t=[];return e&&e.length>0&&e.map(function(e){var r={iata:e.iata,cityName_TP:e.cityName_TP,countryName_TP:e.countryName_TP,name_TP:e.name_TP,cityDeviation:e.cityDeviation,Patronage:e.Patronage};t.push(r)}),t}).catch(function(e){console.log("[ServiceClass] getAutoCompleteCityAPI error",e)});case 1:(s=e.v).length>0?(c=s.sort(function(e,t){return t.Patronage-e.Patronage}),i.setState(eN(eN({},"".concat(t,"City"),c[0].cityName_TP),"".concat(t,"AirportCode"),c[0].iata))):console.error("[FlightBooking getAutoCompleteCity] ".concat(t," City not found...")),e.n=3;break;case 2:e.p=2,u=e.v,console.error("[FlightBooking getAutoCompleteCity] ".concat(t," City not found..."),u);case 3:return e.a(2)}},e,null,[[0,2]])}));return function(t,r,n,a,i,o){return e.apply(this,arguments)}}(),m=[],t&&n&&m.push(d("origin",t,r,n,a,o)),l&&c&&m.push(d("destination",l,s,c,u,p)),e.n=1,Promise.all(m);case 1:return e.a(2)}},e)})),function(e,t,r,n,i,o,l,s,c,u){return a.apply(this,arguments)})),eN(i,"fetchSearchId",function(e,t,r,n,a,o,l,c,u,p,d){c=null!=c?c:i.state.adultsCount,u=null!=u?u:i.state.childrenCount,p=null!=p?p:i.state.infantsCount;var m,g=r_(c,u,p);g.changed&&console.warn("[FlightBooking fetchSearchId] Adjusted invalid traveller counts",{from:{adultsCount:c,childrenCount:u,infantsCount:p},to:g}),c=g.adults,u=g.children,p=g.infants,t=t||i.state.originAirportCode,n=n||i.state.destinationAirportCode,a=a?"string"==typeof a?new Date(a):a:i.state.departureDate,o="oneway"===l?null:o?"string"==typeof o?new Date(o):o:i.state.returnDate,d=(d||i.state.travelClass)===i.state.travelClasses[0]?"Y":"C",l=l||i.state.tripType,e=e||i.state.originCity,r=r||i.state.destinationCity,i.setState({expandSearchPanel:!1,flightSortBy:"Price",selectedStops:{direct:!1,oneStop:!1,twoPlus:!1},filterTimeRange:{outboundDepartureRange:[0,1440],outboundArrivalRange:[0,0],returnDepartureRange:[0,1440],returnArrivalRange:[0,0]},arrivalTimeRanges:{outboundArrivalMin:Number.MAX_SAFE_INTEGER,outboundArrivalMax:0,returnArrivalMin:Number.MAX_SAFE_INTEGER,returnArrivalMax:0},priceRange:[0,1e4],minPrice:0,maxPrice:1e4,searchError:!1,isLoading:null===i.state.searchsignature||i.state.isLoading,tripType:l,adultsCount:c,childrenCount:u,infantsCount:p,travelClass:"Y"===d?"Economy":"Business",departureDate:a,returnDate:o,originCity:e,destinationCity:r,originAirportCode:t,destinationAirportCode:n});var f=s.createElement(rT,{departureDate:a,returnDate:o,adultsCount:c,childrenCount:u,infantsCount:p,travelClass:"Y"===d?"Economy":"C"===d?"Business":d,originCity:e,destinationCity:r,editMode:i.editMode,trips:i.state.trips,tripType:l,expandSearchPanel:!1}),y=h.useHDStore.getState(),x=y.setHeader,v=y.setStarEnabled,b=y.setIsBookmarked,C=y.setSecondaryMenu;(v(!1),b(!1),x(f),C(""),console.log("body",a,i.state,f),isNaN(a)||a<new Date().setHours(0,0,0,0))?i.setState({isLoading:!1,tickets:{},totalcount:0,expandSearchPanel:!0,searchError:!0}):(m=tx(e,t,r,n,a,o,l,c,u,p,d),fetch(h.HDComponent.generateURL(td.FLIGHT_SEARCH,ty),{credentials:"include",method:"POST",header:"application/json",body:JSON.stringify(m)}).then(function(e){return e.json()}).then(function(e){var t,r=e&&e.data||{},n=e&&e.error||r.error;if(n||!r.search_id)throw Error("string"==typeof n?n:"Flight search request was rejected");return tf.getState().setCurrencyRates(r.currency_rates),{searchid:r.search_id,currencyRateUSd:null==(t=r.currency_rates)?void 0:t.usd,signature:e.md5Sign}}
1).catch(function(e){throw console.log("[ServiceClass] fetchSearchIdAPI error",e),e})).then(function(a){if(!a||!a.signature)throw Error("No search result returned");var o=i.state.departureDate?"string"==typeof i.state.departureDate?new Date(i.state.departureDate):i.state.departureDate:null,s=i.state.returnDate?"string"==typeof i.state.returnDate?new Date(i.state.returnDate):i.state.returnDate:null;o=o?o.getFullYear()+"-"+("0"+(o.getMonth()+1)).slice(-2)+"-"+("0"+o.getDate()).slice(-2):null,s=s?s.getFullYear()+"-"+("0"+(s.getMonth()+1)).slice(-2)+"-"+("0"+s.getDate()).slice(-2):null,a.signature===i.state.searchsignature?i.setState({enableSearchScreen:!1}):i.setState({tickets:{},airlines:{},selectedStops:{direct:!0,oneStop:!0,twoPlus:!0},filterTimeRange:{outboundDepartureRange:[0,1440],outboundArrivalRange:[0,0],returnDepartureRange:[0,1440],returnArrivalRange:[0,0]},arrivalTimeRanges:{outboundArrivalMin:Number.MAX_SAFE_INTEGER,outboundArrivalMax:0,returnArrivalMin:Number.MAX_SAFE_INTEGER,returnArrivalMax:0},nearbyAirports:{outboundOrigin:{},outboundDestination:{},returnOrigin:{},returnDestination:{},applyToReturn:!0},isLoading:!0,enableSearchScreen:!1,noOfItemsToDisplay:20,response:null,loadMoreDataVisible:!0,searchID:a.searchid||null,searchsignature:a.signature||null,currencyRateUSD:a.currencyRateUSd||0,createBodyFlag:!0},function(){i.props&&i.props.location&&i.props.location.state&&i.props.location.state.newstate&&i.props.history.replace({pathname:i.props.baseURL,state:{newstate:i.state}});var m,g,h=eI({},i.state.tickets);i.fetchFlights(a.searchid,a.signature,a.currencyRateUSd,i.state.nearbyAirports,i.state.airlines,h,i.state.arrivalTimeRanges,i.state.airlinesInfo,i.state.airportsInfo),m={origin:{originCity:e,originAirportCode:t},destination:{destinationCity:r,destinationAirportCode:n},dates:{departureDate:o,returnDate:s||null},tripType:l,travellerCount:{adults:c,children:u,infants:p},travelClass:d},(g=localStorage.getItem("recentSearch")?JSON.parse(localStorage.getItem("recentSearch")):[]).push(m),g.length>2&&g.shift(),localStorage.setItem("recentSearch",JSON.stringify(g))})}).catch(function(e){i.setState({isLoading:!1,expandSearchPanel:!0,searchError:!0}),console.error("[FlightBooking fetchSearchId] Error in flight search....",e)})}),eN(i,"setDataInState",function(e,t,r){var n=Object.keys(e.oldtickets),a=Object.values(e.oldtickets),o=n.length,l=o>i.state.noOfItemsToDisplay;tD(a,i.state.flightSortBy);var s={};a.map(function(e,t){s[e.sign]=e});var c=Number.MAX_SAFE_INTEGER,u=0;a.forEach(function(e){e.minprice<c&&(c=e.minprice),e.minprice>u&&(u=e.minprice)}),0===a.length&&(c=0,u=1e4),t===i.state.searchsignature&&i.setState({tickets:s,nearbyAirports:e.oldorigindestiairports,airlines:e.oldairlines,arrivalTimeRanges:e.oldarrivaltimeminmax,airlinesInfo:e.oldairlinesInfo,airportsInfo:e.oldairportsInfo,totalcount:o,isLoading:r,loadMoreDataVisible:l,minPrice:c,maxPrice:u,priceRange:[c,u]})}),eN(i,"applyTimeRangeFilter",function(e){i.setState({filterTimeRange:e})}),eN(i,"applyPriceFilter",function(e){i.setState({priceRange:e})}),eN(i,"applyAirlinesFilter",function(e){var t=eI({},i.state.airlines);t[e]=!t[e],i.setState({airlines:t})}),eN(i,"applyAirportFilter",function(e,t,r){var n=JSON.parse(JSON.stringify(i.state.nearbyAirports));"applyToReturn"===t?n.applyToReturn=!n.applyToReturn:n[t][e]=r.target.checked,i.setState({nearbyAirports:n})}),eN(i,"fetchFlights",function(e,t,r,n,a,o,l,s,c){var u,p,d,m,g;(u=i.state.departureDate,p=i.state.returnDate,d=i.state.isLoading,m=i.state.searchsignature,g=i.state.tripType,fetch(h.HDComponent.generateURL(td.FLIGHT_SEARCH_RESULTS+"?uuid=".concat(e),ty),{credentials:"include"}).then(function(e){return e.json()}).then(function(i){return tv(i,e,t,r,n,a,o,u,p,l,s,c,d,m,g)}).catch(function(e){throw console.log("[ServiceClass] fetchFlightsAPI errorr",e),e})).then(function(r){if(null!=r&&""!==r){var n=!!r.isLastResArrived;if(i.setState({response:r},function(){null!=r.oldtickets?i.setDataInState(r,t,!n):n&&i.setState({isLoading:!1})}),!n&&t===i.state.searchsignature){var a=eI({},r.oldtickets);i.fetchFlights(e,t,i.state.currencyRateUSD,r.oldorigindestiairports,r.oldairlines,a,r.oldarrivaltimeminmax,r.oldairlinesInfo,r.oldairportsInfo)}}else t===i.state.searchsignature&&(void 0!==i.state.response&&null!==i.state.response&&""!==i.state.response?i.setDataInState(i.state.response,t,!1):i.setState({isLoading:!1}))}).catch(function(e){i.setState({isLoading:!1}),console.error("[FlightBooking fetchsearchid] Error in flight search....",e)})}),eN(i,"loadMoreData",function(){var e=i.state.noOfItemsToDisplay+20;e>=i.state.totalcount?i.setState({noOfItemsToDisplay:e,loadMoreDataVisible:!1}):i.setState({noOfItemsToDisplay:e})}),eN(i,"toggleTripType",function(){if(i.state.tripType===i.state.trips[0]){var e=i.state.departureDate;i.setState({tripType:i.state.trips[1],returnDate:null==i.state.returnDate?tk(1,e):i.state.returnDate})}else i.setState({tripType:i.state.trips[0],returnDate:null})}),eN(i,"toggleOriginDestinationCities",function(){var e=i.state.destinationCity,t=i.state.destinationAirportCode,r=i.state.originCity,n=i.state.originAirportCode;i.setState({originCity:e,originAirportCode:t,destinationCity:r,destinationAirportCode:n})}
1),eN(i,"redirectToDetails",function(){console.log("redirectToDetails called");var e=i.state,t=e.originCity,r=e.originAirportCode,n=e.destinationCity,a=e.destinationAirportCode,o=e.departureDate,l=e.returnDate,s=e.tripType,c=e.adultsCount,u=e.childrenCount,p=e.infantsCount,d=e.travelClass,m=i.props.baseURL||"flightbooking",g="".concat(m,"?")+"flightType=".concat(s,"&")+"fromCity=".concat(t,"&")+"fromAirportCode=".concat(r,"&")+"toCity=".concat(n,"&")+"toAirportCode=".concat(a,"&")+"adultsCount=".concat(c,"&")+"childrenCount=".concat(u,"&")+"infantsCount=".concat(p,"&")+"travelClass=".concat(d,"&")+"departureDate=".concat(encodeURIComponent(o),"&")+"returnDate=".concat(encodeURIComponent(l));console.log("detailedurl2",g),i.props.history.push(g)}),eN(i,"fromToSuggestionHandler",function(e,t){"from"===i.state.searchScreenType?i.setState({originAirportCode:t,originCity:e},function(){i.toggleSearchScreen("selectedTo")}):"to"===i.state.searchScreenType&&i.setState({destinationAirportCode:t,destinationCity:e},function(){i.toggleSearchScreen("selectedFrom")})}),eN(i,"editMode",function(e){i.setState({expandSearchPanel:e}),!0===e&&window.scrollTo({top:0,behavior:"auto"});var t=s.createElement(rT,{departureDate:i.state.departureDate,returnDate:i.state.returnDate,adultsCount:i.state.adultsCount,childrenCount:i.state.childrenCount,infantsCount:i.state.infantsCount,travelClass:i.state.travelClass,originCity:i.state.originCity,destinationCity:i.state.destinationCity,editMode:i.editMode,trips:i.state.trips,tripType:i.state.tripType,expandSearchPanel:e});console.log("inEdit title",i.state.departureDate,i.state.returnDate,i.state.adultsCount,i.state.childrenCount,i.state.infantsCount,i.state.travelClass,i.state.originCity,i.state.destinationCity,i.editMode,i.state.trips,i.state.tripType,e);var r=h.useHDStore.getState(),n=r.setHeader,a=r.setStarEnabled,o=r.setIsBookmarked;a(!1),o(!1),n(t)}),eN(i,"toggleSearchScreen",function(e){"selectedTo"===e?i.setState({enableSearchScreen:!i.state.enableSearchScreen,searchScreenType:e},function(){i.setState({enableSearchScreen:!0,searchScreenType:"to"})}):"selectedFrom"===e?i.setState({enableSearchScreen:!i.state.enableSearchScreen,searchScreenType:e},function(){i.setState({})}):i.setState({enableSearchScreen:!i.state.enableSearchScreen,searchScreenType:e})}),eN(i,"recentSearchSearchScreen",function(e,t,r,n,a,o,l,s,c,u,p){i.setState({originCity:e,originAirportCode:t,destinationCity:r,destinationAirportCode:n,departureDate:a,returnDate:o,tripType:l,adultsCount:s,childrenCount:c,infantsCount:u,travelClass:p},function(){i.fetchSearchId(e,t,r,n,a,o,l,s,c,u,p)})}),eN(i,"setDepartureDate",function(e){i.setState({departureDate:e},function(){e>i.state.returnDate&&i.state.tripType===i.state.trips[1]&&i.setState({returnDate:e})})}),eN(i,"setReturnDate",function(e){i.setState({returnDate:e},function(){i.state.tripType===i.state.trips[0]&&i.toggleTripType()})}),eN(i,"applyTravellers",function(e,t,r){i.setState({adultsCount:e,infantsCount:t,childrenCount:r})}),eN(i,"changeTravelClass",function(e){i.setState({travelClass:e})}),eN(i,"selectAllAirlines",function(e){for(var t=Object.keys(i.state.airlines),r=eI({},i.state.airlines),n=0;n<t.length;++n)r[t[n]]=!e;i.setState({airlines:r})}),eN(i,"sortOnChange",function(e){i.setState({flightSortBy:e})}),eN(i,"stopOnChange",function(e,t){i.setState(function(r){return{selectedStops:eI(eI({},r.selectedStops),{},eN({},e,t))}})}),eN(i,"stopOnSelectOnly",function(e){i.setState({selectedStops:{direct:"direct"===e,oneStop:"oneStop"===e,twoPlus:"twoPlus"===e}})}),eN(i,"openDrawer",function(){i.setState({isDrawerOpen:!i.state.isDrawerOpen})}),eN(i,"closeDrawer",function(){i.setState({isDrawerOpen:!1})}),"u">typeof Storage&&localStorage.getItem("recentSearch")){var r,n,a,i,o,l,c,u,p,d,m,g,f,y,x,v,b,C,S,E=JSON.parse(localStorage.getItem("recentSearch"));l=(o=E[E.length-1]).origin.originCity,c=o.origin.originAirportCode,u=o.destination.destinationCity,p=o.destination.destinationAirportCode;var w="string"==typeof o.dates.departureDate?o.dates.departureDate.split("-").join("/"):o.dates.departureDate,A="string"==typeof o.dates.returnDate?o.dates.returnDate.split("-").join("/"):o.dates.returnDate,k=new Date;k.setHours(0,0,0,0);var D=new Date(w);d=isNaN(D)||D<k?tk(3):D;var T=null!==o.dates.returnDate?new Date(A):null;m=null!==T&&(isNaN(T)||T<d)?tk(1,d):T,g=o.tripType;var N=r_(null==(b=o.travellerCount)?void 0:b.adults,null==(C=o.travellerCount)?void 0:C.children,null==(S=o.travellerCount)?void 0:S.infants);f=N.adults,y=N.children,x=N.infants,v="Economy"}return i.state={enableSearchScreen:!1,expandSearchPanel:!0,searchScreenType:null,tickets:{},airlines:{},selectedStops:{direct:!0,oneStop:!0,twoPlus:!0},searchID:null,filterTimeRange:{outboundDepartureRange:[0,1440],outboundArrivalRange:[0,0],returnDepartureRange:[0,1440],returnArrivalRange:[0,0]},arrivalTimeRanges:{outboundArrivalMin:Number.MAX_SAFE_INTEGER,outboundArrivalMax:0,returnArrivalMin:Number.MAX_SAFE_INTEGER,returnArrivalMax:0},nearbyAirports:{outboundOrigin:{},outboundDestination:{},returnOrigin:{},returnDestination:{},applyToReturn:!0},trips:["oneway","roundtrip"],tripType:g||"oneway",adultsCount:f||1,childrenCount:y||0,infantsCount:x||0,travelClasses:["Economy","Business"],travelClass:v||"Economy",departureDate:d||(tk(3)?tk(3):new Date),returnDate:m||null,isDrawerOpen:window.innerWidth>780,sortByParams:["Price","Fastest"],flightSortBy:"Price",isLoading:!1,originCity:l||"",destinationCity:u||"",originAirportCode:c||"",destinationAirportCode:p||"",totalcount:0,searchsignature:"",searchError:!1,currencyRateUSD:"",createBodyFlag:!1,response:null,loadMoreDataVisible:!0,noOfItemsToDisplay:20,airportsInfo:{},airlinesInfo:{},priceRange:[0,1e4],minPrice:0,maxPrice:1e4},i}
1return eO(t,e),eT(t,[{key:"componentDidMount",value:function(){var e=this.props,t=!!new URLSearchParams(window.location.search).get("flightType"),r=!!(e.location&&e.location.state&&e.location.state.searchData&&e.location.state.searchData.queryTerm)||!!(e.quickPanel&&e.searchData&&e.searchData.entities&&e.searchData.entities.length>0);if(t||r||(this._headerTimer=setTimeout(function(){var e=h.useHDStore.getState(),t=e.setHeader,r=e.setStarEnabled,n=e.setIsBookmarked;r(!1),n(!1),t({primary:"Flights"})},0)),h.HDComponent.getLocation().then(function(e){var t={"United States":{currencyName:"usd",currencySymbol:"$"},"United Kingdom":{currencyName:"gbp",currencySymbol:"\xa3"},Canada:{currencyName:"cad",currencySymbol:"C$"},Australia:{currencyName:"aud",currencySymbol:"A$"},Germany:{currencyName:"eur",currencySymbol:"€"},France:{currencyName:"eur",currencySymbol:"€"},Japan:{currencyName:"jpy",currencySymbol:"\xa5"},India:{currencyName:"inr",currencySymbol:"₹"},Brazil:{currencyName:"brl",currencySymbol:"R$"},Russia:{currencyName:"rub",currencySymbol:"₽"},China:{currencyName:"cny",currencySymbol:"\xa5"},"South Korea":{currencyName:"krw",currencySymbol:"₩"},Mexico:{currencyName:"mxn",currencySymbol:"Mex$"},"South Africa":{currencyName:"zar",currencySymbol:"R"},"Saudi Arabia":{currencyName:"sar",currencySymbol:"﷼"},"United Arab Emirates":{currencyName:"aed",currencySymbol:"د.إ"},Singapore:{currencyName:"sgd",currencySymbol:"S$"},"New Zealand":{currencyName:"nzd",currencySymbol:"NZ$"},Italy:{currencyName:"eur",currencySymbol:"€"},Spain:{currencyName:"eur",currencySymbol:"€"},Netherlands:{currencyName:"eur",currencySymbol:"€"}}[e.position.country]||{currencyName:"usd",currencySymbol:"$"};console.log("currencyDetail9090",t),tf.getState().setUserCurrency(t)}),e&&e.location&&e.location.state&&e.location.state.searchData){var n=e.location.state.searchData;n.queryTerm&&this.getSourceAndDestination(n)}e&&e.quickPanel&&!0===e.quickPanel&&e.searchData&&e.searchData.entities&&e.searchData.entities.length>0&&this.getSourceAndDestination(e.searchData)}},{key:"componentWillUnmount",value:function(){this._headerTimer&&(clearTimeout(this._headerTimer),this._headerTimer=null),this.props.quickPanel||h.useHDStore.getState().resetGlobalStore()}},{key:"componentDidUpdate",value:function(e,t){var r=this;this.props&&this.props.location&&this.props.location.state&&this.props.location.state.newstate&&!1===this.state.createBodyFlag&&!1===this.props.location.state.newstate.createBodyFlag&&this.setState(eI(eI({},this.props.location.state.newstate),{},{createBodyFlag:!0}),function(){r.fetchSearchId()}),this.props&&this.props.quickPanel&&!0===this.props.quickPanel&&this.props.searchData&&e.searchData!==this.props.searchData&&e.searchData.query!==this.props.searchData.query&&this.props.searchData.entities&&this.props.searchData.entities.length>0&&this.getSourceAndDestination(this.props.searchData)}},{key:"render",value:function(){return s.createElement(s.Fragment,null,s.createElement(rD,{isLoading:this.state.isLoading,baseURL:this.props.baseURL,history:this.props.history,searchsignature:this.state.searchsignature,searchError:this.state.searchError,expandSearchPanel:this.state.expandSearchPanel,tripType:this.state.tripType,trips:this.state.trips,originCity:this.state.originCity,originAirportCode:this.state.originAirportCode,destinationCity:this.state.destinationCity,destinationAirportCode:this.state.destinationAirportCode,departureDate:this.state.departureDate,returnDate:this.state.returnDate,adultsCount:this.state.adultsCount,childrenCount:this.state.childrenCount,infantsCount:this.state.infantsCount,travelClass:this.state.travelClass,tickets:this.state.tickets,totalcount:this.state.totalcount,selectedStops:this.state.selectedStops,nearbyAirports:this.state.nearbyAirports,airlines:this.state.airlines,filterTimeRange:this.state.filterTimeRange,flightSortBy:this.state.flightSortBy,searchID:this.state.searchID,arrivalTimeRanges:this.state.arrivalTimeRanges,airlinesInfo:this.state.airlinesInfo,airportsInfo:this.state.airportsInfo,isDrawerOpen:this.state.isDrawerOpen,toggleOriginDestinationCities:this.toggleOriginDestinationCities,toggleTripType:this.toggleTripType,toggleSearchScreen:this.toggleSearchScreen,setDepartureDate:this.setDepartureDate,setReturnDate:this.setReturnDate,applyTravellers:this.applyTravellers,changeTravelClass:this.changeTravelClass,createbody:this.fetchSearchId,editMode:this.editMode,applyTimeRangeFilter:this.applyTimeRangeFilter,applyPriceFilter:this.applyPriceFilter,applyAirportFilter:this.applyAirportFilter,applyAirlinesFilter:this.applyAirlinesFilter,priceRange:this.state.priceRange,minPrice:this.state.minPrice,maxPrice:this.state.maxPrice,selectAllAirlines:this.selectAllAirlines,sortOnChange:this.sortOnChange,stopOnChange:this.stopOnChange,stopOnSelectOnly:this.stopOnSelectOnly,openDrawer:this.openDrawer,closeDrawer:this.closeDrawer,quickPanel:this.props.quickPanel?this.props.quickPanel:null,redirectToDetail
1s:this.redirectToDetails,loadMoreDataVisible:this.state.loadMoreDataVisible,noOfItemsToDisplay:this.state.noOfItemsToDisplay,loadMoreData:this.loadMoreData,sideBar:this.props.sideBar}),this.state.enableSearchScreen&&s.createElement(rW,{originCity:this.state.originCity,originAirportCode:this.state.originAirportCode,destinationCity:this.state.destinationCity,destinationAirportCode:this.state.destinationAirportCode,searchScreenType:this.state.searchScreenType,togglehandler:this.toggleSearchScreen,enableSearchScreen:this.state.enableSearchScreen,fromToSuggestionHandler:this.fromToSuggestionHandler,recentSearchSearchScreen:this.recentSearchSearchScreen}))}}])}(h.HDComponent),rU="0px 6px 9px 0px rgba(0,0,0,0.08)",rq=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light",t="light"===e,r=(0,p.A)({palette:{mode:t?"light":"dark",primary:{main:"#F05F40"},secondary:{main:"#2b2f9e",light:"#a8aaff",dark:"#14162b"},success:{main:"#16a37b"},warning:{main:"#d98324"},background:"lightsOut"===e?{default:"#000000",paper:"#000000",cardContainer:"#000000"}:t?{default:"#F5F5F5",paper:"#ffffff",cardContainer:"#fafafa"}:{default:"#121212",paper:"#1e1e1e",cardContainer:null}},shape:{borderRadius:12,borderRadiusCard:22}});return t&&(r.shadows[1]=rU,r.shadows[2]=rU),r},rY=function(e){var t=(0,u.A)();return s.createElement(g.A,{theme:t},s.createElement(rX,e))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.