1"use strict";(self.webpackChunkvisitaecuador_com=self.webpackChunkvisitaecuador_com||[]).push([[1106],{43711:function(e,t,s){var i=s(92901),n=s(23029),a=(0,i.A)((function e(t,s,i,a,o,c,r,l,d,u,h,m,y){(0,n.A)(this,e),this.IdDestino=t,this.TipoDestino=s,this.IdEstablecimiento=a,this.IdBeneficios=i,this.IdServicios=o,this.Personas=c,this.Tiempo=r,this.Precio=l,this.Habitaciones=d,this.Ordenar=u,this.Pax=h,this.Fechas=m,this.txtBusqueda=y}));t.A=a},81106:function(e,t,s){s.r(t);var i=s(5544),n=s(65043),a=s(73216),o=s(43711),c=s(39993),r=s(69517),l=s(70579),d=(0,n.lazy)((function(){return Promise.all([s.e(4180),s.e(6433)]).then(s.bind(s,96433))})),u=(0,n.lazy)((function(){return Promise.all([s.e(2761),s.e(7810),s.e(4180),s.e(8986)]).then(s.bind(s,48986))})),h=(0,n.lazy)((function(){return Promise.all([s.e(2200),s.e(5584),s.e(4920)]).then(s.bind(s,9120))})),m=(0,n.lazy)((function(){return Promise.all([s.e(9308),s.e(7070),s.e(5703)]).then(s.bind(s,91896))})),y=(0,n.lazy)((function(){return s.e(9171).then(s.bind(s,69171))})),f=(0,n.lazy)((function(){return s.e(4668).then(s.bind(s,14668))})),p=(0,n.lazy)((function(){return Promise.all([s.e(2200),s.e(5584),s.e(4199),s.e(8475),s.e(4180),s.e(5653),s.e(2934)]).then(s.bind(s,17065))}));t.default=function(){var e=(0,a.zy)(),t=new URLSearchParams(e.search),s=(0,n.useState)(),D=(0,i.A)(s,2),x=D[0],S=D[1],b=(0,n.useState)(),g=(0,i.A)(b,2),v=g[0],I=g[1],j=(0,a.g)().nombre,w=(0,n.useState)(),N=(0,i.A)(w,2),P=N[0],A=N[1],E=(0,n.useState)(JSON.parse(decodeURIComponent(t.get("id")))),T=(0,i.A)(E,2),z=T[0],R=(T[1],(0,n.useState)()),k=(0,i.A)(R,2),C=k[0],M=k[1];return(0,n.useEffect)((function(){if(e.state&&e.state.Establecimiento)M(e.state.Establecimiento),S(e.state.options),I(e.state.date),A(e.state.destination);else try{var s=JSON.parse(decodeURIComponent(t.get("opciones"))),i=JSON.parse(decodeURIComponent(t.get("fechas"))),n=[{startDate:new Date(i[0].startDate),endDate:new Date(i[0].endDate),key:new Date(i.key)}],a=JSON.parse(decodeURIComponent(t.get("destino")));S(s),I(n),A(a)}catch(o){}}),[e.state]),(0,n.useEffect)((function(){if(v){var e=new o.A,t=Math.ceil(Math.abs(new Date(v[0].endDate))-new Date(v[0].startDate))/864e5;if(new Date(v[0].startDate)<new Date){var s=new Date,i=new Date(s);i.setDate(s.getDate()+t);var n=[{startDate:s,endDate:i,key:new Date(v.key)}];I(n)}e.IdDestino=P.Id,e.TipoDestino=P.Tipo,e.txtBusqueda=j.replaceAll("-"," "),e.IdEstablecimiento=z,e.Fechas={inicio:"".concat((0,c.default)(v[0].startDate,"yyyy-MM-dd")),fin:"".concat((0,c.default)(v[0].endDate,"yyyy-MM-dd"))},e.Pax={adultos:x.adult,ninos:x.children,edadninos:x.childrenAges},(0,r.W7)(e).then((function(e){e&&(401==e?(localStorage.removeItem("datos"),window.location.reload()):M(e.Establecimientos[0]))}))}}),[P]),C?(0,l.jsxs)("div",{children:[(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(p,{})}),(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(u,{Titulo:C.Titulo,Catalogacion:C.Catalogacion,Galeria:C.Galeria,Incluye:C.Incluye,NoIncluye:C.NoIncluye,Restricciones:C.Restricciones,SistemaServicios:C.SistemaServicios,esFavorito:"false"!=C.Favorito,IdEstablecimiento:C.IdEstablecimiento})}),(0,l.jsx)("div",{className:"h-3 bg-gray-200"}),(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(h,{date:v,options:x,Establecimiento:C})}),(0,l.jsx)("div",{className:"h-3 bg-gray-200"}),(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(m,{className:"z-10",Latitud:C.Latitud,Longitud:C.Longitud,Direccion:C.Direccion,Titulo:C.Titulo,PrecioSinImpuestos:C.PrecioSinImpuestos})}),(0,l.jsx)("div",{className:"h-3 bg-gray-200"}),(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(y,{Titulo:C.Titulo,Incluye:C.Incluye,NoIncluye:C.NoIncluye,Restricciones:C.Restricciones,SistemaServicios:C.SistemaServicios})}),(0,l.jsx)("div",{className:"h-3 bg-gray-200"}),(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(f,{Descripcion:C.Descripcion})}),(0,l.jsx)(n.Suspense,{children:(0,l.jsx)(d,{})})]}):(0,l.jsxs)("div",{className:"h-screen w-screen flex flex-col justify-center items-center",children:[(0,l.jsx)("img",{src:"https://visitaecuador.com/img/web/logo_verde.png",style:{width:"200px",height:"auto"}}),(0,l.jsx)("div",{className:"animate-spin w-14 h-14 border-t-4 border-greenVE-500 rounded-full"})]})}}}]); 2//# sourceMappingURL=1106.66beccb6.chunk.js.map
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.