src/Aviatur/TwigBundle/Resources/views/aviatur/Flux/App/base.html.twig line 1

Open in your IDE?
  1. {% set parameters = json_decode(app.session.get(app.request.server.get('HTTP_HOST') ~ '[parameters]'), true) %}
  2. <!DOCTYPE html>
  3. <html lang="es">
  4.     <head>
  5.         <meta charset="utf-8"/>
  6.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7.         {% block head_viewport %}
  8.             <meta name="viewport" content="width=device-width, initial-scale=1">
  9.             {# <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> #}
  10.         {% endblock head_viewport %}
  11.         <title>{% block head_title %}{% endblock head_title %}</title>
  12.         <meta name="description" content="{% block head_description_content %}{% endblock head_description_content %}">
  13.         <meta name="title" content="{% block head_meta_title %}{% endblock head_meta_title %}">
  14.         <meta name="theme-color" content="#009bf8">
  15.         <meta name="google-signin-scope" content="profile email">
  16.         <meta name="google-site-verification" content="8OTmH7p5wAGzTdjC6N5XBLDtK_uVhfOIl4ShJ0ILZzI" />
  17.         {# <meta name="google-signin-client_id" content="{{google_idclient_login}}"> #}
  18.         <meta name="keywords" content="{% block head_keywords %}{% endblock head_keywords %}">
  19.         {# <meta name="apple-itunes-app" content="app-id=550837212">
  20.         <meta name="google-play-app" content="app-id=com.app.aviatur"> #}
  21.         
  22.         {% if seoUrlIndex is defined and seoUrlIndex is not empty %}
  23.             <meta name="{{seoUrlIndex['name']}}" content="{{seoUrlIndex['content']}}">
  24.         {% endif %}
  25.         {% block head_meta_label %}
  26.         {% endblock head_meta_label %}
  27.         <link rel="icon" type="image/x-icon" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/favicon.png')) }}" />
  28.         <link rel="apple-touch-icon" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/header/iconoapp.png')) }}" />
  29.         <link rel="android-touch-icon" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/header/iconoapp.png')) }}" />
  30.         {# Librerías leaflet para los marcadores de agrupación #}
  31.         <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" />
  32.         <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css" />
  33.         <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css" />
  34.         <script src="https://cdn.tailwindcss.com"></script>
  35.         <script>
  36.             // completely responsive
  37.             tailwind.config = {
  38.                 theme: {
  39.                     container: {
  40.                         center: false,
  41.                     },
  42.                     extend: {
  43.                         screens: {
  44.                             xs: { max:"575px" }, // mini-mobile
  45.                             s: { min: "575px", max: "768px" }, // mobile
  46.                             m: { min: "768px", max: "992px" }, // tablet
  47.                             l: { min: "993px" }, // desktop
  48.                         },
  49.                     },
  50.                 },
  51.                 plugins: [],
  52.             }
  53.         </script>
  54.         {% if parameters['firebasescripts'] == 'true' %}
  55.             <link rel="stylesheet" href="{{ asset('assets/default_assets/css/firebase-main.css') }}" />
  56.             <link rel="stylesheet" href="https://aviaturcdndev.z5.web.core.windows.net/source/main.css">
  57.             <script src="https://aviaturcdndev.z5.web.core.windows.net/source/script.js" type="text/javascript"></script>
  58.         {% endif %}
  59.         {# styles #}
  60.         {% block stylesheets %}
  61.            {#<link href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,600,400" rel="stylesheet" />#}
  62.             {# <link rel="preconnect" href="https://fonts.googleapis.com">
  63.             <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> #}
  64.             {# <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet"> #}
  65.             {# <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
  66.             <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
  67.             <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" rel="stylesheet"> #}
  68.             
  69.             <link type="text/css" rel="stylesheet" href="/assets/common_assets/font/ubuntu/font_family.css" />
  70.             <link type="text/css" rel="stylesheet" href="/assets/common_assets/font/roboto/font_family.css" />
  71.             <link type="text/css" rel="stylesheet" href="/assets/common_assets/font/material-icons/material_family.css" />
  72.             {# <link rel="stylesheet" href="https://storage.googleapis.com/non-spec-apps/mio-icons/latest/round.css"> #}
  73.             <link type="text/css" rel="stylesheet" href="{{ style(agency_folder.assetStyle() ~ '/css/main.css') }}" />
  74.         {% endblock stylesheets %}
  75.         {# end styles #}
  76.         {# scripts #}
  77.         <script src="{{ script('common.js') }}"></script>
  78.         <!--<script src="{{ absolute_url(asset('assets/common_assets/js/stats.min.js')) }}"></script>-->
  79.         {# <script src="https://apis.google.com/js/platform.js" async defer></script>#}
  80.         {# <script src="https://apis.google.com/js/api:client.js" integrity="sha384-m2+ASHO0LZuBooZ0Ww1KN5+PKP3WGmQTd0g4am+AqU2FHI0HVcHpqsPtflL1BLsW" crossorigin="anonymous"></script> #}
  81.         {# <script rel="prefetch" async defer crossorigin="anonymous" integrity="sha384-oarVAheF/euClR0yZhtlxJO/hF9R6ykWvzF2VApNgRN+NolqyoE/f2aGygwNgRfQ" src="https://connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v6.0&appId=#xfbml=1&version=v6.0&appId={{facebook_appid_login}}&autoLogAppEvents=1" as="script"></script> #}
  82.         <script src="https://cdn.embluemail.com/pixeltracking/pixeltracking.js?code=02d348af5e80dfce0bd26f1a7566782f"></script>
  83.         <script type="text/javascript">
  84.             (function() {
  85.                 // --- Configuración Global ---
  86.                 var defaultAgencyName = 'AVIATUR';
  87.                 var defaultAgencyUrl = 'https://www.aviatur.com';
  88.                 var defaultCurrency = 'COP';
  89.                 // defaultDepartureAirportCode y Name solo se usarán si no se pueden obtener del AVflight o la URL
  90.                 var defaultDepartureAirportCode = 'BOG';
  91.                 var defaultDepartureAirportName = 'Aeropuerto Internacional El Dorado';
  92.                 var iataMap = {
  93.                     'BOG': { code: 'BOG', name: 'Aeropuerto Internacional El Dorado' },
  94.                     'MDE': { code: 'MDE', name: 'Aeropuerto Internacional José María Córdova' },
  95.                     'CLO': { code: 'CLO', name: 'Aeropuerto Internacional Alfonso Bonilla Aragón' },
  96.                     'BAQ': { code: 'BAQ', name: 'Aeropuerto Internacional Ernesto Cortissoz' },
  97.                     'CTG': { code: 'CTG', name: 'Aeropuerto Internacional Rafael Núñez' },
  98.                     'SMR': { code: 'SMR', name: 'Aeropuerto Internacional Simón Bolívar' },
  99.                     'CUN': { code: 'CUN', name: 'Aeropuerto Internacional de Cancún' },
  100.                     'AXM': { code: 'AXM', name: 'Aeropuerto El Edén' },
  101.                     'LET': { code: 'LET', name: 'Aeropuerto Internacional Alfredo Vásquez Cobo' },
  102.                     'LIM': { code: 'LIM', name: 'Aeropuerto Internacional Jorge Chávez' },
  103.                     // Regiones (para Schema.org, el name debe ser el nombre de la región/país)
  104.                     'colombia': { code: null, name: 'Colombia' },
  105.                     'america': { code: null, name: 'América' },
  106.                     'oceania': { code: null, name: 'Oceanía' },
  107.                     'europa': { code: null, name: 'Europa' },
  108.                     'africa': { code: null, name: 'África' },
  109.                     'asia': { code: null, name: 'Asia' }
  110.                 };
  111.                 // Función para obtener información IATA (ahora puede recibir slug o código IATA)
  112.                 function getIataInfo(identifier) {
  113.                     if (!identifier) return null;
  114.                     var normalizedIdentifier = identifier.toUpperCase(); // Para códigos IATA
  115.                     var normalizedSlug = identifier.toLowerCase().replace(/-/g, ' '); // Para slugs de ciudad
  116.                     if (iataMap[normalizedIdentifier]) {
  117.                         return iataMap[normalizedIdentifier];
  118.                     }
  119.                     if (iataMap[normalizedSlug]) {
  120.                         return iataMap[normalizedSlug];
  121.                     }
  122.                     for (var key in iataMap) {
  123.                         if (iataMap.hasOwnProperty(key) && iataMap[key].name && iataMap[key].name.toLowerCase() === normalizedSlug) {
  124.                             return iataMap[key];
  125.                         }
  126.                     }
  127.                     return null;
  128.                 }
  129.                 var pageUrl = window.location.href;
  130.                 var pathName = window.location.pathname;
  131.                 var dataLayerPushed = false;
  132.                 var schemaPushed = false;
  133.                 function pushDataLayer(data) {
  134.                     if (!dataLayerPushed) {
  135.                         window.dataLayer = window.dataLayer || [];
  136.                         window.dataLayer.push(data);
  137.                         dataLayerPushed = true;
  138.                         //console.log('Aviatur DataLayer pushed:', data);
  139.                     }
  140.                 }
  141.                 function pushSchemaOrg(data) {
  142.                     if (!schemaPushed) {
  143.                         var script = document.createElement('script');
  144.                         script.type = 'application/ld+json';
  145.                         script.textContent = JSON.stringify(data);
  146.                         document.head.appendChild(script);
  147.                         schemaPushed = true;
  148.                         //console.log('Aviatur Schema.org pushed:', data);
  149.                     }
  150.                 }
  151.                 function executeDataLayerAndSchemaLogic(avflightData) {
  152.                     var currentPrice = (avflightData && avflightData.attributes && typeof avflightData.attributes.minPrice === 'number') ? avflightData.attributes.minPrice.toString() : 'variable';
  153.                     var detectedOriginIata = (avflightData && avflightData.attributes && avflightData.attributes.AvailabilityType && avflightData.attributes.AvailabilityType.variable && avflightData.attributes.AvailabilityType.variable.origin1) ? avflightData.attributes.AvailabilityType.variable.origin1 : null;
  154.                     var detectedDestinationIata = (avflightData && avflightData.attributes && avflightData.attributes.AvailabilityType && avflightData.attributes.AvailabilityType.variable && avflightData.attributes.AvailabilityType.variable.destination1) ? avflightData.attributes.AvailabilityType.variable.destination1 : null;
  155.                     var arrivalAirportCodeDetected = (avflightData && avflightData.filterEntities && avflightData.filterEntities.airports) ? avflightData.filterEntities.airports[detectedDestinationIata][detectedDestinationIata] : null;
  156.                     // --- Lógica para URLs de REGIONES/PAÍSES: /tiquetes-baratos-a/[region/pais] ---
  157.                     var matchRegionPage = pageUrl.match(/\/tiquetes-baratos-a\/(colombia|america|oceania|europa|africa|asia)(?:\/.*)?$/);
  158.                     if (matchRegionPage && matchRegionPage[1]) {
  159.                         var regionSlug = matchRegionPage[1];
  160.                         var regionInfo = getIataInfo(regionSlug);
  161.                         var regionDisplayName = regionInfo ? regionInfo.name : regionSlug.charAt(0).toUpperCase() + regionSlug.slice(1);
  162.                         pushDataLayer({
  163.                             'event': 'pageview',
  164.                             'pageType': 'flightRegionSearch',
  165.                             'region': regionDisplayName,
  166.                             'agencyName': defaultAgencyName,
  167.                             'agencyUrl': defaultAgencyUrl,
  168.                             'currency': defaultCurrency,
  169.                             //'price': currentPrice 
  170.                         });
  171.                         var schemaWebPage = {
  172.                             "@context": "https://schema.org",
  173.                             "@type": "WebPage",
  174.                             "name": "Vuelos baratos a " + regionDisplayName,
  175.                             "url": pageUrl,
  176.                             "description": "Encuentra los mejores tiquetes y ofertas de vuelos a " + regionDisplayName + " con " + defaultAgencyName + ". Utiliza nuestro buscador para encontrar tu destino ideal.",
  177.                             "isPartOf": {
  178.                                 "@type": "WebSite",
  179.                                 "name": defaultAgencyName,
  180.                                 "url": defaultAgencyUrl
  181.                             },
  182.                             //"mainEntity": {
  183.                             //    "@type": "SearchAction",
  184.                             //    "target": "https://www.aviatur.com/buscador?q={search_term_string}",
  185.                             //    "queryInput": "required name=search_term_string"
  186.                             //}
  187.                         };
  188.                         if (typeof avflightData.minPrice === 'number') {
  189.                             schemaWebPage.offers = {
  190.                                 "@type": "AggregateOffer",
  191.                                 "lowPrice": avflightData.minPrice.toString(),
  192.                                 "priceCurrency": defaultCurrency
  193.                             };
  194.                         }
  195.                         pushSchemaOrg(schemaWebPage);
  196.                     }
  197.                     // --- Lógica para URLs de RUTA ESPECÍFICA: /vuelos/Tiquetes-economicos-ORIGEN-a-DESTINO o vuelos/tiquetes-baratos-de-[ORIGEN]-a-[DESTINO] ---
  198.                     else if (pageUrl.includes('/vuelos/Tiquetes-economicos-') || pageUrl.includes('/vuelos/tiquetes-baratos-de-')) {
  199.                         var originCitySlugOrIata, destinationCitySlugOrIata;
  200.                         var routeMatch;
  201.                         if (pageUrl.includes('/vuelos/Tiquetes-economicos-')) {
  202.                             var lastPart = pathName.split('/').pop();
  203.                             routeMatch = lastPart.match(/Tiquetes-economicos-([a-zA-Z0-9-]+)-a-([a-zA-Z0-9-]+)/);
  204.                         } else if (pageUrl.includes('/vuelos/tiquetes-baratos-de-')) {
  205.                             var lastPart = pathName.split('/').pop();
  206.                             routeMatch = lastPart.match(/tiquetes-baratos-de-([a-zA-Z0-9-]+)-a-([a-zA-Z0-9-]+)/);
  207.                         }
  208.                         var departureAirportCode = detectedOriginIata;
  209.                         var arrivalAirportCode = detectedDestinationIata;
  210.                         if (!departureAirportCode && routeMatch) {
  211.                             departureAirportCode = getIataInfo(routeMatch[1]) ? getIataInfo(routeMatch[1]).code : routeMatch[1].toUpperCase();
  212.                             console.warn('Aviatur: Origen IATA no encontrado en AVflight, extrayendo de URL:', departureAirportCode);
  213.                         }
  214.                         if (!arrivalAirportCode && routeMatch) {
  215.                             arrivalAirportCode = getIataInfo(routeMatch[2]) ? getIataInfo(routeMatch[2]).code : routeMatch[2].toUpperCase();
  216.                             console.warn('Aviatur: Destino IATA no encontrado en AVflight, extrayendo de URL:', arrivalAirportCode);
  217.                         }
  218.                         // Obtener nombres completos usando los IATAs finales
  219.                         var originInfo = getIataInfo(departureAirportCode);
  220.                         var destinationInfo = getIataInfo(arrivalAirportCode);
  221.                         var departureAirportFullName = originInfo ? originInfo.name : (departureAirportCode || defaultDepartureAirportName);
  222.                         var arrivalAirportFullName = destinationInfo ? destinationInfo.name : (arrivalAirportCode || arrivalAirportCodeDetected);
  223.                         var flightName = "Vuelos baratos a " + AvailabilityArray.cityDestination1;
  224.                         var sku = (departureAirportCode && arrivalAirportCode) ? departureAirportCode + '-' + arrivalAirportCode : null;
  225.                         pushDataLayer({
  226.                             'event': 'pageview',
  227.                             'pageType': 'flightDestination',
  228.                             'destination': arrivalAirportFullName,
  229.                             'departureAirport': departureAirportCode,
  230.                             'arrivalAirport': arrivalAirportCode,
  231.                             'currency': defaultCurrency,
  232.                             'price': currentPrice,
  233.                             'agencyName': defaultAgencyName,
  234.                             'agencyUrl': defaultAgencyUrl
  235.                         });
  236.                         if (arrivalAirportCode && departureAirportCode) {
  237.                             var schemaData = {
  238.                                 "@context": "https://schema.org",
  239.                                 "@type": ["Flight"],
  240.                                 "name": flightName,
  241.                                 "url": pageUrl,
  242.                                 "provider": {
  243.                                     "@type": "Organization",
  244.                                     "name": defaultAgencyName,
  245.                                     "url": defaultAgencyUrl
  246.                                 },
  247.                                 "departureAirport": {
  248.                                     "@type": "Airport",
  249.                                     "name": departureAirportFullName,
  250.                                     "iataCode": departureAirportCode
  251.                                 },
  252.                                 "arrivalAirport": {
  253.                                     "@type": "Airport",
  254.                                     "name": arrivalAirportFullName,
  255.                                     "iataCode": arrivalAirportCode
  256.                                 },
  257.                                 "offers": {
  258.                                     "@type": "Offer",
  259.                                     "url": pageUrl,
  260.                                     "priceCurrency": defaultCurrency,
  261.                                     "price": currentPrice,
  262.                                     "availability": "https://schema.org/InStock"
  263.                                 },
  264.                                 "sku": sku,
  265.                                 "brand": {
  266.                                     "@type": "Brand",
  267.                                     "name": defaultAgencyName
  268.                                 }
  269.                             };
  270.                             pushSchemaOrg(schemaData);
  271.                         } else {
  272.                             console.warn('Aviatur Schema.org (Flight/Product) no se pudo empujar debido a falta de códigos IATA para la ruta. Origen:', departureAirportCode, 'Destino:', arrivalAirportCode);
  273.                         }
  274.                     }
  275.                     // --- Lógica para URLs de DESTINO ESPECÍFICO: /tiquetes-baratos-a/[destino] ---
  276.                     // Ej: https://www.aviatur.com/tiquetes-baratos-a/cancun (Origen BOG por defecto, Destino variable)
  277.                     else if (pageUrl.match(/\/tiquetes-baratos-a\/([a-zA-Z0-9-]+)(?:\/.*)?$/)) {
  278.                         var matchDestino = pageUrl.match(/\/tiquetes-baratos-a\/([a-zA-Z0-9-]+)(?:\/.*)?$/);
  279.                         var destinationSlug = matchDestino[1];
  280.                         var arrivalAirportCode = detectedDestinationIata;
  281.                         if (!arrivalAirportCode) {
  282.                             var arrivalInfoFromSlug = getIataInfo(destinationSlug);
  283.                             arrivalAirportCode = arrivalInfoFromSlug ? arrivalInfoFromSlug.code : null;
  284.                             console.warn('Aviatur: Destino IATA no encontrado en AVflight, extrayendo de URL para /tiquetes-baratos-a/:', arrivalAirportCode);
  285.                         }
  286.                         var destinationInfo = getIataInfo(arrivalAirportCode);
  287.                         var destinationDisplayName = destinationInfo ? destinationInfo.name : destinationSlug.replace(/-/g, ' ').charAt(0).toUpperCase() + destinationSlug.replace(/-/g, ' ').slice(1);
  288.                         var arrivalAirportFullName = destinationInfo ? destinationInfo.name : destinationDisplayName;
  289.                         var departureAirportCode = defaultDepartureAirportCode; // Origen por defecto
  290.                         var departureAirportFullName = defaultDepartureAirportName;
  291.                         var sku = (arrivalAirportCode && departureAirportCode) ? departureAirportCode + '-' + arrivalAirportCode : null;
  292.                         var flightName = "Vuelos baratos a " + destinationDisplayName;
  293.                         pushDataLayer({
  294.                             'event': 'pageview',
  295.                             'pageType': 'flightDestinationPage',
  296.                             'destination': destinationDisplayName,
  297.                             'departureAirport': departureAirportCode,
  298.                             'arrivalAirport': arrivalAirportCode,
  299.                             'currency': defaultCurrency,
  300.                             //'price': currentPrice,
  301.                             'agencyName': defaultAgencyName,
  302.                             'agencyUrl': defaultAgencyUrl
  303.                         });
  304.                         if (arrivalAirportCode && departureAirportCode) {
  305.                             var schemaData = {
  306.                                 "@context": "https://schema.org",
  307.                                 "@type": ["Flight"],
  308.                                 "name": flightName,
  309.                                 "url": pageUrl,
  310.                                 "provider": {
  311.                                     "@type": "Organization",
  312.                                     "name": defaultAgencyName,
  313.                                     "url": defaultAgencyUrl
  314.                                 },
  315.                                 "departureAirport": {
  316.                                     "@type": "Airport",
  317.                                     "name": departureAirportFullName,
  318.                                     "iataCode": departureAirportCode
  319.                                 },
  320.                                 "arrivalAirport": {
  321.                                     "@type": "Airport",
  322.                                     "name": arrivalAirportFullName,
  323.                                     "iataCode": arrivalAirportCode
  324.                                 },
  325.                                 "offers": {
  326.                                     "@type": "Offer",
  327.                                     "url": pageUrl,
  328.                                     "priceCurrency": defaultCurrency,
  329.                                     "price": currentPrice,
  330.                                     "availability": "https://schema.org/InStock"
  331.                                 },
  332.                                 "sku": sku,
  333.                                 "brand": {
  334.                                     "@type": "Brand",
  335.                                     "name": defaultAgencyName
  336.                                 }
  337.                             };
  338.                             pushSchemaOrg(schemaData);
  339.                         } else {
  340.                             console.warn('Aviatur Schema.org (Flight/Product) no se pudo empujar debido a falta de código IATA para el destino:', destinationSlug);
  341.                         }
  342.                     }
  343.                     // --- Lógica para URLs de DESTINO TURÍSTICO: /destinos/[ciudad] ---
  344.                     else if (pageUrl.match(/\/destinos\/([a-zA-Z0-9-]+)(?:\/.*)?$/)) {
  345.                         var matchDestinoTuristico = pageUrl.match(/\/destinos\/([a-zA-Z0-9-]+)(?:\/.*)?$/);
  346.                         var citySlug = matchDestinoTuristico[1];
  347.                         var cityInfo = getIataInfo(citySlug);
  348.                         var cityDisplayName = cityInfo ? cityInfo.name : citySlug.replace(/-/g, ' ').charAt(0).toUpperCase() + citySlug.replace(/-/g, ' ').slice(1);
  349.                         pushDataLayer({
  350.                             'event': 'pageview',
  351.                             'pageType': 'destinationGuidePage',
  352.                             'destinationCity': cityDisplayName,
  353.                             'agencyName': defaultAgencyName,
  354.                             'agencyUrl': defaultAgencyUrl
  355.                         });
  356.                         var schemaDestination = {
  357.                             "@context": "https://schema.org",
  358.                             "@type": "TouristDestination",
  359.                             "name": cityDisplayName,
  360.                             "url": pageUrl,
  361.                             "description": "Explora " + cityDisplayName + " con " + defaultAgencyName + ". Encuentra información sobre atracciones, actividades y opciones de viaje.",
  362.                             "address": {
  363.                                 "@type": "PostalAddress",
  364.                                 "addressLocality": cityDisplayName,
  365.                                 "addressCountry": "CO"
  366.                             },
  367.                             //"mainEntityOfPage": {
  368.                             //    "@type": "WebPage",
  369.                             //    "@id": pageUrl
  370.                             //},
  371.                             "provider": {
  372.                                 "@type": "Organization",
  373.                                 "name": defaultAgencyName,
  374.                                 "url": defaultAgencyUrl
  375.                             }
  376.                         };
  377.                         if (typeof avflightData.minPrice === 'number') {
  378.                             schemaDestination.offers = {
  379.                                 "@type": "AggregateOffer",
  380.                                 "lowPrice": avflightData.minPrice.toString(),
  381.                                 "priceCurrency": defaultCurrency
  382.                             };
  383.                         }
  384.                         pushSchemaOrg(schemaDestination);
  385.                     }
  386.                     else {
  387.                         // console.log('Aviatur: URL no coincide con los patrones de DataLayer/Schema definidos.');
  388.                     }
  389.                 }
  390.                 // --- Determinar si necesitamos esperar por AVflight ---
  391.                 var shouldWaitForAVflight = pageUrl.includes('/vuelos/Tiquetes-economicos-') || pageUrl.includes('/vuelos/tiquetes-baratos-de-');
  392.                 if (shouldWaitForAVflight) {
  393.                     //console.log('Aviatur: URL de vuelo detectada. Esperando por AVflight data (minPrice, IATAs)...');
  394.                     function waitForAVflightAndExecute() {
  395.                         if (window.AVflight && window.AVflight.data && window.AVflight.data.attributes) {
  396.                             executeDataLayerAndSchemaLogic(window.AVflight.data);
  397.                         } else {
  398.                             setTimeout(waitForAVflightAndExecute, 100);
  399.                         }
  400.                     }
  401.                     waitForAVflightAndExecute();
  402.                 } else {
  403.                     executeDataLayerAndSchemaLogic({});
  404.                 }
  405.             })();
  406.         </script>
  407.         {% if app.environment == 'dev' %}
  408.             {# FOR DEV ENV PURPOSES ONLY #}
  409.         {% endif %}
  410.         {# {% if app.environment != 'dev' %} #}
  411.         {# {% if pdfGenerator is not defined  %} #}
  412.             {# THIS PART still using deprecated ga.js (instead of analytics.js) on UA-12845048-1 #}
  413.             {# -> https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApi_gaq #}
  414.             {% if (app.request.server.get("HTTP_HOST")|replace({'www.':'','new.':'','site.':'','ecomm3.':'','ecomm5.':'','ecommprod.':'','productos.':'','go.':'','grupo':''}) == 'aviatur.com')%}
  415.                 {# <script type="text/javascript">
  416.                     var _gaq = _gaq || [];
  417.                     var pluginUrl =
  418.                         '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
  419.                     _gaq.push(['_require', 'inpage_linkid', pluginUrl]);
  420.                     _gaq.push(['_setAccount', 'UA-12845048-1']);
  421.                     _gaq.push(['_setDomainName', '{{app.request.server.get("HTTP_HOST")|replace({'www.':'','new.':'','site.':'','ecomm3.':'','ecomm5.':'','ecommprod.':'','productos.':'','go.':''})}}']);
  422.                     _gaq.push(['_setAllowLinker', true]);
  423.                     _gaq.push(['_setCampNameKey', 'utm_name']);
  424.                     _gaq.push(['_trackPageview']);
  425.                     (function () {
  426.                         var ga = document.createElement('script');
  427.                         ga.type = 'text/javascript';
  428.                         ga.async = true;
  429.                         ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
  430.                         var s = document.getElementsByTagName('script')[0];
  431.                         s.parentNode.insertBefore(ga, s);
  432.                     })();
  433.                 </script> #}
  434.             {% endif %}
  435.             <!-- Google Analytics -->
  436.             {# <script type="text/javascript">
  437.                 var clientId;
  438.                 var domain = '{{ app.session.get('domain') }}';
  439.                 var domainsecure = '{{ app.session.get('domainsecure') }}';
  440.                 (function (i, s, o, g, r, a, m) {
  441.                     i['GoogleAnalyticsObject'] = r;
  442.                     i[r] = i[r] || function () {
  443.                         (i[r].q = i[r].q || []).push(arguments)
  444.                     }, i[r].l = 1 * new Date();
  445.                     a = s.createElement(o),
  446.                             m = s.getElementsByTagName(o)[0];
  447.                     a.async = 1;
  448.                     a.src = g;
  449.                     m.parentNode.insertBefore(a, m)
  450.                 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
  451.                 ga('create', 'UA-12845048-7', 'auto', {'cookieFlags': 'secure;samesite=none',cookieDomain: '{{app.request.server.get("HTTP_HOST")|replace({'www.':'','new.':'','site.':'','ecomm3.':'','ecomm5.':'','ecommprod.':'','productos.':'','go.':''})}}', allowLinker: true});
  452.                 ga('require', 'GTM-5NX36SQ'); // deploy Google Optimize
  453.                 ga('require', 'displayfeatures');
  454.                 ga('require', 'linkid', 'linkid.js');
  455.                 ga('require', 'linker');
  456.                 ga('require', 'ec');
  457.                 ga('linker:autoLink', [domain, domainsecure, 'aviatur.com', 'grupoaviatur.com']);
  458.                 ga('linker:autoLink', [domain, domainsecure, 'aviatur.com', 'grupoaviatur.com'], false, true);
  459.                 var dimensionValue = '{{ app.request.server.get("REMOTE_ADDR") }}';
  460.                 var itmSource = '';
  461.                 var itmMedium = '';
  462.                 var itmContent = '';
  463.                 var itmCampaign = '';
  464.                 var itmTerm = '';
  465.                 {% if app.session.has('transactionId') %}
  466.                     var dimensionValue2 = '{{ app.session.get('transactionId') }}';
  467.                 {% else %}
  468.                     var dimensionValue2 = '';
  469.                 {% endif %}
  470.                 {% if app.request.query.get('itm_source') != NULL %}
  471.                     itmSource = '{{app.request.query.get('itm_source')}}';
  472.                     var dimensionValue3 = itmSource;
  473.                     var dimensionValue6 = itmSource;
  474.                     var dimensionValue17 = itmSource;
  475.                 {% else %}
  476.                     var dimensionValue3 = '';
  477.                     var dimensionValue6 = '';
  478.                     var dimensionValue17 = '';
  479.                 {% endif %}
  480.                 {% if app.request.query.get('itm_medium')!= NULL%}
  481.                     itmMedium = '{{app.request.query.get('itm_medium')}}';
  482.                     var dimensionValue4 = itmMedium;
  483.                     var dimensionValue14 = itmMedium;
  484.                 {% else %}
  485.                     var dimensionValue4 = '';
  486.                     var dimensionValue14 = '';
  487.                 {% endif %}
  488.                 {% if app.request.query.get('itm_content') != NULL%}
  489.                     itmContent = '{{app.request.query.get('itm_content')}}';
  490.                     var dimensionValue5 = itmContent;
  491.                     var dimensionValue16 = itmContent;
  492.                 {% else %}
  493.                     var dimensionValue5 = '';
  494.                     var dimensionValue16 = '';
  495.                 {% endif %}
  496.                 {% if app.request.query.get('itm_campaign') != NULL%}
  497.                     itmCampaign = '{{app.request.query.get('itm_campaign')}}';
  498.                     var dimensionValue15 = itmCampaign;
  499.                     var dimensionValue18 = itmCampaign;
  500.                 {% else %}
  501.                     var dimensionValue15 = '';
  502.                     var dimensionValue18 = '';
  503.                 {% endif %}
  504.                 {% if app.request.query.get('itm_term') != NULL%}
  505.                     itmTerm = '{{app.request.query.get('itm_term')}}';
  506.                     var dimensionValue19 = itmTerm;
  507.                     var dimensionValue20 = itmTerm;
  508.                 {% else %}
  509.                     var dimensionValue19 = '';
  510.                     var dimensionValue20 = '';
  511.                 {% endif %}
  512.                     var dimensionValue7 = '';
  513.                     var dimensionValue8 = '';
  514.                     var dimensionValue9 = '';
  515.                     var dimensionValue10 = '';
  516.                     var dimensionValue11 = '';
  517.                     var dimensionValue12 = '';
  518.                     var dimensionValue13 = '';
  519.                     ga('send', 'pageview', {
  520.                         'dimension1': dimensionValue,
  521.                         'dimension2': dimensionValue2,
  522.                         'dimension3': dimensionValue3,
  523.                         'dimension4': dimensionValue4,
  524.                         'dimension5': dimensionValue5,
  525.                         'dimension6': dimensionValue6,
  526.                         'dimension7': dimensionValue7,
  527.                         'dimension8': dimensionValue8,
  528.                         'dimension9': dimensionValue9,
  529.                         'dimension10': dimensionValue10,
  530.                         'dimension11': dimensionValue11,
  531.                         'dimension12': dimensionValue12,
  532.                         'dimension13': dimensionValue13,
  533.                         'dimension14': dimensionValue14,
  534.                         'dimension15': dimensionValue15,
  535.                         'dimension16': dimensionValue16,
  536.                         'dimension17': dimensionValue17,
  537.                         'dimension18': dimensionValue18,
  538.                         'dimension19': dimensionValue19,
  539.                         'dimension20': dimensionValue20}
  540.                     );
  541.                     setTimeout(ga('send', 'event', 'Bounce Rate Fix', 'Minimum stay of 30 seconds'), 30000);
  542.             </script> #}
  543.             <!-- end Google Analytics -->
  544.             <!-- Google Tag Manager -->
  545.             <!-- Google tag (gtag.js) -->
  546.             <!-- End Google Tag Manager -->
  547.             {# <!-- Start Alexa Certify Javascript -->
  548.             <script type="text/javascript">
  549.                 _atrk_opts = {atrk_acct: "JVF0h1awA400Gn", domain: "aviatur.com", dynamic: true};
  550.                 (function () {
  551.                     var as = document.createElement('script');
  552.                     as.type = 'text/javascript';
  553.                     as.async = true;
  554.                     as.src = "https://d31qbv1cthcecs.cloudfront.net/atrk.js";
  555.                     var s = document.getElementsByTagName('script')[0];
  556.                     s.parentNode.insertBefore(as, s);
  557.                 })();
  558.             </script>
  559.             <noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=JVF0h1awA400Gn" style="display:none" height="1" width="1" alt="" /></noscript>
  560.             <!-- End Alexa Certify Javascript -->#}
  561.             {#{% if app.session.has('operatorId') != 1 %}
  562.                 <!-- Start VE Javascript -->
  563.                 <script type="text/javascript">
  564.                     !function () {
  565.                         var a = document.createElement("script");
  566.                         a.type = "text/javascript", a.async = !0, a.src = "//configusa.veinteractive.com/tags/F1B0EFA4/B7BA/44F1/B74B/C723B9D6557E/tag.js";
  567.                         var b = document.getElementsByTagName("head")[0];
  568.                         if (b)
  569.                             b.appendChild(a, b);
  570.                         else {
  571.                             var b = document.getElementsByTagName("script")[0];
  572.                             b.parentNode.insertBefore(a, b)
  573.                         }
  574.                     }();
  575.                 </script>
  576.                 <!-- End VE Javascript -->
  577.             {% endif %}#}
  578.             {#<!-- CRAZY EGG SCRIPT -->
  579.             <script type="text/javascript">
  580.                 setTimeout(function () {
  581.                     var a = document.createElement("script");
  582.                     var b = document.getElementsByTagName("script")[0];
  583.                     a.src = document.location.protocol + "//script.crazyegg.com/pages/scripts/0053/3352.js?" + Math.floor(new Date().getTime() / 3600000);
  584.                     a.async = true;
  585.                     a.type = "text/javascript";
  586.                     b.parentNode.insertBefore(a, b);
  587.                 }, 1);
  588.             </script>
  589.             <!-- END CRAZY EGG SCRIPT -->#}
  590.             {# end scripts #}
  591.         {# {% else %} #}
  592.             <script type="text/javascript">
  593.                 var domain = '{{ app.session.get('domain') }}';
  594.                 var domainsecure = '{{ app.session.get('domainsecure') }}';
  595.                 function ga(d1, d2, d3, d4, d5) {
  596.                 {# setTimeout(function () {
  597.                     console.groupCollapsed('-- GA disabled in dev environment --');
  598.                     console.log([d1, d2, d3, d4, d5]);
  599.                     console.trace();
  600.                     console.groupEnd();
  601.                 }, 0); #}
  602.                         return false;
  603.                     }
  604.             </script>
  605.         {# {% endif %} #}
  606.         {# Parametrización cerrar modal login #}
  607.         {% if parameters['aviatur_close_modal_login'] is defined %}
  608.             {% set activate_login = json_decode(parameters['aviatur_close_modal_login'], true) %}
  609.             {% if activate_login[app.session.get('agencyId')] is defined %}
  610.                 {% set swLoginClose = activate_login[app.session.get('agencyId')] %}
  611.             {% else %}
  612.                 {% set swLoginClose = activate_login['all'] %}
  613.             {% endif %}
  614.         {% endif %}
  615.         {# Fin parametrización cerrar modal login #}
  616.         {# Parametrización boton continuar sin iniciar sesión #}
  617.         {% if parameters['aviatur_continue_without_logging'] is defined %}
  618.             {% set continue_without_logging = json_decode(parameters['aviatur_continue_without_logging'], true) %}
  619.             {% if continue_without_logging[app.session.get('agencyId')] is defined %}
  620.                 {% set continueWithoutLogging = continue_without_logging[app.session.get('agencyId')] %}
  621.             {% else %}
  622.                 {% set continueWithoutLogging = continue_without_logging['all'] %}
  623.             {% endif %}
  624.         {% endif %}
  625.         {# Fin parametrización boton continuar sin iniciar sesión #}
  626.         {# Parametrización resultados de Booking en vuelos #}
  627.         {% if parameters['aviatur_flight_result_booking'] is defined %}
  628.             {% set flight_result_booking = parameters['aviatur_flight_result_booking'] %}
  629.         {% endif %}
  630.         {# Fin parametrización resultados de Booking en vuelos #}
  631.         <!-- Meta Pixel Code -->
  632.         {# <script>
  633.         !function(f,b,e,v,n,t,s)
  634.         {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  635.         n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  636.         if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  637.         n.queue=[];t=b.createElement(e);t.async=!0;
  638.         t.src=v;s=b.getElementsByTagName(e)[0];
  639.         s.parentNode.insertBefore(t,s)}(window, document,'script',
  640.         'https://connect.facebook.net/en_US/fbevents.js');
  641.         fbq('init', '1007670546538389');
  642.         fbq('track', 'PageView');
  643.         </script>
  644.         <noscript><img height="1" width="1" style="display:none"
  645.         src="https://www.facebook.com/tr?id=1007670546538389&ev=PageView&noscript=1"
  646.         /></noscript> #}
  647.         <!-- End Meta Pixel Code -->
  648.         <!-- Meta Pixel Code -->
  649.         {# <script>
  650.         !function(f,b,e,v,n,t,s)
  651.         {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  652.         n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  653.         if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  654.         n.queue=[];t=b.createElement(e);t.async=!0;
  655.         t.src=v;s=b.getElementsByTagName(e)[0];
  656.         s.parentNode.insertBefore(t,s)}(window, document,'script',
  657.         'https://connect.facebook.net/en_US/fbevents.js');
  658.         fbq('init', '1007670546538389');
  659.         fbq('track', 'PageView');
  660.         </script>
  661.         <noscript><img height="1" width="1" style="display:none"
  662.         src="https://www.facebook.com/tr?id=1007670546538389&ev=PageView&noscript=1"
  663.         /></noscript> #}
  664.         <!-- End Meta Pixel Code -->
  665.         {# <script>
  666.             var swIsBlackWeek;
  667.             var continueWithoutLogging = '{{continueWithoutLogging}}';
  668.             {% if parameters['isBlackWeek'] is defined and parameters['isBlackWeek'] == 'true' %}
  669.                 swIsBlackWeek = '{{parameters['isBlackWeek']}}';
  670.             {% endif %}
  671.             /* Variable de parametro de resultados de booking en vuelos (SOLO AVIATUR)*/
  672.             var flight_result_booking = '{{flight_result_booking}}';
  673.             /* Fin variable de parametro de resultados de booking en vuelos (SOLO AVIATUR)*/
  674.             var swLoginClose = '{{swLoginClose}}';
  675.             var clicked = false;
  676.             var pathname = window.location.pathname.split('/');
  677.             var googleUser = {};
  678.             var startApp = function () {
  679.                 gapi.load('auth2', function () {
  680.                     // Retrieve the singleton for the GoogleAuth library and set up the client.
  681.                     auth2 = gapi.auth2.init({
  682.                         client_id: '{{google_idclient_login}}',
  683.                         cookiepolicy: 'single_host_origin'
  684.                     });
  685.                     attachSignin(document.getElementById('customBtn'));
  686.                 });
  687.             };
  688.             function attachSignin(element) {
  689.                 auth2.attachClickHandler(element, {},
  690.                         function (googleUser) {
  691.                             var profile = googleUser.getBasicProfile();
  692.                             var $modalLogin = jQuery('#js-modalLogin');
  693.                             var id_token = googleUser.getAuthResponse().id_token;
  694.                             jQuery(".js-globalOverlay").attr("style", "z-index: 1200 !important;");
  695.                             jQuery(".js-globalOverlay-text").text("Iniciando sesión");
  696.                             jQuery(".js-globalOverlay").show();
  697.                             jQuery.ajax({
  698.                                 url: '/customer/social-networks-callback',
  699.                                 type: 'POST',
  700.                                 data: {idtoken: id_token, red: "google"},
  701.                                 crossDomain: true,
  702.                                 beforeSend: function () {
  703.                                     jQuery(".js-globalOverlay-text").text("Iniciando sesión");
  704.                                     jQuery(".js-globalOverlay").show();
  705.                                 },
  706.                                 success: function (data) {
  707.                                     if (data.status == "redirect") {
  708.                                         signOut();
  709.                                         if (pathname[2] == "detalle" || pathname[2] == "pasajeros-reserva" || pathname[2] == "formulario") {
  710.                                             location.reload();
  711.                                         } else {
  712.                                             window.location.replace("/");
  713.                                         }
  714.                                     }
  715.                                 },
  716.                                 error: function () {
  717.                                     $modalLogin.find('.close[data-dismiss="modal"]').trigger('click');
  718.                                     jQuery(".js-globalOverlay").hide();
  719.                                 },
  720.                                 complete: function () {}
  721.                             });
  722.                             /*document.getElementById('name').innerText = "Signed in: " +
  723.                              googleUser.getBasicProfile().getName();*/
  724.                         }, function (error) {
  725.                     //alert(JSON.stringify(error, undefined, 2));
  726.                 });
  727.             }
  728.             function signOut() {
  729.                 var auth2 = gapi.auth2.getAuthInstance();
  730.                 auth2.signOut().then(function () {});
  731.             }
  732.         </script> #}
  733.         {# <script>
  734.             var fbid = '{{facebook_appid_login}}';
  735.             window.fbAsyncInit = function () {
  736.                 FB.init({
  737.                     appId: fbid,
  738.                     cookie: true,
  739.                     xfbml: true,
  740.                     version: 'v6.0',
  741.                     oauth: true,
  742.                     status: true
  743.                 });
  744.                 FB.AppEvents.logPageView();
  745.             };
  746.             (function (d, s, id) {
  747.                 var js, fjs = d.getElementsByTagName(s)[0];
  748.                 if (d.getElementById(id)) {
  749.                     return;
  750.                 }
  751.                 js = d.createElement(s);
  752.                 js.id = id;
  753.                 js.src = "https://connect.facebook.net/en_US/sdk.js";
  754.                 fjs.parentNode.insertBefore(js, fjs);
  755.             }(document, 'script', 'facebook-jssdk'));
  756.             function loginFace() {
  757.                 FB.login(function (response) {
  758.                     if (response.authResponse) {
  759.                         var $modalLogin = jQuery('#js-modalLogin');
  760.                         //console.log('Welcome!  Fetching your information.... ');
  761.                         FB.api('/me', {fields: 'first_name, last_name, email, picture'}, function (response2) {
  762.                             response2.picture2 = "http://graph.facebook.com/" + response2.id + "/picture?type=normal";
  763.                             jQuery(".js-globalOverlay").attr("style", "z-index: 1200 !important;");
  764.                             jQuery(".js-globalOverlay-text").text("Iniciando sesión");
  765.                             jQuery(".js-globalOverlay").show();
  766.                             jQuery.ajax({
  767.                                 url: '/customer/social-networks-callback',
  768.                                 type: 'POST',
  769.                                 crossDomain: true,
  770.                                 data: {data: response2, red: "facebook"},
  771.                                 //async: true,
  772.                                 success: function (data) {
  773.                                     if (data.status == "redirect") {
  774.                                         FB.logout();
  775.                                         if (pathname[2] == "detalle" || pathname[2] == "pasajeros-reserva" || pathname[2] == "formulario") {
  776.                                             location.reload();
  777.                                         } else {
  778.                                             window.location.replace("/");
  779.                                         }
  780.                                     }
  781.                                 },
  782.                                 error: function () {
  783.                                     $modalLogin.find('.close[data-dismiss="modal"]').trigger('click');
  784.                                     jQuery(".js-globalOverlay").hide();
  785.                                 },
  786.                                 complete: function () {}
  787.                             });
  788.                         });
  789.                     } else {
  790.                         console.log('User cancelled login or did not fully authorize.');
  791.                     }
  792.                 }, {scope: 'email,public_profile'});
  793.             }
  794.         </script> #}
  795.         {% if app.user %}
  796.             <script>
  797.                 var customerLogged = true;
  798.                 var documentNum = '{{app.user.documentNumber}}';
  799.                 var documentType = '{{app.user.documentType}}';
  800.                 var customerId = '{{app.user.id}}';
  801.                 {%if parameters['switch_login_agencies'] is defined %}
  802.                     {% set login_agencies = json_decode(parameters['switch_login_agencies'], true) %}
  803.                     {% if login_agencies[app.session.get('agencyId')] is defined %}
  804.                         {% set login_is_on = login_agencies[app.session.get('agencyId')] %}
  805.                     {% else %}
  806.                         {% set login_is_on = login_agencies['all'] %}
  807.                     {% endif %}
  808.                 {% else %}
  809.                     {% set login_is_on = '0' %}
  810.                 {% endif %}
  811.                     var login_is_on = "{{login_is_on}}";
  812.             </script>
  813.         {% else %}
  814.             <script>var customerLogged = false;</script>
  815.         {% endif %}
  816.         {% if 'aviatur_general_homepage' in app.request.get('_route') %}
  817.             {% if app.user.username is defined %}
  818.                 <script>
  819.                     jQuery(document).ready(function () {
  820.                         var dtCustomerFacebook = '{{app.user.facebookId}}';
  821.                         var dtCustomerGoogle = '{{app.user.googleId}}';
  822.                         var address = '{{app.user.address}}';
  823.                         var documentNum = '{{app.user.documentNumber}}';
  824.                         if (dtCustomerFacebook || dtCustomerGoogle) {
  825.                             if (documentNum.length == 0 && address.length == 0) {
  826.                                 window.location.replace("/customer/edit");
  827.                             }
  828.                         }
  829.                     });
  830.                 </script>
  831.             {% else %}
  832.                 <script>
  833.                     sessionStorage.setItem('countDialogLogin', 0);
  834.                     var countDialogLogin = 0;
  835.                     jQuery(document).ready(function () {
  836.                         jQuery("#close-dialog-login").on('click', function () {
  837.                             jQuery("#dialog-login-home").hide();
  838.                         });
  839.                     });
  840.                 </script>
  841.             {% endif %}
  842.         {% endif %}
  843.         {% if 'aviatur_customer_edit_info' in app.request.get('_route') %}
  844.             {% if app.user.username is defined %}
  845.                 <script>
  846.                     jQuery(document).ready(function () {
  847.                         var dtCustomerFacebook = '{{app.user.facebookId}}';
  848.                         var dtCustomerGoogle = '{{app.user.googleId}}';
  849.                         jQuery("#customer_edit_form_email").attr("type", "email");
  850.                         jQuery("#customer_edit_form_CivilStatus").parent().parent().parent().hide();
  851.                         if (dtCustomerFacebook || dtCustomerGoogle) {
  852.                             if (jQuery("#customer_edit_form_DocumentNumber").val() == "") {
  853.                                 jQuery("#customer_edit_form_DocumentNumber").removeAttr("readonly");
  854.                             }
  855.                             jQuery(".js-reserva-submit-password").hide();
  856.                             jQuery("#customer_edit_form_email").hide();
  857.                             jQuery('[for^="customer_edit_form_email"]').hide();
  858.                         }
  859.                         //jQuery("#customer_edit_form_DocumentNumber").removeAttr("readonly");
  860.                     });
  861.                 </script>
  862.             {% endif %}
  863.         {% endif %}
  864.         {% if app.session.get('AnonymousEmail') is not null %}
  865.             {# When user set email on "See Booking", this JS set email in input after redirection #}
  866.             {% set anonymousEmail = app.session.get('AnonymousEmail') %}
  867.             <script type="text/javascript">
  868.                 jQuery(document).ready(function () {
  869.                     var anonymousEmail = "{{ anonymousEmail }}";
  870.                     jQuery("#username").val(anonymousEmail);
  871.                     jQuery("#fos_user_registration_form_email").val(anonymousEmail);
  872.                 });
  873.             </script>
  874.         {% endif %}
  875.         {% block javascripts_header %}
  876.             <!-- Analitics Meeting Google Tag Manager -->
  877.             <script>
  878.                 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  879.                 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  880.                 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  881.                 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  882.                 })(window,document,'script','dataLayer','G-F7HCPZYNHK');
  883.             </script>
  884.             <!-- Analitics Meeting End Google Tag Manager -->
  885.             {% if app.session.get('WorldChangeCoin') is defined and app.session.get('WorldChangeCoin') == 'true' %}
  886.                 <script type="text/javascript">
  887.                     jQuery(document).ready(function () {
  888.                         var sessionCoinSelection = {% if app.session.get('typeCoin') is defined and app.session.get('typeCoin') != '' %}"{{ app.session.get('typeCoin')}}" {% else %} undefined{% endif %};
  889.                         var coin = "{% if app.session.get('typeCoin') is defined and app.session.get('typeCoin') != '' %}{{ app.session.get('typeCoin')}}{% else %}COP{% endif%}";
  890.                         var country = "{% if app.session.get('typeCountry') is defined and app.session.get('typeCountry') != '' %}{{ app.session.get('typeCountry')}}{% else %}co{% endif%}";
  891.                         if (coin != 'COP') {
  892.                             if (typeof sessionStorage.frontCoinSelection !== 'undefined' && coin == sessionStorage.frontCoinSelection) {
  893.                                 coin = sessionStorage.frontCoinSelection;
  894.                                 country = sessionStorage.frontCoinSelection.substr(0, 2).toLowerCase();
  895.                             }
  896.                         }
  897.                         var imgCoin = jQuery('<div class="inline-flex justify-between items-center w-full"><span class="text-base font-[Ubuntu] font-bold">' + coin + '</span><span class="material-symbols-rounded">arrow_drop_down</span></div>');
  898.                         _buttonChange(imgCoin);
  899.                         jQuery('.dropbtn').empty().append(imgCoin);
  900.                         jQuery('.dropbtn').click(function () {
  901.                             _buttonCoin();
  902.                         });
  903.                         jQuery('.coin').click(function () {
  904.                             jQuery('.js-loadingChangeCoin').show();
  905.                             _buttonChange(jQuery(this));
  906.                         });
  907.                     });
  908.                 </script>
  909.             {% endif %}
  910.             {% if cards is defined and cybersource.org_id is defined %}
  911.                 {% set src = "https://h.online-metrix.net/fp/tags.js?org_id=" ~ cybersource.org_id ~ "&session_id=aviaturcom"~ app.session.get('transactionId') %}
  912.                 <script type="text/javascript" src="{{src}}"></script>
  913.             {% endif %}
  914.             {# <script>(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:2636574,hjsv:6};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script> #}
  915.         {% endblock %}
  916.     </head>
  917.     <body class="{% block body_class %}body-page-{{ app.request.get('_route')|replace({'_': '-'}) }}{% endblock %}">
  918.         <div class="container" style="margin-top:0;">
  919.             <div id="js-modalErrorUrl" class="!fixed grid grid-cols-12 justify-items-center items-center h-full w-full bg-black bg-opacity-50 left-0 top-0 z-[103] modal-general">
  920.                 <div class="bg-[#F3F6F8] w-[36rem] xs:w-96 h-96 xs:h-auto rounded-lg col-span-12 grid grid-cols-12 justify-items-center px-8 py-4 gap-y-6">
  921.                     {# <button type="button" class="text-[#042A44] col-start-12 js-modal-errorUrl__btnClose" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> #}
  922.                     <button type="button" class="text-[#042A44] col-start-12 js-modal-errorUrl__btnClose" data-dismiss="modal"><span class="material-symbols-rounded">close</span></button>
  923.                     <p class="col-span-12 w-2/3 xs:w-full text-[#005CB9] text-center font-[Roboto] text-2xl font-medium js-modalErrorUrlTitle">Lo sentimos, <span class="text-[#042A44]">no es posible reservar en línea</span></p>
  924.                     <p class="col-span-12 w-4/5 xs:w-full text-[#2F2F2F] text-center font-[Ubuntu] text-base font-light js-modalErrorUrlContent">Las fechas seleccionadas corresponden para el mismo día, por politicas del servicio <strong>uno de nuestros asesores lo asistirá personalmente.</strong></p>
  925.                     <div class="grid grid-flow-col xs:grid-flow-dense col-span-12 gap-4">
  926.                         {# <a href="https://web.whatsapp.com/send?phone=5713821616&amp;text=" target="_blank" class="js-phone grid grid-flow-col items-center py-3.5 px-12 rounded-full bg-[#FFF] shadow-[0px_1px_12.2px_1px_rgba(0,0,0,0.10)] gap-2 text-[#042A44] font-[Roboto] text-sm font-normal"><span class="material-symbols-rounded">call</span>Lo llamamos</a> #}
  927.                         {% if app.session.has('operatorId') != 1 %}
  928.                         <a href="https://web.whatsapp.com/send?phone=5713821616&amp;text=" target="_blank"
  929.                             class="grid grid-flow-col items-center py-3.5 px-12 rounded-full bg-[#00C77C] shadow-[0px_1px_12.2px_1px_rgba(0,0,0,0.10)] gap-2 text-[#FFF] font-[Roboto] text-sm font-normal js-modalErrorWppHref"><span
  930.                                 class="material-symbols-rounded">person</span>Hablar con un asesor</a>
  931.                         {% else %}
  932.                         <a target="_blank"
  933.                             class="grid grid-flow-col items-center py-3.5 px-12 rounded-full bg-[#00C77C] shadow-[0px_1px_12.2px_1px_rgba(0,0,0,0.10)] gap-2 text-[#FFF] font-[Roboto] text-sm font-normal js-modalErrorWppHref"><span
  934.                                 class="material-symbols-rounded">person</span>Por favor comunicarce con el departamento de hoteles</a>
  935.                         {% endif %}
  936.                     </div>
  937.                     <span class="col-span-12 text-[#005CB9] font-[Roboto] text-base font-normal pointer underline searchNewDate js-searchNewDate">Ver otras fechas </span>
  938.                 </div>
  939.             </div>
  940.         </div>
  941.         <p class="app-name hide" style="display:none;" >{{ (app.session.get('domain')) }}</p>
  942.         {% block body_scripts %}
  943.             <!-- Analitics Meeting Google Tag Manager (noscript) -->
  944.             <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=G-F7HCPZYNHK"
  945.             height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  946.             <!-- Analitics Meeting End Google Tag Manager (noscript) -->
  947.             <!-- Fin Comentarios Contenidos -->
  948.             {% if cards is defined and cybersource.org_id is defined %}
  949.                 {% set src = "https://h.online-metrix.net/fp/tags?org_id="~cybersource.org_id~"&session_id=aviaturcom"~ app.session.get('transactionId') %}
  950.                 <noscript>
  951.                 <iframe style="width: 100px; height: 100px; border: 0; position:absolute; top: -5000px;" src="{{src}}"></iframe>
  952.                 </noscript>
  953.             {% endif %}
  954.         {% endblock %}
  955.         {% for flashMessage in app.session.flashbag.get('notice') %}
  956.             <div class="flash-notice">
  957.                 {{ flashMessage }}
  958.             </div>
  959.         {% endfor %}
  960.         {% block overlay %}
  961.             <div class="overlay js-globalOverlay" style="display: none;">
  962.                 <div class="overlay-center">
  963.                     <div id="js-spinOverlay" class="spinOverlay hide"></div>
  964.                     <div class="progress-bar"><div class="progress"><div class="indeterminate"></div></div></div>
  965.                     <p class="spin-text js-globalOverlay-text">Cargando...</p>
  966.                     {# <div class="progress-bar hidden-all js-progressBarTarget">
  967.                         <div class="progress-bar__container">
  968.                             <div class="progress-bar__bar js-progress"></div>
  969.                         </div>
  970.                     </div> #}
  971.                 </div>
  972.             </div>
  973.             <div class="responsive-js"></div>
  974.         {% endblock %}
  975.         {% block base_content %}
  976.             {% block header %}
  977.             {% endblock %}
  978.             {% block body %}
  979.             {% endblock body %}
  980.             {% block content %}
  981.             {% endblock content %}
  982.             {% block footer %}
  983.             {% endblock footer %}
  984.             {% block modal %}
  985.                 <div id="js-globalModal" class="modal fade">
  986.                     <div class="modal-dialog">
  987.                         <div class="modal-content">
  988.                             <div class="modal-header">
  989.                                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  990.                                 <h4 id="js-globalModal-title" class="modal-title">Modal title</h4>
  991.                             </div>
  992.                             <div class="modal-body">
  993.                                 <div id="js-globalModal-illustration" {# class="modal-illustration" #}></div>
  994.                                 <p id="js-globalModal-text" class="modal-text modal-text--error"></p>
  995.                             </div>
  996.                         </div>
  997.                     </div>
  998.                 </div>
  999.             {% endblock modal %}
  1000.         {% endblock base_content %}
  1001.         {% block javascripts %}
  1002.             <script>
  1003.                 document.addEventListener("DOMContentLoaded", function () {
  1004.                     const overlay = document.querySelector(".js-globalOverlay");
  1005.                     if (overlay) {
  1006.                         overlay.style.display = "none";
  1007.                         window.addEventListener("load", function () {
  1008.                             overlay.style.display = "none";
  1009.                         });
  1010.                         window.addEventListener("pageshow", function () {
  1011.                             overlay.style.display = "none";
  1012.                         });
  1013.                     }
  1014.                 });
  1015.             </script>
  1016.         {% endblock %}
  1017.         {% block AVglobal %}
  1018.             <span id="AVglobal-props" class="hidden-all">
  1019.                 <input type="hidden" id="AVglobal-hasOperatorId" value="{% if app.session.has('operatorId') == 1 %}1{% else %}0{% endif %}" >
  1020.             </span>
  1021.         {% endblock %}
  1022. {% block javascripts_bottom %}
  1023.             <!-- Google Optimize "CTA click submit" !! remove upon experiment completion !! -->
  1024.             {# <script src="{{ script('GeneralBundle//go_campaign.js') }}"></script>
  1025.             <script>
  1026.                 //var go__ctaSubmitHandler = function() {
  1027.                 //    ga('send', 'event', 'ga-cta', 'click', 'submit');
  1028.                 //};
  1029.                 //jQuery(document).ready(function () {
  1030.                 //    //jQuery(document).on('click', '.js-viewHomePromos', function () {
  1031.                 //    //    ga('send', 'event', 'ga-cta', 'click', 'submit');
  1032.                 //    //});
  1033.                 //    jQuery.subscribe('/paginator/switch', function(e, type) {
  1034.                 //        if (!!dataLayer) {
  1035.                 //            setTimeout(function () {
  1036.                 //                dataLayer.push({'event': 'optimize.activate'});
  1037.                 //                jQuery('.go__async-hide').removeClass('go__async-hide');
  1038.                 //            }, 0);
  1039.                 //        }
  1040.                 //        jQuery('#results .js-flight-block input[type="submit"]').off('click', go__ctaSubmitHandler).on('click', go__ctaSubmitHandler);
  1041.                 //    });
  1042.                 //});
  1043.                 //jQuery(document).on('renderComplete', function () {
  1044.                 //    if (!!dataLayer) {
  1045.                 //        setTimeout(function () {
  1046.                 //            dataLayer.push({'event': 'optimize.activate'});
  1047.                 //        }, 0);
  1048.                 //    }
  1049.                 //});
  1050.             </script> #}
  1051.             <!-- end Google Optimize "CTA click submit" -->
  1052.             <!-- Google recaptcha -->
  1053.             {# <script type="text/javascript">
  1054.                 var recaptchaCallback = function () {
  1055.                     var gCaptcha = grecaptcha.render('g-captcha', {
  1056.                         sitekey: '6LfsqrgZAAAAAJ8B40YoliLS2JyDOtmDWWcGfX5y',
  1057.                         theme: 'compact'
  1058.                     });
  1059.                 };
  1060.             </script>
  1061.             <script rel="prefetch" src='https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit&hl=es-419' as="script" async defer></script> #}
  1062.             <!-- END Google recaptcha -->
  1063.             {#{% if "now"|date('U') < '2016-04-28 00:00:00'|date('U') %}
  1064.                 <script type="application/javascript">
  1065.                     (function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'442260'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq");
  1066.                 </script>
  1067.             {% endif %}#}
  1068.             {#<script data-cfasync="false" type="text/javascript" async="" src="//configusa.veinteractive.com/tags/F1B0EFA4/B7BA/44F1/B74B/C723B9D6557E/tag.js"></script>#}
  1069.             {# Script emblue emails #}
  1070.             <script>
  1071.                 (function (w, d, k, t, u, s, c, f) {
  1072.                     f = function (t) {
  1073.                     t = new Date();
  1074.                     return t.getFullYear() + '' + (t.getMonth() + 1) + '' + t.getDate() + 'T' + t.getHours() + '' + t.getMinutes() + '' + t.getSeconds()};
  1075.                     u = 'https://widgets-static.embluemail.com/accounts/1975EE39BDC4D77E/scripts/sw_197.js?ts=' + f();w[k] = w[k] || [];
  1076.                     s = d.createElement(t);
  1077.                     s.async = 1;
  1078.                     s.src = u;
  1079.                     c = d.getElementsByTagName(t)[0];
  1080.                     c.parentNode.insertBefore(s, c);
  1081.                 })(window, document, '_swdg', 'script');
  1082.                 jQuery(document).ready(function () {
  1083.                     if (window.location.pathname.indexOf('experiencias') !== -1) {
  1084.                         let titleDisney = document.querySelector('.detail-experience__title') || null;
  1085.                         let isDisney = false;
  1086.                         if (titleDisney) {
  1087.                             isDisney = titleDisney.textContent.indexOf('Disney') !== -1 ? true : false;
  1088.                         }
  1089.                         if (isDisney || window.location.pathname === "/experiencias/disney") {
  1090.                             document.querySelector('.nav-main__icon--experience').parentElement.classList.remove('is-active');
  1091.                             document.querySelector('.nav-main__icon--disney').parentElement.classList.add('is-active');
  1092.                         }
  1093.                     }
  1094.                     if (window.location.pathname.indexOf('sostenible') !== -1) {
  1095.                         let titleSostenible = document.querySelector('.sostenible__title') || null;
  1096.                         let isSostenible = false;
  1097.                         if (titleSostenible) {
  1098.                             isSostenible = titleSostenible.textContent.indexOf('Sostenibilidad') !== -1 ? true : false;
  1099.                         }
  1100.                         if (isSostenible || window.location.pathname === "/experiencias/sostenible") {
  1101.                             document.querySelector('.nav-main__icon--experience').parentElement.classList.remove('is-active');
  1102.                             document.querySelector('.nav-main__icon--sostenibilidad').parentElement.classList.add('is-active');
  1103.                         }
  1104.                     }
  1105.                     if (window.location.pathname ===  "/contenidos/solicitar-tarjeta-visa-aviatur") {
  1106.                         document.querySelector('.nav-main__icon--card').parentElement.classList.add('is-active');
  1107.                     }
  1108.                     if (document.querySelector('.smartbanner')) {
  1109.                         document.querySelector('.smartbanner').classList.add('hide');
  1110.                         document.querySelector('html').classList.remove('smartbanner-show');
  1111.                     }
  1112.                     let $hrefLogin = document.querySelector("#login");
  1113.                     if ($hrefLogin) {
  1114.                         $hrefLogin.removeAttribute('href');
  1115.                         jQuery("#login").on("click", function () {
  1116.                             jQuery('#js-modalLogin').modal({backdrop: 'static', keyboard: false});
  1117.                         });
  1118.                     }
  1119.                     if (window.location.pathname.indexOf('register') !== -1) {
  1120.                         document.querySelector('.close').style.top = "200px";
  1121.                     }
  1122.                 });
  1123.             </script>
  1124.             <script>
  1125.                 document.addEventListener("DOMContentLoaded", function () {
  1126.                     const overlay = document.querySelector(".js-globalOverlay");
  1127.                     if (overlay) {
  1128.                         overlay.style.display = "none";
  1129.                         window.addEventListener("load", function () {
  1130.                             overlay.style.display = "none";
  1131.                         });
  1132.                         window.addEventListener("pageshow", function () {
  1133.                             overlay.style.display = "none";
  1134.                         });
  1135.                     }
  1136.                 });
  1137.             </script>
  1138.             {# end Script emblue emails #}
  1139.             <script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet-src.js" integrity="sha512-IkGU/uDhB9u9F8k+2OsA6XXoowIhOuQL1NTgNZHY1nkURnqEGlDZq3GsfmdJdKFe1k1zOc6YU2K7qY+hF9AodA==" crossorigin="anonymous"></script>
  1140.             <script src="https://unpkg.com/leaflet.markercluster@1.3.0/dist/leaflet.markercluster-src.js" integrity="sha384-NAOEbWFcjnXc7U9GkULPhupHZNAbqru9dS3c+4ANYAwtFoVAWuVuMVDH0DIy4ESp" crossorigin="anonymous"></script>
  1141.             <script src="{{ asset('assets/common_assets/js/vendor/leaflet.bezier.js') }}"></script>
  1142.         {% endblock javascripts_bottom %}
  1143.         {% include '@General/components/modalAcceptCookies.html.twig' %}
  1144.     </body>
  1145. </html>