├── .vscode └── launch.json ├── LICENSE ├── README.md ├── build └── icons │ ├── 128*128.png │ ├── 256*256.png │ └── 512*512.png ├── icon ├── 128.png ├── 256.png ├── 512.png └── dock │ ├── 32.png │ ├── 32empty.png │ └── empty.ico ├── package.json ├── screenshot ├── electron-lark-1.png └── electron-lark-2.png └── src ├── configuration.js ├── main.js ├── updateChecker.js └── windows └── views ├── fonts └── roboto │ ├── LICENSE.txt │ ├── Roboto-Black.woff │ ├── Roboto-Black.woff2 │ ├── Roboto-BlackItalic.woff │ ├── Roboto-BlackItalic.woff2 │ ├── Roboto-Bold.woff │ ├── Roboto-Bold.woff2 │ ├── Roboto-BoldItalic.woff │ ├── Roboto-BoldItalic.woff2 │ ├── Roboto-Light.woff │ ├── Roboto-Light.woff2 │ ├── Roboto-LightItalic.woff │ ├── Roboto-LightItalic.woff2 │ ├── Roboto-Medium.woff │ ├── Roboto-Medium.woff2 │ ├── Roboto-MediumItalic.woff │ ├── Roboto-MediumItalic.woff2 │ ├── Roboto-Regular.woff │ ├── Roboto-Regular.woff2 │ ├── Roboto-RegularItalic.woff │ ├── Roboto-RegularItalic.woff2 │ ├── Roboto-Thin.woff │ ├── Roboto-Thin.woff2 │ ├── Roboto-ThinItalic.woff │ └── Roboto-ThinItalic.woff2 ├── mdui.min.css ├── mdui.min.js ├── settings.html └── vue.min.js /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "launch", 7 | "name": "Main", 8 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", 9 | "runtimeArgs": ["--remote-debugging-port=9222", "."], 10 | "windows": { 11 | "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" 12 | } 13 | }, 14 | { 15 | "name": "Renderer", 16 | "type": "chrome", 17 | "request": "attach", 18 | "port": 9222, 19 | "webRoot": "${workspaceFolder}" 20 | } 21 | ], 22 | "compounds": [ 23 | { 24 | "name": "All", 25 | "configurations": ["Main", "Renderer"] 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ericwyn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Electron-Lark 2 | 3 | ![release-download-count](https://img.shields.io/github/downloads/Ericwyn/electron-lark/total.svg) 4 | 5 | ***下载地址: [Release](https://github.com/Ericwyn/electron-lark/releases)*** 6 | 7 | 8 | electron 版的飞书 Feishu (原 Lark),对网页版本进行封装 9 | 10 | 相比起普通网页版,功能如下 11 | 12 | - 独立的运行窗口,不容易误关闭 13 | - 关闭程序时后台运行,隐藏到通知栏小图标,双击可重新打开界面 14 | - 新消息提醒,状态栏小图标闪烁 15 | - 解除浏览器限制,避免因浏览器版本不对而提示无法使用 16 | 17 | 已知问题 18 | - 部分功能无法使用(工作台/会议等) 19 | - 飞书网页版缺陷,请向官方反馈 20 | 21 | 历史问题 22 | - ~~ubuntu18.04 Gnome 桌面,锁屏之后,系统通知栏图标 Tray 会消失, 当前规避方案如下~~ 23 | - ~~当有新消息提醒的时候,会重置通知栏图标 tray,保证哪怕因为锁屏导致 tray 消失,在收到新消息之后也会重新出现并闪烁~~ 24 | - 使用 alt + shift + m 的快捷键,重新显示界面以及 dock 图标 25 | - ~~V1.0.3 版本已修复,添加了一个 linux 锁屏监听,自动 reset appTray~~ 26 | - V1.1.1 版本升级了 electron 依赖,问题解决~ 27 | 28 | 29 | (另外有一说一, 飞书的技术架构就是基于 Electron 的, Windows 和 Mac 客户端也都是使用 Electron 打包, 既然如此为什么不顺便为 Linux 也提供支持呢 ?) 30 | 31 | - 2021-04-26更新:后知后觉 deepin 商店已经有 wine 版本的飞书了,详情可看这个 [deepin官方帖子](https://bbs.deepin.org/post/208466) 32 | 33 | 如果公司使用的并不是自己部署版本的飞书的话,可以尝试一下,ubuntu 上面可以再加一个 [deepin-wine-ubuntu](https://github.com/wszqkzqk/deepin-wine-ubuntu/issues/269) 34 | 35 | - 2021-10-11更新:飞书在大概 9 月份时候就已发布了 Linux 客户端(当前还是 Beta),大家可以下载一下官方的看看 ~ 36 | 37 | 但如果公司使用的是自己部署版本的飞书的话~ 现在看来好像还是只能用网页版套壳 🤷‍♂️ 38 | 39 | 40 | ## 运行截图 41 | 42 | ![screen-shot](screenshot/electron-lark-1.png) 43 | 44 | ## 版本记录 45 | 46 | ### V1.1.6 47 | - electron 版本升级为 15.2.0 48 | - 添加右键菜单,支持图片另存为和复制 49 | 50 | ### V1.1.5 51 | - electron 版本升级为 15.0.0 52 | - 修复某些时候设置页面无法关闭的问题 53 | 54 | ### V1.1.4 55 | - 程序菜单修改,新增 “操作->浏览器打开”,可在浏览器打开当前窗口页面 56 | 57 | ### V1.1.3 58 | - 修复通知消息点击后跳转聊天窗口失败的问题 59 | 60 | ### V1.1.2 61 | - electron 版本升级为 13.0.1 62 | - 点击消息通知打开应用时候会跳转到具体的聊天窗口, 感谢 [ttys3 的分享](https://github.com/Ericwyn/electron-lark/commit/f8c4781fab5c6cd704aa2bba4be0d4d0cedcaab1#commitcomment-51571446) 63 | 64 | ### V1.1.1 65 | 抄了 [ttys3](https://github.com/ttys3) 大佬的作业,感谢大佬! 66 | - 禁用硬件加速来修复 CPU 占用过高的问题 [issue12](https://github.com/Ericwyn/electron-lark/issues/12) 67 | - 升级 electron 到 13.0.0-bate 解决 appTray 消失问题,不再使用 dbus-monitor 方案 68 | - 支持点击通知打开应用,使用拦截网页消息通知并使用 electron 来重新发送的方式实现 69 | 70 | ### v1.1.0 71 | - 咕咕咕了很久的设置界面终于加上了 (~~又不是不能用~~) 72 | 73 | 在顶部菜单栏: 设置 -> 功能设置处进入,当前支持自定义以下设置项 74 | 75 | - 外链设置 76 | - 可设置哪些链接直接 electron 内部打开 77 | - 默认所有链接都通过浏览器打开 78 | - 水印设置 79 | - 是否显示页面水印 80 | - 默认为关闭 81 | - 服务器设置 82 | - 如果公司使用的是内部部署飞书服务,可由此自定义登录入口 83 | - 默认为飞书官方登录页面 84 | - electron 依赖升级到 12.0.5 85 | 86 | - ![screen-shot](screenshot/electron-lark-2.png) 87 | 88 | ### v1.0.3 89 | - 修复 ubuntu 下锁屏后 appTray 消失的问题 90 | 91 | ### v1.0.2 92 | - 修复已关闭提醒的聊天仍然会闪烁 tray icon 的问题 93 | 94 | ### v1.0.1 95 | - 去除页面水印 96 | - 修改了应用菜单,去除无用按钮 97 | 98 | ### v1.0.0 99 | - 初始版本 100 | 101 | 102 | ## 安装方法 (二进制安装) 103 | - 请从 [Release](https://github.com/Ericwyn/electron-lark/releases) 页面直接下载及安装 (ubuntu 18.04 上测试通过) 104 | 105 | ## 安装方法 (从源码安装) 106 | 107 | ### 0. 安装 NodeJs 108 | 请先按照官网教程安装 NodeJs,确保以下命令可以成功运行 109 | 110 | node -v 111 | npm -v 112 | 113 | 114 | ### 1. 安装 Electron 115 | 116 | 参考 https://qii404.me/2019/07/10/electron.html 117 | 118 | ``` 119 | # 墙内的话安装过程中会下载失败,需要首先设置electron的源为淘宝源即可 120 | npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/ 121 | 122 | # 全局安装 需要的话追加上 --registry='http://registry.npm.taobao.org' 使用淘宝npm源安装 123 | sudo npm install electron -g --allow-root -unsafe-perm=true 124 | # Windows使用下面语句 64位32位机器都是--win32 125 | npm install electron -g --platform=win32 126 | 127 | # 验证安装 128 | electron -v 129 | ``` 130 | 131 | 132 | 133 | ### 2.运行 134 | 135 | 工程目录下使用下面命令运行 136 | 137 | ``` 138 | electron . 139 | ``` 140 | -------------------------------------------------------------------------------- /build/icons/128*128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/build/icons/128*128.png -------------------------------------------------------------------------------- /build/icons/256*256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/build/icons/256*256.png -------------------------------------------------------------------------------- /build/icons/512*512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/build/icons/512*512.png -------------------------------------------------------------------------------- /icon/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/icon/128.png -------------------------------------------------------------------------------- /icon/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/icon/256.png -------------------------------------------------------------------------------- /icon/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/icon/512.png -------------------------------------------------------------------------------- /icon/dock/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/icon/dock/32.png -------------------------------------------------------------------------------- /icon/dock/32empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/icon/dock/32empty.png -------------------------------------------------------------------------------- /icon/dock/empty.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/icon/dock/empty.ico -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-lark", 3 | "version": "1.1.6", 4 | "main": "src/main.js", 5 | "description": "An Electron application for Feishu(Lark)", 6 | "author": "Ericwyn ", 7 | "license": "MIT", 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/Ericwyn/electron-lark.git" 11 | }, 12 | "keywords": [ 13 | "Electron", 14 | "Feishu", 15 | "Lark", 16 | "飞书" 17 | ], 18 | "bugs": "https://github.com/Ericwyn/electron-lark/issues", 19 | "homepage": "https://github.com/Ericwyn/electron-lark", 20 | "scripts": { 21 | "start": "electron ." 22 | }, 23 | "devDependencies": { 24 | "electron": "^15.2.0", 25 | "electron-builder": "^22.13.1", 26 | "electron-package": "^0.1.0" 27 | }, 28 | "linux": { 29 | "category": "Office", 30 | "packageCategory": "Office", 31 | "synopsis": "An Electron application for Feishu(Lark)", 32 | "icon": "./build/icons", 33 | "target": [ 34 | { 35 | "target": "deb", 36 | "arch": [ 37 | "x64" 38 | ] 39 | } 40 | ], 41 | "desktop": { 42 | "Encoding": "UTF-8" 43 | } 44 | }, 45 | "dependencies": { 46 | "electron-context-menu": "^3.1.1" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /screenshot/electron-lark-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/screenshot/electron-lark-1.png -------------------------------------------------------------------------------- /screenshot/electron-lark-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/screenshot/electron-lark-2.png -------------------------------------------------------------------------------- /src/configuration.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // 全局变量定义 4 | const path = require('path') 5 | 6 | class Configuration{ 7 | constructor() { 8 | this.path = require('path') 9 | this.rootDir = path.join(__dirname, "../"); 10 | this.iconDir = path.join(this.rootDir, "icon/") 11 | this.icon128 = path.join(this.iconDir, "/128.png"); 12 | this.dock32 = path.join(this.iconDir, '/dock/32.png') 13 | this.dock32Empty = path.join(this.iconDir, '/dock/32empty.png') 14 | } 15 | } 16 | 17 | module.exports = new Configuration() -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const appConf = require("./configuration") 4 | 5 | const electron = require('electron') 6 | const fs = require('fs') 7 | const updateChecker = require('./updateChecker') 8 | 9 | const shell = electron.shell; 10 | const app = electron.app; 11 | const ipcMain = electron.ipcMain; 12 | const BrowserWindow = electron.BrowserWindow; 13 | const Notification = electron.Notification; 14 | const Menu = electron.Menu; 15 | 16 | const rightClickContextMenu = require('electron-context-menu'); 17 | 18 | rightClickContextMenu({ 19 | showInspectElement: false, 20 | showCopyImage: true, 21 | showCopyImageAddress: true, 22 | showSaveImageAs: true, 23 | labels: { 24 | copy: '复制', 25 | copyImage: '复制图片', 26 | copyImageAddress: '复制图片地址', 27 | saveImageAs: '图片另存为', 28 | }, 29 | }); 30 | 31 | if (process.mas) app.setName('飞书Feishu'); 32 | // fixup High CPU Usage issue 33 | // see https://github.com/electron/electron/issues/11908 34 | app.disableHardwareAcceleration(); 35 | 36 | // 是否处于焦点,检点监听 37 | let onFocus = false; 38 | app.on('browser-window-blur', function () { 39 | onFocus = false; 40 | }) 41 | app.on('browser-window-focus', function () { 42 | onFocus = true; 43 | }) 44 | app.allowRendererProcessReuse = true 45 | 46 | let newAppTray = null; 47 | const dock32Icon = electron.nativeImage.createFromPath(appConf.dock32) 48 | const dock32EmptyIcon = electron.nativeImage.createFromPath(appConf.dock32Empty) 49 | 50 | // // 菜单 Template 51 | // const appMenu = require("./windows/app_menu") 52 | 53 | const globalShortcut = electron.globalShortcut; 54 | 55 | let mainWindow 56 | let webContents 57 | 58 | function createWindow(configJson) { 59 | mainWindow = new BrowserWindow({ 60 | width: 1000, 61 | height: 770, 62 | webPreferences: { 63 | nodeIntegration: true, 64 | contextIsolation: false 65 | }, 66 | icon: appConf.icon128 67 | }) 68 | 69 | // mainWindow.loadFile('index.html') 70 | // 改为使用loadURL加载飞书地址 71 | let loadUrl = "https://feishu.cn/messenger/"; 72 | if (configJson.startPageLink !== undefined 73 | && configJson.startPageLink != null 74 | && configJson.startPageLink.trim() != "") { 75 | loadUrl = configJson.startPageLink 76 | } 77 | console.log("load main page: " + loadUrl) 78 | mainWindow.loadURL(loadUrl, { 79 | userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36' 80 | // userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.158 Electron/8.2.0 Safari/537.36" 81 | }) 82 | webContents = mainWindow.webContents 83 | mainWindow.on('closed', function () { 84 | mainWindow = null 85 | }) 86 | 87 | mainWindow.on('close', (event) => { 88 | mainWindow.hide(); 89 | mainWindow.setSkipTaskbar(true); 90 | event.preventDefault(); 91 | }); 92 | 93 | let showWarterMark = false; 94 | if(configJson.showWarterMark !== undefined 95 | && configJson.showWarterMark != null) { 96 | showWarterMark = configJson.showWarterMark; 97 | } 98 | 99 | // 窗口加载完成后运行 100 | // 关于图标的闪烁,方法是每1.5s做一个轮询,查看是否有未读消息提醒,如果有的话就闪烁 101 | // 侧边栏 class 为 larkc-badge-count circle navbarMenu-badge larkc-badge-normal 102 | webContents.on("did-finish-load", function() { 103 | setInterval(() => { 104 | if(mainWindow != null && !mainWindow.isVisible){ 105 | return 106 | } 107 | webContents.executeJavaScript(`document.getElementsByClassName('larkc-badge-count circle larkc-badge-normal').length`) 108 | .then(function(result){ 109 | if(parseInt(result) > 0) { 110 | startBlingIcon(); 111 | } else { 112 | stopBlingIcon(); 113 | } 114 | }) 115 | if(!showWarterMark) { 116 | webContents.executeJavaScript(`if(document.getElementsByClassName('lark-water-mark-main').length > 0) document.getElementsByClassName('lark-water-mark-main')[0].remove()`) 117 | } 118 | }, 1500); 119 | 120 | // 注入 js,hack html5 的 Notification 接口,并将通知内容转发到 main.js 里 121 | webContents.executeJavaScript(` 122 | let ipcRenderer = null; 123 | try{ipcRenderer = require('electron').ipcRenderer} catch(e) {} 124 | let oldNotification = window.Notification; 125 | let newNotification = function(title, opt){ 126 | console.log("hack-title:" + title); 127 | console.log("hack-opt:" + JSON.stringify(opt)); 128 | if(ipcRenderer != null) { 129 | let sendMsg = JSON.stringify({ 130 | title: title, 131 | opt: opt 132 | }) 133 | try { 134 | ipcRenderer.send("notification", sendMsg); 135 | } catch (e) { 136 | console.log("发送 ipc 消息报错", e); 137 | return new oldNotification(title,opt); 138 | } 139 | } else { 140 | return new oldNotification(title,opt); 141 | } 142 | } 143 | newNotification.requestPermission = oldNotification.requestPermission.bind(oldNotification); 144 | Object.defineProperty(newNotification, 'permission', { 145 | get: () => { 146 | return oldNotification.permission; 147 | } 148 | }); 149 | window.Notification = newNotification;`); 150 | 151 | // 在页面加载完成之后,检查新版本信息 152 | updateChecker.checkInAppStart(); 153 | }) 154 | 155 | // 定义在 electron 内部打开的 url,除此之外的 url 都跳转浏览器打开,使用 indexOf >= 0 来判断 156 | let electronUrl = [ 157 | ] 158 | if (configJson.larkOpenLink !== undefined && configJson.larkOpenLink !== null){ 159 | electronUrl = ("" + configJson.larkOpenLink).split("\n") 160 | } 161 | 162 | // 设置新窗口的 user agent 163 | webContents.on("new-window", function(event, url, frameName, disposition, options, features, referer){ 164 | // feishu.cn/calendar/ 日历 165 | // feishu.cn/space/home/ 文档 166 | console.log("open url " + url) 167 | event.preventDefault() 168 | 169 | let openInElectron = false 170 | for(let i=0;i= 0) { 172 | openInElectron = true; 173 | console.log("open url electron") 174 | break; 175 | } 176 | } 177 | 178 | if(openInElectron) { 179 | // 将所有打开的新页面的 user agent 也重新设置,避免提示浏览器错误 180 | const win = new BrowserWindow({ 181 | width: 1200, 182 | height: 600, 183 | webContents: options.webContents, 184 | show: false 185 | }) 186 | win.once('ready-to-show', () => win.show()) 187 | if (!options.webContents) { 188 | win.loadURL(url,{ 189 | userAgent : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36" 190 | }) 191 | } 192 | event.newGuest = win; 193 | } else { 194 | shell.openExternal(url) 195 | return; 196 | } 197 | }) 198 | 199 | // 打开开发者模式 200 | // mainWindow.toggleDevTools() 201 | } 202 | 203 | let blingCount = 0; 204 | let blingTimer = null; 205 | let bling = false; 206 | function startBlingIcon() { 207 | // 部分修复ubuntu18.04 下面锁屏之后 dock 图标一直不显示的问题 208 | // 每次 start bling 之前重新设置一遍 209 | // 保证哪怕因为锁屏而 dock 图标消失之后,收到新消息也可以闪烁 210 | // appTray.appTray.destroy() 211 | // appTray.init(electron, app, mainWindow) 212 | 213 | // 如果是焦点的话,就不闪烁 214 | if (onFocus && mainWindow.isVisible()) { 215 | stopBlingIcon() 216 | return 217 | } 218 | if (blingTimer != null) { 219 | return 220 | } 221 | bling = true; 222 | blingTimer = setInterval(function () { 223 | blingCount++; 224 | if (blingCount % 2 == 0) { 225 | newAppTray.setImage(dock32EmptyIcon) 226 | } else { 227 | newAppTray.setImage(dock32Icon) 228 | } 229 | // 避免 count 无限增大 230 | if(blingCount == 1000) blingCount = 0 231 | }, 500); 232 | } 233 | 234 | function stopBlingIcon() { 235 | if(bling) { 236 | if (blingTimer != null) { 237 | clearInterval(blingTimer) 238 | blingTimer = null; 239 | } 240 | newAppTray.setImage(dock32Icon) 241 | bling = false; 242 | } 243 | } 244 | 245 | 246 | // 修复 Application Menu上图标不显示 247 | if (process.env.XDG_CURRENT_DESKTOP == 'ubuntu:GNOME') { 248 | process.env.XDG_CURRENT_DESKTOP = 'Unity'; 249 | } 250 | 251 | const trayMenuTemplate = [ 252 | { 253 | label: '显示主界面', 254 | click: function(){ 255 | if(mainWindow != null){ 256 | mainWindow.show() 257 | } 258 | } 259 | }, 260 | { 261 | label: '退出', 262 | click: function(){ 263 | console.log("从 tray 退出") 264 | app.quit(); 265 | mainWindow.destroy() 266 | } 267 | } 268 | ]; 269 | const contextMenu = electron.Menu.buildFromTemplate(trayMenuTemplate) 270 | 271 | function appTrayInit(){ 272 | newAppTray = new electron.Tray(dock32Icon); 273 | newAppTray.setToolTip('Feishu'); 274 | newAppTray.setContextMenu(contextMenu); 275 | newAppTray.on('click',function () { 276 | stopBlingIcon(); 277 | mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show() 278 | mainWindow.isVisible() ? mainWindow.setSkipTaskbar(false) : mainWindow.setSkipTaskbar(true); 279 | }) 280 | newAppTray.on('double-click', function() { 281 | if(mainWindow != null && !mainWindow.isVisible()){ 282 | mainWindow.show() 283 | } 284 | }) 285 | } 286 | 287 | function getConfigJson(callback){ 288 | fs.readFile('config.json','utf-8',function(err,data){ 289 | if(err){ 290 | console.error("load config error, may be have no config file~"); 291 | callback({}) 292 | } 293 | else{ 294 | console.log("read config json:" + data); 295 | callback(JSON.parse(data)) 296 | } 297 | }); 298 | } 299 | 300 | // ------------------------ 程序菜单 -------------------------------- 301 | /** 302 | * 注册键盘快捷键 303 | * 其中:label: '切换开发者工具',这个可以在发布时注释掉 304 | */ 305 | let menuTemplate = [ 306 | { 307 | label: '操作', 308 | submenu: [ 309 | { 310 | label: '浏览器打开', 311 | click: function (item, focusedWindow) { 312 | console.log("open in browser:" + focusedWindow.webContents.getURL()); 313 | require('electron').shell.openExternal(focusedWindow.webContents.getURL()) 314 | } 315 | }, 316 | { 317 | label: '最小化', 318 | // accelerator: 'CmdOrCtrl+M', 319 | role: 'minimize' 320 | }, 321 | // { 322 | // label: '关闭窗口', 323 | // accelerator: 'CmdOrCtrl+W', 324 | // role: 'close' 325 | // }, 326 | { 327 | label: '退出程序', 328 | click: function (item, focusedWindow) { 329 | app.quit(); 330 | mainWindow.destroy() 331 | // openSettingsWindows(); 332 | } 333 | }, 334 | ] 335 | }, 336 | { 337 | label: '设置', 338 | role: 'window', 339 | submenu: [ 340 | { 341 | label: '功能设置', 342 | click: function (item, focusedWindow) { 343 | openSettingsWindows(); 344 | } 345 | }, 346 | { 347 | label: '切换开发者工具', 348 | accelerator: (function () { 349 | if (process.platform === 'darwin') { 350 | return 'Alt+Command+I' 351 | } else { 352 | return 'Ctrl+Shift+I' 353 | } 354 | })(), 355 | click: function (item, focusedWindow) { 356 | if (focusedWindow) { 357 | focusedWindow.toggleDevTools() 358 | } 359 | } 360 | }, 361 | { 362 | type: 'separator' 363 | } 364 | ] 365 | }, 366 | { 367 | label: '帮助', 368 | role: 'help', 369 | submenu: [ 370 | { 371 | label: '检查新版本', 372 | click: function () { 373 | updateChecker.check(true); 374 | } 375 | }, 376 | { 377 | label: 'Github', 378 | click: function () { 379 | require('electron').shell.openExternal('https://github.com/Ericwyn/electron-lark') 380 | } 381 | } 382 | ] 383 | }, 384 | ] 385 | 386 | 387 | /** 388 | * 打开设置窗口 389 | */ 390 | function openSettingsWindows(){ 391 | let settingsWindow = null; 392 | if(settingsWindow == null) { 393 | settingsWindow = new BrowserWindow({ 394 | width: 700, 395 | height: 650, 396 | frame: false, 397 | // height: 200, 398 | resizable: false, 399 | webPreferences: { 400 | nodeIntegration: true, 401 | contextIsolation: false 402 | }, 403 | }); 404 | 405 | // console.log(settingsWindow) 406 | // settingsWindow.loadUrl('file://' + __dirname + '/app/settings.html'); 407 | settingsWindow.loadURL('file://' +__dirname+ '/windows/views/settings.html'); 408 | // settingsWindow.toggleDevTools(); 409 | } 410 | } 411 | 412 | // ------------------------ App ------------------------------------ 413 | app.on('ready', function () { 414 | 415 | // 系统菜单 416 | const menu = Menu.buildFromTemplate(menuTemplate) 417 | // 设置菜单部分 418 | Menu.setApplicationMenu(menu) 419 | 420 | // 系统托盘设置 421 | // 托盘图标 422 | appTrayInit() 423 | 424 | // globalShortcut.register('alt+shift+q', () => { 425 | // console.log("托盘销毁情况") 426 | // console.log(newAppTray.isDestroyed()) 427 | // }) 428 | 429 | globalShortcut.register('alt+shift+m', () => { 430 | mainWindow.show() 431 | }) 432 | 433 | // app on 了之后先进行 ajax 请求配置详情,成功之后再 createWindows 434 | getConfigJson(function (json){ 435 | console.log(json) 436 | createWindow(json); 437 | }) 438 | 439 | }) 440 | 441 | app.on('window-all-closed', () => { 442 | app.quit(); 443 | }); 444 | 445 | app.on('activate', () => { 446 | if (win == null) { 447 | createWindow(); 448 | } 449 | }) 450 | 451 | // 接受从载入页面发送过来的通知消息 452 | ipcMain.on("notification", (event, msg) => { 453 | // console.log("收到消息") 454 | // console.log(event) 455 | // console.log(msg) 456 | let args = JSON.parse(msg) 457 | // let title = args.title; 458 | // let opt = args.opt; 459 | // console.log(args.title, args.opt); 460 | // title 是对话框名称,opt 是聊天的具体内容,想看格式的话可以去掉上面那行注释 461 | showLarkNotify(args.title, args.opt, args.opt.channelId) 462 | event.returnValue = 'pong' 463 | }) 464 | 465 | function showLarkNotify(title, opt, channelId){ 466 | if(Notification.isSupported()) { 467 | let electronNotification = new Notification({ 468 | title: title, 469 | subtitle : title, 470 | body : opt.body, 471 | icon: electron.nativeImage.createFromPath(appConf.dock32), 472 | }); 473 | electronNotification.addListener('click', function(){ 474 | if(mainWindow != null) mainWindow.show(); 475 | // 通过注入 js 打开具体的对话聊天框 476 | // 参考 https://github.com/Ericwyn/electron-lark/commit/f8c4781fab5c6cd704aa2bba4be0d4d0cedcaab1#commitcomment-51571446 477 | if(webContents != null) { 478 | try{webContents.executeJavaScript(` 479 | var doms = document.getElementsByTagName("div"); 480 | for(let i =0;i checkUpdateExpireTime) { 66 | console.log("开始检查更新") 67 | checkUpdate(false, function(){ 68 | updateCheckJson.lastCheckUpdateTimeStamp = unixTimeStamp; 69 | saveConfig(); 70 | }) 71 | } 72 | } 73 | 74 | if(updateCheckJson == null){ 75 | getConfigJson(function(){check()}); 76 | } else { 77 | check(); 78 | } 79 | 80 | } 81 | 82 | // 参数代表是否手动触发 83 | function checkUpdate(showCheckNotify, successCb){ 84 | if(successCb == undefined){ 85 | successCb = function(){} 86 | } 87 | 88 | let options = { 89 | protocol: 'https:', 90 | hostname: 'api.github.com', 91 | path: '/repos/Ericwyn/electron-lark/releases/latest', 92 | headers: { 93 | 'User-Agent': 'request' 94 | } 95 | } 96 | 97 | let resJsonStr = ""; 98 | 99 | https.get(options, (res) => { 100 | console.log('request github api for check update, status code :' + res.statusCode); 101 | // if(res.statusCode != 200){ 102 | // return 103 | // } 104 | 105 | res.on('data', (data) => { 106 | resJsonStr += String(data); 107 | }); 108 | 109 | res.on('end', () => { 110 | let resJson; 111 | try{ 112 | JSON.parse(resJsonStr); 113 | } catch(e){ 114 | console.log("resJsonStr 校验错误") 115 | return 116 | } 117 | resJson = JSON.parse(String(resJsonStr)); 118 | 119 | if(res.statusCode != 200){ 120 | if(resJson.message.indexOf("API rate limit exceeded") >= 0) { 121 | if(showCheckNotify !== undefined && showCheckNotify) { 122 | new Notification({ 123 | title: "检查更新失败", 124 | subtitle : "检查更新失败", 125 | body : "Github API 请求速度过快,请稍后再试", 126 | icon: electron.nativeImage.createFromPath(appConf.dock32), 127 | }).show(); 128 | } 129 | } 130 | } else { 131 | console.log("请求成功") 132 | resJson = JSON.parse(String(resJsonStr)); 133 | } 134 | 135 | let newVersion = String(resJson.tag_name) 136 | .trim() 137 | .toLocaleLowerCase() 138 | .replace("v","");; 139 | 140 | // 只要最新版本和当前版本不一样,就提示更新 141 | let packageVersion = require(path.join(__dirname, './../package.json')) 142 | .version 143 | .trim() 144 | .toLocaleLowerCase().replace("v", ""); 145 | console.log("当前版本号:", packageVersion); 146 | console.log("最新版本号:", newVersion); 147 | 148 | if(packageVersion != newVersion) { 149 | let updateNotify = new Notification({ 150 | title: "发现新版本", 151 | subtitle : "发现新版本", 152 | body : "electron-lark 已发现新版本,请前往 github release 页下载", 153 | icon: electron.nativeImage.createFromPath(appConf.dock32), 154 | }); 155 | 156 | updateNotify.addListener('click', function(){ 157 | console.log("open github for download release"); 158 | electron.shell.openExternal('https://github.com/Ericwyn/electron-lark/releases') 159 | }); 160 | updateNotify.show(); 161 | 162 | } else { 163 | if(showCheckNotify !== undefined && showCheckNotify) { 164 | new Notification({ 165 | title: "当前已是最新版本", 166 | subtitle : "当前已是最新版本", 167 | body : "当前 elecron-lark 版本已是最新版本", 168 | icon: electron.nativeImage.createFromPath(appConf.dock32), 169 | }).show(); 170 | } 171 | } 172 | 173 | successCb(); 174 | }) 175 | 176 | }).on('error', (e) => { 177 | console.log("fail in request github api") 178 | console.error(e); 179 | if(showCheckNotify) { 180 | new Notification({ 181 | title: "检查更新失败", 182 | subtitle : "检查更新失败", 183 | body : e.message, 184 | icon: electron.nativeImage.createFromPath(appConf.dock32), 185 | }).show(); ; 186 | } 187 | }); 188 | } 189 | 190 | module.exports = { 191 | checkInAppStart: checkUpdateInAppStart, 192 | check: checkUpdate, 193 | } -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Black.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Black.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-BlackItalic.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-BlackItalic.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-BoldItalic.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-BoldItalic.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-LightItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-LightItalic.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-LightItalic.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-MediumItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-MediumItalic.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-MediumItalic.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-RegularItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-RegularItalic.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-RegularItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-RegularItalic.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-ThinItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-ThinItalic.woff -------------------------------------------------------------------------------- /src/windows/views/fonts/roboto/Roboto-ThinItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ericwyn/electron-lark/8445b977a618c277be0e59e54b8a045a52c8b104/src/windows/views/fonts/roboto/Roboto-ThinItalic.woff2 -------------------------------------------------------------------------------- /src/windows/views/mdui.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mdui 1.0.1 (https://mdui.org) 3 | * Copyright 2016-2020 zdhxiong 4 | * Licensed under MIT 5 | */ 6 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).mdui=e()}(this,function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(n){return new this(function(i,t){if(!n||void 0===n.length)return t(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(n);if(0===o.length)return i([]);var s=o.length;function r(e,t){if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){r(e,t)},function(t){o[e]={status:"rejected",reason:t},0==--s&&i(o)})}o[e]={status:"fulfilled",value:t},0==--s&&i(o)}for(var e=0;e"===n[n.length-1]){var i="div";return D({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},function(t,e){if(0===n.indexOf("<"+t))return i=e,!1}),new R(j(n,i))}if(!("#"===t[0]&&!t.match(/[ .<>:~]/)))return new R(document.querySelectorAll(t));var e=document.getElementById(t.slice(1));return e?new R([e]):new R}return!x(t)||t instanceof Node?new R([t]):new R(t)}).fn=R.prototype,H);setTimeout(function(){return L("body").addClass("mdui-loaded")});var B={$:L};function P(t,e){return t!==e&&w(t).contains(e)}function N(n,t){return D(t,function(t,e){n.push(e)}),n}L.fn.each=function(t){return D(this,t)},L.fn.get=function(t){return void 0===t?[].slice.call(this):this[0<=t?t:t+this.length]},L.fn.find=function(n){var i=[];return this.each(function(t,e){N(i,L(e.querySelectorAll(n)).get())}),new R(i)};var z={},F=1;function q(t){var e="_mduiEventId";return t[e]||(t[e]=++F),t[e]}function W(t){var e=t.split(".");return{type:e[0],ns:e.slice(1).sort().join(" ")}}function Y(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function U(s,t,r,a){function u(t){delete e[t.id],s.removeEventListener(t.type,t.proxy,!1)}var e=z[q(s)]||[];t?t.split(" ").forEach(function(t){var e,n,i,o;t&&(e=s,n=r,i=a,o=W(t),(z[q(e)]||[]).filter(function(t){return t&&(!o.type||t.type===o.type)&&(!o.ns||Y(o.ns).test(t.ns))&&(!n||q(t.func)===q(n))&&(!i||t.selector===i)})).forEach(function(t){return u(t)})}):e.forEach(function(t){return u(t)})}function X(n,t){for(var e=[],i=arguments.length-2;0"===n[n.length-1]?i&&b(e)?L(e.cloneNode(!0)):L(e):L(j(e,"div")))[s?"insertAfter":"insertBefore"](o)})})}}),L.fn.off=function(t,n,e){var i=this;return C(t)?(D(t,function(t,e){i.off(t,n,e)}),this):(!1!==n&&!p(n)||(e=n,n=void 0),!1===e&&(e=M),this.each(function(){U(this,t,e,n)}))},L.fn.on=function(t,n,i,e,o){var s=this;if(C(t))return E(n)||(i=i||n,n=void 0),D(t,function(t,e){s.on(t,n,i,e,o)}),this;if(null==i&&null==e?(e=n,i=n=void 0):null==e&&(E(n)?(e=i,i=void 0):(e=i,i=n,n=void 0)),!1===e)e=M;else if(!e)return this;if(o){var r=this,a=e;e=function(t){return r.off(t.type,n,e),a.apply(this,arguments)}}return this.each(function(){!function(s,t,r,a,u){var c=q(s);z[c]||(z[c]=[]);var l=!1;C(a)&&a.useCapture&&(l=!0),t.split(" ").forEach(function(t){if(t){var n=W(t),e={type:n.type,ns:n.ns,func:r,selector:u,id:z[c].length,proxy:o};z[c].push(e),s.addEventListener(e.type,o,l)}function i(t,e){!1===r.apply(e,void 0===t._detail?[t]:[t].concat(t._detail))&&(t.preventDefault(),t.stopPropagation())}function o(e){e._ns&&!Y(e._ns).test(n.ns)||(e._data=a,u?L(s).find(u).get().reverse().forEach(function(t){t!==e.target&&!P(t,e.target)||i(e,t)}):i(e,s))}})}(this,t,e,i,n)})},D(K,function(t,e){L.fn[t]=function(n){return this.on(e,function(t,e){n(t,e.xhr,e.options,e.data)})}}),L.fn.map=function(n){return new R(nt(this,function(t,e){return n.call(t,e,t)}))},L.fn.clone=function(){return this.map(function(){return this.cloneNode(!0)})},L.fn.is=function(n){var i=!1;if(p(n))return this.each(function(t,e){n.call(e,t,e)&&(i=!0)}),i;if(E(n))return this.each(function(t,e){y(e)||g(e)||(e.matches||e.msMatchesSelector).call(e,n)&&(i=!0)}),i;var e=L(n);return this.each(function(t,n){e.each(function(t,e){n===e&&(i=!0)})}),i},L.fn.remove=function(n){return this.each(function(t,e){!e.parentNode||n&&!L(e).is(n)||e.parentNode.removeChild(e)})},D(["prepend","append"],function(u,t){L.fn[t]=function(){for(var a=[],t=arguments.length;t--;)a[t]=arguments[t];return this.each(function(t,e){var n,i=e.childNodes,o=i.length,s=o?i[u?o-1:0]:document.createElement("div");o||e.appendChild(s);var r=p(a[0])?[a[0].call(e,t,e.innerHTML)]:a;t&&(r=r.map(function(t){return E(t)?t:L(t).clone()})),(n=L(s))[u?"after":"before"].apply(n,r),o||e.removeChild(s)})}}),D(["appendTo","prependTo"],function(r,t){L.fn[t]=function(t){var s=[],e=L(t).map(function(t,e){var n=e.childNodes,i=n.length;if(i)return n[r?0:i-1];var o=document.createElement("div");return e.appendChild(o),s.push(o),o}),n=this[r?"insertBefore":"insertAfter"](e);return L(s).remove(),n}}),D(["attr","prop","css"],function(s,r){function a(t,e){switch(s){case 0:var n=t.getAttribute(e);return v(n)?void 0:n;case 1:return t[e];default:return S(t,e)}}L.fn[r]=function(n,i){var o=this;if(C(n))return D(n,function(t,e){o[r](t,e)}),this;if(1!==arguments.length)return this.each(function(t,e){!function(t,e,n){if(!O(n))switch(s){case 0:v(n)?t.removeAttribute(e):t.setAttribute(e,n);break;case 1:t[e]=n;break;default:e=$(e),t.style[e]=m(n)?n+(-1').appendTo(document.body).reflow().css("z-index",t));var n=e.data("_overlay_level")||0;return e.data("_overlay_level",++n).addClass("mdui-overlay-show")},L.hideOverlay=function(t){void 0===t&&(t=!1);var e=L(".mdui-overlay");if(e.length){var n=t?1:e.data("_overlay_level");1i.lastScrollY?"down":"up",n=i.options.tolerance[e]<=Math.abs(t-i.lastScrollY);t>i.lastScrollY&&t>=i.options.offset&&n?i.unpin():(t"},It.prototype.updateThCheckboxStatus=function(){var t=this.$thCheckbox[0],e=this.selectedRow,n=this.$tdRows.length;t.checked=e===n,t.indeterminate=!!e&&e!==n},It.prototype.updateTdCheckbox=function(){var o=this,s="mdui-table-row-selected";this.$tdRows.each(function(t,e){var n=L(e);if(n.find(".mdui-table-cell-checkbox").remove(),o.selectable){var i=L(o.createCheckboxHTML("td")).prependTo(n).find('input[type="checkbox"]');n.hasClass(s)&&(i[0].checked=!0,o.selectedRow++),o.updateThCheckboxStatus(),i.on("change",function(){i[0].checked?(n.addClass(s),o.selectedRow++):(n.removeClass(s),o.selectedRow--),o.updateThCheckboxStatus()}),o.$tdCheckboxs=o.$tdCheckboxs.add(i)}})},It.prototype.updateThCheckbox=function(){var t=this;this.$thRow.find(".mdui-table-cell-checkbox").remove(),this.selectable&&(this.$thCheckbox=L(this.createCheckboxHTML("th")).prependTo(this.$thRow).find('input[type="checkbox"]').on("change",function(){var n=t.$thCheckbox[0].checked;t.selectedRow=n?t.$tdRows.length:0,t.$tdCheckboxs.each(function(t,e){e.checked=n}),t.$tdRows.each(function(t,e){n?L(e).addClass("mdui-table-row-selected"):L(e).removeClass("mdui-table-row-selected")})}))},It.prototype.updateNumericCol=function(){var e=this,s="mdui-table-col-numeric";this.$thRow.find("th").each(function(i,t){var o=L(t).hasClass(s);e.$tdRows.each(function(t,e){var n=L(e).find("td").eq(i);o?n.addClass(s):n.removeClass(s)})})};var St="_mdui_table";L(function(){B.mutation(".mdui-table",function(){var t=L(this);t.data(St)||t.data(St,new It(t))})}),B.updateTables=function(t){(O(t)?L(".mdui-table"):L(t)).each(function(t,e){var n=L(e),i=n.data(St);i?i.init():n.data(St,new It(n))})};var jt="touchstart mousedown",Mt="touchmove mousemove",At="touchend mouseup",Dt="touchcancel mouseleave",Rt="touchend touchmove touchcancel",Ht=0;function Lt(t){return!(Ht&&-1<["mousedown","mouseup","mousemove","click","mouseover","mouseout","mouseenter","mouseleave"].indexOf(t.type))}function Bt(t){"touchstart"===t.type?Ht+=1:-1<["touchmove","touchend","touchcancel"].indexOf(t.type)&&setTimeout(function(){Ht&&--Ht},500)}function Pt(t,e){if(!(t instanceof MouseEvent&&2===t.button)){var n="undefined"!=typeof TouchEvent&&t instanceof TouchEvent&&t.touches.length?t.touches[0]:t,i=n.pageX,o=n.pageY,s=e.offset(),r=e.innerHeight(),a=e.innerWidth(),u=i-s.left,c=o-s.top,l=Math.max(Math.pow(Math.pow(r,2)+Math.pow(a,2),.5),48),d="translate3d("+(a/2-u)+"px,"+(r/2-c)+"px, 0) scale(1)";L('
').data("_ripple_wave_translate",d).prependTo(e).reflow().transform(d)}}function Nt(){var t=L(this);t.children(".mdui-ripple-wave").each(function(t,e){!function(t){if(t.length&&!t.data("_ripple_wave_removed")){t.data("_ripple_wave_removed",!0);var e=setTimeout(function(){return t.remove()},400),n=t.data("_ripple_wave_translate");t.addClass("mdui-ripple-wave-fill").transform(n.replace("scale(1)","scale(1.01)")).transitionEnd(function(){clearTimeout(e),t.addClass("mdui-ripple-wave-out").transform(n.replace("scale(1)","scale(1.01)")),e=setTimeout(function(){return t.remove()},700),setTimeout(function(){t.transitionEnd(function(){clearTimeout(e),t.remove()})},0)})}}(L(e))}),t.off(Mt+" "+At+" "+Dt,Nt)}function zt(t){if(Lt(t)&&(Bt(t),t.target!==document)){var e=L(t.target),n=e.hasClass("mdui-ripple")?e:e.parents(".mdui-ripple").first();if(n.length&&!n.prop("disabled")&&O(n.attr("disabled")))if("touchstart"===t.type){var i=!1,o=setTimeout(function(){o=0,Pt(t,n)},200),s=function(){o&&(clearTimeout(o),o=0,Pt(t,n)),i||(i=!0,Nt.call(n))};n.on("touchmove",function(){o&&(clearTimeout(o),o=0),s()}).on("touchend touchcancel",s)}else Pt(t,n),n.on(Mt+" "+At+" "+Dt,Nt)}}L(function(){yt.on(jt,zt).on(Rt,Bt)});var Ft={reInit:!1,domLoadedEvent:!1};function qt(t,e){void 0===e&&(e={}),e=X({},Ft,e);var n=t.target,i=L(n),o=t.type,s=i.val(),r=i.attr("type")||"";if(!(-1<["checkbox","button","submit","range","radio","image"].indexOf(r))){var a=i.parent(".mdui-textfield");if("focus"===o&&a.addClass("mdui-textfield-focus"),"blur"===o&&a.removeClass("mdui-textfield-focus"),"blur"!==o&&"input"!==o||(s?a.addClass("mdui-textfield-not-empty"):a.removeClass("mdui-textfield-not-empty")),n.disabled?a.addClass("mdui-textfield-disabled"):a.removeClass("mdui-textfield-disabled"),"input"!==o&&"blur"!==o||e.domLoadedEvent||!n.validity||(n.validity.valid?a.removeClass("mdui-textfield-invalid-html5"):a.addClass("mdui-textfield-invalid-html5")),i.is("textarea")){var u=s,c=!1;""===u.replace(/[\r\n]/g,"")&&(i.val(" "+u),c=!0),i.outerHeight("");var l=i.outerHeight(),d=n.scrollHeight;l / '+h+"").appendTo(a),a.find(".mdui-textfield-counter-inputed").text(s.length.toString())),(a.find(".mdui-textfield-helper").length||a.find(".mdui-textfield-error").length||h)&&a.addClass("mdui-textfield-has-bottom")}}function Wt(t){var e=t.data(),n=e._slider_$track,i=e._slider_$fill,o=e._slider_$thumb,s=e._slider_$input,r=e._slider_min,a=e._slider_max,u=e._slider_disabled,c=e._slider_discrete,l=e._slider_$thumbText,d=s.val(),h=(d-r)/(a-r)*100;i.width(h+"%"),n.width(100-h+"%"),u&&(i.css("padding-right","6px"),n.css("padding-left","6px")),o.css("left",h+"%"),c&&l.text(d),0==h?t.addClass("mdui-slider-zero"):t.removeClass("mdui-slider-zero")}function Yt(t){var e=L('
'),n=L('
'),i=L('
'),o=t.find('input[type="range"]'),s=o[0].disabled,r=t.hasClass("mdui-slider-discrete");s?t.addClass("mdui-slider-disabled"):t.removeClass("mdui-slider-disabled"),t.find(".mdui-slider-track").remove(),t.find(".mdui-slider-fill").remove(),t.find(".mdui-slider-thumb").remove(),t.append(e).append(n).append(i);var a=L();r&&(a=L(""),i.empty().append(a)),t.data("_slider_$track",e),t.data("_slider_$fill",n),t.data("_slider_$thumb",i),t.data("_slider_$input",o),t.data("_slider_min",o.attr("min")),t.data("_slider_max",o.attr("max")),t.data("_slider_disabled",s),t.data("_slider_discrete",r),t.data("_slider_$thumbText",a),Wt(t)}L(function(){yt.on("input focus blur",".mdui-textfield-input",{useCapture:!0},qt),yt.on("click",".mdui-textfield-expandable .mdui-textfield-icon",function(){L(this).parents(".mdui-textfield").addClass("mdui-textfield-expanded").find(".mdui-textfield-input")[0].focus()}),yt.on("click",".mdui-textfield-expanded .mdui-textfield-close",function(){L(this).parents(".mdui-textfield").removeClass("mdui-textfield-expanded").find(".mdui-textfield-input").val("")}),B.mutation(".mdui-textfield",function(){L(this).find(".mdui-textfield-input").trigger("input",{domLoadedEvent:!0})})}),B.updateTextFields=function(t){(O(t)?L(".mdui-textfield"):L(t)).each(function(t,e){L(e).find(".mdui-textfield-input").trigger("input",{reInit:!0})})};var Ut='.mdui-slider input[type="range"]';L(function(){yt.on("input change",Ut,function(){Wt(L(this).parent())}),yt.on(jt,Ut,function(t){Lt(t)&&(Bt(t),this.disabled||L(this).parent().addClass("mdui-slider-focus"))}),yt.on(At,Ut,function(t){Lt(t)&&(this.disabled||L(this).parent().removeClass("mdui-slider-focus"))}),yt.on(Rt,Ut,Bt),B.mutation(".mdui-slider",function(){Yt(L(this))})}),B.updateSliders=function(t){(O(t)?L(".mdui-slider"):L(t)).each(function(t,e){Yt(L(e))})};function Xt(t,e){var n=this;void 0===e&&(e={}),this.options=X({},Vt),this.state="closed",this.$element=L(t).first(),X(this.options,e),this.$btn=this.$element.find(".mdui-fab"),this.$dial=this.$element.find(".mdui-fab-dial"),this.$dialBtns=this.$dial.find(".mdui-fab"),"hover"===this.options.trigger&&(this.$btn.on("touchstart mouseenter",function(){return n.open()}),this.$element.on("mouseleave",function(){return n.close()})),"click"===this.options.trigger&&this.$btn.on(jt,function(){return n.open()}),yt.on(jt,function(t){L(t.target).parents(".mdui-fab-wrapper").length||n.close()})}var Vt={trigger:"hover"};Xt.prototype.triggerEvent=function(t){vt(t,"fab",this.$element,this)},Xt.prototype.isOpen=function(){return"opening"===this.state||"opened"===this.state},Xt.prototype.open=function(){var i=this;this.isOpen()||(this.$dialBtns.each(function(t,e){var n=15*(i.$dialBtns.length-t)+"ms";e.style.transitionDelay=n,e.style.webkitTransitionDelay=n}),this.$dial.css("height","auto").addClass("mdui-fab-dial-show"),this.$btn.find(".mdui-fab-opened").length&&this.$btn.addClass("mdui-fab-opened"),this.state="opening",this.triggerEvent("open"),this.$dialBtns.first().transitionEnd(function(){i.$btn.hasClass("mdui-fab-opened")&&(i.state="opened",i.triggerEvent("opened"))}))},Xt.prototype.close=function(){var t=this;this.isOpen()&&(this.$dialBtns.each(function(t,e){var n=15*t+"ms";e.style.transitionDelay=n,e.style.webkitTransitionDelay=n}),this.$dial.removeClass("mdui-fab-dial-show"),this.$btn.removeClass("mdui-fab-opened"),this.state="closing",this.triggerEvent("close"),this.$dialBtns.last().transitionEnd(function(){t.$btn.hasClass("mdui-fab-opened")||(t.state="closed",t.triggerEvent("closed"),t.$dial.css("height",0))}))},Xt.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Xt.prototype.show=function(){this.$element.removeClass("mdui-fab-hide")},Xt.prototype.hide=function(){this.$element.addClass("mdui-fab-hide")},Xt.prototype.getState=function(){return this.state},B.Fab=Xt;var Jt="mdui-fab";L(function(){yt.on("touchstart mousedown mouseover","["+Jt+"]",function(){new B.Fab(this,Ct(this,Jt))})});function Kt(t,e){var n=this;void 0===e&&(e={}),this.$element=L(),this.options=X({},Gt),this.size=0,this.$selected=L(),this.$menu=L(),this.$items=L(),this.selectedIndex=0,this.selectedText="",this.selectedValue="",this.state="closed",this.$native=L(t).first(),this.$native.hide(),X(this.options,e),this.uniqueID=L.guid(),this.handleUpdate(),yt.on("click touchstart",function(t){var e=L(t.target);!n.isOpen()||e.is(n.$element)||P(n.$element[0],e[0])||n.close()})}var Gt={position:"auto",gutter:16};Kt.prototype.readjustMenu=function(){var t,e,n=bt.height(),i=this.$element.height(),o=this.$items.first(),s=o.height(),r=parseInt(o.css("margin-top")),a=this.$element.innerWidth()+.01,u=s*this.size+2*r,c=this.$element[0].getBoundingClientRect().top;if("bottom"===this.options.position)e=i,t="0px";else if("top"===this.options.position)e=-u-1,t="100%";else{var l=n-2*this.options.gutter;ln&&(e=-(c+u+this.options.gutter-n)),t=this.selectedIndex*s+s/2+r+"px"}this.$element.innerWidth(a),this.$menu.innerWidth(a).height(u).css({"margin-top":e+"px","transform-origin":"center "+t+" 0"})},Kt.prototype.isOpen=function(){return"opening"===this.state||"opened"===this.state},Kt.prototype.handleUpdate=function(){var r=this;this.isOpen()&&this.close(),this.selectedValue=this.$native.val();var a=[];this.$items=L(),this.$native.find("option").each(function(t,e){var n=e.textContent||"",i=e.value,o=e.disabled,s=r.selectedValue===i;a.push({value:i,text:n,disabled:o,selected:s,index:t}),s&&(r.selectedText=n,r.selectedIndex=t),r.$items=r.$items.add('
"+n+"
")}),this.$selected=L(''+this.selectedText+""),this.$element=L('
').show().append(this.$selected),this.$menu=L('
').appendTo(this.$element).append(this.$items),L("#"+this.uniqueID).remove(),this.$native.after(this.$element),this.size=parseInt(this.$native.attr("size")||"0"),this.size<=0&&(this.size=this.$items.length,8').appendTo(this.$element);var i=window.location.hash;i&&this.$tabs.each(function(t,e){return L(e).attr("href")!==i||(n.activeIndex=t,!1)}),-1===this.activeIndex&&this.$tabs.each(function(t,e){return!L(e).hasClass("mdui-tab-active")||(n.activeIndex=t,!1)}),this.$tabs.length&&-1===this.activeIndex&&(this.activeIndex=0),this.setActive(),bt.on("resize",L.throttle(function(){return n.setIndicatorPosition()},100)),this.$tabs.each(function(t,e){n.bindTabEvent(e)})}var te={trigger:"click",loop:!1};Zt.prototype.isDisabled=function(t){return void 0!==t.attr("disabled")},Zt.prototype.bindTabEvent=function(t){function e(){if(n.isDisabled(i))return!1;n.activeIndex=n.$tabs.index(t),n.setActive()}var n=this,i=L(t);i.on("click",e),"hover"===this.options.trigger&&i.on("mouseenter",e),i.on("click",function(){if(0===(i.attr("href")||"").indexOf("#"))return!1})},Zt.prototype.triggerEvent=function(t,e,n){void 0===n&&(n={}),vt(t,"tab",e,this,n)},Zt.prototype.setActive=function(){var o=this;this.$tabs.each(function(t,e){var n=L(e),i=n.attr("href")||"";t!==o.activeIndex||o.isDisabled(n)?(n.removeClass("mdui-tab-active"),L(i).hide()):(n.hasClass("mdui-tab-active")||(o.triggerEvent("change",o.$element,{index:o.activeIndex,id:i.substr(1)}),o.triggerEvent("show",n),n.addClass("mdui-tab-active")),L(i).show(),o.setIndicatorPosition())})},Zt.prototype.setIndicatorPosition=function(){if(-1!==this.activeIndex){var t=this.$tabs.eq(this.activeIndex);if(!this.isDisabled(t)){var e=t.offset();this.$indicator.css({left:e.left+this.$element[0].scrollLeft-this.$element[0].getBoundingClientRect().left+"px",width:t.innerWidth()+"px"})}}else this.$indicator.css({left:0,width:0})},Zt.prototype.next=function(){-1!==this.activeIndex&&(this.$tabs.length>this.activeIndex+1?this.activeIndex++:this.options.loop&&(this.activeIndex=0),this.setActive())},Zt.prototype.prev=function(){-1!==this.activeIndex&&(0',D(n.buttons,function(t,e){i+=''+e.text+""}),i+="");var o='
'+(n.title?'
'+n.title+"
":"")+(n.content?'
'+n.content+"
":"")+i+"
",s=new B.Dialog(o,{history:n.history,overlay:n.overlay,modal:n.modal,closeOnEsc:n.closeOnEsc,destroyOnClosed:n.destroyOnClosed});return null!==(e=n.buttons)&&void 0!==e&&e.length&&s.$element.find(".mdui-dialog-actions .mdui-btn").each(function(t,e){L(e).on("click",function(){n.buttons[t].onClick(s),n.buttons[t].close&&s.close()})}),s.$element.on("open.mdui.dialog",function(){n.onOpen(s)}).on("opened.mdui.dialog",function(){n.onOpened(s)}).on("close.mdui.dialog",function(){n.onClose(s)}).on("closed.mdui.dialog",function(){n.onClosed(s)}),s.open(),s}),closeOnEsc:!0,closeOnConfirm:!0},be={confirmText:"ok",cancelText:"cancel",history:!0,modal:!(B.alert=function(t,e,n,i){return p(e)&&(i=n,n=e,e=""),O(n)&&(n=function(){}),O(i)&&(i={}),i=X({},ye,i),B.dialog({title:e,content:t,buttons:[{text:i.confirmText,bold:!1,close:i.closeOnConfirm,onClick:n}],cssClass:"mdui-dialog-alert",history:i.history,modal:i.modal,closeOnEsc:i.closeOnEsc})}),closeOnEsc:!0,closeOnCancel:!0,closeOnConfirm:!0},xe={confirmText:"ok",cancelText:"cancel",history:!0,modal:!(B.confirm=function(t,e,n,i,o){return p(e)&&(o=i,i=n,n=e,e=""),O(n)&&(n=function(){}),O(i)&&(i=function(){}),O(o)&&(o={}),o=X({},be,o),B.dialog({title:e,content:t,buttons:[{text:o.cancelText,bold:!1,close:o.closeOnCancel,onClick:i},{text:o.confirmText,bold:!1,close:o.closeOnConfirm,onClick:n}],cssClass:"mdui-dialog-confirm",history:o.history,modal:o.modal,closeOnEsc:o.closeOnEsc})}),closeOnEsc:!0,closeOnCancel:!0,closeOnConfirm:!0,type:"text",maxlength:0,defaultValue:"",confirmOnEnter:!1};B.prompt=function(t,e,i,n,o){p(e)&&(o=n,n=i,i=e,e=""),O(i)&&(i=function(){}),O(n)&&(n=function(){}),O(o)&&(o={});var s='
'+(t?'":"")+("text"===(o=X({},xe,o)).type?'":"")+("textarea"===o.type?'":"")+"
";return B.dialog({title:e,content:s,buttons:[{text:o.cancelText,bold:!1,close:o.closeOnCancel,onClick:function(t){var e=t.$element.find(".mdui-textfield-input").val();n(e,t)}},{text:o.confirmText,bold:!1,close:o.closeOnConfirm,onClick:function(t){var e=t.$element.find(".mdui-textfield-input").val();i(e,t)}}],cssClass:"mdui-dialog-prompt",history:o.history,modal:o.modal,closeOnEsc:o.closeOnEsc,onOpen:function(n){var t=n.$element.find(".mdui-textfield-input");B.updateTextFields(t),t[0].focus(),"textarea"!==o.type&&!0===o.confirmOnEnter&&t.on("keydown",function(t){if(13===t.keyCode){var e=n.$element.find(".mdui-textfield-input").val();return i(e,n),o.closeOnConfirm&&n.close(),!1}}),"textarea"===o.type&&t.on("input",function(){return n.handleUpdate()}),o.maxlength&&n.handleUpdate()}})};function Ce(t,e){void 0===e&&(e={}),this.options=X({},we),this.state="closed",this.timeoutId=null,this.$target=L(t).first(),X(this.options,e),this.$element=L('
'+this.options.content+"
").appendTo(document.body);var n=this;this.$target.on("touchstart mouseenter",function(t){n.isDisabled(this)||Lt(t)&&(Bt(t),n.open())}).on("touchend mouseleave",function(t){n.isDisabled(this)||Lt(t)&&n.close()}).on(Rt,function(t){n.isDisabled(this)||Bt(t)})}var we={position:"auto",delay:0,content:""};Ce.prototype.isDisabled=function(t){return t.disabled||void 0!==L(t).attr("disabled")},Ce.prototype.isDesktop=function(){return 1024
'+this.options.message+"
"+(this.options.buttonText?'"+this.options.buttonText+"":"")+"").appendTo(document.body),this.setPosition("close"),this.$element.reflow().addClass("mdui-snackbar-"+this.options.position)}var ke={message:"",timeout:4e3,position:"bottom",buttonText:"",buttonColor:"",closeOnButtonClick:!0,closeOnOutsideClick:!0,onClick:function(){},onButtonClick:function(){},onOpen:function(){},onOpened:function(){},onClose:function(){},onClosed:function(){}},_e=null,Te="_mdui_snackbar";function Ie(t){return void 0===t&&(t=!1),'
'}function Se(t){var e=L(t),n=e.hasClass("mdui-spinner-colorful")?Ie(1)+Ie(2)+Ie(3)+Ie(4):Ie();e.html(n)}Oe.prototype.closeOnOutsideClick=function(t){var e=L(t.target);e.hasClass("mdui-snackbar")||e.parents(".mdui-snackbar").length||_e.close()},Oe.prototype.setPosition=function(t){var e,n,i=this.$element[0].clientHeight,o=this.options.position;e="bottom"===o||"top"===o?"-50%":"0","open"===t?n="0":("bottom"===o&&(n=i),"top"===o&&(n=-i),"left-top"!==o&&"right-top"!==o||(n=-i-24),"left-bottom"!==o&&"right-bottom"!==o||(n=i+24)),this.$element.transform("translate("+e+","+n+"px")},Oe.prototype.open=function(){var e=this;"opening"!==this.state&&"opened"!==this.state&&(_e?re(Te,function(){return e.open()}):((_e=this).state="opening",this.options.onOpen(this),this.setPosition("open"),this.$element.transitionEnd(function(){"opening"===e.state&&(e.state="opened",e.options.onOpened(e),e.options.buttonText&&e.$element.find(".mdui-snackbar-action").on("click",function(){e.options.onButtonClick(e),e.options.closeOnButtonClick&&e.close()}),e.$element.on("click",function(t){L(t.target).hasClass("mdui-snackbar-action")||e.options.onClick(e)}),e.options.closeOnOutsideClick&&yt.on(jt,e.closeOnOutsideClick),e.options.timeout&&(e.timeoutId=setTimeout(function(){return e.close()},e.options.timeout)))})))},Oe.prototype.close=function(){var t=this;"closing"!==this.state&&"closed"!==this.state&&(this.timeoutId&&clearTimeout(this.timeoutId),this.options.closeOnOutsideClick&&yt.off(jt,this.closeOnOutsideClick),this.state="closing",this.options.onClose(this),this.setPosition("close"),this.$element.transitionEnd(function(){"closing"===t.state&&(_e=null,t.state="closed",t.options.onClosed(t),t.$element.remove(),ae(Te))}))},B.snackbar=function(t,e){void 0===e&&(e={}),E(t)?e.message=t:e=t;var n=new Oe(e);return n.open(),n},L(function(){yt.on("click",".mdui-bottom-nav>a",function(){var i=L(this),o=i.parent();o.children("a").each(function(t,e){var n=i.is(e);n&&vt("change","bottomNav",o[0],void 0,{index:t}),n?L(e).addClass("mdui-bottom-nav-active"):L(e).removeClass("mdui-bottom-nav-active")})}),B.mutation(".mdui-bottom-nav-scroll-hide",function(){new B.Headroom(this,{pinnedClass:"mdui-headroom-pinned-down",unpinnedClass:"mdui-headroom-unpinned-down"})})}),L(function(){B.mutation(".mdui-spinner",function(){Se(this)})});function je(t,e,n){var i=this;if(void 0===n&&(n={}),this.options=X({},Me),this.state="closed",this.$anchor=L(t).first(),this.$element=L(e).first(),!this.$anchor.parent().is(this.$element.parent()))throw new Error("anchorSelector and menuSelector must be siblings");X(this.options,n),this.isCascade=this.$element.hasClass("mdui-menu-cascade"),this.isCovered="auto"===this.options.covered?!this.isCascade:this.options.covered,this.$anchor.on("click",function(){return i.toggle()}),yt.on("click touchstart",function(t){var e=L(t.target);!i.isOpen()||e.is(i.$element)||P(i.$element[0],e[0])||e.is(i.$anchor)||P(i.$anchor[0],e[0])||i.close()});var o=this;yt.on("click",".mdui-menu-item",function(){var t=L(this);t.find(".mdui-menu").length||void 0!==t.attr("disabled")||o.close()}),this.bindSubMenuEvent(),bt.on("resize",L.throttle(function(){return i.readjust()},100))}var Me={position:"auto",align:"auto",gutter:16,fixed:!(B.updateSpinners=function(t){(O(t)?L(".mdui-spinner"):L(t)).each(function(){Se(this)})}),covered:"auto",subMenuTrigger:"hover",subMenuDelay:200};je.prototype.isOpen=function(){return"opening"===this.state||"opened"===this.state},je.prototype.triggerEvent=function(t){vt(t,"menu",this.$element,this)},je.prototype.readjust=function(){var t,e,n,i,o,s,r=bt.height(),a=bt.width(),u=this.options.gutter,c=this.isCovered,l=this.options.fixed,d=this.$element.width(),h=this.$element.height(),f=this.$anchor[0].getBoundingClientRect(),p=f.top,m=f.left,v=f.height,g=f.width,y=r-p-v,b=a-m-g,x=this.$anchor[0].offsetTop,C=this.$anchor[0].offsetLeft;if(n="auto"===this.options.position?h+u 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 设置 15 | 61 | 62 | 63 | 64 | 65 |
66 |
67 | 71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |

正在载入设置选项

88 |
89 |
90 |
91 |
92 |
93 |
    94 |
  • 95 |
    外链设置
    96 |
  • 97 |
  • 98 |
    水印设置
    99 |
  • 100 |
  • 101 |
    服务器设置
    102 |
  • 103 |
  • 104 |
    版本信息
    105 |
  • 106 |
107 |
108 |
109 |
110 |
111 |
112 |

服务器设置

113 |
114 |
115 |

程序默认打开为网页版飞书登录页面

116 |

如果公司使用的是特殊的飞书登录地址

117 |

请在下方设置程序启动页面为其他地址

118 |

119 |

设置完毕请手动重启应用

120 |
121 | 124 |
125 | 126 |
127 |
128 | 129 | 130 |
131 |
132 |

水印设置

133 |
134 |
135 | 142 |

143 |

打开后,将会显示飞书水印

144 |

设置完毕请手动重启应用

145 |
146 |
147 | 148 |
149 |
150 |

外链设置

151 |
152 |
153 |

此处可设置使用 electron 打开的链接, 每行设置一个链接

154 |

electron-lark 会对聊天记录当中打开的每个链接进行 indexOf 判断

155 |

如果 URL 包含下方中任意一行的内容,则在 electron 内打开

156 |

否则将在浏览器中打开

157 |

158 |

设置完毕请手动重启应用

159 |
160 | 164 |
165 |
166 |
167 | 168 |
169 |
170 |

版本信息

171 |
172 |
173 |

当前版本 : {{packageVersion}}

174 |
175 |

基于网页版飞书的简单套壳,代码粗糙,能用即可

176 |
177 |

项目地址: https://github.com/Ericwyn/electron-lark

178 |

可前往 Release 页面查看并下载最新版本

179 |
180 | 182 |

183 | 185 | 186 |
187 |
188 | 189 |
190 | 192 | 193 | 194 |
195 | 196 |
197 | 198 |
199 | 200 |
201 | 202 | 203 | 204 | 205 | 206 | 303 | 304 | -------------------------------------------------------------------------------- /src/windows/views/vue.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Vue.js v2.6.12 3 | * (c) 2014-2020 Evan You 4 | * Released under the MIT License. 5 | */ 6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;onon&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;iparseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.12";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML=""+o+"";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;ov?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^]+>/i,No=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;nc&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={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"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target !== $event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event && $event.button !== 0"),middle:Na("'button' in $event && $event.button !== 1"),right:Na("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r':'
',ts.innerHTML.indexOf(" ")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn}); --------------------------------------------------------------------------------