UNPKG

site

Version:

Site Engine is the world's first all-in-one engine to build a modern web site, game, or blog. No HTML or CSS knowledge required.

1 lines 12.9 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generatePage=exports.encodeXMLComponent=void 0;var e,n,t=require("./shared.manifest");exports.encodeXMLComponent=e=function(e,n){return o=e.replace(new RegExp("&","g"),"&amp;").replace(new RegExp(">","g"),"&gt;").replace(new RegExp("<","g"),"&lt;"),void 0===(i=n)||"value"===i?(()=>o)():"quot"===i?(()=>o.replace(new RegExp('\\"',"g"),"&quot;"))():"apos"===i?(()=>o.replace(new RegExp("'","g"),"&apos;"))():(()=>(0,t.fail)())();var i,o},exports.generatePage=n=function(n){return t=e(void 0===(d=n.language)||null===d?"en":d,"quot"),i=e(void 0===(c=n.title)||null===c?"":c),o=e(void 0===(p=n.description)||null===p?"":p,"quot"),a=e(void 0===(u=n.keywords)||null===u?"":u,"quot"),""!==(r=void 0===(g=n.htmlAttributes)||null===g?"":g)&&(r=" "+r),s=void 0===(h=n.beforeScript)||null===h?"":h,l=void 0===(m=n.afterScript)||null===m?"":m,'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html>\n<html xml:lang="'+t+'" xmlns="http://www.w3.org/1999/xhtml"'+r+">\n <head>\n <title>"+i+'</title>\n <meta name="description" content="'+o+'" />\n <meta name="keywords" content="'+a+'" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0,\nminimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n <meta name="mobile-web-app-capable" content="yes" />\n <meta name="apple-mobile-web-app-capable" content="yes" />\n <style type="text/css"><![CDATA[\n * {\n /*\n * iOS doesn\'t support pan-x or pan-y. It only supports manipulation.\n * So we use manipulation as fallback.\n */\n touch-action: manipulation;\n touch-action: pan-x pan-y;\n }\n html {\n font-family: "Lucida Grande", "Lucida Sans Unicode", sans-serif;\n color: rgb(0%,0%,0%);\n line-height: 1;\n stroke-width: 0.0933333rem;\n cursor: default;\n overflow: hidden;\n position: fixed;\n /*\n * must stretch html and body to 100% otherwise in firefox\n * text can still be selected if clicking "outside"\n */\n width: 100%;\n height: 100%;\n }\n body {\n position: fixed;\n margin: 0;\n width: 100%;\n height: 100%;\n }\n html, body {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n -webkit-text-size-adjust: none;\n -moz-text-size-adjust: none;\n -ms-text-size-adjust: none;\n text-size-adjust: none;\n /* Without this, light text with dark background on macOS will be very bold. */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .text-input-705357537593286848 {\n -webkit-appearance: none;\n -moz-appearance: none;\n -ms-appearance: none;\n appearance: none;\n margin: 0;\n }\n /* There\'s a workaround for Firefox\'s inconsistency with other browsers,\n * because -moz-user-select by default is not\n * inherited by absolutely positioned elements, see:\n * https://developer.mozilla.org/en-US/docs/Web/CSS/user-select\n */\n div, img, audio, video, svg, .text-input-705357537593286848 {\n box-sizing: inherit;\n background-clip: padding-box;\n background-origin: padding-box;\n background-position: center;\n background-size: cover;\n background-repeat: no-repeat;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-weight: inherit;\n line-height: inherit;\n color: inherit;\n min-width: 0;\n min-height: 0;\n -webkit-user-select: inherit;\n -moz-user-select: inherit;\n -ms-user-select: inherit;\n user-select: inherit;\n }\n /* Set display to "block" to avoid line-height being applied in layout. */\n .img-705357537593286848,\n .audio-705357537593286848,\n .video-705357537593286848,\n .svg-705357537593286848,\n .text-input-705357537593286848 {\n display: block;\n }\n body > * {\n position: absolute;\n }\n .group-705357537593286848 > * {\n position: absolute;\n }\n .stack-705357537593286848 {\n display: -webkit-flex;\n display: flex;\n }\n .stack-705357537593286848 > * {\n position: static;\n }\n .svg-705357537593286848 {\n pointer-events: none;\n }\n /* The 2 "inherited" must be placed above the 2 without "inherited". */\n .svg-pe-inherited-auto-705357537593286848 > * {\n pointer-events: auto;\n }\n .svg-pe-inherited-none-705357537593286848 > * {\n pointer-events: none;\n }\n .svg-pe-auto-705357537593286848 > * {\n pointer-events: auto;\n }\n .svg-pe-none-705357537593286848 > * {\n pointer-events: none;\n }\n .contented-705357537593286848 {\n display: -webkit-flex;\n display: flex;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-align-items: center;\n align-items: center;\n }\n .contented-705357537593286848 > * {\n position: static;\n }\n #startup-705357537593286848 {\n display: -webkit-flex;\n display: flex;\n width: 100%;\n height: 100%;\n background-color: rgb(255,255,255);\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-align-items: center;\n align-items: center;\n padding: 0.5em;\n line-height: 1.2;\n }\n #scale-keeper-705357537593286848 {\n visibility: hidden;\n z-index: 100101;\n pointer-events: none;\n opacity: 0.8;\n display: -webkit-flex;\n display: flex;\n background-color: rgb(255,255,255);\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-align-items: center;\n align-items: center;\n }\n #scale-keeper-middle-705357537593286848 {\n visibility: hidden;\n z-index: 100100;\n background-color: rgb(255,255,255);\n opacity: 0;\n width: 100%;\n height: 100%;\n }\n ]]></style>\n <style type="text/css" title="animation-705357537593286848" />\n '+s+'\n <script type="text/javascript"><![CDATA[\n document.addEventListener("DOMContentLoaded", function() {\n window.global = window;\n\n var remSize;\n var average = Math.sqrt(window.innerWidth * window.innerHeight);\n if (Math.min(screen.width, screen.height) < 512) {\n remSize = (average * 0.03125).toString() + "px";\n }\n else {\n remSize = (average * 0.015625).toString() + "px";\n }\n\n document.documentElement.style.fontSize = remSize;\n\n var startup = document.getElementById("startup-705357537593286848");\n startup.style.fontSize = remSize; // explicitly set to not be related to rem\n var startupText = document.getElementById("startup-text-705357537593286848");\n\n var scaleKeeper = document.getElementById("scale-keeper-705357537593286848");\n var scaleKeeperText = document.getElementById("scale-keeper-text-705357537593286848");\n\n var userAgentMatch;\n if (\n (userAgentMatch = navigator.userAgent.search(/\\bChrome\\/(\\d+)\\b/)) !== null &&\n parseInt(userAgentMatch[1]) < 42\n ) {\n startupText.textContent = "您的浏览器内核为 Chromium " + userAgentMatch[1] +\n ",此内核已经过时。本站正常浏览的最低要求是 Chromium 42 内核。请升级浏览器。";\n if (navigator.userAgent.search(/\\bQQBrowser\\b/) !== -1) {\n startupText.textContent += "您似乎用的是QQ浏览器,请安装最新版。";\n }\n return;\n }\n else if (\n navigator.userAgent.search(/\\bTrident\\/7\\.0\\b/) !== -1 &&\n navigator.userAgent.search(/\\brv:11\\.0\\b/) !== -1\n ) {\n if (navigator.language.search(/^zh\\b/) !== -1) {\n startupText.textContent = "IE浏览器已经过时。请使用最新的浏览器浏览本站。";\n }\n else {\n startupText.textContent = "IE is outdated. Please use a modern browser.";\n }\n return;\n }\n\n if (navigator.language.search(/^zh\\b/) !== -1) {\n startupText.textContent = "下载中... 请稍候";\n scaleKeeperText.textContent = "您似乎是在使用移动设备,并且把本页放大到了超过" +\n "100%。请用双指把本页缩小。当前缩放值:";\n }\n else {\n startupText.textContent = "Downloading... Please wait";\n scaleKeeperText.textContent = "It seems that you are on mobile and you\'ve " +\n "scaled the page to more than 100%. Please use your fingers to scale down. " +\n "Current scale:";\n }\n\n var script = document.createElementNS(\n "http://www.w3.org/1999/xhtml", "script"\n );\n script.type = "text/javascript";\n var passwordMatch = document.cookie.match(\n /(^|; )serverPassword_705357537593286848=([A-Za-z0-9]*)\\b/\n );\n var queryString;\n if (passwordMatch === null || location.protocol !== "https:") {\n queryString = "";\n }\n else {\n queryString = "?serverPassword_705357537593286848=" + passwordMatch[2];\n }\n script.src = "/bundle-705357537593286848.js" + queryString;\n script.crossOrigin = "use-credentials";\n var loaded = false;\n script.onload = function() {\n if (!loaded) {\n loaded = true;\n window.callMain_705357537593286848();\n }\n };\n document.head.appendChild(script);\n });\n ]]><\/script>\n '+l+'\n </head>\n <body>\n <div id="scale-keeper-705357537593286848">\n <div style="margin: 1em; line-height: 1.2;">\n <div id="scale-keeper-text-705357537593286848" />\n <div style="height: 1em;" />\n <div id="scale-keeper-current-scale-705357537593286848" />\n </div>\n </div>\n <div id="scale-keeper-middle-705357537593286848" />\n <div id="startup-705357537593286848">\n <div id="startup-text-705357537593286848" />\n </div>\n <a id="link-simulator-705357537593286848" style="display: none;" />\n <input id="file-reader-simulator-705357537593286848" type="file" style="display: none;" />\n </body>\n</html>';var t,i,o,a,r,s,l,d,c,p,u,g,h,m},exports.encodeXMLComponent=e,exports.generatePage=n;