<!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://${DEPLOY_PREFIX}gate.${PRODUCT_DOMAIN}/favicon.ico" />
        <link href="https://${DEPLOY_PREFIX}setup.${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.URL_COULD_NOT_RETRIEVED_ERR }}</h1>
                                        <p>
                                            {{ lang.URL_RETRY_ERR }}
                                            <a href="%U">%U</a>
                                        </p>

                                        <blockquote id="data">
                                            <pre> {{ lang.ERR_CONFLICT_HOST }} </pre>
                                        </blockquote>

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

                                        <p>{{ lang.SOME_PROBLEM_MSG }}</p>
                                        <ul>
                                            <li>{{ lang.ERR_CONFLICT_HOST_MSG2 }}</li>
                                            <li>{{ lang.ERR_CONFLICT_HOST_MSG3 }}</li>
                                        </ul>
                                    </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://${DEPLOY_PREFIX}setup.${PRODUCT_DOMAIN}/static/vue.js"></script>
        <link rel="stylesheet" href="https://${DEPLOY_PREFIX}setup.${PRODUCT_DOMAIN}/static/index.css" />
        <script src="https://${DEPLOY_PREFIX}setup.${PRODUCT_DOMAIN}/static/index.js"></script>
        <script>
            let TP = "${TP}";
            let locale = {
                en: {
                    btnTxt: "Language",
                    URL_COULD_NOT_RETRIEVED_ERR: "Requested URL could not be retrieved",
                    URL_RETRY_ERR: "Following error was encountered while trying to retrieve URL:",
                    ERR_CONFLICT_HOST: "URI Host Conflict",
                    ERR_CONFLICT_HOST_MSG1: "This means, domain name you are trying to access apparently no longer exists on machine you are requesting it from.",
                    ERR_CONFLICT_HOST_MSG2: "Domain may have moved very recently. Please try again later.",
                    ERR_CONFLICT_HOST_MSG3: "Website may require you to use a local country-based version. For solution you can use your ISP provided DNS server(s).",
                    SOME_PROBLEM_MSG: "Some possible problems are:",
                },
                tr: {
                    btnTxt: "Dil",
                    URL_COULD_NOT_RETRIEVED_ERR: "İstenen URL alınamadı",
                    URL_RETRY_ERR: "URL alınmaya çalışılırken aşağıdaki hatayla karşılaşıldı:",
                    ERR_CONFLICT_HOST: "URI Ana Bilgisayar Çakışması",
                    ERR_CONFLICT_HOST_MSG1: "Bu, erişmeye çalıştığınız alan adının artık talep ettiğiniz makinede olmadığı anlamına gelmektedir.",
                    ERR_CONFLICT_HOST_MSG2: "Etki alanı çok yakın zamanda taşınmış olabilir. Lütfen tekrar deneyiniz.",
                    ERR_CONFLICT_HOST_MSG3: "Web sitesi, yerel ülke tabanlı bir sürüm kullanmanızı gerektirebilir. Çözüm için ISS'inizin sağladığı DNS sunucularını kullanabilirsiniz.",
                    SOME_PROBLEM_MSG: "Bazı olası sorunlar şunlardır:",
                },
            };
            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://${DEPLOY_PREFIX}setup.${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://${DEPLOY_PREFIX}setup.${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>
