<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title></title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <meta data-hid="description" name="description" content="Connect to your Berqnet network." />
        <link rel="icon" type="image/x-icon" href="https://gate${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/favicon.ico" />
        <link href="https://setup${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/static/fonts.css" rel="stylesheet" />
        <style type="text/css">
            html {
                line-height: 1.15;
                -webkit-text-size-adjust: 100%;
            }
            body {
                font-family: "Poppins", sans-serif !important;
                margin: 0;
            }
            h1 {
                font-size: 2em;
                margin: 0.67em 0;
            }
            a {
                background-color: transparent;
            }
            b {
                font-weight: bolder;
            }
            img {
                border-style: none;
            }
            [type="button"],
            [type="reset"],
            [type="submit"] {
                -webkit-appearance: button;
            }
            [type="button"]::-moz-focus-inner,
            [type="reset"]::-moz-focus-inner,
            [type="submit"]::-moz-focus-inner {
                border-style: none;
                padding: 0;
            }
            [type="button"]:-moz-focusring,
            [type="reset"]:-moz-focusring,
            [type="submit"]:-moz-focusring {
                outline: 1px dotted ButtonText;
            }
            [type="checkbox"],
            [type="radio"] {
                box-sizing: border-box;
                padding: 0;
            }
            [type="number"]::-webkit-inner-spin-button,
            [type="number"]::-webkit-outer-spin-button {
                height: auto;
            }
            [type="search"] {
                -webkit-appearance: textfield;
                outline-offset: -2px;
            }
            [type="search"]::-webkit-search-decoration {
                -webkit-appearance: none;
            }
            ::-webkit-file-upload-button {
                -webkit-appearance: button;
                font: inherit;
            }
            [hidden],
            template {
                display: none;
            }
            h1,
            h2,
            h3,
            h4,
            h5,
            h6,
            p {
                margin: 0;
            }
            html {
                font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
                line-height: 1.5;
            }
            *,
            :after,
            :before {
                box-sizing: border-box;
                border: 0 solid #e2e8f0;
            }
            img {
                border-style: solid;
            }
            [role="button"] {
                cursor: pointer;
            }
            h1,
            h2,
            h3,
            h4,
            h5,
            h6 {
                font-size: inherit;
                font-weight: inherit;
            }
            a {
                color: inherit;
                text-decoration: inherit;
            }
            img,
            svg {
                display: block;
                vertical-align: middle;
            }
            img {
                max-width: 100%;
                height: auto;
            }
            .container {
                width: 100%;
            }
            @media (min-width: 640px) {
                .container {
                    max-width: 640px;
                }
            }
            @media (min-width: 768px) {
                .container {
                    max-width: 768px;
                }
            }
            @media (min-width: 1024px) {
                .container {
                    max-width: 1024px;
                }
            }
            @media (min-width: 1280px) {
                .container {
                    max-width: 1280px;
                }
            }
            .el-row:after,
            .el-row:before {
                content: "";
            }
            .el-row {
                position: relative;
            }
            .el-row {
                box-sizing: border-box;
            }
            .el-row:after,
            .el-row:before {
                display: table;
            }
            .el-row:after {
                clear: both;
            }
            [class*="el-col-"] {
                float: left;
                box-sizing: border-box;
            }
            .el-col-24 {
                height: auto;
            }

            .el-container {
                display: -webkit-box;
                display: -ms-flexbox;
            }
            .el-container {
                display: -webkit-box;
                display: flex;
                -webkit-box-orient: horizontal;
                -webkit-box-direction: normal;
                flex-direction: row;
                -webkit-box-flex: 1;
                flex: 1;
                flex-basis: auto;
                box-sizing: border-box;
                min-width: 0;
            }
            .el-dropdown-link {
                font-family: "Poppins", sans-serif;
                font-size: 12px;
                cursor: pointer;
                color: #3cb5e6;
            }
            .el-icon-arrow-down {
                font-size: 12px;
                font-weight: bolder !important;
            }
            .demonstration {
                display: block;
                color: #8492a6;
                margin-bottom: 15px;
            }
            .el-dropdown-menu__item {
                font-family: "Poppings", sans-serif;
                font-size: 12px !important;
                text-align: center;
                height: 30px;
            }
            .el-dropdown-menu {
                color: #75757f;
            }
            html {
                font-size: 13px;
                word-spacing: 1px;
                -ms-text-size-adjust: 100%;
                -webkit-text-size-adjust: 100%;
                -moz-osx-font-smoothing: grayscale;
                -webkit-font-smoothing: antialiased;
                box-sizing: border-box;
            }
            body,
            html {
                height: auto;
            }
            body {
                background: #fff;
                font-size: 100%;
                font-family: Montserrat, sans-serif;
                font-weight: 500;
                color: #92a1af;
            }
            body > div#__${TP},
            body > div#__${TP} > div#__layout,
            body > div#__${TP} > div#__layout > section {
                height: 100%;
            }
            *,
            :after,
            :before {
                box-sizing: border-box;
                margin: 0;
            }
            a {
                text-decoration: none;
                color: #677b8d;
            }
            html {
                font-family: Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
                font-size: 16px;
                word-spacing: 1px;
                -ms-text-size-adjust: 100%;
                -webkit-text-size-adjust: 100%;
                -moz-osx-font-smoothing: grayscale;
                -webkit-font-smoothing: antialiased;
                box-sizing: border-box;
            }
            *,
            :after,
            :before {
                box-sizing: border-box;
                margin: 0;
            }
            #container-access-denied .el-container {
                margin-top: 210px;
                padding: 0;
                color: #92a1af;
                background: #ffffff;
                box-shadow: 0px 4px 15px rgba(27, 27, 27, 0.12) !important;
                border-radius: 15px !important;
            }
            #container-access-denied {
                width: 750px;
                height: 421px;
                margin: 100px auto;
            }
            #container-access-denied .el-container {
                background: #fff;
                border-radius: 5px;
                overflow: hidden;
                padding-bottom: 15px;
            }
            #container-access-denied .el-container > .el-row {
                width: 100%;
            }
            #container-access-denied .el-container > .el-row > .el-col {
                font-size: 13px;
                text-align: left;
                padding: 60px 45px 60px;
            }
            #container-access-denied .el-container > .el-row > .el-col #logo {
                width: 90px;
                margin: 0 0 60px;
                display: block;
            }
            #container-access-denied .el-container > .el-row > .el-col h1 {
                font-size: 24px;
                color: #515050;
                margin: 0 0 15px;
                font-weight: 600;
                line-height: 36px;
                font-style: normal;
            }
            #container-access-denied .el-container > .el-row > .el-col p {
                margin-bottom: 15px;
                color: #515050;
                font-style: normal;
                font-weight: normal;
                font-size: 14px;
                line-height: 21px;
            }             
            [v-cloak] {
                display: none;             
            }
        </style>
    </head>
    <body>
        <div id="app">
            <div v-cloak v-if="loading" id="__${TP}">
                <div id="__layout">
                    <div>
                        <div id="container-access-denied">
                            <section class="el-container access_denied">
                                <div class="el-row">
                                    <div class="el-col el-col-24">
                                        <img v-if="!customization" style="width: 159px; height: 52px; left: 390px; top: 270px" :src="getLogo()" id="logo" />
                                        <h1>{{ lang.WEB_BROWSER_CONF_MSG }}</h1>
                                        <blockquote id="error">
                                            <p>{{ lang.WEB_BROWSER_CONF_MSG2 }}</p>
                                        </blockquote>

                                        <p>{{ lang.WEB_BROWSER_CONF_MSG3 }}</p>

                                        <div id="firefox">
                                            {{ lang.WEB_BROWSER_CONF_MSG4 }}
                                            <ul>
                                                <li>{{ lang.WEB_BROWSER_CONF_MSG5 }}</li>
                                                <li>{{ lang.WEB_BROWSER_CONF_MSG11 }}</li>
                                            </ul>
                                        </div>

                                        <div id="microsoft">
                                            {{ lang.WEB_BROWSER_CONF_MSG7 }}
                                            <ul>
                                                <li>{{ lang.WEB_BROWSER_CONF_MSG8 }}</li>
                                                <li>{{ lang.WEB_BROWSER_CONF_MSG12 }}</li>
                                            </ul>
                                        </div>

                                        <div id="opera">
                                            {{ lang.WEB_BROWSER_CONF_MSG9 }}
                                            <ul>
                                                <li>{{ lang.WEB_BROWSER_CONF_MSG10 }}</li>
                                                <li>{{ lang.WEB_BROWSER_CONF_MSG13 }}</li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </section>
                            <el-row class="block-col-2">
                                <el-col style="width: 100%; text-align: right" :span="12">
                                    <span class="demonstration"></span>
                                    <el-dropdown v-if="TP === 'berqnet'" trigger="click" @command="contextAction">
                                        <span class="el-dropdown-link"> {{ lang.btnTxt }}<i class="el-icon-arrow-down el-icon--right"></i> </span>
                                        <el-dropdown-menu slot="dropdown">
                                            <el-dropdown-item :command="{ action: 'language', lang: 'tr' }"> Türkçe </el-dropdown-item>
                                            <el-dropdown-item :command="{ action: 'language', lang: 'en' }"> English </el-dropdown-item>
                                        </el-dropdown-menu>
                                    </el-dropdown>
                                </el-col>
                            </el-row>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <script src="https://setup${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/static/vue.js"></script>
        <link rel="stylesheet" href="https://setup${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/static/index.css" />
        <script src="https://setup${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/static/index.js"></script>
        <script>
            let TP = "${TP}";
            let locale = {
                en: {
                    btnTxt: "Language",
                    WEB_BROWSER_CONF_MSG: "Web Browser Configuration",
                    WEB_BROWSER_CONF_MSG2: "Your Web Browser configuration needs to be corrected to use this network.",
                    WEB_BROWSER_CONF_MSG3: "How to find these settings in your browser:",
                    WEB_BROWSER_CONF_MSG4: "For Firefox browsers go to:",
                    WEB_BROWSER_CONF_MSG5: "Tools -> Options -> Advanced -> Network -> Connection Settings",
                    WEB_BROWSER_CONF_MSG7: "For Internet Explorer browsers go to:",
                    WEB_BROWSER_CONF_MSG8: "Tools -> Internet Options -> Connection -> LAN Settings ->Proxy",
                    WEB_BROWSER_CONF_MSG9: "For Opera browsers go to:",
                    WEB_BROWSER_CONF_MSG10: "Tools -> Preferences -> Advanced -> Network -> Proxy Servers",
                    WEB_BROWSER_CONF_MSG11: "Select Auto-detect proxy settings for this network",
                    WEB_BROWSER_CONF_MSG12: "Select Automatically detect settings",
                    WEB_BROWSER_CONF_MSG13: "Select Use Automatic proxy configuration",
                },
                tr: {
                    btnTxt: "Dil",
                    WEB_BROWSER_CONF_MSG: "Web Tarayıcı Yapılandırması",
                    WEB_BROWSER_CONF_MSG2: "Bu ağın kullanılması için Web Tarayıcı yapılandırmasının düzeltilmesi gerekmektedir.",
                    WEB_BROWSER_CONF_MSG3: "Bu ayarları tarayıcınızda nasıl bulabilirsiniz:",
                    WEB_BROWSER_CONF_MSG4: "Firefox tarayıcıları için şuraya gidiniz:",
                    WEB_BROWSER_CONF_MSG5: "Araçlar -> Seçenekler -> Gelişmiş -> Ağ -> Bağlantı Ayarları",
                    WEB_BROWSER_CONF_MSG7: "Internet Explorer tarayıcıları için şuraya gidiniz:",
                    WEB_BROWSER_CONF_MSG8: "Tools -> Internet Options -> Connection -> LAN Settings ->Proxy",
                    WEB_BROWSER_CONF_MSG9: "Opera tarayıcıları için şuraya gidiniz:",
                    WEB_BROWSER_CONF_MSG10: "Araçlar -> İnternet Seçenekleri -> Bağlantı -> LAN Ayarları -> Proxy",
                    WEB_BROWSER_CONF_MSG11: "Bu ağ için proxy ayarlarını “Otomatik Algıla”yı seçiniz",
                    WEB_BROWSER_CONF_MSG12: "Bu ağ için proxy ayarlarını Otomatik Olarak Algıla'yı seçiniz",
                    WEB_BROWSER_CONF_MSG13: "Otomatik Proxy Kullan yapılandırmasını seçiniz",
                },
            };
            let app = new Vue({
                el: "#app",
				
                data: {
					loading: false,
                    TP: TP,
                    lang: localStorage.storedData == "tr" ? locale.tr : locale.en,
                    logo: "",
                    customization: false,
                    alias: ""
                },

                async mounted() {
					try {
						const response = await fetch("https://setup${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/api/customization");
						const data = await response.json();
						if (data.results) {
							if (data.results.status == 1) {
								this.customization = true;
								this.alias = data.results.alias ? data.results.alias : "";
								this.logo = data.results.logo_url ? data.results.logo_url : "";
							} else if (data.results.status == -1) {
								this.customization = true;
								this.alias = "";
								this.logo = "";
							} else if (data.results.status == 0) {
								this.customization = false;
								this.alias = "";
								this.logo = "";
							}
						}
						document.title = this.customization ? this.alias : (this.TP === "berqnet" ? "Berqnet SASE" : "Timus Networks");
						this.loading = true;
					} catch (error) {
						this.customization = true;
						this.alias = "";
						this.logo = "";
						console.log(error);
						this.loading = true;
					}
                },
                methods: {
                    getLogo() {
                        return this.customization ? '' : `https://setup${DEPLOY_PREFIX}.${PRODUCT_DOMAIN}/static/${TP}-logo.svg`
                    },
                    contextAction(payload, context) {
                        switch (payload.action) {
                            case "language":
                                payload.lang == "tr" ? (this.lang = locale.tr) : (this.lang = locale.en);
                                localStorage.storedData = payload.lang;
                                break;
                        }
                    },
                },
            });
        </script>
    </body>
</html>
