{"version":3,"sources":["components/services/LocalStorageService.js","utils/ProtectedRouter.js","components/layouts/Cookies.js","App.js","reportWebVitals.js","index.js"],"names":["LocalStorageService","_classCallCheck","_createClass","key","value","token","this","getToken","expirationTime","JSON","parse","atob","split","exp","Date","now","localStorage","removeItem","user","accessToken","refreshToken","setItem","stringify","getItem","userJson","userinfo","url","accepted","Error","cookiesValue","undefined","ProtectedRoute","_ref","canActivate","redirectPath","Component","component","rest","_objectWithoutProperties","_excluded","isTokenExpired","signOut","_jsx","Route","_objectSpread","render","_ref2","location","Redirect","to","pathname","state","from","Cookies","_useState","useState","_useState2","_slicedToArray","acceptedCookies","setAcceptedCookies","useEffect","validCookies","className","children","Alert","variant","style","marginBottom","boxShadow","backgroundColor","_jsxs","Row","Col","xs","md","href","target","rel","Button","onClick","saveCookies","Preloader","React","lazy","Home","Faq","Contact","Favorites","Notifications","Login","ForgotPassword","EditUser","Tutorial","InfoComprehensivePrivacy","InfoDataDelection","InfoTermsAndConditions","Register","PropertyRegistry","PanelControl","QuienesSomos","Listingmap","Listingdetailsone","protectedRoutes","path","publicRoutes","App","Router","Suspense","fallback","Switch","map","route","index","exact","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","BrowserRouter","document","getElementById"],"mappings":"qJAAaA,EAAmB,oBAAAA,IAAAC,YAAA,KAAAD,EAAA,CA2E7B,OA3E6BE,YAAAF,EAAA,OAAAG,IAAA,iBAAAC,MAE9B,WACE,IAAMC,EAAQC,KAAKC,WACnB,IAAKF,EAEH,OAAO,EAIT,IACMG,EAAoC,IADrBC,KAAKC,MAAMC,KAAKN,EAAMO,MAAM,KAAK,KAClBC,IAIpC,OADoBC,KAAKC,MACJP,CACvB,GAAC,CAAAL,IAAA,UAAAC,MAGD,WACEY,aAAaC,WAAW,aACxBD,aAAaC,WAAW,YACxBD,aAAaC,WAAW,qBACxBD,aAAaC,WAAW,MAC1B,GAAC,CAAAd,IAAA,kBAAAC,MAED,SAA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ENoB,SAASC,eAAe,UAM1BZ,G","file":"static/js/main.2e20a5c7.chunk.js","sourcesContent":["export class LocalStorageService {\n\n static isTokenExpired() {\n const token = this.getToken();\n if (!token) {\n // No hay token, por lo que consideramos que está caducado\n return true;\n }\n\n // Decodificar el token para acceder a la marca de tiempo de expiración\n const tokenPayload = JSON.parse(atob(token.split('.')[1]));\n const expirationTime = tokenPayload.exp * 1000; // Convertir a milisegundos\n\n // Comparar la marca de tiempo de expiración con la hora actual\n const currentTime = Date.now();\n return currentTime > expirationTime;\n }\n\n\n static signOut() {\n localStorage.removeItem('TOKEN_KEY');\n localStorage.removeItem('USER_KEY');\n localStorage.removeItem('REFRESH_TOKEN_KEY');\n localStorage.removeItem('URL');\n }\n\n static saveCredentials(user, accessToken, refreshToken) {\n localStorage.setItem('USER_KEY', JSON.stringify(user));\n localStorage.setItem('TOKEN_KEY', accessToken);\n localStorage.setItem('REFRESH_TOKEN_KEY', refreshToken);\n }\n\n // Guardamos el token en la Local Store\n static saveTokens(accessToken, refreshToken) {\n localStorage.setItem('TOKEN_KEY', accessToken);\n localStorage.setItem('REFRESH_TOKEN_KEY', refreshToken);\n }\n // Obtenemos el token\n static getToken() {\n return localStorage.getItem('TOKEN_KEY');\n }\n\n static getRefreshToken() {\n return localStorage.getItem('REFRESH_TOKEN_KEY');\n }\n\n static getUser() {\n const userJson = localStorage.getItem('USER_KEY');\n return userJson ? JSON.parse(userJson) : null;\n }\n\n static getUrlSocialMedia() {\n return localStorage.getItem('URL');\n }\n\n\n static saveUser(userinfo, url) {\n localStorage.setItem('USER_KEY', JSON.stringify(userinfo));\n if (url) localStorage.setItem('URL', url);\n }\n\n static saveCookies(accepted) {\n if (typeof accepted !== 'boolean') {\n throw new Error('El valor de las cookies debe ser un booleano');\n }\n const cookiesValue = accepted ? 'accepted' : 'rejected';\n localStorage.setItem('ACCEPTED_COOKIES', cookiesValue);\n }\n static validCookies() {\n return localStorage.getItem('ACCEPTED_COOKIES');\n }\n\n static isLoggedIn() {\n const token = this.getToken();\n return token !== null && token !== undefined && token !== '';\n }\n\n\n}\n\n","import React from \"react\";\nimport { Route, Redirect } from \"react-router-dom\";\nimport { LocalStorageService } from \"../components/services/LocalStorageService\";\n\nconst ProtectedRoute = ({ canActivate, redirectPath, component: Component, ...rest }) => {\n const isTokenExpired = LocalStorageService.isTokenExpired();\n\n if (isTokenExpired) {\n LocalStorageService.signOut(); // Borra los datos de la sesión\n }\n\n return (\n \n !isTokenExpired ? (\n \n ) : (\n \n )\n }\n />\n );\n};\n\nexport default ProtectedRoute;\n","import React, { useState, useEffect } from 'react';\nimport { Alert, Button, Row, Col } from 'react-bootstrap';\nimport { LocalStorageService } from '../services/LocalStorageService';\n\nconst Cookies = () => {\n const [acceptedCookies, setAcceptedCookies] = useState(false);\n\n const acceptCookies = () => {\n setAcceptedCookies(true);\n LocalStorageService.saveCookies(true)\n };\n\n useEffect(() => {\n const cookiesAccepted = LocalStorageService.validCookies();\n if (cookiesAccepted) {\n setAcceptedCookies(true);\n }\n }, []);\n\n if (acceptedCookies) {\n return null; // No mostrar el banner si ya se han aceptado las cookies\n }\n\n return (\n
\n \n \n \n

Utilizamos cookies para garantizar que obtengas la mejor experiencia en nuestro sitio web. Al aceptar, estás dando tu consentimiento para que utilicemos cookies. Para más información, consulta nuestros Términos y condiciones.

\n \n \n \n \n
\n
\n
\n );\n};\n\nexport default Cookies;\n","import React, { Suspense, useEffect } from \"react\";\nimport { BrowserRouter as Router, Route, Switch } from \"react-router-dom\";\nimport ProtectedRoute from \"./utils/ProtectedRouter\";\nimport { LocalStorageService } from \"./components/services/LocalStorageService\";\nimport { LoadScript } from '@react-google-maps/api';\nimport Cookies from \"./components/layouts/Cookies.js\";\n\n// Preloader\nconst Preloader = React.lazy(() => import(\"./components/layouts/Preloader\"));\n\n// Home Pages\nconst Home = React.lazy(() => import(\"./components/pages/Home\"));\n// Pages\nconst Faq = React.lazy(() => import(\"./components/pages/Faq\"));\nconst Contact = React.lazy(() => import(\"./components/pages/Contact\"));\nconst Favorites = React.lazy(() => import(\"./components/pages/Favorites\"));\nconst Notifications = React.lazy(() => import(\"./components/pages/Notifications\"));\nconst Error = React.lazy(() => import(\"./components/pages/Error\"));\nconst Login = React.lazy(() => import(\"./components/pages/Login\"));\nconst ForgotPassword = React.lazy(() => import(\"./components/pages/ForgotPassword\"));\nconst EditUser = React.lazy(() => import(\"./components/pages/EditUser\"));\nconst Tutorial = React.lazy(() => import(\"./components/pages/Tutorial\"));\nconst InfoComprehensivePrivacy = React.lazy(() => import(\"./components/layouts/InfoComprehensivePrivacy.js\"));\nconst InfoDataDelection = React.lazy(() => import(\"./components/layouts/InfoDataDelection.js\"));\nconst InfoTermsAndConditions = React.lazy(() => import(\"./components/layouts/InfoTermsAndConditions.js\"));\nconst Register = React.lazy(() => import(\"./components/pages/Register\"));\nconst PropertyRegistry = React.lazy(() => import(\"./components/pages/PropertyRegistry\"));\nconst PanelControl = React.lazy(() => import(\"./components/pages/PanelControlUsuario.js\"));\nconst QuienesSomos = React.lazy(() => import(\"./components/pages/QuienesSomos.js\"));\n// Listings\nconst Listingmap = React.lazy(() => import(\"./components/pages/Listingmap\"));\nconst Listingdetailsone = React.lazy(() =>\n import(\"./components/pages/Listingdetailsone\")\n);\n// App Imports\nconst LandingLY = React.lazy(() => import(\"./app/layouts/landing/LandingLY\"));\n\n\nconst protectedRoutes = [\n // { path: \"/\", component: Home },\n // { path: \"/login\", component: Login },\n // { path: \"/register\", component: Register },\n // Agrega otras rutas aquí...\n { path: \"/landing\", component: LandingLY },\n /* Pages */\n { path: \"/faq\", component: Faq },\n { path: \"/Configuraciones\", component: EditUser },\n { path: \"/error-404\", component: Error },\n { path: \"/PropertyRegistry\", component: PropertyRegistry },\n \n { path: \"/Favoritos\", component: Favorites },\n { path: \"/Notificaciones\", component: Notifications },\n];\n\nconst publicRoutes = [\n { path: \"/\", component: Home },\n { path: \"/Perfil\", component: PanelControl },\n { path: \"/login\", component: Login },\n { path: \"/RecuperarContrasena\", component: ForgotPassword },\n { path: \"/contact\", component: Contact },\n { path: \"/register\", component: Register },\n { path: \"/listing-map\", component: Listingmap },\n { path: \"/QuienesSomos\", component: QuienesSomos },\n { path: \"/listing-details-v1\", component: Listingdetailsone },\n { path: \"/Tutorial\", component: Tutorial },\n { path: \"/AvisoDePrivacidadIntegral\", component: InfoComprehensivePrivacy },\n { path: \"/PoliticaEliminacionDeDatos\", component: InfoDataDelection },\n { path: \"/TerminosyCondiciones\", component: InfoTermsAndConditions }\n];\n\nfunction App() {\n\n useEffect(() => {\n // Verificar la expiración del token al cargar la aplicación\n const isTokenExpired = LocalStorageService.isTokenExpired();\n\n if (isTokenExpired) {\n LocalStorageService.signOut(); // Borra los datos de la sesión\n }\n }, []);\n return ( \n \n }>\n \n \n {publicRoutes.map((route, index) => (\n \n ))}\n {protectedRoutes.map((route, index) => (\n \n ))}\n \n \n \n \n );\n}\n\nexport default App;\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport { BrowserRouter } from 'react-router-dom';\nimport reportWebVitals from './reportWebVitals';\n\n// Css\nimport '../node_modules/animate.css/animate.css';\nimport '../node_modules/bootstrap/dist/css/bootstrap.min.css';\nimport '../node_modules/slick-carousel/slick/slick.css';\nimport '../node_modules/slick-carousel/slick/slick-theme.css';\nimport '../node_modules/magnific-popup/dist/magnific-popup.css';\nimport '../node_modules/react-select2-wrapper/css/select2.css';\nimport '../node_modules/leaflet/dist/leaflet.css';\nimport './assets/fonts/flaticon/flaticon.css';\nimport './assets/fonts/font-awesome/css/all.min.css';\nimport './assets/css/style.css';\n\n\nReactDOM.render(\n \n \n ,\n document.getElementById('acres')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}