var/cache/dev/twig/fa/fa6b21f1f1e161bc46154e67ca6fdf03.php line 44

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* default/divisas.html.twig */
  14. class __TwigTemplate_1daa09a07b07917c0c1f822cf9467b7b extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'metadescription' => [$this'block_metadescription'],
  25.             'metakeywords' => [$this'block_metakeywords'],
  26.             'idiomas' => [$this'block_idiomas'],
  27.             'bodyId' => [$this'block_bodyId'],
  28.             'body' => [$this'block_body'],
  29.             'funciones_eventos' => [$this'block_funciones_eventos'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context)
  33.     {
  34.         // line 2
  35.         return "base.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = [])
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""default/divisas.html.twig"));
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""default/divisas.html.twig"));
  44.         $this->parent $this->loadTemplate("base.html.twig""default/divisas.html.twig"2);
  45.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 5
  52.     public function block_title($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  59.         if ((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'5$this->source); })())) {
  60.             echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'5$this->source); })()), "metaTitle", [], "any"falsefalsefalse5), ["| Eurochange.es" => ""]), "html"nulltrue);
  61.         } else {
  62.             echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'5$this->source); })()), "metaTitle", [], "any"falsefalsefalse5), ["| Eurochange.es" => ""]), "html"nulltrue);
  63.         }
  64.         
  65.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  66.         
  67.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68.     }
  69.     // line 6
  70.     public function block_metadescription($context, array $blocks = [])
  71.     {
  72.         $macros $this->macros;
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  74.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metadescription"));
  75.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  76.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metadescription"));
  77.         if ((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'6$this->source); })())) {
  78.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'6$this->source); })()), "metaDescription", [], "any"falsefalsefalse6), "html"nulltrue);
  79.         } else {
  80.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'6$this->source); })()), "metaDescription", [], "any"falsefalsefalse6), "html"nulltrue);
  81.         }
  82.         
  83.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  84.         
  85.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  86.     }
  87.     // line 7
  88.     public function block_metakeywords($context, array $blocks = [])
  89.     {
  90.         $macros $this->macros;
  91.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metakeywords"));
  93.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metakeywords"));
  95.         if ((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'7$this->source); })())) {
  96.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'7$this->source); })()), "metaKeywords", [], "any"falsefalsefalse7), "html"nulltrue);
  97.         } else {
  98.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'7$this->source); })()), "metaKeywords", [], "any"falsefalsefalse7), "html"nulltrue);
  99.         }
  100.         
  101.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  102.         
  103.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  104.     }
  105.     // line 9
  106.     public function block_idiomas($context, array $blocks = [])
  107.     {
  108.         $macros $this->macros;
  109.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  110.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""idiomas"));
  111.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  112.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""idiomas"));
  113.         // line 10
  114.         echo "    ";
  115.         $context['_parent'] = $context;
  116.         $context['_seq'] = twig_ensure_traversable((isset($context["locales"]) || array_key_exists("locales"$context) ? $context["locales"] : (function () { throw new RuntimeError('Variable "locales" does not exist.'10$this->source); })()));
  117.         foreach ($context['_seq'] as $context["k"] => $context["idioma"]) {
  118.             // line 11
  119.             echo "        ";
  120.             if (($context["k"] == twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'11$this->source); })()), "request", [], "any"falsefalsefalse11), "locale", [], "any"falsefalsefalse11))) {
  121.                 echo "    
  122.             <option selected value=\"";
  123.                 // line 12
  124.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'12$this->source); })()), "request", [], "any"falsefalsefalse12), "get", [=> "_route"=> "index"], "method"falsefalsefalse12), twig_array_merge(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'12$this->source); })()), "request", [], "any"falsefalsefalse12), "get", [=> "_route_params"=> []], "method"falsefalsefalse12), ["_locale" => $context["k"]])), "html"nulltrue);
  125.                 echo "\" title=\"";
  126.                 echo twig_escape_filter($this->env$context["idioma"], "html"nulltrue);
  127.                 echo "\">";
  128.                 echo twig_escape_filter($this->envtwig_upper_filter($this->env$context["k"]), "html"nulltrue);
  129.                 echo "</option>
  130.         ";
  131.             } elseif ((            // line 13
  132. (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'13$this->source); })()) != null)) {
  133.                 // line 14
  134.                 echo "            <option value=\"";
  135.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'14$this->source); })()), "request", [], "any"falsefalsefalse14), "get", [=> "_route"=> "index"], "method"falsefalsefalse14), twig_array_merge(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'14$this->source); })()), "request", [], "any"falsefalsefalse14), "get", [=> "_route_params"=> []], "method"falsefalsefalse14), ["_locale" => $context["k"], "nombre" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'14$this->source); })()), "translate", [=> $context["k"]], "method"falsefalsefalse14), "slug", [], "any"falsefalsefalse14)])), "html"nulltrue);
  136.                 echo "\" title=\"";
  137.                 echo twig_escape_filter($this->env$context["idioma"], "html"nulltrue);
  138.                 echo "\">";
  139.                 echo twig_escape_filter($this->envtwig_upper_filter($this->env$context["k"]), "html"nulltrue);
  140.                 echo "</option>
  141.         ";
  142.             } elseif ((            // line 15
  143. (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'15$this->source); })()) != null)) {
  144.                 // line 16
  145.                 echo "            <option value=\"";
  146.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'16$this->source); })()), "request", [], "any"falsefalsefalse16), "get", [=> "_route"=> "index"], "method"falsefalsefalse16), twig_array_merge(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'16$this->source); })()), "request", [], "any"falsefalsefalse16), "get", [=> "_route_params"=> []], "method"falsefalsefalse16), ["_locale" => $context["k"], "nombre" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'16$this->source); })()), "translate", [=> $context["k"]], "method"falsefalsefalse16), "slug", [], "any"falsefalsefalse16)])), "html"nulltrue);
  147.                 echo "\" title=\"";
  148.                 echo twig_escape_filter($this->env$context["idioma"], "html"nulltrue);
  149.                 echo "\">";
  150.                 echo twig_escape_filter($this->envtwig_upper_filter($this->env$context["k"]), "html"nulltrue);
  151.                 echo "</option>
  152.         ";
  153.             }
  154.             // line 18
  155.             echo "    ";
  156.         }
  157.         $_parent $context['_parent'];
  158.         unset($context['_seq'], $context['_iterated'], $context['k'], $context['idioma'], $context['_parent'], $context['loop']);
  159.         $context array_intersect_key($context$_parent) + $_parent;
  160.         
  161.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  162.         
  163.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  164.     }
  165.     // line 21
  166.     public function block_bodyId($context, array $blocks = [])
  167.     {
  168.         $macros $this->macros;
  169.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  170.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyId"));
  171.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  172.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyId"));
  173.         echo "divisas";
  174.         
  175.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  176.         
  177.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  178.     }
  179.     // line 23
  180.     public function block_body($context, array $blocks = [])
  181.     {
  182.         $macros $this->macros;
  183.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  184.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  185.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  186.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  187.         // line 24
  188.         echo "    <div class=\"title container\">
  189.         ";
  190.         // line 25
  191.         if (((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'25$this->source); })()) != null)) {
  192.             // line 26
  193.             echo "            <h1>";
  194.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'26$this->source); })()), "altBanner", [], "any"falsefalsefalse26), "html"nulltrue);
  195.             echo "</h1>
  196.         ";
  197.         } elseif ((        // line 27
  198. (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'27$this->source); })()) != null)) {
  199.             // line 28
  200.             echo "            <h1>";
  201.             echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'28$this->source); })()), "metaTitle", [], "any"falsefalsefalse28), ["| Eurochange.es" => ""]), "html"nulltrue);
  202.             echo "</h1>
  203.         ";
  204.         }
  205.         // line 30
  206.         echo "    </div>
  207.     
  208.     <div id=\"cab-divisa\" class=\"container\">
  209.         <div class=\"row\">
  210.             <div class=\"col-12 col-lg-7 cambio\">
  211.                     ";
  212.         // line 39
  213.         echo "                    <div class=\"sticky-top\">
  214.                     
  215.                     <div id=\"cont_camb\">
  216.                         <ul class=\"nav nav-tabs\" id=\"myTab\" role=\"tablist\">
  217.                             <li class=\"nav-item\" id=\"calc\" role=\"presentation\">
  218.                                 <button class=\"nav-link active\" id=\"calcular-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#calcular_cambio\" type=\"button\" role=\"tab\" aria-controls=\"profile\" aria-selected=\"true\"><i class=\"fa-solid fa-calculator\"></i></button>
  219.                             </li>
  220.                             <li class=\"nav-item\" role=\"presentation\">
  221.                                 <button class=\"nav-link\" id=\"comprar-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#calcular_cambio\" type=\"button\" role=\"tab\" aria-controls=\"profile\" aria-selected=\"false\">";
  222.         // line 47
  223.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Comprar_online"), "html"nulltrue);
  224.         echo "</button>
  225.                             </li>
  226.                         </ul>
  227.                         
  228.                         <div class=\"tab-content\" id=\"myTabContent\">
  229.                             <div class=\"tab-pane fade show active\" id=\"calcular_cambio\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
  230.                                 ";
  231.         // line 53
  232.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\DefaultController::oficinaAction", ["select_id" => "select_ofi2"]));
  233.         echo "
  234.                                 
  235.                                 ";
  236.         // line 56
  237.         echo "                            
  238.                             </div>
  239.                         </div>
  240.                     </div>
  241.                     
  242.                     ";
  243.         // line 61
  244.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\CotizacionesController::alerta"));
  245.         echo "
  246.                     </div>
  247.             </div>
  248.             <div class=\"col-12 col-lg-5 colum-der\">
  249.                 <div id=\"cotizacionesJsonG\" style=\"display:none\">";
  250.         // line 65
  251.         echo twig_escape_filter($this->env, (isset($context["cotizacionesJsonG"]) || array_key_exists("cotizacionesJsonG"$context) ? $context["cotizacionesJsonG"] : (function () { throw new RuntimeError('Variable "cotizacionesJsonG" does not exist.'65$this->source); })()), "html"nulltrue);
  252.         echo "</div>
  253.                 <script src=\"https://cdn.amcharts.com/lib/3/amcharts.js\"></script>
  254.                 <script src=\"https://cdn.amcharts.com/lib/3/serial.js\"></script>
  255.                 <script src=\"https://cdn.amcharts.com/lib/3/themes/light.js\"></script>
  256.                 <script src=\"https://cdn.amcharts.com/lib/3/plugins/dataloader/dataloader.min.js\"></script>
  257.                 <script src=\"https://cdn.amcharts.com/lib/3/maps/js/worldLow.js\"></script>
  258.                 
  259.                 ";
  260.         // line 72
  261.         if (((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'72$this->source); })()) != null)) {
  262.             // line 73
  263.             echo "                    <p style=\"font-weight: bold;\">";
  264.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("EVOLUCIÓN DEL PRECIO DE VENTA DE"), "html"nulltrue);
  265.             echo " ";
  266.             echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'73$this->source); })()), "nombre", [], "any"falsefalsefalse73)), "html"nulltrue);
  267.             echo "</p>
  268.                     
  269.                     <div id=\"\" class=\"chartcontainer p5\" style=\"width:100%; height:300px; margin-bottom:30px;\">
  270.                         <div id=\"chartdiv-precioVenta\" style=\"width:100%;height:100%;\"></div>
  271.                     </div>
  272.                     
  273.                     
  274.                     <p style=\"font-weight: bold;\">";
  275.             // line 80
  276.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("EVOLUCIÓN DEL PRECIO DE COMPRA DE"), "html"nulltrue);
  277.             echo " ";
  278.             echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'80$this->source); })()), "nombre", [], "any"falsefalsefalse80)), "html"nulltrue);
  279.             echo "</p>
  280.                     <div id=\"\" class=\"chartcontainer p5\" style=\"width:100%; height:300px; margin-bottom:30px;\">
  281.                         <div id=\"chartdiv-precioCompra\" style=\"width:100%;height:100%;\"></div>
  282.                     </div>
  283.                     ";
  284.             // line 84
  285.             echo twig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'84$this->source); })()), "texto2", [], "any"falsefalsefalse84);
  286.             echo "
  287.                     ";
  288.             // line 85
  289.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\DefaultController::principalesCambios"));
  290.             echo "
  291.                 ";
  292.         } elseif ((        // line 86
  293. (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'86$this->source); })()) != null)) {
  294.             // line 87
  295.             echo "                    <p style=\"font-weight: bold;\">";
  296.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("EVOLUCIÓN DEL PRECIO DE COMPRA DE"), "html"nulltrue);
  297.             echo " ";
  298.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'87$this->source); })()), "divisaOrigen", [], "any"falsefalsefalse87), "id", [], "any"falsefalsefalse87) == 10)) {
  299.                 echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'87$this->source); })()), "divisaDestino", [], "any"falsefalsefalse87), "nombre", [], "any"falsefalsefalse87)), "html"nulltrue);
  300.             } else {
  301.                 echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'87$this->source); })()), "divisaOrigen", [], "any"falsefalsefalse87), "nombre", [], "any"falsefalsefalse87)), "html"nulltrue);
  302.             }
  303.             echo "</p>
  304.                     <div id=\"\" class=\"chartcontainer p5\" style=\"width:100%; height:300px; margin-bottom:30px;\">
  305.                         <div id=\"chartdiv-precioCompra\" style=\"width:100%;height:100%;\"></div>
  306.                     </div>
  307.                     ";
  308.             // line 91
  309.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'91$this->source); })()), "divisaOrigen", [], "any"falsefalsefalse91), "id", [], "any"falsefalsefalse91) == 10)) {
  310.                 echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'91$this->source); })()), "divisaOrigen", [], "any"falsefalsefalse91), "texto2", [], "any"falsefalsefalse91);
  311.             } else {
  312.                 echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'91$this->source); })()), "divisaDestino", [], "any"falsefalsefalse91), "texto2", [], "any"falsefalsefalse91);
  313.             }
  314.             // line 92
  315.             echo "                    ";
  316.             echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\DefaultController::principalesCambios"));
  317.             echo "
  318.                 ";
  319.         }
  320.         // line 94
  321.         echo "                ";
  322.         if (((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'94$this->source); })()) != null)) {
  323.             // line 95
  324.             echo "                    ";
  325.             echo twig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'95$this->source); })()), "texto1", [], "any"falsefalsefalse95);
  326.             echo "
  327.                     <a id=\"bus\" href=\"/oficinas\">";
  328.             // line 96
  329.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Busca tu oficina de cambio mas cercana"), "html"nulltrue);
  330.             echo "</a>
  331.                 ";
  332.         }
  333.         // line 98
  334.         echo "            </div>
  335.         </div>
  336.     </div>
  337.     
  338. ";
  339.         
  340.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  341.         
  342.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  343.     }
  344.     // line 107
  345.     public function block_funciones_eventos($context, array $blocks = [])
  346.     {
  347.         $macros $this->macros;
  348.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  349.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""funciones_eventos"));
  350.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  351.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""funciones_eventos"));
  352.         // line 108
  353.         echo "
  354.         ";
  355.         // line 109
  356.         $this->displayParentBlock("funciones_eventos"$context$blocks);
  357.         echo "
  358.         <script>
  359.             
  360.             \$(document).ready(function() {
  361.                 var contenido = \$('#contenedorInv #contenedorMover').clone();
  362.                 if (\$('#calcular_cambio .parte-repetida').length === 0) {
  363.                     \$('#calcular_cambio').append(contenido);
  364.                     \$('#contenedorInv #contenedorMover').remove();
  365.                 }
  366.            
  367.             
  368.                 ";
  369.         // line 120
  370.         if (((isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'120$this->source); })()) != null)) {
  371.             // line 121
  372.             echo "                        \$('#selectQuieres').val(";
  373.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["divisa"]) || array_key_exists("divisa"$context) ? $context["divisa"] : (function () { throw new RuntimeError('Variable "divisa" does not exist.'121$this->source); })()), "id", [], "any"falsefalsefalse121), "html"nulltrue);
  374.             echo ").change();
  375.                         \$('#inputQuieres').trigger('change');
  376.                 ";
  377.         }
  378.         // line 124
  379.         echo "                
  380.                 ";
  381.         // line 125
  382.         if (((isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'125$this->source); })()) != null)) {
  383.             // line 126
  384.             echo "                
  385.                     ";
  386.             // line 127
  387.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'127$this->source); })()), "divisaOrigen", [], "any"falsefalsefalse127), "id", [], "any"falsefalsefalse127) != 10)) {
  388.                 echo "    
  389.                         \$('#selectTienes').val(";
  390.                 // line 128
  391.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'128$this->source); })()), "divisaOrigen", [], "any"falsefalsefalse128), "id", [], "any"falsefalsefalse128), "html"nulltrue);
  392.                 echo ").change();
  393.                         \$('#inputTienes').trigger('change');
  394.                     ";
  395.             } else {
  396.                 // line 131
  397.                 echo "                        \$('#selectQuieres').val(";
  398.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["conversion"]) || array_key_exists("conversion"$context) ? $context["conversion"] : (function () { throw new RuntimeError('Variable "conversion" does not exist.'131$this->source); })()), "divisaDestino", [], "any"falsefalsefalse131), "id", [], "any"falsefalsefalse131), "html"nulltrue);
  399.                 echo ").change();
  400.                         \$('#inputQuieres').trigger('change');
  401.                     ";
  402.             }
  403.             // line 134
  404.             echo "                        
  405.                 ";
  406.         }
  407.         // line 136
  408.         echo "            
  409.              });
  410.             
  411.             
  412.             \$(document).ready(function() {
  413.                 console.log(\"JS_JSN\");
  414.                 var idioma = \$('html').attr('lang');
  415.                 function loadCurrencies(jSONCurrencies,tipo) {
  416.                     var chartData = [];
  417.                     var cotizacion = \$.parseJSON(jSONCurrencies);
  418.                     for(var i in cotizacion)
  419.                     {
  420.                         var newDate = new Date(cotizacion[i].dia);
  421.                         if(tipo=='precioVenta'){
  422.                             var precio = cotizacion[i].precioVenta;
  423.                         }
  424.                         else{
  425.                             var precio = cotizacion[i].precioCompra;
  426.                         }
  427.                         chartData.push({
  428.                             date: newDate,
  429.                             cotizaciones: precio
  430.                         });
  431.                     }
  432.                 
  433.                     return chartData;
  434.                 }
  435.                 
  436.                 
  437.                 
  438.                 var chart = AmCharts.makeChart(\"chartdiv-precioVenta\", {
  439.                     \"type\": \"serial\",
  440.                     \"dataProvider\": [
  441.                         { \"country\": \"USA\", \"visits\": 3025 },
  442.                         { \"country\": \"China\", \"visits\": 1882 },
  443.                         { \"country\": \"Japan\", \"visits\": 1809 },
  444.                         { \"country\": \"Germany\", \"visits\": 1322 },
  445.                         { \"country\": \"UK\", \"visits\": 1122 },
  446.                         { \"country\": \"France\", \"visits\": 1114 },
  447.                         { \"country\": \"India\", \"visits\": 984 },
  448.                         { \"country\": \"Spain\", \"visits\": 711 },
  449.                         { \"country\": \"Netherlands\", \"visits\": 665 },
  450.                         { \"country\": \"Russia\", \"visits\": 580 }
  451.                     ],
  452.                     \"valueAxes\": [{
  453.                         \"title\": \"Visits\"
  454.                     }],
  455.                     \"graphs\": [{
  456.                         \"balloonText\": \"[[category]]: <b>[[value]]</b>\",
  457.                         \"fillColorsField\": \"color\",
  458.                         \"fillAlphas\": 0.9,
  459.                         \"lineAlpha\": 0.2,
  460.                         \"type\": \"column\",
  461.                         \"valueField\": \"visits\"
  462.                     }],
  463.                     \"categoryField\": \"country\",
  464.                     \"categoryAxis\": {
  465.                         \"gridPosition\": \"start\",
  466.                         \"labelRotation\": 45
  467.                     }
  468.                 });
  469.                 
  470.                 
  471.                 
  472.                 function loadChart(chartData,tipo){
  473.                     if(idioma == \"es\"){
  474.                         decimalSeparator=\",\",
  475.                         text=\"Cotizacion\"
  476.                     }else{
  477.                         decimalSeparator=\".\",
  478.                         text=\"Exchange rate\"
  479.                     }
  480.                     var chart = AmCharts.makeChart(\"chartdiv-\"+tipo, {
  481.                         \"language\": idioma,
  482.                         \"type\": \"serial\",
  483.                         \"theme\": \"light\",
  484.                         \"labelsEnabled\": false,
  485.                         \"autoMargins\": true,
  486.                         \"marginTop\": 5,
  487.                         \"dataProvider\": chartData,
  488.                         \"valueAxes\": [{
  489.                             \"position\": \"left\",
  490.                             \"title\": \"\"
  491.                         }],
  492.                         \"graphs\": [{
  493.                             \"id\": \"g1\",
  494.                             \"fillAlphas\": 0.4,
  495.                             \"valueField\": \"cotizaciones\",
  496.                             \"balloonText\": \"<div style='margin:5px; font-size:19px;'>\"+text+\":<b>[[value]]</b></div>\"
  497.                         }],
  498.                         \"chartScrollbar\": {
  499.                             \"graph\": \"g1\",
  500.                             \"scrollbarHeight\": 40,
  501.                             \"backgroundAlpha\": 0,
  502.                             \"selectedBackgroundAlpha\": 0.1,
  503.                             \"selectedBackgroundColor\": \"#888888\",
  504.                             \"graphFillAlpha\": 0,
  505.                             \"graphLineAlpha\": 0.5,
  506.                             \"selectedGraphFillAlpha\": 0,
  507.                             \"selectedGraphLineAlpha\": 1,
  508.                             \"autoGridCount\": true,
  509.                             \"color\": \"#AAAAAA\",
  510.                             \"offset\": 5,
  511.                             \"autoHide\": true
  512.                         },
  513.                         \"chartCursor\": {
  514.                             \"categoryBalloonDateFormat\": \"DD/MM\",
  515.                             \"cursorPosition\": \"mouse\"
  516.                         },
  517.                         \"categoryField\": \"date\",
  518.                         \"categoryAxis\": {
  519.                             \"minPeriod\": \"mm\",
  520.                             \"parseDates\": true
  521.                         },
  522.                         \"export\": {
  523.                             \"enabled\": true,
  524.                             \"dateFormat\": \"YYYY-MM-DD\"
  525.                         },
  526.                         \"numberFormatter\": {
  527.                         \"decimalSeparator\": decimalSeparator,
  528.                         },
  529.                         \"responsive\": {
  530.                             \"enabled\": true
  531.                         }
  532.                     });
  533.                     chart.addListener(\"dataUpdated\", zoomChart);
  534.                     // when we apply theme, the dataUpdated event is fired even before we add listener, so
  535.                     // we need to call zoomChart here
  536.                     zoomChart();
  537.                     // this method is called when chart is first inited as we listen for \"dataUpdated\" event
  538.                     function zoomChart() {
  539.                         // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
  540.                         chart.zoomToIndexes(chartData.length - 30, chartData.length);
  541.                     }
  542.                     AmCharts.addInitHandler(function(chart) {
  543.                     
  544.                     // check if scrollbar auto-hide is enabled
  545.                     if (chart.chartScrollbar === undefined || !chart.chartScrollbar.autoHide)
  546.                         return;
  547.                     
  548.                     // add zoomed events
  549.                     chart.addListener(\"zoomed\", function(event) {
  550.                         
  551.                         // check if the chart is completely zoomed out
  552.                         var enabled = true;
  553.                         if (event.startIndex === 0 && event.endIndex === (chart.dataProvider.length - 1))
  554.                         enabled = false;
  555.                         
  556.                         // show or hide the scrollbar
  557.                         if (event.chart.chartScrollbar.enabled === enabled)
  558.                         return;
  559.                         event.chart.chartScrollbar.enabled = enabled
  560.                         event.chart.validateNow(false, true);
  561.                         
  562.                     });
  563.                     
  564.                     }, [\"serial\"]);
  565.                 }
  566.                 \$('body').on('change','.ticker-item .cambio_divisa_check', function () {
  567.                     var parent = \$(this).closest('.ticker-item');
  568.                     parent.find('.pVenta').toggle();
  569.                     parent.find('.pCompra').toggle();
  570.                 });
  571.                 \$('body').on('change','#widget-change .cambio_divisa_check', function () {
  572.                     var parent = \$(this).closest('#widget-change');
  573.                     parent.find('.pVenta').toggle();
  574.                     parent.find('.pCompra').toggle();
  575.                     \$('.chart-box').toggle();
  576.                 });
  577.                 if(\$(\".chartcontainer\").length != 0) {
  578.                     var jSONCurrencies = \$(\"#cotizacionesJsonG\").html();
  579.                     var chartData = loadCurrencies(jSONCurrencies,'precioVenta');
  580.                     loadChart(chartData,'precioVenta');
  581.                     var chartData = loadCurrencies(jSONCurrencies,'precioCompra');
  582.                     loadChart(chartData,'precioCompra');
  583.                 }
  584.             });
  585.         </script>
  586. ";
  587.         
  588.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  589.         
  590.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  591.     }
  592.     public function getTemplateName()
  593.     {
  594.         return "default/divisas.html.twig";
  595.     }
  596.     public function isTraitable()
  597.     {
  598.         return false;
  599.     }
  600.     public function getDebugInfo()
  601.     {
  602.         return array (  452 => 136,  448 => 134,  441 => 131,  435 => 128,  431 => 127,  428 => 126,  426 => 125,  423 => 124,  416 => 121,  414 => 120,  400 => 109,  397 => 108,  387 => 107,  373 => 98,  368 => 96,  363 => 95,  360 => 94,  354 => 92,  348 => 91,  334 => 87,  332 => 86,  328 => 85,  324 => 84,  315 => 80,  302 => 73,  300 => 72,  290 => 65,  283 => 61,  276 => 56,  271 => 53,  262 => 47,  252 => 39,  245 => 30,  239 => 28,  237 => 27,  232 => 26,  230 => 25,  227 => 24,  217 => 23,  198 => 21,  184 => 18,  174 => 16,  172 => 15,  163 => 14,  161 => 13,  153 => 12,  148 => 11,  143 => 10,  133 => 9,  110 => 7,  87 => 6,  64 => 5,  41 => 2,);
  603.     }
  604.     public function getSourceContext()
  605.     {
  606.         return new Source("{# {% extends 'default/contenido.html.twig' %} #}
  607. {% extends 'base.html.twig' %}
  608. {% block title %}{% if divisa %}{{ divisa.metaTitle| replace({'| Eurochange.es':''}) }}{%else%}{{ conversion.metaTitle| replace({'| Eurochange.es':''}) }}{%endif%}{% endblock %}
  609. {% block metadescription %}{% if divisa %}{{ divisa.metaDescription }}{%else%}{{ conversion.metaDescription }}{%endif%}{% endblock %}
  610. {% block metakeywords %}{% if divisa %}{{ divisa.metaKeywords }}{%else%}{{ conversion.metaKeywords }}{%endif%}{% endblock %}
  611. {% block idiomas %}
  612.     {% for k,idioma in locales %}
  613.         {% if k == app.request.locale %}    
  614.             <option selected value=\"{{ path(app.request.get('_route', 'index'), app.request.get('_route_params', [])|merge({_locale: k})) }}\" title=\"{{ idioma }}\">{{ k | upper}}</option>
  615.         {% elseif divisa != null %}
  616.             <option value=\"{{ path(app.request.get('_route', 'index'), app.request.get('_route_params', [])|merge({_locale: k, nombre: divisa.translate(k).slug })) }}\" title=\"{{ idioma }}\">{{ k | upper}}</option>
  617.         {% elseif conversion != null %}
  618.             <option value=\"{{ path(app.request.get('_route', 'index'), app.request.get('_route_params', [])|merge({_locale: k, nombre: conversion.translate(k).slug })) }}\" title=\"{{ idioma }}\">{{ k | upper}}</option>
  619.         {% endif %}
  620.     {% endfor %}
  621. {% endblock %}
  622. {% block bodyId %}divisas{% endblock %}
  623. {% block body %}
  624.     <div class=\"title container\">
  625.         {% if divisa != null %}
  626.             <h1>{{ divisa.altBanner }}</h1>
  627.         {% elseif conversion != null %}
  628.             <h1>{{ conversion.metaTitle| replace({'| Eurochange.es':''}) }}</h1>
  629.         {% endif %}
  630.     </div>
  631.     
  632.     <div id=\"cab-divisa\" class=\"container\">
  633.         <div class=\"row\">
  634.             <div class=\"col-12 col-lg-7 cambio\">
  635.                     {#{% if ofi_var != 0 %}
  636.                         {% set currentDate = date() | date(\"Y-m-d\") %}
  637.                         <p id=\"precio\">{{ 'Precios para' | trans}} {{ oficina.nombre }} {{ currentDate }}</p>
  638.                     {% endif %}#}
  639.                     <div class=\"sticky-top\">
  640.                     
  641.                     <div id=\"cont_camb\">
  642.                         <ul class=\"nav nav-tabs\" id=\"myTab\" role=\"tablist\">
  643.                             <li class=\"nav-item\" id=\"calc\" role=\"presentation\">
  644.                                 <button class=\"nav-link active\" id=\"calcular-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#calcular_cambio\" type=\"button\" role=\"tab\" aria-controls=\"profile\" aria-selected=\"true\"><i class=\"fa-solid fa-calculator\"></i></button>
  645.                             </li>
  646.                             <li class=\"nav-item\" role=\"presentation\">
  647.                                 <button class=\"nav-link\" id=\"comprar-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#calcular_cambio\" type=\"button\" role=\"tab\" aria-controls=\"profile\" aria-selected=\"false\">{{ 'Comprar_online' | trans}}</button>
  648.                             </li>
  649.                         </ul>
  650.                         
  651.                         <div class=\"tab-content\" id=\"myTabContent\">
  652.                             <div class=\"tab-pane fade show active\" id=\"calcular_cambio\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
  653.                                 {{ render(controller('App\\\\Controller\\\\DefaultController::oficinaAction', { select_id: 'select_ofi2' } )) }}
  654.                                 
  655.                                 {#<p class=\"info-select\">{{ '* La tienda online solo permite la compra de divisas extranjeras (no Euros)' | trans}}</p>#}
  656.                             
  657.                             </div>
  658.                         </div>
  659.                     </div>
  660.                     
  661.                     {{ render(controller('App\\\\Controller\\\\CotizacionesController::alerta' )) }}
  662.                     </div>
  663.             </div>
  664.             <div class=\"col-12 col-lg-5 colum-der\">
  665.                 <div id=\"cotizacionesJsonG\" style=\"display:none\">{{cotizacionesJsonG}}</div>
  666.                 <script src=\"https://cdn.amcharts.com/lib/3/amcharts.js\"></script>
  667.                 <script src=\"https://cdn.amcharts.com/lib/3/serial.js\"></script>
  668.                 <script src=\"https://cdn.amcharts.com/lib/3/themes/light.js\"></script>
  669.                 <script src=\"https://cdn.amcharts.com/lib/3/plugins/dataloader/dataloader.min.js\"></script>
  670.                 <script src=\"https://cdn.amcharts.com/lib/3/maps/js/worldLow.js\"></script>
  671.                 
  672.                 {% if divisa != null %}
  673.                     <p style=\"font-weight: bold;\">{{ 'EVOLUCIÓN DEL PRECIO DE VENTA DE' | trans}} {{ divisa.nombre|upper }}</p>
  674.                     
  675.                     <div id=\"\" class=\"chartcontainer p5\" style=\"width:100%; height:300px; margin-bottom:30px;\">
  676.                         <div id=\"chartdiv-precioVenta\" style=\"width:100%;height:100%;\"></div>
  677.                     </div>
  678.                     
  679.                     
  680.                     <p style=\"font-weight: bold;\">{{ 'EVOLUCIÓN DEL PRECIO DE COMPRA DE' | trans}} {{ divisa.nombre|upper }}</p>
  681.                     <div id=\"\" class=\"chartcontainer p5\" style=\"width:100%; height:300px; margin-bottom:30px;\">
  682.                         <div id=\"chartdiv-precioCompra\" style=\"width:100%;height:100%;\"></div>
  683.                     </div>
  684.                     {{ divisa.texto2|raw }}
  685.                     {{ render(controller('App\\\\Controller\\\\DefaultController::principalesCambios' )) }}
  686.                 {% elseif conversion != null %}
  687.                     <p style=\"font-weight: bold;\">{{ 'EVOLUCIÓN DEL PRECIO DE COMPRA DE' | trans}} {% if conversion.divisaOrigen.id == 10 %}{{ conversion.divisaDestino.nombre|upper }}{% else %}{{ conversion.divisaOrigen.nombre|upper }}{% endif %}</p>
  688.                     <div id=\"\" class=\"chartcontainer p5\" style=\"width:100%; height:300px; margin-bottom:30px;\">
  689.                         <div id=\"chartdiv-precioCompra\" style=\"width:100%;height:100%;\"></div>
  690.                     </div>
  691.                     {% if conversion.divisaOrigen.id == 10 %}{{ conversion.divisaOrigen.texto2|raw }}{% else %}{{ conversion.divisaDestino.texto2|raw }}{% endif %}
  692.                     {{ render(controller('App\\\\Controller\\\\DefaultController::principalesCambios' )) }}
  693.                 {% endif %}
  694.                 {% if divisa != null %}
  695.                     {{ divisa.texto1|raw }}
  696.                     <a id=\"bus\" href=\"/oficinas\">{{ 'Busca tu oficina de cambio mas cercana' | trans}}</a>
  697.                 {% endif %}
  698.             </div>
  699.         </div>
  700.     </div>
  701.     
  702. {% endblock %}
  703. {% block funciones_eventos %}
  704.         {{ parent() }}
  705.         <script>
  706.             
  707.             \$(document).ready(function() {
  708.                 var contenido = \$('#contenedorInv #contenedorMover').clone();
  709.                 if (\$('#calcular_cambio .parte-repetida').length === 0) {
  710.                     \$('#calcular_cambio').append(contenido);
  711.                     \$('#contenedorInv #contenedorMover').remove();
  712.                 }
  713.            
  714.             
  715.                 {% if divisa != null %}
  716.                         \$('#selectQuieres').val({{ divisa.id }}).change();
  717.                         \$('#inputQuieres').trigger('change');
  718.                 {% endif %}
  719.                 
  720.                 {% if conversion != null %}
  721.                 
  722.                     {% if conversion.divisaOrigen.id != 10 %}    
  723.                         \$('#selectTienes').val({{conversion.divisaOrigen.id}}).change();
  724.                         \$('#inputTienes').trigger('change');
  725.                     {% else %}
  726.                         \$('#selectQuieres').val({{conversion.divisaDestino.id}}).change();
  727.                         \$('#inputQuieres').trigger('change');
  728.                     {% endif %}
  729.                         
  730.                 {% endif %}
  731.             
  732.              });
  733.             
  734.             
  735.             \$(document).ready(function() {
  736.                 console.log(\"JS_JSN\");
  737.                 var idioma = \$('html').attr('lang');
  738.                 function loadCurrencies(jSONCurrencies,tipo) {
  739.                     var chartData = [];
  740.                     var cotizacion = \$.parseJSON(jSONCurrencies);
  741.                     for(var i in cotizacion)
  742.                     {
  743.                         var newDate = new Date(cotizacion[i].dia);
  744.                         if(tipo=='precioVenta'){
  745.                             var precio = cotizacion[i].precioVenta;
  746.                         }
  747.                         else{
  748.                             var precio = cotizacion[i].precioCompra;
  749.                         }
  750.                         chartData.push({
  751.                             date: newDate,
  752.                             cotizaciones: precio
  753.                         });
  754.                     }
  755.                 
  756.                     return chartData;
  757.                 }
  758.                 
  759.                 
  760.                 
  761.                 var chart = AmCharts.makeChart(\"chartdiv-precioVenta\", {
  762.                     \"type\": \"serial\",
  763.                     \"dataProvider\": [
  764.                         { \"country\": \"USA\", \"visits\": 3025 },
  765.                         { \"country\": \"China\", \"visits\": 1882 },
  766.                         { \"country\": \"Japan\", \"visits\": 1809 },
  767.                         { \"country\": \"Germany\", \"visits\": 1322 },
  768.                         { \"country\": \"UK\", \"visits\": 1122 },
  769.                         { \"country\": \"France\", \"visits\": 1114 },
  770.                         { \"country\": \"India\", \"visits\": 984 },
  771.                         { \"country\": \"Spain\", \"visits\": 711 },
  772.                         { \"country\": \"Netherlands\", \"visits\": 665 },
  773.                         { \"country\": \"Russia\", \"visits\": 580 }
  774.                     ],
  775.                     \"valueAxes\": [{
  776.                         \"title\": \"Visits\"
  777.                     }],
  778.                     \"graphs\": [{
  779.                         \"balloonText\": \"[[category]]: <b>[[value]]</b>\",
  780.                         \"fillColorsField\": \"color\",
  781.                         \"fillAlphas\": 0.9,
  782.                         \"lineAlpha\": 0.2,
  783.                         \"type\": \"column\",
  784.                         \"valueField\": \"visits\"
  785.                     }],
  786.                     \"categoryField\": \"country\",
  787.                     \"categoryAxis\": {
  788.                         \"gridPosition\": \"start\",
  789.                         \"labelRotation\": 45
  790.                     }
  791.                 });
  792.                 
  793.                 
  794.                 
  795.                 function loadChart(chartData,tipo){
  796.                     if(idioma == \"es\"){
  797.                         decimalSeparator=\",\",
  798.                         text=\"Cotizacion\"
  799.                     }else{
  800.                         decimalSeparator=\".\",
  801.                         text=\"Exchange rate\"
  802.                     }
  803.                     var chart = AmCharts.makeChart(\"chartdiv-\"+tipo, {
  804.                         \"language\": idioma,
  805.                         \"type\": \"serial\",
  806.                         \"theme\": \"light\",
  807.                         \"labelsEnabled\": false,
  808.                         \"autoMargins\": true,
  809.                         \"marginTop\": 5,
  810.                         \"dataProvider\": chartData,
  811.                         \"valueAxes\": [{
  812.                             \"position\": \"left\",
  813.                             \"title\": \"\"
  814.                         }],
  815.                         \"graphs\": [{
  816.                             \"id\": \"g1\",
  817.                             \"fillAlphas\": 0.4,
  818.                             \"valueField\": \"cotizaciones\",
  819.                             \"balloonText\": \"<div style='margin:5px; font-size:19px;'>\"+text+\":<b>[[value]]</b></div>\"
  820.                         }],
  821.                         \"chartScrollbar\": {
  822.                             \"graph\": \"g1\",
  823.                             \"scrollbarHeight\": 40,
  824.                             \"backgroundAlpha\": 0,
  825.                             \"selectedBackgroundAlpha\": 0.1,
  826.                             \"selectedBackgroundColor\": \"#888888\",
  827.                             \"graphFillAlpha\": 0,
  828.                             \"graphLineAlpha\": 0.5,
  829.                             \"selectedGraphFillAlpha\": 0,
  830.                             \"selectedGraphLineAlpha\": 1,
  831.                             \"autoGridCount\": true,
  832.                             \"color\": \"#AAAAAA\",
  833.                             \"offset\": 5,
  834.                             \"autoHide\": true
  835.                         },
  836.                         \"chartCursor\": {
  837.                             \"categoryBalloonDateFormat\": \"DD/MM\",
  838.                             \"cursorPosition\": \"mouse\"
  839.                         },
  840.                         \"categoryField\": \"date\",
  841.                         \"categoryAxis\": {
  842.                             \"minPeriod\": \"mm\",
  843.                             \"parseDates\": true
  844.                         },
  845.                         \"export\": {
  846.                             \"enabled\": true,
  847.                             \"dateFormat\": \"YYYY-MM-DD\"
  848.                         },
  849.                         \"numberFormatter\": {
  850.                         \"decimalSeparator\": decimalSeparator,
  851.                         },
  852.                         \"responsive\": {
  853.                             \"enabled\": true
  854.                         }
  855.                     });
  856.                     chart.addListener(\"dataUpdated\", zoomChart);
  857.                     // when we apply theme, the dataUpdated event is fired even before we add listener, so
  858.                     // we need to call zoomChart here
  859.                     zoomChart();
  860.                     // this method is called when chart is first inited as we listen for \"dataUpdated\" event
  861.                     function zoomChart() {
  862.                         // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
  863.                         chart.zoomToIndexes(chartData.length - 30, chartData.length);
  864.                     }
  865.                     AmCharts.addInitHandler(function(chart) {
  866.                     
  867.                     // check if scrollbar auto-hide is enabled
  868.                     if (chart.chartScrollbar === undefined || !chart.chartScrollbar.autoHide)
  869.                         return;
  870.                     
  871.                     // add zoomed events
  872.                     chart.addListener(\"zoomed\", function(event) {
  873.                         
  874.                         // check if the chart is completely zoomed out
  875.                         var enabled = true;
  876.                         if (event.startIndex === 0 && event.endIndex === (chart.dataProvider.length - 1))
  877.                         enabled = false;
  878.                         
  879.                         // show or hide the scrollbar
  880.                         if (event.chart.chartScrollbar.enabled === enabled)
  881.                         return;
  882.                         event.chart.chartScrollbar.enabled = enabled
  883.                         event.chart.validateNow(false, true);
  884.                         
  885.                     });
  886.                     
  887.                     }, [\"serial\"]);
  888.                 }
  889.                 \$('body').on('change','.ticker-item .cambio_divisa_check', function () {
  890.                     var parent = \$(this).closest('.ticker-item');
  891.                     parent.find('.pVenta').toggle();
  892.                     parent.find('.pCompra').toggle();
  893.                 });
  894.                 \$('body').on('change','#widget-change .cambio_divisa_check', function () {
  895.                     var parent = \$(this).closest('#widget-change');
  896.                     parent.find('.pVenta').toggle();
  897.                     parent.find('.pCompra').toggle();
  898.                     \$('.chart-box').toggle();
  899.                 });
  900.                 if(\$(\".chartcontainer\").length != 0) {
  901.                     var jSONCurrencies = \$(\"#cotizacionesJsonG\").html();
  902.                     var chartData = loadCurrencies(jSONCurrencies,'precioVenta');
  903.                     loadChart(chartData,'precioVenta');
  904.                     var chartData = loadCurrencies(jSONCurrencies,'precioCompra');
  905.                     loadChart(chartData,'precioCompra');
  906.                 }
  907.             });
  908.         </script>
  909. {% endblock %}
  910. ""default/divisas.html.twig""/home/alien/www/eurochange/templates/default/divisas.html.twig");
  911.     }
  912. }