<!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.timusnetworks.com/favicon.ico" />
		<link href="https://setup.timusnetworks.com/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#__timus,
			body > div#__timus > div#__layout,
			body > div#__timus > 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;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<div v-cloak v-if="loading" id="__timus">
				<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="error">
											<p>
												<b><p v-html="lang.ERR_ONLY_IF_CACHED_MISS_MSG"></p></b>
											</p>
										</blockquote>
										<p><p v-html="lang.ERR_ONLY_IF_CACHED_MISS_MSG2"></p></p>
								</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.timusnetworks.com/static/vue.js"></script>
<link rel="stylesheet" href="https://setup.timusnetworks.com/static/index.css" />
<script src="https://setup.timusnetworks.com/static/index.js"></script>
<script>
	let TP = "timus";
	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_ONLY_IF_CACHED_MISS_MSG": "Valid document was not found in cache and <q>only-if-cached</q> directive was specified.",
			"ERR_ONLY_IF_CACHED_MISS_MSG2": "Request was issued with <q>if cached only</q> cache-control directive. Document not found in cache, <em>or</em> required revalidation, prohibited by <q>only-if-cached</q> directive.",
		},
		"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_ONLY_IF_CACHED_MISS_MSG": "Önbellekte geçerli belge bulunamamıştır ve <q>yalnızca önbelleğe alınırsa</q> yönergesi belirtilmiştir.",
			"ERR_ONLY_IF_CACHED_MISS_MSG2": "İstek, <q>yalnızca önbelleğe alınırsa</q> önbellek denetimi yönergesi ile yayınlanmıştır. Belge önbellekte bulunamamıştır, <em> veya </em> yeniden doğrulama gerekmektedir, <q>yalnızca önbelleğe alınırsa</q> yönergesi tarafından yasaklanmıştı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://setup.timusnetworks.com/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.timusnetworks.com/static/timus-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>
