<!DOCTYPE html>
<html>
  <head>
    <title>Home Assistant</title>
    <%= renderTemplate("_header.html.template") %>
    <link rel="mask-icon" href="/static/icons/mask-icon.svg" color="#18bcf2" />
    <link
      rel="apple-touch-icon"
      href="/static/icons/favicon-apple-180x180.png"
    />
    <meta name="apple-itunes-app" content="app-id=1099568401" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="apple-mobile-web-app-title" content="Home Assistant">
    <meta name="msapplication-config" content="/static/icons/browserconfig.xml" />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="application-name" content="Home Assistant">
    <meta name="referrer" content="same-origin" />
    <meta name="theme-color" content="{{ theme_color }}" />
    <meta name="color-scheme" content="dark light" />
    <%= renderTemplate("_style_base.html.template") %>
    <style>
      html {
        background-color: var(--primary-background-color, #fafafa);
        color: var(--primary-text-color, #212121);
        height: 100vh;
      }
      @media (prefers-color-scheme: dark) {
        html {
          background-color: var(--primary-background-color, #111111);
          color: var(--primary-text-color, #e1e1e1);
        }
      }
      #ha-launch-screen {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
      #ha-launch-screen svg {
        width: 112px;
        flex-shrink: 0;
      }
      #ha-launch-screen .ha-launch-screen-spacer {
        flex: 1;
      }
    </style>
  </head>
  <body>
    <div id="ha-launch-screen">
      <div class="ha-launch-screen-spacer"></div>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">
        <path fill="#18BCF2" d="M240 224.762a15 15 0 0 1-15 15H15a15 15 0 0 1-15-15v-90c0-8.25 4.77-19.769 10.61-25.609l98.78-98.7805c5.83-5.83 15.38-5.83 21.21 0l98.79 98.7895c5.83 5.83 10.61 17.36 10.61 25.61v90-.01Z"/>
        <path fill="#F2F4F9" d="m107.27 239.762-40.63-40.63c-2.09.72-4.32 1.13-6.64 1.13-11.3 0-20.5-9.2-20.5-20.5s9.2-20.5 20.5-20.5 20.5 9.2 20.5 20.5c0 2.33-.41 4.56-1.13 6.65l31.63 31.63v-115.88c-6.8-3.3395-11.5-10.3195-11.5-18.3895 0-11.3 9.2-20.5 20.5-20.5s20.5 9.2 20.5 20.5c0 8.07-4.7 15.05-11.5 18.3895v81.27l31.46-31.46c-.62-1.96-.96-4.04-.96-6.2 0-11.3 9.2-20.5 20.5-20.5s20.5 9.2 20.5 20.5-9.2 20.5-20.5 20.5c-2.5 0-4.88-.47-7.09-1.29L129 208.892v30.88z"/>
      </svg>
      <div id="ha-launch-screen-info-box" class="ha-launch-screen-spacer"></div>
    </div>
    <home-assistant></home-assistant>
    <%= renderTemplate("_js_base.html.template") %>
    <%= renderTemplate("_preload_roboto.html.template") %>
    <script <% if (!useWDS) { %>crossorigin="use-credentials"<% } %>>
      // Safari 12 and below does not have a compliant ES2015 implementation of template literals, so we ship ES5
      if (!isS11_12) {
        <% for (const entry of latestEntryJS) { %>
          import("<%= entry %>");
        <% } %>
        window.customPanelJS = "<%= latestCustomPanelJS %>";
        window.latestJS = true;
      }
    </script>
    <script>
    {%- for extra_module in extra_modules -%}
    import("{{ extra_module }}");
    {%- endfor -%}
    </script>
    <script>
        if (!window.latestJS) {
          window.customPanelJS = "<%= es5CustomPanelJS %>";
          <% if (useRollup) { %>
            _ls("/static/js/s.min.js").onload = function() {
              <% for (const entry of es5EntryJS) { %>
                System.import("<%= entry %>");
              <% } %>
            }
          <% } else { %>
            <% for (const entry of es5EntryJS) { %>
              _ls("<%= entry %>", true);
            <% } %>
          <% } %>
        }
    </script>
    <script>
      if (!window.latestJS) {
        {%- for extra_script in extra_js_es5 -%}
        _ls("{{ extra_script }}");
        {%- endfor -%}
      }
    </script>
  </body>
</html>
