roomkit-web-vue3
Version:
<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,
26 lines (25 loc) • 987 B
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const utils = require("./utils.js");
const THEME = {
LIGHT: "light",
DARK: "dark"
};
function getLanguage() {
const isWxMiniProgram = typeof wx !== "undefined" && wx.getSystemInfoSync;
let language = utils.getUrlParam("lang") || navigator.language || (isWxMiniProgram ? "zh-CN" : "en-US");
language = language.replace(/_/, "-").toLowerCase();
const isZh = language.startsWith("zh");
language = isZh ? "zh-CN" : "en-US";
return language;
}
function toTargetTheme(themeOption) {
const theme = themeOption === "DARK" ? THEME.DARK : THEME.LIGHT;
return theme;
}
const invalidDigitalPasswordRegex = /[^\d]+/g;
const invalidPasswordRegex = /[^A-Za-z0-9!@#$%^&*()_+{}|:"<>?`~';[\]\\/.,-=]+/g;
exports.getLanguage = getLanguage;
exports.invalidDigitalPasswordRegex = invalidDigitalPasswordRegex;
exports.invalidPasswordRegex = invalidPasswordRegex;
exports.toTargetTheme = toTargetTheme;