<!DOCTYPE html>
<html lang="{{lang}}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="csrf_token" content="{{token}}">
    <title>{{title}}</title>
    <style nonce="{{nonce}}">#preloader{display:none;}</style>

    {{> rum hero_element="#app"}}

    {{#unless usesFreshCode}}
    <link rel="stylesheet" href="//yastatic.net/bem-components/2.4.0/desktop/bem-components.css">
    {{/unless}}
    {{#unless hmrEnabled}}
    <link rel="stylesheet" href="{{staticPrefix}}/{{layoutId}}.css?v={{version}}">
    {{/unless}}
    <link rel="shortcut icon" type="image/x-icon" href="/portal/favicon.ico">
</head>
<body>
    {{#if usesFreshCode}}
    {{#if this.metrika.ids.portal}}
    {{> metrika this.metrika}}
    {{/if}}
    {{/if}}
    <div id="app" class="app-root"></div>

    <div id="preloader" class="loader loader_visible loader_global">
        <span class="spin spin_theme_islands spin_size_l spin_visible"></span>
    </div>

    <script nonce="{{nonce}}">window.ya={"connect":JSON.parse("{{data}}")};</script>
    {{#if usesFreshCode}}
    {{#if requiresBasicPolyfills}}
    <script src="{{staticPrefix}}/vendor.basic.js"></script>
    {{/if}}
    <script src="//yastatic.net/react/16.8.4/react-with-dom{{#unless isDev}}.min{{/unless}}.js"></script>
    {{else}}
    <script src="//yastatic.net/jquery/2.1.4/jquery.min.js"></script>
    <script src="//yastatic.net/bem-components/2.4.0/desktop/bem-components.js+bh.js"></script>
    <script src="{{staticPrefix}}/vendor.js"></script>
    <script src="//yastatic.net/momentjs/2.18.1/moment.min.js"></script>
    {{#if requiresMomentLocale}}
    <script src="//yastatic.net/momentjs/2.18.1/locale/{{lang}}.js"></script>
    {{/if}}
    <script src="//yastatic.net/react/15.6.1/react-with-dom{{#unless isDev}}.min{{/unless}}.js"></script>
    {{/if}}
    <script src="//mc.yandex.ru/metrika/watch.js"></script>
    <script src="{{staticPrefix}}/{{layoutId}}.js?v={{version}}"></script>
    {{#if isUITest}}
    {{> hermione}}
    {{/if}}
</body>
</html>
