commit c0e46d1ae71197a358c5b64c4ee5ef223747f431 Author: Lishundong <577732344@qq.com> Date: Fri Oct 24 09:34:42 2025 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a503fa2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/unpackage/ diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..81f13f4 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..6cef1ff --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/zhz-front-app.iml b/.idea/zhz-front-app.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/zhz-front-app.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..87487b0 --- /dev/null +++ b/App.vue @@ -0,0 +1,100 @@ + + + diff --git a/common/IndexedDBHelper.js b/common/IndexedDBHelper.js new file mode 100644 index 0000000..04192e4 --- /dev/null +++ b/common/IndexedDBHelper.js @@ -0,0 +1,364 @@ +class IndexedDBHelper { + constructor(dbName, version = 1) { + this.dbName = dbName; + this.version = version; + this.db = null; + } + + /** + * 初始化数据库(打开/创建) + * @param {Array} stores [{ name: "storeName", keyPath: "id", indexes: [{ name: "indexName", key: "keyPath", unique: false }] }] + * @returns {Promise} + */ + openDB(stores = []) { + return new Promise((resolve, reject) => { + const request = indexedDB.open(this.dbName, this.version); + + request.onupgradeneeded = (event) => { + this.db = event.target.result; + stores.forEach(store => { + if (!this.db.objectStoreNames.contains(store.name)) { + const objectStore = this.db.createObjectStore(store.name, { + keyPath: store.keyPath, + autoIncrement: store.autoIncrement || false + }); + if (store.indexes) { + store.indexes.forEach(index => { + objectStore.createIndex(index.name, index.key, { + unique: index.unique + }); + }); + } + } + + }); + }; + + request.onsuccess = (event) => { + this.db = event.target.result; + console.log("✅ IndexedDB 连接成功"); + resolve(this.db); + }; + + request.onerror = (event) => { + reject(`IndexedDB Error: ${event.target.error}`); + }; + }); + } + + // 通用查询方法,按指定字段查询 + async queryByField(storeName, fieldName, value) { + return new Promise(async (resolve, reject) => { + try { + if (!this.db) { + await this.openDB(); + } + const transaction = this.db.transaction(storeName, 'readonly'); + const store = transaction.objectStore(storeName); + + if (!store.indexNames.contains(fieldName)) { + return reject(`索引 ${fieldName} 不存在`); + } + + const index = store.index(fieldName); + const request = index.getAll(value); + + request.onsuccess = (event) => { + resolve(event.target.result); + }; + + request.onerror = (event) => { + reject('查询失败: ' + event.target.error); + }; + } catch (error) { + reject('查询错误: ' + error); + } + }); + } + + /** + * 添加数据(支持单条或批量) + * @param {string} storeName - 存储空间名称 + * @param {Object|Array} data - 要添加的数据(单条对象或数组) + * @returns {Promise>} - 返回添加数据的ID(单条返回数字,批量返回数组) + */ + add(storeName, data) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readwrite"); + const store = transaction.objectStore(storeName); + + // 统一处理为数组格式 + const items = Array.isArray(data) ? data : [data]; + const results = []; + + // 监听每个添加操作的成功事件 + items.forEach((item, index) => { + const request = store.add(item); + request.onsuccess = (event) => { + results[index] = event.target.result; // 保存生成的ID + }; + request.onerror = (event) => { + transaction.abort(); // 遇到错误时中止事务 + reject(`第 ${index + 1} 条数据添加失败: ${event.target.error}`); + }; + }); + + // 监听事务完成事件 + transaction.oncomplete = () => { + // 单条数据返回单个ID,批量返回数组 + resolve(items.length === 1 ? results[0] : results); + }; + + // 统一错误处理 + transaction.onerror = (event) => { + reject(`添加失败: ${event.target.error}`); + }; + }); + } + + /** + * 读取数据(根据主键) + * @param {string} storeName + * @param {any} key + * @returns {Promise} + */ + get(storeName, key) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readonly"); + const store = transaction.objectStore(storeName); + const request = store.get(key); + + request.onsuccess = () => resolve(request.result); + request.onerror = (event) => reject(`Get Error: ${event.target.error}`); + }); + } + + /** + * 读取所有数据(兼容X5内核方案) + * @param {string} storeName + * @returns {Promise} + */ + getAll(storeName) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readonly"); + const store = transaction.objectStore(storeName); + + // 兼容性检测:优先尝试原生getAll方法 + if (typeof store.getAll === 'function') { + const request = store.getAll(); + request.onsuccess = () => resolve(request.result); + request.onerror = (e) => reject(`GetAll Error: ${e.target.error}`); + } + // 降级方案:使用游标手动遍历 + else { + const results = []; + const request = store.openCursor(); + + request.onsuccess = (e) => { + const cursor = e.target.result; + if (cursor) { + results.push(cursor.value); + cursor.continue(); + } else { + resolve(results); + } + }; + + request.onerror = (e) => reject(`Cursor Error: ${e.target.error}`); + } + }); + } + + /** + * 获取表的总记录数 + * @param {string} storeName - 表名(Object Store 名称) + * @returns {Promise} - 记录总数 + */ + async getRecordCount(storeName) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readonly"); + const store = transaction.objectStore(storeName); + const request = store.count(); + + request.onsuccess = () => resolve(request.result); + request.onerror = (event) => reject(`❌ Count Error: ${event.target.error}`); + }); + } + + /** + * 更新数据(支持指定 key 或自动使用 keyPath) + * @param {string} storeName 存储对象名 + * @param {Object} data 待更新数据 + * @param {IDBValidKey|IDBKeyRange} [key] 可选参数,指定更新的 key + * @returns {Promise} 更新结果 + */ + update(storeName, data, key) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readwrite"); + const store = transaction.objectStore(storeName); + const keyPath = store.keyPath; + + // 有传入 key:直接使用 key 更新 + if (key !== undefined) { + const request = store.put(data, key); + request.onsuccess = () => resolve("数据更新成功(指定 key)"); + request.onerror = (event) => reject(`更新失败: ${event.target.error}`); + return; + } + + // 无传入 key:依赖 keyPath 更新 + if (!keyPath) { + reject("当前 store 未设置 keyPath,必须传入 key 参数"); + return; + } + + // 检查数据是否包含 keyPath 属性 + let missingKeys = []; + if (Array.isArray(keyPath)) { + missingKeys = keyPath.filter(k => !data.hasOwnProperty(k)); + } else if (typeof keyPath === 'string') { + if (!data.hasOwnProperty(keyPath)) { + missingKeys.push(keyPath); + } + } + + if (missingKeys.length > 0) { + reject(`数据缺少必要的 keyPath 属性: ${missingKeys.join(', ')}`); + return; + } + + // 默认使用 keyPath 更新 + const request = store.put(data); + request.onsuccess = () => resolve("数据更新成功(默认 keyPath)"); + request.onerror = (event) => reject(`更新失败: ${event.target.error}`); + }); + } + + /** + * 删除数据(根据主键) + * @param {string} storeName + * @param {any} key + * @returns {Promise} + */ + delete(storeName, key) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readwrite"); + const store = transaction.objectStore(storeName); + const request = store.delete(key); + + request.onsuccess = () => resolve("Data deleted successfully"); + request.onerror = (event) => reject(`Delete Error: ${event.target.error}`); + }); + } + /** + * 根据条件删除所有匹配的数据 + * @param {string} storeName - 数据仓库名 + * @param {function} conditionFn - 判断是否删除 (record) => boolean + * @returns {Promise} + */ + deleteByCondition(storeName, conditionFn) { + return new Promise((resolve, reject) => { + if (!this.db) { + reject('Database not initialized'); + return; + } + + const transaction = this.db.transaction([storeName], 'readwrite'); + const store = transaction.objectStore(storeName); + const request = store.openCursor(); + + request.onsuccess = (event) => { + const cursor = event.target.result; + if (cursor && cursor.value) { + try { + // console.log(cursor.value) + const shouldDelete = conditionFn(cursor.value); + if (shouldDelete) { + cursor.delete(); + } + } catch (err) { + console.error('Condition function error:', err); + } + cursor.continue(); + } else { + resolve('All matching records deleted successfully'); + } + }; + + request.onerror = (event) => { + reject(`Delete by condition failed: ${event.target.error}`); + }; + }); + } + + /** + * 通过索引查询数据 + * @param {string} storeName + * @param {string} indexName + * @param {any} value + * @returns {Promise} + */ + getByIndex(storeName, indexName, value) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readonly"); + const store = transaction.objectStore(storeName); + const index = store.index(indexName); + const request = index.get(value); + + request.onsuccess = () => resolve(request.result); + request.onerror = (event) => reject(`Get By Index Error: ${event.target.error}`); + }); + } + + /** + * 清空表 + * @param {string} storeName + * @returns {Promise} + */ + clearStore(storeName) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readwrite"); + const store = transaction.objectStore(storeName); + const request = store.clear(); + + request.onsuccess = () => resolve("Store cleared successfully"); + request.onerror = (event) => reject(`Clear Store Error: ${event.target.error}`); + }); + } + + /** + * 删除数据库 + * @returns {Promise} + */ + deleteDB(dbNamed = null) { + return new Promise((resolve, reject) => { + const request = indexedDB.deleteDatabase(dbNamed || this.dbName); + + request.onsuccess = () => resolve("Database deleted successfully"); + request.onerror = (event) => reject(`Delete DB Error: ${event.target.error}`); + }); + } + + async deleteOldestRecord(storeName) { + return new Promise((resolve, reject) => { + const transaction = this.db.transaction([storeName], "readwrite"); + const store = transaction.objectStore(storeName); + const request = store.openCursor(); // 🔹 获取最早的记录(按主键 ID 排序) + + request.onsuccess = function(event) { + const cursor = event.target.result; + if (cursor) { + console.log(`🗑️ 删除最早的记录 ID: ${cursor.key}`); + store.delete(cursor.key); // 🔥 删除最小 ID(最早记录) + resolve(); + } else { + resolve(); // 没有记录时跳过 + } + }; + + request.onerror = (event) => reject(`❌ Cursor Error: ${event.target.error}`); + }); + } +} + +export default IndexedDBHelper \ No newline at end of file diff --git a/common/UniStorageHelper.js b/common/UniStorageHelper.js new file mode 100644 index 0000000..324455c --- /dev/null +++ b/common/UniStorageHelper.js @@ -0,0 +1,256 @@ +// uni-storage-helper.js +class UniStorageHelper { + constructor(dbName, options = {}) { + this.dbName = dbName; + this.storesMeta = {}; + this.options = { + maxEntries: 500, // 单个存储空间最大条目数 + maxSizeMB: 1, // 单条数据最大限制(微信小程序限制) + autoPurge: true, // 是否自动清理旧数据 + purgeBatch: 10, // 自动清理批次数量 + debug: false, // 调试模式 + ...options + }; + } + + /*================== + 核心方法 + ==================*/ + + /** + * 初始化存储空间 + * @param {Array} stores - 存储空间配置 + */ + async openDB(stores = []) { + stores.forEach(store => { + const storeKey = this._getStoreKey(store.name); + if (!this._storageHas(storeKey)) { + this._storageSet(storeKey, []); + } + + this.storesMeta[store.name] = { + keyPath: store.keyPath, + autoIncrement: !!store.autoIncrement, + indexes: store.indexes || [] + }; + + if (store.autoIncrement) { + const counterKey = this._getCounterKey(store.name); + if (!this._storageHas(counterKey)) { + this._storageSet(counterKey, 1); + } + } + }); + + this._log('数据库初始化完成'); + return Promise.resolve(); + } + + /** + * 添加数据(自动处理容量限制) + */ + async add(storeName, data) { + try { + const storeKey = this._getStoreKey(storeName); + let storeData = this._storageGet(storeKey) || []; + const meta = this.storesMeta[storeName]; + const items = Array.isArray(data) ? data : [data]; + + // 容量预检 + await this._checkCapacity(storeName, items); + + // 处理自增ID + if (meta?.autoIncrement) { + const counterKey = this._getCounterKey(storeName); + let nextId = this._storageGet(counterKey) || 1; + items.forEach(item => { + item[meta.keyPath] = nextId++; + this._createIndexes(meta.indexes, item); + }); + this._storageSet(counterKey, nextId); + } + + // 保存数据 + storeData = [...storeData, ...items]; + this._storageSet(storeKey, storeData); + + this._log(`成功添加${items.length}条数据到${storeName}`); + + return meta?.autoIncrement ? + Array.isArray(data) ? + items.map(i => i[meta.keyPath]) : + items[0][meta.keyPath] : + undefined; + + } catch (error) { + if (error.message.includes('exceed')) { + this._log('触发自动清理...'); + await this._purgeData(storeName, this.options.purgeBatch); + return this.add(storeName, data); + } + throw error; + } + } + + /*================== + 查询方法 + ==================*/ + + async get(storeName, key) { + const storeData = this._storageGet(this._getStoreKey(storeName)) || []; + const keyPath = this.storesMeta[storeName]?.keyPath; + return storeData.find(item => item[keyPath] === key); + } + + async getAll(storeName) { + return this._storageGet(this._getStoreKey(storeName)) || []; + } + + async queryByField(storeName, fieldName, value) { + const storeData = this._storageGet(this._getStoreKey(storeName)) || []; + return storeData.filter(item => item[fieldName] === value); + } + + /*================== + 更新/删除方法 + ==================*/ + + async update(storeName, data, key) { + const storeKey = this._getStoreKey(storeName); + const storeData = this._storageGet(storeKey) || []; + const meta = this.storesMeta[storeName]; + const keyPath = meta?.keyPath; + const targetKey = key ?? data[keyPath]; + + const index = storeData.findIndex(item => item[keyPath] === targetKey); + if (index === -1) throw new Error('未找到对应记录'); + + // 合并数据并重建索引 + const newItem = { + ...storeData[index], + ...data + }; + this._createIndexes(meta.indexes, newItem); + + storeData[index] = newItem; + this._storageSet(storeKey, storeData); + + return "更新成功"; + } + + async delete(storeName, key) { + const storeKey = this._getStoreKey(storeName); + const storeData = this._storageGet(storeKey) || []; + const keyPath = this.storesMeta[storeName]?.keyPath; + const newData = storeData.filter(item => item[keyPath] !== key); + this._storageSet(storeKey, newData); + return `删除${storeData.length - newData.length}条记录`; + } + + /*================== + 存储管理 + ==================*/ + + async clearStore(storeName) { + this._storageSet(this._getStoreKey(storeName), []); + return "存储空间已清空"; + } + + async deleteDB() { + Object.keys(this.storesMeta).forEach(storeName => { + uni.removeStorageSync(this._getStoreKey(storeName)); + uni.removeStorageSync(this._getCounterKey(storeName)); + }); + return "数据库已删除"; + } + + /*================== + 私有方法 + ==================*/ + + _getStoreKey(storeName) { + return `${this.dbName}_${storeName}`; + } + + _getCounterKey(storeName) { + return `${this.dbName}_${storeName}_counter`; + } + + _createIndexes(indexes, item) { + indexes.forEach(index => { + item[index.name] = item[index.key]; + }); + } + + async _checkCapacity(storeName, newItems) { + const storeKey = this._getStoreKey(storeName); + const currentData = this._storageGet(storeKey) || []; + + // 检查条目数限制 + if (currentData.length + newItems.length > this.options.maxEntries) { + await this._purgeData(storeName, newItems.length); + } + + // 检查单条数据大小 + newItems.forEach(item => { + const sizeMB = this._getItemSizeMB(item); + if (sizeMB > this.options.maxSizeMB) { + throw new Error(`单条数据大小超出${this.options.maxSizeMB}MB限制`); + } + }); + } + + _getItemSizeMB(item) { + try { + // 精确计算(支持Blob的环境) + return new Blob([JSON.stringify(item)]).size / 1024 / 1024; + } catch { + // 兼容方案 + return encodeURIComponent(JSON.stringify(item)).length * 2 / 1024 / 1024; + } + } + + async _purgeData(storeName, count) { + const storeKey = this._getStoreKey(storeName); + const currentData = this._storageGet(storeKey) || []; + const newData = currentData.slice(count); + this._storageSet(storeKey, newData); + this._log(`自动清理${count}条旧数据`); + } + + /*================== + 存储适配器 + ==================*/ + + _storageHas(key) { + return !!uni.getStorageSync(key); + } + + _storageGet(key) { + try { + return uni.getStorageSync(key); + } catch (e) { + return null; + } + } + + _storageSet(key, value) { + try { + uni.setStorageSync(key, value); + return true; + } catch (error) { + if (error.errMsg?.includes('exceed')) { + throw new Error('STORAGE_QUOTA_EXCEEDED'); + } + throw error; + } + } + + _log(...args) { + if (this.options.debug) { + console.log(`[StorageHelper]`, ...args); + } + } +} + +export default UniStorageHelper; \ No newline at end of file diff --git a/common/animation.css b/common/animation.css new file mode 100644 index 0000000..455eb4c --- /dev/null +++ b/common/animation.css @@ -0,0 +1,193 @@ +/*base code*/ +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +/*the animation definition*/ +@-webkit-keyframes tada { + 0% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + + 10%, + 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg) + } + + 30%, + 50%, + 70%, + 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg) + } + + 40%, + 60%, + 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg) + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +@keyframes tada { + 0% { + -webkit-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + + 10%, + 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + -ms-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg) + } + + 30%, + 50%, + 70%, + 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + -ms-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg) + } + + 40%, + 60%, + 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + -ms-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg) + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +.tada { + -webkit-animation-name: tada; + animation-name: tada +} + + +.btn-tada:active { + -webkit-animation-name: tada; + animation-name: tada +} + +/*the animation definition*/ +@-webkit-keyframes rubberBand { + 0% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + + 30% { + -webkit-transform: scale3d(1.25, .75, 1); + transform: scale3d(1.25, .75, 1) + } + + 40% { + -webkit-transform: scale3d(0.75, 1.25, 1); + transform: scale3d(0.75, 1.25, 1) + } + + 50% { + -webkit-transform: scale3d(1.15, .85, 1); + transform: scale3d(1.15, .85, 1) + } + + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1) + } + + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1) + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +@keyframes rubberBand { + 0% { + -webkit-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + + 30% { + -webkit-transform: scale3d(1.25, .75, 1); + -ms-transform: scale3d(1.25, .75, 1); + transform: scale3d(1.25, .75, 1) + } + + 40% { + -webkit-transform: scale3d(0.75, 1.25, 1); + -ms-transform: scale3d(0.75, 1.25, 1); + transform: scale3d(0.75, 1.25, 1) + } + + 50% { + -webkit-transform: scale3d(1.15, .85, 1); + -ms-transform: scale3d(1.15, .85, 1); + transform: scale3d(1.15, .85, 1) + } + + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + -ms-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1) + } + + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + -ms-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1) + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + -ms-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +.rubberBand { + -webkit-animation-name: rubberBand; + animation-name: rubberBand +} + + +.btn-rubberBand:active { + -webkit-animation-name: tada; + animation-name: tada +} \ No newline at end of file diff --git a/common/common.css b/common/common.css new file mode 100644 index 0000000..54ac785 --- /dev/null +++ b/common/common.css @@ -0,0 +1,467 @@ +/* 公共样式表 */ +page { + min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom)); + font-size: 28rpx; + background-color: #FFFFFF; + color: #333333; + overflow: hidden; +} + +/* 禁止页面回弹 */ +/* html, +body, +page { + overscroll-behavior: none; + overflow: hidden; +} */ + +image { + width: 100%; + height: 100%; +} + +.page-body { + height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom)); + /* width: 100%; */ + /* height: 100%; */ +} + +body, +html { + height: 100%; + width: 100%; + overflow-x: hidden; +} + +/* 布局调整 */ + +/* 点击动效 */ +/* 缩小 */ +.button-click { + transition: transform 0.1s ease; +} + +.button-click:active { + transform: scale(0.95); +} + +/* 背景变色 */ +.btn-light { + color: white; + border-radius: 16rpx; + transition: background-color 0.2s; +} + +.btn-light:active { + background-color: rgba(189, 197, 254, 0.15); +} + + +.btn-incline { + transition: transform 0.2s ease; + transform-style: preserve-3d; +} + +.btn-incline:active { + transform: perspective(600px) rotateY(6deg) rotateX(3deg); +} + +.btn-feel { + transition: transform 0.2s ease; + transform-style: preserve-3d; +} + +.btn-feel:active { + transform: perspective(600px) rotateX(6deg) scale(0.98); +} + +.press-button { + padding: 10px 20px; + background: #3A4750; + /* 深灰蓝 */ + color: #ffffff; + font-size: 16px; + border: none; + border-radius: 6px; + cursor: pointer; + transition: transform 0.1s ease, box-shadow 0.1s ease; + /* box-shadow: 0 4px 0 #2C3E50; */ +} + +.press-button:active { + transform: scale(0.95) translateY(2px); + /* box-shadow: 0 2px 0 #1C2833; */ +} + +/* 动画效果 */ +.btn-shaky:active { + animation: shakeScale 0.6s; +} + +@keyframes shakeScale { + 0% { + transform: scale(1); + } + + 10% { + transform: scale(0.9) rotate(-3deg); + } + + 20% { + transform: scale(1.05) rotate(3deg); + } + + 30% { + transform: scale(0.95) rotate(-3deg); + } + + 40% { + transform: scale(1.02) rotate(3deg); + } + + 50% { + transform: scale(0.98) rotate(-2deg); + } + + 60% { + transform: scale(1.01) rotate(2deg); + } + + 70% { + transform: scale(0.99) rotate(-1deg); + } + + 80% { + transform: scale(1.005) rotate(1deg); + } + + 90% { + transform: scale(1) rotate(0deg); + } + + 100% { + transform: scale(1) rotate(0deg); + } +} + +/* 控制hover */ +.opctiy_8 { + opacity: 0.8 !important; +} + +.opctiy_7 { + opacity: 0.7 !important; +} + +.opctiy_6 { + opacity: 0.6 !important; +} + +.opctiy_5 { + opacity: 0.5 !important; +} + +.opctiy_4 { + opacity: 0.4 !important; +} + +.opctiy_3 { + opacity: 0.3 !important; +} + +.opctiy_2 { + opacity: 0.2 !important; +} + +.opctiy_1 { + opacity: 0.1 !important; +} + +/* 控制文字大小 */ +.fs_10 { + font-size: 20rpx !important; +} + +.fs_12 { + font-size: 24rpx !important; +} + +.fs_14 { + font-size: 28rpx !important; +} + +.fs_16 { + font-size: 32rpx !important; +} + +.fs_18 { + font-size: 36rpx !important; +} + +.fs_20 { + font-size: 40rpx !important; +} + +.fs_22 { + font-size: 44rpx !important; +} + +.fs_24 { + font-size: 48rpx !important; +} + +.fs_26 { + font-size: 52rpx !important; +} + +.fs_28 { + font-size: 56rpx !important; +} + +.fs_30 { + font-size: 60rpx !important; +} + +.fs_32 { + font-size: 64rpx !important; +} + +/* 控制字体粗细 */ +.fw_blod { + font-weight: bold; +} + +/* 控制字体颜色 */ +.color_D16B3F { + color: #D16B3F !important; +} + +.color_C7331D { + color: #C7331D !important; +} + +.color_666666 { + color: #666666 !important; +} + +.color_F8A52F { + color: #F8A52F !important; +} + +.color_999999 { + color: #999999 !important; +} + +.color_C7331D { + color: #C7331D !important; +} + +.color_333333 { + color: #333333 !important; +} + +.color_FFFFFF { + color: #FFFFFF !important; +} + +.color_E7612E { + color: #E7612E !important; +} + +.color_EF4B37 { + color: #EF4B37 !important; +} + +.color_5F5F5F { + color: #5F5F5F !important; +} + +.color_FB7307 { + color: #FB7307 !important; +} + +.color_256BFA { + color: #256BFA !important; +} + +.color_4E8ADE { + color: #4E8ADE !important; +} + +.color_D9D9D9 { + color: #D9D9D9 !important; +} + +/* 控制左右距离 */ +.mar_le30 { + margin-left: 60rpx !important; +} + +.mar_le25 { + margin-left: 50rpx !important; +} + +.mar_le20 { + margin-left: 40rpx !important; +} + +.mar_le15 { + margin-left: 30rpx !important; +} + +.mar_le10 { + margin-left: 20rpx !important; +} + +.mar_le5 { + margin-left: 10rpx !important; +} + +.mar_ri5 { + margin-right: 10rpx !important; +} + +.mar_ri10 { + margin-right: 20rpx !important; +} + +.mar_ri15 { + margin-right: 30rpx !important; +} + +.mar_ri20 { + margin-right: 40rpx !important; +} + +.mar_ri25 { + margin-right: 50rpx !important; +} + +.mar_top0 { + margin-top: 0 !important; +} + +.mar_top5 { + margin-top: 10rpx !important; +} + +.mar_top10 { + margin-top: 20rpx !important; +} + +.mar_top15 { + margin-top: 30rpx !important; +} + +.mar_top20 { + margin-top: 40rpx !important; +} + +.mar_top25 { + margin-top: 50rpx !important; +} + +/* 控制字体粗细 */ +.fw_blod { + font-weight: bold !important; +} + +/* 控制背景色 */ +.bg_e8 { + background-color: #e8e8e8 !important; +} + +/* 控制背景色 */ +.bg_cc { + background-color: #CCCCCC !important; +} + +/* 控制背景色 */ +.bg_ff { + background-color: #ffffff !important; +} + + + +/* 弹性布局 */ +.fl_box { + display: flex; +} + +.fl_deri { + flex-direction: column; +} + +.fl_row { + flex-direction: row; +} + +.fl_justmiddle { + justify-content: center; +} + +.fl_juststart { + justify-content: flex-start; +} + +.fl_justbet { + justify-content: space-between; +} + +.fl_justround { + justify-content: space-around; +} + +.fl_justend { + justify-content: flex-end; +} + +.fl_almiddle { + align-items: center; +} + +.fl_alstart { + align-items: flex-start; +} + +.fl_alend { + align-items: flex-end; +} + +.fl_1 { + flex: 1; +} + +.fl_warp { + flex-wrap: wrap +} + +.fl_nowarp { + flex-wrap: nowrap +} + +.line_2 { + display: -webkit-box; + /* 让文本内容成为弹性盒 */ + -webkit-box-orient: vertical; + /* 设置盒子的方向为垂直 */ + -webkit-line-clamp: 2; + /* 限制最多显示两行 */ + overflow: hidden; + /* 隐藏超出的文本 */ + text-overflow: ellipsis; + /* 使用省略号 */ +} + +.line_1 { + display: -webkit-box; + /* 让文本内容成为弹性盒 */ + -webkit-box-orient: vertical; + /* 设置盒子的方向为垂直 */ + -webkit-line-clamp: 1; + /* 限制最多显示两行 */ + overflow: hidden; + /* 隐藏超出的文本 */ + text-overflow: ellipsis; + /* 使用省略号 */ +} \ No newline at end of file diff --git a/common/globalFunction.js b/common/globalFunction.js new file mode 100644 index 0000000..17dd139 --- /dev/null +++ b/common/globalFunction.js @@ -0,0 +1,589 @@ +import useUserStore from "../stores/useUserStore"; +import { + request, + createRequest, + uploadFile +} from "../utils/request"; +import streamRequest, { + chatRequest +} from "../utils/streamRequest.js"; + +export const CloneDeep = (props) => { + if (typeof props !== 'object' || props === null) { + return props + } + + let result + if (props) { + result = [] + } else { + result = {} + } + + for (let key in props) { + if (props.hasOwnProperty(key)) { + result[key] = CloneDeep(props[key]) + } + } + + return result +} + + +export const msg = (title, duration = 1500, mask = false, icon = 'none', image) => { + if (Boolean(title) === false) { + return; + } + uni.showToast({ + title, + duration, + mask, + icon, + image + }); +} + +const prePage = () => { + let pages = getCurrentPages(); + let prePage = pages[pages.length - 2]; + return prePage.$vm; +} + + + +/** + * 页面跳转封装,支持 query 参数传递和返回回调 + * @param {string} url - 跳转路径 + * @param {object} options + * @param {boolean} options.needLogin - 是否需要登录 + * @param {object} options.query - 携带参数 + * @param {function} options.onBack - 页面返回时的回调(目标页调用 uni.navigateBack 时传递数据) + */ +export const navTo = function(url, { + needLogin = false, + query = {}, + onBack = null +} = {}) { + const userStore = useUserStore(); + + if (needLogin && !userStore.hasLogin) { + uni.navigateTo({ + url: '/pages/login/login' + }); + return; + } + + const queryStr = Object.entries(query) + .map(([key, val]) => `${key}=${encodeURIComponent(val)}`) + .join('&'); + const finalUrl = queryStr ? `${url}?${queryStr}` : url; + + if (onBack) { + const pages = getCurrentPages(); + const currentPage = pages[pages.length - 1]; + currentPage.__onBackCallback__ = onBack; + } + + uni.navigateTo({ + url: finalUrl + }); +}; + +export const navBack = function({ + delta = 1, + data = null, + fallbackUrl = '/pages/index/index' +} = {}) { + const pages = getCurrentPages(); + + if (pages.length > 1) { + const prevPage = pages[pages.length - 1 - delta]; + + // 如果上一页存在回调函数,调用 + if (data && prevPage?.__onBackCallback__) { + prevPage.__onBackCallback__(data); + } + + uni.navigateBack({ + delta + }); + } else { + // 没有可返回的页面,直接跳转 fallback 页面 + uni.reLaunch({ + url: fallbackUrl + }); + } +}; +// // 默认返回上一页 +// navBack(); + +// // 返回上两层 +// navBack(2); + +// // 没有历史页面时跳转首页 +// navBack(1, '/pages/home/home'); + +function getdeviceInfo() { + const globalData = { + statusBarHeight: 0, // 状态导航栏高度 + topHeight: 0, // 距离顶部高度 + navHeight: 0, // 总体高度 + windowHeight: 0, // 可使用窗口高度 + tabBarHight: 0, //底部导航栏高度 + }; + let systemInfo = uni.getSystemInfoSync() + globalData.windowHeight = systemInfo.screenHeight + // 底部导航栏 + globalData.tabBarHight = systemInfo.screenHeight - systemInfo.safeArea.bottom + // 状态栏高度 + globalData.statusBarHeight = systemInfo.statusBarHeight + // #ifdef MP-MP-WEIXIN + let menuButtonInfo = uni.getMenuButtonBoundingClientRect() + // 胶囊距离顶部高度 + globalData.topHeight = menuButtonInfo.top + // 胶囊高度 + globalData.navHeight = menuButtonInfo.height​ + // #endif + return { + ...globalData + } +} + +function sleep(time) { + return new Promise((resolve) => setTimeout(resolve, time)) +} +const cloneDeep = (obj) => { + // 1.1 判断是否是对象 + const isObject = (obj) => (typeof obj === 'object' || typeof obj === 'function') && obj !== 'null' + + if (!isObject(obj)) { + throw new Error('参数不是对象') + } + // 1.3 如果参数为数组,则复制数组各元素,否则复制对象属性 + const newObject = Array.isArray(obj) ? [...obj] : { + ...obj + } + // 1.4 迭代 + Object.keys(newObject).forEach((key) => { + // 1.5 判断如果遍历到的属性值为对象,则继续递归cloneDeep + if (isObject(newObject[key])) { + newObject[key] = cloneDeep(newObject[key]) + } + }) + return newObject +} + +const CopyText = (text) => { + let input = document.createElement('textarea'); + input.value = text; + document.body.appendChild(input); + input.select(); + let flag = document.execCommand('copy') + if (flag) { + message.success('成功复制到剪贴板') + } else { + message.success('复制失败') + } + document.body.removeChild(input) +} + +// 柯里化 降低使用范围,提高适用性 +function Exp(regExp) { + return (str) => { + return regExp.test(str) + } +} + +const checkingPhoneRegExp = Exp(/^1[3-9]{1}\d{9}/) +// 手机号校验 checkingPhoneRegExp(phone) + +const checkingEmailRegExp = Exp(/^[a-z0-9_\.-]+@[a-z0-9_\.-]+[a-z0-9]{2,6}$/i) +// 邮箱校验 checkingEmailRegExp(email) + + +function throttle(fn, delay = 300) { + let valid = true + let savedArgs = null // 参数存储器 + let savedContext = null // 上下文存储器 + + return function(...args) { + // 保存当前参数和上下文 + savedArgs = args + savedContext = this + + if (!valid) return false + valid = false + setTimeout(() => { + fn.apply(savedContext, savedArgs) + valid = true + savedArgs = null // 清空存储 + savedContext = null + }, delay) + } +} + +function debounce(fun, delay) { + return function(args) { + let that = this + let _args = args + clearTimeout(fun.id) + fun.id = setTimeout(function() { + fun.call(that, _args) + }, delay) + } +} + + +function toRad(degree) { + return degree * Math.PI / 180; +} + +function haversine(lat1, lon1, lat2, lon2) { + const R = 6371; // 地球半径,单位为公里 + const a1 = toRad(lat1); + const a2 = toRad(lat2); + const b1 = toRad(lat2 - lat1); + const b2 = toRad(lon2 - lon1); + + const a = Math.sin(b1 / 2) * Math.sin(b1 / 2) + + Math.cos(a1) * Math.cos(a2) * Math.sin(b2 / 2) * Math.sin(b2 / 2); + const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); + const distance = R * c; // 计算得到的距离,单位为公里 + + return distance; +} + +export function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) { + const R = 6371; // 地球平均半径,单位为公里 + const dLat = deg2rad(lat2 - lat1); + const dLon = deg2rad(lon2 - lon1); + const a = + Math.sin(dLat / 2) * Math.sin(dLat / 2) + + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * + Math.sin(dLon / 2) * Math.sin(dLon / 2); + const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); + const d = R * c; + return { + km: d, + m: d * 1000 + }; +} + +// 将角度转换为弧度 +function deg2rad(deg) { + return deg * (Math.PI / 180); +} + +function vacanciesTo(vacancies) { + if (vacancies >= 0) { + return vacancies + "人" + } else { + return '不限人数' + } +} + +function salaryGlobal(type = 'min') { + const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80]; + const salaymax = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100]; + const salarys = salay.map((item, index) => ({ + label: item + 'k', + value: item * 1000, + children: CloneDeep(salaymax).splice(index).map((vItem) => ({ + label: vItem + 'k', + value: vItem * 1000, + })) + })) + + return salarys +} + +class CustomSystem { + constructor() { + const systemInfo = uni.getSystemInfoSync(); + this.systemInfo = systemInfo + } +} +const customSystem = new CustomSystem() + +function setCheckedNodes(nodes, ids) { + const isClear = ids.length === 0; + + nodes.forEach((firstLayer) => { + // 每次处理都先重置 + firstLayer.checkednumber = 0; + + const traverse = (node) => { + if (isClear) { + node.checked = false; + } else { + node.checked = ids.includes(node.id); + } + + if (node !== firstLayer && node.checked) { + firstLayer.checkednumber++; + } + + if (node.children && node.children.length) { + node.children.forEach(child => traverse(child)); + } + }; + + traverse(firstLayer); + }); + + return nodes; +} +const formatTotal = (total) => { + if (total < 10) return total.toString(); // 直接返回小于 10 的数 + + const magnitude = Math.pow(10, Math.floor(Math.log10(total))); // 计算数量级 + const roundedTotal = Math.floor(total / magnitude) * magnitude; // 去掉零头 + + return `${roundedTotal}+`; +}; + +export function formatDate(isoString) { + const date = new Date(isoString); + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要 +1 + const day = String(date.getDate()).padStart(2, '0'); + const hours = String(date.getHours()).padStart(2, '0'); + const minutes = String(date.getMinutes()).padStart(2, '0'); + const seconds = String(date.getSeconds()).padStart(2, '0'); + + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; +} + +export function insertSortData(data, attribute = 'createTime') { + const sortedData = data.sort((a, b) => new Date(b[attribute]) - new Date(a[attribute])); // 按时间降序排序 + const result = []; + let lastDate = ''; + let lastTitle = '' + + + const now = new Date(); + const todayStr = now.toISOString().split('T')[0]; // 获取今天的日期字符串 + const yesterday = new Date(now.setDate(now.getDate() - 1)).toISOString().split('T')[0]; // 获取昨天的日期字符串 + const twoDaysAgo = new Date(now.setDate(now.getDate() - 1)).toISOString().split('T')[0]; // 获取前天的日期字符串 + + sortedData.forEach(item => { + const itemAttribute = item[attribute].replace('T', ' ') + const itemDate = itemAttribute.split(' ')[0]; // 提取日期部分 + + let title = itemDate; + if (itemDate === todayStr) { + title = '今天'; + } else if (itemDate === yesterday) { + title = '昨天'; + } else if (itemDate === twoDaysAgo) { + title = '前天'; + } + + if (lastDate !== itemDate) { + result.push({ + title, + isTitle: true + }); + lastDate = itemDate; + lastTitle = title; + } + + result.push({ + ...item, + isTitle: false + }); + }); + + return [result, lastTitle]; +} + +function getWeeksOfMonth(year, month) { + const firstDay = new Date(year, month - 1, 1); // 当月第一天 + const lastDay = new Date(year, month, 0); // 当月最后一天 + const weeks = []; + let week = []; + + for (let d = new Date(firstDay); d <= lastDay; d.setDate(d.getDate() + 1)) { + // 补充第一周的上个月日期 + if (week.length === 0 && d.getDay() !== 1) { + let prevMonday = new Date(d); + prevMonday.setDate(d.getDate() - (d.getDay() === 0 ? 6 : d.getDay() - 1)); + while (prevMonday < d) { + week.push({ + year: prevMonday.getFullYear(), + month: prevMonday.getMonth() + 1, + day: prevMonday.getDate(), + fullDate: getLocalYYYYMMDD(prevMonday), // 修正 + weekday: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"][prevMonday.getDay()], + isCurrent: false // 上个月日期 + }); + prevMonday.setDate(prevMonday.getDate() + 1); + } + } + + // 添加当前月份的日期 + week.push({ + year: d.getFullYear(), + month: d.getMonth() + 1, + day: d.getDate(), + fullDate: getLocalYYYYMMDD(d), // 修正 + weekday: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"][d.getDay()], + isCurrent: true // 当前月的日期 + }); + + // 如果到了月末但当前周未满7天,需要补足到周日 + if (d.getTime() === lastDay.getTime() && week.length < 7) { + let nextDay = new Date(d); + nextDay.setDate(d.getDate() + 1); + while (week.length < 7) { + week.push({ + year: nextDay.getFullYear(), + month: nextDay.getMonth() + 1, + day: nextDay.getDate(), + fullDate: getLocalYYYYMMDD(nextDay), // 修正 + weekday: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"][nextDay.getDay()], + isCurrent: false // 下个月日期 + }); + nextDay.setDate(nextDay.getDate() + 1); + } + } + + // 如果本周满了(7天)或者到了月末 + if (week.length === 7 || d.getTime() === lastDay.getTime()) { + weeks.push([...week]); // 存入当前周 + week = []; // 清空,准备下一周 + } + } + + return weeks; +} + +// 新增工具函数:将日期格式化为本地 YYYY-MM-DD 字符串 +function getLocalYYYYMMDD(date) { + const y = date.getFullYear(); + const m = String(date.getMonth() + 1).padStart(2, '0'); + const d = String(date.getDate()).padStart(2, '0'); + return `${y}-${m}-${d}`; +} + +function isFutureDate(dateStr) { + const inputDate = new Date(dateStr); + const today = new Date(); + + // 只比较年月日,不考虑具体时间 + today.setHours(0, 0, 0, 0); + inputDate.setHours(0, 0, 0, 0); + + return inputDate > today; +} + +function parseQueryParams(url = window.location.href) { + const queryString = url.split('?')[1]?.split('#')[0]; + const params = {}; + if (!queryString) return params; + + queryString.split('&').forEach(param => { + const [key, value] = param.split('='); + if (key) { + params[decodeURIComponent(key)] = decodeURIComponent(value || ''); + } + }); + + return params; +} + +function formatFileSize(bytes) { + if (bytes < 1024) return bytes + ' B' + else if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(2) + ' KB' + else if (bytes < 1024 * 1024 * 1024) return (bytes / (1024 * 1024)).toFixed(2) + ' MB' + else return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB' +} + + +function sendingMiniProgramMessage(data = { + text: 'hello' +}, action = 'defalut') { + jWeixin.miniProgram.postMessage({ + data, + action + }); +} + +function copyText(text) { + uni.setClipboardData({ + data: text, + showToast: false, + success(res) { + msg('复制成功') + }, + }); +} + +function appendScriptTagElement(src) { + if (!src) return null; + return new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.src = src; + script.onload = () => { + resolve() + }; + script.onerror = () => { + reject() + }; + document.body.appendChild(script); + }) +} + +function isInWechatMiniProgramWebview() { + const ua = navigator.userAgent.toLowerCase() + return ua.includes('miniprogram') || window.__wxjs_environment === 'miniprogram' +} + +function isEmptyObject(obj) { + return obj && typeof obj === 'object' && !Array.isArray(obj) && Object.keys(obj).length === 0; +} + + +export const $api = { + msg, + prePage, + sleep, + request, + createRequest, + streamRequest, + chatRequest, + insertSortData, + uploadFile, + formatFileSize, + sendingMiniProgramMessage, + copyText +} + + + +export default { + $api, + navTo, + navBack, + cloneDeep, + formatDate, + getdeviceInfo, + checkingPhoneRegExp, + checkingEmailRegExp, + throttle, + debounce, + haversine, + getDistanceFromLatLonInKm, + vacanciesTo, + salaryGlobal, + customSystem, + setCheckedNodes, + formatTotal, + getWeeksOfMonth, + isFutureDate, + parseQueryParams, + appendScriptTagElement, + insertSortData, + isInWechatMiniProgramWebview, + isEmptyObject, +} \ No newline at end of file diff --git a/components/AppLayout/AppLayout.vue b/components/AppLayout/AppLayout.vue new file mode 100644 index 0000000..e9b405f --- /dev/null +++ b/components/AppLayout/AppLayout.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/components/CollapseTransition/CollapseTransition.vue b/components/CollapseTransition/CollapseTransition.vue new file mode 100644 index 0000000..9ea5df4 --- /dev/null +++ b/components/CollapseTransition/CollapseTransition.vue @@ -0,0 +1,92 @@ + + + + + + diff --git a/components/MsgTips/MsgTips.vue b/components/MsgTips/MsgTips.vue new file mode 100644 index 0000000..36a7c28 --- /dev/null +++ b/components/MsgTips/MsgTips.vue @@ -0,0 +1,140 @@ + + + + + \ No newline at end of file diff --git a/components/NoBouncePage/NoBouncePage.vue b/components/NoBouncePage/NoBouncePage.vue new file mode 100644 index 0000000..f44477f --- /dev/null +++ b/components/NoBouncePage/NoBouncePage.vue @@ -0,0 +1,26 @@ + + + + + + diff --git a/components/Salary-Expectation/Salary-Expectation.vue b/components/Salary-Expectation/Salary-Expectation.vue new file mode 100644 index 0000000..a986375 --- /dev/null +++ b/components/Salary-Expectation/Salary-Expectation.vue @@ -0,0 +1,17 @@ + + + diff --git a/components/TikTok/TikTok.vue b/components/TikTok/TikTok.vue new file mode 100644 index 0000000..1338850 --- /dev/null +++ b/components/TikTok/TikTok.vue @@ -0,0 +1,312 @@ + + + + + diff --git a/components/convert-distance/convert-distance.vue b/components/convert-distance/convert-distance.vue new file mode 100644 index 0000000..a50ba27 --- /dev/null +++ b/components/convert-distance/convert-distance.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/components/dict-Label/dict-Label.vue b/components/dict-Label/dict-Label.vue new file mode 100644 index 0000000..3759d32 --- /dev/null +++ b/components/dict-Label/dict-Label.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/components/dict-tree-Label/dict-tree-Label.vue b/components/dict-tree-Label/dict-tree-Label.vue new file mode 100644 index 0000000..654289a --- /dev/null +++ b/components/dict-tree-Label/dict-tree-Label.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/components/empty/empty.vue b/components/empty/empty.vue new file mode 100644 index 0000000..4344136 --- /dev/null +++ b/components/empty/empty.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/components/expected-station/expected-station.vue b/components/expected-station/expected-station.vue new file mode 100644 index 0000000..3cd0f92 --- /dev/null +++ b/components/expected-station/expected-station.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/components/loadmore/loadmore.vue b/components/loadmore/loadmore.vue new file mode 100644 index 0000000..0d5a7a5 --- /dev/null +++ b/components/loadmore/loadmore.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/components/matchingDegree/matchingDegree.vue b/components/matchingDegree/matchingDegree.vue new file mode 100644 index 0000000..1406c40 --- /dev/null +++ b/components/matchingDegree/matchingDegree.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/components/md-render/md-render.vue b/components/md-render/md-render.vue new file mode 100644 index 0000000..4bc7762 --- /dev/null +++ b/components/md-render/md-render.vue @@ -0,0 +1,357 @@ + + + + + + + diff --git a/components/renderCompanys/renderCompanys.vue b/components/renderCompanys/renderCompanys.vue new file mode 100644 index 0000000..5a1456d --- /dev/null +++ b/components/renderCompanys/renderCompanys.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/components/renderJobs/renderJobs.vue b/components/renderJobs/renderJobs.vue new file mode 100644 index 0000000..bcb138c --- /dev/null +++ b/components/renderJobs/renderJobs.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/components/screening-job-requirements/screening-job-requirements.vue b/components/screening-job-requirements/screening-job-requirements.vue new file mode 100644 index 0000000..475f9f3 --- /dev/null +++ b/components/screening-job-requirements/screening-job-requirements.vue @@ -0,0 +1,261 @@ + + + + + diff --git a/components/selectFilter/selectFilter.vue b/components/selectFilter/selectFilter.vue new file mode 100644 index 0000000..69db35e --- /dev/null +++ b/components/selectFilter/selectFilter.vue @@ -0,0 +1,374 @@ + + + + + diff --git a/components/selectJobs/selectJobs.vue b/components/selectJobs/selectJobs.vue new file mode 100644 index 0000000..22c6aac --- /dev/null +++ b/components/selectJobs/selectJobs.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/components/selectPopup/selectPopup.vue b/components/selectPopup/selectPopup.vue new file mode 100644 index 0000000..c91a6f7 --- /dev/null +++ b/components/selectPopup/selectPopup.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/components/selectPopup/selectPopupPlugin.js b/components/selectPopup/selectPopupPlugin.js new file mode 100644 index 0000000..c00e25a --- /dev/null +++ b/components/selectPopup/selectPopupPlugin.js @@ -0,0 +1,26 @@ +// plugins/selectPopup.js +import { + createApp +} from 'vue'; +import SelectPopup from './selectPopup.vue'; + +export default { + install(app) { + const popupApp = createApp(SelectPopup); + // #ifdef H5 + const popupInstance = popupApp.mount(document.createElement('div')); + document.body.appendChild(popupInstance.$el); + + // 提供 open 方法 + const openPopup = (config) => { + popupInstance.open(config); + }; + // #endif + + // #ifndef H5 + const openPopup = (config) => {}; + // #endif + // 提供给所有组件使用 + app.provide('openSelectPopup', openPopup); + } +}; \ No newline at end of file diff --git a/components/tabbar/midell-box.vue b/components/tabbar/midell-box.vue new file mode 100644 index 0000000..89ec8b2 --- /dev/null +++ b/components/tabbar/midell-box.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/config.js b/config.js new file mode 100644 index 0000000..6ca4098 --- /dev/null +++ b/config.js @@ -0,0 +1,73 @@ +export default { + // baseUrl: 'http://39.98.44.136:8080', // 测试 + baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试 + // sseAI+ + // StreamBaseURl: 'http://39.98.44.136:8000', + StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai', + // StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai/test', + // 语音转文字 + // vioceBaseURl: 'ws://39.98.44.136:8080/speech-recognition', + vioceBaseURl: 'wss://qd.zhaopinzao8dian.com/api/speech-recognition', + // 语音合成 + speechSynthesis: 'wss://qd.zhaopinzao8dian.com/api/speech-synthesis', + // indexedDB + DBversion: 2, + // 只使用本地缓寸的数据 + OnlyUseCachedDB: true, + // 使用模拟定位 + UsingSimulatedPositioning: true, + // 应用信息 + appInfo: { + // 应用名称 + name: "青岛市就业服务", + // 地区名 + areaName: '青岛市', + // AI名称 + AIName: '小红', + // 应用版本 + version: "1.0.0", + // 应用logo + logo: "", + // 官方网站 + site_url: "", + // 政策协议 + agreements: [{ + title: "隐私政策", + url: "" + }, + { + title: "用户服务协议", + url: "" + } + ] + }, + // AI -> 上传文件数量 + allowedFileNumber: 2, + // AI -> 上传文件类型 + allowedFileTypes: [ + "text/plain", // .txt + "text/markdown", // .md + "text/html", // .html + "application/msword", // .doc + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", // .docx + "application/pdf", // .pdf + "application/vnd.ms-powerpoint", // .ppt + "application/vnd.openxmlformats-officedocument.presentationml.presentation", // .pptx + "text/csv", // .csv + "application/vnd.ms-excel", // .xls + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" // .xlsx + ], + // 首页询问 -> 推荐权重 + weights: { + categories: 1, //岗位 + experience: 0.3, //经验 + salary: 0.5, // 薪资 + areas: 0.5 // 区域 + }, + shareConfig: { + baseUrl: 'https://qd.zhaopinzao8dian.com', + title: '找工作,用 AI 更高效|青岛市智能求职平台', + desc: '融合海量岗位、智能简历匹配、竞争力分析,助你精准锁定理想职位!', + imgUrl: 'https://qd.zhaopinzao8dian.com/file/csn/qd_shareLogo.jpg', + } +} \ No newline at end of file diff --git a/directives/collapse.js b/directives/collapse.js new file mode 100644 index 0000000..6fbea1b --- /dev/null +++ b/directives/collapse.js @@ -0,0 +1,84 @@ +// directives/collapse.js +export default { + mounted(el, binding) { + el._collapse = { + duration: binding.arg ? parseInt(binding.arg) : 300, // 使用指令参数设置 duration + expanded: binding.value, + }; + + el.style.overflow = 'hidden'; + el.style.transition = `height ${el._collapse.duration}ms ease, opacity ${el._collapse.duration}ms ease`; + + if (!binding.value) { + el.style.height = '0px'; + el.style.opacity = '0'; + } else { + setTimeout(() => { + getHeight(el).then((height) => { + el.style.height = height + 'px'; + el.style.opacity = '1'; + }); + }, 0); + } + }, + + updated(el, binding) { + const duration = el._collapse.duration; + const isShow = binding.value; + + if (isShow === el._collapse.expanded) return; + + el._collapse.expanded = isShow; + + if (isShow) { + getHeight(el).then((height) => { + el.style.transition = `none`; + el.style.height = '0px'; + el.style.opacity = '0'; + + // 动画开始 + requestAnimationFrame(() => { + el.style.transition = `height ${duration}ms ease, opacity ${duration}ms ease`; + el.style.height = height + 'px'; + el.style.opacity = '1'; + + // 动画结束后设置为 auto(避免内容变化导致高度错误) + setTimeout(() => { + el.style.height = 'auto'; + }, duration); + }); + }); + } else { + getHeight(el).then((height) => { + console.log(height) + el.style.height = height + 'px'; + el.style.opacity = '1'; + + requestAnimationFrame(() => { + el.style.height = '0px'; + el.style.opacity = '0'; + }); + }); + } + }, + + unmounted(el) { + delete el._collapse; + }, +}; + +// 获取元素高度(兼容 H5 和小程序) +function getHeight(el) { + return new Promise((resolve) => { + // #ifdef H5 + resolve(el.scrollHeight); + // #endif + + // #ifndef H5 + const query = uni.createSelectorQuery(); + query.select(el).boundingClientRect((res) => { + resolve(res?.height || 0); + }).exec(); + // #endif + }); +} \ No newline at end of file diff --git a/directives/fade.js b/directives/fade.js new file mode 100644 index 0000000..02139ef --- /dev/null +++ b/directives/fade.js @@ -0,0 +1,23 @@ +export default { + mounted(el, binding) { + const duration = binding.arg ? parseInt(binding.arg) : 300; + el.style.transition = `opacity ${duration}ms ease`; + el.style.opacity = binding.value ? '1' : '0'; + if (!binding.value) el.style.display = 'none'; + }, + updated(el, binding) { + const duration = binding.arg ? parseInt(binding.arg) : 300; + + if (binding.value) { + el.style.display = ''; + requestAnimationFrame(() => { + el.style.opacity = '1'; + }); + } else { + el.style.opacity = '0'; + setTimeout(() => { + el.style.display = 'none'; + }, duration); + } + } +}; \ No newline at end of file diff --git a/hook/useColumnCount.js b/hook/useColumnCount.js new file mode 100644 index 0000000..991f515 --- /dev/null +++ b/hook/useColumnCount.js @@ -0,0 +1,71 @@ +// composables/useColumnCount.js +import { + ref, + onMounted, + onUnmounted, + watch +} from 'vue' + +export function useColumnCount(onChange = () => {}) { + const columnCount = ref(0) + const columnSpace = ref(2) + + + // const calcColumn = () => { + // const width = uni.getSystemInfoSync().windowWidth + // console.log(width) + // const count = Math.min(5, Math.floor(width / 375) + 1) + // if (count !== columnCount.value) { + // columnCount.value = count < 2 ? 2 : count + // } + // } + const calcColumn = () => { + const width = uni.getSystemInfoSync().windowWidth + + let count = 2 + if (width >= 1000) { + count = 5 + } else if (width >= 750) { + count = 4 + } else if (width >= 500) { + count = 3 + } else { + count = 2 + } + + if (count !== columnCount.value) { + columnCount.value = count + } + + // 计算间距:count=2 => 1,count=5 => 2,中间线性插值 + const spacing = 2 - (count - 2) * (1 / 3) + // console.log('列数:', count, '间距:', spacing.toFixed(2)) + columnSpace.value = spacing + } + + onMounted(() => { + columnCount.value = 2 + calcColumn() + // if (process.client) { + window.addEventListener('resize', calcColumn) + // } + }) + + onUnmounted(() => { + // if (process.client) { + window.removeEventListener('resize', calcColumn) + // } + }) + + // 列数变化时执行回调 + watch(columnCount, (newVal, oldVal) => { + if (newVal !== oldVal) { + onChange(newVal) + } + }) + + return { + columnCount, + columnSpace + } +} \ No newline at end of file diff --git a/hook/usePagination.js b/hook/usePagination.js new file mode 100644 index 0000000..147aecb --- /dev/null +++ b/hook/usePagination.js @@ -0,0 +1,173 @@ +import { + ref, + reactive, + watch, + isRef, + nextTick +} from 'vue' + +export function usePagination( + requestFn, + transformFn, + options = {} +) { + const list = ref([]) + const loading = ref(false) + const error = ref(false) + const finished = ref(false) + const firstLoading = ref(true) + const empty = ref(false) + + const { + pageSize = 10, + search = {}, + autoWatchSearch = false, + debounceTime = 300, + autoFetch = false, + + // 字段映射 + dataKey = 'rows', + totalKey = 'total', + + // 分页字段名映射 + pageField = 'current', + sizeField = 'pageSize', + + onBeforeRequest, + onAfterRequest + } = options + + const pageState = reactive({ + page: 1, + pageSize: isRef(pageSize) ? pageSize.value : pageSize, + total: 0, + maxPage: 1, + search: isRef(search) ? search.value : search + }) + + let debounceTimer = null + + const fetchData = async (type = 'refresh') => { + if (loading.value) return Promise.resolve() + console.log(type) + loading.value = true + error.value = false + + if (typeof onBeforeRequest === 'function') { + try { + onBeforeRequest(type, pageState) + } catch (err) { + console.warn('onBeforeRequest 执行异常:', err) + } + } + + if (type === 'refresh') { + pageState.page = 1 + finished.value = false + if (list.value.length === 0) { + firstLoading.value = true + } + } else if (type === 'loadMore') { + if (pageState.page >= pageState.maxPage) { + loading.value = false + finished.value = true + return Promise.resolve('no more') + } + pageState.page += 1 + } + + const params = { + ...pageState.search, + [pageField]: pageState.page, + [sizeField]: pageState.pageSize, + } + + try { + const res = await requestFn(params) + + const rawData = res[dataKey] + const total = res[totalKey] || 99999999 + console.log(total, rawData) + const data = typeof transformFn === 'function' ? transformFn(rawData) : rawData + + if (type === 'refresh') { + list.value = data + } else { + list.value.push(...data) + } + + pageState.total = total + pageState.maxPage = Math.ceil(total / pageState.pageSize) + + finished.value = list.value.length >= total + empty.value = list.value.length === 0 + } catch (err) { + console.error('分页请求失败:', err) + error.value = true + } finally { + loading.value = false + firstLoading.value = false + + if (typeof onAfterRequest === 'function') { + try { + onAfterRequest(type, pageState, { + error: error.value + }) + } catch (err) { + console.warn('onAfterRequest 执行异常:', err) + } + } + } + } + + const refresh = () => fetchData('refresh') + const loadMore = () => fetchData('loadMore') + + const resetPagination = () => { + list.value = [] + pageState.page = 1 + pageState.total = 0 + pageState.maxPage = 1 + finished.value = false + error.value = false + firstLoading.value = true + empty.value = false + } + + if (autoWatchSearch && isRef(search)) { + watch(search, (newVal) => { + pageState.search = newVal + clearTimeout(debounceTimer) + debounceTimer = setTimeout(() => { + refresh() + }, debounceTime) + }, { + deep: true + }) + } + + watch(pageSize, (newVal) => { + pageState.pageSize = newVal + }, { + deep: true + }) + + if (autoFetch) { + nextTick(() => { + refresh() + }) + } + + return { + list, + loading, + error, + finished, + firstLoading, + empty, + pageState, + refresh, + loadMore, + resetPagination + } +} \ No newline at end of file diff --git a/hook/useRealtimeRecorder.js b/hook/useRealtimeRecorder.js new file mode 100644 index 0000000..265f797 --- /dev/null +++ b/hook/useRealtimeRecorder.js @@ -0,0 +1,258 @@ +import { + ref, + onUnmounted +} from 'vue' +import { + $api, + +} from '../common/globalFunction'; + +import config from '@/config' + +export function useAudioRecorder() { + const isRecording = ref(false) + const isStopping = ref(false) + const isSocketConnected = ref(false) + const recordingDuration = ref(0) + + const audioDataForDisplay = ref(new Array(16).fill(0)) + const volumeLevel = ref(0) + + const recognizedText = ref('') + const lastFinalText = ref('') + + let audioStream = null + let audioContext = null + let audioInput = null + let scriptProcessor = null + let websocket = null + let durationTimer = null + + const generateUUID = () => { + return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11) + .replace(/[018]/g, c => + (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) + ).replace(/-/g, '') + } + + const fetchWsUrl = async () => { + const res = await $api.createRequest('/app/speech/getToken') + if (res.code !== 200) throw new Error('无法获取语音识别 wsUrl') + const wsUrl = res.msg + return wsUrl + } + + function extractWsParams(wsUrl) { + const url = new URL(wsUrl) + const appkey = url.searchParams.get('appkey') + const token = url.searchParams.get('token') + return { + appkey, + token + } + } + + + const connectWebSocket = async () => { + const wsUrl = await fetchWsUrl() + const { + appkey, + token + } = extractWsParams(wsUrl) + return new Promise((resolve, reject) => { + websocket = new WebSocket(wsUrl) + websocket.binaryType = 'arraybuffer' + + websocket.onopen = () => { + isSocketConnected.value = true + + // 发送 StartTranscription 消息(参考 demo.html) + const startTranscriptionMessage = { + header: { + appkey: appkey, // 不影响使用,可留空或由 wsUrl 带入 + namespace: 'SpeechTranscriber', + name: 'StartTranscription', + task_id: generateUUID(), + message_id: generateUUID() + }, + payload: { + format: 'pcm', + sample_rate: 16000, + enable_intermediate_result: true, + enable_punctuation_prediction: true, + enable_inverse_text_normalization: true + } + } + websocket.send(JSON.stringify(startTranscriptionMessage)) + resolve() + } + + websocket.onerror = (e) => { + isSocketConnected.value = false + reject(e) + } + + websocket.onclose = () => { + isSocketConnected.value = false + } + + websocket.onmessage = (e) => { + const msg = JSON.parse(e.data) + const name = msg?.header?.name + const payload = msg?.payload + + switch (name) { + case 'TranscriptionResultChanged': { + // 中间识别文本(可选:使用 stash_result.unfixedText 更精确) + const text = payload?.unfixed_result || payload?.result || '' + lastFinalText.value = text + break + } + case 'SentenceBegin': { + // 可选:开始新的一句,重置状态 + // console.log('开始新的句子识别') + break + } + case 'SentenceEnd': { + const text = payload?.result || '' + const confidence = payload?.confidence || 0 + if (text && confidence > 0.5) { + recognizedText.value += text + lastFinalText.value = '' + // console.log('识别完成:', { + // text, + // confidence + // }) + } + break + } + case 'TranscriptionStarted': { + // console.log('识别任务已开始') + break + } + case 'TranscriptionCompleted': { + lastFinalText.value = '' + // console.log('识别全部完成') + break + } + case 'TaskFailed': { + console.error('识别失败:', msg?.header?.status_text) + break + } + default: + console.log('未知消息类型:', name, msg) + break + } + } + }) + } + + const startRecording = async () => { + if (isRecording.value) return + try { + recognizedText.value = '' + lastFinalText.value = '' + await connectWebSocket() + + audioStream = await navigator.mediaDevices.getUserMedia({ + audio: true + }) + audioContext = new(window.AudioContext || window.webkitAudioContext)({ + sampleRate: 16000 + }) + audioInput = audioContext.createMediaStreamSource(audioStream) + scriptProcessor = audioContext.createScriptProcessor(2048, 1, 1) + + scriptProcessor.onaudioprocess = (event) => { + const input = event.inputBuffer.getChannelData(0) + const pcm = new Int16Array(input.length) + let sum = 0 + for (let i = 0; i < input.length; ++i) { + const s = Math.max(-1, Math.min(1, input[i])) + pcm[i] = s * 0x7FFF + sum += s * s + } + + volumeLevel.value = Math.sqrt(sum / input.length) + audioDataForDisplay.value = Array(16).fill(volumeLevel.value) + + if (websocket?.readyState === WebSocket.OPEN) { + websocket.send(pcm.buffer) + } + } + + audioInput.connect(scriptProcessor) + scriptProcessor.connect(audioContext.destination) + + isRecording.value = true + recordingDuration.value = 0 + durationTimer = setInterval(() => recordingDuration.value++, 1000) + } catch (err) { + console.error('启动失败:', err) + cleanup() + } + } + + const stopRecording = () => { + if (!isRecording.value || isStopping.value) return + isStopping.value = true + + if (websocket?.readyState === WebSocket.OPEN) { + websocket.send(JSON.stringify({ + header: { + namespace: 'SpeechTranscriber', + name: 'StopTranscription', + message_id: generateUUID() + } + })) + websocket.close() + } + + cleanup() + isStopping.value = false + } + + const cancelRecording = () => { + if (!isRecording.value || isStopping.value) return + isStopping.value = true + websocket?.close() + cleanup() + isStopping.value = false + } + + const cleanup = () => { + clearInterval(durationTimer) + + scriptProcessor?.disconnect() + audioInput?.disconnect() + audioStream?.getTracks().forEach(track => track.stop()) + audioContext?.close() + + audioStream = null + audioContext = null + audioInput = null + scriptProcessor = null + websocket = null + + isRecording.value = false + isSocketConnected.value = false + } + + onUnmounted(() => { + if (isRecording.value) stopRecording() + }) + + return { + isRecording, + isStopping, + isSocketConnected, + recordingDuration, + audioDataForDisplay, + volumeLevel, + recognizedText, + lastFinalText, + startRecording, + stopRecording, + cancelRecording + } +} \ No newline at end of file diff --git a/hook/useScrollDirection.js b/hook/useScrollDirection.js new file mode 100644 index 0000000..8d483f3 --- /dev/null +++ b/hook/useScrollDirection.js @@ -0,0 +1,49 @@ +import { + ref +} from 'vue' + +export function useScrollDirection(options = {}) { + const { + threshold = 200, // 滚动偏移阈值 + throttleTime = 100, // 节流时间(毫秒) + onChange = null // 滚动方向变化的回调 + } = options + + const lastScrollTop = ref(0) + const accumulatedScroll = ref(0) + const isScrollingDown = ref(false) + let lastInvoke = 0 + + function handleScroll(e) { + const now = Date.now() + if (now - lastInvoke < throttleTime) return + lastInvoke = now + + const scrollTop = e.detail.scrollTop + const delta = scrollTop - lastScrollTop.value + accumulatedScroll.value += delta + + if (accumulatedScroll.value > threshold) { + if (!isScrollingDown.value) { + isScrollingDown.value = true + onChange?.(true) // 通知变更为向下 + } + accumulatedScroll.value = 0 + } + + if (accumulatedScroll.value < -threshold) { + if (isScrollingDown.value) { + isScrollingDown.value = false + onChange?.(false) // 通知变更为向上 + } + accumulatedScroll.value = 0 + } + + lastScrollTop.value = scrollTop + } + + return { + isScrollingDown, + handleScroll + } +} \ No newline at end of file diff --git a/hook/useSpeechReader.js b/hook/useSpeechReader.js new file mode 100644 index 0000000..9e2d549 --- /dev/null +++ b/hook/useSpeechReader.js @@ -0,0 +1,136 @@ +import { + ref, + onBeforeUnmount, + onMounted +} from 'vue' +import { + onHide, + onUnload +} from '@dcloudio/uni-app' + + + +export function useSpeechReader() { + const isSpeaking = ref(false) + const isPaused = ref(false) + let utterance = null + + const cleanMarkdown = (text) => { + return formatTextForSpeech(text) + } + + const speak = (text, options = { + lang: 'zh-CN', + rate: 0.9, + pitch: 1.2 + }) => { + cancelAudio() // 重置之前的 + // const voices = speechSynthesis.getVoices() + // const chineseVoices = voices.filter(v => v.lang.includes('zh')) + const speechText = extractSpeechText(text); + utterance = new SpeechSynthesisUtterance(speechText) + // utterance.lang = options.lang || 'zh' + utterance.rate = options.rate || 1 + utterance.pitch = options.pitch || 1.1 // 音调(0 - 2,偏高比较柔和) + + utterance.onend = () => { + isSpeaking.value = false + isPaused.value = false + } + + speechSynthesis.speak(utterance) + isSpeaking.value = true + isPaused.value = false + } + + const pause = () => { + if (isSpeaking.value && !isPaused.value) { + speechSynthesis.pause() + isPaused.value = true + } + } + + const resume = () => { + if (isSpeaking.value && isPaused.value) { + speechSynthesis.resume() + isPaused.value = false + } + } + + const cancelAudio = () => { + speechSynthesis.cancel() + isSpeaking.value = false + isPaused.value = false + } + // 页面刷新/关闭时 + onMounted(() => { + if (typeof window !== 'undefined') { + window.addEventListener('beforeunload', cancelAudio) + } + }) + + onBeforeUnmount(() => { + cancelAudio() + if (typeof window !== 'undefined') { + window.removeEventListener('beforeunload', cancelAudio) + } + }) + + onHide(cancelAudio) + onUnload(cancelAudio) + + return { + speak, + pause, + resume, + cancelAudio, + isSpeaking, + isPaused, + } +} + +function extractSpeechText(markdown) { + const jobRegex = /``` job-json\s*({[\s\S]*?})\s*```/g; + const jobs = []; + let match; + let lastJobEndIndex = 0; + let firstJobStartIndex = -1; + + // 提取岗位 json 数据及前后位置 + while ((match = jobRegex.exec(markdown)) !== null) { + const jobStr = match[1]; + try { + const job = JSON.parse(jobStr); + jobs.push(job); + if (firstJobStartIndex === -1) { + firstJobStartIndex = match.index; + } + lastJobEndIndex = jobRegex.lastIndex; + } catch (e) { + console.warn('JSON 解析失败', e); + } + } + + // 提取引导语(第一个 job-json 之前的文字) + const guideText = firstJobStartIndex > 0 ? + markdown.slice(0, firstJobStartIndex).trim() : + ''; + + // 提取结束语(最后一个 job-json 之后的文字) + const endingText = lastJobEndIndex < markdown.length ? + markdown.slice(lastJobEndIndex).trim() : + ''; + + // 岗位信息格式化为语音文本 + const jobTexts = jobs.map((job, index) => { + return `第 ${index + 1} 个岗位,岗位名称是:${job.jobTitle},公司是:${job.companyName},薪资:${job.salary},地点:${job.location},学历要求:${job.education},经验要求:${job.experience}。`; + }); + + // 拼接总语音内容 + const finalTextParts = []; + if (guideText) finalTextParts.push(guideText); + finalTextParts.push(...jobTexts); + if (endingText) finalTextParts.push(endingText); + + return finalTextParts.join('\n'); +} \ No newline at end of file diff --git a/hook/useTTSPlayer.js b/hook/useTTSPlayer.js new file mode 100644 index 0000000..3dd85aa --- /dev/null +++ b/hook/useTTSPlayer.js @@ -0,0 +1,249 @@ +import { + ref, + onUnmounted, + onBeforeUnmount, + onMounted +} from 'vue' +import { + onHide, + onUnload +} from '@dcloudio/uni-app' +import WavDecoder from '@/lib/wav-decoder@1.3.0.js' + +export function useTTSPlayer(wsUrl) { + const isSpeaking = ref(false) + const isPaused = ref(false) + const isComplete = ref(false) + + const audioContext = new(window.AudioContext || window.webkitAudioContext)() + let playTime = audioContext.currentTime + let sourceNodes = [] + let socket = null + let sampleRate = 16000 + let numChannels = 1 + let isHeaderDecoded = false + let pendingText = null + + let currentPlayId = 0 + let activePlayId = 0 + + const speak = (text) => { + currentPlayId++ + const myPlayId = currentPlayId + reset() + pendingText = text + activePlayId = myPlayId + } + + const pause = () => { + if (audioContext.state === 'running') { + audioContext.suspend() + isPaused.value = true + isSpeaking.value = false + } + } + + const resume = () => { + if (audioContext.state === 'suspended') { + audioContext.resume() + isPaused.value = false + isSpeaking.value = true + } + } + + const cancelAudio = () => { + stop() + } + + const stop = () => { + isSpeaking.value = false + isPaused.value = false + isComplete.value = false + playTime = audioContext.currentTime + + sourceNodes.forEach(node => { + try { + node.stop() + node.disconnect() + } catch (e) {} + }) + sourceNodes = [] + + if (socket) { + socket.close() + socket = null + } + + isHeaderDecoded = false + pendingText = null + } + + const reset = () => { + stop() + isSpeaking.value = false + isPaused.value = false + isComplete.value = false + playTime = audioContext.currentTime + initWebSocket() + } + + const initWebSocket = () => { + const thisPlayId = currentPlayId + socket = new WebSocket(wsUrl) + socket.binaryType = 'arraybuffer' + + socket.onopen = () => { + if (pendingText && thisPlayId === activePlayId) { + const seepdText = extractSpeechText(pendingText) + socket.send(seepdText) + pendingText = null + } + } + + socket.onmessage = async (e) => { + if (thisPlayId !== activePlayId) return // 忽略旧播放的消息 + + if (typeof e.data === 'string') { + try { + const msg = JSON.parse(e.data) + if (msg.status === 'complete') { + isComplete.value = true + setTimeout(() => { + if (thisPlayId === activePlayId) { + isSpeaking.value = false + } + }, (playTime - audioContext.currentTime) * 1000) + } + } catch (e) { + console.log('[TTSPlayer] 文本消息:', e.data) + } + } else if (e.data instanceof ArrayBuffer) { + if (!isHeaderDecoded) { + try { + const decoded = await WavDecoder.decode(e.data) + sampleRate = decoded.sampleRate + numChannels = decoded.channelData.length + decoded.channelData.forEach((channel, i) => { + const audioBuffer = audioContext.createBuffer(1, channel.length, + sampleRate) + audioBuffer.copyToChannel(channel, 0) + playBuffer(audioBuffer) + }) + isHeaderDecoded = true + } catch (err) { + console.error('WAV 解码失败:', err) + } + } else { + const pcm = new Int16Array(e.data) + const audioBuffer = pcmToAudioBuffer(pcm, sampleRate, numChannels) + playBuffer(audioBuffer) + } + } + } + } + + const pcmToAudioBuffer = (pcm, sampleRate, numChannels) => { + const length = pcm.length / numChannels + const audioBuffer = audioContext.createBuffer(numChannels, length, sampleRate) + for (let ch = 0; ch < numChannels; ch++) { + const channelData = audioBuffer.getChannelData(ch) + for (let i = 0; i < length; i++) { + const sample = pcm[i * numChannels + ch] + channelData[i] = sample / 32768 + } + } + return audioBuffer + } + + const playBuffer = (audioBuffer) => { + if (!isSpeaking.value) { + playTime = audioContext.currentTime + } + const source = audioContext.createBufferSource() + source.buffer = audioBuffer + source.connect(audioContext.destination) + source.start(playTime) + sourceNodes.push(source) + playTime += audioBuffer.duration + isSpeaking.value = true + } + + onUnmounted(() => { + stop() + }) + + // 页面刷新/关闭时 + onMounted(() => { + if (typeof window !== 'undefined') { + window.addEventListener('beforeunload', cancelAudio) + } + }) + + onBeforeUnmount(() => { + cancelAudio() + if (typeof window !== 'undefined') { + window.removeEventListener('beforeunload', cancelAudio) + } + }) + + onHide(cancelAudio) + onUnload(cancelAudio) + + initWebSocket() + + return { + speak, + pause, + resume, + cancelAudio, + isSpeaking, + isPaused, + isComplete + } +} + +function extractSpeechText(markdown) { + const jobRegex = /``` job-json\s*({[\s\S]*?})\s*```/g; + const jobs = []; + let match; + let lastJobEndIndex = 0; + let firstJobStartIndex = -1; + + // 提取岗位 json 数据及前后位置 + while ((match = jobRegex.exec(markdown)) !== null) { + const jobStr = match[1]; + try { + const job = JSON.parse(jobStr); + jobs.push(job); + if (firstJobStartIndex === -1) { + firstJobStartIndex = match.index; + } + lastJobEndIndex = jobRegex.lastIndex; + } catch (e) { + console.warn('JSON 解析失败', e); + } + } + + // 提取引导语(第一个 job-json 之前的文字) + const guideText = firstJobStartIndex > 0 ? + markdown.slice(0, firstJobStartIndex).trim() : + ''; + + // 提取结束语(最后一个 job-json 之后的文字) + const endingText = lastJobEndIndex < markdown.length ? + markdown.slice(lastJobEndIndex).trim() : + ''; + + // 岗位信息格式化为语音文本 + const jobTexts = jobs.map((job, index) => { + return `第 ${index + 1} 个岗位,岗位名称是:${job.jobTitle},公司是:${job.companyName},薪资:${job.salary},地点:${job.location},学历要求:${job.education},经验要求:${job.experience}。`; + }); + + // 拼接总语音内容 + const finalTextParts = []; + if (guideText) finalTextParts.push(guideText); + finalTextParts.push(...jobTexts); + if (endingText) finalTextParts.push(endingText); + + return finalTextParts.join('\n'); +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..5a1d9cd --- /dev/null +++ b/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/lib/dompurify@3.2.4es.js b/lib/dompurify@3.2.4es.js new file mode 100644 index 0000000..9183ec3 --- /dev/null +++ b/lib/dompurify@3.2.4es.js @@ -0,0 +1,9 @@ +/** + * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.37.0. + * Original file: /npm/dompurify@3.2.4/dist/purify.es.mjs + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */ +const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),N=(b=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:b,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=D(q,"cloneNode"),V=D(q,"remove"),re=D(q,"nextSibling"),ie=D(q,"childNodes"),ae=D(q,"parentNode");if("function"==typeof b){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:Ne}=Z,be=null;const Re=w({},[...L,...C,...x,...I,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let ve=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Le=null,Ce=!0,xe=!0,ke=!1,Ie=!0,Me=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=v(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,be=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(v(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(v(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,De=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,Ne=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(xe=!1),Be&&(Fe=!0),qe&&(be=w({},U),we=[],!0===qe.html&&(w(be,L),w(we,z)),!0===qe.svg&&(w(be,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(be,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(be,I),w(we,H),w(we,F))),e.ADD_TAGS&&(be===Re&&(be=v(be)),w(be,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=v(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=v($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(be["#text"]=!0),ze&&w(be,["html","head","body"]),be.table&&(w(be,["tbody"]),delete De.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...k]),yt=w({},[...I,...M]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e=""+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e=''+e+"");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},bt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:be}),e.hasChildNodes()&&!bt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!be[n]||De[n]){if(!De[n]&&vt(n)){if(ve.tagNameCheck instanceof RegExp&&S(ve.tagNameCheck,n))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(vt(e)&&(ve.tagNameCheck instanceof RegExp&&S(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&S(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&S(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(Ne,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(ke&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},vt=function(e){return"annotation-xml"!==e&&T(e,Se)},Dt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Ie&&S(/\/>/i,m)){At(a,e);continue}Me&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),Nt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),Dt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!be[t]||De[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Me&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),Dt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&be["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="\n"+m),Me&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();export{re as default}; +//# sourceMappingURL=/sm/c9a91a6b564cc6ab9769752fb72527c127540f6d15ad2e574f657c41de315aae.map \ No newline at end of file diff --git a/lib/highlight/github-dark.min.css b/lib/highlight/github-dark.min.css new file mode 100644 index 0000000..03b6da8 --- /dev/null +++ b/lib/highlight/github-dark.min.css @@ -0,0 +1,10 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: GitHub Dark + Description: Dark theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + + Outdated base version: https://github.com/primer/github-syntax-dark + Current colors taken from GitHub's CSS +*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c} \ No newline at end of file diff --git a/lib/highlight/highlight-uni.min.js b/lib/highlight/highlight-uni.min.js new file mode 100644 index 0000000..091aec5 --- /dev/null +++ b/lib/highlight/highlight-uni.min.js @@ -0,0 +1,5256 @@ +// 本文件是由 Highlight.js 经兼容性修改后的文件,请勿直接升级。否则会造成uni-app-vue3-Android下有兼容问题 +/*! + Highlight.js v11.7.0 (git: 82688fad18) + (c) 2006-2022 undefined and other contributors + License: BSD-3-Clause + */ +var e = { + exports: {} +}; + +function n(e) { + return e instanceof Map ? e.clear = e.delete = e.set = () => { + throw Error("map is read-only") + } : e instanceof Set && (e.add = e.clear = e.delete = () => { + throw Error("set is read-only") + }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((t => { + var a = e[t]; + "object" != typeof a || Object.isFrozen(a) || n(a) + })), e +} +e.exports = n, e.exports.default = n; +class t { + constructor(e) { + void 0 === e.data && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1 + } + ignoreMatch() { + this.isMatchIgnored = !0 + } +} + +function a(e) { + return e.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, + "'") +} + +function i(e, ...n) { + const t = Object.create(null); + for (const n in e) t[n] = e[n]; + return n.forEach((e => { + for (const n in e) t[n] = e[n] + })), t +} +const r = e => !!e.scope || e.sublanguage && e.language; +class s { + constructor(e, n) { + this.buffer = "", this.classPrefix = n.classPrefix, e.walk(this) + } + addText(e) { + this.buffer += a(e) + } + openNode(e) { + if (!r(e)) return; + let n = ""; + n = e.sublanguage ? "language-" + e.language : ((e, { + prefix: n + }) => { + if (e.includes(".")) { + const t = e.split("."); + return [`${n}${t.shift()}`, ...t.map(((e, n) => `${e}${"_".repeat(n+1)}`))].join(" ") + } + return `${n}${e}` + })(e.scope, { + prefix: this.classPrefix + }), this.span(n) + } + closeNode(e) { + r(e) && (this.buffer += "") + } + value() { + return this.buffer + } + span(e) { + this.buffer += `` + } +} +const o = (e = {}) => { + const n = { + children: [] + }; + return Object.assign(n, e), n +}; +class l { + constructor() { + this.rootNode = o(), this.stack = [this.rootNode] + } + get top() { + return this.stack[this.stack.length - 1] + } + get root() { + return this.rootNode + } + add(e) { + this.top.children.push(e) + } + openNode(e) { + const n = o({ + scope: e + }); + this.add(n), this.stack.push(n) + } + closeNode() { + if (this.stack.length > 1) return this.stack.pop() + } + closeAllNodes() { + for (; this.closeNode();); + } + toJSON() { + return JSON.stringify(this.rootNode, null, 4) + } + walk(e) { + return this.constructor._walk(e, this.rootNode) + } + static _walk(e, n) { + return "string" == typeof n ? e.addText(n) : n.children && (e.openNode(n), + n.children.forEach((n => this._walk(e, n))), e.closeNode(n)), e + } + static _collapse(e) { + "string" != typeof e && e.children && (e.children.every((e => "string" == typeof e)) ? e.children = [e.children + .join("") + ] : e.children.forEach((e => { + l._collapse(e) + }))) + } +} +class c extends l { + constructor(e) { + super(), this.options = e + } + addKeyword(e, n) { + "" !== e && (this.openNode(n), this.addText(e), this.closeNode()) + } + addText(e) { + "" !== e && this.add(e) + } + addSublanguage(e, n) { + const t = e.root; + t.sublanguage = !0, t.language = n, this.add(t) + } + toHTML() { + return new s(this, this.options).value() + } + finalize() { + return !0 + } +} + +function d(e) { + return e ? "string" == typeof e ? e : e.source : null +} + +function g(e) { + return m("(?=", e, ")") +} + +function u(e) { + return m("(?:", e, ")*") +} + +function b(e) { + return m("(?:", e, ")?") +} + +function m(...e) { + return e.map((e => d(e))).join("") +} + +function p(...e) { + const n = (e => { + const n = e[e.length - 1]; + return "object" == typeof n && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {} + })(e); + return "(" + (n.capture ? "" : "?:") + e.map((e => d(e))).join("|") + ")" +} + +function _(e) { + return RegExp(e.toString() + "|").exec("").length - 1 +} +const h = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./; + +function f(e, { + joinWith: n +}) { + let t = 0; + return e.map((e => { + t += 1; + const n = t; + let a = d(e), + i = ""; + for (; a.length > 0;) { + const e = h.exec(a); + if (!e) { + i += a; + break + } + i += a.substring(0, e.index), + a = a.substring(e.index + e[0].length), "\\" === e[0][0] && e[1] ? i += "\\" + (Number(e[1]) + n) : (i += + e[0], + "(" === e[0] && t++) + } + return i + })).map((e => `(${e})`)).join(n) +} +const E = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", + y = { + begin: "\\\\[\\s\\S]", + relevance: 0 + }, + w = { + scope: "string", + begin: "'", + end: "'", + illegal: "\\n", + contains: [y] + }, + N = { + scope: "string", + begin: '"', + end: '"', + illegal: "\\n", + contains: [y] + }, + v = (e, n, t = {}) => { + const a = i({ + scope: "comment", + begin: e, + end: n, + contains: [] + }, t); + a.contains.push({ + scope: "doctag", + begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", + end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/, + excludeBegin: !0, + relevance: 0 + }); + const r = p("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, + /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/); + return a.contains.push({ + begin: m(/[ ]+/, "(", r, /[.]?[:]?([.][ ]|[ ])/, "){3}") + }), a + }, + O = v("//", "$"), + k = v("/\\*", "\\*/"), + x = v("#", "$"); +var M = Object.freeze({ + __proto__: null, + MATCH_NOTHING_RE: /\b\B/, + IDENT_RE: "[a-zA-Z]\\w*", + UNDERSCORE_IDENT_RE: "[a-zA-Z_]\\w*", + NUMBER_RE: "\\b\\d+(\\.\\d+)?", + C_NUMBER_RE: E, + BINARY_NUMBER_RE: "\\b(0b[01]+)", + RE_STARTERS_RE: "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", + SHEBANG: (e = {}) => { + const n = /^#![ ]*\//; + return e.binary && (e.begin = m(n, /.*\b/, e.binary, /\b.*/)), i({ + scope: "meta", + begin: n, + end: /$/, + relevance: 0, + "on:begin": (e, n) => { + 0 !== e.index && n.ignoreMatch() + } + }, e) + }, + BACKSLASH_ESCAPE: y, + APOS_STRING_MODE: w, + QUOTE_STRING_MODE: N, + PHRASAL_WORDS_MODE: { + begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ + }, + COMMENT: v, + C_LINE_COMMENT_MODE: O, + C_BLOCK_COMMENT_MODE: k, + HASH_COMMENT_MODE: x, + NUMBER_MODE: { + scope: "number", + begin: "\\b\\d+(\\.\\d+)?", + relevance: 0 + }, + C_NUMBER_MODE: { + scope: "number", + begin: E, + relevance: 0 + }, + BINARY_NUMBER_MODE: { + scope: "number", + begin: "\\b(0b[01]+)", + relevance: 0 + }, + REGEXP_MODE: { + begin: /(?=\/[^/\n]*\/)/, + contains: [{ + scope: "regexp", + begin: /\//, + end: /\/[gimuy]*/, + illegal: /\n/, + contains: [y, { + begin: /\[/, + end: /\]/, + relevance: 0, + contains: [y] + }] + }] + }, + TITLE_MODE: { + scope: "title", + begin: "[a-zA-Z]\\w*", + relevance: 0 + }, + UNDERSCORE_TITLE_MODE: { + scope: "title", + begin: "[a-zA-Z_]\\w*", + relevance: 0 + }, + METHOD_GUARD: { + begin: "\\.\\s*[a-zA-Z_]\\w*", + relevance: 0 + }, + END_SAME_AS_BEGIN: e => Object.assign(e, { + "on:begin": (e, n) => { + n.data._beginMatch = e[1] + }, + "on:end": (e, n) => { + n.data._beginMatch !== e[1] && n.ignoreMatch() + } + }) +}); + +function S(e, n) { + "." === e.input[e.index - 1] && n.ignoreMatch() +} + +function A(e, n) { + void 0 !== e.className && (e.scope = e.className, delete e.className) +} + +function C(e, n) { + n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", + e.__beforeBegin = S, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, + void 0 === e.relevance && (e.relevance = 0)) +} + +function T(e, n) { + Array.isArray(e.illegal) && (e.illegal = p(...e.illegal)) +} + +function R(e, n) { + if (e.match) { + if (e.begin || e.end) throw Error("begin & end are not supported with match"); + e.begin = e.match, delete e.match + } +} + +function D(e, n) { + void 0 === e.relevance && (e.relevance = 1) +} +const I = (e, n) => { + if (!e.beforeMatch) return; + if (e.starts) throw Error("beforeMatch cannot be used with starts"); + const t = Object.assign({}, e); + Object.keys(e).forEach((n => { + delete e[n] + })), e.keywords = t.keywords, e.begin = m(t.beforeMatch, g(t.begin)), e.starts = { + relevance: 0, + contains: [Object.assign(t, { + endsParent: !0 + })] + }, e.relevance = 0, delete t.beforeMatch + }, + L = ["of", "and", "for", "in", "not", "or", "if", "then", "parent", "list", "value"]; + +function B(e, n, t = "keyword") { + const a = Object.create(null); + return "string" == typeof e ? i(t, e.split(" ")) : Array.isArray(e) ? i(t, e) : Object.keys(e).forEach((t => { + Object.assign(a, B(e[t], n, t)) + })), a; + + function i(e, t) { + n && (t = t.map((e => e.toLowerCase()))), t.forEach((n => { + const t = n.split("|"); + a[t[0]] = [e, $(t[0], t[1])] + })) + } +} + +function $(e, n) { + return n ? Number(n) : (e => L.includes(e.toLowerCase()))(e) ? 0 : 1 +} +const z = {}, + F = e => { + console.error(e) + }, + U = (e, ...n) => { + console.log("WARN: " + e, ...n) + }, + j = (e, n) => { + z[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), z[`${e}/${n}`] = !0) + }, + P = Error(); + +function K(e, n, { + key: t +}) { + let a = 0; + const i = e[t], + r = {}, + s = {}; + for (let e = 1; e <= n.length; e++) s[e + a] = i[e], r[e + a] = !0, a += _(n[e - 1]); + e[t] = s, e[t]._emit = r, e[t]._multi = !0 +} + +function H(e) { + (e => { + e.scope && "object" == typeof e.scope && null !== e.scope && (e.beginScope = e.scope, + delete e.scope) + })(e), "string" == typeof e.beginScope && (e.beginScope = { + _wrap: e.beginScope + }), "string" == typeof e.endScope && (e.endScope = { + _wrap: e.endScope + }), (e => { + if (Array.isArray(e.begin)) { + if (e.skip || e.excludeBegin || e.returnBegin) throw F( + "skip, excludeBegin, returnBegin not compatible with beginScope: {}"), + P; + if ("object" != typeof e.beginScope || null === e.beginScope) throw F("beginScope must be object"), + P; + K(e, e.begin, { + key: "beginScope" + }), e.begin = f(e.begin, { + joinWith: "" + }) + } + })(e), (e => { + if (Array.isArray(e.end)) { + if (e.skip || e.excludeEnd || e.returnEnd) throw F( + "skip, excludeEnd, returnEnd not compatible with endScope: {}"), + P; + if ("object" != typeof e.endScope || null === e.endScope) throw F("endScope must be object"), + P; + K(e, e.end, { + key: "endScope" + }), e.end = f(e.end, { + joinWith: "" + }) + } + })(e) +} + +function q(e) { + function n(n, t) { + return RegExp(d(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (t ? "g" : "")) + } + class t { + constructor() { + this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0 + } + addRule(e, n) { + n.position = this.position++, this.matchIndexes[this.matchAt] = n, this.regexes.push([n, e]), + this.matchAt += _(e) + 1 + } + compile() { + 0 === this.regexes.length && (this.exec = () => null); + const e = this.regexes.map((e => e[1])); + this.matcherRe = n(f(e, { + joinWith: "|" + }), !0), this.lastIndex = 0 + } + exec(e) { + this.matcherRe.lastIndex = this.lastIndex; + const n = this.matcherRe.exec(e); + if (!n) return null; + const t = n.findIndex(((e, n) => n > 0 && void 0 !== e)), + a = this.matchIndexes[t]; + return n.splice(0, t), Object.assign(n, a) + } + } + class a { + constructor() { + this.rules = [], this.multiRegexes = [], + this.count = 0, this.lastIndex = 0, this.regexIndex = 0 + } + getMatcher(e) { + if (this.multiRegexes[e]) return this.multiRegexes[e]; + const n = new t; + return this.rules.slice(e).forEach((([e, t]) => n.addRule(e, t))), + n.compile(), this.multiRegexes[e] = n, n + } + resumingScanAtSamePosition() { + return 0 !== this.regexIndex + } + considerAll() { + this.regexIndex = 0 + } + addRule(e, n) { + this.rules.push([e, n]), "begin" === n.type && this.count++ + } + exec(e) { + const n = this.getMatcher(this.regexIndex); + n.lastIndex = this.lastIndex; + let t = n.exec(e); + if (this.resumingScanAtSamePosition()) + if (t && t.index === this.lastIndex); + else { + const n = this.getMatcher(0); + n.lastIndex = this.lastIndex + 1, t = n.exec(e) + } + return t && (this.regexIndex += t.position + 1, + this.regexIndex === this.count && this.considerAll()), t + } + } + if (e.compilerExtensions || (e.compilerExtensions = []), + e.contains && e.contains.includes("self")) throw Error( + "ERR: contains `self` is not supported at the top-level of a language. See documentation."); + return e.classNameAliases = i(e.classNameAliases || {}), + function t(r, s) { + const o = r; + if (r.isCompiled) return o; + [A, R, H, I].forEach((e => e(r, s))), e.compilerExtensions.forEach((e => e(r, s))), + r.__beforeBegin = null, [C, T, D].forEach((e => e(r, s))), r.isCompiled = !0; + let l = null; + return "object" == typeof r.keywords && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), + l = r.keywords.$pattern, + delete r.keywords.$pattern), l = l || /\w+/, r.keywords && (r.keywords = B(r.keywords, e.case_insensitive)), + o.keywordPatternRe = n(l, !0), + s && (r.begin || (r.begin = /\B|\b/), o.beginRe = n(o.begin), r.end || r.endsWithParent || (r.end = /\B|\b/), + r.end && (o.endRe = n(o.end)), + o.terminatorEnd = d(o.end) || "", r.endsWithParent && s.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : + "") + s.terminatorEnd)), + r.illegal && (o.illegalRe = n(r.illegal)), + r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map((e => (e => (e.variants && !e + .cachedVariants && (e.cachedVariants = e.variants.map((n => i(e, { + variants: null + }, n)))), e.cachedVariants ? e.cachedVariants : Z(e) ? i(e, { + starts: e.starts ? i(e.starts) : null + }) : Object.isFrozen(e) ? i(e) : e))("self" === e ? r : e)))), r.contains.forEach((e => { + t(e, o) + })), r.starts && t(r.starts, s), o.matcher = (e => { + const n = new a; + return e.contains.forEach((e => n.addRule(e.begin, { + rule: e, + type: "begin" + }))), e.terminatorEnd && n.addRule(e.terminatorEnd, { + type: "end" + }), e.illegal && n.addRule(e.illegal, { + type: "illegal" + }), n + })(o), o + }(e) +} + +function Z(e) { + return !!e && (e.endsWithParent || Z(e.starts)) +} +class G extends Error { + constructor(e, n) { + super(e), this.name = "HTMLInjectionError", this.html = n + } +} +const W = a, + Q = i, + X = Symbol("nomatch"); +var V = (n => { + const a = Object.create(null), + i = Object.create(null), + r = []; + let s = !0; + const o = "Could not find the language '{}', did you forget to load/include a language module?", + l = { + disableAutodetect: !0, + name: "Plain text", + contains: [] + }; + let d = { + ignoreUnescapedHTML: !1, + throwUnescapedHTML: !1, + noHighlightRe: /^(no-?highlight)$/i, + languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i, + classPrefix: "hljs-", + cssSelector: "pre code", + languages: null, + __emitter: c + }; + + function _(e) { + return d.noHighlightRe.test(e) + } + + function h(e, n, t) { + let a = "", + i = ""; + "object" == typeof n ? (a = e, + t = n.ignoreIllegals, i = n.language) : (j("10.7.0", "highlight(lang, code, ...args) has been deprecated."), + j("10.7.0", + "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), + i = e, a = n), void 0 === t && (t = !0); + const r = { + code: a, + language: i + }; + x("before:highlight", r); + const s = r.result ? r.result : f(r.language, r.code, t); + return s.code = r.code, x("after:highlight", s), s + } + + function f(e, n, i, r) { + const l = Object.create(null); + + function c() { + if (!k.keywords) return void M.addText(S); + let e = 0; + k.keywordPatternRe.lastIndex = 0; + let n = k.keywordPatternRe.exec(S), + t = ""; + for (; n;) { + t += S.substring(e, n.index); + const i = w.case_insensitive ? n[0].toLowerCase() : n[0], + r = (a = i, k.keywords[a]); + if (r) { + const [e, a] = r + ; + if (M.addText(t), t = "", l[i] = (l[i] || 0) + 1, l[i] <= 7 && (A += a), e.startsWith("_")) t += n[0]; + else { + const t = w.classNameAliases[e] || e; + M.addKeyword(n[0], t) + } + } else t += n[0]; + e = k.keywordPatternRe.lastIndex, n = k.keywordPatternRe.exec(S) + } + var a; + t += S.substring(e), M.addText(t) + } + + function g() { + null != k.subLanguage ? (() => { + if ("" === S) return; + let e = null; + if ("string" == typeof k.subLanguage) { + if (!a[k.subLanguage]) return void M.addText(S); + e = f(k.subLanguage, S, !0, x[k.subLanguage]), x[k.subLanguage] = e._top + } else e = E(S, k.subLanguage.length ? k.subLanguage : null); + k.relevance > 0 && (A += e.relevance), M.addSublanguage(e._emitter, e.language) + })() : c(), S = "" + } + + function u(e, n) { + let t = 1; + const a = n.length - 1; + for (; t <= a;) { + if (!e._emit[t]) { + t++; + continue + } + const a = w.classNameAliases[e[t]] || e[t], + i = n[t]; + a ? M.addKeyword(i, a) : (S = i, c(), S = ""), t++ + } + } + + function b(e, n) { + return e.scope && "string" == typeof e.scope && M.openNode(w.classNameAliases[e.scope] || e.scope), + e.beginScope && (e.beginScope._wrap ? (M.addKeyword(S, w.classNameAliases[e.beginScope._wrap] || e + .beginScope._wrap), + S = "") : e.beginScope._multi && (u(e.beginScope, n), S = "")), k = Object.create(e, { + parent: { + value: k + } + }), k + } + + function m(e, n, a) { + let i = ((e, n) => { + const t = e && e.exec(n); + return t && 0 === t.index + })(e.endRe, a); + if (i) { + if (e["on:end"]) { + const a = new t(e); + e["on:end"](n, a), a.isMatchIgnored && (i = !1) + } + if (i) { + for (; e.endsParent && e.parent;) e = e.parent; + return e + } + } + if (e.endsWithParent) return m(e.parent, n, a) + } + + function p(e) { + return 0 === k.matcher.regexIndex ? (S += e[0], 1) : (R = !0, 0) + } + + function _(e) { + const t = e[0], + a = n.substring(e.index), + i = m(k, e, a); + if (!i) return X; + const r = k; + k.endScope && k.endScope._wrap ? (g(), + M.addKeyword(t, k.endScope._wrap)) : k.endScope && k.endScope._multi ? (g(), + u(k.endScope, e)) : r.skip ? S += t : (r.returnEnd || r.excludeEnd || (S += t), + g(), r.excludeEnd && (S = t)); + do { + k.scope && M.closeNode(), k.skip || k.subLanguage || (A += k.relevance), k = k.parent + } while (k !== i.parent); + return i.starts && b(i.starts, e), r.returnEnd ? 0 : t.length + } + let h = {}; + + function y(a, r) { + const o = r && r[0]; + if (S += a, null == o) return g(), 0; + if ("begin" === h.type && "end" === r.type && h.index === r.index && "" === o) { + if (S += n.slice(r.index, r.index + 1), !s) { + const n = Error(`0 width match regex (${e})`); + throw n.languageName = e, n.badRule = h.rule, n + } + return 1 + } + if (h = r, "begin" === r.type) return (e => { + const n = e[0], + a = e.rule, + i = new t(a), + r = [a.__beforeBegin, a["on:begin"]]; + for (const t of r) + if (t && (t(e, i), i.isMatchIgnored)) return p(n); + return a.skip ? S += n : (a.excludeBegin && (S += n), + g(), a.returnBegin || a.excludeBegin || (S = n)), b(a, e), a.returnBegin ? 0 : n.length + })(r); + if ("illegal" === r.type && !i) { + const e = Error('Illegal lexeme "' + o + '" for mode "' + (k.scope || "") + '"'); + throw e.mode = k, e + } + if ("end" === r.type) { + const e = _(r); + if (e !== X) return e + } + if ("illegal" === r.type && "" === o) return 1; + if (T > 1e5 && T > 3 * r.index) throw Error("potential infinite loop, way more iterations than matches"); + return S += o, o.length + } + const w = v(e); + if (!w) throw F(o.replace("{}", e)), Error('Unknown language: "' + e + '"'); + const N = q(w); + let O = "", + k = r || N; + const x = {}, + M = new d.__emitter(d); + (() => { + const e = []; + for (let n = k; n !== w; n = n.parent) n.scope && e.unshift(n.scope); + e.forEach((e => M.openNode(e))) + })(); + let S = "", + A = 0, + C = 0, + T = 0, + R = !1; + try { + for (k.matcher.considerAll();;) { + T++, R ? R = !1 : k.matcher.considerAll(), k.matcher.lastIndex = C; + const e = k.matcher.exec(n); + if (!e) break; + const t = y(n.substring(C, e.index), e); + C = e.index + t + } + return y(n.substring(C)), M.closeAllNodes(), M.finalize(), O = M.toHTML(), { + language: e, + value: O, + relevance: A, + illegal: !1, + _emitter: M, + _top: k + } + } catch (t) { + if (t.message && t.message.includes("Illegal")) return { + language: e, + value: W(n), + illegal: !0, + relevance: 0, + _illegalBy: { + message: t.message, + index: C, + context: n.slice(C - 100, C + 100), + mode: t.mode, + resultSoFar: O + }, + _emitter: M + }; + if (s) return { + language: e, + value: W(n), + illegal: !1, + relevance: 0, + errorRaised: t, + _emitter: M, + _top: k + }; + throw t + } + } + + function E(e, n) { + n = n || d.languages || Object.keys(a); + const t = (e => { + const n = { + value: W(e), + illegal: !1, + relevance: 0, + _top: l, + _emitter: new d.__emitter(d) + }; + return n._emitter.addText(e), n + })(e), + i = n.filter(v).filter(k).map((n => f(n, e, !1))); + i.unshift(t); + const r = i.sort(((e, n) => { + if (e.relevance !== n.relevance) return n.relevance - e.relevance; + if (e.language && n.language) { + if (v(e.language).supersetOf === n.language) return 1; + if (v(n.language).supersetOf === e.language) return -1 + } + return 0 + })), + [s, o] = r, + c = s; + return c.secondBest = o, c + } + + function y(e) { + let n = null; + const t = (e => { + let n = e.className + " "; + n += e.parentNode ? e.parentNode.className : ""; + const t = d.languageDetectRe.exec(n); + if (t) { + const n = v(t[1]); + return n || (U(o.replace("{}", t[1])), + U("Falling back to no-highlight mode for this block.", e)), n ? t[1] : "no-highlight" + } + return n.split(/\s+/).find((e => _(e) || v(e))) + })(e); + if (_(t)) return; + if (x("before:highlightElement", { + el: e, + language: t + }), e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn( + "One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), + console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), + console.warn("The element with unescaped HTML:"), + console.warn(e)), d.throwUnescapedHTML)) throw new G("One of your code blocks includes unescaped HTML.", e + .innerHTML); + n = e; + const a = n.textContent, + r = t ? h(a, { + language: t, + ignoreIllegals: !0 + }) : E(a); + e.innerHTML = r.value, ((e, n, t) => { + const a = n && i[n] || t; + e.classList.add("hljs"), e.classList.add("language-" + a) + })(e, t, r.language), e.result = { + language: r.language, + re: r.relevance, + relevance: r.relevance + }, r.secondBest && (e.secondBest = { + language: r.secondBest.language, + relevance: r.secondBest.relevance + }), x("after:highlightElement", { + el: e, + result: r, + text: a + }) + } + let w = !1; + + function N() { + "loading" !== document.readyState ? document.querySelectorAll(d.cssSelector).forEach(y) : w = !0 + } + + function v(e) { + return e = (e || "").toLowerCase(), a[e] || a[i[e]] + } + + function O(e, { + languageName: n + }) { + "string" == typeof e && (e = [e]), e.forEach((e => { + i[e.toLowerCase()] = n + })) + } + + function k(e) { + const n = v(e); + return n && !n.disableAutodetect + } + + function x(e, n) { + const t = e; + r.forEach((e => { + e[t] && e[t](n) + })) + } + "undefined" != typeof window && window.addEventListener && window.addEventListener("DOMContentLoaded", (() => { + w && N() + }), !1), Object.assign(n, { + highlight: h, + highlightAuto: E, + highlightAll: N, + highlightElement: y, + highlightBlock: e => (j("10.7.0", "highlightBlock will be removed entirely in v12.0"), + j("10.7.0", "Please use highlightElement now."), y(e)), + configure: e => { + d = Q(d, e) + }, + initHighlighting: () => { + N(), j("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.") + }, + initHighlightingOnLoad: () => { + N(), j("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.") + }, + registerLanguage: (e, t) => { + let i = null; + try { + i = t(n) + } catch (n) { + if (F("Language definition for '{}' could not be registered.".replace("{}", e)), + !s) throw n; + F(n), i = l + } + i.name || (i.name = e), a[e] = i, i.rawDefinition = t.bind(null, n), i.aliases && O(i.aliases, { + languageName: e + }) + }, + unregisterLanguage: e => { + delete a[e]; + for (const n of Object.keys(i)) i[n] === e && delete i[n] + }, + listLanguages: () => Object.keys(a), + getLanguage: v, + registerAliases: O, + autoDetection: k, + inherit: Q, + addPlugin: e => { + (e => { + e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = + n => { + e["before:highlightBlock"](Object.assign({ + block: n.el + }, n)) + }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = + n => { + e["after:highlightBlock"](Object.assign({ + block: n.el + }, n)) + }) + })(e), r.push(e) + } + }), n.debugMode = () => { + s = !1 + }, n.safeMode = () => { + s = !0 + }, n.versionString = "11.7.0", n.regex = { + concat: m, + lookahead: g, + either: p, + optional: b, + anyNumberOfTimes: u + }; + for (const n in M) "object" == typeof M[n] && e.exports(M[n]); + return Object.assign(n, M), n +})({}); +const J = e => ({ + IMPORTANT: { + scope: "meta", + begin: "!important" + }, + BLOCK_COMMENT: e.C_BLOCK_COMMENT_MODE, + HEXCOLOR: { + scope: "number", + begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/ + }, + FUNCTION_DISPATCH: { + className: "built_in", + begin: /[\w-]+(?=\()/ + }, + ATTRIBUTE_SELECTOR_MODE: { + scope: "selector-attr", + begin: /\[/, + end: /\]/, + illegal: "$", + contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + }, + CSS_NUMBER_MODE: { + scope: "number", + begin: e.NUMBER_RE + + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", + relevance: 0 + }, + CSS_VARIABLE: { + className: "attr", + begin: /--[A-Za-z][A-Za-z0-9_-]*/ + } + }), + Y = ["a", "abbr", "address", "article", "aside", "audio", "b", "blockquote", "body", "button", "canvas", "caption", + "cite", "code", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "fieldset", "figcaption", "figure", + "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "html", "i", "iframe", "img", "input", + "ins", "kbd", "label", "legend", "li", "main", "mark", "menu", "nav", "object", "ol", "p", "q", "quote", "samp", + "section", "span", "strong", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", + "tr", "ul", "var", "video" + ], + ee = ["any-hover", "any-pointer", "aspect-ratio", "color", "color-gamut", "color-index", "device-aspect-ratio", + "device-height", "device-width", "display-mode", "forced-colors", "grid", "height", "hover", "inverted-colors", + "monochrome", "orientation", "overflow-block", "overflow-inline", "pointer", "prefers-color-scheme", + "prefers-contrast", "prefers-reduced-motion", "prefers-reduced-transparency", "resolution", "scan", "scripting", + "update", "width", "min-width", "max-width", "min-height", "max-height" + ], + ne = ["active", "any-link", "blank", "checked", "current", "default", "defined", "dir", "disabled", "drop", "empty", + "enabled", "first", "first-child", "first-of-type", "fullscreen", "future", "focus", "focus-visible", + "focus-within", "has", "host", "host-context", "hover", "indeterminate", "in-range", "invalid", "is", "lang", + "last-child", "last-of-type", "left", "link", "local-link", "not", "nth-child", "nth-col", "nth-last-child", + "nth-last-col", "nth-last-of-type", "nth-of-type", "only-child", "only-of-type", "optional", "out-of-range", "past", + "placeholder-shown", "read-only", "read-write", "required", "right", "root", "scope", "target", "target-within", + "user-invalid", "valid", "visited", "where" + ], + te = ["after", "backdrop", "before", "cue", "cue-region", "first-letter", "first-line", "grammar-error", "marker", + "part", "placeholder", "selection", "slotted", "spelling-error" + ], + ae = ["align-content", "align-items", "align-self", "all", "animation", "animation-delay", "animation-direction", + "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", + "animation-timing-function", "backface-visibility", "background", "background-attachment", "background-blend-mode", + "background-clip", "background-color", "background-image", "background-origin", "background-position", + "background-repeat", "background-size", "block-size", "border", "border-block", "border-block-color", + "border-block-end", "border-block-end-color", "border-block-end-style", "border-block-end-width", + "border-block-start", "border-block-start-color", "border-block-start-style", "border-block-start-width", + "border-block-style", "border-block-width", "border-bottom", "border-bottom-color", "border-bottom-left-radius", + "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", + "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", + "border-image-width", "border-inline", "border-inline-color", "border-inline-end", "border-inline-end-color", + "border-inline-end-style", "border-inline-end-width", "border-inline-start", "border-inline-start-color", + "border-inline-start-style", "border-inline-start-width", "border-inline-style", "border-inline-width", + "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", + "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", + "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", + "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", + "break-inside", "caption-side", "caret-color", "clear", "clip", "clip-path", "clip-rule", "color", "column-count", + "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", + "column-span", "column-width", "columns", "contain", "content", "content-visibility", "counter-increment", + "counter-reset", "cue", "cue-after", "cue-before", "cursor", "direction", "display", "empty-cells", "filter", + "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "flow", + "font", "font-display", "font-family", "font-feature-settings", "font-kerning", "font-language-override", + "font-size", "font-size-adjust", "font-smoothing", "font-stretch", "font-style", "font-synthesis", "font-variant", + "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", + "font-variant-position", "font-variation-settings", "font-weight", "gap", "glyph-orientation-vertical", "grid", + "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", "grid-column", "grid-column-end", + "grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-start", "grid-template", + "grid-template-areas", "grid-template-columns", "grid-template-rows", "hanging-punctuation", "height", "hyphens", + "icon", "image-orientation", "image-rendering", "image-resolution", "ime-mode", "inline-size", "isolation", + "justify-content", "left", "letter-spacing", "line-break", "line-height", "list-style", "list-style-image", + "list-style-position", "list-style-type", "margin", "margin-block", "margin-block-end", "margin-block-start", + "margin-bottom", "margin-inline", "margin-inline-end", "margin-inline-start", "margin-left", "margin-right", + "margin-top", "marks", "mask", "mask-border", "mask-border-mode", "mask-border-outset", "mask-border-repeat", + "mask-border-slice", "mask-border-source", "mask-border-width", "mask-clip", "mask-composite", "mask-image", + "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size", "mask-type", "max-block-size", + "max-height", "max-inline-size", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", + "mix-blend-mode", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "none", "normal", "object-fit", + "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", + "outline-width", "overflow", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-block", + "padding-block-end", "padding-block-start", "padding-bottom", "padding-inline", "padding-inline-end", + "padding-inline-start", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", + "page-break-inside", "pause", "pause-after", "pause-before", "perspective", "perspective-origin", "pointer-events", + "position", "quotes", "resize", "rest", "rest-after", "rest-before", "right", "row-gap", "scroll-margin", + "scroll-margin-block", "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom", + "scroll-margin-inline", "scroll-margin-inline-end", "scroll-margin-inline-start", "scroll-margin-left", + "scroll-margin-right", "scroll-margin-top", "scroll-padding", "scroll-padding-block", "scroll-padding-block-end", + "scroll-padding-block-start", "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end", + "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right", "scroll-padding-top", + "scroll-snap-align", "scroll-snap-stop", "scroll-snap-type", "scrollbar-color", "scrollbar-gutter", + "scrollbar-width", "shape-image-threshold", "shape-margin", "shape-outside", "speak", "speak-as", "src", "tab-size", + "table-layout", "text-align", "text-align-all", "text-align-last", "text-combine-upright", "text-decoration", + "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-emphasis", "text-emphasis-color", + "text-emphasis-position", "text-emphasis-style", "text-indent", "text-justify", "text-orientation", "text-overflow", + "text-rendering", "text-shadow", "text-transform", "text-underline-position", "top", "transform", "transform-box", + "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", + "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", + "voice-balance", "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", + "voice-volume", "white-space", "widows", "width", "will-change", "word-break", "word-spacing", "word-wrap", + "writing-mode", "z-index" + ].reverse(), + ie = ne.concat(te); +var re = "\\.([0-9](_*[0-9])*)", + se = "[0-9a-fA-F](_*[0-9a-fA-F])*", + oe = { + className: "number", + variants: [{ + begin: `(\\b([0-9](_*[0-9])*)((${re})|\\.)?|(${re}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` + }, { + begin: `\\b([0-9](_*[0-9])*)((${re})[fFdD]?\\b|\\.([fFdD]\\b)?)` + }, { + begin: `(${re})[fFdD]?\\b` + }, { + begin: "\\b([0-9](_*[0-9])*)[fFdD]\\b" + }, { + begin: `\\b0[xX]((${se})\\.?|(${se})?\\.(${se}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` + }, { + begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" + }, { + begin: `\\b0[xX](${se})[lL]?\\b` + }, { + begin: "\\b0(_*[0-7])*[lL]?\\b" + }, { + begin: "\\b0[bB][01](_*[01])*[lL]?\\b" + }], + relevance: 0 + }; + +function le(e, n, t) { + return -1 === t ? "" : e.replace(n, (a => le(e, n, t - 1))) +} +const ce = "[A-Za-z$_][0-9A-Za-z$_]*", + de = ["as", "in", "of", "if", "for", "while", "finally", "var", "new", "function", "do", "return", "void", "else", + "break", "catch", "instanceof", "with", "throw", "case", "default", "try", "switch", "continue", "typeof", "delete", + "let", "yield", "const", "class", "debugger", "async", "await", "static", "import", "from", "export", "extends" + ], + ge = ["true", "false", "null", "undefined", "NaN", "Infinity"], + ue = ["Object", "Function", "Boolean", "Symbol", "Math", "Date", "Number", "BigInt", "String", "RegExp", "Array", + "Float32Array", "Float64Array", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Int32Array", + "Uint16Array", "Uint32Array", "BigInt64Array", "BigUint64Array", "Set", "Map", "WeakSet", "WeakMap", "ArrayBuffer", + "SharedArrayBuffer", "Atomics", "DataView", "JSON", "Promise", "Generator", "GeneratorFunction", "AsyncFunction", + "Reflect", "Proxy", "Intl", "WebAssembly" + ], + be = ["Error", "EvalError", "InternalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError"], + me = ["setInterval", "setTimeout", "clearInterval", "clearTimeout", "require", "exports", "eval", "isFinite", "isNaN", + "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "unescape" + ], + pe = ["arguments", "this", "super", "console", "window", "document", "localStorage", "module", "global"], + _e = [].concat(me, ue, be); + +function he(e) { + const n = e.regex, + t = ce, + a = { + begin: /<[A-Za-z0-9\\._:-]+/, + end: /\/[A-Za-z0-9\\._:-]+>|\/>/, + isTrulyOpeningTag: (e, n) => { + const t = e[0].length + e.index, + a = e.input[t]; + if ("<" === a || "," === a) return void n.ignoreMatch(); + let i; + ">" === a && (((e, { + after: n + }) => { + const t = "", + k = { + match: [/const|var|let/, /\s+/, t, /\s*/, /=\s*/, /(async\s*)?/, n.lookahead(O)], + keywords: "async", + className: { + 1: "keyword", + 3: "title.function" + }, + contains: [_] + }; + return { + name: "Javascript", + aliases: ["js", "jsx", "mjs", "cjs"], + keywords: i, + exports: { + PARAMS_CONTAINS: p, + CLASS_REFERENCE: f + }, + illegal: /#(?![$_A-z])/, + contains: [e.SHEBANG({ + label: "shebang", + binary: "node", + relevance: 5 + }), { + label: "use_strict", + className: "meta", + relevance: 10, + begin: /^\s*['"]use (strict|asm)['"]/ + }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, c, d, g, u, { + match: /\$\d+/ + }, o, f, { + className: "attr", + begin: t + n.lookahead(":"), + relevance: 0 + }, k, { + begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*", + keywords: "return throw case", + relevance: 0, + contains: [u, e.REGEXP_MODE, { + className: "function", + begin: O, + returnBegin: !0, + end: "\\s*=>", + contains: [{ + className: "params", + variants: [{ + begin: e.UNDERSCORE_IDENT_RE, + relevance: 0 + }, { + className: null, + begin: /\(\s*\)/, + skip: !0 + }, { + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: i, + contains: p + }] + }] + }, { + begin: /,/, + relevance: 0 + }, { + match: /\s+/, + relevance: 0 + }, { + variants: [{ + begin: "<>", + end: "" + }, { + match: /<[A-Za-z0-9\\._:-]+\s*\/>/ + }, { + begin: a.begin, + "on:begin": a.isTrulyOpeningTag, + end: a.end + }], + subLanguage: "xml", + contains: [{ + begin: a.begin, + end: a.end, + skip: !0, + contains: ["self"] + }] + }] + }, E, { + beginKeywords: "while if switch catch for" + }, { + begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", + returnBegin: !0, + label: "func.def", + contains: [_, e.inherit(e.TITLE_MODE, { + begin: t, + className: "title.function" + })] + }, { + match: /\.\.\./, + relevance: 0 + }, N, { + match: "\\$" + t, + relevance: 0 + }, { + match: [/\bconstructor(?=\s*\()/], + className: { + 1: "title.function" + }, + contains: [_] + }, y, { + relevance: 0, + match: /\b[A-Z][A-Z_0-9]+\b/, + className: "variable.constant" + }, h, v, { + match: /\$[(.]/ + }] + } +} +const fe = e => m(/\b/, e, /\w$/.test(e) ? /\b/ : /\B/), + Ee = ["Protocol", "Type"].map(fe), + ye = ["init", "self"].map(fe), + we = ["Any", "Self"], + Ne = ["actor", "any", "associatedtype", "async", "await", /as\?/, /as!/, "as", "break", "case", "catch", "class", + "continue", "convenience", "default", "defer", "deinit", "didSet", "distributed", "do", "dynamic", "else", "enum", + "extension", "fallthrough", /fileprivate\(set\)/, "fileprivate", "final", "for", "func", "get", "guard", "if", + "import", "indirect", "infix", /init\?/, /init!/, "inout", /internal\(set\)/, "internal", "in", "is", "isolated", + "nonisolated", "lazy", "let", "mutating", "nonmutating", /open\(set\)/, "open", "operator", "optional", "override", + "postfix", "precedencegroup", "prefix", /private\(set\)/, "private", "protocol", /public\(set\)/, "public", + "repeat", "required", "rethrows", "return", "set", "some", "static", "struct", "subscript", "super", "switch", + "throws", "throw", /try\?/, /try!/, "try", "typealias", /unowned\(safe\)/, /unowned\(unsafe\)/, "unowned", "var", + "weak", "where", "while", "willSet" + ], + ve = ["false", "nil", "true"], + Oe = ["assignment", "associativity", "higherThan", "left", "lowerThan", "none", "right"], + ke = ["#colorLiteral", "#column", "#dsohandle", "#else", "#elseif", "#endif", "#error", "#file", "#fileID", + "#fileLiteral", "#filePath", "#function", "#if", "#imageLiteral", "#keyPath", "#line", "#selector", + "#sourceLocation", "#warn_unqualified_access", "#warning" + ], + xe = ["abs", "all", "any", "assert", "assertionFailure", "debugPrint", "dump", "fatalError", "getVaList", + "isKnownUniquelyReferenced", "max", "min", "numericCast", "pointwiseMax", "pointwiseMin", "precondition", + "preconditionFailure", "print", "readLine", "repeatElement", "sequence", "stride", "swap", + "swift_unboxFromSwiftValueWithType", "transcode", "type", "unsafeBitCast", "unsafeDowncast", "withExtendedLifetime", + "withUnsafeMutablePointer", "withUnsafePointer", "withVaList", "withoutActuallyEscaping", "zip" + ], + Me = p(/[/=\-+!*%<>&|^~?]/, /[\u00A1-\u00A7]/, /[\u00A9\u00AB]/, /[\u00AC\u00AE]/, /[\u00B0\u00B1]/, + /[\u00B6\u00BB\u00BF\u00D7\u00F7]/, /[\u2016-\u2017]/, /[\u2020-\u2027]/, /[\u2030-\u203E]/, /[\u2041-\u2053]/, + /[\u2055-\u205E]/, /[\u2190-\u23FF]/, /[\u2500-\u2775]/, /[\u2794-\u2BFF]/, /[\u2E00-\u2E7F]/, /[\u3001-\u3003]/, + /[\u3008-\u3020]/, /[\u3030]/), + Se = p(Me, /[\u0300-\u036F]/, /[\u1DC0-\u1DFF]/, /[\u20D0-\u20FF]/, /[\uFE00-\uFE0F]/, /[\uFE20-\uFE2F]/), + Ae = m(Me, Se, "*"), + Ce = p(/[a-zA-Z_]/, /[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/, + /[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/, /[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/, + /[\u1E00-\u1FFF]/, /[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/, + /[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/, /[\u2C00-\u2DFF\u2E80-\u2FFF]/, + /[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/, /[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/, + /[\uFE47-\uFEFE\uFF00-\uFFFD]/), + Te = p(Ce, /\d/, /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/), + Re = m(Ce, Te, "*"), + De = m(/[A-Z]/, Te, "*"), + Ie = ["autoclosure", m(/convention\(/, p("swift", "block", "c"), /\)/), "discardableResult", "dynamicCallable", + "dynamicMemberLookup", "escaping", "frozen", "GKInspectable", "IBAction", "IBDesignable", "IBInspectable", + "IBOutlet", "IBSegueAction", "inlinable", "main", "nonobjc", "NSApplicationMain", "NSCopying", "NSManaged", m( + /objc\(/, Re, /\)/), "objc", "objcMembers", "propertyWrapper", "requires_stored_property_inits", "resultBuilder", + "testable", "UIApplicationMain", "unknown", "usableFromInline" + ], + Le = ["iOS", "iOSApplicationExtension", "macOS", "macOSApplicationExtension", "macCatalyst", + "macCatalystApplicationExtension", "watchOS", "watchOSApplicationExtension", "tvOS", "tvOSApplicationExtension", + "swift" + ]; +var Be = Object.freeze({ + __proto__: null, + grmr_bash: e => { + const n = e.regex, + t = {}, + a = { + begin: /\$\{/, + end: /\}/, + contains: ["self", { + begin: /:-/, + contains: [t] + }] + }; + Object.assign(t, { + className: "variable", + variants: [{ + begin: n.concat(/\$[\w\d#@][\w\d_]*/, "(?![\\w\\d])(?![$])") + }, a] + }); + const i = { + className: "subst", + begin: /\$\(/, + end: /\)/, + contains: [e.BACKSLASH_ESCAPE] + }, + r = { + begin: /<<-?\s*(?=\w+)/, + starts: { + contains: [e.END_SAME_AS_BEGIN({ + begin: /(\w+)/, + end: /(\w+)/, + className: "string" + })] + } + }, + s = { + className: "string", + begin: /"/, + end: /"/, + contains: [e.BACKSLASH_ESCAPE, t, i] + }; + i.contains.push(s); + const o = { + begin: /\$?\(\(/, + end: /\)\)/, + contains: [{ + begin: /\d+#[0-9a-f]+/, + className: "number" + }, e.NUMBER_MODE, t] + }, + l = e.SHEBANG({ + binary: "(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)", + relevance: 10 + }), + c = { + className: "function", + begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/, + returnBegin: !0, + contains: [e.inherit(e.TITLE_MODE, { + begin: /\w[\w\d_]*/ + })], + relevance: 0 + }; + return { + name: "Bash", + aliases: ["sh"], + keywords: { + $pattern: /\b[a-z][a-z0-9._-]+\b/, + keyword: ["if", "then", "else", "elif", "fi", "for", "while", "in", "do", "done", "case", "esac", + "function" + ], + literal: ["true", "false"], + built_in: ["break", "cd", "continue", "eval", "exec", "exit", "export", "getopts", "hash", "pwd", + "readonly", "return", "shift", "test", "times", "trap", "umask", "unset", "alias", "bind", "builtin", + "caller", "command", "declare", "echo", "enable", "help", "let", "local", "logout", "mapfile", + "printf", "read", "readarray", "source", "type", "typeset", "ulimit", "unalias", "set", "shopt", + "autoload", "bg", "bindkey", "bye", "cap", "chdir", "clone", "comparguments", "compcall", "compctl", + "compdescribe", "compfiles", "compgroups", "compquote", "comptags", "comptry", "compvalues", "dirs", + "disable", "disown", "echotc", "echoti", "emulate", "fc", "fg", "float", "functions", "getcap", + "getln", "history", "integer", "jobs", "kill", "limit", "log", "noglob", "popd", "print", "pushd", + "pushln", "rehash", "sched", "setcap", "setopt", "stat", "suspend", "ttyctl", "unfunction", "unhash", + "unlimit", "unsetopt", "vared", "wait", "whence", "where", "which", "zcompile", "zformat", "zftp", + "zle", "zmodload", "zparseopts", "zprof", "zpty", "zregexparse", "zsocket", "zstyle", "ztcp", "chcon", + "chgrp", "chown", "chmod", "cp", "dd", "df", "dir", "dircolors", "ln", "ls", "mkdir", "mkfifo", + "mknod", "mktemp", "mv", "realpath", "rm", "rmdir", "shred", "sync", "touch", "truncate", "vdir", + "b2sum", "base32", "base64", "cat", "cksum", "comm", "csplit", "cut", "expand", "fmt", "fold", "head", + "join", "md5sum", "nl", "numfmt", "od", "paste", "ptx", "pr", "sha1sum", "sha224sum", "sha256sum", + "sha384sum", "sha512sum", "shuf", "sort", "split", "sum", "tac", "tail", "tr", "tsort", "unexpand", + "uniq", "wc", "arch", "basename", "chroot", "date", "dirname", "du", "echo", "env", "expr", "factor", + "groups", "hostid", "id", "link", "logname", "nice", "nohup", "nproc", "pathchk", "pinky", "printenv", + "printf", "pwd", "readlink", "runcon", "seq", "sleep", "stat", "stdbuf", "stty", "tee", "test", + "timeout", "tty", "uname", "unlink", "uptime", "users", "who", "whoami", "yes" + ] + }, + contains: [l, e.SHEBANG(), c, o, e.HASH_COMMENT_MODE, r, { + match: /(\/[a-z._-]+)+/ + }, s, { + className: "", + begin: /\\"/ + }, { + className: "string", + begin: /'/, + end: /'/ + }, t] + } + }, + grmr_c: e => { + const n = e.regex, + t = e.COMMENT("//", "$", { + contains: [{ + begin: /\\\n/ + }] + }), + a = "[a-zA-Z_]\\w*::", + i = "(decltype\\(auto\\)|" + n.optional(a) + "[a-zA-Z_]\\w*" + n.optional("<[^<>]+>") + ")", + r = { + className: "type", + variants: [{ + begin: "\\b[a-z\\d_]*_t\\b" + }, { + match: /\batomic_[a-z]{3,6}\b/ + }] + }, + s = { + className: "string", + variants: [{ + begin: '(u8?|U|L)?"', + end: '"', + illegal: "\\n", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: "(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", + end: "'", + illegal: "." + }, e.END_SAME_AS_BEGIN({ + begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, + end: /\)([^()\\ ]{0,16})"/ + })] + }, + o = { + className: "number", + variants: [{ + begin: "\\b(0b[01']+)" + }, { + begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" + }, { + begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], + relevance: 0 + }, + l = { + className: "meta", + begin: /#\s*[a-z]+\b/, + end: /$/, + keywords: { + keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" + }, + contains: [{ + begin: /\\\n/, + relevance: 0 + }, e.inherit(s, { + className: "string" + }), { + className: "string", + begin: /<.*?>/ + }, t, e.C_BLOCK_COMMENT_MODE] + }, + c = { + className: "title", + begin: n.optional(a) + e.IDENT_RE, + relevance: 0 + }, + d = n.optional(a) + e.IDENT_RE + "\\s*\\(", + g = { + keyword: ["asm", "auto", "break", "case", "continue", "default", "do", "else", "enum", "extern", "for", + "fortran", "goto", "if", "inline", "register", "restrict", "return", "sizeof", "struct", "switch", + "typedef", "union", "volatile", "while", "_Alignas", "_Alignof", "_Atomic", "_Generic", "_Noreturn", + "_Static_assert", "_Thread_local", "alignas", "alignof", "noreturn", "static_assert", "thread_local", + "_Pragma" + ], + type: ["float", "double", "signed", "unsigned", "int", "short", "long", "char", "void", "_Bool", + "_Complex", "_Imaginary", "_Decimal32", "_Decimal64", "_Decimal128", "const", "static", "complex", + "bool", "imaginary" + ], + literal: "true false NULL", + built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" + }, + u = [l, r, t, e.C_BLOCK_COMMENT_MODE, o, s], + b = { + variants: [{ + begin: /=/, + end: /;/ + }, { + begin: /\(/, + end: /\)/ + }, { + beginKeywords: "new throw return else", + end: /;/ + }], + keywords: g, + contains: u.concat([{ + begin: /\(/, + end: /\)/, + keywords: g, + contains: u.concat(["self"]), + relevance: 0 + }]), + relevance: 0 + }, + m = { + begin: "(" + i + "[\\*&\\s]+)+" + d, + returnBegin: !0, + end: /[{;=]/, + excludeEnd: !0, + keywords: g, + illegal: /[^\w\s\*&:<>.]/, + contains: [{ + begin: "decltype\\(auto\\)", + keywords: g, + relevance: 0 + }, { + begin: d, + returnBegin: !0, + contains: [e.inherit(c, { + className: "title.function" + })], + relevance: 0 + }, { + relevance: 0, + match: /,/ + }, { + className: "params", + begin: /\(/, + end: /\)/, + keywords: g, + relevance: 0, + contains: [t, e.C_BLOCK_COMMENT_MODE, s, o, r, { + begin: /\(/, + end: /\)/, + keywords: g, + relevance: 0, + contains: ["self", t, e.C_BLOCK_COMMENT_MODE, s, o, r] + }] + }, r, t, e.C_BLOCK_COMMENT_MODE, l] + }; + return { + name: "C", + aliases: ["h"], + keywords: g, + disableAutodetect: !0, + illegal: "=]/, + contains: [{ + beginKeywords: "final class struct" + }, e.TITLE_MODE] + }]), + exports: { + preprocessor: l, + strings: s, + keywords: g + } + } + }, + grmr_cpp: e => { + const n = e.regex, + t = e.COMMENT("//", "$", { + contains: [{ + begin: /\\\n/ + }] + }), + a = "[a-zA-Z_]\\w*::", + i = "(?!struct)(decltype\\(auto\\)|" + n.optional(a) + "[a-zA-Z_]\\w*" + n.optional("<[^<>]+>") + ")", + r = { + className: "type", + begin: "\\b[a-z\\d_]*_t\\b" + }, + s = { + className: "string", + variants: [{ + begin: '(u8?|U|L)?"', + end: '"', + illegal: "\\n", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: "(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", + end: "'", + illegal: "." + }, e.END_SAME_AS_BEGIN({ + begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, + end: /\)([^()\\ ]{0,16})"/ + })] + }, + o = { + className: "number", + variants: [{ + begin: "\\b(0b[01']+)" + }, { + begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" + }, { + begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], + relevance: 0 + }, + l = { + className: "meta", + begin: /#\s*[a-z]+\b/, + end: /$/, + keywords: { + keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" + }, + contains: [{ + begin: /\\\n/, + relevance: 0 + }, e.inherit(s, { + className: "string" + }), { + className: "string", + begin: /<.*?>/ + }, t, e.C_BLOCK_COMMENT_MODE] + }, + c = { + className: "title", + begin: n.optional(a) + e.IDENT_RE, + relevance: 0 + }, + d = n.optional(a) + e.IDENT_RE + "\\s*\\(", + g = { + type: ["bool", "char", "char16_t", "char32_t", "char8_t", "double", "float", "int", "long", "short", + "void", "wchar_t", "unsigned", "signed", "const", "static" + ], + keyword: ["alignas", "alignof", "and", "and_eq", "asm", "atomic_cancel", "atomic_commit", + "atomic_noexcept", "auto", "bitand", "bitor", "break", "case", "catch", "class", "co_await", + "co_return", "co_yield", "compl", "concept", "const_cast|10", "consteval", "constexpr", "constinit", + "continue", "decltype", "default", "delete", "do", "dynamic_cast|10", "else", "enum", "explicit", + "export", "extern", "false", "final", "for", "friend", "goto", "if", "import", "inline", "module", + "mutable", "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", + "override", "private", "protected", "public", "reflexpr", "register", "reinterpret_cast|10", + "requires", "return", "sizeof", "static_assert", "static_cast|10", "struct", "switch", "synchronized", + "template", "this", "thread_local", "throw", "transaction_safe", "transaction_safe_dynamic", "true", + "try", "typedef", "typeid", "typename", "union", "using", "virtual", "volatile", "while", "xor", + "xor_eq" + ], + literal: ["NULL", "false", "nullopt", "nullptr", "true"], + built_in: ["_Pragma"], + _type_hints: ["any", "auto_ptr", "barrier", "binary_semaphore", "bitset", "complex", "condition_variable", + "condition_variable_any", "counting_semaphore", "deque", "false_type", "future", "imaginary", + "initializer_list", "istringstream", "jthread", "latch", "lock_guard", "multimap", "multiset", + "mutex", "optional", "ostringstream", "packaged_task", "pair", "promise", "priority_queue", "queue", + "recursive_mutex", "recursive_timed_mutex", "scoped_lock", "set", "shared_future", "shared_lock", + "shared_mutex", "shared_timed_mutex", "shared_ptr", "stack", "string_view", "stringstream", + "timed_mutex", "thread", "true_type", "tuple", "unique_lock", "unique_ptr", "unordered_map", + "unordered_multimap", "unordered_multiset", "unordered_set", "variant", "vector", "weak_ptr", + "wstring", "wstring_view" + ] + }, + u = { + className: "function.dispatch", + relevance: 0, + keywords: { + _hint: ["abort", "abs", "acos", "apply", "as_const", "asin", "atan", "atan2", "calloc", "ceil", "cerr", + "cin", "clog", "cos", "cosh", "cout", "declval", "endl", "exchange", "exit", "exp", "fabs", "floor", + "fmod", "forward", "fprintf", "fputs", "free", "frexp", "fscanf", "future", "invoke", "isalnum", + "isalpha", "iscntrl", "isdigit", "isgraph", "islower", "isprint", "ispunct", "isspace", "isupper", + "isxdigit", "labs", "launder", "ldexp", "log", "log10", "make_pair", "make_shared", + "make_shared_for_overwrite", "make_tuple", "make_unique", "malloc", "memchr", "memcmp", "memcpy", + "memset", "modf", "move", "pow", "printf", "putchar", "puts", "realloc", "scanf", "sin", "sinh", + "snprintf", "sprintf", "sqrt", "sscanf", "std", "stderr", "stdin", "stdout", "strcat", "strchr", + "strcmp", "strcpy", "strcspn", "strlen", "strncat", "strncmp", "strncpy", "strpbrk", "strrchr", + "strspn", "strstr", "swap", "tan", "tanh", "terminate", "to_underlying", "tolower", "toupper", + "vfprintf", "visit", "vprintf", "vsprintf" + ] + }, + begin: n.concat(/\b/, /(?!decltype)/, /(?!if)/, /(?!for)/, /(?!switch)/, /(?!while)/, e.IDENT_RE, n + .lookahead(/(<[^<>]+>|)\s*\(/)) + }, + b = [u, l, r, t, e.C_BLOCK_COMMENT_MODE, o, s], + m = { + variants: [{ + begin: /=/, + end: /;/ + }, { + begin: /\(/, + end: /\)/ + }, { + beginKeywords: "new throw return else", + end: /;/ + }], + keywords: g, + contains: b.concat([{ + begin: /\(/, + end: /\)/, + keywords: g, + contains: b.concat(["self"]), + relevance: 0 + }]), + relevance: 0 + }, + p = { + className: "function", + begin: "(" + i + "[\\*&\\s]+)+" + d, + returnBegin: !0, + end: /[{;=]/, + excludeEnd: !0, + keywords: g, + illegal: /[^\w\s\*&:<>.]/, + contains: [{ + begin: "decltype\\(auto\\)", + keywords: g, + relevance: 0 + }, { + begin: d, + returnBegin: !0, + contains: [c], + relevance: 0 + }, { + begin: /::/, + relevance: 0 + }, { + begin: /:/, + endsWithParent: !0, + contains: [s, o] + }, { + relevance: 0, + match: /,/ + }, { + className: "params", + begin: /\(/, + end: /\)/, + keywords: g, + relevance: 0, + contains: [t, e.C_BLOCK_COMMENT_MODE, s, o, r, { + begin: /\(/, + end: /\)/, + keywords: g, + relevance: 0, + contains: ["self", t, e.C_BLOCK_COMMENT_MODE, s, o, r] + }] + }, r, t, e.C_BLOCK_COMMENT_MODE, l] + }; + return { + name: "C++", + aliases: ["cc", "c++", "h++", "hpp", "hh", "hxx", "cxx"], + keywords: g, + illegal: "", + keywords: g, + contains: ["self", r] + }, { + begin: e.IDENT_RE + "::", + keywords: g + }, { + match: [/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/, /\s+/, /\w+/], + className: { + 1: "keyword", + 3: "title.class" + } + }]) + } + }, + grmr_csharp: e => { + const n = { + keyword: ["abstract", "as", "base", "break", "case", "catch", "class", "const", "continue", "do", "else", + "event", "explicit", "extern", "finally", "fixed", "for", "foreach", "goto", "if", "implicit", "in", + "interface", "internal", "is", "lock", "namespace", "new", "operator", "out", "override", "params", + "private", "protected", "public", "readonly", "record", "ref", "return", "scoped", "sealed", "sizeof", + "stackalloc", "static", "struct", "switch", "this", "throw", "try", "typeof", "unchecked", "unsafe", + "using", "virtual", "void", "volatile", "while" + ].concat(["add", "alias", "and", "ascending", "async", "await", "by", "descending", "equals", "from", + "get", "global", "group", "init", "into", "join", "let", "nameof", "not", "notnull", "on", "or", + "orderby", "partial", "remove", "select", "set", "unmanaged", "value|0", "var", "when", "where", + "with", "yield" + ]), + built_in: ["bool", "byte", "char", "decimal", "delegate", "double", "dynamic", "enum", "float", "int", + "long", "nint", "nuint", "object", "sbyte", "short", "string", "ulong", "uint", "ushort" + ], + literal: ["default", "false", "null", "true"] + }, + t = e.inherit(e.TITLE_MODE, { + begin: "[a-zA-Z](\\.?\\w)*" + }), + a = { + className: "number", + variants: [{ + begin: "\\b(0b[01']+)" + }, { + begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)" + }, { + begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], + relevance: 0 + }, + i = { + className: "string", + begin: '@"', + end: '"', + contains: [{ + begin: '""' + }] + }, + r = e.inherit(i, { + illegal: /\n/ + }), + s = { + className: "subst", + begin: /\{/, + end: /\}/, + keywords: n + }, + o = e.inherit(s, { + illegal: /\n/ + }), + l = { + className: "string", + begin: /\$"/, + end: '"', + illegal: /\n/, + contains: [{ + begin: /\{\{/ + }, { + begin: /\}\}/ + }, e.BACKSLASH_ESCAPE, o] + }, + c = { + className: "string", + begin: /\$@"/, + end: '"', + contains: [{ + begin: /\{\{/ + }, { + begin: /\}\}/ + }, { + begin: '""' + }, s] + }, + d = e.inherit(c, { + illegal: /\n/, + contains: [{ + begin: /\{\{/ + }, { + begin: /\}\}/ + }, { + begin: '""' + }, o] + }); + s.contains = [c, l, i, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, a, e.C_BLOCK_COMMENT_MODE], + o.contains = [d, l, r, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, a, e.inherit(e.C_BLOCK_COMMENT_MODE, { + illegal: /\n/ + })]; + const g = { + variants: [c, l, i, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + }, + u = { + begin: "<", + end: ">", + contains: [{ + beginKeywords: "in out" + }, t] + }, + b = e.IDENT_RE + "(<" + e.IDENT_RE + "(\\s*,\\s*" + e.IDENT_RE + ")*>)?(\\[\\])?", + m = { + begin: "@" + e.IDENT_RE, + relevance: 0 + }; + return { + name: "C#", + aliases: ["cs", "c#"], + keywords: n, + illegal: /::/, + contains: [e.COMMENT("///", "$", { + returnBegin: !0, + contains: [{ + className: "doctag", + variants: [{ + begin: "///", + relevance: 0 + }, { + begin: "\x3c!--|--\x3e" + }, { + begin: "" + }] + }] + }), e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, { + className: "meta", + begin: "#", + end: "$", + keywords: { + keyword: "if else elif endif define undef warning error line region endregion pragma checksum" + } + }, g, a, { + beginKeywords: "class interface", + relevance: 0, + end: /[{;=]/, + illegal: /[^\s:,]/, + contains: [{ + beginKeywords: "where class" + }, t, u, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + beginKeywords: "namespace", + relevance: 0, + end: /[{;=]/, + illegal: /[^\s:]/, + contains: [t, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + beginKeywords: "record", + relevance: 0, + end: /[{;=]/, + illegal: /[^\s:]/, + contains: [t, u, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + className: "meta", + begin: "^\\s*\\[(?=[\\w])", + excludeBegin: !0, + end: "\\]", + excludeEnd: !0, + contains: [{ + className: "string", + begin: /"/, + end: /"/ + }] + }, { + beginKeywords: "new return throw await else", + relevance: 0 + }, { + className: "function", + begin: "(" + b + "\\s+)+" + e.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(", + returnBegin: !0, + end: /\s*[{;=]/, + excludeEnd: !0, + keywords: n, + contains: [{ + beginKeywords: "public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", + relevance: 0 + }, { + begin: e.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(", + returnBegin: !0, + contains: [e.TITLE_MODE, u], + relevance: 0 + }, { + match: /\(\)/ + }, { + className: "params", + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: n, + relevance: 0, + contains: [g, a, e.C_BLOCK_COMMENT_MODE] + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, m] + } + }, + grmr_css: e => { + const n = e.regex, + t = J(e), + a = [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE]; + return { + name: "CSS", + case_insensitive: !0, + illegal: /[=|'\$]/, + keywords: { + keyframePosition: "from to" + }, + classNameAliases: { + keyframePosition: "selector-tag" + }, + contains: [t.BLOCK_COMMENT, { + begin: /-(webkit|moz|ms|o)-(?=[a-z])/ + }, t.CSS_NUMBER_MODE, { + className: "selector-id", + begin: /#[A-Za-z0-9_-]+/, + relevance: 0 + }, { + className: "selector-class", + begin: "\\.[a-zA-Z-][a-zA-Z0-9_-]*", + relevance: 0 + }, t.ATTRIBUTE_SELECTOR_MODE, { + className: "selector-pseudo", + variants: [{ + begin: ":(" + ne.join("|") + ")" + }, { + begin: ":(:)?(" + te.join("|") + ")" + }] + }, t.CSS_VARIABLE, { + className: "attribute", + begin: "\\b(" + ae.join("|") + ")\\b" + }, { + begin: /:/, + end: /[;}{]/, + contains: [t.BLOCK_COMMENT, t.HEXCOLOR, t.IMPORTANT, t.CSS_NUMBER_MODE, ...a, { + begin: /(url|data-uri)\(/, + end: /\)/, + relevance: 0, + keywords: { + built_in: "url data-uri" + }, + contains: [...a, { + className: "string", + begin: /[^)]/, + endsWithParent: !0, + excludeEnd: !0 + }] + }, t.FUNCTION_DISPATCH] + }, { + begin: n.lookahead(/@/), + end: "[{;]", + relevance: 0, + illegal: /:/, + contains: [{ + className: "keyword", + begin: /@-?\w[\w]*(-\w+)*/ + }, { + begin: /\s/, + endsWithParent: !0, + excludeEnd: !0, + relevance: 0, + keywords: { + $pattern: /[a-z-]+/, + keyword: "and or not only", + attribute: ee.join(" ") + }, + contains: [{ + begin: /[a-z-]+(?=:)/, + className: "attribute" + }, ...a, t.CSS_NUMBER_MODE] + }] + }, { + className: "selector-tag", + begin: "\\b(" + Y.join("|") + ")\\b" + }] + } + }, + grmr_diff: e => { + const n = e.regex; + return { + name: "Diff", + aliases: ["patch"], + contains: [{ + className: "meta", + relevance: 10, + match: n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/, /^\*\*\* +\d+,\d+ +\*\*\*\*$/, /^--- +\d+,\d+ +----$/) + }, { + className: "comment", + variants: [{ + begin: n.either(/Index: /, /^index/, /={3,}/, /^-{3}/, /^\*{3} /, /^\+{3}/, /^diff --git/), + end: /$/ + }, { + match: /^\*{15}$/ + }] + }, { + className: "addition", + begin: /^\+/, + end: /$/ + }, { + className: "deletion", + begin: /^-/, + end: /$/ + }, { + className: "addition", + begin: /^!/, + end: /$/ + }] + } + }, + grmr_go: e => { + const n = { + keyword: ["break", "case", "chan", "const", "continue", "default", "defer", "else", "fallthrough", "for", + "func", "go", "goto", "if", "import", "interface", "map", "package", "range", "return", "select", + "struct", "switch", "type", "var" + ], + type: ["bool", "byte", "complex64", "complex128", "error", "float32", "float64", "int8", "int16", "int32", + "int64", "string", "uint8", "uint16", "uint32", "uint64", "int", "uint", "uintptr", "rune" + ], + literal: ["true", "false", "iota", "nil"], + built_in: ["append", "cap", "close", "complex", "copy", "imag", "len", "make", "new", "panic", "print", + "println", "real", "recover", "delete" + ] + }; + return { + name: "Go", + aliases: ["golang"], + keywords: n, + illegal: " { + const n = e.regex; + return { + name: "GraphQL", + aliases: ["gql"], + case_insensitive: !0, + disableAutodetect: !1, + keywords: { + keyword: ["query", "mutation", "subscription", "type", "input", "schema", "directive", "interface", + "union", "scalar", "fragment", "enum", "on" + ], + literal: ["true", "false", "null"] + }, + contains: [e.HASH_COMMENT_MODE, e.QUOTE_STRING_MODE, e.NUMBER_MODE, { + scope: "punctuation", + match: /[.]{3}/, + relevance: 0 + }, { + scope: "punctuation", + begin: /[\!\(\)\:\=\[\]\{\|\}]{1}/, + relevance: 0 + }, { + scope: "variable", + begin: /\$/, + end: /\W/, + excludeEnd: !0, + relevance: 0 + }, { + scope: "meta", + match: /@\w+/, + excludeEnd: !0 + }, { + scope: "symbol", + begin: n.concat(/[_A-Za-z][_0-9A-Za-z]*/, n.lookahead(/\s*:/)), + relevance: 0 + }], + illegal: [/[;<']/, /BEGIN/] + } + }, + grmr_ini: e => { + const n = e.regex, + t = { + className: "number", + relevance: 0, + variants: [{ + begin: /([+-]+)?[\d]+_[\d_]+/ + }, { + begin: e.NUMBER_RE + }] + }, + a = e.COMMENT(); + a.variants = [{ + begin: /;/, + end: /$/ + }, { + begin: /#/, + end: /$/ + }]; + const i = { + className: "variable", + variants: [{ + begin: /\$[\w\d"][\w\d_]*/ + }, { + begin: /\$\{(.*?)\}/ + }] + }, + r = { + className: "literal", + begin: /\bon|off|true|false|yes|no\b/ + }, + s = { + className: "string", + contains: [e.BACKSLASH_ESCAPE], + variants: [{ + begin: "'''", + end: "'''", + relevance: 10 + }, { + begin: '"""', + end: '"""', + relevance: 10 + }, { + begin: '"', + end: '"' + }, { + begin: "'", + end: "'" + }] + }, + o = { + begin: /\[/, + end: /\]/, + contains: [a, r, i, s, t, "self"], + relevance: 0 + }, + l = n.either(/[A-Za-z0-9_-]+/, /"(\\"|[^"])*"/, /'[^']*'/); + return { + name: "TOML, also INI", + aliases: ["toml"], + case_insensitive: !0, + illegal: /\S/, + contains: [a, { + className: "section", + begin: /\[+/, + end: /\]+/ + }, { + begin: n.concat(l, "(\\s*\\.\\s*", l, ")*", n.lookahead(/\s*=\s*[^#\s]/)), + className: "attr", + starts: { + end: /$/, + contains: [a, o, r, i, s, t] + } + }] + } + }, + grmr_java: e => { + const n = e.regex, + t = "[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", + a = t + le("(?:<" + t + "~~~(?:\\s*,\\s*" + t + "~~~)*>)?", /~~~/g, 2), + i = { + keyword: ["synchronized", "abstract", "private", "var", "static", "if", "const ", "for", "while", + "strictfp", "finally", "protected", "import", "native", "final", "void", "enum", "else", "break", + "transient", "catch", "instanceof", "volatile", "case", "assert", "package", "default", "public", + "try", "switch", "continue", "throws", "protected", "public", "private", "module", "requires", + "exports", "do", "sealed", "yield", "permits" + ], + literal: ["false", "true", "null"], + type: ["char", "boolean", "long", "float", "int", "byte", "short", "double"], + built_in: ["super", "this"] + }, + r = { + className: "meta", + begin: "@" + t, + contains: [{ + begin: /\(/, + end: /\)/, + contains: ["self"] + }] + }, + s = { + className: "params", + begin: /\(/, + end: /\)/, + keywords: i, + relevance: 0, + contains: [e.C_BLOCK_COMMENT_MODE], + endsParent: !0 + }; + return { + name: "Java", + aliases: ["jsp"], + keywords: i, + illegal: /<\/|#/, + contains: [e.COMMENT("/\\*\\*", "\\*/", { + relevance: 0, + contains: [{ + begin: /\w+@/, + relevance: 0 + }, { + className: "doctag", + begin: "@[A-Za-z]+" + }] + }), { + begin: /import java\.[a-z]+\./, + keywords: "import", + relevance: 2 + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, { + begin: /"""/, + end: /"""/, + className: "string", + contains: [e.BACKSLASH_ESCAPE] + }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, { + match: [/\b(?:class|interface|enum|extends|implements|new)/, /\s+/, t], + className: { + 1: "keyword", + 3: "title.class" + } + }, { + match: /non-sealed/, + scope: "keyword" + }, { + begin: [n.concat(/(?!else)/, t), /\s+/, t, /\s+/, /=(?!=)/], + className: { + 1: "type", + 3: "variable", + 5: "operator" + } + }, { + begin: [/record/, /\s+/, t], + className: { + 1: "keyword", + 3: "title.class" + }, + contains: [s, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + beginKeywords: "new throw return else", + relevance: 0 + }, { + begin: ["(?:" + a + "\\s+)", e.UNDERSCORE_IDENT_RE, /\s*(?=\()/], + className: { + 2: "title.function" + }, + keywords: i, + contains: [{ + className: "params", + begin: /\(/, + end: /\)/, + keywords: i, + relevance: 0, + contains: [r, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, oe, e.C_BLOCK_COMMENT_MODE] + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, oe, r] + } + }, + grmr_javascript: he, + grmr_json: e => { + const n = ["true", "false", "null"], + t = { + scope: "literal", + beginKeywords: n.join(" ") + }; + return { + name: "JSON", + keywords: { + literal: n + }, + contains: [{ + className: "attr", + begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/, + relevance: 1.01 + }, { + match: /[{}[\],:]/, + className: "punctuation", + relevance: 0 + }, e.QUOTE_STRING_MODE, t, e.C_NUMBER_MODE, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE], + illegal: "\\S" + } + }, + grmr_kotlin: e => { + const n = { + keyword: "abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", + built_in: "Byte Short Char Int Long Boolean Float Double Void Unit Nothing", + literal: "true false null" + }, + t = { + className: "symbol", + begin: e.UNDERSCORE_IDENT_RE + "@" + }, + a = { + className: "subst", + begin: /\$\{/, + end: /\}/, + contains: [e.C_NUMBER_MODE] + }, + i = { + className: "variable", + begin: "\\$" + e.UNDERSCORE_IDENT_RE + }, + r = { + className: "string", + variants: [{ + begin: '"""', + end: '"""(?=[^"])', + contains: [i, a] + }, { + begin: "'", + end: "'", + illegal: /\n/, + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: '"', + end: '"', + illegal: /\n/, + contains: [e.BACKSLASH_ESCAPE, i, a] + }] + }; + a.contains.push(r); + const s = { + className: "meta", + begin: "@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*" + e + .UNDERSCORE_IDENT_RE + ")?" + }, + o = { + className: "meta", + begin: "@" + e.UNDERSCORE_IDENT_RE, + contains: [{ + begin: /\(/, + end: /\)/, + contains: [e.inherit(r, { + className: "string" + }), "self"] + }] + }, + l = oe, + c = e.COMMENT("/\\*", "\\*/", { + contains: [e.C_BLOCK_COMMENT_MODE] + }), + d = { + variants: [{ + className: "type", + begin: e.UNDERSCORE_IDENT_RE + }, { + begin: /\(/, + end: /\)/, + contains: [] + }] + }, + g = d; + return g.variants[1].contains = [d], d.variants[1].contains = [g], { + name: "Kotlin", + aliases: ["kt", "kts"], + keywords: n, + contains: [e.COMMENT("/\\*\\*", "\\*/", { + relevance: 0, + contains: [{ + className: "doctag", + begin: "@[A-Za-z]+" + }] + }), e.C_LINE_COMMENT_MODE, c, { + className: "keyword", + begin: /\b(break|continue|return|this)\b/, + starts: { + contains: [{ + className: "symbol", + begin: /@\w+/ + }] + } + }, t, s, o, { + className: "function", + beginKeywords: "fun", + end: "[(]|$", + returnBegin: !0, + excludeEnd: !0, + keywords: n, + relevance: 5, + contains: [{ + begin: e.UNDERSCORE_IDENT_RE + "\\s*\\(", + returnBegin: !0, + relevance: 0, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + className: "type", + begin: //, + keywords: "reified", + relevance: 0 + }, { + className: "params", + begin: /\(/, + end: /\)/, + endsParent: !0, + keywords: n, + relevance: 0, + contains: [{ + begin: /:/, + end: /[=,\/]/, + endsWithParent: !0, + contains: [d, e.C_LINE_COMMENT_MODE, c], + relevance: 0 + }, e.C_LINE_COMMENT_MODE, c, s, o, r, e.C_NUMBER_MODE] + }, c] + }, { + begin: [/class|interface|trait/, /\s+/, e.UNDERSCORE_IDENT_RE], + beginScope: { + 3: "title.class" + }, + keywords: "class interface trait", + end: /[:\{(]|$/, + excludeEnd: !0, + illegal: "extends implements", + contains: [{ + beginKeywords: "public protected internal private constructor" + }, e.UNDERSCORE_TITLE_MODE, { + className: "type", + begin: //, + excludeBegin: !0, + excludeEnd: !0, + relevance: 0 + }, { + className: "type", + begin: /[,:]\s*/, + end: /[<\(,){\s]|$/, + excludeBegin: !0, + returnEnd: !0 + }, s, o] + }, r, { + className: "meta", + begin: "^#!/usr/bin/env", + end: "$", + illegal: "\n" + }, l] + } + }, + grmr_less: e => { + const n = J(e), + t = ie, + a = "([\\w-]+|@\\{[\\w-]+\\})", + i = [], + r = [], + s = e => ({ + className: "string", + begin: "~?" + e + ".*?" + e + }), + o = (e, n, t) => ({ + className: e, + begin: n, + relevance: t + }), + l = { + $pattern: /[a-z-]+/, + keyword: "and or not only", + attribute: ee.join(" ") + }, + c = { + begin: "\\(", + end: "\\)", + contains: r, + keywords: l, + relevance: 0 + }; + r.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, s("'"), s('"'), n.CSS_NUMBER_MODE, { + begin: "(url|data-uri)\\(", + starts: { + className: "string", + end: "[\\)\\n]", + excludeEnd: !0 + } + }, n.HEXCOLOR, c, o("variable", "@@?[\\w-]+", 10), o("variable", "@\\{[\\w-]+\\}"), o("built_in", + "~?`[^`]*?`"), { + className: "attribute", + begin: "[\\w-]+\\s*:", + end: ":", + returnBegin: !0, + excludeEnd: !0 + }, n.IMPORTANT, { + beginKeywords: "and not" + }, n.FUNCTION_DISPATCH); + const d = r.concat({ + begin: /\{/, + end: /\}/, + contains: i + }), + g = { + beginKeywords: "when", + endsWithParent: !0, + contains: [{ + beginKeywords: "and not" + }].concat(r) + }, + u = { + begin: a + "\\s*:", + returnBegin: !0, + end: /[;}]/, + relevance: 0, + contains: [{ + begin: /-(webkit|moz|ms|o)-/ + }, n.CSS_VARIABLE, { + className: "attribute", + begin: "\\b(" + ae.join("|") + ")\\b", + end: /(?=:)/, + starts: { + endsWithParent: !0, + illegal: "[<=$]", + relevance: 0, + contains: r + } + }] + }, + b = { + className: "keyword", + begin: "@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", + starts: { + end: "[;{}]", + keywords: l, + returnEnd: !0, + contains: r, + relevance: 0 + } + }, + m = { + className: "variable", + variants: [{ + begin: "@[\\w-]+\\s*:", + relevance: 15 + }, { + begin: "@[\\w-]+" + }], + starts: { + end: "[;}]", + returnEnd: !0, + contains: d + } + }, + p = { + variants: [{ + begin: "[\\.#:&\\[>]", + end: "[;{}]" + }, { + begin: a, + end: /\{/ + }], + returnBegin: !0, + returnEnd: !0, + illegal: "[<='$\"]", + relevance: 0, + contains: [e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, g, o("keyword", "all\\b"), o("variable", + "@\\{[\\w-]+\\}"), { + begin: "\\b(" + Y.join("|") + ")\\b", + className: "selector-tag" + }, n.CSS_NUMBER_MODE, o("selector-tag", a, 0), o("selector-id", "#" + a), o("selector-class", "\\." + + a, 0), o("selector-tag", "&", 0), n.ATTRIBUTE_SELECTOR_MODE, { + className: "selector-pseudo", + begin: ":(" + ne.join("|") + ")" + }, { + className: "selector-pseudo", + begin: ":(:)?(" + te.join("|") + ")" + }, { + begin: /\(/, + end: /\)/, + relevance: 0, + contains: d + }, { + begin: "!important" + }, n.FUNCTION_DISPATCH] + }, + _ = { + begin: `[\\w-]+:(:)?(${t.join("|")})`, + returnBegin: !0, + contains: [p] + }; + return i.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, b, m, _, u, p, g, n.FUNCTION_DISPATCH), { + name: "Less", + case_insensitive: !0, + illegal: "[=>'/<($\"]", + contains: i + } + }, + grmr_lua: e => { + const n = "\\[=*\\[", + t = "\\]=*\\]", + a = { + begin: n, + end: t, + contains: ["self"] + }, + i = [e.COMMENT("--(?!\\[=*\\[)", "$"), e.COMMENT("--\\[=*\\[", t, { + contains: [a], + relevance: 10 + })]; + return { + name: "Lua", + keywords: { + $pattern: e.UNDERSCORE_IDENT_RE, + literal: "true false nil", + keyword: "and break do else elseif end for goto if in local not or repeat return then until while", + built_in: "_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" + }, + contains: i.concat([{ + className: "function", + beginKeywords: "function", + end: "\\)", + contains: [e.inherit(e.TITLE_MODE, { + begin: "([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*" + }), { + className: "params", + begin: "\\(", + endsWithParent: !0, + contains: i + }].concat(i) + }, e.C_NUMBER_MODE, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, { + className: "string", + begin: n, + end: t, + contains: [a], + relevance: 5 + }]) + } + }, + grmr_makefile: e => { + const n = { + className: "variable", + variants: [{ + begin: "\\$\\(" + e.UNDERSCORE_IDENT_RE + "\\)", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: /\$[@% { + const n = e.regex, + t = n.concat( + /(?:[A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/, + n.optional( + /(?:[\x2D\.0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*:/ + ), + /(?:[\x2D\.0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*/ + ), + a = { + className: "symbol", + begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/ + }, + i = { + begin: /\s/, + contains: [{ + className: "keyword", + begin: /#?[a-z_][a-z1-9_-]+/, + illegal: /\n/ + }] + }, + r = e.inherit(i, { + begin: /\(/, + end: /\)/ + }), + s = e.inherit(e.APOS_STRING_MODE, { + className: "string" + }), + o = e.inherit(e.QUOTE_STRING_MODE, { + className: "string" + }), + l = { + endsWithParent: !0, + illegal: /`]+/ + }] + }] + }] + }; + return { + name: "HTML, XML", + aliases: ["html", "xhtml", "rss", "atom", "xjb", "xsd", "xsl", "plist", "wsf", "svg"], + case_insensitive: !0, + unicodeRegex: !0, + contains: [{ + className: "meta", + begin: //, + relevance: 10, + contains: [i, o, s, r, { + begin: /\[/, + end: /\]/, + contains: [{ + className: "meta", + begin: //, + contains: [i, r, o, s] + }] + }] + }, e.COMMENT(//, { + relevance: 10 + }), { + begin: //, + relevance: 10 + }, a, { + className: "meta", + end: /\?>/, + variants: [{ + begin: /<\?xml/, + relevance: 10, + contains: [o] + }, { + begin: /<\?[a-z][a-z0-9]+/ + }] + }, { + className: "tag", + begin: /)/, + end: />/, + keywords: { + name: "style" + }, + contains: [l], + starts: { + end: /<\/style>/, + returnEnd: !0, + subLanguage: ["css", "xml"] + } + }, { + className: "tag", + begin: /)/, + end: />/, + keywords: { + name: "script" + }, + contains: [l], + starts: { + end: /<\/script>/, + returnEnd: !0, + subLanguage: ["javascript", "handlebars", "xml"] + } + }, { + className: "tag", + begin: /<>|<\/>/ + }, { + className: "tag", + begin: n.concat(//, />/, /\s/)))), + end: /\/?>/, + contains: [{ + className: "name", + begin: t, + relevance: 0, + starts: l + }] + }, { + className: "tag", + begin: n.concat(/<\//, n.lookahead(n.concat(t, />/))), + contains: [{ + className: "name", + begin: t, + relevance: 0 + }, { + begin: />/, + relevance: 0, + endsParent: !0 + }] + }] + } + }, + grmr_markdown: e => { + const n = { + begin: /<\/?[A-Za-z_]/, + end: ">", + subLanguage: "xml", + relevance: 0 + }, + t = { + variants: [{ + begin: /\[.+?\]\[.*?\]/, + relevance: 0 + }, { + begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, + relevance: 2 + }, { + begin: e.regex.concat(/\[.+?\]\(/, /[A-Za-z][A-Za-z0-9+.-]*/, /:\/\/.*?\)/), + relevance: 2 + }, { + begin: /\[.+?\]\([./?&#].*?\)/, + relevance: 1 + }, { + begin: /\[.*?\]\(.*?\)/, + relevance: 0 + }], + returnBegin: !0, + contains: [{ + match: /\[(?=\])/ + }, { + className: "string", + relevance: 0, + begin: "\\[", + end: "\\]", + excludeBegin: !0, + returnEnd: !0 + }, { + className: "link", + relevance: 0, + begin: "\\]\\(", + end: "\\)", + excludeBegin: !0, + excludeEnd: !0 + }, { + className: "symbol", + relevance: 0, + begin: "\\]\\[", + end: "\\]", + excludeBegin: !0, + excludeEnd: !0 + }] + }, + a = { + className: "strong", + contains: [], + variants: [{ + begin: /_{2}(?!\s)/, + end: /_{2}/ + }, { + begin: /\*{2}(?!\s)/, + end: /\*{2}/ + }] + }, + i = { + className: "emphasis", + contains: [], + variants: [{ + begin: /\*(?![*\s])/, + end: /\*/ + }, { + begin: /_(?![_\s])/, + end: /_/, + relevance: 0 + }] + }, + r = e.inherit(a, { + contains: [] + }), + s = e.inherit(i, { + contains: [] + }); + a.contains.push(s), i.contains.push(r); + let o = [n, t]; + return [a, i, r, s].forEach((e => { + e.contains = e.contains.concat(o) + })), o = o.concat(a, i), { + name: "Markdown", + aliases: ["md", "mkdown", "mkd"], + contains: [{ + className: "section", + variants: [{ + begin: "^#{1,6}", + end: "$", + contains: o + }, { + begin: "(?=^.+?\\n[=-]{2,}$)", + contains: [{ + begin: "^[=-]*$" + }, { + begin: "^", + end: "\\n", + contains: o + }] + }] + }, n, { + className: "bullet", + begin: "^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", + end: "\\s+", + excludeEnd: !0 + }, a, i, { + className: "quote", + begin: "^>\\s+", + contains: o, + end: "$" + }, { + className: "code", + variants: [{ + begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" + }, { + begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" + }, { + begin: "```", + end: "```+[ ]*$" + }, { + begin: "~~~", + end: "~~~+[ ]*$" + }, { + begin: "`.+?`" + }, { + begin: "(?=^( {4}|\\t))", + contains: [{ + begin: "^( {4}|\\t)", + end: "(\\n)$" + }], + relevance: 0 + }] + }, { + begin: "^[-\\*]{3,}", + end: "$" + }, t, { + begin: /^\[[^\n]+\]:/, + returnBegin: !0, + contains: [{ + className: "symbol", + begin: /\[/, + end: /\]/, + excludeBegin: !0, + excludeEnd: !0 + }, { + className: "link", + begin: /:\s*/, + end: /$/, + excludeBegin: !0 + }] + }] + } + }, + grmr_objectivec: e => { + const n = /[a-zA-Z@][a-zA-Z0-9_]*/, + t = { + $pattern: n, + keyword: ["@interface", "@class", "@protocol", "@implementation"] + }; + return { + name: "Objective-C", + aliases: ["mm", "objc", "obj-c", "obj-c++", "objective-c++"], + keywords: { + "variable.language": ["this", "super"], + $pattern: n, + keyword: ["while", "export", "sizeof", "typedef", "const", "struct", "for", "union", "volatile", "static", + "mutable", "if", "do", "return", "goto", "enum", "else", "break", "extern", "asm", "case", "default", + "register", "explicit", "typename", "switch", "continue", "inline", "readonly", "assign", "readwrite", + "self", "@synchronized", "id", "typeof", "nonatomic", "IBOutlet", "IBAction", "strong", "weak", + "copy", "in", "out", "inout", "bycopy", "byref", "oneway", "__strong", "__weak", "__block", + "__autoreleasing", "@private", "@protected", "@public", "@try", "@property", "@end", "@throw", + "@catch", "@finally", "@autoreleasepool", "@synthesize", "@dynamic", "@selector", "@optional", + "@required", "@encode", "@package", "@import", "@defs", "@compatibility_alias", "__bridge", + "__bridge_transfer", "__bridge_retained", "__bridge_retain", "__covariant", "__contravariant", + "__kindof", "_Nonnull", "_Nullable", "_Null_unspecified", "__FUNCTION__", "__PRETTY_FUNCTION__", + "__attribute__", "getter", "setter", "retain", "unsafe_unretained", "nonnull", "nullable", + "null_unspecified", "null_resettable", "class", "instancetype", "NS_DESIGNATED_INITIALIZER", + "NS_UNAVAILABLE", "NS_REQUIRES_SUPER", "NS_RETURNS_INNER_POINTER", "NS_INLINE", "NS_AVAILABLE", + "NS_DEPRECATED", "NS_ENUM", "NS_OPTIONS", "NS_SWIFT_UNAVAILABLE", "NS_ASSUME_NONNULL_BEGIN", + "NS_ASSUME_NONNULL_END", "NS_REFINED_FOR_SWIFT", "NS_SWIFT_NAME", "NS_SWIFT_NOTHROW", "NS_DURING", + "NS_HANDLER", "NS_ENDHANDLER", "NS_VALUERETURN", "NS_VOIDRETURN" + ], + literal: ["false", "true", "FALSE", "TRUE", "nil", "YES", "NO", "NULL"], + built_in: ["dispatch_once_t", "dispatch_queue_t", "dispatch_sync", "dispatch_async", "dispatch_once"], + type: ["int", "float", "char", "unsigned", "signed", "short", "long", "double", "wchar_t", "unichar", + "void", "bool", "BOOL", "id|0", "_Bool" + ] + }, + illegal: "/, + end: /$/, + illegal: "\\n" + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + className: "class", + begin: "(" + t.keyword.join("|") + ")\\b", + end: /(\{|$)/, + excludeEnd: !0, + keywords: t, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + begin: "\\." + e.UNDERSCORE_IDENT_RE, + relevance: 0 + } + ] + } + }, + grmr_perl: e => { + const n = e.regex, + t = /[dualxmsipngr]{0,12}/, + a = { + $pattern: /[\w.]+/, + keyword: "abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" + }, + i = { + className: "subst", + begin: "[$@]\\{", + end: "\\}", + keywords: a + }, + r = { + begin: /->\{/, + end: /\}/ + }, + s = { + variants: [{ + begin: /\$\d/ + }, { + begin: n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, "(?![A-Za-z])(?![@$%])") + }, { + begin: /[$%@][^\s\w{]/, + relevance: 0 + }] + }, + o = [e.BACKSLASH_ESCAPE, i, s], + l = [/!/, /\//, /\|/, /\?/, /'/, /"/, /#/], + c = (e, a, i = "\\1") => { + const r = "\\1" === i ? i : n.concat(i, a); + return n.concat(n.concat("(?:", e, ")"), a, /(?:\\.|[^\\\/])*?/, r, /(?:\\.|[^\\\/])*?/, i, t) + }, + d = (e, a, i) => n.concat(n.concat("(?:", e, ")"), a, /(?:\\.|[^\\\/])*?/, i, t), + g = [s, e.HASH_COMMENT_MODE, e.COMMENT(/^=\w/, /=cut/, { + endsWithParent: !0 + }), r, { + className: "string", + contains: o, + variants: [{ + begin: "q[qwxr]?\\s*\\(", + end: "\\)", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*\\[", + end: "\\]", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*\\{", + end: "\\}", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*\\|", + end: "\\|", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*<", + end: ">", + relevance: 5 + }, { + begin: "qw\\s+q", + end: "q", + relevance: 5 + }, { + begin: "'", + end: "'", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: '"', + end: '"' + }, { + begin: "`", + end: "`", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: /\{\w+\}/, + relevance: 0 + }, { + begin: "-?\\w+\\s*=>", + relevance: 0 + }] + }, { + className: "number", + begin: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", + relevance: 0 + }, { + begin: "(\\/\\/|" + e.RE_STARTERS_RE + "|\\b(split|return|print|reverse|grep)\\b)\\s*", + keywords: "split return print reverse grep", + relevance: 0, + contains: [e.HASH_COMMENT_MODE, { + className: "regexp", + variants: [{ + begin: c("s|tr|y", n.either(...l, { + capture: !0 + })) + }, { + begin: c("s|tr|y", "\\(", "\\)") + }, { + begin: c("s|tr|y", "\\[", "\\]") + }, { + begin: c("s|tr|y", "\\{", "\\}") + }], + relevance: 2 + }, { + className: "regexp", + variants: [{ + begin: /(m|qr)\/\//, + relevance: 0 + }, { + begin: d("(?:m|qr)?", /\//, /\//) + }, { + begin: d("m|qr", n.either(...l, { + capture: !0 + }), /\1/) + }, { + begin: d("m|qr", /\(/, /\)/) + }, { + begin: d("m|qr", /\[/, /\]/) + }, { + begin: d("m|qr", /\{/, /\}/) + }] + }] + }, { + className: "function", + beginKeywords: "sub", + end: "(\\s*\\(.*?\\))?[;{]", + excludeEnd: !0, + relevance: 5, + contains: [e.TITLE_MODE] + }, { + begin: "-\\w\\b", + relevance: 0 + }, { + begin: "^__DATA__$", + end: "^__END__$", + subLanguage: "mojolicious", + contains: [{ + begin: "^@@.*", + end: "$", + className: "comment" + }] + }]; + return i.contains = g, r.contains = g, { + name: "Perl", + aliases: ["pl", "pm"], + keywords: a, + contains: g + } + }, + grmr_php: e => { + const n = e.regex, + t = /(?![A-Za-z0-9])(?![$])/, + a = n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/, t), + i = n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/, t), + r = { + scope: "variable", + match: "\\$+" + a + }, + s = { + scope: "subst", + variants: [{ + begin: /\$\w+/ + }, { + begin: /\{\$/, + end: /\}/ + }] + }, + o = e.inherit(e.APOS_STRING_MODE, { + illegal: null + }), + l = "[ \t\n]", + c = { + scope: "string", + variants: [e.inherit(e.QUOTE_STRING_MODE, { + illegal: null, + contains: e.QUOTE_STRING_MODE.contains.concat(s) + }), o, e.END_SAME_AS_BEGIN({ + begin: /<<<[ \t]*(\w+)\n/, + end: /[ \t]*(\w+)\b/, + contains: e.QUOTE_STRING_MODE.contains.concat(s) + })] + }, + d = { + scope: "number", + variants: [{ + begin: "\\b0[bB][01]+(?:_[01]+)*\\b" + }, { + begin: "\\b0[oO][0-7]+(?:_[0-7]+)*\\b" + }, { + begin: "\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b" + }, { + begin: "(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" + }], + relevance: 0 + }, + g = ["false", "null", "true"], + u = ["__CLASS__", "__DIR__", "__FILE__", "__FUNCTION__", "__COMPILER_HALT_OFFSET__", "__LINE__", + "__METHOD__", "__NAMESPACE__", "__TRAIT__", "die", "echo", "exit", "include", "include_once", "print", + "require", "require_once", "array", "abstract", "and", "as", "binary", "bool", "boolean", "break", + "callable", "case", "catch", "class", "clone", "const", "continue", "declare", "default", "do", "double", + "else", "elseif", "empty", "enddeclare", "endfor", "endforeach", "endif", "endswitch", "endwhile", "enum", + "eval", "extends", "final", "finally", "float", "for", "foreach", "from", "global", "goto", "if", + "implements", "instanceof", "insteadof", "int", "integer", "interface", "isset", "iterable", "list", + "match|0", "mixed", "new", "never", "object", "or", "private", "protected", "public", "readonly", "real", + "return", "string", "switch", "throw", "trait", "try", "unset", "use", "var", "void", "while", "xor", + "yield" + ], + b = ["Error|0", "AppendIterator", "ArgumentCountError", "ArithmeticError", "ArrayIterator", "ArrayObject", + "AssertionError", "BadFunctionCallException", "BadMethodCallException", "CachingIterator", + "CallbackFilterIterator", "CompileError", "Countable", "DirectoryIterator", "DivisionByZeroError", + "DomainException", "EmptyIterator", "ErrorException", "Exception", "FilesystemIterator", "FilterIterator", + "GlobIterator", "InfiniteIterator", "InvalidArgumentException", "IteratorIterator", "LengthException", + "LimitIterator", "LogicException", "MultipleIterator", "NoRewindIterator", "OutOfBoundsException", + "OutOfRangeException", "OuterIterator", "OverflowException", "ParentIterator", "ParseError", + "RangeException", "RecursiveArrayIterator", "RecursiveCachingIterator", "RecursiveCallbackFilterIterator", + "RecursiveDirectoryIterator", "RecursiveFilterIterator", "RecursiveIterator", "RecursiveIteratorIterator", + "RecursiveRegexIterator", "RecursiveTreeIterator", "RegexIterator", "RuntimeException", + "SeekableIterator", "SplDoublyLinkedList", "SplFileInfo", "SplFileObject", "SplFixedArray", "SplHeap", + "SplMaxHeap", "SplMinHeap", "SplObjectStorage", "SplObserver", "SplPriorityQueue", "SplQueue", "SplStack", + "SplSubject", "SplTempFileObject", "TypeError", "UnderflowException", "UnexpectedValueException", + "UnhandledMatchError", "ArrayAccess", "BackedEnum", "Closure", "Fiber", "Generator", "Iterator", + "IteratorAggregate", "Serializable", "Stringable", "Throwable", "Traversable", "UnitEnum", + "WeakReference", "WeakMap", "Directory", "__PHP_Incomplete_Class", "parent", "php_user_filter", "self", + "static", "stdClass" + ], + m = { + keyword: u, + literal: (e => { + const n = []; + return e.forEach((e => { + n.push(e), e.toLowerCase() === e ? n.push(e.toUpperCase()) : n.push(e.toLowerCase()) + })), n + })(g), + built_in: b + }, + p = e => e.map((e => e.replace(/\|\d+$/, ""))), + _ = { + variants: [{ + match: [/new/, n.concat(l, "+"), n.concat("(?!", p(b).join("\\b|"), "\\b)"), i], + scope: { + 1: "keyword", + 4: "title.class" + } + }] + }, + h = n.concat(a, "\\b(?!\\()"), + f = { + variants: [{ + match: [n.concat(/::/, n.lookahead(/(?!class\b)/)), h], + scope: { + 2: "variable.constant" + } + }, { + match: [/::/, /class/], + scope: { + 2: "variable.language" + } + }, { + match: [i, n.concat(/::/, n.lookahead(/(?!class\b)/)), h], + scope: { + 1: "title.class", + 3: "variable.constant" + } + }, { + match: [i, n.concat("::", n.lookahead(/(?!class\b)/))], + scope: { + 1: "title.class" + } + }, { + match: [i, /::/, /class/], + scope: { + 1: "title.class", + 3: "variable.language" + } + }] + }, + E = { + scope: "attr", + match: n.concat(a, n.lookahead(":"), n.lookahead(/(?!::)/)) + }, + y = { + relevance: 0, + begin: /\(/, + end: /\)/, + keywords: m, + contains: [E, r, f, e.C_BLOCK_COMMENT_MODE, c, d, _] + }, + w = { + relevance: 0, + match: [/\b/, n.concat("(?!fn\\b|function\\b|", p(u).join("\\b|"), "|", p(b).join("\\b|"), "\\b)"), a, n + .concat(l, "*"), n.lookahead(/(?=\()/) + ], + scope: { + 3: "title.function.invoke" + }, + contains: [y] + }; + y.contains.push(w); + const N = [E, f, e.C_BLOCK_COMMENT_MODE, c, d, _]; + return { + case_insensitive: !1, + keywords: m, + contains: [{ + begin: n.concat(/#\[\s*/, i), + beginScope: "meta", + end: /]/, + endScope: "meta", + keywords: { + literal: g, + keyword: ["new", "array"] + }, + contains: [{ + begin: /\[/, + end: /]/, + keywords: { + literal: g, + keyword: ["new", "array"] + }, + contains: ["self", ...N] + }, ...N, { + scope: "meta", + match: i + }] + }, e.HASH_COMMENT_MODE, e.COMMENT("//", "$"), e.COMMENT("/\\*", "\\*/", { + contains: [{ + scope: "doctag", + match: "@[A-Za-z]+" + }] + }), { + match: /__halt_compiler\(\);/, + keywords: "__halt_compiler", + starts: { + scope: "comment", + end: e.MATCH_NOTHING_RE, + contains: [{ + match: /\?>/, + scope: "meta", + endsParent: !0 + }] + } + }, { + scope: "meta", + variants: [{ + begin: /<\?php/, + relevance: 10 + }, { + begin: /<\?=/ + }, { + begin: /<\?/, + relevance: .1 + }, { + begin: /\?>/ + }] + }, { + scope: "variable.language", + match: /\$this\b/ + }, r, w, f, { + match: [/const/, /\s/, a], + scope: { + 1: "keyword", + 3: "variable.constant" + } + }, _, { + scope: "function", + relevance: 0, + beginKeywords: "fn function", + end: /[;{]/, + excludeEnd: !0, + illegal: "[$%\\[]", + contains: [{ + beginKeywords: "use" + }, e.UNDERSCORE_TITLE_MODE, { + begin: "=>", + endsParent: !0 + }, { + scope: "params", + begin: "\\(", + end: "\\)", + excludeBegin: !0, + excludeEnd: !0, + keywords: m, + contains: ["self", r, f, e.C_BLOCK_COMMENT_MODE, c, d] + }] + }, { + scope: "class", + variants: [{ + beginKeywords: "enum", + illegal: /[($"]/ + }, { + beginKeywords: "class interface trait", + illegal: /[:($"]/ + }], + relevance: 0, + end: /\{/, + excludeEnd: !0, + contains: [{ + beginKeywords: "extends implements" + }, e.UNDERSCORE_TITLE_MODE] + }, { + beginKeywords: "namespace", + relevance: 0, + end: ";", + illegal: /[.']/, + contains: [e.inherit(e.UNDERSCORE_TITLE_MODE, { + scope: "title.class" + })] + }, { + beginKeywords: "use", + relevance: 0, + end: ";", + contains: [{ + match: /\b(as|const|function)\b/, + scope: "keyword" + }, e.UNDERSCORE_TITLE_MODE] + }, c, d] + } + }, + grmr_php_template: e => ({ + name: "PHP template", + subLanguage: "xml", + contains: [{ + begin: /<\?(php|=)?/, + end: /\?>/, + subLanguage: "php", + contains: [{ + begin: "/\\*", + end: "\\*/", + skip: !0 + }, { + begin: 'b"', + end: '"', + skip: !0 + }, { + begin: "b'", + end: "'", + skip: !0 + }, e.inherit(e.APOS_STRING_MODE, { + illegal: null, + className: null, + contains: null, + skip: !0 + }), e.inherit(e.QUOTE_STRING_MODE, { + illegal: null, + className: null, + contains: null, + skip: !0 + })] + }] + }), + grmr_plaintext: e => ({ + name: "Plain text", + aliases: ["text", "txt"], + disableAutodetect: !0 + }), + grmr_python: e => { + const n = e.regex, + t = /(?:[A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFC5D\uFC64-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDF9\uFE71\uFE73\uFE77\uFE79\uFE7B\uFE7D\uFE7F-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037B-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFC5D\uFC64-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDF9\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE71\uFE73\uFE77\uFE79\uFE7B\uFE7D\uFE7F-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])*/, + a = ["and", "as", "assert", "async", "await", "break", "case", "class", "continue", "def", "del", "elif", + "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "match", + "nonlocal|10", "not", "or", "pass", "raise", "return", "try", "while", "with", "yield" + ], + i = { + $pattern: /[A-Za-z]\w+|__\w+__/, + keyword: a, + built_in: ["__import__", "abs", "all", "any", "ascii", "bin", "bool", "breakpoint", "bytearray", "bytes", + "callable", "chr", "classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod", + "enumerate", "eval", "exec", "filter", "float", "format", "frozenset", "getattr", "globals", + "hasattr", "hash", "help", "hex", "id", "input", "int", "isinstance", "issubclass", "iter", "len", + "list", "locals", "map", "max", "memoryview", "min", "next", "object", "oct", "open", "ord", "pow", + "print", "property", "range", "repr", "reversed", "round", "set", "setattr", "slice", "sorted", + "staticmethod", "str", "sum", "super", "tuple", "type", "vars", "zip" + ], + literal: ["__debug__", "Ellipsis", "False", "None", "NotImplemented", "True"], + type: ["Any", "Callable", "Coroutine", "Dict", "List", "Literal", "Generic", "Optional", "Sequence", + "Set", "Tuple", "Type", "Union" + ] + }, + r = { + className: "meta", + begin: /^(>>>|\.\.\.) / + }, + s = { + className: "subst", + begin: /\{/, + end: /\}/, + keywords: i, + illegal: /#/ + }, + o = { + begin: /\{\{/, + relevance: 0 + }, + l = { + className: "string", + contains: [e.BACKSLASH_ESCAPE], + variants: [{ + begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/, + end: /'''/, + contains: [e.BACKSLASH_ESCAPE, r], + relevance: 10 + }, { + begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/, + end: /"""/, + contains: [e.BACKSLASH_ESCAPE, r], + relevance: 10 + }, { + begin: /([fF][rR]|[rR][fF]|[fF])'''/, + end: /'''/, + contains: [e.BACKSLASH_ESCAPE, r, o, s] + }, { + begin: /([fF][rR]|[rR][fF]|[fF])"""/, + end: /"""/, + contains: [e.BACKSLASH_ESCAPE, r, o, s] + }, { + begin: /([uU]|[rR])'/, + end: /'/, + relevance: 10 + }, { + begin: /([uU]|[rR])"/, + end: /"/, + relevance: 10 + }, { + begin: /([bB]|[bB][rR]|[rR][bB])'/, + end: /'/ + }, { + begin: /([bB]|[bB][rR]|[rR][bB])"/, + end: /"/ + }, { + begin: /([fF][rR]|[rR][fF]|[fF])'/, + end: /'/, + contains: [e.BACKSLASH_ESCAPE, o, s] + }, { + begin: /([fF][rR]|[rR][fF]|[fF])"/, + end: /"/, + contains: [e.BACKSLASH_ESCAPE, o, s] + }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + }, + c = "[0-9](_?[0-9])*", + d = `(\\b(${c}))?\\.(${c})|\\b(${c})\\.`, + g = "\\b|" + a.join("|"), + u = { + className: "number", + relevance: 0, + variants: [{ + begin: `(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${g})` + }, { + begin: `(${d})[jJ]?` + }, { + begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})` + }, { + begin: `\\b0[bB](_?[01])+[lL]?(?=${g})` + }, { + begin: `\\b0[oO](_?[0-7])+[lL]?(?=${g})` + }, { + begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})` + }, { + begin: `\\b(${c})[jJ](?=${g})` + }] + }, + b = { + className: "comment", + begin: n.lookahead(/# type:/), + end: /$/, + keywords: i, + contains: [{ + begin: /# type:/ + }, { + begin: /#/, + end: /\b\B/, + endsWithParent: !0 + }] + }, + m = { + className: "params", + variants: [{ + className: "", + begin: /\(\s*\)/, + skip: !0 + }, { + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: i, + contains: ["self", r, u, l, e.HASH_COMMENT_MODE] + }] + }; + return s.contains = [l, u, r], { + name: "Python", + aliases: ["py", "gyp", "ipython"], + unicodeRegex: !0, + keywords: i, + illegal: /(<\/|->|\?)|=>/, + contains: [r, u, { + begin: /\bself\b/ + }, { + beginKeywords: "if", + relevance: 0 + }, l, b, e.HASH_COMMENT_MODE, { + match: [/\bdef/, /\s+/, t], + scope: { + 1: "keyword", + 3: "title.function" + }, + contains: [m] + }, { + variants: [{ + match: [/\bclass/, /\s+/, t, /\s*/, /\(\s*/, t, /\s*\)/] + }, { + match: [/\bclass/, /\s+/, t] + }], + scope: { + 1: "keyword", + 3: "title.class", + 6: "title.class.inherited" + } + }, { + className: "meta", + begin: /^[\t ]*@/, + end: /(?=#)|$/, + contains: [u, m, l] + }] + } + }, + grmr_python_repl: e => ({ + aliases: ["pycon"], + contains: [{ + className: "meta.prompt", + starts: { + end: / |$/, + starts: { + end: "$", + subLanguage: "python" + } + }, + variants: [{ + begin: /^>>>(?=[ ]|$)/ + }, { + begin: /^\.\.\.(?=[ ]|$)/ + }] + }] + }), + grmr_r: e => { + const n = e.regex, + t = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/, + a = n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/, /0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/, + /(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/), + i = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/, + r = n.either(/[()]/, /[{}]/, /\[\[/, /[[\]]/, /\\/, /,/); + return { + name: "R", + keywords: { + $pattern: t, + keyword: "function if in break next repeat else for while", + literal: "NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", + built_in: "LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" + }, + contains: [e.COMMENT(/#'/, /$/, { + contains: [{ + scope: "doctag", + match: /@examples/, + starts: { + end: n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/, /\n^(?!#')/)), + endsParent: !0 + } + }, { + scope: "doctag", + begin: "@param", + end: /$/, + contains: [{ + scope: "variable", + variants: [{ + match: t + }, { + match: /`(?:\\.|[^`\\])+`/ + }], + endsParent: !0 + }] + }, { + scope: "doctag", + match: /@[a-zA-Z]+/ + }, { + scope: "keyword", + match: /\\[a-zA-Z]+/ + }] + }), e.HASH_COMMENT_MODE, { + scope: "string", + contains: [e.BACKSLASH_ESCAPE], + variants: [e.END_SAME_AS_BEGIN({ + begin: /[rR]"(-*)\(/, + end: /\)(-*)"/ + }), e.END_SAME_AS_BEGIN({ + begin: /[rR]"(-*)\{/, + end: /\}(-*)"/ + }), e.END_SAME_AS_BEGIN({ + begin: /[rR]"(-*)\[/, + end: /\](-*)"/ + }), e.END_SAME_AS_BEGIN({ + begin: /[rR]'(-*)\(/, + end: /\)(-*)'/ + }), e.END_SAME_AS_BEGIN({ + begin: /[rR]'(-*)\{/, + end: /\}(-*)'/ + }), e.END_SAME_AS_BEGIN({ + begin: /[rR]'(-*)\[/, + end: /\](-*)'/ + }), { + begin: '"', + end: '"', + relevance: 0 + }, { + begin: "'", + end: "'", + relevance: 0 + }] + }, { + relevance: 0, + variants: [{ + scope: { + 1: "operator", + 2: "number" + }, + match: [i, a] + }, { + scope: { + 1: "operator", + 2: "number" + }, + match: [/%[^%]*%/, a] + }, { + scope: { + 1: "punctuation", + 2: "number" + }, + match: [r, a] + }, { + scope: { + 2: "number" + }, + match: [/[^a-zA-Z0-9._]|^/, a] + }] + }, { + scope: { + 3: "operator" + }, + match: [t, /\s+/, /<-/, /\s+/] + }, { + scope: "operator", + relevance: 0, + variants: [{ + match: i + }, { + match: /%[^%]*%/ + }] + }, { + scope: "punctuation", + relevance: 0, + match: r + }, { + begin: "`", + end: "`", + contains: [{ + begin: /\\./ + }] + }] + } + }, + grmr_ruby: e => { + const n = e.regex, + t = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", + a = n.either(/\b([A-Z]+[a-z0-9]+)+/, /\b([A-Z]+[a-z0-9]+)+[A-Z]+/), + i = n.concat(a, /(::\w+)*/), + r = { + "variable.constant": ["__FILE__", "__LINE__", "__ENCODING__"], + "variable.language": ["self", "super"], + keyword: ["alias", "and", "begin", "BEGIN", "break", "case", "class", "defined", "do", "else", "elsif", + "end", "END", "ensure", "for", "if", "in", "module", "next", "not", "or", "redo", "require", "rescue", + "retry", "return", "then", "undef", "unless", "until", "when", "while", "yield", "include", "extend", + "prepend", "public", "private", "protected", "raise", "throw" + ], + built_in: ["proc", "lambda", "attr_accessor", "attr_reader", "attr_writer", "define_method", + "private_constant", "module_function" + ], + literal: ["true", "false", "nil"] + }, + s = { + className: "doctag", + begin: "@[A-Za-z]+" + }, + o = { + begin: "#<", + end: ">" + }, + l = [e.COMMENT("#", "$", { + contains: [s] + }), e.COMMENT("^=begin", "^=end", { + contains: [s], + relevance: 10 + }), e.COMMENT("^__END__", e.MATCH_NOTHING_RE)], + c = { + className: "subst", + begin: /#\{/, + end: /\}/, + keywords: r + }, + d = { + className: "string", + contains: [e.BACKSLASH_ESCAPE, c], + variants: [{ + begin: /'/, + end: /'/ + }, { + begin: /"/, + end: /"/ + }, { + begin: /`/, + end: /`/ + }, { + begin: /%[qQwWx]?\(/, + end: /\)/ + }, { + begin: /%[qQwWx]?\[/, + end: /\]/ + }, { + begin: /%[qQwWx]?\{/, + end: /\}/ + }, { + begin: /%[qQwWx]?/ + }, { + begin: /%[qQwWx]?\//, + end: /\// + }, { + begin: /%[qQwWx]?%/, + end: /%/ + }, { + begin: /%[qQwWx]?-/, + end: /-/ + }, { + begin: /%[qQwWx]?\|/, + end: /\|/ + }, { + begin: /\B\?(\\\d{1,3})/ + }, { + begin: /\B\?(\\x[A-Fa-f0-9]{1,2})/ + }, { + begin: /\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/ + }, { + begin: /\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/ + }, { + begin: /\B\?\\(c|C-)[\x20-\x7e]/ + }, { + begin: /\B\?\\?\S/ + }, { + begin: n.concat(/<<[-~]?'?/, n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)), + contains: [e.END_SAME_AS_BEGIN({ + begin: /(\w+)/, + end: /(\w+)/, + contains: [e.BACKSLASH_ESCAPE, c] + })] + }] + }, + g = "[0-9](_?[0-9])*", + u = { + className: "number", + relevance: 0, + variants: [{ + begin: `\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b` + }, { + begin: "\\b0[dD][0-9](_?[0-9])*r?i?\\b" + }, { + begin: "\\b0[bB][0-1](_?[0-1])*r?i?\\b" + }, { + begin: "\\b0[oO][0-7](_?[0-7])*r?i?\\b" + }, { + begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" + }, { + begin: "\\b0(_?[0-7])+r?i?\\b" + }] + }, + b = { + variants: [{ + match: /\(\)/ + }, { + className: "params", + begin: /\(/, + end: /(?=\))/, + excludeBegin: !0, + endsParent: !0, + keywords: r + }] + }, + m = [d, { + variants: [{ + match: [/class\s+/, i, /\s+<\s+/, i] + }, { + match: [/\b(class|module)\s+/, i] + }], + scope: { + 2: "title.class", + 4: "title.class.inherited" + }, + keywords: r + }, { + match: [/(include|extend)\s+/, i], + scope: { + 2: "title.class" + }, + keywords: r + }, { + relevance: 0, + match: [i, /\.new[. (]/], + scope: { + 1: "title.class" + } + }, { + relevance: 0, + match: /\b[A-Z][A-Z_0-9]+\b/, + className: "variable.constant" + }, { + relevance: 0, + match: a, + scope: "title.class" + }, { + match: [/def/, /\s+/, t], + scope: { + 1: "keyword", + 3: "title.function" + }, + contains: [b] + }, { + begin: e.IDENT_RE + "::" + }, { + className: "symbol", + begin: e.UNDERSCORE_IDENT_RE + "(!|\\?)?:", + relevance: 0 + }, { + className: "symbol", + begin: ":(?!\\s)", + contains: [d, { + begin: t + }], + relevance: 0 + }, u, { + className: "variable", + begin: "(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])" + }, { + className: "params", + begin: /\|/, + end: /\|/, + excludeBegin: !0, + excludeEnd: !0, + relevance: 0, + keywords: r + }, { + begin: "(" + e.RE_STARTERS_RE + "|unless)\\s*", + keywords: "unless", + contains: [{ + className: "regexp", + contains: [e.BACKSLASH_ESCAPE, c], + illegal: /\n/, + variants: [{ + begin: "/", + end: "/[a-z]*" + }, { + begin: /%r\{/, + end: /\}[a-z]*/ + }, { + begin: "%r\\(", + end: "\\)[a-z]*" + }, { + begin: "%r!", + end: "![a-z]*" + }, { + begin: "%r\\[", + end: "\\][a-z]*" + }] + }].concat(o, l), + relevance: 0 + }].concat(o, l); + c.contains = m, b.contains = m; + const p = [{ + begin: /^\s*=>/, + starts: { + end: "$", + contains: m + } + }, { + className: "meta.prompt", + begin: "^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", + starts: { + end: "$", + keywords: r, + contains: m + } + }]; + return l.unshift(o), { + name: "Ruby", + aliases: ["rb", "gemspec", "podspec", "thor", "irb"], + keywords: r, + illegal: /\/\*/, + contains: [e.SHEBANG({ + binary: "ruby" + })].concat(p).concat(l).concat(m) + } + }, + grmr_rust: e => { + const n = e.regex, + t = { + className: "title.function.invoke", + relevance: 0, + begin: n.concat(/\b/, /(?!let\b)/, e.IDENT_RE, n.lookahead(/\s*\(/)) + }, + a = "([ui](8|16|32|64|128|size)|f(32|64))?", + i = ["drop ", "Copy", "Send", "Sized", "Sync", "Drop", "Fn", "FnMut", "FnOnce", "ToOwned", "Clone", "Debug", + "PartialEq", "PartialOrd", "Eq", "Ord", "AsRef", "AsMut", "Into", "From", "Default", "Iterator", "Extend", + "IntoIterator", "DoubleEndedIterator", "ExactSizeIterator", "SliceConcatExt", "ToString", "assert!", + "assert_eq!", "bitflags!", "bytes!", "cfg!", "col!", "concat!", "concat_idents!", "debug_assert!", + "debug_assert_eq!", "env!", "panic!", "file!", "format!", "format_args!", "include_bytes!", + "include_str!", "line!", "local_data_key!", "module_path!", "option_env!", "print!", "println!", + "select!", "stringify!", "try!", "unimplemented!", "unreachable!", "vec!", "write!", "writeln!", + "macro_rules!", "assert_ne!", "debug_assert_ne!" + ], + r = ["i8", "i16", "i32", "i64", "i128", "isize", "u8", "u16", "u32", "u64", "u128", "usize", "f32", "f64", + "str", "char", "bool", "Box", "Option", "Result", "String", "Vec" + ]; + return { + name: "Rust", + aliases: ["rs"], + keywords: { + $pattern: e.IDENT_RE + "!?", + type: r, + keyword: ["abstract", "as", "async", "await", "become", "box", "break", "const", "continue", "crate", + "do", "dyn", "else", "enum", "extern", "false", "final", "fn", "for", "if", "impl", "in", "let", + "loop", "macro", "match", "mod", "move", "mut", "override", "priv", "pub", "ref", "return", "self", + "Self", "static", "struct", "super", "trait", "true", "try", "type", "typeof", "unsafe", "unsized", + "use", "virtual", "where", "while", "yield" + ], + literal: ["true", "false", "Some", "None", "Ok", "Err"], + built_in: i + }, + illegal: "" + }, t] + } + }, + grmr_scss: e => { + const n = J(e), + t = te, + a = ne, + i = "@[a-z-]+", + r = { + className: "variable", + begin: "(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b", + relevance: 0 + }; + return { + name: "SCSS", + case_insensitive: !0, + illegal: "[=/|']", + contains: [e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, n.CSS_NUMBER_MODE, { + className: "selector-id", + begin: "#[A-Za-z0-9_-]+", + relevance: 0 + }, { + className: "selector-class", + begin: "\\.[A-Za-z0-9_-]+", + relevance: 0 + }, n.ATTRIBUTE_SELECTOR_MODE, { + className: "selector-tag", + begin: "\\b(" + Y.join("|") + ")\\b", + relevance: 0 + }, { + className: "selector-pseudo", + begin: ":(" + a.join("|") + ")" + }, { + className: "selector-pseudo", + begin: ":(:)?(" + t.join("|") + ")" + }, r, { + begin: /\(/, + end: /\)/, + contains: [n.CSS_NUMBER_MODE] + }, n.CSS_VARIABLE, { + className: "attribute", + begin: "\\b(" + ae.join("|") + ")\\b" + }, { + begin: "\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" + }, { + begin: /:/, + end: /[;}{]/, + relevance: 0, + contains: [n.BLOCK_COMMENT, r, n.HEXCOLOR, n.CSS_NUMBER_MODE, e.QUOTE_STRING_MODE, e.APOS_STRING_MODE, + n.IMPORTANT, n.FUNCTION_DISPATCH + ] + }, { + begin: "@(page|font-face)", + keywords: { + $pattern: i, + keyword: "@page @font-face" + } + }, { + begin: "@", + end: "[{;]", + returnBegin: !0, + keywords: { + $pattern: /[a-z-]+/, + keyword: "and or not only", + attribute: ee.join(" ") + }, + contains: [{ + begin: i, + className: "keyword" + }, { + begin: /[a-z-]+(?=:)/, + className: "attribute" + }, r, e.QUOTE_STRING_MODE, e.APOS_STRING_MODE, n.HEXCOLOR, n.CSS_NUMBER_MODE] + }, n.FUNCTION_DISPATCH] + } + }, + grmr_shell: e => ({ + name: "Shell Session", + aliases: ["console", "shellsession"], + contains: [{ + className: "meta.prompt", + begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/, + starts: { + end: /[^\\](?=\s*$)/, + subLanguage: "bash" + } + }] + }), + grmr_sql: e => { + const n = e.regex, + t = e.COMMENT("--", "$"), + a = ["true", "false", "unknown"], + i = ["bigint", "binary", "blob", "boolean", "char", "character", "clob", "date", "dec", "decfloat", + "decimal", "float", "int", "integer", "interval", "nchar", "nclob", "national", "numeric", "real", "row", + "smallint", "time", "timestamp", "varchar", "varying", "varbinary" + ], + r = ["abs", "acos", "array_agg", "asin", "atan", "avg", "cast", "ceil", "ceiling", "coalesce", "corr", + "cos", "cosh", "count", "covar_pop", "covar_samp", "cume_dist", "dense_rank", "deref", "element", "exp", + "extract", "first_value", "floor", "json_array", "json_arrayagg", "json_exists", "json_object", + "json_objectagg", "json_query", "json_table", "json_table_primitive", "json_value", "lag", "last_value", + "lead", "listagg", "ln", "log", "log10", "lower", "max", "min", "mod", "nth_value", "ntile", "nullif", + "percent_rank", "percentile_cont", "percentile_disc", "position", "position_regex", "power", "rank", + "regr_avgx", "regr_avgy", "regr_count", "regr_intercept", "regr_r2", "regr_slope", "regr_sxx", "regr_sxy", + "regr_syy", "row_number", "sin", "sinh", "sqrt", "stddev_pop", "stddev_samp", "substring", + "substring_regex", "sum", "tan", "tanh", "translate", "translate_regex", "treat", "trim", "trim_array", + "unnest", "upper", "value_of", "var_pop", "var_samp", "width_bucket" + ], + s = ["create table", "insert into", "primary key", "foreign key", "not null", "alter table", + "add constraint", "grouping sets", "on overflow", "character set", "respect nulls", "ignore nulls", + "nulls first", "nulls last", "depth first", "breadth first" + ], + o = r, + l = ["abs", "acos", "all", "allocate", "alter", "and", "any", "are", "array", "array_agg", + "array_max_cardinality", "as", "asensitive", "asin", "asymmetric", "at", "atan", "atomic", + "authorization", "avg", "begin", "begin_frame", "begin_partition", "between", "bigint", "binary", "blob", + "boolean", "both", "by", "call", "called", "cardinality", "cascaded", "case", "cast", "ceil", "ceiling", + "char", "char_length", "character", "character_length", "check", "classifier", "clob", "close", + "coalesce", "collate", "collect", "column", "commit", "condition", "connect", "constraint", "contains", + "convert", "copy", "corr", "corresponding", "cos", "cosh", "count", "covar_pop", "covar_samp", "create", + "cross", "cube", "cume_dist", "current", "current_catalog", "current_date", + "current_default_transform_group", "current_path", "current_role", "current_row", "current_schema", + "current_time", "current_timestamp", "current_path", "current_role", "current_transform_group_for_type", + "current_user", "cursor", "cycle", "date", "day", "deallocate", "dec", "decimal", "decfloat", "declare", + "default", "define", "delete", "dense_rank", "deref", "describe", "deterministic", "disconnect", + "distinct", "double", "drop", "dynamic", "each", "element", "else", "empty", "end", "end_frame", + "end_partition", "end-exec", "equals", "escape", "every", "except", "exec", "execute", "exists", "exp", + "external", "extract", "false", "fetch", "filter", "first_value", "float", "floor", "for", "foreign", + "frame_row", "free", "from", "full", "function", "fusion", "get", "global", "grant", "group", "grouping", + "groups", "having", "hold", "hour", "identity", "in", "indicator", "initial", "inner", "inout", + "insensitive", "insert", "int", "integer", "intersect", "intersection", "interval", "into", "is", "join", + "json_array", "json_arrayagg", "json_exists", "json_object", "json_objectagg", "json_query", "json_table", + "json_table_primitive", "json_value", "lag", "language", "large", "last_value", "lateral", "lead", + "leading", "left", "like", "like_regex", "listagg", "ln", "local", "localtime", "localtimestamp", "log", + "log10", "lower", "match", "match_number", "match_recognize", "matches", "max", "member", "merge", + "method", "min", "minute", "mod", "modifies", "module", "month", "multiset", "national", "natural", + "nchar", "nclob", "new", "no", "none", "normalize", "not", "nth_value", "ntile", "null", "nullif", + "numeric", "octet_length", "occurrences_regex", "of", "offset", "old", "omit", "on", "one", "only", + "open", "or", "order", "out", "outer", "over", "overlaps", "overlay", "parameter", "partition", "pattern", + "per", "percent", "percent_rank", "percentile_cont", "percentile_disc", "period", "portion", "position", + "position_regex", "power", "precedes", "precision", "prepare", "primary", "procedure", "ptf", "range", + "rank", "reads", "real", "recursive", "ref", "references", "referencing", "regr_avgx", "regr_avgy", + "regr_count", "regr_intercept", "regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "release", + "result", "return", "returns", "revoke", "right", "rollback", "rollup", "row", "row_number", "rows", + "running", "savepoint", "scope", "scroll", "search", "second", "seek", "select", "sensitive", + "session_user", "set", "show", "similar", "sin", "sinh", "skip", "smallint", "some", "specific", + "specifictype", "sql", "sqlexception", "sqlstate", "sqlwarning", "sqrt", "start", "static", "stddev_pop", + "stddev_samp", "submultiset", "subset", "substring", "substring_regex", "succeeds", "sum", "symmetric", + "system", "system_time", "system_user", "table", "tablesample", "tan", "tanh", "then", "time", + "timestamp", "timezone_hour", "timezone_minute", "to", "trailing", "translate", "translate_regex", + "translation", "treat", "trigger", "trim", "trim_array", "true", "truncate", "uescape", "union", "unique", + "unknown", "unnest", "update", "upper", "user", "using", "value", "values", "value_of", "var_pop", + "var_samp", "varbinary", "varchar", "varying", "versioning", "when", "whenever", "where", "width_bucket", + "window", "with", "within", "without", "year", "add", "asc", "collation", "desc", "final", "first", + "last", "view" + ].filter((e => !r.includes(e))), + c = { + begin: n.concat(/\b/, n.either(...o), /\s*\(/), + relevance: 0, + keywords: { + built_in: o + } + }; + return { + name: "SQL", + case_insensitive: !0, + illegal: /[{}]|<\//, + keywords: { + $pattern: /\b[\w\.]+/, + keyword: ((e, { + exceptions: n, + when: t + } = {}) => { + const a = t; + return n = n || [], e.map((e => e.match(/\|\d+$/) || n.includes(e) ? e : a(e) ? e + "|0" : e)) + })(l, { + when: e => e.length < 3 + }), + literal: a, + type: i, + built_in: ["current_catalog", "current_date", "current_default_transform_group", "current_path", + "current_role", "current_schema", "current_transform_group_for_type", "current_user", "session_user", + "system_time", "system_user", "current_time", "localtime", "current_timestamp", "localtimestamp" + ] + }, + contains: [{ + begin: n.either(...s), + relevance: 0, + keywords: { + $pattern: /[\w\.]+/, + keyword: l.concat(s), + literal: a, + type: i + } + }, { + className: "type", + begin: n.either("double precision", "large object", "with timezone", "without timezone") + }, c, { + className: "variable", + begin: /@[a-z0-9]+/ + }, { + className: "string", + variants: [{ + begin: /'/, + end: /'/, + contains: [{ + begin: /''/ + }] + }] + }, { + begin: /"/, + end: /"/, + contains: [{ + begin: /""/ + }] + }, e.C_NUMBER_MODE, e.C_BLOCK_COMMENT_MODE, t, { + className: "operator", + begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, + relevance: 0 + }] + } + }, + grmr_swift: e => { + const n = { + match: /\s+/, + relevance: 0 + }, + t = e.COMMENT("/\\*", "\\*/", { + contains: ["self"] + }), + a = [e.C_LINE_COMMENT_MODE, t], + i = { + match: [/\./, p(...Ee, ...ye)], + className: { + 2: "keyword" + } + }, + r = { + match: m(/\./, p(...Ne)), + relevance: 0 + }, + s = Ne.filter((e => "string" == typeof e)).concat(["_|0"]), + o = { + variants: [{ + className: "keyword", + match: p(...Ne.filter((e => "string" != typeof e)).concat(we).map(fe), ...ye) + }] + }, + l = { + $pattern: p(/\b\w+/, /#\w+/), + keyword: s.concat(ke), + literal: ve + }, + c = [i, r, o], + d = [{ + match: m(/\./, p(...xe)), + relevance: 0 + }, { + className: "built_in", + match: m(/\b/, p(...xe), /(?=\()/) + }], + u = { + match: /->/, + relevance: 0 + }, + b = [u, { + className: "operator", + relevance: 0, + variants: [{ + match: Ae + }, { + match: `\\.(\\.|${Se})+` + }] + }], + _ = "([0-9a-fA-F]_*)+", + h = { + className: "number", + relevance: 0, + variants: [{ + match: "\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b" + }, { + match: `\\b0x(${_})(\\.(${_}))?([pP][+-]?(([0-9]_*)+))?\\b` + }, { + match: /\b0o([0-7]_*)+\b/ + }, { + match: /\b0b([01]_*)+\b/ + }] + }, + f = (e = "") => ({ + className: "subst", + variants: [{ + match: m(/\\/, e, /[0\\tnr"']/) + }, { + match: m(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) + }] + }), + E = (e = "") => ({ + className: "subst", + match: m(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/) + }), + y = (e = "") => ({ + className: "subst", + label: "interpol", + begin: m(/\\/, e, /\(/), + end: /\)/ + }), + w = (e = "") => ({ + begin: m(e, /"""/), + end: m(/"""/, e), + contains: [f(e), E(e), y(e)] + }), + N = (e = "") => ({ + begin: m(e, /"/), + end: m(/"/, e), + contains: [f(e), y(e)] + }), + v = { + className: "string", + variants: [w(), w("#"), w("##"), w("###"), N(), N("#"), N("##"), N("###")] + }, + O = { + match: m(/`/, Re, /`/) + }, + k = [O, { + className: "variable", + match: /\$\d+/ + }, { + className: "variable", + match: `\\$${Te}+` + }], + x = [{ + match: /(@|#(un)?)available/, + className: "keyword", + starts: { + contains: [{ + begin: /\(/, + end: /\)/, + keywords: Le, + contains: [...b, h, v] + }] + } + }, { + className: "keyword", + match: m(/@/, p(...Ie)) + }, { + className: "meta", + match: m(/@/, Re) + }], + M = { + match: g(/\b[A-Z]/), + relevance: 0, + contains: [{ + className: "type", + match: m(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/, Te, "+") + }, { + className: "type", + match: De, + relevance: 0 + }, { + match: /[?!]+/, + relevance: 0 + }, { + match: /\.\.\./, + relevance: 0 + }, { + match: m(/\s+&\s+/, g(De)), + relevance: 0 + }] + }, + S = { + begin: //, + keywords: l, + contains: [...a, ...c, ...x, u, M] + }; + M.contains.push(S); + const A = { + begin: /\(/, + end: /\)/, + relevance: 0, + keywords: l, + contains: ["self", { + match: m(Re, /\s*:/), + keywords: "_|0", + relevance: 0 + }, ...a, ...c, ...d, ...b, h, v, ...k, ...x, M] + }, + C = { + begin: //, + contains: [...a, M] + }, + T = { + begin: /\(/, + end: /\)/, + keywords: l, + contains: [{ + begin: p(g(m(Re, /\s*:/)), g(m(Re, /\s+/, Re, /\s*:/))), + end: /:/, + relevance: 0, + contains: [{ + className: "keyword", + match: /\b_\b/ + }, { + className: "params", + match: Re + }] + }, ...a, ...c, ...b, h, v, ...x, M, A], + endsParent: !0, + illegal: /["']/ + }, + R = { + match: [/func/, /\s+/, p(O.match, Re, Ae)], + className: { + 1: "keyword", + 3: "title.function" + }, + contains: [C, T, n], + illegal: [/\[/, /%/] + }, + D = { + match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/], + className: { + 1: "keyword" + }, + contains: [C, T, n], + illegal: /\[|%/ + }, + I = { + match: [/operator/, /\s+/, Ae], + className: { + 1: "keyword", + 3: "title" + } + }, + L = { + begin: [/precedencegroup/, /\s+/, De], + className: { + 1: "keyword", + 3: "title" + }, + contains: [M], + keywords: [...Oe, ...ve], + end: /}/ + }; + for (const e of v.variants) { + const n = e.contains.find((e => "interpol" === e.label)); + n.keywords = l; + const t = [...c, ...d, ...b, h, v, ...k]; + n.contains = [...t, { + begin: /\(/, + end: /\)/, + contains: ["self", ...t] + }] + } + return { + name: "Swift", + keywords: l, + contains: [...a, R, D, { + beginKeywords: "struct protocol class extension enum actor", + end: "\\{", + excludeEnd: !0, + keywords: l, + contains: [e.inherit(e.TITLE_MODE, { + className: "title.class", + begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/ + }), ...c] + }, I, L, { + beginKeywords: "import", + end: /$/, + contains: [...a], + relevance: 0 + }, ...c, ...d, ...b, h, v, ...k, ...x, M, A] + } + }, + grmr_typescript: e => { + const n = he(e), + t = ["any", "void", "number", "boolean", "string", "object", "never", "symbol", "bigint", "unknown"], + a = { + beginKeywords: "namespace", + end: /\{/, + excludeEnd: !0, + contains: [n.exports.CLASS_REFERENCE] + }, + i = { + beginKeywords: "interface", + end: /\{/, + excludeEnd: !0, + keywords: { + keyword: "interface extends", + built_in: t + }, + contains: [n.exports.CLASS_REFERENCE] + }, + r = { + $pattern: ce, + keyword: de.concat(["type", "namespace", "interface", "public", "private", "protected", "implements", + "declare", "abstract", "readonly", "enum", "override" + ]), + literal: ge, + built_in: _e.concat(t), + "variable.language": pe + }, + s = { + className: "meta", + begin: "@[A-Za-z$_][0-9A-Za-z$_]*" + }, + o = (e, n, t) => { + const a = e.contains.findIndex((e => e.label === n)); + if (-1 === a) throw Error("can not find mode to replace"); + e.contains.splice(a, 1, t) + }; + return Object.assign(n.keywords, r), + n.exports.PARAMS_CONTAINS.push(s), n.contains = n.contains.concat([s, a, i]), + o(n, "shebang", e.SHEBANG()), o(n, "use_strict", { + className: "meta", + relevance: 10, + begin: /^\s*['"]use strict['"]/ + }), n.contains.find((e => "func.def" === e.label)).relevance = 0, Object.assign(n, { + name: "TypeScript", + aliases: ["ts", "tsx"] + }), n + }, + grmr_vbnet: e => { + const n = e.regex, + t = /\d{1,2}\/\d{1,2}\/\d{4}/, + a = /\d{4}-\d{1,2}-\d{1,2}/, + i = /(\d|1[012])(:\d+){0,2} *(AM|PM)/, + r = /\d{1,2}(:\d{1,2}){1,2}/, + s = { + className: "literal", + variants: [{ + begin: n.concat(/# */, n.either(a, t), / *#/) + }, { + begin: n.concat(/# */, r, / *#/) + }, { + begin: n.concat(/# */, i, / *#/) + }, { + begin: n.concat(/# */, n.either(a, t), / +/, n.either(i, r), / *#/) + }] + }, + o = e.COMMENT(/'''/, /$/, { + contains: [{ + className: "doctag", + begin: /<\/?/, + end: />/ + }] + }), + l = e.COMMENT(null, /$/, { + variants: [{ + begin: /'/ + }, { + begin: /([\t ]|^)REM(?=\s)/ + }] + }); + return { + name: "Visual Basic .NET", + aliases: ["vb"], + case_insensitive: !0, + classNameAliases: { + label: "symbol" + }, + keywords: { + keyword: "addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", + built_in: "addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort", + type: "boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort", + literal: "true false nothing" + }, + illegal: "//|\\{|\\}|endif|gosub|variant|wend|^\\$ ", + contains: [{ + className: "string", + begin: /"(""|[^/n])"C\b/ + }, { + className: "string", + begin: /"/, + end: /"/, + illegal: /\n/, + contains: [{ + begin: /""/ + }] + }, s, { + className: "number", + relevance: 0, + variants: [{ + begin: /\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ + }, { + begin: /\b\d[\d_]*((U?[SIL])|[%&])?/ + }, { + begin: /&H[\dA-F_]+((U?[SIL])|[%&])?/ + }, { + begin: /&O[0-7_]+((U?[SIL])|[%&])?/ + }, { + begin: /&B[01_]+((U?[SIL])|[%&])?/ + }] + }, { + className: "label", + begin: /^\w+:/ + }, o, l, { + className: "meta", + begin: /[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, + end: /$/, + keywords: { + keyword: "const disable else elseif enable end externalsource if region then" + }, + contains: [l] + }] + } + }, + grmr_wasm: e => { + e.regex; + const n = e.COMMENT(/\(;/, /;\)/); + return n.contains.push("self"), { + name: "WebAssembly", + keywords: { + $pattern: /[\w.]+/, + keyword: ["anyfunc", "block", "br", "br_if", "br_table", "call", "call_indirect", "data", "drop", + "elem", "else", "end", "export", "func", "global.get", "global.set", "local.get", "local.set", + "local.tee", "get_global", "get_local", "global", "if", "import", "local", "loop", "memory", + "memory.grow", "memory.size", "module", "mut", "nop", "offset", "param", "result", "return", + "select", "set_global", "set_local", "start", "table", "tee_local", "then", "type", "unreachable" + ] + }, + contains: [e.COMMENT(/;;/, /$/), n, { + match: [/(?:offset|align)/, /\s*/, /=/], + className: { + 1: "keyword", + 3: "operator" + } + }, { + className: "variable", + begin: /\$[\w_]+/ + }, { + match: /(\((?!;)|\))+/, + className: "punctuation", + relevance: 0 + }, { + begin: [/(?:func|call|call_indirect)/, /\s+/, /\$[^\s)]+/], + className: { + 1: "keyword", + 3: "title.function" + } + }, e.QUOTE_STRING_MODE, { + match: /(i32|i64|f32|f64)(?!\.)/, + className: "type" + }, { + className: "keyword", + match: /\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/ + }, { + className: "number", + relevance: 0, + match: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/ + }] + } + }, + grmr_yaml: e => { + const n = "true false yes no null", + t = "[\\w#;/?:@&=+$,.~*'()[\\]]+", + a = { + className: "string", + relevance: 0, + variants: [{ + begin: /'/, + end: /'/ + }, { + begin: /"/, + end: /"/ + }, { + begin: /\S+/ + }], + contains: [e.BACKSLASH_ESCAPE, { + className: "template-variable", + variants: [{ + begin: /\{\{/, + end: /\}\}/ + }, { + begin: /%\{/, + end: /\}/ + }] + }] + }, + i = e.inherit(a, { + variants: [{ + begin: /'/, + end: /'/ + }, { + begin: /"/, + end: /"/ + }, { + begin: /[^\s,{}[\]]+/ + }] + }), + r = { + end: ",", + endsWithParent: !0, + excludeEnd: !0, + keywords: n, + relevance: 0 + }, + s = { + begin: /\{/, + end: /\}/, + contains: [r], + illegal: "\\n", + relevance: 0 + }, + o = { + begin: "\\[", + end: "\\]", + contains: [r], + illegal: "\\n", + relevance: 0 + }, + l = [{ + className: "attr", + variants: [{ + begin: "\\w[\\w :\\/.-]*:(?=[ \t]|$)" + }, { + begin: '"\\w[\\w :\\/.-]*":(?=[ \t]|$)' + }, { + begin: "'\\w[\\w :\\/.-]*':(?=[ \t]|$)" + }] + }, { + className: "meta", + begin: "^---\\s*$", + relevance: 10 + }, { + className: "string", + begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*" + }, { + begin: "<%[%=-]?", + end: "[%-]?%>", + subLanguage: "ruby", + excludeBegin: !0, + excludeEnd: !0, + relevance: 0 + }, { + className: "type", + begin: "!\\w+!" + t + }, { + className: "type", + begin: "!<" + t + ">" + }, { + className: "type", + begin: "!" + t + }, { + className: "type", + begin: "!!" + t + }, { + className: "meta", + begin: "&" + e.UNDERSCORE_IDENT_RE + "$" + }, { + className: "meta", + begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$" + }, { + className: "bullet", + begin: "-(?=[ ]|$)", + relevance: 0 + }, e.HASH_COMMENT_MODE, { + beginKeywords: n, + keywords: { + literal: n + } + }, { + className: "number", + begin: "\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" + }, { + className: "number", + begin: e.C_NUMBER_RE + "\\b", + relevance: 0 + }, s, o, a], + c = [...l]; + return c.pop(), c.push(i), r.contains = c, { + name: "YAML", + case_insensitive: !0, + aliases: ["yml"], + contains: l + } + } +}); +const $e = V; +for (const e of Object.keys(Be)) { + const n = e.replace("grmr_", "").replace("_", "-"); + $e.registerLanguage(n, Be[e]) +} +export { + $e as + default +}; \ No newline at end of file diff --git a/lib/html-parser.js b/lib/html-parser.js new file mode 100644 index 0000000..0d28a40 --- /dev/null +++ b/lib/html-parser.js @@ -0,0 +1,352 @@ +/* + * HTML5 Parser By Sam Blowes + * + * Designed for HTML5 documents + * + * Original code by John Resig (ejohn.org) + * http://ejohn.org/blog/pure-javascript-html-parser/ + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * ---------------------------------------------------------------------------- + * License + * ---------------------------------------------------------------------------- + * + * This code is triple licensed using Apache Software License 2.0, + * Mozilla Public License or GNU Public License + * + * //////////////////////////////////////////////////////////////////////////// + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * //////////////////////////////////////////////////////////////////////////// + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Simple HTML Parser. + * + * The Initial Developer of the Original Code is Erik Arvidsson. + * Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights + * Reserved. + * + * //////////////////////////////////////////////////////////////////////////// + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ---------------------------------------------------------------------------- + * Usage + * ---------------------------------------------------------------------------- + * + * // Use like so: + * HTMLParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * // or to get an XML string: + * HTMLtoXML(htmlString); + * + * // or to get an XML DOM Document + * HTMLtoDOM(htmlString); + * + * // or to inject into an existing document/DOM node + * HTMLtoDOM(htmlString, document); + * HTMLtoDOM(htmlString, document.body); + * + */ +// Regular Expressions for parsing tags and attributes +var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; +var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; +var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5 + +var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5 +// fixed by xxx 将 ins 标签从块级名单中移除 + +var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5 + +var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open +// (and which close themselves) + +var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled" + +var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything) + +var special = makeMap('script,style'); +function HTMLParser(html, handler) { + var index; + var chars; + var match; + var stack = []; + var last = html; + + stack.last = function () { + return this[this.length - 1]; + }; + + while (html) { + chars = true; // Make sure we're not in a script or style element + + if (!stack.last() || !special[stack.last()]) { + // Comment + if (html.indexOf(''); + + if (index >= 0) { + if (handler.comment) { + handler.comment(html.substring(4, index)); + } + + html = html.substring(index + 3); + chars = false; + } // end tag + + } else if (html.indexOf(']*>'), function (all, text) { + text = text.replace(/|/g, '$1$2'); + + if (handler.chars) { + handler.chars(text); + } + + return ''; + }); + parseEndTag('', stack.last()); + } + + if (html == last) { + throw 'Parse Error: ' + html; + } + + last = html; + } // Clean up any remaining tags + + + parseEndTag(); + + function parseStartTag(tag, tagName, rest, unary) { + tagName = tagName.toLowerCase(); + + if (block[tagName]) { + while (stack.last() && inline[stack.last()]) { + parseEndTag('', stack.last()); + } + } + + if (closeSelf[tagName] && stack.last() == tagName) { + parseEndTag('', tagName); + } + + unary = empty[tagName] || !!unary; + + if (!unary) { + stack.push(tagName); + } + + if (handler.start) { + var attrs = []; + rest.replace(attr, function (match, name) { + var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : ''; + attrs.push({ + name: name, + value: value, + escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // " + + }); + }); + + if (handler.start) { + handler.start(tagName, attrs, unary); + } + } + } + + function parseEndTag(tag, tagName) { + // If no tag name is provided, clean shop + if (!tagName) { + var pos = 0; + } // Find the closest opened tag of the same type + else { + for (var pos = stack.length - 1; pos >= 0; pos--) { + if (stack[pos] == tagName) { + break; + } + } + } + + if (pos >= 0) { + // Close all the open elements, up the stack + for (var i = stack.length - 1; i >= pos; i--) { + if (handler.end) { + handler.end(stack[i]); + } + } // Remove the open elements from the stack + + + stack.length = pos; + } + } +} + +function makeMap(str) { + var obj = {}; + var items = str.split(','); + + for (var i = 0; i < items.length; i++) { + obj[items[i]] = true; + } + + return obj; +} + +function removeDOCTYPE(html) { + return html.replace(/<\?xml.*\?>\n/, '').replace(/\n/, '').replace(/\n/, ''); +} + +function parseAttrs(attrs) { + return attrs.reduce(function (pre, attr) { + var value = attr.value; + var name = attr.name; + + if (pre[name]) { + pre[name] = pre[name] + " " + value; + } else { + pre[name] = value; + } + + return pre; + }, {}); +} + +function parseHtml(html) { + html = removeDOCTYPE(html); + var stacks = []; + var results = { + node: 'root', + children: [] + }; + HTMLParser(html, { + start: function start(tag, attrs, unary) { + var node = { + name: tag + }; + + if (attrs.length !== 0) { + node.attrs = parseAttrs(attrs); + } + + if (unary) { + var parent = stacks[0] || results; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } else { + stacks.unshift(node); + } + }, + end: function end(tag) { + var node = stacks.shift(); + if (node.name !== tag) console.error('invalid state: mismatch end tag'); + + if (stacks.length === 0) { + results.children.push(node); + } else { + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }, + chars: function chars(text) { + var node = { + type: 'text', + text: text + }; + + if (stacks.length === 0) { + results.children.push(node); + } else { + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }, + comment: function comment(text) { + var node = { + node: 'comment', + text: text + }; + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }); + return results.children; +} + +export default parseHtml; \ No newline at end of file diff --git a/lib/lunar-javascript@1.7.2.js b/lib/lunar-javascript@1.7.2.js new file mode 100644 index 0000000..8d5ad17 --- /dev/null +++ b/lib/lunar-javascript@1.7.2.js @@ -0,0 +1,8 @@ +/** + * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. + * Original file: /npm/lunar-javascript@1.7.2/index.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +var n,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={exports:{}};n=t,function(i,t){if(n.exports)n.exports=t();else{var e=t();for(var a in e)i[a]=e[a]}}(i,(function(){var n,i,t,e,a,g,r,u,h,s,o,F,C,A,E,D,x,c,d,y,B,f,j,_,I,p,l,S,z,m,N,Y,w,M,Z,G,k,T,b,v,H,O,X,L,q,J,P,U,W,Q,R,K,V,$,nn,tn,en,an,gn,rn,un,hn,sn,on,Fn=(n=function(i,t,e,a,g,r){var u=i,h=t,s=e,o=a,F=g,C=r;if(i*=1,isNaN(i))throw new Error("wrong solar year "+u);if(t*=1,isNaN(t))throw new Error("wrong solar month "+h);if(e*=1,isNaN(e))throw new Error("wrong solar day "+s);if(a*=1,isNaN(a))throw new Error("wrong hour "+o);if(g*=1,isNaN(g))throw new Error("wrong minute "+F);if(r*=1,isNaN(r))throw new Error("wrong second "+C);if(1582===i&&10===t&&e>4&&e<15)throw new Error("wrong solar year "+i+" month "+t+" day "+e);if(t<1||t>12)throw new Error("wrong month "+t);if(e<1||e>31)throw new Error("wrong day "+e);if(a<0||a>23)throw new Error("wrong hour "+a);if(g<0||g>59)throw new Error("wrong minute "+g);if(r<0||r>59)throw new Error("wrong second "+r);return{_p:{year:i,month:t,day:e,hour:a,minute:g,second:r},subtract:function(n){return fn.getDaysBetween(n.getYear(),n.getMonth(),n.getDay(),this._p.year,this._p.month,this._p.day)},subtractMinute:function(n){var i=this.subtract(n),t=60*this._p.hour+this._p.minute-(60*n.getHour()+n.getMinute());return t<0&&(t+=1440,i--),t+=1440*i},isAfter:function(n){return this._p.year>n.getYear()||!(this._p.yearn.getMonth()||!(this._p.monthn.getDay()||!(this._p.dayn.getHour()||!(this._p.hourn.getMinute()||!(this._p.minuten.getSecond()))))},isBefore:function(n){return!(this._p.year>n.getYear())&&(this._p.yearn.getMonth())&&(this._p.monthn.getDay())&&(this._p.dayn.getHour())&&(this._p.hourn.getMinute())&&(this._p.minutefn.getDaysOfMonth(this._p.year,this._p.month)&&(i=fn.WEEK_FESTIVAL[this._p.month+"-0-"+e])&&n.push(i),n},getOtherFestivals:function(){var n=[],i=fn.OTHER_FESTIVAL[this._p.month+"-"+this._p.day];return i&&(n=n.concat(i)),n},getXingzuo:function(){return this.getXingZuo()},getXingZuo:function(){var n=11,i=100*this._p.month+this._p.day;return i>=321&&i<=419?n=0:i>=420&&i<=520?n=1:i>=521&&i<=621?n=2:i>=622&&i<=722?n=3:i>=723&&i<=822?n=4:i>=823&&i<=922?n=5:i>=923&&i<=1023?n=6:i>=1024&&i<=1122?n=7:i>=1123&&i<=1221?n=8:i>=1222||i<=119?n=9:i<=218&&(n=10),fn.XINGZUO[n]},toYmd:function(){for(var n=this._p.month,i=this._p.day,t=this._p.year+"";t.length<4;)t="0"+t;return[t,(n<10?"0":"")+n,(i<10?"0":"")+i].join("-")},toYmdHms:function(){return this.toYmd()+" "+[(this._p.hour<10?"0":"")+this._p.hour,(this._p.minute<10?"0":"")+this._p.minute,(this._p.second<10?"0":"")+this._p.second].join(":")},toString:function(){return this.toYmd()},toFullString:function(){var n=this.toYmdHms();this.isLeapYear()&&(n+=" 闰年"),n+=" 星期"+this.getWeekInChinese();for(var i=this.getFestivals(),t=0,e=i.length;t4&&g<15&&(g+=10):2===a&&g>28&&(fn.isLeapYear(e)||(g=28)),n(e,a,g,this._p.hour,this._p.minute,this._p.second)},nextMonth:function(i){var t=i;if(i*=1,isNaN(i))throw new Error("wrong months "+t);var e=En.fromYm(this._p.year,this._p.month).next(i),a=e.getYear(),g=e.getMonth(),r=this._p.day;if(1582===a&&10===g)r>4&&r<15&&(r+=10);else{var u=fn.getDaysOfMonth(a,g);r>u&&(r=u)}return n(a,g,r,this._p.hour,this._p.minute,this._p.second)},nextDay:function(i){var t=i;if(i*=1,isNaN(i))throw new Error("wrong days "+t);var e=this._p.year,a=this._p.month,g=this._p.day;if(1582===e&&10===a&&g>4&&(g-=10),i>0){g+=i;for(var r=fn.getDaysOfMonth(e,a);g>r;)g-=r,++a>12&&(a=1,e++),r=fn.getDaysOfMonth(e,a)}else if(i<0){for(;g+i<=0;)--a<1&&(a=12,e--),g+=fn.getDaysOfMonth(e,a);g+=i}return 1582===e&&10===a&&g>4&&(g+=10),n(e,a,g,this._p.hour,this._p.minute,this._p.second)},nextWorkday:function(i){var t=i;if(i*=1,isNaN(i))throw new Error("wrong days "+t);var e=n(this._p.year,this._p.month,this._p.day,this._p.hour,this._p.minute,this._p.second);if(0!==i)for(var a=Math.abs(i),g=i<1?-1:1;a>0;){e=e.next(g);var r=!0,u=_n.getHoliday(e.getYear(),e.getMonth(),e.getDay());if(u)r=u.isWork();else{var h=e.getWeek();0!==h&&6!==h||(r=!1)}r&&(a-=1)}return e},next:function(n,i){return i?this.nextWorkday(n):this.nextDay(n)},nextHour:function(i){var t=i;if(i*=1,isNaN(i))throw new Error("wrong hours "+t);var e=this._p.hour+i,a=e<0?-1:1,g=Math.abs(e),r=Math.floor(g/24)*a;(g=g%24*a)<0&&(g+=24,r--);var u=this.next(r);return n(u.getYear(),u.getMonth(),u.getDay(),g,u.getMinute(),u.getSecond())},getLunar:function(){return Cn.fromSolar(this)},getJulianDay:function(){var n=this._p.year,i=this._p.month,t=this._p.day+((this._p.second/60+this._p.minute)/60+this._p.hour)/24,e=0,a=!1;return 372*n+31*i+Math.floor(t)>=588829&&(a=!0),i<=2&&(i+=12,n--),a&&(e=2-(e=Math.floor(n/100))+Math.floor(e/4)),Math.floor(365.25*(n+4716))+Math.floor(30.6001*(i+1))+t+e-1524.5},getSalaryRate:function(){if(1===this._p.month&&1===this._p.day)return 3;if(5===this._p.month&&1===this._p.day)return 3;if(10===this._p.month&&this._p.day>=1&&this._p.day<=3)return 3;var n=this.getLunar();if(1===n.getMonth()&&n.getDay()>=1&&n.getDay()<=3)return 3;if(5===n.getMonth()&&5===n.getDay())return 3;if(8===n.getMonth()&&15===n.getDay())return 3;if("清明"===n.getJieQi())return 3;var i=_n.getHoliday(this._p.year,this._p.month,this._p.day);if(i){if(!i.isWork())return 2}else{var t=this.getWeek();if(6===t||0===t)return 2}return 1}}},{J2000:2451545,fromYmd:function(i,t,e){return n(i,t,e,0,0,0)},fromYmdHms:function(i,t,e,a,g,r){return n(i,t,e,a,g,r)},fromDate:function(i){return function(i){return n(i.getFullYear(),i.getMonth()+1,i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds())}(i)},fromJulianDay:function(i){return function(i){var t,e=Math.floor(i+.5),a=i+.5-e;e>=2299161&&(e+=1+(t=Math.floor((e-1867216.25)/36524.25))-Math.floor(t/4)),e+=1524;var g=Math.floor((e-122.1)/365.25);e-=Math.floor(365.25*g);var r=Math.floor(e/30.601),u=e-=Math.floor(30.601*r);r>13?(r-=13,g-=4715):(r-=1,g-=4716),a*=24;var h=Math.floor(a);a-=h,a*=60;var s=Math.floor(a);a-=s,a*=60;var o=Math.round(a);return o>59&&(o-=60,s++),s>59&&(s-=60,h++),h>23&&(h-=24,u+=1),n(g,r,u,h,s,o)}(i)},fromBaZi:function(n,i,t,e,a,g){return function(n,i,t,e,a,g){a*=1,isNaN(a)&&(a=2),1!==a&&(a=2),g*=1,isNaN(g)&&(g=1900);var r=[],u=jn.index(i.substring(1),jn.ZHI,-1)-2;if(u<0&&(u+=12),(2*(jn.index(n.substring(0,1),jn.GAN,-1)+1)+u)%10!==jn.index(i.substring(0,1),jn.GAN,-1))return r;var h=jn.getJiaZiIndex(n)-57;h<0&&(h+=60),h++,u*=2;var s=2*jn.index(e.substring(1),jn.ZHI,-1),o=[s];0===s&&2===a&&(o=[0,23]);for(var F=g-1,C=(new Date).getFullYear();h<=C;){if(h>=F){var A=Cn.fromYmd(h,1,1),E=A.getJieQiList(),D=A.getJieQiTable()[E[4+u]];if(D.getYear()>=g){var x=jn.getJiaZiIndex(t)-jn.getJiaZiIndex(D.getLunar().getDayInGanZhiExact2());x<0&&(x+=60),x>0&&(D=D.next(x));for(var c=0,d=o.length;c=E&&(r++,u++),C>=D&&(h++,s++)),n.yearGanIndex=a,n.yearZhiIndex=g,n.yearGanIndexByLiChun=(r<0?r+10:r)%10,n.yearZhiIndexByLiChun=(u<0?u+12:u)%12,n.yearGanIndexExact=(h<0?h+10:h)%10,n.yearZhiIndexExact=(s<0?s+12:s)%12}(r,a,n),function(n,i){var t,e,a=null,g=jn.JIE_QI_IN_USE.length,r=-3;for(t=0;t=(null==a?u:a.toYmd())&&u=(null==a?s:a.toYmdHms())&&s="23:00"&&o<="23:59"&&(++h>=10&&(h-=10),++s>=12&&(s-=12)),n.dayGanIndexExact=h,n.dayZhiIndexExact=s}(r,a,i,t),function(n,i,t){var e=jn.getTimeZhiIndex((i<10?"0":"")+i+":"+(t<10?"0":"")+t);n.timeZhiIndex=e,n.timeGanIndex=(n.dayGanIndexExact%5*2+e)%10}(r,i,t),function(n,i){n.weekIndex=i.getWeek()}(r,a),r},i=function(n){for(var i=0,t=0,a=0,g=dn.fromYear(n.getYear()),r=g.getMonths(),u=0,h=r.length;u23)throw new Error("wrong hour "+a);if(g<0||g>59)throw new Error("wrong minute "+g);if(r<0||r>59)throw new Error("wrong second "+r);var A=dn.fromYear(n),E=A.getMonth(i);if(null==E)throw new Error("wrong lunar year "+n+" month "+i);if(t<1)throw new Error("lunar day must bigger than 0");var D=E.getDayCount();if(t>D)throw new Error("only "+D+" days in lunar year "+n+" month "+i);var x=Fn.fromJulianDay(E.getFirstJulianDay()+t-1),c=Fn.fromYmdHms(x.getYear(),x.getMonth(),x.getDay(),a,g,r);return x.getYear()!==n&&(A=dn.fromYear(x.getYear())),e(n,i,t,a,g,r,c,A)},e=function(i,t,e,a,g,r,u,h){var s=n(i,a,g,0,u,h);return{_p:{lang:Mn.getLanguage(),year:i,month:t,day:e,hour:a,minute:g,second:r,timeGanIndex:s.timeGanIndex,timeZhiIndex:s.timeZhiIndex,dayGanIndex:s.dayGanIndex,dayZhiIndex:s.dayZhiIndex,dayGanIndexExact:s.dayGanIndexExact,dayZhiIndexExact:s.dayZhiIndexExact,dayGanIndexExact2:s.dayGanIndexExact2,dayZhiIndexExact2:s.dayZhiIndexExact2,monthGanIndex:s.monthGanIndex,monthZhiIndex:s.monthZhiIndex,monthGanIndexExact:s.monthGanIndexExact,monthZhiIndexExact:s.monthZhiIndexExact,yearGanIndex:s.yearGanIndex,yearZhiIndex:s.yearZhiIndex,yearGanIndexByLiChun:s.yearGanIndexByLiChun,yearZhiIndexByLiChun:s.yearZhiIndexByLiChun,yearGanIndexExact:s.yearGanIndexExact,yearZhiIndexExact:s.yearZhiIndexExact,weekIndex:s.weekIndex,jieQi:s.jieQi,jieQiList:s.jieQiList,solar:u,eightChar:null},getYear:function(){return this._p.year},getMonth:function(){return this._p.month},getDay:function(){return this._p.day},getHour:function(){return this._p.hour},getMinute:function(){return this._p.minute},getSecond:function(){return this._p.second},getTimeGanIndex:function(){return this._p.timeGanIndex},getTimeZhiIndex:function(){return this._p.timeZhiIndex},getDayGanIndex:function(){return this._p.dayGanIndex},getDayGanIndexExact:function(){return this._p.dayGanIndexExact},getDayGanIndexExact2:function(){return this._p.dayGanIndexExact2},getDayZhiIndex:function(){return this._p.dayZhiIndex},getDayZhiIndexExact:function(){return this._p.dayZhiIndexExact},getDayZhiIndexExact2:function(){return this._p.dayZhiIndexExact2},getMonthGanIndex:function(){return this._p.monthGanIndex},getMonthGanIndexExact:function(){return this._p.monthGanIndexExact},getMonthZhiIndex:function(){return this._p.monthZhiIndex},getMonthZhiIndexExact:function(){return this._p.monthZhiIndexExact},getYearGanIndex:function(){return this._p.yearGanIndex},getYearGanIndexByLiChun:function(){return this._p.yearGanIndexByLiChun},getYearGanIndexExact:function(){return this._p.yearGanIndexExact},getYearZhiIndex:function(){return this._p.yearZhiIndex},getYearZhiIndexByLiChun:function(){return this._p.yearZhiIndexByLiChun},getYearZhiIndexExact:function(){return this._p.yearZhiIndexExact},getGan:function(){return this.getYearGan()},getZhi:function(){return this.getYearZhi()},getYearGan:function(){return jn.GAN[this._p.yearGanIndex+1]},getYearGanByLiChun:function(){return jn.GAN[this._p.yearGanIndexByLiChun+1]},getYearGanExact:function(){return jn.GAN[this._p.yearGanIndexExact+1]},getYearZhi:function(){return jn.ZHI[this._p.yearZhiIndex+1]},getYearZhiByLiChun:function(){return jn.ZHI[this._p.yearZhiIndexByLiChun+1]},getYearZhiExact:function(){return jn.ZHI[this._p.yearZhiIndexExact+1]},getYearInGanZhi:function(){return this.getYearGan()+this.getYearZhi()},getYearInGanZhiByLiChun:function(){return this.getYearGanByLiChun()+this.getYearZhiByLiChun()},getYearInGanZhiExact:function(){return this.getYearGanExact()+this.getYearZhiExact()},getMonthGan:function(){return jn.GAN[this._p.monthGanIndex+1]},getMonthGanExact:function(){return jn.GAN[this._p.monthGanIndexExact+1]},getMonthZhi:function(){return jn.ZHI[this._p.monthZhiIndex+1]},getMonthZhiExact:function(){return jn.ZHI[this._p.monthZhiIndexExact+1]},getMonthInGanZhi:function(){return this.getMonthGan()+this.getMonthZhi()},getMonthInGanZhiExact:function(){return this.getMonthGanExact()+this.getMonthZhiExact()},getDayGan:function(){return jn.GAN[this._p.dayGanIndex+1]},getDayGanExact:function(){return jn.GAN[this._p.dayGanIndexExact+1]},getDayGanExact2:function(){return jn.GAN[this._p.dayGanIndexExact2+1]},getDayZhi:function(){return jn.ZHI[this._p.dayZhiIndex+1]},getDayZhiExact:function(){return jn.ZHI[this._p.dayZhiIndexExact+1]},getDayZhiExact2:function(){return jn.ZHI[this._p.dayZhiIndexExact2+1]},getDayInGanZhi:function(){return this.getDayGan()+this.getDayZhi()},getDayInGanZhiExact:function(){return this.getDayGanExact()+this.getDayZhiExact()},getDayInGanZhiExact2:function(){return this.getDayGanExact2()+this.getDayZhiExact2()},getTimeGan:function(){return jn.GAN[this._p.timeGanIndex+1]},getTimeZhi:function(){return jn.ZHI[this._p.timeZhiIndex+1]},getTimeInGanZhi:function(){return this.getTimeGan()+this.getTimeZhi()},getShengxiao:function(){return this.getYearShengXiao()},getYearShengXiao:function(){return jn.SHENGXIAO[this._p.yearZhiIndex+1]},getYearShengXiaoByLiChun:function(){return jn.SHENGXIAO[this._p.yearZhiIndexByLiChun+1]},getYearShengXiaoExact:function(){return jn.SHENGXIAO[this._p.yearZhiIndexExact+1]},getMonthShengXiao:function(){return jn.SHENGXIAO[this._p.monthZhiIndex+1]},getMonthShengXiaoExact:function(){return jn.SHENGXIAO[this._p.monthZhiIndexExact+1]},getDayShengXiao:function(){return jn.SHENGXIAO[this._p.dayZhiIndex+1]},getTimeShengXiao:function(){return jn.SHENGXIAO[this._p.timeZhiIndex+1]},getYearInChinese:function(){for(var n=this._p.year+"",i="",t="0".charCodeAt(0),e=0,a=n.length;e-1?Mn.getMessage("bg.zhen"):[Mn.getMessage("jz.bingZi"),Mn.getMessage("jz.dingChou"),Mn.getMessage("jz.wuYin"),Mn.getMessage("jz.jiMao"),Mn.getMessage("jz.gengChen"),Mn.getMessage("jz.xinSi")].join(",").indexOf(i)>-1?Mn.getMessage("bg.li"):[Mn.getMessage("jz.wuZi"),Mn.getMessage("jz.jiChou"),Mn.getMessage("jz.gengYin"),Mn.getMessage("jz.xinMao"),Mn.getMessage("jz.renChen"),Mn.getMessage("jz.guiSi")].join(",").indexOf(i)>-1?Mn.getMessage("ps.center"):[Mn.getMessage("jz.gengZi"),Mn.getMessage("jz.xinChou"),Mn.getMessage("jz.renYin"),Mn.getMessage("jz.guiMao"),Mn.getMessage("jz.jiaChen"),Mn.getMessage("jz.yiSi")].join(",").indexOf(i)>-1?Mn.getMessage("bg.dui"):[Mn.getMessage("jz.renZi"),Mn.getMessage("jz.guiChou"),Mn.getMessage("jz.jiaYin"),Mn.getMessage("jz.yiMao"),Mn.getMessage("jz.bingChen"),Mn.getMessage("jz.dingSi")].join(",").indexOf(i)>-1?Mn.getMessage("bg.kan"):jn.POSITION_TAI_SUI_YEAR[t]},getDayPositionTaiSuiDesc:function(n){return jn.POSITION_DESC[this.getDayPositionTaiSui(n)]},getMonthPositionTaiSui:function(n){var i,t;3===n?(i=this._p.monthZhiIndexExact,t=this._p.monthGanIndexExact):(i=this._p.monthZhiIndex,t=this._p.monthGanIndex);var e=i-jn.BASE_MONTH_ZHI_INDEX;return e<0&&(e+=12),[Mn.getMessage("bg.gen"),jn.POSITION_GAN[t],Mn.getMessage("bg.kun"),Mn.getMessage("bg.xun")][e%4]},getMonthPositionTaiSuiDesc:function(n){return jn.POSITION_DESC[this.getMonthPositionTaiSui(n)]},getYearPositionTaiSui:function(n){var i;switch(n){case 1:i=this._p.yearZhiIndex;break;case 3:i=this._p.yearZhiIndexExact;break;default:i=this._p.yearZhiIndexByLiChun}return jn.POSITION_TAI_SUI_YEAR[i]},getYearPositionTaiSuiDesc:function(n){return jn.POSITION_DESC[this.getYearPositionTaiSui(n)]},_checkLang:function(){var n=Mn.getLanguage();if(this._p.lang!==n){for(var i=0,t=jn.JIE_QI_IN_USE.length;i=29&&this._p.year!==this.next(1).getYear()&&n.push(Mn.getMessage("jr.chuXi")),n},getOtherFestivals:function(){var n=[],i=jn.OTHER_FESTIVAL[this._p.month+"-"+this._p.day];i&&(n=n.concat(i));var t=this._p.solar.toYmd();this._p.solar.toYmd()===this._getJieQiSolar(Mn.getMessage("jq.qingMing")).next(-1).toYmd()&&n.push("寒食节");var e=this._getJieQiSolar(Mn.getMessage("jq.liChun")),a=4-e.getLunar().getDayGanIndex();return a<0&&(a+=10),t===e.next(a+40).toYmd()&&n.push("春社"),(a=4-(e=this._getJieQiSolar(Mn.getMessage("jq.liQiu"))).getLunar().getDayGanIndex())<0&&(a+=10),t===e.next(a+40).toYmd()&&n.push("秋社"),n},getBaZi:function(){var n=this.getEightChar(),i=[];return i.push(n.getYear()),i.push(n.getMonth()),i.push(n.getDay()),i.push(n.getTime()),i},getBaZiWuXing:function(){var n=this.getEightChar(),i=[];return i.push(n.getYearWuXing()),i.push(n.getMonthWuXing()),i.push(n.getDayWuXing()),i.push(n.getTimeWuXing()),i},getBaZiNaYin:function(){var n=this.getEightChar(),i=[];return i.push(n.getYearNaYin()),i.push(n.getMonthNaYin()),i.push(n.getDayNaYin()),i.push(n.getTimeNaYin()),i},getBaZiShiShenGan:function(){var n=this.getEightChar(),i=[];return i.push(n.getYearShiShenGan()),i.push(n.getMonthShiShenGan()),i.push(n.getDayShiShenGan()),i.push(n.getTimeShiShenGan()),i},getBaZiShiShenZhi:function(){var n=this.getEightChar(),i=[];return i.push(n.getYearShiShenZhi()[0]),i.push(n.getMonthShiShenZhi()[0]),i.push(n.getDayShiShenZhi()[0]),i.push(n.getTimeShiShenZhi()[0]),i},getBaZiShiShenYearZhi:function(){return this.getEightChar().getYearShiShenZhi()},getBaZiShiShenMonthZhi:function(){return this.getEightChar().getMonthShiShenZhi()},getBaZiShiShenDayZhi:function(){return this.getEightChar().getDayShiShenZhi()},getBaZiShiShenTimeZhi:function(){return this.getEightChar().getTimeShiShenZhi()},getZhiXing:function(){var n=this._p.dayZhiIndex-this._p.monthZhiIndex;return n<0&&(n+=12),jn.ZHI_XING[n+1]},getDayTianShen:function(){var n=this.getMonthZhi(),i=jn.ZHI_TIAN_SHEN_OFFSET[n];return jn.TIAN_SHEN[(this._p.dayZhiIndex+i)%12+1]},getTimeTianShen:function(){var n=this.getDayZhiExact(),i=jn.ZHI_TIAN_SHEN_OFFSET[n];return jn.TIAN_SHEN[(this._p.timeZhiIndex+i)%12+1]},getDayTianShenType:function(){return jn.TIAN_SHEN_TYPE[this.getDayTianShen()]},getTimeTianShenType:function(){return jn.TIAN_SHEN_TYPE[this.getTimeTianShen()]},getDayTianShenLuck:function(){return jn.TIAN_SHEN_TYPE_LUCK[this.getDayTianShenType()]},getTimeTianShenLuck:function(){return jn.TIAN_SHEN_TYPE_LUCK[this.getTimeTianShenType()]},getDayPositionTai:function(){return jn.POSITION_TAI_DAY[jn.getJiaZiIndex(this.getDayInGanZhi())]},getMonthPositionTai:function(){var n=this._p.month;return n<0?"":jn.POSITION_TAI_MONTH[n-1]},getDayYi:function(n){return n*=1,isNaN(n)&&(n=1),jn.getDayYi(2===n?this.getMonthInGanZhiExact():this.getMonthInGanZhi(),this.getDayInGanZhi())},getDayJi:function(n){return n*=1,isNaN(n)&&(n=1),jn.getDayJi(2===n?this.getMonthInGanZhiExact():this.getMonthInGanZhi(),this.getDayInGanZhi())},getDayJiShen:function(){return jn.getDayJiShen(this.getMonth(),this.getDayInGanZhi())},getDayXiongSha:function(){return jn.getDayXiongSha(this.getMonth(),this.getDayInGanZhi())},getTimeYi:function(){return jn.getTimeYi(this.getDayInGanZhiExact(),this.getTimeInGanZhi())},getTimeJi:function(){return jn.getTimeJi(this.getDayInGanZhiExact(),this.getTimeInGanZhi())},getYueXiang:function(){return jn.YUE_XIANG[this._p.day]},_getYearNineStar:function(n){var i=jn.getJiaZiIndex(n)+1,t=i-(jn.getJiaZiIndex(this.getYearInGanZhi())+1);t>1?t-=60:t<-1&&(t+=60);var e=(62+Math.floor((this._p.year+t+2696)/60)%3*3-i)%9;return 0===e&&(e=9),In.fromIndex(e-1)},getYearNineStar:function(n){var i;switch(n){case 1:i=this.getYearInGanZhi();break;case 3:i=this.getYearInGanZhiExact();break;default:i=this.getYearInGanZhiByLiChun()}return this._getYearNineStar(i)},getMonthNineStar:function(n){var i,t;switch(n){case 1:i=this._p.yearZhiIndex,t=this._p.monthZhiIndex;break;case 3:i=this._p.yearZhiIndexExact,t=this._p.monthZhiIndexExact;break;default:i=this._p.yearZhiIndexByLiChun,t=this._p.monthZhiIndex}var e=27-i%3*3;return t29?a.next(60-u):a.next(-u)).toYmd(),F=(i=h>29?g.next(60-h):g.next(-h)).toYmd(),C=(t=s>29?r.next(60-s):r.next(-s)).toYmd(),A=0;return e>=o&&e=C&&e=F?A=this._p.solar.subtract(i)%9:e=this._getJieQiSolar(Mn.getMessage("jq.dongZhi")).toYmd()&&n=this._getJieQiSolar("DONG_ZHI").toYmd())&&(i=!0);var t=(i?[0,3,6]:[8,5,2])[this.getDayZhiIndex()%3],e=this.getTimeZhiIndex(),a=i?t+e:t+9-e;return In.fromIndex(a%9)},getSolar:function(){return this._p.solar},getJieQiTable:function(){return this._checkLang(),this._p.jieQi},getJieQiList:function(){return this._p.jieQiList},getNextJie:function(n){for(var i=[],t=0,e=jn.JIE_QI_IN_USE.length/2;ts)continue;(null==a||A>a[t?"toYmd":"toYmdHms"]())&&(e=F,a=C)}}}return null==a?null:this._buildJieQi(e,a)},getCurrentJieQi:function(){for(var n in this._p.jieQi){var i=this._getJieQiSolar(n);if(i.getYear()===this._p.solar.getYear()&&i.getMonth()===this._p.solar.getMonth()&&i.getDay()===this._p.solar.getDay())return this._buildJieQi(this._convertJieQi(n),i)}return null},getCurrentJie:function(){for(var n=0,i=jn.JIE_QI_IN_USE.length;n0&&(n+=" ["+a+"]"),n+=" "+this.getGong()+"方"+this.getShou(),n+=" 星宿["+this.getXiu()+this.getZheng()+this.getAnimal()+"]("+this.getXiuLuck()+")",n+=" 彭祖百忌["+this.getPengZuGan()+" "+this.getPengZuZhi()+"]",n+=" 喜神方位["+this.getDayPositionXi()+"]("+this.getDayPositionXiDesc()+")",n+=" 阳贵神方位["+this.getDayPositionYangGui()+"]("+this.getDayPositionYangGuiDesc()+")",n+=" 阴贵神方位["+this.getDayPositionYinGui()+"]("+this.getDayPositionYinGuiDesc()+")",n+=" 福神方位["+this.getDayPositionFu()+"]("+this.getDayPositionFuDesc()+")",n+=" 财神方位["+this.getDayPositionCai()+"]("+this.getDayPositionCaiDesc()+")",n+=" 冲["+this.getDayChongDesc()+"]",n+=" 煞["+this.getDaySha()+"]"},_buildNameAndIndex:function(n,i){return{_p:{name:n,index:i},getName:function(){return this._p.name},setName:function(n){this._p.name=n},getIndex:function(){return this._p.index},setIndex:function(n){this._p.index=n},toString:function(){return this.getName()},toFullString:function(){return this.getName()+"第"+this.getIndex()+"天"}}},getShuJiu:function(){var n=Fn.fromYmd(this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay()),i=this._getJieQiSolar("DONG_ZHI"),t=Fn.fromYmd(i.getYear(),i.getMonth(),i.getDay());n.isBefore(t)&&(i=this._getJieQiSolar(Mn.getMessage("jq.dongZhi")),t=Fn.fromYmd(i.getYear(),i.getMonth(),i.getDay()));var e=Fn.fromYmd(i.getYear(),i.getMonth(),i.getDay()).next(81);if(n.isBefore(t)||!n.isBefore(e))return null;var a=n.subtract(t);return this._buildNameAndIndex(jn.NUMBER[Math.floor(a/9)+1]+"九",a%9+1)},getFu:function(){var n=Fn.fromYmd(this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay()),i=this._getJieQiSolar(Mn.getMessage("jq.xiaZhi")),t=this._getJieQiSolar(Mn.getMessage("jq.liQiu")),e=Fn.fromYmd(i.getYear(),i.getMonth(),i.getDay()),a=6-i.getLunar().getDayGanIndex();if(a<0&&(a+=10),a+=20,e=e.next(a),n.isBefore(e))return null;var g=n.subtract(e);if(g<10)return this._buildNameAndIndex("初伏",g+1);if(e=e.next(10),(g=n.subtract(e))<10)return this._buildNameAndIndex("中伏",g+1);e=e.next(10);var r=Fn.fromYmd(t.getYear(),t.getMonth(),t.getDay());if(g=n.subtract(e),r.isAfter(e)){if(g<10)return this._buildNameAndIndex("中伏",g+11);e=e.next(10),g=n.subtract(e)}return g<10?this._buildNameAndIndex("末伏",g+1):null},getLiuYao:function(){return jn.LIU_YAO[(Math.abs(this._p.month)+this._p.day-2)%6]},getWuHou:function(){var n=this.getPrevJieQi(!0),i=jn.find(n.getName(),jn.JIE_QI),t=Fn.fromYmd(this._p.solar.getYear(),this._p.solar.getMonth(),this._p.solar.getDay()),e=n.getSolar(),a=Fn.fromYmd(e.getYear(),e.getMonth(),e.getDay()),g=Math.floor(t.subtract(a)/5);return g>2&&(g=2),jn.WU_HOU[(3*i.index+g)%jn.WU_HOU.length]},getHou:function(){var n=this.getPrevJieQi(!0),i=this._p.solar.subtract(n.getSolar()),t=jn.HOU.length-1,e=Math.floor(i/5);return e>t&&(e=t),n.getName()+" "+jn.HOU[e]},getDayLu:function(){var n=jn.LU[this.getDayGan()],i=jn.LU[this.getDayZhi()],t=n+"命互禄";return i&&(t+=" "+i+"命进禄"),t},getTime:function(){return ln.fromYmdHms(this._p.year,this._p.month,this._p.day,this._p.hour,this._p.minute,this._p.second)},getTimes:function(){var n=[];n.push(ln.fromYmdHms(this._p.year,this._p.month,this._p.day,0,0,0));for(var i=0;i<12;i++)n.push(ln.fromYmdHms(this._p.year,this._p.month,this._p.day,2*(i+1)-1,0,0));return n},getFoto:function(){return zn.fromLunar(this)},getTao:function(){return wn.fromLunar(this)}}};return{fromYmdHms:function(n,i,e,a,g,r){return t(n,i,e,a,g,r)},fromYmd:function(n,i,e){return t(n,i,e,0,0,0)},fromSolar:function(n){return i(n)},fromDate:function(n){return function(n){return i(Fn.fromDate(n))}(n)}}}(),An=(i=function(n,t,e,a){var g=n,r=t,u=e;if(n*=1,isNaN(n))throw new Error("wrong solar year "+g);if(t*=1,isNaN(t))throw new Error("wrong solar month "+r);if(e*=1,isNaN(e))throw new Error("wrong solar day "+u);return a*=1,isNaN(a)&&(a=0),{_p:{year:n,month:t,day:e,start:a},getYear:function(){return this._p.year},getMonth:function(){return this._p.month},getDay:function(){return this._p.day},getStart:function(){return this._p.start},getIndex:function(){var n=Fn.fromYmd(this._p.year,this._p.month,1).getWeek()-this._p.start;return n<0&&(n+=7),Math.ceil((this._p.day+n)/7)},getIndexInYear:function(){var n=Fn.fromYmd(this._p.year,1,1).getWeek()-this._p.start;return n<0&&(n+=7),Math.ceil((fn.getDaysInYear(this._p.year,this._p.month,this._p.day)+n)/7)},next:function(n,t){var e=n;if(n*=1,isNaN(n))throw new Error("wrong weeks "+e);var a=this._p.start;if(0===n)return i(this._p.year,this._p.month,this._p.day,a);var g=Fn.fromYmd(this._p.year,this._p.month,this._p.day);if(t){for(var r=n,u=i(this._p.year,this._p.month,this._p.day,a),h=this._p.month,s=r>0;0!==r;){g=g.next(s?7:-7);var o=(u=i(g.getYear(),g.getMonth(),g.getDay(),a)).getMonth();if(h!==o){var F=u.getIndex();if(s)if(1===F){var C=u.getFirstDay();o=(u=i(C.getYear(),C.getMonth(),C.getDay(),a)).getMonth()}else g=Fn.fromYmd(u.getYear(),u.getMonth(),1),u=i(g.getYear(),g.getMonth(),g.getDay(),a);else if(fn.getWeeksOfMonth(u.getYear(),u.getMonth(),a)===F){var A=u.getFirstDay().next(6);o=(u=i(A.getYear(),A.getMonth(),A.getDay(),a)).getMonth()}else g=Fn.fromYmd(u.getYear(),u.getMonth(),fn.getDaysOfMonth(u.getYear(),u.getMonth())),u=i(g.getYear(),g.getMonth(),g.getDay(),a);h=o}r-=s?1:-1}return u}return g=g.next(7*n),i(g.getYear(),g.getMonth(),g.getDay(),a)},getFirstDay:function(){var n=Fn.fromYmd(this._p.year,this._p.month,this._p.day),i=n.getWeek()-this._p.start;return i<0&&(i+=7),n.next(-i)},getFirstDayInMonth:function(){for(var n=0,i=this.getDays(),t=0;t12?(a-=12,g++):a<1&&(a+=12,g--),t(g,a)},getDays:function(){var n=[],i=Fn.fromYmd(this._p.year,this._p.month,1);n.push(i);for(var t=fn.getDaysOfMonth(this._p.year,this._p.month),e=1;ethis._p.year||e.getMonth()>this._p.month)break}return i},toString:function(){return this.getYear()+"-"+this.getMonth()},toFullString:function(){return this.getYear()+"年"+this.getMonth()+"月"}}},{fromYm:function(n,i){return t(n,i)},fromDate:function(n){return function(n){var i=Fn.fromDate(n);return t(i.getYear(),i.getMonth())}(n)}}),Dn=function(){var n=function(i,t){var e=i,a=t;if(i*=1,isNaN(i))throw new Error("wrong solar year "+e);if(t*=1,isNaN(t))throw new Error("wrong solar month "+a);return{_p:{year:i,month:t},getYear:function(){return this._p.year},getMonth:function(){return this._p.month},getIndex:function(){return Math.ceil(this._p.month/3)},next:function(i){var t=i;if(i*=1,isNaN(i))throw new Error("wrong seasons "+t);var e=En.fromYm(this._p.year,this._p.month).next(3*i);return n(e.getYear(),e.getMonth())},getMonths:function(){for(var n=[],i=this.getIndex()-1,t=0;t<3;t++)n.push(En.fromYm(this._p.year,3*i+t+1));return n},toString:function(){return this.getYear()+"."+this.getIndex()},toFullString:function(){return this.getYear()+"年"+this.getIndex()+"季度"}}};return{fromYm:function(i,t){return n(i,t)},fromDate:function(i){return function(i){var t=Fn.fromDate(i);return n(t.getYear(),t.getMonth())}(i)}}}(),xn=function(){var n=function(i,t){var e=i,a=t;if(i*=1,isNaN(i))throw new Error("wrong solar year "+e);if(t*=1,isNaN(t))throw new Error("wrong solar month "+a);return{_p:{year:i,month:t},getYear:function(){return this._p.year},getMonth:function(){return this._p.month},getIndex:function(){return Math.ceil(this._p.month/6)},next:function(i){var t=i;if(i*=1,isNaN(i))throw new Error("wong halfYears "+t);var e=En.fromYm(this._p.year,this._p.month).next(6*i);return n(e.getYear(),e.getMonth())},getMonths:function(){for(var n=[],i=this.getIndex()-1,t=0;t<6;t++)n.push(En.fromYm(this._p.year,6*i+t+1));return n},toString:function(){return this.getYear()+"."+this.getIndex()},toFullString:function(){return this.getYear()+"年"+["上","下"][this.getIndex()-1]+"半年"}}};return{fromYm:function(i,t){return n(i,t)},fromDate:function(i){return function(i){var t=Fn.fromDate(i);return n(t.getYear(),t.getMonth())}(i)}}}(),cn=(e=function(n){var i=n;if(n*=1,isNaN(n))throw new Error("wrong solar year "+i);return{_p:{year:n},getYear:function(){return this._p.year},next:function(n){var i=n;if(n*=1,isNaN(n))throw new Error("wrong years "+i);return e(this._p.year+n)},getMonths:function(){var n=[],i=En.fromYm(this._p.year,1);n.push(i);for(var t=1;t<12;t++)n.push(i.next(t));return n},toString:function(){return this.getYear()+""},toFullString:function(){return this.getYear()+"年"}}},{fromYear:function(n){return e(n)},fromDate:function(n){return function(n){return e(Fn.fromDate(n).getYear())}(n)}}),dn=(a=["下","上","中"],g=["七","八","九","一","二","三","四","五","六"],r=[75,94,170,265,322,398,469,553,583,610,678,735,754,773,849,887,936,1050,1069,1126,1145,1164,1183,1259,1278,1308,1373,1403,1441,1460,1498,1555,1593,1612,1631,1642,2033,2128,2147,2242,2614,2728,2910,3062,3244,3339,3616,3711,3730,3825,4007,4159,4197,4322,4341,4379,4417,4531,4599,4694,4713,4789,4808,4971,5085,5104,5161,5180,5199,5294,5305,5476,5677,5696,5772,5791,5848,5886,6049,6068,6144,6163,6258,6402,6440,6497,6516,6630,6641,6660,6679,6736,6774,6850,6869,6899,6918,6994,7013,7032,7051,7070,7089,7108,7127,7146,7222,7271,7290,7309,7366,7385,7404,7442,7461,7480,7491,7499,7594,7624,7643,7662,7681,7719,7738,7814,7863,7882,7901,7939,7958,7977,7996,8034,8053,8072,8091,8121,8159,8186,8216,8235,8254,8273,8311,8330,8341,8349,8368,8444,8463,8474,8493,8531,8569,8588,8626,8664,8683,8694,8702,8713,8721,8751,8789,8808,8816,8827,8846,8884,8903,8922,8941,8971,9036,9066,9085,9104,9123,9142,9161,9180,9199,9218,9256,9294,9313,9324,9343,9362,9381,9419,9438,9476,9514,9533,9544,9552,9563,9571,9582,9601,9639,9658,9666,9677,9696,9734,9753,9772,9791,9802,9821,9886,9897,9916,9935,9954,9973,9992],u=[37,56,113,132,151,189,208,227,246,284,303,341,360,379,417,436,458,477,496,515,534,572,591,629,648,667,697,716,792,811,830,868,906,925,944,963,982,1001,1020,1039,1058,1088,1153,1202,1221,1240,1297,1335,1392,1411,1422,1430,1517,1525,1536,1574,3358,3472,3806,3988,4751,4941,5066,5123,5275,5343,5438,5457,5495,5533,5552,5715,5810,5829,5905,5924,6421,6535,6793,6812,6888,6907,7002,7184,7260,7279,7374,7556,7746,7757,7776,7833,7852,7871,7966,8015,8110,8129,8148,8224,8243,8338,8406,8425,8482,8501,8520,8558,8596,8607,8615,8645,8740,8778,8835,8865,8930,8960,8979,8998,9017,9055,9074,9093,9112,9150,9188,9237,9275,9332,9351,9370,9408,9427,9446,9457,9465,9495,9560,9590,9628,9647,9685,9715,9742,9780,9810,9818,9829,9848,9867,9905,9924,9943,9962,1e4],h=null,s=[11,12,1,2,3,4,5,6,7,8,9,10],o=function(n,i){for(var t=0,e=n.length;tF&&(C-=365.2422),n=0;n<26;n++)t.push(Bn.calcQi(C+15.2184*n));for(n=0,i=jn.JIE_QI_IN_USE.length;nt[0]&&(C-=29.53),n=0;n<16;n++)e.push(Bn.calcShuo(C+29.5306*n));for(n=0;n<15;n++)a.push(Math.floor(e[n+1]-e[n])),g.push(n);var A=h-1,E=16;if(o(r,h))E=13;else if(o(u,h))E=14;else if(e[13]<=t[24]){for(n=1;e[n+1]>t[2*n]&&n<13;)n++;E=n}for(i=E;i<15;i++)g[i]-=1;var D=-1,x=-1,c=A;for(n=0;n<15;n++){var d=e[n]+Fn.J2000,y=g[n],B=s[y%12];1724360<=d&&d<1729794||1807724<=d&&d<1808699?B=s[(y+1)%12]:1729794!==d&&1808699!==d||(B=12),-1===D&&(D=B,x=B),B0){for(;;){for(a=o.length,t=0;te&&(a=e)),g=0;for(var F=t;F0&&(u+=1.43*C-.866+.054*C*C),h/=1e4,s/=1e8,o/=1e8,(i*=6)<0&&(i=g);for(var A=0,E=a.length;A0&&(c+=6),c>=x&&(c=x),t=0,e=0;t=e)return n>e+100?this.dtExt(n,31):this.dtExt(n,31)-(this.dtExt(e,31)-a)*(e+100-n)/100;for(i=0;ithis.SECOND_PER_DAY-1200)&&(i=36525*this.saLonT(n)-this.dtT(i)+this.ONE_THIRD),i},shuoHigh:function(n){var i=36525*this.msaLonT2(n),t=((i=i-this.dtT(i)+this.ONE_THIRD)+.5)%1*this.SECOND_PER_DAY;return(t<1800||t>this.SECOND_PER_DAY-1800)&&(i=36525*this.msaLonT(n)-this.dtT(i)+this.ONE_THIRD),i},qiLow:function(n){var i=628.3319653318,t=(n-4.895062166)/i;return t-=(53*t*t+334116*Math.cos(4.67+628.307585*t)+2061*Math.cos(2.678+628.3076*t)*t)/i/1e7,36525*(t-=((48950621.66+6283319653.318*t+53*t*t+334166*Math.cos(4.669257+628.307585*t)+3489*Math.cos(4.6261+1256.61517*t)+2060.6*Math.cos(2.67823+628.307585*t)*t-994-834*Math.sin(2.1824-33.75705*t))/1e7-n)/628.332+(32*(t+1.8)*(t+1.8)-20)/this.SECOND_PER_DAY/36525)+this.ONE_THIRD},shuoLow:function(n){var i=7771.37714500204,t=(n+1.08472)/i;return 36525*(t-=(-331e-7*t*t+.10976*Math.cos(.785+8328.6914*t)+.02224*Math.cos(.187+7214.0629*t)-.03342*Math.cos(4.669+628.3076*t))/i+(32*(t+1.8)*(t+1.8)-20)/this.SECOND_PER_DAY/36525)+this.ONE_THIRD},calcShuo:function(n){var i,t=this.SHUO_KB.length,e=0,a=14;n+=Fn.J2000;var g=this.SHUO_KB[0]-a,r=this.SHUO_KB[t-1]-a,u=2436935;if(n=u)e=Math.floor(this.shuoHigh(Math.floor((n+a-2451551)/29.5306)*Math.PI*2)+.5);else if(n>=g&&n=r&&n=r)e=Math.floor(this.qiHigh(Math.floor((n+7-2451259)/365.2422*24)*Math.PI/12)+.5);else if(n>=a&&n=g&&n5?this.qiAccurate(t-i):e-n<-5?this.qiAccurate(t+i):e}}),fn={WEEK:["{w.sun}","{w.mon}","{w.tues}","{w.wed}","{w.thur}","{w.fri}","{w.sat}"],DAYS_OF_MONTH:[31,28,31,30,31,30,31,31,30,31,30,31],XINGZUO:["{xz.aries}","{xz.taurus}","{xz.gemini}","{xz.cancer}","{xz.leo}","{xz.virgo}","{xz.libra}","{xz.scorpio}","{xz.sagittarius}","{xz.capricornus}","{xz.aquarius}","{xz.pisces}"],FESTIVAL:{"1-1":"{jr.yuanDan}","2-14":"{jr.qingRen}","3-8":"{jr.fuNv}","3-12":"{jr.zhiShu}","3-15":"{jr.xiaoFei}","4-1":"{jr.yuRen}","5-1":"{jr.wuYi}","5-4":"{jr.qingNian}","6-1":"{jr.erTong}","7-1":"{jr.jianDang}","8-1":"{jr.jianJun}","9-10":"{jr.jiaoShi}","10-1":"{jr.guoQing}","10-31":"{jr.wanShengYe}","11-1":"{jr.wanSheng}","12-24":"{jr.pingAn}","12-25":"{jr.shengDan}"},OTHER_FESTIVAL:{"1-8":["周恩来逝世纪念日"],"1-10":["中国人民警察节"],"1-14":["日记情人节"],"1-21":["列宁逝世纪念日"],"1-26":["国际海关日"],"1-27":["国际大屠杀纪念日"],"2-2":["世界湿地日"],"2-4":["世界抗癌日"],"2-7":["京汉铁路罢工纪念日"],"2-10":["国际气象节"],"2-19":["邓小平逝世纪念日"],"2-20":["世界社会公正日"],"2-21":["国际母语日"],"2-24":["第三世界青年日"],"3-1":["国际海豹日"],"3-3":["世界野生动植物日","全国爱耳日"],"3-5":["周恩来诞辰纪念日","中国青年志愿者服务日"],"3-6":["世界青光眼日"],"3-7":["女生节"],"3-12":["孙中山逝世纪念日"],"3-14":["马克思逝世纪念日","白色情人节"],"3-17":["国际航海日"],"3-18":["全国科技人才活动日","全国爱肝日"],"3-20":["国际幸福日"],"3-21":["世界森林日","世界睡眠日","国际消除种族歧视日"],"3-22":["世界水日"],"3-23":["世界气象日"],"3-24":["世界防治结核病日"],"3-29":["中国黄花岗七十二烈士殉难纪念日"],"4-2":["国际儿童图书日","世界自闭症日"],"4-4":["国际地雷行动日"],"4-7":["世界卫生日"],"4-8":["国际珍稀动物保护日"],"4-12":["世界航天日"],"4-14":["黑色情人节"],"4-15":["全民国家安全教育日"],"4-22":["世界地球日","列宁诞辰纪念日"],"4-23":["世界读书日"],"4-24":["中国航天日"],"4-25":["儿童预防接种宣传日"],"4-26":["世界知识产权日","全国疟疾日"],"4-28":["世界安全生产与健康日"],"4-30":["全国交通安全反思日"],"5-2":["世界金枪鱼日"],"5-3":["世界新闻自由日"],"5-5":["马克思诞辰纪念日"],"5-8":["世界红十字日"],"5-11":["世界肥胖日"],"5-12":["全国防灾减灾日","护士节"],"5-14":["玫瑰情人节"],"5-15":["国际家庭日"],"5-19":["中国旅游日"],"5-20":["网络情人节"],"5-22":["国际生物多样性日"],"5-25":["525心理健康节"],"5-27":["上海解放日"],"5-29":["国际维和人员日"],"5-30":["中国五卅运动纪念日"],"5-31":["世界无烟日"],"6-3":["世界自行车日"],"6-5":["世界环境日"],"6-6":["全国爱眼日"],"6-8":["世界海洋日"],"6-11":["中国人口日"],"6-14":["世界献血日","亲亲情人节"],"6-17":["世界防治荒漠化与干旱日"],"6-20":["世界难民日"],"6-21":["国际瑜伽日"],"6-25":["全国土地日"],"6-26":["国际禁毒日","联合国宪章日"],"7-1":["香港回归纪念日"],"7-6":["国际接吻日","朱德逝世纪念日"],"7-7":["七七事变纪念日"],"7-11":["世界人口日","中国航海日"],"7-14":["银色情人节"],"7-18":["曼德拉国际日"],"7-30":["国际友谊日"],"8-3":["男人节"],"8-5":["恩格斯逝世纪念日"],"8-6":["国际电影节"],"8-8":["全民健身日"],"8-9":["国际土著人日"],"8-12":["国际青年节"],"8-14":["绿色情人节"],"8-19":["世界人道主义日","中国医师节"],"8-22":["邓小平诞辰纪念日"],"8-29":["全国测绘法宣传日"],"9-3":["中国抗日战争胜利纪念日"],"9-5":["中华慈善日"],"9-8":["世界扫盲日"],"9-9":["毛泽东逝世纪念日","全国拒绝酒驾日"],"9-14":["世界清洁地球日","相片情人节"],"9-15":["国际民主日"],"9-16":["国际臭氧层保护日"],"9-17":["世界骑行日"],"9-18":["九一八事变纪念日"],"9-20":["全国爱牙日"],"9-21":["国际和平日"],"9-27":["世界旅游日"],"9-30":["中国烈士纪念日"],"10-1":["国际老年人日"],"10-2":["国际非暴力日"],"10-4":["世界动物日"],"10-11":["国际女童日"],"10-10":["辛亥革命纪念日"],"10-13":["国际减轻自然灾害日","中国少年先锋队诞辰日"],"10-14":["葡萄酒情人节"],"10-16":["世界粮食日"],"10-17":["全国扶贫日"],"10-20":["世界统计日"],"10-24":["世界发展信息日","程序员节"],"10-25":["抗美援朝纪念日"],"11-5":["世界海啸日"],"11-8":["记者节"],"11-9":["全国消防日"],"11-11":["光棍节"],"11-12":["孙中山诞辰纪念日"],"11-14":["电影情人节"],"11-16":["国际宽容日"],"11-17":["国际大学生节"],"11-19":["世界厕所日"],"11-28":["恩格斯诞辰纪念日"],"11-29":["国际声援巴勒斯坦人民日"],"12-1":["世界艾滋病日"],"12-2":["全国交通安全日"],"12-3":["世界残疾人日"],"12-4":["全国法制宣传日"],"12-5":["世界弱能人士日","国际志愿人员日"],"12-7":["国际民航日"],"12-9":["世界足球日","国际反腐败日"],"12-10":["世界人权日"],"12-11":["国际山岳日"],"12-12":["西安事变纪念日"],"12-13":["国家公祭日"],"12-14":["拥抱情人节"],"12-18":["国际移徙者日"],"12-26":["毛泽东诞辰纪念日"]},WEEK_FESTIVAL:{"3-0-1":"全国中小学生安全教育日","5-2-0":"母亲节","5-3-0":"全国助残日","6-3-0":"父亲节","9-3-6":"全民国防教育日","10-1-1":"世界住房日","11-4-4":"感恩节"},isLeapYear:function(n){return n<1600?n%4==0:n%4==0&&n%100!=0||n%400==0},getDaysOfMonth:function(n,i){var t=n,e=i;if(n*=1,isNaN(n))throw new Error("wrong solar year "+t);if(i*=1,isNaN(i))throw new Error("wrong solar month "+e);if(1582===n&&10===i)return 21;var a=i-1,g=this.DAYS_OF_MONTH[a];return 1===a&&this.isLeapYear(n)&&g++,g},getDaysOfYear:function(n){var i=n;if(n*=1,isNaN(n))throw new Error("wrong solar year "+i);return 1582===n?355:this.isLeapYear(n)?366:365},getDaysInYear:function(n,i,t){var e=n,a=i,g=t;if(n*=1,isNaN(n))throw new Error("wrong solar year "+e);if(i*=1,isNaN(i))throw new Error("wrong solar month "+a);if(t*=1,isNaN(t))throw new Error("wrong solar day "+g);for(var r=0,u=1;u=15)h-=10;else if(t>4)throw new Error("wrong solar year "+n+" month "+i+" day "+t);return r+=h},getDaysBetween:function(n,i,t,e,a,g){var r,u,h,s=n,o=i,F=t,C=e,A=a,E=g;if(n*=1,isNaN(n))throw new Error("wrong solar year "+s);if(i*=1,isNaN(i))throw new Error("wrong solar month "+o);if(t*=1,isNaN(t))throw new Error("wrong solar day "+F);if(e*=1,isNaN(e))throw new Error("wrong solar year "+C);if(a*=1,isNaN(a))throw new Error("wrong solar month "+A);if(g*=1,isNaN(g))throw new Error("wrong solar day "+E);if(n===e)r=this.getDaysInYear(e,a,g)-this.getDaysInYear(n,i,t);else if(n>e){for(u=this.getDaysOfYear(e)-this.getDaysInYear(e,a,g),h=e+1;h5&&(n=n.substring(0,5));for(var i=1,t=1;t<22;t+=2){if(n>=(t<10?"0":"")+t+":00"&&n<=(t+1<10?"0":"")+(t+1)+":59")return i;i++}return 0},convertTime:function(n){return this.ZHI[this.getTimeZhiIndex(n)+1]},getJiaZiIndex:function(n){return this.index(n,this.JIA_ZI,0)},hex:function(n){var i=n.toString(16);return i.length<2&&(i="0"+i),i.toUpperCase()},getDayYi:function(n,i){for(var t=[],e=this.hex(this.getJiaZiIndex(i)),a=this.hex(this.getJiaZiIndex(n)),g=this.DAY_YI_JI,r=g.indexOf(e+"=");r>-1;){var u=g=g.substring(r+3);u.indexOf("=")>-1&&(u=u.substring(0,u.indexOf("=")-2));var h,s,o=!1,F=u.substring(0,u.indexOf(":"));for(h=0,s=F.length;h-1;){var u=g=g.substring(r+3);u.indexOf("=")>-1&&(u=u.substring(0,u.indexOf("=")-2));var h,s,o=!1,F=u.substring(0,u.indexOf(":"));for(h=0,s=F.length;h-1){var r=this.DAY_SHEN_SHA.substring(g+4);r.indexOf("=")>-1&&(r=r.substring(0,r.indexOf("=")-3));for(var u=r.substring(0,r.indexOf(",")),h=0,s=u.length;h-1){var r=this.DAY_SHEN_SHA.substring(g+4);r.indexOf("=")>-1&&(r=r.substring(0,r.indexOf("=")-3));for(var u=r.substring(r.indexOf(",")+1),h=0,s=u.length;h-1){var r=this.TIME_YI_JI.substring(g+5);r.indexOf("=")>-1&&(r=r.substring(0,r.indexOf("=")-4));for(var u=r.substring(0,r.indexOf(",")),h=0,s=u.length;h-1){var r=this.TIME_YI_JI.substring(g+5);r.indexOf("=")>-1&&(r=r.substring(0,r.indexOf("=")-4));for(var u=r.substring(r.indexOf(",")+1),h=0,s=u.length;h-1)return{index:t,value:a}}return null}},_n=(A=["元旦节","春节","清明节","劳动节","端午节","中秋节","国庆节","国庆中秋","抗战胜利日"],E=18,D="0".charCodeAt(0),x=A,c="200112290020020101200112300020020101200201010120020101200201020120020101200201030120020101200202091020020212200202101020020212200202121120020212200202131120020212200202141120020212200202151120020212200202161120020212200202171120020212200202181120020212200204273020020501200204283020020501200205013120020501200205023120020501200205033120020501200205043120020501200205053120020501200205063120020501200205073120020501200209286020021001200209296020021001200210016120021001200210026120021001200210036120021001200210046120021001200210056120021001200210066120021001200210076120021001200301010120030101200302011120030201200302021120030201200302031120030201200302041120030201200302051120030201200302061120030201200302071120030201200302081020030201200302091020030201200304263020030501200304273020030501200305013120030501200305023120030501200305033120030501200305043120030501200305053120030501200305063120030501200305073120030501200309276020031001200309286020031001200310016120031001200310026120031001200310036120031001200310046120031001200310056120031001200310066120031001200310076120031001200401010120040101200401171020040122200401181020040122200401221120040122200401231120040122200401241120040122200401251120040122200401261120040122200401271120040122200401281120040122200405013120040501200405023120040501200405033120040501200405043120040501200405053120040501200405063120040501200405073120040501200405083020040501200405093020040501200410016120041001200410026120041001200410036120041001200410046120041001200410056120041001200410066120041001200410076120041001200410096020041001200410106020041001200501010120050101200501020120050101200501030120050101200502051020050209200502061020050209200502091120050209200502101120050209200502111120050209200502121120050209200502131120050209200502141120050209200502151120050209200504303020050501200505013120050501200505023120050501200505033120050501200505043120050501200505053120050501200505063120050501200505073120050501200505083020050501200510016120051001200510026120051001200510036120051001200510046120051001200510056120051001200510066120051001200510076120051001200510086020051001200510096020051001200512310020060101200601010120060101200601020120060101200601030120060101200601281020060129200601291120060129200601301120060129200601311120060129200602011120060129200602021120060129200602031120060129200602041120060129200602051020060129200604293020060501200604303020060501200605013120060501200605023120060501200605033120060501200605043120060501200605053120060501200605063120060501200605073120060501200609306020061001200610016120061001200610026120061001200610036120061001200610046120061001200610056120061001200610066120061001200610076120061001200610086020061001200612300020070101200612310020070101200701010120070101200701020120070101200701030120070101200702171020070218200702181120070218200702191120070218200702201120070218200702211120070218200702221120070218200702231120070218200702241120070218200702251020070218200704283020070501200704293020070501200705013120070501200705023120070501200705033120070501200705043120070501200705053120070501200705063120070501200705073120070501200709296020071001200709306020071001200710016120071001200710026120071001200710036120071001200710046120071001200710056120071001200710066120071001200710076120071001200712290020080101200712300120080101200712310120080101200801010120080101200802021020080206200802031020080206200802061120080206200802071120080206200802081120080206200802091120080206200802101120080206200802111120080206200802121120080206200804042120080404200804052120080404200804062120080404200805013120080501200805023120080501200805033120080501200805043020080501200806074120080608200806084120080608200806094120080608200809135120080914200809145120080914200809155120080914200809276020081001200809286020081001200809296120081001200809306120081001200810016120081001200810026120081001200810036120081001200810046120081001200810056120081001200901010120090101200901020120090101200901030120090101200901040020090101200901241020090125200901251120090125200901261120090125200901271120090125200901281120090125200901291120090125200901301120090125200901311120090125200902011020090125200904042120090404200904052120090404200904062120090404200905013120090501200905023120090501200905033120090501200905284120090528200905294120090528200905304120090528200905314020090528200909276020091001200910016120091001200910026120091001200910036120091001200910046120091001200910055120091003200910065120091003200910075120091003200910085120091003200910105020091003201001010120100101201001020120100101201001030120100101201002131120100213201002141120100213201002151120100213201002161120100213201002171120100213201002181120100213201002191120100213201002201020100213201002211020100213201004032120100405201004042120100405201004052120100405201005013120100501201005023120100501201005033120100501201006124020100616201006134020100616201006144120100616201006154120100616201006164120100616201009195020100922201009225120100922201009235120100922201009245120100922201009255020100922201009266020101001201010016120101001201010026120101001201010036120101001201010046120101001201010056120101001201010066120101001201010076120101001201010096020101001201101010120110101201101020120110101201101030120110101201101301020110203201102021120110203201102031120110203201102041120110203201102051120110203201102061120110203201102071120110203201102081120110203201102121020110203201104022020110405201104032120110405201104042120110405201104052120110405201104303120110501201105013120110501201105023120110501201106044120110606201106054120110606201106064120110606201109105120110912201109115120110912201109125120110912201110016120111001201110026120111001201110036120111001201110046120111001201110056120111001201110066120111001201110076120111001201110086020111001201110096020111001201112310020120101201201010120120101201201020120120101201201030120120101201201211020120123201201221120120123201201231120120123201201241120120123201201251120120123201201261120120123201201271120120123201201281120120123201201291020120123201203312020120404201204012020120404201204022120120404201204032120120404201204042120120404201204283020120501201204293120120501201204303120120501201205013120120501201205023020120501201206224120120623201206234120120623201206244120120623201209295020120930201209305120120930201210016120121001201210026120121001201210036120121001201210046120121001201210056120121001201210066120121001201210076120121001201210086020121001201301010120130101201301020120130101201301030120130101201301050020130101201301060020130101201302091120130210201302101120130210201302111120130210201302121120130210201302131120130210201302141120130210201302151120130210201302161020130210201302171020130210201304042120130404201304052120130404201304062120130404201304273020130501201304283020130501201304293120130501201304303120130501201305013120130501201306084020130612201306094020130612201306104120130612201306114120130612201306124120130612201309195120130919201309205120130919201309215120130919201309225020130919201309296020131001201310016120131001201310026120131001201310036120131001201310046120131001201310056120131001201310066120131001201310076120131001201401010120140101201401261020140131201401311120140131201402011120140131201402021120140131201402031120140131201402041120140131201402051120140131201402061120140131201402081020140131201404052120140405201404062120140405201404072120140405201405013120140501201405023120140501201405033120140501201405043020140501201405314120140602201406014120140602201406024120140602201409065120140908201409075120140908201409085120140908201409286020141001201410016120141001201410026120141001201410036120141001201410046120141004201410056120141001201410066120141001201410076120141001201410116020141001201501010120150101201501020120150101201501030120150101201501040020150101201502151020150219201502181120150219201502191120150219201502201120150219201502211120150219201502221120150219201502231120150219201502241120150219201502281020150219201504042120150405201504052120150405201504062120150405201505013120150501201505023120150501201505033120150501201506204120150620201506214120150620201506224120150620201509038120150903201509048120150903201509058120150903201509068020150903201509265120150927201509275120150927201510016120151001201510026120151001201510036120151001201510046120151004201510056120151001201510066120151001201510076120151001201510106020151001201601010120160101201601020120160101201601030120160101201602061020160208201602071120160208201602081120160208201602091120160208201602101120160208201602111120160208201602121120160208201602131120160208201602141020160208201604022120160404201604032120160404201604042120160404201604303120160501201605013120160501201605023120160501201606094120160609201606104120160609201606114120160609201606124020160609201609155120160915201609165120160915201609175120160915201609185020160915201610016120161001201610026120161001201610036120161001201610046120161001201610056120161001201610066120161001201610076120161001201610086020161001201610096020161001201612310120170101201701010120170101201701020120170101201701221020170128201701271120170128201701281120170128201701291120170128201701301120170128201701311120170128201702011120170128201702021120170128201702041020170128201704012020170404201704022120170404201704032120170404201704042120170404201704293120170501201704303120170501201705013120170501201705274020170530201705284120170530201705294120170530201705304120170530201709306020171001201710016120171001201710026120171001201710036120171001201710045120171004201710056120171001201710066120171001201710076120171001201710086120171001201712300120180101201712310120180101201801010120180101201802111020180216201802151120180216201802161120180216201802171120180216201802181120180216201802191120180216201802201120180216201802211120180216201802241020180216201804052120180405201804062120180405201804072120180405201804082020180405201804283020180501201804293120180501201804303120180501201805013120180501201806164120180618201806174120180618201806184120180618201809225120180924201809235120180924201809245120180924201809296020181001201809306020181001201810016120181001201810026120181001201810036120181001201810046120181001201810056120181001201810066120181001201810076120181001201812290020190101201812300120190101201812310120190101201901010120190101201902021020190205201902031020190205201902041120190205201902051120190205201902061120190205201902071120190205201902081120190205201902091120190205201902101120190205201904052120190405201904062120190405201904072120190405201904283020190501201905013120190501201905023120190501201905033120190501201905043120190501201905053020190501201906074120190607201906084120190607201906094120190607201909135120190913201909145120190913201909155120190913201909296020191001201910016120191001201910026120191001201910036120191001201910046120191001201910056120191001201910066120191001201910076120191001201910126020191001202001010120200101202001191020200125202001241120200125202001251120200125202001261120200125202001271120200125202001281120200125202001291120200125202001301120200125202001311120200125202002011120200125202002021120200125202004042120200404202004052120200404202004062120200404202004263020200501202005013120200501202005023120200501202005033120200501202005043120200501202005053120200501202005093020200501202006254120200625202006264120200625202006274120200625202006284020200625202009277020201001202010017120201001202010026120201001202010036120201001202010046120201001202010056120201001202010066120201001202010076120201001202010086120201001202010106020201001202101010120210101202101020120210101202101030120210101202102071020210212202102111120210212202102121120210212202102131120210212202102141120210212202102151120210212202102161120210212202102171120210212202102201020210212202104032120210404202104042120210404202104052120210404202104253020210501202105013120210501202105023120210501202105033120210501202105043120210501202105053120210501202105083020210501202106124120210614202106134120210614202106144120210614202109185020210921202109195120210921202109205120210921202109215120210921202109266020211001202110016120211001202110026120211001202110036120211001202110046120211001202110056120211001202110066120211001202110076120211001202110096020211001202201010120220101202201020120220101202201030120220101202201291020220201202201301020220201202201311120220201202202011120220201202202021120220201202202031120220201202202041120220201202202051120220201202202061120220201202204022020220405202204032120220405202204042120220405202204052120220405202204243020220501202204303120220501202205013120220501202205023120220501202205033120220501202205043120220501202205073020220501202206034120220603202206044120220603202206054120220603202209105120220910202209115120220910202209125120220910202210016120221001202210026120221001202210036120221001202210046120221001202210056120221001202210066120221001202210076120221001202210086020221001202210096020221001202212310120230101202301010120230101202301020120230101202301211120230122202301221120230122202301231120230122202301241120230122202301251120230122202301261120230122202301271120230122202301281020230122202301291020230122202304052120230405202304233020230501202304293120230501202304303120230501202305013120230501202305023120230501202305033120230501202305063020230501202306224120230622202306234120230622202306244120230622202306254020230622202309295120230929202309306120231001202310016120231001202310026120231001202310036120231001202310046120231001202310056120231001202310066120231001202310076020231001202310086020231001202312300120240101202312310120240101202401010120240101202402041020240210202402101120240210202402111120240210202402121120240210202402131120240210202402141120240210202402151120240210202402161120240210202402171120240210202402181020240210202404042120240404202404052120240404202404062120240404202404072020240404202404283020240501202405013120240501202405023120240501202405033120240501202405043120240501202405053120240501202405113020240501202406084120240610202406094120240610202406104120240610202409145020240917202409155120240917202409165120240917202409175120240917202409296020241001202410016120241001202410026120241001202410036120241001202410046120241001202410056120241001202410066120241001202410076120241001202410126020241001202501010120250101202501261020250129202501281120250129202501291120250129202501301120250129202501311120250129202502011120250129202502021120250129202502031120250129202502041120250129202502081020250129202504042120250404202504052120250404202504062120250404202504273020250501202505013120250501202505023120250501202505033120250501202505043120250501202505053120250501202505314120250531202506014120250531202506024120250531202509287020251001202510017120251001202510027120251001202510037120251001202510047120251001202510057120251001202510067120251001202510077120251001202510087120251001202510117020251001",d=function(n){return(n<10?"0":"")+n},y=function(n){return n.indexOf("-")<0?n.substring(0,4)+"-"+n.substring(4,6)+"-"+n.substring(6):n},B=function(n,i,t,e){return{_p:{day:y(n),name:i,work:t,target:y(e)},getDay:function(){return this._p.day},setDay:function(n){this._p.day=y(n)},getName:function(){return this._p.name},setName:function(n){this._p.name=n},isWork:function(){return this._p.work},setWork:function(n){this._p.work=n},getTarget:function(){return this._p.target},setTarget:function(n){this._p.target=y(n)},toString:function(){return this._p.day+" "+this._p.name+(this._p.work?"调休":"")+" "+this._p.target}}},f=function(n){var i=n.substring(0,8),t=x[n.charCodeAt(8)-D],e=n.charCodeAt(9)===D,a=n.substring(10,18);return B(i,t,e,a)},j=function(n){var i=n.length,t=n.substring(i-18,i-10),e=x[n.charCodeAt(i-10)-D],a=n.charCodeAt(i-9)===D,g=n.substring(i-8);return B(t,e,a,g)},_=function(n){var i=[],t=function(n){var i=c.indexOf(n);if(i<0)return null;var t=c.substring(i),e=t.length%E;for(e>0&&(t=t.substring(e));0!==t.indexOf(n)&&t.length>=E;)t=t.substring(E);return t}(n);if(null==t)return i;for(;0===t.indexOf(n);)i.push(f(t)),t=t.substring(E);return i},I=function(n){var i=[],t=function(n){var i=c.lastIndexOf(n);if(i<0)return null;var t=n.length,e=c.substring(0,i+t),a=e.length,g=a%E;for(g>0&&(e=e.substring(0,a-g)),a=e.length;a-t!==e.lastIndexOf(n)&&a>=E;)a=(e=e.substring(0,a-E)).length;return e}(n);if(null==t)return i;for(var e=t.length,a=n.length;e-a===t.lastIndexOf(n);)i.push(j(t)),e=(t=t.substring(0,e-E)).length;return i.reverse(),i},p=function(n){var i=[];switch(n.length){case 1:i=_(n[0].replace(/-/g,""));break;case 3:i=_(n[0]+d(n[1])+d(n[2]))}return i.length<1?null:i[0]},l=function(n){if(n){for(var i=[];n.length>=E;){var t=n.substring(0,E),e=t.substring(0,8),a="~"===t.substring(8,9),g=p([e]);if(g){for(var r=-1,u=0,h=x.length;u-1){var s=e+String.fromCharCode(r+D)+(g.isWork()?"0":"1")+g.getTarget().replace(/-/g,"");c=c.replace(new RegExp(s,"g"),a?"":t)}}else a||i.push(t);n=n.substring(E)}i.length>0&&(c+=i.join(""))}},S=function(n){switch(n.length){case 1:l(n[0]);break;case 2:(i=n[0])&&(x=i),l(n[1])}var i},{NAMES:A,getHoliday:function(){return p(arguments)},getHolidays:function(){return function(n){var i=[];switch(n.length){case 1:i=_((n[0]+"").replace(/-/g,""));break;case 2:i=_(n[0]+d(n[1]))}return i}(arguments)},getHolidaysByTarget:function(){return function(n){var i=[];switch(n.length){case 1:i=I((n[0]+"").replace(/-/g,""));break;case 3:i=I(n[0]+d(n[1])+d(n[2]))}return i}(arguments)},fix:function(){S(arguments)}}),In={NAME_BEI_DOU:["天枢","天璇","天玑","天权","玉衡","开阳","摇光","洞明","隐元"],NAME_XUAN_KONG:["贪狼","巨门","禄存","文曲","廉贞","武曲","破军","左辅","右弼"],NAME_QI_MEN:["天蓬","天芮","天冲","天辅","天禽","天心","天柱","天任","天英"],BA_MEN_QI_MEN:["休","死","伤","杜","","开","惊","生","景"],NAME_TAI_YI:["太乙","摄提","轩辕","招摇","天符","青龙","咸池","太阴","天乙"],TYPE_TAI_YI:["吉神","凶神","安神","安神","凶神","吉神","凶神","吉神","吉神"],SONG_TAI_YI:["门中太乙明,星官号贪狼,赌彩财喜旺,婚姻大吉昌,出入无阻挡,参谒见贤良,此行三五里,黑衣别阴阳。","门前见摄提,百事必忧疑,相生犹自可,相克祸必临,死门并相会,老妇哭悲啼,求谋并吉事,尽皆不相宜,只可藏隐遁,若动伤身疾。","出入会轩辕,凡事必缠牵,相生全不美,相克更忧煎,远行多不利,博彩尽输钱,九天玄女法,句句不虚言。","招摇号木星,当之事莫行,相克行人阻,阴人口舌迎,梦寐多惊惧,屋响斧自鸣,阴阳消息理,万法弗违情。","五鬼为天符,当门阴女谋,相克无好事,行路阻中途,走失难寻觅,道逢有尼姑,此星当门值,万事有灾除。","神光跃青龙,财气喜重重,投入有酒食,赌彩最兴隆,更逢相生旺,休言克破凶,见贵安营寨,万事总吉同。","吾将为咸池,当之尽不宜,出入多不利,相克有灾情,赌彩全输尽,求财空手回,仙人真妙语,愚人莫与知,动用虚惊退,反复逆风吹。","坐临太阴星,百祸不相侵,求谋悉成就,知交有觅寻,回风归来路,恐有殃伏起,密语中记取,慎乎莫轻行。","迎来天乙星,相逢百事兴,运用和合庆,茶酒喜相迎,求谋并嫁娶,好合有天成,祸福如神验,吉凶甚分明。"],LUCK_QI_MEN:["大凶","大凶","小吉","大吉","大吉","大吉","小凶","小吉","小凶"],fromIndex:function(n){return function(n){return{_p:{index:n},getNumber:function(){return Yn.NUMBER[this._p.index]},getColor:function(){return Yn.COLOR[this._p.index]},getWuXing:function(){return Yn.WU_XING[this._p.index]},getPosition:function(){return Yn.POSITION[this._p.index]},getPositionDesc:function(){return jn.POSITION_DESC[this.getPosition()]},getNameInXuanKong:function(){return In.NAME_XUAN_KONG[this._p.index]},getNameInBeiDou:function(){return In.NAME_BEI_DOU[this._p.index]},getNameInQiMen:function(){return In.NAME_QI_MEN[this._p.index]},getNameInTaiYi:function(){return In.NAME_TAI_YI[this._p.index]},getLuckInQiMen:function(){return In.LUCK_QI_MEN[this._p.index]},getLuckInXuanKong:function(){return Yn.LUCK_XUAN_KONG[this._p.index]},getYinYangInQiMen:function(){return Yn.YIN_YANG_QI_MEN[this._p.index]},getTypeInTaiYi:function(){return In.TYPE_TAI_YI[this._p.index]},getBaMenInQiMen:function(){return In.BA_MEN_QI_MEN[this._p.index]},getSongInTaiYi:function(){return In.SONG_TAI_YI[this._p.index]},getIndex:function(){return this._p.index},toString:function(){return this.getNumber()+this.getColor()+this.getWuXing()+this.getNameInBeiDou()},toFullString:function(){var n=this.getNumber();return n+=this.getColor(),n+=this.getWuXing(),n+=" ",n+=this.getPosition(),n+="(",n+=this.getPositionDesc(),n+=") ",n+=this.getNameInBeiDou(),n+=" 玄空[",n+=this.getNameInXuanKong(),n+=" ",n+=this.getLuckInXuanKong(),n+="] 奇门[",n+=this.getNameInQiMen(),n+=" ",n+=this.getLuckInQiMen(),this.getBaMenInQiMen().length>0&&(n+=" ",n+=this.getBaMenInQiMen(),n+="门"),n+=" ",n+=this.getYinYangInQiMen(),n+="] 太乙[",n+=this.getNameInTaiYi(),n+=" ",(n+=this.getTypeInTaiYi())+"]"}}}(n)}},pn={fromLunar:function(n){return function(n){return{_p:{sect:2,lunar:n},setSect:function(n){n*=1,this._p.sect=1===n?1:2},getSect:function(){return this._p.sect},getDayGanIndex:function(){return 2===this._p.sect?this._p.lunar.getDayGanIndexExact2():this._p.lunar.getDayGanIndexExact()},getDayZhiIndex:function(){return 2===this._p.sect?this._p.lunar.getDayZhiIndexExact2():this._p.lunar.getDayZhiIndexExact()},getYear:function(){return this._p.lunar.getYearInGanZhiExact()},getYearGan:function(){return this._p.lunar.getYearGanExact()},getYearZhi:function(){return this._p.lunar.getYearZhiExact()},getYearHideGan:function(){return jn.ZHI_HIDE_GAN[this.getYearZhi()]},getYearWuXing:function(){return jn.WU_XING_GAN[this.getYearGan()]+jn.WU_XING_ZHI[this.getYearZhi()]},getYearNaYin:function(){return jn.NAYIN[this.getYear()]},getYearShiShenGan:function(){return jn.SHI_SHEN[this.getDayGan()+this.getYearGan()]},getYearShiShenZhi:function(){for(var n=this.getDayGan(),i=jn.ZHI_HIDE_GAN[this.getYearZhi()],t=[],e=0,a=i.length;e=12&&(i-=12),i<0&&(i+=12),jn.CHANG_SHENG[i]},getYearDiShi:function(){return this._getDiShi(this._p.lunar.getYearZhiIndexExact())},getYearXun:function(){return this._p.lunar.getYearXunExact()},getYearXunKong:function(){return this._p.lunar.getYearXunKongExact()},getMonth:function(){return this._p.lunar.getMonthInGanZhiExact()},getMonthGan:function(){return this._p.lunar.getMonthGanExact()},getMonthZhi:function(){return this._p.lunar.getMonthZhiExact()},getMonthHideGan:function(){return jn.ZHI_HIDE_GAN[this.getMonthZhi()]},getMonthWuXing:function(){return jn.WU_XING_GAN[this.getMonthGan()]+jn.WU_XING_ZHI[this.getMonthZhi()]},getMonthNaYin:function(){return jn.NAYIN[this.getMonth()]},getMonthShiShenGan:function(){return jn.SHI_SHEN[this.getDayGan()+this.getMonthGan()]},getMonthShiShenZhi:function(){for(var n=this.getDayGan(),i=jn.ZHI_HIDE_GAN[this.getMonthZhi()],t=[],e=0,a=i.length;e=10&&(n-=10);var i=this._p.lunar.getMonthZhiIndexExact()+3;return i>=12&&(i-=12),jn.GAN[n+1]+jn.ZHI[i+1]},getTaiYuanNaYin:function(){return jn.NAYIN[this.getTaiYuan()]},getTaiXi:function(){var n=this._p.lunar,i=2===this._p.sect?n.getDayGanIndexExact2():n.getDayGanIndexExact(),t=2===this._p.sect?n.getDayZhiIndexExact2():n.getDayZhiIndexExact();return jn.HE_GAN_5[i]+jn.HE_ZHI_6[t]},getTaiXiNaYin:function(){return jn.NAYIN[this.getTaiXi()]},getMingGong:function(){var n=jn.index(this.getMonthZhi(),jn.MONTH_ZHI,0)+jn.index(this.getTimeZhi(),jn.MONTH_ZHI,0);n=(n>=14?26:14)-n;for(var i=2*(this._p.lunar.getYearGanIndexExact()+1)+n;i>10;)i-=10;return jn.GAN[i]+jn.MONTH_ZHI[n]},getMingGongNaYin:function(){return jn.NAYIN[this.getMingGong()]},getShenGong:function(){for(var n=(jn.index(this.getMonthZhi(),jn.MONTH_ZHI,0)+jn.index(this.getTimeZhi(),jn.ZHI,0)-1)%12,i=2*(this._p.lunar.getYearGanIndexExact()+1)+n;i>10;)i-=10;return jn.GAN[i+1]+jn.MONTH_ZHI[n+1]},getShenGongNaYin:function(){return jn.NAYIN[this.getShenGong()]},getLunar:function(){return this._p.lunar},getYun:function(n,i){i=2==(i*=1)?i:1;var t=this.getLunar(),e=0==t.getYearGanIndexExact()%2,a=1===n,g=e&&a||!e&&!a,r=function(){var n,e,a,r=t.getPrevJie(),u=t.getNextJie(),h=t.getSolar(),s=g?h:r.getSolar(),o=g?u.getSolar():h,F=0;if(2===i){var C=o.subtractMinute(s);C-=4320*(n=Math.floor(C/4320)),C-=360*(e=Math.floor(C/360)),F=2*(C-=12*(a=Math.floor(C/12)))}else{var A=(23===o.getHour()?11:jn.getTimeZhiIndex(o.toYmdHms().substring(11,16)))-(23===s.getHour()?11:jn.getTimeZhiIndex(s.toYmdHms().substring(11,16))),E=o.subtract(s);A<0&&(A+=12,E--);var D=Math.floor(10*A/30);e=4*E+D,a=10*A-30*D,e-=12*(n=Math.floor(e/12))}return{year:n,month:e,day:a,hour:F}}(),u=function(n,i){return{_p:{index:i,liuNian:n},getIndex:function(){return this._p.index},getMonthInChinese:function(){return jn.MONTH[this._p.index+1]},getGanZhi:function(){var n=[2,4,6,8,0][(jn.find(this._p.liuNian.getGanZhi(),jn.GAN).index-1)%5];return jn.GAN[(this._p.index+n)%10+1]+jn.ZHI[(this._p.index+jn.BASE_MONTH_ZHI_INDEX)%12+1]},getXun:function(){return jn.getXun(this.getGanZhi())},getXunKong:function(){return jn.getXunKong(this.getGanZhi())}}},h=function(n,i){return{_p:{year:n.getStartYear()+i,age:n.getStartAge()+i,index:i,daYun:n,lunar:n.getLunar()},getYear:function(){return this._p.year},getAge:function(){return this._p.age},getIndex:function(){return this._p.index},getLunar:function(){return this._p.lunar},getGanZhi:function(){var n=jn.getJiaZiIndex(this._p.lunar.getJieQiTable()[Mn.getMessage("jq.liChun")].getLunar().getYearInGanZhiExact())+this._p.index;return this._p.daYun.getIndex()>0&&(n+=this._p.daYun.getStartAge()-1),n%=jn.JIA_ZI.length,jn.JIA_ZI[n]},getXun:function(){return jn.getXun(this.getGanZhi())},getXunKong:function(){return jn.getXunKong(this.getGanZhi())},getLiuYue:function(){for(var n=[],i=0;i<12;i++)n.push(u(this,i));return n}}},s=function(n,i,t){return{_p:{year:n.getStartYear()+i,age:n.getStartAge()+i,index:i,daYun:n,forward:t,lunar:n.getLunar()},getYear:function(){return this._p.year},getAge:function(){return this._p.age},getIndex:function(){return this._p.index},getGanZhi:function(){var n=jn.getJiaZiIndex(this._p.lunar.getTimeInGanZhi()),i=this._p.index+1;this._p.daYun.getIndex()>0&&(i+=this._p.daYun.getStartAge()-1),n+=this._p.forward?i:-i;for(var t=jn.JIA_ZI.length;n<0;)n+=t;return n%=t,jn.JIA_ZI[n]},getXun:function(){return jn.getXun(this.getGanZhi())},getXunKong:function(){return jn.getXunKong(this.getGanZhi())}}},o=function(n,i){var t,e,a,g,r=n.getLunar().getSolar().getYear(),u=n.getStartSolar().getYear();return i<1?(t=r,e=1,a=u-1,g=u-r):(a=(t=u+10*(i-1))+9,g=9+(e=t-r+1)),{_p:{startYear:t,endYear:a,startAge:e,endAge:g,index:i,yun:n,lunar:n.getLunar()},getStartYear:function(){return this._p.startYear},getEndYear:function(){return this._p.endYear},getStartAge:function(){return this._p.startAge},getEndAge:function(){return this._p.endAge},getIndex:function(){return this._p.index},getLunar:function(){return this._p.lunar},getGanZhi:function(){if(this._p.index<1)return"";var n=jn.getJiaZiIndex(this._p.lunar.getMonthInGanZhiExact());n+=this._p.yun.isForward()?this._p.index:-this._p.index;var i=jn.JIA_ZI.length;return n>=i&&(n-=i),n<0&&(n+=i),jn.JIA_ZI[n]},getXun:function(){return jn.getXun(this.getGanZhi())},getXunKong:function(){return jn.getXunKong(this.getGanZhi())},getLiuNian:function(n){n||(n=10),this._p.index<1&&(n=this._p.endYear-this._p.startYear+1);for(var i=[],t=0;t=i[Mn.getMessage("jq.dongZhi")].toYmd()&&n22?"23:00":(n%2==0&&(n-=1),(n<10?"0":"")+n+":00")},getMaxHm:function(){var n=this._p.lunar.getHour();return n<1?"00:59":n>22?"23:59":(n%2!=0&&(n+=1),(n<10?"0":"")+n+":59")},toString:function(){return this.getGanZhi()}}}(n,i,t,e,a,g)}},Sn=(z=[11,13,15,17,19,21,24,0,2,4,7,9],N="犯者夺纪",Y="犯者减寿",w="犯者损寿",M="犯者削禄夺纪",Z="犯者三年内夫妇俱亡",G=(m=function(n,i,t,e){return{_p:{name:n,result:i||"",everyMonth:!!t,remark:e||""},getName:function(){return this._p.name},getResult:function(){return this._p.result},isEveryMonth:function(){return this._p.everyMonth},getRemark:function(){return this._p.remark},toString:function(){return this._p.name},toFullString:function(){var n=[this._p.name];return this._p.result&&n.push(this._p.result),this._p.remark&&n.push(this._p.remark),n.join(" ")}}})("杨公忌"),k=m("四天王巡行","",!0),T=m("斗降",N,!0),b=m("月朔",N,!0),v=m("月望",N,!0),H=m("月晦",Y,!0),O=m("雷斋日",Y,!0),X=m("九毒日","犯者夭亡,奇祸不测"),L=m("人神在阴","犯者得病",!0,"宜先一日即戒"),q=m("司命奏事",Y,!0,"如月小,即戒廿九"),J=m("月晦",Y,!0,"如月小,即戒廿九"),{XIU_27:["{xx.jiao}","{xx.kang}","{xx.di}","{xx.fang}","{xx.xin}","{xx.tail}","{xx.ji}","{xx.dou}","{xx.nv}","{xx.xu}","{xx.wei}","{xx.shi}","{xx.qiang}","{xx.kui}","{xx.lou}","{xx.vei}","{xx.mao}","{xx.bi}","{xx.zi}","{xx.can}","{xx.jing}","{xx.gui}","{xx.liu}","{xx.xing}","{xx.zhang}","{xx.yi}","{xx.zhen}"],DAY_ZHAI_GUAN_YIN:["1-8","2-7","2-9","2-19","3-3","3-6","3-13","4-22","5-3","5-17","6-16","6-18","6-19","6-23","7-13","8-16","9-19","9-23","10-2","11-19","11-24","12-25"],FESTIVAL:{"1-1":[m("天腊,玉帝校世人神气禄命",M),b],"1-3":[m("万神都会",N),T],"1-5":[m("五虚忌")],"1-6":[m("六耗忌"),O],"1-7":[m("上会日",w)],"1-8":[m("五殿阎罗天子诞",N),k],"1-9":[m("玉皇上帝诞",N)],"1-13":[G],"1-14":[m("三元降",Y),k],"1-15":[m("三元降",Y),m("上元神会",N),v,k],"1-16":[m("三元降",Y)],"1-19":[m("长春真人诞")],"1-23":[m("三尸神奏事"),k],"1-25":[H,m("天地仓开日","犯者损寿,子带疾")],"1-27":[T],"1-28":[L],"1-29":[k],"1-30":[J,q,k],"2-1":[m("一殿秦广王诞",N),b],"2-2":[m("万神都会",N),m("福德土地正神诞","犯者得祸")],"2-3":[m("文昌帝君诞",M),T],"2-6":[m("东华帝君诞"),O],"2-8":[m("释迦牟尼佛出家",N),m("三殿宋帝王诞",N),m("张大帝诞",N),k],"2-11":[G],"2-14":[k],"2-15":[m("释迦牟尼佛涅槃",M),m("太上老君诞",M),m("月望",M,!0),k],"2-17":[m("东方杜将军诞")],"2-18":[m("四殿五官王诞",M),m("至圣先师孔子讳辰",M)],"2-19":[m("观音大士诞",N)],"2-21":[m("普贤菩萨诞")],"2-23":[k],"2-25":[H],"2-27":[T],"2-28":[L],"2-29":[k],"2-30":[J,q,k],"3-1":[m("二殿楚江王诞",N),b],"3-3":[m("玄天上帝诞",N),T],"3-6":[O],"3-8":[m("六殿卞城王诞",N),k],"3-9":[m("牛鬼神出","犯者产恶胎"),G],"3-12":[m("中央五道诞")],"3-14":[k],"3-15":[m("昊天上帝诞",N),m("玄坛诞",N),v,k],"3-16":[m("准提菩萨诞",N)],"3-19":[m("中岳大帝诞"),m("后土娘娘诞"),m("三茅降")],"3-20":[m("天地仓开日",w),m("子孙娘娘诞")],"3-23":[k],"3-25":[H],"3-27":[m("七殿泰山王诞"),T],"3-28":[L,m("苍颉至圣先师诞",M),m("东岳大帝诞")],"3-29":[k],"3-30":[J,q,k],"4-1":[m("八殿都市王诞",N),b],"4-3":[T],"4-4":[m("万神善会","犯者失瘼夭胎"),m("文殊菩萨诞")],"4-6":[O],"4-7":[m("南斗、北斗、西斗同降",Y),G],"4-8":[m("释迦牟尼佛诞",N),m("万神善会","犯者失瘼夭胎"),m("善恶童子降","犯者血死"),m("九殿平等王诞"),k],"4-14":[m("纯阳祖师诞",Y),k],"4-15":[v,m("钟离祖师诞"),k],"4-16":[m("天地仓开日",w)],"4-17":[m("十殿转轮王诞",N)],"4-18":[m("天地仓开日",w),m("紫徽大帝诞",w)],"4-20":[m("眼光圣母诞")],"4-23":[k],"4-25":[H],"4-27":[T],"4-28":[L],"4-29":[k],"4-30":[J,q,k],"5-1":[m("南极长生大帝诞",N),b],"5-3":[T],"5-5":[m("地腊",M),m("五帝校定生人官爵",M),X,G],"5-6":[X,O],"5-7":[X],"5-8":[m("南方五道诞"),k],"5-11":[m("天地仓开日",w),m("天下都城隍诞")],"5-12":[m("炳灵公诞")],"5-13":[m("关圣降",M)],"5-14":[m("夜子时为天地交泰",Z),k],"5-15":[v,X,k],"5-16":[m("九毒日",Z),m("天地元气造化万物之辰",Z)],"5-17":[X],"5-18":[m("张天师诞")],"5-22":[m("孝娥神诞",N)],"5-23":[k],"5-25":[X,H],"5-26":[X],"5-27":[X,T],"5-28":[L],"5-29":[k],"5-30":[J,q,k],"6-1":[b],"6-3":[m("韦驮菩萨圣诞"),T,G],"6-5":[m("南赡部洲转大轮",w)],"6-6":[m("天地仓开日",w),O],"6-8":[k],"6-10":[m("金粟如来诞")],"6-14":[k],"6-15":[v,k],"6-19":[m("观世音菩萨成道",N)],"6-23":[m("南方火神诞","犯者遭回禄"),k],"6-24":[m("雷祖诞",M),m("关帝诞",M)],"6-25":[H],"6-27":[T],"6-28":[L],"6-29":[k],"6-30":[J,q,k],"7-1":[b,G],"7-3":[T],"7-5":[m("中会日",w,!1,"一作初七")],"7-6":[O],"7-7":[m("道德腊",M),m("五帝校生人善恶",M),m("魁星诞",M)],"7-8":[k],"7-10":[m("阴毒日","",!1,"大忌")],"7-12":[m("长真谭真人诞")],"7-13":[m("大势至菩萨诞",Y)],"7-14":[m("三元降",Y),k],"7-15":[v,m("三元降",N),m("地官校籍",N),k],"7-16":[m("三元降",Y)],"7-18":[m("西王母诞",N)],"7-19":[m("太岁诞",N)],"7-22":[m("增福财神诞",M)],"7-23":[k],"7-25":[H],"7-27":[T],"7-28":[L],"7-29":[G,k],"7-30":[m("地藏菩萨诞",N),J,q,k],"8-1":[b,m("许真君诞")],"8-3":[T,m("北斗诞",M),m("司命灶君诞","犯者遭回禄")],"8-5":[m("雷声大帝诞",N)],"8-6":[O],"8-8":[k],"8-10":[m("北斗大帝诞")],"8-12":[m("西方五道诞")],"8-14":[k],"8-15":[v,m("太明朝元","犯者暴亡",!1,"宜焚香守夜"),k],"8-16":[m("天曹掠刷真君降","犯者贫夭")],"8-18":[m("天人兴福之辰","",!1,"宜斋戒,存想吉事")],"8-23":[m("汉恒候张显王诞"),k],"8-24":[m("灶君夫人诞")],"8-25":[H],"8-27":[T,m("至圣先师孔子诞",M),G],"8-28":[L,m("四天会事")],"8-29":[k],"8-30":[m("诸神考校","犯者夺算"),J,q,k],"9-1":[b,m("南斗诞",M),m("北斗九星降世",N,!1,"此九日俱宜斋戒")],"9-3":[T,m("五瘟神诞")],"9-6":[O],"9-8":[k],"9-9":[m("斗母诞",M),m("酆都大帝诞"),m("玄天上帝飞升")],"9-10":[m("斗母降",N)],"9-11":[m("宜戒")],"9-13":[m("孟婆尊神诞")],"9-14":[k],"9-15":[v,k],"9-17":[m("金龙四大王诞","犯者遭水厄")],"9-19":[m("日宫月宫会合",Y),m("观世音菩萨诞",Y)],"9-23":[k],"9-25":[H,G],"9-27":[T],"9-28":[L],"9-29":[k],"9-30":[m("药师琉璃光佛诞","犯者危疾"),J,q,k],"10-1":[b,m("民岁腊",N),m("四天王降","犯者一年内死")],"10-3":[T,m("三茅诞")],"10-5":[m("下会日",Y),m("达摩祖师诞",Y)],"10-6":[O,m("天曹考察",N)],"10-8":[m("佛涅槃日","",!1,"大忌色欲"),k],"10-10":[m("四天王降","犯者一年内死")],"10-11":[m("宜戒")],"10-14":[m("三元降",Y),k],"10-15":[v,m("三元降",N),m("下元水府校籍",N),k],"10-16":[m("三元降",Y),k],"10-23":[G,k],"10-25":[H],"10-27":[T,m("北极紫徽大帝降")],"10-28":[L],"10-29":[k],"10-30":[J,q,k],"11-1":[b],"11-3":[T],"11-4":[m("至圣先师孔子诞",M)],"11-6":[m("西岳大帝诞")],"11-8":[k],"11-11":[m("天地仓开日",N),m("太乙救苦天尊诞",N)],"11-14":[k],"11-15":[m("月望","上半夜犯男死 下半夜犯女死"),m("四天王巡行","上半夜犯男死 下半夜犯女死")],"11-17":[m("阿弥陀佛诞")],"11-19":[m("太阳日宫诞","犯者得奇祸")],"11-21":[G],"11-23":[m("张仙诞","犯者绝嗣"),k],"11-25":[m("掠刷大夫降","犯者遭大凶"),H],"11-26":[m("北方五道诞")],"11-27":[T],"11-28":[L],"11-29":[k],"11-30":[J,q,k],"12-1":[b],"12-3":[T],"12-6":[m("天地仓开日",Y),O],"12-7":[m("掠刷大夫降","犯者得恶疾")],"12-8":[m("王侯腊",N),m("释迦如来成佛之辰"),k,m("初旬内戊日,亦名王侯腊",N)],"12-12":[m("太素三元君朝真")],"12-14":[k],"12-15":[v,k],"12-16":[m("南岳大帝诞")],"12-19":[G],"12-20":[m("天地交道","犯者促寿")],"12-21":[m("天猷上帝诞")],"12-23":[m("五岳诞降"),k],"12-24":[m("司今朝天奏人善恶","犯者得大祸")],"12-25":[m("三清玉帝同降,考察善恶","犯者得奇祸"),H],"12-27":[T],"12-28":[L],"12-29":[m("华严菩萨诞"),k],"12-30":[m("诸神下降,察访善恶","犯者男女俱亡")]},OTHER_FESTIVAL:{"1-1":["弥勒菩萨圣诞"],"1-6":["定光佛圣诞"],"2-8":["释迦牟尼佛出家"],"2-15":["释迦牟尼佛涅槃"],"2-19":["观世音菩萨圣诞"],"2-21":["普贤菩萨圣诞"],"3-16":["准提菩萨圣诞"],"4-4":["文殊菩萨圣诞"],"4-8":["释迦牟尼佛圣诞"],"4-15":["佛吉祥日"],"4-28":["药王菩萨圣诞"],"5-13":["伽蓝菩萨圣诞"],"6-3":["韦驮菩萨圣诞"],"6-19":["观音菩萨成道"],"7-13":["大势至菩萨圣诞"],"7-15":["佛欢喜日"],"7-24":["龙树菩萨圣诞"],"7-30":["地藏菩萨圣诞"],"8-15":["月光菩萨圣诞"],"8-22":["燃灯佛圣诞"],"9-9":["摩利支天菩萨圣诞"],"9-19":["观世音菩萨出家"],"9-30":["药师琉璃光佛圣诞"],"10-5":["达摩祖师圣诞"],"10-20":["文殊菩萨出家"],"11-17":["阿弥陀佛圣诞"],"11-19":["日光菩萨圣诞"],"12-8":["释迦牟尼佛成道"],"12-23":["监斋菩萨圣诞"],"12-29":["华严菩萨圣诞"]},getXiu:function(n,i){return function(n,i){return Sn.XIU_27[(z[Math.abs(n)-1]+i-1)%Sn.XIU_27.length]}(n,i)}}),zn=function(){var n=function(n,t,e,a,g,r){return i(Cn.fromYmdHms(n+zn.DEAD_YEAR-1,t,e,a,g,r))},i=function(n){return{_p:{lunar:n},getLunar:function(){return this._p.lunar},getYear:function(){var n=this._p.lunar.getSolar().getYear(),i=n-zn.DEAD_YEAR;return n===this._p.lunar.getYear()&&i++,i},getMonth:function(){return this._p.lunar.getMonth()},getDay:function(){return this._p.lunar.getDay()},getYearInChinese:function(){for(var n=this.getYear()+"",i="",t="0".charCodeAt(0),e=0,a=n.length;e-1?Mn.getMessage("jz.wuYin")===t&&(n=!0):[Mn.getMessage("dz.si"),Mn.getMessage("dz.wu"),Mn.getMessage("dz.wei")].join(",").indexOf(i)>-1?Mn.getMessage("jz.jiaWu")===t&&(n=!0):[Mn.getMessage("dz.shen"),Mn.getMessage("dz.you"),Mn.getMessage("dz.xu")].join(",").indexOf(i)>-1?Mn.getMessage("jz.wuShen")===t&&(n=!0):[Mn.getMessage("dz.hai"),Mn.getMessage("dz.zi"),Mn.getMessage("dz.chou")].join(",").indexOf(i)>-1&&Mn.getMessage("jz.jiaZi")===t&&(n=!0),n},toString:function(){return this.getYearInChinese()+"年"+this.getMonthInChinese()+"月"+this.getDayInChinese()},toFullString:function(){return"道歷"+this.getYearInChinese()+"年,天運"+this._p.lunar.getYearInGanZhi()+"年,"+this._p.lunar.getMonthInGanZhi()+"月,"+this._p.lunar.getDayInGanZhi()+"日。"+this.getMonthInChinese()+"月"+this.getDayInChinese()+"日,"+this._p.lunar.getTimeZhi()+"時。"}}};return{BIRTH_YEAR:-2697,fromYmdHms:function(i,t,e,a,g,r){return n(i,t,e,a,g,r)},fromYmd:function(i,t,e){return n(i,t,e,0,0,0)},fromLunar:function(n){return i(n)}}}(),Mn=(U=P="chs",W=!1,Q={chs:{"tg.jia":"甲","tg.yi":"乙","tg.bing":"丙","tg.ding":"丁","tg.wu":"戊","tg.ji":"己","tg.geng":"庚","tg.xin":"辛","tg.ren":"壬","tg.gui":"癸","dz.zi":"子","dz.chou":"丑","dz.yin":"寅","dz.mao":"卯","dz.chen":"辰","dz.si":"巳","dz.wu":"午","dz.wei":"未","dz.shen":"申","dz.you":"酉","dz.xu":"戌","dz.hai":"亥","zx.jian":"建","zx.chu":"除","zx.man":"满","zx.ping":"平","zx.ding":"定","zx.zhi":"执","zx.po":"破","zx.wei":"危","zx.cheng":"成","zx.shou":"收","zx.kai":"开","zx.bi":"闭","jz.jiaZi":"甲子","jz.yiChou":"乙丑","jz.bingYin":"丙寅","jz.dingMao":"丁卯","jz.wuChen":"戊辰","jz.jiSi":"己巳","jz.gengWu":"庚午","jz.xinWei":"辛未","jz.renShen":"壬申","jz.guiYou":"癸酉","jz.jiaXu":"甲戌","jz.yiHai":"乙亥","jz.bingZi":"丙子","jz.dingChou":"丁丑","jz.wuYin":"戊寅","jz.jiMao":"己卯","jz.gengChen":"庚辰","jz.xinSi":"辛巳","jz.renWu":"壬午","jz.guiWei":"癸未","jz.jiaShen":"甲申","jz.yiYou":"乙酉","jz.bingXu":"丙戌","jz.dingHai":"丁亥","jz.wuZi":"戊子","jz.jiChou":"己丑","jz.gengYin":"庚寅","jz.xinMao":"辛卯","jz.renChen":"壬辰","jz.guiSi":"癸巳","jz.jiaWu":"甲午","jz.yiWei":"乙未","jz.bingShen":"丙申","jz.dingYou":"丁酉","jz.wuXu":"戊戌","jz.jiHai":"己亥","jz.gengZi":"庚子","jz.xinChou":"辛丑","jz.renYin":"壬寅","jz.guiMao":"癸卯","jz.jiaChen":"甲辰","jz.yiSi":"乙巳","jz.bingWu":"丙午","jz.dingWei":"丁未","jz.wuShen":"戊申","jz.jiYou":"己酉","jz.gengXu":"庚戌","jz.xinHai":"辛亥","jz.renZi":"壬子","jz.guiChou":"癸丑","jz.jiaYin":"甲寅","jz.yiMao":"乙卯","jz.bingChen":"丙辰","jz.dingSi":"丁巳","jz.wuWu":"戊午","jz.jiWei":"己未","jz.gengShen":"庚申","jz.xinYou":"辛酉","jz.renXu":"壬戌","jz.guiHai":"癸亥","sx.rat":"鼠","sx.ox":"牛","sx.tiger":"虎","sx.rabbit":"兔","sx.dragon":"龙","sx.snake":"蛇","sx.horse":"马","sx.goat":"羊","sx.monkey":"猴","sx.rooster":"鸡","sx.dog":"狗","sx.pig":"猪","dw.long":"龙","dw.niu":"牛","dw.gou":"狗","dw.yang":"羊","dw.tu":"兔","dw.shu":"鼠","dw.ji":"鸡","dw.ma":"马","dw.hu":"虎","dw.zhu":"猪","dw.hou":"猴","dw.she":"蛇","dw.huLi":"狐","dw.yan":"燕","dw.bao":"豹","dw.yuan":"猿","dw.yin":"蚓","dw.lu":"鹿","dw.wu":"乌","dw.jiao":"蛟","dw.lang":"狼","dw.fu":"蝠","dw.zhang":"獐","dw.xu":"獝","dw.xie":"獬","dw.han":"犴","dw.he":"貉","dw.zhi":"彘","wx.jin":"金","wx.mu":"木","wx.shui":"水","wx.huo":"火","wx.tu":"土","wx.ri":"日","wx.yue":"月","n.zero":"〇","n.one":"一","n.two":"二","n.three":"三","n.four":"四","n.five":"五","n.six":"六","n.seven":"七","n.eight":"八","n.nine":"九","n.ten":"十","n.eleven":"十一","n.twelve":"十二","d.one":"初一","d.two":"初二","d.three":"初三","d.four":"初四","d.five":"初五","d.six":"初六","d.seven":"初七","d.eight":"初八","d.nine":"初九","d.ten":"初十","d.eleven":"十一","d.twelve":"十二","d.thirteen":"十三","d.fourteen":"十四","d.fifteen":"十五","d.sixteen":"十六","d.seventeen":"十七","d.eighteen":"十八","d.nighteen":"十九","d.twenty":"二十","d.twentyOne":"廿一","d.twentyTwo":"廿二","d.twentyThree":"廿三","d.twentyFour":"廿四","d.twentyFive":"廿五","d.twentySix":"廿六","d.twentySeven":"廿七","d.twentyEight":"廿八","d.twentyNine":"廿九","d.thirty":"三十","m.one":"正","m.two":"二","m.three":"三","m.four":"四","m.five":"五","m.six":"六","m.seven":"七","m.eight":"八","m.nine":"九","m.ten":"十","m.eleven":"冬","m.twelve":"腊","w.sun":"日","w.mon":"一","w.tues":"二","w.wed":"三","w.thur":"四","w.fri":"五","w.sat":"六","xz.aries":"白羊","xz.taurus":"金牛","xz.gemini":"双子","xz.cancer":"巨蟹","xz.leo":"狮子","xz.virgo":"处女","xz.libra":"天秤","xz.scorpio":"天蝎","xz.sagittarius":"射手","xz.capricornus":"摩羯","xz.aquarius":"水瓶","xz.pisces":"双鱼","bg.qian":"乾","bg.kun":"坤","bg.zhen":"震","bg.xun":"巽","bg.kan":"坎","bg.li":"离","bg.gen":"艮","bg.dui":"兑","ps.center":"中","ps.dong":"东","ps.nan":"南","ps.xi":"西","ps.bei":"北","ps.zhong":"中宫","ps.zhengDong":"正东","ps.zhengNan":"正南","ps.zhengXi":"正西","ps.zhengBei":"正北","ps.dongBei":"东北","ps.dongNan":"东南","ps.xiBei":"西北","ps.xiNan":"西南","ps.wai":"外","ps.fangNei":"房内","jq.dongZhi":"冬至","jq.xiaoHan":"小寒","jq.daHan":"大寒","jq.liChun":"立春","jq.yuShui":"雨水","jq.jingZhe":"惊蛰","jq.chunFen":"春分","jq.qingMing":"清明","jq.guYu":"谷雨","jq.liXia":"立夏","jq.xiaoMan":"小满","jq.mangZhong":"芒种","jq.xiaZhi":"夏至","jq.xiaoShu":"小暑","jq.daShu":"大暑","jq.liQiu":"立秋","jq.chuShu":"处暑","jq.baiLu":"白露","jq.qiuFen":"秋分","jq.hanLu":"寒露","jq.shuangJiang":"霜降","jq.liDong":"立冬","jq.xiaoXue":"小雪","jq.daXue":"大雪","sn.qingLong":"青龙","sn.baiHu":"白虎","sn.zhuQue":"朱雀","sn.xuanWu":"玄武","sn.mingTang":"明堂","sn.tianXing":"天刑","sn.tianDe":"天德","sn.jinKui":"金匮","sn.yuTang":"玉堂","sn.siMing":"司命","sn.tianLao":"天牢","sn.gouChen":"勾陈","sn.tianEn":"天恩","sn.muCang":"母仓","sn.shiYang":"时阳","sn.shengQi":"生气","sn.yiHou":"益后","sn.zaiSha":"灾煞","sn.tianHuo":"天火","sn.siJi":"四忌","sn.baLong":"八龙","sn.fuRi":"复日","sn.xuShi":"续世","sn.yueSha":"月煞","sn.yueXu":"月虚","sn.xueZhi":"血支","sn.tianZei":"天贼","sn.wuXu":"五虚","sn.tuFu":"土符","sn.guiJi":"归忌","sn.xueJi":"血忌","sn.yueDe":"月德","sn.yueEn":"月恩","sn.siXiang":"四相","sn.wangRi":"王日","sn.tianCang":"天仓","sn.buJiang":"不将","sn.wuHe":"五合","sn.mingFeiDui":"鸣吠对","sn.yueJian":"月建","sn.xiaoShi":"小时","sn.tuHu":"土府","sn.wangWang":"往亡","sn.yaoAn":"要安","sn.siShen":"死神","sn.tianMa":"天马","sn.jiuHu":"九虎","sn.qiNiao":"七鸟","sn.liuShe":"六蛇","sn.guanRi":"官日","sn.jiQi":"吉期","sn.yuYu":"玉宇","sn.daShi":"大时","sn.daBai":"大败","sn.xianChi":"咸池","sn.shouRi":"守日","sn.tianWu":"天巫","sn.fuDe":"福德","sn.liuYi":"六仪","sn.jinTang":"金堂","sn.yanDui":"厌对","sn.zhaoYao":"招摇","sn.jiuKong":"九空","sn.jiuKan":"九坎","sn.jiuJiao":"九焦","sn.xiangRi":"相日","sn.baoGuang":"宝光","sn.tianGang":"天罡","sn.yueXing":"月刑","sn.yueHai":"月害","sn.youHuo":"游祸","sn.chongRi":"重日","sn.shiDe":"时德","sn.minRi":"民日","sn.sanHe":"三合","sn.linRi":"临日","sn.shiYin":"时阴","sn.mingFei":"鸣吠","sn.siQi":"死气","sn.diNang":"地囊","sn.yueDeHe":"月德合","sn.jingAn":"敬安","sn.puHu":"普护","sn.jieShen":"解神","sn.xiaoHao":"小耗","sn.tianDeHe":"天德合","sn.yueKong":"月空","sn.yiMa":"驿马","sn.tianHou":"天后","sn.chuShen":"除神","sn.yuePo":"月破","sn.daHao":"大耗","sn.wuLi":"五离","sn.yinDe":"阴德","sn.fuSheng":"福生","sn.tianLi":"天吏","sn.zhiSi":"致死","sn.yuanWu":"元武","sn.yangDe":"阳德","sn.tianXi":"天喜","sn.tianYi":"天医","sn.yueYan":"月厌","sn.diHuo":"地火","sn.fourHit":"四击","sn.daSha":"大煞","sn.daHui":"大会","sn.tianYuan":"天愿","sn.liuHe":"六合","sn.wuFu":"五富","sn.shengXin":"圣心","sn.heKui":"河魁","sn.jieSha":"劫煞","sn.siQiong":"四穷","sn.chuShuiLong":"触水龙","sn.baFeng":"八风","sn.tianShe":"天赦","sn.wuMu":"五墓","sn.baZhuan":"八专","sn.yinCuo":"阴错","sn.siHao":"四耗","sn.yangCuo":"阳错","sn.siFei":"四废","sn.sanYin":"三阴","sn.xiaoHui":"小会","sn.yinDaoChongYang":"阴道冲阳","sn.danYin":"单阴","sn.guChen":"孤辰","sn.yinWei":"阴位","sn.xingHen":"行狠","sn.liaoLi":"了戾","sn.jueYin":"绝阴","sn.chunYang":"纯阳","sn.suiBo":"岁薄","sn.yinYangJiaoPo":"阴阳交破","sn.yinYangJuCuo":"阴阳俱错","sn.yinYangJiChong":"阴阳击冲","sn.zhuZhen":"逐阵","sn.yangCuoYinChong":"阳错阴冲","sn.qiFu":"七符","sn.tianGou":"天狗","sn.chengRi":"成日","sn.tianFu":"天符","sn.guYang":"孤阳","sn.jueYang":"绝阳","sn.chunYin":"纯阴","sn.yinShen":"阴神","sn.jieChu":"解除","sn.yangPoYinChong":"阳破阴冲","ss.biJian":"比肩","ss.jieCai":"劫财","ss.shiShen":"食神","ss.shangGuan":"伤官","ss.pianCai":"偏财","ss.zhengCai":"正财","ss.qiSha":"七杀","ss.zhengGuan":"正官","ss.pianYin":"偏印","ss.zhengYin":"正印","s.none":"无","s.huangDao":"黄道","s.heiDao":"黑道","s.goodLuck":"吉","s.badLuck":"凶","s.yin":"阴","s.yang":"阳","s.white":"白","s.black":"黑","s.blue":"碧","s.green":"绿","s.yellow":"黄","s.red":"赤","s.purple":"紫","jr.chuXi":"除夕","jr.chunJie":"春节","jr.yuanXiao":"元宵节","jr.longTou":"龙头节","jr.duanWu":"端午节","jr.qiXi":"七夕节","jr.zhongQiu":"中秋节","jr.chongYang":"重阳节","jr.laBa":"腊八节","jr.yuanDan":"元旦节","jr.qingRen":"情人节","jr.fuNv":"妇女节","jr.zhiShu":"植树节","jr.xiaoFei":"消费者权益日","jr.wuYi":"劳动节","jr.qingNian":"青年节","jr.erTong":"儿童节","jr.yuRen":"愚人节","jr.jianDang":"建党节","jr.jianJun":"建军节","jr.jiaoShi":"教师节","jr.guoQing":"国庆节","jr.wanShengYe":"万圣节前夜","jr.wanSheng":"万圣节","jr.pingAn":"平安夜","jr.shengDan":"圣诞节","ds.changSheng":"长生","ds.muYu":"沐浴","ds.guanDai":"冠带","ds.linGuan":"临官","ds.diWang":"帝旺","ds.shuai":"衰","ds.bing":"病","ds.si":"死","ds.mu":"墓","ds.jue":"绝","ds.tai":"胎","ds.yang":"养","h.first":"初候","h.second":"二候","h.third":"三候","h.qiuYinJie":"蚯蚓结","h.miJiao":"麋角解","h.shuiQuan":"水泉动","h.yanBei":"雁北乡","h.queShi":"鹊始巢","h.zhiShi":"雉始雊","h.jiShi":"鸡始乳","h.zhengNiao":"征鸟厉疾","h.shuiZe":"水泽腹坚","h.dongFeng":"东风解冻","h.zheChongShiZhen":"蛰虫始振","h.yuZhi":"鱼陟负冰","h.taJi":"獭祭鱼","h.houYan":"候雁北","h.caoMuMengDong":"草木萌动","h.taoShi":"桃始华","h.cangGeng":"仓庚鸣","h.yingHua":"鹰化为鸠","h.xuanNiaoZhi":"玄鸟至","h.leiNai":"雷乃发声","h.shiDian":"始电","h.tongShi":"桐始华","h.tianShu":"田鼠化为鴽","h.hongShi":"虹始见","h.pingShi":"萍始生","h.mingJiu":"鸣鸠拂奇羽","h.daiSheng":"戴胜降于桑","h.louGuo":"蝼蝈鸣","h.qiuYinChu":"蚯蚓出","h.wangGua":"王瓜生","h.kuCai":"苦菜秀","h.miCao":"靡草死","h.maiQiu":"麦秋至","h.tangLang":"螳螂生","h.juShi":"鵙始鸣","h.fanShe":"反舌无声","h.luJia":"鹿角解","h.tiaoShi":"蜩始鸣","h.banXia":"半夏生","h.wenFeng":"温风至","h.xiShuai":"蟋蟀居壁","h.yingShi":"鹰始挚","h.fuCao":"腐草为萤","h.tuRun":"土润溽暑","h.daYu":"大雨行时","h.liangFeng":"凉风至","h.baiLu":"白露降","h.hanChan":"寒蝉鸣","h.yingNai":"鹰乃祭鸟","h.tianDi":"天地始肃","h.heNai":"禾乃登","h.hongYanLai":"鸿雁来","h.xuanNiaoGui":"玄鸟归","h.qunNiao":"群鸟养羞","h.leiShi":"雷始收声","h.zheChongPiHu":"蛰虫坯户","h.shuiShiHe":"水始涸","h.hongYanLaiBin":"鸿雁来宾","h.queRu":"雀入大水为蛤","h.juYou":"菊有黄花","h.caiNai":"豺乃祭兽","h.caoMuHuangLuo":"草木黄落","h.zheChongXianFu":"蛰虫咸俯","h.shuiShiBing":"水始冰","h.diShi":"地始冻","h.zhiRu":"雉入大水为蜃","h.hongCang":"虹藏不见","h.tianQi":"天气上升地气下降","h.biSe":"闭塞而成冬","h.heDan":"鹖鴠不鸣","h.huShi":"虎始交","h.liTing":"荔挺出","ts.zhan":"占","ts.hu":"户","ts.win":"窗","ts.fang":"房","ts.chuang":"床","ts.lu":"炉","ts.zao":"灶","ts.dui":"碓","ts.mo":"磨","ts.xi":"栖","ts.chu":"厨","ts.ce":"厕","ts.cang":"仓","ts.cangKu":"仓库","ts.daMen":"大门","ts.men":"门","ts.tang":"堂","ly.xianSheng":"先胜","ly.xianFu":"先负","ly.youYin":"友引","ly.foMie":"佛灭","ly.daAn":"大安","ly.chiKou":"赤口","yj.jiSi":"祭祀","yj.qiFu":"祈福","yj.qiuSi":"求嗣","yj.kaiGuang":"开光","yj.suHui":"塑绘","yj.qiJiao":"齐醮","yj.zhaiJiao":"斋醮","yj.muYu":"沐浴","yj.chouShen":"酬神","yj.zaoMiao":"造庙","yj.siZhao":"祀灶","yj.fenXiang":"焚香","yj.xieTu":"谢土","yj.chuHuo":"出火","yj.diaoKe":"雕刻","yj.jiaQu":"嫁娶","yj.DingHun":"订婚","yj.naCai":"纳采","yj.wenMing":"问名","yj.naXu":"纳婿","yj.guiNing":"归宁","yj.anChuang":"安床","yj.heZhang":"合帐","yj.guanJi":"冠笄","yj.dingMeng":"订盟","yj.jinRenKou":"进人口","yj.caiYi":"裁衣","yj.wanMian":"挽面","yj.kaiRong":"开容","yj.xiuFen":"修坟","yj.qiZuan":"启钻","yj.poTu":"破土","yj.anZang":"安葬","yj.liBei":"立碑","yj.chengFu":"成服","yj.chuFu":"除服","yj.kaiShengFen":"开生坟","yj.heShouMu":"合寿木","yj.ruLian":"入殓","yj.yiJiu":"移柩","yj.puDu":"普渡","yj.ruZhai":"入宅","yj.anXiang":"安香","yj.anMen":"安门","yj.xiuZao":"修造","yj.qiJi":"起基","yj.dongTu":"动土","yj.shangLiang":"上梁","yj.shuZhu":"竖柱","yj.kaiJing":"开井开池","yj.zuoBei":"作陂放水","yj.chaiXie":"拆卸","yj.poWu":"破屋","yj.huaiYuan":"坏垣","yj.buYuan":"补垣","yj.faMuZuoLiang":"伐木做梁","yj.zuoZhao":"作灶","yj.jieChu":"解除","yj.kaiZhuYan":"开柱眼","yj.chuanPing":"穿屏扇架","yj.gaiWuHeJi":"盖屋合脊","yj.kaiCe":"开厕","yj.zaoCang":"造仓","yj.saiXue":"塞穴","yj.pingZhi":"平治道涂","yj.zaoQiao":"造桥","yj.zuoCe":"作厕","yj.zhuDi":"筑堤","yj.kaiChi":"开池","yj.faMu":"伐木","yj.kaiQu":"开渠","yj.jueJing":"掘井","yj.saoShe":"扫舍","yj.fangShui":"放水","yj.zaoWu":"造屋","yj.heJi":"合脊","yj.zaoChuChou":"造畜稠","yj.xiuMen":"修门","yj.dingSang":"定磉","yj.zuoLiang":"作梁","yj.xiuShi":"修饰垣墙","yj.jiaMa":"架马","yj.kaiShi":"开市","yj.guaBian":"挂匾","yj.naChai":"纳财","yj.qiuCai":"求财","yj.kaiCang":"开仓","yj.maiChe":"买车","yj.zhiChan":"置产","yj.guYong":"雇佣","yj.chuHuoCai":"出货财","yj.anJiXie":"安机械","yj.zaoCheQi":"造车器","yj.jingLuo":"经络","yj.yunNiang":"酝酿","yj.zuoRan":"作染","yj.guZhu":"鼓铸","yj.zaoChuan":"造船","yj.geMi":"割蜜","yj.zaiZhong":"栽种","yj.quYu":"取渔","yj.jieWang":"结网","yj.muYang":"牧养","yj.anDuiWei":"安碓磑","yj.xiYi":"习艺","yj.ruXue":"入学","yj.liFa":"理发","yj.tanBing":"探病","yj.jianGui":"见贵","yj.chengChuan":"乘船","yj.duShui":"渡水","yj.zhenJiu":"针灸","yj.chuXing":"出行","yj.yiXi":"移徙","yj.fenJu":"分居","yj.TiTou":"剃头","yj.zhengShou":"整手足甲","yj.naChu":"纳畜","yj.buZhuo":"捕捉","yj.tianLie":"畋猎","yj.jiaoNiuMa":"教牛马","yj.huiQinYou":"会亲友","yj.fuRen":"赴任","yj.qiuYi":"求医","yj.zhiBing":"治病","yj.ciSong":"词讼","yj.qiJiDongTu":"起基动土","yj.poWuHuaiYuan":"破屋坏垣","yj.gaiWu":"盖屋","yj.zaoCangKu":"造仓库","yj.liQuanJiaoYi":"立券交易","yj.jiaoYi":"交易","yj.liQuan":"立券","yj.anJi":"安机","yj.huiYou":"会友","yj.qiuYiLiaoBing":"求医疗病","yj.zhuShi":"诸事不宜","yj.yuShi":"馀事勿取","yj.xingSang":"行丧","yj.duanYi":"断蚁","yj.guiXiu":"归岫","xx.bi":"毕","xx.yi":"翼","xx.ji":"箕","xx.kui":"奎","xx.gui":"鬼","xx.di":"氐","xx.xu":"虚","xx.wei":"危","xx.zi":"觜","xx.zhen":"轸","xx.dou":"斗","xx.lou":"娄","xx.liu":"柳","xx.fang":"房","xx.xin":"心","xx.shi":"室","xx.can":"参","xx.jiao":"角","xx.niu":"牛","xx.vei":"胃","xx.xing":"星","xx.zhang":"张","xx.tail":"尾","xx.qiang":"壁","xx.jing":"井","xx.kang":"亢","xx.nv":"女","xx.mao":"昴","sz.chun":"春","sz.xia":"夏","sz.qiu":"秋","sz.dong":"冬","od.first":"孟","od.second":"仲","od.third":"季","yx.shuo":"朔","yx.jiShuo":"既朔","yx.eMeiXin":"蛾眉新","yx.eMei":"蛾眉","yx.xi":"夕","yx.shangXian":"上弦","yx.jiuYe":"九夜","yx.night":"宵","yx.jianYingTu":"渐盈凸","yx.xiaoWang":"小望","yx.wang":"望","yx.jiWang":"既望","yx.liDai":"立待","yx.juDai":"居待","yx.qinDai":"寝待","yx.gengDai":"更待","yx.jianKuiTu":"渐亏凸","yx.xiaXian":"下弦","yx.youMing":"有明","yx.eMeiCan":"蛾眉残","yx.can":"残","yx.xiao":"晓","yx.hui":"晦","ny.sangZhe":"桑柘","ny.baiLa":"白蜡","ny.yangLiu":"杨柳","ny.jinBo":"金箔","ny.haiZhong":"海中","ny.daHai":"大海","ny.shaZhong":"沙中","ny.luZhong":"炉中","ny.shanXia":"山下","ny.daLin":"大林","ny.pingDi":"平地","ny.luPang":"路旁","ny.biShang":"壁上","ny.jianFeng":"剑锋","ny.shanTou":"山头","ny.fuDeng":"覆灯","ny.jianXia":"涧下","ny.tianHe":"天河","ny.chengTou":"城头","ny.daYi":"大驿","ny.chaiChuan":"钗钏","ny.quanZhong":"泉中","ny.daXi":"大溪","ny.wuShang":"屋上","ny.piLi":"霹雳","ny.tianShang":"天上","ny.songBo":"松柏","ny.shiLiu":"石榴","ny.changLiu":"长流"},en:{"tg.jia":"Jia","tg.yi":"Yi","tg.bing":"Bing","tg.ding":"Ding","tg.wu":"Wu","tg.ji":"Ji","tg.geng":"Geng","tg.xin":"Xin","tg.ren":"Ren","tg.gui":"Gui","dz.zi":"Zi","dz.chou":"Chou","dz.yin":"Yin","dz.mao":"Mao","dz.chen":"Chen","dz.si":"Si","dz.wu":"Wu","dz.wei":"Wei","dz.shen":"Shen","dz.you":"You","dz.xu":"Xu","dz.hai":"Hai","zx.jian":"Build","zx.chu":"Remove","zx.man":"Full","zx.ping":"Flat","zx.ding":"Stable","zx.zhi":"Hold","zx.po":"Break","zx.wei":"Danger","zx.cheng":"Complete","zx.shou":"Collect","zx.kai":"Open","zx.bi":"Close","jz.jiaZi":"JiaZi","jz.yiChou":"YiChou","jz.bingYin":"BingYin","jz.dingMao":"DingMao","jz.wuChen":"WuChen","jz.jiSi":"JiSi","jz.gengWu":"GengWu","jz.xinWei":"XinWei","jz.renShen":"RenShen","jz.guiYou":"GuiYou","jz.jiaXu":"JiaXu","jz.yiHai":"YiHai","jz.bingZi":"BingZi","jz.dingChou":"DingChou","jz.wuYin":"WuYin","jz.jiMao":"JiMao","jz.gengChen":"GengChen","jz.xinSi":"XinSi","jz.renWu":"RenWu","jz.guiWei":"GuiWei","jz.jiaShen":"JiaShen","jz.yiYou":"YiYou","jz.bingXu":"BingXu","jz.dingHai":"DingHai","jz.wuZi":"WuZi","jz.jiChou":"JiChou","jz.gengYin":"GengYin","jz.xinMao":"XinMao","jz.renChen":"RenChen","jz.guiSi":"GuiSi","jz.jiaWu":"JiaWu","jz.yiWei":"YiWei","jz.bingShen":"BingShen","jz.dingYou":"DingYou","jz.wuXu":"WuXu","jz.jiHai":"JiHai","jz.gengZi":"GengZi","jz.xinChou":"XinChou","jz.renYin":"RenYin","jz.guiMao":"GuiMao","jz.jiaChen":"JiaChen","jz.yiSi":"YiSi","jz.bingWu":"BingWu","jz.dingWei":"DingWei","jz.wuShen":"WuShen","jz.jiYou":"JiYou","jz.gengXu":"GengXu","jz.xinHai":"XinHai","jz.renZi":"RenZi","jz.guiChou":"GuiChou","jz.jiaYin":"JiaYin","jz.yiMao":"YiMao","jz.bingChen":"BingChen","jz.dingSi":"DingSi","jz.wuWu":"WuWu","jz.jiWei":"JiWei","jz.gengShen":"GengShen","jz.xinYou":"XinYou","jz.renXu":"RenXu","jz.guiHai":"GuiHai","sx.rat":"Rat","sx.ox":"Ox","sx.tiger":"Tiger","sx.rabbit":"Rabbit","sx.dragon":"Dragon","sx.snake":"Snake","sx.horse":"Horse","sx.goat":"Goat","sx.monkey":"Monkey","sx.rooster":"Rooster","sx.dog":"Dog","sx.pig":"Pig","dw.long":"Dragon","dw.niu":"Ox","dw.gou":"Dog","dw.yang":"Goat","dw.tu":"Rabbit","dw.shu":"Rat","dw.ji":"Rooster","dw.ma":"Horse","dw.hu":"Tiger","dw.zhu":"Pig","dw.hou":"Monkey","dw.she":"Snake","dw.huLi":"Fox","dw.yan":"Swallow","dw.bao":"Leopard","dw.yuan":"Ape","dw.yin":"Earthworm","dw.lu":"Deer","dw.wu":"Crow","dw.lang":"Wolf","dw.fu":"Bat","wx.jin":"Metal","wx.mu":"Wood","wx.shui":"Water","wx.huo":"Fire","wx.tu":"Earth","wx.ri":"Sun","wx.yue":"Moon","n.zero":"0","n.one":"1","n.two":"2","n.three":"3","n.four":"4","n.five":"5","n.six":"6","n.seven":"7","n.eight":"8","n.nine":"9","n.ten":"10","n.eleven":"11","n.twelve":"12","w.sun":"Sunday","w.mon":"Monday","w.tues":"Tuesday","w.wed":"Wednesday","w.thur":"Thursday","w.fri":"Friday","w.sat":"Saturday","xz.aries":"Aries","xz.taurus":"Taurus","xz.gemini":"Gemini","xz.cancer":"Cancer","xz.leo":"Leo","xz.virgo":"Virgo","xz.libra":"Libra","xz.scorpio":"Scorpio","xz.sagittarius":"Sagittarius","xz.capricornus":"Capricornus","xz.aquarius":"Aquarius","xz.pisces":"Pisces","bg.qian":"Qian","bg.kun":"Kun","bg.zhen":"Zhen","bg.xun":"Xun","bg.kan":"Kan","bg.li":"Li","bg.gen":"Gen","bg.dui":"Dui","ps.center":"Center","ps.dong":"East","ps.nan":"South","ps.xi":"West","ps.bei":"North","ps.zhong":"Center","ps.zhengDong":"East","ps.zhengNan":"South","ps.zhengXi":"West","ps.zhengBei":"North","ps.dongBei":"Northeast","ps.dongNan":"Southeast","ps.xiBei":"Northwest","ps.xiNan":"Southwest","jq.dongZhi":"Winter Solstice","jq.xiaoHan":"Lesser Cold","jq.daHan":"Great Cold","jq.liChun":"Spring Beginning","jq.yuShui":"Rain Water","jq.jingZhe":"Awakening from Hibernation","jq.chunFen":"Spring Equinox","jq.qingMing":"Fresh Green","jq.guYu":"Grain Rain","jq.liXia":"Beginning of Summer","jq.xiaoMan":"Lesser Fullness","jq.mangZhong":"Grain in Ear","jq.xiaZhi":"Summer Solstice","jq.xiaoShu":"Lesser Heat","jq.daShu":"Greater Heat","jq.liQiu":"Beginning of Autumn","jq.chuShu":"End of Heat","jq.baiLu":"White Dew","jq.qiuFen":"Autumnal Equinox","jq.hanLu":"Cold Dew","jq.shuangJiang":"First Frost","jq.liDong":"Beginning of Winter","jq.xiaoXue":"Light Snow","jq.daXue":"Heavy Snow","sn.qingLong":"Azure Dragon","sn.baiHu":"White Tiger","sn.zhuQue":"Rosefinch","sn.xuanWu":"Black Tortoise","sn.tianEn":"Serene Grace","sn.siShen":"Death","sn.tianMa":"Pegasus","sn.baLong":"Eight Dragon","sn.jiuHu":"Nine Tiger","sn.qiNiao":"Seven Bird","sn.liuShe":"Six Snake","s.none":"None","s.goodLuck":"Good luck","s.badLuck":"Bad luck","s.yin":"Yin","s.yang":"Yang","s.white":"White","s.black":"Black","s.blue":"Blue","s.green":"Green","s.yellow":"Yellow","s.red":"Red","s.purple":"Purple","jr.chuXi":"Chinese New Year's Eve","jr.chunJie":"Luna New Year","jr.yuanXiao":"Lantern Festival","jr.duanWu":"Dragon Boat Festival","jr.qiXi":"Begging Festival","jr.zhongQiu":"Mid-Autumn Festival","jr.laBa":"Laba Festival","jr.yuanDan":"New Year's Day","jr.qingRen":"Valentine's Day","jr.fuNv":"Women's Day","jr.xiaoFei":"Consumer Rights Day","jr.zhiShu":"Arbor Day","jr.wuYi":"International Worker's Day","jr.erTong":"Children's Day","jr.qingNian":"Youth Day","jr.yuRen":"April Fools' Day","jr.jianDang":"Party's Day","jr.jianJun":"Army Day","jr.jiaoShi":"Teachers' Day","jr.guoQing":"National Day","jr.wanShengYe":"All Saints' Eve","jr.wanSheng":"All Saints' Day","jr.pingAn":"Christmas Eve","jr.shengDan":"Christmas Day","ts.zhan":"At","ts.hu":"Household","ts.zao":"Cooker","ts.dui":"Pestle","ts.xi":"Habitat","ts.win":"Window","ts.fang":"Room","ts.chuang":"Bed","ts.lu":"Stove","ts.mo":"Mill","ts.chu":"Kitchen","ts.ce":"Toilet","ts.cang":"Depot","ts.cangKu":"Depot","ts.daMen":"Gate","ts.men":"Door","ts.tang":"Hall","ly.xianSheng":"Win first","ly.xianFu":"Lose first","ly.youYin":"Friend's referral","ly.foMie":"Buddhism's demise","ly.daAn":"Great safety","ly.chiKou":"Chikagoro","yj.jiSi":"Sacrifice","yj.qiFu":"Pray","yj.qiuSi":"Seek heirs","yj.kaiGuang":"Consecretion","yj.suHui":"Paint sculptural","yj.qiJiao":"Build altar","yj.zhaiJiao":"Taoist rites","yj.muYu":"Bathing","yj.chouShen":"Reward gods","yj.zaoMiao":"Build temple","yj.siZhao":"Offer kitchen god","yj.fenXiang":"Burn incense","yj.xieTu":"Earth gratitude","yj.chuHuo":"Expel the flame","yj.diaoKe":"Carving","yj.jiaQu":"Marriage","yj.DingHun":"Engagement","yj.naCai":"Proposing","yj.wenMing":"Ask name","yj.naXu":"Uxorilocal marriage","yj.guiNing":"Visit parents","yj.anChuang":"Bed placing","yj.heZhang":"Make up accounts","yj.guanJi":"Crowning adulthood","yj.dingMeng":"Make alliance","yj.jinRenKou":"Adopt","yj.caiYi":"Dressmaking","yj.wanMian":"Cosmeticsurgery","yj.kaiRong":"Open face","yj.xiuFen":"Grave repair","yj.qiZuan":"Open coffin","yj.poTu":"Break earth","yj.anZang":"Burial","yj.liBei":"Tombstone erecting","yj.chengFu":"Formation of clothes","yj.chuFu":"Mourning clothes removal","yj.kaiShengFen":"Open grave","yj.heShouMu":"Make coffin","yj.ruLian":"Body placing","yj.yiJiu":"Move coffin","yj.puDu":"Save soul","yj.ruZhai":"Enter house","yj.anXiang":"Incenst placement","yj.anMen":"Door placing","yj.xiuZao":"Repair","yj.qiJi":"Digging","yj.dongTu":"Break ground","yj.shangLiang":"Beam placing","yj.shuZhu":"Erecting pillars","yj.kaiJing":"Open pond and well","yj.zuoBei":"Make pond and fill water","yj.chaiXie":"Smash house","yj.poWu":"Break house","yj.huaiYuan":"Demolish","yj.buYuan":"Mending","yj.faMuZuoLiang":"Make beams","yj.zuoZhao":"Make stove","yj.jieChu":"Removal","yj.kaiZhuYan":"Build beam","yj.chuanPing":"Build door","yj.gaiWuHeJi":"Cover house","yj.kaiCe":"Open toilet","yj.zaoCang":"Build depot","yj.saiXue":"Block nest","yj.pingZhi":"Repair roads","yj.zaoQiao":"Build bridge","yj.zuoCe":"Build toilet","yj.zhuDi":"Fill","yj.kaiChi":"Open pond","yj.faMu":"Lumbering","yj.kaiQu":"Canalization","yj.jueJing":"Dig well","yj.saoShe":"Sweep house","yj.fangShui":"Drainage","yj.zaoWu":"Build house","yj.heJi":"Close ridge","yj.zaoChuChou":"Livestock thickening","yj.xiuMen":"Repair door","yj.dingSang":"Fix stone","yj.zuoLiang":"Beam construction","yj.xiuShi":"Decorate wall","yj.jiaMa":"Erect horse","yj.kaiShi":"Opening","yj.guaBian":"Hang plaque","yj.naChai":"Accept wealth","yj.qiuCai":"Seek wealth","yj.kaiCang":"Open depot","yj.maiChe":"Buy car","yj.zhiChan":"Buy property","yj.guYong":"Hire","yj.chuHuoCai":"Delivery","yj.anJiXie":"Build machine","yj.zaoCheQi":"Build car","yj.jingLuo":"Build loom","yj.yunNiang":"Brew","yj.zuoRan":"Dye","yj.guZhu":"Cast","yj.zaoChuan":"Build boat","yj.geMi":"Harvest honey","yj.zaiZhong":"Farming","yj.quYu":"Fishing","yj.jieWang":"Netting","yj.muYang":"Graze","yj.anDuiWei":"Build rub","yj.xiYi":"Learn","yj.ruXue":"Enter school","yj.liFa":"Haircut","yj.tanBing":"Visiting","yj.jianGui":"Meet noble","yj.chengChuan":"Ride boat","yj.duShui":"Cross water","yj.zhenJiu":"Acupuncture","yj.chuXing":"Travel","yj.yiXi":"Move","yj.fenJu":"Live apart","yj.TiTou":"Shave","yj.zhengShou":"Manicure","yj.naChu":"Feed livestock","yj.buZhuo":"Catch","yj.tianLie":"Hunt","yj.jiaoNiuMa":"Train horse","yj.huiQinYou":"Meet friends","yj.fuRen":"Go post","yj.qiuYi":"See doctor","yj.zhiBing":"Treat","yj.ciSong":"Litigation","yj.qiJiDongTu":"Lay foundation","yj.poWuHuaiYuan":"Demolish","yj.gaiWu":"Build house","yj.zaoCangKu":"Build depot","yj.liQuanJiaoYi":"Covenant trade","yj.jiaoYi":"Trade","yj.liQuan":"Covenant","yj.anJi":"Install machine","yj.huiYou":"Meet friends","yj.qiuYiLiaoBing":"Seek treatment","yj.zhuShi":"Everything Sucks","yj.yuShi":"Do nothing else","yj.xingSang":"Funeral","yj.duanYi":"Block ant hole","yj.guiXiu":"Place beam","xx.bi":"Finish","xx.yi":"Wing","xx.ji":"Sieve","xx.kui":"Qui","xx.gui":"Ghost","xx.di":"Foundation","xx.xu":"Virtual","xx.wei":"Danger","xx.zi":"Mouth","xx.zhen":"Cross-bar","xx.dou":"Fight","xx.lou":"Weak","xx.liu":"Willow","xx.fang":"House","xx.xin":"Heart","xx.shi":"Room","xx.can":"Join","xx.jiao":"Horn","xx.niu":"Ox","xx.vei":"Stomach","xx.xing":"Star","xx.zhang":"Chang","xx.tail":"Tail","xx.qiang":"Wall","xx.jing":"Well","xx.kang":"Kang","xx.nv":"Female","xx.mao":"Mao","sz.chun":"Spring","sz.xia":"Summer","sz.qiu":"Autumn","sz.dong":"Winter","yx.shuo":"New","yx.eMeiXin":"New waxing","yx.eMei":"Waxing","yx.xi":"Evening","yx.shangXian":"First quarter","yx.jiuYe":"Nine night","yx.night":"Night","yx.jianYingTu":"Gibbous","yx.xiaoWang":"Little full","yx.wang":"Full","yx.jianKuiTu":"Disseminating","yx.xiaXian":"Third quarter","yx.eMeiCan":"Waning waxing","yx.can":"Waning","yx.xiao":"Daybreak","yx.hui":"Obscure","ny.sangZhe":"Cudrania","ny.baiLa":"Wax","ny.yangLiu":"Willow","ny.jinBo":"Foil","ny.haiZhong":"Sea","ny.daHai":"Ocean","ny.shaZhong":"Sand","ny.luZhong":"Stove","ny.shanXia":"Piedmont","ny.daLin":"Forest","ny.pingDi":"Land","ny.luPang":"Roadside","ny.biShang":"Wall","ny.jianFeng":"Blade","ny.shanTou":"Hilltop","ny.fuDeng":"Light","ny.jianXia":"Valleyn","ny.tianHe":"River","ny.chengTou":"City","ny.daYi":"Post","ny.chaiChuan":"Ornaments","ny.quanZhong":"Spring","ny.daXi":"Stream","ny.wuShang":"Roof","ny.piLi":"Thunderbolt","ny.tianShang":"Sky","ny.songBo":"Coniferin","ny.shiLiu":"Pomegranate","ny.changLiu":"Flows"}},R={LunarUtil:jn,SolarUtil:fn,TaoUtil:Nn,FotoUtil:Sn,NineStarUtil:Yn},K={LunarUtil:{TIAN_SHEN_TYPE:{},TIAN_SHEN_TYPE_LUCK:{},XIU_LUCK:{},LU:{},XIU:{},SHA:{},POSITION_DESC:{},NAYIN:{},WU_XING_GAN:{},WU_XING_ZHI:{},SHOU:{},GONG:{},FESTIVAL:{},ZHENG:{},ANIMAL:{},SHI_SHEN:{},XIU_SONG:{}},SolarUtil:{FESTIVAL:{}},TaoUtil:{BA_HUI:{},BA_JIE:{}}},V={LunarUtil:{ZHI_TIAN_SHEN_OFFSET:{},CHANG_SHENG_OFFSET:{}}},$={LunarUtil:{ZHI_HIDE_GAN:{}}},nn={LunarUtil:{GAN:[],ZHI:[],JIA_ZI:[],ZHI_XING:[],XUN:[],XUN_KONG:[],CHONG:[],CHONG_GAN:[],CHONG_GAN_TIE:[],HE_GAN_5:[],HE_ZHI_6:[],SHENGXIAO:[],NUMBER:[],POSITION_XI:[],POSITION_YANG_GUI:[],POSITION_YIN_GUI:[],POSITION_FU:[],POSITION_FU_2:[],POSITION_CAI:[],POSITION_TAI_SUI_YEAR:[],POSITION_GAN:[],POSITION_ZHI:[],JIE_QI:[],JIE_QI_IN_USE:[],TIAN_SHEN:[],SHEN_SHA:[],PENGZU_GAN:[],PENGZU_ZHI:[],MONTH_ZHI:[],CHANG_SHENG:[],HOU:[],WU_HOU:[],POSITION_TAI_DAY:[],POSITION_TAI_MONTH:[],YI_JI:[],LIU_YAO:[],MONTH:[],SEASON:[],DAY:[],YUE_XIANG:[]},SolarUtil:{WEEK:[],XINGZUO:[]},TaoUtil:{AN_WU:[]},FotoUtil:{XIU_27:[]},NineStarUtil:{NUMBER:[],WU_XING:[],POSITION:[],LUCK_XUAN_KONG:[],YIN_YANG_QI_MEN:[],COLOR:[]}},tn=function(n){var i=nn[n],t=R[n];for(var e in i)for(var a=i[e],g=0,r=a.length;g",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},n=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,s={},o={};function i(e,r,t){var n,s,a,c,l,u="";for("string"!=typeof r&&(t=r,r=i.defaultChars),void 0===t&&(t=!0),l=function(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;r<128;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1=56320&&c<=57343){u+=encodeURIComponent(e[n]+e[n+1]),n++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[n]);return u}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()";var a=i,c={};function l(e,r){var t;return"string"!=typeof r&&(r=l.defaultChars),t=function(e){var r,t,n=c[e];if(n)return n;for(n=c[e]=[],r=0;r<128;r++)t=String.fromCharCode(r),n.push(t);for(r=0;r=55296&&c<=57343?"���":String.fromCharCode(c),r+=6):240==(248&s)&&r+91114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="�";return l}))}l.defaultChars=";/?:@&=+$,#",l.componentChars="";var u=l;function p(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var h=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,m=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),g=["'"].concat(m),_=["%","/","?",";","#"].concat(g),k=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};p.prototype.parse=function(e,r){var t,n,s,o,i,a=e;if(a=a.trim(),!r&&1===e.split("#").length){var c=d.exec(a);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var l=h.exec(a);if(l&&(s=(l=l[0]).toLowerCase(),this.protocol=l,a=a.substr(l.length)),(r||l||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(i="//"===a.substr(0,2))||l&&C[l]||(a=a.substr(2),this.slashes=!0)),!C[l]&&(i||l&&!y[l])){var u,p,f=-1;for(t=0;t127?D+="x":D+=x[w];if(!D.match(b)){var q=A.slice(0,t),S=A.slice(t+1),F=x.match(v);F&&(q.push(F[1]),S.unshift(F[2])),S.length&&(a=S.join(".")+a),this.hostname=q.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var L=a.indexOf("#");-1!==L&&(this.hash=a.substr(L),a=a.slice(0,L));var z=a.indexOf("?");return-1!==z&&(this.search=a.substr(z),a=a.slice(0,z)),a&&(this.pathname=a),y[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},p.prototype.parseHost=function(e){var r=f.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)};var A=function(e,r){if(e&&e instanceof p)return e;var t=new p;return t.parse(e,r),t};s.encode=a,s.decode=u,s.format=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?r+="["+e.hostname+"]":r+=e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""},s.parse=A;var x={},D=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=/[\0-\x1F\x7F-\x9F]/,E=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;x.Any=D,x.Cc=w,x.Cf=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,x.P=n,x.Z=E,function(e){var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function i(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var r=55296+((e-=65536)>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(c.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),u=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,p=t;var h=/[&<>"]/,f=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function m(e){return d[e]}var g=/[.?*+^$[\]\\(){}|-]/g;var _=n;e.lib={},e.lib.mdurl=s,e.lib.ucmicro=x,e.assign=function(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach((function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach((function(t){e[t]=r[t]}))}})),e},e.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},e.has=o,e.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(c,"$1")},e.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,r,t){return r||function(e,r){var t=0;return o(p,r)?p[r]:35===r.charCodeAt(0)&&u.test(r)&&i(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10))?a(t):e}(e,t)}))},e.isValidEntityCode=i,e.fromCodePoint=a,e.escapeHtml=function(e){return h.test(e)?e.replace(f,m):e},e.arrayReplaceAt=function(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))},e.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(e){return _.test(e)},e.escapeRE=function(e){return e.replace(g,"\\$&")},e.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}}(r);var q={},S=r.unescapeAll,F=r.unescapeAll;q.parseLinkLabel=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos32)return i;if(41===n){if(0===s)break;s--}r++}return o===r||0!==s||(i.str=S(e.slice(o,r)),i.lines=0,i.pos=r,i.ok=!0),i},q.parseLinkTitle=function(e,r,t){var n,s,o=0,i=r,a={ok:!1,pos:0,lines:0,str:""};if(r>=t)return a;if(34!==(s=e.charCodeAt(r))&&39!==s&&40!==s)return a;for(r++,40===s&&(s=41);r"+T(e[r].content)+""},I.code_block=function(e,r,t,n,s){var o=e[r];return""+T(e[r].content)+"\n"},I.fence=function(e,r,t,n,s){var o,i,a,c,l,u=e[r],p=u.info?z(u.info).trim():"",h="",f="";return p&&(h=(a=p.split(/(\s+)/g))[0],f=a.slice(2).join("")),0===(o=t.highlight&&t.highlight(u.content,h,f)||T(u.content)).indexOf(""+o+"\n"):"
"+o+"
\n"},I.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},I.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},I.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},I.text=function(e,r){return T(e[r].content)},I.html_block=function(e,r){return e[r].content},I.html_inline=function(e,r){return e[r].content},M.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;r\n":">")},M.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;i/i.test(e)}var V=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Z=/\((c|tm|r)\)/i,$=/\((c|tm|r)\)/gi,G={c:"©",r:"®",tm:"™"};function H(e,r){return G[r.toLowerCase()]}function J(e){var r,t,n=0;for(r=e.length-1;r>=0;r--)"text"!==(t=e[r]).type||n||(t.content=t.content.replace($,H)),"link_open"===t.type&&"auto"===t.info&&n--,"link_close"===t.type&&"auto"===t.info&&n++}function W(e){var r,t,n=0;for(r=e.length-1;r>=0;r--)"text"!==(t=e[r]).type||n||V.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===t.type&&"auto"===t.info&&n--,"link_close"===t.type&&"auto"===t.info&&n++}var Y=r.isWhiteSpace,K=r.isPunctChar,Q=r.isMdAsciiPunct,X=/['"]/,ee=/['"]/g;function re(e,r,t){return e.slice(0,r)+t+e.slice(r+1)}function te(e,r){var t,n,s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,C,y;for(v=[],t=0;t=0&&!(v[k].level<=c);k--);if(v.length=k+1,"text"===n.type){i=0,a=(s=n.content).length;e:for(;i=0)u=s.charCodeAt(o.index-1);else for(k=t-1;k>=0&&("softbreak"!==e[k].type&&"hardbreak"!==e[k].type);k--)if(e[k].content){u=e[k].content.charCodeAt(e[k].content.length-1);break}if(p=32,i=48&&u<=57&&(_=g=!1),g&&_&&(g=h,_=f),g||_){if(_)for(k=v.length-1;k>=0&&(l=v[k],!(v[k].level=0&&(t=this.attrs[r][1]),t},ne.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);t<0?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r};var se=ne,oe=se;function ie(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}ie.prototype.Token=oe;var ae=ie,ce=N,le=[["normalize",function(e){var r;r=(r=e.src.replace(O,"\n")).replace(P,"�"),e.src=r}],["block",function(e){var r;e.inlineMode?((r=new e.Token("inline","",0)).content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;t=0;r--)if("link_close"!==(i=s[r]).type){if("html_inline"===i.type&&(k=i.content,/^\s]/i.test(k)&&f>0&&f--,U(i.content)&&f++),!(f>0)&&"text"===i.type&&e.md.linkify.test(i.content)){for(l=i.content,_=e.md.linkify.match(l),a=[],h=i.level,p=0,_.length>0&&0===_[0].index&&r>0&&"text_special"===s[r-1].type&&(_=_.slice(1)),c=0;c<_.length;c++)d=_[c].url,m=e.md.normalizeLink(d),e.md.validateLink(m)&&(g=_[c].text,g=_[c].schema?"mailto:"!==_[c].schema||/^mailto:/i.test(g)?e.md.normalizeLinkText(g):e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,""),(u=_[c].index)>p&&((o=new e.Token("text","",0)).content=l.slice(p,u),o.level=h,a.push(o)),(o=new e.Token("link_open","a",1)).attrs=[["href",m]],o.level=h++,o.markup="linkify",o.info="auto",a.push(o),(o=new e.Token("text","",0)).content=g,o.level=h,a.push(o),(o=new e.Token("link_close","a",-1)).level=--h,o.markup="linkify",o.info="auto",a.push(o),p=_[c].lastIndex);p=0;r--)"inline"===e.tokens[r].type&&(Z.test(e.tokens[r].content)&&J(e.tokens[r].children),V.test(e.tokens[r].content)&&W(e.tokens[r].children))}],["smartquotes",function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&X.test(e.tokens[r].content)&&te(e.tokens[r].children,e)}],["text_join",function(e){var r,t,n,s,o,i,a=e.tokens;for(r=0,t=a.length;r=o)return-1;if((t=e.src.charCodeAt(s++))<48||t>57)return-1;for(;;){if(s>=o)return-1;if(!((t=e.src.charCodeAt(s++))>=48&&t<=57)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}return s`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",xe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",De=new RegExp("^(?:"+Ae+"|"+xe+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),we=new RegExp("^(?:"+Ae+"|"+xe+")");ye.HTML_TAG_RE=De,ye.HTML_OPEN_CLOSE_TAG_RE=we;var Ee=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qe=ye.HTML_OPEN_CLOSE_TAG_RE,Se=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(qe.source+"\\s*$"),/^$/,!1]],Fe=r.isSpace,Le=se,ze=r.isSpace;function Te(e,r,t,n){var s,o,i,a,c,l,u,p;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",p=!1,i=a=l=u=0,c=(o=this.src).length;a0&&this.level++,this.tokens.push(n),n},Te.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},Te.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;er;)if(!ze(this.src.charCodeAt(--e)))return e+1;return e},Te.prototype.skipChars=function(e,r){for(var t=this.src.length;et;)if(r!==this.src.charCodeAt(--e))return e+1;return e},Te.prototype.getLines=function(e,r,t,n){var s,o,i,a,c,l,u,p=e;if(e>=r)return"";for(l=new Array(r-e),s=0;pt?new Array(o-t+1).join(" ")+this.src.slice(a,c):this.src.slice(a,c)}return l.join("")},Te.prototype.Token=Le;var Ie=Te,Me=N,Re=[["table",function(e,r,t,n){var s,o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,C;if(r+2>t)return!1;if(l=r+1,e.sCount[l]=4)return!1;if((i=e.bMarks[l]+e.tShift[l])>=e.eMarks[l])return!1;if(124!==(v=e.src.charCodeAt(i++))&&45!==v&&58!==v)return!1;if(i>=e.eMarks[l])return!1;if(124!==(C=e.src.charCodeAt(i++))&&45!==C&&58!==C&&!he(C))return!1;if(45===v&&he(C))return!1;for(;i=4)return!1;if((u=de(o)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),0===(p=u.length)||p!==f.length)return!1;if(n)return!0;for(_=e.parentType,e.parentType="table",b=e.md.block.ruler.getRules("blockquote"),(h=e.push("table_open","table",1)).map=m=[r,0],(h=e.push("thead_open","thead",1)).map=[r,r+1],(h=e.push("tr_open","tr",1)).map=[r,r+1],a=0;a=4)break;for((u=de(o)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),l===r+2&&((h=e.push("tbody_open","tbody",1)).map=g=[r+2,0]),(h=e.push("tr_open","tr",1)).map=[l,l+1],a=0;a=4))break;s=++n}return e.line=s,(o=e.push("code_block","code",0)).content=e.getLines(r,s,4+e.blkIndent,!1)+"\n",o.map=[r,e.line],!0}],["fence",function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(h+3>f)return!1;if(126!==(s=e.src.charCodeAt(h))&&96!==s)return!1;if(c=h,(o=(h=e.skipChars(h,s))-c)<3)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),96===s&&i.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;for(a=r;!(++a>=t)&&!((h=c=e.bMarks[a]+e.tShift[a])<(f=e.eMarks[a])&&e.sCount[a]=4||(h=e.skipChars(h,s))-c=4)return!1;if(62!==e.src.charCodeAt(D++))return!1;if(n)return!0;for(a=h=e.sCount[r]+1,32===e.src.charCodeAt(D)?(D++,a++,h++,s=!1,b=!0):9===e.src.charCodeAt(D)?(b=!0,(e.bsCount[r]+h)%4==3?(D++,a++,h++,s=!1):s=!0):b=!1,f=[e.bMarks[r]],e.bMarks[r]=D;D=w,_=[e.sCount[r]],e.sCount[r]=h-a,k=[e.tShift[r]],e.tShift[r]=D-e.bMarks[r],C=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",p=r+1;p=(w=e.eMarks[p])));p++)if(62!==e.src.charCodeAt(D++)||A){if(l)break;for(v=!1,i=0,c=C.length;i=w,d.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(b?1:0),_.push(e.sCount[p]),e.sCount[p]=h-a,k.push(e.tShift[p]),e.tShift[p]=D-e.bMarks[p]}for(m=e.blkIndent,e.blkIndent=0,(y=e.push("blockquote_open","blockquote",1)).markup=">",y.map=u=[r,0],e.md.block.tokenize(e,r,p),(y=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=x,e.parentType=g,u[1]=e.line,i=0;i=4)return!1;if(42!==(s=e.src.charCodeAt(c++))&&45!==s&&95!==s)return!1;for(o=1;c=4)return!1;if(e.listIndent>=0&&e.sCount[r]-e.listIndent>=4&&e.sCount[r]=e.blkIndent&&(z=!0),(w=be(e,r))>=0){if(u=!0,q=e.bMarks[r]+e.tShift[r],g=Number(e.src.slice(q,w-1)),z&&1!==g)return!1}else{if(!((w=ke(e,r))>=0))return!1;u=!1}if(z&&e.skipSpaces(w)>=e.eMarks[r])return!1;if(m=e.src.charCodeAt(w-1),n)return!0;for(d=e.tokens.length,u?(L=e.push("ordered_list_open","ol",1),1!==g&&(L.attrs=[["start",g]])):L=e.push("bullet_list_open","ul",1),L.map=f=[r,0],L.markup=String.fromCharCode(m),k=r,E=!1,F=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";k=_?1:b-l)>4&&(c=1),a=l+c,(L=e.push("list_item_open","li",1)).markup=String.fromCharCode(m),L.map=p=[r,0],u&&(L.info=e.src.slice(q,w-1)),x=e.tight,A=e.tShift[r],y=e.sCount[r],v=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=a,e.tight=!0,e.tShift[r]=o-e.bMarks[r],e.sCount[r]=b,o>=_&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),e.tight&&!E||(T=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=v,e.tShift[r]=A,e.sCount[r]=y,e.tight=x,(L=e.push("list_item_close","li",-1)).markup=String.fromCharCode(m),k=r=e.line,p[1]=k,o=e.bMarks[r],k>=t)break;if(e.sCount[k]=4)break;for(S=!1,i=0,h=F.length;i=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[A]<0)){for(_=!1,l=0,u=k.length;l=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(a=e.src.slice(c,l),s=0;s=4)return!1;if(35!==(s=e.src.charCodeAt(c))||c>=l)return!1;for(o=1,s=e.src.charCodeAt(++c);35===s&&c6||cc&&Fe(e.src.charCodeAt(i-1))&&(l=i),e.line=r+1,(a=e.push("heading_open","h"+String(o),1)).markup="########".slice(0,o),a.map=[r,e.line],(a=e.push("inline","",0)).content=e.src.slice(c,l).trim(),a.map=[r,e.line],a.children=[],(a=e.push("heading_close","h"+String(o),-1)).markup="########".slice(0,o)),!0)},["paragraph","reference","blockquote"]],["lheading",function(e,r,t){var n,s,o,i,a,c,l,u,p,h,f=r+1,d=e.md.block.ruler.getRules("paragraph");if(e.sCount[r]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";f3)){if(e.sCount[f]>=e.blkIndent&&(c=e.bMarks[f]+e.tShift[f])<(l=e.eMarks[f])&&(45===(p=e.src.charCodeAt(c))||61===p)&&(c=e.skipChars(c,p),(c=e.skipSpaces(c))>=l)){u=61===p?1:2;break}if(!(e.sCount[f]<0)){for(s=!1,o=0,i=d.length;o3||e.sCount[c]<0)){for(n=!1,s=0,o=l.length;s=t))&&!(e.sCount[i]=c){e.line=t;break}for(n=0;n?@[]^_`{|}~-".split("").forEach((function(e){Ve[e.charCodeAt(0)]=1}));var $e={};function Ge(e,r){var t,n,s,o,i,a=[],c=r.length;for(t=0;t=0;t--)95!==(n=r[t]).marker&&42!==n.marker||-1!==n.end&&(s=r[n.end],a=t>0&&r[t-1].end===n.end+1&&r[t-1].marker===n.marker&&r[t-1].token===n.token-1&&r[n.end+1].token===s.token+1,i=String.fromCharCode(n.marker),(o=e.tokens[n.token]).type=a?"strong_open":"em_open",o.tag=a?"strong":"em",o.nesting=1,o.markup=a?i+i:i,o.content="",(o=e.tokens[s.token]).type=a?"strong_close":"em_close",o.tag=a?"strong":"em",o.nesting=-1,o.markup=a?i+i:i,o.content="",a&&(e.tokens[r[t-1].token].content="",e.tokens[r[n.end+1].token].content="",t--))}He.tokenize=function(e,r){var t,n,s=e.pos,o=e.src.charCodeAt(s);if(r)return!1;if(95!==o&&42!==o)return!1;for(n=e.scanDelims(e.pos,42===o),t=0;t\x00-\x20]*)$/,rr=ye.HTML_TAG_RE;var tr=t,nr=r.has,sr=r.isValidEntityCode,or=r.fromCodePoint,ir=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ar=/^&([a-z][a-z0-9]{1,31});/i;function cr(e,r){var t,n,s,o,i,a,c,l,u={},p=r.length;if(p){var h=0,f=-2,d=[];for(t=0;ti;n-=d[n]+1)if((o=r[n]).marker===s.marker&&o.open&&o.end<0&&(c=!1,(o.close||s.open)&&(o.length+s.length)%3==0&&(o.length%3==0&&s.length%3==0||(c=!0)),!c)){l=n>0&&!r[n-1].open?d[n-1]+1:0,d[t]=t-n+l,d[n]=l,s.open=!1,o.end=t,o.close=!1,a=-1,f=-2;break}-1!==a&&(u[s.marker][(s.open?3:0)+(s.length||0)%3]=a)}}}var lr=se,ur=r.isWhiteSpace,pr=r.isPunctChar,hr=r.isMdAsciiPunct;function fr(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}fr.prototype.pushPending=function(){var e=new lr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},fr.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new lr(e,r,t),s=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(s),n},fr.prototype.scanDelims=function(e,r){var t,n,s,o,i,a,c,l,u,p=e,h=!0,f=!0,d=this.posMax,m=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;p0)&&(!((t=e.pos)+3>e.posMax)&&(58===e.src.charCodeAt(t)&&(47===e.src.charCodeAt(t+1)&&(47===e.src.charCodeAt(t+2)&&(!!(n=e.pending.match(Pe))&&(s=n[1],!!(o=e.md.linkify.matchAtStart(e.src.slice(t-s.length)))&&(i=(i=o.url).replace(/\*+$/,""),a=e.md.normalizeLink(i),!!e.md.validateLink(a)&&(r||(e.pending=e.pending.slice(0,-s.length),(c=e.push("link_open","a",1)).attrs=[["href",a]],c.markup="linkify",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(i),(c=e.push("link_close","a",-1)).markup="linkify",c.info="auto"),e.pos+=i.length-s.length,!0)))))))))}],["newline",function(e,r){var t,n,s,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;if(t=e.pending.length-1,n=e.posMax,!r)if(t>=0&&32===e.pending.charCodeAt(t))if(t>=1&&32===e.pending.charCodeAt(t-1)){for(s=t-1;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(o++;o=c)return!1;if(10===(t=e.src.charCodeAt(a))){for(r||e.push("hardbreak","br",0),a++;a=55296&&t<=56319&&a+1=56320&&n<=57343&&(o+=e.src[a+1],a++),s="\\"+o,r||(i=e.push("text_special","",0),t<256&&0!==Ve[t]?i.content=o:i.content=s,i.markup=s,i.info="escape"),e.pos=a+1,!0}],["backticks",function(e,r){var t,n,s,o,i,a,c,l,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(t=u,u++,n=e.posMax;u=f)return!1;if(d=a,(c=e.md.helpers.parseLinkDestination(e.src,a,e.posMax)).ok){for(u=e.md.normalizeLink(c.str),e.md.validateLink(u)?a=c.pos:u="",d=a;a=f||41!==e.src.charCodeAt(a))&&(m=!0),a++}if(m){if(void 0===e.env.references)return!1;if(a=0?s=e.src.slice(d,a++):a=o+1):a=o+1,s||(s=e.src.slice(i,o)),!(l=e.env.references[We(s)]))return e.pos=h,!1;u=l.href,p=l.title}return r||(e.pos=i,e.posMax=o,e.push("link_open","a",1).attrs=t=[["href",u]],p&&t.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=a,e.posMax=f,!0}],["image",function(e,r){var t,n,s,o,i,a,c,l,u,p,h,f,d,m="",g=e.pos,_=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(a=e.pos+2,(i=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((c=i+1)<_&&40===e.src.charCodeAt(c)){for(c++;c<_&&(n=e.src.charCodeAt(c),Qe(n)||10===n);c++);if(c>=_)return!1;for(d=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(m=e.md.normalizeLink(u.str),e.md.validateLink(m)?c=u.pos:m=""),d=c;c<_&&(n=e.src.charCodeAt(c),Qe(n)||10===n);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<_&&d!==c&&u.ok)for(p=u.str,c=u.pos;c<_&&(n=e.src.charCodeAt(c),Qe(n)||10===n);c++);else p="";if(c>=_||41!==e.src.charCodeAt(c))return e.pos=g,!1;c++}else{if(void 0===e.env.references)return!1;if(c<_&&91===e.src.charCodeAt(c)?(d=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?o=e.src.slice(d,c++):c=i+1):c=i+1,o||(o=e.src.slice(a,i)),!(l=e.env.references[Ke(o)]))return e.pos=g,!1;m=l.href,p=l.title}return r||(s=e.src.slice(a,i),e.md.inline.parse(s,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=t=[["src",m],["alt",""]],h.children=f,h.content=s,p&&t.push(["title",p])),e.pos=c,e.posMax=_,!0}],["autolink",function(e,r){var t,n,s,o,i,a,c=e.pos;if(60!==e.src.charCodeAt(c))return!1;for(i=e.pos,a=e.posMax;;){if(++c>=a)return!1;if(60===(o=e.src.charCodeAt(c)))return!1;if(62===o)break}return t=e.src.slice(i+1,c),er.test(t)?(n=e.md.normalizeLink(t),!!e.md.validateLink(n)&&(r||((s=e.push("link_open","a",1)).attrs=[["href",n]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(t),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=t.length+2,!0)):!!Xe.test(t)&&(n=e.md.normalizeLink("mailto:"+t),!!e.md.validateLink(n)&&(r||((s=e.push("link_open","a",1)).attrs=[["href",n]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(t),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=t.length+2,!0))}],["html_inline",function(e,r){var t,n,s,o,i,a=e.pos;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=s)&&(!(33!==(t=e.src.charCodeAt(a+1))&&63!==t&&47!==t&&!function(e){var r=32|e;return r>=97&&r<=122}(t))&&(!!(n=e.src.slice(a).match(rr))&&(r||((o=e.push("html_inline","",0)).content=e.src.slice(a,a+n[0].length),i=o.content,/^\s]/i.test(i)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(o.content)&&e.linkLevel--),e.pos+=n[0].length,!0))))}],["entity",function(e,r){var t,n,s,o=e.pos,i=e.posMax;if(38!==e.src.charCodeAt(o))return!1;if(o+1>=i)return!1;if(35===e.src.charCodeAt(o+1)){if(n=e.src.slice(o).match(ir))return r||(t="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),(s=e.push("text_special","",0)).content=sr(t)?or(t):or(65533),s.markup=n[0],s.info="entity"),e.pos+=n[0].length,!0}else if((n=e.src.slice(o).match(ar))&&nr(tr,n[1]))return r||((s=e.push("text_special","",0)).content=tr[n[1]],s.markup=n[0],s.info="entity"),e.pos+=n[0].length,!0;return!1}]],_r=[["balance_pairs",function(e){var r,t=e.tokens_meta,n=e.tokens_meta.length;for(cr(0,e.delimiters),r=0;r0&&n++,"text"===s[r].type&&r+1=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},kr.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),i=(o=this.ruler2.getRules("")).length,s=0;s=3&&":"===e[r-3]||r>=3&&"/"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},wr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Er(e){var r=e.re=function(e){var r={};return e=e||{},r.src_Any=D.source,r.src_Cc=w.source,r.src_Z=E.source,r.src_P=n.source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|"),r.src_pseudo_letter="(?:(?![><|]|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|[><|]|"+r.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+"|$)|;(?!"+r.src_ZCc+"|$)|\\!+(?!"+r.src_ZCc+"|[!]|$)|\\?(?!"+r.src_ZCc+"|[?]|$))+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy='(^|[><|]|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}(e.__opts__),t=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",r.src_tlds)}e.onCompile(),e.__tlds_replaced__||t.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),t.push(r.src_xn),r.src_tlds=t.join("|"),r.email_fuzzy=RegExp(s(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(s(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(s(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(s(r.tpl_host_fuzzy_test),"i");var o=[];function i(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(r){var t=e.__schemas__[r];if(null!==t){var n={validate:null,link:null};if(e.__compiled__[r]=n,"[object Object]"===Cr(t))return!function(e){return"[object RegExp]"===Cr(e)}(t.validate)?yr(t.validate)?n.validate=t.validate:i(r,t):n.validate=function(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}(t.validate),void(yr(t.normalize)?n.normalize=t.normalize:t.normalize?i(r,t):n.normalize=function(e,r){r.normalize(e)});!function(e){return"[object String]"===Cr(e)}(t)?i(r,t):o.push(r)}})),o.forEach((function(r){e.__compiled__[e.__schemas__[r]]&&(e.__compiled__[r].validate=e.__compiled__[e.__schemas__[r]].validate,e.__compiled__[r].normalize=e.__compiled__[e.__schemas__[r]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,r){r.normalize(e)}};var a=Object.keys(e.__compiled__).filter((function(r){return r.length>0&&e.__compiled__[r]})).map(Ar).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+r.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function qr(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function Sr(e,r){var t=new qr(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function Fr(e,r){if(!(this instanceof Fr))return new Fr(e,r);var t;r||(t=e,Object.keys(t||{}).reduce((function(e,r){return e||xr.hasOwnProperty(r)}),!1)&&(r=e,e={})),this.__opts__=vr({},xr,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=vr({},Dr,e),this.__compiled__={},this.__tlds__=wr,this.__tlds_replaced__=!1,this.re={},Er(this)}Fr.prototype.add=function(e,r){return this.__schemas__[e]=r,Er(this),this},Fr.prototype.set=function(e){return this.__opts__=vr(this.__opts__,e),this},Fr.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c;if(this.re.schema_test.test(e))for((a=this.re.schema_search).lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},Fr.prototype.pretest=function(e){return this.re.pretest.test(e)},Fr.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},Fr.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(Sr(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(Sr(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},Fr.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var r=this.re.schema_at_start.exec(e);if(!r)return null;var t=this.testSchemaAt(e,r[2],r[0].length);return t?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+t,Sr(this,0)):null},Fr.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,r,t){return e!==t[r-1]})).reverse(),Er(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Er(this),this)},Fr.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},Fr.prototype.onCompile=function(){};var Lr=Fr,zr=2147483647,Tr=/^xn--/,Ir=/[^\x20-\x7E]/,Mr=/[\x2E\u3002\uFF0E\uFF61]/g,Rr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Br=Math.floor,Nr=String.fromCharCode; +/*! https://mths.be/punycode v1.4.1 by @mathias */function Or(e){throw new RangeError(Rr[e])}function Pr(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function jr(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+Pr((e=e.replace(Mr,".")).split("."),r).join(".")}function Ur(e){for(var r,t,n=[],s=0,o=e.length;s=55296&&r<=56319&&s65535&&(r+=Nr((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=Nr(e)})).join("")}function Zr(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function $r(e,r,t){var n=0;for(e=t?Br(e/700):e>>1,e+=Br(e/r);e>455;n+=36)e=Br(e/35);return Br(n+36*e/(e+38))}function Gr(e){var r,t,n,s,o,i,a,c,l,u,p,h=[],f=e.length,d=0,m=128,g=72;for((t=e.lastIndexOf("-"))<0&&(t=0),n=0;n=128&&Or("not-basic"),h.push(e.charCodeAt(n));for(s=t>0?t+1:0;s=f&&Or("invalid-input"),((c=(p=e.charCodeAt(s++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||c>Br((zr-d)/i))&&Or("overflow"),d+=c*i,!(c<(l=a<=g?1:a>=g+26?26:a-g));a+=36)i>Br(zr/(u=36-l))&&Or("overflow"),i*=u;g=$r(d-o,r=h.length+1,0==o),Br(d/r)>zr-m&&Or("overflow"),m+=Br(d/r),d%=r,h.splice(d++,0,m)}return Vr(h)}function Hr(e){var r,t,n,s,o,i,a,c,l,u,p,h,f,d,m,g=[];for(h=(e=Ur(e)).length,r=128,t=0,o=72,i=0;i=r&&pBr((zr-t)/(f=n+1))&&Or("overflow"),t+=(a-r)*f,r=a,i=0;izr&&Or("overflow"),p==r){for(c=t,l=36;!(c<(u=l<=o?1:l>=o+26?26:l-o));l+=36)m=c-u,d=36-u,g.push(Nr(Zr(u+m%d,0))),c=Br(m/d);g.push(Nr(Zr(c,0))),o=$r(t,f,n==s),t=0,++n}++t,++r}return g.join("")}function Jr(e){return jr(e,(function(e){return Tr.test(e)?Gr(e.slice(4).toLowerCase()):e}))}function Wr(e){return jr(e,(function(e){return Ir.test(e)?"xn--"+Hr(e):e}))}var Yr={decode:Ur,encode:Vr},Kr={version:"1.4.1",ucs2:Yr,toASCII:Wr,toUnicode:Jr,encode:Hr,decode:Gr},Qr=r,Xr=q,et=R,rt=pe,tt=Ne,nt=br,st=Lr,ot=s,it=e(Object.freeze({__proto__:null,decode:Gr,encode:Hr,toUnicode:Jr,toASCII:Wr,version:"1.4.1",ucs2:Yr,default:Kr})),at={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},ct=/^(vbscript|javascript|file|data):/,lt=/^data:image\/(gif|png|jpeg|webp);/;function ut(e){var r=e.trim().toLowerCase();return!ct.test(r)||!!lt.test(r)}var pt=["http:","https:","mailto:"];function ht(e){var r=ot.parse(e,!0);if(r.hostname&&(!r.protocol||pt.indexOf(r.protocol)>=0))try{r.hostname=it.toASCII(r.hostname)}catch(e){}return ot.encode(ot.format(r))}function ft(e){var r=ot.parse(e,!0);if(r.hostname&&(!r.protocol||pt.indexOf(r.protocol)>=0))try{r.hostname=it.toUnicode(r.hostname)}catch(e){}return ot.decode(ot.format(r),ot.decode.defaultChars+"%")}function dt(e,r){if(!(this instanceof dt))return new dt(e,r);r||Qr.isString(e)||(r=e||{},e="default"),this.inline=new nt,this.block=new tt,this.core=new rt,this.renderer=new et,this.linkify=new st,this.validateLink=ut,this.normalizeLink=ht,this.normalizeLinkText=ft,this.utils=Qr,this.helpers=Qr.assign({},Xr),this.options={},this.configure(e),r&&this.set(r)}dt.prototype.set=function(e){return Qr.assign(this.options,e),this},dt.prototype.configure=function(e){var r,t=this;if(Qr.isString(e)&&!(e=at[r=e]))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)})),this},dt.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(r){t=t.concat(this[r].ruler.enable(e,!0))}),this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return t.indexOf(e)<0}));if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},dt.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(r){t=t.concat(this[r].ruler.disable(e,!0))}),this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return t.indexOf(e)<0}));if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},dt.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},dt.prototype.parse=function(e,r){if("string"!=typeof e)throw new Error("Input data should be a String");var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},dt.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},dt.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},dt.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)};var mt=dt;export default mt; diff --git a/lib/string-similarity.min.js b/lib/string-similarity.min.js new file mode 100644 index 0000000..30ed2e0 --- /dev/null +++ b/lib/string-similarity.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.stringSimilarity=e():t.stringSimilarity=e()}(self,(function(){return t={138:t=>{function e(t,e){if((t=t.replace(/\s+/g,""))===(e=e.replace(/\s+/g,"")))return 1;if(t.length<2||e.length<2)return 0;let r=new Map;for(let e=0;e0&&(r.set(o,s-1),n++)}return 2*n/(t.length+e.length-2)}t.exports={compareTwoStrings:e,findBestMatch:function(t,r){if(!function(t,e){return"string"==typeof t&&!!Array.isArray(e)&&!!e.length&&!e.find((function(t){return"string"!=typeof t}))}(t,r))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");const n=[];let o=0;for(let s=0;sn[o].rating&&(o=s)}return{ratings:n,bestMatch:n[o],bestMatchIndex:o}}}}},e={},function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}(138);var t,e})); \ No newline at end of file diff --git a/lib/uuid-min.js b/lib/uuid-min.js new file mode 100644 index 0000000..afc4614 --- /dev/null +++ b/lib/uuid-min.js @@ -0,0 +1,132 @@ +/** + * Minified by jsDelivr using Terser v5.19.2. + * Original file: /npm/uuidjs@5.1.0/dist/uuid.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +/** + * UUID.js - RFC-compliant UUID Generator for JavaScript + * + * @author LiosK + * @version v5.1.0 + * @license Apache License 2.0: Copyright (c) 2010-2024 LiosK + * @packageDocumentation + */ +var _a; +export class UUID { + static generate() { + var e = _a._getRandomInt, + t = _a._hexAligner; + return t(e(32), 8) + '-' + t(e(16), 4) + '-' + t(16384 | e(12), 4) + '-' + t(32768 | e(14), 4) + '-' + t(e(48), 12); + } + static _getRandomInt(e) { + if (e < 0 || e > 53) return NaN; + var t = 0 | (1073741824 * Math.random()); + return e > 30 ? t + 1073741824 * (0 | (Math.random() * (1 << (e - 30)))) : t >>> (30 - e); + } + static _hexAligner(e, t) { + for (var a = e.toString(16), i = t - a.length, n = '0'; i > 0; i >>>= 1, n += n) 1 & i && (a = n + a); + return a; + } + static useMathRandom() { + _a._getRandomInt = _a._mathPRNG; + } + static genV4() { + var e = _a._getRandomInt; + return new _a(e(32), e(16), 16384 | e(12), 128 | e(6), e(8), e(48)); + } + static parse(e) { + var t; + if ((t = /^\s*(urn:uuid:|\{)?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{12})(\})?\s*$/i.exec(e))) { + var a = t[1] || '', + i = t[8] || ''; + if (a + i === '' || ('{' === a && '}' === i) || ('urn:uuid:' === a.toLowerCase() && '' === i)) + return new _a(parseInt(t[2], 16), parseInt(t[3], 16), parseInt(t[4], 16), parseInt(t[5], 16), parseInt(t[6], 16), parseInt(t[7], 16)); + } + return null; + } + constructor(e, t, a, i, n, s) { + var r = _a.FIELD_NAMES, + _ = _a.FIELD_SIZES, + h = _a._binAligner, + d = _a._hexAligner; + (this.intFields = new Array(6)), (this.bitFields = new Array(6)), (this.hexFields = new Array(6)); + for (var o = 0; o < 6; o++) { + var u = parseInt(arguments[o] || 0); + (this.intFields[o] = this.intFields[r[o]] = u), (this.bitFields[o] = this.bitFields[r[o]] = h(u, _[o])), (this.hexFields[o] = this.hexFields[r[o]] = d(u, _[o] >>> 2)); + } + (this.version = (this.intFields.timeHiAndVersion >>> 12) & 15), + (this.bitString = this.bitFields.join('')), + (this.hexNoDelim = this.hexFields.join('')), + (this.hexString = this.hexFields[0] + '-' + this.hexFields[1] + '-' + this.hexFields[2] + '-' + this.hexFields[3] + this.hexFields[4] + '-' + this.hexFields[5]), + (this.urn = 'urn:uuid:' + this.hexString); + } + static _binAligner(e, t) { + for (var a = e.toString(2), i = t - a.length, n = '0'; i > 0; i >>>= 1, n += n) 1 & i && (a = n + a); + return a; + } + toString() { + return this.hexString; + } + equals(e) { + if (!(e instanceof _a)) return !1; + for (var t = 0; t < 6; t++) if (this.intFields[t] !== e.intFields[t]) return !1; + return !0; + } + static genV1() { + null == _a._state && (_a._state = new UUIDState()); + var e = new Date().getTime(), + t = _a._state; + e != t.timestamp ? (e < t.timestamp && t.sequence++, (t.timestamp = e), (t.tick = _a._getRandomInt(12))) : t.tick < 9992 ? (t.tick += 1 + _a._getRandomInt(3)) : t.sequence++; + var a = _a._getTimeFieldValues(t.timestamp), + i = a.low + t.tick, + n = (4095 & a.hi) | 4096; + t.sequence &= 16383; + var s = (t.sequence >>> 8) | 128, + r = 255 & t.sequence; + return new _a(i, a.mid, n, s, r, t.node); + } + static resetState() { + _a._state = new UUIDState(); + } + static _getTimeFieldValues(e) { + var t = e - Date.UTC(1582, 9, 15), + a = ((t / 4294967296) * 1e4) & 268435455; + return { low: (1e4 * (268435455 & t)) % 4294967296, mid: 65535 & a, hi: a >>> 16, timestamp: t }; + } + static genV6() { + null == _a._state && (_a._state = new UUIDState()); + var e = new Date().getTime(), + t = _a._state; + e != t.timestamp ? (e < t.timestamp && t.sequence++, (t.timestamp = e), (t.tick = _a._getRandomInt(12))) : t.tick < 9992 ? (t.tick += 1 + _a._getRandomInt(3)) : t.sequence++; + var a = t.timestamp - Date.UTC(1582, 9, 15), + i = Math.floor((a / 268435456) * 1e4) % 4294967296, + n = ((1e4 * (268435455 & a)) & 268435455) + t.tick, + s = n >>> 12, + r = (4095 & n) | 24576; + t.sequence &= 16383; + var _ = (t.sequence >>> 8) | 128, + h = 255 & t.sequence; + return new _a(i, s, r, _, h, t.node); + } +} +(_a = UUID), + (UUID._mathPRNG = _a._getRandomInt), + 'undefined' != typeof crypto && + crypto.getRandomValues && + (_a._getRandomInt = (e) => { + if (e < 0 || e > 53) return NaN; + var t = new Uint32Array(e > 32 ? 2 : 1); + return crypto.getRandomValues(t), e > 32 ? t[0] + 4294967296 * (t[1] >>> (64 - e)) : t[0] >>> (32 - e); + }), + (UUID.FIELD_NAMES = ['timeLow', 'timeMid', 'timeHiAndVersion', 'clockSeqHiAndReserved', 'clockSeqLow', 'node']), + (UUID.FIELD_SIZES = [32, 16, 16, 8, 8, 48]), + (UUID.NIL = new _a(0, 0, 0, 0, 0, 0)), + (UUID._state = null); +class UUIDState { + constructor() { + var e = UUID._getRandomInt; + (this.timestamp = 0), (this.tick = 0), (this.sequence = e(14)), (this.node = 1099511627776 * (1 | e(8)) + e(40)); + } +} +//# sourceMappingURL=/sm/14547599d24239455943f4481cadea00302ff64afee28ff8598a7fb36c36ddc0.map diff --git a/lib/wav-decoder@1.3.0.js b/lib/wav-decoder@1.3.0.js new file mode 100644 index 0000000..87fcdd4 --- /dev/null +++ b/lib/wav-decoder@1.3.0.js @@ -0,0 +1,8 @@ +/** + * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. + * Original file: /npm/wav-decoder@1.3.0/index.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={exports:{}};!function(t){var r={1:"lpcm",3:"lpcm"};function e(t,r){r=r||{},n.Buffer&&t instanceof n.Buffer&&(t=Uint8Array.from(t).buffer);var e=function(n){var t=0;return{remain:function(){return n.byteLength-t},skip:function(n){t+=n},uint8:function(){var r=n.getUint8(t,!0);return t+=1,r},int16:function(){var r=n.getInt16(t,!0);return t+=2,r},uint16:function(){var r=n.getUint16(t,!0);return t+=2,r},uint32:function(){var r=n.getUint32(t,!0);return t+=4,r},string:function(n){for(var t="",r=0;r8388608?r-16777216:r;return t+=3,e<0?e/8388608:e/8388607},pcm24s:function(){var r=n.getUint8(t+0)+(n.getUint8(t+1)<<8)+(n.getUint8(t+2)<<16);return t+=3,(r>8388608?r-16777216:r)/8388608},pcm32:function(){var r=n.getInt32(t,!0);return t+=4,r<0?r/2147483648:r/2147483647},pcm32s:function(){var r=n.getInt32(t,!0);return t+=4,r/2147483648},pcm32f:function(){var r=n.getFloat32(t,!0);return t+=4,r},pcm64f:function(){var r=n.getFloat64(t,!0);return t+=8,r}}}(new DataView(t));if("RIFF"!==e.string(4))throw new TypeError("Invalid WAV file");if(e.uint32(),"WAVE"!==e.string(4))throw new TypeError("Invalid WAV file");var a=null,u=null;do{var f=e.string(4),c=e.uint32();switch(f){case"fmt ":if((a=i(e,c))instanceof Error)throw a;break;case"data":if((u=o(e,c,a,r))instanceof Error)throw u;break;default:e.skip(c)}}while(null===u);return u}function i(n,t){var e=n.uint16();if(!r.hasOwnProperty(e))return new TypeError("Unsupported format in WAV file: 0x"+e.toString(16));var i={formatId:e,floatingPoint:3===e,numberOfChannels:n.uint16(),sampleRate:n.uint32(),byteRate:n.uint32(),blockSize:n.uint16(),bitDepth:n.uint16()};return n.skip(t-16),i}function o(n,t,r,e){t=Math.min(t,n.remain());for(var i=Math.floor(t/r.blockSize),o=r.numberOfChannels,a=r.sampleRate,u=new Array(o),f=0;f v-fade + const name = path.match(/\.\/directives\/(.*)\.js$/)[1]; + app.directive(name, directiveModule.default); + } + + app.provide('globalFunction', { + ...globalFunction, + similarityJobs + }); + app.provide('deviceInfo', globalFunction.getdeviceInfo()); + + app.use(SelectPopupPlugin); + app.use(Pinia.createPinia()); + + return { + app, + Pinia + } +} \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..cce7174 --- /dev/null +++ b/manifest.json @@ -0,0 +1,102 @@ +{ + "name": "qingdao-employment-service", + "appid": "__UNI__C939371", + "description": "招聘", + "versionName": "1.0.0", + "versionCode": "100", + "transformPx": false, + /* 5+App特有相关 */ + "app-plus": { + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + /* 模块配置 */ + "modules": {}, + /* 应用发布信息 */ + "distribute": { + /* android打包配置 */ + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios": {}, + /* SDK配置 */ + "sdkConfigs": {} + } + }, + /* 快应用特有相关 */ + "quickapp": {}, + /* 小程序特有相关 */ + "mp-weixin": { + "appid": "", + "setting": { + "urlCheck": false, + "es6": true, + "postcss": true, + "minified": true + }, + "usingComponents": true, + "permission": { + "scope.userLocation": { + "desc": "用于用户选择地图查看位置" + } + } + }, + "mp-alipay": { + "usingComponents": true + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "uniStatistics": { + "enable": false + }, + "vueVersion": "3", + "locale": "zh-Hans", + "h5": { + "router": { + "base": "/app/", + "mode": "hash" + }, + "title": "青岛智慧就业服务", + "optimization": { + "treeShaking": { + "enable": true + } + }, + "sdkConfigs": { + "maps": { + "amap": { + "key": "9cfc9370bd8a941951da1cea0308e9e3", + "securityJsCode": "7b16386c7f744c3ca05595965f2b037f", + "serviceHost": "" + } + } + } + } +} \ No newline at end of file diff --git a/packageA/pages/Intendedposition/Intendedposition.vue b/packageA/pages/Intendedposition/Intendedposition.vue new file mode 100644 index 0000000..1ed76e9 --- /dev/null +++ b/packageA/pages/Intendedposition/Intendedposition.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/packageA/pages/UnitDetails/UnitDetails.vue b/packageA/pages/UnitDetails/UnitDetails.vue new file mode 100644 index 0000000..633857a --- /dev/null +++ b/packageA/pages/UnitDetails/UnitDetails.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/packageA/pages/addPosition/addPosition.vue b/packageA/pages/addPosition/addPosition.vue new file mode 100644 index 0000000..35d1892 --- /dev/null +++ b/packageA/pages/addPosition/addPosition.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/packageA/pages/browseJob/browseJob.vue b/packageA/pages/browseJob/browseJob.vue new file mode 100644 index 0000000..3b2f8f0 --- /dev/null +++ b/packageA/pages/browseJob/browseJob.vue @@ -0,0 +1,224 @@ + + + + + \ No newline at end of file diff --git a/packageA/pages/choiceness/choiceness.vue b/packageA/pages/choiceness/choiceness.vue new file mode 100644 index 0000000..16f89af --- /dev/null +++ b/packageA/pages/choiceness/choiceness.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/packageA/pages/choicenessList/choicenessList.vue b/packageA/pages/choicenessList/choicenessList.vue new file mode 100644 index 0000000..8245d57 --- /dev/null +++ b/packageA/pages/choicenessList/choicenessList.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/packageA/pages/collection/collection.vue b/packageA/pages/collection/collection.vue new file mode 100644 index 0000000..928dd70 --- /dev/null +++ b/packageA/pages/collection/collection.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/packageA/pages/exhibitors/exhibitors.vue b/packageA/pages/exhibitors/exhibitors.vue new file mode 100644 index 0000000..e6872cb --- /dev/null +++ b/packageA/pages/exhibitors/exhibitors.vue @@ -0,0 +1,541 @@ + + + + + diff --git a/packageA/pages/jobExpect/jobExpect.vue b/packageA/pages/jobExpect/jobExpect.vue new file mode 100644 index 0000000..9414cde --- /dev/null +++ b/packageA/pages/jobExpect/jobExpect.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/packageA/pages/moreJobs/moreJobs.vue b/packageA/pages/moreJobs/moreJobs.vue new file mode 100644 index 0000000..94f96e9 --- /dev/null +++ b/packageA/pages/moreJobs/moreJobs.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/packageA/pages/myResume/myResume.vue b/packageA/pages/myResume/myResume.vue new file mode 100644 index 0000000..9ad5638 --- /dev/null +++ b/packageA/pages/myResume/myResume.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/packageA/pages/newJobPosition/newJobPosition.vue b/packageA/pages/newJobPosition/newJobPosition.vue new file mode 100644 index 0000000..4536ce0 --- /dev/null +++ b/packageA/pages/newJobPosition/newJobPosition.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/packageA/pages/personalInfo/personalInfo.vue b/packageA/pages/personalInfo/personalInfo.vue new file mode 100644 index 0000000..cd2a968 --- /dev/null +++ b/packageA/pages/personalInfo/personalInfo.vue @@ -0,0 +1,340 @@ + + + + + diff --git a/packageA/pages/post/component/radarMap.vue b/packageA/pages/post/component/radarMap.vue new file mode 100644 index 0000000..0d7084e --- /dev/null +++ b/packageA/pages/post/component/radarMap.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/packageA/pages/post/component/videoPlayer.vue b/packageA/pages/post/component/videoPlayer.vue new file mode 100644 index 0000000..d118dba --- /dev/null +++ b/packageA/pages/post/component/videoPlayer.vue @@ -0,0 +1,190 @@ + + + + + \ No newline at end of file diff --git a/packageA/pages/post/post.vue b/packageA/pages/post/post.vue new file mode 100644 index 0000000..5223077 --- /dev/null +++ b/packageA/pages/post/post.vue @@ -0,0 +1,568 @@ + + + + + diff --git a/packageA/pages/reservation/component/countdown.vue b/packageA/pages/reservation/component/countdown.vue new file mode 100644 index 0000000..73ea6fd --- /dev/null +++ b/packageA/pages/reservation/component/countdown.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/packageA/pages/reservation/reservation.vue b/packageA/pages/reservation/reservation.vue new file mode 100644 index 0000000..313a73d --- /dev/null +++ b/packageA/pages/reservation/reservation.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/packageA/pages/selectDate/selectDate.vue b/packageA/pages/selectDate/selectDate.vue new file mode 100644 index 0000000..03cf809 --- /dev/null +++ b/packageA/pages/selectDate/selectDate.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/packageA/pages/systemNotification/systemNotification.vue b/packageA/pages/systemNotification/systemNotification.vue new file mode 100644 index 0000000..9124fb2 --- /dev/null +++ b/packageA/pages/systemNotification/systemNotification.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/packageA/pages/tiktok/tiktok.vue b/packageA/pages/tiktok/tiktok.vue new file mode 100644 index 0000000..7430bee --- /dev/null +++ b/packageA/pages/tiktok/tiktok.vue @@ -0,0 +1,136 @@ + + + diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..ea35072 --- /dev/null +++ b/pages.json @@ -0,0 +1,262 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "青岛智慧就业平台", + // #ifdef H5 + "navigationStyle": "custom" + // #endif + } + }, + { + "path": "pages/mine/mine", + "style": { + "navigationBarTitleText": "我的", + "navigationStyle": "custom" + } + }, + { + "path": "pages/msglog/msglog", + "style": { + "navigationBarTitleText": "消息", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/careerfair/careerfair", + "style": { + "navigationBarTitleText": "招聘会", + "navigationStyle": "custom" + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "AI+就业服务程序", + "navigationStyle": "custom" + } + }, + { + "path": "pages/nearby/nearby", + "style": { + "navigationBarTitleText": "附近", + "navigationBarBackgroundColor": "#4778EC", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + }, + { + "path": "pages/chat/chat", + "style": { + "navigationBarTitleText": "AI+", + "navigationBarBackgroundColor": "#4778EC", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false, + // #ifdef H5 + "navigationStyle": "custom" + //#endif + } + }, + { + "path": "pages/search/search", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + } + + ], + "subpackages": [{ + "root": "packageA", + "pages": [{ + "path": "pages/choiceness/choiceness", + "style": { + "navigationBarTitleText": "精选", + "navigationBarBackgroundColor": "#4778EC", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + }, { + "path": "pages/post/post", + "style": { + "navigationBarTitleText": "职位详情", + "navigationBarBackgroundColor": "#4778EC", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + }, { + "path": "pages/UnitDetails/UnitDetails", + "style": { + "navigationBarTitleText": "单位详情", + "navigationBarBackgroundColor": "#4778EC", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + }, { + "path": "pages/exhibitors/exhibitors", + "style": { + "navigationBarTitleText": "参展单位", + "navigationBarBackgroundColor": "#4778EC", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + }, { + "path": "pages/myResume/myResume", + "style": { + "navigationBarTitleText": "我的简历", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { + "path": "pages/Intendedposition/Intendedposition", + "style": { + "navigationBarTitleText": "投递记录", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { + "path": "pages/collection/collection", + "style": { + "navigationBarTitleText": "我的收藏", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom" + } + }, + { + "path": "pages/browseJob/browseJob", + "style": { + "navigationBarTitleText": "我的浏览", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom" + } + }, + { + "path": "pages/addPosition/addPosition", + "style": { + "navigationBarTitleText": "添加岗位", + "navigationStyle": "custom" + } + }, + { + "path": "pages/selectDate/selectDate", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + }, + { + "path": "pages/personalInfo/personalInfo", + "style": { + "navigationBarTitleText": "个人信息", + "navigationStyle": "custom" + } + }, + { + "path": "pages/jobExpect/jobExpect", + "style": { + "navigationBarTitleText": "求职期望", + "navigationStyle": "custom" + } + }, + { + "path": "pages/reservation/reservation", + "style": { + "navigationBarTitleText": "我的预约", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, + { + "path": "pages/choicenessList/choicenessList", + "style": { + "navigationBarTitleText": "精选企业", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom" + } + }, + { + "path": "pages/newJobPosition/newJobPosition", + "style": { + "navigationBarTitleText": "新职位推荐", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, + { + "path": "pages/systemNotification/systemNotification", + "style": { + "navigationBarTitleText": "系统通知", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, + { + "path": "pages/tiktok/tiktok", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom" + } + }, + { + "path": "pages/moreJobs/moreJobs", + "style": { + "navigationBarTitleText": "更多岗位", + "navigationBarBackgroundColor": "#FFFFFF" + } + } + ] + }], + "tabBar": { + "custom": true, + "display": "none", + "color": "#5E5F60", + "selectedColor": "#256BFA", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "midButton": { + "width": "50px", + "height": "50px", + "backgroundImage": "static/tabbar/logo2copy.png" + }, + "list": [{ + "pagePath": "pages/index/index", + "iconPath": "static/tabbar/calendar.png", + "selectedIconPath": "static/tabbar/calendared.png", + "text": "职位" + }, + { + "pagePath": "pages/careerfair/careerfair", + "iconPath": "static/tabbar/post.png", + "selectedIconPath": "static/tabbar/posted.png", + "text": "招聘会" + }, + { + "pagePath": "pages/chat/chat", + "iconPath": "static/tabbar/logo3.png", + "selectedIconPath": "static/tabbar/logo3.png" + }, + { + "pagePath": "pages/msglog/msglog", + "iconPath": "static/tabbar/chat4.png", + "selectedIconPath": "static/tabbar/chat4ed.png", + "text": "消息" + }, + { + "pagePath": "pages/mine/mine", + "iconPath": "static/tabbar/mine.png", + "selectedIconPath": "static/tabbar/mined.png", + "text": "我的" + } + ] + }, + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom", + "rpxCalcBaseDeviceWidth": 375, + "rpxCalcMaxDeviceWidth": 750, + "rpxCalcIncludeWidth": 750 + }, + "uniIdRouter": {} +} \ No newline at end of file diff --git a/pages/careerfair/careerfair.vue b/pages/careerfair/careerfair.vue new file mode 100644 index 0000000..a6754a7 --- /dev/null +++ b/pages/careerfair/careerfair.vue @@ -0,0 +1,539 @@ + + + + + diff --git a/pages/chat/chat.vue b/pages/chat/chat.vue new file mode 100644 index 0000000..591a30c --- /dev/null +++ b/pages/chat/chat.vue @@ -0,0 +1,329 @@ + + + + + diff --git a/pages/chat/components/AudioWave.vue b/pages/chat/components/AudioWave.vue new file mode 100644 index 0000000..d4f4cf8 --- /dev/null +++ b/pages/chat/components/AudioWave.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/pages/chat/components/WaveDisplay.vue b/pages/chat/components/WaveDisplay.vue new file mode 100644 index 0000000..b0d190c --- /dev/null +++ b/pages/chat/components/WaveDisplay.vue @@ -0,0 +1,266 @@ + + + + + diff --git a/pages/chat/components/ai-paging.vue b/pages/chat/components/ai-paging.vue new file mode 100644 index 0000000..295b130 --- /dev/null +++ b/pages/chat/components/ai-paging.vue @@ -0,0 +1,1099 @@ + + + + + diff --git a/pages/chat/components/fileIcon.vue b/pages/chat/components/fileIcon.vue new file mode 100644 index 0000000..888c53b --- /dev/null +++ b/pages/chat/components/fileIcon.vue @@ -0,0 +1,48 @@ + + + diff --git a/pages/chat/components/fileText.vue b/pages/chat/components/fileText.vue new file mode 100644 index 0000000..39e6a0d --- /dev/null +++ b/pages/chat/components/fileText.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/pages/chat/components/popupbadFeeback.vue b/pages/chat/components/popupbadFeeback.vue new file mode 100644 index 0000000..ccf32a7 --- /dev/null +++ b/pages/chat/components/popupbadFeeback.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/pages/index/components/index-one.vue b/pages/index/components/index-one.vue new file mode 100644 index 0000000..138ae78 --- /dev/null +++ b/pages/index/components/index-one.vue @@ -0,0 +1,895 @@ + + + + + diff --git a/pages/index/components/index-two.vue b/pages/index/components/index-two.vue new file mode 100644 index 0000000..e0ba7ea --- /dev/null +++ b/pages/index/components/index-two.vue @@ -0,0 +1,333 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..209ee71 --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,284 @@ + + + + + diff --git a/pages/login/components/tabcontrol.vue b/pages/login/components/tabcontrol.vue new file mode 100644 index 0000000..227435a --- /dev/null +++ b/pages/login/components/tabcontrol.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/pages/login/login.vue b/pages/login/login.vue new file mode 100644 index 0000000..9b2e06d --- /dev/null +++ b/pages/login/login.vue @@ -0,0 +1,468 @@ + + + + + diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue new file mode 100644 index 0000000..e3b7321 --- /dev/null +++ b/pages/mine/mine.vue @@ -0,0 +1,318 @@ + + + + + diff --git a/pages/msglog/msglog.vue b/pages/msglog/msglog.vue new file mode 100644 index 0000000..e099fca --- /dev/null +++ b/pages/msglog/msglog.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/pages/msglog/read.vue b/pages/msglog/read.vue new file mode 100644 index 0000000..58d67a9 --- /dev/null +++ b/pages/msglog/read.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/pages/msglog/unread.vue b/pages/msglog/unread.vue new file mode 100644 index 0000000..9181049 --- /dev/null +++ b/pages/msglog/unread.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/pages/nearby/components/four.vue b/pages/nearby/components/four.vue new file mode 100644 index 0000000..e2860bb --- /dev/null +++ b/pages/nearby/components/four.vue @@ -0,0 +1,372 @@ + + + + + diff --git a/pages/nearby/components/one.vue b/pages/nearby/components/one.vue new file mode 100644 index 0000000..53c3adc --- /dev/null +++ b/pages/nearby/components/one.vue @@ -0,0 +1,439 @@ + + + + + diff --git a/pages/nearby/components/three.vue b/pages/nearby/components/three.vue new file mode 100644 index 0000000..973ca51 --- /dev/null +++ b/pages/nearby/components/three.vue @@ -0,0 +1,551 @@ + + + + + diff --git a/pages/nearby/components/two.vue b/pages/nearby/components/two.vue new file mode 100644 index 0000000..2ffc419 --- /dev/null +++ b/pages/nearby/components/two.vue @@ -0,0 +1,353 @@ + + + + + diff --git a/pages/nearby/nearby.vue b/pages/nearby/nearby.vue new file mode 100644 index 0000000..44833ad --- /dev/null +++ b/pages/nearby/nearby.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/pages/search/search.vue b/pages/search/search.vue new file mode 100644 index 0000000..513227f --- /dev/null +++ b/pages/search/search.vue @@ -0,0 +1,461 @@ + + + + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..a2cb68d --- /dev/null +++ b/readme.md @@ -0,0 +1,49 @@ + +# vue3版本!!! +vue2版本已经上线,欢迎下载使用。 +[https://ext.dcloud.net.cn/plugin?id=13864](https://ext.dcloud.net.cn/plugin?id=13864) + +## uniapp markdown渲染解析.md语法及代码高亮 +> **组件名:uaMarkdown** +> 代码块: `` + + +uaMarkdown组件是基于uniapp+vue3自定义解析markdown语法结构插件、支持代码块高亮,编译兼容H5+小程序端+App端。 + + +### 引入方式 + +本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,只需将本组件`ua-markdown`放在components目录,在页面`template`中即可直接使用。 + + +### 基本用法 + +**示例** + +- 基础用法 + +```html +const mdvalue = '### uniapp markdwon' + +``` + +- 去掉代码块行号 + +```html + +``` + + +### API + +### uaMarkdown Props + +|属性名|类型|默认值|说明| +|:-:|:-:|:-:|:-:| +|source|String|-| 渲染解析内容 | +|showLine|Boolean|true| 是否显示代码块行号 | + + +### 💝最后 + +开发不易,希望各位小伙伴们多多支持下哈~~ ☕️☕️ diff --git a/static/file/csv.png b/static/file/csv.png new file mode 100644 index 0000000..9108986 Binary files /dev/null and b/static/file/csv.png differ diff --git a/static/file/doc.png b/static/file/doc.png new file mode 100644 index 0000000..a9eec6f Binary files /dev/null and b/static/file/doc.png differ diff --git a/static/file/excel.png b/static/file/excel.png new file mode 100644 index 0000000..658a505 Binary files /dev/null and b/static/file/excel.png differ diff --git a/static/file/html.png b/static/file/html.png new file mode 100644 index 0000000..c730402 Binary files /dev/null and b/static/file/html.png differ diff --git a/static/file/md.png b/static/file/md.png new file mode 100644 index 0000000..f789311 Binary files /dev/null and b/static/file/md.png differ diff --git a/static/file/other.png b/static/file/other.png new file mode 100644 index 0000000..b8b66bd Binary files /dev/null and b/static/file/other.png differ diff --git a/static/file/pdf.png b/static/file/pdf.png new file mode 100644 index 0000000..7a9c70b Binary files /dev/null and b/static/file/pdf.png differ diff --git a/static/file/ppt.png b/static/file/ppt.png new file mode 100644 index 0000000..a343e06 Binary files /dev/null and b/static/file/ppt.png differ diff --git a/static/file/txt.png b/static/file/txt.png new file mode 100644 index 0000000..68f2c2e Binary files /dev/null and b/static/file/txt.png differ diff --git a/static/font/DingTalk JinBuTi_min.woff2 b/static/font/DingTalk JinBuTi_min.woff2 new file mode 100644 index 0000000..5705da2 Binary files /dev/null and b/static/font/DingTalk JinBuTi_min.woff2 differ diff --git a/static/gif/logo.gif b/static/gif/logo.gif new file mode 100644 index 0000000..5e52cec Binary files /dev/null and b/static/gif/logo.gif differ diff --git a/static/icon/Comment-one.png b/static/icon/Comment-one.png new file mode 100644 index 0000000..6125995 Binary files /dev/null and b/static/icon/Comment-one.png differ diff --git a/static/icon/Group1.png b/static/icon/Group1.png new file mode 100644 index 0000000..e20a906 Binary files /dev/null and b/static/icon/Group1.png differ diff --git a/static/icon/Hamburger-button.png b/static/icon/Hamburger-button.png new file mode 100644 index 0000000..ceddaff Binary files /dev/null and b/static/icon/Hamburger-button.png differ diff --git a/static/icon/Location.png b/static/icon/Location.png new file mode 100644 index 0000000..f61c857 Binary files /dev/null and b/static/icon/Location.png differ diff --git a/static/icon/Location1.png b/static/icon/Location1.png new file mode 100644 index 0000000..a990a12 Binary files /dev/null and b/static/icon/Location1.png differ diff --git a/static/icon/Location12.png b/static/icon/Location12.png new file mode 100644 index 0000000..ac6a3b6 Binary files /dev/null and b/static/icon/Location12.png differ diff --git a/static/icon/Vector2.png b/static/icon/Vector2.png new file mode 100644 index 0000000..b79667f Binary files /dev/null and b/static/icon/Vector2.png differ diff --git a/static/icon/addGroup.png b/static/icon/addGroup.png new file mode 100644 index 0000000..232649b Binary files /dev/null and b/static/icon/addGroup.png differ diff --git a/static/icon/addGroup1.png b/static/icon/addGroup1.png new file mode 100644 index 0000000..803138f Binary files /dev/null and b/static/icon/addGroup1.png differ diff --git a/static/icon/aibg.png b/static/icon/aibg.png new file mode 100644 index 0000000..83474f3 Binary files /dev/null and b/static/icon/aibg.png differ diff --git a/static/icon/back.png b/static/icon/back.png new file mode 100644 index 0000000..db6e87e Binary files /dev/null and b/static/icon/back.png differ diff --git a/static/icon/backAI.png b/static/icon/backAI.png new file mode 100644 index 0000000..11ed51f Binary files /dev/null and b/static/icon/backAI.png differ diff --git a/static/icon/backAI2.png b/static/icon/backAI2.png new file mode 100644 index 0000000..e266e3b Binary files /dev/null and b/static/icon/backAI2.png differ diff --git a/static/icon/background2.png b/static/icon/background2.png new file mode 100644 index 0000000..a01bf88 Binary files /dev/null and b/static/icon/background2.png differ diff --git a/static/icon/bell.png b/static/icon/bell.png new file mode 100644 index 0000000..f087deb Binary files /dev/null and b/static/icon/bell.png differ diff --git a/static/icon/boy.png b/static/icon/boy.png new file mode 100644 index 0000000..9ccb778 Binary files /dev/null and b/static/icon/boy.png differ diff --git a/static/icon/boy1.png b/static/icon/boy1.png new file mode 100644 index 0000000..5417adf Binary files /dev/null and b/static/icon/boy1.png differ diff --git a/static/icon/broadcast.png b/static/icon/broadcast.png new file mode 100644 index 0000000..27dd611 Binary files /dev/null and b/static/icon/broadcast.png differ diff --git a/static/icon/broadcast1.png b/static/icon/broadcast1.png new file mode 100644 index 0000000..e9e189c Binary files /dev/null and b/static/icon/broadcast1.png differ diff --git a/static/icon/browse.png b/static/icon/browse.png new file mode 100644 index 0000000..f7cb6fe Binary files /dev/null and b/static/icon/browse.png differ diff --git a/static/icon/chat4ed.png b/static/icon/chat4ed.png new file mode 100644 index 0000000..f9e089c Binary files /dev/null and b/static/icon/chat4ed.png differ diff --git a/static/icon/collect.png b/static/icon/collect.png new file mode 100644 index 0000000..9649f78 Binary files /dev/null and b/static/icon/collect.png differ diff --git a/static/icon/collect2.png b/static/icon/collect2.png new file mode 100644 index 0000000..8af5939 Binary files /dev/null and b/static/icon/collect2.png differ diff --git a/static/icon/collect3.png b/static/icon/collect3.png new file mode 100644 index 0000000..e53ddc5 Binary files /dev/null and b/static/icon/collect3.png differ diff --git a/static/icon/companyBG.png b/static/icon/companyBG.png new file mode 100644 index 0000000..f2279c1 Binary files /dev/null and b/static/icon/companyBG.png differ diff --git a/static/icon/companyIcon.png b/static/icon/companyIcon.png new file mode 100644 index 0000000..45a6114 Binary files /dev/null and b/static/icon/companyIcon.png differ diff --git a/static/icon/companyLocation.png b/static/icon/companyLocation.png new file mode 100644 index 0000000..bd2fab6 Binary files /dev/null and b/static/icon/companyLocation.png differ diff --git a/static/icon/copy.png b/static/icon/copy.png new file mode 100644 index 0000000..2577429 Binary files /dev/null and b/static/icon/copy.png differ diff --git a/static/icon/copy1.png b/static/icon/copy1.png new file mode 100644 index 0000000..33c7b1d Binary files /dev/null and b/static/icon/copy1.png differ diff --git a/static/icon/date1.png b/static/icon/date1.png new file mode 100644 index 0000000..1ca2c73 Binary files /dev/null and b/static/icon/date1.png differ diff --git a/static/icon/delete1.png b/static/icon/delete1.png new file mode 100644 index 0000000..521d152 Binary files /dev/null and b/static/icon/delete1.png differ diff --git a/static/icon/downs.png b/static/icon/downs.png new file mode 100644 index 0000000..dd240a2 Binary files /dev/null and b/static/icon/downs.png differ diff --git a/static/icon/edit.png b/static/icon/edit.png new file mode 100644 index 0000000..f173310 Binary files /dev/null and b/static/icon/edit.png differ diff --git a/static/icon/edit1.png b/static/icon/edit1.png new file mode 100644 index 0000000..5a34886 Binary files /dev/null and b/static/icon/edit1.png differ diff --git a/static/icon/empty.png b/static/icon/empty.png new file mode 100644 index 0000000..0f9bad9 Binary files /dev/null and b/static/icon/empty.png differ diff --git a/static/icon/feedback.png b/static/icon/feedback.png new file mode 100644 index 0000000..cb2446c Binary files /dev/null and b/static/icon/feedback.png differ diff --git a/static/icon/feedback1.png b/static/icon/feedback1.png new file mode 100644 index 0000000..fe148d1 Binary files /dev/null and b/static/icon/feedback1.png differ diff --git a/static/icon/file1.png b/static/icon/file1.png new file mode 100644 index 0000000..c44243d Binary files /dev/null and b/static/icon/file1.png differ diff --git a/static/icon/file2.png b/static/icon/file2.png new file mode 100644 index 0000000..0776598 Binary files /dev/null and b/static/icon/file2.png differ diff --git a/static/icon/file3.png b/static/icon/file3.png new file mode 100644 index 0000000..071100b Binary files /dev/null and b/static/icon/file3.png differ diff --git a/static/icon/filter.png b/static/icon/filter.png new file mode 100644 index 0000000..706cb34 Binary files /dev/null and b/static/icon/filter.png differ diff --git a/static/icon/flame.png b/static/icon/flame.png new file mode 100644 index 0000000..5f3b10d Binary files /dev/null and b/static/icon/flame.png differ diff --git a/static/icon/flame2.png b/static/icon/flame2.png new file mode 100644 index 0000000..3ddd897 Binary files /dev/null and b/static/icon/flame2.png differ diff --git a/static/icon/fujin.png b/static/icon/fujin.png new file mode 100644 index 0000000..61f35d3 Binary files /dev/null and b/static/icon/fujin.png differ diff --git a/static/icon/girl.png b/static/icon/girl.png new file mode 100644 index 0000000..7164286 Binary files /dev/null and b/static/icon/girl.png differ diff --git a/static/icon/girl1.png b/static/icon/girl1.png new file mode 100644 index 0000000..08ffc95 Binary files /dev/null and b/static/icon/girl1.png differ diff --git a/static/icon/image.png b/static/icon/image.png new file mode 100644 index 0000000..880691a Binary files /dev/null and b/static/icon/image.png differ diff --git a/static/icon/jinxuan.png b/static/icon/jinxuan.png new file mode 100644 index 0000000..dff5a39 Binary files /dev/null and b/static/icon/jinxuan.png differ diff --git a/static/icon/location3.png b/static/icon/location3.png new file mode 100644 index 0000000..212eeda Binary files /dev/null and b/static/icon/location3.png differ diff --git a/static/icon/man.png b/static/icon/man.png new file mode 100644 index 0000000..51b5d98 Binary files /dev/null and b/static/icon/man.png differ diff --git a/static/icon/mapLine.png b/static/icon/mapLine.png new file mode 100644 index 0000000..bd2fab6 Binary files /dev/null and b/static/icon/mapLine.png differ diff --git a/static/icon/msgTopbg.png b/static/icon/msgTopbg.png new file mode 100644 index 0000000..8b8e9e9 Binary files /dev/null and b/static/icon/msgTopbg.png differ diff --git a/static/icon/msgtype.png b/static/icon/msgtype.png new file mode 100644 index 0000000..1a6d8df Binary files /dev/null and b/static/icon/msgtype.png differ diff --git a/static/icon/msgtype2.png b/static/icon/msgtype2.png new file mode 100644 index 0000000..3e4ddd6 Binary files /dev/null and b/static/icon/msgtype2.png differ diff --git a/static/icon/msgtype3.png b/static/icon/msgtype3.png new file mode 100644 index 0000000..e11673e Binary files /dev/null and b/static/icon/msgtype3.png differ diff --git a/static/icon/peopled.png b/static/icon/peopled.png new file mode 100644 index 0000000..0d057a9 Binary files /dev/null and b/static/icon/peopled.png differ diff --git a/static/icon/pintDate.png b/static/icon/pintDate.png new file mode 100644 index 0000000..4700b48 Binary files /dev/null and b/static/icon/pintDate.png differ diff --git a/static/icon/point.png b/static/icon/point.png new file mode 100644 index 0000000..af0833a Binary files /dev/null and b/static/icon/point.png differ diff --git a/static/icon/point2.png b/static/icon/point2.png new file mode 100644 index 0000000..0cdd0be Binary files /dev/null and b/static/icon/point2.png differ diff --git a/static/icon/point3.png b/static/icon/point3.png new file mode 100644 index 0000000..3b0c3f3 Binary files /dev/null and b/static/icon/point3.png differ diff --git a/static/icon/pointpeople.png b/static/icon/pointpeople.png new file mode 100644 index 0000000..26b5dae Binary files /dev/null and b/static/icon/pointpeople.png differ diff --git a/static/icon/post12.png b/static/icon/post12.png new file mode 100644 index 0000000..6ee8cd3 Binary files /dev/null and b/static/icon/post12.png differ diff --git a/static/icon/post13.png b/static/icon/post13.png new file mode 100644 index 0000000..aded0e8 Binary files /dev/null and b/static/icon/post13.png differ diff --git a/static/icon/quaters.png b/static/icon/quaters.png new file mode 100644 index 0000000..4faf70a Binary files /dev/null and b/static/icon/quaters.png differ diff --git a/static/icon/recommendday.png b/static/icon/recommendday.png new file mode 100644 index 0000000..93ac901 Binary files /dev/null and b/static/icon/recommendday.png differ diff --git a/static/icon/refresh.png b/static/icon/refresh.png new file mode 100644 index 0000000..a56ded8 Binary files /dev/null and b/static/icon/refresh.png differ diff --git a/static/icon/refresh1.png b/static/icon/refresh1.png new file mode 100644 index 0000000..8ec850c Binary files /dev/null and b/static/icon/refresh1.png differ diff --git a/static/icon/resume.png b/static/icon/resume.png new file mode 100644 index 0000000..c67ee3b Binary files /dev/null and b/static/icon/resume.png differ diff --git a/static/icon/save.png b/static/icon/save.png new file mode 100644 index 0000000..a584d60 Binary files /dev/null and b/static/icon/save.png differ diff --git a/static/icon/send2x.png b/static/icon/send2x.png new file mode 100644 index 0000000..cc89d57 Binary files /dev/null and b/static/icon/send2x.png differ diff --git a/static/icon/send2xx.png b/static/icon/send2xx.png new file mode 100644 index 0000000..221d628 Binary files /dev/null and b/static/icon/send2xx.png differ diff --git a/static/icon/send3.png b/static/icon/send3.png new file mode 100644 index 0000000..4f888f6 Binary files /dev/null and b/static/icon/send3.png differ diff --git a/static/icon/send4.png b/static/icon/send4.png new file mode 100644 index 0000000..0a4d35c Binary files /dev/null and b/static/icon/send4.png differ diff --git a/static/icon/server1.png b/static/icon/server1.png new file mode 100644 index 0000000..980ac7e Binary files /dev/null and b/static/icon/server1.png differ diff --git a/static/icon/server2.png b/static/icon/server2.png new file mode 100644 index 0000000..af47843 Binary files /dev/null and b/static/icon/server2.png differ diff --git a/static/icon/server3.png b/static/icon/server3.png new file mode 100644 index 0000000..94130f6 Binary files /dev/null and b/static/icon/server3.png differ diff --git a/static/icon/server4.png b/static/icon/server4.png new file mode 100644 index 0000000..62ad641 Binary files /dev/null and b/static/icon/server4.png differ diff --git a/static/icon/setting.png b/static/icon/setting.png new file mode 100644 index 0000000..1d8d262 Binary files /dev/null and b/static/icon/setting.png differ diff --git a/static/icon/shaixun.png b/static/icon/shaixun.png new file mode 100644 index 0000000..b7b4c27 Binary files /dev/null and b/static/icon/shaixun.png differ diff --git a/static/icon/share.png b/static/icon/share.png new file mode 100644 index 0000000..7585739 Binary files /dev/null and b/static/icon/share.png differ diff --git a/static/icon/stop.png b/static/icon/stop.png new file mode 100644 index 0000000..8c59022 Binary files /dev/null and b/static/icon/stop.png differ diff --git a/static/icon/stop1.png b/static/icon/stop1.png new file mode 100644 index 0000000..7cfbdb7 Binary files /dev/null and b/static/icon/stop1.png differ diff --git a/static/icon/success.png b/static/icon/success.png new file mode 100644 index 0000000..4780f75 Binary files /dev/null and b/static/icon/success.png differ diff --git a/static/icon/tips2.png b/static/icon/tips2.png new file mode 100644 index 0000000..884ec9a Binary files /dev/null and b/static/icon/tips2.png differ diff --git a/static/icon/woman.png b/static/icon/woman.png new file mode 100644 index 0000000..fb2813b Binary files /dev/null and b/static/icon/woman.png differ diff --git a/static/imgs/fristEntry.png b/static/imgs/fristEntry.png new file mode 100644 index 0000000..1952571 Binary files /dev/null and b/static/imgs/fristEntry.png differ diff --git a/static/js/jweixin-1.4.0.js b/static/js/jweixin-1.4.0.js new file mode 100644 index 0000000..fc060ce --- /dev/null +++ b/static/js/jweixin-1.4.0.js @@ -0,0 +1 @@ +((e,n)=>{"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)})(this,function(r,e){var a,c,n,i,t,s,d,o,l,u,p,f,m,g,h,S,I,y,v,_,k,w;if(!r.jWeixin)return a={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},c=(()=>{var e,n={};for(e in a)n[a[e]]=e;return n})(),i=(n=r.document).title,t=navigator.userAgent.toLowerCase(),f=navigator.platform.toLowerCase(),s=!(!f.match("mac")&&!f.match("win")),d=-1!=t.indexOf("wxdebugger"),o=-1!=t.indexOf("micromessenger"),l=-1!=t.indexOf("android"),u=-1!=t.indexOf("iphone")||-1!=t.indexOf("ipad"),p=(f=t.match(/micromessenger\/(\d+\.\d+\.\d+)/)||t.match(/micromessenger\/(\d+\.\d+)/))?f[1]:"",m={initStartTime:L(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},g={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:u?1:l?2:-1,clientVersion:p,url:encodeURIComponent(location.href)},h={},S={_completes:[]},I={state:0,data:{}},B(function(){m.initEndTime=L()}),y=!1,v=[],_={config:function(e){C("config",h=e);var o=!1!==h.check;B(function(){if(o)T(a.config,{verifyJsApiList:V(h.jsApiList)},(S._complete=function(e){m.preVerifyEndTime=L(),I.state=1,I.data=e},S.success=function(e){g.isPreVerifyOk=0},S.fail=function(e){S._fail?S._fail(e):I.state=-1},(t=S._completes).push(function(){var n;s||d||h.debug||p<"6.0.2"||g.systemType<0||(n=new Image,g.appId=h.appId,g.initTime=m.initEndTime-m.initStartTime,g.preVerifyTime=m.preVerifyEndTime-m.preVerifyStartTime,_.getNetworkType({isInnerInvoke:!0,success:function(e){g.networkType=e.networkType,n.src="https://open.weixin.qq.com/sdk/report?v="+g.version+"&o="+g.isPreVerifyOk+"&s="+g.systemType+"&c="+g.clientVersion+"&a="+g.appId+"&n="+g.networkType+"&i="+g.initTime+"&p="+g.preVerifyTime+"&u="+g.url}}))}),S.complete=function(e){for(var n=0,i=t.length;n{var n;if("string"==typeof e&&0{var i,t=c[e];return t&&(e=t),t="ok",n&&(i=n.indexOf(":"),"access denied"!=(t=(t=(t=-1!=(t=-1!=(t="failed"==(t="confirm"==(t=n.substring(i+1))?"ok":t)?"fail":t).indexOf("failed_")?t.substring(7):t).indexOf("fail_")?t.substring(5):t).replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=t||(t="permission denied"),""==(t="config"==e&&"function not exist"==t?"ok":t))&&(t="fail"),n=e+":"+t})(e,t),n.errMsg=t),(i=i||{})._complete&&(i._complete(n),delete i._complete),t=n.errMsg||"",h.debug&&!i.isInnerInvoke&&alert(JSON.stringify(n)),t.indexOf(":"));switch(t.substring(e+1)){case"ok":i.success&&i.success(n);break;case"cancel":i.cancel&&i.cancel(n);break;default:i.fail&&i.fail(n)}i.complete&&i.complete(n)}function V(e){if(e){for(var n=0,i=e.length;n + + + + 找工作,用 AI 更高效|青岛市智能求职平台 + + + + + + + + + + + + +

正在加载中...

+ + \ No newline at end of file diff --git a/static/svg/seemore.svg b/static/svg/seemore.svg new file mode 100644 index 0000000..c67b4dd --- /dev/null +++ b/static/svg/seemore.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/tabbar/calendar.png b/static/tabbar/calendar.png new file mode 100644 index 0000000..c4cb15d Binary files /dev/null and b/static/tabbar/calendar.png differ diff --git a/static/tabbar/calendared.png b/static/tabbar/calendared.png new file mode 100644 index 0000000..9375e4f Binary files /dev/null and b/static/tabbar/calendared.png differ diff --git a/static/tabbar/chat4.png b/static/tabbar/chat4.png new file mode 100644 index 0000000..79ff2ba Binary files /dev/null and b/static/tabbar/chat4.png differ diff --git a/static/tabbar/chat4ed.png b/static/tabbar/chat4ed.png new file mode 100644 index 0000000..275610a Binary files /dev/null and b/static/tabbar/chat4ed.png differ diff --git a/static/tabbar/logo2copy.png b/static/tabbar/logo2copy.png new file mode 100644 index 0000000..b4b8be8 Binary files /dev/null and b/static/tabbar/logo2copy.png differ diff --git a/static/tabbar/logo3.png b/static/tabbar/logo3.png new file mode 100644 index 0000000..6560f4d Binary files /dev/null and b/static/tabbar/logo3.png differ diff --git a/static/tabbar/mine.png b/static/tabbar/mine.png new file mode 100644 index 0000000..d785078 Binary files /dev/null and b/static/tabbar/mine.png differ diff --git a/static/tabbar/mined.png b/static/tabbar/mined.png new file mode 100644 index 0000000..7b00998 Binary files /dev/null and b/static/tabbar/mined.png differ diff --git a/static/tabbar/post.png b/static/tabbar/post.png new file mode 100644 index 0000000..a3ae5d0 Binary files /dev/null and b/static/tabbar/post.png differ diff --git a/static/tabbar/posted.png b/static/tabbar/posted.png new file mode 100644 index 0000000..de79c82 Binary files /dev/null and b/static/tabbar/posted.png differ diff --git a/stores/BaseDBStore.js b/stores/BaseDBStore.js new file mode 100644 index 0000000..7920c34 --- /dev/null +++ b/stores/BaseDBStore.js @@ -0,0 +1,73 @@ +// BaseStore.js - 基础Store类 +import IndexedDBHelper from '@/common/IndexedDBHelper.js' +// import UniStorageHelper from '../common/UniStorageHelper' +import useChatGroupDBStore from './userChatGroupStore' +import config from '@/config' + + +class BaseStore { + db = null + isDBReady = false + dbName = 'BrowsingHistory' + constructor() { + this.checkAndInitDB() + } + checkAndInitDB() { + // 获取本地数据库版本 + if (config.OnlyUseCachedDB) { + return this.initDB() + } + const localVersion = uni.getStorageSync('indexedDBVersion') || 1 + console.log('DBVersion: ', localVersion, config.DBversion) + if (localVersion === config.DBversion) { + this.initDB() + } else { + console.log('清空本地数据库') + this.clearDB().then(() => { + uni.setStorageSync('indexedDBVersion', config.DBversion); + this.initDB(); + }); + } + } + initDB() { + // // #ifdef H5 + this.db = new IndexedDBHelper(this.dbName, config.DBversion); + // // #endif + // // #ifndef H5 + // this.db = new UniStorageHelper(this.dbName, config.DBversion); + // // #endif + this.db.openDB([{ + name: 'record', + keyPath: "id", + autoIncrement: true, + }, { + name: 'messageGroup', + keyPath: "id", + autoIncrement: true, + }, { + name: 'messages', + keyPath: "id", + autoIncrement: true, + indexes: [{ + name: 'parentGroupId', + key: 'parentGroupId', + unique: false + }] + }]).then(async () => { + useChatGroupDBStore().init() + this.isDBReady = true + }); + } + async clearDB() { + return new Promise((resolve, rejetc) => { + new IndexedDBHelper().deleteDB(this.dbName).then(() => { + resolve() + }) + }) + } + +} + +const baseDB = new BaseStore() + +export default baseDB \ No newline at end of file diff --git a/stores/useDictStore.js b/stores/useDictStore.js new file mode 100644 index 0000000..e65bc43 --- /dev/null +++ b/stores/useDictStore.js @@ -0,0 +1,188 @@ +import { + defineStore +} from 'pinia'; +import { + reactive, + ref, +} from 'vue' +import { + createRequest +} from "../utils/request"; + +// 静态树 O(1) 超快查询!!!!! +let IndustryMap = null +// 构建索引 +function buildIndex(tree) { + const map = new Map(); + + function traverse(nodes) { + for (const node of nodes) { + map.set(node.id, node); + if (node.children && node.children.length) { + traverse(node.children); + } + } + } + traverse(tree); + return map; +} +const useDictStore = defineStore("dict", () => { + // 定义状态 + const complete = ref(false) + const state = reactive({ + education: [], + experience: [], + area: [], + scale: [], + isPublish: [], + sex: [], + affiliation: [], + industry: [], + nature: [], + noticeType: [] + }) + // political_affiliation + const getDictData = async (dictType, dictName) => { + try { + if (dictType && dictName) { + return getDictSelectOption(dictType).then((data) => { + state[dictName] = data + return data + }) + } + const [education, experience, area, scale, sex, affiliation, nature, noticeType] = + await Promise.all([ + getDictSelectOption('education'), + getDictSelectOption('experience'), + getDictSelectOption('area', true), + getDictSelectOption('scale'), + getDictSelectOption('app_sex'), + getDictSelectOption('political_affiliation'), + getDictSelectOption('company_nature'), + getDictSelectOption('sys_notice_type'), + ]); + + state.education = education; + state.experience = experience; + state.area = area; + state.scale = scale; + state.sex = sex; + state.affiliation = affiliation; + state.nature = nature + state.noticeType = noticeType + complete.value = true + getIndustryDict() // 获取行业 + } catch (error) { + console.error('Error fetching dictionary data:', error); + } + }; + + async function getIndustryDict() { + if (state.industry.length) return + const resp = await createRequest(`/app/common/industry/treeselect`); + if (resp.code === 200 && resp.data) { + state.industry = resp.data + IndustryMap = buildIndex(resp.data); + } + return []; + } + + function industryLabel(dictType, value) { + switch (dictType) { + case 'industry': + if (!IndustryMap) return + const data = IndustryMap.get(Number(value))?.label || '' + return data + } + return null + } + + function dictLabel(dictType, value) { + if (state[dictType]) { + for (let i = 0; i < state[dictType].length; i++) { + let element = state[dictType][i]; + if (element.value === value) { + return element.label + } + } + } + return '' + } + + function oneDictData(dictType, value) { + if (!value) { + return state[dictType] + } + if (state[dictType]) { + for (let i = 0; i < state[dictType].length; i++) { + let element = state[dictType][i]; + if (element.value === value) { + return element + } + } + } + return null + } + + function getTransformChildren(dictType, title = '', key = '') { + if (dictType) { + return { + label: title, + key: key || dictType, + options: state[dictType], + } + } + return null + } + + async function getDictSelectOption(dictType, isDigital) { + const resp = await createRequest(`/app/common/dict/${dictType}`); + if (resp.code === 200 && resp.data) { + const options = resp.data.map((item) => { + return { + text: item.dictLabel, + label: item.dictLabel, + value: isDigital ? Number(item.dictValue) : item.dictValue, + key: item.dictCode, + listClass: item.listClass, + status: item.listClass, + }; + }); + return options; + } + return []; + } + + async function getDictValueEnum(dictType, isDigital) { + const resp = await createRequest(`/app/common/dict/${dictType}`); + if (resp.code === 200 && resp.data) { + const opts = {}; + resp.data.forEach((item) => { + opts[item.dictValue] = { + text: item.dictLabel, + label: item.dictLabel, + value: isDigital ? Number(item.dictValue) : item.dictValue, + key: item.dictCode, + listClass: item.listClass, + status: item.listClass, + }; + }); + return opts; + } else { + return {}; + } + } + + // 导入 + return { + getDictData, + dictLabel, + oneDictData, + complete, + getDictSelectOption, + getTransformChildren, + industryLabel + } +}) + +export default useDictStore; \ No newline at end of file diff --git a/stores/useLocationStore.js b/stores/useLocationStore.js new file mode 100644 index 0000000..a4e3342 --- /dev/null +++ b/stores/useLocationStore.js @@ -0,0 +1,79 @@ +import { + defineStore +} from 'pinia'; +import { + ref +} from 'vue' +import { + msg +} from '@/common/globalFunction.js' +import config from '../config'; + +const useLocationStore = defineStore("location", () => { + // 定义状态 + const longitudeVal = ref(null) // 经度 + const latitudeVal = ref(null) //纬度 + + function getLocation() { + return new Promise((resole, reject) => { + uni.getLocation({ + type: 'wgs84', + altitude: true, + isHighAccuracy: true, + enableHighAccuracy: true, // 关键参数:启用传感器辅助 + timeout: 10000, + success: function(res) { + const resd = { + longitude: 120.382665, + latitude: 36.066938 + } + if (config.UsingSimulatedPositioning) { // 使用模拟定位 + longitudeVal.value = resd.longitude + latitudeVal.value = resd.latitude + msg('用户位置获取成功') + resole(resd) + } else { + longitudeVal.value = res.longitude + latitudeVal.value = res.latitude + msg('用户位置获取成功') + resole(res) + } + }, + fail: function(err) { + // longitudeVal.value = '' + // latitudeVal.value = '' + // reject(err) + const resd = { + longitude: 120.382665, + latitude: 36.066938 + } + longitudeVal.value = resd.longitude + latitudeVal.value = resd.latitude + msg('用户位置获取失败,使用模拟定位') + resole(resd) + }, + complete: function(e) { + console.warn('getUserLocation' + JSON.stringify(e)) + } + }) + }) + } + + function longitude() { + return longitudeVal.value + } + + function latitude() { + return latitudeVal.value + } + + // 导入 + return { + getLocation, + longitudeVal, + latitudeVal + + } +}) + +export default useLocationStore; \ No newline at end of file diff --git a/stores/useReadMsg.js b/stores/useReadMsg.js new file mode 100644 index 0000000..bdc93b9 --- /dev/null +++ b/stores/useReadMsg.js @@ -0,0 +1,111 @@ +// store/useReadMsg.js +import { + defineStore +} from 'pinia' +import { + ref, + computed, + watch +} from 'vue' +import { + msg, + $api, +} from '../common/globalFunction'; + +// 控制消息 +export const useReadMsg = defineStore('readMsg', () => { + const msgList = ref([]) + const badges = ref([{ + count: 0 + }, + { + count: 0 + }, + { + count: 0 + }, + { + count: 0 + }, + { + count: 0 + }, + ]) + + // 计算总未读数量,基于 notReadCount 字段 + const unreadCount = computed(() => + msgList.value.reduce((sum, msg) => sum + (msg.notReadCount || 0), 0) + ) + + // 未读消息列表 + const unreadMsgList = computed(() => + msgList.value.filter(msg => msg.notReadCount > 0) + ) + + + // 设置 TabBar 角标 + function updateTabBarBadge() { + const count = unreadCount.value + const index = 3 + const countVal = count > 99 ? '99+' : String(count) + if (count === 0) { + uni.removeTabBarBadge({ + index + }) // 替换为你消息页面的 TabBar index + badges.value[index] = { + count: 0 + } + } else { + badges.value[index] = { + count: countVal + } + uni.setTabBarBadge({ + index, + text: countVal + }) + } + } + + + // 拉取消息列表 + async function fetchMessages() { + try { + $api.createRequest('/app/notice/info', { + isRead: 1 + }, "GET").then((res) => { + msgList.value = res.data || [] + updateTabBarBadge() + }) + } catch (err) { + console.error('获取消息失败:', err) + } + } + + // 设置为已读 + async function markAsRead(item, index) { + const msg = msgList.value[index] + if (!msg || msg.isRead === 1) return + + try { + let params = { + id: msg.noticeId + } + $api.createRequest('/app/notice/read?id=' + msg.noticeId, params, "POST").then((res) => { + msgList.value[index].isRead = 1 + updateTabBarBadge() + }) + } catch (err) { + console.error('设置消息已读失败:', err) + } + } + + return { + badges, + msgList, + unreadMsgList, + unreadCount, + fetchMessages, + markAsRead, + updateTabBarBadge + } +}) \ No newline at end of file diff --git a/stores/useRecommedIndexedDBStore.js b/stores/useRecommedIndexedDBStore.js new file mode 100644 index 0000000..bd493c3 --- /dev/null +++ b/stores/useRecommedIndexedDBStore.js @@ -0,0 +1,164 @@ +import { + defineStore +} from 'pinia'; +import { + ref +} from 'vue' +import useDictStore from '@/stores/useDictStore'; +import jobAnalyzer from '@/utils/jobAnalyzer'; +import { + msg +} from '@/common/globalFunction.js' +import baseDB from './BaseDBStore'; +import config from '../config'; + +class JobRecommendation { + constructor() { + this.conditions = {}; // 存储最新的条件及其出现次数 + this.askHistory = new Map(); // 记录每个条件的最后询问时间 + this.cooldown = 5 * 60 * 1000; // 冷却时间(单位:毫秒) + } + + updateConditions(newConditions) { + this.conditions = newConditions; + } + + getCurrentTime() { + return Date.now(); + } + + deleteHostiry(name) { + for (const [key, value] of Object.entries(this.conditions)) { + if (key === name) { + delete this.conditions[key] + } + } + this.askHistory.delete(name) + } + + /** + * 获取下一个符合条件的推荐问题 + * @returns {string|null} 返回推荐的问题,或 null(无可询问的) + */ + getNextQuestion() { + const now = this.getCurrentTime(); + + // 按照出现次数降序排序 + const sortedConditions = Object.entries(this.conditions) + .sort((a, b) => b[1] - a[1]); // 按出现次数降序排序 + + + for (const [condition, count] of sortedConditions) { + const lastAskedTime = this.askHistory.get(condition); + + if (!lastAskedTime || now - lastAskedTime >= this.cooldown) { + this.askHistory.set(condition, now); + + return condition; + } + } + + return null; // 没有可询问的 + } +} + +/** + * 计算加权用户行为偏好 + * @param {Object} data - 用户行为数据,包括 categories、experience、areas、salary 等 + * @param {Object} weights - 每一类行为的权重 + * @returns {Object} 加权合并后的结果(key 为行为项,value 为权重后的分值) + */ +function applyWeightsToUserData(data, weights) { + const result = {} + + for (const key in data) { + if (key === 'salary') { + result.salary = weights.salary + } else if (typeof data[key] === 'object') { + result[key] = {} + for (const itemKey in data[key]) { + const rawValue = data[key][itemKey] + result[key][itemKey] = parseFloat((rawValue * weights[key]).toFixed(2)) + } + } + } + + return result +} + +// **🔹 创建推荐系统** +export const jobRecommender = new JobRecommendation(); + +export const useRecommedIndexedDBStore = defineStore("indexedDB", () => { + const tableName = ref('record') + const total = ref(200) // 记录多少条数据 + + // 插入数据 + async function addRecord(payload) { + const totalRecords = await baseDB.db.getRecordCount(tableName.value); + if (totalRecords >= total.value) { + console.log(`⚠数据超过 ${total.value} 条,删除最早的一条...`); + await baseDB.db.deleteOldestRecord(tableName.value); + } + if (!baseDB.isDBReady) await baseDB.initDB(); + return await baseDB.db.add(tableName.value, payload); + } + // 清除数据 1、清除数据库数据 + async function deleteRecords(payload) { + if (!baseDB.isDBReady) await baseDB.initDB(); + try { + const jobstr = payload.jobCategory + const jobsObj = { + '地区': 'jobLocationAreaCodeLabel', + '岗位': 'jobCategory', + '经验': 'experIenceLabel', + } + const [name, value] = jobstr.split(':') + const nameAttr = jobsObj[name] + jobRecommender.deleteHostiry(jobstr) + return await baseDB.db.deleteByCondition(tableName.value, (record) => record[nameAttr] === + value); + } catch {} + } + + // 获取所有数据 + async function getRecord() { + if (!baseDB.isDBReady) await baseDB.initDB(); + return await baseDB.db.getAll(tableName.value); + } + + // 格式化浏览数据岗位数据 + function JobParameter(job) { + const experIenceLabel = useDictStore().dictLabel('experience', job.experience) + const jobLocationAreaCodeLabel = useDictStore().dictLabel('area', job.jobLocationAreaCode) + return { + jobCategory: job.jobCategory, + jobTitle: job.jobTitle, + minSalary: job.minSalary, + maxSalary: job.maxSalary, + experience: job.experience, + experIenceLabel, + jobLocationAreaCode: job.jobLocationAreaCode, + jobLocationAreaCodeLabel, + createTime: Date.now() + } + } + + function analyzer(jobsData) { + const result = jobAnalyzer.analyze(jobsData) // 转换格式化 + const result2 = applyWeightsToUserData(result, config.weights) // 添加权重 + const sort = jobAnalyzer.printUnifiedResults(result2) // 转换格式化 + return { + result, + sort + } + } + + return { + addRecord, + getRecord, + JobParameter, + analyzer, + deleteRecords + }; +}); \ No newline at end of file diff --git a/stores/useUserStore.js b/stores/useUserStore.js new file mode 100644 index 0000000..f56d972 --- /dev/null +++ b/stores/useUserStore.js @@ -0,0 +1,146 @@ +import { + defineStore +} from 'pinia'; +import { + ref +} from 'vue' +import { + createRequest +} from '@/utils/request'; +import similarityJobs from '@/utils/similarity_Job.js'; +import { + UUID +} from "@/lib/uuid-min.js"; +import { + useReadMsg +} from '@/stores/useReadMsg'; + +// 简历完成度计算 +function getResumeCompletionPercentage(resume) { + const requiredFields = [ + 'name', + 'age', + 'sex', + 'birthDate', + 'education', + 'politicalAffiliation', + 'phone', + 'salaryMin', + 'salaryMax', + 'area', + 'status', + 'jobTitleId', + 'jobTitle', + ]; + + const totalFields = requiredFields.length; + let filledFields = requiredFields.filter((field) => { + const value = resume[field]; + return value !== null && value !== '' && !(Array.isArray(value) && value.length === 0); + }).length; + + return ((filledFields / totalFields) * 100).toFixed(0) + '%'; +} + +const useUserStore = defineStore("user", () => { + // 定义状态 + const hasLogin = ref(false) + // const openId = ref('') + const userInfo = ref({}); + const role = ref({}); + const token = ref('') + const resume = ref({}) + const Completion = ref('0%') + const seesionId = ref(uni.getStorageSync('seesionId') || '') + + const login = (value) => { + hasLogin.value = true; + userInfo.value = value; + openId.value = value.wxOpenId; + token.value = value.token; + uni.setStorage({ + key: 'token', + data: value.token + }); + } + + const logOut = () => { + hasLogin.value = false; + token.value = '' + resume.value = {} + userInfo.value = {} + role.value = {} + uni.clearStorageSync('userInfo') + uni.clearStorageSync('token') + uni.redirectTo({ + url: '/pages/login/login', + }); + } + + const getUserInfo = () => { + return new Promise((reslove, reject) => { + createRequest('/getInfo', {}, 'get').then((userInfo) => { + setUserInfo(userInfo); + reslove(userInfo) + }); + }) + } + + const getUserResume = () => { + return new Promise((reslove, reject) => { + createRequest('/app/user/resume', {}, 'get').then((resume) => { + Completion.value = getResumeCompletionPercentage(resume.data) + similarityJobs.setUserInfo(resume.data) + setUserInfo(resume); + reslove(resume) + }); + }) + } + + const loginSetToken = async (value) => { + token.value = value + uni.setStorageSync('token', value); + // 获取消息列表 + useReadMsg().fetchMessages() + // 获取用户信息 + return getUserResume() + } + + const setUserInfo = (values) => { + userInfo.value = values.data; + // role.value = values.role; + hasLogin.value = true; + } + + + const tokenlogin = (token) => { + createRequest('/app/login', { + token + }).then((resData) => { + onsole.log(resData) + }) + } + + const initSeesionId = () => { + const seesionIdVal = UUID.generate() + uni.setStorageSync('seesionId', seesionIdVal); + seesionId.value = seesionIdVal + } + + // 导入 + return { + hasLogin, + userInfo, + token, + resume, + login, + logOut, + loginSetToken, + getUserResume, + initSeesionId, + seesionId, + Completion + } +}) + +export default useUserStore; \ No newline at end of file diff --git a/stores/userChatGroupStore.js b/stores/userChatGroupStore.js new file mode 100644 index 0000000..b7d6c41 --- /dev/null +++ b/stores/userChatGroupStore.js @@ -0,0 +1,340 @@ +import { + defineStore +} from 'pinia'; +import { + reactive, + ref, + toRaw +} from 'vue' +import baseDB from './BaseDBStore'; +import { + msg, + CloneDeep, + $api, + formatDate, + insertSortData +} from '../common/globalFunction'; +import { + UUID +} from '../lib/uuid-min'; +import config from '../config'; +import { + clearJobMoreMap +} from '@/utils/markdownParser'; + +const useChatGroupDBStore = defineStore("messageGroup", () => { + const tableName = ref('messageGroup') + const massageName = ref('messages') + + const messages = ref([]) // 消息列表 + const isTyping = ref(false) // 是否正在输入 + const textInput = ref('') + // tabel + const tabeList = ref([]) + const chatSessionID = ref('') + const lastDateRef = ref('') + + async function init() { + // 获取所有数据 + setTimeout(async () => { + if (!baseDB.isDBReady) await baseDB.initDB(); + const result = await baseDB.db.getAll(tableName.value); + // 1、判断是否有数据,没数据请求服务器 + if (result.length) { + console.warn('本地数据库存在数据') + const list = result.reverse() + const [table, lastData] = insertSortData(list) + tabeList.value = table + const tabelRow = list[0] + chatSessionID.value = tabelRow.sessionId + initMessage(tabelRow.sessionId) + } else { + if (config.OnlyUseCachedDB) return; + console.warn('本地数据库不存在数据') + getHistory('refresh') + } + }, 1000) + } + + async function initMessage(sessionId) { + if (!baseDB.isDBReady) await baseDB.initDB(); + chatSessionID.value = sessionId + const list = await baseDB.db.queryByField(massageName.value, 'parentGroupId', sessionId); + clearJobMoreMap() // 清空对话 加载更多参数 + if (list.length) { + console.log('本地数据库存在该对话数据', list) + messages.value = list + } else { + console.log('本地数据库不存在该对话数据') + getHistoryRecord('refresh') + } + } + + async function addMessage(payload) { + if (!chatSessionID.value) { + return msg('请创建对话') + } + const params = { + ...payload, + parentGroupId: chatSessionID.value, + files: payload.files || [], + } + messages.value.push(params); + addMessageIndexdb(params) + } + + function toggleTyping(status) { + isTyping.value = status + } + + async function addTabel(text) { + if (!baseDB.isDBReady) await baseDB.initDB(); + const uuid = UUID.generate() // 对话sessionId + let payload = { + title: text, + createTime: formatDate(Date.now()), + sessionId: uuid + } + const id = await baseDB.db.add(tableName.value, payload); + const list = await baseDB.db.getAll(tableName.value); + chatSessionID.value = uuid + const [result, lastData] = insertSortData(list) + tabeList.value = result + return id + } + + async function addMessageIndexdb(payload) { + return await baseDB.db.add(massageName.value, payload); + } + + async function getStearm(text, fileUrls = [], progress) { + + return new Promise((resolve, reject) => { + try { + toggleTyping(true); + const customDataID = 'message_' + UUID.generate() + const params = { + data: text, + sessionId: chatSessionID.value, + dataId: customDataID + }; + if (fileUrls && fileUrls.length) { + params['fileUrl'] = fileUrls.map((item) => item.url); + } + // ------> + const MsgData = { + text: text, + self: true, + displayText: text, + files: fileUrls + }; + addMessage(MsgData); // 添加message数据 + // <------ + const newMsg = { + text: '', // 存储原始结构化内容 + self: false, + displayText: '', // 用于流式渲染展示 + dataId: customDataID + }; + const index = messages.value.length; + messages.value.push(newMsg); + + const rawParts = Array.isArray(text) ? text : [text]; // 统一处理 + + // 用于追加每个部分的流式数据 + let partIndex = 0; + + function handleUnload() { + newMsg.parentGroupId = chatSessionID.value; + baseDB.db.add(massageName.value, newMsg).then((id) => { + messages.value[index] = { + ...newMsg, + id + }; + }); + } + window.addEventListener("unload", handleUnload); + + function onDataReceived(data) { + // 支持追加多个部分 + newMsg.text += data; + newMsg.displayText += data; + messages.value[index] = { + ...newMsg + }; + progress && progress(); + } + + function onError(error) { + msg('服务响应异常'); + reject(error); + } + + function onComplete() { + messages.value[index] = { + ...newMsg + }; + toggleTyping(false); + window.removeEventListener("unload", handleUnload); + handleUnload(); + resolve(); + } + + $api.streamRequest('/chat', params, onDataReceived, onError, onComplete); + } catch (err) { + console.log(err); + reject(err); + } + }); + } + + // 状态控制 + function addNewDialogue() { + chatSessionID.value = '' + messages.value = [] + } + + function changeDialogue(item) { + chatSessionID.value = item.sessionId + initMessage(item.sessionId) + } + + // 云端数据 + function badFeedback(msgs, content = '') { + return new Promise((resolve, reject) => { + if (!msgs.dataId) { + return msg('旧数据,没有dataId') + } + let parmas = { + dataId: msgs.dataId, + sessionId: msgs.parentGroupId, + userBadFeedback: content, + } + + const dbData = { + ...toRaw(msgs), + userBadFeedback: content, + } + + $api.chatRequest('/stepped', parmas, 'POST').then((res) => { + baseDB.db.update(massageName.value, dbData) // 更新本地数据库 + messages.value.forEach((item) => { + if (item.id === dbData.id) { + item.userBadFeedback = content + resolve() + } + }) + }) + }) + } + + // 云端数据 + function getHistory() { + $api.chatRequest('/getHistory').then((res) => { + if (!res.data.list.length) return + let tabel = parseHistory(res.data.list) + if (tabel && tabel.length) { + const tabelRow = tabel[0] // 默认第一个 + const [result, lastData] = insertSortData(tabel) + // console.log('getHistory insertSortData', result, lastData) + chatSessionID.value = tabelRow.sessionId + tabeList.value = result + getHistoryRecord(false) + baseDB.db.add(tableName.value, tabel); + lastDateRef.value = lastData + } + }) + } + + function getHistoryRecord(loading = true) { + const params = { + sessionId: chatSessionID.value + } + $api.chatRequest('/detail', params, 'GET', loading).then((res) => { + let list = parseHistoryDetail(res.data.list, chatSessionID.value) + if (list.length) { + baseDB.db.add(massageName.value, list).then((ids) => { + messages.value = listAddId(list, ids) + }); + } + console.log('解析后:', list) + }).catch(() => { + msg('请求出现异常,请联系工作人员') + }) + } + + // 解析器 + function parseHistory(list) { + return list.map((item) => ({ + title: item.title, + createTime: item.updateTime, + sessionId: item.chatId + })) + } + + function parseHistoryDetail(list, sessionId) { + const arr = [] + for (let i = 0; i < list.length; i++) { + const element = list[i]; + const self = element.obj !== 'AI' + let text = '' + let files = [] + for (let j = 0; j < element.value.length; j++) { + const obj = element.value[j]; + if (obj.type === 'text') { + text += obj.text.content + } + if (obj.type === 'file') { + files.push(obj.file) + } + if (obj.type === 'tool') { + console.log(obj) + } + } + arr.push({ + parentGroupId: sessionId, + displayText: text, + self: self, + text: text, + userBadFeedback: element.userBadFeedback || '', + dataId: element.dataId, + files, + }) + } + return arr + } + + + function listAddId(list, ids) { + return list.map((item, index) => ({ + ...item, + id: ids[index] || ids + })) + } + + return { + messages, + isTyping, + textInput, + chatSessionID, + tabeList, + init, + toggleTyping, + addTabel, + addNewDialogue, + changeDialogue, + getStearm, + getHistory, + badFeedback + }; +}); + +function safeParseJSON(data) { + try { + return JSON.parse(data); + } catch { + return null; // 解析失败,返回 null + } +} + +export default useChatGroupDBStore \ No newline at end of file diff --git a/uni.promisify.adaptor.js b/uni.promisify.adaptor.js new file mode 100644 index 0000000..5fec4f3 --- /dev/null +++ b/uni.promisify.adaptor.js @@ -0,0 +1,13 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => { + if (!res) return resolve(res) + return res[0] ? reject(res[0]) : resolve(res[1]) + }); + }); + }, +}); \ No newline at end of file diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..6c5bb60 --- /dev/null +++ b/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color: #333; //基本色 +$uni-text-color-inverse: #fff; //反色 +$uni-text-color-grey: #999; //辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable: #c0c0c0; + +/* 背景颜色 */ +$uni-bg-color: #ffffff; +$uni-bg-color-grey: #f8f8f8; +$uni-bg-color-hover: #f1f1f1; //点击状态颜色 +$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色 + +/* 边框颜色 */ +$uni-border-color: #c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm: 12px; +$uni-font-size-base: 14px; +$uni-font-size-lg: 16px; + +/* 图片尺寸 */ +$uni-img-size-sm: 20px; +$uni-img-size-base: 26px; +$uni-img-size-lg: 40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2c405a; // 文章标题颜色 +$uni-font-size-title: 20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle: 26px; +$uni-color-paragraph: #3f536e; // 文章段落颜色 +$uni-font-size-paragraph: 15px; diff --git a/uni_modules/custom-waterfalls-flow/changelog.md b/uni_modules/custom-waterfalls-flow/changelog.md new file mode 100644 index 0000000..67cd423 --- /dev/null +++ b/uni_modules/custom-waterfalls-flow/changelog.md @@ -0,0 +1,17 @@ +## 1.0.7(2022-05-26) +1. 优化局部改变数据更新问题,避免重新加载数据,只改变局部 +## 1.0.6(2022-04-18) +1. 修改tab快速切换时会出现的BUG +## 1.0.5(2022-04-18) +1. 修复可能存在数据错误的BUG; +2. 兼容,今后可以无需调用refresh()就可以更新数据; +## 1.0.4(2022-04-18) +1. 修复BUG; +## 1.0.3(2022-04-15) +1. 优化代码; +2. 修改懒加载数据存在的BUG; +## 1.0.1(2022-03-11) +1. 增加隐藏图片字段的键名字段hideImageKey,默认hide +2. 支持在列表中配置hide参数进行隐藏图片 +## 1.0.0(2022-03-09) +使用最简单的思想实现瀑布流 diff --git a/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue b/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue new file mode 100644 index 0000000..2b18e1a --- /dev/null +++ b/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue @@ -0,0 +1,362 @@ + + + diff --git a/uni_modules/custom-waterfalls-flow/package.json b/uni_modules/custom-waterfalls-flow/package.json new file mode 100644 index 0000000..5861272 --- /dev/null +++ b/uni_modules/custom-waterfalls-flow/package.json @@ -0,0 +1,80 @@ +{ + "id": "custom-waterfalls-flow", + "displayName": "瀑布流 灵活配置 简单易用 兼容vue2vue3小程序、H5、app等多端", + "version": "1.0.7", + "description": "瀑布流,根据内容自动计算进行流式布局,简单参数配置,实现兼容多端及vue2和vue3的瀑布流布局;uv-ui发布https://ext.dcloud.net.cn/plugin?name=uv-ui", + "keywords": [ + "瀑布流", + "瀑布流式布局" +], + "repository": "https://gitee.com/my_dear_li_pan/my-uni-modules.git", +"engines": { + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "插件不采集任何数据", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "Vue": { + "vue2": "y", + "vue3": "y" + }, + "App": { + "app-vue": "y", + "app-nvue": "n" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "u", + "Edge": "u", + "Firefox": "y", + "Safari": "u" + }, + "小程序": { + "微信": "y", + "阿里": "u", + "百度": "y", + "字节跳动": "y", + "QQ": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/custom-waterfalls-flow/readme.md b/uni_modules/custom-waterfalls-flow/readme.md new file mode 100644 index 0000000..5ac9f19 --- /dev/null +++ b/uni_modules/custom-waterfalls-flow/readme.md @@ -0,0 +1,445 @@ +- 概要 +- 支持的平台 +- 使用方式 +- 属性说明 +- 事件说明 +- 组件方法 +- refresh的使用示例 +- 隐藏单项图片示例 +- 完整示例 +- 温馨提示 +- 关注我,不迷路 +- 个人作品展示 + +
+ +#### 概要 + +custom-waterfalls-flow是一个瀑布流插件,灵活配置、简单易用、兼容多端、同时兼容vue2和vue3。 + +最近在做项目的时候需要用到瀑布流,于是在插件市场找了一些,下载量最高的是用了定位来做的,我认为瀑布流可以不用定位去实现,于是我就自己写了该插件。经过反复的测试优化,最终搞定! + +**设置列数:** 瀑布流的列数可以通过参数直接控制,实时监听,随改随生效。列数最小为2,最大默认为5,可以通过maxColumn参数去控制最大列数,理论上可以设置无限大,具体值自己拿捏。 + +**更新数据:** 瀑布流的每项数据,可以直接通过修改value,随改随生效,这样可以实现加载更多数据。已经渲染过的数据不会再次渲染,每次只会渲染新增的数据,这样避免了数据越多渲染越慢的情况。可以调用组件的```refresh()```方法进行数据刷新,注意vue2和vue3中调用子组件的方法有区别,也会在下面进行说明。 + +**展示方式:** 瀑布流可以是纯图片,可以使用插槽自定义文字描述,微信小程序与app、h5使用会有些区别,也会在下面具体说明。内容高度及排序都不用担心,会根据每项的内容高度自动计算。 + +**实现思路:** 通过配置列数,先渲染出每列,再计算每列的高度,最小的那列就加入一条数据进行渲染,然后再重复计算每列,高度小的加入数据...其实思路是很简单的。 + +uniapp插件市场地址:[https://ext.dcloud.net.cn/plugin?id=7594](https://ext.dcloud.net.cn/plugin?id=7594) + +
+ +#### 支持的平台 + +H5、app、微信小程序(这三个平台经过反复测试优化,兼容vue2和vue3)。 + +百度小程序:由于插槽不能循环渲染的限制,只支持纯图片瀑布流。 + +其他小程序:暂未测试,需要的可以自己测试和修改,思路肯定是没错的,主要是兼容插槽的问题。 + +nvue:暂不支持,后期可能会支持,目前需要的可以自己修改源码。 + +
+ +#### 使用方式 + +**1、导入插件** + +该组件符合uni_modules规范,使用Hbuilderx导入插件,导入到项目根目录中的uni_modules文件夹中。 + +**2、template中使用** + +uni_modules规范在项目页面中直接使用,不需要单独引入注册组件。 + +***纯图片瀑布流使用*** + +``` + +``` + +***微信小程序自定义内容使用*** + +微信小程序没有动态模板,使用for循环的方式进行渲染。 + +``` + +``` + +***h5、app端自定义内容使用*** + +使用作用域插槽实现 + +``` + +``` + +***小程序、h5、app等多端自定义内容使用*** + +条件渲染-多端同时兼容 + +``` + +``` + +
+ +#### 属性说明 + +参数|说明|类型|是否必填|可选值|默认值 +-|-|-|-|-|-| +value|渲染的列表|Array|是|-|- +column|列数|Number|否|2-maxColumn|2 +maxColumn|最大列数|Number|否|>2|5 +columnSpace|列之间的间距(单位是百分比)|Number|否|-|2 +imageKey|列表中的图片字段的键名|String|否|-|image +hideImageKey|隐藏图片字段的键名|String|否|-|hide +seat|自定义文字的位置,1-图片上方,2-图片下方|Number|否|1/2|2 +listStyle|单个展示项的样式|Object|否|示例:```{'background':'red'}```|- + +
+ +#### 事件说明 + +事件名称|说明|回调参数 +-|-|-| +@loaded|图片加载完成事件|- +@wapperClick|单项点击事件|单项对应参数 +@imageClick|图片点击事件|单项对应参数 + +
+ +#### 组件方法 + +事件名称|说明|参数|使用场景 +-|-|-|- +refresh|刷新数据,数据初始化,vue2中使用:```this.$refs.waterfallsFlowRef.refresh();```;vue3中使用:```const waterfallsFlowRef = ref(null);waterfallsFlowRef.value.refresh();```|-|下拉刷新等 + +
+ +#### refresh的使用示例 + +***vue2中使用*** + +``` + + +``` + +***vue3中使用*** + +``` + + +``` + +
+ +#### 隐藏单项图片示例 + +在数据列表中配置```hide:true```或者```hide:1```,就可以达到不显示图片的效果。支持使用参数hideImageKey自定义键名称,那就使用:```定义的键名称:true```或者```定义的键名称:1```。 + +``` + + +``` + +
+ +#### 完整示例 + +``` + + + + + +``` + +
+ +#### 温馨提示 + +1、该插件反复测试过微信小程序、h5、app-vue三个端,vue2和vue3都兼容,其他端可能需要测试改进。 + +2、该插件的使用hbuilderx版本最好升级到较新版本,我开发的版本是hbuilderx3.3.11.20220209。 + +3、对此插件或相关问题有好的建议,可以直接在评论区进行讨论。 + +4、希望遇到问题不要喷,也不要骂人,其实这种心情我能理解,写该插件也不是一时半会就完成了的,所以希望互相理解。只要有问题,我会第一时间回复解决。 + +5、对此插件有任何问题的可以在下方留言,我会第一时间回复和解决问题。还可以加QQ群进行前端技术交流 568984539,加群备注‘地区-名字-技术类型’。 + +#### 最后我想说:认为该插件对你有帮助的,记得收藏、好评,这样可以帮助到更多人哟! + +--- + +
+ +#### 关注我,不迷路 + +如果任何疑问的可以在评论区留言,还可以加QQ群交流:568984539,加群备注‘地区-名字-技术类型’。 + +更多前端等相关知识可关注我个人博客:https://blog.csdn.net/qq_42961150?spm=1011.2124.3001.5343 + +
+ +#### 个人作品展示 + +uniapp+vue3.2+unicloud开发微信小程序:**皮皮虎去水印**。 + +关注下方公众号:【**全网免费网盘资源**】、【**美团外卖饿了么天天领红包**】、【**去水印**】 + +![image](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-bb657efd-fece-483e-a715-5daea480fde8/6e029310-aec8-46e9-9883-1c88dc1925ad.jpg) \ No newline at end of file diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md new file mode 100644 index 0000000..0261131 --- /dev/null +++ b/uni_modules/uni-icons/changelog.md @@ -0,0 +1,42 @@ +## 2.0.10(2024-06-07) +- 优化 uni-app x 中,size 属性的类型 +## 2.0.9(2024-01-12) +fix: 修复图标大小默认值错误的问题 +## 2.0.8(2023-12-14) +- 修复 项目未使用 ts 情况下,打包报错的bug +## 2.0.7(2023-12-14) +- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug +## 2.0.6(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.5(2023-12-11) +- 优化 兼容老版本icon类型,如 top ,bottom 等 +## 2.0.4(2023-12-06) +- 优化 uni-app x 下示例项目图标排序 +## 2.0.3(2023-12-06) +- 修复 nvue下引入组件报错的bug +## 2.0.2(2023-12-05) +-优化 size 属性支持单位 +## 2.0.1(2023-12-05) +- 新增 uni-app x 支持定义图标 +## 1.3.5(2022-01-24) +- 优化 size 属性可以传入不带单位的字符串数值 +## 1.3.4(2022-01-24) +- 优化 size 支持其他单位 +## 1.3.3(2022-01-17) +- 修复 nvue 有些图标不显示的bug,兼容老版本图标 +## 1.3.2(2021-12-01) +- 优化 示例可复制图标名称 +## 1.3.1(2021-11-23) +- 优化 兼容旧组件 type 值 +## 1.3.0(2021-11-19) +- 新增 更多图标 +- 优化 自定义图标使用方式 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) +## 1.1.7(2021-11-08) +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.5(2021-05-12) +- 新增 组件示例地址 +## 1.1.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue b/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue new file mode 100644 index 0000000..8740559 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue @@ -0,0 +1,91 @@ + + + + + diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue new file mode 100644 index 0000000..7da5356 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.css b/uni_modules/uni-icons/components/uni-icons/uniicons.css new file mode 100644 index 0000000..0a6b6fe --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uniicons.css @@ -0,0 +1,664 @@ + +.uniui-cart-filled:before { + content: "\e6d0"; +} + +.uniui-gift-filled:before { + content: "\e6c4"; +} + +.uniui-color:before { + content: "\e6cf"; +} + +.uniui-wallet:before { + content: "\e6b1"; +} + +.uniui-settings-filled:before { + content: "\e6ce"; +} + +.uniui-auth-filled:before { + content: "\e6cc"; +} + +.uniui-shop-filled:before { + content: "\e6cd"; +} + +.uniui-staff-filled:before { + content: "\e6cb"; +} + +.uniui-vip-filled:before { + content: "\e6c6"; +} + +.uniui-plus-filled:before { + content: "\e6c7"; +} + +.uniui-folder-add-filled:before { + content: "\e6c8"; +} + +.uniui-color-filled:before { + content: "\e6c9"; +} + +.uniui-tune-filled:before { + content: "\e6ca"; +} + +.uniui-calendar-filled:before { + content: "\e6c0"; +} + +.uniui-notification-filled:before { + content: "\e6c1"; +} + +.uniui-wallet-filled:before { + content: "\e6c2"; +} + +.uniui-medal-filled:before { + content: "\e6c3"; +} + +.uniui-fire-filled:before { + content: "\e6c5"; +} + +.uniui-refreshempty:before { + content: "\e6bf"; +} + +.uniui-location-filled:before { + content: "\e6af"; +} + +.uniui-person-filled:before { + content: "\e69d"; +} + +.uniui-personadd-filled:before { + content: "\e698"; +} + +.uniui-arrowthinleft:before { + content: "\e6d2"; +} + +.uniui-arrowthinup:before { + content: "\e6d3"; +} + +.uniui-arrowthindown:before { + content: "\e6d4"; +} + +.uniui-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthinright:before { + content: "\e6d1"; +} + +.uniui-down:before { + content: "\e6b8"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowright:before { + content: "\e6d5"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-up:before { + content: "\e6b6"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowup:before { + content: "\e6d6"; +} + +.uniui-eye:before { + content: "\e651"; +} + +.uniui-eye-filled:before { + content: "\e66a"; +} + +.uniui-eye-slash:before { + content: "\e6b3"; +} + +.uniui-eye-slash-filled:before { + content: "\e6b4"; +} + +.uniui-info-filled:before { + content: "\e649"; +} + +.uniui-reload:before { + content: "\e6b2"; +} + +.uniui-micoff-filled:before { + content: "\e6b0"; +} + +.uniui-map-pin-ellipse:before { + content: "\e6ac"; +} + +.uniui-map-pin:before { + content: "\e6ad"; +} + +.uniui-location:before { + content: "\e6ae"; +} + +.uniui-starhalf:before { + content: "\e683"; +} + +.uniui-star:before { + content: "\e688"; +} + +.uniui-star-filled:before { + content: "\e68f"; +} + +.uniui-calendar:before { + content: "\e6a0"; +} + +.uniui-fire:before { + content: "\e6a1"; +} + +.uniui-medal:before { + content: "\e6a2"; +} + +.uniui-font:before { + content: "\e6a3"; +} + +.uniui-gift:before { + content: "\e6a4"; +} + +.uniui-link:before { + content: "\e6a5"; +} + +.uniui-notification:before { + content: "\e6a6"; +} + +.uniui-staff:before { + content: "\e6a7"; +} + +.uniui-vip:before { + content: "\e6a8"; +} + +.uniui-folder-add:before { + content: "\e6a9"; +} + +.uniui-tune:before { + content: "\e6aa"; +} + +.uniui-auth:before { + content: "\e6ab"; +} + +.uniui-person:before { + content: "\e699"; +} + +.uniui-email-filled:before { + content: "\e69a"; +} + +.uniui-phone-filled:before { + content: "\e69b"; +} + +.uniui-phone:before { + content: "\e69c"; +} + +.uniui-email:before { + content: "\e69e"; +} + +.uniui-personadd:before { + content: "\e69f"; +} + +.uniui-chatboxes-filled:before { + content: "\e692"; +} + +.uniui-contact:before { + content: "\e693"; +} + +.uniui-chatbubble-filled:before { + content: "\e694"; +} + +.uniui-contact-filled:before { + content: "\e695"; +} + +.uniui-chatboxes:before { + content: "\e696"; +} + +.uniui-chatbubble:before { + content: "\e697"; +} + +.uniui-upload-filled:before { + content: "\e68e"; +} + +.uniui-upload:before { + content: "\e690"; +} + +.uniui-weixin:before { + content: "\e691"; +} + +.uniui-compose:before { + content: "\e67f"; +} + +.uniui-qq:before { + content: "\e680"; +} + +.uniui-download-filled:before { + content: "\e681"; +} + +.uniui-pyq:before { + content: "\e682"; +} + +.uniui-sound:before { + content: "\e684"; +} + +.uniui-trash-filled:before { + content: "\e685"; +} + +.uniui-sound-filled:before { + content: "\e686"; +} + +.uniui-trash:before { + content: "\e687"; +} + +.uniui-videocam-filled:before { + content: "\e689"; +} + +.uniui-spinner-cycle:before { + content: "\e68a"; +} + +.uniui-weibo:before { + content: "\e68b"; +} + +.uniui-videocam:before { + content: "\e68c"; +} + +.uniui-download:before { + content: "\e68d"; +} + +.uniui-help:before { + content: "\e679"; +} + +.uniui-navigate-filled:before { + content: "\e67a"; +} + +.uniui-plusempty:before { + content: "\e67b"; +} + +.uniui-smallcircle:before { + content: "\e67c"; +} + +.uniui-minus-filled:before { + content: "\e67d"; +} + +.uniui-micoff:before { + content: "\e67e"; +} + +.uniui-closeempty:before { + content: "\e66c"; +} + +.uniui-clear:before { + content: "\e66d"; +} + +.uniui-navigate:before { + content: "\e66e"; +} + +.uniui-minus:before { + content: "\e66f"; +} + +.uniui-image:before { + content: "\e670"; +} + +.uniui-mic:before { + content: "\e671"; +} + +.uniui-paperplane:before { + content: "\e672"; +} + +.uniui-close:before { + content: "\e673"; +} + +.uniui-help-filled:before { + content: "\e674"; +} + +.uniui-paperplane-filled:before { + content: "\e675"; +} + +.uniui-plus:before { + content: "\e676"; +} + +.uniui-mic-filled:before { + content: "\e677"; +} + +.uniui-image-filled:before { + content: "\e678"; +} + +.uniui-locked-filled:before { + content: "\e668"; +} + +.uniui-info:before { + content: "\e669"; +} + +.uniui-locked:before { + content: "\e66b"; +} + +.uniui-camera-filled:before { + content: "\e658"; +} + +.uniui-chat-filled:before { + content: "\e659"; +} + +.uniui-camera:before { + content: "\e65a"; +} + +.uniui-circle:before { + content: "\e65b"; +} + +.uniui-checkmarkempty:before { + content: "\e65c"; +} + +.uniui-chat:before { + content: "\e65d"; +} + +.uniui-circle-filled:before { + content: "\e65e"; +} + +.uniui-flag:before { + content: "\e65f"; +} + +.uniui-flag-filled:before { + content: "\e660"; +} + +.uniui-gear-filled:before { + content: "\e661"; +} + +.uniui-home:before { + content: "\e662"; +} + +.uniui-home-filled:before { + content: "\e663"; +} + +.uniui-gear:before { + content: "\e664"; +} + +.uniui-smallcircle-filled:before { + content: "\e665"; +} + +.uniui-map-filled:before { + content: "\e666"; +} + +.uniui-map:before { + content: "\e667"; +} + +.uniui-refresh-filled:before { + content: "\e656"; +} + +.uniui-refresh:before { + content: "\e657"; +} + +.uniui-cloud-upload:before { + content: "\e645"; +} + +.uniui-cloud-download-filled:before { + content: "\e646"; +} + +.uniui-cloud-download:before { + content: "\e647"; +} + +.uniui-cloud-upload-filled:before { + content: "\e648"; +} + +.uniui-redo:before { + content: "\e64a"; +} + +.uniui-images-filled:before { + content: "\e64b"; +} + +.uniui-undo-filled:before { + content: "\e64c"; +} + +.uniui-more:before { + content: "\e64d"; +} + +.uniui-more-filled:before { + content: "\e64e"; +} + +.uniui-undo:before { + content: "\e64f"; +} + +.uniui-images:before { + content: "\e650"; +} + +.uniui-paperclip:before { + content: "\e652"; +} + +.uniui-settings:before { + content: "\e653"; +} + +.uniui-search:before { + content: "\e654"; +} + +.uniui-redo-filled:before { + content: "\e655"; +} + +.uniui-list:before { + content: "\e644"; +} + +.uniui-mail-open-filled:before { + content: "\e63a"; +} + +.uniui-hand-down-filled:before { + content: "\e63c"; +} + +.uniui-hand-down:before { + content: "\e63d"; +} + +.uniui-hand-up-filled:before { + content: "\e63e"; +} + +.uniui-hand-up:before { + content: "\e63f"; +} + +.uniui-heart-filled:before { + content: "\e641"; +} + +.uniui-mail-open:before { + content: "\e643"; +} + +.uniui-heart:before { + content: "\e639"; +} + +.uniui-loop:before { + content: "\e633"; +} + +.uniui-pulldown:before { + content: "\e632"; +} + +.uniui-scan:before { + content: "\e62a"; +} + +.uniui-bars:before { + content: "\e627"; +} + +.uniui-checkbox:before { + content: "\e62b"; +} + +.uniui-checkbox-filled:before { + content: "\e62c"; +} + +.uniui-shop:before { + content: "\e62f"; +} + +.uniui-headphones:before { + content: "\e630"; +} + +.uniui-cart:before { + content: "\e631"; +} diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf new file mode 100644 index 0000000..14696d0 Binary files /dev/null and b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf differ diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts b/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts new file mode 100644 index 0000000..98e93aa --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts @@ -0,0 +1,664 @@ + +export type IconsData = { + id : string + name : string + font_family : string + css_prefix_text : string + description : string + glyphs : Array +} + +export type IconsDataItem = { + font_class : string + unicode : string +} + + +export const fontData = [ + { + "font_class": "arrow-down", + "unicode": "\ue6be" + }, + { + "font_class": "arrow-left", + "unicode": "\ue6bc" + }, + { + "font_class": "arrow-right", + "unicode": "\ue6bb" + }, + { + "font_class": "arrow-up", + "unicode": "\ue6bd" + }, + { + "font_class": "auth", + "unicode": "\ue6ab" + }, + { + "font_class": "auth-filled", + "unicode": "\ue6cc" + }, + { + "font_class": "back", + "unicode": "\ue6b9" + }, + { + "font_class": "bars", + "unicode": "\ue627" + }, + { + "font_class": "calendar", + "unicode": "\ue6a0" + }, + { + "font_class": "calendar-filled", + "unicode": "\ue6c0" + }, + { + "font_class": "camera", + "unicode": "\ue65a" + }, + { + "font_class": "camera-filled", + "unicode": "\ue658" + }, + { + "font_class": "cart", + "unicode": "\ue631" + }, + { + "font_class": "cart-filled", + "unicode": "\ue6d0" + }, + { + "font_class": "chat", + "unicode": "\ue65d" + }, + { + "font_class": "chat-filled", + "unicode": "\ue659" + }, + { + "font_class": "chatboxes", + "unicode": "\ue696" + }, + { + "font_class": "chatboxes-filled", + "unicode": "\ue692" + }, + { + "font_class": "chatbubble", + "unicode": "\ue697" + }, + { + "font_class": "chatbubble-filled", + "unicode": "\ue694" + }, + { + "font_class": "checkbox", + "unicode": "\ue62b" + }, + { + "font_class": "checkbox-filled", + "unicode": "\ue62c" + }, + { + "font_class": "checkmarkempty", + "unicode": "\ue65c" + }, + { + "font_class": "circle", + "unicode": "\ue65b" + }, + { + "font_class": "circle-filled", + "unicode": "\ue65e" + }, + { + "font_class": "clear", + "unicode": "\ue66d" + }, + { + "font_class": "close", + "unicode": "\ue673" + }, + { + "font_class": "closeempty", + "unicode": "\ue66c" + }, + { + "font_class": "cloud-download", + "unicode": "\ue647" + }, + { + "font_class": "cloud-download-filled", + "unicode": "\ue646" + }, + { + "font_class": "cloud-upload", + "unicode": "\ue645" + }, + { + "font_class": "cloud-upload-filled", + "unicode": "\ue648" + }, + { + "font_class": "color", + "unicode": "\ue6cf" + }, + { + "font_class": "color-filled", + "unicode": "\ue6c9" + }, + { + "font_class": "compose", + "unicode": "\ue67f" + }, + { + "font_class": "contact", + "unicode": "\ue693" + }, + { + "font_class": "contact-filled", + "unicode": "\ue695" + }, + { + "font_class": "down", + "unicode": "\ue6b8" + }, + { + "font_class": "bottom", + "unicode": "\ue6b8" + }, + { + "font_class": "download", + "unicode": "\ue68d" + }, + { + "font_class": "download-filled", + "unicode": "\ue681" + }, + { + "font_class": "email", + "unicode": "\ue69e" + }, + { + "font_class": "email-filled", + "unicode": "\ue69a" + }, + { + "font_class": "eye", + "unicode": "\ue651" + }, + { + "font_class": "eye-filled", + "unicode": "\ue66a" + }, + { + "font_class": "eye-slash", + "unicode": "\ue6b3" + }, + { + "font_class": "eye-slash-filled", + "unicode": "\ue6b4" + }, + { + "font_class": "fire", + "unicode": "\ue6a1" + }, + { + "font_class": "fire-filled", + "unicode": "\ue6c5" + }, + { + "font_class": "flag", + "unicode": "\ue65f" + }, + { + "font_class": "flag-filled", + "unicode": "\ue660" + }, + { + "font_class": "folder-add", + "unicode": "\ue6a9" + }, + { + "font_class": "folder-add-filled", + "unicode": "\ue6c8" + }, + { + "font_class": "font", + "unicode": "\ue6a3" + }, + { + "font_class": "forward", + "unicode": "\ue6ba" + }, + { + "font_class": "gear", + "unicode": "\ue664" + }, + { + "font_class": "gear-filled", + "unicode": "\ue661" + }, + { + "font_class": "gift", + "unicode": "\ue6a4" + }, + { + "font_class": "gift-filled", + "unicode": "\ue6c4" + }, + { + "font_class": "hand-down", + "unicode": "\ue63d" + }, + { + "font_class": "hand-down-filled", + "unicode": "\ue63c" + }, + { + "font_class": "hand-up", + "unicode": "\ue63f" + }, + { + "font_class": "hand-up-filled", + "unicode": "\ue63e" + }, + { + "font_class": "headphones", + "unicode": "\ue630" + }, + { + "font_class": "heart", + "unicode": "\ue639" + }, + { + "font_class": "heart-filled", + "unicode": "\ue641" + }, + { + "font_class": "help", + "unicode": "\ue679" + }, + { + "font_class": "help-filled", + "unicode": "\ue674" + }, + { + "font_class": "home", + "unicode": "\ue662" + }, + { + "font_class": "home-filled", + "unicode": "\ue663" + }, + { + "font_class": "image", + "unicode": "\ue670" + }, + { + "font_class": "image-filled", + "unicode": "\ue678" + }, + { + "font_class": "images", + "unicode": "\ue650" + }, + { + "font_class": "images-filled", + "unicode": "\ue64b" + }, + { + "font_class": "info", + "unicode": "\ue669" + }, + { + "font_class": "info-filled", + "unicode": "\ue649" + }, + { + "font_class": "left", + "unicode": "\ue6b7" + }, + { + "font_class": "link", + "unicode": "\ue6a5" + }, + { + "font_class": "list", + "unicode": "\ue644" + }, + { + "font_class": "location", + "unicode": "\ue6ae" + }, + { + "font_class": "location-filled", + "unicode": "\ue6af" + }, + { + "font_class": "locked", + "unicode": "\ue66b" + }, + { + "font_class": "locked-filled", + "unicode": "\ue668" + }, + { + "font_class": "loop", + "unicode": "\ue633" + }, + { + "font_class": "mail-open", + "unicode": "\ue643" + }, + { + "font_class": "mail-open-filled", + "unicode": "\ue63a" + }, + { + "font_class": "map", + "unicode": "\ue667" + }, + { + "font_class": "map-filled", + "unicode": "\ue666" + }, + { + "font_class": "map-pin", + "unicode": "\ue6ad" + }, + { + "font_class": "map-pin-ellipse", + "unicode": "\ue6ac" + }, + { + "font_class": "medal", + "unicode": "\ue6a2" + }, + { + "font_class": "medal-filled", + "unicode": "\ue6c3" + }, + { + "font_class": "mic", + "unicode": "\ue671" + }, + { + "font_class": "mic-filled", + "unicode": "\ue677" + }, + { + "font_class": "micoff", + "unicode": "\ue67e" + }, + { + "font_class": "micoff-filled", + "unicode": "\ue6b0" + }, + { + "font_class": "minus", + "unicode": "\ue66f" + }, + { + "font_class": "minus-filled", + "unicode": "\ue67d" + }, + { + "font_class": "more", + "unicode": "\ue64d" + }, + { + "font_class": "more-filled", + "unicode": "\ue64e" + }, + { + "font_class": "navigate", + "unicode": "\ue66e" + }, + { + "font_class": "navigate-filled", + "unicode": "\ue67a" + }, + { + "font_class": "notification", + "unicode": "\ue6a6" + }, + { + "font_class": "notification-filled", + "unicode": "\ue6c1" + }, + { + "font_class": "paperclip", + "unicode": "\ue652" + }, + { + "font_class": "paperplane", + "unicode": "\ue672" + }, + { + "font_class": "paperplane-filled", + "unicode": "\ue675" + }, + { + "font_class": "person", + "unicode": "\ue699" + }, + { + "font_class": "person-filled", + "unicode": "\ue69d" + }, + { + "font_class": "personadd", + "unicode": "\ue69f" + }, + { + "font_class": "personadd-filled", + "unicode": "\ue698" + }, + { + "font_class": "personadd-filled-copy", + "unicode": "\ue6d1" + }, + { + "font_class": "phone", + "unicode": "\ue69c" + }, + { + "font_class": "phone-filled", + "unicode": "\ue69b" + }, + { + "font_class": "plus", + "unicode": "\ue676" + }, + { + "font_class": "plus-filled", + "unicode": "\ue6c7" + }, + { + "font_class": "plusempty", + "unicode": "\ue67b" + }, + { + "font_class": "pulldown", + "unicode": "\ue632" + }, + { + "font_class": "pyq", + "unicode": "\ue682" + }, + { + "font_class": "qq", + "unicode": "\ue680" + }, + { + "font_class": "redo", + "unicode": "\ue64a" + }, + { + "font_class": "redo-filled", + "unicode": "\ue655" + }, + { + "font_class": "refresh", + "unicode": "\ue657" + }, + { + "font_class": "refresh-filled", + "unicode": "\ue656" + }, + { + "font_class": "refreshempty", + "unicode": "\ue6bf" + }, + { + "font_class": "reload", + "unicode": "\ue6b2" + }, + { + "font_class": "right", + "unicode": "\ue6b5" + }, + { + "font_class": "scan", + "unicode": "\ue62a" + }, + { + "font_class": "search", + "unicode": "\ue654" + }, + { + "font_class": "settings", + "unicode": "\ue653" + }, + { + "font_class": "settings-filled", + "unicode": "\ue6ce" + }, + { + "font_class": "shop", + "unicode": "\ue62f" + }, + { + "font_class": "shop-filled", + "unicode": "\ue6cd" + }, + { + "font_class": "smallcircle", + "unicode": "\ue67c" + }, + { + "font_class": "smallcircle-filled", + "unicode": "\ue665" + }, + { + "font_class": "sound", + "unicode": "\ue684" + }, + { + "font_class": "sound-filled", + "unicode": "\ue686" + }, + { + "font_class": "spinner-cycle", + "unicode": "\ue68a" + }, + { + "font_class": "staff", + "unicode": "\ue6a7" + }, + { + "font_class": "staff-filled", + "unicode": "\ue6cb" + }, + { + "font_class": "star", + "unicode": "\ue688" + }, + { + "font_class": "star-filled", + "unicode": "\ue68f" + }, + { + "font_class": "starhalf", + "unicode": "\ue683" + }, + { + "font_class": "trash", + "unicode": "\ue687" + }, + { + "font_class": "trash-filled", + "unicode": "\ue685" + }, + { + "font_class": "tune", + "unicode": "\ue6aa" + }, + { + "font_class": "tune-filled", + "unicode": "\ue6ca" + }, + { + "font_class": "undo", + "unicode": "\ue64f" + }, + { + "font_class": "undo-filled", + "unicode": "\ue64c" + }, + { + "font_class": "up", + "unicode": "\ue6b6" + }, + { + "font_class": "top", + "unicode": "\ue6b6" + }, + { + "font_class": "upload", + "unicode": "\ue690" + }, + { + "font_class": "upload-filled", + "unicode": "\ue68e" + }, + { + "font_class": "videocam", + "unicode": "\ue68c" + }, + { + "font_class": "videocam-filled", + "unicode": "\ue689" + }, + { + "font_class": "vip", + "unicode": "\ue6a8" + }, + { + "font_class": "vip-filled", + "unicode": "\ue6c6" + }, + { + "font_class": "wallet", + "unicode": "\ue6b1" + }, + { + "font_class": "wallet-filled", + "unicode": "\ue6c2" + }, + { + "font_class": "weibo", + "unicode": "\ue68b" + }, + { + "font_class": "weixin", + "unicode": "\ue691" + } +] as IconsDataItem[] + +// export const fontData = JSON.parse(fontDataJson) diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js b/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js new file mode 100644 index 0000000..1cd11e1 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js @@ -0,0 +1,649 @@ + +export const fontData = [ + { + "font_class": "arrow-down", + "unicode": "\ue6be" + }, + { + "font_class": "arrow-left", + "unicode": "\ue6bc" + }, + { + "font_class": "arrow-right", + "unicode": "\ue6bb" + }, + { + "font_class": "arrow-up", + "unicode": "\ue6bd" + }, + { + "font_class": "auth", + "unicode": "\ue6ab" + }, + { + "font_class": "auth-filled", + "unicode": "\ue6cc" + }, + { + "font_class": "back", + "unicode": "\ue6b9" + }, + { + "font_class": "bars", + "unicode": "\ue627" + }, + { + "font_class": "calendar", + "unicode": "\ue6a0" + }, + { + "font_class": "calendar-filled", + "unicode": "\ue6c0" + }, + { + "font_class": "camera", + "unicode": "\ue65a" + }, + { + "font_class": "camera-filled", + "unicode": "\ue658" + }, + { + "font_class": "cart", + "unicode": "\ue631" + }, + { + "font_class": "cart-filled", + "unicode": "\ue6d0" + }, + { + "font_class": "chat", + "unicode": "\ue65d" + }, + { + "font_class": "chat-filled", + "unicode": "\ue659" + }, + { + "font_class": "chatboxes", + "unicode": "\ue696" + }, + { + "font_class": "chatboxes-filled", + "unicode": "\ue692" + }, + { + "font_class": "chatbubble", + "unicode": "\ue697" + }, + { + "font_class": "chatbubble-filled", + "unicode": "\ue694" + }, + { + "font_class": "checkbox", + "unicode": "\ue62b" + }, + { + "font_class": "checkbox-filled", + "unicode": "\ue62c" + }, + { + "font_class": "checkmarkempty", + "unicode": "\ue65c" + }, + { + "font_class": "circle", + "unicode": "\ue65b" + }, + { + "font_class": "circle-filled", + "unicode": "\ue65e" + }, + { + "font_class": "clear", + "unicode": "\ue66d" + }, + { + "font_class": "close", + "unicode": "\ue673" + }, + { + "font_class": "closeempty", + "unicode": "\ue66c" + }, + { + "font_class": "cloud-download", + "unicode": "\ue647" + }, + { + "font_class": "cloud-download-filled", + "unicode": "\ue646" + }, + { + "font_class": "cloud-upload", + "unicode": "\ue645" + }, + { + "font_class": "cloud-upload-filled", + "unicode": "\ue648" + }, + { + "font_class": "color", + "unicode": "\ue6cf" + }, + { + "font_class": "color-filled", + "unicode": "\ue6c9" + }, + { + "font_class": "compose", + "unicode": "\ue67f" + }, + { + "font_class": "contact", + "unicode": "\ue693" + }, + { + "font_class": "contact-filled", + "unicode": "\ue695" + }, + { + "font_class": "down", + "unicode": "\ue6b8" + }, + { + "font_class": "bottom", + "unicode": "\ue6b8" + }, + { + "font_class": "download", + "unicode": "\ue68d" + }, + { + "font_class": "download-filled", + "unicode": "\ue681" + }, + { + "font_class": "email", + "unicode": "\ue69e" + }, + { + "font_class": "email-filled", + "unicode": "\ue69a" + }, + { + "font_class": "eye", + "unicode": "\ue651" + }, + { + "font_class": "eye-filled", + "unicode": "\ue66a" + }, + { + "font_class": "eye-slash", + "unicode": "\ue6b3" + }, + { + "font_class": "eye-slash-filled", + "unicode": "\ue6b4" + }, + { + "font_class": "fire", + "unicode": "\ue6a1" + }, + { + "font_class": "fire-filled", + "unicode": "\ue6c5" + }, + { + "font_class": "flag", + "unicode": "\ue65f" + }, + { + "font_class": "flag-filled", + "unicode": "\ue660" + }, + { + "font_class": "folder-add", + "unicode": "\ue6a9" + }, + { + "font_class": "folder-add-filled", + "unicode": "\ue6c8" + }, + { + "font_class": "font", + "unicode": "\ue6a3" + }, + { + "font_class": "forward", + "unicode": "\ue6ba" + }, + { + "font_class": "gear", + "unicode": "\ue664" + }, + { + "font_class": "gear-filled", + "unicode": "\ue661" + }, + { + "font_class": "gift", + "unicode": "\ue6a4" + }, + { + "font_class": "gift-filled", + "unicode": "\ue6c4" + }, + { + "font_class": "hand-down", + "unicode": "\ue63d" + }, + { + "font_class": "hand-down-filled", + "unicode": "\ue63c" + }, + { + "font_class": "hand-up", + "unicode": "\ue63f" + }, + { + "font_class": "hand-up-filled", + "unicode": "\ue63e" + }, + { + "font_class": "headphones", + "unicode": "\ue630" + }, + { + "font_class": "heart", + "unicode": "\ue639" + }, + { + "font_class": "heart-filled", + "unicode": "\ue641" + }, + { + "font_class": "help", + "unicode": "\ue679" + }, + { + "font_class": "help-filled", + "unicode": "\ue674" + }, + { + "font_class": "home", + "unicode": "\ue662" + }, + { + "font_class": "home-filled", + "unicode": "\ue663" + }, + { + "font_class": "image", + "unicode": "\ue670" + }, + { + "font_class": "image-filled", + "unicode": "\ue678" + }, + { + "font_class": "images", + "unicode": "\ue650" + }, + { + "font_class": "images-filled", + "unicode": "\ue64b" + }, + { + "font_class": "info", + "unicode": "\ue669" + }, + { + "font_class": "info-filled", + "unicode": "\ue649" + }, + { + "font_class": "left", + "unicode": "\ue6b7" + }, + { + "font_class": "link", + "unicode": "\ue6a5" + }, + { + "font_class": "list", + "unicode": "\ue644" + }, + { + "font_class": "location", + "unicode": "\ue6ae" + }, + { + "font_class": "location-filled", + "unicode": "\ue6af" + }, + { + "font_class": "locked", + "unicode": "\ue66b" + }, + { + "font_class": "locked-filled", + "unicode": "\ue668" + }, + { + "font_class": "loop", + "unicode": "\ue633" + }, + { + "font_class": "mail-open", + "unicode": "\ue643" + }, + { + "font_class": "mail-open-filled", + "unicode": "\ue63a" + }, + { + "font_class": "map", + "unicode": "\ue667" + }, + { + "font_class": "map-filled", + "unicode": "\ue666" + }, + { + "font_class": "map-pin", + "unicode": "\ue6ad" + }, + { + "font_class": "map-pin-ellipse", + "unicode": "\ue6ac" + }, + { + "font_class": "medal", + "unicode": "\ue6a2" + }, + { + "font_class": "medal-filled", + "unicode": "\ue6c3" + }, + { + "font_class": "mic", + "unicode": "\ue671" + }, + { + "font_class": "mic-filled", + "unicode": "\ue677" + }, + { + "font_class": "micoff", + "unicode": "\ue67e" + }, + { + "font_class": "micoff-filled", + "unicode": "\ue6b0" + }, + { + "font_class": "minus", + "unicode": "\ue66f" + }, + { + "font_class": "minus-filled", + "unicode": "\ue67d" + }, + { + "font_class": "more", + "unicode": "\ue64d" + }, + { + "font_class": "more-filled", + "unicode": "\ue64e" + }, + { + "font_class": "navigate", + "unicode": "\ue66e" + }, + { + "font_class": "navigate-filled", + "unicode": "\ue67a" + }, + { + "font_class": "notification", + "unicode": "\ue6a6" + }, + { + "font_class": "notification-filled", + "unicode": "\ue6c1" + }, + { + "font_class": "paperclip", + "unicode": "\ue652" + }, + { + "font_class": "paperplane", + "unicode": "\ue672" + }, + { + "font_class": "paperplane-filled", + "unicode": "\ue675" + }, + { + "font_class": "person", + "unicode": "\ue699" + }, + { + "font_class": "person-filled", + "unicode": "\ue69d" + }, + { + "font_class": "personadd", + "unicode": "\ue69f" + }, + { + "font_class": "personadd-filled", + "unicode": "\ue698" + }, + { + "font_class": "personadd-filled-copy", + "unicode": "\ue6d1" + }, + { + "font_class": "phone", + "unicode": "\ue69c" + }, + { + "font_class": "phone-filled", + "unicode": "\ue69b" + }, + { + "font_class": "plus", + "unicode": "\ue676" + }, + { + "font_class": "plus-filled", + "unicode": "\ue6c7" + }, + { + "font_class": "plusempty", + "unicode": "\ue67b" + }, + { + "font_class": "pulldown", + "unicode": "\ue632" + }, + { + "font_class": "pyq", + "unicode": "\ue682" + }, + { + "font_class": "qq", + "unicode": "\ue680" + }, + { + "font_class": "redo", + "unicode": "\ue64a" + }, + { + "font_class": "redo-filled", + "unicode": "\ue655" + }, + { + "font_class": "refresh", + "unicode": "\ue657" + }, + { + "font_class": "refresh-filled", + "unicode": "\ue656" + }, + { + "font_class": "refreshempty", + "unicode": "\ue6bf" + }, + { + "font_class": "reload", + "unicode": "\ue6b2" + }, + { + "font_class": "right", + "unicode": "\ue6b5" + }, + { + "font_class": "scan", + "unicode": "\ue62a" + }, + { + "font_class": "search", + "unicode": "\ue654" + }, + { + "font_class": "settings", + "unicode": "\ue653" + }, + { + "font_class": "settings-filled", + "unicode": "\ue6ce" + }, + { + "font_class": "shop", + "unicode": "\ue62f" + }, + { + "font_class": "shop-filled", + "unicode": "\ue6cd" + }, + { + "font_class": "smallcircle", + "unicode": "\ue67c" + }, + { + "font_class": "smallcircle-filled", + "unicode": "\ue665" + }, + { + "font_class": "sound", + "unicode": "\ue684" + }, + { + "font_class": "sound-filled", + "unicode": "\ue686" + }, + { + "font_class": "spinner-cycle", + "unicode": "\ue68a" + }, + { + "font_class": "staff", + "unicode": "\ue6a7" + }, + { + "font_class": "staff-filled", + "unicode": "\ue6cb" + }, + { + "font_class": "star", + "unicode": "\ue688" + }, + { + "font_class": "star-filled", + "unicode": "\ue68f" + }, + { + "font_class": "starhalf", + "unicode": "\ue683" + }, + { + "font_class": "trash", + "unicode": "\ue687" + }, + { + "font_class": "trash-filled", + "unicode": "\ue685" + }, + { + "font_class": "tune", + "unicode": "\ue6aa" + }, + { + "font_class": "tune-filled", + "unicode": "\ue6ca" + }, + { + "font_class": "undo", + "unicode": "\ue64f" + }, + { + "font_class": "undo-filled", + "unicode": "\ue64c" + }, + { + "font_class": "up", + "unicode": "\ue6b6" + }, + { + "font_class": "top", + "unicode": "\ue6b6" + }, + { + "font_class": "upload", + "unicode": "\ue690" + }, + { + "font_class": "upload-filled", + "unicode": "\ue68e" + }, + { + "font_class": "videocam", + "unicode": "\ue68c" + }, + { + "font_class": "videocam-filled", + "unicode": "\ue689" + }, + { + "font_class": "vip", + "unicode": "\ue6a8" + }, + { + "font_class": "vip-filled", + "unicode": "\ue6c6" + }, + { + "font_class": "wallet", + "unicode": "\ue6b1" + }, + { + "font_class": "wallet-filled", + "unicode": "\ue6c2" + }, + { + "font_class": "weibo", + "unicode": "\ue68b" + }, + { + "font_class": "weixin", + "unicode": "\ue691" + } +] + +// export const fontData = JSON.parse(fontDataJson) diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json new file mode 100644 index 0000000..6b681b4 --- /dev/null +++ b/uni_modules/uni-icons/package.json @@ -0,0 +1,89 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 图标", + "version": "2.0.10", + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "图标" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.2.14" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y", + "alipay": "n" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y", + "app-uvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "钉钉": "y", + "快手": "y", + "飞书": "y", + "京东": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md new file mode 100644 index 0000000..86234ba --- /dev/null +++ b/uni_modules/uni-icons/readme.md @@ -0,0 +1,8 @@ +## Icons 图标 +> **组件名:uni-icons** +> 代码块: `uIcons` + +用于展示 icons 图标 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/uni_modules/uni-load-more/changelog.md b/uni_modules/uni-load-more/changelog.md new file mode 100644 index 0000000..667abdb --- /dev/null +++ b/uni_modules/uni-load-more/changelog.md @@ -0,0 +1,25 @@ +## 1.3.6(2024-10-15) +- 修复 微信小程序中的getSystemInfo警告 +## 1.3.5(2024-10-12) +- 修复 微信小程序中的getSystemInfo警告 +## 1.3.4(2024-10-12) +- 修复 微信小程序中的getSystemInfo警告 +## 1.3.3(2022-01-20) +- 新增 showText属性 ,是否显示文本 +## 1.3.2(2022-01-19) +- 修复 nvue 平台下不显示文本的bug +## 1.3.1(2022-01-19) +- 修复 微信小程序平台样式选择器报警告的问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more) +## 1.2.1(2021-08-24) +- 新增 支持国际化 +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.8(2021-05-12) +- 新增 组件示例地址 +## 1.1.7(2021-03-30) +- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug +## 1.1.6(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json b/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json new file mode 100644 index 0000000..a4f14a5 --- /dev/null +++ b/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "Pull up to show more", + "uni-load-more.contentrefresh": "loading...", + "uni-load-more.contentnomore": "No more data" +} diff --git a/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js b/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js new file mode 100644 index 0000000..de7509c --- /dev/null +++ b/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json b/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json new file mode 100644 index 0000000..f15d510 --- /dev/null +++ b/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "上拉显示更多", + "uni-load-more.contentrefresh": "正在加载...", + "uni-load-more.contentnomore": "没有更多数据了" +} diff --git a/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json b/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json new file mode 100644 index 0000000..a255c6d --- /dev/null +++ b/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "上拉顯示更多", + "uni-load-more.contentrefresh": "正在加載...", + "uni-load-more.contentnomore": "沒有更多數據了" +} diff --git a/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue b/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue new file mode 100644 index 0000000..a203417 --- /dev/null +++ b/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue @@ -0,0 +1,404 @@ + + + + + diff --git a/uni_modules/uni-load-more/package.json b/uni_modules/uni-load-more/package.json new file mode 100644 index 0000000..cf44bff --- /dev/null +++ b/uni_modules/uni-load-more/package.json @@ -0,0 +1,84 @@ +{ + "id": "uni-load-more", + "displayName": "uni-load-more 加载更多", + "version": "1.3.6", + "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。", + "keywords": [ + "uni-ui", + "uniui", + "加载更多", + "load-more" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y", + "alipay": "n" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-load-more/readme.md b/uni_modules/uni-load-more/readme.md new file mode 100644 index 0000000..54dc1fa --- /dev/null +++ b/uni_modules/uni-load-more/readme.md @@ -0,0 +1,14 @@ + + +### LoadMore 加载更多 +> **组件名:uni-load-more** +> 代码块: `uLoadMore` + + +用于列表中,做滚动加载使用,展示 loading 的各种状态。 + + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/uni_modules/uni-popup/changelog.md b/uni_modules/uni-popup/changelog.md new file mode 100644 index 0000000..505fc70 --- /dev/null +++ b/uni_modules/uni-popup/changelog.md @@ -0,0 +1,90 @@ +## 1.9.6(2025-01-08) +- 修复 示例中过期图片地址 +## 1.9.5(2024-10-15) +- 修复 微信小程序中的getSystemInfo警告 +## 1.9.2(2024-09-21) +- 修复 uni-popup在android上的重复点击弹出位置不正确的bug +## 1.9.1(2024-04-02) +- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法) +## 1.9.0(2024-03-28) +- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正 +## 1.8.9(2024-03-20) +- 修复 uni-popup-dialog 数据输入时修正为双向绑定 +## 1.8.8(2024-02-20) +- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug +## 1.8.7(2024-02-02) +- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦 +## 1.8.6(2024-01-30) +- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数 +## 1.8.5(2024-01-26) +- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示 +## 1.8.4(2023-11-15) +- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close` +## 1.8.3(2023-04-17) +- 修复 uni-popup 重复打开时的 bug +## 1.8.2(2023-02-02) +- uni-popup-dialog 组件新增 inputType 属性 +## 1.8.1(2022-12-01) +- 修复 nvue 下 v-show 报错 +## 1.8.0(2022-11-29) +- 优化 主题样式 +## 1.7.9(2022-04-02) +- 修复 弹出层内部无法滚动的bug +## 1.7.8(2022-03-28) +- 修复 小程序中高度错误的bug +## 1.7.7(2022-03-17) +- 修复 快速调用open出现问题的Bug +## 1.7.6(2022-02-14) +- 修复 safeArea 属性不能设置为false的bug +## 1.7.5(2022-01-19) +- 修复 isMaskClick 失效的bug +## 1.7.4(2022-01-19) +- 新增 cancelText \ confirmText 属性 ,可自定义文本 +- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 +- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 +## 1.7.3(2022-01-13) +- 修复 设置 safeArea 属性不生效的bug +## 1.7.2(2021-11-26) +- 优化 组件示例 +## 1.7.1(2021-11-26) +- 修复 vuedoc 文字错误 +## 1.7.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2(2021-08-24) +- 新增 支持国际化 +## 1.6.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.6.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.5.0(2021-06-23) +- 新增 mask-click 遮罩层点击事件 +## 1.4.5(2021-06-22) +- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.4(2021-06-18) +- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.3(2021-06-08) +- 修复 错误的 watch 字段 +- 修复 safeArea 属性不生效的问题 +- 修复 点击内容,再点击遮罩无法关闭的Bug +## 1.4.2(2021-05-12) +- 新增 组件示例地址 +## 1.4.1(2021-04-29) +- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 +## 1.4.0 (2021-04-29) +- 新增 type 属性的 left\right 值,支持左右弹出 +- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 +- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 +- 新增 safeArea 属性,是否适配底部安全区 +- 修复 App\h5\微信小程序底部安全区占位不对的Bug +- 修复 App 端弹出等待的Bug +- 优化 提升低配设备性能,优化动画卡顿问题 +- 优化 更简单的组件自定义方式 +## 1.2.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.2.8(2021-02-05) +- 调整为uni_modules目录规范 +## 1.2.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 +- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js new file mode 100644 index 0000000..6ef26a2 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue new file mode 100644 index 0000000..08707d4 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue new file mode 100644 index 0000000..91370a8 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue @@ -0,0 +1,143 @@ + + + + diff --git a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue new file mode 100644 index 0000000..c8945d5 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue @@ -0,0 +1,188 @@ + + + + diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/en.json b/uni_modules/uni-popup/components/uni-popup/i18n/en.json new file mode 100644 index 0000000..7f1bd06 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/en.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "cancel", + "uni-popup.ok": "ok", + "uni-popup.placeholder": "pleace enter", + "uni-popup.title": "Hint", + "uni-popup.shareTitle": "Share to" +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/index.js b/uni_modules/uni-popup/components/uni-popup/i18n/index.js new file mode 100644 index 0000000..de7509c --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json new file mode 100644 index 0000000..5e3003c --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "确定", + "uni-popup.placeholder": "请输入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json new file mode 100644 index 0000000..13e39eb --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "確定", + "uni-popup.placeholder": "請輸入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/uni_modules/uni-popup/components/uni-popup/keypress.js b/uni_modules/uni-popup/components/uni-popup/keypress.js new file mode 100644 index 0000000..62dda46 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-popup/components/uni-popup/popup.js b/uni_modules/uni-popup/components/uni-popup/popup.js new file mode 100644 index 0000000..c4e5781 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/popup.js @@ -0,0 +1,26 @@ + +export default { + data() { + return { + + } + }, + created(){ + this.popup = this.getParent() + }, + methods:{ + /** + * 获取父元素实例 + */ + getParent(name = 'uniPopup') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + } +} diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue b/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue new file mode 100644 index 0000000..5eb8d5b --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.uvue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue new file mode 100644 index 0000000..5af55e0 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue @@ -0,0 +1,518 @@ + + + + diff --git a/uni_modules/uni-popup/package.json b/uni_modules/uni-popup/package.json new file mode 100644 index 0000000..da485a4 --- /dev/null +++ b/uni_modules/uni-popup/package.json @@ -0,0 +1,90 @@ +{ + "id": "uni-popup", + "displayName": "uni-popup 弹出层", + "version": "1.9.6", + "description": " Popup 组件,提供常用的弹层", + "keywords": [ + "uni-ui", + "弹出层", + "弹窗", + "popup", + "弹框" + ], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-transition" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y", + "alipay": "n" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y", + "app-harmony": "u", + "app-uvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-popup/readme.md b/uni_modules/uni-popup/readme.md new file mode 100644 index 0000000..fdad4b3 --- /dev/null +++ b/uni_modules/uni-popup/readme.md @@ -0,0 +1,17 @@ + + +## Popup 弹出层 +> **组件名:uni-popup** +> 代码块: `uPopup` +> 关联组件:`uni-transition` + + +弹出层组件,在应用中弹出一个消息提示窗口、提示框等 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + + diff --git a/uni_modules/uni-scss/changelog.md b/uni_modules/uni-scss/changelog.md new file mode 100644 index 0000000..b863bb0 --- /dev/null +++ b/uni_modules/uni-scss/changelog.md @@ -0,0 +1,8 @@ +## 1.0.3(2022-01-21) +- 优化 组件示例 +## 1.0.2(2021-11-22) +- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 +## 1.0.1(2021-11-22) +- 修复 vue3中scss语法兼容问题 +## 1.0.0(2021-11-18) +- init diff --git a/uni_modules/uni-scss/index.scss b/uni_modules/uni-scss/index.scss new file mode 100644 index 0000000..1744a5f --- /dev/null +++ b/uni_modules/uni-scss/index.scss @@ -0,0 +1 @@ +@import './styles/index.scss'; diff --git a/uni_modules/uni-scss/package.json b/uni_modules/uni-scss/package.json new file mode 100644 index 0000000..7cc0ccb --- /dev/null +++ b/uni_modules/uni-scss/package.json @@ -0,0 +1,82 @@ +{ + "id": "uni-scss", + "displayName": "uni-scss 辅助样式", + "version": "1.0.3", + "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", + "keywords": [ + "uni-scss", + "uni-ui", + "辅助样式" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "通用 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-scss/readme.md b/uni_modules/uni-scss/readme.md new file mode 100644 index 0000000..b7d1c25 --- /dev/null +++ b/uni_modules/uni-scss/readme.md @@ -0,0 +1,4 @@ +`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/uni_modules/uni-scss/styles/index.scss b/uni_modules/uni-scss/styles/index.scss new file mode 100644 index 0000000..ffac4fe --- /dev/null +++ b/uni_modules/uni-scss/styles/index.scss @@ -0,0 +1,7 @@ +@import './setting/_variables.scss'; +@import './setting/_border.scss'; +@import './setting/_color.scss'; +@import './setting/_space.scss'; +@import './setting/_radius.scss'; +@import './setting/_text.scss'; +@import './setting/_styles.scss'; diff --git a/uni_modules/uni-scss/styles/setting/_border.scss b/uni_modules/uni-scss/styles/setting/_border.scss new file mode 100644 index 0000000..12a11c3 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_border.scss @@ -0,0 +1,3 @@ +.uni-border { + border: 1px $uni-border-1 solid; +} \ No newline at end of file diff --git a/uni_modules/uni-scss/styles/setting/_color.scss b/uni_modules/uni-scss/styles/setting/_color.scss new file mode 100644 index 0000000..1ededd9 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_color.scss @@ -0,0 +1,66 @@ + +// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 +// @mixin get-styles($k,$c) { +// @if $k == size or $k == weight{ +// font-#{$k}:#{$c} +// }@else{ +// #{$k}:#{$c} +// } +// } +$uni-ui-color:( + // 主色 + primary: $uni-primary, + primary-disable: $uni-primary-disable, + primary-light: $uni-primary-light, + // 辅助色 + success: $uni-success, + success-disable: $uni-success-disable, + success-light: $uni-success-light, + warning: $uni-warning, + warning-disable: $uni-warning-disable, + warning-light: $uni-warning-light, + error: $uni-error, + error-disable: $uni-error-disable, + error-light: $uni-error-light, + info: $uni-info, + info-disable: $uni-info-disable, + info-light: $uni-info-light, + // 中性色 + main-color: $uni-main-color, + base-color: $uni-base-color, + secondary-color: $uni-secondary-color, + extra-color: $uni-extra-color, + // 背景色 + bg-color: $uni-bg-color, + // 边框颜色 + border-1: $uni-border-1, + border-2: $uni-border-2, + border-3: $uni-border-3, + border-4: $uni-border-4, + // 黑色 + black:$uni-black, + // 白色 + white:$uni-white, + // 透明 + transparent:$uni-transparent +) !default; +@each $key, $child in $uni-ui-color { + .uni-#{"" + $key} { + color: $child; + } + .uni-#{"" + $key}-bg { + background-color: $child; + } +} +.uni-shadow-sm { + box-shadow: $uni-shadow-sm; +} +.uni-shadow-base { + box-shadow: $uni-shadow-base; +} +.uni-shadow-lg { + box-shadow: $uni-shadow-lg; +} +.uni-mask { + background-color:$uni-mask; +} diff --git a/uni_modules/uni-scss/styles/setting/_radius.scss b/uni_modules/uni-scss/styles/setting/_radius.scss new file mode 100644 index 0000000..9a0428b --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_radius.scss @@ -0,0 +1,55 @@ +@mixin radius($r,$d:null ,$important: false){ + $radius-value:map-get($uni-radius, $r) if($important, !important, null); + // Key exists within the $uni-radius variable + @if (map-has-key($uni-radius, $r) and $d){ + @if $d == t { + border-top-left-radius:$radius-value; + border-top-right-radius:$radius-value; + }@else if $d == r { + border-top-right-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == b { + border-bottom-left-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == l { + border-top-left-radius:$radius-value; + border-bottom-left-radius:$radius-value; + }@else if $d == tl { + border-top-left-radius:$radius-value; + }@else if $d == tr { + border-top-right-radius:$radius-value; + }@else if $d == br { + border-bottom-right-radius:$radius-value; + }@else if $d == bl { + border-bottom-left-radius:$radius-value; + } + }@else{ + border-radius:$radius-value; + } +} + +@each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $key} { + @include radius($key) + } + }@else{ + .uni-radius { + @include radius($key) + } + } +} + +@each $direction in t, r, b, l,tl, tr, br, bl { + @each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $direction}-#{"" + $key} { + @include radius($key,$direction,false) + } + }@else{ + .uni-radius-#{$direction} { + @include radius($key,$direction,false) + } + } + } +} diff --git a/uni_modules/uni-scss/styles/setting/_space.scss b/uni_modules/uni-scss/styles/setting/_space.scss new file mode 100644 index 0000000..3c89528 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_space.scss @@ -0,0 +1,56 @@ + +@mixin fn($space,$direction,$size,$n) { + @if $n { + #{$space}-#{$direction}: #{$size*$uni-space-root}px + } @else { + #{$space}-#{$direction}: #{-$size*$uni-space-root}px + } +} +@mixin get-styles($direction,$i,$space,$n){ + @if $direction == t { + @include fn($space, top,$i,$n); + } + @if $direction == r { + @include fn($space, right,$i,$n); + } + @if $direction == b { + @include fn($space, bottom,$i,$n); + } + @if $direction == l { + @include fn($space, left,$i,$n); + } + @if $direction == x { + @include fn($space, left,$i,$n); + @include fn($space, right,$i,$n); + } + @if $direction == y { + @include fn($space, top,$i,$n); + @include fn($space, bottom,$i,$n); + } + @if $direction == a { + @if $n { + #{$space}:#{$i*$uni-space-root}px; + } @else { + #{$space}:#{-$i*$uni-space-root}px; + } + } +} + +@each $orientation in m,p { + $space: margin; + @if $orientation == m { + $space: margin; + } @else { + $space: padding; + } + @for $i from 0 through 16 { + @each $direction in t, r, b, l, x, y, a { + .uni-#{$orientation}#{$direction}-#{$i} { + @include get-styles($direction,$i,$space,true); + } + .uni-#{$orientation}#{$direction}-n#{$i} { + @include get-styles($direction,$i,$space,false); + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-scss/styles/setting/_styles.scss b/uni_modules/uni-scss/styles/setting/_styles.scss new file mode 100644 index 0000000..689afec --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_styles.scss @@ -0,0 +1,167 @@ +/* #ifndef APP-NVUE */ + +$-color-white:#fff; +$-color-black:#000; +@mixin base-style($color) { + color: #fff; + background-color: $color; + border-color: mix($-color-black, $color, 8%); + &:not([hover-class]):active { + background: mix($-color-black, $color, 10%); + border-color: mix($-color-black, $color, 20%); + color: $-color-white; + outline: none; + } +} +@mixin is-color($color) { + @include base-style($color); + &[loading] { + @include base-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &[loading], + &:not([hover-class]):active { + color: $-color-white; + border-color: mix(darken($color,10%), $-color-white); + background-color: mix($color, $-color-white); + } + } + +} +@mixin base-plain-style($color) { + color:$color; + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 70%); + &:not([hover-class]):active { + background: mix($-color-white, $color, 80%); + color: $color; + outline: none; + border-color: mix($-color-white, $color, 50%); + } +} +@mixin is-plain($color){ + &[plain] { + @include base-plain-style($color); + &[loading] { + @include base-plain-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &:active { + color: mix($-color-white, $color, 40%); + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 80%); + } + } + } +} + + +.uni-btn { + margin: 5px; + color: #393939; + border:1px solid #ccc; + font-size: 16px; + font-weight: 200; + background-color: #F9F9F9; + // TODO 暂时处理边框隐藏一边的问题 + overflow: visible; + &::after{ + border: none; + } + + &:not([type]),&[type=default] { + color: #999; + &[loading] { + background: none; + &::before { + margin-right:5px; + } + } + + + + &[disabled]{ + color: mix($-color-white, #999, 60%); + &, + &[loading], + &:active { + color: mix($-color-white, #999, 60%); + background-color: mix($-color-white,$-color-black , 98%); + border-color: mix($-color-white, #999, 85%); + } + } + + &[plain] { + color: #999; + background: none; + border-color: $uni-border-1; + &:not([hover-class]):active { + background: none; + color: mix($-color-white, $-color-black, 80%); + border-color: mix($-color-white, $-color-black, 90%); + outline: none; + } + &[disabled]{ + &, + &[loading], + &:active { + background: none; + color: mix($-color-white, #999, 60%); + border-color: mix($-color-white, #999, 85%); + } + } + } + } + + &:not([hover-class]):active { + color: mix($-color-white, $-color-black, 50%); + } + + &[size=mini] { + font-size: 16px; + font-weight: 200; + border-radius: 8px; + } + + + + &.uni-btn-small { + font-size: 14px; + } + &.uni-btn-mini { + font-size: 12px; + } + + &.uni-btn-radius { + border-radius: 999px; + } + &[type=primary] { + @include is-color($uni-primary); + @include is-plain($uni-primary) + } + &[type=success] { + @include is-color($uni-success); + @include is-plain($uni-success) + } + &[type=error] { + @include is-color($uni-error); + @include is-plain($uni-error) + } + &[type=warning] { + @include is-color($uni-warning); + @include is-plain($uni-warning) + } + &[type=info] { + @include is-color($uni-info); + @include is-plain($uni-info) + } +} +/* #endif */ diff --git a/uni_modules/uni-scss/styles/setting/_text.scss b/uni_modules/uni-scss/styles/setting/_text.scss new file mode 100644 index 0000000..a34d08f --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_text.scss @@ -0,0 +1,24 @@ +@mixin get-styles($k,$c) { + @if $k == size or $k == weight{ + font-#{$k}:#{$c} + }@else{ + #{$k}:#{$c} + } +} + +@each $key, $child in $uni-headings { + /* #ifndef APP-NVUE */ + .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ + /* #ifdef APP-NVUE */ + .container .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ +} diff --git a/uni_modules/uni-scss/styles/setting/_variables.scss b/uni_modules/uni-scss/styles/setting/_variables.scss new file mode 100644 index 0000000..557d3d7 --- /dev/null +++ b/uni_modules/uni-scss/styles/setting/_variables.scss @@ -0,0 +1,146 @@ +// @use "sass:math"; +@import '../tools/functions.scss'; +// 间距基础倍数 +$uni-space-root: 2 !default; +// 边框半径默认值 +$uni-radius-root:5px !default; +$uni-radius: () !default; +// 边框半径断点 +$uni-radius: map-deep-merge( + ( + 0: 0, + // TODO 当前版本暂时不支持 sm 属性 + // 'sm': math.div($uni-radius-root, 2), + null: $uni-radius-root, + 'lg': $uni-radius-root * 2, + 'xl': $uni-radius-root * 6, + 'pill': 9999px, + 'circle': 50% + ), + $uni-radius +); +// 字体家族 +$body-font-family: 'Roboto', sans-serif !default; +// 文本 +$heading-font-family: $body-font-family !default; +$uni-headings: () !default; +$letterSpacing: -0.01562em; +$uni-headings: map-deep-merge( + ( + 'h1': ( + size: 32px, + weight: 300, + line-height: 50px, + // letter-spacing:-0.01562em + ), + 'h2': ( + size: 28px, + weight: 300, + line-height: 40px, + // letter-spacing: -0.00833em + ), + 'h3': ( + size: 24px, + weight: 400, + line-height: 32px, + // letter-spacing: normal + ), + 'h4': ( + size: 20px, + weight: 400, + line-height: 30px, + // letter-spacing: 0.00735em + ), + 'h5': ( + size: 16px, + weight: 400, + line-height: 24px, + // letter-spacing: normal + ), + 'h6': ( + size: 14px, + weight: 500, + line-height: 18px, + // letter-spacing: 0.0125em + ), + 'subtitle': ( + size: 12px, + weight: 400, + line-height: 20px, + // letter-spacing: 0.00937em + ), + 'body': ( + font-size: 14px, + font-weight: 400, + line-height: 22px, + // letter-spacing: 0.03125em + ), + 'caption': ( + 'size': 12px, + 'weight': 400, + 'line-height': 20px, + // 'letter-spacing': 0.03333em, + // 'text-transform': false + ) + ), + $uni-headings +); + + + +// 主色 +$uni-primary: #2979ff !default; +$uni-primary-disable:lighten($uni-primary,20%) !default; +$uni-primary-light: lighten($uni-primary,25%) !default; + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37 !default; +$uni-success-disable:lighten($uni-success,20%) !default; +$uni-success-light: lighten($uni-success,25%) !default; + +$uni-warning: #f3a73f !default; +$uni-warning-disable:lighten($uni-warning,20%) !default; +$uni-warning-light: lighten($uni-warning,25%) !default; + +$uni-error: #e43d33 !default; +$uni-error-disable:lighten($uni-error,20%) !default; +$uni-error-light: lighten($uni-error,25%) !default; + +$uni-info: #8f939c !default; +$uni-info-disable:lighten($uni-info,20%) !default; +$uni-info-light: lighten($uni-info,25%) !default; + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a !default; // 主要文字 +$uni-base-color: #6a6a6a !default; // 常规文字 +$uni-secondary-color: #909399 !default; // 次要文字 +$uni-extra-color: #c7c7c7 !default; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0 !default; +$uni-border-2: #EDEDED !default; +$uni-border-3: #DCDCDC !default; +$uni-border-4: #B9B9B9 !default; + +// 常规色 +$uni-black: #000000 !default; +$uni-white: #ffffff !default; +$uni-transparent: rgba($color: #000000, $alpha: 0) !default; + +// 背景色 +$uni-bg-color: #f7f7f7 !default; + +/* 水平间距 */ +$uni-spacing-sm: 8px !default; +$uni-spacing-base: 15px !default; +$uni-spacing-lg: 30px !default; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default; diff --git a/uni_modules/uni-scss/styles/tools/functions.scss b/uni_modules/uni-scss/styles/tools/functions.scss new file mode 100644 index 0000000..ac6f63e --- /dev/null +++ b/uni_modules/uni-scss/styles/tools/functions.scss @@ -0,0 +1,19 @@ +// 合并 map +@function map-deep-merge($parent-map, $child-map){ + $result: $parent-map; + @each $key, $child in $child-map { + $parent-has-key: map-has-key($result, $key); + $parent-value: map-get($result, $key); + $parent-type: type-of($parent-value); + $child-type: type-of($child); + $parent-is-map: $parent-type == map; + $child-is-map: $child-type == map; + + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ + $result: map-merge($result, ( $key: $child )); + }@else { + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); + } + } + @return $result; +}; diff --git a/uni_modules/uni-scss/theme.scss b/uni_modules/uni-scss/theme.scss new file mode 100644 index 0000000..80ee62f --- /dev/null +++ b/uni_modules/uni-scss/theme.scss @@ -0,0 +1,31 @@ +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; +// 主色 +$uni-primary: #2979ff; +// 辅助色 +$uni-success: #4cd964; +// 警告色 +$uni-warning: #f0ad4e; +// 错误色 +$uni-error: #dd524d; +// 描述色 +$uni-info: #909399; +// 中性色 +$uni-main-color: #303133; +$uni-base-color: #606266; +$uni-secondary-color: #909399; +$uni-extra-color: #C0C4CC; +// 背景色 +$uni-bg-color: #f5f5f5; +// 边框颜色 +$uni-border-1: #DCDFE6; +$uni-border-2: #E4E7ED; +$uni-border-3: #EBEEF5; +$uni-border-4: #F2F6FC; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); diff --git a/uni_modules/uni-scss/variables.scss b/uni_modules/uni-scss/variables.scss new file mode 100644 index 0000000..1c062d4 --- /dev/null +++ b/uni_modules/uni-scss/variables.scss @@ -0,0 +1,62 @@ +@import './styles/setting/_variables.scss'; +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; + +// 主色 +$uni-primary: #2979ff; +$uni-primary-disable:mix(#fff,$uni-primary,50%); +$uni-primary-light: mix(#fff,$uni-primary,80%); + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37; +$uni-success-disable:mix(#fff,$uni-success,50%); +$uni-success-light: mix(#fff,$uni-success,80%); + +$uni-warning: #f3a73f; +$uni-warning-disable:mix(#fff,$uni-warning,50%); +$uni-warning-light: mix(#fff,$uni-warning,80%); + +$uni-error: #e43d33; +$uni-error-disable:mix(#fff,$uni-error,50%); +$uni-error-light: mix(#fff,$uni-error,80%); + +$uni-info: #8f939c; +$uni-info-disable:mix(#fff,$uni-info,50%); +$uni-info-light: mix(#fff,$uni-info,80%); + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a; // 主要文字 +$uni-base-color: #6a6a6a; // 常规文字 +$uni-secondary-color: #909399; // 次要文字 +$uni-extra-color: #c7c7c7; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0; +$uni-border-2: #EDEDED; +$uni-border-3: #DCDCDC; +$uni-border-4: #B9B9B9; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); + +// 背景色 +$uni-bg-color: #f7f7f7; + +/* 水平间距 */ +$uni-spacing-sm: 8px; +$uni-spacing-base: 15px; +$uni-spacing-lg: 30px; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4); diff --git a/uni_modules/uni-transition/changelog.md b/uni_modules/uni-transition/changelog.md new file mode 100644 index 0000000..faaf336 --- /dev/null +++ b/uni_modules/uni-transition/changelog.md @@ -0,0 +1,24 @@ +## 1.3.3(2024-04-23) +- 修复 当元素会受变量影响自动隐藏的bug +## 1.3.2(2023-05-04) +- 修复 NVUE 平台报错的问题 +## 1.3.1(2021-11-23) +- 修复 init 方法初始化问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition) +## 1.2.1(2021-09-27) +- 修复 init 方法不生效的 Bug +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.1(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的 Bug +## 1.1.0(2021-04-22) +- 新增 通过方法自定义动画 +- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 +- 优化 动画触发逻辑,使动画更流畅 +- 优化 支持单独的动画类型 +- 优化 文档示例 +## 1.0.2(2021-02-05) +- 调整为 uni_modules 目录规范 diff --git a/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/uni_modules/uni-transition/components/uni-transition/createAnimation.js new file mode 100644 index 0000000..8f89b18 --- /dev/null +++ b/uni_modules/uni-transition/components/uni-transition/createAnimation.js @@ -0,0 +1,131 @@ +// const defaultOption = { +// duration: 300, +// timingFunction: 'linear', +// delay: 0, +// transformOrigin: '50% 50% 0' +// } +// #ifdef APP-NVUE +const nvueAnimation = uni.requireNativePlugin('animation') +// #endif +class MPAnimation { + constructor(options, _this) { + this.options = options + // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误 + this.animation = uni.createAnimation({ + ...options + }) + this.currentStepAnimates = {} + this.next = 0 + this.$ = _this + + } + + _nvuePushAnimates(type, args) { + let aniObj = this.currentStepAnimates[this.next] + let styles = {} + if (!aniObj) { + styles = { + styles: {}, + config: {} + } + } else { + styles = aniObj + } + if (animateTypes1.includes(type)) { + if (!styles.styles.transform) { + styles.styles.transform = '' + } + let unit = '' + if(type === 'rotate'){ + unit = 'deg' + } + styles.styles.transform += `${type}(${args+unit}) ` + } else { + styles.styles[type] = `${args}` + } + this.currentStepAnimates[this.next] = styles + } + _animateRun(styles = {}, config = {}) { + let ref = this.$.$refs['ani'].ref + if (!ref) return + return new Promise((resolve, reject) => { + nvueAnimation.transition(ref, { + styles, + ...config + }, res => { + resolve() + }) + }) + } + + _nvueNextAnimate(animates, step = 0, fn) { + let obj = animates[step] + if (obj) { + let { + styles, + config + } = obj + this._animateRun(styles, config).then(() => { + step += 1 + this._nvueNextAnimate(animates, step, fn) + }) + } else { + this.currentStepAnimates = {} + typeof fn === 'function' && fn() + this.isEnd = true + } + } + + step(config = {}) { + // #ifndef APP-NVUE + this.animation.step(config) + // #endif + // #ifdef APP-NVUE + this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config) + this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin + this.next++ + // #endif + return this + } + + run(fn) { + // #ifndef APP-NVUE + this.$.animationData = this.animation.export() + this.$.timer = setTimeout(() => { + typeof fn === 'function' && fn() + }, this.$.durationTime) + // #endif + // #ifdef APP-NVUE + this.isEnd = false + let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref + if(!ref) return + this._nvueNextAnimate(this.currentStepAnimates, 0, fn) + this.next = 0 + // #endif + } +} + + +const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', + 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', + 'translateZ' +] +const animateTypes2 = ['opacity', 'backgroundColor'] +const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'] +animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { + MPAnimation.prototype[type] = function(...args) { + // #ifndef APP-NVUE + this.animation[type](...args) + // #endif + // #ifdef APP-NVUE + this._nvuePushAnimates(type, args) + // #endif + return this + } +}) + +export function createAnimation(option, _this) { + if(!_this) return + clearTimeout(_this.timer) + return new MPAnimation(option, _this) +} diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue new file mode 100644 index 0000000..f3ddd1f --- /dev/null +++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/uni_modules/uni-transition/package.json b/uni_modules/uni-transition/package.json new file mode 100644 index 0000000..d5c20e1 --- /dev/null +++ b/uni_modules/uni-transition/package.json @@ -0,0 +1,85 @@ +{ + "id": "uni-transition", + "displayName": "uni-transition 过渡动画", + "version": "1.3.3", + "description": "元素的简单过渡动画", + "keywords": [ + "uni-ui", + "uniui", + "动画", + "过渡", + "过渡动画" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y", + "alipay": "n" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-transition/readme.md b/uni_modules/uni-transition/readme.md new file mode 100644 index 0000000..2f8a77e --- /dev/null +++ b/uni_modules/uni-transition/readme.md @@ -0,0 +1,11 @@ + + +## Transition 过渡动画 +> **组件名:uni-transition** +> 代码块: `uTransition` + + +元素过渡动画 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/utils/jobAnalyzer.js b/utils/jobAnalyzer.js new file mode 100644 index 0000000..aed02c5 --- /dev/null +++ b/utils/jobAnalyzer.js @@ -0,0 +1,166 @@ +/** + * 岗位数据分析模块 + */ +const jobAnalyzer = { + /** + * 清洗无效薪资数据 + * @param {Array} jobs 原始岗位数据 + * @returns {Array} 有效岗位数据 + */ + cleanData: (jobs) => { + if (!Array.isArray(jobs)) return [] + return jobs.filter(job => + Number(job.minSalary) > 0 && + Number(job.maxSalary) > 0 + ) + }, + + /** + * 执行完整分析流程 + * @param {Array} jobs 原始岗位数据 + * @param {Object} options 配置选项 + * @returns {Object} 分析结果 + */ + analyze: (jobs, options = { + verbose: false + }) => { + // 数据校验 + if (!Array.isArray(jobs)) { + throw new Error('Invalid jobs data format') + } + + // 数据清洗 + const validJobs = jobAnalyzer.cleanData(jobs) + if (validJobs.length === 0) { + return { + warning: 'No valid job data available' + } + } + + // 执行分析 + const results = { + salary: jobAnalyzer.analyzeSalaries(validJobs), + categories: jobAnalyzer.countCategories(validJobs), + experience: jobAnalyzer.analyzeExperience(validJobs), + areas: jobAnalyzer.analyzeAreas(validJobs) + } + + // 按需控制台输出 + if (options.verbose) { + jobAnalyzer.printResults(results) + } + + return results + }, + + /** 薪资分析 */ + analyzeSalaries: (jobs) => { + const stats = jobs.reduce((acc, job) => { + acc.totalMin += job.minSalary + acc.totalMax += job.maxSalary + acc.highPay += (job.maxSalary >= 10000) ? 1 : 0 + return acc + }, { + totalMin: 0, + totalMax: 0, + highPay: 0 + }) + + return { + avgMin: Math.round(stats.totalMin / jobs.length), + avgMax: Math.round(stats.totalMax / jobs.length), + highPayRatio: Math.round((stats.highPay / jobs.length) * 100) + } + }, + + /** 岗位类别统计 */ + countCategories: (jobs) => { + return jobs.reduce((map, job) => { + map[job.jobCategory] = (map[job.jobCategory] || 0) + 1 + return map + }, {}) + }, + + /** 经验要求分析 */ + analyzeExperience: (jobs) => { + return jobs.reduce((stats, job) => { + const label = job.experIenceLabel || '未知' + stats[label] = (stats[label] || 0) + 1 + return stats + }, {}) + }, + + /** 地区分布分析 */ + analyzeAreas: (jobs) => { + return jobs.reduce((map, job) => { + const area = job.jobLocationAreaCodeLabel || '未知' + map[area] = (map[area] || 0) + 1 + return map + }, {}) + }, + + /** 格式化输出结果 */ + printResults: (results) => { + console.log('【高薪岗位分析】') + console.log(`- 平均月薪范围:${results.salary.avgMin}k ~ ${results.salary.avgMax}k`) + console.log(`- 月薪≥10k的岗位占比:${results.salary.highPayRatio}%`) + + console.log('\n【热门岗位类别】') + console.log(Object.entries(results.categories) + .sort((a, b) => b[1] - a[1]) + .map(([k, v]) => `- ${k} (${v}个)`) + .join('\n')) + + console.log('\n【经验要求分布】') + console.log(Object.entries(results.experience) + .map(([k, v]) => `- ${k}: ${v}个`) + .join('\n')) + + console.log('\n【工作地区分布】') + console.log(Object.entries(results.areas) + .sort((a, b) => b[1] - a[1]) + .map(([k, v]) => `- ${k}: ${v}个`) + .join('\n')) + }, + /** 合并所有统计属性并添加类型前缀 */ + _mergeAllStats: (results) => { + const merged = {} + + // 合并岗位类别(添加前缀) + Object.entries(results.categories).forEach(([k, v]) => { + merged[`岗位:${k}`] = v + }) + + // 合并工作地区(添加前缀) + Object.entries(results.areas).forEach(([k, v]) => { + merged[`地区:${k}`] = v + }) + + // 合并经验要求(添加前缀) + Object.entries(results.experience).forEach(([k, v]) => { + merged[`经验:${k}`] = v + }) + + return merged + }, + + /** 全属性统一排序输出 */ + printUnifiedResults: (results, options = { + log: false + }) => { + const mergedData = jobAnalyzer._mergeAllStats(results) + + const sortedEntries = Object.entries(mergedData) + .sort((a, b) => b[1] - a[1]) + if (options.log) { + // 格式化输出 + console.log('【全维度排序分析】') + console.log(sortedEntries + .map(([k, v]) => `- ${k}: ${v}个`) + .join('\n')) + } + return sortedEntries + } +} + +export default jobAnalyzer \ No newline at end of file diff --git a/utils/markdownParser.js b/utils/markdownParser.js new file mode 100644 index 0000000..2e9aa41 --- /dev/null +++ b/utils/markdownParser.js @@ -0,0 +1,135 @@ +import MarkdownIt from '@/lib/markdown-it.min.js'; +import hljs from "@/lib/highlight/highlight-uni.min.js"; +import parseHtml from '@/lib/html-parser.js'; +// import DOMPurify from '@/lib/dompurify@3.2.4es.js'; + +export let codeDataList = [] +export let jobMoreMap = new Map() + +const md = new MarkdownIt({ + html: true, // 允许 HTML 标签 + linkify: true, // 自动解析 URL + typographer: true, // 美化标点符号 + tables: true, + breaks: true, // 让 \n 自动换行 + langPrefix: 'language-', // 代码高亮前缀 + // 如果结果以
+                    
+ ${result.jobTitle} +
${result.salary}
+
+
${result.location}·${result.companyName}
+
+
+
${result.education}
+
${result.experience}
+
+
查看详情
+
+ + ` + if (result.data) { + jobMoreMap.set(jobId, result.data) + domContext += + `查看更多岗位
` + } + return domContext + } + } + //
${result.location}
+ //
${result.salary}
+ // 代码块 + let preCode = "" + try { + preCode = hljs.highlightAuto(str).value + } catch (err) { + preCode = markdownIt.utils.escapeHtml(str); + } + // 以换行进行分割 , 按行拆分代码 + const lines = preCode.split(/\n/).slice(0, -1); + const html = lines + .map((line, index) => + line ? + `
  • ${line}
  • ` : + '' + ) + .join(''); + + // 代码复制功能 + const cacheIndex = codeDataList.length; + codeDataList.push(str); + return ` +
    +
    + ${lang || 'plaintext'} + 复制代码 +
    +
      ${html}
    +
    + `; + } +}) + +function extractFirstJson(text) { + let stack = []; + let startIndex = -1; + let endIndex = -1; + + for (let i = 0; i < text.length; i++) { + const char = text[i]; + + if (char === '{') { + if (stack.length === 0) startIndex = i; // 记录第一个 '{' 的位置 + stack.push(char); + } else if (char === '}') { + stack.pop(); + if (stack.length === 0) { + endIndex = i; // 找到配对的 '}' + break; + } + } + } + + if (startIndex !== -1 && endIndex !== -1) { + const jsonString = text.slice(startIndex, endIndex + 1); + try { + const jsonObject = JSON.parse(jsonString); + return jsonObject; + } catch (e) { + return null; // 如果不是有效的 JSON + } + } + + return null; // 如果没有找到有效的 JSON 对象 +} + + +function safeExtractJson(text) { + try { + const jsonObject = extractFirstJson(text); + return jsonObject + } catch (e) { + console.error('JSON 解析失败:', e); + } + return null; +} + +export function clearJobMoreMap() { // 切换对话清空 + jobMoreMap.clear() +} + +export function parseMarkdown(content) { + if (!content) { + return //处理特殊情况,比如网络异常导致的响应的 content 的值为空 + } + codeDataList = [] + const unsafeHtml = md.render(content || '') + return unsafeHtml +} \ No newline at end of file diff --git a/utils/request.js b/utils/request.js new file mode 100644 index 0000000..ab003ab --- /dev/null +++ b/utils/request.js @@ -0,0 +1,167 @@ +import config from "@/config.js" +import useUserStore from '@/stores/useUserStore'; +export function request({ + url, + method = 'GET', + data = {}, + load = false, + header = {} +} = {}) { + + return new Promise((resolve, reject) => { + if (load) { + uni.showLoading({ + title: '请稍候', + mask: true + }); + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().userInfo.token}${useUserStore().token}` + } + uni.request({ + url: config.baseUrl + url, + method, + data: data, + header: { + 'Authorization': Authorization || '', + }, + success: resData => { + // 响应拦截 + if (resData.statusCode === 200) { + const { + code, + msg + } = resData.data + if (code === 200) { + resolve(resData.data) + return + } + uni.showToast({ + title: msg, + icon: 'none' + }) + } + if (resData.data?.code === 401 || resData.data?.code === 402) { + useUserStore().logOut() + uni.showToast({ + title: '登录过期,请重新登录', + icon: 'none' + }) + return + } + const err = new Error('请求出现异常,请联系工作人员') + err.error = resData + reject(err) + }, + fail: err => reject(err), + complete() { + if (load) { + uni.hideLoading(); + } + } + }) + }) +} + + +/** + * @param url String,请求的地址,默认:none + * @param data Object,请求的参数,默认:{} + * @param method String,请求的方式,默认:GET + * @param loading Boolean,是否需要loading ,默认:false + * @param header Object,headers,默认:{} + * @returns promise + **/ +export function createRequest(url, data = {}, method = 'GET', loading = false, headers = {}) { + if (loading) { + uni.showLoading({ + title: '请稍后', + mask: true + }) + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().token}` + } + + const header = headers || {}; + header["Authorization"] = encodeURIComponent(Authorization); + return new Promise((resolve, reject) => { + uni.request({ + url: config.baseUrl + url, + method: method, + data: data, + header, + success: resData => { + // 响应拦截 + if (resData.statusCode === 200) { + const { + code, + msg + } = resData.data + if (code === 200) { + resolve(resData.data) + return + } + uni.showToast({ + title: msg, + icon: 'none' + }) + } + if (resData.data?.code === 401 || resData.data?.code === 402) { + useUserStore().logOut() + } + const err = new Error('请求出现异常,请联系工作人员') + err.error = resData + reject(err) + }, + fail: (err) => { + reject(err) + }, + complete: () => { + if (loading) { + uni.hideLoading(); + } + } + }); + }) +} + + +export function uploadFile(tempFilePaths, loading = false) { + if (loading) { + uni.showLoading({ + title: '请稍后', + mask: true + }) + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().token}` + } + + const header = {}; + header["Authorization"] = encodeURIComponent(Authorization); + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: config.baseUrl + '/app/file/upload', + filePath: tempFilePaths, + name: 'file', + header, + success: (uploadFileRes) => { + if (uploadFileRes.statusCode === 200) { + return resolve(uploadFileRes.data) + } + }, + fail: (err) => { + reject(err) + }, + complete: () => { + if (loading) { + uni.hideLoading(); + } + } + }) + }) +} \ No newline at end of file diff --git a/utils/similarity_Job.js b/utils/similarity_Job.js new file mode 100644 index 0000000..6bfea4e --- /dev/null +++ b/utils/similarity_Job.js @@ -0,0 +1,347 @@ +// 使用Intl.Segmenter对中文文本进行分词 +function segmentText(text) { + const segmenter = new Intl.Segmenter('zh-Hans', { + granularity: 'word' + }); // 使用中文简体语言 + const segments = []; + for (let segment of segmenter.segment(text.toLowerCase())) { // 转为小写后进行分词 + segments.push(segment.segment); + } + return segments; +} + +// 语气 停用次 +const stopWords = ['的', '了', '啊', '哦', '/', '、', ' ', '', '-', '(', ')', '(', ')', '+', "=", "~", "!", "<", ">", "?", + "[", "]", "{", "}" +] + +function cleanKeywords(arr) { + return arr.filter(word => word && !stopWords.includes(word)) +} + +function calculateMatchScore(source, target) { + const sourceSet = new Set(cleanKeywords(source)) + const targetSet = new Set(cleanKeywords(target)) + let matchCount = 0 + for (let word of sourceSet) { + if (targetSet.has(word)) { + matchCount++ + } + } + + // 匹配度 = source中匹配到的词 / source总词数 + return matchCount / sourceSet.size +} + +class CsimilarityJobs { + config = { + thresholdVal: 0.69, + titleSimilarityWeight: 0.4, + salaryMatchWeight: 0.2, + areaMatchWeight: 0.2, + educationMatchWeight: 0.2, + experiencenMatchWeight: 0.1 + } + userTitle = ['Java', 'C', '全栈工程师']; + userSalaryMin = 10000; + userSalaryMax = 15000; + userArea = 0; // 用户指定的区域(例如:市南区) + userEducation = 4; // 用户学历(假设4为本科) + userExperience = 2; // 用户工作经验 + + jobTitle = ''; + jobMinSalary = 10000 + jobMaxSalary = 15000 + jobLocationAreaCode = 0 + jobEducation = 4 + jobExperience = 2 + jobCategory = '' + // 系统 + log = false + constructor() {} + setUserInfo(resume) { + this.userTitle = resume.jobTitle + this.userSalaryMax = Number(resume.salaryMax) + this.userSalaryMin = Number(resume.salaryMin) + this.userArea = Number(resume.area) + this.userEducation = resume.education + this.userExperience = this.getUserExperience(Number(resume.age)) + } + setJobInfo(jobInfo) { + this.jobTitle = jobInfo.jobTitle; + this.jobMinSalary = jobInfo.minSalary + this.jobMaxSalary = jobInfo.maxSalary + this.jobLocationAreaCode = jobInfo.jobLocationAreaCode + this.jobEducation = jobInfo.education + this.jobExperience = jobInfo.experience + this.jobCategory = jobInfo.jobCategory + } + calculationMatchingDegreeJob(resume) { + // 计算职位标题相似度 + // const titleSimilarity = stringSimilarity.compareTwoStrings(this.userTitle, job.jobTitle); + let jobT = null + if (this.jobCategory) { + jobT = this.calculateBestJobCategoryMatch(resume.jobTitle || resume.jobTitleString || [], this + .jobCategory); + } else { + jobT = this.calculateBestJobMatch(resume.jobTitle || resume.jobTitleString || [], this.jobTitle); + } + const { + bestMatchJobTitle, + maxSimilarity + } = jobT + + // 计算薪资匹配度 + const salaryMatch = this.calculateSalaryMatch(Number(resume.salaryMin), Number(resume.salaryMax), + this + .jobMinSalary, this.jobMaxSalary); + + // 计算区域匹配度 + const areaMatch = this.calculateAreaMatch(Number(resume.area), this.jobLocationAreaCode); + + // 计算学历匹配度 + const educationMatch = this.calculateEducationMatch(resume.education, this.jobEducation); + + // 计算工作经验匹配度 + // const experiencenMatch = this.calculateExperienceMatch2(this.userExperience, job.experience); + + // 综合匹配度 = 0.4 * 职位相似度 + 0.2 * 薪资匹配度 + 0.1 * 区域匹配度 + 0.2 * 学历匹配度 + 0.1 * 工作经验匹配度 + const overallMatch = this.config.titleSimilarityWeight * maxSimilarity + + this.config.salaryMatchWeight * salaryMatch + this.config.areaMatchWeight * areaMatch + + this.config.educationMatchWeight * educationMatch + // console.log(`Job ${job.jobTitle}工作经验匹配度: ${experiencenMatch}`); + if (this.log) { + console.log( + `Job ${job.jobTitle} 标题相似度 ${maxSimilarity} 薪资匹配度: ${salaryMatch}学历匹配度: ${educationMatch} 区域匹配度: ${areaMatch} 综合匹配度: ${overallMatch.toFixed(2)}` + ); + } + + // 设置阈值进行岗位匹配判断 + const threshold = this.config.thresholdVal; + return { + overallMatch: (overallMatch.toFixed(2) * 100) + '%', + data: resume, + maxSimilarity, + salaryMatch, + educationMatch, + areaMatch + } + } + calculationMatchingDegree(job) { + + // 计算职位标题相似度 + // console.log(this.userTitle, job.jobTitle) + // const titleSimilarity = stringSimilarity.compareTwoStrings(this.userTitle, job.jobTitle); + let jobT = null + if (job.jobCategory) { + jobT = this.calculateBestJobCategoryMatch(this.userTitle, job.jobCategory); + } else { + jobT = this.calculateBestJobMatch(this.userTitle, job.jobTitle); + } + const { + bestMatchJobTitle, + maxSimilarity + } = jobT + // 计算薪资匹配度 + const salaryMatch = this.calculateSalaryMatch(this.userSalaryMin, this.userSalaryMax, job.minSalary, + job + .maxSalary); + + // 计算区域匹配度 + const areaMatch = this.calculateAreaMatch(this.userArea, job.jobLocationAreaCode); + + // 计算学历匹配度 + const educationMatch = this.calculateEducationMatch(this.userEducation, job.education); + + // 计算工作经验匹配度 + // const experiencenMatch = this.calculateExperienceMatch2(this.userExperience, job.experience); + + // 综合匹配度 = 0.4 * 职位相似度 + 0.2 * 薪资匹配度 + 0.1 * 区域匹配度 + 0.2 * 学历匹配度 + 0.1 * 工作经验匹配度 + const overallMatch = this.config.titleSimilarityWeight * maxSimilarity + + this.config.salaryMatchWeight * salaryMatch + this.config.areaMatchWeight * areaMatch + + this.config.educationMatchWeight * educationMatch + // console.log(`Job ${job.jobTitle}工作经验匹配度: ${experiencenMatch}`); + if (this.log) { + console.log( + `Job ${job.jobTitle} 标题相似度 ${maxSimilarity} 薪资匹配度: ${salaryMatch}学历匹配度: ${educationMatch} 区域匹配度: ${areaMatch} 综合匹配度: ${overallMatch.toFixed(2)}` + ); + } + + // 设置阈值进行岗位匹配判断 + const threshold = this.config.thresholdVal; + if (overallMatch > threshold) { + return { + overallMatch: (overallMatch.toFixed(2) * 100) + '%', + data: job, + maxSimilarity, + salaryMatch, + educationMatch, + areaMatch + } + } + } + // 根据用户年龄推算工作经验年限区间 + getUserExperience(age) { + if (age = 0) { // 30以下 + return { + min: 0, + max: 5 + }; + } else if (age <= 1) { // 40以下 + return { + min: 5, + max: 10 + }; + } else if (age <= 2) { // 50以下 + return { + min: 10, + max: 20 + }; + } else { // 50以上 + return { + min: 20, + max: 40 + }; + } + } + // 计算经验匹配度 + calculateExperienceMatch2(userExperience, jobExperience) { + const jobExperienceRange = this.mapJobExperience(jobExperience); + + if (userExperience.min <= jobExperienceRange.max && userExperience.max >= jobExperienceRange.min) { + return 1; + } + + if ( + (userExperience.min <= jobExperienceRange.max && userExperience.max > jobExperienceRange.min) || + (userExperience.max >= jobExperienceRange.min && userExperience.min < jobExperienceRange.max) + ) { + return 0.5; // 部分匹配 + } + return 0; // 不匹配 + } + // 映射岗位经验要求到工作经验年限区间 + mapJobExperience(jobExperience) { + const experienceMapping = { + "1": { + min: 0, + max: 0 + }, + "2": { + min: 0, + max: 1 + }, + "3": { + min: 0, + max: 1 + }, + "4": { + min: 1, + max: 3 + }, + "5": { + min: 3, + max: 5 + }, + "6": { + min: 5, + max: 10 + }, + "7": { + min: 10, + max: 20 + }, + "8": { + min: 0, + max: 40 + } + }; + return experienceMapping[jobExperience]; + } + // 计算工作经验匹配度 + calculateExperiencenMatch(userExperience, jobExperience) { + if (userExperience === jobExperience) { + return 1; + } else if (userExperience > jobExperience) { + return 0.75; + } else { + return 0; + } + } + calculateSalaryMatch(userMin, userMax, jobMin, jobMax) { + const isMinMatch = userMin >= jobMin && userMin <= jobMax; + const isMaxMatch = userMax >= jobMin && userMax <= jobMax; + + if (isMinMatch || isMaxMatch) { + return 1; + } + + const minDifference = Math.abs(userMin - jobMin); + const maxDifference = Math.abs(userMax - jobMax); + + if (minDifference > 3000 && maxDifference > 3000) { + return 0; + } + + return 0.5; // 部分匹配 + } + // 计算区域匹配度 + calculateAreaMatch(userArea, jobArea) { + return userArea === jobArea ? 1 : 0.5; + } + calculateBestJobCategoryMatch(userJobTitles, jobTitle) { + let maxSimilarity = 0; + let bestMatchJobTitle = ''; + for (let i = 0; i < userJobTitles.length; i++) { + let userTitle = userJobTitles[i]; + if (userTitle === jobTitle) { + maxSimilarity = 1; + bestMatchJobTitle = userTitle; + break + } + } + return { + bestMatchJobTitle, + maxSimilarity + }; + } + // 计算职位匹配度 + calculateBestJobMatch(userJobTitles, jobTitle) { + let maxSimilarity = 0; + let bestMatchJobTitle = ''; + + userJobTitles.forEach((userTitle) => { + const userSegments = segmentText(userTitle); + const jobSegments = segmentText(jobTitle); + // 比较分词的交集,计算匹配度 + // const intersection = userSegments.filter(segment => jobSegments.includes(segment)); + // const similarity = intersection.length / userSegments.length; // 计算匹配度 + // 计算匹配度 + const similarity = calculateMatchScore(userSegments, jobSegments) + // 记录匹配度最高的职位 + if (similarity > maxSimilarity) { + maxSimilarity = similarity; + bestMatchJobTitle = userTitle; + } + }); + + return { + bestMatchJobTitle, + maxSimilarity + }; + } + // 计算学历匹配度 + calculateEducationMatch(userEducation, jobEducation) { + if (userEducation === jobEducation) { + return 1; + } else if (userEducation > jobEducation) { + return 1; + } else { + return 0; + } + } +} + +const similarityJobs = new CsimilarityJobs() + +export default similarityJobs \ No newline at end of file diff --git a/utils/streamRequest.js b/utils/streamRequest.js new file mode 100644 index 0000000..631f144 --- /dev/null +++ b/utils/streamRequest.js @@ -0,0 +1,144 @@ +import config from "@/config.js" +import useUserStore from '@/stores/useUserStore'; + +/** + * @param url String,请求的地址,默认:none + * @param data Object,请求的参数,默认:{} + * @returns promise + **/ +export default function StreamRequest(url, data = {}, onDataReceived, onError, onComplete) { + const userStore = useUserStore(); + const Authorization = userStore.token ? encodeURIComponent(userStore.token) : ''; + + const headers = { + "Authorization": Authorization, + "Accept": "text/event-stream", + "Content-Type": "application/json;charset=UTF-8" + }; + return new Promise(async (resolve, reject) => { + try { + const response = await fetch(config.StreamBaseURl + url, { + method: "POST", + headers, + body: JSON.stringify(data) + }); + + if (!response.ok) { + throw new Error(`HTTP 错误: ${response.status}`); + } + + const reader = response.body.getReader(); + const decoder = new TextDecoder("utf-8"); + + let buffer = ""; + while (true) { + const { + done, + value + } = await reader.read(); + + if (done) break; + + buffer += decoder.decode(value, { + stream: true + }); + + let lines = buffer.split("\n"); + buffer = lines.pop(); // 可能是不完整的 JSON 片段,留待下次解析 + for (let line of lines) { + if (line.startsWith("data: ")) { + const jsonData = line.slice(6).trim(); + if (jsonData === "[DONE]") { + onComplete && onComplete(); + resolve(); + return; + } + + try { + const parsedData = JSON.parse(jsonData); + const content = parsedData?.choices?.[0]?.delta?.content ?? + parsedData?.choices?.[0]?.delta?.reasoning_content ?? + ""; + if (content) { + onDataReceived && onDataReceived(content); + } + } catch (e) { + console.error("JSON 解析失败:", e, "原始数据:", jsonData); + } + } + } + } + + onComplete && onComplete(); + resolve(); + } catch (error) { + console.error("Stream 请求失败:", error); + onError && onError(error); + reject(error); + } + }); +} + + +/** + * @param url String,请求的地址,默认:none + * @param data Object,请求的参数,默认:{} + * @param method String,请求的方式,默认:GET + * @param loading Boolean,是否需要loading ,默认:false + * @param header Object,headers,默认:{} + * @returns promise + **/ +export function chatRequest(url, data = {}, method = 'GET', loading = false, headers = {}) { + if (loading) { + uni.showLoading({ + title: '请稍后', + mask: true + }) + } + let Authorization = '' + if (useUserStore().token) { + Authorization = `${useUserStore().token}` + } + + const header = headers || {}; + header["Authorization"] = encodeURIComponent(Authorization); + return new Promise((resolve, reject) => { + uni.request({ + url: config.StreamBaseURl + url, + method: method, + data: data, + header, + success: resData => { + // 响应拦截 + if (resData.statusCode === 200) { + const { + code, + msg + } = resData.data + if (code === 200) { + resolve(resData.data) + return + } + uni.showToast({ + title: msg, + icon: 'none' + }) + } + if (resData.data?.code === 401 || resData.data?.code === 402) { + useUserStore().logOut() + } + const err = new Error('请求出现异常,请联系工作人员') + err.error = resData + reject(err) + }, + fail: (err) => { + reject(err) + }, + complete: () => { + if (loading) { + uni.hideLoading(); + } + } + }); + }) +} \ No newline at end of file