1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7469,6100],{62244:function(t,r,e){"use strict";e.r(r),e.d(r,{__N_SSP:function(){return Q},default:function(){return A}});var n=e(62875),o=e(91797),i=e(88953),a=e.n(i),u=e(82037),c=e(61259),s=e(70683),p=e(36163),f=e(19038),l=e(91720),v=e(94233),d=e(26805),h=e.n(d),y=e(64862),b=e(63008),g=e(67159),O=e(43439),w=e(92072),P=(e(6100),e(88447)),j=e(45433),m=e(62169),T=e(34923),Z=e(85435);function k(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function _(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?k(Object(e),!0).forEach((function(r){(0,n.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):k(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var x=[O.C];function E(t){var r=t.originCity,e=t.destinationCity,n=t.tourSpec,i=t.routes,l=t.currentRoute,v=t.contextValue,d=t.seoContent,O=(0,s.QR)(),k=(0,y.useRouter)(),E=k.query,D=(0,b.useState)(!1),S=D[0],C=D[1],I=(0,b.useState)({availabilityInput:R(E,r,e),departureTransport:p.TransportListState.fromQuery(p.TransportRouteDirectionEnum.departure,E),returnTransport:p.TransportListState.fromQuery(p.TransportRouteDirectionEnum.return,E)}),L=I[0],N=I[1];(0,b.useEffect)((function(){var t=function(){var t=(0,o.Z)(a().mark((function t(r){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.detail,t.next=3,O.replaceRoute((0,m.v)(L.availabilityInput,n.slug,_(_({},L.returnTransport.toQueryParams()),e.toQueryParams())),{shallow:!0});case 3:N((function(t){return _(_({},t),{},{departureTransport:e})}));case 4:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();L.departureTransport.on("change",t);var r=function(){var t=(0,o.Z)(a().mark((function t(r){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.detail,t.next=3,O.replaceRoute((0,m.v)(L.availabilityInput,n.slug,_(_({},L.departureTransport.toQueryParams()),e.toQueryParams())),{shallow:!0});case 3:N((function(t){return _(_({},t),{},{returnTransport:e})}));case 4:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();return L.returnTransport.on("change",r),function(){L.departureTransport.off("change",t),L.returnTransport.off("change",r)}}),[L,k,O,n.slug]),(0,b.useEffect)((function(){var t=function(){var t=(0,o.Z)(a().mark((function t(r){var e,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.detail,C(!0),o=n.slug,e.origin.slug===L.availabilityInput.origin.slug&&e.destination.slug===L.availabilityInput.destination.slug||(o=void 0),t.next=6,O.pushRoute((0,m.v)(e,o),{shallow:!1});case 6:C(!1),N((function(t){return _(_({},t),{},{availabilityInput:e,residence:p.ResidenceListState.empty(),departureTransport:p.TransportListState.empty(p.TransportRouteDirectionEnum.departure),returnTransport:p.TransportListState.empty(p.TransportRouteDirectionEnum.return)})}));case 8:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();return L.availabilityInput.on("change",t),function(){L.availabilityInput.off("change",t)}}),[L.availabilityInput,k,O,n.slug]);var Q=(0,b.useCallback)(function(){var t=(0,o.Z)(a().mark((function t(r){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=L.availabilityInput.toQueryParams(),window.location.href="/tour/".concat(e.origin,"-to-").concat(e.destination,"/begin/").concat(r),t.abrupt("return",new Promise((function(){return null})));case 3:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),[L.availabilityInput]),A=(0,b.useMemo)((function(){return(0,m.v)(L.availabilityInput,n.slug)}),[L.availabilityInput,n.slug]),B="https://www.karnaval.ir",U="".concat(B).concat(k.asPath);return(0,b.useEffect)((function(){var t=window;t.__JOURNEY_NAME__="tour_booking",t.__JOURNEY_STEP__="search_results_view",t.__ROUTE_KEY__="tour-".concat(r.slug,"-to-").concat(e.slug),t.__ORIGIN_CITY__=r.slug,t.__DESTINATION_CITY__=e.slug}),[r,e]),(0,Z.jsxs)(c.l,{instances:x,children:[(0,Z.jsx)(p.NavigationContext.Provider,{value:new p.NextNavigationContext({indexPageUrlWithTripType:!0}),children:(0,Z.jsx)(p.TourConfigContextProvider,{value:v||T.Rt,children:n.tourBundleRoute?(0,Z.jsx)(f.yd,{route:n.tourBundleRoute,availabilityApi:j.bv,orderApi:j.EZ,nearPlacesApi:w.K,routes:i,seoContent:d||void 0,availabilityDocHeadProps:{pageUrl:U,appUrl:B},spec:n,PageHead:h()}):(0,Z.jsx)(p.AvailabilityPage,{nearPlacesApi:w.K,availabilityInput:L.availabilityInput,departureTransportListState:L.departureTransport,returnTransportListState:L.returnTransport,api:P.TQ,airlineApi:g.v,reservationApi:P.$s,spec:n,onReserved:Q,currentRoute:l,routes:i,PageHead:h(),availabilityDocHeadProps:{pageUrl:U,appUrl:B},seoContent:d||void 0},A)})}),(0,Z.jsx)(u.Z,{open:S})]})}function R(t,r,e){return p.AvailabilityInput.fromQueryParams(t,r,e)}var D=(0,l.default)({})((function(t){var r=t.data,e=t.statusCode,n=t.contextValue;return e?(0,Z.jsx)(v.default,{statusCode:e}):r?(0,Z.jsx)(E,_(_({},r),{},{contextValue:n})):null})),S=e(32090),C=e(6734),I=e(89887);function L(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function N(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};
1r%2?L(Object(e),!0).forEach((function(r){(0,n.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):L(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var Q=!0,A=(0,I.Z)((function(t){return(0,Z.jsx)(S.Z,N(N({},t),{},{children:(0,Z.jsx)(C.Z,{toolbarMaxWidth6:!0,children:(0,Z.jsx)(D,N({},t))})}))}))},90482:function(t,r,e){"use strict";e.d(r,{VK:function(){return S},_e:function(){return D}});var n=e(11430),o=e(28094),i=e(25638),a=e(57125),u=e(23667),c=e(62875),s=e(91797),p=e(88953),f=e.n(p),l=e(81734),v=e(61590),d=e(72736);function h(t){var r=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,n=(0,u.Z)(t);if(r){var o=(0,u.Z)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return(0,a.Z)(this,e)}}var y="http://localhost".replace(/\/+$/,""),b=(0,o.Z)((function t(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.Z;(0,n.Z)(this,t),this.basePath=e,this.axios=o,(0,c.Z)(this,"configuration",void 0),r&&(this.configuration=r,this.basePath=r.basePath||this.basePath)})),g=function(t){(0,i.Z)(e,t);var r=h(e);function e(t,o){var i;return(0,n.Z)(this,e),(i=r.call(this,o)).field=t,(0,c.Z)((0,v.Z)(i),"name","RequiredError"),i}return(0,o.Z)(e)}((0,d.Z)(Error));function O(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function w(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?O(Object(e),!0).forEach((function(r){(0,c.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEac
1h((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var P="https://example.com",j=function(t,r,e){if(null===e||void 0===e)throw new g(r,"Required parameter ".concat(r," was null or undefined when calling ").concat(t,"."))};function m(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"object"===typeof r?Array.isArray(r)?r.forEach((function(r){return m(t,r,e)})):Object.keys(r).forEach((function(n){return m(t,r[n],"".concat(e).concat(""!==e?".":"").concat(n))})):t.has(e)?t.append(e,r):t.set(e,r)}var T=function(t){for(var r=new URLSearchParams(t.search),e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];m(r,n),t.search=r.toString()},Z=function(t){return t.pathname+t.search+t.hash},k=function(t,r,e,n){return function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,a=w(w({},t.options),{},{url:((null===n||void 0===n?void 0:n.basePath)||i)+t.url});return o.request(a)}};function _(t){var r=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,n=(0,u.Z)(t);if(r){var o=(0,u.Z)(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return(0,a.Z)(this,e)}}function x(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function E(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?x(Object(e),!0).forEach((function(r){(0,c.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):x(Object(e)).forEac
1h((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var R=function(t){var r=function(t){return{findByLink:function(){var r=(0,s.Z)(f().mark((function r(e){var n,o,i,a,u,c,s,p=arguments;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=p.length>1&&void 0!==p[1]?p[1]:{},j("findByLink","link",e),o=new URL("/seo-content/find-by-link",P),t&&(i=t.baseOptions),a=E(E({method:"GET"},i),n),u={},c={},void 0!==e&&(c.link=e),T(o,c),s=i&&i.headers?i.headers:{},a.headers=E(E(E({},u),s),n.headers),r.abrupt("return",{url:Z(o),options:a});case 13:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}(),findTransportPage:function(){var r=(0,s.Z)(f().mark((function r(e,n,o){var i,a,u,c,s,p,l,v=arguments;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=v.length>3&&void 0!==v[3]?v[3]:{},j("findTransportPage","origin",e),j("findTransportPage","destination",n),j("findTransportPage","type",o),a=new URL("/seo-content/find-transport-page",P),t&&(u=t.baseOptions),c=E(E({method:"GET"},u),i),s={},p={},void 0!==e&&(p.origin=e),void 0!==n&&(p.destination=n),void 0!==o&&(p.type=o),T(a,p),l=u&&u.headers?u.headers:{},c.headers=E(E(E({},s),l),i.headers),r.abrupt("return",{url:Z(a),options:c});case 17:case"end":return r.stop()}}),r)})));return function(t,e,n){return r.apply(this,arguments)}}()}}(t);return{findByLink:function(e,n){return(0,s.Z)(f().mark((function o(){var i;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.findByLink(e,n);case 2:return i=o.sent,o.abrupt("return",k(i,l.Z,y,t));case 4:case"end":return o.stop()}}),o)})))()},findTransportPage:function(e,n,o,i){return(0,s.Z)(f().mark((function a(){var u;return f().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,r.findTransportPage(e,n,o,i);case 2:return u=a.sent,a.abrupt("return",k(u,l.Z,y,t));case 4:case"end":return a.stop()}}),a)})))()}}},D=function(t){(0,i.Z)(e,t);var r=_(e);function e(){return(0,n.Z)(this,e),r.apply(this,arguments)}return(0,o.Z)(e,[{key:"findByLink",value:function(t,r){var e=this;return R(this.configuration).findByLink(t.link,r).then((function(t){return t(e.axios,e.basePath)}))}},{key:"findTransportPage",value:function(t,r){var e=this;return R(this.configuration).findTransportPage(t.origin,t.destination,t.type,r).then((function(t){return t(e.axios,e.basePath)}))}}]),e}(b),S=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.Z)(this,t),(0,c.Z)(this,"apiKey",void 0),(0,c.Z)(this,"username",void 0),(0,c.Z)(this,"password",void 0),(0,c.Z)(this,"accessToken",void 0),(0,c.Z)(this,"basePath",void 0),(0,c.Z)(this,"baseOptions",void 0),(0,c.Z)(this,"formDataCtor",void 0),this.apiKey=r.apiKey,this.username=r.username,this.password=r.password,this.accessToken=r.accessToken,this.basePath=r.basePath,this.baseOptions=r.baseOptions,this.formDataCtor=r.formDataCtor}return(0,o.Z)(t,[{key:"isJsonMime",value:function(t){var r=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==t&&(r.test(t)||"application/json-patch+json"===t.toLowerCase())}}]),t}()},34923:function(t,r,e){"use strict";e.d(r,{Rt:function(){return s}});var n=e(62875),o=e(66107),i=e(18881),a=e.n(i);function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function c(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?u(Object(e),!0).forEach((function(r){(0,n.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEac
1h((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var s={listLink:function(t){var r=t.toPlainObject();return"/tour/".concat(r.origin.slug,"-to-").concat(r.destination.slug).concat(t.queryString())},indexLink:function(t,r){var e=a().stringify({type:t,"holding-type":r===o.UQB.Group?"group":void 0},{addQueryPrefix:!0});return"/tour".concat(e)},singleLink:function(t,r){var e=r.toPlainObject();return"/tour/".concat(e.origin.slug,"-to-").concat(e.destination.slug,"/").concat(t).concat(r.queryString())},homeLink:function(){return"/"}};c(c({},s),{},{homeLink:function(){return"/home"}})},92072:function(t,r,e){"use strict";e.d(r,{K:function(){return a}});var n=e(13836),o=e(43439),i=new n.VK({basePath:"".concat("https://www.karnaval.ir","/api/gateway/general")}),a=new n.ah(i,void 0,o.C)},6100:function(t,r,e){"use strict";e.d(r,{k:function(){return a}});var n=e(90482),o=e(43439),i=new n.VK({basePath:"".concat("https://www.karnaval.ir","/api/seo-content")}),a=new n._e(i,void 0,o.C)},88447:function(t,r,e){"use strict";e.d(r,{$s:function(){return u},TQ:function(){return a},aA:function(){return c},xg:function(){return s}});var n=e(66107),o=e(43439),i=new n.VKt({basePath:"".concat("https://www.karnaval.ir","/api/gateway/tour")}),a=new n.ND8(i,void 0,o.C),u=new n.G3$(i,void 0,o.C),c=new n.H_o(i,void 0,o.C),s=new n.WbD(i,void 0,o.C)},62169:function(t,r,e){"use strict";e.d(r,{v:function(){return c}});var n=e(62875),o=e(18881),i=e.n(o);function a(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function u(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?a(Object(e),!0).forEach((function(r){(0,n.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEac
1h((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function c(t,r,e){var n=t.toQueryParams();return"/tour/".concat(n.origin,"-to-").concat(n.destination).concat(r?"/".concat(r):"").concat(i().stringify(u({start:n.start,end:n.end,occupancies:n.occupancies},e),{addQueryPrefix:!0}))}},11513:function(t,r,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tour-2/origin-to-destination/slug",function(){return e(62244)}])}},function(t){t.O(0,[3883,2567,2429,4543,944,1408,1071,9552,8881,2303,6966,135,2440,9859,9267,2951,3108,2452,6827,3886,5435,9830,5516,9356,7767,9583,7299,6734,9,7823,4683,6942,6398,2535,7827,6206,8296,82,9834,8281,9908,6163,7788,9783,9774,2888,179],(function(){return r=11513,t(t.s=r);var r}));var r=t.O();_N_E=r}]);
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.