From 332bed3136d436bbdc2148b37185a0e6a8ef7934 Mon Sep 17 00:00:00 2001 From: Pang Date: Sat, 16 Dec 2023 23:01:19 +0800 Subject: [PATCH] build --- CHANGELOG.md | 4 +- package.json | 2 +- .../{404.b2fd5df8.js => 404.f3a5a7cb.js} | 2 +- ...itor.2ebeaef8.js => AceEditor.aa9651a2.js} | 2 +- ....37a8254a.js => ApproveExport.7b859f1c.js} | 2 +- ....ac86aa08.js => CheckinExport.566afd3f.js} | 2 +- ....5fcf71c2.js => DialogWrapper.54a1354f.js} | 6 +- ...{Drawio.32180b15.js => Drawio.98aed49e.js} | 2 +- ...nt.f5b3c8be.js => FileContent.49414140.js} | 2 +- ...ew.22c023a8.js => FilePreview.55c206d9.js} | 2 +- ...{IFrame.364b588a.js => IFrame.1fc38451.js} | 2 +- ...load.0e64a5a8.js => ImgUpload.8863e78d.js} | 2 +- ...76c2e240.js => MeetingManager.bf6d77cf.js} | 2 +- ...Apps.56fd4f5e.js => MicroApps.10c19f02.js} | 2 +- ...{Minder.37c15ccd.js => Minder.c159d06d.js} | 2 +- ...ice.3b8ff0fe.js => OnlyOffice.8a3b23b9.js} | 2 +- ...Log.d63fd8b4.js => ProjectLog.55720685.js} | 2 +- ...l.556c0891.js => ReportDetail.d9bb9dfa.js} | 2 +- ...dit.54eb60eb.js => ReportEdit.cc7cc71b.js} | 2 +- ...Editor.5f656e41.js => TEditor.8daabc3e.js} | 2 +- ...ail.3e00ee35.js => TaskDetail.3379e7b2.js} | 2 +- ...kMenu.a0d74239.js => TaskMenu.0454bb90.js} | 2 +- ...ect.d62f565b.js => UserSelect.1938cd94.js} | 2 +- .../{app.6c8b31b1.js => app.6910ca56.js} | 6 +- ...on.822f72e7.js => application.1fcd9820.js} | 2 +- .../{apps.e0c18804.js => apps.5dbb9dd1.js} | 2 +- ...fac8af.js => bn.interface.min.9376436e.js} | 2 +- ...{bn.min.2dc6411e.js => bn.min.03db7fc1.js} | 2 +- ...endar.b1746b7c.js => calendar.23380bdc.js} | 2 +- ...heckin.dbddec5e.js => checkin.9caf7776.js} | 2 +- ...oard.d6d0c216.js => dashboard.3f95cdc5.js} | 2 +- ...{delete.842d393e.js => delete.399f0038.js} | 2 +- ...etails.6749696e.js => details.97854344.js} | 2 +- ...n.cb2c4d59.js => elliptic.min.b3d8d4c2.js} | 2 +- .../{email.615b5786.js => email.a38b55d3.js} | 2 +- .../{file.0a3f0003.js => file.3dcec3eb.js} | 4 +- .../{file.6049f56f.js => file.7a934af0.js} | 2 +- ...ileMsg.3e945301.js => fileMsg.f47e5c3e.js} | 2 +- ...eTask.45d83527.js => fileTask.472d19ff.js} | 2 +- .../{index.76a95eea.js => index.197a221d.js} | 2 +- .../{index.dfa0fc84.js => index.568a7810.js} | 2 +- .../{index.8d4e26d2.js => index.62cf0925.js} | 2 +- .../{index.31386d23.js => index.8984a77c.js} | 2 +- .../{index.6bba8944.js => index.e3202dd6.js} | 2 +- ...board.2aabed93.js => keyboard.b40eff10.js} | 2 +- ...guage.24cda9c9.js => language.0e662f9b.js} | 2 +- ...icense.efaacf57.js => license.93e62e1f.js} | 2 +- .../{login.e56fbb44.js => login.d3d06d73.js} | 2 +- public/js/build/manage.8b64e6e6.js | 1 - public/js/build/manage.d657f726.js | 1 + ...eeting.a29351d2.js => meeting.0c7743f5.js} | 2 +- ...nger.f5205905.js => messenger.306bf130.js} | 2 +- ...sword.64696635.js => password.cfd6c864.js} | 2 +- ...sonal.590980db.js => personal.f12e3d14.js} | 2 +- public/js/build/preview.0ba2d7e4.js | 1 + public/js/build/preview.438bb1b4.js | 1 - .../{pro.e5312bee.js => pro.011c4bd5.js} | 2 +- ...roject.ff447f31.js => project.38fc5178.js} | 2 +- ....6d31f4f4.js => projectInvite.7958ccd4.js} | 2 +- ...l.142aead0.js => reportDetail.39c2af9e.js} | 2 +- ...dit.b7be9cde.js => reportEdit.e5acde07.js} | 2 +- .../{swipe.e89ae537.js => swipe.9a0bfd93.js} | 2 +- ...{system.90a495f1.js => system.0a762fda.js} | 2 +- .../{task.240d6dc5.js => task.bf95724d.js} | 2 +- .../{theme.bbb22618.js => theme.e86b5680.js} | 2 +- .../{tip.517649f6.js => tip.6872e3c6.js} | 2 +- .../{token.94f56172.js => token.71c3e093.js} | 2 +- ...ail.91adfa74.js => validEmail.72ecc0d2.js} | 2 +- .../{view.332e3be1.js => view.576fab2b.js} | 2 +- public/manifest.json | 336 +++++++++--------- 70 files changed, 242 insertions(+), 240 deletions(-) rename public/js/build/{404.b2fd5df8.js => 404.f3a5a7cb.js} (87%) rename public/js/build/{AceEditor.2ebeaef8.js => AceEditor.aa9651a2.js} (98%) rename public/js/build/{ApproveExport.37a8254a.js => ApproveExport.7b859f1c.js} (97%) rename public/js/build/{CheckinExport.ac86aa08.js => CheckinExport.566afd3f.js} (99%) rename public/js/build/{DialogWrapper.5fcf71c2.js => DialogWrapper.54a1354f.js} (98%) rename public/js/build/{Drawio.32180b15.js => Drawio.98aed49e.js} (93%) rename public/js/build/{FileContent.f5b3c8be.js => FileContent.49414140.js} (92%) rename public/js/build/{FilePreview.22c023a8.js => FilePreview.55c206d9.js} (73%) rename public/js/build/{IFrame.364b588a.js => IFrame.1fc38451.js} (94%) rename public/js/build/{ImgUpload.0e64a5a8.js => ImgUpload.8863e78d.js} (99%) rename public/js/build/{MeetingManager.76c2e240.js => MeetingManager.bf6d77cf.js} (99%) rename public/js/build/{MicroApps.56fd4f5e.js => MicroApps.10c19f02.js} (94%) rename public/js/build/{Minder.37c15ccd.js => Minder.c159d06d.js} (98%) rename public/js/build/{OnlyOffice.3b8ff0fe.js => OnlyOffice.8a3b23b9.js} (96%) rename public/js/build/{ProjectLog.d63fd8b4.js => ProjectLog.55720685.js} (98%) rename public/js/build/{ReportDetail.556c0891.js => ReportDetail.d9bb9dfa.js} (97%) rename public/js/build/{ReportEdit.54eb60eb.js => ReportEdit.cc7cc71b.js} (94%) rename public/js/build/{TEditor.5f656e41.js => TEditor.8daabc3e.js} (99%) rename public/js/build/{TaskDetail.3e00ee35.js => TaskDetail.3379e7b2.js} (99%) rename public/js/build/{TaskMenu.a0d74239.js => TaskMenu.0454bb90.js} (96%) rename public/js/build/{UserSelect.d62f565b.js => UserSelect.1938cd94.js} (99%) rename public/js/build/{app.6c8b31b1.js => app.6910ca56.js} (99%) rename public/js/build/{application.822f72e7.js => application.1fcd9820.js} (99%) rename public/js/build/{apps.e0c18804.js => apps.5dbb9dd1.js} (66%) rename public/js/build/{bn.interface.min.fafac8af.js => bn.interface.min.9376436e.js} (96%) rename public/js/build/{bn.min.2dc6411e.js => bn.min.03db7fc1.js} (99%) rename public/js/build/{calendar.b1746b7c.js => calendar.23380bdc.js} (99%) rename public/js/build/{checkin.dbddec5e.js => checkin.9caf7776.js} (99%) rename public/js/build/{dashboard.d6d0c216.js => dashboard.3f95cdc5.js} (97%) rename public/js/build/{delete.842d393e.js => delete.399f0038.js} (99%) rename public/js/build/{details.6749696e.js => details.97854344.js} (99%) rename public/js/build/{elliptic.min.cb2c4d59.js => elliptic.min.b3d8d4c2.js} (99%) rename public/js/build/{email.615b5786.js => email.a38b55d3.js} (98%) rename public/js/build/{file.0a3f0003.js => file.3dcec3eb.js} (99%) rename public/js/build/{file.6049f56f.js => file.7a934af0.js} (88%) rename public/js/build/{fileMsg.3e945301.js => fileMsg.f47e5c3e.js} (71%) rename public/js/build/{fileTask.45d83527.js => fileTask.472d19ff.js} (69%) rename public/js/build/{index.76a95eea.js => index.197a221d.js} (98%) rename public/js/build/{index.dfa0fc84.js => index.568a7810.js} (94%) rename public/js/build/{index.8d4e26d2.js => index.62cf0925.js} (99%) rename public/js/build/{index.31386d23.js => index.8984a77c.js} (98%) rename public/js/build/{index.6bba8944.js => index.e3202dd6.js} (99%) rename public/js/build/{keyboard.2aabed93.js => keyboard.b40eff10.js} (98%) rename public/js/build/{language.24cda9c9.js => language.0e662f9b.js} (95%) rename public/js/build/{license.efaacf57.js => license.93e62e1f.js} (98%) rename public/js/build/{login.e56fbb44.js => login.d3d06d73.js} (99%) delete mode 100644 public/js/build/manage.8b64e6e6.js create mode 100644 public/js/build/manage.d657f726.js rename public/js/build/{meeting.a29351d2.js => meeting.0c7743f5.js} (77%) rename public/js/build/{messenger.f5205905.js => messenger.306bf130.js} (98%) rename public/js/build/{password.64696635.js => password.cfd6c864.js} (97%) rename public/js/build/{personal.590980db.js => personal.f12e3d14.js} (96%) create mode 100644 public/js/build/preview.0ba2d7e4.js delete mode 100644 public/js/build/preview.438bb1b4.js rename public/js/build/{pro.e5312bee.js => pro.011c4bd5.js} (85%) rename public/js/build/{project.ff447f31.js => project.38fc5178.js} (99%) rename public/js/build/{projectInvite.6d31f4f4.js => projectInvite.7958ccd4.js} (97%) rename public/js/build/{reportDetail.142aead0.js => reportDetail.39c2af9e.js} (85%) rename public/js/build/{reportEdit.b7be9cde.js => reportEdit.e5acde07.js} (86%) rename public/js/build/{swipe.e89ae537.js => swipe.9a0bfd93.js} (99%) rename public/js/build/{system.90a495f1.js => system.0a762fda.js} (99%) rename public/js/build/{task.240d6dc5.js => task.bf95724d.js} (81%) rename public/js/build/{theme.bbb22618.js => theme.e86b5680.js} (96%) rename public/js/build/{tip.517649f6.js => tip.6872e3c6.js} (98%) rename public/js/build/{token.94f56172.js => token.71c3e093.js} (91%) rename public/js/build/{validEmail.91adfa74.js => validEmail.72ecc0d2.js} (95%) rename public/js/build/{view.332e3be1.js => view.576fab2b.js} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2d804785..e5fafab16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ All notable changes to this project will be documented in this file. -## [0.32.52] +## [0.32.55] ### Bug Fixes +- 聊天输入框内容为空时仍可以长安发送显示发送菜单 +- 文件页移动端滑动返回失败情况 - 会员头像显示错乱 ### Performance diff --git a/package.json b/package.json index ded6b4af8..41bb2ea3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DooTask", - "version": "0.32.52", + "version": "0.32.55", "description": "DooTask is task management system.", "scripts": { "start": "./cmd dev", diff --git a/public/js/build/404.b2fd5df8.js b/public/js/build/404.f3a5a7cb.js similarity index 87% rename from public/js/build/404.b2fd5df8.js rename to public/js/build/404.f3a5a7cb.js index 757e5881c..98cb66d73 100644 --- a/public/js/build/404.b2fd5df8.js +++ b/public/js/build/404.f3a5a7cb.js @@ -1 +1 @@ -import{n}from"./app.6c8b31b1.js";var r=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-404"},[s("div",{staticClass:"flex-center position-ref full-height"},[s("div",{staticClass:"code"},[e._v("404")]),s("div",{staticClass:"message"},[e._v("Not Found")])])])}];const i={},_={};var o=n(i,r,a,!1,c,"7d7154a8",null,null);function c(e){for(let t in _)this[t]=_[t]}var v=function(){return o.exports}();export{v as default}; +import{n}from"./app.6910ca56.js";var r=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-404"},[s("div",{staticClass:"flex-center position-ref full-height"},[s("div",{staticClass:"code"},[e._v("404")]),s("div",{staticClass:"message"},[e._v("Not Found")])])])}];const i={},_={};var o=n(i,r,a,!1,c,"7d7154a8",null,null);function c(e){for(let t in _)this[t]=_[t]}var v=function(){return o.exports}();export{v as default}; diff --git a/public/js/build/AceEditor.2ebeaef8.js b/public/js/build/AceEditor.aa9651a2.js similarity index 98% rename from public/js/build/AceEditor.2ebeaef8.js rename to public/js/build/AceEditor.aa9651a2.js index 0a9600895..4a17740c2 100644 --- a/public/js/build/AceEditor.2ebeaef8.js +++ b/public/js/build/AceEditor.aa9651a2.js @@ -1 +1 @@ -import{m as h,n as l}from"./app.6c8b31b1.js";const d={name:"AceEditor",props:{value:{default:""},options:{type:Object,default:()=>({})},theme:{type:String,default:"auto"},ext:{type:String,default:"txt"},height:{type:Number||null,default:null},width:{type:Number||null,default:null},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},render(e){return e("div",{class:"no-dark-content"})},data:()=>({code:"",editor:null,cursorPosition:{row:0,column:0},supportedModes:{Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],BatchFile:["bat|cmd"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],CSharp:["cs"],CSS:["css"],Dockerfile:["^Dockerfile"],golang:["go|golang"],HTML:["html|htm|xhtml|vue|we|wpy"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSP:["jsp"],LESS:["less"],Lua:["lua"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],MySQL:["mysql"],Nginx:["nginx|conf"],INI:["ini|conf|cfg|prefs"],ObjectiveC:["m|mm"],Perl:["pl|pm"],Perl6:["p6|pl6|pm6"],pgSQL:["pgsql"],PHP_Laravel_blade:["blade.php"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Powershell:["ps1"],Python:["py"],R:["r"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SQL:["sql"],SQLServer:["sqlserver"],Swift:["swift"],Text:["txt"],Typescript:["ts|typescript|str"],VBScript:["vbs|vb"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml|plist"],YAML:["yaml|yml"],Compress:["tar|zip|7z|rar|gz|arj|z"],images:["icon|jpg|jpeg|webp|png|bmp|gif|tif|emf"]}}),mounted(){$A.loadScriptS(["js/ace/ace.js","js/ace/mode-json.js"]).then(e=>{this.setSize(this.$el,{height:this.height,width:this.width}),this.editor=window.ace.edit(this.$el,{wrap:this.wrap,showPrintMargin:!1,readOnly:this.readOnly,keyboardHandler:"vscode"}),this.editor.session.setMode(`ace/mode/${this.getFileMode()}`),this.$emit("mounted",this.editor),this.editor.session.$worker&&this.editor.session.$worker.addEventListener("annotate",this.workerMessage,!1),this.setValue(this.value),this.editor.setOptions(this.options),this.editTheme&&this.editor.setTheme(`ace/theme/${this.editTheme}`),this.editor.commands.addCommand({name:"\u4FDD\u5B58\u6587\u4EF6",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{this.$emit("saveData")},readOnly:!1}),this.editor.getSession().on("change",()=>{this.code=this.editor.getValue(),this.$emit("input",this.code)})})},methods:{workerMessage({data:e}){this.cursorPosition=this.editor.selection.getCursor();const[t]=e;t&&t.type==="error"?this.$emit("validationFailed",t):this.$emit("change",this.editor.getValue())},setSize(e,{width:t=this.width,height:s=this.height}){e.style.width=t&&typeof t=="number"?`${t}px`:"100%",e.style.height=s&&typeof s=="number"?`${s}px`:"100%",this.$nextTick(()=>this.editor&&this.editor.resize())},setValue(e){typeof e=="string"&&this.editor&&(this.editor.setValue(e),this.editor.clearSelection())},getFileMode(){var e=this.ext||"text";for(var t in this.supportedModes)for(var s=this.supportedModes[t],r=s[0].split("|"),a=t.toLowerCase(),i=0;i({})},theme:{type:String,default:"auto"},ext:{type:String,default:"txt"},height:{type:Number||null,default:null},width:{type:Number||null,default:null},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},render(e){return e("div",{class:"no-dark-content"})},data:()=>({code:"",editor:null,cursorPosition:{row:0,column:0},supportedModes:{Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],BatchFile:["bat|cmd"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],CSharp:["cs"],CSS:["css"],Dockerfile:["^Dockerfile"],golang:["go|golang"],HTML:["html|htm|xhtml|vue|we|wpy"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSP:["jsp"],LESS:["less"],Lua:["lua"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],MySQL:["mysql"],Nginx:["nginx|conf"],INI:["ini|conf|cfg|prefs"],ObjectiveC:["m|mm"],Perl:["pl|pm"],Perl6:["p6|pl6|pm6"],pgSQL:["pgsql"],PHP_Laravel_blade:["blade.php"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Powershell:["ps1"],Python:["py"],R:["r"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SQL:["sql"],SQLServer:["sqlserver"],Swift:["swift"],Text:["txt"],Typescript:["ts|typescript|str"],VBScript:["vbs|vb"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml|plist"],YAML:["yaml|yml"],Compress:["tar|zip|7z|rar|gz|arj|z"],images:["icon|jpg|jpeg|webp|png|bmp|gif|tif|emf"]}}),mounted(){$A.loadScriptS(["js/ace/ace.js","js/ace/mode-json.js"]).then(e=>{this.setSize(this.$el,{height:this.height,width:this.width}),this.editor=window.ace.edit(this.$el,{wrap:this.wrap,showPrintMargin:!1,readOnly:this.readOnly,keyboardHandler:"vscode"}),this.editor.session.setMode(`ace/mode/${this.getFileMode()}`),this.$emit("mounted",this.editor),this.editor.session.$worker&&this.editor.session.$worker.addEventListener("annotate",this.workerMessage,!1),this.setValue(this.value),this.editor.setOptions(this.options),this.editTheme&&this.editor.setTheme(`ace/theme/${this.editTheme}`),this.editor.commands.addCommand({name:"\u4FDD\u5B58\u6587\u4EF6",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{this.$emit("saveData")},readOnly:!1}),this.editor.getSession().on("change",()=>{this.code=this.editor.getValue(),this.$emit("input",this.code)})})},methods:{workerMessage({data:e}){this.cursorPosition=this.editor.selection.getCursor();const[t]=e;t&&t.type==="error"?this.$emit("validationFailed",t):this.$emit("change",this.editor.getValue())},setSize(e,{width:t=this.width,height:s=this.height}){e.style.width=t&&typeof t=="number"?`${t}px`:"100%",e.style.height=s&&typeof s=="number"?`${s}px`:"100%",this.$nextTick(()=>this.editor&&this.editor.resize())},setValue(e){typeof e=="string"&&this.editor&&(this.editor.setValue(e),this.editor.clearSelection())},getFileMode(){var e=this.ext||"text";for(var t in this.supportedModes)for(var s=this.supportedModes[t],r=s[0].split("|"),a=t.toLowerCase(),i=0;i0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},i=[];const c={name:"ApproveExport",props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{proc_def_name:"",date:[],is_finished:"1"},procList:[]}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},getProcName(){this.loadIng++,this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:t})=>{this.procList=t.rows}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"approve/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},r={};var p=n(c,l,i,!1,d,null,null,null);function d(t){for(let o in r)this[o]=r[o]}var _=function(){return p.exports}();export{_ as A}; +import{n}from"./app.6910ca56.js";var l=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E"),"mask-closable":!1},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("Form",{ref:"exportTask",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BA1\u6279\u7C7B\u578B")}},[e("Select",{on:{"on-open-change":t.getProcName},model:{value:t.formData.proc_def_name,callback:function(a){t.$set(t.formData,"proc_def_name",a)},expression:"formData.proc_def_name"}},t._l(t.procList,function(a,s){return e("Option",{key:s,attrs:{value:a.name}},[t._v(t._s(a.name))])}),1)],1),e("FormItem",{attrs:{label:t.$L("\u65F6\u95F4\u8303\u56F4")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.formData.date,callback:function(a){t.$set(t.formData,"date",a)},expression:"formData.date"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{prop:"type",label:t.$L("\u5BFC\u51FA\u7C7B\u578B")}},[e("RadioGroup",{model:{value:t.formData.is_finished,callback:function(a){t.$set(t.formData,"is_finished",a)},expression:"formData.is_finished"}},[e("Radio",{attrs:{label:"0"}},[t._v(t._s(t.$L("\u672A\u5B8C\u6210")))]),e("Radio",{attrs:{label:"1"}},[t._v(t._s(t.$L("\u5DF2\u5B8C\u6210")))])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},i=[];const c={name:"ApproveExport",props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{proc_def_name:"",date:[],is_finished:"1"},procList:[]}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},getProcName(){this.loadIng++,this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:t})=>{this.procList=t.rows}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"approve/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},r={};var p=n(c,l,i,!1,d,null,null,null);function d(t){for(let o in r)this[o]=r[o]}var _=function(){return p.exports}();export{_ as A}; diff --git a/public/js/build/CheckinExport.ac86aa08.js b/public/js/build/CheckinExport.566afd3f.js similarity index 99% rename from public/js/build/CheckinExport.ac86aa08.js rename to public/js/build/CheckinExport.566afd3f.js index 5dd05095b..38cc45c1c 100644 --- a/public/js/build/CheckinExport.ac86aa08.js +++ b/public/js/build/CheckinExport.566afd3f.js @@ -1 +1 @@ -import{U as m}from"./UserSelect.d62f565b.js";import{U as h}from"./tip.517649f6.js";import{n as r,m as v}from"./app.6c8b31b1.js";import{R as _}from"./ReportEdit.54eb60eb.js";import{R as $}from"./ReportDetail.556c0891.js";import{D as f}from"./index.31386d23.js";var g=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"team-management"},[e("div",{staticClass:"management-title"},[t._v(" "+t._s(t.$L("\u56E2\u961F\u7BA1\u7406"))+" "),e("div",{staticClass:"title-zoom",on:{click:function(a){t.minBox=!t.minBox}}},[t.minBox?e("i",{staticClass:"taskfont"},[t._v("\uE7D4")]):e("i",{staticClass:"taskfont"},[t._v("\uE7D3")])]),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"management-box",class:{"min-box":t.minBox}},[e("div",{staticClass:"management-department"},[e("ul",[e("li",{class:["level-1",t.departmentSelect===0?"active":""],on:{click:function(a){return t.onSelectDepartment(0)}}},[e("i",{staticClass:"taskfont department-icon"},[t._v("\uE766")]),e("div",{staticClass:"department-title"},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(a){a.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"add_0"}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])])],1)],1)],1),t._l(t.departmentList,function(a){return e("li",{key:a.id,class:[`level-${a.level}`,t.departmentSelect===a.id?"active":""],on:{click:function(i){return t.onSelectDepartment(a.id)}}},[e("UserAvatarTip",{staticClass:"department-icon",attrs:{userid:a.owner_userid,size:20}},[e("p",[e("strong",[t._v(t._s(t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")))])])]),e("div",{staticClass:"department-title"},[t._v(t._s(a.name))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(i){i.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a.level<=2?e("EDropdownItem",{attrs:{command:`add_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])]):t._e(),e("EDropdownItem",{attrs:{command:`edit_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u7F16\u8F91")))])]),e("EDropdownItem",{attrs:{command:`del_${a.id}`}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u5220\u9664")))])])],1)],1)],1)})],2),e("div",{staticClass:"department-buttons"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(a){return t.onShowDepartment(null)}}},[t._v(t._s(t.$L("\u65B0\u5EFA\u90E8\u95E8")))])],1)]),e("div",{staticClass:"management-user",style:t.userStyle},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("\u90AE\u7BB1\u3001\u6635\u79F0\u3001\u804C\u4F4D"),clearable:""},model:{value:t.keys.key,callback:function(a){t.$set(t.keys,"key",a)},expression:"keys.key"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u8EAB\u4EFD"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.identity,callback:function(a){t.$set(t.keys,"identity",a)},expression:"keys.identity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"noadmin"}},[t._v(t._s(t.$L("\u975E\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"temp"}},[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7")))]),e("Option",{attrs:{value:"notemp"}},[t._v(t._s(t.$L("\u975E\u4E34\u65F6\u5E10\u53F7")))])],1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5728\u804C\u72B6\u6001"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5728\u804C")},model:{value:t.keys.disable,callback:function(a){t.$set(t.keys,"disable",a)},expression:"keys.disable"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5728\u804C")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u79BB\u804C")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8")))])],1)],1)]),t.checkinMac?e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("MAC\u5730\u5740"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("MAC\u5730\u5740"),clearable:""},model:{value:t.keys.checkin_mac,callback:function(a){t.$set(t.keys,"checkin_mac",a)},expression:"keys.checkin_mac"}})],1)]):e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u90AE\u7BB1\u8BA4\u8BC1"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.email_verity,callback:function(a){t.$set(t.keys,"email_verity",a)},expression:"keys.email_verity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u5DF2\u90AE\u7BB1\u8BA4\u8BC1")))]),e("Option",{attrs:{value:"no"}},[t._v(t._s(t.$L("\u672A\u90AE\u7BB1\u8BA4\u8BC1")))])],1)],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])]),e("Modal",{attrs:{title:t.$L(t.departmentData.id>0?"\u4FEE\u6539\u90E8\u95E8":"\u65B0\u5EFA\u90E8\u95E8"),"mask-closable":!1},model:{value:t.departmentShow,callback:function(a){t.departmentShow=a},expression:"departmentShow"}},[e("Form",{ref:"addProject",attrs:{model:t.departmentData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u90E8\u95E8\u540D\u79F0")}},[e("Input",{attrs:{type:"text",placeholder:t.$L("\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0")},model:{value:t.departmentData.name,callback:function(a){t.$set(t.departmentData,"name",a)},expression:"departmentData.name"}})],1),e("FormItem",{attrs:{prop:"parent_id",label:t.$L("\u4E0A\u7EA7\u90E8\u95E8")}},[e("Select",{attrs:{disabled:t.departmentParentDisabled,placeholder:t.$L("\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8")},model:{value:t.departmentData.parent_id,callback:function(a){t.$set(t.departmentData,"parent_id",a)},expression:"departmentData.parent_id"}},[e("Option",{attrs:{value:0}},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),t._l(t.departmentList,function(a,i){return a.parent_id==0&&a.id!=t.departmentData.id?e("Option",{key:i,attrs:{value:a.id,label:a.name}},[t._v("\xA0\xA0\xA0\xA0"+t._s(a.name))]):t._e()})],2),t.departmentParentDisabled?e("div",{staticClass:"form-tip",staticStyle:{"margin-bottom":"-16px"}},[t._v(t._s(t.$L("\u542B\u6709\u5B50\u90E8\u95E8\u65E0\u6CD5\u4FEE\u6539\u4E0A\u7EA7\u90E8\u95E8")))]):t._e()],1),e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"multiple-max":1,title:t.$L("\u8BF7\u9009\u62E9\u90E8\u95E8\u8D1F\u8D23\u4EBA")},model:{value:t.departmentData.owner_userid,callback:function(a){t.$set(t.departmentData,"owner_userid",a)},expression:"departmentData.owner_userid"}})],1),t.departmentData.id==0?[e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))]),e("FormItem",{attrs:{prop:"dialog_group",label:t.$L("\u90E8\u95E8\u7FA4\u804A")}},[e("RadioGroup",{model:{value:t.departmentData.dialog_group,callback:function(a){t.$set(t.departmentData,"dialog_group",a)},expression:"departmentData.dialog_group"}},[e("Radio",{attrs:{label:"new"}},[t._v(t._s(t.$L("\u521B\u5EFA\u90E8\u95E8\u7FA4")))]),e("Radio",{attrs:{label:"use"}},[t._v(t._s(t.$L("\u4F7F\u7528\u73B0\u6709\u7FA4")))])],1)],1),t.departmentData.dialog_group==="use"?e("FormItem",{attrs:{prop:"dialog_useid",label:t.$L("\u9009\u62E9\u7FA4\u7EC4")}},[e("Select",{attrs:{filterable:"","remote-method":t.dialogRemote,placeholder:t.$L("\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22\u7FA4"),loading:t.dialogLoad},model:{value:t.departmentData.dialog_useid,callback:function(a){t.$set(t.departmentData,"dialog_useid",a)},expression:"departmentData.dialog_useid"}},t._l(t.dialogList,function(a,i){return e("Option",{key:i,attrs:{value:a.id,label:a.name}},[e("div",{staticClass:"team-department-add-dialog-group"},[e("div",{staticClass:"dialog-name"},[t._v(t._s(a.name))]),e("UserAvatar",{attrs:{userid:a.owner_id,size:20}})],1)])}),1),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EC5\u652F\u6301\u9009\u62E9\u4E2A\u4EBA\u7FA4\u8F6C\u4E3A\u90E8\u95E8\u7FA4")))])],1):t._e()]:t._e()],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentLoading>0},on:{click:t.onSaveDepartment}},[t._v(t._s(t.$L(t.departmentData.id>0?"\u4FDD\u5B58":"\u65B0\u5EFA")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u7B7E\u5230MAC\u5730\u5740")},model:{value:t.checkinMacEditShow,callback:function(a){t.checkinMacEditShow=a},expression:"checkinMacEditShow"}},[e("Form",{attrs:{model:t.checkinMacEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.checkinMacEditData.userid}\uFF0C${t.checkinMacEditData.nickname}\u3011MAC\u5730\u5740\u4FEE\u6539\u3002`)))]),e("Row",{staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u8BBE\u5907MAC\u5730\u5740")))]),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u5907\u6CE8")))])],1),t._l(t.checkinMacEditData.checkin_macs,function(a,i){return e("Row",{key:i,staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8BBE\u5907MAC\u5730\u5740"),clearable:""},on:{"on-clear":function(n){return t.delCheckinDatum(i)}},model:{value:a.mac,callback:function(n){t.$set(a,"mac",n)},expression:"item.mac"}})],1),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("\u5907\u6CE8")},model:{value:a.remark,callback:function(n){t.$set(a,"remark",n)},expression:"item.remark"}})],1)],1)}),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addCheckinDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u8BBE\u5907")))])],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.checkinMacEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.checkinMacEditLoading>0},on:{click:function(a){return t.operationUser(t.checkinMacEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u90E8\u95E8")},model:{value:t.departmentEditShow,callback:function(a){t.departmentEditShow=a},expression:"departmentEditShow"}},[e("Form",{attrs:{model:t.departmentEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.departmentEditData.userid}\uFF0C${t.departmentEditData.nickname}\u3011\u90E8\u95E8\u4FEE\u6539\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u4FEE\u6539\u90E8\u95E8")}},[e("Select",{attrs:{multiple:"","multiple-max":10,placeholder:t.$L("\u7559\u7A7A\u4E3A\u9ED8\u8BA4\u90E8\u95E8")},model:{value:t.departmentEditData.department,callback:function(a){t.$set(t.departmentEditData,"department",a)},expression:"departmentEditData.department"}},t._l(t.departmentList,function(a,i){return e("Option",{key:i,attrs:{value:a.id}},[t._v(t._s(a.name))])}),1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentEditLoading>0},on:{click:function(a){return t.operationUser(t.departmentEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u64CD\u4F5C\u79BB\u804C")},model:{value:t.disableShow,callback:function(a){t.disableShow=a},expression:"disableShow"}},[e("Form",{attrs:{model:t.disableData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.disableData.userid}\uFF0C${t.disableData.nickname}\u3011\u79BB\u804C\u64CD\u4F5C\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u79BB\u804C\u65F6\u95F4")}},[e("DatePicker",{ref:"disableTime",staticStyle:{width:"100%"},attrs:{editable:!1,placeholder:t.$L("\u9009\u62E9\u79BB\u804C\u65F6\u95F4"),options:t.disableOptions,format:"yyyy/MM/dd HH:mm",type:"datetime"},model:{value:t.disableData.disable_time,callback:function(a){t.$set(t.disableData,"disable_time",a)},expression:"disableData.disable_time"}})],1),e("FormItem",{attrs:{label:t.$L("\u4EA4\u63A5\u4EBA")}},[e("UserSelect",{attrs:{"disabled-choice":[t.disableData.userid],"multiple-max":1,title:t.$L("\u9009\u62E9\u4EA4\u63A5\u4EBA")},model:{value:t.disableData.transfer_userid,callback:function(a){t.$set(t.disableData,"transfer_userid",a)},expression:"disableData.transfer_userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`${t.disableData.nickname} \u8D1F\u8D23\u7684\u90E8\u95E8\u3001\u9879\u76EE\u3001\u4EFB\u52A1\u548C\u6587\u4EF6\u5C06\u79FB\u4EA4\u7ED9\u4EA4\u63A5\u4EBA\uFF1B\u540C\u65F6\u9000\u51FA\u6240\u6709\u7FA4\uFF08\u5982\u679C\u662F\u7FA4\u4E3B\u5219\u8F6C\u8BA9\u7ED9\u4EA4\u63A5\u4EBA\uFF09`)))])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.disableShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(a){return t.operationUser(t.disableData,!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[t._v(t._s(t.$L("\u6CE8\u610F\uFF1A\u79BB\u804C\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF01")))])]),e("Button",{attrs:{type:"primary",loading:t.disableLoading>0}},[t._v(t._s(t.$L("\u786E\u5B9A\u79BB\u804C")))])],1)],1)],1)],1)},k=[];const y={name:"TeamManagement",components:{UserAvatarTip:h,UserSelect:m},props:{checkinMac:{type:Boolean,default:!1}},data(){return{loadIng:0,minBox:!1,minWidth:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"userid",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.userid)])},{title:this.$L("\u90AE\u7BB1"),key:"email",minWidth:160,render:(t,{row:s})=>{const e=[t("AutoTip",s.email)],{email_verity:a,identity:i,disable_at:n,is_principal:u}=s;return a&&e.push(t("Icon",{props:{type:"md-mail"}})),u&&e.push(t("Tag",{props:{color:"blue"}},this.$L("\u8D1F\u8D23\u4EBA"))),i.includes("ldap")&&e.push(t("Tag",{props:{color:"orange"}},"LDAP")),i.includes("admin")&&e.push(t("Tag",{props:{color:"warning"}},this.$L("\u7BA1\u7406\u5458"))),i.includes("temp")&&e.push(t("Tag",{props:{color:"success"}},this.$L("\u4E34\u65F6"))),i.includes("disable")&&e.push(t("Tooltip",{props:{content:this.$L("\u79BB\u804C\u65F6\u95F4")+": "+n}},[t("Tag",{props:{color:"error"}},this.$L("\u79BB\u804C"))])),t("div",{class:"team-email"},e)}},{title:this.$L("\u7535\u8BDD"),key:"tel",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.tel},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,tel:e},!0).finally(a)}}},[t("AutoTip",s.tel||"-")])},{title:this.$L("\u6635\u79F0"),key:"nickname",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.nickname_original},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,nickname:e},!0).finally(a)}}},[t("AutoTip",s.nickname_original||"-")])},{title:this.$L("\u804C\u4F4D/\u804C\u79F0"),key:"profession",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.profession},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,profession:e},!0).finally(a)}}},[t("AutoTip",s.profession||"-")])},{title:this.$L("\u90E8\u95E8"),key:"department",minWidth:80,render:(t,{row:s})=>{let e=[];if(s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.name)}),e.length===0)return t("div",this.$L("\u9ED8\u8BA4\u90E8\u95E8"));{const a=[];return a.push(t("span",{domProps:{title:e[0]}},e[0])),e.length>1&&(e=e.splice(1),a.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},a)}}},{title:this.$L("\u6700\u540E\u5728\u7EBF"),key:"line_at",width:168},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=s.row.identity,a=[];e.includes("admin")?a.push(t("EDropdownItem",{props:{command:"clearadmin"}},[t("div",this.$L("\u53D6\u6D88\u7BA1\u7406\u5458"))])):a.push(t("EDropdownItem",{props:{command:"setadmin"}},[t("div",this.$L("\u8BBE\u4E3A\u7BA1\u7406\u5458"))])),e.includes("temp")?a.push(t("EDropdownItem",{props:{command:"cleartemp"}},[t("div",this.$L("\u53D6\u6D88\u4E34\u65F6\u8EAB\u4EFD"))])):a.push(t("EDropdownItem",{props:{command:"settemp"}},[t("div",this.$L("\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7"))])),a.push(t("EDropdownItem",{props:{command:"email"}},[t("div",this.$L("\u4FEE\u6539\u90AE\u7BB1"))])),a.push(t("EDropdownItem",{props:{command:"password"}},[t("div",this.$L("\u4FEE\u6539\u5BC6\u7801"))])),this.checkinMac&&a.push(t("EDropdownItem",{props:{command:"checkin_mac"}},[t("div",this.$L("\u4FEE\u6539MAC"))])),a.push(t("EDropdownItem",{props:{command:"department"}},[t("div",this.$L("\u4FEE\u6539\u90E8\u95E8"))])),e.includes("disable")?a.push(t("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[t("div",this.$L("\u6062\u590D\u5E10\u53F7\uFF08\u5DF2\u79BB\u804C\uFF09"))])):a.push(t("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[t("div",this.$L("\u64CD\u4F5C\u79BB\u804C"))])),a.push(t("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[t("div",this.$L("\u5220\u9664"))]));const i=t("EDropdown",{props:{size:"small",trigger:"click"},on:{command:n=>{this.dropUser(n,s.row)}}},[t("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},this.$L("\u64CD\u4F5C")),t("EDropdownMenu",{slot:"dropdown"},[a])]);return t("TableAction",{props:{column:s.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:"12:00",value(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"17:00",value(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"18:00",value(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"19:00",value(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("\u73B0\u5728"),value(){return new Date},onClick:t=>{t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC\u5730\u5740"),key:"checkin_mac",minWidth:80,render:(t,{row:s})=>{let e=$A.cloneJSON(s.checkin_macs||[]);if(e.length===0)return t("div","-");{const a=n=>n.remark?`${n.mac} (${n.remark})`:n.mac,i=[];return i.push(t("AutoTip",a(e[0]))),e.length>1&&(e=e.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.map(n=>a(n)).join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},i)}}})},mounted(){this.getLists(),this.getDepartmentLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))},departmentSelect(){this.setPage(1)},windowPortrait:{handler(t){this.minBox=t},immediate:!0},minBox:{handler(){this.$nextTick(t=>{this.$el&&this.$el.clientWidth>0&&(this.minWidth=this.$el.clientWidth)})},immediate:!0}},computed:{departmentParentDisabled(){return!!(this.departmentData.id>0&&this.departmentList.find(({parent_id:t})=>t==this.departmentData.id))},userStyle({minWidth:t,windowPortrait:s}){const e={};return t>0&&s&&(e.minWidth=t-40+"px"),e}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="";let t=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(t=Object.assign(t,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:t,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:s})=>{this.page=s.current_page,this.total=s.total,this.list=s.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6210\u5458"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(s=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},dropUser(t,s){switch(t){case"settemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u5C06\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7\u5417\uFF1F\uFF08\u6CE8\uFF1A\u4E34\u65F6\u5E10\u53F7\u9650\u5236\u8BF7\u67E5\u770B\u7CFB\u7EDF\u8BBE\u7F6E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"cleartemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u53D6\u6D88\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u4E34\u65F6\u8EAB\u4EFD\u5417\uFF1F`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"email":$A.modalInput({title:"\u4FEE\u6539\u90AE\u7BB1",placeholder:`\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\uFF08${s.email}\uFF09`,onOk:a=>a?this.operationUser({userid:s.userid,email:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\u5730\u5740"});break;case"password":$A.modalInput({title:"\u4FEE\u6539\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801",onOk:a=>a?this.operationUser({userid:s.userid,password:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801"});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:s.userid,nickname:s.nickname,checkin_macs:s.checkin_macs},this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":let e=[];s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.owner_userid===s.userid?`${i.name} (${this.$L("\u8D1F\u8D23\u4EBA")})`:i.name)}),this.departmentEditData={type:"department",userid:s.userid,nickname:s.nickname,department:s.department.map(a=>parseInt(a))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:s.userid,nickname:s.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6062\u590D\u5DF2\u79BB\u804C\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u5417\uFF1F\uFF08\u6CE8\uFF1A\u6B64\u64CD\u4F5C\u4EC5\u6062\u590D\u5E10\u53F7\u72B6\u6001\uFF0C\u65E0\u6CD5\u6062\u590D\u64CD\u4F5C\u79BB\u804C\u65F6\u79FB\u4EA4\u7684\u6570\u636E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"delete":$A.modalInput({title:`\u5220\u9664\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011`,placeholder:"\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0",okText:"\u786E\u5B9A\u5220\u9664",onOk:a=>a?this.operationUser({userid:s.userid,type:t,delete_reason:a}):"\u5220\u9664\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});break;default:this.operationUser({userid:s.userid,type:t},!0);break}},operationUser(t,s){return new Promise((e,a)=>{t.type=="checkin_macs"?this.checkinMacEditLoading++:t.type=="department"?this.departmentEditLoading++:t.type=="setdisable"?this.disableLoading++:this.loadIng++,this.$store.dispatch("call",{url:"users/operation",data:t}).then(({msg:i})=>{$A.messageSuccess(i),this.getLists(),e(),t.type=="checkin_macs"?this.checkinMacEditShow=!1:t.type=="department"?this.departmentEditShow=!1:t.type=="setdisable"&&(this.disableShow=!1)}).catch(({msg:i})=>{s===!0&&$A.modalError(i),this.getLists(),a(i)}).finally(i=>{t.type=="checkin_macs"?this.checkinMacEditLoading--:t.type=="department"?this.departmentEditLoading--:t.type=="setdisable"?this.disableLoading--:this.loadIng--})})},getDepartmentLists(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then(({data:t})=>{this.departmentList=[],this.generateDepartmentList(t,0,1)}).finally(t=>{this.departmentLoading--})},generateDepartmentList(t,s,e){t.some(a=>{a.parent_id==s&&(this.departmentList.push(Object.assign(a,{level:e+1})),this.generateDepartmentList(t,a.id,e+1))})},onShowDepartment(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then(({msg:t})=>{$A.messageSuccess(t),this.getDepartmentLists(),this.getLists(),this.departmentShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.departmentLoading--})},onSelectDepartment(t){if(this.windowPortrait&&(this.minBox=!0),this.departmentSelect===t){this.departmentSelect=-1;return}this.departmentSelect=t},onOpDepartment(t){if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(5)));s&&this.onShowDepartment(s)}else if($A.leftExists(t,"del_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(4)));s&&$A.modalConfirm({title:this.$L("\u5220\u9664\u90E8\u95E8"),content:`
${this.$L(`\u4F60\u786E\u5B9A\u8981\u5220\u9664\u3010${s.name}\u3011\u90E8\u95E8\u5417\uFF1F`)}
${this.$L("\u6CE8\u610F\uFF1A\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF0C\u90E8\u95E8\u4E0B\u7684\u6210\u5458\u5C06\u79FB\u81F3\u9ED8\u8BA4\u90E8\u95E8\u3002")}
`,language:!1,loading:!0,onOk:()=>new Promise((e,a)=>{this.$store.dispatch("call",{url:"users/department/del",data:{id:s.id}}).then(({msg:i})=>{s.id===this.departmentSelect&&(this.departmentSelect=-1),e(i),this.getDepartmentLists()}).catch(({msg:i})=>{a(i)})})})}},dialogRemote(t){t!==""?(this.dialogLoad=!0,this.$store.dispatch("call",{url:"dialog/group/searchuser",data:{key:t}}).then(({data:s})=>{this.dialogList=s.list}).finally(s=>{this.dialogLoad=!1})):this.dialogList=[]},addCheckinDatum(){this.checkinMacEditData.checkin_macs.push($A.cloneJSON(this.nullCheckinDatum))},delCheckinDatum(t){this.checkinMacEditData.checkin_macs.splice(t,1),this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum()}}},l={};var L=r(y,g,k,!1,b,null,null,null);function b(t){for(let s in l)this[s]=l[s]}var X=function(){return L.exports}(),D=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"report-list-wrap"},[e("div",{staticClass:"search-expand"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u7C7B\u578B"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.type,callback:function(a){t.$set(t.keys,"type",a)},expression:"keys.type"}},t._l(t.reportTypeList,function(a){return e("Option",{key:a.value,attrs:{value:a.value}},[t._v(t._s(a.label))])}),1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u65F6\u95F4"))+" ")]),e("div",{staticClass:"search-content"},[e("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.keys.created_at,callback:function(a){t.$set(t.keys,"created_at",a)},expression:"keys.created_at"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"expand-button-group"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.addReport}},[t._v(t._s(t.$L("\u65B0\u589E\u62A5\u544A")))])],1)]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),e("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},w=[];const S={name:"ReportMy",data(){return{loadIng:0,columns:[{title:this.$L("\u540D\u79F0"),key:"title",minWidth:180,render:(t,{row:s})=>t("AutoTip",s.title)},{title:this.$L("\u7C7B\u578B"),key:"type",align:"center",width:90},{title:this.$L("\u6C47\u62A5\u65F6\u95F4"),key:"created_at",align:"center",width:180},{title:this.$L("\u6C47\u62A5\u5BF9\u8C61"),key:"receives",align:"center",width:90,render:(t,{row:s})=>{if(s.receives.length===0)return t("div","-");const e=[];return s.receives.length<=2?s.receives.some(a=>{e.push(t("UserAvatar",{props:{size:22,userid:a}}))}):(e.push(t("UserAvatar",{props:{size:22,userid:s.receives[0]}})),e.push(t("div",{class:"more-avatar"},`+${s.receives.length-1}`))),t("div",{class:"report-table-avatar"},e)}},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,minWidth:100,render:(t,{column:s,row:e})=>e.id?t("TableAction",{props:{column:s,menu:[{icon:"md-create",action:"edit"},{icon:"md-eye",action:"view"}]},on:{action:a=>{a==="edit"?this.$emit("on-edit",e.id):a==="view"&&this.$emit("on-view",e)}}}):null}],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"\u6570\u636E\u52A0\u8F7D\u4E2D.....",keys:{},keyIs:!1,reportTypeList:[{value:"",label:this.$L("\u5168\u90E8")},{value:"weekly",label:this.$L("\u5468\u62A5")},{value:"daily",label:this.$L("\u65E5\u62A5")}]}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.listPage=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"report/my",data:{keys:this.keys,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:t})=>{this.lists=t.data,this.listTotal=t.total,this.noDataText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(({msg:t})=>{$A.messageError(t),this.noDataText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(()=>{this.loadIng--})},setPage(t){this.listPage=t,this.getLists()},setPageSize(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},addReport(){this.$emit("on-edit",0)}}},o={};var x=r(S,D,w,!1,I,null,null,null);function I(t){for(let s in o)this[s]=o[s]}var C=function(){return x.exports}(),E=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"report-list-wrap"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"),clearable:""},model:{value:t.keys.key,callback:function(a){t.$set(t.keys,"key",a)},expression:"keys.key"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u7C7B\u578B"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.type,callback:function(a){t.$set(t.keys,"type",a)},expression:"keys.type"}},t._l(t.reportTypeList,function(a){return e("Option",{key:a.value,attrs:{value:a.value}},[t._v(t._s(a.label))])}),1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u65F6\u95F4"))+" ")]),e("div",{staticClass:"search-content"},[e("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.keys.created_at,callback:function(a){t.$set(t.keys,"created_at",a)},expression:"keys.created_at"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""},on:{"on-selection-change":t.selectChange}}),e("div",{staticClass:"table-attach"},[e("div",{staticClass:"select-box"},[e("Select",{attrs:{disabled:t.selectIds.length==0,placeholder:t.$L("\u8BF7\u9009\u62E9"),transfer:""},on:{"on-change":function(a){t.groupSelect=!0}},model:{value:t.selectAction,callback:function(a){t.selectAction=a},expression:"selectAction"}},[e("Option",{attrs:{value:"read"}},[t._v(t._s(t.$L("\u6807\u8BB0\u5DF2\u8BFB")))]),e("Option",{attrs:{value:"unread"}},[t._v(t._s(t.$L("\u6807\u8BB0\u672A\u8BFB")))])],1),e("Button",{attrs:{loading:t.loadIng>0,type:"primary",disabled:t.selectAction==""||t.selectIds.length==0},on:{click:t.selectClick}},[t._v(t._s(t.$L("\u6267\u884C")))])],1),e("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)],1)])},A=[];const M={name:"ReportReceive",data(){return{loadIng:0,columns:[{type:"selection",width:50,align:"right"},{title:this.$L("\u6807\u9898"),key:"title",sortable:!0,minWidth:180,render:(t,{row:s})=>{let e=[];const a=s.receives_user.find(({userid:i})=>i==this.userId);return a&&a.pivot.read==0?e.push(t("Tag",{props:{color:"orange"},style:{flexShrink:0}},this.$L("\u672A\u8BFB")),t("AutoTip",s.title)):e.push(t("AutoTip",s.title)),t("div",{style:{display:"flex",alignItems:"center"}},e)}},{title:this.$L("\u7C7B\u578B"),key:"type",sortable:!0,width:90},{title:this.$L("\u63A5\u6536\u65F6\u95F4"),key:"receive_time",align:"center",sortable:!0,width:180},{title:this.$L("\u64CD\u4F5C"),align:"center",width:90,minWidth:90,render:(t,{column:s,row:e})=>e.id?t("TableAction",{props:{column:s,menu:[{icon:"md-eye",action:"view"}]},on:{action:a=>{if(a==="view"){this.$emit("on-view",e);const i=e.receives_user.find(({userid:n})=>n==this.userId);i&&this.$set(i.pivot,"read",1)}}}}):null}],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"\u6570\u636E\u52A0\u8F7D\u4E2D.....",keys:{},keyIs:!1,selectIds:[],selectAction:"",reportTypeList:[{value:"",label:this.$L("\u5168\u90E8")},{value:"weekly",label:this.$L("\u5468\u62A5")},{value:"daily",label:this.$L("\u65E5\u62A5")}]}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.listPage=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"report/receive",data:{keys:this.keys,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:t})=>{this.lists=t.data,this.listTotal=t.total,this.noDataText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(({msg:t})=>{$A.messageError(t),this.noDataText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(()=>{this.loadIng--})},setPage(t){this.listPage=t,this.getLists()},setPageSize(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},selectChange(t){this.selectIds=t.map(({id:s})=>s)},selectClick(){if(this.selectIds.length===0){$A.messageWarning("\u8BF7\u9009\u62E9\u7EBF\u8DEF");return}switch(this.selectAction){case"read":case"unread":this.readReport(this.selectIds,this.selectAction);break;default:$A.messageWarning("\u8BF7\u9009\u62E9\u6267\u884C\u65B9\u5F0F");break}},readReport(t,s){const e=s==="read"?"\u6807\u8BB0\u5DF2\u8BFB":"\u6807\u8BB0\u672A\u8BFB";$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u8981\u3010${e}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((a,i)=>{this.$store.dispatch("call",{url:"report/mark",data:{id:t,action:s}}).then(({msg:n})=>{a(n),this.getLists(),this.$emit("on-read")}).catch(({msg:n})=>{i(n)})})})}}},c={};var T=r(M,E,A,!1,P,null,null,null);function P(t){for(let s in c)this[s]=c[s]}var O=function(){return T.exports}(),z=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"report"},[e("Tabs",{model:{value:t.reportTabs,callback:function(a){t.reportTabs=a},expression:"reportTabs"}},[e("TabPane",{attrs:{label:t.$L("\u6211\u7684\u6C47\u62A5"),name:"my"}},[t.reportTabs==="my"?e("ReportMy",{ref:"report",on:{"on-view":t.onView,"on-edit":t.onEditReport}}):t._e()],1),e("TabPane",{attrs:{label:t.tabRebder(t.reportUnreadNumber),name:"receive"}},[t.reportTabs==="receive"?e("ReportReceive",{on:{"on-view":t.onView,"on-read":t.onRead}}):t._e()],1)],1),e("DrawerOverlay",{attrs:{placement:"right",size:950,transfer:""},model:{value:t.showDetailDrawer,callback:function(a){t.showDetailDrawer=a},expression:"showDetailDrawer"}},[t.showDetailDrawer?e("ReportDetail",{attrs:{data:t.detailData}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(a){t.showEditDrawer=a},expression:"showEditDrawer"}},[t.showEditDrawer?e("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)},R=[];const B={name:"Report",components:{DrawerOverlay:f,ReportEdit:_,ReportMy:C,ReportReceive:O,ReportDetail:$},props:{value:{default:"my"}},data(){return{reportTabs:"my",showDetailDrawer:!1,showEditDrawer:!1,detailData:{},reportId:0}},mounted(){this.reportTabs=this.value,this.$isMainElectron&&this.$Electron.listenerOnly("reportSaveSuccess",({data:t,msg:s})=>{$A.messageSuccess(s),this.saveSuccess(t)})},computed:{...v(["reportUnreadNumber"])},watch:{reportTabs(t){this.$emit("input",t)}},methods:{tabRebder(t){return s=>t>0?s("div",[s("span",{class:"navbar-item-content"},this.$L("\u6536\u5230\u7684\u6C47\u62A5")),s("Badge",{class:"manage-box-report",props:{count:t}})]):s("div",[s("span",{class:"navbar-item-content"},this.$L("\u6536\u5230\u7684\u6C47\u62A5"))])},onView(t){if(this.detailData=t,this.$emit("on-read"),this.$Electron){let s={title:t.title,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:`report-detail-${t.id}`,path:`/single/report/detail/${t.id}`,force:!1,config:s})}else this.showDetailDrawer=!0},onRead(){this.$emit("on-read",0)},onEditReport(t){if(this.$Electron){let s={title:this.$L(t>0?"\u4FEE\u6539\u62A5\u544A":"\u65B0\u589E\u62A5\u544A"),parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:`report-edit-${t}`,path:`/single/report/edit/${t}`,force:!1,config:s})}else this.reportId=t,this.showEditDrawer=!0},saveSuccess(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}},d={};var U=r(B,z,R,!1,F,null,null,null);function F(t){for(let s in d)this[s]=d[s]}var Z=function(){return U.exports}(),W=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E"),"mask-closable":!1},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("Form",{ref:"export",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BFC\u51FA\u6210\u5458")}},[e("UserSelect",{attrs:{"multiple-max":100,"avatar-name":"","show-disable":"",title:t.$L("\u8BF7\u9009\u62E9\u6210\u5458")},model:{value:t.formData.userid,callback:function(a){t.$set(t.formData,"userid",a)},expression:"formData.userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6BCF\u6B21\u6700\u591A\u9009\u62E9\u5BFC\u51FA100\u4E2A\u6210\u5458")))])],1),e("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65E5\u671F")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u7B7E\u5230\u65E5\u671F")},model:{value:t.formData.date,callback:function(a){t.$set(t.formData,"date",a)},expression:"formData.date"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{label:t.$L("\u73ED\u6B21\u65F6\u95F4")}},[e("TimePicker",{staticStyle:{width:"100%"},attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u73ED\u6B21\u65F6\u95F4")},model:{value:t.formData.time,callback:function(a){t.$set(t.formData,"time",a)},expression:"formData.time"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.time=["8:30","18:00"]}}},[t._v("8:30-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:00","18:00"]}}},[t._v("9:00-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:30","18:00"]}}},[t._v("9:30-18:30")])])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},j=[];const N={name:"CheckinExport",components:{UserSelect:m},props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{userid:[],date:[],time:[]}}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"system/checkin/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},p={};var H=r(N,W,j,!1,Y,null,null,null);function Y(t){for(let s in p)this[s]=p[s]}var tt=function(){return H.exports}();export{tt as C,Z as R,X as T}; +import{U as m}from"./UserSelect.1938cd94.js";import{U as h}from"./tip.6872e3c6.js";import{n as r,m as v}from"./app.6910ca56.js";import{R as _}from"./ReportEdit.cc7cc71b.js";import{R as $}from"./ReportDetail.d9bb9dfa.js";import{D as f}from"./index.8984a77c.js";var g=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"team-management"},[e("div",{staticClass:"management-title"},[t._v(" "+t._s(t.$L("\u56E2\u961F\u7BA1\u7406"))+" "),e("div",{staticClass:"title-zoom",on:{click:function(a){t.minBox=!t.minBox}}},[t.minBox?e("i",{staticClass:"taskfont"},[t._v("\uE7D4")]):e("i",{staticClass:"taskfont"},[t._v("\uE7D3")])]),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"management-box",class:{"min-box":t.minBox}},[e("div",{staticClass:"management-department"},[e("ul",[e("li",{class:["level-1",t.departmentSelect===0?"active":""],on:{click:function(a){return t.onSelectDepartment(0)}}},[e("i",{staticClass:"taskfont department-icon"},[t._v("\uE766")]),e("div",{staticClass:"department-title"},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(a){a.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"add_0"}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])])],1)],1)],1),t._l(t.departmentList,function(a){return e("li",{key:a.id,class:[`level-${a.level}`,t.departmentSelect===a.id?"active":""],on:{click:function(i){return t.onSelectDepartment(a.id)}}},[e("UserAvatarTip",{staticClass:"department-icon",attrs:{userid:a.owner_userid,size:20}},[e("p",[e("strong",[t._v(t._s(t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")))])])]),e("div",{staticClass:"department-title"},[t._v(t._s(a.name))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(i){i.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a.level<=2?e("EDropdownItem",{attrs:{command:`add_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])]):t._e(),e("EDropdownItem",{attrs:{command:`edit_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u7F16\u8F91")))])]),e("EDropdownItem",{attrs:{command:`del_${a.id}`}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u5220\u9664")))])])],1)],1)],1)})],2),e("div",{staticClass:"department-buttons"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(a){return t.onShowDepartment(null)}}},[t._v(t._s(t.$L("\u65B0\u5EFA\u90E8\u95E8")))])],1)]),e("div",{staticClass:"management-user",style:t.userStyle},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("\u90AE\u7BB1\u3001\u6635\u79F0\u3001\u804C\u4F4D"),clearable:""},model:{value:t.keys.key,callback:function(a){t.$set(t.keys,"key",a)},expression:"keys.key"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u8EAB\u4EFD"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.identity,callback:function(a){t.$set(t.keys,"identity",a)},expression:"keys.identity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"noadmin"}},[t._v(t._s(t.$L("\u975E\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"temp"}},[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7")))]),e("Option",{attrs:{value:"notemp"}},[t._v(t._s(t.$L("\u975E\u4E34\u65F6\u5E10\u53F7")))])],1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5728\u804C\u72B6\u6001"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5728\u804C")},model:{value:t.keys.disable,callback:function(a){t.$set(t.keys,"disable",a)},expression:"keys.disable"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5728\u804C")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u79BB\u804C")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8")))])],1)],1)]),t.checkinMac?e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("MAC\u5730\u5740"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("MAC\u5730\u5740"),clearable:""},model:{value:t.keys.checkin_mac,callback:function(a){t.$set(t.keys,"checkin_mac",a)},expression:"keys.checkin_mac"}})],1)]):e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u90AE\u7BB1\u8BA4\u8BC1"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.email_verity,callback:function(a){t.$set(t.keys,"email_verity",a)},expression:"keys.email_verity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u5DF2\u90AE\u7BB1\u8BA4\u8BC1")))]),e("Option",{attrs:{value:"no"}},[t._v(t._s(t.$L("\u672A\u90AE\u7BB1\u8BA4\u8BC1")))])],1)],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])]),e("Modal",{attrs:{title:t.$L(t.departmentData.id>0?"\u4FEE\u6539\u90E8\u95E8":"\u65B0\u5EFA\u90E8\u95E8"),"mask-closable":!1},model:{value:t.departmentShow,callback:function(a){t.departmentShow=a},expression:"departmentShow"}},[e("Form",{ref:"addProject",attrs:{model:t.departmentData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u90E8\u95E8\u540D\u79F0")}},[e("Input",{attrs:{type:"text",placeholder:t.$L("\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0")},model:{value:t.departmentData.name,callback:function(a){t.$set(t.departmentData,"name",a)},expression:"departmentData.name"}})],1),e("FormItem",{attrs:{prop:"parent_id",label:t.$L("\u4E0A\u7EA7\u90E8\u95E8")}},[e("Select",{attrs:{disabled:t.departmentParentDisabled,placeholder:t.$L("\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8")},model:{value:t.departmentData.parent_id,callback:function(a){t.$set(t.departmentData,"parent_id",a)},expression:"departmentData.parent_id"}},[e("Option",{attrs:{value:0}},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),t._l(t.departmentList,function(a,i){return a.parent_id==0&&a.id!=t.departmentData.id?e("Option",{key:i,attrs:{value:a.id,label:a.name}},[t._v("\xA0\xA0\xA0\xA0"+t._s(a.name))]):t._e()})],2),t.departmentParentDisabled?e("div",{staticClass:"form-tip",staticStyle:{"margin-bottom":"-16px"}},[t._v(t._s(t.$L("\u542B\u6709\u5B50\u90E8\u95E8\u65E0\u6CD5\u4FEE\u6539\u4E0A\u7EA7\u90E8\u95E8")))]):t._e()],1),e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"multiple-max":1,title:t.$L("\u8BF7\u9009\u62E9\u90E8\u95E8\u8D1F\u8D23\u4EBA")},model:{value:t.departmentData.owner_userid,callback:function(a){t.$set(t.departmentData,"owner_userid",a)},expression:"departmentData.owner_userid"}})],1),t.departmentData.id==0?[e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))]),e("FormItem",{attrs:{prop:"dialog_group",label:t.$L("\u90E8\u95E8\u7FA4\u804A")}},[e("RadioGroup",{model:{value:t.departmentData.dialog_group,callback:function(a){t.$set(t.departmentData,"dialog_group",a)},expression:"departmentData.dialog_group"}},[e("Radio",{attrs:{label:"new"}},[t._v(t._s(t.$L("\u521B\u5EFA\u90E8\u95E8\u7FA4")))]),e("Radio",{attrs:{label:"use"}},[t._v(t._s(t.$L("\u4F7F\u7528\u73B0\u6709\u7FA4")))])],1)],1),t.departmentData.dialog_group==="use"?e("FormItem",{attrs:{prop:"dialog_useid",label:t.$L("\u9009\u62E9\u7FA4\u7EC4")}},[e("Select",{attrs:{filterable:"","remote-method":t.dialogRemote,placeholder:t.$L("\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22\u7FA4"),loading:t.dialogLoad},model:{value:t.departmentData.dialog_useid,callback:function(a){t.$set(t.departmentData,"dialog_useid",a)},expression:"departmentData.dialog_useid"}},t._l(t.dialogList,function(a,i){return e("Option",{key:i,attrs:{value:a.id,label:a.name}},[e("div",{staticClass:"team-department-add-dialog-group"},[e("div",{staticClass:"dialog-name"},[t._v(t._s(a.name))]),e("UserAvatar",{attrs:{userid:a.owner_id,size:20}})],1)])}),1),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EC5\u652F\u6301\u9009\u62E9\u4E2A\u4EBA\u7FA4\u8F6C\u4E3A\u90E8\u95E8\u7FA4")))])],1):t._e()]:t._e()],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentLoading>0},on:{click:t.onSaveDepartment}},[t._v(t._s(t.$L(t.departmentData.id>0?"\u4FDD\u5B58":"\u65B0\u5EFA")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u7B7E\u5230MAC\u5730\u5740")},model:{value:t.checkinMacEditShow,callback:function(a){t.checkinMacEditShow=a},expression:"checkinMacEditShow"}},[e("Form",{attrs:{model:t.checkinMacEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.checkinMacEditData.userid}\uFF0C${t.checkinMacEditData.nickname}\u3011MAC\u5730\u5740\u4FEE\u6539\u3002`)))]),e("Row",{staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u8BBE\u5907MAC\u5730\u5740")))]),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u5907\u6CE8")))])],1),t._l(t.checkinMacEditData.checkin_macs,function(a,i){return e("Row",{key:i,staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8BBE\u5907MAC\u5730\u5740"),clearable:""},on:{"on-clear":function(n){return t.delCheckinDatum(i)}},model:{value:a.mac,callback:function(n){t.$set(a,"mac",n)},expression:"item.mac"}})],1),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("\u5907\u6CE8")},model:{value:a.remark,callback:function(n){t.$set(a,"remark",n)},expression:"item.remark"}})],1)],1)}),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addCheckinDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u8BBE\u5907")))])],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.checkinMacEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.checkinMacEditLoading>0},on:{click:function(a){return t.operationUser(t.checkinMacEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u90E8\u95E8")},model:{value:t.departmentEditShow,callback:function(a){t.departmentEditShow=a},expression:"departmentEditShow"}},[e("Form",{attrs:{model:t.departmentEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.departmentEditData.userid}\uFF0C${t.departmentEditData.nickname}\u3011\u90E8\u95E8\u4FEE\u6539\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u4FEE\u6539\u90E8\u95E8")}},[e("Select",{attrs:{multiple:"","multiple-max":10,placeholder:t.$L("\u7559\u7A7A\u4E3A\u9ED8\u8BA4\u90E8\u95E8")},model:{value:t.departmentEditData.department,callback:function(a){t.$set(t.departmentEditData,"department",a)},expression:"departmentEditData.department"}},t._l(t.departmentList,function(a,i){return e("Option",{key:i,attrs:{value:a.id}},[t._v(t._s(a.name))])}),1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentEditLoading>0},on:{click:function(a){return t.operationUser(t.departmentEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u64CD\u4F5C\u79BB\u804C")},model:{value:t.disableShow,callback:function(a){t.disableShow=a},expression:"disableShow"}},[e("Form",{attrs:{model:t.disableData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.disableData.userid}\uFF0C${t.disableData.nickname}\u3011\u79BB\u804C\u64CD\u4F5C\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u79BB\u804C\u65F6\u95F4")}},[e("DatePicker",{ref:"disableTime",staticStyle:{width:"100%"},attrs:{editable:!1,placeholder:t.$L("\u9009\u62E9\u79BB\u804C\u65F6\u95F4"),options:t.disableOptions,format:"yyyy/MM/dd HH:mm",type:"datetime"},model:{value:t.disableData.disable_time,callback:function(a){t.$set(t.disableData,"disable_time",a)},expression:"disableData.disable_time"}})],1),e("FormItem",{attrs:{label:t.$L("\u4EA4\u63A5\u4EBA")}},[e("UserSelect",{attrs:{"disabled-choice":[t.disableData.userid],"multiple-max":1,title:t.$L("\u9009\u62E9\u4EA4\u63A5\u4EBA")},model:{value:t.disableData.transfer_userid,callback:function(a){t.$set(t.disableData,"transfer_userid",a)},expression:"disableData.transfer_userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`${t.disableData.nickname} \u8D1F\u8D23\u7684\u90E8\u95E8\u3001\u9879\u76EE\u3001\u4EFB\u52A1\u548C\u6587\u4EF6\u5C06\u79FB\u4EA4\u7ED9\u4EA4\u63A5\u4EBA\uFF1B\u540C\u65F6\u9000\u51FA\u6240\u6709\u7FA4\uFF08\u5982\u679C\u662F\u7FA4\u4E3B\u5219\u8F6C\u8BA9\u7ED9\u4EA4\u63A5\u4EBA\uFF09`)))])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.disableShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(a){return t.operationUser(t.disableData,!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[t._v(t._s(t.$L("\u6CE8\u610F\uFF1A\u79BB\u804C\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF01")))])]),e("Button",{attrs:{type:"primary",loading:t.disableLoading>0}},[t._v(t._s(t.$L("\u786E\u5B9A\u79BB\u804C")))])],1)],1)],1)],1)},k=[];const y={name:"TeamManagement",components:{UserAvatarTip:h,UserSelect:m},props:{checkinMac:{type:Boolean,default:!1}},data(){return{loadIng:0,minBox:!1,minWidth:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"userid",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.userid)])},{title:this.$L("\u90AE\u7BB1"),key:"email",minWidth:160,render:(t,{row:s})=>{const e=[t("AutoTip",s.email)],{email_verity:a,identity:i,disable_at:n,is_principal:u}=s;return a&&e.push(t("Icon",{props:{type:"md-mail"}})),u&&e.push(t("Tag",{props:{color:"blue"}},this.$L("\u8D1F\u8D23\u4EBA"))),i.includes("ldap")&&e.push(t("Tag",{props:{color:"orange"}},"LDAP")),i.includes("admin")&&e.push(t("Tag",{props:{color:"warning"}},this.$L("\u7BA1\u7406\u5458"))),i.includes("temp")&&e.push(t("Tag",{props:{color:"success"}},this.$L("\u4E34\u65F6"))),i.includes("disable")&&e.push(t("Tooltip",{props:{content:this.$L("\u79BB\u804C\u65F6\u95F4")+": "+n}},[t("Tag",{props:{color:"error"}},this.$L("\u79BB\u804C"))])),t("div",{class:"team-email"},e)}},{title:this.$L("\u7535\u8BDD"),key:"tel",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.tel},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,tel:e},!0).finally(a)}}},[t("AutoTip",s.tel||"-")])},{title:this.$L("\u6635\u79F0"),key:"nickname",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.nickname_original},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,nickname:e},!0).finally(a)}}},[t("AutoTip",s.nickname_original||"-")])},{title:this.$L("\u804C\u4F4D/\u804C\u79F0"),key:"profession",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.profession},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,profession:e},!0).finally(a)}}},[t("AutoTip",s.profession||"-")])},{title:this.$L("\u90E8\u95E8"),key:"department",minWidth:80,render:(t,{row:s})=>{let e=[];if(s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.name)}),e.length===0)return t("div",this.$L("\u9ED8\u8BA4\u90E8\u95E8"));{const a=[];return a.push(t("span",{domProps:{title:e[0]}},e[0])),e.length>1&&(e=e.splice(1),a.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},a)}}},{title:this.$L("\u6700\u540E\u5728\u7EBF"),key:"line_at",width:168},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=s.row.identity,a=[];e.includes("admin")?a.push(t("EDropdownItem",{props:{command:"clearadmin"}},[t("div",this.$L("\u53D6\u6D88\u7BA1\u7406\u5458"))])):a.push(t("EDropdownItem",{props:{command:"setadmin"}},[t("div",this.$L("\u8BBE\u4E3A\u7BA1\u7406\u5458"))])),e.includes("temp")?a.push(t("EDropdownItem",{props:{command:"cleartemp"}},[t("div",this.$L("\u53D6\u6D88\u4E34\u65F6\u8EAB\u4EFD"))])):a.push(t("EDropdownItem",{props:{command:"settemp"}},[t("div",this.$L("\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7"))])),a.push(t("EDropdownItem",{props:{command:"email"}},[t("div",this.$L("\u4FEE\u6539\u90AE\u7BB1"))])),a.push(t("EDropdownItem",{props:{command:"password"}},[t("div",this.$L("\u4FEE\u6539\u5BC6\u7801"))])),this.checkinMac&&a.push(t("EDropdownItem",{props:{command:"checkin_mac"}},[t("div",this.$L("\u4FEE\u6539MAC"))])),a.push(t("EDropdownItem",{props:{command:"department"}},[t("div",this.$L("\u4FEE\u6539\u90E8\u95E8"))])),e.includes("disable")?a.push(t("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[t("div",this.$L("\u6062\u590D\u5E10\u53F7\uFF08\u5DF2\u79BB\u804C\uFF09"))])):a.push(t("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[t("div",this.$L("\u64CD\u4F5C\u79BB\u804C"))])),a.push(t("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[t("div",this.$L("\u5220\u9664"))]));const i=t("EDropdown",{props:{size:"small",trigger:"click"},on:{command:n=>{this.dropUser(n,s.row)}}},[t("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},this.$L("\u64CD\u4F5C")),t("EDropdownMenu",{slot:"dropdown"},[a])]);return t("TableAction",{props:{column:s.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:"12:00",value(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"17:00",value(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"18:00",value(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:"19:00",value(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("\u73B0\u5728"),value(){return new Date},onClick:t=>{t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC\u5730\u5740"),key:"checkin_mac",minWidth:80,render:(t,{row:s})=>{let e=$A.cloneJSON(s.checkin_macs||[]);if(e.length===0)return t("div","-");{const a=n=>n.remark?`${n.mac} (${n.remark})`:n.mac,i=[];return i.push(t("AutoTip",a(e[0]))),e.length>1&&(e=e.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.map(n=>a(n)).join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},i)}}})},mounted(){this.getLists(),this.getDepartmentLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))},departmentSelect(){this.setPage(1)},windowPortrait:{handler(t){this.minBox=t},immediate:!0},minBox:{handler(){this.$nextTick(t=>{this.$el&&this.$el.clientWidth>0&&(this.minWidth=this.$el.clientWidth)})},immediate:!0}},computed:{departmentParentDisabled(){return!!(this.departmentData.id>0&&this.departmentList.find(({parent_id:t})=>t==this.departmentData.id))},userStyle({minWidth:t,windowPortrait:s}){const e={};return t>0&&s&&(e.minWidth=t-40+"px"),e}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="";let t=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(t=Object.assign(t,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:t,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:s})=>{this.page=s.current_page,this.total=s.total,this.list=s.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6210\u5458"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(s=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},dropUser(t,s){switch(t){case"settemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u5C06\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7\u5417\uFF1F\uFF08\u6CE8\uFF1A\u4E34\u65F6\u5E10\u53F7\u9650\u5236\u8BF7\u67E5\u770B\u7CFB\u7EDF\u8BBE\u7F6E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"cleartemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u53D6\u6D88\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u4E34\u65F6\u8EAB\u4EFD\u5417\uFF1F`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"email":$A.modalInput({title:"\u4FEE\u6539\u90AE\u7BB1",placeholder:`\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\uFF08${s.email}\uFF09`,onOk:a=>a?this.operationUser({userid:s.userid,email:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\u5730\u5740"});break;case"password":$A.modalInput({title:"\u4FEE\u6539\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801",onOk:a=>a?this.operationUser({userid:s.userid,password:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801"});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:s.userid,nickname:s.nickname,checkin_macs:s.checkin_macs},this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":let e=[];s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.owner_userid===s.userid?`${i.name} (${this.$L("\u8D1F\u8D23\u4EBA")})`:i.name)}),this.departmentEditData={type:"department",userid:s.userid,nickname:s.nickname,department:s.department.map(a=>parseInt(a))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:s.userid,nickname:s.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6062\u590D\u5DF2\u79BB\u804C\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u5417\uFF1F\uFF08\u6CE8\uFF1A\u6B64\u64CD\u4F5C\u4EC5\u6062\u590D\u5E10\u53F7\u72B6\u6001\uFF0C\u65E0\u6CD5\u6062\u590D\u64CD\u4F5C\u79BB\u804C\u65F6\u79FB\u4EA4\u7684\u6570\u636E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"delete":$A.modalInput({title:`\u5220\u9664\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011`,placeholder:"\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0",okText:"\u786E\u5B9A\u5220\u9664",onOk:a=>a?this.operationUser({userid:s.userid,type:t,delete_reason:a}):"\u5220\u9664\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});break;default:this.operationUser({userid:s.userid,type:t},!0);break}},operationUser(t,s){return new Promise((e,a)=>{t.type=="checkin_macs"?this.checkinMacEditLoading++:t.type=="department"?this.departmentEditLoading++:t.type=="setdisable"?this.disableLoading++:this.loadIng++,this.$store.dispatch("call",{url:"users/operation",data:t}).then(({msg:i})=>{$A.messageSuccess(i),this.getLists(),e(),t.type=="checkin_macs"?this.checkinMacEditShow=!1:t.type=="department"?this.departmentEditShow=!1:t.type=="setdisable"&&(this.disableShow=!1)}).catch(({msg:i})=>{s===!0&&$A.modalError(i),this.getLists(),a(i)}).finally(i=>{t.type=="checkin_macs"?this.checkinMacEditLoading--:t.type=="department"?this.departmentEditLoading--:t.type=="setdisable"?this.disableLoading--:this.loadIng--})})},getDepartmentLists(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then(({data:t})=>{this.departmentList=[],this.generateDepartmentList(t,0,1)}).finally(t=>{this.departmentLoading--})},generateDepartmentList(t,s,e){t.some(a=>{a.parent_id==s&&(this.departmentList.push(Object.assign(a,{level:e+1})),this.generateDepartmentList(t,a.id,e+1))})},onShowDepartment(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then(({msg:t})=>{$A.messageSuccess(t),this.getDepartmentLists(),this.getLists(),this.departmentShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.departmentLoading--})},onSelectDepartment(t){if(this.windowPortrait&&(this.minBox=!0),this.departmentSelect===t){this.departmentSelect=-1;return}this.departmentSelect=t},onOpDepartment(t){if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(5)));s&&this.onShowDepartment(s)}else if($A.leftExists(t,"del_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(4)));s&&$A.modalConfirm({title:this.$L("\u5220\u9664\u90E8\u95E8"),content:`
${this.$L(`\u4F60\u786E\u5B9A\u8981\u5220\u9664\u3010${s.name}\u3011\u90E8\u95E8\u5417\uFF1F`)}
${this.$L("\u6CE8\u610F\uFF1A\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF0C\u90E8\u95E8\u4E0B\u7684\u6210\u5458\u5C06\u79FB\u81F3\u9ED8\u8BA4\u90E8\u95E8\u3002")}
`,language:!1,loading:!0,onOk:()=>new Promise((e,a)=>{this.$store.dispatch("call",{url:"users/department/del",data:{id:s.id}}).then(({msg:i})=>{s.id===this.departmentSelect&&(this.departmentSelect=-1),e(i),this.getDepartmentLists()}).catch(({msg:i})=>{a(i)})})})}},dialogRemote(t){t!==""?(this.dialogLoad=!0,this.$store.dispatch("call",{url:"dialog/group/searchuser",data:{key:t}}).then(({data:s})=>{this.dialogList=s.list}).finally(s=>{this.dialogLoad=!1})):this.dialogList=[]},addCheckinDatum(){this.checkinMacEditData.checkin_macs.push($A.cloneJSON(this.nullCheckinDatum))},delCheckinDatum(t){this.checkinMacEditData.checkin_macs.splice(t,1),this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum()}}},l={};var L=r(y,g,k,!1,b,null,null,null);function b(t){for(let s in l)this[s]=l[s]}var X=function(){return L.exports}(),D=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"report-list-wrap"},[e("div",{staticClass:"search-expand"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u7C7B\u578B"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.type,callback:function(a){t.$set(t.keys,"type",a)},expression:"keys.type"}},t._l(t.reportTypeList,function(a){return e("Option",{key:a.value,attrs:{value:a.value}},[t._v(t._s(a.label))])}),1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u65F6\u95F4"))+" ")]),e("div",{staticClass:"search-content"},[e("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.keys.created_at,callback:function(a){t.$set(t.keys,"created_at",a)},expression:"keys.created_at"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"expand-button-group"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.addReport}},[t._v(t._s(t.$L("\u65B0\u589E\u62A5\u544A")))])],1)]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),e("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},w=[];const S={name:"ReportMy",data(){return{loadIng:0,columns:[{title:this.$L("\u540D\u79F0"),key:"title",minWidth:180,render:(t,{row:s})=>t("AutoTip",s.title)},{title:this.$L("\u7C7B\u578B"),key:"type",align:"center",width:90},{title:this.$L("\u6C47\u62A5\u65F6\u95F4"),key:"created_at",align:"center",width:180},{title:this.$L("\u6C47\u62A5\u5BF9\u8C61"),key:"receives",align:"center",width:90,render:(t,{row:s})=>{if(s.receives.length===0)return t("div","-");const e=[];return s.receives.length<=2?s.receives.some(a=>{e.push(t("UserAvatar",{props:{size:22,userid:a}}))}):(e.push(t("UserAvatar",{props:{size:22,userid:s.receives[0]}})),e.push(t("div",{class:"more-avatar"},`+${s.receives.length-1}`))),t("div",{class:"report-table-avatar"},e)}},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,minWidth:100,render:(t,{column:s,row:e})=>e.id?t("TableAction",{props:{column:s,menu:[{icon:"md-create",action:"edit"},{icon:"md-eye",action:"view"}]},on:{action:a=>{a==="edit"?this.$emit("on-edit",e.id):a==="view"&&this.$emit("on-view",e)}}}):null}],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"\u6570\u636E\u52A0\u8F7D\u4E2D.....",keys:{},keyIs:!1,reportTypeList:[{value:"",label:this.$L("\u5168\u90E8")},{value:"weekly",label:this.$L("\u5468\u62A5")},{value:"daily",label:this.$L("\u65E5\u62A5")}]}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.listPage=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"report/my",data:{keys:this.keys,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:t})=>{this.lists=t.data,this.listTotal=t.total,this.noDataText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(({msg:t})=>{$A.messageError(t),this.noDataText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(()=>{this.loadIng--})},setPage(t){this.listPage=t,this.getLists()},setPageSize(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},addReport(){this.$emit("on-edit",0)}}},o={};var x=r(S,D,w,!1,I,null,null,null);function I(t){for(let s in o)this[s]=o[s]}var C=function(){return x.exports}(),E=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"report-list-wrap"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"),clearable:""},model:{value:t.keys.key,callback:function(a){t.$set(t.keys,"key",a)},expression:"keys.key"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u7C7B\u578B"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.type,callback:function(a){t.$set(t.keys,"type",a)},expression:"keys.type"}},t._l(t.reportTypeList,function(a){return e("Option",{key:a.value,attrs:{value:a.value}},[t._v(t._s(a.label))])}),1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u6C47\u62A5\u65F6\u95F4"))+" ")]),e("div",{staticClass:"search-content"},[e("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.keys.created_at,callback:function(a){t.$set(t.keys,"created_at",a)},expression:"keys.created_at"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""},on:{"on-selection-change":t.selectChange}}),e("div",{staticClass:"table-attach"},[e("div",{staticClass:"select-box"},[e("Select",{attrs:{disabled:t.selectIds.length==0,placeholder:t.$L("\u8BF7\u9009\u62E9"),transfer:""},on:{"on-change":function(a){t.groupSelect=!0}},model:{value:t.selectAction,callback:function(a){t.selectAction=a},expression:"selectAction"}},[e("Option",{attrs:{value:"read"}},[t._v(t._s(t.$L("\u6807\u8BB0\u5DF2\u8BFB")))]),e("Option",{attrs:{value:"unread"}},[t._v(t._s(t.$L("\u6807\u8BB0\u672A\u8BFB")))])],1),e("Button",{attrs:{loading:t.loadIng>0,type:"primary",disabled:t.selectAction==""||t.selectIds.length==0},on:{click:t.selectClick}},[t._v(t._s(t.$L("\u6267\u884C")))])],1),e("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)],1)])},A=[];const M={name:"ReportReceive",data(){return{loadIng:0,columns:[{type:"selection",width:50,align:"right"},{title:this.$L("\u6807\u9898"),key:"title",sortable:!0,minWidth:180,render:(t,{row:s})=>{let e=[];const a=s.receives_user.find(({userid:i})=>i==this.userId);return a&&a.pivot.read==0?e.push(t("Tag",{props:{color:"orange"},style:{flexShrink:0}},this.$L("\u672A\u8BFB")),t("AutoTip",s.title)):e.push(t("AutoTip",s.title)),t("div",{style:{display:"flex",alignItems:"center"}},e)}},{title:this.$L("\u7C7B\u578B"),key:"type",sortable:!0,width:90},{title:this.$L("\u63A5\u6536\u65F6\u95F4"),key:"receive_time",align:"center",sortable:!0,width:180},{title:this.$L("\u64CD\u4F5C"),align:"center",width:90,minWidth:90,render:(t,{column:s,row:e})=>e.id?t("TableAction",{props:{column:s,menu:[{icon:"md-eye",action:"view"}]},on:{action:a=>{if(a==="view"){this.$emit("on-view",e);const i=e.receives_user.find(({userid:n})=>n==this.userId);i&&this.$set(i.pivot,"read",1)}}}}):null}],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"\u6570\u636E\u52A0\u8F7D\u4E2D.....",keys:{},keyIs:!1,selectIds:[],selectAction:"",reportTypeList:[{value:"",label:this.$L("\u5168\u90E8")},{value:"weekly",label:this.$L("\u5468\u62A5")},{value:"daily",label:this.$L("\u65E5\u62A5")}]}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.listPage=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"report/receive",data:{keys:this.keys,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:t})=>{this.lists=t.data,this.listTotal=t.total,this.noDataText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(({msg:t})=>{$A.messageError(t),this.noDataText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(()=>{this.loadIng--})},setPage(t){this.listPage=t,this.getLists()},setPageSize(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},selectChange(t){this.selectIds=t.map(({id:s})=>s)},selectClick(){if(this.selectIds.length===0){$A.messageWarning("\u8BF7\u9009\u62E9\u7EBF\u8DEF");return}switch(this.selectAction){case"read":case"unread":this.readReport(this.selectIds,this.selectAction);break;default:$A.messageWarning("\u8BF7\u9009\u62E9\u6267\u884C\u65B9\u5F0F");break}},readReport(t,s){const e=s==="read"?"\u6807\u8BB0\u5DF2\u8BFB":"\u6807\u8BB0\u672A\u8BFB";$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u8981\u3010${e}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((a,i)=>{this.$store.dispatch("call",{url:"report/mark",data:{id:t,action:s}}).then(({msg:n})=>{a(n),this.getLists(),this.$emit("on-read")}).catch(({msg:n})=>{i(n)})})})}}},c={};var T=r(M,E,A,!1,P,null,null,null);function P(t){for(let s in c)this[s]=c[s]}var O=function(){return T.exports}(),z=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"report"},[e("Tabs",{model:{value:t.reportTabs,callback:function(a){t.reportTabs=a},expression:"reportTabs"}},[e("TabPane",{attrs:{label:t.$L("\u6211\u7684\u6C47\u62A5"),name:"my"}},[t.reportTabs==="my"?e("ReportMy",{ref:"report",on:{"on-view":t.onView,"on-edit":t.onEditReport}}):t._e()],1),e("TabPane",{attrs:{label:t.tabRebder(t.reportUnreadNumber),name:"receive"}},[t.reportTabs==="receive"?e("ReportReceive",{on:{"on-view":t.onView,"on-read":t.onRead}}):t._e()],1)],1),e("DrawerOverlay",{attrs:{placement:"right",size:950,transfer:""},model:{value:t.showDetailDrawer,callback:function(a){t.showDetailDrawer=a},expression:"showDetailDrawer"}},[t.showDetailDrawer?e("ReportDetail",{attrs:{data:t.detailData}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(a){t.showEditDrawer=a},expression:"showEditDrawer"}},[t.showEditDrawer?e("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)},R=[];const B={name:"Report",components:{DrawerOverlay:f,ReportEdit:_,ReportMy:C,ReportReceive:O,ReportDetail:$},props:{value:{default:"my"}},data(){return{reportTabs:"my",showDetailDrawer:!1,showEditDrawer:!1,detailData:{},reportId:0}},mounted(){this.reportTabs=this.value,this.$isMainElectron&&this.$Electron.listenerOnly("reportSaveSuccess",({data:t,msg:s})=>{$A.messageSuccess(s),this.saveSuccess(t)})},computed:{...v(["reportUnreadNumber"])},watch:{reportTabs(t){this.$emit("input",t)}},methods:{tabRebder(t){return s=>t>0?s("div",[s("span",{class:"navbar-item-content"},this.$L("\u6536\u5230\u7684\u6C47\u62A5")),s("Badge",{class:"manage-box-report",props:{count:t}})]):s("div",[s("span",{class:"navbar-item-content"},this.$L("\u6536\u5230\u7684\u6C47\u62A5"))])},onView(t){if(this.detailData=t,this.$emit("on-read"),this.$Electron){let s={title:t.title,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:`report-detail-${t.id}`,path:`/single/report/detail/${t.id}`,force:!1,config:s})}else this.showDetailDrawer=!0},onRead(){this.$emit("on-read",0)},onEditReport(t){if(this.$Electron){let s={title:this.$L(t>0?"\u4FEE\u6539\u62A5\u544A":"\u65B0\u589E\u62A5\u544A"),parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:`report-edit-${t}`,path:`/single/report/edit/${t}`,force:!1,config:s})}else this.reportId=t,this.showEditDrawer=!0},saveSuccess(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}},d={};var U=r(B,z,R,!1,F,null,null,null);function F(t){for(let s in d)this[s]=d[s]}var Z=function(){return U.exports}(),W=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E"),"mask-closable":!1},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("Form",{ref:"export",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BFC\u51FA\u6210\u5458")}},[e("UserSelect",{attrs:{"multiple-max":100,"avatar-name":"","show-disable":"",title:t.$L("\u8BF7\u9009\u62E9\u6210\u5458")},model:{value:t.formData.userid,callback:function(a){t.$set(t.formData,"userid",a)},expression:"formData.userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6BCF\u6B21\u6700\u591A\u9009\u62E9\u5BFC\u51FA100\u4E2A\u6210\u5458")))])],1),e("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65E5\u671F")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u7B7E\u5230\u65E5\u671F")},model:{value:t.formData.date,callback:function(a){t.$set(t.formData,"date",a)},expression:"formData.date"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{label:t.$L("\u73ED\u6B21\u65F6\u95F4")}},[e("TimePicker",{staticStyle:{width:"100%"},attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u73ED\u6B21\u65F6\u95F4")},model:{value:t.formData.time,callback:function(a){t.$set(t.formData,"time",a)},expression:"formData.time"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.time=["8:30","18:00"]}}},[t._v("8:30-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:00","18:00"]}}},[t._v("9:00-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:30","18:00"]}}},[t._v("9:30-18:30")])])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},j=[];const N={name:"CheckinExport",components:{UserSelect:m},props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{userid:[],date:[],time:[]}}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"system/checkin/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},p={};var H=r(N,W,j,!1,Y,null,null,null);function Y(t){for(let s in p)this[s]=p[s]}var tt=function(){return H.exports}();export{tt as C,Z as R,X as T}; diff --git a/public/js/build/DialogWrapper.5fcf71c2.js b/public/js/build/DialogWrapper.54a1354f.js similarity index 98% rename from public/js/build/DialogWrapper.5fcf71c2.js rename to public/js/build/DialogWrapper.54a1354f.js index 81247625e..623940c6b 100644 --- a/public/js/build/DialogWrapper.5fcf71c2.js +++ b/public/js/build/DialogWrapper.54a1354f.js @@ -1,4 +1,4 @@ -import{n as Kt,g as qu,f as Ya,m as jn,b as Cl,a as _i,h as Yu,j as zu,r as $u,V as Hu,i as Vu}from"./app.6c8b31b1.js";import{l as za}from"./longpress.43ca7fd9.js";import{D as Wu}from"./index.31386d23.js";import{U as Rl}from"./UserSelect.d62f565b.js";import{I as Ku}from"./ImgUpload.0e64a5a8.js";import Qu from"./details.6749696e.js";import{U as ju}from"./tip.517649f6.js";var Xu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-circle",style:e.style,attrs:{"data-id":e.percent}},[n("svg",{attrs:{viewBox:"0 0 28 28"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[n("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),n("g",{attrs:{"fill-rule":"nonzero"}},[n("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:e.arc(e.args)}})])])])])},Zu=[];const Ju={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style(){let{size:e}=this;return this.isNumeric(e)&&(e+="px"),{width:e,height:e}},args(){const{percent:e}=this;let t=Math.min(360,360/100*e);return t==360?t=0:t==0&&(t=360),{x:14,y:14,r:14,start:360,end:t}}},methods:{isNumeric(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)},point(e,t,n,r){return[(e+Math.sin(r)*n).toFixed(2),(t-Math.cos(r)*n).toFixed(2)]},full(e,t,n,r){return r<=0?`M ${e-n} ${t} A ${n} ${n} 0 1 1 ${e+n} ${t} A ${n} ${n} 1 1 1 ${e-n} ${t} Z`:`M ${e-n} ${t} A ${n} ${n} 0 1 1 ${e+n} ${t} A ${n} ${n} 1 1 1 ${e-n} ${t} M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 1 1 1 ${e-r} ${t} Z`},part(e,t,n,r,a,l){const[u,c]=[a/360*2*Math.PI,l/360*2*Math.PI],d=[this.point(e,t,r,u),this.point(e,t,n,u),this.point(e,t,n,c),this.point(e,t,r,c)],g=c-u>Math.PI?"1":"0";return`M ${d[0][0]} ${d[0][1]} L ${d[1][0]} ${d[1][1]} A ${n} ${n} 0 ${g} 1 ${d[2][0]} ${d[2][1]} L ${d[3][0]} ${d[3][1]} A ${r} ${r} 0 ${g} 0 ${d[0][0]} ${d[0][1]} Z`},arc(e){const{x:t=0,y:n=0}=e;let{R:r=0,r:a=0,start:l,end:u}=e;return[r,a]=[Math.max(r,a),Math.min(r,a)],r<=0?"":l!==+l||u!==+u?this.full(t,n,r,a):Math.abs(l-u)<1e-6?"":Math.abs(l-u)%360<1e-6?this.full(t,n,r,a):([l,u]=[l%360,u%360],l>u&&(u+=360),this.part(t,n,r,a,l,u))}}},Ss={};var ed=Kt(Ju,Xu,Zu,!1,td,null,null,null);function td(e){for(let t in Ss)this[t]=Ss[t]}var nd=function(){return ed.exports}();var Ze={};const rd="\xC1",id="\xE1",ad="\u0102",od="\u0103",sd="\u223E",ld="\u223F",cd="\u223E\u0333",ud="\xC2",dd="\xE2",_d="\xB4",pd="\u0410",md="\u0430",fd="\xC6",gd="\xE6",hd="\u2061",Ed="\u{1D504}",Sd="\u{1D51E}",bd="\xC0",vd="\xE0",Td="\u2135",yd="\u2135",Cd="\u0391",Rd="\u03B1",Od="\u0100",Nd="\u0101",Ad="\u2A3F",Id="&",Dd="&",xd="\u2A55",wd="\u2A53",Md="\u2227",Ld="\u2A5C",kd="\u2A58",Pd="\u2A5A",Bd="\u2220",Fd="\u29A4",Ud="\u2220",Gd="\u29A8",qd="\u29A9",Yd="\u29AA",zd="\u29AB",$d="\u29AC",Hd="\u29AD",Vd="\u29AE",Wd="\u29AF",Kd="\u2221",Qd="\u221F",jd="\u22BE",Xd="\u299D",Zd="\u2222",Jd="\xC5",e_="\u237C",t_="\u0104",n_="\u0105",r_="\u{1D538}",i_="\u{1D552}",a_="\u2A6F",o_="\u2248",s_="\u2A70",l_="\u224A",c_="\u224B",u_="'",d_="\u2061",__="\u2248",p_="\u224A",m_="\xC5",f_="\xE5",g_="\u{1D49C}",h_="\u{1D4B6}",E_="\u2254",S_="*",b_="\u2248",v_="\u224D",T_="\xC3",y_="\xE3",C_="\xC4",R_="\xE4",O_="\u2233",N_="\u2A11",A_="\u224C",I_="\u03F6",D_="\u2035",x_="\u223D",w_="\u22CD",M_="\u2216",L_="\u2AE7",k_="\u22BD",P_="\u2305",B_="\u2306",F_="\u2305",U_="\u23B5",G_="\u23B6",q_="\u224C",Y_="\u0411",z_="\u0431",$_="\u201E",H_="\u2235",V_="\u2235",W_="\u2235",K_="\u29B0",Q_="\u03F6",j_="\u212C",X_="\u212C",Z_="\u0392",J_="\u03B2",ep="\u2136",tp="\u226C",np="\u{1D505}",rp="\u{1D51F}",ip="\u22C2",ap="\u25EF",op="\u22C3",sp="\u2A00",lp="\u2A01",cp="\u2A02",up="\u2A06",dp="\u2605",_p="\u25BD",pp="\u25B3",mp="\u2A04",fp="\u22C1",gp="\u22C0",hp="\u290D",Ep="\u29EB",Sp="\u25AA",bp="\u25B4",vp="\u25BE",Tp="\u25C2",yp="\u25B8",Cp="\u2423",Rp="\u2592",Op="\u2591",Np="\u2593",Ap="\u2588",Ip="=\u20E5",Dp="\u2261\u20E5",xp="\u2AED",wp="\u2310",Mp="\u{1D539}",Lp="\u{1D553}",kp="\u22A5",Pp="\u22A5",Bp="\u22C8",Fp="\u29C9",Up="\u2510",Gp="\u2555",qp="\u2556",Yp="\u2557",zp="\u250C",$p="\u2552",Hp="\u2553",Vp="\u2554",Wp="\u2500",Kp="\u2550",Qp="\u252C",jp="\u2564",Xp="\u2565",Zp="\u2566",Jp="\u2534",em="\u2567",tm="\u2568",nm="\u2569",rm="\u229F",im="\u229E",am="\u22A0",om="\u2518",sm="\u255B",lm="\u255C",cm="\u255D",um="\u2514",dm="\u2558",_m="\u2559",pm="\u255A",mm="\u2502",fm="\u2551",gm="\u253C",hm="\u256A",Em="\u256B",Sm="\u256C",bm="\u2524",vm="\u2561",Tm="\u2562",ym="\u2563",Cm="\u251C",Rm="\u255E",Om="\u255F",Nm="\u2560",Am="\u2035",Im="\u02D8",Dm="\u02D8",xm="\xA6",wm="\u{1D4B7}",Mm="\u212C",Lm="\u204F",km="\u223D",Pm="\u22CD",Bm="\u29C5",Fm="\\",Um="\u27C8",Gm="\u2022",qm="\u2022",Ym="\u224E",zm="\u2AAE",$m="\u224F",Hm="\u224E",Vm="\u224F",Wm="\u0106",Km="\u0107",Qm="\u2A44",jm="\u2A49",Xm="\u2A4B",Zm="\u2229",Jm="\u22D2",ef="\u2A47",tf="\u2A40",nf="\u2145",rf="\u2229\uFE00",af="\u2041",of="\u02C7",sf="\u212D",lf="\u2A4D",cf="\u010C",uf="\u010D",df="\xC7",_f="\xE7",pf="\u0108",mf="\u0109",ff="\u2230",gf="\u2A4C",hf="\u2A50",Ef="\u010A",Sf="\u010B",bf="\xB8",vf="\xB8",Tf="\u29B2",yf="\xA2",Cf="\xB7",Rf="\xB7",Of="\u{1D520}",Nf="\u212D",Af="\u0427",If="\u0447",Df="\u2713",xf="\u2713",wf="\u03A7",Mf="\u03C7",Lf="\u02C6",kf="\u2257",Pf="\u21BA",Bf="\u21BB",Ff="\u229B",Uf="\u229A",Gf="\u229D",qf="\u2299",Yf="\xAE",zf="\u24C8",$f="\u2296",Hf="\u2295",Vf="\u2297",Wf="\u25CB",Kf="\u29C3",Qf="\u2257",jf="\u2A10",Xf="\u2AEF",Zf="\u29C2",Jf="\u2232",e0="\u201D",t0="\u2019",n0="\u2663",r0="\u2663",i0=":",a0="\u2237",o0="\u2A74",s0="\u2254",l0="\u2254",c0=",",u0="@",d0="\u2201",_0="\u2218",p0="\u2201",m0="\u2102",f0="\u2245",g0="\u2A6D",h0="\u2261",E0="\u222E",S0="\u222F",b0="\u222E",v0="\u{1D554}",T0="\u2102",y0="\u2210",C0="\u2210",R0="\xA9",O0="\xA9",N0="\u2117",A0="\u2233",I0="\u21B5",D0="\u2717",x0="\u2A2F",w0="\u{1D49E}",M0="\u{1D4B8}",L0="\u2ACF",k0="\u2AD1",P0="\u2AD0",B0="\u2AD2",F0="\u22EF",U0="\u2938",G0="\u2935",q0="\u22DE",Y0="\u22DF",z0="\u21B6",$0="\u293D",H0="\u2A48",V0="\u2A46",W0="\u224D",K0="\u222A",Q0="\u22D3",j0="\u2A4A",X0="\u228D",Z0="\u2A45",J0="\u222A\uFE00",eg="\u21B7",tg="\u293C",ng="\u22DE",rg="\u22DF",ig="\u22CE",ag="\u22CF",og="\xA4",sg="\u21B6",lg="\u21B7",cg="\u22CE",ug="\u22CF",dg="\u2232",_g="\u2231",pg="\u232D",mg="\u2020",fg="\u2021",gg="\u2138",hg="\u2193",Eg="\u21A1",Sg="\u21D3",bg="\u2010",vg="\u2AE4",Tg="\u22A3",yg="\u290F",Cg="\u02DD",Rg="\u010E",Og="\u010F",Ng="\u0414",Ag="\u0434",Ig="\u2021",Dg="\u21CA",xg="\u2145",wg="\u2146",Mg="\u2911",Lg="\u2A77",kg="\xB0",Pg="\u2207",Bg="\u0394",Fg="\u03B4",Ug="\u29B1",Gg="\u297F",qg="\u{1D507}",Yg="\u{1D521}",zg="\u2965",$g="\u21C3",Hg="\u21C2",Vg="\xB4",Wg="\u02D9",Kg="\u02DD",Qg="`",jg="\u02DC",Xg="\u22C4",Zg="\u22C4",Jg="\u22C4",eh="\u2666",th="\u2666",nh="\xA8",rh="\u2146",ih="\u03DD",ah="\u22F2",oh="\xF7",sh="\xF7",lh="\u22C7",ch="\u22C7",uh="\u0402",dh="\u0452",_h="\u231E",ph="\u230D",mh="$",fh="\u{1D53B}",gh="\u{1D555}",hh="\xA8",Eh="\u02D9",Sh="\u20DC",bh="\u2250",vh="\u2251",Th="\u2250",yh="\u2238",Ch="\u2214",Rh="\u22A1",Oh="\u2306",Nh="\u222F",Ah="\xA8",Ih="\u21D3",Dh="\u21D0",xh="\u21D4",wh="\u2AE4",Mh="\u27F8",Lh="\u27FA",kh="\u27F9",Ph="\u21D2",Bh="\u22A8",Fh="\u21D1",Uh="\u21D5",Gh="\u2225",qh="\u2913",Yh="\u2193",zh="\u2193",$h="\u21D3",Hh="\u21F5",Vh="\u0311",Wh="\u21CA",Kh="\u21C3",Qh="\u21C2",jh="\u2950",Xh="\u295E",Zh="\u2956",Jh="\u21BD",eE="\u295F",tE="\u2957",nE="\u21C1",rE="\u21A7",iE="\u22A4",aE="\u2910",oE="\u231F",sE="\u230C",lE="\u{1D49F}",cE="\u{1D4B9}",uE="\u0405",dE="\u0455",_E="\u29F6",pE="\u0110",mE="\u0111",fE="\u22F1",gE="\u25BF",hE="\u25BE",EE="\u21F5",SE="\u296F",bE="\u29A6",vE="\u040F",TE="\u045F",yE="\u27FF",CE="\xC9",RE="\xE9",OE="\u2A6E",NE="\u011A",AE="\u011B",IE="\xCA",DE="\xEA",xE="\u2256",wE="\u2255",ME="\u042D",LE="\u044D",kE="\u2A77",PE="\u0116",BE="\u0117",FE="\u2251",UE="\u2147",GE="\u2252",qE="\u{1D508}",YE="\u{1D522}",zE="\u2A9A",$E="\xC8",HE="\xE8",VE="\u2A96",WE="\u2A98",KE="\u2A99",QE="\u2208",jE="\u23E7",XE="\u2113",ZE="\u2A95",JE="\u2A97",eS="\u0112",tS="\u0113",nS="\u2205",rS="\u2205",iS="\u25FB",aS="\u2205",oS="\u25AB",sS="\u2004",lS="\u2005",cS="\u2003",uS="\u014A",dS="\u014B",_S="\u2002",pS="\u0118",mS="\u0119",fS="\u{1D53C}",gS="\u{1D556}",hS="\u22D5",ES="\u29E3",SS="\u2A71",bS="\u03B5",vS="\u0395",TS="\u03B5",yS="\u03F5",CS="\u2256",RS="\u2255",OS="\u2242",NS="\u2A96",AS="\u2A95",IS="\u2A75",DS="=",xS="\u2242",wS="\u225F",MS="\u21CC",LS="\u2261",kS="\u2A78",PS="\u29E5",BS="\u2971",FS="\u2253",US="\u212F",GS="\u2130",qS="\u2250",YS="\u2A73",zS="\u2242",$S="\u0397",HS="\u03B7",VS="\xD0",WS="\xF0",KS="\xCB",QS="\xEB",jS="\u20AC",XS="!",ZS="\u2203",JS="\u2203",eb="\u2130",tb="\u2147",nb="\u2147",rb="\u2252",ib="\u0424",ab="\u0444",ob="\u2640",sb="\uFB03",lb="\uFB00",cb="\uFB04",ub="\u{1D509}",db="\u{1D523}",_b="\uFB01",pb="\u25FC",mb="\u25AA",fb="fj",gb="\u266D",hb="\uFB02",Eb="\u25B1",Sb="\u0192",bb="\u{1D53D}",vb="\u{1D557}",Tb="\u2200",yb="\u2200",Cb="\u22D4",Rb="\u2AD9",Ob="\u2131",Nb="\u2A0D",Ab="\xBD",Ib="\u2153",Db="\xBC",xb="\u2155",wb="\u2159",Mb="\u215B",Lb="\u2154",kb="\u2156",Pb="\xBE",Bb="\u2157",Fb="\u215C",Ub="\u2158",Gb="\u215A",qb="\u215D",Yb="\u215E",zb="\u2044",$b="\u2322",Hb="\u{1D4BB}",Vb="\u2131",Wb="\u01F5",Kb="\u0393",Qb="\u03B3",jb="\u03DC",Xb="\u03DD",Zb="\u2A86",Jb="\u011E",ev="\u011F",tv="\u0122",nv="\u011C",rv="\u011D",iv="\u0413",av="\u0433",ov="\u0120",sv="\u0121",lv="\u2265",cv="\u2267",uv="\u2A8C",dv="\u22DB",_v="\u2265",pv="\u2267",mv="\u2A7E",fv="\u2AA9",gv="\u2A7E",hv="\u2A80",Ev="\u2A82",Sv="\u2A84",bv="\u22DB\uFE00",vv="\u2A94",Tv="\u{1D50A}",yv="\u{1D524}",Cv="\u226B",Rv="\u22D9",Ov="\u22D9",Nv="\u2137",Av="\u0403",Iv="\u0453",Dv="\u2AA5",xv="\u2277",wv="\u2A92",Mv="\u2AA4",Lv="\u2A8A",kv="\u2A8A",Pv="\u2A88",Bv="\u2269",Fv="\u2A88",Uv="\u2269",Gv="\u22E7",qv="\u{1D53E}",Yv="\u{1D558}",zv="`",$v="\u2265",Hv="\u22DB",Vv="\u2267",Wv="\u2AA2",Kv="\u2277",Qv="\u2A7E",jv="\u2273",Xv="\u{1D4A2}",Zv="\u210A",Jv="\u2273",eT="\u2A8E",tT="\u2A90",nT="\u2AA7",rT="\u2A7A",iT=">",aT=">",oT="\u226B",sT="\u22D7",lT="\u2995",cT="\u2A7C",uT="\u2A86",dT="\u2978",_T="\u22D7",pT="\u22DB",mT="\u2A8C",fT="\u2277",gT="\u2273",hT="\u2269\uFE00",ET="\u2269\uFE00",ST="\u02C7",bT="\u200A",vT="\xBD",TT="\u210B",yT="\u042A",CT="\u044A",RT="\u2948",OT="\u2194",NT="\u21D4",AT="\u21AD",IT="^",DT="\u210F",xT="\u0124",wT="\u0125",MT="\u2665",LT="\u2665",kT="\u2026",PT="\u22B9",BT="\u{1D525}",FT="\u210C",UT="\u210B",GT="\u2925",qT="\u2926",YT="\u21FF",zT="\u223B",$T="\u21A9",HT="\u21AA",VT="\u{1D559}",WT="\u210D",KT="\u2015",QT="\u2500",jT="\u{1D4BD}",XT="\u210B",ZT="\u210F",JT="\u0126",ey="\u0127",ty="\u224E",ny="\u224F",ry="\u2043",iy="\u2010",ay="\xCD",oy="\xED",sy="\u2063",ly="\xCE",cy="\xEE",uy="\u0418",dy="\u0438",_y="\u0130",py="\u0415",my="\u0435",fy="\xA1",gy="\u21D4",hy="\u{1D526}",Ey="\u2111",Sy="\xCC",by="\xEC",vy="\u2148",Ty="\u2A0C",yy="\u222D",Cy="\u29DC",Ry="\u2129",Oy="\u0132",Ny="\u0133",Ay="\u012A",Iy="\u012B",Dy="\u2111",xy="\u2148",wy="\u2110",My="\u2111",Ly="\u0131",ky="\u2111",Py="\u22B7",By="\u01B5",Fy="\u21D2",Uy="\u2105",Gy="\u221E",qy="\u29DD",Yy="\u0131",zy="\u22BA",$y="\u222B",Hy="\u222C",Vy="\u2124",Wy="\u222B",Ky="\u22BA",Qy="\u22C2",jy="\u2A17",Xy="\u2A3C",Zy="\u2063",Jy="\u2062",e1="\u0401",t1="\u0451",n1="\u012E",r1="\u012F",i1="\u{1D540}",a1="\u{1D55A}",o1="\u0399",s1="\u03B9",l1="\u2A3C",c1="\xBF",u1="\u{1D4BE}",d1="\u2110",_1="\u2208",p1="\u22F5",m1="\u22F9",f1="\u22F4",g1="\u22F3",h1="\u2208",E1="\u2062",S1="\u0128",b1="\u0129",v1="\u0406",T1="\u0456",y1="\xCF",C1="\xEF",R1="\u0134",O1="\u0135",N1="\u0419",A1="\u0439",I1="\u{1D50D}",D1="\u{1D527}",x1="\u0237",w1="\u{1D541}",M1="\u{1D55B}",L1="\u{1D4A5}",k1="\u{1D4BF}",P1="\u0408",B1="\u0458",F1="\u0404",U1="\u0454",G1="\u039A",q1="\u03BA",Y1="\u03F0",z1="\u0136",$1="\u0137",H1="\u041A",V1="\u043A",W1="\u{1D50E}",K1="\u{1D528}",Q1="\u0138",j1="\u0425",X1="\u0445",Z1="\u040C",J1="\u045C",eC="\u{1D542}",tC="\u{1D55C}",nC="\u{1D4A6}",rC="\u{1D4C0}",iC="\u21DA",aC="\u0139",oC="\u013A",sC="\u29B4",lC="\u2112",cC="\u039B",uC="\u03BB",dC="\u27E8",_C="\u27EA",pC="\u2991",mC="\u27E8",fC="\u2A85",gC="\u2112",hC="\xAB",EC="\u21E4",SC="\u291F",bC="\u2190",vC="\u219E",TC="\u21D0",yC="\u291D",CC="\u21A9",RC="\u21AB",OC="\u2939",NC="\u2973",AC="\u21A2",IC="\u2919",DC="\u291B",xC="\u2AAB",wC="\u2AAD",MC="\u2AAD\uFE00",LC="\u290C",kC="\u290E",PC="\u2772",BC="{",FC="[",UC="\u298B",GC="\u298F",qC="\u298D",YC="\u013D",zC="\u013E",$C="\u013B",HC="\u013C",VC="\u2308",WC="{",KC="\u041B",QC="\u043B",jC="\u2936",XC="\u201C",ZC="\u201E",JC="\u2967",eR="\u294B",tR="\u21B2",nR="\u2264",rR="\u2266",iR="\u27E8",aR="\u21E4",oR="\u2190",sR="\u2190",lR="\u21D0",cR="\u21C6",uR="\u21A2",dR="\u2308",_R="\u27E6",pR="\u2961",mR="\u2959",fR="\u21C3",gR="\u230A",hR="\u21BD",ER="\u21BC",SR="\u21C7",bR="\u2194",vR="\u2194",TR="\u21D4",yR="\u21C6",CR="\u21CB",RR="\u21AD",OR="\u294E",NR="\u21A4",AR="\u22A3",IR="\u295A",DR="\u22CB",xR="\u29CF",wR="\u22B2",MR="\u22B4",LR="\u2951",kR="\u2960",PR="\u2958",BR="\u21BF",FR="\u2952",UR="\u21BC",GR="\u2A8B",qR="\u22DA",YR="\u2264",zR="\u2266",$R="\u2A7D",HR="\u2AA8",VR="\u2A7D",WR="\u2A7F",KR="\u2A81",QR="\u2A83",jR="\u22DA\uFE00",XR="\u2A93",ZR="\u2A85",JR="\u22D6",eO="\u22DA",tO="\u2A8B",nO="\u22DA",rO="\u2266",iO="\u2276",aO="\u2276",oO="\u2AA1",sO="\u2272",lO="\u2A7D",cO="\u2272",uO="\u297C",dO="\u230A",_O="\u{1D50F}",pO="\u{1D529}",mO="\u2276",fO="\u2A91",gO="\u2962",hO="\u21BD",EO="\u21BC",SO="\u296A",bO="\u2584",vO="\u0409",TO="\u0459",yO="\u21C7",CO="\u226A",RO="\u22D8",OO="\u231E",NO="\u21DA",AO="\u296B",IO="\u25FA",DO="\u013F",xO="\u0140",wO="\u23B0",MO="\u23B0",LO="\u2A89",kO="\u2A89",PO="\u2A87",BO="\u2268",FO="\u2A87",UO="\u2268",GO="\u22E6",qO="\u27EC",YO="\u21FD",zO="\u27E6",$O="\u27F5",HO="\u27F5",VO="\u27F8",WO="\u27F7",KO="\u27F7",QO="\u27FA",jO="\u27FC",XO="\u27F6",ZO="\u27F6",JO="\u27F9",eN="\u21AB",tN="\u21AC",nN="\u2985",rN="\u{1D543}",iN="\u{1D55D}",aN="\u2A2D",oN="\u2A34",sN="\u2217",lN="_",cN="\u2199",uN="\u2198",dN="\u25CA",_N="\u25CA",pN="\u29EB",mN="(",fN="\u2993",gN="\u21C6",hN="\u231F",EN="\u21CB",SN="\u296D",bN="\u200E",vN="\u22BF",TN="\u2039",yN="\u{1D4C1}",CN="\u2112",RN="\u21B0",ON="\u21B0",NN="\u2272",AN="\u2A8D",IN="\u2A8F",DN="[",xN="\u2018",wN="\u201A",MN="\u0141",LN="\u0142",kN="\u2AA6",PN="\u2A79",BN="<",FN="<",UN="\u226A",GN="\u22D6",qN="\u22CB",YN="\u22C9",zN="\u2976",$N="\u2A7B",HN="\u25C3",VN="\u22B4",WN="\u25C2",KN="\u2996",QN="\u294A",jN="\u2966",XN="\u2268\uFE00",ZN="\u2268\uFE00",JN="\xAF",eA="\u2642",tA="\u2720",nA="\u2720",rA="\u21A6",iA="\u21A6",aA="\u21A7",oA="\u21A4",sA="\u21A5",lA="\u25AE",cA="\u2A29",uA="\u041C",dA="\u043C",_A="\u2014",pA="\u223A",mA="\u2221",fA="\u205F",gA="\u2133",hA="\u{1D510}",EA="\u{1D52A}",SA="\u2127",bA="\xB5",vA="*",TA="\u2AF0",yA="\u2223",CA="\xB7",RA="\u229F",OA="\u2212",NA="\u2238",AA="\u2A2A",IA="\u2213",DA="\u2ADB",xA="\u2026",wA="\u2213",MA="\u22A7",LA="\u{1D544}",kA="\u{1D55E}",PA="\u2213",BA="\u{1D4C2}",FA="\u2133",UA="\u223E",GA="\u039C",qA="\u03BC",YA="\u22B8",zA="\u22B8",HA="\u2207",VA="\u0143",WA="\u0144",KA="\u2220\u20D2",QA="\u2249",jA="\u2A70\u0338",XA="\u224B\u0338",ZA="\u0149",JA="\u2249",eI="\u266E",tI="\u2115",nI="\u266E",rI="\xA0",iI="\u224E\u0338",aI="\u224F\u0338",oI="\u2A43",sI="\u0147",lI="\u0148",cI="\u0145",uI="\u0146",dI="\u2247",_I="\u2A6D\u0338",pI="\u2A42",mI="\u041D",fI="\u043D",gI="\u2013",hI="\u2924",EI="\u2197",SI="\u21D7",bI="\u2197",vI="\u2260",TI="\u2250\u0338",yI="\u200B",CI="\u200B",RI="\u200B",OI="\u200B",NI="\u2262",AI="\u2928",II="\u2242\u0338",DI="\u226B",xI="\u226A",wI=` +import{n as Kt,g as qu,f as Ya,m as jn,b as Cl,a as _i,h as Yu,j as zu,r as $u,V as Hu,i as Vu}from"./app.6910ca56.js";import{l as za}from"./longpress.43ca7fd9.js";import{D as Wu}from"./index.8984a77c.js";import{U as Rl}from"./UserSelect.1938cd94.js";import{I as Ku}from"./ImgUpload.8863e78d.js";import Qu from"./details.97854344.js";import{U as ju}from"./tip.6872e3c6.js";var Xu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-circle",style:e.style,attrs:{"data-id":e.percent}},[n("svg",{attrs:{viewBox:"0 0 28 28"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[n("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),n("g",{attrs:{"fill-rule":"nonzero"}},[n("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:e.arc(e.args)}})])])])])},Zu=[];const Ju={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style(){let{size:e}=this;return this.isNumeric(e)&&(e+="px"),{width:e,height:e}},args(){const{percent:e}=this;let t=Math.min(360,360/100*e);return t==360?t=0:t==0&&(t=360),{x:14,y:14,r:14,start:360,end:t}}},methods:{isNumeric(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)},point(e,t,n,r){return[(e+Math.sin(r)*n).toFixed(2),(t-Math.cos(r)*n).toFixed(2)]},full(e,t,n,r){return r<=0?`M ${e-n} ${t} A ${n} ${n} 0 1 1 ${e+n} ${t} A ${n} ${n} 1 1 1 ${e-n} ${t} Z`:`M ${e-n} ${t} A ${n} ${n} 0 1 1 ${e+n} ${t} A ${n} ${n} 1 1 1 ${e-n} ${t} M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 1 1 1 ${e-r} ${t} Z`},part(e,t,n,r,a,l){const[u,c]=[a/360*2*Math.PI,l/360*2*Math.PI],d=[this.point(e,t,r,u),this.point(e,t,n,u),this.point(e,t,n,c),this.point(e,t,r,c)],g=c-u>Math.PI?"1":"0";return`M ${d[0][0]} ${d[0][1]} L ${d[1][0]} ${d[1][1]} A ${n} ${n} 0 ${g} 1 ${d[2][0]} ${d[2][1]} L ${d[3][0]} ${d[3][1]} A ${r} ${r} 0 ${g} 0 ${d[0][0]} ${d[0][1]} Z`},arc(e){const{x:t=0,y:n=0}=e;let{R:r=0,r:a=0,start:l,end:u}=e;return[r,a]=[Math.max(r,a),Math.min(r,a)],r<=0?"":l!==+l||u!==+u?this.full(t,n,r,a):Math.abs(l-u)<1e-6?"":Math.abs(l-u)%360<1e-6?this.full(t,n,r,a):([l,u]=[l%360,u%360],l>u&&(u+=360),this.part(t,n,r,a,l,u))}}},Ss={};var ed=Kt(Ju,Xu,Zu,!1,td,null,null,null);function td(e){for(let t in Ss)this[t]=Ss[t]}var nd=function(){return ed.exports}();var Ze={};const rd="\xC1",id="\xE1",ad="\u0102",od="\u0103",sd="\u223E",ld="\u223F",cd="\u223E\u0333",ud="\xC2",dd="\xE2",_d="\xB4",pd="\u0410",md="\u0430",fd="\xC6",gd="\xE6",hd="\u2061",Ed="\u{1D504}",Sd="\u{1D51E}",bd="\xC0",vd="\xE0",Td="\u2135",yd="\u2135",Cd="\u0391",Rd="\u03B1",Od="\u0100",Nd="\u0101",Ad="\u2A3F",Id="&",Dd="&",xd="\u2A55",wd="\u2A53",Md="\u2227",Ld="\u2A5C",kd="\u2A58",Pd="\u2A5A",Bd="\u2220",Fd="\u29A4",Ud="\u2220",Gd="\u29A8",qd="\u29A9",Yd="\u29AA",zd="\u29AB",$d="\u29AC",Hd="\u29AD",Vd="\u29AE",Wd="\u29AF",Kd="\u2221",Qd="\u221F",jd="\u22BE",Xd="\u299D",Zd="\u2222",Jd="\xC5",e_="\u237C",t_="\u0104",n_="\u0105",r_="\u{1D538}",i_="\u{1D552}",a_="\u2A6F",o_="\u2248",s_="\u2A70",l_="\u224A",c_="\u224B",u_="'",d_="\u2061",__="\u2248",p_="\u224A",m_="\xC5",f_="\xE5",g_="\u{1D49C}",h_="\u{1D4B6}",E_="\u2254",S_="*",b_="\u2248",v_="\u224D",T_="\xC3",y_="\xE3",C_="\xC4",R_="\xE4",O_="\u2233",N_="\u2A11",A_="\u224C",I_="\u03F6",D_="\u2035",x_="\u223D",w_="\u22CD",M_="\u2216",L_="\u2AE7",k_="\u22BD",P_="\u2305",B_="\u2306",F_="\u2305",U_="\u23B5",G_="\u23B6",q_="\u224C",Y_="\u0411",z_="\u0431",$_="\u201E",H_="\u2235",V_="\u2235",W_="\u2235",K_="\u29B0",Q_="\u03F6",j_="\u212C",X_="\u212C",Z_="\u0392",J_="\u03B2",ep="\u2136",tp="\u226C",np="\u{1D505}",rp="\u{1D51F}",ip="\u22C2",ap="\u25EF",op="\u22C3",sp="\u2A00",lp="\u2A01",cp="\u2A02",up="\u2A06",dp="\u2605",_p="\u25BD",pp="\u25B3",mp="\u2A04",fp="\u22C1",gp="\u22C0",hp="\u290D",Ep="\u29EB",Sp="\u25AA",bp="\u25B4",vp="\u25BE",Tp="\u25C2",yp="\u25B8",Cp="\u2423",Rp="\u2592",Op="\u2591",Np="\u2593",Ap="\u2588",Ip="=\u20E5",Dp="\u2261\u20E5",xp="\u2AED",wp="\u2310",Mp="\u{1D539}",Lp="\u{1D553}",kp="\u22A5",Pp="\u22A5",Bp="\u22C8",Fp="\u29C9",Up="\u2510",Gp="\u2555",qp="\u2556",Yp="\u2557",zp="\u250C",$p="\u2552",Hp="\u2553",Vp="\u2554",Wp="\u2500",Kp="\u2550",Qp="\u252C",jp="\u2564",Xp="\u2565",Zp="\u2566",Jp="\u2534",em="\u2567",tm="\u2568",nm="\u2569",rm="\u229F",im="\u229E",am="\u22A0",om="\u2518",sm="\u255B",lm="\u255C",cm="\u255D",um="\u2514",dm="\u2558",_m="\u2559",pm="\u255A",mm="\u2502",fm="\u2551",gm="\u253C",hm="\u256A",Em="\u256B",Sm="\u256C",bm="\u2524",vm="\u2561",Tm="\u2562",ym="\u2563",Cm="\u251C",Rm="\u255E",Om="\u255F",Nm="\u2560",Am="\u2035",Im="\u02D8",Dm="\u02D8",xm="\xA6",wm="\u{1D4B7}",Mm="\u212C",Lm="\u204F",km="\u223D",Pm="\u22CD",Bm="\u29C5",Fm="\\",Um="\u27C8",Gm="\u2022",qm="\u2022",Ym="\u224E",zm="\u2AAE",$m="\u224F",Hm="\u224E",Vm="\u224F",Wm="\u0106",Km="\u0107",Qm="\u2A44",jm="\u2A49",Xm="\u2A4B",Zm="\u2229",Jm="\u22D2",ef="\u2A47",tf="\u2A40",nf="\u2145",rf="\u2229\uFE00",af="\u2041",of="\u02C7",sf="\u212D",lf="\u2A4D",cf="\u010C",uf="\u010D",df="\xC7",_f="\xE7",pf="\u0108",mf="\u0109",ff="\u2230",gf="\u2A4C",hf="\u2A50",Ef="\u010A",Sf="\u010B",bf="\xB8",vf="\xB8",Tf="\u29B2",yf="\xA2",Cf="\xB7",Rf="\xB7",Of="\u{1D520}",Nf="\u212D",Af="\u0427",If="\u0447",Df="\u2713",xf="\u2713",wf="\u03A7",Mf="\u03C7",Lf="\u02C6",kf="\u2257",Pf="\u21BA",Bf="\u21BB",Ff="\u229B",Uf="\u229A",Gf="\u229D",qf="\u2299",Yf="\xAE",zf="\u24C8",$f="\u2296",Hf="\u2295",Vf="\u2297",Wf="\u25CB",Kf="\u29C3",Qf="\u2257",jf="\u2A10",Xf="\u2AEF",Zf="\u29C2",Jf="\u2232",e0="\u201D",t0="\u2019",n0="\u2663",r0="\u2663",i0=":",a0="\u2237",o0="\u2A74",s0="\u2254",l0="\u2254",c0=",",u0="@",d0="\u2201",_0="\u2218",p0="\u2201",m0="\u2102",f0="\u2245",g0="\u2A6D",h0="\u2261",E0="\u222E",S0="\u222F",b0="\u222E",v0="\u{1D554}",T0="\u2102",y0="\u2210",C0="\u2210",R0="\xA9",O0="\xA9",N0="\u2117",A0="\u2233",I0="\u21B5",D0="\u2717",x0="\u2A2F",w0="\u{1D49E}",M0="\u{1D4B8}",L0="\u2ACF",k0="\u2AD1",P0="\u2AD0",B0="\u2AD2",F0="\u22EF",U0="\u2938",G0="\u2935",q0="\u22DE",Y0="\u22DF",z0="\u21B6",$0="\u293D",H0="\u2A48",V0="\u2A46",W0="\u224D",K0="\u222A",Q0="\u22D3",j0="\u2A4A",X0="\u228D",Z0="\u2A45",J0="\u222A\uFE00",eg="\u21B7",tg="\u293C",ng="\u22DE",rg="\u22DF",ig="\u22CE",ag="\u22CF",og="\xA4",sg="\u21B6",lg="\u21B7",cg="\u22CE",ug="\u22CF",dg="\u2232",_g="\u2231",pg="\u232D",mg="\u2020",fg="\u2021",gg="\u2138",hg="\u2193",Eg="\u21A1",Sg="\u21D3",bg="\u2010",vg="\u2AE4",Tg="\u22A3",yg="\u290F",Cg="\u02DD",Rg="\u010E",Og="\u010F",Ng="\u0414",Ag="\u0434",Ig="\u2021",Dg="\u21CA",xg="\u2145",wg="\u2146",Mg="\u2911",Lg="\u2A77",kg="\xB0",Pg="\u2207",Bg="\u0394",Fg="\u03B4",Ug="\u29B1",Gg="\u297F",qg="\u{1D507}",Yg="\u{1D521}",zg="\u2965",$g="\u21C3",Hg="\u21C2",Vg="\xB4",Wg="\u02D9",Kg="\u02DD",Qg="`",jg="\u02DC",Xg="\u22C4",Zg="\u22C4",Jg="\u22C4",eh="\u2666",th="\u2666",nh="\xA8",rh="\u2146",ih="\u03DD",ah="\u22F2",oh="\xF7",sh="\xF7",lh="\u22C7",ch="\u22C7",uh="\u0402",dh="\u0452",_h="\u231E",ph="\u230D",mh="$",fh="\u{1D53B}",gh="\u{1D555}",hh="\xA8",Eh="\u02D9",Sh="\u20DC",bh="\u2250",vh="\u2251",Th="\u2250",yh="\u2238",Ch="\u2214",Rh="\u22A1",Oh="\u2306",Nh="\u222F",Ah="\xA8",Ih="\u21D3",Dh="\u21D0",xh="\u21D4",wh="\u2AE4",Mh="\u27F8",Lh="\u27FA",kh="\u27F9",Ph="\u21D2",Bh="\u22A8",Fh="\u21D1",Uh="\u21D5",Gh="\u2225",qh="\u2913",Yh="\u2193",zh="\u2193",$h="\u21D3",Hh="\u21F5",Vh="\u0311",Wh="\u21CA",Kh="\u21C3",Qh="\u21C2",jh="\u2950",Xh="\u295E",Zh="\u2956",Jh="\u21BD",eE="\u295F",tE="\u2957",nE="\u21C1",rE="\u21A7",iE="\u22A4",aE="\u2910",oE="\u231F",sE="\u230C",lE="\u{1D49F}",cE="\u{1D4B9}",uE="\u0405",dE="\u0455",_E="\u29F6",pE="\u0110",mE="\u0111",fE="\u22F1",gE="\u25BF",hE="\u25BE",EE="\u21F5",SE="\u296F",bE="\u29A6",vE="\u040F",TE="\u045F",yE="\u27FF",CE="\xC9",RE="\xE9",OE="\u2A6E",NE="\u011A",AE="\u011B",IE="\xCA",DE="\xEA",xE="\u2256",wE="\u2255",ME="\u042D",LE="\u044D",kE="\u2A77",PE="\u0116",BE="\u0117",FE="\u2251",UE="\u2147",GE="\u2252",qE="\u{1D508}",YE="\u{1D522}",zE="\u2A9A",$E="\xC8",HE="\xE8",VE="\u2A96",WE="\u2A98",KE="\u2A99",QE="\u2208",jE="\u23E7",XE="\u2113",ZE="\u2A95",JE="\u2A97",eS="\u0112",tS="\u0113",nS="\u2205",rS="\u2205",iS="\u25FB",aS="\u2205",oS="\u25AB",sS="\u2004",lS="\u2005",cS="\u2003",uS="\u014A",dS="\u014B",_S="\u2002",pS="\u0118",mS="\u0119",fS="\u{1D53C}",gS="\u{1D556}",hS="\u22D5",ES="\u29E3",SS="\u2A71",bS="\u03B5",vS="\u0395",TS="\u03B5",yS="\u03F5",CS="\u2256",RS="\u2255",OS="\u2242",NS="\u2A96",AS="\u2A95",IS="\u2A75",DS="=",xS="\u2242",wS="\u225F",MS="\u21CC",LS="\u2261",kS="\u2A78",PS="\u29E5",BS="\u2971",FS="\u2253",US="\u212F",GS="\u2130",qS="\u2250",YS="\u2A73",zS="\u2242",$S="\u0397",HS="\u03B7",VS="\xD0",WS="\xF0",KS="\xCB",QS="\xEB",jS="\u20AC",XS="!",ZS="\u2203",JS="\u2203",eb="\u2130",tb="\u2147",nb="\u2147",rb="\u2252",ib="\u0424",ab="\u0444",ob="\u2640",sb="\uFB03",lb="\uFB00",cb="\uFB04",ub="\u{1D509}",db="\u{1D523}",_b="\uFB01",pb="\u25FC",mb="\u25AA",fb="fj",gb="\u266D",hb="\uFB02",Eb="\u25B1",Sb="\u0192",bb="\u{1D53D}",vb="\u{1D557}",Tb="\u2200",yb="\u2200",Cb="\u22D4",Rb="\u2AD9",Ob="\u2131",Nb="\u2A0D",Ab="\xBD",Ib="\u2153",Db="\xBC",xb="\u2155",wb="\u2159",Mb="\u215B",Lb="\u2154",kb="\u2156",Pb="\xBE",Bb="\u2157",Fb="\u215C",Ub="\u2158",Gb="\u215A",qb="\u215D",Yb="\u215E",zb="\u2044",$b="\u2322",Hb="\u{1D4BB}",Vb="\u2131",Wb="\u01F5",Kb="\u0393",Qb="\u03B3",jb="\u03DC",Xb="\u03DD",Zb="\u2A86",Jb="\u011E",ev="\u011F",tv="\u0122",nv="\u011C",rv="\u011D",iv="\u0413",av="\u0433",ov="\u0120",sv="\u0121",lv="\u2265",cv="\u2267",uv="\u2A8C",dv="\u22DB",_v="\u2265",pv="\u2267",mv="\u2A7E",fv="\u2AA9",gv="\u2A7E",hv="\u2A80",Ev="\u2A82",Sv="\u2A84",bv="\u22DB\uFE00",vv="\u2A94",Tv="\u{1D50A}",yv="\u{1D524}",Cv="\u226B",Rv="\u22D9",Ov="\u22D9",Nv="\u2137",Av="\u0403",Iv="\u0453",Dv="\u2AA5",xv="\u2277",wv="\u2A92",Mv="\u2AA4",Lv="\u2A8A",kv="\u2A8A",Pv="\u2A88",Bv="\u2269",Fv="\u2A88",Uv="\u2269",Gv="\u22E7",qv="\u{1D53E}",Yv="\u{1D558}",zv="`",$v="\u2265",Hv="\u22DB",Vv="\u2267",Wv="\u2AA2",Kv="\u2277",Qv="\u2A7E",jv="\u2273",Xv="\u{1D4A2}",Zv="\u210A",Jv="\u2273",eT="\u2A8E",tT="\u2A90",nT="\u2AA7",rT="\u2A7A",iT=">",aT=">",oT="\u226B",sT="\u22D7",lT="\u2995",cT="\u2A7C",uT="\u2A86",dT="\u2978",_T="\u22D7",pT="\u22DB",mT="\u2A8C",fT="\u2277",gT="\u2273",hT="\u2269\uFE00",ET="\u2269\uFE00",ST="\u02C7",bT="\u200A",vT="\xBD",TT="\u210B",yT="\u042A",CT="\u044A",RT="\u2948",OT="\u2194",NT="\u21D4",AT="\u21AD",IT="^",DT="\u210F",xT="\u0124",wT="\u0125",MT="\u2665",LT="\u2665",kT="\u2026",PT="\u22B9",BT="\u{1D525}",FT="\u210C",UT="\u210B",GT="\u2925",qT="\u2926",YT="\u21FF",zT="\u223B",$T="\u21A9",HT="\u21AA",VT="\u{1D559}",WT="\u210D",KT="\u2015",QT="\u2500",jT="\u{1D4BD}",XT="\u210B",ZT="\u210F",JT="\u0126",ey="\u0127",ty="\u224E",ny="\u224F",ry="\u2043",iy="\u2010",ay="\xCD",oy="\xED",sy="\u2063",ly="\xCE",cy="\xEE",uy="\u0418",dy="\u0438",_y="\u0130",py="\u0415",my="\u0435",fy="\xA1",gy="\u21D4",hy="\u{1D526}",Ey="\u2111",Sy="\xCC",by="\xEC",vy="\u2148",Ty="\u2A0C",yy="\u222D",Cy="\u29DC",Ry="\u2129",Oy="\u0132",Ny="\u0133",Ay="\u012A",Iy="\u012B",Dy="\u2111",xy="\u2148",wy="\u2110",My="\u2111",Ly="\u0131",ky="\u2111",Py="\u22B7",By="\u01B5",Fy="\u21D2",Uy="\u2105",Gy="\u221E",qy="\u29DD",Yy="\u0131",zy="\u22BA",$y="\u222B",Hy="\u222C",Vy="\u2124",Wy="\u222B",Ky="\u22BA",Qy="\u22C2",jy="\u2A17",Xy="\u2A3C",Zy="\u2063",Jy="\u2062",e1="\u0401",t1="\u0451",n1="\u012E",r1="\u012F",i1="\u{1D540}",a1="\u{1D55A}",o1="\u0399",s1="\u03B9",l1="\u2A3C",c1="\xBF",u1="\u{1D4BE}",d1="\u2110",_1="\u2208",p1="\u22F5",m1="\u22F9",f1="\u22F4",g1="\u22F3",h1="\u2208",E1="\u2062",S1="\u0128",b1="\u0129",v1="\u0406",T1="\u0456",y1="\xCF",C1="\xEF",R1="\u0134",O1="\u0135",N1="\u0419",A1="\u0439",I1="\u{1D50D}",D1="\u{1D527}",x1="\u0237",w1="\u{1D541}",M1="\u{1D55B}",L1="\u{1D4A5}",k1="\u{1D4BF}",P1="\u0408",B1="\u0458",F1="\u0404",U1="\u0454",G1="\u039A",q1="\u03BA",Y1="\u03F0",z1="\u0136",$1="\u0137",H1="\u041A",V1="\u043A",W1="\u{1D50E}",K1="\u{1D528}",Q1="\u0138",j1="\u0425",X1="\u0445",Z1="\u040C",J1="\u045C",eC="\u{1D542}",tC="\u{1D55C}",nC="\u{1D4A6}",rC="\u{1D4C0}",iC="\u21DA",aC="\u0139",oC="\u013A",sC="\u29B4",lC="\u2112",cC="\u039B",uC="\u03BB",dC="\u27E8",_C="\u27EA",pC="\u2991",mC="\u27E8",fC="\u2A85",gC="\u2112",hC="\xAB",EC="\u21E4",SC="\u291F",bC="\u2190",vC="\u219E",TC="\u21D0",yC="\u291D",CC="\u21A9",RC="\u21AB",OC="\u2939",NC="\u2973",AC="\u21A2",IC="\u2919",DC="\u291B",xC="\u2AAB",wC="\u2AAD",MC="\u2AAD\uFE00",LC="\u290C",kC="\u290E",PC="\u2772",BC="{",FC="[",UC="\u298B",GC="\u298F",qC="\u298D",YC="\u013D",zC="\u013E",$C="\u013B",HC="\u013C",VC="\u2308",WC="{",KC="\u041B",QC="\u043B",jC="\u2936",XC="\u201C",ZC="\u201E",JC="\u2967",eR="\u294B",tR="\u21B2",nR="\u2264",rR="\u2266",iR="\u27E8",aR="\u21E4",oR="\u2190",sR="\u2190",lR="\u21D0",cR="\u21C6",uR="\u21A2",dR="\u2308",_R="\u27E6",pR="\u2961",mR="\u2959",fR="\u21C3",gR="\u230A",hR="\u21BD",ER="\u21BC",SR="\u21C7",bR="\u2194",vR="\u2194",TR="\u21D4",yR="\u21C6",CR="\u21CB",RR="\u21AD",OR="\u294E",NR="\u21A4",AR="\u22A3",IR="\u295A",DR="\u22CB",xR="\u29CF",wR="\u22B2",MR="\u22B4",LR="\u2951",kR="\u2960",PR="\u2958",BR="\u21BF",FR="\u2952",UR="\u21BC",GR="\u2A8B",qR="\u22DA",YR="\u2264",zR="\u2266",$R="\u2A7D",HR="\u2AA8",VR="\u2A7D",WR="\u2A7F",KR="\u2A81",QR="\u2A83",jR="\u22DA\uFE00",XR="\u2A93",ZR="\u2A85",JR="\u22D6",eO="\u22DA",tO="\u2A8B",nO="\u22DA",rO="\u2266",iO="\u2276",aO="\u2276",oO="\u2AA1",sO="\u2272",lO="\u2A7D",cO="\u2272",uO="\u297C",dO="\u230A",_O="\u{1D50F}",pO="\u{1D529}",mO="\u2276",fO="\u2A91",gO="\u2962",hO="\u21BD",EO="\u21BC",SO="\u296A",bO="\u2584",vO="\u0409",TO="\u0459",yO="\u21C7",CO="\u226A",RO="\u22D8",OO="\u231E",NO="\u21DA",AO="\u296B",IO="\u25FA",DO="\u013F",xO="\u0140",wO="\u23B0",MO="\u23B0",LO="\u2A89",kO="\u2A89",PO="\u2A87",BO="\u2268",FO="\u2A87",UO="\u2268",GO="\u22E6",qO="\u27EC",YO="\u21FD",zO="\u27E6",$O="\u27F5",HO="\u27F5",VO="\u27F8",WO="\u27F7",KO="\u27F7",QO="\u27FA",jO="\u27FC",XO="\u27F6",ZO="\u27F6",JO="\u27F9",eN="\u21AB",tN="\u21AC",nN="\u2985",rN="\u{1D543}",iN="\u{1D55D}",aN="\u2A2D",oN="\u2A34",sN="\u2217",lN="_",cN="\u2199",uN="\u2198",dN="\u25CA",_N="\u25CA",pN="\u29EB",mN="(",fN="\u2993",gN="\u21C6",hN="\u231F",EN="\u21CB",SN="\u296D",bN="\u200E",vN="\u22BF",TN="\u2039",yN="\u{1D4C1}",CN="\u2112",RN="\u21B0",ON="\u21B0",NN="\u2272",AN="\u2A8D",IN="\u2A8F",DN="[",xN="\u2018",wN="\u201A",MN="\u0141",LN="\u0142",kN="\u2AA6",PN="\u2A79",BN="<",FN="<",UN="\u226A",GN="\u22D6",qN="\u22CB",YN="\u22C9",zN="\u2976",$N="\u2A7B",HN="\u25C3",VN="\u22B4",WN="\u25C2",KN="\u2996",QN="\u294A",jN="\u2966",XN="\u2268\uFE00",ZN="\u2268\uFE00",JN="\xAF",eA="\u2642",tA="\u2720",nA="\u2720",rA="\u21A6",iA="\u21A6",aA="\u21A7",oA="\u21A4",sA="\u21A5",lA="\u25AE",cA="\u2A29",uA="\u041C",dA="\u043C",_A="\u2014",pA="\u223A",mA="\u2221",fA="\u205F",gA="\u2133",hA="\u{1D510}",EA="\u{1D52A}",SA="\u2127",bA="\xB5",vA="*",TA="\u2AF0",yA="\u2223",CA="\xB7",RA="\u229F",OA="\u2212",NA="\u2238",AA="\u2A2A",IA="\u2213",DA="\u2ADB",xA="\u2026",wA="\u2213",MA="\u22A7",LA="\u{1D544}",kA="\u{1D55E}",PA="\u2213",BA="\u{1D4C2}",FA="\u2133",UA="\u223E",GA="\u039C",qA="\u03BC",YA="\u22B8",zA="\u22B8",HA="\u2207",VA="\u0143",WA="\u0144",KA="\u2220\u20D2",QA="\u2249",jA="\u2A70\u0338",XA="\u224B\u0338",ZA="\u0149",JA="\u2249",eI="\u266E",tI="\u2115",nI="\u266E",rI="\xA0",iI="\u224E\u0338",aI="\u224F\u0338",oI="\u2A43",sI="\u0147",lI="\u0148",cI="\u0145",uI="\u0146",dI="\u2247",_I="\u2A6D\u0338",pI="\u2A42",mI="\u041D",fI="\u043D",gI="\u2013",hI="\u2924",EI="\u2197",SI="\u21D7",bI="\u2197",vI="\u2260",TI="\u2250\u0338",yI="\u200B",CI="\u200B",RI="\u200B",OI="\u200B",NI="\u2262",AI="\u2928",II="\u2242\u0338",DI="\u226B",xI="\u226A",wI=` `,MI="\u2204",LI="\u2204",kI="\u{1D511}",PI="\u{1D52B}",BI="\u2267\u0338",FI="\u2271",UI="\u2271",GI="\u2267\u0338",qI="\u2A7E\u0338",YI="\u2A7E\u0338",zI="\u22D9\u0338",$I="\u2275",HI="\u226B\u20D2",VI="\u226F",WI="\u226F",KI="\u226B\u0338",QI="\u21AE",jI="\u21CE",XI="\u2AF2",ZI="\u220B",JI="\u22FC",eD="\u22FA",tD="\u220B",nD="\u040A",rD="\u045A",iD="\u219A",aD="\u21CD",oD="\u2025",sD="\u2266\u0338",lD="\u2270",cD="\u219A",uD="\u21CD",dD="\u21AE",_D="\u21CE",pD="\u2270",mD="\u2266\u0338",fD="\u2A7D\u0338",gD="\u2A7D\u0338",hD="\u226E",ED="\u22D8\u0338",SD="\u2274",bD="\u226A\u20D2",vD="\u226E",TD="\u22EA",yD="\u22EC",CD="\u226A\u0338",RD="\u2224",OD="\u2060",ND="\xA0",AD="\u{1D55F}",ID="\u2115",DD="\u2AEC",xD="\xAC",wD="\u2262",MD="\u226D",LD="\u2226",kD="\u2209",PD="\u2260",BD="\u2242\u0338",FD="\u2204",UD="\u226F",GD="\u2271",qD="\u2267\u0338",YD="\u226B\u0338",zD="\u2279",$D="\u2A7E\u0338",HD="\u2275",VD="\u224E\u0338",WD="\u224F\u0338",KD="\u2209",QD="\u22F5\u0338",jD="\u22F9\u0338",XD="\u2209",ZD="\u22F7",JD="\u22F6",ex="\u29CF\u0338",tx="\u22EA",nx="\u22EC",rx="\u226E",ix="\u2270",ax="\u2278",ox="\u226A\u0338",sx="\u2A7D\u0338",lx="\u2274",cx="\u2AA2\u0338",ux="\u2AA1\u0338",dx="\u220C",_x="\u220C",px="\u22FE",mx="\u22FD",fx="\u2280",gx="\u2AAF\u0338",hx="\u22E0",Ex="\u220C",Sx="\u29D0\u0338",bx="\u22EB",vx="\u22ED",Tx="\u228F\u0338",yx="\u22E2",Cx="\u2290\u0338",Rx="\u22E3",Ox="\u2282\u20D2",Nx="\u2288",Ax="\u2281",Ix="\u2AB0\u0338",Dx="\u22E1",xx="\u227F\u0338",wx="\u2283\u20D2",Mx="\u2289",Lx="\u2241",kx="\u2244",Px="\u2247",Bx="\u2249",Fx="\u2224",Ux="\u2226",Gx="\u2226",qx="\u2AFD\u20E5",Yx="\u2202\u0338",zx="\u2A14",$x="\u2280",Hx="\u22E0",Vx="\u2280",Wx="\u2AAF\u0338",Kx="\u2AAF\u0338",Qx="\u2933\u0338",jx="\u219B",Xx="\u21CF",Zx="\u219D\u0338",Jx="\u219B",ew="\u21CF",tw="\u22EB",nw="\u22ED",rw="\u2281",iw="\u22E1",aw="\u2AB0\u0338",ow="\u{1D4A9}",sw="\u{1D4C3}",lw="\u2224",cw="\u2226",uw="\u2241",dw="\u2244",_w="\u2244",pw="\u2224",mw="\u2226",fw="\u22E2",gw="\u22E3",hw="\u2284",Ew="\u2AC5\u0338",Sw="\u2288",bw="\u2282\u20D2",vw="\u2288",Tw="\u2AC5\u0338",yw="\u2281",Cw="\u2AB0\u0338",Rw="\u2285",Ow="\u2AC6\u0338",Nw="\u2289",Aw="\u2283\u20D2",Iw="\u2289",Dw="\u2AC6\u0338",xw="\u2279",ww="\xD1",Mw="\xF1",Lw="\u2278",kw="\u22EA",Pw="\u22EC",Bw="\u22EB",Fw="\u22ED",Uw="\u039D",Gw="\u03BD",qw="#",Yw="\u2116",zw="\u2007",$w="\u224D\u20D2",Hw="\u22AC",Vw="\u22AD",Ww="\u22AE",Kw="\u22AF",Qw="\u2265\u20D2",jw=">\u20D2",Xw="\u2904",Zw="\u29DE",Jw="\u2902",e2="\u2264\u20D2",t2="<\u20D2",n2="\u22B4\u20D2",r2="\u2903",i2="\u22B5\u20D2",a2="\u223C\u20D2",o2="\u2923",s2="\u2196",l2="\u21D6",c2="\u2196",u2="\u2927",d2="\xD3",_2="\xF3",p2="\u229B",m2="\xD4",f2="\xF4",g2="\u229A",h2="\u041E",E2="\u043E",S2="\u229D",b2="\u0150",v2="\u0151",T2="\u2A38",y2="\u2299",C2="\u29BC",R2="\u0152",O2="\u0153",N2="\u29BF",A2="\u{1D512}",I2="\u{1D52C}",D2="\u02DB",x2="\xD2",w2="\xF2",M2="\u29C1",L2="\u29B5",k2="\u03A9",P2="\u222E",B2="\u21BA",F2="\u29BE",U2="\u29BB",G2="\u203E",q2="\u29C0",Y2="\u014C",z2="\u014D",$2="\u03A9",H2="\u03C9",V2="\u039F",W2="\u03BF",K2="\u29B6",Q2="\u2296",j2="\u{1D546}",X2="\u{1D560}",Z2="\u29B7",J2="\u201C",eM="\u2018",tM="\u29B9",nM="\u2295",rM="\u21BB",iM="\u2A54",aM="\u2228",oM="\u2A5D",sM="\u2134",lM="\u2134",cM="\xAA",uM="\xBA",dM="\u22B6",_M="\u2A56",pM="\u2A57",mM="\u2A5B",fM="\u24C8",gM="\u{1D4AA}",hM="\u2134",EM="\xD8",SM="\xF8",bM="\u2298",vM="\xD5",TM="\xF5",yM="\u2A36",CM="\u2A37",RM="\u2297",OM="\xD6",NM="\xF6",AM="\u233D",IM="\u203E",DM="\u23DE",xM="\u23B4",wM="\u23DC",MM="\xB6",LM="\u2225",kM="\u2225",PM="\u2AF3",BM="\u2AFD",FM="\u2202",UM="\u2202",GM="\u041F",qM="\u043F",YM="%",zM=".",$M="\u2030",HM="\u22A5",VM="\u2031",WM="\u{1D513}",KM="\u{1D52D}",QM="\u03A6",jM="\u03C6",XM="\u03D5",ZM="\u2133",JM="\u260E",e4="\u03A0",t4="\u03C0",n4="\u22D4",r4="\u03D6",i4="\u210F",a4="\u210E",o4="\u210F",s4="\u2A23",l4="\u229E",c4="\u2A22",u4="+",d4="\u2214",_4="\u2A25",p4="\u2A72",m4="\xB1",f4="\xB1",g4="\u2A26",h4="\u2A27",E4="\xB1",S4="\u210C",b4="\u2A15",v4="\u{1D561}",T4="\u2119",y4="\xA3",C4="\u2AB7",R4="\u2ABB",O4="\u227A",N4="\u227C",A4="\u2AB7",I4="\u227A",D4="\u227C",x4="\u227A",w4="\u2AAF",M4="\u227C",L4="\u227E",k4="\u2AAF",P4="\u2AB9",B4="\u2AB5",F4="\u22E8",U4="\u2AAF",G4="\u2AB3",q4="\u227E",Y4="\u2032",z4="\u2033",$4="\u2119",H4="\u2AB9",V4="\u2AB5",W4="\u22E8",K4="\u220F",Q4="\u220F",j4="\u232E",X4="\u2312",Z4="\u2313",J4="\u221D",eL="\u221D",tL="\u2237",nL="\u221D",rL="\u227E",iL="\u22B0",aL="\u{1D4AB}",oL="\u{1D4C5}",sL="\u03A8",lL="\u03C8",cL="\u2008",uL="\u{1D514}",dL="\u{1D52E}",_L="\u2A0C",pL="\u{1D562}",mL="\u211A",fL="\u2057",gL="\u{1D4AC}",hL="\u{1D4C6}",EL="\u210D",SL="\u2A16",bL="?",vL="\u225F",TL='"',yL='"',CL="\u21DB",RL="\u223D\u0331",OL="\u0154",NL="\u0155",AL="\u221A",IL="\u29B3",DL="\u27E9",xL="\u27EB",wL="\u2992",ML="\u29A5",LL="\u27E9",kL="\xBB",PL="\u2975",BL="\u21E5",FL="\u2920",UL="\u2933",GL="\u2192",qL="\u21A0",YL="\u21D2",zL="\u291E",$L="\u21AA",HL="\u21AC",VL="\u2945",WL="\u2974",KL="\u2916",QL="\u21A3",jL="\u219D",XL="\u291A",ZL="\u291C",JL="\u2236",ek="\u211A",tk="\u290D",nk="\u290F",rk="\u2910",ik="\u2773",ak="}",ok="]",sk="\u298C",lk="\u298E",ck="\u2990",uk="\u0158",dk="\u0159",_k="\u0156",pk="\u0157",mk="\u2309",fk="}",gk="\u0420",hk="\u0440",Ek="\u2937",Sk="\u2969",bk="\u201D",vk="\u201D",Tk="\u21B3",yk="\u211C",Ck="\u211B",Rk="\u211C",Ok="\u211D",Nk="\u211C",Ak="\u25AD",Ik="\xAE",Dk="\xAE",xk="\u220B",wk="\u21CB",Mk="\u296F",Lk="\u297D",kk="\u230B",Pk="\u{1D52F}",Bk="\u211C",Fk="\u2964",Uk="\u21C1",Gk="\u21C0",qk="\u296C",Yk="\u03A1",zk="\u03C1",$k="\u03F1",Hk="\u27E9",Vk="\u21E5",Wk="\u2192",Kk="\u2192",Qk="\u21D2",jk="\u21C4",Xk="\u21A3",Zk="\u2309",Jk="\u27E7",e3="\u295D",t3="\u2955",n3="\u21C2",r3="\u230B",i3="\u21C1",a3="\u21C0",o3="\u21C4",s3="\u21CC",l3="\u21C9",c3="\u219D",u3="\u21A6",d3="\u22A2",_3="\u295B",p3="\u22CC",m3="\u29D0",f3="\u22B3",g3="\u22B5",h3="\u294F",E3="\u295C",S3="\u2954",b3="\u21BE",v3="\u2953",T3="\u21C0",y3="\u02DA",C3="\u2253",R3="\u21C4",O3="\u21CC",N3="\u200F",A3="\u23B1",I3="\u23B1",D3="\u2AEE",x3="\u27ED",w3="\u21FE",M3="\u27E7",L3="\u2986",k3="\u{1D563}",P3="\u211D",B3="\u2A2E",F3="\u2A35",U3="\u2970",G3=")",q3="\u2994",Y3="\u2A12",z3="\u21C9",$3="\u21DB",H3="\u203A",V3="\u{1D4C7}",W3="\u211B",K3="\u21B1",Q3="\u21B1",j3="]",X3="\u2019",Z3="\u2019",J3="\u22CC",e5="\u22CA",t5="\u25B9",n5="\u22B5",r5="\u25B8",i5="\u29CE",a5="\u29F4",o5="\u2968",s5="\u211E",l5="\u015A",c5="\u015B",u5="\u201A",d5="\u2AB8",_5="\u0160",p5="\u0161",m5="\u2ABC",f5="\u227B",g5="\u227D",h5="\u2AB0",E5="\u2AB4",S5="\u015E",b5="\u015F",v5="\u015C",T5="\u015D",y5="\u2ABA",C5="\u2AB6",R5="\u22E9",O5="\u2A13",N5="\u227F",A5="\u0421",I5="\u0441",D5="\u22A1",x5="\u22C5",w5="\u2A66",M5="\u2925",L5="\u2198",k5="\u21D8",P5="\u2198",B5="\xA7",F5=";",U5="\u2929",G5="\u2216",q5="\u2216",Y5="\u2736",z5="\u{1D516}",$5="\u{1D530}",H5="\u2322",V5="\u266F",W5="\u0429",K5="\u0449",Q5="\u0428",j5="\u0448",X5="\u2193",Z5="\u2190",J5="\u2223",eP="\u2225",tP="\u2192",nP="\u2191",rP="\xAD",iP="\u03A3",aP="\u03C3",oP="\u03C2",sP="\u03C2",lP="\u223C",cP="\u2A6A",uP="\u2243",dP="\u2243",_P="\u2A9E",pP="\u2AA0",mP="\u2A9D",fP="\u2A9F",gP="\u2246",hP="\u2A24",EP="\u2972",SP="\u2190",bP="\u2218",vP="\u2216",TP="\u2A33",yP="\u29E4",CP="\u2223",RP="\u2323",OP="\u2AAA",NP="\u2AAC",AP="\u2AAC\uFE00",IP="\u042C",DP="\u044C",xP="\u233F",wP="\u29C4",MP="/",LP="\u{1D54A}",kP="\u{1D564}",PP="\u2660",BP="\u2660",FP="\u2225",UP="\u2293",GP="\u2293\uFE00",qP="\u2294",YP="\u2294\uFE00",zP="\u221A",$P="\u228F",HP="\u2291",VP="\u228F",WP="\u2291",KP="\u2290",QP="\u2292",jP="\u2290",XP="\u2292",ZP="\u25A1",JP="\u25A1",e6="\u2293",t6="\u228F",n6="\u2291",r6="\u2290",i6="\u2292",a6="\u2294",o6="\u25AA",s6="\u25A1",l6="\u25AA",c6="\u2192",u6="\u{1D4AE}",d6="\u{1D4C8}",_6="\u2216",p6="\u2323",m6="\u22C6",f6="\u22C6",g6="\u2606",h6="\u2605",E6="\u03F5",S6="\u03D5",b6="\xAF",v6="\u2282",T6="\u22D0",y6="\u2ABD",C6="\u2AC5",R6="\u2286",O6="\u2AC3",N6="\u2AC1",A6="\u2ACB",I6="\u228A",D6="\u2ABF",x6="\u2979",w6="\u2282",M6="\u22D0",L6="\u2286",k6="\u2AC5",P6="\u2286",B6="\u228A",F6="\u2ACB",U6="\u2AC7",G6="\u2AD5",q6="\u2AD3",Y6="\u2AB8",z6="\u227B",$6="\u227D",H6="\u227B",V6="\u2AB0",W6="\u227D",K6="\u227F",Q6="\u2AB0",j6="\u2ABA",X6="\u2AB6",Z6="\u22E9",J6="\u227F",e7="\u220B",t7="\u2211",n7="\u2211",r7="\u266A",i7="\xB9",a7="\xB2",o7="\xB3",s7="\u2283",l7="\u22D1",c7="\u2ABE",u7="\u2AD8",d7="\u2AC6",_7="\u2287",p7="\u2AC4",m7="\u2283",f7="\u2287",g7="\u27C9",h7="\u2AD7",E7="\u297B",S7="\u2AC2",b7="\u2ACC",v7="\u228B",T7="\u2AC0",y7="\u2283",C7="\u22D1",R7="\u2287",O7="\u2AC6",N7="\u228B",A7="\u2ACC",I7="\u2AC8",D7="\u2AD4",x7="\u2AD6",w7="\u2926",M7="\u2199",L7="\u21D9",k7="\u2199",P7="\u292A",B7="\xDF",F7=" ",U7="\u2316",G7="\u03A4",q7="\u03C4",Y7="\u23B4",z7="\u0164",$7="\u0165",H7="\u0162",V7="\u0163",W7="\u0422",K7="\u0442",Q7="\u20DB",j7="\u2315",X7="\u{1D517}",Z7="\u{1D531}",J7="\u2234",e8="\u2234",t8="\u2234",n8="\u0398",r8="\u03B8",i8="\u03D1",a8="\u03D1",o8="\u2248",s8="\u223C",l8="\u205F\u200A",c8="\u2009",u8="\u2009",d8="\u2248",_8="\u223C",p8="\xDE",m8="\xFE",f8="\u02DC",g8="\u223C",h8="\u2243",E8="\u2245",S8="\u2248",b8="\u2A31",v8="\u22A0",T8="\xD7",y8="\u2A30",C8="\u222D",R8="\u2928",O8="\u2336",N8="\u2AF1",A8="\u22A4",I8="\u{1D54B}",D8="\u{1D565}",x8="\u2ADA",w8="\u2929",M8="\u2034",L8="\u2122",k8="\u2122",P8="\u25B5",B8="\u25BF",F8="\u25C3",U8="\u22B4",G8="\u225C",q8="\u25B9",Y8="\u22B5",z8="\u25EC",$8="\u225C",H8="\u2A3A",V8="\u20DB",W8="\u2A39",K8="\u29CD",Q8="\u2A3B",j8="\u23E2",X8="\u{1D4AF}",Z8="\u{1D4C9}",J8="\u0426",e9="\u0446",t9="\u040B",n9="\u045B",r9="\u0166",i9="\u0167",a9="\u226C",o9="\u219E",s9="\u21A0",l9="\xDA",c9="\xFA",u9="\u2191",d9="\u219F",_9="\u21D1",p9="\u2949",m9="\u040E",f9="\u045E",g9="\u016C",h9="\u016D",E9="\xDB",S9="\xFB",b9="\u0423",v9="\u0443",T9="\u21C5",y9="\u0170",C9="\u0171",R9="\u296E",O9="\u297E",N9="\u{1D518}",A9="\u{1D532}",I9="\xD9",D9="\xF9",x9="\u2963",w9="\u21BF",M9="\u21BE",L9="\u2580",k9="\u231C",P9="\u231C",B9="\u230F",F9="\u25F8",U9="\u016A",G9="\u016B",q9="\xA8",Y9="_",z9="\u23DF",$9="\u23B5",H9="\u23DD",V9="\u22C3",W9="\u228E",K9="\u0172",Q9="\u0173",j9="\u{1D54C}",X9="\u{1D566}",Z9="\u2912",J9="\u2191",eB="\u2191",tB="\u21D1",nB="\u21C5",rB="\u2195",iB="\u2195",aB="\u21D5",oB="\u296E",sB="\u21BF",lB="\u21BE",cB="\u228E",uB="\u2196",dB="\u2197",_B="\u03C5",pB="\u03D2",mB="\u03D2",fB="\u03A5",gB="\u03C5",hB="\u21A5",EB="\u22A5",SB="\u21C8",bB="\u231D",vB="\u231D",TB="\u230E",yB="\u016E",CB="\u016F",RB="\u25F9",OB="\u{1D4B0}",NB="\u{1D4CA}",AB="\u22F0",IB="\u0168",DB="\u0169",xB="\u25B5",wB="\u25B4",MB="\u21C8",LB="\xDC",kB="\xFC",PB="\u29A7",BB="\u299C",FB="\u03F5",UB="\u03F0",GB="\u2205",qB="\u03D5",YB="\u03D6",zB="\u221D",$B="\u2195",HB="\u21D5",VB="\u03F1",WB="\u03C2",KB="\u228A\uFE00",QB="\u2ACB\uFE00",jB="\u228B\uFE00",XB="\u2ACC\uFE00",ZB="\u03D1",JB="\u22B2",eF="\u22B3",tF="\u2AE8",nF="\u2AEB",rF="\u2AE9",iF="\u0412",aF="\u0432",oF="\u22A2",sF="\u22A8",lF="\u22A9",cF="\u22AB",uF="\u2AE6",dF="\u22BB",_F="\u2228",pF="\u22C1",mF="\u225A",fF="\u22EE",gF="|",hF="\u2016",EF="|",SF="\u2016",bF="\u2223",vF="|",TF="\u2758",yF="\u2240",CF="\u200A",RF="\u{1D519}",OF="\u{1D533}",NF="\u22B2",AF="\u2282\u20D2",IF="\u2283\u20D2",DF="\u{1D54D}",xF="\u{1D567}",wF="\u221D",MF="\u22B3",LF="\u{1D4B1}",kF="\u{1D4CB}",PF="\u2ACB\uFE00",BF="\u228A\uFE00",FF="\u2ACC\uFE00",UF="\u228B\uFE00",GF="\u22AA",qF="\u299A",YF="\u0174",zF="\u0175",$F="\u2A5F",HF="\u2227",VF="\u22C0",WF="\u2259",KF="\u2118",QF="\u{1D51A}",jF="\u{1D534}",XF="\u{1D54E}",ZF="\u{1D568}",JF="\u2118",eU="\u2240",tU="\u2240",nU="\u{1D4B2}",rU="\u{1D4CC}",iU="\u22C2",aU="\u25EF",oU="\u22C3",sU="\u25BD",lU="\u{1D51B}",cU="\u{1D535}",uU="\u27F7",dU="\u27FA",_U="\u039E",pU="\u03BE",mU="\u27F5",fU="\u27F8",gU="\u27FC",hU="\u22FB",EU="\u2A00",SU="\u{1D54F}",bU="\u{1D569}",vU="\u2A01",TU="\u2A02",yU="\u27F6",CU="\u27F9",RU="\u{1D4B3}",OU="\u{1D4CD}",NU="\u2A06",AU="\u2A04",IU="\u25B3",DU="\u22C1",xU="\u22C0",wU="\xDD",MU="\xFD",LU="\u042F",kU="\u044F",PU="\u0176",BU="\u0177",FU="\u042B",UU="\u044B",GU="\xA5",qU="\u{1D51C}",YU="\u{1D536}",zU="\u0407",$U="\u0457",HU="\u{1D550}",VU="\u{1D56A}",WU="\u{1D4B4}",KU="\u{1D4CE}",QU="\u042E",jU="\u044E",XU="\xFF",ZU="\u0178",JU="\u0179",eG="\u017A",tG="\u017D",nG="\u017E",rG="\u0417",iG="\u0437",aG="\u017B",oG="\u017C",sG="\u2128",lG="\u200B",cG="\u0396",uG="\u03B6",dG="\u{1D537}",_G="\u2128",pG="\u0416",mG="\u0436",fG="\u21DD",gG="\u{1D56B}",hG="\u2124",EG="\u{1D4B5}",SG="\u{1D4CF}",bG="\u200D",vG="\u200C";var TG={Aacute:rd,aacute:id,Abreve:ad,abreve:od,ac:sd,acd:ld,acE:cd,Acirc:ud,acirc:dd,acute:_d,Acy:pd,acy:md,AElig:fd,aelig:gd,af:hd,Afr:Ed,afr:Sd,Agrave:bd,agrave:vd,alefsym:Td,aleph:yd,Alpha:Cd,alpha:Rd,Amacr:Od,amacr:Nd,amalg:Ad,amp:Id,AMP:Dd,andand:xd,And:wd,and:Md,andd:Ld,andslope:kd,andv:Pd,ang:Bd,ange:Fd,angle:Ud,angmsdaa:Gd,angmsdab:qd,angmsdac:Yd,angmsdad:zd,angmsdae:$d,angmsdaf:Hd,angmsdag:Vd,angmsdah:Wd,angmsd:Kd,angrt:Qd,angrtvb:jd,angrtvbd:Xd,angsph:Zd,angst:Jd,angzarr:e_,Aogon:t_,aogon:n_,Aopf:r_,aopf:i_,apacir:a_,ap:o_,apE:s_,ape:l_,apid:c_,apos:u_,ApplyFunction:d_,approx:__,approxeq:p_,Aring:m_,aring:f_,Ascr:g_,ascr:h_,Assign:E_,ast:S_,asymp:b_,asympeq:v_,Atilde:T_,atilde:y_,Auml:C_,auml:R_,awconint:O_,awint:N_,backcong:A_,backepsilon:I_,backprime:D_,backsim:x_,backsimeq:w_,Backslash:M_,Barv:L_,barvee:k_,barwed:P_,Barwed:B_,barwedge:F_,bbrk:U_,bbrktbrk:G_,bcong:q_,Bcy:Y_,bcy:z_,bdquo:$_,becaus:H_,because:V_,Because:W_,bemptyv:K_,bepsi:Q_,bernou:j_,Bernoullis:X_,Beta:Z_,beta:J_,beth:ep,between:tp,Bfr:np,bfr:rp,bigcap:ip,bigcirc:ap,bigcup:op,bigodot:sp,bigoplus:lp,bigotimes:cp,bigsqcup:up,bigstar:dp,bigtriangledown:_p,bigtriangleup:pp,biguplus:mp,bigvee:fp,bigwedge:gp,bkarow:hp,blacklozenge:Ep,blacksquare:Sp,blacktriangle:bp,blacktriangledown:vp,blacktriangleleft:Tp,blacktriangleright:yp,blank:Cp,blk12:Rp,blk14:Op,blk34:Np,block:Ap,bne:Ip,bnequiv:Dp,bNot:xp,bnot:wp,Bopf:Mp,bopf:Lp,bot:kp,bottom:Pp,bowtie:Bp,boxbox:Fp,boxdl:Up,boxdL:Gp,boxDl:qp,boxDL:Yp,boxdr:zp,boxdR:$p,boxDr:Hp,boxDR:Vp,boxh:Wp,boxH:Kp,boxhd:Qp,boxHd:jp,boxhD:Xp,boxHD:Zp,boxhu:Jp,boxHu:em,boxhU:tm,boxHU:nm,boxminus:rm,boxplus:im,boxtimes:am,boxul:om,boxuL:sm,boxUl:lm,boxUL:cm,boxur:um,boxuR:dm,boxUr:_m,boxUR:pm,boxv:mm,boxV:fm,boxvh:gm,boxvH:hm,boxVh:Em,boxVH:Sm,boxvl:bm,boxvL:vm,boxVl:Tm,boxVL:ym,boxvr:Cm,boxvR:Rm,boxVr:Om,boxVR:Nm,bprime:Am,breve:Im,Breve:Dm,brvbar:xm,bscr:wm,Bscr:Mm,bsemi:Lm,bsim:km,bsime:Pm,bsolb:Bm,bsol:Fm,bsolhsub:Um,bull:Gm,bullet:qm,bump:Ym,bumpE:zm,bumpe:$m,Bumpeq:Hm,bumpeq:Vm,Cacute:Wm,cacute:Km,capand:Qm,capbrcup:jm,capcap:Xm,cap:Zm,Cap:Jm,capcup:ef,capdot:tf,CapitalDifferentialD:nf,caps:rf,caret:af,caron:of,Cayleys:sf,ccaps:lf,Ccaron:cf,ccaron:uf,Ccedil:df,ccedil:_f,Ccirc:pf,ccirc:mf,Cconint:ff,ccups:gf,ccupssm:hf,Cdot:Ef,cdot:Sf,cedil:bf,Cedilla:vf,cemptyv:Tf,cent:yf,centerdot:Cf,CenterDot:Rf,cfr:Of,Cfr:Nf,CHcy:Af,chcy:If,check:Df,checkmark:xf,Chi:wf,chi:Mf,circ:Lf,circeq:kf,circlearrowleft:Pf,circlearrowright:Bf,circledast:Ff,circledcirc:Uf,circleddash:Gf,CircleDot:qf,circledR:Yf,circledS:zf,CircleMinus:$f,CirclePlus:Hf,CircleTimes:Vf,cir:Wf,cirE:Kf,cire:Qf,cirfnint:jf,cirmid:Xf,cirscir:Zf,ClockwiseContourIntegral:Jf,CloseCurlyDoubleQuote:e0,CloseCurlyQuote:t0,clubs:n0,clubsuit:r0,colon:i0,Colon:a0,Colone:o0,colone:s0,coloneq:l0,comma:c0,commat:u0,comp:d0,compfn:_0,complement:p0,complexes:m0,cong:f0,congdot:g0,Congruent:h0,conint:E0,Conint:S0,ContourIntegral:b0,copf:v0,Copf:T0,coprod:y0,Coproduct:C0,copy:R0,COPY:O0,copysr:N0,CounterClockwiseContourIntegral:A0,crarr:I0,cross:D0,Cross:x0,Cscr:w0,cscr:M0,csub:L0,csube:k0,csup:P0,csupe:B0,ctdot:F0,cudarrl:U0,cudarrr:G0,cuepr:q0,cuesc:Y0,cularr:z0,cularrp:$0,cupbrcap:H0,cupcap:V0,CupCap:W0,cup:K0,Cup:Q0,cupcup:j0,cupdot:X0,cupor:Z0,cups:J0,curarr:eg,curarrm:tg,curlyeqprec:ng,curlyeqsucc:rg,curlyvee:ig,curlywedge:ag,curren:og,curvearrowleft:sg,curvearrowright:lg,cuvee:cg,cuwed:ug,cwconint:dg,cwint:_g,cylcty:pg,dagger:mg,Dagger:fg,daleth:gg,darr:hg,Darr:Eg,dArr:Sg,dash:bg,Dashv:vg,dashv:Tg,dbkarow:yg,dblac:Cg,Dcaron:Rg,dcaron:Og,Dcy:Ng,dcy:Ag,ddagger:Ig,ddarr:Dg,DD:xg,dd:wg,DDotrahd:Mg,ddotseq:Lg,deg:kg,Del:Pg,Delta:Bg,delta:Fg,demptyv:Ug,dfisht:Gg,Dfr:qg,dfr:Yg,dHar:zg,dharl:$g,dharr:Hg,DiacriticalAcute:Vg,DiacriticalDot:Wg,DiacriticalDoubleAcute:Kg,DiacriticalGrave:Qg,DiacriticalTilde:jg,diam:Xg,diamond:Zg,Diamond:Jg,diamondsuit:eh,diams:th,die:nh,DifferentialD:rh,digamma:ih,disin:ah,div:oh,divide:sh,divideontimes:lh,divonx:ch,DJcy:uh,djcy:dh,dlcorn:_h,dlcrop:ph,dollar:mh,Dopf:fh,dopf:gh,Dot:hh,dot:Eh,DotDot:Sh,doteq:bh,doteqdot:vh,DotEqual:Th,dotminus:yh,dotplus:Ch,dotsquare:Rh,doublebarwedge:Oh,DoubleContourIntegral:Nh,DoubleDot:Ah,DoubleDownArrow:Ih,DoubleLeftArrow:Dh,DoubleLeftRightArrow:xh,DoubleLeftTee:wh,DoubleLongLeftArrow:Mh,DoubleLongLeftRightArrow:Lh,DoubleLongRightArrow:kh,DoubleRightArrow:Ph,DoubleRightTee:Bh,DoubleUpArrow:Fh,DoubleUpDownArrow:Uh,DoubleVerticalBar:Gh,DownArrowBar:qh,downarrow:Yh,DownArrow:zh,Downarrow:$h,DownArrowUpArrow:Hh,DownBreve:Vh,downdownarrows:Wh,downharpoonleft:Kh,downharpoonright:Qh,DownLeftRightVector:jh,DownLeftTeeVector:Xh,DownLeftVectorBar:Zh,DownLeftVector:Jh,DownRightTeeVector:eE,DownRightVectorBar:tE,DownRightVector:nE,DownTeeArrow:rE,DownTee:iE,drbkarow:aE,drcorn:oE,drcrop:sE,Dscr:lE,dscr:cE,DScy:uE,dscy:dE,dsol:_E,Dstrok:pE,dstrok:mE,dtdot:fE,dtri:gE,dtrif:hE,duarr:EE,duhar:SE,dwangle:bE,DZcy:vE,dzcy:TE,dzigrarr:yE,Eacute:CE,eacute:RE,easter:OE,Ecaron:NE,ecaron:AE,Ecirc:IE,ecirc:DE,ecir:xE,ecolon:wE,Ecy:ME,ecy:LE,eDDot:kE,Edot:PE,edot:BE,eDot:FE,ee:UE,efDot:GE,Efr:qE,efr:YE,eg:zE,Egrave:$E,egrave:HE,egs:VE,egsdot:WE,el:KE,Element:QE,elinters:jE,ell:XE,els:ZE,elsdot:JE,Emacr:eS,emacr:tS,empty:nS,emptyset:rS,EmptySmallSquare:iS,emptyv:aS,EmptyVerySmallSquare:oS,emsp13:sS,emsp14:lS,emsp:cS,ENG:uS,eng:dS,ensp:_S,Eogon:pS,eogon:mS,Eopf:fS,eopf:gS,epar:hS,eparsl:ES,eplus:SS,epsi:bS,Epsilon:vS,epsilon:TS,epsiv:yS,eqcirc:CS,eqcolon:RS,eqsim:OS,eqslantgtr:NS,eqslantless:AS,Equal:IS,equals:DS,EqualTilde:xS,equest:wS,Equilibrium:MS,equiv:LS,equivDD:kS,eqvparsl:PS,erarr:BS,erDot:FS,escr:US,Escr:GS,esdot:qS,Esim:YS,esim:zS,Eta:$S,eta:HS,ETH:VS,eth:WS,Euml:KS,euml:QS,euro:jS,excl:XS,exist:ZS,Exists:JS,expectation:eb,exponentiale:tb,ExponentialE:nb,fallingdotseq:rb,Fcy:ib,fcy:ab,female:ob,ffilig:sb,fflig:lb,ffllig:cb,Ffr:ub,ffr:db,filig:_b,FilledSmallSquare:pb,FilledVerySmallSquare:mb,fjlig:fb,flat:gb,fllig:hb,fltns:Eb,fnof:Sb,Fopf:bb,fopf:vb,forall:Tb,ForAll:yb,fork:Cb,forkv:Rb,Fouriertrf:Ob,fpartint:Nb,frac12:Ab,frac13:Ib,frac14:Db,frac15:xb,frac16:wb,frac18:Mb,frac23:Lb,frac25:kb,frac34:Pb,frac35:Bb,frac38:Fb,frac45:Ub,frac56:Gb,frac58:qb,frac78:Yb,frasl:zb,frown:$b,fscr:Hb,Fscr:Vb,gacute:Wb,Gamma:Kb,gamma:Qb,Gammad:jb,gammad:Xb,gap:Zb,Gbreve:Jb,gbreve:ev,Gcedil:tv,Gcirc:nv,gcirc:rv,Gcy:iv,gcy:av,Gdot:ov,gdot:sv,ge:lv,gE:cv,gEl:uv,gel:dv,geq:_v,geqq:pv,geqslant:mv,gescc:fv,ges:gv,gesdot:hv,gesdoto:Ev,gesdotol:Sv,gesl:bv,gesles:vv,Gfr:Tv,gfr:yv,gg:Cv,Gg:Rv,ggg:Ov,gimel:Nv,GJcy:Av,gjcy:Iv,gla:Dv,gl:xv,glE:wv,glj:Mv,gnap:Lv,gnapprox:kv,gne:Pv,gnE:Bv,gneq:Fv,gneqq:Uv,gnsim:Gv,Gopf:qv,gopf:Yv,grave:zv,GreaterEqual:$v,GreaterEqualLess:Hv,GreaterFullEqual:Vv,GreaterGreater:Wv,GreaterLess:Kv,GreaterSlantEqual:Qv,GreaterTilde:jv,Gscr:Xv,gscr:Zv,gsim:Jv,gsime:eT,gsiml:tT,gtcc:nT,gtcir:rT,gt:iT,GT:aT,Gt:oT,gtdot:sT,gtlPar:lT,gtquest:cT,gtrapprox:uT,gtrarr:dT,gtrdot:_T,gtreqless:pT,gtreqqless:mT,gtrless:fT,gtrsim:gT,gvertneqq:hT,gvnE:ET,Hacek:ST,hairsp:bT,half:vT,hamilt:TT,HARDcy:yT,hardcy:CT,harrcir:RT,harr:OT,hArr:NT,harrw:AT,Hat:IT,hbar:DT,Hcirc:xT,hcirc:wT,hearts:MT,heartsuit:LT,hellip:kT,hercon:PT,hfr:BT,Hfr:FT,HilbertSpace:UT,hksearow:GT,hkswarow:qT,hoarr:YT,homtht:zT,hookleftarrow:$T,hookrightarrow:HT,hopf:VT,Hopf:WT,horbar:KT,HorizontalLine:QT,hscr:jT,Hscr:XT,hslash:ZT,Hstrok:JT,hstrok:ey,HumpDownHump:ty,HumpEqual:ny,hybull:ry,hyphen:iy,Iacute:ay,iacute:oy,ic:sy,Icirc:ly,icirc:cy,Icy:uy,icy:dy,Idot:_y,IEcy:py,iecy:my,iexcl:fy,iff:gy,ifr:hy,Ifr:Ey,Igrave:Sy,igrave:by,ii:vy,iiiint:Ty,iiint:yy,iinfin:Cy,iiota:Ry,IJlig:Oy,ijlig:Ny,Imacr:Ay,imacr:Iy,image:Dy,ImaginaryI:xy,imagline:wy,imagpart:My,imath:Ly,Im:ky,imof:Py,imped:By,Implies:Fy,incare:Uy,in:"\u2208",infin:Gy,infintie:qy,inodot:Yy,intcal:zy,int:$y,Int:Hy,integers:Vy,Integral:Wy,intercal:Ky,Intersection:Qy,intlarhk:jy,intprod:Xy,InvisibleComma:Zy,InvisibleTimes:Jy,IOcy:e1,iocy:t1,Iogon:n1,iogon:r1,Iopf:i1,iopf:a1,Iota:o1,iota:s1,iprod:l1,iquest:c1,iscr:u1,Iscr:d1,isin:_1,isindot:p1,isinE:m1,isins:f1,isinsv:g1,isinv:h1,it:E1,Itilde:S1,itilde:b1,Iukcy:v1,iukcy:T1,Iuml:y1,iuml:C1,Jcirc:R1,jcirc:O1,Jcy:N1,jcy:A1,Jfr:I1,jfr:D1,jmath:x1,Jopf:w1,jopf:M1,Jscr:L1,jscr:k1,Jsercy:P1,jsercy:B1,Jukcy:F1,jukcy:U1,Kappa:G1,kappa:q1,kappav:Y1,Kcedil:z1,kcedil:$1,Kcy:H1,kcy:V1,Kfr:W1,kfr:K1,kgreen:Q1,KHcy:j1,khcy:X1,KJcy:Z1,kjcy:J1,Kopf:eC,kopf:tC,Kscr:nC,kscr:rC,lAarr:iC,Lacute:aC,lacute:oC,laemptyv:sC,lagran:lC,Lambda:cC,lambda:uC,lang:dC,Lang:_C,langd:pC,langle:mC,lap:fC,Laplacetrf:gC,laquo:hC,larrb:EC,larrbfs:SC,larr:bC,Larr:vC,lArr:TC,larrfs:yC,larrhk:CC,larrlp:RC,larrpl:OC,larrsim:NC,larrtl:AC,latail:IC,lAtail:DC,lat:xC,late:wC,lates:MC,lbarr:LC,lBarr:kC,lbbrk:PC,lbrace:BC,lbrack:FC,lbrke:UC,lbrksld:GC,lbrkslu:qC,Lcaron:YC,lcaron:zC,Lcedil:$C,lcedil:HC,lceil:VC,lcub:WC,Lcy:KC,lcy:QC,ldca:jC,ldquo:XC,ldquor:ZC,ldrdhar:JC,ldrushar:eR,ldsh:tR,le:nR,lE:rR,LeftAngleBracket:iR,LeftArrowBar:aR,leftarrow:oR,LeftArrow:sR,Leftarrow:lR,LeftArrowRightArrow:cR,leftarrowtail:uR,LeftCeiling:dR,LeftDoubleBracket:_R,LeftDownTeeVector:pR,LeftDownVectorBar:mR,LeftDownVector:fR,LeftFloor:gR,leftharpoondown:hR,leftharpoonup:ER,leftleftarrows:SR,leftrightarrow:bR,LeftRightArrow:vR,Leftrightarrow:TR,leftrightarrows:yR,leftrightharpoons:CR,leftrightsquigarrow:RR,LeftRightVector:OR,LeftTeeArrow:NR,LeftTee:AR,LeftTeeVector:IR,leftthreetimes:DR,LeftTriangleBar:xR,LeftTriangle:wR,LeftTriangleEqual:MR,LeftUpDownVector:LR,LeftUpTeeVector:kR,LeftUpVectorBar:PR,LeftUpVector:BR,LeftVectorBar:FR,LeftVector:UR,lEg:GR,leg:qR,leq:YR,leqq:zR,leqslant:$R,lescc:HR,les:VR,lesdot:WR,lesdoto:KR,lesdotor:QR,lesg:jR,lesges:XR,lessapprox:ZR,lessdot:JR,lesseqgtr:eO,lesseqqgtr:tO,LessEqualGreater:nO,LessFullEqual:rO,LessGreater:iO,lessgtr:aO,LessLess:oO,lesssim:sO,LessSlantEqual:lO,LessTilde:cO,lfisht:uO,lfloor:dO,Lfr:_O,lfr:pO,lg:mO,lgE:fO,lHar:gO,lhard:hO,lharu:EO,lharul:SO,lhblk:bO,LJcy:vO,ljcy:TO,llarr:yO,ll:CO,Ll:RO,llcorner:OO,Lleftarrow:NO,llhard:AO,lltri:IO,Lmidot:DO,lmidot:xO,lmoustache:wO,lmoust:MO,lnap:LO,lnapprox:kO,lne:PO,lnE:BO,lneq:FO,lneqq:UO,lnsim:GO,loang:qO,loarr:YO,lobrk:zO,longleftarrow:$O,LongLeftArrow:HO,Longleftarrow:VO,longleftrightarrow:WO,LongLeftRightArrow:KO,Longleftrightarrow:QO,longmapsto:jO,longrightarrow:XO,LongRightArrow:ZO,Longrightarrow:JO,looparrowleft:eN,looparrowright:tN,lopar:nN,Lopf:rN,lopf:iN,loplus:aN,lotimes:oN,lowast:sN,lowbar:lN,LowerLeftArrow:cN,LowerRightArrow:uN,loz:dN,lozenge:_N,lozf:pN,lpar:mN,lparlt:fN,lrarr:gN,lrcorner:hN,lrhar:EN,lrhard:SN,lrm:bN,lrtri:vN,lsaquo:TN,lscr:yN,Lscr:CN,lsh:RN,Lsh:ON,lsim:NN,lsime:AN,lsimg:IN,lsqb:DN,lsquo:xN,lsquor:wN,Lstrok:MN,lstrok:LN,ltcc:kN,ltcir:PN,lt:BN,LT:FN,Lt:UN,ltdot:GN,lthree:qN,ltimes:YN,ltlarr:zN,ltquest:$N,ltri:HN,ltrie:VN,ltrif:WN,ltrPar:KN,lurdshar:QN,luruhar:jN,lvertneqq:XN,lvnE:ZN,macr:JN,male:eA,malt:tA,maltese:nA,Map:"\u2905",map:rA,mapsto:iA,mapstodown:aA,mapstoleft:oA,mapstoup:sA,marker:lA,mcomma:cA,Mcy:uA,mcy:dA,mdash:_A,mDDot:pA,measuredangle:mA,MediumSpace:fA,Mellintrf:gA,Mfr:hA,mfr:EA,mho:SA,micro:bA,midast:vA,midcir:TA,mid:yA,middot:CA,minusb:RA,minus:OA,minusd:NA,minusdu:AA,MinusPlus:IA,mlcp:DA,mldr:xA,mnplus:wA,models:MA,Mopf:LA,mopf:kA,mp:PA,mscr:BA,Mscr:FA,mstpos:UA,Mu:GA,mu:qA,multimap:YA,mumap:zA,nabla:HA,Nacute:VA,nacute:WA,nang:KA,nap:QA,napE:jA,napid:XA,napos:ZA,napprox:JA,natural:eI,naturals:tI,natur:nI,nbsp:rI,nbump:iI,nbumpe:aI,ncap:oI,Ncaron:sI,ncaron:lI,Ncedil:cI,ncedil:uI,ncong:dI,ncongdot:_I,ncup:pI,Ncy:mI,ncy:fI,ndash:gI,nearhk:hI,nearr:EI,neArr:SI,nearrow:bI,ne:vI,nedot:TI,NegativeMediumSpace:yI,NegativeThickSpace:CI,NegativeThinSpace:RI,NegativeVeryThinSpace:OI,nequiv:NI,nesear:AI,nesim:II,NestedGreaterGreater:DI,NestedLessLess:xI,NewLine:wI,nexist:MI,nexists:LI,Nfr:kI,nfr:PI,ngE:BI,nge:FI,ngeq:UI,ngeqq:GI,ngeqslant:qI,nges:YI,nGg:zI,ngsim:$I,nGt:HI,ngt:VI,ngtr:WI,nGtv:KI,nharr:QI,nhArr:jI,nhpar:XI,ni:ZI,nis:JI,nisd:eD,niv:tD,NJcy:nD,njcy:rD,nlarr:iD,nlArr:aD,nldr:oD,nlE:sD,nle:lD,nleftarrow:cD,nLeftarrow:uD,nleftrightarrow:dD,nLeftrightarrow:_D,nleq:pD,nleqq:mD,nleqslant:fD,nles:gD,nless:hD,nLl:ED,nlsim:SD,nLt:bD,nlt:vD,nltri:TD,nltrie:yD,nLtv:CD,nmid:RD,NoBreak:OD,NonBreakingSpace:ND,nopf:AD,Nopf:ID,Not:DD,not:xD,NotCongruent:wD,NotCupCap:MD,NotDoubleVerticalBar:LD,NotElement:kD,NotEqual:PD,NotEqualTilde:BD,NotExists:FD,NotGreater:UD,NotGreaterEqual:GD,NotGreaterFullEqual:qD,NotGreaterGreater:YD,NotGreaterLess:zD,NotGreaterSlantEqual:$D,NotGreaterTilde:HD,NotHumpDownHump:VD,NotHumpEqual:WD,notin:KD,notindot:QD,notinE:jD,notinva:XD,notinvb:ZD,notinvc:JD,NotLeftTriangleBar:ex,NotLeftTriangle:tx,NotLeftTriangleEqual:nx,NotLess:rx,NotLessEqual:ix,NotLessGreater:ax,NotLessLess:ox,NotLessSlantEqual:sx,NotLessTilde:lx,NotNestedGreaterGreater:cx,NotNestedLessLess:ux,notni:dx,notniva:_x,notnivb:px,notnivc:mx,NotPrecedes:fx,NotPrecedesEqual:gx,NotPrecedesSlantEqual:hx,NotReverseElement:Ex,NotRightTriangleBar:Sx,NotRightTriangle:bx,NotRightTriangleEqual:vx,NotSquareSubset:Tx,NotSquareSubsetEqual:yx,NotSquareSuperset:Cx,NotSquareSupersetEqual:Rx,NotSubset:Ox,NotSubsetEqual:Nx,NotSucceeds:Ax,NotSucceedsEqual:Ix,NotSucceedsSlantEqual:Dx,NotSucceedsTilde:xx,NotSuperset:wx,NotSupersetEqual:Mx,NotTilde:Lx,NotTildeEqual:kx,NotTildeFullEqual:Px,NotTildeTilde:Bx,NotVerticalBar:Fx,nparallel:Ux,npar:Gx,nparsl:qx,npart:Yx,npolint:zx,npr:$x,nprcue:Hx,nprec:Vx,npreceq:Wx,npre:Kx,nrarrc:Qx,nrarr:jx,nrArr:Xx,nrarrw:Zx,nrightarrow:Jx,nRightarrow:ew,nrtri:tw,nrtrie:nw,nsc:rw,nsccue:iw,nsce:aw,Nscr:ow,nscr:sw,nshortmid:lw,nshortparallel:cw,nsim:uw,nsime:dw,nsimeq:_w,nsmid:pw,nspar:mw,nsqsube:fw,nsqsupe:gw,nsub:hw,nsubE:Ew,nsube:Sw,nsubset:bw,nsubseteq:vw,nsubseteqq:Tw,nsucc:yw,nsucceq:Cw,nsup:Rw,nsupE:Ow,nsupe:Nw,nsupset:Aw,nsupseteq:Iw,nsupseteqq:Dw,ntgl:xw,Ntilde:ww,ntilde:Mw,ntlg:Lw,ntriangleleft:kw,ntrianglelefteq:Pw,ntriangleright:Bw,ntrianglerighteq:Fw,Nu:Uw,nu:Gw,num:qw,numero:Yw,numsp:zw,nvap:$w,nvdash:Hw,nvDash:Vw,nVdash:Ww,nVDash:Kw,nvge:Qw,nvgt:jw,nvHarr:Xw,nvinfin:Zw,nvlArr:Jw,nvle:e2,nvlt:t2,nvltrie:n2,nvrArr:r2,nvrtrie:i2,nvsim:a2,nwarhk:o2,nwarr:s2,nwArr:l2,nwarrow:c2,nwnear:u2,Oacute:d2,oacute:_2,oast:p2,Ocirc:m2,ocirc:f2,ocir:g2,Ocy:h2,ocy:E2,odash:S2,Odblac:b2,odblac:v2,odiv:T2,odot:y2,odsold:C2,OElig:R2,oelig:O2,ofcir:N2,Ofr:A2,ofr:I2,ogon:D2,Ograve:x2,ograve:w2,ogt:M2,ohbar:L2,ohm:k2,oint:P2,olarr:B2,olcir:F2,olcross:U2,oline:G2,olt:q2,Omacr:Y2,omacr:z2,Omega:$2,omega:H2,Omicron:V2,omicron:W2,omid:K2,ominus:Q2,Oopf:j2,oopf:X2,opar:Z2,OpenCurlyDoubleQuote:J2,OpenCurlyQuote:eM,operp:tM,oplus:nM,orarr:rM,Or:iM,or:aM,ord:oM,order:sM,orderof:lM,ordf:cM,ordm:uM,origof:dM,oror:_M,orslope:pM,orv:mM,oS:fM,Oscr:gM,oscr:hM,Oslash:EM,oslash:SM,osol:bM,Otilde:vM,otilde:TM,otimesas:yM,Otimes:CM,otimes:RM,Ouml:OM,ouml:NM,ovbar:AM,OverBar:IM,OverBrace:DM,OverBracket:xM,OverParenthesis:wM,para:MM,parallel:LM,par:kM,parsim:PM,parsl:BM,part:FM,PartialD:UM,Pcy:GM,pcy:qM,percnt:YM,period:zM,permil:$M,perp:HM,pertenk:VM,Pfr:WM,pfr:KM,Phi:QM,phi:jM,phiv:XM,phmmat:ZM,phone:JM,Pi:e4,pi:t4,pitchfork:n4,piv:r4,planck:i4,planckh:a4,plankv:o4,plusacir:s4,plusb:l4,pluscir:c4,plus:u4,plusdo:d4,plusdu:_4,pluse:p4,PlusMinus:m4,plusmn:f4,plussim:g4,plustwo:h4,pm:E4,Poincareplane:S4,pointint:b4,popf:v4,Popf:T4,pound:y4,prap:C4,Pr:R4,pr:O4,prcue:N4,precapprox:A4,prec:I4,preccurlyeq:D4,Precedes:x4,PrecedesEqual:w4,PrecedesSlantEqual:M4,PrecedesTilde:L4,preceq:k4,precnapprox:P4,precneqq:B4,precnsim:F4,pre:U4,prE:G4,precsim:q4,prime:Y4,Prime:z4,primes:$4,prnap:H4,prnE:V4,prnsim:W4,prod:K4,Product:Q4,profalar:j4,profline:X4,profsurf:Z4,prop:J4,Proportional:eL,Proportion:tL,propto:nL,prsim:rL,prurel:iL,Pscr:aL,pscr:oL,Psi:sL,psi:lL,puncsp:cL,Qfr:uL,qfr:dL,qint:_L,qopf:pL,Qopf:mL,qprime:fL,Qscr:gL,qscr:hL,quaternions:EL,quatint:SL,quest:bL,questeq:vL,quot:TL,QUOT:yL,rAarr:CL,race:RL,Racute:OL,racute:NL,radic:AL,raemptyv:IL,rang:DL,Rang:xL,rangd:wL,range:ML,rangle:LL,raquo:kL,rarrap:PL,rarrb:BL,rarrbfs:FL,rarrc:UL,rarr:GL,Rarr:qL,rArr:YL,rarrfs:zL,rarrhk:$L,rarrlp:HL,rarrpl:VL,rarrsim:WL,Rarrtl:KL,rarrtl:QL,rarrw:jL,ratail:XL,rAtail:ZL,ratio:JL,rationals:ek,rbarr:tk,rBarr:nk,RBarr:rk,rbbrk:ik,rbrace:ak,rbrack:ok,rbrke:sk,rbrksld:lk,rbrkslu:ck,Rcaron:uk,rcaron:dk,Rcedil:_k,rcedil:pk,rceil:mk,rcub:fk,Rcy:gk,rcy:hk,rdca:Ek,rdldhar:Sk,rdquo:bk,rdquor:vk,rdsh:Tk,real:yk,realine:Ck,realpart:Rk,reals:Ok,Re:Nk,rect:Ak,reg:Ik,REG:Dk,ReverseElement:xk,ReverseEquilibrium:wk,ReverseUpEquilibrium:Mk,rfisht:Lk,rfloor:kk,rfr:Pk,Rfr:Bk,rHar:Fk,rhard:Uk,rharu:Gk,rharul:qk,Rho:Yk,rho:zk,rhov:$k,RightAngleBracket:Hk,RightArrowBar:Vk,rightarrow:Wk,RightArrow:Kk,Rightarrow:Qk,RightArrowLeftArrow:jk,rightarrowtail:Xk,RightCeiling:Zk,RightDoubleBracket:Jk,RightDownTeeVector:e3,RightDownVectorBar:t3,RightDownVector:n3,RightFloor:r3,rightharpoondown:i3,rightharpoonup:a3,rightleftarrows:o3,rightleftharpoons:s3,rightrightarrows:l3,rightsquigarrow:c3,RightTeeArrow:u3,RightTee:d3,RightTeeVector:_3,rightthreetimes:p3,RightTriangleBar:m3,RightTriangle:f3,RightTriangleEqual:g3,RightUpDownVector:h3,RightUpTeeVector:E3,RightUpVectorBar:S3,RightUpVector:b3,RightVectorBar:v3,RightVector:T3,ring:y3,risingdotseq:C3,rlarr:R3,rlhar:O3,rlm:N3,rmoustache:A3,rmoust:I3,rnmid:D3,roang:x3,roarr:w3,robrk:M3,ropar:L3,ropf:k3,Ropf:P3,roplus:B3,rotimes:F3,RoundImplies:U3,rpar:G3,rpargt:q3,rppolint:Y3,rrarr:z3,Rrightarrow:$3,rsaquo:H3,rscr:V3,Rscr:W3,rsh:K3,Rsh:Q3,rsqb:j3,rsquo:X3,rsquor:Z3,rthree:J3,rtimes:e5,rtri:t5,rtrie:n5,rtrif:r5,rtriltri:i5,RuleDelayed:a5,ruluhar:o5,rx:s5,Sacute:l5,sacute:c5,sbquo:u5,scap:d5,Scaron:_5,scaron:p5,Sc:m5,sc:f5,sccue:g5,sce:h5,scE:E5,Scedil:S5,scedil:b5,Scirc:v5,scirc:T5,scnap:y5,scnE:C5,scnsim:R5,scpolint:O5,scsim:N5,Scy:A5,scy:I5,sdotb:D5,sdot:x5,sdote:w5,searhk:M5,searr:L5,seArr:k5,searrow:P5,sect:B5,semi:F5,seswar:U5,setminus:G5,setmn:q5,sext:Y5,Sfr:z5,sfr:$5,sfrown:H5,sharp:V5,SHCHcy:W5,shchcy:K5,SHcy:Q5,shcy:j5,ShortDownArrow:X5,ShortLeftArrow:Z5,shortmid:J5,shortparallel:eP,ShortRightArrow:tP,ShortUpArrow:nP,shy:rP,Sigma:iP,sigma:aP,sigmaf:oP,sigmav:sP,sim:lP,simdot:cP,sime:uP,simeq:dP,simg:_P,simgE:pP,siml:mP,simlE:fP,simne:gP,simplus:hP,simrarr:EP,slarr:SP,SmallCircle:bP,smallsetminus:vP,smashp:TP,smeparsl:yP,smid:CP,smile:RP,smt:OP,smte:NP,smtes:AP,SOFTcy:IP,softcy:DP,solbar:xP,solb:wP,sol:MP,Sopf:LP,sopf:kP,spades:PP,spadesuit:BP,spar:FP,sqcap:UP,sqcaps:GP,sqcup:qP,sqcups:YP,Sqrt:zP,sqsub:$P,sqsube:HP,sqsubset:VP,sqsubseteq:WP,sqsup:KP,sqsupe:QP,sqsupset:jP,sqsupseteq:XP,square:ZP,Square:JP,SquareIntersection:e6,SquareSubset:t6,SquareSubsetEqual:n6,SquareSuperset:r6,SquareSupersetEqual:i6,SquareUnion:a6,squarf:o6,squ:s6,squf:l6,srarr:c6,Sscr:u6,sscr:d6,ssetmn:_6,ssmile:p6,sstarf:m6,Star:f6,star:g6,starf:h6,straightepsilon:E6,straightphi:S6,strns:b6,sub:v6,Sub:T6,subdot:y6,subE:C6,sube:R6,subedot:O6,submult:N6,subnE:A6,subne:I6,subplus:D6,subrarr:x6,subset:w6,Subset:M6,subseteq:L6,subseteqq:k6,SubsetEqual:P6,subsetneq:B6,subsetneqq:F6,subsim:U6,subsub:G6,subsup:q6,succapprox:Y6,succ:z6,succcurlyeq:$6,Succeeds:H6,SucceedsEqual:V6,SucceedsSlantEqual:W6,SucceedsTilde:K6,succeq:Q6,succnapprox:j6,succneqq:X6,succnsim:Z6,succsim:J6,SuchThat:e7,sum:t7,Sum:n7,sung:r7,sup1:i7,sup2:a7,sup3:o7,sup:s7,Sup:l7,supdot:c7,supdsub:u7,supE:d7,supe:_7,supedot:p7,Superset:m7,SupersetEqual:f7,suphsol:g7,suphsub:h7,suplarr:E7,supmult:S7,supnE:b7,supne:v7,supplus:T7,supset:y7,Supset:C7,supseteq:R7,supseteqq:O7,supsetneq:N7,supsetneqq:A7,supsim:I7,supsub:D7,supsup:x7,swarhk:w7,swarr:M7,swArr:L7,swarrow:k7,swnwar:P7,szlig:B7,Tab:F7,target:U7,Tau:G7,tau:q7,tbrk:Y7,Tcaron:z7,tcaron:$7,Tcedil:H7,tcedil:V7,Tcy:W7,tcy:K7,tdot:Q7,telrec:j7,Tfr:X7,tfr:Z7,there4:J7,therefore:e8,Therefore:t8,Theta:n8,theta:r8,thetasym:i8,thetav:a8,thickapprox:o8,thicksim:s8,ThickSpace:l8,ThinSpace:c8,thinsp:u8,thkap:d8,thksim:_8,THORN:p8,thorn:m8,tilde:f8,Tilde:g8,TildeEqual:h8,TildeFullEqual:E8,TildeTilde:S8,timesbar:b8,timesb:v8,times:T8,timesd:y8,tint:C8,toea:R8,topbot:O8,topcir:N8,top:A8,Topf:I8,topf:D8,topfork:x8,tosa:w8,tprime:M8,trade:L8,TRADE:k8,triangle:P8,triangledown:B8,triangleleft:F8,trianglelefteq:U8,triangleq:G8,triangleright:q8,trianglerighteq:Y8,tridot:z8,trie:$8,triminus:H8,TripleDot:V8,triplus:W8,trisb:K8,tritime:Q8,trpezium:j8,Tscr:X8,tscr:Z8,TScy:J8,tscy:e9,TSHcy:t9,tshcy:n9,Tstrok:r9,tstrok:i9,twixt:a9,twoheadleftarrow:o9,twoheadrightarrow:s9,Uacute:l9,uacute:c9,uarr:u9,Uarr:d9,uArr:_9,Uarrocir:p9,Ubrcy:m9,ubrcy:f9,Ubreve:g9,ubreve:h9,Ucirc:E9,ucirc:S9,Ucy:b9,ucy:v9,udarr:T9,Udblac:y9,udblac:C9,udhar:R9,ufisht:O9,Ufr:N9,ufr:A9,Ugrave:I9,ugrave:D9,uHar:x9,uharl:w9,uharr:M9,uhblk:L9,ulcorn:k9,ulcorner:P9,ulcrop:B9,ultri:F9,Umacr:U9,umacr:G9,uml:q9,UnderBar:Y9,UnderBrace:z9,UnderBracket:$9,UnderParenthesis:H9,Union:V9,UnionPlus:W9,Uogon:K9,uogon:Q9,Uopf:j9,uopf:X9,UpArrowBar:Z9,uparrow:J9,UpArrow:eB,Uparrow:tB,UpArrowDownArrow:nB,updownarrow:rB,UpDownArrow:iB,Updownarrow:aB,UpEquilibrium:oB,upharpoonleft:sB,upharpoonright:lB,uplus:cB,UpperLeftArrow:uB,UpperRightArrow:dB,upsi:_B,Upsi:pB,upsih:mB,Upsilon:fB,upsilon:gB,UpTeeArrow:hB,UpTee:EB,upuparrows:SB,urcorn:bB,urcorner:vB,urcrop:TB,Uring:yB,uring:CB,urtri:RB,Uscr:OB,uscr:NB,utdot:AB,Utilde:IB,utilde:DB,utri:xB,utrif:wB,uuarr:MB,Uuml:LB,uuml:kB,uwangle:PB,vangrt:BB,varepsilon:FB,varkappa:UB,varnothing:GB,varphi:qB,varpi:YB,varpropto:zB,varr:$B,vArr:HB,varrho:VB,varsigma:WB,varsubsetneq:KB,varsubsetneqq:QB,varsupsetneq:jB,varsupsetneqq:XB,vartheta:ZB,vartriangleleft:JB,vartriangleright:eF,vBar:tF,Vbar:nF,vBarv:rF,Vcy:iF,vcy:aF,vdash:oF,vDash:sF,Vdash:lF,VDash:cF,Vdashl:uF,veebar:dF,vee:_F,Vee:pF,veeeq:mF,vellip:fF,verbar:gF,Verbar:hF,vert:EF,Vert:SF,VerticalBar:bF,VerticalLine:vF,VerticalSeparator:TF,VerticalTilde:yF,VeryThinSpace:CF,Vfr:RF,vfr:OF,vltri:NF,vnsub:AF,vnsup:IF,Vopf:DF,vopf:xF,vprop:wF,vrtri:MF,Vscr:LF,vscr:kF,vsubnE:PF,vsubne:BF,vsupnE:FF,vsupne:UF,Vvdash:GF,vzigzag:qF,Wcirc:YF,wcirc:zF,wedbar:$F,wedge:HF,Wedge:VF,wedgeq:WF,weierp:KF,Wfr:QF,wfr:jF,Wopf:XF,wopf:ZF,wp:JF,wr:eU,wreath:tU,Wscr:nU,wscr:rU,xcap:iU,xcirc:aU,xcup:oU,xdtri:sU,Xfr:lU,xfr:cU,xharr:uU,xhArr:dU,Xi:_U,xi:pU,xlarr:mU,xlArr:fU,xmap:gU,xnis:hU,xodot:EU,Xopf:SU,xopf:bU,xoplus:vU,xotime:TU,xrarr:yU,xrArr:CU,Xscr:RU,xscr:OU,xsqcup:NU,xuplus:AU,xutri:IU,xvee:DU,xwedge:xU,Yacute:wU,yacute:MU,YAcy:LU,yacy:kU,Ycirc:PU,ycirc:BU,Ycy:FU,ycy:UU,yen:GU,Yfr:qU,yfr:YU,YIcy:zU,yicy:$U,Yopf:HU,yopf:VU,Yscr:WU,yscr:KU,YUcy:QU,yucy:jU,yuml:XU,Yuml:ZU,Zacute:JU,zacute:eG,Zcaron:tG,zcaron:nG,Zcy:rG,zcy:iG,Zdot:aG,zdot:oG,zeetrf:sG,ZeroWidthSpace:lG,Zeta:cG,zeta:uG,zfr:dG,Zfr:_G,ZHcy:pG,zhcy:mG,zigrarr:fG,zopf:gG,Zopf:hG,Zscr:EG,zscr:SG,zwj:bG,zwnj:vG},Ol=TG,$a=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Xn={},bs={};function yG(e){var t,n,r=bs[e];if(r)return r;for(r=bs[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&l<=57343){if(l>=55296&&l<=56319&&r+1=56320&&u<=57343)){d+=encodeURIComponent(e[r]+e[r+1]),r++;continue}d+="%EF%BF%BD";continue}d+=encodeURIComponent(e[r])}return d}Si.defaultChars=";/?:@&=+$,-_.!~*'()#";Si.componentChars="-_.!~*'()";var CG=Si,vs={};function RG(e){var t,n,r=vs[e];if(r)return r;for(r=vs[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t=55296&&f<=57343?h+="\uFFFD\uFFFD\uFFFD":h+=String.fromCharCode(f),a+=6;continue}if((u&248)===240&&a+91114111?h+="\uFFFD\uFFFD\uFFFD\uFFFD":(f-=65536,h+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),a+=9;continue}h+="\uFFFD"}return h})}bi.defaultChars=";/?:@&=+$,#";bi.componentChars="";var OG=bi,NG=function(t){var n="";return n+=t.protocol||"",n+=t.slashes?"//":"",n+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?n+="["+t.hostname+"]":n+=t.hostname||"",n+=t.port?":"+t.port:"",n+=t.pathname||"",n+=t.search||"",n+=t.hash||"",n};function pi(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var AG=/^([a-z0-9.+-]+:)/i,IG=/:[0-9]*$/,DG=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,xG=["<",">",'"',"`"," ","\r",` `," "],wG=["{","}","|","\\","^","`"].concat(xG),MG=["'"].concat(wG),Ts=["%","/","?",";","#"].concat(MG),ys=["/","?","#"],LG=255,Cs=/^[+a-z0-9A-Z_-]{0,63}$/,kG=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Rs={javascript:!0,"javascript:":!0},Os={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function PG(e,t){if(e&&e instanceof pi)return e;var n=new pi;return n.parse(e,t),n}pi.prototype.parse=function(e,t){var n,r,a,l,u,c=e;if(c=c.trim(),!t&&e.split("#").length===1){var d=DG.exec(c);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}var g=AG.exec(c);if(g&&(g=g[0],a=g.toLowerCase(),this.protocol=g,c=c.substr(g.length)),(t||g||c.match(/^\/\/[^@\/]+@[^@\/]+/))&&(u=c.substr(0,2)==="//",u&&!(g&&Rs[g])&&(c=c.substr(2),this.slashes=!0)),!Rs[g]&&(u||g&&!Os[g])){var f=-1;for(n=0;n127?E+="x":E+=C[v];if(!E.match(Cs)){var S=b.slice(0,n),A=b.slice(n+1),P=C.match(kG);P&&(S.push(P[1]),A.unshift(P[2])),A.length&&(c=A.join(".")+c),this.hostname=S.join(".");break}}}}this.hostname.length>LG&&(this.hostname=""),y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var F=c.indexOf("#");F!==-1&&(this.hash=c.substr(F),c=c.slice(0,F));var G=c.indexOf("?");return G!==-1&&(this.search=c.substr(G),c=c.slice(0,G)),c&&(this.pathname=c),Os[a]&&this.hostname&&!this.pathname&&(this.pathname=""),this};pi.prototype.parseHost=function(e){var t=IG.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var BG=PG;Xn.encode=CG;Xn.decode=OG;Xn.format=NG;Xn.parse=BG;var Zn={},Nl=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Al=/[\0-\x1F\x7F-\x9F]/,FG=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Il=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;Zn.Any=Nl;Zn.Cc=Al;Zn.Cf=FG;Zn.P=$a;Zn.Z=Il;(function(e){function t(x){return Object.prototype.toString.call(x)}function n(x){return t(x)==="[object String]"}var r=Object.prototype.hasOwnProperty;function a(x,Y){return r.call(x,Y)}function l(x){var Y=Array.prototype.slice.call(arguments,1);return Y.forEach(function(J){if(!!J){if(typeof J!="object")throw new TypeError(J+"must be object");Object.keys(J).forEach(function(K){x[K]=J[K]})}}),x}function u(x,Y,J){return[].concat(x.slice(0,Y),J,x.slice(Y+1))}function c(x){return!(x>=55296&&x<=57343||x>=64976&&x<=65007||(x&65535)===65535||(x&65535)===65534||x>=0&&x<=8||x===11||x>=14&&x<=31||x>=127&&x<=159||x>1114111)}function d(x){if(x>65535){x-=65536;var Y=55296+(x>>10),J=56320+(x&1023);return String.fromCharCode(Y,J)}return String.fromCharCode(x)}var g=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,f=/&([a-z#][a-z0-9]{1,31});/gi,h=new RegExp(g.source+"|"+f.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,m=Ol;function y(x,Y){var J=0;return a(m,Y)?m[Y]:Y.charCodeAt(0)===35&&p.test(Y)&&(J=Y[1].toLowerCase()==="x"?parseInt(Y.slice(2),16):parseInt(Y.slice(1),10),c(J))?d(J):x}function b(x){return x.indexOf("\\")<0?x:x.replace(g,"$1")}function C(x){return x.indexOf("\\")<0&&x.indexOf("&")<0?x:x.replace(h,function(Y,J,K){return J||y(Y,K)})}var E=/[&<>"]/,v=/[&<>"]/g,O={"&":"&","<":"<",">":">",'"':"""};function S(x){return O[x]}function A(x){return E.test(x)?x.replace(v,S):x}var P=/[.?*+^$[\]\\(){}|-]/g;function F(x){return x.replace(P,"\\$&")}function G(x){switch(x){case 9:case 32:return!0}return!1}function z(x){if(x>=8192&&x<=8202)return!0;switch(x){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var k=$a;function L(x){return k.test(x)}function w(x){switch(x){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function M(x){return x=x.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(x=x.replace(/ẞ/g,"\xDF")),x.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=Xn,e.lib.ucmicro=Zn,e.assign=l,e.isString=n,e.has=a,e.unescapeMd=b,e.unescapeAll=C,e.isValidEntityCode=c,e.fromCodePoint=d,e.escapeHtml=A,e.arrayReplaceAt=u,e.isSpace=G,e.isWhiteSpace=z,e.isMdAsciiPunct=w,e.isPunctChar=L,e.escapeRE=F,e.normalizeReference=M})(Ze);var vi={},UG=function(t,n,r){var a,l,u,c,d=-1,g=t.posMax,f=t.pos;for(t.pos=n+1,a=1;t.pos32))return d;if(a===41){if(l===0)break;l--}n++}return c===n||l!==0||(d.str=Ns(t.slice(c,n)),d.lines=u,d.pos=n,d.ok=!0),d},qG=Ze.unescapeAll,YG=function(t,n,r){var a,l,u=0,c=n,d={ok:!1,pos:0,lines:0,str:""};if(n>=r||(l=t.charCodeAt(n),l!==34&&l!==39&&l!==40))return d;for(n++,l===40&&(l=41);n"+Rn(e[t].content)+""};Qt.code_block=function(e,t,n,r,a){var l=e[t];return""+Rn(e[t].content)+` `};Qt.fence=function(e,t,n,r,a){var l=e[t],u=l.info?$G(l.info).trim():"",c="",d="",g,f,h,p,m;return u&&(h=u.split(/(\s+)/g),c=h[0],d=h.slice(2).join("")),n.highlight?g=n.highlight(l.content,c,d)||Rn(l.content):g=Rn(l.content),g.indexOf("me.offsetTop+Ne*1.5&&ue.insert(` `)}return ue}function Je(me,ue){var Ne={},Te=me.style||{};return Te.fontStyle&&le(me).fontStyle==="italic"&&(Ne.italic=!0),Te.fontWeight&&(le(me).fontWeight.startsWith("bold")||parseInt(le(me).fontWeight)>=700)&&(Ne.bold=!0),Object.keys(Ne).length>0&&(ue=X(ue,Ne)),parseFloat(Te.textIndent||0)>0&&(ue=new h.default().insert(" ").concat(ue)),ue}function ot(me,ue){var Ne=me.data;if(me.parentNode.tagName==="O:P")return ue.insert(Ne.trim());if(Ne.trim().length===0&&me.parentNode.classList.contains("ql-clipboard"))return ue;if(!le(me.parentNode).whiteSpace.startsWith("pre")){var Te=function(Ge,Fe){return Fe=Fe.replace(/[^\u00a0]/g,""),Fe.length<1&&Ge?" ":Fe};Ne=Ne.replace(/\r\n/g," ").replace(/\n/g," "),Ne=Ne.replace(/\s\s+/g,Te.bind(Te,!0)),(me.previousSibling==null&&W(me.parentNode)||me.previousSibling!=null&&W(me.previousSibling))&&(Ne=Ne.replace(/^\s+/,Te.bind(Te,!1))),(me.nextSibling==null&&W(me.parentNode)||me.nextSibling!=null&&W(me.nextSibling))&&(Ne=Ne.replace(/\s+$/,Te.bind(Te,!1)))}return ue.insert(Ne)}r.default=Q,r.matchAttributor=ce,r.matchBlot=Ee,r.matchNewline=Ye,r.matchSpacing=We,r.matchText=ot},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(b,C){for(var E=0;E '},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(b,C){for(var E=0;Em.right&&(b=m.right-y.right,this.root.style.left=h+b+"px"),y.leftm.bottom){var C=y.bottom-y.top,E=f.bottom-f.top+C;this.root.style.top=p-E+"px",this.root.classList.add("ql-flip")}return b}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),d}();r.default=c},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function k(L,w){var M=[],x=!0,Y=!1,J=void 0;try{for(var K=L[Symbol.iterator](),re;!(x=(re=K.next()).done)&&(M.push(re.value),!(w&&M.length===w));x=!0);}catch(Z){Y=!0,J=Z}finally{try{!x&&K.return&&K.return()}finally{if(Y)throw J}}return M}return function(L,w){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return k(L,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function k(L,w,M){L===null&&(L=Function.prototype);var x=Object.getOwnPropertyDescriptor(L,w);if(x===void 0){var Y=Object.getPrototypeOf(L);return Y===null?void 0:k(Y,w,M)}else{if("value"in x)return x.value;var J=x.get;return J===void 0?void 0:J.call(M)}},c=function(){function k(L,w){for(var M=0;M','','',''].join(""),r.default=G},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(29),u=he(l),c=a(36),d=a(38),g=a(64),f=a(65),h=he(f),p=a(66),m=he(p),y=a(67),b=he(y),C=a(37),E=a(26),v=a(39),O=a(40),S=a(56),A=he(S),P=a(68),F=he(P),G=a(27),z=he(G),k=a(69),L=he(k),w=a(70),M=he(w),x=a(71),Y=he(x),J=a(72),K=he(J),re=a(73),Z=he(re),j=a(13),U=he(j),Q=a(74),X=he(Q),le=a(75),ae=he(le),W=a(57),ie=he(W),de=a(41),ce=he(de),Ee=a(28),Ie=he(Ee),Le=a(59),Ue=he(Le),Ye=a(60),We=he(Ye),Je=a(61),ot=he(Je),me=a(108),ue=he(me),Ne=a(62),Te=he(Ne);function he(Ge){return Ge&&Ge.__esModule?Ge:{default:Ge}}u.default.register({"attributors/attribute/direction":d.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":C.BackgroundClass,"attributors/class/color":E.ColorClass,"attributors/class/direction":d.DirectionClass,"attributors/class/font":v.FontClass,"attributors/class/size":O.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":C.BackgroundStyle,"attributors/style/color":E.ColorStyle,"attributors/style/direction":d.DirectionStyle,"attributors/style/font":v.FontStyle,"attributors/style/size":O.SizeStyle},!0),u.default.register({"formats/align":c.AlignClass,"formats/direction":d.DirectionClass,"formats/indent":g.IndentClass,"formats/background":C.BackgroundStyle,"formats/color":E.ColorStyle,"formats/font":v.FontClass,"formats/size":O.SizeClass,"formats/blockquote":h.default,"formats/code-block":U.default,"formats/header":m.default,"formats/list":b.default,"formats/bold":A.default,"formats/code":j.Code,"formats/italic":F.default,"formats/link":z.default,"formats/script":L.default,"formats/strike":M.default,"formats/underline":Y.default,"formats/image":K.default,"formats/video":Z.default,"formats/list/item":y.ListItem,"modules/formula":X.default,"modules/syntax":ae.default,"modules/toolbar":ie.default,"themes/bubble":ue.default,"themes/snow":Te.default,"ui/icons":ce.default,"ui/picker":Ie.default,"ui/icon-picker":We.default,"ui/color-picker":Ue.default,"ui/tooltip":ot.default},!0),r.default=u.default},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var l=function(){function b(C,E){for(var v=0;v0&&this.children.tail.format(F,G)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(F,G){if(F instanceof v)u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,F,G);else{var z=G==null?this.length():G.offset(this),k=this.split(z);k.parent.insertBefore(F,k)}}},{key:"optimize",value:function(F){u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,F);var G=this.next;G!=null&&G.prev===this&&G.statics.blotName===this.statics.blotName&&G.domNode.tagName===this.domNode.tagName&&G.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(G.moveChildren(this),G.remove())}},{key:"replace",value:function(F){if(F.statics.blotName!==this.statics.blotName){var G=d.default.create(this.statics.defaultChild);F.moveChildren(G),this.appendChild(G)}u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,F)}}]),A}(p.default);O.blotName="list",O.scope=d.default.Scope.BLOCK_BLOT,O.tagName=["OL","UL"],O.defaultChild="list-item",O.allowedChildren=[v],r.ListItem=v,r.default=O},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(56),u=c(l);function c(p){return p&&p.__esModule?p:{default:p}}function d(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function g(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function f(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var h=function(p){f(m,p);function m(){return d(this,m),g(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m}(u.default);h.blotName="italic",h.tagName=["EM","I"],r.default=h},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(b,C){for(var E=0;E-1?S?this.domNode.setAttribute(O,S):this.domNode.removeAttribute(O):u(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,O,S)}}],[{key:"create",value:function(O){var S=u(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,O);return typeof O=="string"&&S.setAttribute("src",this.sanitize(O)),S}},{key:"formats",value:function(O){return y.reduce(function(S,A){return O.hasAttribute(A)&&(S[A]=O.getAttribute(A)),S},{})}},{key:"match",value:function(O){return/\.(jpe?g|gif|png)$/.test(O)||/^data:image\/.+;base64/.test(O)}},{key:"sanitize",value:function(O){return(0,g.sanitize)(O,["http","https","data"])?O:"//:0"}},{key:"value",value:function(O){return O.getAttribute("src")}}]),E}(d.default.Embed);b.blotName="image",b.tagName="IMG",r.default=b},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function C(E,v){for(var O=0;O-1?S?this.domNode.setAttribute(O,S):this.domNode.removeAttribute(O):u(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,O,S)}}],[{key:"create",value:function(O){var S=u(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,O);return S.setAttribute("frameborder","0"),S.setAttribute("allowfullscreen",!0),S.setAttribute("src",this.sanitize(O)),S}},{key:"formats",value:function(O){return y.reduce(function(S,A){return O.hasAttribute(A)&&(S[A]=O.getAttribute(A)),S},{})}},{key:"sanitize",value:function(O){return g.default.sanitize(O)}},{key:"value",value:function(O){return O.getAttribute("src")}}]),E}(c.BlockEmbed);b.blotName="video",b.className="ql-video",b.tagName="IFRAME",r.default=b},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var l=function(){function O(S,A){for(var P=0;P0||this.cachedText==null)&&(this.domNode.innerHTML=z(k),this.domNode.normalize(),this.attach()),this.cachedText=k)}}]),F}(y.default);O.className="ql-syntax";var S=new d.default.Attributor.Class("token","hljs",{scope:d.default.Scope.INLINE}),A=function(P){v(F,P),l(F,null,[{key:"register",value:function(){f.default.register(S,!0),f.default.register(O,!0)}}]);function F(G,z){C(this,F);var k=E(this,(F.__proto__||Object.getPrototypeOf(F)).call(this,G,z));if(typeof k.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var L=null;return k.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(L),L=setTimeout(function(){k.highlight(),L=null},k.options.interval)}),k.highlight(),k}return l(F,[{key:"highlight",value:function(){var z=this;if(!this.quill.selection.composing){this.quill.update(f.default.sources.USER);var k=this.quill.getSelection();this.quill.scroll.descendants(O).forEach(function(L){L.highlight(z.options.highlight)}),this.quill.update(f.default.sources.SILENT),k!=null&&this.quill.setSelection(k,f.default.sources.SILENT)}}}]),F}(p.default);A.DEFAULTS={highlight:function(){return window.hljs==null?null:function(P){var F=window.hljs.highlightAuto(P);return F.value}}(),interval:1e3},r.CodeBlock=O,r.CodeToken=S,r.default=A},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var l=function F(G,z,k){G===null&&(G=Function.prototype);var L=Object.getOwnPropertyDescriptor(G,z);if(L===void 0){var w=Object.getPrototypeOf(G);return w===null?void 0:F(w,z,k)}else{if("value"in L)return L.value;var M=L.get;return M===void 0?void 0:M.call(k)}},u=function(){function F(G,z){for(var k=0;k0&&Y===f.default.sources.USER){L.show(),L.root.style.left="0px",L.root.style.width="",L.root.style.width=L.root.offsetWidth+"px";var J=L.quill.getLines(M.index,M.length);if(J.length===1)L.position(L.quill.getBounds(M));else{var K=J[J.length-1],re=L.quill.getIndex(K),Z=Math.min(K.length()-1,M.index+M.length-re),j=L.quill.getBounds(new m.Range(re,Z));L.position(j)}}else document.activeElement!==L.textbox&&L.quill.hasFocus()&&L.hide()}),L}return u(G,[{key:"listen",value:function(){var k=this;l(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){k.root.classList.remove("ql-editing")}),this.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!k.root.classList.contains("ql-hidden")){var L=k.quill.getSelection();L!=null&&k.position(k.quill.getBounds(L))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(k){var L=l(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"position",this).call(this,k),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",L===0)return L;w.style.marginLeft=-1*L-w.offsetWidth/2+"px"}}]),G}(h.BaseTooltip);P.TEMPLATE=['','
','','',"
"].join(""),r.BubbleTooltip=P,r.default=A},function(n,r,a){n.exports=a(63)}]).default})})(Rc);var Ht=Yu(Rc.exports);function di(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?di=function(t){return typeof t}:di=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}function Oc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hl(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l=!0,u=!1,c;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return l=d.done,d},e:function(d){u=!0,c=d},f:function(){try{!l&&n.return!=null&&n.return()}finally{if(u)throw c}}}}var nn={TAB:9,ENTER:13,ESCAPE:27,UP:38,DOWN:40};function iJ(e,t,n){var r=e;return Object.keys(t).forEach(function(a){n.indexOf(a)>-1?r.dataset[a]=t[a]:delete r.dataset[a]}),r}function aJ(e,t){return t.reduce(function(n,r){var a=e.lastIndexOf(r);return a>n.mentionCharIndex?{mentionChar:r,mentionCharIndex:a}:{mentionChar:n.mentionChar,mentionCharIndex:n.mentionCharIndex}},{mentionChar:null,mentionCharIndex:-1})}function oJ(e,t){return t.test(e)}function sJ(e,t,n){return e>-1?!(n&&!(e===0||!!t[e-1].match(/\s/g))):!1}function lJ(e){return di(e)!=="object"||e===null?e:JSON.parse(JSON.stringify(e))}var cJ=Ht.import("blots/embed"),Ii=function(e){XZ(n,e);var t=eJ(n);function n(r,a){var l;return Oc(this,n),l=t.call(this,r,a),El(Ga(l),"hoverHandler",void 0),El(Ga(l),"hoverHandler",void 0),l.clickHandler=null,l.hoverHandler=null,l.mounted=!1,l}return Nc(n,[{key:"attach",value:function(){Kn(gn(n.prototype),"attach",this).call(this),this.mounted||(this.mounted=!0,this.clickHandler=this.getClickHandler(),this.hoverHandler=this.getHoverHandler(),this.domNode.addEventListener("click",this.clickHandler,!1),this.domNode.addEventListener("mouseenter",this.hoverHandler,!1))}},{key:"detach",value:function(){Kn(gn(n.prototype),"detach",this).call(this),this.mounted=!1,this.clickHandler&&(this.domNode.removeEventListener("click",this.clickHandler),this.clickHandler=null)}},{key:"getClickHandler",value:function(){var a=this;return function(l){var u=a.buildEvent("mention-clicked",l);window.dispatchEvent(u),l.preventDefault()}}},{key:"getHoverHandler",value:function(){var a=this;return function(l){var u=a.buildEvent("mention-hovered",l);window.dispatchEvent(u),l.preventDefault()}}},{key:"buildEvent",value:function(a,l){var u=new Event(a,{bubbles:!0,cancelable:!0});return u.value=Ei({},this.domNode.dataset),u.event=l,u}}],[{key:"create",value:function(a){var l=Kn(gn(n),"create",this).call(this),u=document.createElement("span");return u.className="ql-mention-denotation-char",u.innerHTML=a.denotationChar,l.appendChild(u),l.innerHTML+=a.value,n.setDataValues(l,a)}},{key:"setDataValues",value:function(a,l){var u=a;return Object.keys(l).forEach(function(c){u.dataset[c]=l[c]}),u}},{key:"value",value:function(a){return a.dataset}}]),n}(cJ);Ii.blotName="mention";Ii.tagName="span";Ii.className="mention";Ht.register(Ii);var uJ=function(){function e(t,n){var r=this;Oc(this,e),this.isOpen=!1,this.itemIndex=0,this.mentionCharPos=null,this.cursorPos=null,this.values=[],this.suspendMouseEnter=!1,this.existingSourceExecutionToken=null,this.quill=t,this.options={source:null,renderItem:function(d){return"".concat(d.value)},renderLoading:function(){return null},onSelect:function(d,g){g(d)},mentionDenotationChars:["@"],showDenotationChar:!0,allowedChars:/^[a-zA-Z0-9_]*$/,minChars:0,maxChars:31,offsetTop:2,offsetLeft:0,isolateCharacter:!1,fixMentionsToQuill:!1,positioningStrategy:"normal",defaultMenuOrientation:"bottom",blotName:"mention",dataAttributes:["id","value","denotationChar","link","target","disabled"],linkTarget:"_blank",onOpen:function(){return!0},onBeforeClose:function(){return!0},onClose:function(){return!0},listItemClass:"ql-mention-list-item",mentionContainerClass:"ql-mention-list-container",mentionListClass:"ql-mention-list",spaceAfterInsert:!0,selectKeys:[nn.ENTER]},Ei(this.options,n,{dataAttributes:Array.isArray(n.dataAttributes)?this.options.dataAttributes.concat(n.dataAttributes):this.options.dataAttributes}),this.mentionContainer=document.createElement("div"),this.mentionContainer.className=this.options.mentionContainerClass?this.options.mentionContainerClass:"",this.mentionContainer.style.cssText="display: none; position: absolute;",this.mentionContainer.onmousemove=this.onContainerMouseMove.bind(this),this.options.fixMentionsToQuill&&(this.mentionContainer.style.width="auto"),this.mentionList=document.createElement("ul"),this.mentionList.id="quill-mention-list",t.root.setAttribute("aria-owns","quill-mention-list"),this.mentionList.className=this.options.mentionListClass?this.options.mentionListClass:"",this.mentionContainer.appendChild(this.mentionList),t.on("text-change",this.onTextChange.bind(this)),t.on("selection-change",this.onSelectionChange.bind(this)),t.container.addEventListener("paste",function(){setTimeout(function(){var c=t.getSelection();r.onSelectionChange(c)})}),t.keyboard.addBinding({key:nn.TAB},this.selectHandler.bind(this)),t.keyboard.bindings[nn.TAB].unshift(t.keyboard.bindings[nn.TAB].pop());var a=rJ(this.options.selectKeys),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;t.keyboard.addBinding({key:u},this.selectHandler.bind(this))}}catch(c){a.e(c)}finally{a.f()}t.keyboard.bindings[nn.ENTER].unshift(t.keyboard.bindings[nn.ENTER].pop()),t.keyboard.addBinding({key:nn.ESCAPE},this.escapeHandler.bind(this)),t.keyboard.addBinding({key:nn.UP},this.upHandler.bind(this)),t.keyboard.addBinding({key:nn.DOWN},this.downHandler.bind(this))}return Nc(e,[{key:"selectHandler",value:function(){return this.isOpen&&!this.existingSourceExecutionToken?(this.selectItem(),!1):!0}},{key:"escapeHandler",value:function(){return this.isOpen?(this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList(),!1):!0}},{key:"upHandler",value:function(){return this.isOpen&&!this.existingSourceExecutionToken?(this.prevItem(),!1):!0}},{key:"downHandler",value:function(){return this.isOpen&&!this.existingSourceExecutionToken?(this.nextItem(),!1):!0}},{key:"showMentionList",value:function(){this.options.positioningStrategy==="fixed"?document.body.appendChild(this.mentionContainer):this.quill.container.appendChild(this.mentionContainer),this.mentionContainer.style.visibility="hidden",this.mentionContainer.style.display="",this.mentionContainer.scrollTop=0,this.setMentionContainerPosition(),this.setIsOpen(!0)}},{key:"hideMentionList",value:function(){this.options.onBeforeClose(),this.mentionContainer.style.display="none",this.mentionContainer.remove(),this.setIsOpen(!1),this.quill.root.removeAttribute("aria-activedescendant")}},{key:"highlightItem",value:function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=0;rc-a&&(this.mentionContainer.scrollTop+=l-c+a)}}},{key:"getItemData",value:function(){var n=this.mentionList.childNodes[this.itemIndex].dataset.link,r=typeof n!="undefined",a=this.mentionList.childNodes[this.itemIndex].dataset.target;return r&&(this.mentionList.childNodes[this.itemIndex].dataset.value='-1&&(p=setTimeout(function(){f(),h(),a({statusText:"Request Timeout",status:408})},n)),window[u]=function(y){clearTimeout(p),f(),h(),r(y)};var m=document.createElement("script");m.addEventListener("error",g),m.src=e+(/\?/.test(e)?"&":"?")+d,document.body.appendChild(m)})}var _J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"chat-emoji-wrapper"},[n("div",{staticClass:"chat-emoji-box"},[e.type==="emosearch"?n("div",{staticClass:"chat-emoji-emosearch"},[n("Input",{attrs:{clearable:"",placeholder:e.$L("\u641C\u7D22\u8868\u60C5")},model:{value:e.emosearchKey,callback:function(r){e.emosearchKey=r},expression:"emosearchKey"}},[n("Icon",{class:{"icon-loading":e.emosearchLoad},attrs:{slot:"prefix",type:e.emosearchLoad?"ios-loading":"ios-search"},slot:"prefix"})],1)],1):e.type==="emoji"?n("div",{staticClass:"chat-emoji-nav"},e._l(e.emojiNavList,function(r){var a;return n("div",{key:r.type,class:(a={},a[`i-${r.name}`]=!0,a.active=r.type===e.emojiNavActive,a),domProps:{innerHTML:e._s(r.content)},on:{click:function(l){e.emojiNavActive=r.type}}})}),0):e._e(),n("Scrollbar",[n("ul",{class:[e.type,"no-dark-content"]},e._l(e.list,function(r){return n("li",{on:{click:function(a){return e.onSelect(a,r)}}},[r.type==="emoticon"?n("img",{attrs:{src:r.src,title:r.name,alt:r.name}}):n("span",{attrs:{title:r.name},domProps:{innerHTML:e._s(r.html)}})])}),0)])],1),e.onlyEmoji?e._e():n("ul",{ref:"chatEmojiMenuRef",staticClass:"chat-emoji-menu",style:e.chatEmojiMenuStyle,on:{scroll:e.onHandleScroll}},[e.showEmojiMenuScrollLeftBtn?n("li",{staticClass:"left-btn",on:{click:function(r){return e.onEmojiMenuScroll("left")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE72D")])]):e._e(),n("li",{class:{active:e.type==="emosearch"},on:{click:function(r){e.type="emosearch"}}},[n("i",{staticClass:"taskfont"},[e._v("\uE6F8")])]),n("li",{class:{active:e.type==="emoji"},on:{click:function(r){e.type="emoji"}}},[n("span",{staticClass:"no-dark-content"},[e._v("\u{1F600}")])]),e._l(e.emoticonData,function(r){return n("li",{class:{active:e.type==="emoticon"&&e.emoticonPath==r.path},on:{click:function(a){return e.onEmoticon(r.path)}}},[n("img",{attrs:{title:r.name,alt:r.name,src:r.src}})])}),e.showEmojiMenuScrollRightBtn?n("li",{staticClass:"right-btn",on:{click:function(r){return e.onEmojiMenuScroll("right")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE733")])]):e._e()],2)])},pJ=[];const mJ={name:"ChatEmoji",props:{searchKey:{type:String,default:""},onlyEmoji:{type:Boolean,default:!1}},data(){return{type:"emoji",emojiNavActive:"p",emojiNavList:[{type:"p",name:"people",content:''},{type:"n",name:"nature",content:` -`},{type:"d",name:"food",content:''},{type:"s",name:"symbols",content:''},{type:"a",name:"activity",content:''},{type:"t",name:"travel",content:''},{type:"o",name:"objects",content:''},{type:"f",name:"flags",content:''}],emoticonPath:"",emosearchKey:"",emosearchCache:null,emosearchLoad:!1,emosearchTimer:null,emosearchList:[],emojiData:[],emoticonData:[],emojiMenuScrollLeft:0}},mounted(){this.initData(),this.$store.state.windowPortrait||this.onMonitorWheel()},watch:{type(){this.onEmosearch()},emosearchKey(){this.onEmosearch()},searchKey:{handler(e){this.emosearchKey=e},immediate:!0}},computed:{list(){if(this.type==="emoji")return this.emojiData.filter(e=>e.category===this.emojiNavActive);if(this.type==="emosearch")return this.emosearchList;if(this.type==="emoticon"){const e=this.emoticonData.find(({path:t})=>t===this.emoticonPath);if(e)return e.list}return[]},chatEmojiMenuStyle(){return{paddingLeft:this.showEmojiMenuScrollLeftBtn?"34px":0,paddingRight:this.showEmojiMenuScrollRightBtn?"34px":0}},showEmojiMenuScrollLeftBtn(){return this.emojiMenuScrollLeft>34},showEmojiMenuScrollRightBtn(){var n;const e=this.$refs.chatEmojiMenuRef,t=((n=e==null?void 0:e.querySelector("li"))==null?void 0:n.offsetWidth)||48;return this.emojiMenuScrollLeft{const t=$A.apiUrl("../images/emoticon");$A.isArray(window.emojiData)&&(this.emojiData=window.emojiData.sort(function(n,r){return n.emoji_order-r.emoji_order}).map(n=>({type:"emoji",name:n.name,category:n.category,html:n.code_decimal}))),$A.isArray(window.emoticonData)&&(this.emoticonData=window.emoticonData.map(n=>Object.assign(n,{src:`${t}/${n.path}/${n.icon}`,list:n.list.map(r=>Object.assign(r,{type:"emoticon",asset:`images/emoticon/${n.path}/${r.path}`,src:`${t}/${n.path}/${r.path}`}))})))})},onEmosearch(){this.type!=="emosearch"||this.emosearchCache===this.emosearchKey||(this.emosearchCache=this.emosearchKey,this.emosearchLoad=!0,this.emosearchTimer&&clearTimeout(this.emosearchTimer),this.emosearchTimer=setTimeout(e=>{dJ("https://pic.sogou.com/napi/wap/pic",{query:this.emosearchKey+" \u8868\u60C5"}).then(t=>{if(this.emosearchList=[],t.status===0){const n=t.data.items;n.length>0&&(this.emosearchList=n.map(r=>({type:"emoticon",asset:"emosearch",name:r.title,src:r.thumbUrl,height:r.thumbHeight,width:r.thumbWidth})))}this.emosearchList.length===0&&$A.noticeWarning("\u6CA1\u6709\u641C\u7D22\u5230\u4EFB\u4F55\u8868\u60C5")}).catch(t=>{this.emosearchList=[],$A.noticeWarning("\u641C\u7D22\u7ED3\u679C\u4E3A\u7A7A")}).finally(t=>{this.emosearchLoad=!1})},300))},onEmoticon(e){this.type="emoticon",this.emoticonPath=e},onSelect(e,t){t.type==="emoji"?this.$emit("on-select",{type:"emoji",text:e.target.innerText}):this.$emit("on-select",t)},onMonitorWheel(){const e=this.$refs.chatEmojiMenuRef;e==null||e.addEventListener("wheel",t=>{t.preventDefault(),e.scrollLeft+=t.deltaY})},onEmojiMenuScroll(e){const t=this.$refs.chatEmojiMenuRef,n=t.offsetWidth-68,r=e=="right"?t.scrollLeft+n:t.scrollLeft-n;t.scrollTo({left:r,behavior:"smooth"})},onHandleScroll(e){this.emojiMenuScrollLeft=e.target.scrollLeft}}},bl={};var fJ=Kt(mJ,_J,pJ,!1,gJ,null,null,null);function gJ(e){for(let t in bl)this[t]=bl[t]}var Ic=function(){return fJ.exports}();const vl="ontouchend"in document;var hJ={bind(e,t){let n=!1;e.__touchMouseDown__=r=>{r.preventDefault(),n=!0,t.value("down",r)},e.__touchMouseMove__=r=>{n&&t.value("move",r)},e.__touchMouseUp__=r=>{n&&(n=!1,t.value("up"))},vl?(e.addEventListener("touchstart",e.__touchMouseDown__),e.addEventListener("touchmove",e.__touchMouseMove__),e.addEventListener("touchend",e.__touchMouseUp__)):(e.addEventListener("mousedown",e.__touchMouseDown__),document.addEventListener("mousemove",e.__touchMouseMove__),document.addEventListener("mouseup",e.__touchMouseUp__))},update(){},unbind(e){vl?(e.removeEventListener("touchstart",e.__touchMouseDown__),e.removeEventListener("touchmove",e.__touchMouseMove__),e.removeEventListener("touchend",e.__touchMouseUp__)):(e.removeEventListener("mousedown",e.__touchMouseDown__),document.removeEventListener("mousemove",e.__touchMouseMove__),document.removeEventListener("mouseup",e.__touchMouseUp__)),delete e.__touchMouseDown__,delete e.__touchMouseMove__,delete e.__touchMouseUp__}};function $n(e){return e===void 0&&(e=document.body),e===!0?document.body:e instanceof window.Node?e:document.querySelector(e)}const EJ={inserted(e,{value:t},n){if(e.dataset&&e.dataset.transfer!=="true")return!1;e.className=e.className?e.className+" v-transfer-dom":"v-transfer-dom";const r=e.parentNode;if(!r)return;const a=document.createComment("");let l=!1;t!==!1&&(r.replaceChild(a,e),$n(t).appendChild(e),l=!0),e.__transferDomData||(e.__transferDomData={parentNode:r,home:a,target:$n(t),hasMovedOut:l})},componentUpdated(e,{value:t}){if(e.dataset&&e.dataset.transfer!=="true")return!1;const n=e.__transferDomData;if(!n)return;const r=n.parentNode,a=n.home,l=n.hasMovedOut;!l&&t?(r.replaceChild(a,e),$n(t).appendChild(e),e.__transferDomData=Object.assign({},e.__transferDomData,{hasMovedOut:!0,target:$n(t)})):l&&t===!1?(r.replaceChild(e,a),e.__transferDomData=Object.assign({},e.__transferDomData,{hasMovedOut:!1,target:$n(t)})):t&&$n(t).appendChild(e)},unbind(e){if(e.dataset&&e.dataset.transfer!=="true")return!1;e.className=e.className.replace("v-transfer-dom",""),e.__transferDomData&&(e.__transferDomData.hasMovedOut===!0&&e.__transferDomData.parentNode&&e.__transferDomData.parentNode.appendChild(e),e.__transferDomData=null)}};var SJ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:e.boxClass},[n("div",{staticClass:"chat-input-quick-emoji"},[n("EPopover",{ref:"emojiQuickRef",attrs:{visibleArrow:!1,transition:"",placement:"top-end",popperClass:"chat-quick-emoji-popover"},model:{value:e.emojiQuickShow,callback:function(r){e.emojiQuickShow=r},expression:"emojiQuickShow"}},[n("div",{attrs:{slot:"reference"},slot:"reference"}),n("Scrollbar",{ref:"emojiWrapper",attrs:{tag:"ul","enable-x":!0,"enable-y":!1,"class-name":"chat-quick-emoji-wrapper scrollbar-hidden"}},e._l(e.emojiQuickItems,function(r){return n("li",{on:{click:function(a){return e.onEmojiQuick(r)}}},[n("img",{attrs:{title:r.name,alt:r.name,src:r.src}})])}),0)],1)],1),n("div",{ref:"inputWrapper",staticClass:"chat-input-wrapper",on:{click:function(r){return r.stopPropagation(),e.focus.apply(null,arguments)}}},[e.quoteData?n("div",{staticClass:"chat-quote"},[e.quoteUpdate?n("div",{staticClass:"quote-label"},[e._v(e._s(e.$L("\u7F16\u8F91\u6D88\u606F")))]):n("UserAvatar",{attrs:{userid:e.quoteData.userid,"show-icon":!1,"show-name":!0}}),n("div",{staticClass:"quote-desc"},[e._v(e._s(e.$A.getMsgSimpleDesc(e.quoteData)))]),n("i",{staticClass:"taskfont",on:{click:function(r){return r.stopPropagation(),e.cancelQuote.apply(null,arguments)}}},[e._v("\uE6E5")])],1):e._e(),n("div",{ref:"editor",staticClass:"no-dark-content",style:e.editorStyle,on:{click:function(r){return r.stopPropagation(),e.onClickEditor.apply(null,arguments)},paste:e.handlePaste}}),n("ul",{staticClass:"chat-toolbar",on:{click:function(r){r.stopPropagation()}}},[n("li",[e.emojiBottom?n("ETooltip",{ref:"emojiTip",attrs:{disabled:e.$isEEUiApp||e.windowTouch||e.showEmoji,placement:"top",content:e.$L("\u8868\u60C5")}},[n("i",{staticClass:"taskfont",on:{click:function(r){e.showEmoji=!e.showEmoji}}},[e._v("\uE7AD")])]):n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:e.showEmoji,callback:function(r){e.showEmoji=r},expression:"showEmoji"}},[n("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.showEmoji,placement:"top",content:e.$L("\u8868\u60C5")},slot:"reference"},[n("i",{staticClass:"taskfont"},[e._v("\uE7AD")])]),e.showEmoji?n("ChatEmoji",{attrs:{searchKey:e.emojiQuickKey},on:{"on-select":e.onSelectEmoji}}):e._e()],1)],1),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u9009\u62E9\u6210\u5458")}},[n("i",{staticClass:"taskfont",on:{click:function(r){return e.onToolbar("user")}}},[e._v("\uE78F")])])],1),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u9009\u62E9\u4EFB\u52A1")}},[n("i",{staticClass:"taskfont",on:{click:function(r){return e.onToolbar("task")}}},[e._v("\uE7D6")])])],1),n("li",[n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:e.showMore,callback:function(r){e.showMore=r},expression:"showMore"}},[n("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.showMore,placement:"top",content:e.$L("\u5C55\u5F00")},slot:"reference"},[n("i",{staticClass:"taskfont"},[e._v("\uE790")])]),e.recordReady?n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("meeting")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7C1")]),e._v(" "+e._s(e.$L("\u65B0\u4F1A\u8BAE"))+" ")]):e._e(),e.canCall?n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("call")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7BA")]),e._v(" "+e._s(e.$L("\u62E8\u6253\u7535\u8BDD"))+" ")]):e._e(),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("image")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7BC")]),e._v(" "+e._s(e.$L("\u53D1\u9001\u56FE\u7247"))+" ")]),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("file")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7C0")]),e._v(" "+e._s(e.$L("\u4E0A\u4F20\u6587\u4EF6"))+" ")]),e.canAnon?n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("anon")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE690")]),e._v(" "+e._s(e.$L("\u533F\u540D\u6D88\u606F"))+" ")]):e._e(),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("full")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE6A7")]),e._v(" "+e._s(e.$L("\u5168\u5C4F\u8F93\u5165"))+" ")])],1)],1),n("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:e.clickSend,expression:"clickSend"},{name:"longpress",rawName:"v-longpress",value:{callback:e.longSend,delay:300},expression:"{callback: longSend, delay: 300}"}],ref:"chatSend",staticClass:"chat-send",class:e.sendClass},[n("EPopover",{attrs:{visibleArrow:!1,trigger:"manual",placement:"top",popperClass:"chat-input-more-popover"},model:{value:e.showMenu,callback:function(r){e.showMenu=r},expression:"showMenu"}},[n("ETooltip",{ref:"sendTip",attrs:{slot:"reference",placement:"top",disabled:e.$isEEUiApp||e.windowTouch||e.showMenu,content:e.$L(e.sendContent)},slot:"reference"},[e.loading?n("div",[n("div",{staticClass:"chat-load"},[n("Loading")],1)]):n("div",[n("transition",{attrs:{name:"mobile-send"}},[e.sendClass==="recorder"?n("i",{staticClass:"taskfont"},[e._v("\uE609")]):e._e()]),n("transition",{attrs:{name:"mobile-send"}},[e.sendClass!=="recorder"?n("i",{staticClass:"taskfont"},[e._v("\uE606")]):e._e()])],1)]),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onSend("silence")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7D7")]),e._v(" "+e._s(e.$L("\u65E0\u58F0\u53D1\u9001"))+" ")]),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onSend("md")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE647")]),e._v(" "+e._s(e.$L("Markdown \u683C\u5F0F\u53D1\u9001"))+" ")])],1)],1),n("li",{staticClass:"chat-record-recwave"},[n("div",{ref:"recwave"})])]),n("div",{staticClass:"chat-cover",on:{click:function(r){return r.stopPropagation(),e.onClickCover.apply(null,arguments)}}})]),e.emojiBottom&&e.showEmoji?n("ChatEmoji",{attrs:{searchKey:e.emojiQuickKey},on:{"on-select":e.onSelectEmoji}}):e._e(),n("transition",{attrs:{name:"fade"}},[["ready","ing"].includes(e.recordState)?n("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:e.touchLimitY},style:e.recordTransferStyle,attrs:{"data-transfer":!0},on:{click:e.stopRecord}},[e.recordDuration>0?n("div",{staticClass:"record-duration"},[e._v(e._s(e.recordFormatDuration))]):n("div",{staticClass:"record-loading"},[n("Loading")],1),n("div",{staticClass:"record-cancel",on:{click:function(r){return r.stopPropagation(),e.stopRecord(!0)}}},[e._v(e._s(e.$L(e.touchLimitY?"\u677E\u5F00\u53D6\u6D88":"\u5411\u4E0A\u6ED1\u52A8\u53D6\u6D88")))])]):e._e()]),n("Modal",{attrs:{"mask-closable":!1,beforeClose:e.onFullBeforeClose,"class-name":"chat-input-full-input","footer-hide":"",fullscreen:""},model:{value:e.fullInput,callback:function(r){e.fullInput=r},expression:"fullInput"}},[n("div",{staticClass:"chat-input-box"},[n("div",{staticClass:"chat-input-wrapper"},[n("div",{ref:"editorFull",staticClass:"no-dark-content"})])]),n("i",{staticClass:"taskfont",attrs:{slot:"close"},slot:"close"},[e._v("\uE6AB")])])],1)},bJ=[];const vJ={name:"ChatInput",components:{ChatEmoji:Ic},directives:{touchmouse:hJ,TransferDom:EJ,clickoutside:zu,longpress:za},props:{value:{type:[String,Number],default:""},dialogId:{type:Number,default:0},taskId:{type:Number,default:0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},disabledRecord:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enterSend:{type:[String,Boolean],default:null},emojiBottom:{type:Boolean,default:!1},sendMenu:{type:Boolean,default:!0},options:{type:Object,default:()=>({})},toolbar:{type:Array,default:()=>["bold","strike","italic","underline",{list:"ordered"},{list:"bullet"},"blockquote","code-block"]},maxlength:{type:Number},defaultMenuOrientation:{type:String,default:"top"}},data(){return{quill:null,isFocus:!1,rangeIndex:0,_content:"",_options:{},mentionMode:"",userList:null,userCache:null,taskList:null,fileList:{},showMenu:!1,showMore:!1,showEmoji:!1,emojiQuickShow:!1,emojiQuickKey:"",emojiQuickItems:[],observer:null,wrapperWidth:0,wrapperHeight:0,editorHeight:0,recordReady:!1,recordRec:null,recordBlob:null,recordWave:null,recordInter:null,recordState:"stop",recordDuration:0,touchStart:{},touchLimitX:!1,touchLimitY:!1,pasteClean:!0,changeLoad:0,isSpecVersion:this.checkIOSVersion(),emojiTimer:null,scrollTimer:null,selectTimer:null,textTimer:null,fileTimer:null,moreTimer:null,fullInput:!1,fullQuill:null}},mounted(){this.init(),this.observer=new ResizeObserver(e=>{e.some(({target:t,contentRect:n})=>{t===this.$el?(this.wrapperWidth=n.width,this.wrapperHeight=n.height):t===this.$refs.editor&&(this.editorHeight=n.height)})}),this.observer.observe(this.$el),this.observer.observe(this.$refs.editor),this.recordInter=setInterval(e=>{this.recordState==="ing"&&(this.__recordDuration&&this.__recordDuration===this.recordDuration?(this.__recordDuration=null,this.stopRecord(!0),$A.messageWarning("\u5F55\u97F3\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")):this.__recordDuration=this.recordDuration)},1e3),this.$isEEUiApp&&(window.__onPermissionRequest=(e,t)=>{e==="recordAudio"&&t===!1&&this.stopRecord(!0)}),$A.loadScript("js/emoticon.all.js")},beforeDestroy(){this.quill&&(this.quill=null),this.recordRec&&(this.recordRec=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.recordInter&&clearInterval(this.recordInter)},computed:{...jn(["cacheProjects","cacheTasks","cacheUserBasic","cacheDialogs","dialogMsgs"]),isEnterSend({enterSend:e}){return typeof e=="boolean"?e:!0},canCall(){return this.dialogData.type==="user"&&!this.dialogData.bot&&this.$isEEUiApp},canAnon(){return this.dialogData.type==="user"&&!this.dialogData.bot},editorStyle(){const{wrapperWidth:e,editorHeight:t}=this,n={};return e>0&&t>0&&(e<280||t>40)&&(n.width="100%"),n},recordTransferStyle(){const{windowScrollY:e}=this;return e>0?{marginTop:e/2+"px"}:null},boxClass(){const e=[];return["ready","ing"].includes(this.recordState)&&(this.recordState==="ing"&&this.recordDuration>0?e.push("record-progress"):e.push("record-ready")),this.showMenu&&e.push("show-menu"),this.showMore&&e.push("show-more"),this.showEmoji&&e.push("show-emoji"),this.mentionMode&&e.push(this.mentionMode),e},sendClass(){return this.value?"sender":this.recordReady?"recorder":""},sendContent(){const{sendTip:e}=this.$refs;return e&&e.$refs.popper&&(e.$refs.popper.style.visibility="hidden",e.showPopper=!1,setTimeout(t=>{e.$refs.popper&&(e.$refs.popper.style.visibility="visible")},300)),this.sendClass==="recorder"?"\u957F\u6309\u5F55\u97F3":"\u53D1\u9001"},recordFormatDuration(){const{recordDuration:e}=this;let t=Math.floor(e/6e4),n=Math.floor(e/1e3)%60,r=("00"+e%1e3).substr(-2);return t<10&&(t=`0${t}`),n<10&&(n=`0${n}`),`${t}:${n}\u2033${r}`},dialogData(){return this.dialogId>0?this.cacheDialogs.find(({id:e})=>e==this.dialogId)||{}:{}},quoteUpdate(){return this.dialogData.extra_quote_type==="update"},quoteData(){const{extra_quote_id:e}=this.dialogData;return e?this.dialogMsgs.find(t=>t.id===e):null},separateSendButton(){var e;return((e=$A.jsonParse(window.localStorage.getItem("__keyboard:data__")))==null?void 0:e.separate_send_button)!=="close"}},watch:{value(e){this.quill&&(e&&e!==this._content?(this._content=e,this.setContent(e)):e||this.quill.setText("")),this.$store.dispatch("saveDialogDraft",{id:this.dialogId,extra_draft_content:this.filterInvalidLine(e)})},disabled(e){var t;(t=this.quill)==null||t.enable(!e)},dialogId(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.loadInputDraft()},taskId(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.loadInputDraft()},"dialogData.extra_draft_content"(){this.isFocus||this.loadInputDraft()},showMenu(e){e&&(this.showMore=!1,this.showEmoji=!1,this.emojiQuickShow=!1)},showMore(e){e&&(this.showMenu=!1,this.showEmoji=!1,this.emojiQuickShow=!1)},showEmoji(e){if(this.emojiBottom&&(e?this.quill.enable(!1):this.disabled||this.quill.enable(!0)),e){let t=this.value.replace(/ /g," ").replace(/<[^>]+>/g,"");if(t&&t.indexOf(" ")===-1&&t.length>=1&&t.length<=8?this.emojiQuickKey=t:this.emojiQuickKey="",this.showMenu=!1,this.showMore=!1,this.emojiQuickShow=!1,this.quill){const n=this.quill.selection.savedRange;this.rangeIndex=n?n.index:0}}else this.rangeIndex>0&&this.quill.setSelection(this.rangeIndex);this.$emit("on-emoji-visible-change",e)},emojiQuickShow(e){e&&(this.showMenu=!1,this.showMore=!1,this.showEmoji=!1)},isFocus(e){this.scrollTimer&&clearInterval(this.scrollTimer),e?(this.$emit("on-focus"),this.hidePopover(),this.isSpecVersion||this.windowPortrait&&(this.scrollTimer=setInterval(()=>{var t;(t=this.quill)!=null&&t.hasFocus()?this.windowScrollY>0&&$A.scrollIntoViewIfNeeded(this.$refs.editor):clearInterval(this.scrollTimer)},200))):this.$emit("on-blur")},recordState(e){e==="ing"?this.recordWave=window.Recorder.FrequencyHistogramView({elem:this.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1}):(this.recordWave=null,this.$refs.recwave.innerHTML=""),this.$emit("on-record-state",e)},wrapperHeight(e,t){this.$emit("on-height-change",{newVal:e,oldVal:t})},fullInput(e){var t;(t=this.quill)==null||t.enable(!e)}},methods:{init(){this._options=Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:this.$isEEUiApp||this.windowTouch?!1:this.toolbar,keyboard:{bindings:{"short enter":{key:13,shortKey:!0,handler:e=>{if(!this.isEnterSend){if(this.separateSendButton){const t=this.quill.getSelection(!0).index;return this.quill.insertText(t,`\r +`},{type:"d",name:"food",content:''},{type:"s",name:"symbols",content:''},{type:"a",name:"activity",content:''},{type:"t",name:"travel",content:''},{type:"o",name:"objects",content:''},{type:"f",name:"flags",content:''}],emoticonPath:"",emosearchKey:"",emosearchCache:null,emosearchLoad:!1,emosearchTimer:null,emosearchList:[],emojiData:[],emoticonData:[],emojiMenuScrollLeft:0}},mounted(){this.initData(),this.$store.state.windowPortrait||this.onMonitorWheel()},watch:{type(){this.onEmosearch()},emosearchKey(){this.onEmosearch()},searchKey:{handler(e){this.emosearchKey=e},immediate:!0}},computed:{list(){if(this.type==="emoji")return this.emojiData.filter(e=>e.category===this.emojiNavActive);if(this.type==="emosearch")return this.emosearchList;if(this.type==="emoticon"){const e=this.emoticonData.find(({path:t})=>t===this.emoticonPath);if(e)return e.list}return[]},chatEmojiMenuStyle(){return{paddingLeft:this.showEmojiMenuScrollLeftBtn?"34px":0,paddingRight:this.showEmojiMenuScrollRightBtn?"34px":0}},showEmojiMenuScrollLeftBtn(){return this.emojiMenuScrollLeft>34},showEmojiMenuScrollRightBtn(){var n;const e=this.$refs.chatEmojiMenuRef,t=((n=e==null?void 0:e.querySelector("li"))==null?void 0:n.offsetWidth)||48;return this.emojiMenuScrollLeft{const t=$A.apiUrl("../images/emoticon");$A.isArray(window.emojiData)&&(this.emojiData=window.emojiData.sort(function(n,r){return n.emoji_order-r.emoji_order}).map(n=>({type:"emoji",name:n.name,category:n.category,html:n.code_decimal}))),$A.isArray(window.emoticonData)&&(this.emoticonData=window.emoticonData.map(n=>Object.assign(n,{src:`${t}/${n.path}/${n.icon}`,list:n.list.map(r=>Object.assign(r,{type:"emoticon",asset:`images/emoticon/${n.path}/${r.path}`,src:`${t}/${n.path}/${r.path}`}))})))})},onEmosearch(){this.type!=="emosearch"||this.emosearchCache===this.emosearchKey||(this.emosearchCache=this.emosearchKey,this.emosearchLoad=!0,this.emosearchTimer&&clearTimeout(this.emosearchTimer),this.emosearchTimer=setTimeout(e=>{dJ("https://pic.sogou.com/napi/wap/pic",{query:this.emosearchKey+" \u8868\u60C5"}).then(t=>{if(this.emosearchList=[],t.status===0){const n=t.data.items;n.length>0&&(this.emosearchList=n.map(r=>({type:"emoticon",asset:"emosearch",name:r.title,src:r.thumbUrl,height:r.thumbHeight,width:r.thumbWidth})))}this.emosearchList.length===0&&$A.noticeWarning("\u6CA1\u6709\u641C\u7D22\u5230\u4EFB\u4F55\u8868\u60C5")}).catch(t=>{this.emosearchList=[],$A.noticeWarning("\u641C\u7D22\u7ED3\u679C\u4E3A\u7A7A")}).finally(t=>{this.emosearchLoad=!1})},300))},onEmoticon(e){this.type="emoticon",this.emoticonPath=e},onSelect(e,t){t.type==="emoji"?this.$emit("on-select",{type:"emoji",text:e.target.innerText}):this.$emit("on-select",t)},onMonitorWheel(){const e=this.$refs.chatEmojiMenuRef;e==null||e.addEventListener("wheel",t=>{t.preventDefault(),e.scrollLeft+=t.deltaY})},onEmojiMenuScroll(e){const t=this.$refs.chatEmojiMenuRef,n=t.offsetWidth-68,r=e=="right"?t.scrollLeft+n:t.scrollLeft-n;t.scrollTo({left:r,behavior:"smooth"})},onHandleScroll(e){this.emojiMenuScrollLeft=e.target.scrollLeft}}},bl={};var fJ=Kt(mJ,_J,pJ,!1,gJ,null,null,null);function gJ(e){for(let t in bl)this[t]=bl[t]}var Ic=function(){return fJ.exports}();const vl="ontouchend"in document;var hJ={bind(e,t){let n=!1;e.__touchMouseDown__=r=>{r.preventDefault(),n=!0,t.value("down",r)},e.__touchMouseMove__=r=>{n&&t.value("move",r)},e.__touchMouseUp__=r=>{n&&(n=!1,t.value("up"))},vl?(e.addEventListener("touchstart",e.__touchMouseDown__),e.addEventListener("touchmove",e.__touchMouseMove__),e.addEventListener("touchend",e.__touchMouseUp__)):(e.addEventListener("mousedown",e.__touchMouseDown__),document.addEventListener("mousemove",e.__touchMouseMove__),document.addEventListener("mouseup",e.__touchMouseUp__))},update(){},unbind(e){vl?(e.removeEventListener("touchstart",e.__touchMouseDown__),e.removeEventListener("touchmove",e.__touchMouseMove__),e.removeEventListener("touchend",e.__touchMouseUp__)):(e.removeEventListener("mousedown",e.__touchMouseDown__),document.removeEventListener("mousemove",e.__touchMouseMove__),document.removeEventListener("mouseup",e.__touchMouseUp__)),delete e.__touchMouseDown__,delete e.__touchMouseMove__,delete e.__touchMouseUp__}};function $n(e){return e===void 0&&(e=document.body),e===!0?document.body:e instanceof window.Node?e:document.querySelector(e)}const EJ={inserted(e,{value:t},n){if(e.dataset&&e.dataset.transfer!=="true")return!1;e.className=e.className?e.className+" v-transfer-dom":"v-transfer-dom";const r=e.parentNode;if(!r)return;const a=document.createComment("");let l=!1;t!==!1&&(r.replaceChild(a,e),$n(t).appendChild(e),l=!0),e.__transferDomData||(e.__transferDomData={parentNode:r,home:a,target:$n(t),hasMovedOut:l})},componentUpdated(e,{value:t}){if(e.dataset&&e.dataset.transfer!=="true")return!1;const n=e.__transferDomData;if(!n)return;const r=n.parentNode,a=n.home,l=n.hasMovedOut;!l&&t?(r.replaceChild(a,e),$n(t).appendChild(e),e.__transferDomData=Object.assign({},e.__transferDomData,{hasMovedOut:!0,target:$n(t)})):l&&t===!1?(r.replaceChild(e,a),e.__transferDomData=Object.assign({},e.__transferDomData,{hasMovedOut:!1,target:$n(t)})):t&&$n(t).appendChild(e)},unbind(e){if(e.dataset&&e.dataset.transfer!=="true")return!1;e.className=e.className.replace("v-transfer-dom",""),e.__transferDomData&&(e.__transferDomData.hasMovedOut===!0&&e.__transferDomData.parentNode&&e.__transferDomData.parentNode.appendChild(e),e.__transferDomData=null)}};var SJ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:e.boxClass},[n("div",{staticClass:"chat-input-quick-emoji"},[n("EPopover",{ref:"emojiQuickRef",attrs:{visibleArrow:!1,transition:"",placement:"top-end",popperClass:"chat-quick-emoji-popover"},model:{value:e.emojiQuickShow,callback:function(r){e.emojiQuickShow=r},expression:"emojiQuickShow"}},[n("div",{attrs:{slot:"reference"},slot:"reference"}),n("Scrollbar",{ref:"emojiWrapper",attrs:{tag:"ul","enable-x":!0,"enable-y":!1,"class-name":"chat-quick-emoji-wrapper scrollbar-hidden"}},e._l(e.emojiQuickItems,function(r){return n("li",{on:{click:function(a){return e.onEmojiQuick(r)}}},[n("img",{attrs:{title:r.name,alt:r.name,src:r.src}})])}),0)],1)],1),n("div",{ref:"inputWrapper",staticClass:"chat-input-wrapper",on:{click:function(r){return r.stopPropagation(),e.focus.apply(null,arguments)}}},[e.quoteData?n("div",{staticClass:"chat-quote"},[e.quoteUpdate?n("div",{staticClass:"quote-label"},[e._v(e._s(e.$L("\u7F16\u8F91\u6D88\u606F")))]):n("UserAvatar",{attrs:{userid:e.quoteData.userid,"show-icon":!1,"show-name":!0}}),n("div",{staticClass:"quote-desc"},[e._v(e._s(e.$A.getMsgSimpleDesc(e.quoteData)))]),n("i",{staticClass:"taskfont",on:{click:function(r){return r.stopPropagation(),e.cancelQuote.apply(null,arguments)}}},[e._v("\uE6E5")])],1):e._e(),n("div",{ref:"editor",staticClass:"no-dark-content",style:e.editorStyle,on:{click:function(r){return r.stopPropagation(),e.onClickEditor.apply(null,arguments)},paste:e.handlePaste}}),n("ul",{staticClass:"chat-toolbar",on:{click:function(r){r.stopPropagation()}}},[n("li",[e.emojiBottom?n("ETooltip",{ref:"emojiTip",attrs:{disabled:e.$isEEUiApp||e.windowTouch||e.showEmoji,placement:"top",content:e.$L("\u8868\u60C5")}},[n("i",{staticClass:"taskfont",on:{click:function(r){e.showEmoji=!e.showEmoji}}},[e._v("\uE7AD")])]):n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:e.showEmoji,callback:function(r){e.showEmoji=r},expression:"showEmoji"}},[n("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.showEmoji,placement:"top",content:e.$L("\u8868\u60C5")},slot:"reference"},[n("i",{staticClass:"taskfont"},[e._v("\uE7AD")])]),e.showEmoji?n("ChatEmoji",{attrs:{searchKey:e.emojiQuickKey},on:{"on-select":e.onSelectEmoji}}):e._e()],1)],1),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u9009\u62E9\u6210\u5458")}},[n("i",{staticClass:"taskfont",on:{click:function(r){return e.onToolbar("user")}}},[e._v("\uE78F")])])],1),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u9009\u62E9\u4EFB\u52A1")}},[n("i",{staticClass:"taskfont",on:{click:function(r){return e.onToolbar("task")}}},[e._v("\uE7D6")])])],1),n("li",[n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:e.showMore,callback:function(r){e.showMore=r},expression:"showMore"}},[n("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.showMore,placement:"top",content:e.$L("\u5C55\u5F00")},slot:"reference"},[n("i",{staticClass:"taskfont"},[e._v("\uE790")])]),e.recordReady?n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("meeting")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7C1")]),e._v(" "+e._s(e.$L("\u65B0\u4F1A\u8BAE"))+" ")]):e._e(),e.canCall?n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("call")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7BA")]),e._v(" "+e._s(e.$L("\u62E8\u6253\u7535\u8BDD"))+" ")]):e._e(),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("image")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7BC")]),e._v(" "+e._s(e.$L("\u53D1\u9001\u56FE\u7247"))+" ")]),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("file")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7C0")]),e._v(" "+e._s(e.$L("\u4E0A\u4F20\u6587\u4EF6"))+" ")]),e.canAnon?n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("anon")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE690")]),e._v(" "+e._s(e.$L("\u533F\u540D\u6D88\u606F"))+" ")]):e._e(),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onToolbar("full")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE6A7")]),e._v(" "+e._s(e.$L("\u5168\u5C4F\u8F93\u5165"))+" ")])],1)],1),n("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:e.clickSend,expression:"clickSend"},{name:"longpress",rawName:"v-longpress",value:{callback:e.onShowMenu,delay:300},expression:"{callback: onShowMenu, delay: 300}"}],ref:"chatSend",staticClass:"chat-send",class:e.sendClass},[n("EPopover",{attrs:{visibleArrow:!1,trigger:"manual",placement:"top",popperClass:"chat-input-more-popover"},model:{value:e.showMenu,callback:function(r){e.showMenu=r},expression:"showMenu"}},[n("ETooltip",{ref:"sendTip",attrs:{slot:"reference",placement:"top",disabled:e.$isEEUiApp||e.windowTouch||e.showMenu,content:e.$L(e.sendContent)},slot:"reference"},[e.loading?n("div",[n("div",{staticClass:"chat-load"},[n("Loading")],1)]):n("div",[n("transition",{attrs:{name:"mobile-send"}},[e.sendClass==="recorder"?n("i",{staticClass:"taskfont"},[e._v("\uE609")]):e._e()]),n("transition",{attrs:{name:"mobile-send"}},[e.sendClass!=="recorder"?n("i",{staticClass:"taskfont"},[e._v("\uE606")]):e._e()])],1)]),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onSend("silence")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7D7")]),e._v(" "+e._s(e.$L("\u65E0\u58F0\u53D1\u9001"))+" ")]),n("div",{staticClass:"chat-input-popover-item",on:{click:function(r){return e.onSend("md")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE647")]),e._v(" "+e._s(e.$L("Markdown \u683C\u5F0F\u53D1\u9001"))+" ")])],1)],1),n("li",{staticClass:"chat-record-recwave"},[n("div",{ref:"recwave"})])]),n("div",{staticClass:"chat-cover",on:{click:function(r){return r.stopPropagation(),e.onClickCover.apply(null,arguments)}}})]),e.emojiBottom&&e.showEmoji?n("ChatEmoji",{attrs:{searchKey:e.emojiQuickKey},on:{"on-select":e.onSelectEmoji}}):e._e(),n("transition",{attrs:{name:"fade"}},[["ready","ing"].includes(e.recordState)?n("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:e.touchLimitY},style:e.recordTransferStyle,attrs:{"data-transfer":!0},on:{click:e.stopRecord}},[e.recordDuration>0?n("div",{staticClass:"record-duration"},[e._v(e._s(e.recordFormatDuration))]):n("div",{staticClass:"record-loading"},[n("Loading")],1),n("div",{staticClass:"record-cancel",on:{click:function(r){return r.stopPropagation(),e.stopRecord(!0)}}},[e._v(e._s(e.$L(e.touchLimitY?"\u677E\u5F00\u53D6\u6D88":"\u5411\u4E0A\u6ED1\u52A8\u53D6\u6D88")))])]):e._e()]),n("Modal",{attrs:{"mask-closable":!1,beforeClose:e.onFullBeforeClose,"class-name":"chat-input-full-input","footer-hide":"",fullscreen:""},model:{value:e.fullInput,callback:function(r){e.fullInput=r},expression:"fullInput"}},[n("div",{staticClass:"chat-input-box"},[n("div",{staticClass:"chat-input-wrapper"},[n("div",{ref:"editorFull",staticClass:"no-dark-content"})])]),n("i",{staticClass:"taskfont",attrs:{slot:"close"},slot:"close"},[e._v("\uE6AB")])])],1)},bJ=[];const vJ={name:"ChatInput",components:{ChatEmoji:Ic},directives:{touchmouse:hJ,TransferDom:EJ,clickoutside:zu,longpress:za},props:{value:{type:[String,Number],default:""},dialogId:{type:Number,default:0},taskId:{type:Number,default:0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},disabledRecord:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enterSend:{type:[String,Boolean],default:null},emojiBottom:{type:Boolean,default:!1},sendMenu:{type:Boolean,default:!0},options:{type:Object,default:()=>({})},toolbar:{type:Array,default:()=>["bold","strike","italic","underline",{list:"ordered"},{list:"bullet"},"blockquote","code-block"]},maxlength:{type:Number},defaultMenuOrientation:{type:String,default:"top"}},data(){return{quill:null,isFocus:!1,rangeIndex:0,_content:"",_options:{},mentionMode:"",userList:null,userCache:null,taskList:null,fileList:{},showMenu:!1,showMore:!1,showEmoji:!1,emojiQuickShow:!1,emojiQuickKey:"",emojiQuickItems:[],observer:null,wrapperWidth:0,wrapperHeight:0,editorHeight:0,recordReady:!1,recordRec:null,recordBlob:null,recordWave:null,recordInter:null,recordState:"stop",recordDuration:0,touchStart:{},touchLimitX:!1,touchLimitY:!1,pasteClean:!0,changeLoad:0,isSpecVersion:this.checkIOSVersion(),emojiTimer:null,scrollTimer:null,selectTimer:null,textTimer:null,fileTimer:null,moreTimer:null,fullInput:!1,fullQuill:null}},mounted(){this.init(),this.observer=new ResizeObserver(e=>{e.some(({target:t,contentRect:n})=>{t===this.$el?(this.wrapperWidth=n.width,this.wrapperHeight=n.height):t===this.$refs.editor&&(this.editorHeight=n.height)})}),this.observer.observe(this.$el),this.observer.observe(this.$refs.editor),this.recordInter=setInterval(e=>{this.recordState==="ing"&&(this.__recordDuration&&this.__recordDuration===this.recordDuration?(this.__recordDuration=null,this.stopRecord(!0),$A.messageWarning("\u5F55\u97F3\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")):this.__recordDuration=this.recordDuration)},1e3),this.$isEEUiApp&&(window.__onPermissionRequest=(e,t)=>{e==="recordAudio"&&t===!1&&this.stopRecord(!0)}),$A.loadScript("js/emoticon.all.js")},beforeDestroy(){this.quill&&(this.quill=null),this.recordRec&&(this.recordRec=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.recordInter&&clearInterval(this.recordInter)},computed:{...jn(["cacheProjects","cacheTasks","cacheUserBasic","cacheDialogs","dialogMsgs"]),isEnterSend({enterSend:e}){return typeof e=="boolean"?e:!0},canCall(){return this.dialogData.type==="user"&&!this.dialogData.bot&&this.$isEEUiApp},canAnon(){return this.dialogData.type==="user"&&!this.dialogData.bot},editorStyle(){const{wrapperWidth:e,editorHeight:t}=this,n={};return e>0&&t>0&&(e<280||t>40)&&(n.width="100%"),n},recordTransferStyle(){const{windowScrollY:e}=this;return e>0?{marginTop:e/2+"px"}:null},boxClass(){const e=[];return["ready","ing"].includes(this.recordState)&&(this.recordState==="ing"&&this.recordDuration>0?e.push("record-progress"):e.push("record-ready")),this.showMenu&&e.push("show-menu"),this.showMore&&e.push("show-more"),this.showEmoji&&e.push("show-emoji"),this.mentionMode&&e.push(this.mentionMode),e},sendClass(){return this.filterInvalidLine(this.value)?"sender":this.recordReady?"recorder":""},sendContent(){const{sendTip:e}=this.$refs;return e&&e.$refs.popper&&(e.$refs.popper.style.visibility="hidden",e.showPopper=!1,setTimeout(t=>{e.$refs.popper&&(e.$refs.popper.style.visibility="visible")},300)),this.sendClass==="recorder"?"\u957F\u6309\u5F55\u97F3":"\u53D1\u9001"},recordFormatDuration(){const{recordDuration:e}=this;let t=Math.floor(e/6e4),n=Math.floor(e/1e3)%60,r=("00"+e%1e3).substr(-2);return t<10&&(t=`0${t}`),n<10&&(n=`0${n}`),`${t}:${n}\u2033${r}`},dialogData(){return this.dialogId>0?this.cacheDialogs.find(({id:e})=>e==this.dialogId)||{}:{}},quoteUpdate(){return this.dialogData.extra_quote_type==="update"},quoteData(){const{extra_quote_id:e}=this.dialogData;return e?this.dialogMsgs.find(t=>t.id===e):null},separateSendButton(){var e;return((e=$A.jsonParse(window.localStorage.getItem("__keyboard:data__")))==null?void 0:e.separate_send_button)!=="close"}},watch:{value(e){this.quill&&(e&&e!==this._content?(this._content=e,this.setContent(e)):e||this.quill.setText("")),this.$store.dispatch("saveDialogDraft",{id:this.dialogId,extra_draft_content:this.filterInvalidLine(e)})},disabled(e){var t;(t=this.quill)==null||t.enable(!e)},dialogId(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.loadInputDraft()},taskId(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.loadInputDraft()},"dialogData.extra_draft_content"(){this.isFocus||this.loadInputDraft()},showMenu(e){e&&(this.showMore=!1,this.showEmoji=!1,this.emojiQuickShow=!1)},showMore(e){e&&(this.showMenu=!1,this.showEmoji=!1,this.emojiQuickShow=!1)},showEmoji(e){if(this.emojiBottom&&(e?this.quill.enable(!1):this.disabled||this.quill.enable(!0)),e){let t=this.value.replace(/ /g," ").replace(/<[^>]+>/g,"");if(t&&t.indexOf(" ")===-1&&t.length>=1&&t.length<=8?this.emojiQuickKey=t:this.emojiQuickKey="",this.showMenu=!1,this.showMore=!1,this.emojiQuickShow=!1,this.quill){const n=this.quill.selection.savedRange;this.rangeIndex=n?n.index:0}}else this.rangeIndex>0&&this.quill.setSelection(this.rangeIndex);this.$emit("on-emoji-visible-change",e)},emojiQuickShow(e){e&&(this.showMenu=!1,this.showMore=!1,this.showEmoji=!1)},isFocus(e){this.scrollTimer&&clearInterval(this.scrollTimer),e?(this.$emit("on-focus"),this.hidePopover(),this.isSpecVersion||this.windowPortrait&&(this.scrollTimer=setInterval(()=>{var t;(t=this.quill)!=null&&t.hasFocus()?this.windowScrollY>0&&$A.scrollIntoViewIfNeeded(this.$refs.editor):clearInterval(this.scrollTimer)},200))):this.$emit("on-blur")},recordState(e){e==="ing"?this.recordWave=window.Recorder.FrequencyHistogramView({elem:this.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1}):(this.recordWave=null,this.$refs.recwave.innerHTML=""),this.$emit("on-record-state",e)},wrapperHeight(e,t){this.$emit("on-height-change",{newVal:e,oldVal:t})},fullInput(e){var t;(t=this.quill)==null||t.enable(!e)}},methods:{init(){this._options=Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:this.$isEEUiApp||this.windowTouch?!1:this.toolbar,keyboard:{bindings:{"short enter":{key:13,shortKey:!0,handler:e=>{if(!this.isEnterSend){if(this.separateSendButton){const t=this.quill.getSelection(!0).index;return this.quill.insertText(t,`\r `),!1}return this.onSend(),!1}return!0}},enter:{key:13,shiftKey:!1,handler:e=>{if(this.isEnterSend){if(this.separateSendButton){const t=this.quill.getSelection(!0).index;return this.quill.insertText(t,`\r `),!1}return this.onSend(),!1}return!0}},esc:{key:27,shiftKey:!1,handler:e=>this.emojiQuickShow?(this.emojiQuickShow=!1,!1):!0}}},mention:this.quillMention()}},this.options),this.quill=new Ht(this.$refs.editor,this._options),this.quill.enable(!this.disabled),this.value?this.setContent(this.value):this.loadInputDraft(),this.quill.on("selection-change",e=>{if(!e&&document.activeElement&&["ql-editor","ql-clipboard"].includes(document.activeElement.className)){this.selectTimer&&clearTimeout(this.selectTimer),this.selectTimer=setTimeout(t=>{this.quill.setSelection(document.activeElement.className==="ql-editor"?0:this.quill.getLength())},100);return}this.isFocus=!!e}),this.quill.on("text-change",e=>{this.changeLoad++,this.textTimer&&clearTimeout(this.textTimer),this.textTimer=setTimeout(t=>{this.changeLoad--,this.maxlength>0&&this.quill.getLength()>this.maxlength&&this.quill.deleteText(this.maxlength,this.quill.getLength());let n=this.$refs.editor.firstChild.innerHTML;this.updateEmojiQuick(n),this._content=n,this.$emit("input",this._content),this.$nextTick(r=>{const a=this.quill.getSelection();if(a){const l=this.quill.getText(a.index);/^\n\n$/.test(l)&&this.quill.deleteText(a.index,1)}})},100)}),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(e,t)=>(this.pasteClean&&(t.ops=t.ops.map(n=>{const r={insert:n.insert};try{typeof r.insert.mention=="object"&&e.innerHTML&&(r.insert=e.innerHTML.replace(/<[^>]+>/g,""))}catch{}return n.attributes&&["bold","strike","italic","underline","list","blockquote","link"].some(a=>{n.attributes[a]&&(typeof r.attributes=="undefined"&&(r.attributes={}),r.attributes[a]=n.attributes[a])}),r})),t)),this.$nextTick(e=>{this.quill.root.addEventListener("keydown",t=>{if(t.key==="\r\r"&&t.keyCode===229){const n=this.quill.getSelection(!0).index;this.quill.insertText(n,`\r -`)}}),this.separateSendButton||this.quill.root.setAttribute("enterkeyhint","send")}),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"]).then(e=>{typeof window.Recorder=="function"&&(this.recordRec=window.Recorder({type:"mp3",bitRate:64,sampleRate:32e3,audioTrackSet:null,disableEnvInFix:!1,onProcess:(t,n,r,a,l,u)=>{var c;(c=this.recordWave)==null||c.input(t[t.length-1],n,a),this.recordDuration=r,r>=3*60*1e3&&this.stopRecord(!1)}}),window.Recorder.Support()&&(this.recordReady=!0))})},quillMention(){return{allowedChars:/^\S*$/,mentionDenotationChars:["@","#","~"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,positioningStrategy:"fixed",renderItem:e=>{if(e.disabled===!0)return`
${e.value}
`;if(e.id===0)return`
@
${e.value}
${e.tip}
`;if(e.avatar){const t=e.bot?'
':"";return`
${t}
${e.value}
`}return e.tip?`
${e.value}
${e.tip}
`:`
${e.value}
`},renderLoading:()=>"Loading...",source:(e,t,n)=>{const r=n=="@"?"user-mention":n=="#"?"task-mention":"file-mention",a=document.getElementsByClassName("ql-mention-list-container");for(let u=0;u{const c=[];u.some(d=>{let g=d.list;e&&(g=g.filter(({value:f})=>$A.strExists(f,e))),g.length>0&&(d.label&&c.push(...d.label),c.push(...g))}),$A.jsonStringify(c.map(({id:d})=>d))!==l&&(l=$A.jsonStringify(c.map(({id:d})=>d)),t(c,e))})}}},updateEmojiQuick(e){if(!this.isFocus||!e){this.emojiQuickShow=!1;return}this.emojiTimer&&clearTimeout(this.emojiTimer),this.emojiTimer=setTimeout(t=>{if(/]+>/g,""),e&&e.indexOf(" ")===-1&&e.length>=1&&e.length<=8&&$A.isArray(window.emoticonData)){this.emojiQuickItems=[];const n=$A.apiUrl("../images/emoticon");if(window.emoticonData.some(r=>{let a=0;if(r.list.some(l=>{const u=[l.name];if(l.key&&u.push(...`${l.key}`.split(" ")),u.includes(e)&&(this.emojiQuickItems.push(Object.assign(l,{type:"emoticon",asset:`images/emoticon/${r.path}/${l.path}`,name:l.name,src:`${n}/${r.path}/${l.path}`})),++a>=2))return!0}),this.emojiQuickItems.length>=20)return!0}),this.emojiQuickItems.length>0){this.$refs.emojiWrapper.$el.style.maxWidth=`${Math.min(500,this.$refs.inputWrapper.clientWidth)}px`,this.$nextTick(r=>{this.emojiQuickShow=!0,this.$refs.emojiQuickRef.updatePopper()});return}}this.emojiQuickShow=!1},100)},getText(){return this.quill?`${this.quill.getText()}`.replace(/^\s+|\s+$/g,""):""},setText(e){this.quill&&this.quill.setText(e)},setContent(e){this.quill&&this.quill.setContents(this.quill.clipboard.convert(e))},setPasteMode(e){this.pasteClean=e},loadInputDraft(){const{extra_draft_content:e}=this.dialogData;e?(this.pasteClean=!1,this.$emit("input",e),this.$nextTick(t=>this.pasteClean=!0)):this.$emit("input","")},onClickEditor(){this.clearSearchKey(),this.updateEmojiQuick(this.value)},clearSearchKey(){this.$parent.$options.name==="DialogWrapper"&&(this.$store.state.messengerSearchKey.dialog!=""||this.$store.state.messengerSearchKey.contacts!="")&&setTimeout(e=>{this.$parent.onActive()},10),this.$store.state.messengerSearchKey={dialog:"",contacts:""}},focus(){this.$nextTick(()=>{this.quill&&(this.quill.setSelection(this.quill.getLength()),this.quill.focus())})},blur(){this.$nextTick(()=>{this.quill&&this.quill.blur()})},clickSend(e,t){if(!this.loading)switch(e){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart=t.type==="touchstart"?t.touches[0]:t,(t.button===void 0||t.button===0)&&this.startRecord())return;t.button===2&&(this.showMenu=!0);break;case"move":const n=t.type==="touchmove"?t.touches[0]:t;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.showMenu||this.stopRecord(this.touchLimitY)||this.touchLimitY||this.touchLimitX)return;this.onSend();break}},longSend(){this.sendClass==="recorder"||!this.sendMenu||(this.showMenu=!0)},onSend(e){setTimeout(t=>{this.filterInvalidLine(this.value)!==""&&(this.hidePopover("send"),this.rangeIndex=0,this.clearSearchKey(),e?this.$emit("on-send",null,e):this.$emit("on-send"))},this.changeLoad>0?100:0)},startRecord(){return this.sendClass==="recorder"?(this.$store.dispatch("audioStop",!0),this.recordDuration=0,this.recordState="ready",this.$nextTick(e=>{this.recordRec.open(t=>{this.recordState==="ready"?(this.recordState="ing",this.recordBlob=null,setTimeout(n=>{this.recordRec.start()},300)):this.recordRec.close()},t=>{this.recordState="stop",$A.messageError(t||"\u6253\u5F00\u5F55\u97F3\u5931\u8D25")})}),!0):!1},stopRecord(e){switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((t,n)=>{this.recordRec.close(),e!==!0&&(n<600?$A.messageWarning("\u8BF4\u8BDD\u65F6\u95F4\u592A\u77ED"):(this.recordBlob=t,this.uploadRecord(n)))},t=>{this.recordRec.close(),$A.messageError(t||"\u5F55\u97F3\u5931\u8D25")}),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover(e){this.showMenu=!1,this.showMore=!1,e!=="send"&&(this.showEmoji=!1,this.emojiQuickShow=!1)},onClickCover(){this.hidePopover(),this.$nextTick(e=>{var t;(t=this.quill)==null||t.focus()})},uploadRecord(e){if(this.recordBlob===null)return;const t=new FileReader;t.onloadend=()=>{this.$emit("on-record",{type:this.recordBlob.type,base64:t.result,duration:e})},t.readAsDataURL(this.recordBlob)},onEmojiQuick(e){e.type==="online"?(this.$emit("input",""),this.$emit("on-send",``)):(this.$emit("input",""),this.$emit("on-send",``)),this.emojiQuickShow=!1,this.focus()},onSelectEmoji(e){!this.quill||(e.type==="emoji"?(this.quill.insertText(this.rangeIndex,e.text),this.rangeIndex+=e.text.length,this.windowLandscape&&(this.showEmoji=!1)):e.type==="emoticon"&&(this.$emit("on-send",``),e.asset==="emosearch"&&this.$emit("input",""),this.windowLandscape&&(this.showEmoji=!1)))},onToolbar(e){switch(this.hidePopover(),e){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":_i.Store.set("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"full":this.onFullInput();break;case"image":case"file":case"call":case"anon":this.$emit("on-more",e);break}},onFullInput(){this.disabled||(this.fullInput=!this.fullInput,this.fullInput&&this.$nextTick(e=>{this.fullQuill=new Ht(this.$refs.editorFull,Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:this.toolbar,mention:this.quillMention()}},this.options)),this.fullQuill.enable(!0),this.$refs.editorFull.firstChild.innerHTML=this.$refs.editor.firstChild.innerHTML,this.$nextTick(t=>{this.fullQuill.setSelection(this.fullQuill.getLength()),this.fullQuill.focus()})}))},onFullBeforeClose(){return new Promise(e=>{var t;(t=this.$refs.editorFull)!=null&&t.firstChild&&(this.$refs.editor.firstChild.innerHTML=this.$refs.editorFull.firstChild.innerHTML),e()})},onMoreVisibleChange(e){this.showMore=e},setQuote(e,t="reply"){this.dialogId>0&&this.$store.dispatch("saveDialog",{id:this.dialogId,extra_quote_id:e,extra_quote_type:t==="update"?"update":"reply"})},cancelQuote(){this.quoteUpdate&&this.$emit("input",""),this.setQuote(0)},openMenu(e){if(!!this.quill)if(this.value.length===0||this.value.endsWith("


"))this.quill.getModule("mention").openMenu(e);else{let t=this.value.replace(/<[^>]+>/g,"");t.length===0||t.endsWith(" ")?this.quill.getModule("mention").openMenu(e):this.quill.getModule("mention").openMenu(` ${e}`)}},addMention(e){!this.quill||this.quill.getModule("mention").insertItem(e,!0)},getProjectId(){let e=null;if(this.dialogId>0){if(e=this.cacheProjects.find(({dialog_id:t})=>t==this.dialogId),e)return e.id;if(e=this.cacheTasks.find(({dialog_id:t})=>t==this.dialogId),e)return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find(({id:t})=>t==this.taskId),e))return e.project_id;return 0},getMentionSource(e,t,n){switch(e){case"@":this.mentionMode="user-mention";const r=c=>{this.getMoreUser(t,c.map(d=>d.id)).then(d=>{let g=this.cacheDialogs.filter((f,h)=>f.type=="user"&&f.bot==0&&f.last_at);g.sort((f,h)=>f.last_at>h.last_at?-1:f.last_ath<5),d.forEach(f=>{f.last_at="1990-01-01 00:00:00",g.forEach(h=>{var p;((p=h.dialog_user)==null?void 0:p.userid)==f.id&&(f.last_at=h.last_at)})}),d.sort((f,h)=>f.last_at>h.last_at?-1:f.last_at0?(c.length>2&&this.userCache.push({label:null,list:[{id:0,value:this.$L("\u6240\u6709\u4EBA"),tip:this.$L("\u4EC5\u63D0\u793A\u4F1A\u8BDD\u5185\u6210\u5458")}]}),this.userCache.push({label:[{id:0,value:this.$L("\u4F1A\u8BDD\u5185\u6210\u5458"),disabled:!0}],list:c},{label:[{id:0,value:this.$L("\u4F1A\u8BDD\u4EE5\u5916\u6210\u5458"),disabled:!0}],list:d})):c.length>2?this.userCache.push({label:null,list:[{id:0,value:this.$L("\u6240\u6709\u4EBA"),tip:this.$L("\u63D0\u793A\u6240\u6709\u6210\u5458")}]},{label:[{id:0,value:this.$L("\u4F1A\u8BDD\u5185\u6210\u5458"),disabled:!0}],list:c}):this.userCache.push({label:null,list:c}),n(this.userCache)})};if(this.dialogData.people&&$A.arrayLength(this.userList)!==this.dialogData.people&&(this.userList=null,this.userCache=null),this.userCache!==null&&n(this.userCache),this.userList!==null){r(this.userList);return}const a=[];if(this.dialogId>0)this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId,getuser:1}}).then(({data:c})=>{this.cacheDialogs.find(({id:d})=>d==this.dialogId)&&this.$store.dispatch("saveDialog",{id:this.dialogId,people:c.length}),c.length>0&&a.push(...c.map(d=>({id:d.userid,value:d.nickname,avatar:d.userimg,online:d.online,bot:d.bot}))),r(a)}).catch(c=>{r(a)});else if(this.taskId>0){const c=this.cacheTasks.find(({id:d})=>d==this.taskId);c&&$A.isArray(c.task_user)&&c.task_user.some(d=>{const g=this.cacheUserBasic.find(({userid:f})=>f==d.userid);g&&a.push({id:g.userid,value:g.nickname,avatar:g.userimg,online:g.online,bot:g.bot})}),r(a)}break;case"#":if(this.mentionMode="task-mention",this.taskList!==null){n(this.taskList);return}const l=c=>{this.taskList=[],c.length>0&&(c=c.map(f=>({id:f.id,value:f.name,tip:f.complete_at?this.$L("\u5DF2\u5B8C\u6210"):null})).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u9879\u76EE\u4EFB\u52A1"),disabled:!0}],list:c}));let d=this.$store.getters.transforTasks(this.$store.getters.dashboardTask.all);d.length>0&&(d=d.sort((f,h)=>$A.Date(f.end_at||"2099-12-31 23:59:59")-$A.Date(h.end_at||"2099-12-31 23:59:59")).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u6211\u7684\u5F85\u5B8C\u6210\u4EFB\u52A1"),disabled:!0}],list:d.map(f=>({id:f.id,value:f.name}))}));let g=this.$store.getters.assistTask;g.length>0&&(g=g.sort((f,h)=>$A.Date(f.end_at||"2099-12-31 23:59:59")-$A.Date(h.end_at||"2099-12-31 23:59:59")).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u6211\u534F\u52A9\u7684\u4EFB\u52A1"),disabled:!0}],list:g.map(f=>({id:f.id,value:f.name}))})),n(this.taskList)},u=this.getProjectId();if(u>0){this.$store.dispatch("getTaskForProject",u).then(c=>{const d=this.cacheTasks.filter(g=>g.archived_at?!1:g.project_id==u&&g.parent_id===0&&!g.archived_at).sort((g,f)=>$A.Date(f.complete_at||"2099-12-31 23:59:59")-$A.Date(g.complete_at||"2099-12-31 23:59:59"));d.length>0?l(d):l([])}).catch(c=>{l([])});return}l([]);break;case"~":if(this.mentionMode="file-mention",$A.isArray(this.fileList[t])){n(this.fileList[t]);return}this.fileTimer&&clearTimeout(this.fileTimer),this.fileTimer=setTimeout(c=>{this.$store.dispatch("searchFiles",t).then(({data:d})=>{this.fileList[t]=[{label:[{id:0,value:this.$L("\u6587\u4EF6\u5206\u4EAB\u67E5\u770B"),disabled:!0}],list:d.filter(g=>g.type!=="folder").map(g=>({id:g.id,value:g.ext?`${g.name}.${g.ext}`:g.name}))}],n(this.fileList[t])}).catch(()=>{n([])})},300);break;default:n([]);break}},getMoreUser(e,t){return new Promise(n=>{const{owner_id:r,type:a}=this.dialogData,l=a==="group"&&[0,this.userId].includes(r);this.taskId>0||l?(this.moreTimer&&clearTimeout(this.moreTimer),this.moreTimer=setTimeout(u=>{this.$store.dispatch("call",{url:"users/search",data:{keys:{key:e},state:1,take:30}}).then(({data:c})=>{const d=c.filter(g=>!t.includes(g.userid));n(d.map(g=>({id:g.userid,value:g.nickname,avatar:g.userimg,online:!!g.online})))}).catch(c=>{n([])})},this.userCache===null?0:600)):n([])})},checkIOSVersion(){let t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i);const r=(t?t[1].replace(/_/g,"."):"unknown").split(".");return+r[0]==11&&+r[1]>=0&&+r[1]<3},handlePaste(e){const t=Array.prototype.slice.call(e.clipboardData.files);t.filter(r=>!$A.leftExists(r.type,"image/")).length>0?(e.preventDefault(),this.$emit("on-file",t)):this.pasteRtf(e)&&e.preventDefault()},pasteRtf(e){if(e&&e.clipboardData&&e.clipboardData.items&&!new DOMParser().parseFromString(e.clipboardData.getData("text/html")||"","text/html").querySelector("img")){const n=[];let r=null;if(e.clipboardData.types&&[].indexOf.call(e.clipboardData.types,"text/rtf")!=-1||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile(),r&&n.push(r);else for(let a=0;a0)return n.forEach(a=>{const l=new FileReader;l.onload=({target:u})=>{const c=this.quill.getSelection(!0).index;this.quill.insertEmbed(c,"image",u.result),this.quill.setSelection(c+1)},l.readAsDataURL(a)}),!0}return!1},filterInvalidLine(e){return(e+"").replace(/^(

\s*<\/p>)+|(

\s*<\/p>)+$/gi,"").replace(/^(

<\/p>)+|(

<\/p>)+$/gi,"")}}},Tl={};var TJ=Kt(vJ,SJ,bJ,!1,yJ,null,null,null);function yJ(e){for(let t in Tl)this[t]=Tl[t]}var CJ=function(){return TJ.exports}(),Dc={exports:{}};/*! +`)}}),this.separateSendButton||this.quill.root.setAttribute("enterkeyhint","send")}),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"]).then(e=>{typeof window.Recorder=="function"&&(this.recordRec=window.Recorder({type:"mp3",bitRate:64,sampleRate:32e3,audioTrackSet:null,disableEnvInFix:!1,onProcess:(t,n,r,a,l,u)=>{var c;(c=this.recordWave)==null||c.input(t[t.length-1],n,a),this.recordDuration=r,r>=3*60*1e3&&this.stopRecord(!1)}}),window.Recorder.Support()&&(this.recordReady=!0))})},quillMention(){return{allowedChars:/^\S*$/,mentionDenotationChars:["@","#","~"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,positioningStrategy:"fixed",renderItem:e=>{if(e.disabled===!0)return`

${e.value}
`;if(e.id===0)return`
@
${e.value}
${e.tip}
`;if(e.avatar){const t=e.bot?'
':"";return`
${t}
${e.value}
`}return e.tip?`
${e.value}
${e.tip}
`:`
${e.value}
`},renderLoading:()=>"Loading...",source:(e,t,n)=>{const r=n=="@"?"user-mention":n=="#"?"task-mention":"file-mention",a=document.getElementsByClassName("ql-mention-list-container");for(let u=0;u{const c=[];u.some(d=>{let g=d.list;e&&(g=g.filter(({value:f})=>$A.strExists(f,e))),g.length>0&&(d.label&&c.push(...d.label),c.push(...g))}),$A.jsonStringify(c.map(({id:d})=>d))!==l&&(l=$A.jsonStringify(c.map(({id:d})=>d)),t(c,e))})}}},updateEmojiQuick(e){if(!this.isFocus||!e){this.emojiQuickShow=!1;return}this.emojiTimer&&clearTimeout(this.emojiTimer),this.emojiTimer=setTimeout(t=>{if(/]+>/g,""),e&&e.indexOf(" ")===-1&&e.length>=1&&e.length<=8&&$A.isArray(window.emoticonData)){this.emojiQuickItems=[];const n=$A.apiUrl("../images/emoticon");if(window.emoticonData.some(r=>{let a=0;if(r.list.some(l=>{const u=[l.name];if(l.key&&u.push(...`${l.key}`.split(" ")),u.includes(e)&&(this.emojiQuickItems.push(Object.assign(l,{type:"emoticon",asset:`images/emoticon/${r.path}/${l.path}`,name:l.name,src:`${n}/${r.path}/${l.path}`})),++a>=2))return!0}),this.emojiQuickItems.length>=20)return!0}),this.emojiQuickItems.length>0){this.$refs.emojiWrapper.$el.style.maxWidth=`${Math.min(500,this.$refs.inputWrapper.clientWidth)}px`,this.$nextTick(r=>{this.emojiQuickShow=!0,this.$refs.emojiQuickRef.updatePopper()});return}}this.emojiQuickShow=!1},100)},getText(){return this.quill?`${this.quill.getText()}`.replace(/^\s+|\s+$/g,""):""},setText(e){this.quill&&this.quill.setText(e)},setContent(e){this.quill&&this.quill.setContents(this.quill.clipboard.convert(e))},setPasteMode(e){this.pasteClean=e},loadInputDraft(){const{extra_draft_content:e}=this.dialogData;e?(this.pasteClean=!1,this.$emit("input",e),this.$nextTick(t=>this.pasteClean=!0)):this.$emit("input","")},onClickEditor(){this.clearSearchKey(),this.updateEmojiQuick(this.value)},clearSearchKey(){this.$parent.$options.name==="DialogWrapper"&&(this.$store.state.messengerSearchKey.dialog!=""||this.$store.state.messengerSearchKey.contacts!="")&&setTimeout(e=>{this.$parent.onActive()},10),this.$store.state.messengerSearchKey={dialog:"",contacts:""}},focus(){this.$nextTick(()=>{this.quill&&(this.quill.setSelection(this.quill.getLength()),this.quill.focus())})},blur(){this.$nextTick(()=>{this.quill&&this.quill.blur()})},clickSend(e,t){if(!this.loading)switch(e){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart=t.type==="touchstart"?t.touches[0]:t,(t.button===void 0||t.button===0)&&this.startRecord())return;t.button===2&&this.onShowMenu();break;case"move":const n=t.type==="touchmove"?t.touches[0]:t;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.showMenu||this.stopRecord(this.touchLimitY)||this.touchLimitY||this.touchLimitX)return;this.onSend();break}},onShowMenu(){this.sendClass==="recorder"||!this.sendMenu||(this.showMenu=!0)},onSend(e){setTimeout(t=>{this.filterInvalidLine(this.value)!==""&&(this.hidePopover("send"),this.rangeIndex=0,this.clearSearchKey(),e?this.$emit("on-send",null,e):this.$emit("on-send"))},this.changeLoad>0?100:0)},startRecord(){return this.sendClass==="recorder"?(this.$store.dispatch("audioStop",!0),this.recordDuration=0,this.recordState="ready",this.$nextTick(e=>{this.recordRec.open(t=>{this.recordState==="ready"?(this.recordState="ing",this.recordBlob=null,setTimeout(n=>{this.recordRec.start()},300)):this.recordRec.close()},t=>{this.recordState="stop",$A.messageError(t||"\u6253\u5F00\u5F55\u97F3\u5931\u8D25")})}),!0):!1},stopRecord(e){switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((t,n)=>{this.recordRec.close(),e!==!0&&(n<600?$A.messageWarning("\u8BF4\u8BDD\u65F6\u95F4\u592A\u77ED"):(this.recordBlob=t,this.uploadRecord(n)))},t=>{this.recordRec.close(),$A.messageError(t||"\u5F55\u97F3\u5931\u8D25")}),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover(e){this.showMenu=!1,this.showMore=!1,e!=="send"&&(this.showEmoji=!1,this.emojiQuickShow=!1)},onClickCover(){this.hidePopover(),this.$nextTick(e=>{var t;(t=this.quill)==null||t.focus()})},uploadRecord(e){if(this.recordBlob===null)return;const t=new FileReader;t.onloadend=()=>{this.$emit("on-record",{type:this.recordBlob.type,base64:t.result,duration:e})},t.readAsDataURL(this.recordBlob)},onEmojiQuick(e){e.type==="online"?(this.$emit("input",""),this.$emit("on-send",``)):(this.$emit("input",""),this.$emit("on-send",``)),this.emojiQuickShow=!1,this.focus()},onSelectEmoji(e){!this.quill||(e.type==="emoji"?(this.quill.insertText(this.rangeIndex,e.text),this.rangeIndex+=e.text.length,this.windowLandscape&&(this.showEmoji=!1)):e.type==="emoticon"&&(this.$emit("on-send",``),e.asset==="emosearch"&&this.$emit("input",""),this.windowLandscape&&(this.showEmoji=!1)))},onToolbar(e){switch(this.hidePopover(),e){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":_i.Store.set("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"full":this.onFullInput();break;case"image":case"file":case"call":case"anon":this.$emit("on-more",e);break}},onFullInput(){this.disabled||(this.fullInput=!this.fullInput,this.fullInput&&this.$nextTick(e=>{this.fullQuill=new Ht(this.$refs.editorFull,Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:this.toolbar,mention:this.quillMention()}},this.options)),this.fullQuill.enable(!0),this.$refs.editorFull.firstChild.innerHTML=this.$refs.editor.firstChild.innerHTML,this.$nextTick(t=>{this.fullQuill.setSelection(this.fullQuill.getLength()),this.fullQuill.focus()})}))},onFullBeforeClose(){return new Promise(e=>{var t;(t=this.$refs.editorFull)!=null&&t.firstChild&&(this.$refs.editor.firstChild.innerHTML=this.$refs.editorFull.firstChild.innerHTML),e()})},onMoreVisibleChange(e){this.showMore=e},setQuote(e,t="reply"){this.dialogId>0&&this.$store.dispatch("saveDialog",{id:this.dialogId,extra_quote_id:e,extra_quote_type:t==="update"?"update":"reply"})},cancelQuote(){this.quoteUpdate&&this.$emit("input",""),this.setQuote(0)},openMenu(e){if(!!this.quill)if(this.value.length===0||this.value.endsWith("


"))this.quill.getModule("mention").openMenu(e);else{let t=this.value.replace(/<[^>]+>/g,"");t.length===0||t.endsWith(" ")?this.quill.getModule("mention").openMenu(e):this.quill.getModule("mention").openMenu(` ${e}`)}},addMention(e){!this.quill||this.quill.getModule("mention").insertItem(e,!0)},getProjectId(){let e=null;if(this.dialogId>0){if(e=this.cacheProjects.find(({dialog_id:t})=>t==this.dialogId),e)return e.id;if(e=this.cacheTasks.find(({dialog_id:t})=>t==this.dialogId),e)return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find(({id:t})=>t==this.taskId),e))return e.project_id;return 0},getMentionSource(e,t,n){switch(e){case"@":this.mentionMode="user-mention";const r=c=>{this.getMoreUser(t,c.map(d=>d.id)).then(d=>{let g=this.cacheDialogs.filter((f,h)=>f.type=="user"&&f.bot==0&&f.last_at);g.sort((f,h)=>f.last_at>h.last_at?-1:f.last_ath<5),d.forEach(f=>{f.last_at="1990-01-01 00:00:00",g.forEach(h=>{var p;((p=h.dialog_user)==null?void 0:p.userid)==f.id&&(f.last_at=h.last_at)})}),d.sort((f,h)=>f.last_at>h.last_at?-1:f.last_at0?(c.length>2&&this.userCache.push({label:null,list:[{id:0,value:this.$L("\u6240\u6709\u4EBA"),tip:this.$L("\u4EC5\u63D0\u793A\u4F1A\u8BDD\u5185\u6210\u5458")}]}),this.userCache.push({label:[{id:0,value:this.$L("\u4F1A\u8BDD\u5185\u6210\u5458"),disabled:!0}],list:c},{label:[{id:0,value:this.$L("\u4F1A\u8BDD\u4EE5\u5916\u6210\u5458"),disabled:!0}],list:d})):c.length>2?this.userCache.push({label:null,list:[{id:0,value:this.$L("\u6240\u6709\u4EBA"),tip:this.$L("\u63D0\u793A\u6240\u6709\u6210\u5458")}]},{label:[{id:0,value:this.$L("\u4F1A\u8BDD\u5185\u6210\u5458"),disabled:!0}],list:c}):this.userCache.push({label:null,list:c}),n(this.userCache)})};if(this.dialogData.people&&$A.arrayLength(this.userList)!==this.dialogData.people&&(this.userList=null,this.userCache=null),this.userCache!==null&&n(this.userCache),this.userList!==null){r(this.userList);return}const a=[];if(this.dialogId>0)this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId,getuser:1}}).then(({data:c})=>{this.cacheDialogs.find(({id:d})=>d==this.dialogId)&&this.$store.dispatch("saveDialog",{id:this.dialogId,people:c.length}),c.length>0&&a.push(...c.map(d=>({id:d.userid,value:d.nickname,avatar:d.userimg,online:d.online,bot:d.bot}))),r(a)}).catch(c=>{r(a)});else if(this.taskId>0){const c=this.cacheTasks.find(({id:d})=>d==this.taskId);c&&$A.isArray(c.task_user)&&c.task_user.some(d=>{const g=this.cacheUserBasic.find(({userid:f})=>f==d.userid);g&&a.push({id:g.userid,value:g.nickname,avatar:g.userimg,online:g.online,bot:g.bot})}),r(a)}break;case"#":if(this.mentionMode="task-mention",this.taskList!==null){n(this.taskList);return}const l=c=>{this.taskList=[],c.length>0&&(c=c.map(f=>({id:f.id,value:f.name,tip:f.complete_at?this.$L("\u5DF2\u5B8C\u6210"):null})).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u9879\u76EE\u4EFB\u52A1"),disabled:!0}],list:c}));let d=this.$store.getters.transforTasks(this.$store.getters.dashboardTask.all);d.length>0&&(d=d.sort((f,h)=>$A.Date(f.end_at||"2099-12-31 23:59:59")-$A.Date(h.end_at||"2099-12-31 23:59:59")).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u6211\u7684\u5F85\u5B8C\u6210\u4EFB\u52A1"),disabled:!0}],list:d.map(f=>({id:f.id,value:f.name}))}));let g=this.$store.getters.assistTask;g.length>0&&(g=g.sort((f,h)=>$A.Date(f.end_at||"2099-12-31 23:59:59")-$A.Date(h.end_at||"2099-12-31 23:59:59")).splice(0,100),this.taskList.push({label:[{id:0,value:this.$L("\u6211\u534F\u52A9\u7684\u4EFB\u52A1"),disabled:!0}],list:g.map(f=>({id:f.id,value:f.name}))})),n(this.taskList)},u=this.getProjectId();if(u>0){this.$store.dispatch("getTaskForProject",u).then(c=>{const d=this.cacheTasks.filter(g=>g.archived_at?!1:g.project_id==u&&g.parent_id===0&&!g.archived_at).sort((g,f)=>$A.Date(f.complete_at||"2099-12-31 23:59:59")-$A.Date(g.complete_at||"2099-12-31 23:59:59"));d.length>0?l(d):l([])}).catch(c=>{l([])});return}l([]);break;case"~":if(this.mentionMode="file-mention",$A.isArray(this.fileList[t])){n(this.fileList[t]);return}this.fileTimer&&clearTimeout(this.fileTimer),this.fileTimer=setTimeout(c=>{this.$store.dispatch("searchFiles",t).then(({data:d})=>{this.fileList[t]=[{label:[{id:0,value:this.$L("\u6587\u4EF6\u5206\u4EAB\u67E5\u770B"),disabled:!0}],list:d.filter(g=>g.type!=="folder").map(g=>({id:g.id,value:g.ext?`${g.name}.${g.ext}`:g.name}))}],n(this.fileList[t])}).catch(()=>{n([])})},300);break;default:n([]);break}},getMoreUser(e,t){return new Promise(n=>{const{owner_id:r,type:a}=this.dialogData,l=a==="group"&&[0,this.userId].includes(r);this.taskId>0||l?(this.moreTimer&&clearTimeout(this.moreTimer),this.moreTimer=setTimeout(u=>{this.$store.dispatch("call",{url:"users/search",data:{keys:{key:e},state:1,take:30}}).then(({data:c})=>{const d=c.filter(g=>!t.includes(g.userid));n(d.map(g=>({id:g.userid,value:g.nickname,avatar:g.userimg,online:!!g.online})))}).catch(c=>{n([])})},this.userCache===null?0:600)):n([])})},checkIOSVersion(){let t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i);const r=(t?t[1].replace(/_/g,"."):"unknown").split(".");return+r[0]==11&&+r[1]>=0&&+r[1]<3},handlePaste(e){const t=Array.prototype.slice.call(e.clipboardData.files);t.filter(r=>!$A.leftExists(r.type,"image/")).length>0?(e.preventDefault(),this.$emit("on-file",t)):this.pasteRtf(e)&&e.preventDefault()},pasteRtf(e){if(e&&e.clipboardData&&e.clipboardData.items&&!new DOMParser().parseFromString(e.clipboardData.getData("text/html")||"","text/html").querySelector("img")){const n=[];let r=null;if(e.clipboardData.types&&[].indexOf.call(e.clipboardData.types,"text/rtf")!=-1||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile(),r&&n.push(r);else for(let a=0;a0)return n.forEach(a=>{const l=new FileReader;l.onload=({target:u})=>{const c=this.quill.getSelection(!0).index;this.quill.insertEmbed(c,"image",u.result),this.quill.setSelection(c+1)},l.readAsDataURL(a)}),!0}return!1},filterInvalidLine(e){return(e+"").replace(/^(

\s*<\/p>)+|(

\s*<\/p>)+$/gi,"").replace(/^(

<\/p>)+|(

<\/p>)+$/gi,"")}}},Tl={};var TJ=Kt(vJ,SJ,bJ,!1,yJ,null,null,null);function yJ(e){for(let t in Tl)this[t]=Tl[t]}var CJ=function(){return TJ.exports}(),Dc={exports:{}};/*! * vue-virtual-scroll-list v2.3.5-7 * open source under the MIT license * https://github.com/tangbc/vue-virtual-scroll-list#readme diff --git a/public/js/build/Drawio.32180b15.js b/public/js/build/Drawio.98aed49e.js similarity index 93% rename from public/js/build/Drawio.32180b15.js rename to public/js/build/Drawio.98aed49e.js index 25a240e28..17fad8379 100644 --- a/public/js/build/Drawio.32180b15.js +++ b/public/js/build/Drawio.98aed49e.js @@ -1 +1 @@ -import{m as o,n as l,l as s}from"./app.6c8b31b1.js";import{I as d}from"./IFrame.364b588a.js";var u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"drawio-content"},[a("IFrame",{ref:"frame",staticClass:"drawio-iframe",attrs:{src:e.url},on:{"on-message":e.onMessage}}),e.loadIng?a("div",{staticClass:"drawio-loading"},[a("Loading")],1):e._e()],1)},m=[];const c={name:"Drawio",components:{IFrame:d},props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,url:null,bakData:""}},created(){let e=s;switch(s){case"zh-CHT":e="zh-tw";break}let t=this.readOnly?1:0,a=this.readOnly?0:1,r=this.themeIsDark?"dark":"kennedy",n=`?title=${this.title?encodeURIComponent(this.title):""}&chrome=${a}&lightbox=${t}&ui=${r}&lang=${e}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;this.$Electron?this.url=$A.originUrl(`drawio/webapp/index.html${n}`):this.url=$A.apiUrl(`../drawio/webapp/${n}`)},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler(e){this.bakData!=$A.jsonStringify(e)&&(this.bakData=$A.jsonStringify(e),this.updateContent())},deep:!0}},computed:{...o(["themeIsDark"])},methods:{formatZoom(e){return e+"%"},updateContent(){this.$refs.frame.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}))},onMessage(e){switch(e.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":typeof this.value.xml=="undefined"&&this.$refs.frame.postMessage(JSON.stringify({action:"template"}));break;case"autosave":const t={xml:e.xml};this.bakData=$A.jsonStringify(t),this.$emit("input",t);break;case"save":this.$emit("saveData");break}}}},i={};var h=l(c,u,m,!1,f,"6b690a27",null,null);function f(e){for(let t in i)this[t]=i[t]}var _=function(){return h.exports}();export{_ as default}; +import{m as o,n as l,l as s}from"./app.6910ca56.js";import{I as d}from"./IFrame.1fc38451.js";var u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"drawio-content"},[a("IFrame",{ref:"frame",staticClass:"drawio-iframe",attrs:{src:e.url},on:{"on-message":e.onMessage}}),e.loadIng?a("div",{staticClass:"drawio-loading"},[a("Loading")],1):e._e()],1)},m=[];const c={name:"Drawio",components:{IFrame:d},props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,url:null,bakData:""}},created(){let e=s;switch(s){case"zh-CHT":e="zh-tw";break}let t=this.readOnly?1:0,a=this.readOnly?0:1,r=this.themeIsDark?"dark":"kennedy",n=`?title=${this.title?encodeURIComponent(this.title):""}&chrome=${a}&lightbox=${t}&ui=${r}&lang=${e}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;this.$Electron?this.url=$A.originUrl(`drawio/webapp/index.html${n}`):this.url=$A.apiUrl(`../drawio/webapp/${n}`)},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler(e){this.bakData!=$A.jsonStringify(e)&&(this.bakData=$A.jsonStringify(e),this.updateContent())},deep:!0}},computed:{...o(["themeIsDark"])},methods:{formatZoom(e){return e+"%"},updateContent(){this.$refs.frame.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}))},onMessage(e){switch(e.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":typeof this.value.xml=="undefined"&&this.$refs.frame.postMessage(JSON.stringify({action:"template"}));break;case"autosave":const t={xml:e.xml};this.bakData=$A.jsonStringify(t),this.$emit("input",t);break;case"save":this.$emit("saveData");break}}}},i={};var h=l(c,u,m,!1,f,"6b690a27",null,null);function f(e){for(let t in i)this[t]=i[t]}var _=function(){return h.exports}();export{_ as default}; diff --git a/public/js/build/FileContent.f5b3c8be.js b/public/js/build/FileContent.49414140.js similarity index 92% rename from public/js/build/FileContent.f5b3c8be.js rename to public/js/build/FileContent.49414140.js index 5fa6fd129..e50f62397 100644 --- a/public/js/build/FileContent.f5b3c8be.js +++ b/public/js/build/FileContent.49414140.js @@ -1 +1 @@ -import{n as r,m as c,_ as a}from"./app.6c8b31b1.js";import{I as d}from"./IFrame.364b588a.js";var h=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"file-history"},[t("Table",{attrs:{width:e.windowWidth-40>480?480:e.windowWidth-40,"max-height":e.windowHeight-180,columns:e.columns,data:e.list,loading:e.loadIng>0,"no-data-text":e.$L(e.noText),"highlight-row":"",stripe:""}}),e.total>e.pageSize?t("Page",{attrs:{total:e.total,current:e.page,"page-size":e.pageSize,disabled:e.loadIng>0,simple:!0},on:{"on-change":e.setPage,"on-page-size-change":e.setPageSize}}):e._e()],1)},u=[];const f={name:"FileHistory",props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{loadIng:0,columns:[{title:this.$L("\u65E5\u671F"),key:"created_at",width:168},{title:this.$L("\u521B\u5EFA\u4EBA"),width:120,render:(e,{row:s})=>e("UserAvatar",{props:{showName:!0,size:22,userid:s.userid}})},{title:this.$L("\u5927\u5C0F"),key:"size",width:90,render:(e,{row:s})=>e("AutoTip",$A.bytesToSize(s.size))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(e,{index:s,row:t,column:i})=>s===0&&this.page===1?e("div","-"):e("TableAction",{props:{column:i,menu:[{label:this.$L("\u67E5\u770B"),action:"preview"},{label:this.$L("\u8FD8\u539F"),action:"restore"}]},on:{action:n=>{this.onAction(n,t)}}})}],list:[],page:1,pageSize:10,total:0,noText:""}},mounted(){},watch:{value:{handler(e){e&&this.setPage(1)},immediate:!0}},computed:{fileId(){return this.file.id||0}},methods:{getLists(){this.fileId!==0&&(this.loadIng++,this.$store.dispatch("call",{url:"file/content/history",data:{id:this.fileId,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--}))},setPage(e){this.page=e,this.getLists()},setPageSize(e){this.page=1,this.pageSize=e,this.getLists()},onAction(e,s){switch(e){case"restore":this.$emit("on-restore",s);break;case"preview":const t=`/single/file/${this.fileId}?history_id=${s.id}&history_at=${s.created_at}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${this.fileId}-${s.id}`,path:t,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(this.file)+` [${s.created_at}]`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:this.file.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(this.file)+` [${s.created_at}]`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${t}`}}):window.open($A.apiUrl(`..${t}`));break}}}},o={};var p=r(f,h,u,!1,v,"6fa79072",null,null);function v(e){for(let s in o)this[s]=o[s]}var m=function(){return p.exports}(),_=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.ready?t("div",{staticClass:"file-content"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[["word","excel","ppt"].includes(e.file.type)?t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("div",{ref:"officeHeader",staticClass:"office-header",attrs:{slot:"reference"},slot:"reference"})]):t("div",{staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[e.equalContent?e._e():t("EPopover",{staticClass:"file-unsave-tip",model:{value:e.unsaveTip,callback:function(i){e.unsaveTip=i},expression:"unsaveTip"}},[t("div",{staticClass:"task-detail-delete-file-popover"},[t("p",[e._v(e._s(e.$L("\u672A\u4FDD\u5B58\u5F53\u524D\u4FEE\u6539\u5185\u5BB9\uFF1F")))]),t("div",{staticClass:"buttons"},[t("Button",{attrs:{size:"small",type:"text"},on:{click:e.unSaveGive}},[e._v(e._s(e.$L("\u653E\u5F03")))]),t("Button",{attrs:{size:"small",type:"primary"},on:{click:e.onSaveSave}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)]),t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v("["+e._s(e.$L("\u672A\u4FDD\u5B58"))+"*]")])]),e._v(" "+e._s(e.fileName)+" ")],1),t("div",{staticClass:"header-user"},[t("ul",[e._l(e.editUser,function(i,n){return n<=10?t("li",{key:n},[t("UserAvatar",{attrs:{userid:i,size:28,"border-witdh":2}})],1):e._e()}),e.editUser.length>10?t("li",{staticClass:"more",attrs:{title:e.editUser.length}},[e._v(e._s(e.editUser.length>999?"...":e.editUser.length))]):e._e()],2)]),e.file.type=="document"&&e.contentDetail&&!e.windowPortrait?t("div",{staticClass:"header-hint"},[t("ButtonGroup",{attrs:{size:"small",shape:"circle"}},[t("Button",{attrs:{type:`${e.contentDetail.type=="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("md")}}},[e._v(e._s(e.$L("MD\u7F16\u8F91\u5668")))]),t("Button",{attrs:{type:`${e.contentDetail.type!="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("text")}}},[e._v(e._s(e.$L("\u6587\u672C\u7F16\u8F91\u5668")))])],1)],1):e._e(),e.file.type=="mind"?t("div",{staticClass:"header-hint"},[e._v(" "+e._s(e.$L("\u9009\u4E2D\u8282\u70B9\uFF0C\u6309enter\u952E\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9\uFF0Ctab\u952E\u6DFB\u52A0\u5B50\u8282\u70B9"))+" ")]):e._e(),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click",transfer:""},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e(),e.file.only_view?e._e():[t("div",{staticClass:"header-icons"},[t("ETooltip",{attrs:{disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u6587\u4EF6\u94FE\u63A5")}},[t("div",{staticClass:"header-icon",on:{click:function(i){return e.handleClick("link")}}},[t("i",{staticClass:"taskfont"},[e._v("\uE785")])])]),t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("ETooltip",{ref:"historyTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.historyShow,content:e.$L("\u5386\u53F2\u7248\u672C")},slot:"reference"},[t("div",{staticClass:"header-icon"},[t("i",{staticClass:"taskfont"},[e._v("\uE71D")])])])],1)],1),e.windowPortrait&&e.file.type=="document"?[e.edit?e.edit&&e.equalContent?t("Button",{staticClass:"header-button",attrs:{size:"small"},on:{click:function(i){e.edit=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]):t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))]):t("Button",{staticClass:"header-button",attrs:{size:"small",type:"primary"},on:{click:function(i){e.edit=!0}}},[e._v(e._s(e.$L("\u7F16\u8F91")))])]:t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])]],2),t("div",{staticClass:"content-body"},[e.historyShow?t("div",{staticClass:"content-mask"}):e._e(),e.file.type=="document"?[e.contentDetail.type=="md"?[e.edit?t("MDEditor",{attrs:{height:"100%",toolbars:e.toolbars},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("MDPreview",{attrs:{initialValue:e.contentDetail.content}})]:t("TEditor",{attrs:{readOnly:!e.edit,height:"100%"},on:{editorSave:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{title:e.file.name},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e.file.type=="mind"?t("Minder",{ref:"myMind",on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{ext:e.file.ext},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{documentKey:e.documentKey},on:{"on-document-ready":function(i){return e.handleClick("officeReady")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e(),t("Modal",{attrs:{title:e.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:e.linkShow,callback:function(i){e.linkShow=i},expression:"linkShow"}},[t("div",[t("div",{staticStyle:{margin:"-10px 0 8px"}},[e._v(e._s(e.$L("\u6587\u4EF6\u540D\u79F0"))+": "+e._s(e.linkData.name))]),t("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":e.linkFocus},model:{value:e.linkData.url,callback:function(i){e.$set(e.linkData,"url",i)},expression:"linkData.url"}}),t("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[e._v(" "+e._s(e.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))+" "),t("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":e.$L("\u786E\u5B9A"),"cancel-text":e.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(i){return e.linkGet(!0)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("p",[t("strong",[e._v(e._s(e.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1),t("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"default"},on:{click:function(i){e.linkShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),t("Button",{attrs:{type:"primary",loading:e.linkLoad>0},on:{click:e.linkCopy}},[e._v(e._s(e.$L("\u590D\u5236")))])],1)])],2):e._e()},y=[];const k=()=>a(()=>import("./index.8d4e26d2.js"),["js/build/index.8d4e26d2.js","js/build/index.4d847d9e.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/ImgUpload.0e64a5a8.js"]),$=()=>a(()=>import("./preview.438bb1b4.js"),["js/build/preview.438bb1b4.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),w=()=>a(()=>import("./TEditor.5f656e41.js"),["js/build/TEditor.5f656e41.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/ImgUpload.0e64a5a8.js"]),g=()=>a(()=>import("./AceEditor.2ebeaef8.js"),["js/build/AceEditor.2ebeaef8.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),D=()=>a(()=>import("./OnlyOffice.3b8ff0fe.js"),["js/build/OnlyOffice.3b8ff0fe.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),C=()=>a(()=>import("./Drawio.32180b15.js"),["js/build/Drawio.32180b15.js","js/build/Drawio.fc5c6326.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),x=()=>a(()=>import("./Minder.37c15ccd.js"),["js/build/Minder.37c15ccd.js","js/build/Minder.3ba64342.css","js/build/IFrame.364b588a.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),S={name:"FileContent",components:{IFrame:d,FileHistory:m,AceEditor:g,TEditor:w,MDEditor:k,OnlyOffice:D,Drawio:C,Minder:x,MDPreview:$},props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{ready:!1,loadSave:0,loadContent:0,unsaveTip:!1,fileExt:null,contentDetail:null,contentBak:{},editUser:[],loadPreview:!0,linkShow:!1,linkData:{},linkLoad:0,historyShow:!1,officeReady:!1,edit:!1}},mounted(){this.edit=!this.windowPortrait,document.addEventListener("keydown",this.keySave),window.addEventListener("message",this.handleOfficeMessage),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(!this.equalContent)return $A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.keySave),window.removeEventListener("message",this.handleOfficeMessage)},watch:{value:{handler(e){e?(this.ready=!0,this.editUser=[this.userId],this.getContent()):(this.linkShow=!1,this.historyShow=!1,this.officeReady=!1,this.fileExt=null)},immediate:!0},historyShow(e){!e&&this.$refs.historyTip&&this.$refs.historyTip.updatePopper()},wsMsg:{handler(e){const{type:s,action:t,data:i}=e;switch(s){case"path":i.path=="/single/file/"+this.fileId&&(this.editUser=i.userids);break;case"file":t=="content"&&this.value&&i.id==this.fileId&&$A.modalConfirm({title:"\u66F4\u65B0\u63D0\u793A",content:"\u56E2\u961F\u6210\u5458\uFF08"+e.nickname+"\uFF09\u66F4\u65B0\u4E86\u5185\u5BB9\uFF0C
\u66F4\u65B0\u65F6\u95F4\uFF1A"+$A.formatDate("Y-m-d H:i:s",e.time)+"\u3002

\u70B9\u51FB\u3010\u786E\u5B9A\u3011\u52A0\u8F7D\u6700\u65B0\u5185\u5BB9\u3002",onOk:()=>{this.getContent()}});break}},deep:!0}},computed:{...c(["wsMsg"]),fileId(){return this.file.id||0},fileName(){return this.fileExt?$A.getFileName(Object.assign(this.file,{ext:this.fileExt})):$A.getFileName(this.file)},equalContent(){return this.contentBak==$A.jsonStringify(this.contentDetail)},contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:s}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${s}`)}return""},toolbars(){return this.windowPortrait?{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!1,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!1,notChecked:!1,split:!0,preview:!1,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!1,html_to_markdown:!1,custom_image:!1,custom_uploadImage:!1,custom_uploadFile:!1,custom_fullscreen:!1}:{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!0,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!0,notChecked:!0,split:!0,preview:!0,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!0,html_to_markdown:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,custom_fullscreen:!0}}},methods:{handleOfficeMessage({data:e,source:s}){if(e.source==="onlyoffice")switch(e.action){case"ready":s.postMessage("createMenu","*");break;case"link":this.handleClick("link");break;case"history":const t=this.$refs.officeHeader;t&&(t.style.top=`${e.rect.top}px`,t.style.left=`${e.rect.left}px`,t.style.width=`${e.rect.width}px`,t.style.height=`${e.rect.height}px`,t.click());break}},onFrameLoad(){this.loadPreview=!1},keySave(e){this.value&&e.keyCode===83&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.onSaveSave())},getContent(){if(this.fileId===0){this.contentDetail={},this.updateBak();return}if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file),this.updateBak();return}this.loadSave++,setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId}}).then(({data:e})=>{this.contentDetail=e.content,this.updateBak()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadSave--,this.loadContent--})},updateBak(){this.contentBak=$A.jsonStringify(this.contentDetail)},handleClick(e){switch(e){case"link":this.linkData={id:this.fileId,name:this.file.name},this.linkShow=!0,this.linkGet();break;case"saveBefore":!this.equalContent&&this.loadSave==0?this.handleClick("save"):$A.messageWarning("\u6CA1\u6709\u4EFB\u4F55\u4FEE\u6539\uFF01");break;case"save":if(this.file.only_view)return;this.updateBak(),this.loadSave++,this.$store.dispatch("call",{url:"file/content/save",method:"post",data:{id:this.fileId,content:this.contentBak}}).then(({data:s,msg:t})=>{$A.messageSuccess(t);const i={id:this.fileId,size:s.size};this.fileExt&&(i.ext=this.fileExt,this.fileExt=null),this.edit=!this.windowPortrait,this.$store.dispatch("saveFile",i)}).catch(({msg:s})=>{$A.modalError(s),this.getContent()}).finally(s=>{this.loadSave--});break;case"officeReady":this.officeReady=!0;break}},onRestoreHistory(e){this.historyShow=!1,$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6587\u4EF6\u8FD8\u539F\u81F3\u3010${e.created_at}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((s,t)=>{this.$store.dispatch("call",{url:"file/content/restore",data:{id:this.fileId,history_id:e.id}}).then(({msg:i})=>{s(i),this.contentDetail=null,this.getContent()}).catch(({msg:i})=>{t(i)})})})},linkGet(e){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:e===!0?"yes":"no"}}).then(({data:s})=>{this.linkData=Object.assign(s,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:s})=>{this.linkShow=!1,$A.modalError(s)}).finally(s=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(e=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(e=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(e=>{this.$refs.linkInput.focus({cursor:"all"})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}},unSaveGive(){this.getContent(),this.unsaveTip=!1},onSaveSave(){this.handleClick("save"),this.unsaveTip=!1},setTextType(e){this.fileExt=e,this.$set(this.contentDetail,"type",e)},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId,only_update_at:"yes"}}).then(({data:s})=>{e(`${s.id}-${$A.Time(s.update_at)}`)}).catch(()=>{e(0)})})}}},l={};var b=r(S,_,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var A=function(){return b.exports}();export{A as default}; +import{n as r,m as c,_ as a}from"./app.6910ca56.js";import{I as d}from"./IFrame.1fc38451.js";var h=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"file-history"},[t("Table",{attrs:{width:e.windowWidth-40>480?480:e.windowWidth-40,"max-height":e.windowHeight-180,columns:e.columns,data:e.list,loading:e.loadIng>0,"no-data-text":e.$L(e.noText),"highlight-row":"",stripe:""}}),e.total>e.pageSize?t("Page",{attrs:{total:e.total,current:e.page,"page-size":e.pageSize,disabled:e.loadIng>0,simple:!0},on:{"on-change":e.setPage,"on-page-size-change":e.setPageSize}}):e._e()],1)},u=[];const f={name:"FileHistory",props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{loadIng:0,columns:[{title:this.$L("\u65E5\u671F"),key:"created_at",width:168},{title:this.$L("\u521B\u5EFA\u4EBA"),width:120,render:(e,{row:s})=>e("UserAvatar",{props:{showName:!0,size:22,userid:s.userid}})},{title:this.$L("\u5927\u5C0F"),key:"size",width:90,render:(e,{row:s})=>e("AutoTip",$A.bytesToSize(s.size))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(e,{index:s,row:t,column:i})=>s===0&&this.page===1?e("div","-"):e("TableAction",{props:{column:i,menu:[{label:this.$L("\u67E5\u770B"),action:"preview"},{label:this.$L("\u8FD8\u539F"),action:"restore"}]},on:{action:n=>{this.onAction(n,t)}}})}],list:[],page:1,pageSize:10,total:0,noText:""}},mounted(){},watch:{value:{handler(e){e&&this.setPage(1)},immediate:!0}},computed:{fileId(){return this.file.id||0}},methods:{getLists(){this.fileId!==0&&(this.loadIng++,this.$store.dispatch("call",{url:"file/content/history",data:{id:this.fileId,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--}))},setPage(e){this.page=e,this.getLists()},setPageSize(e){this.page=1,this.pageSize=e,this.getLists()},onAction(e,s){switch(e){case"restore":this.$emit("on-restore",s);break;case"preview":const t=`/single/file/${this.fileId}?history_id=${s.id}&history_at=${s.created_at}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${this.fileId}-${s.id}`,path:t,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(this.file)+` [${s.created_at}]`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:this.file.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(this.file)+` [${s.created_at}]`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${t}`}}):window.open($A.apiUrl(`..${t}`));break}}}},o={};var p=r(f,h,u,!1,v,"6fa79072",null,null);function v(e){for(let s in o)this[s]=o[s]}var m=function(){return p.exports}(),_=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.ready?t("div",{staticClass:"file-content"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[["word","excel","ppt"].includes(e.file.type)?t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("div",{ref:"officeHeader",staticClass:"office-header",attrs:{slot:"reference"},slot:"reference"})]):t("div",{staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[e.equalContent?e._e():t("EPopover",{staticClass:"file-unsave-tip",model:{value:e.unsaveTip,callback:function(i){e.unsaveTip=i},expression:"unsaveTip"}},[t("div",{staticClass:"task-detail-delete-file-popover"},[t("p",[e._v(e._s(e.$L("\u672A\u4FDD\u5B58\u5F53\u524D\u4FEE\u6539\u5185\u5BB9\uFF1F")))]),t("div",{staticClass:"buttons"},[t("Button",{attrs:{size:"small",type:"text"},on:{click:e.unSaveGive}},[e._v(e._s(e.$L("\u653E\u5F03")))]),t("Button",{attrs:{size:"small",type:"primary"},on:{click:e.onSaveSave}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)]),t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v("["+e._s(e.$L("\u672A\u4FDD\u5B58"))+"*]")])]),e._v(" "+e._s(e.fileName)+" ")],1),t("div",{staticClass:"header-user"},[t("ul",[e._l(e.editUser,function(i,n){return n<=10?t("li",{key:n},[t("UserAvatar",{attrs:{userid:i,size:28,"border-witdh":2}})],1):e._e()}),e.editUser.length>10?t("li",{staticClass:"more",attrs:{title:e.editUser.length}},[e._v(e._s(e.editUser.length>999?"...":e.editUser.length))]):e._e()],2)]),e.file.type=="document"&&e.contentDetail&&!e.windowPortrait?t("div",{staticClass:"header-hint"},[t("ButtonGroup",{attrs:{size:"small",shape:"circle"}},[t("Button",{attrs:{type:`${e.contentDetail.type=="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("md")}}},[e._v(e._s(e.$L("MD\u7F16\u8F91\u5668")))]),t("Button",{attrs:{type:`${e.contentDetail.type!="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("text")}}},[e._v(e._s(e.$L("\u6587\u672C\u7F16\u8F91\u5668")))])],1)],1):e._e(),e.file.type=="mind"?t("div",{staticClass:"header-hint"},[e._v(" "+e._s(e.$L("\u9009\u4E2D\u8282\u70B9\uFF0C\u6309enter\u952E\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9\uFF0Ctab\u952E\u6DFB\u52A0\u5B50\u8282\u70B9"))+" ")]):e._e(),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click",transfer:""},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e(),e.file.only_view?e._e():[t("div",{staticClass:"header-icons"},[t("ETooltip",{attrs:{disabled:e.$isEEUiApp||e.windowTouch,content:e.$L("\u6587\u4EF6\u94FE\u63A5")}},[t("div",{staticClass:"header-icon",on:{click:function(i){return e.handleClick("link")}}},[t("i",{staticClass:"taskfont"},[e._v("\uE785")])])]),t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("ETooltip",{ref:"historyTip",attrs:{slot:"reference",disabled:e.$isEEUiApp||e.windowTouch||e.historyShow,content:e.$L("\u5386\u53F2\u7248\u672C")},slot:"reference"},[t("div",{staticClass:"header-icon"},[t("i",{staticClass:"taskfont"},[e._v("\uE71D")])])])],1)],1),e.windowPortrait&&e.file.type=="document"?[e.edit?e.edit&&e.equalContent?t("Button",{staticClass:"header-button",attrs:{size:"small"},on:{click:function(i){e.edit=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]):t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))]):t("Button",{staticClass:"header-button",attrs:{size:"small",type:"primary"},on:{click:function(i){e.edit=!0}}},[e._v(e._s(e.$L("\u7F16\u8F91")))])]:t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])]],2),t("div",{staticClass:"content-body"},[e.historyShow?t("div",{staticClass:"content-mask"}):e._e(),e.file.type=="document"?[e.contentDetail.type=="md"?[e.edit?t("MDEditor",{attrs:{height:"100%",toolbars:e.toolbars},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("MDPreview",{attrs:{initialValue:e.contentDetail.content}})]:t("TEditor",{attrs:{readOnly:!e.edit,height:"100%"},on:{editorSave:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{title:e.file.name},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e.file.type=="mind"?t("Minder",{ref:"myMind",on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{ext:e.file.ext},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{documentKey:e.documentKey},on:{"on-document-ready":function(i){return e.handleClick("officeReady")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e(),t("Modal",{attrs:{title:e.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:e.linkShow,callback:function(i){e.linkShow=i},expression:"linkShow"}},[t("div",[t("div",{staticStyle:{margin:"-10px 0 8px"}},[e._v(e._s(e.$L("\u6587\u4EF6\u540D\u79F0"))+": "+e._s(e.linkData.name))]),t("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":e.linkFocus},model:{value:e.linkData.url,callback:function(i){e.$set(e.linkData,"url",i)},expression:"linkData.url"}}),t("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[e._v(" "+e._s(e.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))+" "),t("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":e.$L("\u786E\u5B9A"),"cancel-text":e.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(i){return e.linkGet(!0)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("p",[t("strong",[e._v(e._s(e.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1),t("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"default"},on:{click:function(i){e.linkShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),t("Button",{attrs:{type:"primary",loading:e.linkLoad>0},on:{click:e.linkCopy}},[e._v(e._s(e.$L("\u590D\u5236")))])],1)])],2):e._e()},y=[];const k=()=>a(()=>import("./index.62cf0925.js"),["js/build/index.62cf0925.js","js/build/index.4d847d9e.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/ImgUpload.8863e78d.js"]),$=()=>a(()=>import("./preview.0ba2d7e4.js"),["js/build/preview.0ba2d7e4.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),w=()=>a(()=>import("./TEditor.8daabc3e.js"),["js/build/TEditor.8daabc3e.js","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/ImgUpload.8863e78d.js"]),g=()=>a(()=>import("./AceEditor.aa9651a2.js"),["js/build/AceEditor.aa9651a2.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),D=()=>a(()=>import("./OnlyOffice.8a3b23b9.js"),["js/build/OnlyOffice.8a3b23b9.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),C=()=>a(()=>import("./Drawio.98aed49e.js"),["js/build/Drawio.98aed49e.js","js/build/Drawio.fc5c6326.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),x=()=>a(()=>import("./Minder.c159d06d.js"),["js/build/Minder.c159d06d.js","js/build/Minder.3ba64342.css","js/build/IFrame.1fc38451.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),S={name:"FileContent",components:{IFrame:d,FileHistory:m,AceEditor:g,TEditor:w,MDEditor:k,OnlyOffice:D,Drawio:C,Minder:x,MDPreview:$},props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{ready:!1,loadSave:0,loadContent:0,unsaveTip:!1,fileExt:null,contentDetail:null,contentBak:{},editUser:[],loadPreview:!0,linkShow:!1,linkData:{},linkLoad:0,historyShow:!1,officeReady:!1,edit:!1}},mounted(){this.edit=!this.windowPortrait,document.addEventListener("keydown",this.keySave),window.addEventListener("message",this.handleOfficeMessage),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(!this.equalContent)return $A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.keySave),window.removeEventListener("message",this.handleOfficeMessage)},watch:{value:{handler(e){e?(this.ready=!0,this.editUser=[this.userId],this.getContent()):(this.linkShow=!1,this.historyShow=!1,this.officeReady=!1,this.fileExt=null)},immediate:!0},historyShow(e){!e&&this.$refs.historyTip&&this.$refs.historyTip.updatePopper()},wsMsg:{handler(e){const{type:s,action:t,data:i}=e;switch(s){case"path":i.path=="/single/file/"+this.fileId&&(this.editUser=i.userids);break;case"file":t=="content"&&this.value&&i.id==this.fileId&&$A.modalConfirm({title:"\u66F4\u65B0\u63D0\u793A",content:"\u56E2\u961F\u6210\u5458\uFF08"+e.nickname+"\uFF09\u66F4\u65B0\u4E86\u5185\u5BB9\uFF0C
\u66F4\u65B0\u65F6\u95F4\uFF1A"+$A.formatDate("Y-m-d H:i:s",e.time)+"\u3002

\u70B9\u51FB\u3010\u786E\u5B9A\u3011\u52A0\u8F7D\u6700\u65B0\u5185\u5BB9\u3002",onOk:()=>{this.getContent()}});break}},deep:!0}},computed:{...c(["wsMsg"]),fileId(){return this.file.id||0},fileName(){return this.fileExt?$A.getFileName(Object.assign(this.file,{ext:this.fileExt})):$A.getFileName(this.file)},equalContent(){return this.contentBak==$A.jsonStringify(this.contentDetail)},contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:s}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${s}`)}return""},toolbars(){return this.windowPortrait?{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!1,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!1,notChecked:!1,split:!0,preview:!1,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!1,html_to_markdown:!1,custom_image:!1,custom_uploadImage:!1,custom_uploadFile:!1,custom_fullscreen:!1}:{strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!1,h5:!1,h6:!1,hr:!0,quote:!0,ul:!0,ol:!0,code:!0,link:!0,image:!1,uploadImage:!1,table:!0,checked:!0,notChecked:!0,split:!0,preview:!0,fullscreen:!1,theme:!1,exportmd:!1,importmd:!1,save:!1,clear:!1,scrolling:!0,html_to_markdown:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,custom_fullscreen:!0}}},methods:{handleOfficeMessage({data:e,source:s}){if(e.source==="onlyoffice")switch(e.action){case"ready":s.postMessage("createMenu","*");break;case"link":this.handleClick("link");break;case"history":const t=this.$refs.officeHeader;t&&(t.style.top=`${e.rect.top}px`,t.style.left=`${e.rect.left}px`,t.style.width=`${e.rect.width}px`,t.style.height=`${e.rect.height}px`,t.click());break}},onFrameLoad(){this.loadPreview=!1},keySave(e){this.value&&e.keyCode===83&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.onSaveSave())},getContent(){if(this.fileId===0){this.contentDetail={},this.updateBak();return}if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file),this.updateBak();return}this.loadSave++,setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId}}).then(({data:e})=>{this.contentDetail=e.content,this.updateBak()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadSave--,this.loadContent--})},updateBak(){this.contentBak=$A.jsonStringify(this.contentDetail)},handleClick(e){switch(e){case"link":this.linkData={id:this.fileId,name:this.file.name},this.linkShow=!0,this.linkGet();break;case"saveBefore":!this.equalContent&&this.loadSave==0?this.handleClick("save"):$A.messageWarning("\u6CA1\u6709\u4EFB\u4F55\u4FEE\u6539\uFF01");break;case"save":if(this.file.only_view)return;this.updateBak(),this.loadSave++,this.$store.dispatch("call",{url:"file/content/save",method:"post",data:{id:this.fileId,content:this.contentBak}}).then(({data:s,msg:t})=>{$A.messageSuccess(t);const i={id:this.fileId,size:s.size};this.fileExt&&(i.ext=this.fileExt,this.fileExt=null),this.edit=!this.windowPortrait,this.$store.dispatch("saveFile",i)}).catch(({msg:s})=>{$A.modalError(s),this.getContent()}).finally(s=>{this.loadSave--});break;case"officeReady":this.officeReady=!0;break}},onRestoreHistory(e){this.historyShow=!1,$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6587\u4EF6\u8FD8\u539F\u81F3\u3010${e.created_at}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((s,t)=>{this.$store.dispatch("call",{url:"file/content/restore",data:{id:this.fileId,history_id:e.id}}).then(({msg:i})=>{s(i),this.contentDetail=null,this.getContent()}).catch(({msg:i})=>{t(i)})})})},linkGet(e){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:e===!0?"yes":"no"}}).then(({data:s})=>{this.linkData=Object.assign(s,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:s})=>{this.linkShow=!1,$A.modalError(s)}).finally(s=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(e=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(e=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(e=>{this.$refs.linkInput.focus({cursor:"all"})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}},unSaveGive(){this.getContent(),this.unsaveTip=!1},onSaveSave(){this.handleClick("save"),this.unsaveTip=!1},setTextType(e){this.fileExt=e,this.$set(this.contentDetail,"type",e)},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId,only_update_at:"yes"}}).then(({data:s})=>{e(`${s.id}-${$A.Time(s.update_at)}`)}).catch(()=>{e(0)})})}}},l={};var b=r(S,_,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var A=function(){return b.exports}();export{A as default}; diff --git a/public/js/build/FilePreview.22c023a8.js b/public/js/build/FilePreview.55c206d9.js similarity index 73% rename from public/js/build/FilePreview.22c023a8.js rename to public/js/build/FilePreview.55c206d9.js index dde72f87f..bd7edcbdc 100644 --- a/public/js/build/FilePreview.22c023a8.js +++ b/public/js/build/FilePreview.55c206d9.js @@ -1 +1 @@ -import{n as r,_ as n}from"./app.6c8b31b1.js";import{I as a}from"./IFrame.364b588a.js";var l=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"file-preview"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.headerShow&&!["word","excel","ppt"].includes(e.file.type),expression:"headerShow && !['word', 'excel', 'ppt'].includes(file.type)"}],staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[t("div",{staticClass:"title-name"},[e._v(e._s(e.$A.getFileName(e.file)))]),t("Tag",{attrs:{color:"default"}},[e._v(e._s(e.$L("\u53EA\u8BFB")))]),t("div",{staticClass:"refresh"},[e.contentLoad?t("Loading"):t("Icon",{attrs:{type:"ios-refresh"},on:{click:e.getContent}})],1)],1)]),t("div",{staticClass:"content-body"},[e.file.type=="document"?[e.contentDetail.type=="md"?t("MDPreview",{attrs:{initialValue:e.contentDetail.content}}):t("TEditor",{attrs:{value:e.contentDetail.content,height:"100%",readOnly:""}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{value:e.contentDetail,title:e.file.name,readOnly:""}}):e.file.type=="mind"?t("Minder",{ref:"myMind",attrs:{value:e.contentDetail,readOnly:""}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{value:e.contentDetail.content,ext:e.file.ext,readOnly:""}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{value:e.contentDetail,code:e.code,historyId:e.historyId,documentKey:e.documentKey,readOnly:""}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e()],2)},s=[];const d=()=>n(()=>import("./preview.438bb1b4.js"),["js/build/preview.438bb1b4.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),c=()=>n(()=>import("./TEditor.5f656e41.js"),["js/build/TEditor.5f656e41.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/ImgUpload.0e64a5a8.js"]),u=()=>n(()=>import("./AceEditor.2ebeaef8.js"),["js/build/AceEditor.2ebeaef8.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),_=()=>n(()=>import("./OnlyOffice.3b8ff0fe.js"),["js/build/OnlyOffice.3b8ff0fe.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),h=()=>n(()=>import("./Drawio.32180b15.js"),["js/build/Drawio.32180b15.js","js/build/Drawio.fc5c6326.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),p=()=>n(()=>import("./Minder.37c15ccd.js"),["js/build/Minder.37c15ccd.js","js/build/Minder.3ba64342.css","js/build/IFrame.364b588a.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:u,TEditor:c,MDPreview:d,OnlyOffice:_,Drawio:h,Minder:p},props:{code:{type:String,default:""},historyId:{type:Number,default:0},file:{type:Object,default:()=>({})},headerShow:{type:Boolean,default:!0}},data(){return{loadContent:0,contentDetail:null,loadPreview:!0}},watch:{"file.id":{handler(e){e&&(this.contentDetail=null,this.getContent())},immediate:!0,deep:!0}},computed:{contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:i}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${i}`)}return""}},methods:{onFrameLoad(){this.loadPreview=!1},getContent(){if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file);return}setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,history_id:this.historyId}}).then(({data:e})=>{this.contentDetail=e.content}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadContent--})},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,only_update_at:"yes"}}).then(({data:i})=>{e(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{e(0)})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}}}},o={};var f=r(v,l,s,!1,m,null,null,null);function m(e){for(let i in o)this[i]=o[i]}var D=function(){return f.exports}();export{D as default}; +import{n as r,_ as n}from"./app.6910ca56.js";import{I as a}from"./IFrame.1fc38451.js";var l=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"file-preview"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.headerShow&&!["word","excel","ppt"].includes(e.file.type),expression:"headerShow && !['word', 'excel', 'ppt'].includes(file.type)"}],staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[t("div",{staticClass:"title-name"},[e._v(e._s(e.$A.getFileName(e.file)))]),t("Tag",{attrs:{color:"default"}},[e._v(e._s(e.$L("\u53EA\u8BFB")))]),t("div",{staticClass:"refresh"},[e.contentLoad?t("Loading"):t("Icon",{attrs:{type:"ios-refresh"},on:{click:e.getContent}})],1)],1)]),t("div",{staticClass:"content-body"},[e.file.type=="document"?[e.contentDetail.type=="md"?t("MDPreview",{attrs:{initialValue:e.contentDetail.content}}):t("TEditor",{attrs:{value:e.contentDetail.content,height:"100%",readOnly:""}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{value:e.contentDetail,title:e.file.name,readOnly:""}}):e.file.type=="mind"?t("Minder",{ref:"myMind",attrs:{value:e.contentDetail,readOnly:""}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{value:e.contentDetail.content,ext:e.file.ext,readOnly:""}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{value:e.contentDetail,code:e.code,historyId:e.historyId,documentKey:e.documentKey,readOnly:""}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e()],2)},s=[];const d=()=>n(()=>import("./preview.0ba2d7e4.js"),["js/build/preview.0ba2d7e4.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),c=()=>n(()=>import("./TEditor.8daabc3e.js"),["js/build/TEditor.8daabc3e.js","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/ImgUpload.8863e78d.js"]),u=()=>n(()=>import("./AceEditor.aa9651a2.js"),["js/build/AceEditor.aa9651a2.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),_=()=>n(()=>import("./OnlyOffice.8a3b23b9.js"),["js/build/OnlyOffice.8a3b23b9.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),h=()=>n(()=>import("./Drawio.98aed49e.js"),["js/build/Drawio.98aed49e.js","js/build/Drawio.fc5c6326.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),p=()=>n(()=>import("./Minder.c159d06d.js"),["js/build/Minder.c159d06d.js","js/build/Minder.3ba64342.css","js/build/IFrame.1fc38451.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:u,TEditor:c,MDPreview:d,OnlyOffice:_,Drawio:h,Minder:p},props:{code:{type:String,default:""},historyId:{type:Number,default:0},file:{type:Object,default:()=>({})},headerShow:{type:Boolean,default:!0}},data(){return{loadContent:0,contentDetail:null,loadPreview:!0}},watch:{"file.id":{handler(e){e&&(this.contentDetail=null,this.getContent())},immediate:!0,deep:!0}},computed:{contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:i}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${i}`)}return""}},methods:{onFrameLoad(){this.loadPreview=!1},getContent(){if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file);return}setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,history_id:this.historyId}}).then(({data:e})=>{this.contentDetail=e.content}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadContent--})},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,only_update_at:"yes"}}).then(({data:i})=>{e(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{e(0)})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}}}},o={};var f=r(v,l,s,!1,m,null,null,null);function m(e){for(let i in o)this[i]=o[i]}var D=function(){return f.exports}();export{D as default}; diff --git a/public/js/build/IFrame.364b588a.js b/public/js/build/IFrame.1fc38451.js similarity index 94% rename from public/js/build/IFrame.364b588a.js rename to public/js/build/IFrame.1fc38451.js index be9321e7b..5268dd632 100644 --- a/public/js/build/IFrame.364b588a.js +++ b/public/js/build/IFrame.1fc38451.js @@ -1 +1 @@ -import{n}from"./app.6c8b31b1.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I}; +import{n}from"./app.6910ca56.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I}; diff --git a/public/js/build/ImgUpload.0e64a5a8.js b/public/js/build/ImgUpload.8863e78d.js similarity index 99% rename from public/js/build/ImgUpload.0e64a5a8.js rename to public/js/build/ImgUpload.8863e78d.js index d6cf8e3cb..df83fb8a3 100644 --- a/public/js/build/ImgUpload.0e64a5a8.js +++ b/public/js/build/ImgUpload.8863e78d.js @@ -1 +1 @@ -import{n as o}from"./app.6c8b31b1.js";var r=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"common-img-update"},[t._l(t.uploadList,function(s){return t.type!=="callback"?e("div",{staticClass:"imgcomp-upload-list"},[s.status==="finished"?[e("div",{staticClass:"imgcomp-upload-img",style:{"background-image":"url("+t.__thumb(s.thumb)+")"}}),e("div",{staticClass:"imgcomp-upload-list-cover"},[e("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(a){return t.handleView(s)}}}),e("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(a){return t.handleRemove(s)}}})],1)]:[s.showProgress?e("Progress",{attrs:{percent:s.percentage,"hide-info":""}}):t._e()]],2):t._e()}),e("div",{staticClass:"add-box",class:{"callback-add-box":t.type==="callback"}},[e("div",{staticClass:"add-box-icon"},[e("Icon",{attrs:{type:"md-add",size:"32"}})],1),e("div",{staticClass:"add-box-upload"},[e("div",{staticClass:"add-box-item",on:{click:t.browsePicture}},[e("span",[t._v(t._s(t.$L("\u6D4F\u89C8"))),t.type==="callback"?e("em",[t._v(t._s(t.$L("\u56FE\u7247")))]):t._e()])]),e("div",{staticClass:"add-box-item"},[e("Upload",{ref:"upload",attrs:{name:"image",accept:"image/*",action:t.actionUrl,headers:t.uploadHeaders,data:t.uploadParams,"show-upload-list":!1,"max-size":t.maxSize,format:["jpg","jpeg","webp","gif","png"],"default-file-list":t.defaultList,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-error":t.handleError,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload,multiple:t.multiple}},[e("span",[t._v(t._s(t.$L("\u4E0A\u4F20"))),t.type==="callback"?e("em",[t._v(t._s(t.$L("\u56FE\u7247")))]):t._e()])])],1)])]),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("\u6D4F\u89C8\u56FE\u7247\u7A7A\u95F4"),width:"710"},model:{value:t.browseVisible,callback:function(s){t.browseVisible=s},expression:"browseVisible"}},[t.isLoading?e("div",{staticClass:"browse-load"},[t._v(t._s(t.$L("\u52A0\u8F7D\u4E2D...")))]):e("div",{ref:"browselistbox",staticClass:"browse-list",class:t.httpType==="input"?"browse-list-disabled":""},[t.browseList.length<=0?e("div",[t._v(t._s(t.$L("\u65E0\u5185\u5BB9")))]):t._l(t.browseList,function(s){return e("div",{staticClass:"browse-item",on:{click:function(a){return t.browseItem(s)}}},[s.active?e("Icon",{staticClass:"browse-icon",attrs:{type:"ios-checkmark-circle"}}):t._e(),e("div",{staticClass:"browse-img",style:t.browseStyle(s.thumb)}),e("div",{staticClass:"browse-title"},[t._v(t._s(s.title))])],1)})],2),e("div",{staticClass:"img-upload-foot",attrs:{slot:"footer"},slot:"footer"},[t.type!=="callback"&&t.http&&t.httpType===""?e("div",{staticClass:"img-upload-foot-input",on:{click:function(s){t.httpType="input"}}},[e("Icon",{attrs:{type:"ios-image",size:"22"}}),e("div",{staticClass:"img-upload-foot-httptitle"},[t._v(t._s(t.$L("\u81EA\u5B9A\u4E49\u56FE\u7247\u5730\u5740")))])],1):t._e(),t.type!=="callback"&&t.http&&t.httpType==="input"?e("div",{staticClass:"img-upload-foot-input"},[e("Input",{attrs:{placeholder:t.$L("\u4EE5 http:// \u6216 https:// \u5F00\u5934"),search:"","enter-button":t.$L("\u786E\u5B9A")},on:{"on-search":t.httpEnter},model:{value:t.httpValue,callback:function(s){t.httpValue=s},expression:"httpValue"}},[e("span",{staticStyle:{cursor:"pointer"},attrs:{slot:"prepend"},on:{click:function(s){t.httpType=""}},slot:"prepend"},[t._v(t._s(t.$L("\u81EA\u5B9A\u4E49\u5730\u5740"))+": ")])])],1):t._e(),t.httpType===""?e("Button",{on:{click:function(s){t.browseVisible=!1}}},[t._v(t._s(t.$L("\u5173\u95ED")))]):t._e(),t.httpType===""?e("Button",{attrs:{type:"primary"},on:{click:function(s){return t.handleCallback(!0)}}},[t._v(t._s(t.$L("\u5B8C\u6210")))]):t._e()],1)]),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("\u67E5\u770B\u56FE\u7247"),draggable:""},model:{value:t.visible,callback:function(s){t.visible=s},expression:"visible"}},[e("div",{staticStyle:{"max-height":"480px",overflow:"auto"}},[e("a",{attrs:{href:t.imgVisible,target:"_blank"}},[t.visible?e("img",{staticStyle:{"max-width":"100%","max-height":"900px",display:"block",margin:"0 auto"},attrs:{src:t.imgVisible}}):t._e()])])])],2)},n=[];const h={name:"ImgUpload",props:{value:{},num:{},width:{},height:{},whcut:{},type:{},http:{type:Boolean,default:!1},otherParams:{type:Object,default:()=>({})},uploadIng:{type:Number,default:0}},data(){return{actionUrl:$A.apiUrl("system/imgupload"),multiple:this.num>1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted(){this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);let t=$A(this.$refs.browselistbox);t.scroll(()=>{let i=t[0].scrollHeight,e=t[0].scrollTop,s=t.height();if(e+s>=i&&this.browseListNext.length>0){let a=this.browseListNext;this.browseListNext=[],this.browsePictureFor(a)}})},watch:{value(t){if(typeof t=="string"){this.$emit("input",this.initItems(t));return}t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList)},browseVisible(){this.httpType="",this.httpValue=""}},computed:{uploadHeaders(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},uploadParams(){let t={width:this.width,height:this.height,whcut:this.whcut};return Object.keys(this.otherParams).length>0?Object.assign(t,this.otherParams):t}},methods:{handleCallback(t){this.type==="callback"&&(t===!0?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):typeof t=="object"&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems(t){typeof t=="string"&&(t=[{url:t}]);let i=[];return $A.each(t,(e,s)=>{typeof s=="string"&&(s={url:s}),s.url&&(s.active=!0,s.status="finished",typeof s.path=="undefined"&&(s.path=s.url),typeof s.thumb=="undefined"&&(s.thumb=s.url),i.push(s))}),i},handleView(t){this.$store.dispatch("previewImage",t.url)},handleRemove(t){let i=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(i.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress(t,i){i._uploadIng===void 0&&(i._uploadIng=!0,this.$emit("update:uploadIng",this.uploadIng+1))},handleSuccess(t,i){this.$emit("update:uploadIng",this.uploadIng-1),t.ret===1?(i.url=t.data.url,i.path=t.data.path,i.thumb=t.data.thumb,this.handleCallback(i)):($A.noticeWarning({title:this.$L("\u4E0A\u4F20\u5931\u8D25"),desc:this.$L("\u6587\u4EF6 "+i.name+" \u4E0A\u4F20\u5931\u8D25 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError(t){$A.noticeWarning({title:this.$L("\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u4E0A\u4F20 jpg\u3001jpeg\u3001webp\u3001gif\u3001png \u683C\u5F0F\u7684\u56FE\u7247\u3002")})},handleMaxSize(t){$A.noticeWarning({title:this.$L("\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024))})},handleBeforeUpload(){let t=this.uploadList.length{let e=i.dirs;for(let s=0;s{this.browseVisible=!1,$A.noticeWarning(i)}).finally(i=>{this.isLoading=!1})},browsePictureFor(t){for(let i=0;i({})},uploadIng:{type:Number,default:0}},data(){return{actionUrl:$A.apiUrl("system/imgupload"),multiple:this.num>1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted(){this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);let t=$A(this.$refs.browselistbox);t.scroll(()=>{let i=t[0].scrollHeight,e=t[0].scrollTop,s=t.height();if(e+s>=i&&this.browseListNext.length>0){let a=this.browseListNext;this.browseListNext=[],this.browsePictureFor(a)}})},watch:{value(t){if(typeof t=="string"){this.$emit("input",this.initItems(t));return}t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList)},browseVisible(){this.httpType="",this.httpValue=""}},computed:{uploadHeaders(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},uploadParams(){let t={width:this.width,height:this.height,whcut:this.whcut};return Object.keys(this.otherParams).length>0?Object.assign(t,this.otherParams):t}},methods:{handleCallback(t){this.type==="callback"&&(t===!0?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):typeof t=="object"&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems(t){typeof t=="string"&&(t=[{url:t}]);let i=[];return $A.each(t,(e,s)=>{typeof s=="string"&&(s={url:s}),s.url&&(s.active=!0,s.status="finished",typeof s.path=="undefined"&&(s.path=s.url),typeof s.thumb=="undefined"&&(s.thumb=s.url),i.push(s))}),i},handleView(t){this.$store.dispatch("previewImage",t.url)},handleRemove(t){let i=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(i.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress(t,i){i._uploadIng===void 0&&(i._uploadIng=!0,this.$emit("update:uploadIng",this.uploadIng+1))},handleSuccess(t,i){this.$emit("update:uploadIng",this.uploadIng-1),t.ret===1?(i.url=t.data.url,i.path=t.data.path,i.thumb=t.data.thumb,this.handleCallback(i)):($A.noticeWarning({title:this.$L("\u4E0A\u4F20\u5931\u8D25"),desc:this.$L("\u6587\u4EF6 "+i.name+" \u4E0A\u4F20\u5931\u8D25 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError(t){$A.noticeWarning({title:this.$L("\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u4E0A\u4F20 jpg\u3001jpeg\u3001webp\u3001gif\u3001png \u683C\u5F0F\u7684\u56FE\u7247\u3002")})},handleMaxSize(t){$A.noticeWarning({title:this.$L("\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024))})},handleBeforeUpload(){let t=this.uploadList.length{let e=i.dirs;for(let s=0;s{this.browseVisible=!1,$A.noticeWarning(i)}).finally(i=>{this.isLoading=!1})},browsePictureFor(t){for(let i=0;i"meeting-player-"+Math.round(Math.random()*1e4)},player:{type:Object,default:()=>({})},isLocal:{type:Boolean,default:!1}},data(){return{timer:null,tourist:{uid:"",nickname:"",userimg:""}}},mounted(){this.timer=setInterval(t=>{this.audio&&!this.player.audioTrack.isPlaying&&this.play("audio"),this.video&&!this.player.videoTrack.isPlaying&&this.play("video")},3e3)},beforeDestroy(){clearInterval(this.timer)},computed:{...l(["cacheUserBasic"]),userid(){return this.player.uid?(this.player.uid+"").indexOf("88888")!==-1?(this.getTouristInfo(),0):parseInt((this.player.uid+"").substring(6))||0:0},playerStyle(){const t=this.cacheUserBasic.find(({userid:i})=>i==this.userid);return t?{backgroundImage:`url("${t.userimg}")`}:this.tourist.userimg?{backgroundImage:`url("${this.tourist.userimg}")`}:null},audio(){return!!this.player.audioTrack},video(){return!!this.player.videoTrack}},watch:{audio:{handler(t){t&&this.play("audio")},immediate:!0},video:{handler(t){t&&this.play("video")},immediate:!0}},methods:{play(t){this.$nextTick(i=>{try{t==="audio"?!this.isLocal&&this.player.audioTrack.play():t==="video"&&this.player.videoTrack.play(this.id)}catch(e){console.log("Meeting Player Error",e)}})},getTouristInfo(){this.$store.dispatch("call",{url:"users/meeting/tourist",data:{tourist_id:this.player.uid}}).then(({data:t})=>{this.tourist=t}).catch(({msg:t})=>{$A.modalError(t)})}}},o={};var m=s(f,c,u,!1,g,null,null,null);function g(t){for(let i in o)this[i]=o[i]}var p=function(){return m.exports}(),v=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{ref:"floatDrag",style:t.dragStyle,on:{mousedown:function(a){return a.stopPropagation(),a.preventDefault(),t.mouseDown.apply(null,arguments)}}},[t._t("default")],2)},k=[];const y={name:"DragBallComponent",props:{id:{type:String,default:""},distanceRight:{type:Number,default:0},distanceBottom:{type:Number,default:100},isScrollHidden:{type:Boolean,default:!1},isCanDraggable:{type:Boolean,default:!0},zIndex:{type:Number,default:50}},data(){return{clientWidth:null,clientHeight:null,top:0,left:0,timer:null,currentTop:0,isMoving:!1,record:{}}},created(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight},mounted(){this.id&&($A.isJson(window._DragBallComponent)||(window._DragBallComponent={})),this.isCanDraggable&&this.$nextTick(()=>{this.id&&$A.isJson(window._DragBallComponent[this.id])?(this.left=window._DragBallComponent[this.id].left,this.top=window._DragBallComponent[this.id].top):(this.left=this.clientWidth-this.floatDrag.offsetWidth-this.distanceRight,this.top=this.clientHeight-this.floatDrag.offsetHeight-this.distanceBottom),this.initDraggable()}),this.isScrollHidden&&window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize)},beforeDestroy(){this.id&&(window._DragBallComponent[this.id]={left:this.left,top:this.top}),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize)},computed:{dragStyle(){return{left:this.left+"px",top:this.top+"px",zIndex:this.zIndex,position:"fixed"}},floatDrag(){return this.$refs.floatDrag}},methods:{handleScroll(){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.handleScrollEnd()},200),this.currentTop=document.documentElement.scrollTop||document.body.scrollTop,this.left>this.clientWidth/2?this.left=this.clientWidth+this.floatDrag.offsetWidth:this.left=-this.floatDrag.offsetWidth},handleScrollEnd(){(document.documentElement.scrollTop||document.body.scrollTop)===this.currentTop&&(this.left>this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,clearTimeout(this.timer))},handleResize(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight,this.$nextTick(this.checkDraggablePosition)},initDraggable(){this.floatDrag.addEventListener("touchstart",this.toucheStart),this.floatDrag.addEventListener("touchmove",this.touchMove),this.floatDrag.addEventListener("touchend",this.touchEnd)},mouseDown(t){this.record={time:new Date().getTime(),top:this.floatDrag.offsetTop,left:this.floatDrag.offsetLeft,x:t.clientX-this.floatDrag.offsetLeft,y:t.clientY-this.floatDrag.offsetTop},this.floatDrag.style.transition="none",this.canClick=!1,document.onmousemove=i=>{let e=i.clientX-this.record.x,a=i.clientY-this.record.y;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),a<0?a=0:a>window.innerHeight-this.floatDrag.offsetHeight&&(a=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=a},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,this.checkDraggablePosition(),this.floatDrag.style.transition="all 0.3s",(Math.abs(this.record.top-this.floatDrag.offsetTop)<5&&Math.abs(this.record.left-this.floatDrag.offsetLeft)<5||new Date().getTime()-this.record.time<200)&&this.$emit("on-click")}},toucheStart(){this.canClick=!1,this.floatDrag.style.transition="none"},touchMove(t){if(this.canClick=!0,t.targetTouches.length===1){let i=event.targetTouches[0],e=i.clientX-this.floatDrag.offsetWidth/2,a=i.clientY-this.floatDrag.offsetHeight/2;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),a<0?a=0:a>window.innerHeight-this.floatDrag.offsetHeight&&(a=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=a}},touchEnd(){!this.canClick||(this.floatDrag.style.transition="all 0.3s",this.checkDraggablePosition())},checkDraggablePosition(){this.left+this.floatDrag.offsetWidth/2>=this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,this.top<0&&(this.top=0),this.top+this.floatDrag.offsetHeight>=this.clientHeight&&(this.top=this.clientHeight-this.floatDrag.offsetHeight)}}},n={};var D=s(y,v,k,!1,_,null,null,null);function _(t){for(let i in n)this[i]=n[i]}var $=function(){return D.exports}(),b=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"meeting-warp"},[e("Modal",{attrs:{title:t.$L(t.addData.type==="join"?"\u52A0\u5165\u4F1A\u8BAE":"\u65B0\u4F1A\u8BAE"),"mask-closable":!1,closable:!t.addData.sharekey},model:{value:t.addShow,callback:function(a){t.addShow=a},expression:"addShow"}},[e("Form",{ref:"addForm",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[t.addData.type==="join"?[t.addData.name?e("FormItem",{attrs:{prop:"userids",label:t.$L("\u4F1A\u8BAE\u4E3B\u9898")}},[e("Input",{attrs:{disabled:""},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}})],1):t._e(),t.addData.sharekey?e("FormItem",{attrs:{prop:"username",label:t.$L("\u4F60\u7684\u59D3\u540D")}},[e("Input",{attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u4F60\u7684\u59D3\u540D")},model:{value:t.addData.username,callback:function(a){t.$set(t.addData,"username",a)},expression:"addData.username"}})],1):t._e(),e("FormItem",{attrs:{prop:"meetingid",label:t.$L("\u4F1A\u8BAE\u9891\u9053ID")}},[e("Input",{attrs:{disabled:t.addData.meetingdisabled===!0,placeholder:t.$L("\u8BF7\u8F93\u5165\u4F1A\u8BAE\u9891\u9053ID")},model:{value:t.addData.meetingid,callback:function(a){t.$set(t.addData,"meetingid",a)},expression:"addData.meetingid"}})],1)]:[e("FormItem",{attrs:{prop:"name",label:t.$L("\u4F1A\u8BAE\u4E3B\u9898")}},[e("Input",{attrs:{maxlength:50,placeholder:t.$L("\u9009\u586B")},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}})],1),e("FormItem",{attrs:{prop:"userids",label:t.$L("\u9080\u8BF7\u6210\u5458")}},[e("UserSelect",{attrs:{uncancelable:[t.userId],"multiple-max":20,title:t.$L("\u9009\u62E9\u9080\u8BF7\u6210\u5458")},model:{value:t.addData.userids,callback:function(a){t.$set(t.addData,"userids",a)},expression:"addData.userids"}})],1)],e("FormItem",{attrs:{prop:"tracks"}},[e("CheckboxGroup",{model:{value:t.addData.tracks,callback:function(a){t.$set(t.addData,"tracks",a)},expression:"addData.tracks"}},[e("Checkbox",{attrs:{label:"audio"}},[e("span",[t._v(t._s(t.$L("\u9EA6\u514B\u98CE")))])]),e("Checkbox",{attrs:{label:"video"}},[e("span",[t._v(t._s(t.$L("\u6444\u50CF\u5934")))])])],1)],1)],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t.addData.sharekey?t._e():e("Button",{attrs:{type:"default"},on:{click:function(a){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onSubmit}},[t._v(t._s(t.$L(t.addData.type==="join"?"\u52A0\u5165\u4F1A\u8BAE":"\u5F00\u59CB\u4F1A\u8BAE")))])],1)],1),e("Modal",{ref:"meetingModal",attrs:{title:t.addData.name,mask:!1,"mask-closable":!1,closable:!1,"transition-names":["",""],beforeClose:t.onClose,"class-name":`meeting-manager${t.meetingMini?" meeting-hidden":""}`,fullscreen:""},model:{value:t.meetingShow,callback:function(a){t.meetingShow=a},expression:"meetingShow"}},[e("ul",[t.localUser.uid?e("li",[e("MeetingPlayer",{attrs:{player:t.localUser,isLocal:""}})],1):t._e(),t._l(t.remoteUsers,function(a){return e("li",[e("MeetingPlayer",{attrs:{player:a}})],1)})],2),e("div",{staticClass:"adaption meeting-button-group",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",loading:t.audioLoad},on:{click:t.onAudio}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.audioTrack?"":"")}})]),e("Button",{attrs:{type:"primary",loading:t.videoLoad},on:{click:t.onVideo}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.videoTrack?"":"")}})]),t.windowPortrait?[e("Button",{attrs:{type:"primary",loading:t.linkCopyLoad},on:{click:function(a){return t.onInvitation("open")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE646")])]),t.addData.sharekey?t._e():e("Button",{attrs:{type:"primary"},on:{click:function(a){t.meetingMini=!0}}},[e("i",{staticClass:"taskfont"},[t._v("\uE656")])]),e("Button",{attrs:{type:"warning",loading:t.loadIng>0},on:{click:t.onClose}},[e("i",{staticClass:"taskfont"},[t._v("\uE612")])])]:[e("Button",{attrs:{type:"primary"},on:{click:function(a){return t.onInvitation("open")}}},[t._v(t._s(t.$L("\u9080\u8BF7")))]),t.addData.sharekey?t._e():e("Button",{attrs:{type:"primary"},on:{click:function(a){t.meetingMini=!0}}},[t._v(t._s(t.$L("\u6700\u5C0F\u5316")))]),e("Button",{attrs:{type:"warning",loading:t.loadIng>0},on:{click:t.onClose}},[t._v(t._s(t.$L("\u79BB\u5F00\u4F1A\u8BAE")))])]],2)]),t.meetingMini?e("DragBallComponent",{attrs:{id:"meetingDragBall","z-index":3e3},on:{"on-click":function(a){t.meetingMini=!1}}},[e("div",{staticClass:"meeting-drag-ball"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.audioTrack?"":"")}}),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.videoTrack?"":"")}}),e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u4E2D")))])])]):t._e(),e("Modal",{attrs:{title:t.$L("\u9080\u8BF7\u52A0\u5165"),"mask-closable":!1},model:{value:t.invitationShow,callback:function(a){t.invitationShow=a},expression:"invitationShow"}},[e("Form",{ref:"invitationForm",attrs:{model:t.invitationData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u9080\u8BF7\u6210\u5458")}},[e("UserSelect",{attrs:{"multiple-max":20,title:t.$L("\u9009\u62E9\u9080\u8BF7\u6210\u5458")},model:{value:t.invitationData.userids,callback:function(a){t.$set(t.invitationData,"userids",a)},expression:"invitationData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default",loading:t.linkCopyLoad},on:{click:t.linkCopy}},[t._v(t._s(t.$L("\u590D\u5236\u94FE\u63A5")))]),e("Button",{attrs:{type:"primary",loading:t.invitationLoad},on:{click:function(a){return t.onInvitation("submit")}}},[t._v(t._s(t.$L("\u53D1\u9001\u9080\u8BF7")))])],1)],1)],1)},w=[];const T={name:"MeetingManager",components:{UserSelect:h,DragBallComponent:$,MeetingPlayer:p},props:{id:{type:String,default:()=>"meeting-player-"+Math.round(Math.random()*1e4)}},data(){return{loadIng:0,subscribe:null,addShow:!1,addData:{userids:[],tracks:["audio"]},addRule:{username:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u4F60\u7684\u59D3\u540D\uFF01"),trigger:"change"}]},invitationShow:!1,invitationLoad:!1,invitationData:{userids:[]},meetingShow:!1,meetingMini:!1,audioLoad:!1,videoLoad:!1,agoraClient:null,remoteUsers:[],localUser:{uid:null,audioTrack:null,videoTrack:null},linkCopyLoad:!1}},computed:{...l(["meetingWindow"])},mounted(){this.subscribe=d.Store.subscribe("addMeeting",this.onAdd)},beforeDestroy(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},watch:{meetingMini(t){t||(this.$refs.meetingModal.modalIndex=this.$refs.meetingModal.handleGetModalIndex())},meetingWindow:{handler(t){switch(t.type){case"add":this.addShow=t.show,this.loadIng=0;break;case"join":this.addShow=t.show,this.loadIng=0,this.addData.type="join",t.meetingSharekey&&(this.addData.sharekey=t.meetingSharekey,this.addData.meetingid=t.meetingid||"",this.addData.meetingdisabled=!!t.meetingSharekey);break;case"invitation":this.invitationShow=t.show,this.invitationLoad=!1,this.invitationData.meetingid=t.meetingid;break;case"error":this.addShow=t.show,this.loadIng=0,this.invitationShow=t.show,this.invitationLoad=!1,$A.modalError("\u52A0\u5165\u4F1A\u8BAE\u5931\u8D25");break}},immediate:!0}},methods:{onAdd(t){t=$A.isJson(t)?t:{},/^\d+$/.test(t.dialog_id)&&(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:t.dialog_id}}).then(({data:i})=>{this.$set(this.addData,"userids",i.map(e=>e.userid))}).finally(i=>{this.loadIng--}),delete t.dialog_id),$A.isArray(t.userids)?t.userids.includes(this.userId)||t.userids.push(this.userId):t.userids=[this.userId],$A.isArray(t.tracks)?t.tracks.includes("audio")||t.tracks.push("audio"):t.tracks=["audio"],this.addData=t,this.addShow=!0},onSubmit(){if(this.meetingShow){$A.modalWarning("\u6B63\u5728\u4F1A\u8BAE\u4E2D\uFF0C\u65E0\u6CD5\u8FDB\u5165\u5176\u4ED6\u4F1A\u8BAE\u5BA4");return}this.$refs.addForm.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/meeting/open",data:this.addData}).then(({data:i})=>{this.$set(this.addData,"name",i.name),this.$set(this.addData,"meetingid",i.meetingid),this.$set(this.localUser,"nickname",i.nickname),this.$set(this.localUser,"userimg",i.userimg),this.$store.dispatch("saveDialogMsg",i.msgs),this.$store.dispatch("updateDialogLastMsg",i.msgs),delete i.name,delete i.msgs,$A.isEEUiApp?$A.eeuiAppSendMessage({action:"startMeeting",meetingParams:{name:this.addData.name,token:i.token,channel:i.channel,uuid:i.uid,appid:i.appid,avatar:i.userimg,username:i.nickname,video:this.addData.tracks.includes("video"),audio:this.addData.tracks.includes("audio"),meetingid:i.meetingid,sharelink:i.sharelink,alert:{title:this.$L("\u6E29\u99A8\u63D0\u793A"),message:this.$L("\u786E\u5B9A\u8981\u79BB\u5F00\u4F1A\u8BAE\u5417\uFF1F"),cancel:this.$L("\u7EE7\u7EED"),confirm:this.$L("\u9000\u51FA")}}}):$A.loadScript("js/AgoraRTC_N-4.17.0.js").then(e=>{this.join(i)}).catch(e=>{$A.modalError("\u4F1A\u8BAE\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")}).finally(e=>{this.loadIng--})}).catch(({msg:i})=>{this.loadIng--,$A.modalError(i)}))})},onAudio(){this.localUser.audioTrack?this.closeAudio():this.openAudio()},onVideo(){this.localUser.videoTrack?this.closeVideo():this.openVideo()},onInvitation(t){if(t==="open"){if(this.addData.sharekey){this.linkCopy();return}this.invitationData={userids:[],meetingid:this.addData.meetingid},this.invitationShow=!0}else t==="submit"&&(this.invitationLoad=!0,this.$store.dispatch("call",{url:"users/meeting/invitation",data:this.invitationData}).then(({data:i,msg:e})=>{this.invitationShow=!1,this.$store.dispatch("saveDialogMsg",i.msgs),this.$store.dispatch("updateDialogLastMsg",i.msgs),$A.messageSuccess(e)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.invitationLoad=!1}))},onClose(){return new Promise(t=>{$A.modalConfirm({content:"\u786E\u5B9A\u8981\u79BB\u5F00\u4F1A\u8BAE\u5417\uFF1F",cancelText:"\u7EE7\u7EED",okText:"\u9000\u51FA",onOk:async i=>{await this.leave(),this.addData.sharekey&&(this.addShow=!0,this.loadIng=0),t()}})})},async join(t){this.loadIng++,AgoraRTC.onMicrophoneChanged=async e=>{if(e.state==="ACTIVE")this.localUser.audioTrack.setDevice(e.device.deviceId);else if(e.device.label===this.localUser.audioTrack.getTrackLabel()){const a=await AgoraRTC.getMicrophones();a[0]&&this.localUser.audioTrack.setDevice(a[0].deviceId)}},AgoraRTC.onCameraChanged=async e=>{if(e.state==="ACTIVE")this.localUser.videoTrack.setDevice(e.device.deviceId);else if(e.device.label===this.localUser.videoTrack.getTrackLabel()){const a=await AgoraRTC.getCameras();a[0]&&this.localUser.videoTrack.setDevice(a[0].deviceId)}},AgoraRTC.onAutoplayFailed=()=>{$A.messageWarning("\u70B9\u51FB\u5C4F\u5E55\u5F00\u59CB\u4F1A\u8BAE")},this.agoraClient=AgoraRTC.createClient({mode:"rtc",codec:"vp8"}),this.agoraClient.on("user-joined",this.handleUserJoined),this.agoraClient.on("user-left",this.handleUserLeft),this.agoraClient.on("user-published",this.handleUserPublished),this.agoraClient.on("user-unpublished",this.handleUserUnpublished);const i=[];try{this.localUser.uid=await this.agoraClient.join(t.appid,t.channel,t.token,t.uid),this.addData.tracks.includes("audio")&&i.push(this.localUser.audioTrack=await AgoraRTC.createMicrophoneAudioTrack()),this.addData.tracks.includes("video")&&i.push(this.localUser.videoTrack=await AgoraRTC.createCameraVideoTrack()),i.length>0&&await this.agoraClient.publish(i),this.meetingShow=!0}catch(e){console.error(e),$A.modalError("\u4F1A\u8BAE\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")}this.loadIng--,this.addShow=!1},async leave(){this.loadIng++,["audioTrack","videoTrack"].some(t=>{var i,e;(i=this.localUser[t])==null||i.stop(),(e=this.localUser[t])==null||e.close()}),this.localUser={uid:null,audioTrack:null,videoTrack:null},this.remoteUsers=[],await this.agoraClient.leave(),this.loadIng--,this.meetingShow=!1},async openAudio(){this.audioLoad||this.localUser.audioTrack||(this.audioLoad=!0,this.localUser.audioTrack=await AgoraRTC.createMicrophoneAudioTrack(),await this.agoraClient.publish([this.localUser.audioTrack]),this.audioLoad=!1)},async closeAudio(){this.audioLoad||!this.localUser.audioTrack||(this.audioLoad=!0,await this.agoraClient.unpublish([this.localUser.audioTrack]),this.localUser.audioTrack.stop(),this.localUser.audioTrack.close(),this.localUser.audioTrack=null,this.audioLoad=!1)},async openVideo(){this.videoLoad||this.localUser.videoTrack||(this.videoLoad=!0,this.localUser.videoTrack=await AgoraRTC.createCameraVideoTrack(),await this.agoraClient.publish([this.localUser.videoTrack]),this.videoLoad=!1)},async closeVideo(){this.videoLoad||!this.localUser.videoTrack||(this.videoLoad=!0,await this.agoraClient.unpublish([this.localUser.videoTrack]),this.localUser.videoTrack.stop(),this.localUser.videoTrack.close(),this.localUser.videoTrack=null,this.videoLoad=!1)},async handleUserJoined(t){const i=this.remoteUsers.findIndex(e=>e.uid==t.uid);i>-1?this.remoteUsers.splice(i,1,t):this.remoteUsers.push(t)},async handleUserLeft(t){const i=this.remoteUsers.findIndex(e=>e.uid==t.uid);i>-1&&this.remoteUsers.splice(i,1)},async handleUserPublished(t,i){this.remoteUsers.find(a=>a.uid==t.uid)&&await this.agoraClient.subscribe(t,i)},async handleUserUnpublished(t,i){this.remoteUsers.find(a=>a.uid==t.uid)&&await this.agoraClient.unsubscribe(t,i)},linkCopy(){this.linkCopyLoad=!0,this.$store.dispatch("call",{url:"users/meeting/link",data:{meetingid:this.addData.meetingid||this.invitationData.meetingid,sharekey:this.addData.sharekey}}).then(({data:t})=>{this.$copyText(t).then(i=>{$A.messageSuccess("\u5DF2\u590D\u5236\u4F1A\u8BAE\u9080\u8BF7\u94FE\u63A5")}).catch(i=>{$A.messageError("\u590D\u5236\u5931\u8D25")}),this.invitationShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.linkCopyLoad=!1})}}},r={};var C=s(T,b,w,!1,L,null,null,null);function L(t){for(let i in r)this[i]=r[i]}var I=function(){return C.exports}();export{I as M}; +import{m as l,n as s,a as d}from"./app.6910ca56.js";import{U as h}from"./UserSelect.1938cd94.js";var c=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"meeting-player"},[e("div",{staticClass:"player",style:t.playerStyle,attrs:{id:t.id}}),t.userid?e("UserAvatar",{attrs:{userid:t.userid,size:36,borderWitdh:2}}):t.tourist.userimg?e("div",{staticClass:"common-avatar avatar-wrapper"},[e("div",{staticClass:"avatar-box online"},[e("em"),e("EAvatar",{attrs:{size:36,src:t.tourist.userimg}})],1)]):t._e(),e("div",{staticClass:"player-state"},[t.audio?t._e():e("i",{staticClass:"taskfont"},[t._v("\uE7C7")]),t.video?t._e():e("i",{staticClass:"taskfont"},[t._v("\uE7C8")])])],1)},u=[];const f={name:"MeetingPlayer",props:{id:{type:String,default:()=>"meeting-player-"+Math.round(Math.random()*1e4)},player:{type:Object,default:()=>({})},isLocal:{type:Boolean,default:!1}},data(){return{timer:null,tourist:{uid:"",nickname:"",userimg:""}}},mounted(){this.timer=setInterval(t=>{this.audio&&!this.player.audioTrack.isPlaying&&this.play("audio"),this.video&&!this.player.videoTrack.isPlaying&&this.play("video")},3e3)},beforeDestroy(){clearInterval(this.timer)},computed:{...l(["cacheUserBasic"]),userid(){return this.player.uid?(this.player.uid+"").indexOf("88888")!==-1?(this.getTouristInfo(),0):parseInt((this.player.uid+"").substring(6))||0:0},playerStyle(){const t=this.cacheUserBasic.find(({userid:i})=>i==this.userid);return t?{backgroundImage:`url("${t.userimg}")`}:this.tourist.userimg?{backgroundImage:`url("${this.tourist.userimg}")`}:null},audio(){return!!this.player.audioTrack},video(){return!!this.player.videoTrack}},watch:{audio:{handler(t){t&&this.play("audio")},immediate:!0},video:{handler(t){t&&this.play("video")},immediate:!0}},methods:{play(t){this.$nextTick(i=>{try{t==="audio"?!this.isLocal&&this.player.audioTrack.play():t==="video"&&this.player.videoTrack.play(this.id)}catch(e){console.log("Meeting Player Error",e)}})},getTouristInfo(){this.$store.dispatch("call",{url:"users/meeting/tourist",data:{tourist_id:this.player.uid}}).then(({data:t})=>{this.tourist=t}).catch(({msg:t})=>{$A.modalError(t)})}}},o={};var m=s(f,c,u,!1,g,null,null,null);function g(t){for(let i in o)this[i]=o[i]}var p=function(){return m.exports}(),v=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{ref:"floatDrag",style:t.dragStyle,on:{mousedown:function(a){return a.stopPropagation(),a.preventDefault(),t.mouseDown.apply(null,arguments)}}},[t._t("default")],2)},k=[];const y={name:"DragBallComponent",props:{id:{type:String,default:""},distanceRight:{type:Number,default:0},distanceBottom:{type:Number,default:100},isScrollHidden:{type:Boolean,default:!1},isCanDraggable:{type:Boolean,default:!0},zIndex:{type:Number,default:50}},data(){return{clientWidth:null,clientHeight:null,top:0,left:0,timer:null,currentTop:0,isMoving:!1,record:{}}},created(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight},mounted(){this.id&&($A.isJson(window._DragBallComponent)||(window._DragBallComponent={})),this.isCanDraggable&&this.$nextTick(()=>{this.id&&$A.isJson(window._DragBallComponent[this.id])?(this.left=window._DragBallComponent[this.id].left,this.top=window._DragBallComponent[this.id].top):(this.left=this.clientWidth-this.floatDrag.offsetWidth-this.distanceRight,this.top=this.clientHeight-this.floatDrag.offsetHeight-this.distanceBottom),this.initDraggable()}),this.isScrollHidden&&window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize)},beforeDestroy(){this.id&&(window._DragBallComponent[this.id]={left:this.left,top:this.top}),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize)},computed:{dragStyle(){return{left:this.left+"px",top:this.top+"px",zIndex:this.zIndex,position:"fixed"}},floatDrag(){return this.$refs.floatDrag}},methods:{handleScroll(){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.handleScrollEnd()},200),this.currentTop=document.documentElement.scrollTop||document.body.scrollTop,this.left>this.clientWidth/2?this.left=this.clientWidth+this.floatDrag.offsetWidth:this.left=-this.floatDrag.offsetWidth},handleScrollEnd(){(document.documentElement.scrollTop||document.body.scrollTop)===this.currentTop&&(this.left>this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,clearTimeout(this.timer))},handleResize(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight,this.$nextTick(this.checkDraggablePosition)},initDraggable(){this.floatDrag.addEventListener("touchstart",this.toucheStart),this.floatDrag.addEventListener("touchmove",this.touchMove),this.floatDrag.addEventListener("touchend",this.touchEnd)},mouseDown(t){this.record={time:new Date().getTime(),top:this.floatDrag.offsetTop,left:this.floatDrag.offsetLeft,x:t.clientX-this.floatDrag.offsetLeft,y:t.clientY-this.floatDrag.offsetTop},this.floatDrag.style.transition="none",this.canClick=!1,document.onmousemove=i=>{let e=i.clientX-this.record.x,a=i.clientY-this.record.y;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),a<0?a=0:a>window.innerHeight-this.floatDrag.offsetHeight&&(a=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=a},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,this.checkDraggablePosition(),this.floatDrag.style.transition="all 0.3s",(Math.abs(this.record.top-this.floatDrag.offsetTop)<5&&Math.abs(this.record.left-this.floatDrag.offsetLeft)<5||new Date().getTime()-this.record.time<200)&&this.$emit("on-click")}},toucheStart(){this.canClick=!1,this.floatDrag.style.transition="none"},touchMove(t){if(this.canClick=!0,t.targetTouches.length===1){let i=event.targetTouches[0],e=i.clientX-this.floatDrag.offsetWidth/2,a=i.clientY-this.floatDrag.offsetHeight/2;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),a<0?a=0:a>window.innerHeight-this.floatDrag.offsetHeight&&(a=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=a}},touchEnd(){!this.canClick||(this.floatDrag.style.transition="all 0.3s",this.checkDraggablePosition())},checkDraggablePosition(){this.left+this.floatDrag.offsetWidth/2>=this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,this.top<0&&(this.top=0),this.top+this.floatDrag.offsetHeight>=this.clientHeight&&(this.top=this.clientHeight-this.floatDrag.offsetHeight)}}},n={};var D=s(y,v,k,!1,_,null,null,null);function _(t){for(let i in n)this[i]=n[i]}var $=function(){return D.exports}(),b=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"meeting-warp"},[e("Modal",{attrs:{title:t.$L(t.addData.type==="join"?"\u52A0\u5165\u4F1A\u8BAE":"\u65B0\u4F1A\u8BAE"),"mask-closable":!1,closable:!t.addData.sharekey},model:{value:t.addShow,callback:function(a){t.addShow=a},expression:"addShow"}},[e("Form",{ref:"addForm",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[t.addData.type==="join"?[t.addData.name?e("FormItem",{attrs:{prop:"userids",label:t.$L("\u4F1A\u8BAE\u4E3B\u9898")}},[e("Input",{attrs:{disabled:""},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}})],1):t._e(),t.addData.sharekey?e("FormItem",{attrs:{prop:"username",label:t.$L("\u4F60\u7684\u59D3\u540D")}},[e("Input",{attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u4F60\u7684\u59D3\u540D")},model:{value:t.addData.username,callback:function(a){t.$set(t.addData,"username",a)},expression:"addData.username"}})],1):t._e(),e("FormItem",{attrs:{prop:"meetingid",label:t.$L("\u4F1A\u8BAE\u9891\u9053ID")}},[e("Input",{attrs:{disabled:t.addData.meetingdisabled===!0,placeholder:t.$L("\u8BF7\u8F93\u5165\u4F1A\u8BAE\u9891\u9053ID")},model:{value:t.addData.meetingid,callback:function(a){t.$set(t.addData,"meetingid",a)},expression:"addData.meetingid"}})],1)]:[e("FormItem",{attrs:{prop:"name",label:t.$L("\u4F1A\u8BAE\u4E3B\u9898")}},[e("Input",{attrs:{maxlength:50,placeholder:t.$L("\u9009\u586B")},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}})],1),e("FormItem",{attrs:{prop:"userids",label:t.$L("\u9080\u8BF7\u6210\u5458")}},[e("UserSelect",{attrs:{uncancelable:[t.userId],"multiple-max":20,title:t.$L("\u9009\u62E9\u9080\u8BF7\u6210\u5458")},model:{value:t.addData.userids,callback:function(a){t.$set(t.addData,"userids",a)},expression:"addData.userids"}})],1)],e("FormItem",{attrs:{prop:"tracks"}},[e("CheckboxGroup",{model:{value:t.addData.tracks,callback:function(a){t.$set(t.addData,"tracks",a)},expression:"addData.tracks"}},[e("Checkbox",{attrs:{label:"audio"}},[e("span",[t._v(t._s(t.$L("\u9EA6\u514B\u98CE")))])]),e("Checkbox",{attrs:{label:"video"}},[e("span",[t._v(t._s(t.$L("\u6444\u50CF\u5934")))])])],1)],1)],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t.addData.sharekey?t._e():e("Button",{attrs:{type:"default"},on:{click:function(a){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onSubmit}},[t._v(t._s(t.$L(t.addData.type==="join"?"\u52A0\u5165\u4F1A\u8BAE":"\u5F00\u59CB\u4F1A\u8BAE")))])],1)],1),e("Modal",{ref:"meetingModal",attrs:{title:t.addData.name,mask:!1,"mask-closable":!1,closable:!1,"transition-names":["",""],beforeClose:t.onClose,"class-name":`meeting-manager${t.meetingMini?" meeting-hidden":""}`,fullscreen:""},model:{value:t.meetingShow,callback:function(a){t.meetingShow=a},expression:"meetingShow"}},[e("ul",[t.localUser.uid?e("li",[e("MeetingPlayer",{attrs:{player:t.localUser,isLocal:""}})],1):t._e(),t._l(t.remoteUsers,function(a){return e("li",[e("MeetingPlayer",{attrs:{player:a}})],1)})],2),e("div",{staticClass:"adaption meeting-button-group",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",loading:t.audioLoad},on:{click:t.onAudio}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.audioTrack?"":"")}})]),e("Button",{attrs:{type:"primary",loading:t.videoLoad},on:{click:t.onVideo}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.videoTrack?"":"")}})]),t.windowPortrait?[e("Button",{attrs:{type:"primary",loading:t.linkCopyLoad},on:{click:function(a){return t.onInvitation("open")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE646")])]),t.addData.sharekey?t._e():e("Button",{attrs:{type:"primary"},on:{click:function(a){t.meetingMini=!0}}},[e("i",{staticClass:"taskfont"},[t._v("\uE656")])]),e("Button",{attrs:{type:"warning",loading:t.loadIng>0},on:{click:t.onClose}},[e("i",{staticClass:"taskfont"},[t._v("\uE612")])])]:[e("Button",{attrs:{type:"primary"},on:{click:function(a){return t.onInvitation("open")}}},[t._v(t._s(t.$L("\u9080\u8BF7")))]),t.addData.sharekey?t._e():e("Button",{attrs:{type:"primary"},on:{click:function(a){t.meetingMini=!0}}},[t._v(t._s(t.$L("\u6700\u5C0F\u5316")))]),e("Button",{attrs:{type:"warning",loading:t.loadIng>0},on:{click:t.onClose}},[t._v(t._s(t.$L("\u79BB\u5F00\u4F1A\u8BAE")))])]],2)]),t.meetingMini?e("DragBallComponent",{attrs:{id:"meetingDragBall","z-index":3e3},on:{"on-click":function(a){t.meetingMini=!1}}},[e("div",{staticClass:"meeting-drag-ball"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.audioTrack?"":"")}}),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.localUser.videoTrack?"":"")}}),e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u4E2D")))])])]):t._e(),e("Modal",{attrs:{title:t.$L("\u9080\u8BF7\u52A0\u5165"),"mask-closable":!1},model:{value:t.invitationShow,callback:function(a){t.invitationShow=a},expression:"invitationShow"}},[e("Form",{ref:"invitationForm",attrs:{model:t.invitationData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u9080\u8BF7\u6210\u5458")}},[e("UserSelect",{attrs:{"multiple-max":20,title:t.$L("\u9009\u62E9\u9080\u8BF7\u6210\u5458")},model:{value:t.invitationData.userids,callback:function(a){t.$set(t.invitationData,"userids",a)},expression:"invitationData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default",loading:t.linkCopyLoad},on:{click:t.linkCopy}},[t._v(t._s(t.$L("\u590D\u5236\u94FE\u63A5")))]),e("Button",{attrs:{type:"primary",loading:t.invitationLoad},on:{click:function(a){return t.onInvitation("submit")}}},[t._v(t._s(t.$L("\u53D1\u9001\u9080\u8BF7")))])],1)],1)],1)},w=[];const T={name:"MeetingManager",components:{UserSelect:h,DragBallComponent:$,MeetingPlayer:p},props:{id:{type:String,default:()=>"meeting-player-"+Math.round(Math.random()*1e4)}},data(){return{loadIng:0,subscribe:null,addShow:!1,addData:{userids:[],tracks:["audio"]},addRule:{username:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u4F60\u7684\u59D3\u540D\uFF01"),trigger:"change"}]},invitationShow:!1,invitationLoad:!1,invitationData:{userids:[]},meetingShow:!1,meetingMini:!1,audioLoad:!1,videoLoad:!1,agoraClient:null,remoteUsers:[],localUser:{uid:null,audioTrack:null,videoTrack:null},linkCopyLoad:!1}},computed:{...l(["meetingWindow"])},mounted(){this.subscribe=d.Store.subscribe("addMeeting",this.onAdd)},beforeDestroy(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},watch:{meetingMini(t){t||(this.$refs.meetingModal.modalIndex=this.$refs.meetingModal.handleGetModalIndex())},meetingWindow:{handler(t){switch(t.type){case"add":this.addShow=t.show,this.loadIng=0;break;case"join":this.addShow=t.show,this.loadIng=0,this.addData.type="join",t.meetingSharekey&&(this.addData.sharekey=t.meetingSharekey,this.addData.meetingid=t.meetingid||"",this.addData.meetingdisabled=!!t.meetingSharekey);break;case"invitation":this.invitationShow=t.show,this.invitationLoad=!1,this.invitationData.meetingid=t.meetingid;break;case"error":this.addShow=t.show,this.loadIng=0,this.invitationShow=t.show,this.invitationLoad=!1,$A.modalError("\u52A0\u5165\u4F1A\u8BAE\u5931\u8D25");break}},immediate:!0}},methods:{onAdd(t){t=$A.isJson(t)?t:{},/^\d+$/.test(t.dialog_id)&&(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:t.dialog_id}}).then(({data:i})=>{this.$set(this.addData,"userids",i.map(e=>e.userid))}).finally(i=>{this.loadIng--}),delete t.dialog_id),$A.isArray(t.userids)?t.userids.includes(this.userId)||t.userids.push(this.userId):t.userids=[this.userId],$A.isArray(t.tracks)?t.tracks.includes("audio")||t.tracks.push("audio"):t.tracks=["audio"],this.addData=t,this.addShow=!0},onSubmit(){if(this.meetingShow){$A.modalWarning("\u6B63\u5728\u4F1A\u8BAE\u4E2D\uFF0C\u65E0\u6CD5\u8FDB\u5165\u5176\u4ED6\u4F1A\u8BAE\u5BA4");return}this.$refs.addForm.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/meeting/open",data:this.addData}).then(({data:i})=>{this.$set(this.addData,"name",i.name),this.$set(this.addData,"meetingid",i.meetingid),this.$set(this.localUser,"nickname",i.nickname),this.$set(this.localUser,"userimg",i.userimg),this.$store.dispatch("saveDialogMsg",i.msgs),this.$store.dispatch("updateDialogLastMsg",i.msgs),delete i.name,delete i.msgs,$A.isEEUiApp?$A.eeuiAppSendMessage({action:"startMeeting",meetingParams:{name:this.addData.name,token:i.token,channel:i.channel,uuid:i.uid,appid:i.appid,avatar:i.userimg,username:i.nickname,video:this.addData.tracks.includes("video"),audio:this.addData.tracks.includes("audio"),meetingid:i.meetingid,sharelink:i.sharelink,alert:{title:this.$L("\u6E29\u99A8\u63D0\u793A"),message:this.$L("\u786E\u5B9A\u8981\u79BB\u5F00\u4F1A\u8BAE\u5417\uFF1F"),cancel:this.$L("\u7EE7\u7EED"),confirm:this.$L("\u9000\u51FA")}}}):$A.loadScript("js/AgoraRTC_N-4.17.0.js").then(e=>{this.join(i)}).catch(e=>{$A.modalError("\u4F1A\u8BAE\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")}).finally(e=>{this.loadIng--})}).catch(({msg:i})=>{this.loadIng--,$A.modalError(i)}))})},onAudio(){this.localUser.audioTrack?this.closeAudio():this.openAudio()},onVideo(){this.localUser.videoTrack?this.closeVideo():this.openVideo()},onInvitation(t){if(t==="open"){if(this.addData.sharekey){this.linkCopy();return}this.invitationData={userids:[],meetingid:this.addData.meetingid},this.invitationShow=!0}else t==="submit"&&(this.invitationLoad=!0,this.$store.dispatch("call",{url:"users/meeting/invitation",data:this.invitationData}).then(({data:i,msg:e})=>{this.invitationShow=!1,this.$store.dispatch("saveDialogMsg",i.msgs),this.$store.dispatch("updateDialogLastMsg",i.msgs),$A.messageSuccess(e)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.invitationLoad=!1}))},onClose(){return new Promise(t=>{$A.modalConfirm({content:"\u786E\u5B9A\u8981\u79BB\u5F00\u4F1A\u8BAE\u5417\uFF1F",cancelText:"\u7EE7\u7EED",okText:"\u9000\u51FA",onOk:async i=>{await this.leave(),this.addData.sharekey&&(this.addShow=!0,this.loadIng=0),t()}})})},async join(t){this.loadIng++,AgoraRTC.onMicrophoneChanged=async e=>{if(e.state==="ACTIVE")this.localUser.audioTrack.setDevice(e.device.deviceId);else if(e.device.label===this.localUser.audioTrack.getTrackLabel()){const a=await AgoraRTC.getMicrophones();a[0]&&this.localUser.audioTrack.setDevice(a[0].deviceId)}},AgoraRTC.onCameraChanged=async e=>{if(e.state==="ACTIVE")this.localUser.videoTrack.setDevice(e.device.deviceId);else if(e.device.label===this.localUser.videoTrack.getTrackLabel()){const a=await AgoraRTC.getCameras();a[0]&&this.localUser.videoTrack.setDevice(a[0].deviceId)}},AgoraRTC.onAutoplayFailed=()=>{$A.messageWarning("\u70B9\u51FB\u5C4F\u5E55\u5F00\u59CB\u4F1A\u8BAE")},this.agoraClient=AgoraRTC.createClient({mode:"rtc",codec:"vp8"}),this.agoraClient.on("user-joined",this.handleUserJoined),this.agoraClient.on("user-left",this.handleUserLeft),this.agoraClient.on("user-published",this.handleUserPublished),this.agoraClient.on("user-unpublished",this.handleUserUnpublished);const i=[];try{this.localUser.uid=await this.agoraClient.join(t.appid,t.channel,t.token,t.uid),this.addData.tracks.includes("audio")&&i.push(this.localUser.audioTrack=await AgoraRTC.createMicrophoneAudioTrack()),this.addData.tracks.includes("video")&&i.push(this.localUser.videoTrack=await AgoraRTC.createCameraVideoTrack()),i.length>0&&await this.agoraClient.publish(i),this.meetingShow=!0}catch(e){console.error(e),$A.modalError("\u4F1A\u8BAE\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")}this.loadIng--,this.addShow=!1},async leave(){this.loadIng++,["audioTrack","videoTrack"].some(t=>{var i,e;(i=this.localUser[t])==null||i.stop(),(e=this.localUser[t])==null||e.close()}),this.localUser={uid:null,audioTrack:null,videoTrack:null},this.remoteUsers=[],await this.agoraClient.leave(),this.loadIng--,this.meetingShow=!1},async openAudio(){this.audioLoad||this.localUser.audioTrack||(this.audioLoad=!0,this.localUser.audioTrack=await AgoraRTC.createMicrophoneAudioTrack(),await this.agoraClient.publish([this.localUser.audioTrack]),this.audioLoad=!1)},async closeAudio(){this.audioLoad||!this.localUser.audioTrack||(this.audioLoad=!0,await this.agoraClient.unpublish([this.localUser.audioTrack]),this.localUser.audioTrack.stop(),this.localUser.audioTrack.close(),this.localUser.audioTrack=null,this.audioLoad=!1)},async openVideo(){this.videoLoad||this.localUser.videoTrack||(this.videoLoad=!0,this.localUser.videoTrack=await AgoraRTC.createCameraVideoTrack(),await this.agoraClient.publish([this.localUser.videoTrack]),this.videoLoad=!1)},async closeVideo(){this.videoLoad||!this.localUser.videoTrack||(this.videoLoad=!0,await this.agoraClient.unpublish([this.localUser.videoTrack]),this.localUser.videoTrack.stop(),this.localUser.videoTrack.close(),this.localUser.videoTrack=null,this.videoLoad=!1)},async handleUserJoined(t){const i=this.remoteUsers.findIndex(e=>e.uid==t.uid);i>-1?this.remoteUsers.splice(i,1,t):this.remoteUsers.push(t)},async handleUserLeft(t){const i=this.remoteUsers.findIndex(e=>e.uid==t.uid);i>-1&&this.remoteUsers.splice(i,1)},async handleUserPublished(t,i){this.remoteUsers.find(a=>a.uid==t.uid)&&await this.agoraClient.subscribe(t,i)},async handleUserUnpublished(t,i){this.remoteUsers.find(a=>a.uid==t.uid)&&await this.agoraClient.unsubscribe(t,i)},linkCopy(){this.linkCopyLoad=!0,this.$store.dispatch("call",{url:"users/meeting/link",data:{meetingid:this.addData.meetingid||this.invitationData.meetingid,sharekey:this.addData.sharekey}}).then(({data:t})=>{this.$copyText(t).then(i=>{$A.messageSuccess("\u5DF2\u590D\u5236\u4F1A\u8BAE\u9080\u8BF7\u94FE\u63A5")}).catch(i=>{$A.messageError("\u590D\u5236\u5931\u8D25")}),this.invitationShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.linkCopyLoad=!1})}}},r={};var C=s(T,b,w,!1,L,null,null,null);function L(t){for(let i in r)this[i]=r[i]}var I=function(){return C.exports}();export{I as M}; diff --git a/public/js/build/MicroApps.56fd4f5e.js b/public/js/build/MicroApps.10c19f02.js similarity index 94% rename from public/js/build/MicroApps.56fd4f5e.js rename to public/js/build/MicroApps.10c19f02.js index 04f58f9b1..9a1e0f2f2 100644 --- a/public/js/build/MicroApps.56fd4f5e.js +++ b/public/js/build/MicroApps.10c19f02.js @@ -1 +1 @@ -import{u as i,m as r,V as s,s as p,i as o,d as l,l as h,E as d,n as u}from"./app.6c8b31b1.js";import{D as m}from"./DialogWrapper.5fcf71c2.js";import{U as c}from"./UserSelect.d62f565b.js";var f=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("div",{staticClass:"page-microapp"},[a.showSpin?t("transition",{attrs:{name:"microapp-load"}},[t("div",{staticClass:"microapp-load"},[t("Loading")],1)]):a._e(),a.url&&!a.loading?t("micro-app",{attrs:{name:a.name,url:a.url,inline:"","keep-alive":"",disableSandbox:"",data:a.appData},on:{created:a.handleCreate,beforemount:a.handleBeforeMount,mounted:a.handleMount,unmount:a.handleUnmount,error:a.handleError,datachange:a.handleDataChange}}):a._e()],1)},g=[];const v={name:"MicroApps",props:{name:{type:String,default:"micro-app"},url:{type:String,default:""},path:{type:String,default:""},datas:{type:Object,default:()=>{}}},data(){return{showSpin:!1,loading:!1,appUrl:"",appData:{}}},deactivated(){},mounted(){this.showSpin=!0,this.appData=this.getAppData},watch:{loading(a){a&&(this.showSpin=!0)},url(a){this.loading=!0,this.$nextTick(()=>{this.loading=!1;let e=$A.apiUrl(a);e.indexOf("http")==-1&&(e=window.location.origin+e),this.appUrl={}.VITE_OKR_WEB_URL||e})},path(a){this.appData={path:a}},datas:{handler(a){this.appData=a},deep:!0},$route:{handler(a){a.name=="manage-apps"&&(this.appData={path:a.hash||a.fullPath})},immediate:!0},userToken(a){this.appData=this.getAppData,a?this.loading=!1:(i({destroy:!0}),this.loading=!0)}},computed:{...r(["userInfo","themeMode"]),getAppData(){return{type:"init",url:this.url,vues:{Vue:s,store:p,components:{DialogWrapper:m,UserSelect:c,DatePicker:o.exports.DatePicker}},theme:this.themeMode,languages:{languageList:l,languageType:h},userInfo:this.userInfo,path:this.path}}},methods:{handleCreate(a){window.eventCenterForAppNameVite=new d(a.detail.name),this.appData=this.getAppData,this.showSpin=!window["eventCenterForAppNameViteLoad-"+a.detail.name]},handleBeforeMount(a){window["eventCenterForAppNameViteLoad-"+a.detail.name]=1},handleMount(a){this.datas&&(this.appData=this.datas),this.path&&(this.appData.path=this.path),this.showSpin=!1},handleUnmount(a){window.dispatchEvent(new Event("apps-unmount"))},handleError(a){console.error("\u5B50\u5E94\u7528\u52A0\u8F7D\u51FA\u9519\u4E86",a.detail.error)},handleDataChange(a){}}},n={};var _=u(v,f,g,!1,w,null,null,null);function w(a){for(let e in n)this[e]=n[e]}var C=function(){return _.exports}();export{C as M}; +import{u as i,m as r,V as s,s as p,i as o,d as l,l as h,E as d,n as u}from"./app.6910ca56.js";import{D as m}from"./DialogWrapper.54a1354f.js";import{U as c}from"./UserSelect.1938cd94.js";var f=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("div",{staticClass:"page-microapp"},[a.showSpin?t("transition",{attrs:{name:"microapp-load"}},[t("div",{staticClass:"microapp-load"},[t("Loading")],1)]):a._e(),a.url&&!a.loading?t("micro-app",{attrs:{name:a.name,url:a.url,inline:"","keep-alive":"",disableSandbox:"",data:a.appData},on:{created:a.handleCreate,beforemount:a.handleBeforeMount,mounted:a.handleMount,unmount:a.handleUnmount,error:a.handleError,datachange:a.handleDataChange}}):a._e()],1)},g=[];const v={name:"MicroApps",props:{name:{type:String,default:"micro-app"},url:{type:String,default:""},path:{type:String,default:""},datas:{type:Object,default:()=>{}}},data(){return{showSpin:!1,loading:!1,appUrl:"",appData:{}}},deactivated(){},mounted(){this.showSpin=!0,this.appData=this.getAppData},watch:{loading(a){a&&(this.showSpin=!0)},url(a){this.loading=!0,this.$nextTick(()=>{this.loading=!1;let e=$A.apiUrl(a);e.indexOf("http")==-1&&(e=window.location.origin+e),this.appUrl={}.VITE_OKR_WEB_URL||e})},path(a){this.appData={path:a}},datas:{handler(a){this.appData=a},deep:!0},$route:{handler(a){a.name=="manage-apps"&&(this.appData={path:a.hash||a.fullPath})},immediate:!0},userToken(a){this.appData=this.getAppData,a?this.loading=!1:(i({destroy:!0}),this.loading=!0)}},computed:{...r(["userInfo","themeMode"]),getAppData(){return{type:"init",url:this.url,vues:{Vue:s,store:p,components:{DialogWrapper:m,UserSelect:c,DatePicker:o.exports.DatePicker}},theme:this.themeMode,languages:{languageList:l,languageType:h},userInfo:this.userInfo,path:this.path}}},methods:{handleCreate(a){window.eventCenterForAppNameVite=new d(a.detail.name),this.appData=this.getAppData,this.showSpin=!window["eventCenterForAppNameViteLoad-"+a.detail.name]},handleBeforeMount(a){window["eventCenterForAppNameViteLoad-"+a.detail.name]=1},handleMount(a){this.datas&&(this.appData=this.datas),this.path&&(this.appData.path=this.path),this.showSpin=!1},handleUnmount(a){window.dispatchEvent(new Event("apps-unmount"))},handleError(a){console.error("\u5B50\u5E94\u7528\u52A0\u8F7D\u51FA\u9519\u4E86",a.detail.error)},handleDataChange(a){}}},n={};var _=u(v,f,g,!1,w,null,null,null);function w(a){for(let e in n)this[e]=n[e]}var C=function(){return _.exports}();export{C as M}; diff --git a/public/js/build/Minder.37c15ccd.js b/public/js/build/Minder.c159d06d.js similarity index 98% rename from public/js/build/Minder.37c15ccd.js rename to public/js/build/Minder.c159d06d.js index d028df916..d9d9e051a 100644 --- a/public/js/build/Minder.37c15ccd.js +++ b/public/js/build/Minder.c159d06d.js @@ -1 +1 @@ -import{I as o}from"./IFrame.364b588a.js";import{n as s}from"./app.6c8b31b1.js";var c=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"minder-editor-container"},[t("div",{staticClass:"quickbar"},[t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u7F29\u653E")}},[e._v("\uE7B3")])]),t("div",{staticClass:"minder-editor-slider",attrs:{slot:"content"},slot:"content"},[t("Slider",{attrs:{min:10,max:300},model:{value:e.zoom,callback:function(n){e.zoom=n},expression:"zoom"}})],1)]),e.readOnly!==!0?t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u56FE\u5F62")}},[e._v("\uE621")])]),t("div",{attrs:{slot:"content"},slot:"content"},[t("ul",{staticClass:"minder-editor-quickul mold"},[t("li",{on:{click:function(n){return e.execCommand("template","default")}}},[t("span",{staticClass:"default"})]),t("li",{on:{click:function(n){return e.execCommand("template","structure")}}},[t("span",{staticClass:"structure"})]),t("li",{on:{click:function(n){return e.execCommand("template","filetree")}}},[t("span",{staticClass:"filetree"})]),t("li",{on:{click:function(n){return e.execCommand("template","right")}}},[t("span",{staticClass:"right"})]),t("li",{on:{click:function(n){return e.execCommand("template","fish-bone")}}},[t("span",{staticClass:"fish-bone"})]),t("li",{on:{click:function(n){return e.execCommand("template","tianpan")}}},[t("span",{staticClass:"tianpan"})])])])]):e._e(),e.readOnly!==!0?t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u6837\u5F0F")}},[e._v("\uE678")])]),t("div",{attrs:{slot:"content"},slot:"content"},[t("ul",{staticClass:"minder-editor-quickul"},[t("li",{on:{click:function(n){return e.execCommand("theme","fresh-blue")}}},[e._v(e._s(e.$L("\u5929\u7A7A\u84DD")))]),t("li",{on:{click:function(n){return e.execCommand("theme","wire")}}},[e._v(e._s(e.$L("\u7EBF\u6846")))]),t("li",{on:{click:function(n){return e.execCommand("theme","fish")}}},[e._v(e._s(e.$L("\u9C7C\u9AA8\u56FE")))]),t("li",{on:{click:function(n){return e.execCommand("theme","classic")}}},[e._v(e._s(e.$L("\u8111\u56FE\u7ECF\u5178")))]),t("li",{on:{click:function(n){return e.execCommand("theme","classic-compact")}}},[e._v(e._s(e.$L("\u7D27\u51D1\u7ECF\u5178")))]),t("li",{on:{click:function(n){return e.execCommand("theme","snow")}}},[e._v(e._s(e.$L("\u6E29\u67D4\u51B7\u5149")))]),t("li",{on:{click:function(n){return e.execCommand("theme","snow-compact")}}},[e._v(e._s(e.$L("\u7D27\u51D1\u51B7\u5149")))]),t("li",{on:{click:function(n){return e.execCommand("theme","tianpan")}}},[e._v(e._s(e.$L("\u7ECF\u5178\u5929\u76D8")))]),t("li",{on:{click:function(n){return e.execCommand("theme","tianpan-compact")}}},[e._v(e._s(e.$L("\u7D27\u51D1\u5929\u76D8")))])])])]):e._e(),t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u6298\u53E0")}},[e._v("\uE779")])]),t("div",{attrs:{slot:"content"},slot:"content"},[t("ul",{staticClass:"minder-editor-quickul"},[t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",1)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E00\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",2)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E8C\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",3)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E09\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",4)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u56DB\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",5)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E94\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",99)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5168\u90E8\u8282\u70B9")))])])])]),t("ETooltip",{attrs:{placement:"top",content:e.$L("\u5C45\u4E2D")}},[t("div",{on:{click:function(n){return e.execCommand("goCenter")}}},[t("i",{staticClass:"ft icon"},[e._v("\uE61F")])])]),t("ETooltip",{attrs:{placement:"top",content:e.$L("\u79FB\u52A8")}},[t("div",{on:{click:e.onHand}},[t("i",{staticClass:"ft icon",class:{active:e.isHand}},[e._v("\uE6CF")])])])],1),t("div",{staticClass:"minder-content"},[t("IFrame",{ref:"frame",staticClass:"minder-iframe",attrs:{src:e.url},on:{"on-message":e.onMessage}}),e.loadIng?t("div",{staticClass:"minder-loading"},[t("Loading")],1):e._e()],1)])},r=[];const l={name:"mind-editor",components:{IFrame:o},props:{value:{default:function(){return{}}},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,isHand:this.readOnly,zoom:100,backup:null}},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},methods:{onMessage(e){if(e.app==="minder")switch(e.action){case"ready":this.loadIng=!1,this.rendData();break;case"content":this.backup=JSON.stringify(e.content),this.$emit("input",e.content);break;case"save":this.$emit("saveData");break}},onHand(){if(this.readOnly){this.execCommand("removeAllSelected");return}this.execCommand("Hand"),this.isHand=!this.isHand},execCommand(e,i){this.$refs.frame.postMessage({app:"minder",action:"command",command:e,value:i}),!(e==="goCenter"||e==="removeAllSelected")&&setTimeout(t=>{this.isHand&&this.$refs.frame.postMessage({app:"minder",action:"commandAlways",command:"Hand",value:i})},300)},exportHandle(e,i){this.$refs.frame.postMessage({app:"minder",action:"export",type:e,name:i||this.value.root.data.text||this.$L("\u65E0\u6807\u9898")})},rendData(){this.loadIng||this.backup!==JSON.stringify(this.value)&&this.$refs.frame.postMessage({app:"minder",action:"setContent",content:this.value})}},computed:{url(){return $A.apiUrl(`../minder/index.html?type=manual&readonly=${this.readOnly?"yes":"no"}`)}},watch:{value:{handler:function(e){(typeof e!="object"||e===null)&&(e={root:e,theme:"fresh-blue",template:"default"}),(typeof e.root!="object"||e.root===null||e.root.length==0)&&(e.root={data:{id:$A.randomString(12),text:this.$L("\u9ED8\u8BA4\u8282\u70B9")},children:[]}),typeof e.theme!="string"&&(e.theme="fresh-blue"),typeof e.template!="string"&&(e.template="default"),this.rendData()},deep:!0,immediate:!0},zoom(e){this.execCommand("Zoom",e)}}},a={};var m=s(l,c,r,!1,d,"5254ad54",null,null);function d(e){for(let i in a)this[i]=a[i]}var v=function(){return m.exports}();export{v as default}; +import{I as o}from"./IFrame.1fc38451.js";import{n as s}from"./app.6910ca56.js";var c=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"minder-editor-container"},[t("div",{staticClass:"quickbar"},[t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u7F29\u653E")}},[e._v("\uE7B3")])]),t("div",{staticClass:"minder-editor-slider",attrs:{slot:"content"},slot:"content"},[t("Slider",{attrs:{min:10,max:300},model:{value:e.zoom,callback:function(n){e.zoom=n},expression:"zoom"}})],1)]),e.readOnly!==!0?t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u56FE\u5F62")}},[e._v("\uE621")])]),t("div",{attrs:{slot:"content"},slot:"content"},[t("ul",{staticClass:"minder-editor-quickul mold"},[t("li",{on:{click:function(n){return e.execCommand("template","default")}}},[t("span",{staticClass:"default"})]),t("li",{on:{click:function(n){return e.execCommand("template","structure")}}},[t("span",{staticClass:"structure"})]),t("li",{on:{click:function(n){return e.execCommand("template","filetree")}}},[t("span",{staticClass:"filetree"})]),t("li",{on:{click:function(n){return e.execCommand("template","right")}}},[t("span",{staticClass:"right"})]),t("li",{on:{click:function(n){return e.execCommand("template","fish-bone")}}},[t("span",{staticClass:"fish-bone"})]),t("li",{on:{click:function(n){return e.execCommand("template","tianpan")}}},[t("span",{staticClass:"tianpan"})])])])]):e._e(),e.readOnly!==!0?t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u6837\u5F0F")}},[e._v("\uE678")])]),t("div",{attrs:{slot:"content"},slot:"content"},[t("ul",{staticClass:"minder-editor-quickul"},[t("li",{on:{click:function(n){return e.execCommand("theme","fresh-blue")}}},[e._v(e._s(e.$L("\u5929\u7A7A\u84DD")))]),t("li",{on:{click:function(n){return e.execCommand("theme","wire")}}},[e._v(e._s(e.$L("\u7EBF\u6846")))]),t("li",{on:{click:function(n){return e.execCommand("theme","fish")}}},[e._v(e._s(e.$L("\u9C7C\u9AA8\u56FE")))]),t("li",{on:{click:function(n){return e.execCommand("theme","classic")}}},[e._v(e._s(e.$L("\u8111\u56FE\u7ECF\u5178")))]),t("li",{on:{click:function(n){return e.execCommand("theme","classic-compact")}}},[e._v(e._s(e.$L("\u7D27\u51D1\u7ECF\u5178")))]),t("li",{on:{click:function(n){return e.execCommand("theme","snow")}}},[e._v(e._s(e.$L("\u6E29\u67D4\u51B7\u5149")))]),t("li",{on:{click:function(n){return e.execCommand("theme","snow-compact")}}},[e._v(e._s(e.$L("\u7D27\u51D1\u51B7\u5149")))]),t("li",{on:{click:function(n){return e.execCommand("theme","tianpan")}}},[e._v(e._s(e.$L("\u7ECF\u5178\u5929\u76D8")))]),t("li",{on:{click:function(n){return e.execCommand("theme","tianpan-compact")}}},[e._v(e._s(e.$L("\u7D27\u51D1\u5929\u76D8")))])])])]):e._e(),t("ETooltip",{attrs:{placement:"top",effect:"light"}},[t("div",[t("i",{staticClass:"ft icon",attrs:{title:e.$L("\u6298\u53E0")}},[e._v("\uE779")])]),t("div",{attrs:{slot:"content"},slot:"content"},[t("ul",{staticClass:"minder-editor-quickul"},[t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",1)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E00\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",2)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E8C\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",3)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E09\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",4)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u56DB\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",5)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5230\u4E94\u7EA7\u8282\u70B9")))]),t("li",{on:{click:function(n){return e.execCommand("ExpandToLevel",99)}}},[e._v(e._s(e.$L("\u5C55\u5F00\u5168\u90E8\u8282\u70B9")))])])])]),t("ETooltip",{attrs:{placement:"top",content:e.$L("\u5C45\u4E2D")}},[t("div",{on:{click:function(n){return e.execCommand("goCenter")}}},[t("i",{staticClass:"ft icon"},[e._v("\uE61F")])])]),t("ETooltip",{attrs:{placement:"top",content:e.$L("\u79FB\u52A8")}},[t("div",{on:{click:e.onHand}},[t("i",{staticClass:"ft icon",class:{active:e.isHand}},[e._v("\uE6CF")])])])],1),t("div",{staticClass:"minder-content"},[t("IFrame",{ref:"frame",staticClass:"minder-iframe",attrs:{src:e.url},on:{"on-message":e.onMessage}}),e.loadIng?t("div",{staticClass:"minder-loading"},[t("Loading")],1):e._e()],1)])},r=[];const l={name:"mind-editor",components:{IFrame:o},props:{value:{default:function(){return{}}},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,isHand:this.readOnly,zoom:100,backup:null}},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},methods:{onMessage(e){if(e.app==="minder")switch(e.action){case"ready":this.loadIng=!1,this.rendData();break;case"content":this.backup=JSON.stringify(e.content),this.$emit("input",e.content);break;case"save":this.$emit("saveData");break}},onHand(){if(this.readOnly){this.execCommand("removeAllSelected");return}this.execCommand("Hand"),this.isHand=!this.isHand},execCommand(e,i){this.$refs.frame.postMessage({app:"minder",action:"command",command:e,value:i}),!(e==="goCenter"||e==="removeAllSelected")&&setTimeout(t=>{this.isHand&&this.$refs.frame.postMessage({app:"minder",action:"commandAlways",command:"Hand",value:i})},300)},exportHandle(e,i){this.$refs.frame.postMessage({app:"minder",action:"export",type:e,name:i||this.value.root.data.text||this.$L("\u65E0\u6807\u9898")})},rendData(){this.loadIng||this.backup!==JSON.stringify(this.value)&&this.$refs.frame.postMessage({app:"minder",action:"setContent",content:this.value})}},computed:{url(){return $A.apiUrl(`../minder/index.html?type=manual&readonly=${this.readOnly?"yes":"no"}`)}},watch:{value:{handler:function(e){(typeof e!="object"||e===null)&&(e={root:e,theme:"fresh-blue",template:"default"}),(typeof e.root!="object"||e.root===null||e.root.length==0)&&(e.root={data:{id:$A.randomString(12),text:this.$L("\u9ED8\u8BA4\u8282\u70B9")},children:[]}),typeof e.theme!="string"&&(e.theme="fresh-blue"),typeof e.template!="string"&&(e.template="default"),this.rendData()},deep:!0,immediate:!0},zoom(e){this.execCommand("Zoom",e)}}},a={};var m=s(l,c,r,!1,d,"5254ad54",null,null);function d(e){for(let i in a)this[i]=a[i]}var v=function(){return m.exports}();export{v as default}; diff --git a/public/js/build/OnlyOffice.3b8ff0fe.js b/public/js/build/OnlyOffice.8a3b23b9.js similarity index 96% rename from public/js/build/OnlyOffice.3b8ff0fe.js rename to public/js/build/OnlyOffice.8a3b23b9.js index bbaff8640..650594063 100644 --- a/public/js/build/OnlyOffice.3b8ff0fe.js +++ b/public/js/build/OnlyOffice.8a3b23b9.js @@ -1 +1 @@ -import{m as f,n as c,l}from"./app.6c8b31b1.js";import{I as h}from"./IFrame.364b588a.js";var u=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-only-office"},[e.$A.isDesktop()?[e.loadError?i("Alert",{staticClass:"load-error",attrs:{type:"error","show-icon":""}},[e._v(e._s(e.$L("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")))]):e._e(),i("div",{staticClass:"placeholder",attrs:{id:e.id}})]:i("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}),e.loading?i("div",{staticClass:"office-loading"},[i("Loading")],1):e._e()],2)},m=[];const p={name:"OnlyOffice",components:{IFrame:h},props:{id:{type:String,default:()=>"office_"+Math.round(Math.random()*1e4)},code:{type:String,default:""},historyId:{type:Number,default:0},value:{type:[Object,Array],default:function(){return{}}},readOnly:{type:Boolean,default:!1},documentKey:Function},data(){return{loading:!1,loadError:!1,docEditor:null}},beforeDestroy(){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null)},computed:{...f(["userInfo","themeIsDark"]),fileType(){return this.getType(this.value.type)},fileName(){return this.value.name},fileUrl(){let e=this.code||this.value.id,t;return $A.leftExists(e,"msgFile_")?t=`dialog/msg/download/?msg_id=${$A.leftDelete(e,"msgFile_")}&token=${this.userToken}`:$A.leftExists(e,"taskFile_")?t=`project/task/filedown/?file_id=${$A.leftDelete(e,"taskFile_")}&token=${this.userToken}`:(t=`file/content/?id=${e}&token=${this.userToken}`,this.historyId>0&&(t+=`&history_id=${this.historyId}`)),t},previewUrl(){return $A.apiUrl(this.fileUrl)+"&down=preview"}},watch:{"value.id":{handler(e){!e||!$A.isDesktop()||(this.loading=!0,this.loadError=!1,$A.loadScript($A.apiUrl("../office/web-apps/apps/api/documents/api.js")).then(t=>{if(!this.documentKey){this.handleClose();return}const i=this.documentKey();i&&i.then?i.then(this.loadFile):this.loadFile()}).catch(t=>{this.loadError=!0}).finally(t=>{this.loading=!1}))},immediate:!0},previewUrl:{handler(){$A.isDesktop()||(this.loading=!0)},immediate:!0}},methods:{onFrameLoad(){this.loading=!1},getType(e){switch(e){case"word":return"docx";case"excel":return"xlsx";case"ppt":return"pptx"}return e},loadFile(e=""){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null);let t=l;switch(l){case"zh-CHT":t="zh-TW";break}let i=this.code||this.value.id,d=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,n=`${this.fileType}-${e||i}`;this.historyId>0&&(n+=`-${this.historyId}`);const o={document:{fileType:this.fileType,title:d,key:n,url:`http://nginx/api/${this.fileUrl}`},editorConfig:{mode:"edit",lang:t,user:{id:String(this.userInfo.userid),name:this.userInfo.nickname},customization:{uiTheme:this.themeIsDark?"theme-dark":"theme-classic-light",forcesave:!0,help:!1},callbackUrl:`http://nginx/api/file/content/office?id=${i}&dootask-token=${this.userToken}`},events:{onDocumentReady:this.onDocumentReady}};/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(o.document.title=" "),(async g=>{if((this.readOnly||this.historyId>0)&&(o.editorConfig.mode="view",o.editorConfig.callbackUrl=null,!o.editorConfig.user.id)){let s=await $A.IDBInt("officeViewer");s||(s=$A.randNum(1e3,99999),await $A.IDBSet("officeViewer",s)),o.editorConfig.user.id="viewer_"+s,o.editorConfig.user.name="Viewer_"+s}this.$nextTick(()=>{this.$store.dispatch("call",{url:"file/office/token",data:{config:o}}).then(({data:s})=>{if(o.token=s.token,this.docEditor=new DocsAPI.DocEditor(this.id,o),this.readOnly){var r=$("iframe[name='frameEditor']")[0];r==null||r.addEventListener("load",function(){r.contentWindow.postMessage("disableDownload","*")})}}).catch(({msg:s})=>{$A.modalError({content:s})})})})()},onDocumentReady(){this.$emit("on-document-ready",this.docEditor)}}},a={};var _=c(p,u,m,!1,y,"4d311d30",null,null);function y(e){for(let t in a)this[t]=a[t]}var w=function(){return _.exports}();export{w as default}; +import{m as f,n as c,l}from"./app.6910ca56.js";import{I as h}from"./IFrame.1fc38451.js";var u=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-only-office"},[e.$A.isDesktop()?[e.loadError?i("Alert",{staticClass:"load-error",attrs:{type:"error","show-icon":""}},[e._v(e._s(e.$L("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")))]):e._e(),i("div",{staticClass:"placeholder",attrs:{id:e.id}})]:i("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}),e.loading?i("div",{staticClass:"office-loading"},[i("Loading")],1):e._e()],2)},m=[];const p={name:"OnlyOffice",components:{IFrame:h},props:{id:{type:String,default:()=>"office_"+Math.round(Math.random()*1e4)},code:{type:String,default:""},historyId:{type:Number,default:0},value:{type:[Object,Array],default:function(){return{}}},readOnly:{type:Boolean,default:!1},documentKey:Function},data(){return{loading:!1,loadError:!1,docEditor:null}},beforeDestroy(){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null)},computed:{...f(["userInfo","themeIsDark"]),fileType(){return this.getType(this.value.type)},fileName(){return this.value.name},fileUrl(){let e=this.code||this.value.id,t;return $A.leftExists(e,"msgFile_")?t=`dialog/msg/download/?msg_id=${$A.leftDelete(e,"msgFile_")}&token=${this.userToken}`:$A.leftExists(e,"taskFile_")?t=`project/task/filedown/?file_id=${$A.leftDelete(e,"taskFile_")}&token=${this.userToken}`:(t=`file/content/?id=${e}&token=${this.userToken}`,this.historyId>0&&(t+=`&history_id=${this.historyId}`)),t},previewUrl(){return $A.apiUrl(this.fileUrl)+"&down=preview"}},watch:{"value.id":{handler(e){!e||!$A.isDesktop()||(this.loading=!0,this.loadError=!1,$A.loadScript($A.apiUrl("../office/web-apps/apps/api/documents/api.js")).then(t=>{if(!this.documentKey){this.handleClose();return}const i=this.documentKey();i&&i.then?i.then(this.loadFile):this.loadFile()}).catch(t=>{this.loadError=!0}).finally(t=>{this.loading=!1}))},immediate:!0},previewUrl:{handler(){$A.isDesktop()||(this.loading=!0)},immediate:!0}},methods:{onFrameLoad(){this.loading=!1},getType(e){switch(e){case"word":return"docx";case"excel":return"xlsx";case"ppt":return"pptx"}return e},loadFile(e=""){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null);let t=l;switch(l){case"zh-CHT":t="zh-TW";break}let i=this.code||this.value.id,d=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,n=`${this.fileType}-${e||i}`;this.historyId>0&&(n+=`-${this.historyId}`);const o={document:{fileType:this.fileType,title:d,key:n,url:`http://nginx/api/${this.fileUrl}`},editorConfig:{mode:"edit",lang:t,user:{id:String(this.userInfo.userid),name:this.userInfo.nickname},customization:{uiTheme:this.themeIsDark?"theme-dark":"theme-classic-light",forcesave:!0,help:!1},callbackUrl:`http://nginx/api/file/content/office?id=${i}&dootask-token=${this.userToken}`},events:{onDocumentReady:this.onDocumentReady}};/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(o.document.title=" "),(async g=>{if((this.readOnly||this.historyId>0)&&(o.editorConfig.mode="view",o.editorConfig.callbackUrl=null,!o.editorConfig.user.id)){let s=await $A.IDBInt("officeViewer");s||(s=$A.randNum(1e3,99999),await $A.IDBSet("officeViewer",s)),o.editorConfig.user.id="viewer_"+s,o.editorConfig.user.name="Viewer_"+s}this.$nextTick(()=>{this.$store.dispatch("call",{url:"file/office/token",data:{config:o}}).then(({data:s})=>{if(o.token=s.token,this.docEditor=new DocsAPI.DocEditor(this.id,o),this.readOnly){var r=$("iframe[name='frameEditor']")[0];r==null||r.addEventListener("load",function(){r.contentWindow.postMessage("disableDownload","*")})}}).catch(({msg:s})=>{$A.modalError({content:s})})})})()},onDocumentReady(){this.$emit("on-document-ready",this.docEditor)}}},a={};var _=c(p,u,m,!1,y,"4d311d30",null,null);function y(e){for(let t in a)this[t]=a[t]}var w=function(){return _.exports}();export{w as default}; diff --git a/public/js/build/ProjectLog.d63fd8b4.js b/public/js/build/ProjectLog.55720685.js similarity index 98% rename from public/js/build/ProjectLog.d63fd8b4.js rename to public/js/build/ProjectLog.55720685.js index 9725089f1..006b2817c 100644 --- a/public/js/build/ProjectLog.d63fd8b4.js +++ b/public/js/build/ProjectLog.55720685.js @@ -1 +1 @@ -import{m as p,n as c}from"./app.6c8b31b1.js";var h=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)},m=[];const _={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data(){return{}},computed:{...p(["themeIsDark"]),myStyle(){const{color:t,background:e,backgroundColor:s,themeIsDark:a}=this;return a?{color:s||e,borderColor:s||e,backgroundColor:"transparent"}:{color:t,borderColor:s||e,backgroundColor:s||e}}}},l={};var f=c(_,h,m,!1,g,null,null,null);function g(t){for(let e in l)this[e]=l[e]}var I=function(){return f.exports}(),v={name:"ProjectLogDetail",functional:!0,props:{render:Function,item:Object},render:(t,e)=>e.props.render(t,e.props.item)},$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:["project-log",t.taskId==0?"is-drawer":""]},[s("div",{staticClass:"log-title"},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),s("ul",{staticClass:"logs-activity"},[t._l(t.lists,function(a){return s("li",[s("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(a)))]),s("div",{staticClass:"logs-section"},[s("Timeline",t._l(a.lists,function(r,o){return s("TimelineItem",{key:o},[s("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[r.userid?s("UserAvatar",{attrs:{userid:r.userid,size:18,showName:""}}):s("div",{staticClass:"avatar-wrapper common-avatar"},[s("EAvatar",{attrs:{size:18}},[t._v("A")]),s("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("\u7CFB\u7EDF")))])],1)],1),t._l(r.lists,function(i){return[s("div",{staticClass:"log-summary"},[s("ProjectLogDetail",{attrs:{render:t.logDetail,item:i}}),t.operationList(i).length>0?s("span",{staticClass:"log-operation"},t._l(t.operationList(i),function(n,d){return s("Button",{key:d,attrs:{size:"small"},on:{click:function(P){return t.onOperation(n)}}},[t._v(t._s(n.button))])}),1):t._e(),s("span",{staticClass:"log-time"},[t._v(t._s(i.time.ymd)+" "+t._s(i.time.segment)+" "+t._s(i.time.hi))])],1),i.project_task?s("div",{staticClass:"log-task"},[s("em",{on:{click:function(n){return t.openTask(i.project_task)}}},[t._v(t._s(t.$L("\u5173\u8054\u4EFB\u52A1"))+": "+t._s(i.project_task.name))])]):t._e()]})],2)}),1)],1)])}),t.loadIng>0&&t.showLoad?s("li",{staticClass:"logs-loading"},[s("Loading")],1):t.hasMorePages?s("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("\u52A0\u8F7D\u66F4\u591A")))]):t.totalNum==0?s("li",{staticClass:"logs-none",on:{click:function(a){return t.getLists(!0)}}},[t._v(t._s(t.$L("\u6CA1\u6709\u4EFB\u4F55\u52A8\u6001")))]):t._e()],2)])},k=[];const y={name:"ProjectLog",components:{ProjectLogDetail:v},props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0},showLoad:{type:Boolean,default:!0}},data(){return{loadIng:0,lists:[],listPage:1,listPageSize:20,hasMorePages:!1,totalNum:-1}},mounted(){this.getLists(!0)},computed:{},watch:{projectId(){this.lists=[],this.getLists(!0)},taskId(){this.lists=[],this.getLists(!0)},loadIng(t){this.$emit("on-load-change",t>0)}},methods:{logDate(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("\u4ECA\u5929"):t.key},getLists(t){t===!0&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:e})=>{t===!0&&(this.lists=[]),e.data.some(s=>{let a=s.time,r=a.ymd+" "+a.week,o=this.lists.find(({key:i})=>i==r);if(o){let i=o.lists.find(({userid:n})=>n==s.userid);i?i.lists.push(s):o.lists.push({userid:s.userid,lists:[s]})}else this.lists.push({key:r,ymd:s.ymd,lists:[{userid:s.userid,lists:[s]}]})}),this.hasMorePages=e.current_page{this.lists=[],this.hasMorePages=!1,this.totalNum=0}).finally(e=>{this.loadIng--})},getMore(){!this.hasMorePages||(this.hasMorePages=!1,this.listPage++,this.getLists())},logDetail(t,{detail:e,record:s}){let a=[t("span",e)];if($A.isJson(s)){if($A.isArray(s.change)){let[r,o]=s.change;a.push(t("span",": ")),r&&r!=o?(a.push(t("span",{class:"change-value"},`${r||"-"}`)),a.push(t("span"," => ")),a.push(t("span",{class:"change-value"},`${o||"-"}`))):a.push(t("span",{class:"change-value"},o||"-"))}if(s.userid){let r=$A.isArray(s.userid)?s.userid:[s.userid],o=[];r.some(i=>{/^\d+$/.test(i)?o.push(t("UserAvatar",{props:{size:18,userid:i}})):o.push(t("span",i))}),o.length>0&&a.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},o)]))}}return t("span",{class:"log-text"},a)},operationList({id:t,record:e}){let s=[];if(!$A.isJson(e))return s;if(this.taskId>0&&$A.isJson(e.flow)){let a=$A.getMiddle(e.flow.flow_item_name,"|");a&&s.push({id:t,button:this.$L("\u91CD\u7F6E"),content:this.$L(`\u786E\u5B9A\u91CD\u7F6E\u4E3A\u3010${a}\u3011\u5417\uFF1F`)})}return s},onOperation(t){$A.modalConfirm({content:t.content,loading:!0,onOk:()=>new Promise((e,s)=>{this.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then(({data:a,msg:r})=>{e(r),this.$store.dispatch("saveTask",a),this.getLists(!0)}).catch(({msg:a})=>{s(a)})})})},openTask(t){this.$store.dispatch("openTask",t)}}},u={};var L=c(y,$,k,!1,C,null,null,null);function C(t){for(let e in u)this[e]=u[e]}var A=function(){return L.exports}();export{A as P,I as T}; +import{m as p,n as c}from"./app.6910ca56.js";var h=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)},m=[];const _={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data(){return{}},computed:{...p(["themeIsDark"]),myStyle(){const{color:t,background:e,backgroundColor:s,themeIsDark:a}=this;return a?{color:s||e,borderColor:s||e,backgroundColor:"transparent"}:{color:t,borderColor:s||e,backgroundColor:s||e}}}},l={};var f=c(_,h,m,!1,g,null,null,null);function g(t){for(let e in l)this[e]=l[e]}var I=function(){return f.exports}(),v={name:"ProjectLogDetail",functional:!0,props:{render:Function,item:Object},render:(t,e)=>e.props.render(t,e.props.item)},$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:["project-log",t.taskId==0?"is-drawer":""]},[s("div",{staticClass:"log-title"},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),s("ul",{staticClass:"logs-activity"},[t._l(t.lists,function(a){return s("li",[s("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(a)))]),s("div",{staticClass:"logs-section"},[s("Timeline",t._l(a.lists,function(r,o){return s("TimelineItem",{key:o},[s("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[r.userid?s("UserAvatar",{attrs:{userid:r.userid,size:18,showName:""}}):s("div",{staticClass:"avatar-wrapper common-avatar"},[s("EAvatar",{attrs:{size:18}},[t._v("A")]),s("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("\u7CFB\u7EDF")))])],1)],1),t._l(r.lists,function(i){return[s("div",{staticClass:"log-summary"},[s("ProjectLogDetail",{attrs:{render:t.logDetail,item:i}}),t.operationList(i).length>0?s("span",{staticClass:"log-operation"},t._l(t.operationList(i),function(n,d){return s("Button",{key:d,attrs:{size:"small"},on:{click:function(P){return t.onOperation(n)}}},[t._v(t._s(n.button))])}),1):t._e(),s("span",{staticClass:"log-time"},[t._v(t._s(i.time.ymd)+" "+t._s(i.time.segment)+" "+t._s(i.time.hi))])],1),i.project_task?s("div",{staticClass:"log-task"},[s("em",{on:{click:function(n){return t.openTask(i.project_task)}}},[t._v(t._s(t.$L("\u5173\u8054\u4EFB\u52A1"))+": "+t._s(i.project_task.name))])]):t._e()]})],2)}),1)],1)])}),t.loadIng>0&&t.showLoad?s("li",{staticClass:"logs-loading"},[s("Loading")],1):t.hasMorePages?s("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("\u52A0\u8F7D\u66F4\u591A")))]):t.totalNum==0?s("li",{staticClass:"logs-none",on:{click:function(a){return t.getLists(!0)}}},[t._v(t._s(t.$L("\u6CA1\u6709\u4EFB\u4F55\u52A8\u6001")))]):t._e()],2)])},k=[];const y={name:"ProjectLog",components:{ProjectLogDetail:v},props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0},showLoad:{type:Boolean,default:!0}},data(){return{loadIng:0,lists:[],listPage:1,listPageSize:20,hasMorePages:!1,totalNum:-1}},mounted(){this.getLists(!0)},computed:{},watch:{projectId(){this.lists=[],this.getLists(!0)},taskId(){this.lists=[],this.getLists(!0)},loadIng(t){this.$emit("on-load-change",t>0)}},methods:{logDate(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("\u4ECA\u5929"):t.key},getLists(t){t===!0&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:e})=>{t===!0&&(this.lists=[]),e.data.some(s=>{let a=s.time,r=a.ymd+" "+a.week,o=this.lists.find(({key:i})=>i==r);if(o){let i=o.lists.find(({userid:n})=>n==s.userid);i?i.lists.push(s):o.lists.push({userid:s.userid,lists:[s]})}else this.lists.push({key:r,ymd:s.ymd,lists:[{userid:s.userid,lists:[s]}]})}),this.hasMorePages=e.current_page{this.lists=[],this.hasMorePages=!1,this.totalNum=0}).finally(e=>{this.loadIng--})},getMore(){!this.hasMorePages||(this.hasMorePages=!1,this.listPage++,this.getLists())},logDetail(t,{detail:e,record:s}){let a=[t("span",e)];if($A.isJson(s)){if($A.isArray(s.change)){let[r,o]=s.change;a.push(t("span",": ")),r&&r!=o?(a.push(t("span",{class:"change-value"},`${r||"-"}`)),a.push(t("span"," => ")),a.push(t("span",{class:"change-value"},`${o||"-"}`))):a.push(t("span",{class:"change-value"},o||"-"))}if(s.userid){let r=$A.isArray(s.userid)?s.userid:[s.userid],o=[];r.some(i=>{/^\d+$/.test(i)?o.push(t("UserAvatar",{props:{size:18,userid:i}})):o.push(t("span",i))}),o.length>0&&a.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},o)]))}}return t("span",{class:"log-text"},a)},operationList({id:t,record:e}){let s=[];if(!$A.isJson(e))return s;if(this.taskId>0&&$A.isJson(e.flow)){let a=$A.getMiddle(e.flow.flow_item_name,"|");a&&s.push({id:t,button:this.$L("\u91CD\u7F6E"),content:this.$L(`\u786E\u5B9A\u91CD\u7F6E\u4E3A\u3010${a}\u3011\u5417\uFF1F`)})}return s},onOperation(t){$A.modalConfirm({content:t.content,loading:!0,onOk:()=>new Promise((e,s)=>{this.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then(({data:a,msg:r})=>{e(r),this.$store.dispatch("saveTask",a),this.getLists(!0)}).catch(({msg:a})=>{s(a)})})})},openTask(t){this.$store.dispatch("openTask",t)}}},u={};var L=c(y,$,k,!1,C,null,null,null);function C(t){for(let e in u)this[e]=u[e]}var A=function(){return L.exports}();export{A as P,I as T}; diff --git a/public/js/build/ReportDetail.556c0891.js b/public/js/build/ReportDetail.d9bb9dfa.js similarity index 97% rename from public/js/build/ReportDetail.556c0891.js rename to public/js/build/ReportDetail.d9bb9dfa.js index 2116b8f50..ba8c84820 100644 --- a/public/js/build/ReportDetail.556c0891.js +++ b/public/js/build/ReportDetail.d9bb9dfa.js @@ -1 +1 @@ -import{m as i,n as l}from"./app.6c8b31b1.js";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"report-detail"},[a("div",{staticClass:"report-title"},[t._v(" "+t._s(t.data.title)+" "),t.loadIng>0?a("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),t.formLabelWidth==="auto"?a("div",{staticClass:"report-detail-context"},[a("Form",{staticClass:"report-form auto-form",attrs:{"label-width":"auto",inline:""}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u4EBA")}},[a("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),a("FormItem",{attrs:{label:t.$L("\u63D0\u4EA4\u65F6\u95F4")}},[t._v(" "+t._s(t.data.created_at)+" ")]),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(r,s){return a("UserAvatar",{key:s,attrs:{userid:r.userid,size:28}})})],2)],1),a("Form",{staticClass:"report-form auto-form",attrs:{"label-width":"auto"}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[a("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1):a("div",{staticClass:"report-detail-context"},[a("Form",{staticClass:"report-form",attrs:{labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth}},[t.formLabelWidth!=="auto"?[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u4EBA")}},[a("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),a("FormItem",{attrs:{label:t.$L("\u63D0\u4EA4\u65F6\u95F4")}},[t._v(" "+t._s(t.data.created_at)+" ")]),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(r,s){return a("UserAvatar",{key:s,attrs:{userid:r.userid,size:28}})})],2)]:t._e(),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[a("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],2)],1)])},d=[];const c={name:"ReportDetail",props:{data:{default:{}}},data(){return{loadIng:0}},computed:{...i(["formLabelPosition","formLabelWidth"])},watch:{"data.id":{handler(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead(){this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then(()=>{}).catch(()=>{}).finally(t=>{this.loadIng--})}}},o={};var m=l(c,n,d,!1,u,null,null,null);function u(t){for(let e in o)this[e]=o[e]}var v=function(){return m.exports}();export{v as R}; +import{m as i,n as l}from"./app.6910ca56.js";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"report-detail"},[a("div",{staticClass:"report-title"},[t._v(" "+t._s(t.data.title)+" "),t.loadIng>0?a("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),t.formLabelWidth==="auto"?a("div",{staticClass:"report-detail-context"},[a("Form",{staticClass:"report-form auto-form",attrs:{"label-width":"auto",inline:""}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u4EBA")}},[a("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),a("FormItem",{attrs:{label:t.$L("\u63D0\u4EA4\u65F6\u95F4")}},[t._v(" "+t._s(t.data.created_at)+" ")]),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(r,s){return a("UserAvatar",{key:s,attrs:{userid:r.userid,size:28}})})],2)],1),a("Form",{staticClass:"report-form auto-form",attrs:{"label-width":"auto"}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[a("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1):a("div",{staticClass:"report-detail-context"},[a("Form",{staticClass:"report-form",attrs:{labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth}},[t.formLabelWidth!=="auto"?[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u4EBA")}},[a("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),a("FormItem",{attrs:{label:t.$L("\u63D0\u4EA4\u65F6\u95F4")}},[t._v(" "+t._s(t.data.created_at)+" ")]),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(r,s){return a("UserAvatar",{key:s,attrs:{userid:r.userid,size:28}})})],2)]:t._e(),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[a("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],2)],1)])},d=[];const c={name:"ReportDetail",props:{data:{default:{}}},data(){return{loadIng:0}},computed:{...i(["formLabelPosition","formLabelWidth"])},watch:{"data.id":{handler(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead(){this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then(()=>{}).catch(()=>{}).finally(t=>{this.loadIng--})}}},o={};var m=l(c,n,d,!1,u,null,null,null);function u(t){for(let e in o)this[e]=o[e]}var v=function(){return m.exports}();export{v as R}; diff --git a/public/js/build/ReportEdit.54eb60eb.js b/public/js/build/ReportEdit.cc7cc71b.js similarity index 94% rename from public/js/build/ReportEdit.54eb60eb.js rename to public/js/build/ReportEdit.cc7cc71b.js index a8aefa565..4a1cb8499 100644 --- a/public/js/build/ReportEdit.54eb60eb.js +++ b/public/js/build/ReportEdit.cc7cc71b.js @@ -1 +1 @@ -import{n as s,_ as o}from"./app.6c8b31b1.js";import{U as l}from"./UserSelect.d62f565b.js";var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u7C7B\u578B")}},[e("RadioGroup",{staticClass:"report-radiogroup",attrs:{type:"button","button-style":"solid",readonly:t.id>0},on:{"on-change":t.typeChange},model:{value:t.reportData.type,callback:function(a){t.$set(t.reportData,"type",a)},expression:"reportData.type"}},[e("Radio",{attrs:{label:"weekly",disabled:t.id>0&&t.reportData.type=="daily"}},[t._v(t._s(t.$L("\u5468\u62A5")))]),e("Radio",{attrs:{label:"daily",disabled:t.id>0&&t.reportData.type=="weekly"}},[t._v(t._s(t.$L("\u65E5\u62A5")))])],1),t.id===0?e("ButtonGroup",{staticClass:"report-buttongroup"},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.prevCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[e("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),e("div",{staticClass:"report-buttongroup-vertical"}),e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch||t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u540D\u79F0")}},[e("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(a){t.$set(t.reportData,"title",a)},expression:"reportData.title"}})],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[e("div",{staticClass:"report-users"},[e("UserSelect",{attrs:{disabledChoice:[t.userId],title:t.$L("\u9009\u62E9\u63A5\u6536\u4EBA")},model:{value:t.reportData.receive,callback:function(a){t.$set(t.reportData,"receive",a)},expression:"reportData.receive"}}),e("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[t.receiveLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("Icon",{attrs:{type:"ios-share-outline"}}),t._v(" "+t._s(t.$L("\u4F7F\u7528\u6211\u4E0A\u6B21\u7684\u6C47\u62A5\u5BF9\u8C61"))+" ")],1)],1)]),e("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[e("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(a){t.$set(t.reportData,"content",a)},expression:"reportData.content"}})],1),e("FormItem",{staticClass:"report-foot"},[e("Button",{staticClass:"report-bottom",attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"\u4FEE\u6539":"\u63D0\u4EA4")))])],1)],1)},p=[];const c=()=>o(()=>import("./TEditor.5f656e41.js"),["js/build/TEditor.5f656e41.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/ImgUpload.0e64a5a8.js"]),h={name:"ReportEdit",components:{UserSelect:l,TEditor:c},props:{id:{default:0}},data(){return{loadIng:0,receiveLoad:0,reportData:{sign:"",title:"",content:"",type:"weekly",receive:[],id:0,offset:0},prevCycleText:this.$L("\u4E0A\u4E00\u5468"),nextCycleText:this.$L("\u4E0B\u4E00\u5468")}},watch:{id:{handler(t){t>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())},immediate:!0}},mounted(){},methods:{handleSubmit(){this.id===0&&this.reportData.id>0?$A.modalConfirm({title:"\u8986\u76D6\u63D0\u4EA4",content:"\u4F60\u5DF2\u63D0\u4EA4\u8FC7\u6B64\u65E5\u671F\u7684\u62A5\u544A\uFF0C\u662F\u5426\u8986\u76D6\u63D0\u4EA4\uFF1F",onOk:()=>{this.doSubmit()}}):this.doSubmit()},doSubmit(){this.loadIng++,this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then(({data:t,msg:r})=>{this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate(),!this.$isSubElectron&&$A.messageSuccess(r),this.$emit("saveSuccess",{data:t,msg:r})}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},getTemplate(){this.loadIng++,this.$store.dispatch("call",{url:"report/template",data:{type:this.reportData.type,offset:this.reportData.offset,id:this.id}}).then(({data:t})=>{t.id?(this.reportData.id=t.id,this.id>0?this.getDetail(t.id):(this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)):(this.reportData.id=0,this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},typeChange(t){this.reportData.offset=0,t==="weekly"?(this.prevCycleText=this.$L("\u4E0A\u4E00\u5468"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5468")):(this.prevCycleText=this.$L("\u4E0A\u4E00\u5929"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5929")),this.getTemplate()},getDetail(t){this.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then(({data:r})=>{this.reportData.title=r.title,this.reportData.content=r.content,this.reportData.receive=r.receives_user.map(({userid:e})=>e),this.reportData.type=r.type_val,this.reportData.id=t}).catch(({msg:r})=>{$A.messageError(r)})},prevCycle(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter(){setTimeout(t=>{this.receiveLoad++},300),this.$store.dispatch("call",{url:"report/last_submitter"}).then(({data:t})=>{this.reportData.receive=t}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.receiveLoad--})},reReportData(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}},i={};var d=s(h,n,p,!1,m,null,null,null);function m(t){for(let r in i)this[r]=i[r]}var y=function(){return d.exports}();export{y as R}; +import{n as s,_ as o}from"./app.6910ca56.js";import{U as l}from"./UserSelect.1938cd94.js";var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u7C7B\u578B")}},[e("RadioGroup",{staticClass:"report-radiogroup",attrs:{type:"button","button-style":"solid",readonly:t.id>0},on:{"on-change":t.typeChange},model:{value:t.reportData.type,callback:function(a){t.$set(t.reportData,"type",a)},expression:"reportData.type"}},[e("Radio",{attrs:{label:"weekly",disabled:t.id>0&&t.reportData.type=="daily"}},[t._v(t._s(t.$L("\u5468\u62A5")))]),e("Radio",{attrs:{label:"daily",disabled:t.id>0&&t.reportData.type=="weekly"}},[t._v(t._s(t.$L("\u65E5\u62A5")))])],1),t.id===0?e("ButtonGroup",{staticClass:"report-buttongroup"},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.prevCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[e("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),e("div",{staticClass:"report-buttongroup-vertical"}),e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch||t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u540D\u79F0")}},[e("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(a){t.$set(t.reportData,"title",a)},expression:"reportData.title"}})],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[e("div",{staticClass:"report-users"},[e("UserSelect",{attrs:{disabledChoice:[t.userId],title:t.$L("\u9009\u62E9\u63A5\u6536\u4EBA")},model:{value:t.reportData.receive,callback:function(a){t.$set(t.reportData,"receive",a)},expression:"reportData.receive"}}),e("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[t.receiveLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("Icon",{attrs:{type:"ios-share-outline"}}),t._v(" "+t._s(t.$L("\u4F7F\u7528\u6211\u4E0A\u6B21\u7684\u6C47\u62A5\u5BF9\u8C61"))+" ")],1)],1)]),e("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[e("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(a){t.$set(t.reportData,"content",a)},expression:"reportData.content"}})],1),e("FormItem",{staticClass:"report-foot"},[e("Button",{staticClass:"report-bottom",attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"\u4FEE\u6539":"\u63D0\u4EA4")))])],1)],1)},p=[];const c=()=>o(()=>import("./TEditor.8daabc3e.js"),["js/build/TEditor.8daabc3e.js","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/ImgUpload.8863e78d.js"]),h={name:"ReportEdit",components:{UserSelect:l,TEditor:c},props:{id:{default:0}},data(){return{loadIng:0,receiveLoad:0,reportData:{sign:"",title:"",content:"",type:"weekly",receive:[],id:0,offset:0},prevCycleText:this.$L("\u4E0A\u4E00\u5468"),nextCycleText:this.$L("\u4E0B\u4E00\u5468")}},watch:{id:{handler(t){t>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())},immediate:!0}},mounted(){},methods:{handleSubmit(){this.id===0&&this.reportData.id>0?$A.modalConfirm({title:"\u8986\u76D6\u63D0\u4EA4",content:"\u4F60\u5DF2\u63D0\u4EA4\u8FC7\u6B64\u65E5\u671F\u7684\u62A5\u544A\uFF0C\u662F\u5426\u8986\u76D6\u63D0\u4EA4\uFF1F",onOk:()=>{this.doSubmit()}}):this.doSubmit()},doSubmit(){this.loadIng++,this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then(({data:t,msg:r})=>{this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate(),!this.$isSubElectron&&$A.messageSuccess(r),this.$emit("saveSuccess",{data:t,msg:r})}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},getTemplate(){this.loadIng++,this.$store.dispatch("call",{url:"report/template",data:{type:this.reportData.type,offset:this.reportData.offset,id:this.id}}).then(({data:t})=>{t.id?(this.reportData.id=t.id,this.id>0?this.getDetail(t.id):(this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)):(this.reportData.id=0,this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},typeChange(t){this.reportData.offset=0,t==="weekly"?(this.prevCycleText=this.$L("\u4E0A\u4E00\u5468"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5468")):(this.prevCycleText=this.$L("\u4E0A\u4E00\u5929"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5929")),this.getTemplate()},getDetail(t){this.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then(({data:r})=>{this.reportData.title=r.title,this.reportData.content=r.content,this.reportData.receive=r.receives_user.map(({userid:e})=>e),this.reportData.type=r.type_val,this.reportData.id=t}).catch(({msg:r})=>{$A.messageError(r)})},prevCycle(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter(){setTimeout(t=>{this.receiveLoad++},300),this.$store.dispatch("call",{url:"report/last_submitter"}).then(({data:t})=>{this.reportData.receive=t}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.receiveLoad--})},reReportData(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}},i={};var d=s(h,n,p,!1,m,null,null,null);function m(t){for(let r in i)this[r]=i[r]}var y=function(){return d.exports}();export{y as R}; diff --git a/public/js/build/TEditor.5f656e41.js b/public/js/build/TEditor.8daabc3e.js similarity index 99% rename from public/js/build/TEditor.5f656e41.js rename to public/js/build/TEditor.8daabc3e.js index c66770c0c..bdef5df0e 100644 --- a/public/js/build/TEditor.5f656e41.js +++ b/public/js/build/TEditor.8daabc3e.js @@ -1,4 +1,4 @@ -import{f as PC,m as i2,l as IC,n as o2}from"./app.6c8b31b1.js";import{I as u2}from"./ImgUpload.0e64a5a8.js";var MC={exports:{}};(function(H){(function(){var Se=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var t=typeof e;return t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":t},be=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},he=function(e,t){var n=Array.prototype.slice.call(e);return n.sort(t)},ze=function(e,t){return vt(function(n,r){return e.eq(t(n),t(r))})},vt=function(e){return{eq:e}},yr=vt(function(e,t){return e===t}),Hi=yr,ja=function(e){return vt(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,a=0;a-1},bt=function(e,t){for(var n=0,r=e.length;n=0;n--){var r=e[n];t(r,n)}},Yc=function(e,t){for(var n=[],r=[],a=0,i=e.length;a=0&&t=t.length&&e.substr(n,n+t.length)===t},m0=function(e,t){return Sr(e,t)?v0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return d0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),p0=cs(/^\s+/g),uv=cs(/\s+$/g),Gi=function(e){return e.length>0},sv=function(e){return!Gi(e)},ds=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,On=function(e){return function(t){return yt(t,e)}},g0=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return yt(e,"edge/")&&yt(e,"chrome")&&yt(e,"safari")&&yt(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ds],search:function(e){return yt(e,"chrome")&&!yt(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return yt(e,"msie")||yt(e,"trident")}},{name:"Opera",versionRegexes:[ds,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:On("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:On("firefox")},{name:"Safari",versionRegexes:[ds,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(yt(e,"safari")||yt(e,"mobile/"))&&yt(e,"applewebkit")}}],h0=[{name:"Windows",search:On("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return yt(e,"iphone")||yt(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:On("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:On("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:On("linux"),versionRegexes:[]},{name:"Solaris",search:On("sunos"),versionRegexes:[]},{name:"FreeBSD",search:On("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:On("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fv={browsers:X(g0),oses:X(h0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",b0=function(){return gv({current:void 0,version:Qa.unknown()})},gv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isEdge:r(lv),isChrome:r(cv),isIE:r(vv),isOpera:r(dv),isFirefox:r(mv),isSafari:r(pv)}},hv={unknown:b0,nu:gv,edge:X(lv),chrome:X(cv),ie:X(vv),opera:X(dv),firefox:X(mv),safari:X(pv)},bv="Windows",yv="iOS",Cv="Android",wv="Linux",Sv="OSX",Ev="Solaris",kv="FreeBSD",xv="ChromeOS",y0=function(){return Nv({current:void 0,version:Qa.unknown()})},Nv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isWindows:r(bv),isiOS:r(yv),isAndroid:r(Cv),isOSX:r(Sv),isLinux:r(wv),isSolaris:r(Ev),isFreeBSD:r(kv),isChromeOS:r(xv)}},Tv={unknown:y0,nu:Nv,windows:X(bv),ios:X(yv),android:X(Cv),linux:X(wv),osx:X(Sv),solaris:X(Ev),freebsd:X(kv),chromeos:X(xv)},C0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return f0(r,s)}).orThunk(function(){return l0(r,e)}).fold(hv.unknown,hv.nu),o=c0(a,e).fold(Tv.unknown,Tv.nu),u=i0(o,i,e,n);return{browser:i,os:o,deviceType:u}},w0={detect:C0},S0=function(e){return window.matchMedia(e).matches},E0=fs(function(){return w0.detect(navigator.userAgent,b.from(navigator.userAgentData),S0)}),qt=function(){return E0()},Av=navigator.userAgent,ms=qt(),Ct=ms.browser,It=ms.os,mn=ms.deviceType,k0=/WebKit/.test(Av)&&!Ct.isEdge(),x0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,N0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:k0,ie:Ct.isIE()||Ct.isEdge()?Ct.version.major:!1,gecko:Ct.isFirefox(),mac:It.isOSX()||It.isiOS(),iOS:mn.isiPad()||mn.isiPhone(),android:It.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ct.isIE()?document.documentMode||7:10,fileApi:x0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:mn.isDesktop(),windowsPhone:N0,browser:{current:Ct.current,version:Ct.version,isChrome:Ct.isChrome,isEdge:Ct.isEdge,isFirefox:Ct.isFirefox,isIE:Ct.isIE,isOpera:Ct.isOpera,isSafari:Ct.isSafari},os:{current:It.current,version:It.version,isAndroid:It.isAndroid,isChromeOS:It.isChromeOS,isFreeBSD:It.isFreeBSD,isiOS:It.isiOS,isLinux:It.isLinux,isOSX:It.isOSX,isSolaris:It.isSolaris,isWindows:It.isWindows},deviceType:{isDesktop:mn.isDesktop,isiPad:mn.isiPad,isiPhone:mn.isiPhone,isPhone:mn.isPhone,isTablet:mn.isTablet,isTouch:mn.isTouch,isWebView:mn.isWebView}},T0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(T0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},A0=function(e,t,n){var r;for(e=e||[],t=t||",",typeof e=="string"&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},R0=de,B0=function(e,t,n){var r=this,a,i,o,u=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var s=e[3].match(/(^|\.)(\w+)$/i)[2],f=r.createNS(e[3].replace(/\.\w+$/,""),n);if(!f[s]){if(e[2]==="static"){f[s]=t,this.onCreate&&this.onCreate(e[2],e[3],f[s]);return}t[s]||(t[s]=function(){},u=1),f[s]=t[s],r.extend(f[s].prototype,t),e[5]&&(a=r.resolve(e[5]).prototype,i=e[5].match(/\.(\w+)$/i)[1],o=f[s],u?f[s]=function(){return a[i].apply(this,arguments)}:f[s]=function(){return this.parent=a[i],o.apply(this,arguments)},f[s].prototype[s]=f[s],r.each(a,function(l,c){f[s].prototype[c]=a[c]}),r.each(t,function(l,c){a[c]?f[s].prototype[c]=function(){return this.parent=a[c],l.apply(this,arguments)}:c!==s&&(f[s].prototype[c]=l)})),r.each(t.static,function(l,c){f[s][c]=l})}},_0=function(e){for(var t=[],n=1;n1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Za(r.childNodes[0])},L0=function(e,t){var n=t||document,r=n.createElement(e);return Za(r)},F0=function(e,t){var n=t||document,r=n.createTextNode(e);return Za(r)},Za=function(e){if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},M0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Za)},k={fromHtml:$0,fromTag:L0,fromText:F0,fromDom:Za,fromPoint:M0},Dv=function(e,t){var n=[],r=function(i){return n.push(i),t(i)},a=t(e);do a=a.bind(r);while(a.isSome());return n},U0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},z0=function(e,t){return U0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},H0=8,Ov=9,Pv=11,ps=1,V0=3,ra=function(e,t){var n=e.dom;if(n.nodeType!==ps)return!1;var r=n;if(r.matches!==void 0)return r.matches(t);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Iv=function(e){return e.nodeType!==ps&&e.nodeType!==Ov&&e.nodeType!==Pv||e.childElementCount===0},q0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?[]:De(n.querySelectorAll(e),k.fromDom)},W0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?b.none():b.from(n.querySelector(e)).map(k.fromDom)},Te=function(e,t){return e.dom===t.dom},j0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},K0=function(e,t){return z0(e.dom,t.dom)},qn=function(e,t){return qt().browser.isIE()?K0(e,t):j0(e,t)};typeof window!="undefined"||Function("return this;")();var Ke=function(e){var t=e.dom.nodeName;return t.toLowerCase()},$v=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return $v(t)===e}},G0=function(e){return $v(e)===H0||Ke(e)==="#comment"},Zt=Xi(ps),Wt=Xi(V0),X0=Xi(Ov),Y0=Xi(Pv),Q0=function(e){return function(t){return Zt(t)&&Ke(t)===e}},Lv=function(e){return k.fromDom(e.dom.ownerDocument)},aa=function(e){return X0(e)?e:Lv(e)},Z0=function(e){return k.fromDom(aa(e).dom.documentElement)},Fv=function(e){return k.fromDom(aa(e).dom.defaultView)},Jt=function(e){return b.from(e.dom.parentNode).map(k.fromDom)},J0=function(e,t){for(var n=Oe(t)?t:Re,r=e.dom,a=[];r.parentNode!==null&&r.parentNode!==void 0;){var i=r.parentNode,o=k.fromDom(i);if(a.push(o),n(o)===!0)break;r=i}return a},ew=function(e){var t=function(n){return ve(n,function(r){return!Te(e,r)})};return Jt(e).map(jt).map(t).getOr([])},Er=function(e){return b.from(e.dom.previousSibling).map(k.fromDom)},Ja=function(e){return b.from(e.dom.nextSibling).map(k.fromDom)},Mv=function(e){return ji(Dv(e,Er))},Uv=function(e){return Dv(e,Ja)},jt=function(e){return De(e.dom.childNodes,k.fromDom)},Yi=function(e,t){var n=e.dom.childNodes;return b.from(n[t]).map(k.fromDom)},zv=function(e){return Yi(e,0)},gs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},tw=function(e){var t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return k.fromDom(t)},Vv=function(e){return Y0(e)&&Ne(e.dom.host)},qv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),nw=X(qv),kr=qv?function(e){return k.fromDom(e.dom.getRootNode())}:aa,hs=function(e){return Vv(e)?e:tw(aa(e))},rw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},aw=function(e){return k.fromDom(e.dom.host)},iw=function(e){if(nw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Zt(t)&&ow(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},ow=function(e){return Ne(e.dom.shadowRoot)},en=function(e,t){var n=Jt(e);n.each(function(r){r.dom.insertBefore(t.dom,e.dom)})},ei=function(e,t){var n=Ja(e);n.fold(function(){var r=Jt(e);r.each(function(a){at(a,t)})},function(r){en(r,t)})},Wv=function(e,t){var n=zv(e);n.fold(function(){at(e,t)},function(r){e.dom.insertBefore(t.dom,r.dom)})},at=function(e,t){e.dom.appendChild(t.dom)},uw=function(e,t){en(e,t),at(t,e)},sw=function(e,t){Y(t,function(n){en(e,n)})},Qi=function(e,t){Y(t,function(n){at(e,n)})},bs=function(e){e.dom.textContent="",Y(jt(e),function(t){tt(t)})},tt=function(e){var t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},jv=function(e){var t=jt(e);t.length>0&&sw(e,t),tt(e)},ti=function(e){var t=Wt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return rw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ti,aw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},ia=Kv,fw=function(e){var t=e.getBoundingClientRect();return ia(t.left,t.top)},Zi=function(e,t){return e!==void 0?e:t!==void 0?t:0},lw=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,a=t.documentElement;if(n===e.dom)return ia(n.offsetLeft,n.offsetTop);var i=Zi(r==null?void 0:r.pageYOffset,a.scrollTop),o=Zi(r==null?void 0:r.pageXOffset,a.scrollLeft),u=Zi(a.clientTop,n.clientTop),s=Zi(a.clientLeft,n.clientLeft);return ys(e).translate(o-s,i-u)},ys=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?ia(r.offsetLeft,r.offsetTop):ti(e)?fw(t):ia(0,0)},Cs=function(e){var t=e!==void 0?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return ia(n,r)},Gv=function(e,t,n){var r=n!==void 0?n.dom:document,a=r.defaultView;a&&a.scrollTo(e,t)},Xv=function(e,t){var n=qt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},cw=function(e){var t=e===void 0?window:e;return qt().browser.isFirefox()?b.none():b.from(t.visualViewport)},Yv=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qv=function(e){var t=e===void 0?window:e,n=t.document,r=Cs(k.fromDom(n));return cw(t).fold(function(){var a=t.document.documentElement,i=a.clientWidth,o=a.clientHeight;return Yv(r.left,r.top,i,o)},function(a){return Yv(Math.max(a.pageLeft,r.left),Math.max(a.pageTop,r.top),a.width,a.height)})},ni=function(e){return function(t){return!!t&&t.nodeType===e}},Ji=function(e){return!!e&&!Object.getPrototypeOf(e)},ae=ni(1),Kt=function(e){var t=e.map(function(n){return n.toLowerCase()});return function(n){if(n&&n.nodeName){var r=n.nodeName.toLowerCase();return Je(t,r)}return!1}},eo=function(e,t){var n=t.toLowerCase().split(" ");return function(r){if(ae(r))for(var a=0;a0})},rd=function(e){var t={},n=e.dom;if(ro(n))for(var r=0;r=e.length&&n(r)}};e.length===0?n([]):Y(e,function(o,u){o.get(i(u))})})},Ow=function(e){return Dw(e,sd.nu)},sa=function(e){var t=function(c){return sa(e)},n=function(c){return sa(e)},r=function(c){return sa(c(e))},a=function(c){return sa(e)},i=function(c){c(e)},o=function(c){return c(e)},u=function(c,v){return v(e)},s=function(c){return c(e)},f=function(c){return c(e)},l=function(){return b.some(e)};return{isValue:We,isError:Re,getOr:X(e),getOrThunk:X(e),getOrDie:X(e),or:t,orThunk:n,fold:u,map:r,mapError:a,each:i,bind:o,exists:s,forall:f,toOptional:l}},ai=function(e){var t=function(f){return f()},n=function(){return HC(String(e))()},r=Tt,a=function(f){return f()},i=function(f){return ai(e)},o=function(f){return ai(f(e))},u=function(f){return ai(e)},s=function(f,l){return f(e)};return{isValue:Re,isError:We,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:le,bind:u,exists:Re,forall:We,toOptional:b.none}},Pw=function(e,t){return e.fold(function(){return ai(t)},sa)},fd={value:sa,error:ai,fromOption:Pw},Iw=function(e){if(!Vt(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");var t=[],n={};return Y(e,function(r,a){var i=ea(r);if(i.length!==1)throw new Error("one and only one name per case");var o=i[0],u=r[o];if(n[o]!==void 0)throw new Error("duplicate key detected:"+o);if(o==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Vt(u))throw new Error("case arguments must be an array");t.push(o),n[o]=function(){for(var s=[],f=0;f-1},bt=function(e,t){for(var n=0,r=e.length;n=0;n--){var r=e[n];t(r,n)}},Yc=function(e,t){for(var n=[],r=[],a=0,i=e.length;a=0&&t=t.length&&e.substr(n,n+t.length)===t},m0=function(e,t){return Sr(e,t)?v0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return d0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),p0=cs(/^\s+/g),uv=cs(/\s+$/g),Gi=function(e){return e.length>0},sv=function(e){return!Gi(e)},ds=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,On=function(e){return function(t){return yt(t,e)}},g0=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return yt(e,"edge/")&&yt(e,"chrome")&&yt(e,"safari")&&yt(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ds],search:function(e){return yt(e,"chrome")&&!yt(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return yt(e,"msie")||yt(e,"trident")}},{name:"Opera",versionRegexes:[ds,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:On("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:On("firefox")},{name:"Safari",versionRegexes:[ds,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(yt(e,"safari")||yt(e,"mobile/"))&&yt(e,"applewebkit")}}],h0=[{name:"Windows",search:On("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return yt(e,"iphone")||yt(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:On("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:On("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:On("linux"),versionRegexes:[]},{name:"Solaris",search:On("sunos"),versionRegexes:[]},{name:"FreeBSD",search:On("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:On("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fv={browsers:X(g0),oses:X(h0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",b0=function(){return gv({current:void 0,version:Qa.unknown()})},gv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isEdge:r(lv),isChrome:r(cv),isIE:r(vv),isOpera:r(dv),isFirefox:r(mv),isSafari:r(pv)}},hv={unknown:b0,nu:gv,edge:X(lv),chrome:X(cv),ie:X(vv),opera:X(dv),firefox:X(mv),safari:X(pv)},bv="Windows",yv="iOS",Cv="Android",wv="Linux",Sv="OSX",Ev="Solaris",kv="FreeBSD",xv="ChromeOS",y0=function(){return Nv({current:void 0,version:Qa.unknown()})},Nv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isWindows:r(bv),isiOS:r(yv),isAndroid:r(Cv),isOSX:r(Sv),isLinux:r(wv),isSolaris:r(Ev),isFreeBSD:r(kv),isChromeOS:r(xv)}},Tv={unknown:y0,nu:Nv,windows:X(bv),ios:X(yv),android:X(Cv),linux:X(wv),osx:X(Sv),solaris:X(Ev),freebsd:X(kv),chromeos:X(xv)},C0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return f0(r,s)}).orThunk(function(){return l0(r,e)}).fold(hv.unknown,hv.nu),o=c0(a,e).fold(Tv.unknown,Tv.nu),u=i0(o,i,e,n);return{browser:i,os:o,deviceType:u}},w0={detect:C0},S0=function(e){return window.matchMedia(e).matches},E0=fs(function(){return w0.detect(navigator.userAgent,b.from(navigator.userAgentData),S0)}),qt=function(){return E0()},Av=navigator.userAgent,ms=qt(),Ct=ms.browser,It=ms.os,mn=ms.deviceType,k0=/WebKit/.test(Av)&&!Ct.isEdge(),x0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,N0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:k0,ie:Ct.isIE()||Ct.isEdge()?Ct.version.major:!1,gecko:Ct.isFirefox(),mac:It.isOSX()||It.isiOS(),iOS:mn.isiPad()||mn.isiPhone(),android:It.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ct.isIE()?document.documentMode||7:10,fileApi:x0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:mn.isDesktop(),windowsPhone:N0,browser:{current:Ct.current,version:Ct.version,isChrome:Ct.isChrome,isEdge:Ct.isEdge,isFirefox:Ct.isFirefox,isIE:Ct.isIE,isOpera:Ct.isOpera,isSafari:Ct.isSafari},os:{current:It.current,version:It.version,isAndroid:It.isAndroid,isChromeOS:It.isChromeOS,isFreeBSD:It.isFreeBSD,isiOS:It.isiOS,isLinux:It.isLinux,isOSX:It.isOSX,isSolaris:It.isSolaris,isWindows:It.isWindows},deviceType:{isDesktop:mn.isDesktop,isiPad:mn.isiPad,isiPhone:mn.isiPhone,isPhone:mn.isPhone,isTablet:mn.isTablet,isTouch:mn.isTouch,isWebView:mn.isWebView}},T0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(T0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},A0=function(e,t,n){var r;for(e=e||[],t=t||",",typeof e=="string"&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},R0=de,B0=function(e,t,n){var r=this,a,i,o,u=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var s=e[3].match(/(^|\.)(\w+)$/i)[2],f=r.createNS(e[3].replace(/\.\w+$/,""),n);if(!f[s]){if(e[2]==="static"){f[s]=t,this.onCreate&&this.onCreate(e[2],e[3],f[s]);return}t[s]||(t[s]=function(){},u=1),f[s]=t[s],r.extend(f[s].prototype,t),e[5]&&(a=r.resolve(e[5]).prototype,i=e[5].match(/\.(\w+)$/i)[1],o=f[s],u?f[s]=function(){return a[i].apply(this,arguments)}:f[s]=function(){return this.parent=a[i],o.apply(this,arguments)},f[s].prototype[s]=f[s],r.each(a,function(l,c){f[s].prototype[c]=a[c]}),r.each(t,function(l,c){a[c]?f[s].prototype[c]=function(){return this.parent=a[c],l.apply(this,arguments)}:c!==s&&(f[s].prototype[c]=l)})),r.each(t.static,function(l,c){f[s][c]=l})}},_0=function(e){for(var t=[],n=1;n1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Za(r.childNodes[0])},L0=function(e,t){var n=t||document,r=n.createElement(e);return Za(r)},F0=function(e,t){var n=t||document,r=n.createTextNode(e);return Za(r)},Za=function(e){if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},M0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Za)},k={fromHtml:$0,fromTag:L0,fromText:F0,fromDom:Za,fromPoint:M0},Dv=function(e,t){var n=[],r=function(i){return n.push(i),t(i)},a=t(e);do a=a.bind(r);while(a.isSome());return n},U0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},z0=function(e,t){return U0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},H0=8,Ov=9,Pv=11,ps=1,V0=3,ra=function(e,t){var n=e.dom;if(n.nodeType!==ps)return!1;var r=n;if(r.matches!==void 0)return r.matches(t);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Iv=function(e){return e.nodeType!==ps&&e.nodeType!==Ov&&e.nodeType!==Pv||e.childElementCount===0},q0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?[]:De(n.querySelectorAll(e),k.fromDom)},W0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?b.none():b.from(n.querySelector(e)).map(k.fromDom)},Te=function(e,t){return e.dom===t.dom},j0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},K0=function(e,t){return z0(e.dom,t.dom)},qn=function(e,t){return qt().browser.isIE()?K0(e,t):j0(e,t)};typeof window!="undefined"||Function("return this;")();var Ke=function(e){var t=e.dom.nodeName;return t.toLowerCase()},$v=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return $v(t)===e}},G0=function(e){return $v(e)===H0||Ke(e)==="#comment"},Zt=Xi(ps),Wt=Xi(V0),X0=Xi(Ov),Y0=Xi(Pv),Q0=function(e){return function(t){return Zt(t)&&Ke(t)===e}},Lv=function(e){return k.fromDom(e.dom.ownerDocument)},aa=function(e){return X0(e)?e:Lv(e)},Z0=function(e){return k.fromDom(aa(e).dom.documentElement)},Fv=function(e){return k.fromDom(aa(e).dom.defaultView)},Jt=function(e){return b.from(e.dom.parentNode).map(k.fromDom)},J0=function(e,t){for(var n=Oe(t)?t:Re,r=e.dom,a=[];r.parentNode!==null&&r.parentNode!==void 0;){var i=r.parentNode,o=k.fromDom(i);if(a.push(o),n(o)===!0)break;r=i}return a},ew=function(e){var t=function(n){return ve(n,function(r){return!Te(e,r)})};return Jt(e).map(jt).map(t).getOr([])},Er=function(e){return b.from(e.dom.previousSibling).map(k.fromDom)},Ja=function(e){return b.from(e.dom.nextSibling).map(k.fromDom)},Mv=function(e){return ji(Dv(e,Er))},Uv=function(e){return Dv(e,Ja)},jt=function(e){return De(e.dom.childNodes,k.fromDom)},Yi=function(e,t){var n=e.dom.childNodes;return b.from(n[t]).map(k.fromDom)},zv=function(e){return Yi(e,0)},gs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},tw=function(e){var t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return k.fromDom(t)},Vv=function(e){return Y0(e)&&Ne(e.dom.host)},qv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),nw=X(qv),kr=qv?function(e){return k.fromDom(e.dom.getRootNode())}:aa,hs=function(e){return Vv(e)?e:tw(aa(e))},rw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},aw=function(e){return k.fromDom(e.dom.host)},iw=function(e){if(nw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Zt(t)&&ow(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},ow=function(e){return Ne(e.dom.shadowRoot)},en=function(e,t){var n=Jt(e);n.each(function(r){r.dom.insertBefore(t.dom,e.dom)})},ei=function(e,t){var n=Ja(e);n.fold(function(){var r=Jt(e);r.each(function(a){at(a,t)})},function(r){en(r,t)})},Wv=function(e,t){var n=zv(e);n.fold(function(){at(e,t)},function(r){e.dom.insertBefore(t.dom,r.dom)})},at=function(e,t){e.dom.appendChild(t.dom)},uw=function(e,t){en(e,t),at(t,e)},sw=function(e,t){Y(t,function(n){en(e,n)})},Qi=function(e,t){Y(t,function(n){at(e,n)})},bs=function(e){e.dom.textContent="",Y(jt(e),function(t){tt(t)})},tt=function(e){var t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},jv=function(e){var t=jt(e);t.length>0&&sw(e,t),tt(e)},ti=function(e){var t=Wt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return rw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ti,aw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},ia=Kv,fw=function(e){var t=e.getBoundingClientRect();return ia(t.left,t.top)},Zi=function(e,t){return e!==void 0?e:t!==void 0?t:0},lw=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,a=t.documentElement;if(n===e.dom)return ia(n.offsetLeft,n.offsetTop);var i=Zi(r==null?void 0:r.pageYOffset,a.scrollTop),o=Zi(r==null?void 0:r.pageXOffset,a.scrollLeft),u=Zi(a.clientTop,n.clientTop),s=Zi(a.clientLeft,n.clientLeft);return ys(e).translate(o-s,i-u)},ys=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?ia(r.offsetLeft,r.offsetTop):ti(e)?fw(t):ia(0,0)},Cs=function(e){var t=e!==void 0?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return ia(n,r)},Gv=function(e,t,n){var r=n!==void 0?n.dom:document,a=r.defaultView;a&&a.scrollTo(e,t)},Xv=function(e,t){var n=qt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},cw=function(e){var t=e===void 0?window:e;return qt().browser.isFirefox()?b.none():b.from(t.visualViewport)},Yv=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qv=function(e){var t=e===void 0?window:e,n=t.document,r=Cs(k.fromDom(n));return cw(t).fold(function(){var a=t.document.documentElement,i=a.clientWidth,o=a.clientHeight;return Yv(r.left,r.top,i,o)},function(a){return Yv(Math.max(a.pageLeft,r.left),Math.max(a.pageTop,r.top),a.width,a.height)})},ni=function(e){return function(t){return!!t&&t.nodeType===e}},Ji=function(e){return!!e&&!Object.getPrototypeOf(e)},ae=ni(1),Kt=function(e){var t=e.map(function(n){return n.toLowerCase()});return function(n){if(n&&n.nodeName){var r=n.nodeName.toLowerCase();return Je(t,r)}return!1}},eo=function(e,t){var n=t.toLowerCase().split(" ");return function(r){if(ae(r))for(var a=0;a0})},rd=function(e){var t={},n=e.dom;if(ro(n))for(var r=0;r=e.length&&n(r)}};e.length===0?n([]):Y(e,function(o,u){o.get(i(u))})})},Ow=function(e){return Dw(e,sd.nu)},sa=function(e){var t=function(c){return sa(e)},n=function(c){return sa(e)},r=function(c){return sa(c(e))},a=function(c){return sa(e)},i=function(c){c(e)},o=function(c){return c(e)},u=function(c,v){return v(e)},s=function(c){return c(e)},f=function(c){return c(e)},l=function(){return b.some(e)};return{isValue:We,isError:Re,getOr:X(e),getOrThunk:X(e),getOrDie:X(e),or:t,orThunk:n,fold:u,map:r,mapError:a,each:i,bind:o,exists:s,forall:f,toOptional:l}},ai=function(e){var t=function(f){return f()},n=function(){return HC(String(e))()},r=Tt,a=function(f){return f()},i=function(f){return ai(e)},o=function(f){return ai(f(e))},u=function(f){return ai(e)},s=function(f,l){return f(e)};return{isValue:Re,isError:We,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:le,bind:u,exists:Re,forall:We,toOptional:b.none}},Pw=function(e,t){return e.fold(function(){return ai(t)},sa)},fd={value:sa,error:ai,fromOption:Pw},Iw=function(e){if(!Vt(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");var t=[],n={};return Y(e,function(r,a){var i=ea(r);if(i.length!==1)throw new Error("one and only one name per case");var o=i[0],u=r[o];if(n[o]!==void 0)throw new Error("duplicate key detected:"+o);if(o==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Vt(u))throw new Error("case arguments must be an array");t.push(o),n[o]=function(){for(var s=[],f=0;f0?h(S.fail.map(ld)):y(S.pass.map(ld))})},m=function(g){var y=B._addCacheSuffix(g);je(r,y).each(function(h){var E=--h.count;E===0&&(delete r[y],f(h.id))})},p=function(g){Y(g,function(y){m(y)})};return{load:c,loadAll:d,unload:m,unloadAll:p,_setReferrerPolicy:u}},zw=function(){var e=new WeakMap,t=function(n,r){var a=kr(n),i=a.dom;return b.from(e.get(i)).getOrThunk(function(){var o=md(i,r);return e.set(i,o),o})};return{forElement:t}},pd=zw(),Ge=function(){function e(t,n){this.node=t,this.rootNode=n,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return e.prototype.current=function(){return this.node},e.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},e.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},e.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},e.prototype.findSibling=function(t,n,r,a){var i,o;if(t){if(!a&&t[n])return t[n];if(t!==this.rootNode){if(i=t[r],i)return i;for(o=t.parentNode;o&&o!==this.rootNode;o=o.parentNode)if(i=o[r],i)return i}}},e.prototype.findPreviousNode=function(t,n,r,a){var i,o,u;if(t){if(i=t[r],this.rootNode&&i===this.rootNode)return;if(i){if(!a){for(u=i[n];u;u=u[n])if(!u[n])return u}return i}if(o=t.parentNode,o&&o!==this.rootNode)return o}},e}(),Hw=["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],Vw=["td","th"],qw=["thead","tbody","tfoot"],Ww=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],jw=["h1","h2","h3","h4","h5","h6"],Kw=["li","dd","dt"],Gw=["ul","ol","dl"],Xw=["pre","script","textarea","style"],Gn=function(e){var t;return function(n){return t=t||YC(e,We),de(t,Ke(n))}},Yw=Gn(jw),hn=Gn(Hw),Qw=function(e){return Ke(e)==="table"},Bs=function(e){return Zt(e)&&!hn(e)},fa=function(e){return Zt(e)&&Ke(e)==="br"},gd=Gn(Ww),_s=Gn(Gw),oi=Gn(Kw),Zw=Gn(qw),uo=Gn(Vw),so=Gn(Xw),Jw=function(e,t,n){return io(e,t,n).isSome()},Ds="\uFEFF",At="\xA0",eS=function(e){return e===Ds},tS=function(e){return e.replace(/\uFEFF/g,"")},nt=Ds,fo=eS,Xn=tS,nS=ae,la=Q,ca=function(e){return la(e)&&(e=e.parentNode),nS(e)&&e.hasAttribute("data-mce-caret")},va=function(e){return la(e)&&fo(e.data)},$t=function(e){return ca(e)||va(e)},hd=function(e){return e.firstChild!==e.lastChild||!Le(e.firstChild)},rS=function(e,t){var n=e.ownerDocument,r=n.createTextNode(nt),a=e.parentNode;if(t){var i=e.previousSibling;if(la(i)){if($t(i))return i;if(co(i))return i.splitText(i.data.length-1)}a.insertBefore(r,e)}else{var i=e.nextSibling;if(la(i)){if($t(i))return i;if(lo(i))return i.splitText(1),i}e.nextSibling?a.insertBefore(r,e.nextSibling):a.appendChild(r)}return r},Os=function(e){var t=e.container();return Q(t)?t.data.charAt(e.offset())===nt||e.isAtStart()&&va(t.previousSibling):!1},Ps=function(e){var t=e.container();return Q(t)?t.data.charAt(e.offset()-1)===nt||e.isAtEnd()&&va(t.nextSibling):!1},aS=function(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e},iS=function(e,t,n){var r=t.ownerDocument,a=r.createElement(e);a.setAttribute("data-mce-caret",n?"before":"after"),a.setAttribute("data-mce-bogus","all"),a.appendChild(aS());var i=t.parentNode;return n?i.insertBefore(a,t):t.nextSibling?i.insertBefore(a,t.nextSibling):i.appendChild(a),a},lo=function(e){return la(e)&&e.data[0]===nt},co=function(e){return la(e)&&e.data[e.data.length-1]===nt},oS=function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];xr(n)&&n.parentNode.removeChild(n)},Is=function(e){return e&&e.hasAttribute("data-mce-caret")?(oS(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},bd=function(e){return ca(e.startContainer)},yd=pn,uS=_e,sS=Le,fS=Q,lS=Kt(["script","style","textarea"]),Cd=Kt(["img","input","textarea","hr","iframe","video","audio","object","embed"]),cS=Kt(["table"]),vS=$t,bn=function(e){return vS(e)?!1:fS(e)?!lS(e.parentNode):Cd(e)||sS(e)||cS(e)||$s(e)},dS=function(e){return ae(e)&&e.getAttribute("unselectable")==="true"},$s=function(e){return dS(e)===!1&&uS(e)},mS=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if($s(e))return!1;if(yd(e))return!0}return!0},pS=function(e){return $s(e)?Qt(dn(e.getElementsByTagName("*")),function(t,n){return t||yd(n)},!1)!==!0:!1},gS=function(e){return Cd(e)||pS(e)},vo=function(e,t){return bn(e)&&mS(e,t)},hS=/^[ \t\r\n]*$/,Nr=function(e){return hS.test(e)},bS=function(e,t){var n=k.fromDom(t),r=k.fromDom(e);return Jw(r,"pre,code",G(Te,n))},yS=function(e,t){return Q(e)&&Nr(e.data)&&bS(e,t)===!1},CS=function(e){return ae(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"))},mo=function(e,t){return bn(e)&&yS(e,t)===!1||CS(e)||wS(e)},wS=Zv("data-mce-bookmark"),SS=Zv("data-mce-bogus"),ES=vw("data-mce-bogus","all"),kS=function(e,t){var n=0;if(mo(e,e))return!1;var r=e.firstChild;if(!r)return!0;var a=new Ge(r,e);do{if(t){if(ES(r)){r=a.next(!0);continue}if(SS(r)){r=a.next();continue}}if(Le(r)){n++,r=a.next();continue}if(mo(r,e))return!1;r=a.next()}while(r);return n<=1},Xe=function(e,t){return t===void 0&&(t=!0),kS(e.dom,t)},xS=function(e){return e.nodeName.toLowerCase()==="span"},wd=function(e,t){return Ne(e)&&(mo(e,t)||Bs(k.fromDom(e)))},NS=function(e,t){var n=new Ge(e,t).prev(!1),r=new Ge(e,t).next(!1),a=Nt(n)||wd(n,t),i=Nt(r)||wd(r,t);return a&&i},Sd=function(e){return xS(e)&&e.getAttribute("data-mce-type")==="bookmark"},TS=function(e,t){return Q(e)&&e.data.length>0&&NS(e,t)},AS=function(e){return ae(e)?e.childNodes.length>0:!1},RS=function(e){return Es(e)||Ss(e)},Ls=function(e,t,n){var r=n||t;if(ae(t)&&Sd(t))return t;for(var a=t.childNodes,i=a.length-1;i>=0;i--)Ls(e,a[i],r);if(ae(t)){var o=t.childNodes;o.length===1&&Sd(o[0])&&t.parentNode.insertBefore(o[0],t)}return!RS(t)&&!mo(t,r)&&!AS(t)&&!TS(t,r)&&e.remove(t),t},BS=B.makeMap,po=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,go=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_S=/[<>&\"\']/g,DS=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,OS={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},Tr={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},PS={"<":"<",">":">","&":"&",""":'"',"'":"'"},IS=function(e){var t=k.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e},Ed=function(e,t){var n,r,a,i={};if(e){for(e=e.split(","),t=t||10,n=0;n1?"&#"+((n.charCodeAt(0)-55296)*1024+(n.charCodeAt(1)-56320)+65536)+";":Tr[n]||"&#"+n.charCodeAt(0)+";"})},Ms=function(e,t,n){return n=n||Fs,e.replace(t?po:go,function(r){return Tr[r]||n[r]||r})},LS=function(e,t){var n=Ed(t)||Fs,r=function(o,u){return o.replace(u?po:go,function(s){return Tr[s]!==void 0?Tr[s]:n[s]!==void 0?n[s]:s.length>1?"&#"+((s.charCodeAt(0)-55296)*1024+(s.charCodeAt(1)-56320)+65536)+";":"&#"+s.charCodeAt(0)+";"})},a=function(o,u){return Ms(o,u,n)},i=BS(e.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?t?a:Ms:i.numeric?xd:kd},FS=function(e){return e.replace(DS,function(t,n){return n?(n.charAt(0).toLowerCase()==="x"?n=parseInt(n.substr(1),16):n=parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(n&1023))):OS[n]||String.fromCharCode(n)):PS[t]||Fs[t]||IS(t)})},Yn={encodeRaw:kd,encodeAllRaw:$S,encodeNumeric:xd,encodeNamed:Ms,getEncodeFunc:LS,decode:FS},Qn={},MS={},da=B.makeMap,ut=B.each,Us=B.extend,Nd=B.explode,US=B.inArray,rt=function(e,t){return e=B.trim(e),e?e.split(t||" "):[]},Td=function(e,t){var n=da(e," ",da(e.toUpperCase()," "));return Us(n,t)},Ad=function(e){return Td("td th li dt dd figcaption caption details summary",e.getTextBlockElements())},zS=function(e){var t={},n,r,a,i,o,u,s=function(l,c,v){var d,m,p,g=function(h,E){var S={},C,x;for(C=0,x=h.length;C

").html("
"+T).contents().slice(1).appendTo(ue)}return T}}):F.html(T)},Be=function(w,T,F,z,ue){return pe(w,function(ge){var Ae=typeof T=="string"?e.createElement(T):T;return me(Ae,F),z&&(typeof z!="string"&&z.nodeType?Ae.appendChild(z):typeof z=="string"&&qe(Ae,z)),ue?Ae:ge.appendChild(Ae)})},lt=function(w,T,F){return Be(e.createElement(w),w,T,F,!0)},xt=Yn.decode,O=Yn.encodeAllRaw,U=function(w,T,F){var z="",ue;z+="<"+w;for(ue in T)ta(T,ue)&&(z+=" "+ue+'="'+O(T[ue])+'"');return typeof F!="undefined"?z+">"+F+"":z+" />"},Z=function(w){var T,F=e.createElement("div"),z=e.createDocumentFragment();for(z.appendChild(F),w&&(F.innerHTML=w);T=F.firstChild;)z.appendChild(T);return z.removeChild(F),z},N=function(w,T){var F=y(w);return T?F.each(function(){for(var z;z=this.firstChild;)z.nodeType===3&&z.data.length===0?this.removeChild(z):this.parentNode.insertBefore(z,this)}).remove():F.remove(),F.length>1?F.toArray():F[0]},$=function(w){return pe(w,function(T){var F,z=T.attributes;for(F=z.length-1;F>=0;F--)T.removeAttributeNode(z.item(F))})},P=function(w){return c.parse(w)},J=function(w,T){return c.serialize(w,T)},te=function(w){var T,F;if(Yr!==xe.DOM&&e===document){if(n[w])return;n[w]=!0}F=e.getElementById("mceDefaultStyles"),F||(F=e.createElement("style"),F.id="mceDefaultStyles",F.type="text/css",T=e.getElementsByTagName("head")[0],T.firstChild?T.insertBefore(F,T.firstChild):T.appendChild(F)),F.styleSheet?F.styleSheet.cssText+=w:F.appendChild(e.createTextNode(w))},ye=function(w){w||(w=""),Y(w.split(","),function(T){a[T]=!0,s.load(T,le)})},Fe=function(w,T,F){y(w).toggleClass(T,F).each(function(){this.className===""&&oe(this).attr("class",null)})},$e=function(w,T){y(w).addClass(T)},Hn=function(w,T){Fe(w,T,!1)},ct=function(w,T){return y(w).hasClass(T)},gt=function(w){y(w).show()},Me=function(w){y(w).hide()},Ot=function(w){return y(w).css("display")==="none"},ht=function(w){return(w||"mce_")+i++},_n=function(w){var T=typeof w=="string"?g(w):w;return ae(T)?T.outerHTML:oe("
").append(oe(T).clone()).html()},we=function(w,T){y(w).each(function(){try{if("outerHTML"in this){this.outerHTML=T;return}}catch{}N(oe(this).html(T),!0)})},Ee=function(w,T){var F=g(T);return pe(w,function(z){var ue=F.parentNode,ge=F.nextSibling;return ge?ue.insertBefore(z,ge):ue.appendChild(z),z})},Ue=function(w,T,F){return pe(T,function(z){return B.is(z,"array")&&(w=w.cloneNode(!0)),F&&ci(xE(z.childNodes),function(ue){w.appendChild(ue)}),z.parentNode.replaceChild(w,z)})},fn=function(w,T){var F;return w.nodeName!==T.toUpperCase()&&(F=lt(T),ci(E(w),function(z){S(F,z.nodeName,h(w,z.nodeName))}),Ue(F,w,!0)),F||w},ln=function(w,T){for(var F=w,z;F;){for(z=T;z&&F!==z;)z=z.parentNode;if(F===z)break;F=F.parentNode}return!F&&w.ownerDocument?w.ownerDocument.documentElement:F},cn=function(w){return c.toHex(B.trim(w))},hr=function(w){if(ae(w)){var T=w.nodeName.toLowerCase()==="a"&&!h(w,"href")&&h(w,"id");if(h(w,"name")||h(w,"data-mce-bookmark")||T)return!0}return!1},Hc=function(w,T){var F,z,ue=0;if(hr(w))return!1;if(w=w.firstChild,w){var ge=new Ge(w,w.parentNode),Ae=l?l.getWhiteSpaceElements():{};T=T||(l?l.getNonEmptyElements():null);do{if(F=w.nodeType,ae(w)){var br=w.getAttribute("data-mce-bogus");if(br){w=ge.next(br==="all");continue}if(z=w.nodeName.toLowerCase(),T&&T[z]){if(z==="br"){ue++,w=ge.next();continue}return!1}if(hr(w))return!1}if(F===8||F===3&&!Nr(w.nodeValue)||F===3&&w.parentNode&&Ae[w.parentNode.nodeName]&&Nr(w.nodeValue))return!1;w=ge.next()}while(w)}return ue<=1},Vc=function(){return e.createRange()},JU=function(w,T,F){var z=Vc(),ue,ge,Ae;if(w&&T)return z.setStart(w.parentNode,ya(w)),z.setEnd(T.parentNode,ya(T)),ue=z.extractContents(),z=Vc(),z.setStart(T.parentNode,ya(T)+1),z.setEnd(w.parentNode,ya(w)+1),ge=z.extractContents(),Ae=w.parentNode,Ae.insertBefore(Ls(Yr,ue),w),F?Ae.insertBefore(F,w):Ae.insertBefore(T,w),Ae.insertBefore(Ls(Yr,ge),w),N(w),F||T},BC=function(w,T,F,z){if(B.isArray(w)){for(var ue=w.length,ge=[];ue--;)ge[ue]=BC(w[ue],T,F,z);return ge}t.collect&&(w===e||w===r)&&f.push([w,T,F,z]);var Ae=v.bind(w,T,F,z||Yr);return Ae},_C=function(w,T,F){if(B.isArray(w)){for(var z=w.length,ue=[];z--;)ue[z]=_C(w[z],T,F);return ue}else{if(f.length>0&&(w===e||w===r))for(var z=f.length;z--;){var ge=f[z];w===ge[0]&&(!T||T===ge[1])&&(!F||F===ge[2])&&v.unbind(ge[0],ge[1],ge[2])}return v.unbind(w,T,F)}},e2=function(w,T,F){return v.fire(w,T,F)},DC=function(w){if(w&&ae(w)){var T=w.getAttribute("data-mce-contenteditable");return T&&T!=="inherit"?T:w.contentEditable!=="inherit"?w.contentEditable:null}else return null},t2=function(w){for(var T=x(),F=null;w&&w!==T&&(F=DC(w),F===null);w=w.parentNode);return F},n2=function(){if(f.length>0)for(var w=f.length;w--;){var T=f[w];v.unbind(T[0],T[1],T[2])}Pe(a,function(F,z){s.unload(z),delete a[z]}),Ce.setDocument&&Ce.setDocument()},r2=function(w,T){if(sf){for(;w;){if(T===w)return!0;w=w.parentNode}return!1}else return w===T||T.contains(w)},a2=function(w){return"startContainer: "+w.startContainer.nodeName+", startOffset: "+w.startOffset+", endContainer: "+w.endContainer.nodeName+", endOffset: "+w.endOffset},Yr={doc:e,settings:t,win:r,files:a,stdMode:o,boxModel:u,styleSheetLoader:s,boundEvents:f,styles:c,schema:l,events:v,isBlock:p,$:m,$$:y,root:null,clone:C,getRoot:x,getViewPort:R,getRect:M,getSize:ee,getParent:V,getParents:L,get:g,getNext:D,getPrev:j,select:fe,is:q,add:Be,create:lt,createHTML:U,createFragment:Z,remove:N,setStyle:ne,getStyle:_,setStyles:W,removeAllAttribs:$,setAttrib:S,setAttribs:me,getAttrib:h,getPos:I,parseStyle:P,serializeStyle:J,addStyle:te,loadCSS:ye,addClass:$e,removeClass:Hn,hasClass:ct,toggleClass:Fe,show:gt,hide:Me,isHidden:Ot,uniqueId:ht,setHTML:qe,getOuterHTML:_n,setOuterHTML:we,decode:xt,encode:O,insertAfter:Ee,replace:Ue,rename:fn,findCommonAncestor:ln,toHex:cn,run:pe,getAttribs:E,isEmpty:Hc,createRng:Vc,nodeIndex:ya,split:JU,bind:BC,unbind:_C,fire:e2,getContentEditable:DC,getContentEditableParent:t2,destroy:n2,isChildOf:r2,dumpRng:a2},OC=TE(c,t,X(Yr));return Yr};xe.DOM=xe(document),xe.nodeIndex=ya;var AE=xe.DOM,ff=B.each,RE=B.grep,BE=0,Qd=1,No=2,Zd=3,$n=function(){function e(t){t===void 0&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return e.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},e.prototype.loadScript=function(t,n,r){var a=AE,i,o=function(){a.remove(f),i&&(i.onerror=i.onload=i=null)},u=function(){o(),n()},s=function(){o(),Oe(r)?r():typeof console!="undefined"&&console.log&&console.log("Failed to load script: "+t)},f=a.uniqueId();i=document.createElement("script"),i.id=f,i.type="text/javascript",i.src=B._addCacheSuffix(t),this.settings.referrerPolicy&&a.setAttrib(i,"referrerpolicy",this.settings.referrerPolicy),i.onload=u,i.onerror=s,(document.getElementsByTagName("head")[0]||document.body).appendChild(i)},e.prototype.isDone=function(t){return this.states[t]===No},e.prototype.markDone=function(t){this.states[t]=No},e.prototype.add=function(t,n,r,a){var i=this.states[t];this.queue.push(t),i===void 0&&(this.states[t]=BE),n&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:n,failure:a,scope:r||this}))},e.prototype.load=function(t,n,r,a){return this.add(t,n,r,a)},e.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},e.prototype.loadQueue=function(t,n,r){this.loadScripts(this.queue,t,n,r)},e.prototype.loadScripts=function(t,n,r,a){var i=this,o=[],u=function(f,l){ff(i.scriptLoadedCallbacks[l],function(c){Oe(c[f])&&c[f].call(c.scope)}),i.scriptLoadedCallbacks[l]=void 0};i.queueLoadedCallbacks.push({success:n,failure:a,scope:r||this});var s=function(){var f=RE(t);if(t.length=0,ff(f,function(c){if(i.states[c]===No){u("success",c);return}if(i.states[c]===Zd){u("failure",c);return}i.states[c]!==Qd&&(i.states[c]=Qd,i.loading++,i.loadScript(c,function(){i.states[c]=No,i.loading--,u("success",c),s()},function(){i.states[c]=Zd,i.loading--,o.push(c),u("failure",c),s()}))}),!i.loading){var l=i.queueLoadedCallbacks.slice(0);i.queueLoadedCallbacks.length=0,ff(l,function(c){o.length===0?Oe(c.success)&&c.success.call(c.scope):Oe(c.failure)&&c.failure.call(c.scope,o)})}};s()},e.ScriptLoader=new e,e}(),dt=function(e){var t=e,n=function(){return t},r=function(a){t=a};return{get:n,set:r}},_E=function(e){return Qr(e)&&de(e,"raw")},DE=function(e){return Vt(e)&&e.length>1},vi={},lf=dt("en"),Jd=function(){return je(vi,lf.get())},OE=function(){return tv(vi,function(e){return ie({},e)})},PE=function(e){e&&lf.set(e)},IE=function(){return lf.get()},$E=function(e,t){var n=vi[e];n||(vi[e]=n={}),Pe(t,function(r,a){n[a.toLowerCase()]=r})},LE=function(e){var t=Jd().getOr({}),n=function(s){return Oe(s)?Object.prototype.toString.call(s):r(s)?"":""+s},r=function(s){return s===""||s===null||s===void 0},a=function(s){var f=n(s);return je(t,f.toLowerCase()).map(n).getOr(f)},i=function(s){return s.replace(/{context:\w+}$/,"")};if(r(e))return"";if(_E(e))return n(e.raw);if(DE(e)){var o=e.slice(1),u=a(e[0]).replace(/\{([0-9]+)\}/g,function(s,f){return de(o,f)?n(o[f]):s});return i(u)}return i(a(e))},FE=function(){return Jd().bind(function(e){return je(e,"_dir")}).exists(function(e){return e==="rtl"})},ME=function(e){return de(vi,e)},rn={getData:OE,setCode:PE,getCode:IE,add:$E,translate:LE,isRtl:FE,hasCode:ME},Rt=function(){var e=[],t={},n={},r=[],a=function(p,g){var y=ve(r,function(h){return h.name===p&&h.state===g});Y(y,function(h){return h.callback()})},i=function(p){if(n[p])return n[p].instance},o=function(p){var g;return n[p]&&(g=n[p].dependencies),g||[]},u=function(p,g){Rt.languageLoad!==!1&&m(p,function(){var y=rn.getCode(),h=","+(g||"")+",";!y||g&&h.indexOf(","+y+",")===-1||$n.ScriptLoader.add(t[p]+"/langs/"+y+".js")},"loaded")},s=function(p,g,y){var h=g;return e.push(h),n[p]={instance:h,dependencies:y},a(p,"added"),h},f=function(p){delete t[p],delete n[p]},l=function(p,g){return typeof g=="object"?g:typeof p=="string"?{prefix:"",resource:g,suffix:""}:{prefix:p.prefix,resource:g,suffix:p.suffix}},c=function(p,g){var y=t[p];Y(g,function(h){$n.ScriptLoader.add(y+"/"+h)})},v=function(p,g,y,h){var E=o(p);Y(E,function(S){var C=l(g,S);d(C.resource,C,void 0,void 0)}),y&&(h?y.call(h):y.call($n))},d=function(p,g,y,h,E){if(!t[p]){var S=typeof g=="string"?g:g.prefix+g.resource+g.suffix;S.indexOf("/")!==0&&S.indexOf("://")===-1&&(S=Rt.baseURL+"/"+S),t[p]=S.substring(0,S.lastIndexOf("/"));var C=function(){a(p,"loaded"),v(p,g,y,h)};n[p]?C():$n.ScriptLoader.add(S,C,h,E)}},m=function(p,g,y){y===void 0&&(y="added"),de(n,p)&&y==="added"||de(t,p)&&y==="loaded"?g():r.push({name:p,state:y,callback:g})};return{items:e,urls:t,lookup:n,_listeners:r,get:i,dependencies:o,requireLangPack:u,add:s,remove:f,createUrl:l,addComponents:c,load:d,waitFor:m}};Rt.languageLoad=!0,Rt.baseURL="",Rt.PluginManager=Rt(),Rt.ThemeManager=Rt();var UE=function(e){var t=dt(b.none()),n=function(){return t.get().each(e)},r=function(){n(),t.set(b.none())},a=function(){return t.get().isSome()},i=function(){return t.get()},o=function(u){n(),t.set(b.some(u))};return{clear:r,isSet:a,get:i,set:o}},Ca=function(){var e=UE(le),t=function(n){return e.get().each(n)};return ie(ie({},e),{on:t})},cf=function(e,t){var n=null,r=function(){Ka(n)||(clearTimeout(n),n=null)},a=function(){for(var i=[],o=0;o0?gn(e,t,r.join(" ")):jn(e,t),!1},To=function(e){return e.dom.classList!==void 0},VE=function(e){return vf(e,"class")},qE=function(e,t){return zE(e,"class",t)},WE=function(e,t){return HE(e,"class",t)},Ao=function(e,t){To(e)?e.dom.classList.add(t):qE(e,t)},jE=function(e){var t=To(e)?e.dom.classList:VE(e);t.length===0&&jn(e,"class")},KE=function(e,t){if(To(e)){var n=e.dom.classList;n.remove(t)}else WE(e,t);jE(e)},tm=function(e,t){return To(e)&&e.dom.classList.contains(t)},nm=function(e,t){var n=[];return Y(jt(e),function(r){t(r)&&(n=n.concat([r])),n=n.concat(nm(r,t))}),n},kt=function(e,t){return q0(t,e)},df=X("mce-annotation"),di=X("data-mce-annotation"),Ro=X("data-mce-annotation-uid"),rm=function(e,t){var n=e.selection.getRng(),r=k.fromDom(n.startContainer),a=k.fromDom(e.getBody()),i=t.fold(function(){return"."+df()},function(f){return"["+di()+'="'+f+'"]'}),o=Yi(r,n.startOffset).getOr(r),u=Ts(o,i,function(f){return Te(f,a)}),s=function(f,l){return yw(f,l)?b.some(ri(f,l)):b.none()};return u.bind(function(f){return s(f,""+Ro()).bind(function(l){return s(f,""+di()).map(function(c){var v=XE(e,l);return{uid:l,name:c,elements:v}})})})},GE=function(e){return Zt(e)&&tm(e,df())},XE=function(e,t){var n=k.fromDom(e.getBody());return kt(n,"["+Ro()+'="'+t+'"]')},YE=function(e,t){var n=k.fromDom(e.getBody()),r=kt(n,"["+di()+'="'+t+'"]'),a={};return Y(r,function(i){var o=ri(i,Ro()),u=je(a,o).getOr([]);a[o]=u.concat([i])}),a},QE=function(e,t){var n=dt({}),r=function(){return{listeners:[],previous:Ca()}},a=function(l,c){i(l,function(v){return c(v),v})},i=function(l,c){var v=n.get(),d=je(v,l).getOrThunk(r),m=c(d);v[l]=m,n.set(v)},o=function(l,c,v){a(l,function(d){Y(d.listeners,function(m){return m(!0,l,{uid:c,nodes:De(v,function(p){return p.dom})})})})},u=function(l){a(l,function(c){Y(c.listeners,function(v){return v(!1,l)})})},s=em(function(){var l=n.get(),c=as(ea(l));Y(c,function(v){i(v,function(d){var m=d.previous.get();return rm(e,b.some(v)).fold(function(){m.isSome()&&(u(v),d.previous.clear())},function(p){var g=p.uid,y=p.name,h=p.elements;no(m,g)||(o(y,g,h),d.previous.set(g))}),{previous:d.previous,listeners:d.listeners}})})},30);e.on("remove",function(){s.cancel()}),e.on("NodeChange",function(){s.throttle()});var f=function(l,c){i(l,function(v){return{previous:v.previous,listeners:v.listeners.concat([c])}})};return{addListener:f}},ZE=function(e,t){var n=function(r){return b.from(r.attr(di())).bind(t.lookup)};e.on("init",function(){e.serializer.addNodeFilter("span",function(r){Y(r,function(a){n(a).each(function(i){i.persistent===!1&&a.unwrap()})})})})},JE=function(){var e={},t=function(r,a){e[r]={name:r,settings:a}},n=function(r){return je(e,r).map(function(a){return a.settings})};return{register:t,lookup:n}},am=0,im=function(e){var t=new Date,n=t.getTime(),r=Math.floor(Math.random()*1e9);return am++,e+"_"+r+am+String(n)},ek=function(e,t){Y(t,function(n){Ao(e,n)})},tk=function(e,t){var n=t||document,r=n.createElement("div");return r.innerHTML=e,jt(k.fromDom(r))},nk=function(e){return De(e,k.fromDom)},rk=function(e){return e.dom.innerHTML},om=function(e,t){var n=Lv(e),r=n.dom,a=k.fromDom(r.createDocumentFragment()),i=tk(t,r);Qi(a,i),bs(e),at(e,a)},um=function(e,t){return k.fromDom(e.dom.cloneNode(t))},wa=function(e){return um(e,!1)},sm=function(e){return um(e,!0)},fm=function(e,t,n){n===void 0&&(n=Re);var r=new Ge(e,t),a=function(i){var o;do o=r[i]();while(o&&!Q(o)&&!n(o));return b.from(o).filter(Q)};return{current:function(){return b.from(r.current()).filter(Q)},next:function(){return a("next")},prev:function(){return a("prev")},prev2:function(){return a("prev2")}}},lm=function(e,t){var n=t||function(o){return e.isBlock(o)||Le(o)||_e(o)},r=function(o,u,s,f){if(Q(o)){var l=f(o,u,o.data);if(l!==-1)return b.some({container:o,offset:l})}return s().bind(function(c){return r(c.container,c.offset,s,f)})},a=function(o,u,s,f){var l=fm(o,f,n);return r(o,u,function(){return l.prev().map(function(c){return{container:c,offset:c.length}})},s).getOrNull()},i=function(o,u,s,f){var l=fm(o,f,n);return r(o,u,function(){return l.next().map(function(c){return{container:c,offset:0}})},s).getOrNull()};return{backwards:a,forwards:i}},Sa=Math.round,_r=function(e){return e?{left:Sa(e.left),top:Sa(e.top),bottom:Sa(e.bottom),right:Sa(e.right),width:Sa(e.width),height:Sa(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},cm=function(e,t){return e=_r(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},ak=function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},vm=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},Ea=function(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-nt.bottom?!1:vm(t.top-e.bottom,e,t)},ka=function(e,t){return e.top>t.bottom?!0:e.bottom=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},ik=function(e,t,n){return Math.min(Math.max(e,t),n)},Bo=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},or=function(e,t){if(ae(e)&&e.hasChildNodes()){var n=e.childNodes,r=ik(t,0,n.length-1);return n[r]}else return e},ok=function(e,t){if(!(t<0&&ae(e)&&e.hasChildNodes()))return or(e,t)},uk=new RegExp("[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2-\u09E3\u0A01-\u0A02\u0A3C\u0A41-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7-\u0AC8\u0ACD\u0AE2-\u0AE3\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B57\u0B62-\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0D01\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62-\u0D63\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C-\u200D\u20D0-\u20DC\u20DD-\u20E0\u20E1\u20E2-\u20E4\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u302E-\u302F\u3099-\u309A\uA66F\uA670-\uA672\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E-\uFF9F]"),mm=function(e){return typeof e=="string"&&e.charCodeAt(0)>=768&&uk.test(e)},sk=function(){for(var e=[],t=0;t0?t=_r(n[0]):t=_r(e.getBoundingClientRect()),!bm(e)&&mf(e)&&ym(t)?dk(e):ym(t)&&bm(e)?mk(e):t},Dr=function(e,t){var n=cm(e,t);return n.width=1,n.right=n.left+1,n},pk=function(e){var t=[],n=function(s){s.height!==0&&(t.length>0&&ak(s,t[t.length-1])||t.push(s))},r=function(s,f){var l=pf(s.ownerDocument);if(f0&&(l.setStart(s,f-1),l.setEnd(s,f),hf(l)||n(Dr(ur(l),!1))),f=e.data.length:t>=e.childNodes.length},i=function(){var l=pf(e.ownerDocument);return l.setStart(e,t),l.setEnd(e,t),l},o=function(){return n||(n=pk(A(e,t))),n},u=function(){return o().length>0},s=function(l){return l&&e===l.container()&&t===l.offset()},f=function(l){return _o(e,l?t-1:t)};return{container:X(e),offset:X(t),toRange:i,getClientRects:o,isVisible:u,isAtStart:r,isAtEnd:a,isEqual:s,getNode:f}};A.fromRangeStart=function(e){return A(e.startContainer,e.startOffset)},A.fromRangeEnd=function(e){return A(e.endContainer,e.endOffset)},A.after=function(e){return A(e.parentNode,hm(e)+1)},A.before=function(e){return A(e.parentNode,hm(e))},A.isAbove=function(e,t){return Et(Pt(t.getClientRects()),wr(e.getClientRects()),Ea).getOr(!1)},A.isBelow=function(e,t){return Et(wr(t.getClientRects()),Pt(e.getClientRects()),ka).getOr(!1)},A.isAtStart=function(e){return e?e.isAtStart():!1},A.isAtEnd=function(e){return e?e.isAtEnd():!1},A.isTextPosition=function(e){return e?Q(e.container()):!1},A.isElementPosition=function(e){return A.isTextPosition(e)===!1};var Do=function(e,t){Q(t)&&t.data.length===0&&e.remove(t)},gk=function(e,t,n){t.insertNode(n),Do(e,n.previousSibling),Do(e,n.nextSibling)},hk=function(e,t,n){var r=b.from(n.firstChild),a=b.from(n.lastChild);t.insertNode(n),r.each(function(i){return Do(e,i.previousSibling)}),a.each(function(i){return Do(e,i.nextSibling)})},bf=function(e,t,n){Es(n)?hk(e,t,n):gk(e,t,n)},an=Q,Cm=xr,wm=xe.nodeIndex,Sm=function(e){var t=e.parentNode;return Cm(t)?Sm(t):t},yf=function(e){return e?Ki(e.childNodes,function(t,n){return Cm(n)&&n.nodeName!=="BR"?t=t.concat(yf(n)):t.push(n),t},[]):[]},bk=function(e,t){for(;(e=e.previousSibling)&&an(e);)t+=e.data.length;return t},Em=function(e){return function(t){return e===t}},yk=function(e){var t,n;t=yf(Sm(e)),n=av(t,Em(e),e),t=t.slice(0,n+1);var r=Ki(t,function(a,i,o){return an(i)&&an(t[o-1])&&a++,a},0);return t=na(t,Kt([e.nodeName])),n=av(t,Em(e),e),n-r},km=function(e){var t;return an(e)?t="text()":t=e.nodeName.toLowerCase(),t+"["+yk(e)+"]"},Ck=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&!(n&&n(t));t=t.parentNode)r.push(t);return r},xm=function(e,t){var n,r,a=[],i,o,u;return n=t.container(),r=t.offset(),an(n)?i=bk(n,r):(o=n.childNodes,r>=o.length?(i="after",r=o.length-1):i="before",n=o[r]),a.push(km(n)),u=Ck(e,n),u=na(u,es(xr)),a=a.concat(ss(u,function(s){return km(s)})),a.reverse().join("/")+","+i},wk=function(e,t,n){var r=yf(e);return r=na(r,function(a,i){return!an(a)||!an(r[i-1])}),r=na(r,Kt([t])),r[n]},Sk=function(e,t){for(var n=e,r=0,a;an(n);){if(a=n.data.length,t>=r&&t<=r+a){e=n,t=t-r;break}if(!an(n.nextSibling)){e=n,t=a;break}r+=a,n=n.nextSibling}return an(e)&&t>e.data.length&&(t=e.data.length),A(e,t)},Nm=function(e,t){var n;if(!t)return null;var r=t.split(","),a=r[0].split("/");n=r.length>1?r[1]:"before";var i=Ki(a,function(o,u){var s=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(u);return s?(s[1]==="text()"&&(s[1]="#text"),wk(o,s[1],parseInt(s[2],10))):null},e);return i?an(i)?Sk(i,parseInt(n,10)):(n==="after"?n=wm(i)+1:n=wm(i),A(i.parentNode,n)):null},Oo=_e,Ek=function(e,t,n){var r,a;for(a=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Q(r);r=r.previousSibling)a+=e(r.data).length;return a},Tm=function(e,t,n,r,a){var i=r[a?"startContainer":"endContainer"],o=r[a?"startOffset":"endOffset"],u=[],s,f=0,l=e.getRoot();for(Q(i)?u.push(n?Ek(t,i,o):o):(s=i.childNodes,o>=s.length&&s.length&&(f=1,o=Math.max(0,s.length-1)),u.push(e.nodeIndex(s[o],n)+f));i&&i!==l;i=i.parentNode)u.push(e.nodeIndex(i,n));return u},kk=function(e,t,n,r){var a=t.dom,i={};return i.start=Tm(a,e,n,r,!0),t.isCollapsed()||(i.end=Tm(a,e,n,r,!1)),bd(r)&&(i.isFakeCaret=!0),i},Cf=function(e,t,n){var r=0;return B.each(e.select(t),function(a){if(a.getAttribute("data-mce-bogus")!=="all"){if(a===n)return!1;r++}}),r},Am=function(e,t){var n,r,a,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],ae(n)&&n.nodeName==="TR"&&(a=n.childNodes,n=a[Math.min(t?r:r-1,a.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))},Rm=function(e){return Am(e,!0),Am(e,!1),e},Bm=function(e,t){var n;if(ae(e)&&(e=or(e,t),Oo(e)))return e;if($t(e)&&(Q(e)&&ca(e)&&(e=e.parentNode),n=e.previousSibling,Oo(n)||(n=e.nextSibling,Oo(n))))return n},xk=function(e){return Bm(e.startContainer,e.startOffset)||Bm(e.endContainer,e.endOffset)},_m=function(e,t,n){var r=n.getNode(),a=r?r.nodeName:null,i=n.getRng();if(Oo(r)||a==="IMG")return{name:a,index:Cf(n.dom,a,r)};var o=xk(i);return o?(a=o.tagName,{name:a,index:Cf(n.dom,a,o)}):kk(e,n,t,i)},Nk=function(e){var t=e.getRng();return{start:xm(e.dom.getRoot(),A.fromRangeStart(t)),end:xm(e.dom.getRoot(),A.fromRangeEnd(t))}},Tk=function(e){return{rng:e.getRng()}},Dm=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,""):e.create("span",r)},Om=function(e,t){var n=e.dom,r=e.getRng(),a=n.uniqueId(),i=e.isCollapsed(),o=e.getNode(),u=o.nodeName;if(u==="IMG")return{name:u,index:Cf(n,u,o)};var s=Rm(r.cloneRange());if(!i){s.collapse(!1);var f=Dm(n,a+"_end",t);bf(n,s,f)}r=Rm(r),r.collapse(!0);var l=Dm(n,a+"_start",t);return bf(n,r,l),e.moveToBookmark({id:a,keep:!0}),{id:a}},Ak=function(e,t,n){return t===2?_m(Xn,n,e):t===3?Nk(e):t?Tk(e):Om(e,!1)},Pm=G(_m,Tt,!0),Rk=xe.DOM,Bk="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow",Im=function(e,t,n){var r=e.getParam(t,n);if(r.indexOf("=")!==-1){var a=e.getParam(t,"","hash");return je(a,e.id).getOr(n)}else return r},_k=function(e){return e.getParam("iframe_attrs",{})},Dk=function(e){return e.getParam("doctype","")},Ok=function(e){return e.getParam("document_base_url","")},Pk=function(e){return Im(e,"body_id","tinymce")},Ik=function(e){return Im(e,"body_class","")},$m=function(e){return e.getParam("content_security_policy","")},$k=function(e){return e.getParam("br_in_pre",!0)},ft=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return t===!1?"":t===!0?"p":t},gi=function(e){return e.getParam("forced_root_block_attrs",{})},Lk=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},Fk=function(e){return e.getParam("no_newline_selector","")},Mk=function(e){return e.getParam("keep_styles",!0)},Uk=function(e){return e.getParam("end_container_on_empty_block",!1)},zk=function(e){return B.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},Hk=function(e){return B.explode(e.getParam("font_size_classes",""))},Vk=function(e){return e.getParam("images_dataimg_filter",We,"function")},Lm=function(e){return e.getParam("automatic_uploads",!0,"boolean")},qk=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Wk=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Fm=function(e){return e.getParam("icons","","string")},jk=function(e){return e.getParam("icons_url","","string")},Kk=function(e){return e.getParam("images_upload_url","","string")},Gk=function(e){return e.getParam("images_upload_base_path","","string")},Xk=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Yk=function(e){return e.getParam("images_upload_handler",null,"function")},Qk=function(e){return e.getParam("content_css_cors",!1,"boolean")},Mm=function(e){return e.getParam("referrer_policy","","string")},Um=function(e){return e.getParam("language","en","string")},Zk=function(e){return e.getParam("language_url","","string")},zm=function(e){return e.getParam("indent_use_margin",!1)},Jk=function(e){return e.getParam("indentation","40px","string")},ex=function(e){var t=e.getParam("content_css");return He(t)?De(t.split(","),vs):Vt(t)?t:t===!1||e.inline?[]:["default"]},Hm=function(e){var t=e.getParam("font_css",[]);return Vt(t)?t:De(t.split(","),vs)},tx=function(e){return e.getParam("directionality",rn.isRtl()?"rtl":void 0)},nx=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Vm=function(e){var t=e.getParam("object_resizing");return t===!1||se.iOS?!1:He(t)?t:"table,img,figure.image,div,video,iframe"},rx=function(e){return e.getParam("resize_img_proportional",!0,"boolean")},ax=function(e){return e.getParam("placeholder",Rk.getAttrib(e.getElement(),"placeholder"),"string")},qm=function(e){return e.getParam("event_root")},ix=function(e){return e.getParam("service_message")},hi=function(e){return e.getParam("theme")},ox=function(e){return e.getParam("validate")},bi=function(e){return e.getParam("inline_boundaries")!==!1},ux=function(e){return e.getParam("formats")},sx=function(e){var t=e.getParam("preview_styles",Bk);return He(t)?t:""},fx=function(e){return e.getParam("format_empty_lines",!1,"boolean")},lx=function(e){return e.getParam("custom_ui_selector","","string")},cx=function(e){return e.getParam("theme_url")},vx=function(e){return e.getParam("inline")},dx=function(e){return e.getParam("hidden_input")},mx=function(e){return e.getParam("submit_patch")},px=function(e){return e.getParam("encoding")==="xml"},gx=function(e){return e.getParam("add_form_submit_trigger")},hx=function(e){return e.getParam("add_unload_trigger")},bx=function(e){return ft(e)!==""},yx=function(e){return e.getParam("custom_undo_redo_levels",0,"number")},Cx=function(e){return e.getParam("disable_nodechange")},wx=function(e){return e.getParam("readonly")},Sx=function(e){return e.getParam("content_css_cors")},wf=function(e){return e.getParam("plugins","","string")},Ex=function(e){return e.getParam("external_plugins")},kx=function(e){return e.getParam("block_unsupported_drop",!0,"boolean")},xx=function(e){return e.getParam("visual",!0,"boolean")},Nx=function(e){return e.getParam("visual_table_class","mce-item-table","string")},Tx=function(e){return e.getParam("visual_anchor_class","mce-item-anchor","string")},Ax=function(e){return e.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")},Rx=ae,Wm=Q,jm=function(e){var t=e.parentNode;t&&t.removeChild(e)},Km=function(e){var t=Xn(e);return{count:e.length-t.length,text:t}},Gm=function(e){for(var t;(t=e.data.lastIndexOf(nt))!==-1;)e.deleteData(t,1)},Xm=function(e,t){return Or(e),t},Bx=function(e,t){var n=Km(e.data.substr(0,t.offset())),r=Km(e.data.substr(t.offset())),a=n.text+r.text;return a.length>0?(Gm(e),A(e,t.offset()-n.count)):t},_x=function(e,t){var n=t.container(),r=GC(dn(n.childNodes),e).map(function(a){return a0&&(n&&(s*=-1),r.left+=s,r.right+=s),r},Mx=function(e){for(var t=kt(k.fromDom(e),Fx),n=0;n0?u:"p",f=function(p,g){var y;if(l(),Lx(g))return null;if(n(g)){o=iS(s,g,p);var h=Ym(t,g,p);oe(o).css("top",h.top);var E=oe('
').css(ie({},h)).appendTo(t)[0];a.set({caret:E,element:g,before:p}),p&&oe(E).addClass("mce-visual-caret-before"),c(),y=g.ownerDocument.createRange(),y.setStart(o,0),y.setEnd(o,0)}else return o=rS(g,p),y=g.ownerDocument.createRange(),yi(o.nextSibling)?(y.setStart(o,0),y.setEnd(o,0)):(y.setStart(o,1),y.setEnd(o,1)),y;return y},l=function(){Mx(t),o&&(Or(o),o=null),a.on(function(p){oe(p.caret).remove(),a.clear()}),i&&(ot.clearInterval(i),i=void 0)},c=function(){i=ot.setInterval(function(){r()?oe("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden"):oe("div.mce-visual-caret",t).addClass("mce-visual-caret-hidden")},500)},v=function(){a.on(function(p){var g=Ym(t,p.element,p.before);oe(p.caret).css(ie({},g))})},d=function(){return ot.clearInterval(i)},m=function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"};return{show:f,hide:l,getCss:m,reposition:v,destroy:d}},Qm=function(){return Sf.isIE()||Sf.isEdge()||Sf.isFirefox()},yi=function(e){return Ix(e)||$x(e)},Pr=function(e){return yi(e)||oa(e)&&Qm()},Ef=_e,zx=Gt,Hx=eo("display","block table table-cell table-caption list-item"),Zm=$t,Jm=ca,ep=ae,Vx=bn,xa=function(e){return e>0},Ir=function(e){return e<0},Po=function(e,t){for(var n;n=e(t);)if(!Jm(n))return n;return null},Na=function(e,t,n,r,a){var i=new Ge(e,r),o=Ef(e)||Jm(e);if(Ir(t)){if(o&&(e=Po(i.prev.bind(i),!0),n(e)))return e;for(;e=Po(i.prev.bind(i),a);)if(n(e))return e}if(xa(t)){if(o&&(e=Po(i.next.bind(i),!0),n(e)))return e;for(;e=Po(i.next.bind(i),a);)if(n(e))return e}return null},sr=function(e,t){for(;e&&e!==t;){if(Hx(e))return e;e=e.parentNode}return null},wn=function(e,t,n){return sr(e.container(),n)===sr(t.container(),n)},kf=function(e,t){if(!t)return null;var n=t.container(),r=t.offset();return ep(n)?n.childNodes[r+e]:null},tp=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},qx=function(e,t,n){return sr(t,e)===sr(n,e)},np=function(e,t,n){for(var r=e?"previousSibling":"nextSibling";n&&n!==t;){var a=n[r];if(Zm(a)&&(a=a[r]),Ef(a)||zx(a)){if(qx(t,a,n))return a;break}if(Vx(a))break;n=n.parentNode}return null},Ci=G(tp,!0),wi=G(tp,!1),xf=function(e,t,n){var r,a=G(np,!0,t),i=G(np,!1,t),o=n.startContainer,u=n.startOffset;if(ca(o)){ep(o)||(o=o.parentNode);var s=o.getAttribute("data-mce-caret");if(s==="before"&&(r=o.nextSibling,Pr(r)))return Ci(r);if(s==="after"&&(r=o.previousSibling,Pr(r)))return wi(r)}if(!n.collapsed)return n;if(Q(o)){if(Zm(o)){if(e===1){if(r=i(o),r)return Ci(r);if(r=a(o),r)return wi(r)}if(e===-1){if(r=a(o),r)return wi(r);if(r=i(o),r)return Ci(r)}return n}if(co(o)&&u>=o.data.length-1)return e===1&&(r=i(o),r)?Ci(r):n;if(lo(o)&&u<=1)return e===-1&&(r=a(o),r)?wi(r):n;if(u===o.data.length)return r=i(o),r?Ci(r):n;if(u===0)return r=a(o),r?wi(r):n}return n},rp=function(e,t){return b.from(kf(e?0:-1,t)).filter(Ef)},Si=function(e,t,n){var r=xf(e,t,n);return e===-1?A.fromRangeStart(r):A.fromRangeEnd(r)},Io=function(e){return b.from(e.getNode()).map(k.fromDom)},Wx=function(e){return b.from(e.getNode(!0)).map(k.fromDom)},Nf=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},$o=function(e,t){var n=wn(e,t);return!n&&Le(e.getNode())?!0:n},Qe;(function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"})(Qe||(Qe={}));var jx=_e,Sn=Q,ap=ae,Tf=Le,Ta=bn,ip=gS,Lo=vo,Kx=function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n},op=function(e,t){return e.hasChildNodes()&&t0)return A(u,--s);if(xa(e)&&s0&&(a=op(u,s-1),Ta(a)))return!ip(a)&&(i=Na(a,e,Lo,a),i)?Sn(i)?A(i,i.data.length):A.after(i):Sn(a)?A(a,a.data.length):A.before(a);if(xa(e)&&s=1;i--){if(s=o.childNodes,pp(f,o,r))return!0;if(a[i]>s.length-1)return pp(f,o,r)?!0:o1(o,r);o=s[a[i]]}o.nodeType===3&&(u=Math.min(a[0],o.nodeValue.length)),o.nodeType===1&&(u=Math.min(a[0],o.childNodes.length)),t?r.setStart(o,u):r.setEnd(o,u)}return!0},Rf=function(e){return Q(e)&&e.data.length>0},hp=function(e,t,n){var r=e.get(n.id+"_"+t),a,i,o,u,s=n.keep,f,l;if(r){if(a=r.parentNode,t==="start"?(s?r.hasChildNodes()?(a=r.firstChild,i=1):Rf(r.nextSibling)?(a=r.nextSibling,i=0):Rf(r.previousSibling)?(a=r.previousSibling,i=r.previousSibling.data.length):(a=r.parentNode,i=e.nodeIndex(r)+1):i=e.nodeIndex(r),f=a,l=i):(s?r.hasChildNodes()?(a=r.firstChild,i=1):Rf(r.previousSibling)?(a=r.previousSibling,i=r.previousSibling.data.length):(a=r.parentNode,i=e.nodeIndex(r)):i=e.nodeIndex(r),f=a,l=i),!s){for(u=r.previousSibling,o=r.nextSibling,B.each(B.grep(r.childNodes),function(c){Q(c)&&(c.nodeValue=c.nodeValue.replace(/\uFEFF/g,""))});r=e.get(n.id+"_"+t);)e.remove(r,!0);u&&o&&u.nodeType===o.nodeType&&Q(u)&&!se.opera&&(i=u.nodeValue.length,u.appendData(o.nodeValue),e.remove(o),f=u,l=i)}return b.some(A(f,l))}else return b.none()},u1=function(e,t){var n=e.createRng();return gp(e,!0,t,n)&&gp(e,!1,t,n)?b.some(n):b.none()},s1=function(e,t){var n=hp(e,"start",t),r=hp(e,"end",t);return Et(n,r.or(n),function(a,i){var o=e.createRng();return o.setStart(mp(e,a.container()),a.offset()),o.setEnd(mp(e,i.container()),i.offset()),o})},f1=function(e,t){return b.from(e.select(t.name)[t.index]).map(function(n){var r=e.createRng();return r.selectNode(n),r})},l1=function(e,t){var n=e.dom;if(t){if(dp(t))return u1(n,t);if(Jx(t))return b.some(r1(n,t));if(t1(t))return s1(n,t);if(n1(t))return f1(n,t);if(e1(t))return b.some(t.rng)}return b.none()},c1=function(e,t,n){return Ak(e,t,n)},v1=function(e,t){l1(e,t).each(function(n){e.setRng(n)})},Ut=function(e){return ae(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark"},d1=function(e){return function(t){return e===t}},Ei=d1(At),Ra=function(e){return e!==""&&` \f \r \v`.indexOf(e)!==-1},Bf=function(e){return!Ra(e)&&!Ei(e)},Mo=function(e){return!!e.nodeType},m1=function(e){return e&&/^(IMG)$/.test(e.nodeName)},bp=function(e,t,n){var r=n.startOffset,a=n.startContainer;if(!(a===n.endContainer&&m1(a.childNodes[r]))&&ae(a)){var i=a.childNodes,o=void 0;r1&&i.charAt(0)==="%"};return bt(["styles","attributes"],function(i){return je(r,i).exists(function(o){var u=Vt(o)?o:t0(o);return bt(u,a)})})};return bt(e.formatter.get(t),n)},h1=function(e,t,n){var r=["inline","block","selector","attributes","styles","classes"],a=function(i){return Xa(i,function(o,u){return bt(r,function(s){return s===u})})};return bt(e.formatter.get(t),function(i){var o=a(i);return bt(e.formatter.get(n),function(u){var s=a(u);return n0(o,s)})})},Nn=function(e){return ta(e,"block")},Bt=function(e){return ta(e,"selector")},Ze=function(e){return ta(e,"inline")},b1=function(e){return Bt(e)&&Ze(e)&&no(je(e,"mixed"),!0)},$f=function(e){return Bt(e)&&e.expand!==!1&&!Ze(e)},_a=Ut,Cp=zo,wp=Of,y1=Df,C1=function(e){return Le(e)&&e.getAttribute("data-mce-bogus")&&!e.nextSibling},Sp=function(e,t){for(var n=t;n;){if(ae(n)&&e.getContentEditable(n))return e.getContentEditable(n)==="false"?n:t;n=n.parentNode}return t},Ep=function(e,t,n,r){for(var a=t.data,i=n;e?i>=0:i0:r=g.data.length&&p.splice(0,1);var y=p[p.length-1];return i===0&&p.length>0&&y===o&&Q(y)&&p.splice(p.length-1,1),p},s=function(p,g,y){for(var h=[];p&&p!==y;p=p[g])h.push(p);return h},f=function(p,g){return e.getParent(p,function(y){return y.parentNode===g},g)},l=function(p,g,y){for(var h=y?"nextSibling":"previousSibling",E=p,S=E.parentNode;E&&E!==g;E=S){S=E.parentNode;var C=s(E===p?E:E[h],h);C.length&&(y||C.reverse(),n(u(C)))}};if(a===o)return n(u([a]));var c=e.findCommonAncestor(a,o);if(e.isChildOf(a,o))return l(a,c,!0);if(e.isChildOf(o,a))return l(o,c);var v=f(a,c)||a,d=f(o,c)||o;l(a,v,!0);var m=s(v===a?v:v.nextSibling,"nextSibling",d===o?d.nextSibling:d);m.length&&n(u(m)),l(o,d)},Lf=function(e){var t=[];if(e)for(var n=0;n1},x1=function(e){return ve(E1(e),uo)},N1=function(e){return kt(e,"td[data-mce-selected],th[data-mce-selected]")},Rp=function(e,t){var n=N1(t);return n.length>0?n:x1(e)},Oa=function(e){return Rp(Lf(e.selection.getSel()),k.fromDom(e.getBody()))},xi=function(e,t){return io(e,"table",t)},T1=function(e){var t=e.startContainer,n=e.startOffset;return Q(t)?n===0?b.some(k.fromDom(t)):b.none():b.from(t.childNodes[n]).map(k.fromDom)},A1=function(e){var t=e.endContainer,n=e.endOffset;return Q(t)?n===t.data.length?b.some(k.fromDom(t)):b.none():b.from(t.childNodes[n-1]).map(k.fromDom)},Bp=function(e){return zv(e).fold(X([e]),function(t){return[e].concat(Bp(t))})},Ff=function(e){return gs(e).fold(X([e]),function(t){return Ke(t)==="br"?Er(t).map(function(n){return[e].concat(Ff(n))}).getOr([]):[e].concat(Ff(t))})},Mf=function(e,t){return Et(T1(t),A1(t),function(n,r){var a=et(Bp(e),G(Te,n)),i=et(Ff(e),G(Te,r));return a.isSome()&&i.isSome()}).getOr(!1)},Uf=function(e,t,n,r){var a=n,i=new Ge(n,a),o=Xa(e.schema.getMoveCaretBeforeOnEnterElements(),function(u,s){return!Je(["td","th","table"],s.toLowerCase())});do{if(Q(n)&&B.trim(n.nodeValue).length!==0){r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length);return}if(o[n.nodeName]){r?t.setStartBefore(n):n.nodeName==="BR"?t.setEndBefore(n):t.setEndAfter(n);return}}while(n=r?i.next():i.prev());a.nodeName==="BODY"&&(r?t.setStart(a,0):t.setEnd(a,a.childNodes.length))},Vo=function(e){var t=e.selection.getSel();return t&&t.rangeCount>0},zf=function(e,t){var n=Oa(e);n.length>0?Y(n,function(r){var a=r.dom,i=e.dom.createRng();i.setStartBefore(a),i.setEndAfter(a),t(i,!0)}):t(e.selection.getRng(),!1)},Hf=function(e,t,n){var r=Om(e,t);n(r),e.moveToBookmark(r)},R1=function(e,t){var n=function(i){if(!e(i))throw new Error("Can only get "+t+" value of a "+t+" node");return r(i).getOr("")},r=function(i){return e(i)?b.from(i.dom.nodeValue):b.none()},a=function(i,o){if(!e(i))throw new Error("Can only set raw "+t+" value of a "+t+" node");i.dom.nodeValue=o};return{get:n,getOption:r,set:a}},B1=R1(Wt,"text"),Vf=function(e){return B1.get(e)},_1=function(e){return Wt(e)&&Vf(e)===nt},D1=function(e,t,n,r){return Jt(t).fold(function(){return"skipping"},function(a){return r==="br"||_1(t)?"valid":GE(t)?"existing":xn(t.dom)?"caret":!Ba(e,n,r)||!Ba(e,Ke(a),n)?"invalid-child":"valid"})},O1=function(e,t){var n=Da(e,t,[{inline:"span"}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)},_p=function(e,t,n,r){var a=t.uid,i=a===void 0?im("mce-annotation"):a,o=a0(t,["uid"]),u=k.fromTag("span",e);Ao(u,df()),gn(u,""+Ro(),i),gn(u,""+di(),n);var s=r(i,o),f=s.attributes,l=f===void 0?{}:f,c=s.classes,v=c===void 0?[]:c;return Wn(u,l),ek(u,v),u},P1=function(e,t,n,r,a){var i=[],o=_p(e.getDoc(),a,n,r),u=Ca(),s=function(){u.clear()},f=function(){return u.get().getOrThunk(function(){var d=wa(o);return i.push(d),u.set(d),d})},l=function(d){Y(d,c)},c=function(d){var m=D1(e,d,"span",Ke(d));switch(m){case"invalid-child":{s();var p=jt(d);l(p),s();break}case"valid":{var g=f();uw(d,g);break}}},v=function(d){var m=De(d,k.fromDom);l(m)};return ki(e.dom,t,function(d){s(),v(d)}),i},I1=function(e,t,n,r){e.undoManager.transact(function(){var a=e.selection,i=a.getRng(),o=Oa(e).length>0;if(i.collapsed&&!o&&O1(e,i),a.getRng().collapsed&&!o){var u=_p(e.getDoc(),r,t,n.decorate);om(u,At),a.getRng().insertNode(u.dom),a.select(u.dom)}else Hf(a,!1,function(){zf(e,function(s){P1(e,s,t,n.decorate,r)})})})},Dp=function(e){var t=JE();ZE(e,t);var n=QE(e);return{register:function(r,a){t.register(r,a)},annotate:function(r,a){t.lookup(r).each(function(i){I1(e,r,i,a)})},annotationChanged:function(r,a){n.addListener(r,a)},remove:function(r){rm(e,b.some(r)).each(function(a){var i=a.elements;Y(i,jv)})},getAll:function(r){var a=YE(e,r);return tv(a,function(i){return De(i,function(o){return o.dom})})}}},Ni=function(e){return{getBookmark:G(c1,e),moveToBookmark:G(v1,e)}};Ni.isBookmarkNode=Ut;var Pa=function(e,t){for(;t&&t!==e;){if(pn(t)||_e(t))return t;t=t.parentNode}return null},qf=function(e,t,n){if(n.collapsed)return!1;if(se.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(ae(r))return bt(r.getClientRects(),function(a){return dm(a,e,t)})}return bt(n.getClientRects(),function(a){return dm(a,e,t)})},$1=function(e,t){return e.fire("PreProcess",t)},L1=function(e,t){return e.fire("PostProcess",t)},F1=function(e){return e.fire("remove")},M1=function(e){return e.fire("detach")},U1=function(e,t){return e.fire("SwitchMode",{mode:t})},z1=function(e,t,n,r,a){e.fire("ObjectResizeStart",{target:t,width:n,height:r,origin:a})},H1=function(e,t,n,r,a){e.fire("ObjectResized",{target:t,width:n,height:r,origin:a})},V1=function(e){return e.fire("PreInit")},q1=function(e){return e.fire("PostRender")},W1=function(e){return e.fire("Init")},j1=function(e,t){return e.fire("PlaceholderToggle",{state:t})},Op=function(e,t,n){return e.fire(t,n)},Pp=function(e,t,n,r){return e.fire("FormatApply",{format:t,node:n,vars:r})},Wf=function(e,t,n,r){return e.fire("FormatRemove",{format:t,node:n,vars:r})},re={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||re.metaKeyPressed(e)},metaKeyPressed:function(e){return se.mac?e.metaKey:e.ctrlKey&&!e.altKey}},K1=_e,Ip=function(e,t){var n="data-mce-selected",r=t.dom,a=B.each,i,o,u,s,f,l,c,v,d,m,p,g,y,h,E,S=t.getDoc(),C=document,x=Math.abs,R=Math.round,I=t.getBody(),ne,W,_={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},ee=function(N){return N&&(N.nodeName==="IMG"||t.dom.is(N,"figure.image"))},M=function(N){return Gt(N)||r.hasClass(N,"mce-preview-object")},q=function(N,$){if(N.type==="longpress"||N.type.indexOf("touch")===0){var P=N.touches[0];return ee(N.target)&&!qf(P.clientX,P.clientY,$)}else return ee(N.target)&&!qf(N.clientX,N.clientY,$)},L=function(N){var $=N.target;q(N,t.selection.getRng())&&!N.isDefaultPrevented()&&t.selection.select($)},V=function(N){return r.is(N,"figure.image")?[N.querySelector("img")]:r.hasClass(N,"mce-preview-object")&&Ne(N.firstElementChild)?[N,N.firstElementChild]:[N]},K=function(N){var $=Vm(t);return!$||N.getAttribute("data-mce-resize")==="false"||N===t.getBody()?!1:r.hasClass(N,"mce-preview-object")?ra(k.fromDom(N.firstElementChild),$):ra(k.fromDom(N),$)},D=function(N){return M(N)?r.create("img",{src:se.transparentSrc}):N.cloneNode(!0)},j=function(N,$,P){if(Ne(P)){var J=V(N);Y(J,function(te){te.style[$]||!t.schema.isValid(te.nodeName.toLowerCase(),$)?r.setStyle(te,$,P):r.setAttrib(te,$,""+P)})}},fe=function(N,$,P){j(N,"width",$),j(N,"height",P)},pe=function(N){var $,P,J,te,ye;$=N.screenX-l,P=N.screenY-c,h=$*s[2]+m,E=P*s[3]+p,h=h<5?5:h,E=E<5?5:E,(ee(i)||M(i))&&rx(t)!==!1?J=!re.modifierPressed(N):J=re.modifierPressed(N),J&&(x($)>x(P)?(E=R(h*g),h=R(E/g)):(h=R(E/g),E=R(h*g))),fe(o,h,E),te=s.startPos.x+$,ye=s.startPos.y+P,te=te>0?te:0,ye=ye>0?ye:0,r.setStyles(u,{left:te,top:ye,display:"block"}),u.innerHTML=h+" × "+E,s[2]<0&&o.clientWidth<=h&&r.setStyle(o,"left",v+(m-h)),s[3]<0&&o.clientHeight<=E&&r.setStyle(o,"top",d+(p-E)),$=I.scrollWidth-ne,P=I.scrollHeight-W,$+P!==0&&r.setStyles(u,{left:te-$,top:ye-P}),y||(z1(t,i,m,p,"corner-"+s.name),y=!0)},me=function(){var N=y;y=!1,N&&(j(i,"width",h),j(i,"height",E)),r.unbind(S,"mousemove",pe),r.unbind(S,"mouseup",me),C!==S&&(r.unbind(C,"mousemove",pe),r.unbind(C,"mouseup",me)),r.remove(o),r.remove(u),r.remove(f),qe(i),N&&(H1(t,i,h,E,"corner-"+s.name),r.setAttrib(i,"style",r.getAttrib(i,"style"))),t.nodeChanged()},qe=function(N){O();var $=r.getPos(N,I),P=$.x,J=$.y,te=N.getBoundingClientRect(),ye=te.width||te.right-te.left,Fe=te.height||te.bottom-te.top;i!==N&&(Be(),i=N,h=E=0);var $e=t.fire("ObjectSelected",{target:N}),Hn=r.getAttrib(i,n,"1");K(N)&&!$e.isDefaultPrevented()?a(_,function(ct,gt){var Me,Ot=function(ht){var _n=V(i)[0];l=ht.screenX,c=ht.screenY,m=_n.clientWidth,p=_n.clientHeight,g=p/m,s=ct,s.name=gt,s.startPos={x:ye*ct[0]+P,y:Fe*ct[1]+J},ne=I.scrollWidth,W=I.scrollHeight,f=r.add(I,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),r.setStyles(f,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),o=D(i),r.addClass(o,"mce-clonedresizable"),r.setAttrib(o,"data-mce-bogus","all"),o.contentEditable="false",r.setStyles(o,{left:P,top:J,margin:0}),fe(o,ye,Fe),o.removeAttribute(n),I.appendChild(o),r.bind(S,"mousemove",pe),r.bind(S,"mouseup",me),C!==S&&(r.bind(C,"mousemove",pe),r.bind(C,"mouseup",me)),u=r.add(I,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},m+" × "+p)};Me=r.get("mceResizeHandle"+gt),Me&&r.remove(Me),Me=r.add(I,"div",{id:"mceResizeHandle"+gt,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+gt+"-resize; margin:0; padding:0"}),se.ie===11&&(Me.contentEditable=!1),r.bind(Me,"mousedown",function(ht){ht.stopImmediatePropagation(),ht.preventDefault(),Ot(ht)}),ct.elm=Me,r.setStyles(Me,{left:ye*ct[0]+P-Me.offsetWidth/2,top:Fe*ct[1]+J-Me.offsetHeight/2})}):Be(),r.getAttrib(i,n)||i.setAttribute(n,Hn)},Be=function(){O(),i&&i.removeAttribute(n),Pe(_,function(N,$){var P=r.get("mceResizeHandle"+$);P&&(r.unbind(P),r.remove(P))})},lt=function(N){var $,P,J=function(te,ye){if(te)do if(te===ye)return!0;while(te=te.parentNode)};if(!(y||t.removed)){if(a(r.select("img[data-mce-selected],hr[data-mce-selected]"),function(te){te.removeAttribute(n)}),P=N.type==="mousedown"?N.target:e.getNode(),P=r.$(P).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],J(P,I)&&(U(),$=e.getStart(!0),J($,P)&&J(e.getEnd(!0),P))){qe(P);return}Be()}},xt=function(N){return K1(Pa(t.getBody(),N))},O=function(){Pe(_,function(N){N.elm&&(r.unbind(N.elm),delete N.elm)})},U=function(){try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};t.on("init",function(){if(U(),se.browser.isIE()||se.browser.isEdge()){t.on("mousedown click",function(P){var J=P.target,te=J.nodeName;!y&&/^(TABLE|IMG|HR)$/.test(te)&&!xt(J)&&(P.button!==2&&t.selection.select(J,te==="TABLE"),P.type==="mousedown"&&t.nodeChanged())});var N=function(P){var J=function(te){ot.setEditorTimeout(t,function(){return t.selection.select(te)})};if(xt(P.target)||Gt(P.target)){P.preventDefault(),J(P.target);return}/^(TABLE|IMG|HR)$/.test(P.target.nodeName)&&(P.preventDefault(),P.target.tagName==="IMG"&&J(P.target))};r.bind(I,"mscontrolselect",N),t.on("remove",function(){return r.unbind(I,"mscontrolselect",N)})}var $=ot.throttle(function(P){t.composing||lt(P)});t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",$),t.on("keyup compositionend",function(P){i&&i.nodeName==="TABLE"&&$(P)}),t.on("hide blur",Be),t.on("contextmenu longpress",L,!0)}),t.on("remove",O);var Z=function(){i=o=f=null};return{isResizable:K,showResizeRect:qe,hideResizeRect:Be,updateResizeRect:lt,destroy:Z}},G1=function(e){return pn(e)||_e(e)},X1=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},Y1=function(e,t,n){var r,a=n.elementFromPoint(e,t),i=n.body.createTextRange();if((!a||a.tagName==="HTML")&&(a=n.body),i.moveToElementText(a),r=B.toArray(i.getClientRects()),r=r.sort(function(o,u){return o=Math.abs(Math.max(o.top-t,o.bottom-t)),u=Math.abs(Math.max(u.top-t,u.bottom-t)),o-u}),r.length>0){t=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(e,t),i.collapse(!0),i}catch{}}return null},Q1=function(e,t){var n=e&&e.parentElement?e.parentElement():null;return _e(X1(n,t,G1))?null:e},jf=function(e,t,n){var r,a,i=n;if(i.caretPositionFromPoint)a=i.caretPositionFromPoint(e,t),a&&(r=n.createRange(),r.setStart(a.offsetNode,a.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch{r=Y1(e,t,n)}return Q1(r,n.body)}return r},Kf=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},Z1=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},$p=function(e,t,n){return Z1(e,t,n)!==null},J1=function(e,t,n){return $p(e,t,function(r){return r.nodeName===n})},Gf=function(e){return e&&e.nodeName==="TABLE"},eN=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},tN=function(e,t){return $t(e)&&$p(e,t,xn)===!1},Lp=function(e,t,n){for(var r=new Ge(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Le(t))return!0},nN=function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t},rN=function(e,t){for(;t&&t!==e;){if(_e(t))return!0;t=t.parentNode}return!1},Xf=function(e,t,n,r,a){var i,o=e.getRoot(),u,s=e.schema.getNonEmptyElements(),f=e.getParent(a.parentNode,e.isBlock)||o;if(r&&Le(a)&&t&&e.isEmpty(f))return b.some(A(a.parentNode,e.nodeIndex(a)));for(var l=new Ge(a,f);u=l[r?"prev":"next"]();){if(e.getContentEditableParent(u)==="false"||tN(u,o))return b.none();if(Q(u)&&u.nodeValue.length>0)return J1(u,o,"A")===!1?b.some(A(u,r?u.nodeValue.length:0)):b.none();if(e.isBlock(u)||s[u.nodeName.toLowerCase()])return b.none();i=u}return n&&i?b.some(A(i,0)):b.none()},Fp=function(e,t,n,r){var a,i,o=e.getRoot(),u,s,f=!1;a=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var l=ae(a)&&i===a.childNodes.length,c=e.schema.getNonEmptyElements();if(s=n,$t(a))return b.none();if(ae(a)&&i>a.childNodes.length-1&&(s=!1),Ss(a)&&(a=o,i=0),a===o){if(s&&(u=a.childNodes[i>0?i-1:0],u&&($t(u)||c[u.nodeName]||Gf(u))))return b.none();if(a.hasChildNodes()){if(i=Math.min(!s&&i>0?i-1:i,a.childNodes.length-1),a=a.childNodes[i],i=Q(a)&&l?a.data.length:0,!t&&a===o.lastChild&&Gf(a)||rN(o,a)||$t(a))return b.none();if(a.hasChildNodes()&&Gf(a)===!1){u=a;var v=new Ge(a,o);do{if(_e(u)||$t(u)){f=!1;break}if(Q(u)&&u.nodeValue.length>0){i=s?0:u.nodeValue.length,a=u,f=!0;break}if(c[u.nodeName.toLowerCase()]&&!eN(u)){i=e.nodeIndex(u),a=u.parentNode,s||i++,f=!0;break}}while(u=s?v.next():v.prev())}}}return t&&(Q(a)&&i===0&&Xf(e,l,t,!0,a).each(function(d){a=d.container(),i=d.offset(),f=!0}),ae(a)&&(u=a.childNodes[i],u||(u=a.childNodes[i-1]),u&&Le(u)&&!nN(u,"A")&&!Lp(e,u,!1)&&!Lp(e,u,!0)&&Xf(e,l,t,!0,u).each(function(d){a=d.container(),i=d.offset(),f=!0}))),s&&!t&&Q(a)&&i===a.nodeValue.length&&Xf(e,l,t,!1,a).each(function(d){a=d.container(),i=d.offset(),f=!0}),f?b.some(A(a,i)):b.none()},qo=function(e,t){var n=t.collapsed,r=t.cloneRange(),a=A.fromRangeStart(t);return Fp(e,n,!0,r).each(function(i){(!n||!A.isAbove(a,i))&&r.setStart(i.container(),i.offset())}),n||Fp(e,n,!1,r).each(function(i){r.setEnd(i.container(),i.offset())}),n&&r.collapse(!0),Kf(t,r)?b.none():b.some(r)},Wo=function(e,t){return e.splitText(t)},jo=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,a=e.endOffset;return t===r&&Q(t)?n>0&&nn?(a=a-n,t=r=Wo(r,a).previousSibling,a=r.nodeValue.length,n=0):a=0):(Q(t)&&n>0&&n0&&al?s-l:0;return c};return{set:n,get:r,getOuter:a,aggregate:i,max:o}},iN=aN("height",function(e){var t=e.dom;return ti(e)?t.getBoundingClientRect().height:t.offsetHeight}),oN=function(e){return iN.get(e)},Mp=function(e,t){var n=e.view(t);return n.fold(X([]),function(r){var a=e.owner(r),i=Mp(e,a);return[r].concat(i)})},uN=function(e,t){var n=t.owner(e);return Mp(t,n)},sN=function(e){var t,n=e.dom===document?b.none():b.from((t=e.dom.defaultView)===null||t===void 0?void 0:t.frameElement);return n.map(k.fromDom)},fN=function(e){return aa(e)},lN=Object.freeze({__proto__:null,view:sN,owner:fN}),cN=function(e){var t=k.fromDom(document),n=Cs(t),r=uN(e,lN),a=ys(e),i=Qc(r,function(o,u){var s=ys(u);return{left:o.left+s.left,top:o.top+s.top}},{left:0,top:0});return ia(i.left+a.left+n.left,i.top+a.top+n.top)},Yf=function(e){return Ke(e)==="textarea"},vN=function(e,t){var n=e.fire("ScrollIntoView",t);return n.isDefaultPrevented()},dN=function(e,t){e.fire("AfterScrollIntoView",t)},mN=function(e,t){var n=jt(e);if(n.length===0||Yf(e))return{element:e,offset:t};if(t'+nt+"");return en(n.element,r),Up(r,function(){return tt(r)})},gN=function(e){return Up(k.fromDom(e),le)},zp=function(e,t,n,r){bN(e,function(a,i){return hN(e,t,n,r)},n)},Hp=function(e,t,n,r,a){var i={elm:r.element.dom,alignToTop:a};if(!vN(e,i)){var o=Cs(t).top;n(t,o,r,a),dN(e,i)}},hN=function(e,t,n,r){var a=k.fromDom(e.getBody()),i=k.fromDom(e.getDoc());Ew(a);var o=pN(k.fromDom(n.startContainer),n.startOffset);Hp(e,i,t,o,r),o.cleanup()},Vp=function(e,t,n,r){var a=k.fromDom(e.getDoc());Hp(e,a,n,gN(t),r)},bN=function(e,t,n){var r=n.startContainer,a=n.startOffset,i=n.endContainer,o=n.endOffset;t(k.fromDom(r),k.fromDom(i));var u=e.dom.createRng();u.setStart(r,a),u.setEnd(i,o),e.selection.setRng(n)},Qf=function(e,t,n,r){var a=e.pos;if(n)Gv(a.left,a.top,r);else{var i=a.top-t+e.height;Gv(a.left,i,r)}},qp=function(e,t,n,r,a){var i=n+t,o=r.pos.top,u=r.bottom,s=u-o>=n;if(oi){var f=s?a!==!1:a===!0;Qf(r,n,f,e)}else u>i&&!s&&Qf(r,n,a===!0,e)},Wp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;qp(e,t,a,n,r)},jp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;qp(e,t,a,n,r);var i=cN(n.element),o=Qv(window);i.topo.bottom&&Xv(n.element,r===!0)},yN=function(e,t,n){return zp(e,Wp,t,n)},CN=function(e,t,n){return Vp(e,t,Wp,n)},wN=function(e,t,n){return zp(e,jp,t,n)},SN=function(e,t,n){return Vp(e,t,jp,n)},EN=function(e,t,n){var r=e.inline?CN:SN;r(e,t,n)},Ai=function(e,t,n){var r=e.inline?yN:wN;r(e,t,n)},kN=function(){return k.fromDom(document)},xN=function(e){return e.dom.focus()},Kp=function(e){var t=kr(e).dom;return e.dom===t.activeElement},Zf=function(e){return e===void 0&&(e=kN()),b.from(e.dom.activeElement).map(k.fromDom)},NN=function(e){return Zf(kr(e)).filter(function(t){return e.dom.contains(t.dom)})},TN=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},AN={create:TN},Jf=Kn.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),RN=function(e,t,n,r){return e.fold(t,n,r)},BN=function(e){return e.fold(Tt,Tt,Tt)},_N=Jf.before,DN=Jf.on,ON=Jf.after,PN={before:_N,on:DN,after:ON,cata:RN,getStart:BN},Ko=Kn.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),IN=function(e){return Ko.exact(e.start,e.soffset,e.finish,e.foffset)},$N=function(e){return e.match({domRange:function(t){return k.fromDom(t.startContainer)},relative:function(t,n){return PN.getStart(t)},exact:function(t,n,r,a){return t}})},LN=Ko.domRange,FN=Ko.relative,MN=Ko.exact,UN=function(e){var t=$N(e);return Fv(t)},zN=AN.create,Gp={domRange:LN,relative:FN,exact:MN,exactFromRange:IN,getWin:UN,range:zN},HN=qt().browser,Xp=function(e,t){var n=Wt(t)?Vf(t).length:jt(t).length+1;return e>n?n:e<0?0:e},VN=function(e){return Gp.range(e.start,Xp(e.soffset,e.start),e.finish,Xp(e.foffset,e.finish))},Yp=function(e,t){return!Ji(t.dom)&&(qn(e,t)||Te(e,t))},el=function(e){return function(t){return Yp(e,t.start)&&Yp(e,t.finish)}},Qp=function(e){return e.inline===!0||HN.isIE()},Zp=function(e){return Gp.range(k.fromDom(e.startContainer),e.startOffset,k.fromDom(e.endContainer),e.endOffset)},qN=function(e){var t=e.getSelection(),n=!t||t.rangeCount===0?b.none():b.from(t.getRangeAt(0));return n.map(Zp)},WN=function(e){var t=Fv(e);return qN(t.dom).filter(el(e))},jN=function(e,t){return b.from(t).filter(el(e)).map(VN)},KN=function(e){var t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),b.some(t)}catch{return b.none()}},Go=function(e){var t=Qp(e)?WN(k.fromDom(e.getBody())):b.none();e.bookmark=t.isSome()?t:e.bookmark},GN=function(e,t){var n=k.fromDom(e.getBody()),r=Qp(e)?b.from(t):b.none(),a=r.map(Zp).filter(el(n));e.bookmark=a.isSome()?a:e.bookmark},tl=function(e){var t=e.bookmark?e.bookmark:b.none();return t.bind(function(n){return jN(k.fromDom(e.getBody()),n)}).bind(KN)},XN=function(e){tl(e).each(function(t){return e.selection.setRng(t)})},YN=function(e){var t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1},Jp={isEditorUIElement:YN},QN=function(e){return e.type==="nodechange"&&e.selectionChange},ZN=function(e,t){var n=function(){t.throttle()};xe.DOM.bind(document,"mouseup",n),e.on("remove",function(){xe.DOM.unbind(document,"mouseup",n)})},JN=function(e){e.on("focusout",function(){Go(e)})},eT=function(e,t){e.on("mouseup touchend",function(n){t.throttle()})},tT=function(e,t){var n=qt().browser;n.isIE()?JN(e):eT(e,t),e.on("keyup NodeChange",function(r){QN(r)||Go(e)})},nT=function(e){var t=cf(function(){Go(e)},0);e.on("init",function(){e.inline&&ZN(e,t),tT(e,t)}),e.on("remove",function(){t.cancel()})},Ri,nl=xe.DOM,rT=function(e){return Jp.isEditorUIElement(e)},aT=function(e){var t=e.classList;return t!==void 0?t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"):!1},Xo=function(e,t){var n=lx(e),r=nl.getParent(t,function(a){return rT(a)||(n?e.dom.is(a,n):!1)});return r!==null},iT=function(e){try{var t=kr(k.fromDom(e.getElement()));return Zf(t).fold(function(){return document.body},function(n){return n.dom})}catch{return document.body}},oT=function(e,t){var n=t.editor;nT(n),n.on("focusin",function(){var r=e.focusedEditor;r!==n&&(r&&r.fire("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.fire("focus",{blurredEditor:r}),n.focus(!0))}),n.on("focusout",function(){ot.setEditorTimeout(n,function(){var r=e.focusedEditor;!Xo(n,iT(n))&&r===n&&(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Ri||(Ri=function(r){var a=e.activeEditor;a&&iw(r).each(function(i){i.ownerDocument===document&&i!==document.body&&!Xo(a,i)&&e.focusedEditor===a&&(a.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})},nl.bind(document,"focusin",Ri))},uT=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(nl.unbind(document,"focusin",Ri),Ri=null)},sT=function(e){e.on("AddEditor",G(oT,e)),e.on("RemoveEditor",G(uT,e))},fT=function(e,t){return e.dom.getParent(t,function(n){return e.dom.getContentEditable(n)==="true"})},lT=function(e){return e.collapsed?b.from(or(e.startContainer,e.startOffset)).map(k.fromDom):b.none()},cT=function(e,t){return lT(t).bind(function(n){return Zw(n)?b.some(n):qn(e,n)===!1?b.some(e):b.none()})},eg=function(e,t){cT(k.fromDom(e.getBody()),t).bind(function(n){return wt(n.dom)}).fold(function(){e.selection.normalize()},function(n){return e.selection.setRng(n.toRange())})},rl=function(e){if(e.setActive)try{e.setActive()}catch{e.focus()}else e.focus()},vT=function(e){return Kp(e)||NN(e).isSome()},dT=function(e){return e.iframeElement&&Kp(k.fromDom(e.iframeElement))},mT=function(e){var t=e.getBody();return t&&vT(k.fromDom(t))},pT=function(e){var t=kr(k.fromDom(e.getElement()));return Zf(t).filter(function(n){return!aT(n.dom)&&Xo(e,n.dom)}).isSome()},Lr=function(e){return e.inline?mT(e):dT(e)},gT=function(e){return Lr(e)||pT(e)},hT=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),e.bookmark!==void 0&&Lr(e)===!1&&tl(e).each(function(i){e.selection.setRng(i),r=i});var a=fT(e,t.getNode());if(e.$.contains(n,a)){rl(a),eg(e,r),al(e);return}e.inline||(se.opera||rl(n),e.getWin().focus()),(se.gecko||e.inline)&&(rl(n),eg(e,r)),al(e)},al=function(e){return e.editorManager.setActive(e)},bT=function(e,t){e.removed||(t?al(e):hT(e))},tg=function(e,t,n,r,a){var i=n?t.startContainer:t.endContainer,o=n?t.startOffset:t.endOffset;return b.from(i).map(k.fromDom).map(function(u){return!r||!t.collapsed?Yi(u,a(u,o)).getOr(u):u}).bind(function(u){return Zt(u)?b.some(u):Jt(u).filter(Zt)}).map(function(u){return u.dom}).getOr(e)},ng=function(e,t,n){return tg(e,t,!0,n,function(r,a){return Math.min(Hv(r),a)})},rg=function(e,t,n){return tg(e,t,!1,n,function(r,a){return a>0?a-1:a})},ag=function(e,t){for(var n=e;e&&Q(e)&&e.length===0;)e=t?e.nextSibling:e.previousSibling;return e||n},yT=function(e,t){var n,r,a;if(!t)return e;r=t.startContainer,a=t.endContainer;var i=t.startOffset,o=t.endOffset;return n=t.commonAncestorContainer,!t.collapsed&&(r===a&&o-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),r.nodeType===3&&a.nodeType===3&&(r.length===i?r=ag(r.nextSibling,!0):r=r.parentNode,o===0?a=ag(a.previousSibling,!1):a=a.parentNode,r&&r===a))?r:n&&n.nodeType===3?n.parentNode:n},CT=function(e,t,n,r){var a,i=[],o=e.getRoot();if(n=e.getParent(n||ng(o,t,t.collapsed),e.isBlock),r=e.getParent(r||rg(o,t,t.collapsed),e.isBlock),n&&n!==o&&i.push(n),n&&r&&n!==r){a=n;for(var u=new Ge(n,o);(a=u.next())&&a!==r;)e.isBlock(a)&&i.push(a)}return r&&n!==r&&r!==o&&i.push(r),i},wT=function(e,t,n){return b.from(t).map(function(r){var a=e.nodeIndex(r),i=e.createRng();return i.setStart(r.parentNode,a),i.setEnd(r.parentNode,a+1),n&&(Uf(e,i,r,!0),Uf(e,i,r,!1)),i})},il=function(e,t){return De(t,function(n){var r=e.fire("GetSelectionRange",{range:n});return r.range!==n?r.range:n})},ST={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Yo=function(e,t,n){var r=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[a];if(i)return i;for(var o=e.parent;o&&o!==t;o=o.parent)if(i=o[a],i)return i}},ET=function(e){if(!Nr(e.value))return!1;var t=e.parent;return!(t&&(t.name!=="span"||t.attr("style"))&&/^[ ]+$/.test(e.value))},ig=function(e){var t=e.name==="a"&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},Xt=function(){function e(t,n){this.name=t,this.type=n,n===1&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var r=new e(t,ST[t]||1);return n&&Pe(n,function(a,i){r.attr(i,a)}),r},e.prototype.replace=function(t){var n=this;return t.parent&&t.remove(),n.insert(t,n),n.remove(),n},e.prototype.attr=function(t,n){var r=this,a;if(typeof t!="string")return t!=null&&Pe(t,function(o,u){r.attr(u,o)}),r;if(a=r.attributes){if(n!==void 0){if(n===null){if(t in a.map){delete a.map[t];for(var i=a.length;i--;)if(a[i].name===t)return a.splice(i,1),r}return r}if(t in a.map){for(var i=a.length;i--;)if(a[i].name===t){a[i].value=n;break}}else a.push({name:t,value:n});return a.map[t]=n,r}return a.map[t]}},e.prototype.clone=function(){var t=this,n=new e(t.name,t.type),r;if(r=t.attributes){var a=[];a.map={};for(var i=0,o=r.length;i=s.length){for(i=0,o=u.length;i=s.length||u[i]!==s[i]){r=i+1;break}}if(u.length=u.length||u[i]!==s[i]){r=i+1;break}}if(r===1)return n;for(i=0,o=u.length-(r-1);i=0;r--)if(!(f[r].length===0||f[r]===".")){if(f[r]===".."){a++;continue}if(a>0){a--;continue}i.push(f[r])}return r=s.length-a,r<=0?o=ji(i).join("/"):o=s.slice(0,r).join("/")+"/"+ji(i).join("/"),o.indexOf("/")!==0&&(o="/"+o),u&&o.lastIndexOf("/")!==o.length-1&&(o+=u),o},e.prototype.getURI=function(t){t===void 0&&(t=!1);var n;return(!this.source||t)&&(n="",t||(this.protocol?n+=this.protocol+"://":n+="//",this.userInfo&&(n+=this.userInfo+"@"),this.host&&(n+=this.host),this.port&&(n+=":"+this.port)),this.path&&(n+=this.path),this.query&&(n+="?"+this.query),this.anchor&&(n+="#"+this.anchor),this.source=n),this.source},e}(),DT=B.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),OT=function(e){return e.indexOf("data-")===0||e.indexOf("aria-")===0},PT=fs(function(){return document.implementation.createHTMLDocument("parser")}),ul=function(e,t,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,a=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=e.getShortEndedElements(),o=1,u=n;o!==0;)for(r.lastIndex=u;;){var s=r.exec(t);if(s===null)return u;if(s[1]==="!"){Sr(s[2],"--")?u=sl(t,!1,s.index+3):u=sl(t,!0,s.index+1);break}else{a.lastIndex=r.lastIndex;var f=a.exec(t);if(Ka(f)||f.index!==r.lastIndex)continue;s[1]==="/"?o-=1:de(i,s[2])||(o+=1),u=r.lastIndex+f[0].length;break}}return u},IT=function(e,t){return/^\s*\[if [\w\W]+\]>.*/.test(e.substr(t))},sl=function(e,t,n){n===void 0&&(n=0);var r=e.toLowerCase();if(r.indexOf("[if ",n)!==-1&&IT(r,n)){var a=r.indexOf("[endif]",n);return r.indexOf(">",a)}else if(t){var i=r.indexOf(">",n);return i!==-1?i:r.length}else{var o=/--!?>/g;o.lastIndex=n;var u=o.exec(e);return u?u.index+u[0].length:r.length}},$T=function(e,t){var n=e.exec(t);if(n){var r=n[1],a=n[2];return typeof r=="string"&&r.toLowerCase()==="data-mce-bogus"?a:null}else return null},Qo=function(e,t){t===void 0&&(t=Zn()),e=e||{};var n=PT(),r=n.createElement("form");e.fix_self_closing!==!1&&(e.fix_self_closing=!0);var a=e.comment?e.comment:le,i=e.cdata?e.cdata:le,o=e.text?e.text:le,u=e.start?e.start:le,s=e.end?e.end:le,f=e.pi?e.pi:le,l=e.doctype?e.doctype:le,c=function(d,m){m===void 0&&(m="html");for(var p=d.html,g,y=0,h,E,S=[],C,x,R,I,ne,W,_,ee,M,q,L,V,K,D,j,fe,pe,me=0,qe=Yn.decode,Be=B.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),lt=m==="html"?0:1,xt=function(we){var Ee,Ue;for(Ee=S.length;Ee--&&S[Ee].name!==we;);if(Ee>=0){for(Ue=S.length-1;Ue>=Ee;Ue--)we=S[Ue],we.valid&&s(we.name);S.length=Ee}},O=function(we,Ee){return o(ol(we,d),Ee)},U=function(we){we!==""&&(we.charAt(0)===">"&&(we=" "+we),!e.allow_conditional_comments&&we.substr(0,3).toLowerCase()==="[if"&&(we=" "+we),a(ol(we,d)))},Z=function(we){return ol(we,d)},N=function(we,Ee){var Ue=we||"",fn=!Sr(Ue,"--"),ln=sl(p,fn,Ee);return we=p.substr(Ee,ln-Ee),U(fn?Ue+we:we),ln+1},$=function(we,Ee,Ue,fn,ln){if(Ee=Ee.toLowerCase(),Ue=Z(Ee in Fe?Ee:qe(Ue||fn||ln||"")),$e&&!ne&&OT(Ee)===!1){var cn=L[Ee];if(!cn&&V){for(var hr=V.length;hr--&&(cn=V[hr],!cn.pattern.test(Ee)););hr===-1&&(cn=null)}if(!cn||cn.validValues&&!(Ue in cn.validValues))return}var Hc=Ee==="name"||Ee==="id";Hc&&we in DT&&(Ue in n||Ue in r)||Be[Ee]&&!fr.isDomSafe(Ue,we,e)||ne&&(Ee in Be||Ee.indexOf("on")===0)||(C.map[Ee]=Ue,C.push({name:Ee,value:Ue}))},P=new RegExp(`<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\\s*|\\/)>))`,"g"),J=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,te=t.getShortEndedElements(),ye=e.self_closing_elements||t.getSelfClosingElements(),Fe=t.getBoolAttrs(),$e=e.validate,Hn=e.remove_internals,ct=e.fix_self_closing,gt=t.getSpecialElements(),Me=p+">";g=P.exec(Me);){var Ot=g[0];if(yp.length){O(qe(p.substr(g.index))),y=g.index+Ot.length;continue}h=h.toLowerCase(),h.charAt(0)===":"&&(h=h.substr(1)),W=h in te,ct&&ye[h]&&S.length>0&&S[S.length-1].name===h&&xt(h);var ht=$T(J,g[9]);if(ht!==null){if(ht==="all"){y=ul(t,p,P.lastIndex),P.lastIndex=y;continue}ee=!1}if(!$e||(_=t.getElementRule(h))){if(ee=!0,$e&&(L=_.attributes,V=_.attributePatterns),(q=g[9])?(ne=q.indexOf("data-mce-type")!==-1,ne&&Hn&&(ee=!1),C=[],C.map={},q.replace(J,function(we,Ee,Ue,fn,ln){return $(h,Ee,Ue,fn,ln),""})):(C=[],C.map={}),$e&&!ne){if(K=_.attributesRequired,D=_.attributesDefault,j=_.attributesForced,fe=_.removeEmptyAttrs,fe&&!C.length&&(ee=!1),j)for(x=j.length;x--;)M=j[x],I=M.name,pe=M.value,pe==="{$uid}"&&(pe="mce_"+me++),C.map[I]=pe,C.push({name:I,value:pe});if(D)for(x=D.length;x--;)M=D[x],I=M.name,I in C.map||(pe=M.value,pe==="{$uid}"&&(pe="mce_"+me++),C.map[I]=pe,C.push({name:I,value:pe}));if(K){for(x=K.length;x--&&!(K[x]in C.map););x===-1&&(ee=!1)}if(M=C.map["data-mce-bogus"]){if(M==="all"){y=ul(t,p,P.lastIndex),P.lastIndex=y;continue}ee=!1}}ee&&u(h,C,W)}else ee=!1;if(E=gt[h]){E.lastIndex=y=g.index+Ot.length,(g=E.exec(p))?(ee&&(R=p.substr(y,g.index-y)),y=g.index+g[0].length):(R=p.substr(y),y=p.length),ee&&(R.length>0&&O(R,!0),s(h)),P.lastIndex=y;continue}W||(!q||q.indexOf("/")!==q.length-1?S.push({name:h,valid:ee}):ee&&s(h))}else if(h=g[1])U(h);else if(h=g[2]){var _n=lt===1||e.preserve_cdata||S.length>0&&t.isValidChild(S[S.length-1].name,"#cdata");if(_n)i(h);else{y=N("",g.index+2),P.lastIndex=y;continue}}else if(h=g[3])l(h);else if((h=g[4])||Ot==="=0;x--)h=S[x],h.valid&&s(h.name)},v=function(d,m){m===void 0&&(m="html"),c(kT(d),m)};return{parse:v}};Qo.findEndTag=ul;var LT=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")},ug=function(e,t){for(var n=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r=e.schema,a=LT(e.getTempAttrs(),t),i=r.getShortEndedElements(),o;o=n.exec(a);){var u=n.lastIndex,s=o[0].length,f=void 0;i[o[1]]?f=u:f=Qo.findEndTag(r,a,u),a=a.substring(0,u-s)+a.substring(f),n.lastIndex=u-s}return Xn(a)},FT=ug,MT=function(e,t){var n=ft(e),r=new RegExp("^(<"+n+"[^>]*>( | |\\s|\xA0|
|)<\\/"+n+`>[\r diff --git a/public/js/build/TaskDetail.3e00ee35.js b/public/js/build/TaskDetail.3379e7b2.js similarity index 99% rename from public/js/build/TaskDetail.3e00ee35.js rename to public/js/build/TaskDetail.3379e7b2.js index cca25582a..bf76c741b 100644 --- a/public/js/build/TaskDetail.3e00ee35.js +++ b/public/js/build/TaskDetail.3379e7b2.js @@ -1 +1 @@ -import{n as l,a as p,m as f}from"./app.6c8b31b1.js";import{P as k,T as _}from"./ProjectLog.d63fd8b4.js";import{C as v,D as g}from"./DialogWrapper.5fcf71c2.js";import{T as b}from"./TaskMenu.a0d74239.js";import{U as D}from"./UserSelect.d62f565b.js";import w from"./TEditor.5f656e41.js";var y=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{staticClass:"task-exist-tips",attrs:{title:t.$L("\u8BA1\u5212\u65F6\u95F4\u51B2\u7A81\u63D0\u793A"),styles:{width:"90%",maxWidth:"550px"}},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("List",{attrs:{split:!1,size:"small"}},t._l(t.tipsTask,function(a,i){return e("ListItem",{key:i},[e("div",{staticClass:"list-content"},[e("UserAvatar",{attrs:{userid:i,size:28,"show-icon":!0,"show-name":!0}}),t._l(a,function(o,n){return e("div",{key:n,staticClass:"list-task"},[e("div",{staticClass:"list-task-info"},[e("span",[t._v("["+t._s(o.project_name)+"] ")]),e("span",{attrs:{title:o.name}},[t._v(t._s(o.name))])]),e("div",{staticClass:"list-task-date"},[t._v(t._s(t.getCutTime(o)))])])})],2)])}),1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u5FFD\u7565\u5E76\u7EE7\u7EED")))])],1)],1)},C=[];const T={name:"TaskExistTips",props:{value:{type:Boolean,default:!1}},data(){return{isExist:!1,show:!1,tipsTask:[],loadIng:!1}},methods:{onAdd(){this.$emit("onAdd",{}),this.show=!1},getCutTime(t){let s=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),a="";return $A.formatDate("Y/m/d",s)==$A.formatDate("Y/m/d",e)?a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",s)==$A.formatDate("Y",e)?(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")):(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("Y/m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")),a},isExistTask({userids:t,timerange:s,taskid:e}){return this.isExist=!1,new Promise(async a=>{this.$store.dispatch("call",{url:"project/task/easylists",data:{userid:t,timerange:s,taskid:e},method:"get"}).then(({data:i})=>{if(i.data.length>0){this.show=!0;let o={};t.map(n=>{i.data.map(r=>{(r.task_user||[]).map(d=>d.owner?d.userid:0).indexOf(n)!==-1&&(o[n]||(o[n]=[]),o[n].push(r))})}),this.tipsTask=o,this.isExist=!0}a(this.isExist)})})}}},c={};var L=l(T,y,C,!1,A,null,null,null);function A(t){for(let s in c)this[s]=c[s]}var x=function(){return L.exports}(),I=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-editor",on:{click:t.onClickWrap,touchstart:t.onTouchstart}},[e("TEditor",{ref:"desc",attrs:{plugins:t.plugins,options:t.options,"option-full":t.optionFull,placeholder:t.placeholder,placeholderFull:t.placeholderFull,readOnly:t.windowTouch,readOnlyFull:!1,inline:""},on:{"on-blur":t.onBlur,"on-editor-init":t.onEditorInit,"on-transfer-change":t.onTransferChange},model:{value:t.content,callback:function(a){t.content=a},expression:"content"}}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"task-editor-operate",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(a){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(a){return t.onEditing.apply(null,arguments)}}},[t._v(t._s(t.$L("\u7F16\u8F91\u63CF\u8FF0")))]),t.operateLink?e("DropdownItem",{nativeOn:{click:function(a){return t.onLinkPreview.apply(null,arguments)}}},[t._v(t._s(t.$L("\u6253\u5F00\u94FE\u63A5")))]):t._e(),t.operateImg?e("DropdownItem",{nativeOn:{click:function(a){return t.onImagePreview.apply(null,arguments)}}},[t._v(t._s(t.$L("\u67E5\u770B\u56FE\u7247")))]):t._e()],1)],1)],1)],1)},S=[];const E={name:"TEditorTask",components:{TEditor:w},props:{value:{default:""},placeholder:{default:""},placeholderFull:{default:""}},data(){return{content:this.value,plugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],options:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | link | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|title|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",extended_valid_elements:"a[href|title|target=_blank]",toolbar:!1},optionFull:{menubar:"file edit view",valid_elements:"a[href|title|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",extended_valid_elements:"a[href|title|target=_blank]",toolbar:"uploadImages | bold italic underline | forecolor backcolor"},operateStyles:{},operateVisible:!1,operateLink:null,operateImg:null,listener:null}},mounted(){var s;let t=this.$parent.$el.parentNode;for(;t;){if((s=t.classList)!=null&&s.contains(".ivu-modal-wrap")){this.listener=t,t.addEventListener("scroll",this.onTouchstart);break}t=t.parentNode}},beforeDestroy(){var t;(t=this.listener)==null||t.removeEventListener("scroll",this.onTouchstart)},computed:{editor(){return this.$refs.desc.editor}},watch:{value(t){this.content=t},content(t){this.$emit("input",t)}},methods:{getContent(){return this.$refs.desc.getContent()},onEditing(){this.$refs.desc.onFull()},onBlur(){this.$emit("on-blur")},onEditorInit(t){this.updateTouchContent(),this.$emit("on-editor-init",t)},onTransferChange(t){t||!this.windowTouch||setTimeout(s=>{this.updateTouchContent(),this.onBlur()},100)},onClickWrap(t){!this.windowTouch||(t.stopPropagation(),this.operateVisible=!1,this.operateLink=t.target.tagName==="A"?t.target.href:null,this.operateImg=t.target.tagName==="IMG"?t.target.src:null,this.$nextTick(()=>{const s=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-s.left}px`,top:`${t.clientY-s.top}px`},this.operateVisible=!0}))},onTouchstart(){!this.windowTouch||(this.operateVisible=!1)},updateTouchContent(){!this.windowTouch||this.$nextTick(t=>{!this.editor||(this.content?(this.editor.bodyElement.removeAttribute("data-mce-placeholder"),this.editor.bodyElement.removeAttribute("aria-placeholder")):(this.editor.bodyElement.setAttribute("data-mce-placeholder",this.placeholder),this.editor.bodyElement.setAttribute("aria-placeholder",this.placeholder)),this.updateTouchLink(0))})},updateTouchLink(t){!this.windowTouch||setTimeout(s=>{!this.editor||(this.editor.bodyElement.querySelectorAll("a").forEach(e=>{e.__dataMceClick!==!0&&(e.__dataMceClick=!0,e.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),this.onClickWrap(a)}))}),t<300&&this.updateTouchLink(t+100))},t)},onLinkPreview(){this.operateLink&&window.open(this.operateLink)},onImagePreview(){const t=this.$refs.desc.getValueImages();if(t.length===0){$A.messageWarning("\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u56FE\u7247");return}let s=Math.max(0,t.findIndex(e=>e.src===this.operateImg));this.$store.dispatch("previewImage",{index:s,list:t})}}},u={};var F=l(E,I,S,!1,O,"20dab440",null,null);function O(t){for(let s in u)this[s]=u[s]}var M=function(){return F.exports}(),j=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})},P=[];const z={name:"TaskUpload",props:{maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:["jpg","jpeg","webp","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(t){return this.$emit("on-select-file",t),!1},handleClick(){this.$refs.upload.handleClick()}}},h={};var H=l(z,j,P,!1,U,null,null,null);function U(t){for(let s in h)this[s]=h[s]}var N=function(){return H.exports}(),V=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.ready&&t.taskDetail.parent_id>0?e("li",[e("div",{staticClass:"subtask-icon"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,attrs:{disabled:t.taskId===0,task:t.taskDetail,"load-status":t.taskDetail.loading===!0},on:{"on-update":t.getLogLists}})],1),t.taskDetail.flow_item_name?e("div",{staticClass:"subtask-flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),e("div",{staticClass:"subtask-name"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(a){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(a){t.$set(t.taskDetail,"name",a)},expression:"taskDetail.name"}})],1),e("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-change":t.taskTimeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}},[!t.taskDetail.complete_at&&t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?e("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v(" "+t._s(t.expiresFormat(t.taskDetail.end_at))+" ")]):e("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),e("UserSelect",{staticClass:"subtask-avatar",attrs:{"multiple-max":10,"avatar-size":20,title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),"add-icon":!1,"project-id":t.taskDetail.project_id,"before-submit":t.onOwner},model:{value:t.ownerData.owner_userid,callback:function(a){t.$set(t.ownerData,"owner_userid",a)},expression:"ownerData.owner_userid"}})],1):t.ready?e("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at},style:t.taskDetailStyle},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[e("div",{staticClass:"head"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,staticClass:"icon",attrs:{disabled:t.taskId===0,task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t.taskDetail.flow_item_name?e("div",{staticClass:"flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t.taskDetail.archived_at?e("div",{staticClass:"flow"},[e("span",{staticClass:"archived",on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))])]):t._e(),e("div",{staticClass:"nav"},[t.projectName?e("p",[e("span",[t._v(t._s(t.projectName))])]):t._e(),t.columnName?e("p",[e("span",[t._v(t._s(t.columnName))])]):t._e(),t.taskDetail.id?e("p",[e("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),e("div",{staticClass:"function"},[t.getOwner.length===0?e("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(a){t.receiveShow=a},expression:"receiveShow"}},[e("div",{staticClass:"task-detail-receive"},[e("div",{staticClass:"receive-title"},[e("Icon",{attrs:{type:"ios-help-circle"}}),t._v(" "+t._s(t.$L("\u786E\u8BA4\u8BA1\u5212\u65F6\u95F4\u9886\u53D6\u4EFB\u52A1"))+" ")],1),e("div",{staticClass:"receive-time"},[e("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4"),clearable:!1,editable:!1},on:{"on-change":t.taskTimeChange},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}})],1),e("div",{staticClass:"receive-bottom"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(a){t.receiveShow=!1}}},[t._v("\u53D6\u6D88")]),e("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.onOwner(!0)}}},[t._v("\u786E\u5B9A")])],1)]),e("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("\u6211\u8981\u9886\u53D6\u4EFB\u52A1")))])],1):t._e(),t.$Electron?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u65B0\u7A97\u53E3\u6253\u5F00")}},[e("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("\uE776")])]):t._e(),e("div",{staticClass:"menu"},[e("TaskMenu",{attrs:{disabled:t.taskId===0,task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),e("Scrollbar",{staticClass:"scroller"},[e("div",{staticClass:"title"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(a){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(a){t.$set(t.taskDetail,"name",a)},expression:"taskDetail.name"}})],1),e("TEditorTask",{ref:"desc",staticClass:"desc",attrs:{value:t.taskContent,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0...")},on:{"on-blur":function(a){return t.updateBlur("content")}}}),e("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[t.taskDetail.p_name?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6EC")]),t._v(t._s(t.$L("\u4F18\u5148\u7EA7"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(a){return t.updateData("priority",a)}}},[e("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(a,i){return e("EDropdownItem",{key:i,attrs:{command:a}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==a.name?"":"")}}),t._v(" "+t._s(a.name)+" ")])}),1)],1)],1)])]):t._e(),t.getOwner.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E4")]),t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA"))+" ")]),e("UserSelect",{staticClass:"item-content user",attrs:{"multiple-max":10,"avatar-size":28,title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),"project-id":t.taskDetail.project_id,"add-icon":!1,"before-submit":t.onOwner},model:{value:t.ownerData.owner_userid,callback:function(a){t.$set(t.ownerData,"owner_userid",a)},expression:"ownerData.owner_userid"}})],1):t._e(),t.getAssist.length>0||t.assistForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE63F")]),t._v(t._s(t.$L("\u534F\u52A9\u4EBA\u5458"))+" ")]),e("UserSelect",{ref:"assist",staticClass:"item-content user",attrs:{"multiple-max":10,"avatar-size":28,title:t.$L(t.getAssist.length>0?"\u4FEE\u6539\u534F\u52A9\u4EBA\u5458":"\u6DFB\u52A0\u534F\u52A9\u4EBA\u5458"),"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,"add-icon":!1,"before-submit":t.onAssist},model:{value:t.assistData.assist_userid,callback:function(a){t.$set(t.assistData,"assist_userid",a)},expression:"assistData.assist_userid"}})],1):t._e(),t.taskDetail.visibility>1||t.visibleForce||t.visibleKeep?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE77B")]),e("EDropdown",{ref:"eDropdownRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropVisible}},[e("span",{staticClass:"visibility-text color"},[t._v(t._s(t.$L("\u53EF\u89C1\u6027"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE740")])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.visibility==1?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u9879\u76EE\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.visibility==2?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:3}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.visibility==3?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u6307\u5B9A\u6210\u5458"))+" ")],1)])],1)],1)],1),e("div",{staticClass:"item-content user"},[t.taskDetail.visibility==1?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.taskDetail.visibility==2?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458\u53EF\u89C1")))]):e("UserSelect",{ref:"visibleUserSelectRef",attrs:{"avatar-size":28,title:t.$L("\u9009\u62E9\u6307\u5B9A\u4EBA\u5458"),"project-id":t.taskDetail.project_id,"add-icon":!1},on:{"on-show-change":t.visibleUserSelectShowChange},model:{value:t.taskDetail.visibility_appointor,callback:function(a){t.$set(t.taskDetail,"visibility_appointor",a)},expression:"taskDetail.visibility_appointor"}})],1)]):t._e(),t.taskDetail.end_at||t.timeForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E8")]),t.taskDetail.end_at?e("EDropdown",{ref:"eDeadlineRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropDeadline}},[e("span",{staticClass:"visibility-text color"},[t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4")))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4EFB\u52A1\u5EF6\u671F"))+" ")])]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4FEE\u6539\u65F6\u95F4"))+" ")])])],1)],1):e("span",{staticClass:"visibility-text color",on:{click:function(a){t.timeOpen=!0}}},[t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4")))])],1),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{disabled:"",open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-change":t.taskTimeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}},[e("div",{staticClass:"picker-time"},[t.taskDetail.end_at?e("EDropdown",{ref:"eDeadlineRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropDeadline}},[e("div",{staticClass:"time",on:{click:function(a){t.timeOpen=!1}}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4EFB\u52A1\u5EF6\u671F"))+" ")])]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4FEE\u6539\u65F6\u95F4"))+" ")])])],1)],1):e("div",{staticClass:"time",on:{click:function(a){t.timeOpen=!0}}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),!t.taskDetail.complete_at&&t.taskDetail.end_at?[t.within24Hours(t.taskDetail.end_at)?e("Tag",{attrs:{color:"blue"}},[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t.isOverdue(t.taskDetail)?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u8D85\u671F\u672A\u5B8C\u6210")))]):t._e()]:t._e()],2)])],1)])]):t._e(),t.taskDetail.loop&&t.taskDetail.loop!="never"||t.loopForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE93F")]),t._v(t._s(t.$L("\u91CD\u590D\u5468\u671F"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"loop",attrs:{trigger:"click",placement:"bottom"},on:{command:function(a){return t.updateData("loop",a)}}},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch||!t.taskDetail.loop_at,content:`${t.$L("\u4E0B\u4E2A\u5468\u671F")}: ${t.taskDetail.loop_at}`,placement:"right"}},[e("span",[t._v(t._s(t.$L(t.loopLabel(t.taskDetail.loop))))])]),e("EDropdownMenu",{staticClass:"task-detail-loop",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.loops,function(a){return e("EDropdownItem",{key:a.key,attrs:{command:a.key}},[t._v(" "+t._s(t.$L(a.label))+" ")])}),1)],1)],1)])]):t._e(),t.fileList.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E6")]),t._v(t._s(t.$L("\u9644\u4EF6"))+" ")]),e("ul",{staticClass:"item-content file"},[t.taskDetail.file_num>50?e("li",{staticClass:"tip"},[t._v(t._s(t.$L(`\u5171${t.taskDetail.file_num}\u4E2A\u6587\u4EF6\uFF0C\u4EC5\u663E\u793A\u6700\u65B050\u4E2A`)))]):t._e(),t._l(t.fileList,function(a){return e("li",[a.id?e("img",{staticClass:"file-ext",attrs:{src:a.thumb}}):e("Loading",{staticClass:"file-load"}),e("div",{staticClass:"file-name"},[t._v(t._s(a.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(a.size)))]),e("div",{staticClass:"file-menu",class:{show:a._show_menu}},[e("Icon",{attrs:{type:"md-eye"},on:{click:function(i){return t.viewFile(a)}}}),e("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(i){return t.downFile(a)}}}),e("EPopover",{staticClass:"file-delete",model:{value:a._show_menu,callback:function(i){t.$set(a,"_show_menu",i)},expression:"file._show_menu"}},[e("div",{staticClass:"task-detail-delete-file-popover"},[e("p",[t._v(t._s(t.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u6587\u4EF6\u5417\uFF1F")))]),e("div",{staticClass:"buttons"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(i){a._show_menu=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return t.deleteFile(a)}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)]),e("i",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("\uE6EA")])])],1)],1)})],2),e("ul",{staticClass:"item-content"},[e("li",[e("div",{staticClass:"add-button",on:{click:function(a){return t.onUploadClick(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0\u9644\u4EF6")))])])])])]):t._e(),t.subList.length>0||t.addsubForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F0")]),t._v(t._s(t.$L("\u5B50\u4EFB\u52A1"))+" ")]),e("ul",{staticClass:"item-content subtask"},t._l(t.subList,function(a,i){return e("TaskDetail",{key:i,ref:`subTask_${a.id}`,refInFor:!0,attrs:{"task-id":a.id,"open-task":a,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})}),1),e("ul",{class:["item-content",t.subList.length===0?"nosub":""]},[e("li",[t.addsubShow?e("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1"),icon:t.addsubLoad>0?"ios-loading":"",enterkeyhint:"done"},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(a){t.addsubName=a},expression:"addsubName"}}):e("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u4EFB\u52A1")))])])],1)])]):t._e()],1),t.menuList.length>0?e("div",{staticClass:"add"},[e("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[e("div",{staticClass:"add-button"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0")))]),e("em",[t._v(t._s(t.menuText))])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,function(a,i){return e("EDropdownItem",{key:i,attrs:{command:a.command}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(a.icon)}}),t._v(t._s(t.$L(a.name))+" ")])])}),1)],1)],1):t._e()],1),e("TaskUpload",{ref:"upload",staticClass:"upload",on:{"on-select-file":t.onSelectFile}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?e("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[e("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(a){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(a){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:e("div",[e("div",{staticClass:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(a){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(a){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()]),e("div",{staticClass:"menu"},[t.navActive=="dialog"&&t.taskDetail.msg_num>0?e("div",{staticClass:"menu-item",on:{click:function(a){return a.stopPropagation(),t.onSend("open")}}},[t.openLoad>0?e("div",{staticClass:"menu-load"},[e("Loading")],1):t._e(),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u804A\u5929"))+" "),e("em",[t._v("("+t._s(t.taskDetail.msg_num>999?"999+":t.taskDetail.msg_num)+")")]),e("i",{staticClass:"taskfont"},[t._v("\uE703")])]):t._e()])],1),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):e("div",{staticClass:"no-dialog",on:{drop:function(a){return a.preventDefault(),t.taskPasteDrag(a,"drag")},dragover:function(a){return a.preventDefault(),t.taskDragOver(!0,a)},dragleave:function(a){return a.preventDefault(),t.taskDragOver(!1,a)}}},[e("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]),e("div",{staticClass:"no-input"},[e("ChatInput",{ref:"chatInput",attrs:{"task-id":t.taskId,loading:t.sendLoad>0,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F..."),"send-menu":!1},on:{"on-more":t.onEventMore,"on-file":t.onSelectFile,"on-record":t.onRecord,"on-send":t.onSend},model:{value:t.msgText,callback:function(a){t.msgText=a},expression:"msgText"}})],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(a){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e()])],1)],2),t.taskDetail.id?t._e():e("div",{staticClass:"task-load"},[e("Loading")],1),e("TaskExistTips",{ref:"taskExistTipsRef",on:{onAdd:function(a){return t.updateData("times",t.updateParams)}}}),e("Modal",{attrs:{title:t.$L("\u4EFB\u52A1\u5EF6\u671F"),"mask-closable":!1,styles:{width:"90%",maxWidth:"450px"}},model:{value:t.delayTaskShow,callback:function(a){t.delayTaskShow=a},expression:"delayTaskShow"}},[e("Form",{ref:"formDelayTaskRef",attrs:{model:t.delayTaskForm,rules:t.delayTaskRule,"label-position":"left","label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5EF6\u671F\u65F6\u957F"),prop:"time"}},[e("Input",{attrs:{type:"number",placeholder:t.$L("\u8BF7\u8F93\u5165\u65F6\u957F")},scopedSlots:t._u([{key:"append",fn:function(){return[t._v(" "+t._s(t.$L("\u5C0F\u65F6"))+" ")]},proxy:!0}]),model:{value:t.delayTaskForm.time,callback:function(a){t.$set(t.delayTaskForm,"time",a)},expression:"delayTaskForm.time"}})],1),e("FormItem",{attrs:{label:t.$L("\u5EF6\u671F\u5907\u6CE8"),prop:"remark"}},[e("Input",{attrs:{type:"textarea",placeholder:t.$L("\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8")},model:{value:t.delayTaskForm.remark,callback:function(a){t.$set(t.delayTaskForm,"remark",a)},expression:"delayTaskForm.remark"}})],1)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{on:{click:function(a){t.delayTaskShow=!1}}},[t._v(t._s(t.$L("\u5173\u95ED")))]),e("Button",{attrs:{type:"primary",loading:t.delayTaskLoading},on:{click:t.onDelay}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1)],1):t._e()},R=[];const B={name:"TaskDetail",components:{TEditorTask:M,UserSelect:D,TaskExistTips:x,ChatInput:v,TaskMenu:b,ProjectLog:k,DialogWrapper:g,TaskUpload:N,TaskPriority:_},props:{taskId:{type:Number,default:0},openTask:{type:Object,default:()=>({})},mainEndAt:{default:null},canUpdateBlur:{type:Boolean,default:!0},modalMode:{type:Boolean,default:!1}},data(){return{ready:!1,taskDetail:{},ownerData:{},ownerLoad:0,receiveShow:!1,assistForce:!1,assistData:{},assistLoad:0,visibleForce:!1,addsubForce:!1,addsubShow:!1,addsubName:"",addsubLoad:0,timeForce:!1,timeOpen:!1,timeValue:[],timeOptions:{shortcuts:$A.timeOptionShortcuts()},loopForce:!1,nowTime:$A.Time(),nowInterval:null,msgText:"",msgFile:[],msgRecord:{},navActive:"dialog",logLoadIng:!1,sendLoad:0,openLoad:0,dialogDrag:!1,imageAttachment:!0,receiveTaskSubscribe:null,loops:[{key:"never",label:"\u4ECE\u4E0D"},{key:"day",label:"\u6BCF\u5929"},{key:"weekdays",label:"\u6BCF\u4E2A\u5DE5\u4F5C\u65E5"},{key:"week",label:"\u6BCF\u5468"},{key:"twoweeks",label:"\u6BCF\u4E24\u5468"},{key:"month",label:"\u6BCF\u6708"},{key:"year",label:"\u6BCF\u5E74"},{key:"custom",label:"\u81EA\u5B9A\u4E49"}],updateParams:{},delayTaskShow:!1,delayTaskLoading:!1,delayTaskForm:{time:"24",remark:""},delayTaskRule:{time:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u65F6\u957F"),trigger:"blur"}],remark:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u5907\u6CE8"),trigger:"blur"}]}}},created(){const t=$A.getObject(this.$route.query,"navActive");["dialog","log"].includes(t)&&(this.navActive=t)},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3),this.receiveTaskSubscribe=p.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...f(["systemConfig","cacheProjects","cacheColumns","cacheTasks","taskContents","taskFiles","taskPriority","dialogId"]),projectName(){if(!this.taskDetail.project_id)return"";if(this.taskDetail.project_name)return this.taskDetail.project_name;const t=this.cacheProjects.find(({id:s})=>s==this.taskDetail.project_id);return t?t.name:""},columnName(){if(!this.taskDetail.column_id)return"";if(this.taskDetail.column_name)return this.taskDetail.column_name;const t=this.cacheColumns.find(({id:s})=>s==this.taskDetail.column_id);return t?t.name:""},taskContent(){if(!this.taskId)return"";let t=this.taskContents.find(({task_id:s})=>s==this.taskId);return t?t.content:""},fileList(){return this.taskId?this.taskFiles.filter(({task_id:t})=>t==this.taskId).sort((t,s)=>s.id-t.id):[]},subList(){return this.taskId?this.cacheTasks.filter(t=>t.parent_id==this.taskId).sort((t,s)=>t.id-s.id):[]},hasOpenDialog(){return this.taskDetail.dialog_id>0&&this.windowLandscape},dialogStyle(){const{windowHeight:t,hasOpenDialog:s}=this,e=Math.min(1100,t);if(!e)return{};if(!s)return{};const a=e>900?200:70;return{minHeight:e-a-48+"px"}},taskDetailStyle(){const{modalMode:t,windowHeight:s,hasOpenDialog:e}=this,a=Math.min(1100,s);if(t&&e){const i=a>900?200:70;return{maxHeight:a-i-30+"px"}}return{}},cutTime(){const{taskDetail:t}=this;let s=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),a="";return $A.formatDate("Y/m/d",s)==$A.formatDate("Y/m/d",e)?a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",s)==$A.formatDate("Y",e)?(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")):(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("Y/m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")),a},getOwner(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:s})=>s===1).sort((s,e)=>s.id-e.id):[]},getAssist(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:s})=>s===0).sort((s,e)=>s.id-e.id):[]},menuList(){const{taskDetail:t}=this,s=[];return t.p_name||s.push({command:"priority",icon:"",name:"\u4F18\u5148\u7EA7"}),$A.isArray(t.task_user)&&t.task_user.find(({owner:e})=>e===0)||s.push({command:"assist",icon:"",name:"\u534F\u52A9\u4EBA\u5458"}),t.visibility<=1&&!this.visibleKeep&&s.push({command:"visible",icon:"",name:"\u53EF\u89C1\u6027"}),t.end_at||s.push({command:"times",icon:"",name:"\u622A\u6B62\u65F6\u95F4"}),(!t.loop||t.loop=="never")&&s.push({command:"loop",icon:"",name:"\u91CD\u590D\u5468\u671F"}),this.fileList.length==0&&s.push({command:"file",icon:"",name:"\u9644\u4EF6"}),this.subList.length==0&&s.push({command:"subtask",icon:"",name:"\u5B50\u4EFB\u52A1"}),s},menuText(){const{menuList:t}=this;let s="";return t.length>0&&t.forEach((e,a)=>{a>0&&(s+=" / "),s+=this.$L(e.name)}),s},visibleKeep(){return this.systemConfig.task_visible==="open"}},watch:{openTask:{handler(t){this.taskDetail=$A.cloneJSON(t),this.__openTask&&clearTimeout(this.__openTask),this.__openTask=setTimeout(s=>{var e;return(e=this.$refs.name)==null?void 0:e.resizeTextarea()},100)},immediate:!0,deep:!0},taskId:{handler(t){t>0?this.ready=!0:(this.windowPortrait&&$A.onBlur(),this.timeOpen=!1,this.timeForce=!1,this.loopForce=!1,this.assistForce=!1,this.visibleForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.chatInput&&this.$refs.chatInput.hidePopover())},immediate:!0},getOwner:{handler(t){const s=t.map(({userid:e})=>e);this.$set(this.taskDetail,"owner_userid",s),this.$set(this.ownerData,"owner_userid",s),this.$set(this.assistData,"disabled",t.map(({userid:e})=>e).filter(e=>e!=this.userId))},immediate:!0},getAssist:{handler(t){const s=t.map(({userid:e})=>e);this.$set(this.taskDetail,"assist_userid",s),this.$set(this.assistData,"assist_userid",s)},immediate:!0},receiveShow(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},"taskDetail.visibility_appointor":{handler(t){(t==null?void 0:t.length)>0&&t[0]&&(this.taskDetail.visibility=3,this.updateVisible())},immediate:!0}},methods:{within24Hours(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},isOverdue(t){return t.overdue?!0:$A.Date(t.end_at,!0)e.key===t);return s?s.label:t?`\u6BCF${t}\u5929`:"\u4ECE\u4E0D"},onNameKeydown(t){t.keyCode===13&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},checkUpdate(t){let s=!1;if(this.openTask.name!=this.taskDetail.name)if(s=!0,t===!0)this.updateData("name");else return t===!1&&this.$refs.name.focus(),!0;if(this.$refs.desc&&this.$refs.desc.getContent()!=this.taskContent)if(s=!0,t===!0)this.updateData("content");else return t===!1&&this.$refs.desc.focus(),!0;if(this.addsubShow&&this.addsubName)if(s=!0,t===!0)this.onAddsub();else return t===!1&&this.$refs.addsub.focus(),!0;return this.subList.some(({id:e})=>{this.$refs[`subTask_${e}`][0].checkUpdate(t)&&(s=!0)}),s},updateBlur(t,s){this.canUpdateBlur&&this.updateData(t,s)},updateData(t,s){let e=null;switch(t){case"priority":this.$set(this.taskDetail,"p_level",s.priority),this.$set(this.taskDetail,"p_name",s.name),this.$set(this.taskDetail,"p_color",s.color),t=["p_level","p_name","p_color"];break;case"times":if(this.taskDetail.start_at&&(Math.abs($A.Time(this.taskDetail.start_at)-$A.Time(s.start_at))>60||Math.abs($A.Time(this.taskDetail.end_at)-$A.Time(s.end_at))>60)&&typeof s.desc=="undefined"){$A.modalInput({title:`\u4FEE\u6539${this.taskDetail.parent_id>0?"\u5B50\u4EFB\u52A1":"\u4EFB\u52A1"}\u65F6\u95F4`,placeholder:"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8",okText:"\u786E\u5B9A",onOk:o=>o?(this.updateParams=Object.assign(s,{desc:o}),s.start_at&&s.end_at&&this.$refs.taskExistTipsRef?this.$refs.taskExistTipsRef.isExistTask({taskid:this.taskDetail.id,userids:this.taskDetail.owner_userid,timerange:[s.start_at,s.end_at]}).then(n=>{n||this.updateData("times",this.updateParams)}):this.updateData("times",this.updateParams),!1):"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8"});return}this.$set(this.taskDetail,"times",[s.start_at,s.end_at,s.desc]);break;case"loop":if(s==="custom"){this.customLoop();return}this.$set(this.taskDetail,"loop",s);break;case"content":const i=this.$refs.desc.getContent();if(i==this.taskContent)return;this.$set(this.taskDetail,"content",i),e=()=>{this.$store.dispatch("saveTaskContent",{task_id:this.taskId,content:i})};break}let a={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach(i=>{let o=this.taskDetail[i],n=this.openTask[i];$A.jsonStringify(o)!=$A.jsonStringify(n)&&(a[i]=o)}),!(Object.keys(a).length<=1)&&this.$store.dispatch("taskUpdate",a).then(({msg:i})=>{$A.messageSuccess(i),typeof e=="function"&&e()}).catch(({msg:i})=>{$A.modalError(i)})},customLoop(){let t=this.taskDetail.loop||1;$A.Modal.confirm({render:s=>s("div",[s("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},this.$L("\u91CD\u590D\u5468\u671F")),s("Input",{style:{width:"160px",margin:"0 auto"},props:{type:"number",value:t,maxlength:3},on:{input:e=>{t=$.runNum(e)}}},[s("span",{slot:"prepend"},this.$L("\u6BCF")),s("span",{slot:"append"},this.$L("\u5929"))])]),onOk:s=>{this.$Modal.remove(),t>0&&this.updateData("loop",t)},loading:!0,okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")})},async taskTimeChange(){const t=$A.date2string(this.timeValue,"Y-m-d H:i");$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(this.timeValue=await this.$store.dispatch("taskDefaultTime",t))},async onOwner(t){let s={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(t===!0){if(this.getOwner.length>0){this.receiveShow=!1,$A.messageError("\u4EFB\u52A1\u5DF2\u88AB\u9886\u53D6");return}const e=$A.date2string(this.timeValue,"Y-m-d H:i");if(!(e[0]&&e[1])){$A.messageError("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4");return}s.times=e,s.owner=this.ownerData.owner_userid=[this.userId]}if($A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid))return $A.count(s.owner)==0&&(s.owner=""),this.ownerLoad++,new Promise((e,a)=>{this.$store.dispatch("taskUpdate",s).then(({msg:i})=>{$A.messageSuccess(i),this.ownerLoad--,this.receiveShow=!1,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{}),e()}).catch(({msg:i})=>{$A.modalError(i),this.ownerLoad--,this.receiveShow=!1,a()})})},onAssist(){if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid))return new Promise((t,s)=>{this.getOwner.find(({userid:e})=>e===this.userId)&&this.assistData.assist_userid.find(e=>e===this.userId)?$A.modalConfirm({content:"\u4F60\u5F53\u524D\u662F\u8D1F\u8D23\u4EBA\uFF0C\u786E\u5B9A\u8981\u8F6C\u4E3A\u534F\u52A9\u4EBA\u5458\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{this.onAssistConfirm().then(t).catch(s)},onCancel:()=>{s()}}):this.onAssistConfirm().then(t).catch(s)})},onAssistConfirm(){return new Promise((t,s)=>{let e=this.assistData.assist_userid;e.length===0&&(e=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:e}).then(({msg:a})=>{$A.messageSuccess(a),this.assistLoad--,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{}),t()}).catch(({msg:a})=>{$A.modalError(a),this.assistLoad--,s()})})},openTime(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange(t){t||(this.timeOpen=!1)},timeClear(){this.updateData("times",{start_at:!1,end_at:!1}),this.timeOpen=!1},timeOk(){const t=$A.date2string(this.timeValue,"Y-m-d H:i");this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen(){this.addsubShow=!0,this.$nextTick(()=>{this.$refs.addsub.focus()})},addsubChackClose(){this.addsubName==""&&(this.addsubShow=!1)},addsubKeydown(t){if(t.keyCode===13){if(t.shiftKey||this.addsubLoad>0)return;t.preventDefault(),this.onAddsub()}},onAddsub(){if(this.addsubName==""){$A.messageError("\u4EFB\u52A1\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then(({msg:t})=>{$A.messageSuccess(t),this.addsubLoad--,this.addsubName=""}).catch(({msg:t})=>{$A.modalError(t),this.addsubLoad--})},getLogLists(){this.navActive=="log"&&this.$refs.log.getLists(!0)},logLoadChange(t){this.logLoadIng=t},dropAdd(t){switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("\u672A\u8BBE\u7F6E")),this.$nextTick(()=>{this.$refs.priority.show()});break;case"assist":this.assistForce=!0,this.$nextTick(()=>{this.$refs.assist.onSelection()});break;case"visible":this.visibleForce=!0,this.$nextTick(()=>{this.showCisibleDropdown()});break;case"times":this.timeForce=!0,this.$nextTick(()=>{this.openTime()});break;case"loop":this.loopForce=!0,this.$nextTick(()=>{this.$refs.loop.show()});break;case"file":this.onUploadClick(!0);break;case"subtask":this.addsubForce=!0,this.$nextTick(()=>{this.addsubOpen()});break}},onEventMore(t){["image","file"].includes(t)&&this.onUploadClick(!1)},onUploadClick(t){this.imageAttachment=!!t,this.$refs.upload.handleClick()},msgDialog(t=null,s=!1){this.sendLoad>0||this.openLoad>0||(s===!0?this.openLoad++:this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then(({data:e})=>{this.$store.dispatch("saveTask",{id:e.id,dialog_id:e.dialog_id}),this.$store.dispatch("saveDialog",e.dialog_data),$A.isSubElectron?this.resizeDialog().then(()=>{this.sendDialogMsg(t)}):this.$nextTick(()=>{if(this.windowPortrait){$A.onBlur();const a={time:$A.Time()+10,msgRecord:this.msgRecord,msgFile:this.msgFile,msgText:typeof t=="string"&&t?t:this.msgText,dialogId:e.dialog_id};this.msgRecord={},this.msgFile=[],this.msgText="",this.$nextTick(i=>{this.dialogId>0&&this.$store.dispatch("openTask",0),this.$store.dispatch("openDialog",e.dialog_id).then(o=>{this.$store.state.dialogMsgTransfer=a})})}else this.sendDialogMsg(t)})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{s===!0?this.openLoad--:this.sendLoad--}))},sendDialogMsg(t=null){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile.map(s=>Object.assign(s,{ajaxExtraData:{image_attachment:this.imageAttachment?1:0}}))):this.msgText?this.$refs.dialog.sendMsg(this.msgText):typeof t=="string"&&t&&this.$refs.dialog.sendMsg(t),this.msgFile=[],this.msgText=""},taskPasteDrag(t,s){if(this.dialogDrag=!1,$A.dataHasFolder(s==="drag"?t.dataTransfer:t.clipboardData)){t.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${s==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\u3002`);return}const e=s==="drag"?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(e),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskDragOver(t,s){let e=this.__dialogDrag=$A.randomString(8);if(!t)setTimeout(()=>{e===this.__dialogDrag&&(this.dialogDrag=t)},150);else{if(s.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},onSelectFile(t){this.msgFile=$A.isArray(t)?t:[t],this.msgDialog()},onRecord(t){this.msgRecord=t,this.msgDialog()},onSend(t){this.$refs.chatInput&&this.$refs.chatInput.hidePopover(),t==="open"?this.msgDialog(null,!0):this.msgDialog(t)},deleteFile(t){this.$set(t,"_show_menu",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch(({msg:s})=>{$A.modalError(s),this.$store.dispatch("getTaskFiles",this.taskDetail.id)})},openMenu(t,s){const e=this.$refs[`taskMenu_${s.id}`];e&&e.handleClick(t)},openNewWin(){let t={title:this.taskDetail.name,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,this.$el.clientWidth+72),height:Math.min(window.screen.availHeight,this.$el.clientHeight+72),minWidth:600,minHeight:450};this.hasOpenDialog&&(t.minWidth=800,t.minHeight=600),this.$Electron.sendMessage("windowRouter",{name:`task-${this.taskDetail.id}`,path:`/single/task/${this.taskDetail.id}?navActive=${this.navActive}`,force:!1,config:t}),this.$store.dispatch("openTask",0)},resizeDialog(){return new Promise(t=>{this.$Electron.sendMessage("windowSize",{width:Math.max(1100,this.windowWidth),height:Math.max(720,this.windowHeight),minWidth:800,minHeight:600,autoZoom:!0});let s=0,e=setInterval(()=>{s++,(this.$refs.dialog||s>20)&&(clearInterval(e),this.$refs.dialog&&t())},100)})},viewFile(t){if(["jpg","jpeg","webp","gif","png"].includes(t.ext)){const e=this.fileList.filter(i=>["jpg","jpeg","webp","gif","png"].includes(i.ext)),a=e.findIndex(i=>i.id===t.id);a>-1?this.$store.dispatch("previewImage",{index:a,list:e.map(i=>({src:i.path,width:i.width,height:i.height}))}):this.$store.dispatch("previewImage",{index:0,list:[{src:t.path,width:t.width,height:t.height}]});return}const s=`/single/file/task/${t.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-task-${t.id}`,path:s,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:`${t.name} (${$A.bytesToSize(t.size)})`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:t.ext==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:`${t.name} (${$A.bytesToSize(t.size)})`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${s}`}}):window.open($A.apiUrl(`..${s}`))},downFile(t){$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${t.name} (${$A.bytesToSize(t.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`project/task/filedown?file_id=${t.id}`))}})},showCisibleDropdown(){this.$refs.eDropdownRef.show()},visibleUserSelectShowChange(t){if(!t&&(this.taskDetail.visibility_appointor.length==0||!this.taskDetail.visibility_appointor[0])){let s=this.taskDetail.old_visibility;this.taskDetail.visibility=s>2?1:s||1,this.taskDetail.visibility<3&&this.updateVisible()}},dropVisible(t){switch(t){case 1:case 2:this.taskDetail.visibility=t,this.updateVisible();break;case 3:this.taskDetail.old_visibility=this.taskDetail.visibility,this.taskDetail.visibility=t,this.$nextTick(()=>{this.$refs.visibleUserSelectRef.onSelection()});break}},dropDeadline(t){switch(t){case 1:this.delayTaskShow=!0;break;case 2:this.openTime();break}},onDelay(){this.$refs.formDelayTaskRef.validate(t=>{if(!!t){this.delayTaskLoading=!0;var s=new Date(this.taskDetail.end_at);s.setHours(s.getHours()+Number(this.delayTaskForm.time)),this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,times:[this.taskDetail.start_at,$A.formatDate("Y-m-d H:i:s",s),this.delayTaskForm.remark]}).then(({msg:e})=>{$A.messageSuccess(e),this.delayTaskLoading=!1,this.delayTaskShow=!1,this.delayTaskForm.time="24",this.delayTaskForm.remark="",this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{})}).catch(({msg:e})=>{$A.modalError(e),this.delayTaskLoading=!1})}})},updateVisible(){this.updateData(["visibility","visibility_appointor"])}}},m={};var W=l(B,V,R,!1,Y,null,null,null);function Y(t){for(let s in m)this[s]=m[s]}var Q=function(){return W.exports}();export{M as T,x as a,Q as b}; +import{n as l,a as p,m as f}from"./app.6910ca56.js";import{P as k,T as _}from"./ProjectLog.55720685.js";import{C as v,D as g}from"./DialogWrapper.54a1354f.js";import{T as b}from"./TaskMenu.0454bb90.js";import{U as D}from"./UserSelect.1938cd94.js";import w from"./TEditor.8daabc3e.js";var y=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{staticClass:"task-exist-tips",attrs:{title:t.$L("\u8BA1\u5212\u65F6\u95F4\u51B2\u7A81\u63D0\u793A"),styles:{width:"90%",maxWidth:"550px"}},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("List",{attrs:{split:!1,size:"small"}},t._l(t.tipsTask,function(a,i){return e("ListItem",{key:i},[e("div",{staticClass:"list-content"},[e("UserAvatar",{attrs:{userid:i,size:28,"show-icon":!0,"show-name":!0}}),t._l(a,function(o,n){return e("div",{key:n,staticClass:"list-task"},[e("div",{staticClass:"list-task-info"},[e("span",[t._v("["+t._s(o.project_name)+"] ")]),e("span",{attrs:{title:o.name}},[t._v(t._s(o.name))])]),e("div",{staticClass:"list-task-date"},[t._v(t._s(t.getCutTime(o)))])])})],2)])}),1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u5FFD\u7565\u5E76\u7EE7\u7EED")))])],1)],1)},C=[];const T={name:"TaskExistTips",props:{value:{type:Boolean,default:!1}},data(){return{isExist:!1,show:!1,tipsTask:[],loadIng:!1}},methods:{onAdd(){this.$emit("onAdd",{}),this.show=!1},getCutTime(t){let s=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),a="";return $A.formatDate("Y/m/d",s)==$A.formatDate("Y/m/d",e)?a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",s)==$A.formatDate("Y",e)?(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")):(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("Y/m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")),a},isExistTask({userids:t,timerange:s,taskid:e}){return this.isExist=!1,new Promise(async a=>{this.$store.dispatch("call",{url:"project/task/easylists",data:{userid:t,timerange:s,taskid:e},method:"get"}).then(({data:i})=>{if(i.data.length>0){this.show=!0;let o={};t.map(n=>{i.data.map(r=>{(r.task_user||[]).map(d=>d.owner?d.userid:0).indexOf(n)!==-1&&(o[n]||(o[n]=[]),o[n].push(r))})}),this.tipsTask=o,this.isExist=!0}a(this.isExist)})})}}},c={};var L=l(T,y,C,!1,A,null,null,null);function A(t){for(let s in c)this[s]=c[s]}var x=function(){return L.exports}(),I=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-editor",on:{click:t.onClickWrap,touchstart:t.onTouchstart}},[e("TEditor",{ref:"desc",attrs:{plugins:t.plugins,options:t.options,"option-full":t.optionFull,placeholder:t.placeholder,placeholderFull:t.placeholderFull,readOnly:t.windowTouch,readOnlyFull:!1,inline:""},on:{"on-blur":t.onBlur,"on-editor-init":t.onEditorInit,"on-transfer-change":t.onTransferChange},model:{value:t.content,callback:function(a){t.content=a},expression:"content"}}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"task-editor-operate",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(a){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(a){return t.onEditing.apply(null,arguments)}}},[t._v(t._s(t.$L("\u7F16\u8F91\u63CF\u8FF0")))]),t.operateLink?e("DropdownItem",{nativeOn:{click:function(a){return t.onLinkPreview.apply(null,arguments)}}},[t._v(t._s(t.$L("\u6253\u5F00\u94FE\u63A5")))]):t._e(),t.operateImg?e("DropdownItem",{nativeOn:{click:function(a){return t.onImagePreview.apply(null,arguments)}}},[t._v(t._s(t.$L("\u67E5\u770B\u56FE\u7247")))]):t._e()],1)],1)],1)],1)},S=[];const E={name:"TEditorTask",components:{TEditor:w},props:{value:{default:""},placeholder:{default:""},placeholderFull:{default:""}},data(){return{content:this.value,plugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],options:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | link | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|title|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",extended_valid_elements:"a[href|title|target=_blank]",toolbar:!1},optionFull:{menubar:"file edit view",valid_elements:"a[href|title|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",extended_valid_elements:"a[href|title|target=_blank]",toolbar:"uploadImages | bold italic underline | forecolor backcolor"},operateStyles:{},operateVisible:!1,operateLink:null,operateImg:null,listener:null}},mounted(){var s;let t=this.$parent.$el.parentNode;for(;t;){if((s=t.classList)!=null&&s.contains(".ivu-modal-wrap")){this.listener=t,t.addEventListener("scroll",this.onTouchstart);break}t=t.parentNode}},beforeDestroy(){var t;(t=this.listener)==null||t.removeEventListener("scroll",this.onTouchstart)},computed:{editor(){return this.$refs.desc.editor}},watch:{value(t){this.content=t},content(t){this.$emit("input",t)}},methods:{getContent(){return this.$refs.desc.getContent()},onEditing(){this.$refs.desc.onFull()},onBlur(){this.$emit("on-blur")},onEditorInit(t){this.updateTouchContent(),this.$emit("on-editor-init",t)},onTransferChange(t){t||!this.windowTouch||setTimeout(s=>{this.updateTouchContent(),this.onBlur()},100)},onClickWrap(t){!this.windowTouch||(t.stopPropagation(),this.operateVisible=!1,this.operateLink=t.target.tagName==="A"?t.target.href:null,this.operateImg=t.target.tagName==="IMG"?t.target.src:null,this.$nextTick(()=>{const s=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-s.left}px`,top:`${t.clientY-s.top}px`},this.operateVisible=!0}))},onTouchstart(){!this.windowTouch||(this.operateVisible=!1)},updateTouchContent(){!this.windowTouch||this.$nextTick(t=>{!this.editor||(this.content?(this.editor.bodyElement.removeAttribute("data-mce-placeholder"),this.editor.bodyElement.removeAttribute("aria-placeholder")):(this.editor.bodyElement.setAttribute("data-mce-placeholder",this.placeholder),this.editor.bodyElement.setAttribute("aria-placeholder",this.placeholder)),this.updateTouchLink(0))})},updateTouchLink(t){!this.windowTouch||setTimeout(s=>{!this.editor||(this.editor.bodyElement.querySelectorAll("a").forEach(e=>{e.__dataMceClick!==!0&&(e.__dataMceClick=!0,e.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),this.onClickWrap(a)}))}),t<300&&this.updateTouchLink(t+100))},t)},onLinkPreview(){this.operateLink&&window.open(this.operateLink)},onImagePreview(){const t=this.$refs.desc.getValueImages();if(t.length===0){$A.messageWarning("\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u56FE\u7247");return}let s=Math.max(0,t.findIndex(e=>e.src===this.operateImg));this.$store.dispatch("previewImage",{index:s,list:t})}}},u={};var F=l(E,I,S,!1,O,"20dab440",null,null);function O(t){for(let s in u)this[s]=u[s]}var M=function(){return F.exports}(),j=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})},P=[];const z={name:"TaskUpload",props:{maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:["jpg","jpeg","webp","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(t){return this.$emit("on-select-file",t),!1},handleClick(){this.$refs.upload.handleClick()}}},h={};var H=l(z,j,P,!1,U,null,null,null);function U(t){for(let s in h)this[s]=h[s]}var N=function(){return H.exports}(),V=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.ready&&t.taskDetail.parent_id>0?e("li",[e("div",{staticClass:"subtask-icon"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,attrs:{disabled:t.taskId===0,task:t.taskDetail,"load-status":t.taskDetail.loading===!0},on:{"on-update":t.getLogLists}})],1),t.taskDetail.flow_item_name?e("div",{staticClass:"subtask-flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),e("div",{staticClass:"subtask-name"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(a){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(a){t.$set(t.taskDetail,"name",a)},expression:"taskDetail.name"}})],1),e("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-change":t.taskTimeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}},[!t.taskDetail.complete_at&&t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?e("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v(" "+t._s(t.expiresFormat(t.taskDetail.end_at))+" ")]):e("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),e("UserSelect",{staticClass:"subtask-avatar",attrs:{"multiple-max":10,"avatar-size":20,title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),"add-icon":!1,"project-id":t.taskDetail.project_id,"before-submit":t.onOwner},model:{value:t.ownerData.owner_userid,callback:function(a){t.$set(t.ownerData,"owner_userid",a)},expression:"ownerData.owner_userid"}})],1):t.ready?e("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at},style:t.taskDetailStyle},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[e("div",{staticClass:"head"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,staticClass:"icon",attrs:{disabled:t.taskId===0,task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t.taskDetail.flow_item_name?e("div",{staticClass:"flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t.taskDetail.archived_at?e("div",{staticClass:"flow"},[e("span",{staticClass:"archived",on:{click:function(a){return a.stopPropagation(),t.openMenu(a,t.taskDetail)}}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))])]):t._e(),e("div",{staticClass:"nav"},[t.projectName?e("p",[e("span",[t._v(t._s(t.projectName))])]):t._e(),t.columnName?e("p",[e("span",[t._v(t._s(t.columnName))])]):t._e(),t.taskDetail.id?e("p",[e("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),e("div",{staticClass:"function"},[t.getOwner.length===0?e("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(a){t.receiveShow=a},expression:"receiveShow"}},[e("div",{staticClass:"task-detail-receive"},[e("div",{staticClass:"receive-title"},[e("Icon",{attrs:{type:"ios-help-circle"}}),t._v(" "+t._s(t.$L("\u786E\u8BA4\u8BA1\u5212\u65F6\u95F4\u9886\u53D6\u4EFB\u52A1"))+" ")],1),e("div",{staticClass:"receive-time"},[e("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4"),clearable:!1,editable:!1},on:{"on-change":t.taskTimeChange},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}})],1),e("div",{staticClass:"receive-bottom"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(a){t.receiveShow=!1}}},[t._v("\u53D6\u6D88")]),e("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.onOwner(!0)}}},[t._v("\u786E\u5B9A")])],1)]),e("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("\u6211\u8981\u9886\u53D6\u4EFB\u52A1")))])],1):t._e(),t.$Electron?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u65B0\u7A97\u53E3\u6253\u5F00")}},[e("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("\uE776")])]):t._e(),e("div",{staticClass:"menu"},[e("TaskMenu",{attrs:{disabled:t.taskId===0,task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),e("Scrollbar",{staticClass:"scroller"},[e("div",{staticClass:"title"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(a){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(a){t.$set(t.taskDetail,"name",a)},expression:"taskDetail.name"}})],1),e("TEditorTask",{ref:"desc",staticClass:"desc",attrs:{value:t.taskContent,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0...")},on:{"on-blur":function(a){return t.updateBlur("content")}}}),e("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[t.taskDetail.p_name?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6EC")]),t._v(t._s(t.$L("\u4F18\u5148\u7EA7"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(a){return t.updateData("priority",a)}}},[e("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(a,i){return e("EDropdownItem",{key:i,attrs:{command:a}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==a.name?"":"")}}),t._v(" "+t._s(a.name)+" ")])}),1)],1)],1)])]):t._e(),t.getOwner.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E4")]),t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA"))+" ")]),e("UserSelect",{staticClass:"item-content user",attrs:{"multiple-max":10,"avatar-size":28,title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),"project-id":t.taskDetail.project_id,"add-icon":!1,"before-submit":t.onOwner},model:{value:t.ownerData.owner_userid,callback:function(a){t.$set(t.ownerData,"owner_userid",a)},expression:"ownerData.owner_userid"}})],1):t._e(),t.getAssist.length>0||t.assistForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE63F")]),t._v(t._s(t.$L("\u534F\u52A9\u4EBA\u5458"))+" ")]),e("UserSelect",{ref:"assist",staticClass:"item-content user",attrs:{"multiple-max":10,"avatar-size":28,title:t.$L(t.getAssist.length>0?"\u4FEE\u6539\u534F\u52A9\u4EBA\u5458":"\u6DFB\u52A0\u534F\u52A9\u4EBA\u5458"),"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,"add-icon":!1,"before-submit":t.onAssist},model:{value:t.assistData.assist_userid,callback:function(a){t.$set(t.assistData,"assist_userid",a)},expression:"assistData.assist_userid"}})],1):t._e(),t.taskDetail.visibility>1||t.visibleForce||t.visibleKeep?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE77B")]),e("EDropdown",{ref:"eDropdownRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropVisible}},[e("span",{staticClass:"visibility-text color"},[t._v(t._s(t.$L("\u53EF\u89C1\u6027"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE740")])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.visibility==1?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u9879\u76EE\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.visibility==2?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:3}},[e("div",{staticClass:"task-menu-icon"},[t.taskDetail.visibility==3?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u6307\u5B9A\u6210\u5458"))+" ")],1)])],1)],1)],1),e("div",{staticClass:"item-content user"},[t.taskDetail.visibility==1?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.taskDetail.visibility==2?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458\u53EF\u89C1")))]):e("UserSelect",{ref:"visibleUserSelectRef",attrs:{"avatar-size":28,title:t.$L("\u9009\u62E9\u6307\u5B9A\u4EBA\u5458"),"project-id":t.taskDetail.project_id,"add-icon":!1},on:{"on-show-change":t.visibleUserSelectShowChange},model:{value:t.taskDetail.visibility_appointor,callback:function(a){t.$set(t.taskDetail,"visibility_appointor",a)},expression:"taskDetail.visibility_appointor"}})],1)]):t._e(),t.taskDetail.end_at||t.timeForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E8")]),t.taskDetail.end_at?e("EDropdown",{ref:"eDeadlineRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropDeadline}},[e("span",{staticClass:"visibility-text color"},[t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4")))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4EFB\u52A1\u5EF6\u671F"))+" ")])]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4FEE\u6539\u65F6\u95F4"))+" ")])])],1)],1):e("span",{staticClass:"visibility-text color",on:{click:function(a){t.timeOpen=!0}}},[t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4")))])],1),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{disabled:"",open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-change":t.taskTimeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(a){t.timeValue=a},expression:"timeValue"}},[e("div",{staticClass:"picker-time"},[t.taskDetail.end_at?e("EDropdown",{ref:"eDeadlineRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropDeadline}},[e("div",{staticClass:"time",on:{click:function(a){t.timeOpen=!1}}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4EFB\u52A1\u5EF6\u671F"))+" ")])]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t._v(" "+t._s(t.$L("\u4FEE\u6539\u65F6\u95F4"))+" ")])])],1)],1):e("div",{staticClass:"time",on:{click:function(a){t.timeOpen=!0}}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),!t.taskDetail.complete_at&&t.taskDetail.end_at?[t.within24Hours(t.taskDetail.end_at)?e("Tag",{attrs:{color:"blue"}},[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t.isOverdue(t.taskDetail)?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u8D85\u671F\u672A\u5B8C\u6210")))]):t._e()]:t._e()],2)])],1)])]):t._e(),t.taskDetail.loop&&t.taskDetail.loop!="never"||t.loopForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE93F")]),t._v(t._s(t.$L("\u91CD\u590D\u5468\u671F"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"loop",attrs:{trigger:"click",placement:"bottom"},on:{command:function(a){return t.updateData("loop",a)}}},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch||!t.taskDetail.loop_at,content:`${t.$L("\u4E0B\u4E2A\u5468\u671F")}: ${t.taskDetail.loop_at}`,placement:"right"}},[e("span",[t._v(t._s(t.$L(t.loopLabel(t.taskDetail.loop))))])]),e("EDropdownMenu",{staticClass:"task-detail-loop",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.loops,function(a){return e("EDropdownItem",{key:a.key,attrs:{command:a.key}},[t._v(" "+t._s(t.$L(a.label))+" ")])}),1)],1)],1)])]):t._e(),t.fileList.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E6")]),t._v(t._s(t.$L("\u9644\u4EF6"))+" ")]),e("ul",{staticClass:"item-content file"},[t.taskDetail.file_num>50?e("li",{staticClass:"tip"},[t._v(t._s(t.$L(`\u5171${t.taskDetail.file_num}\u4E2A\u6587\u4EF6\uFF0C\u4EC5\u663E\u793A\u6700\u65B050\u4E2A`)))]):t._e(),t._l(t.fileList,function(a){return e("li",[a.id?e("img",{staticClass:"file-ext",attrs:{src:a.thumb}}):e("Loading",{staticClass:"file-load"}),e("div",{staticClass:"file-name"},[t._v(t._s(a.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(a.size)))]),e("div",{staticClass:"file-menu",class:{show:a._show_menu}},[e("Icon",{attrs:{type:"md-eye"},on:{click:function(i){return t.viewFile(a)}}}),e("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(i){return t.downFile(a)}}}),e("EPopover",{staticClass:"file-delete",model:{value:a._show_menu,callback:function(i){t.$set(a,"_show_menu",i)},expression:"file._show_menu"}},[e("div",{staticClass:"task-detail-delete-file-popover"},[e("p",[t._v(t._s(t.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u6587\u4EF6\u5417\uFF1F")))]),e("div",{staticClass:"buttons"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(i){a._show_menu=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return t.deleteFile(a)}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)]),e("i",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("\uE6EA")])])],1)],1)})],2),e("ul",{staticClass:"item-content"},[e("li",[e("div",{staticClass:"add-button",on:{click:function(a){return t.onUploadClick(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0\u9644\u4EF6")))])])])])]):t._e(),t.subList.length>0||t.addsubForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F0")]),t._v(t._s(t.$L("\u5B50\u4EFB\u52A1"))+" ")]),e("ul",{staticClass:"item-content subtask"},t._l(t.subList,function(a,i){return e("TaskDetail",{key:i,ref:`subTask_${a.id}`,refInFor:!0,attrs:{"task-id":a.id,"open-task":a,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})}),1),e("ul",{class:["item-content",t.subList.length===0?"nosub":""]},[e("li",[t.addsubShow?e("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1"),icon:t.addsubLoad>0?"ios-loading":"",enterkeyhint:"done"},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(a){t.addsubName=a},expression:"addsubName"}}):e("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u4EFB\u52A1")))])])],1)])]):t._e()],1),t.menuList.length>0?e("div",{staticClass:"add"},[e("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[e("div",{staticClass:"add-button"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),e("span",[t._v(t._s(t.$L("\u6DFB\u52A0")))]),e("em",[t._v(t._s(t.menuText))])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,function(a,i){return e("EDropdownItem",{key:i,attrs:{command:a.command}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(a.icon)}}),t._v(t._s(t.$L(a.name))+" ")])])}),1)],1)],1):t._e()],1),e("TaskUpload",{ref:"upload",staticClass:"upload",on:{"on-select-file":t.onSelectFile}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?e("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[e("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(a){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(a){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:e("div",[e("div",{staticClass:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(a){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(a){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()]),e("div",{staticClass:"menu"},[t.navActive=="dialog"&&t.taskDetail.msg_num>0?e("div",{staticClass:"menu-item",on:{click:function(a){return a.stopPropagation(),t.onSend("open")}}},[t.openLoad>0?e("div",{staticClass:"menu-load"},[e("Loading")],1):t._e(),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u804A\u5929"))+" "),e("em",[t._v("("+t._s(t.taskDetail.msg_num>999?"999+":t.taskDetail.msg_num)+")")]),e("i",{staticClass:"taskfont"},[t._v("\uE703")])]):t._e()])],1),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):e("div",{staticClass:"no-dialog",on:{drop:function(a){return a.preventDefault(),t.taskPasteDrag(a,"drag")},dragover:function(a){return a.preventDefault(),t.taskDragOver(!0,a)},dragleave:function(a){return a.preventDefault(),t.taskDragOver(!1,a)}}},[e("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]),e("div",{staticClass:"no-input"},[e("ChatInput",{ref:"chatInput",attrs:{"task-id":t.taskId,loading:t.sendLoad>0,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F..."),"send-menu":!1},on:{"on-more":t.onEventMore,"on-file":t.onSelectFile,"on-record":t.onRecord,"on-send":t.onSend},model:{value:t.msgText,callback:function(a){t.msgText=a},expression:"msgText"}})],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(a){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e()])],1)],2),t.taskDetail.id?t._e():e("div",{staticClass:"task-load"},[e("Loading")],1),e("TaskExistTips",{ref:"taskExistTipsRef",on:{onAdd:function(a){return t.updateData("times",t.updateParams)}}}),e("Modal",{attrs:{title:t.$L("\u4EFB\u52A1\u5EF6\u671F"),"mask-closable":!1,styles:{width:"90%",maxWidth:"450px"}},model:{value:t.delayTaskShow,callback:function(a){t.delayTaskShow=a},expression:"delayTaskShow"}},[e("Form",{ref:"formDelayTaskRef",attrs:{model:t.delayTaskForm,rules:t.delayTaskRule,"label-position":"left","label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5EF6\u671F\u65F6\u957F"),prop:"time"}},[e("Input",{attrs:{type:"number",placeholder:t.$L("\u8BF7\u8F93\u5165\u65F6\u957F")},scopedSlots:t._u([{key:"append",fn:function(){return[t._v(" "+t._s(t.$L("\u5C0F\u65F6"))+" ")]},proxy:!0}]),model:{value:t.delayTaskForm.time,callback:function(a){t.$set(t.delayTaskForm,"time",a)},expression:"delayTaskForm.time"}})],1),e("FormItem",{attrs:{label:t.$L("\u5EF6\u671F\u5907\u6CE8"),prop:"remark"}},[e("Input",{attrs:{type:"textarea",placeholder:t.$L("\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8")},model:{value:t.delayTaskForm.remark,callback:function(a){t.$set(t.delayTaskForm,"remark",a)},expression:"delayTaskForm.remark"}})],1)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{on:{click:function(a){t.delayTaskShow=!1}}},[t._v(t._s(t.$L("\u5173\u95ED")))]),e("Button",{attrs:{type:"primary",loading:t.delayTaskLoading},on:{click:t.onDelay}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1)],1):t._e()},R=[];const B={name:"TaskDetail",components:{TEditorTask:M,UserSelect:D,TaskExistTips:x,ChatInput:v,TaskMenu:b,ProjectLog:k,DialogWrapper:g,TaskUpload:N,TaskPriority:_},props:{taskId:{type:Number,default:0},openTask:{type:Object,default:()=>({})},mainEndAt:{default:null},canUpdateBlur:{type:Boolean,default:!0},modalMode:{type:Boolean,default:!1}},data(){return{ready:!1,taskDetail:{},ownerData:{},ownerLoad:0,receiveShow:!1,assistForce:!1,assistData:{},assistLoad:0,visibleForce:!1,addsubForce:!1,addsubShow:!1,addsubName:"",addsubLoad:0,timeForce:!1,timeOpen:!1,timeValue:[],timeOptions:{shortcuts:$A.timeOptionShortcuts()},loopForce:!1,nowTime:$A.Time(),nowInterval:null,msgText:"",msgFile:[],msgRecord:{},navActive:"dialog",logLoadIng:!1,sendLoad:0,openLoad:0,dialogDrag:!1,imageAttachment:!0,receiveTaskSubscribe:null,loops:[{key:"never",label:"\u4ECE\u4E0D"},{key:"day",label:"\u6BCF\u5929"},{key:"weekdays",label:"\u6BCF\u4E2A\u5DE5\u4F5C\u65E5"},{key:"week",label:"\u6BCF\u5468"},{key:"twoweeks",label:"\u6BCF\u4E24\u5468"},{key:"month",label:"\u6BCF\u6708"},{key:"year",label:"\u6BCF\u5E74"},{key:"custom",label:"\u81EA\u5B9A\u4E49"}],updateParams:{},delayTaskShow:!1,delayTaskLoading:!1,delayTaskForm:{time:"24",remark:""},delayTaskRule:{time:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u65F6\u957F"),trigger:"blur"}],remark:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u5907\u6CE8"),trigger:"blur"}]}}},created(){const t=$A.getObject(this.$route.query,"navActive");["dialog","log"].includes(t)&&(this.navActive=t)},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3),this.receiveTaskSubscribe=p.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...f(["systemConfig","cacheProjects","cacheColumns","cacheTasks","taskContents","taskFiles","taskPriority","dialogId"]),projectName(){if(!this.taskDetail.project_id)return"";if(this.taskDetail.project_name)return this.taskDetail.project_name;const t=this.cacheProjects.find(({id:s})=>s==this.taskDetail.project_id);return t?t.name:""},columnName(){if(!this.taskDetail.column_id)return"";if(this.taskDetail.column_name)return this.taskDetail.column_name;const t=this.cacheColumns.find(({id:s})=>s==this.taskDetail.column_id);return t?t.name:""},taskContent(){if(!this.taskId)return"";let t=this.taskContents.find(({task_id:s})=>s==this.taskId);return t?t.content:""},fileList(){return this.taskId?this.taskFiles.filter(({task_id:t})=>t==this.taskId).sort((t,s)=>s.id-t.id):[]},subList(){return this.taskId?this.cacheTasks.filter(t=>t.parent_id==this.taskId).sort((t,s)=>t.id-s.id):[]},hasOpenDialog(){return this.taskDetail.dialog_id>0&&this.windowLandscape},dialogStyle(){const{windowHeight:t,hasOpenDialog:s}=this,e=Math.min(1100,t);if(!e)return{};if(!s)return{};const a=e>900?200:70;return{minHeight:e-a-48+"px"}},taskDetailStyle(){const{modalMode:t,windowHeight:s,hasOpenDialog:e}=this,a=Math.min(1100,s);if(t&&e){const i=a>900?200:70;return{maxHeight:a-i-30+"px"}}return{}},cutTime(){const{taskDetail:t}=this;let s=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),a="";return $A.formatDate("Y/m/d",s)==$A.formatDate("Y/m/d",e)?a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",s)==$A.formatDate("Y",e)?(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")):(a=$A.formatDate("Y/m/d H:i",s)+" ~ "+$A.formatDate("Y/m/d H:i",e),a=a.replace(/( 00:00| 23:59)/g,"")),a},getOwner(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:s})=>s===1).sort((s,e)=>s.id-e.id):[]},getAssist(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:s})=>s===0).sort((s,e)=>s.id-e.id):[]},menuList(){const{taskDetail:t}=this,s=[];return t.p_name||s.push({command:"priority",icon:"",name:"\u4F18\u5148\u7EA7"}),$A.isArray(t.task_user)&&t.task_user.find(({owner:e})=>e===0)||s.push({command:"assist",icon:"",name:"\u534F\u52A9\u4EBA\u5458"}),t.visibility<=1&&!this.visibleKeep&&s.push({command:"visible",icon:"",name:"\u53EF\u89C1\u6027"}),t.end_at||s.push({command:"times",icon:"",name:"\u622A\u6B62\u65F6\u95F4"}),(!t.loop||t.loop=="never")&&s.push({command:"loop",icon:"",name:"\u91CD\u590D\u5468\u671F"}),this.fileList.length==0&&s.push({command:"file",icon:"",name:"\u9644\u4EF6"}),this.subList.length==0&&s.push({command:"subtask",icon:"",name:"\u5B50\u4EFB\u52A1"}),s},menuText(){const{menuList:t}=this;let s="";return t.length>0&&t.forEach((e,a)=>{a>0&&(s+=" / "),s+=this.$L(e.name)}),s},visibleKeep(){return this.systemConfig.task_visible==="open"}},watch:{openTask:{handler(t){this.taskDetail=$A.cloneJSON(t),this.__openTask&&clearTimeout(this.__openTask),this.__openTask=setTimeout(s=>{var e;return(e=this.$refs.name)==null?void 0:e.resizeTextarea()},100)},immediate:!0,deep:!0},taskId:{handler(t){t>0?this.ready=!0:(this.windowPortrait&&$A.onBlur(),this.timeOpen=!1,this.timeForce=!1,this.loopForce=!1,this.assistForce=!1,this.visibleForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.chatInput&&this.$refs.chatInput.hidePopover())},immediate:!0},getOwner:{handler(t){const s=t.map(({userid:e})=>e);this.$set(this.taskDetail,"owner_userid",s),this.$set(this.ownerData,"owner_userid",s),this.$set(this.assistData,"disabled",t.map(({userid:e})=>e).filter(e=>e!=this.userId))},immediate:!0},getAssist:{handler(t){const s=t.map(({userid:e})=>e);this.$set(this.taskDetail,"assist_userid",s),this.$set(this.assistData,"assist_userid",s)},immediate:!0},receiveShow(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},"taskDetail.visibility_appointor":{handler(t){(t==null?void 0:t.length)>0&&t[0]&&(this.taskDetail.visibility=3,this.updateVisible())},immediate:!0}},methods:{within24Hours(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},isOverdue(t){return t.overdue?!0:$A.Date(t.end_at,!0)e.key===t);return s?s.label:t?`\u6BCF${t}\u5929`:"\u4ECE\u4E0D"},onNameKeydown(t){t.keyCode===13&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},checkUpdate(t){let s=!1;if(this.openTask.name!=this.taskDetail.name)if(s=!0,t===!0)this.updateData("name");else return t===!1&&this.$refs.name.focus(),!0;if(this.$refs.desc&&this.$refs.desc.getContent()!=this.taskContent)if(s=!0,t===!0)this.updateData("content");else return t===!1&&this.$refs.desc.focus(),!0;if(this.addsubShow&&this.addsubName)if(s=!0,t===!0)this.onAddsub();else return t===!1&&this.$refs.addsub.focus(),!0;return this.subList.some(({id:e})=>{this.$refs[`subTask_${e}`][0].checkUpdate(t)&&(s=!0)}),s},updateBlur(t,s){this.canUpdateBlur&&this.updateData(t,s)},updateData(t,s){let e=null;switch(t){case"priority":this.$set(this.taskDetail,"p_level",s.priority),this.$set(this.taskDetail,"p_name",s.name),this.$set(this.taskDetail,"p_color",s.color),t=["p_level","p_name","p_color"];break;case"times":if(this.taskDetail.start_at&&(Math.abs($A.Time(this.taskDetail.start_at)-$A.Time(s.start_at))>60||Math.abs($A.Time(this.taskDetail.end_at)-$A.Time(s.end_at))>60)&&typeof s.desc=="undefined"){$A.modalInput({title:`\u4FEE\u6539${this.taskDetail.parent_id>0?"\u5B50\u4EFB\u52A1":"\u4EFB\u52A1"}\u65F6\u95F4`,placeholder:"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8",okText:"\u786E\u5B9A",onOk:o=>o?(this.updateParams=Object.assign(s,{desc:o}),s.start_at&&s.end_at&&this.$refs.taskExistTipsRef?this.$refs.taskExistTipsRef.isExistTask({taskid:this.taskDetail.id,userids:this.taskDetail.owner_userid,timerange:[s.start_at,s.end_at]}).then(n=>{n||this.updateData("times",this.updateParams)}):this.updateData("times",this.updateParams),!1):"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8"});return}this.$set(this.taskDetail,"times",[s.start_at,s.end_at,s.desc]);break;case"loop":if(s==="custom"){this.customLoop();return}this.$set(this.taskDetail,"loop",s);break;case"content":const i=this.$refs.desc.getContent();if(i==this.taskContent)return;this.$set(this.taskDetail,"content",i),e=()=>{this.$store.dispatch("saveTaskContent",{task_id:this.taskId,content:i})};break}let a={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach(i=>{let o=this.taskDetail[i],n=this.openTask[i];$A.jsonStringify(o)!=$A.jsonStringify(n)&&(a[i]=o)}),!(Object.keys(a).length<=1)&&this.$store.dispatch("taskUpdate",a).then(({msg:i})=>{$A.messageSuccess(i),typeof e=="function"&&e()}).catch(({msg:i})=>{$A.modalError(i)})},customLoop(){let t=this.taskDetail.loop||1;$A.Modal.confirm({render:s=>s("div",[s("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},this.$L("\u91CD\u590D\u5468\u671F")),s("Input",{style:{width:"160px",margin:"0 auto"},props:{type:"number",value:t,maxlength:3},on:{input:e=>{t=$.runNum(e)}}},[s("span",{slot:"prepend"},this.$L("\u6BCF")),s("span",{slot:"append"},this.$L("\u5929"))])]),onOk:s=>{this.$Modal.remove(),t>0&&this.updateData("loop",t)},loading:!0,okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")})},async taskTimeChange(){const t=$A.date2string(this.timeValue,"Y-m-d H:i");$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(this.timeValue=await this.$store.dispatch("taskDefaultTime",t))},async onOwner(t){let s={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(t===!0){if(this.getOwner.length>0){this.receiveShow=!1,$A.messageError("\u4EFB\u52A1\u5DF2\u88AB\u9886\u53D6");return}const e=$A.date2string(this.timeValue,"Y-m-d H:i");if(!(e[0]&&e[1])){$A.messageError("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4");return}s.times=e,s.owner=this.ownerData.owner_userid=[this.userId]}if($A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid))return $A.count(s.owner)==0&&(s.owner=""),this.ownerLoad++,new Promise((e,a)=>{this.$store.dispatch("taskUpdate",s).then(({msg:i})=>{$A.messageSuccess(i),this.ownerLoad--,this.receiveShow=!1,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{}),e()}).catch(({msg:i})=>{$A.modalError(i),this.ownerLoad--,this.receiveShow=!1,a()})})},onAssist(){if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid))return new Promise((t,s)=>{this.getOwner.find(({userid:e})=>e===this.userId)&&this.assistData.assist_userid.find(e=>e===this.userId)?$A.modalConfirm({content:"\u4F60\u5F53\u524D\u662F\u8D1F\u8D23\u4EBA\uFF0C\u786E\u5B9A\u8981\u8F6C\u4E3A\u534F\u52A9\u4EBA\u5458\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{this.onAssistConfirm().then(t).catch(s)},onCancel:()=>{s()}}):this.onAssistConfirm().then(t).catch(s)})},onAssistConfirm(){return new Promise((t,s)=>{let e=this.assistData.assist_userid;e.length===0&&(e=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:e}).then(({msg:a})=>{$A.messageSuccess(a),this.assistLoad--,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{}),t()}).catch(({msg:a})=>{$A.modalError(a),this.assistLoad--,s()})})},openTime(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange(t){t||(this.timeOpen=!1)},timeClear(){this.updateData("times",{start_at:!1,end_at:!1}),this.timeOpen=!1},timeOk(){const t=$A.date2string(this.timeValue,"Y-m-d H:i");this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen(){this.addsubShow=!0,this.$nextTick(()=>{this.$refs.addsub.focus()})},addsubChackClose(){this.addsubName==""&&(this.addsubShow=!1)},addsubKeydown(t){if(t.keyCode===13){if(t.shiftKey||this.addsubLoad>0)return;t.preventDefault(),this.onAddsub()}},onAddsub(){if(this.addsubName==""){$A.messageError("\u4EFB\u52A1\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then(({msg:t})=>{$A.messageSuccess(t),this.addsubLoad--,this.addsubName=""}).catch(({msg:t})=>{$A.modalError(t),this.addsubLoad--})},getLogLists(){this.navActive=="log"&&this.$refs.log.getLists(!0)},logLoadChange(t){this.logLoadIng=t},dropAdd(t){switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("\u672A\u8BBE\u7F6E")),this.$nextTick(()=>{this.$refs.priority.show()});break;case"assist":this.assistForce=!0,this.$nextTick(()=>{this.$refs.assist.onSelection()});break;case"visible":this.visibleForce=!0,this.$nextTick(()=>{this.showCisibleDropdown()});break;case"times":this.timeForce=!0,this.$nextTick(()=>{this.openTime()});break;case"loop":this.loopForce=!0,this.$nextTick(()=>{this.$refs.loop.show()});break;case"file":this.onUploadClick(!0);break;case"subtask":this.addsubForce=!0,this.$nextTick(()=>{this.addsubOpen()});break}},onEventMore(t){["image","file"].includes(t)&&this.onUploadClick(!1)},onUploadClick(t){this.imageAttachment=!!t,this.$refs.upload.handleClick()},msgDialog(t=null,s=!1){this.sendLoad>0||this.openLoad>0||(s===!0?this.openLoad++:this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then(({data:e})=>{this.$store.dispatch("saveTask",{id:e.id,dialog_id:e.dialog_id}),this.$store.dispatch("saveDialog",e.dialog_data),$A.isSubElectron?this.resizeDialog().then(()=>{this.sendDialogMsg(t)}):this.$nextTick(()=>{if(this.windowPortrait){$A.onBlur();const a={time:$A.Time()+10,msgRecord:this.msgRecord,msgFile:this.msgFile,msgText:typeof t=="string"&&t?t:this.msgText,dialogId:e.dialog_id};this.msgRecord={},this.msgFile=[],this.msgText="",this.$nextTick(i=>{this.dialogId>0&&this.$store.dispatch("openTask",0),this.$store.dispatch("openDialog",e.dialog_id).then(o=>{this.$store.state.dialogMsgTransfer=a})})}else this.sendDialogMsg(t)})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{s===!0?this.openLoad--:this.sendLoad--}))},sendDialogMsg(t=null){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile.map(s=>Object.assign(s,{ajaxExtraData:{image_attachment:this.imageAttachment?1:0}}))):this.msgText?this.$refs.dialog.sendMsg(this.msgText):typeof t=="string"&&t&&this.$refs.dialog.sendMsg(t),this.msgFile=[],this.msgText=""},taskPasteDrag(t,s){if(this.dialogDrag=!1,$A.dataHasFolder(s==="drag"?t.dataTransfer:t.clipboardData)){t.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${s==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\u3002`);return}const e=s==="drag"?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(e),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskDragOver(t,s){let e=this.__dialogDrag=$A.randomString(8);if(!t)setTimeout(()=>{e===this.__dialogDrag&&(this.dialogDrag=t)},150);else{if(s.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},onSelectFile(t){this.msgFile=$A.isArray(t)?t:[t],this.msgDialog()},onRecord(t){this.msgRecord=t,this.msgDialog()},onSend(t){this.$refs.chatInput&&this.$refs.chatInput.hidePopover(),t==="open"?this.msgDialog(null,!0):this.msgDialog(t)},deleteFile(t){this.$set(t,"_show_menu",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch(({msg:s})=>{$A.modalError(s),this.$store.dispatch("getTaskFiles",this.taskDetail.id)})},openMenu(t,s){const e=this.$refs[`taskMenu_${s.id}`];e&&e.handleClick(t)},openNewWin(){let t={title:this.taskDetail.name,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,this.$el.clientWidth+72),height:Math.min(window.screen.availHeight,this.$el.clientHeight+72),minWidth:600,minHeight:450};this.hasOpenDialog&&(t.minWidth=800,t.minHeight=600),this.$Electron.sendMessage("windowRouter",{name:`task-${this.taskDetail.id}`,path:`/single/task/${this.taskDetail.id}?navActive=${this.navActive}`,force:!1,config:t}),this.$store.dispatch("openTask",0)},resizeDialog(){return new Promise(t=>{this.$Electron.sendMessage("windowSize",{width:Math.max(1100,this.windowWidth),height:Math.max(720,this.windowHeight),minWidth:800,minHeight:600,autoZoom:!0});let s=0,e=setInterval(()=>{s++,(this.$refs.dialog||s>20)&&(clearInterval(e),this.$refs.dialog&&t())},100)})},viewFile(t){if(["jpg","jpeg","webp","gif","png"].includes(t.ext)){const e=this.fileList.filter(i=>["jpg","jpeg","webp","gif","png"].includes(i.ext)),a=e.findIndex(i=>i.id===t.id);a>-1?this.$store.dispatch("previewImage",{index:a,list:e.map(i=>({src:i.path,width:i.width,height:i.height}))}):this.$store.dispatch("previewImage",{index:0,list:[{src:t.path,width:t.width,height:t.height}]});return}const s=`/single/file/task/${t.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-task-${t.id}`,path:s,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:`${t.name} (${$A.bytesToSize(t.size)})`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:t.ext==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:`${t.name} (${$A.bytesToSize(t.size)})`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${s}`}}):window.open($A.apiUrl(`..${s}`))},downFile(t){$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${t.name} (${$A.bytesToSize(t.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`project/task/filedown?file_id=${t.id}`))}})},showCisibleDropdown(){this.$refs.eDropdownRef.show()},visibleUserSelectShowChange(t){if(!t&&(this.taskDetail.visibility_appointor.length==0||!this.taskDetail.visibility_appointor[0])){let s=this.taskDetail.old_visibility;this.taskDetail.visibility=s>2?1:s||1,this.taskDetail.visibility<3&&this.updateVisible()}},dropVisible(t){switch(t){case 1:case 2:this.taskDetail.visibility=t,this.updateVisible();break;case 3:this.taskDetail.old_visibility=this.taskDetail.visibility,this.taskDetail.visibility=t,this.$nextTick(()=>{this.$refs.visibleUserSelectRef.onSelection()});break}},dropDeadline(t){switch(t){case 1:this.delayTaskShow=!0;break;case 2:this.openTime();break}},onDelay(){this.$refs.formDelayTaskRef.validate(t=>{if(!!t){this.delayTaskLoading=!0;var s=new Date(this.taskDetail.end_at);s.setHours(s.getHours()+Number(this.delayTaskForm.time)),this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,times:[this.taskDetail.start_at,$A.formatDate("Y-m-d H:i:s",s),this.delayTaskForm.remark]}).then(({msg:e})=>{$A.messageSuccess(e),this.delayTaskLoading=!1,this.delayTaskShow=!1,this.delayTaskForm.time="24",this.delayTaskForm.remark="",this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{})}).catch(({msg:e})=>{$A.modalError(e),this.delayTaskLoading=!1})}})},updateVisible(){this.updateData(["visibility","visibility_appointor"])}}},m={};var W=l(B,V,R,!1,Y,null,null,null);function Y(t){for(let s in m)this[s]=m[s]}var Q=function(){return W.exports}();export{M as T,x as a,Q as b}; diff --git a/public/js/build/TaskMenu.a0d74239.js b/public/js/build/TaskMenu.0454bb90.js similarity index 96% rename from public/js/build/TaskMenu.a0d74239.js rename to public/js/build/TaskMenu.0454bb90.js index 277d0f7a5..395937510 100644 --- a/public/js/build/TaskMenu.a0d74239.js +++ b/public/js/build/TaskMenu.0454bb90.js @@ -1 +1 @@ -import{m as i,b as n,n as l}from"./app.6c8b31b1.js";var r=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-menu-icon",on:{click:t.handleClick}},[t.loadIng?e("div",{staticClass:"loading"},[e("Loading")],1):[t.task.complete_at?e("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):e("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)},d=[];const c={name:"TaskMenu",props:{task:{type:Object,default:()=>({})},loadStatus:{type:Boolean,default:!1},colorShow:{type:Boolean,default:!0},updateBefore:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String,default:"md-radio-button-off"},completedIcon:{type:String,default:"md-checkmark-circle"}},computed:{...i(["loads","taskFlows"]),...n(["isLoad"]),loadIng(){return this.loadStatus?!0:this.isLoad(`task-${this.task.id}`)}},methods:{handleClick(t){this.$store.state.taskOperation={event:t,task:this.task,loadStatus:this.loadStatus,colorShow:this.colorShow,updateBefore:this.updateBefore,disabled:this.disabled,size:this.size,onUpdate:s=>{this.$emit("on-update",s)}}},updateTask(t){if(this.loadIng)return;Object.keys(t).forEach(e=>this.$set(this.task,e,t[e]));const s=Object.assign(t,{task_id:this.task.id});this.$store.dispatch("taskUpdate",s).then(({data:e,msg:o})=>{$A.messageSuccess(o),this.$store.dispatch("saveTaskBrowse",s.task_id),this.$emit("on-update",e)}).catch(({msg:e})=>{$A.modalError(e),this.$store.dispatch("getTaskOne",s.task_id).catch(()=>{})})}}},a={};var u=l(c,r,d,!1,p,null,null,null);function p(t){for(let s in a)this[s]=a[s]}var m=function(){return u.exports}();export{m as T}; +import{m as i,b as n,n as l}from"./app.6910ca56.js";var r=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-menu-icon",on:{click:t.handleClick}},[t.loadIng?e("div",{staticClass:"loading"},[e("Loading")],1):[t.task.complete_at?e("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):e("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)},d=[];const c={name:"TaskMenu",props:{task:{type:Object,default:()=>({})},loadStatus:{type:Boolean,default:!1},colorShow:{type:Boolean,default:!0},updateBefore:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String,default:"md-radio-button-off"},completedIcon:{type:String,default:"md-checkmark-circle"}},computed:{...i(["loads","taskFlows"]),...n(["isLoad"]),loadIng(){return this.loadStatus?!0:this.isLoad(`task-${this.task.id}`)}},methods:{handleClick(t){this.$store.state.taskOperation={event:t,task:this.task,loadStatus:this.loadStatus,colorShow:this.colorShow,updateBefore:this.updateBefore,disabled:this.disabled,size:this.size,onUpdate:s=>{this.$emit("on-update",s)}}},updateTask(t){if(this.loadIng)return;Object.keys(t).forEach(e=>this.$set(this.task,e,t[e]));const s=Object.assign(t,{task_id:this.task.id});this.$store.dispatch("taskUpdate",s).then(({data:e,msg:o})=>{$A.messageSuccess(o),this.$store.dispatch("saveTaskBrowse",s.task_id),this.$emit("on-update",e)}).catch(({msg:e})=>{$A.modalError(e),this.$store.dispatch("getTaskOne",s.task_id).catch(()=>{})})}}},a={};var u=l(c,r,d,!1,p,null,null,null);function p(t){for(let s in a)this[s]=a[s]}var m=function(){return u.exports}();export{m as T}; diff --git a/public/js/build/UserSelect.d62f565b.js b/public/js/build/UserSelect.1938cd94.js similarity index 99% rename from public/js/build/UserSelect.d62f565b.js rename to public/js/build/UserSelect.1938cd94.js index 898c6492e..316610b55 100644 --- a/public/js/build/UserSelect.d62f565b.js +++ b/public/js/build/UserSelect.1938cd94.js @@ -1 +1 @@ -import{m as r,n}from"./app.6c8b31b1.js";var o=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"common-user-select",class:e.warpClass},[e.module?e._e():t("ul",[e._l(e.values,function(s){return s?t("li",{on:{click:e.onSelection}},[t("UserAvatar",{attrs:{userid:s,size:e.avatarSize,"show-icon":e.avatarIcon,"show-name":e.avatarName}})],1):e._e()}),e.addIcon||e.values.length===0?t("li",{staticClass:"add-icon",style:e.addStyle,on:{click:e.onSelection}}):e._e()],2),t("Modal",{attrs:{"class-name":"common-user-select-modal","mask-closable":!1,closable:!e.isFullscreen,fullscreen:e.isFullscreen,"footer-hide":e.isFullscreen,width:"640"},scopedSlots:e._u([{key:"header",fn:function(){return[e.isFullscreen?t("div",{staticClass:"user-modal-header"},[t("div",{staticClass:"user-modal-close",on:{click:function(s){e.showModal=!1}}},[e._v(e._s(e.$L("\u5173\u95ED")))]),t("div",{staticClass:"user-modal-title"},[t("span",[e._v(e._s(e.localTitle))])]),t("div",{staticClass:"user-modal-submit",on:{click:e.onSubmit}},[e.submittIng>0?t("div",{staticClass:"submit-loading"},[t("Loading")],1):e._e(),e._v(" "+e._s(e.$L("\u786E\u5B9A"))+" "),e.selects.length>0?[e._v(" ("+e._s(e.selects.length)),e.multipleMax?t("span",[e._v("/"+e._s(e.multipleMax))]):e._e(),e._v(") ")]:e._e()],2)]):t("div",{staticClass:"ivu-modal-header-inner"},[e._v(e._s(e.localTitle))])]},proxy:!0},{key:"close",fn:function(){return[t("i",{staticClass:"ivu-icon ivu-icon-ios-close"})]},proxy:!0},{key:"footer",fn:function(){return[t("Button",{attrs:{type:"primary",loading:e.submittIng>0},on:{click:e.onSubmit}},[e._v(" "+e._s(e.$L("\u786E\u5B9A"))+" "),e.selects.length>0?[e._v(" ("+e._s(e.selects.length)),e.multipleMax?t("span",[e._v("/"+e._s(e.multipleMax))]):e._e(),e._v(") ")]:e._e()],2)]},proxy:!0}]),model:{value:e.showModal,callback:function(s){e.showModal=s},expression:"showModal"}},[t("div",{staticClass:"user-modal-search"},[e.selects.length>0?t("Scrollbar",{ref:"selected",staticClass:"search-selected",attrs:{"enable-x":"","enable-y":!1}},[t("ul",e._l(e.formatSelect(e.selects),function(s){return t("li",{attrs:{"data-id":s.userid},on:{click:function(i){return i.stopPropagation(),e.onRemoveItem(s.userid)}}},[s.type=="group"?[s.avatar?t("EAvatar",{staticClass:"img-avatar",attrs:{src:s.avatar,size:32}}):s.group_type=="department"?t("i",{staticClass:"taskfont icon-avatar department"},[e._v("\uE75C")]):s.group_type=="project"?t("i",{staticClass:"taskfont icon-avatar project"},[e._v("\uE6F9")]):s.group_type=="task"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):s.group_type=="okr"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):t("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t("UserAvatar",{attrs:{userid:s.userid}})],2)}),0)]):e._e(),t("Input",{staticClass:"search-input",attrs:{placeholder:e.localPlaceholder,clearable:""},model:{value:e.searchKey,callback:function(s){e.searchKey=s},expression:"searchKey"}},[t("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[e.loadIng>0?t("Loading"):t("Icon",{attrs:{type:"ios-search"}})],1)])],1),e.isWhole?t("ul",{staticClass:"user-modal-switch"},e._l(e.switchItems,function(s){return t("li",{key:s.key,class:{active:e.switchActive===s.key},on:{click:function(i){e.switchActive=s.key}}},[e._v(e._s(e.$L(s.label)))])}),0):e._e(),e.lists.length>0?t("Scrollbar",{staticClass:"user-modal-list"},[e.switchActive=="project"?t("ul",{staticClass:"user-modal-project"},e._l(e.lists,function(s){return t("li",{class:e.selectClass(s.userid_list),on:{click:function(i){return e.onSelectProject(s.userid_list)}}},[t("Icon",{staticClass:"user-modal-icon",attrs:{type:e.selectIcon(s.userid_list)}}),t("div",{staticClass:"user-modal-avatar"},[t("i",{staticClass:"taskfont icon-avatar"},[e._v("\uE6F9")]),t("div",{staticClass:"project-name"},[t("div",{staticClass:"label"},[e._v(e._s(s.name))]),t("div",{staticClass:"subtitle"},[e._v(" "+e._s(s.userid_list.length)+" "+e._s(e.$L("\u9879\u76EE\u6210\u5458"))+" "),t("em",{staticClass:"all"},[e._v(e._s(e.$L("\u5DF2\u5168\u9009")))]),t("em",{staticClass:"some"},[e._v(e._s(e.$L("\u5DF2\u9009\u90E8\u5206")))])])])])],1)}),0):t("ul",[e.showSelectAll?t("li",{class:e.selectClass("all"),on:{click:e.onSelectAll}},[t("Icon",{staticClass:"user-modal-icon",attrs:{type:e.selectIcon("all")}}),t("div",{staticClass:"user-modal-all"},[e._v(e._s(e.$L("\u5168\u9009")))])],1):e._e(),e._l(e.lists,function(s){return t("li",{class:{selected:e.selects.includes(s.userid),disabled:e.isUncancelable(s.userid)||e.isDisabled(s.userid)},on:{click:function(i){return e.onSelectItem(s)}}},[e.selects.includes(s.userid)?t("Icon",{staticClass:"user-modal-icon",attrs:{type:"ios-checkmark-circle"}}):t("Icon",{staticClass:"user-modal-icon",attrs:{type:"ios-radio-button-off"}}),s.type=="group"?t("div",{staticClass:"user-modal-avatar"},[s.avatar?t("EAvatar",{staticClass:"img-avatar",attrs:{src:s.avatar,size:40}}):s.group_type=="department"?t("i",{staticClass:"taskfont icon-avatar department"},[e._v("\uE75C")]):s.group_type=="project"?t("i",{staticClass:"taskfont icon-avatar project"},[e._v("\uE6F9")]):s.group_type=="task"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):s.group_type=="okr"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):t("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}}),t("div",{staticClass:"avatar-name"},[t("span",[e._v(e._s(s.name))])])],1):t("UserAvatar",{staticClass:"user-modal-avatar",attrs:{userid:s.userid,size:40,"show-name":""}})],1)})],2)]):t("div",{staticClass:"user-modal-empty"},[e.waitIng>0?t("Loading"):[t("div",{staticClass:"empty-icon"},[t("Icon",{attrs:{type:"ios-cafe-outline"}})],1),t("div",{staticClass:"empty-text"},[e._v(e._s(e.$L("\u6682\u65E0\u7ED3\u679C")))])]],2)],1)],1)},h=[];const u={name:"UserSelect",props:{value:{type:[String,Number,Array],default:()=>[]},uncancelable:{type:Array,default:()=>[]},disabledChoice:{type:Array,default:()=>[]},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0},showBot:{type:Boolean,default:!1},showDisable:{type:Boolean,default:!1},multipleMax:{type:Number},avatarSize:{type:Number,default:28},avatarIcon:{type:Boolean,default:!0},avatarName:{type:Boolean,default:!1},addIcon:{type:Boolean,default:!0},border:{type:Boolean,default:!1},title:{type:String},placeholder:{type:String},showSelectAll:{type:Boolean,default:!0},showDialog:{type:Boolean,default:!1},module:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},beforeSubmit:Function},data(){return{switchItems:[{key:"recent",label:"\u6700\u8FD1"},{key:"contact",label:"\u901A\u8BAF\u5F55"},{key:"project",label:"\u9879\u76EE\u6210\u5458"}],switchActive:"recent",loadIng:0,waitIng:0,submittIng:0,values:[],selects:[],recents:[],contacts:[],projects:[],showModal:!1,searchKey:null,searchCache:[]}},watch:{value:{handler(e){typeof e=="number"?this.$emit("input",e>0?[e]:[]):typeof e=="string"&&(e=e.indexOf(",")>-1?e.split(","):[e],this.$emit("input",e.map(a=>$A.runNum(a)).filter(a=>a>0))),this.values=e},immediate:!0},isWhole:{handler(e){e?this.switchActive="recent":this.switchActive="contact"},immediate:!0},showModal(e){e?this.searchBefore():this.searchKey="",this.$emit("on-show-change",e,this.values)},searchKey(){this.searchBefore()},switchActive(){this.searchBefore()}},computed:{...r(["cacheDialogs"]),isFullscreen({windowWidth:e}){return e<576},isWhole({projectId:e,noProjectId:a,dialogId:t}){return e===0&&a===0&&t===0},lists({switchActive:e,searchKey:a,recents:t,contacts:s,projects:i}){switch(e){case"recent":return a?t.filter(l=>`${l.name}`.indexOf(a)>-1):t;case"contact":return s;case"project":return i}return[]},isSelectAll({lists:e,selects:a}){return e.length>0&&e.filter(t=>a.includes(t.userid)).length===e.length},warpClass(){return{"select-module":this.module,"select-border":this.border,"select-whole":this.isWhole}},addStyle({avatarSize:e}){return{width:e+"px",height:e+"px"}},localTitle({title:e}){return e===void 0?this.$L("\u9009\u62E9\u4F1A\u5458"):e},localPlaceholder({placeholder:e}){return e===void 0?this.$L("\u641C\u7D22"):e}},methods:{isUncancelable(e){return this.uncancelable.length===0?!1:this.uncancelable.includes(e)},isDisabled(e){return this.disabledChoice.length===0?!1:this.disabledChoice.includes(e)},formatSelect(e){return e.map(a=>$A.leftExists(a,"d:")?this.recents.find(t=>t.userid===a):{type:"user",userid:a})},selectIcon(e){if(e==="all")return this.isSelectAll?"ios-checkmark-circle":"ios-radio-button-off";if($A.isArray(e)&&e.length>0){const a=e.filter(t=>this.selects.includes(t)).length;if(a===e.length)return"ios-checkmark-circle";if(a>0)return"ios-remove-circle"}return"ios-radio-button-off"},selectClass(e){switch(this.selectIcon(e)){case"ios-checkmark-circle":return"selected";case"ios-remove-circle":return"somed"}return""},searchBefore(){!this.showModal||(this.switchActive==="recent"?this.searchRecent():this.switchActive==="contact"?this.searchContact():this.switchActive==="project"&&this.searchProject())},searchRecent(){this.recents=this.cacheDialogs.filter(e=>e.name===void 0||e.dialog_delete===1||!this.showBot&&e.bot?!1:this.showDialog||e.type==="user").sort((e,a)=>e.top_at||a.top_at?$A.Date(a.top_at)-$A.Date(e.top_at):e.todo_num>0||a.todo_num>0?a.todo_num-e.todo_num:$A.Date(a.last_at)-$A.Date(e.last_at)).map(({id:e,name:a,type:t,group_type:s,avatar:i,dialog_user:l})=>({name:a,type:t,group_type:s,avatar:i,userid:t==="user"?l.userid:`d:${e}`}))},searchContact(){let e=this.searchKey;const a=this.searchCache.find(t=>t.type==="contact"&&t.key==e);a&&(this.contacts=a.data),this.waitIng++,setTimeout(()=>{if(this.searchKey!=e){this.waitIng--;return}setTimeout(()=>{this.loadIng++},300),this.$store.dispatch("call",{url:"users/search",data:{keys:{key:e,project_id:this.projectId,no_project_id:this.noProjectId,dialog_id:this.dialogId,bot:this.showBot&&e?2:0,disable:this.showDisable&&e?2:0},take:50}}).then(({data:t})=>{t=t.map(l=>Object.assign(l,{type:"user"})),this.contacts=t;const s=this.searchCache.findIndex(l=>l.key==e),i={type:"contact",key:e,data:t,time:$A.Time()};s>-1?this.searchCache.splice(s,1,i):this.searchCache.push(i)}).catch(({msg:t})=>{this.contacts=[],$A.messageWarning(t)}).finally(t=>{this.loadIng--,this.waitIng--})},this.searchCache.length>0?300:0)},searchProject(){let e=this.searchKey;const a=this.searchCache.find(t=>t.type==="project"&&t.key==e);a&&(this.projects=a.data),this.waitIng++,setTimeout(()=>{if(this.searchKey!=e){this.waitIng--;return}setTimeout(()=>{this.loadIng++},300),this.$store.dispatch("call",{url:"project/lists",data:{type:"team",keys:{name:e},getuserid:"yes",getstatistics:"no"}}).then(({data:t})=>{t=t.data.map(l=>Object.assign(l,{type:"project"})),this.projects=t;const s=this.searchCache.findIndex(l=>l.key==e),i={type:"project",key:e,data:t,time:$A.Time()};s>-1?this.searchCache.splice(s,1,i):this.searchCache.push(i)}).catch(({msg:t})=>{this.projects=[],$A.messageWarning(t)}).finally(t=>{this.loadIng--,this.waitIng--})},this.searchCache.length>0?300:0)},onSelection(){this.disable||this.$nextTick(e=>{this.selects=$A.cloneJSON(this.values),this.showModal=!0})},onSelectAll(){if(this.isSelectAll){this.selects=$A.cloneJSON(this.uncancelable);return}this.lists.some(e=>{if(this.isDisabled(e.userid))return!1;if(this.multipleMax&&this.selects.length>=this.multipleMax)return $A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF"),!0;this.selects.includes(e.userid)||this.selects.push(e.userid)})},onSelectItem({userid:e}){if(this.selects.includes(e)){if(this.isUncancelable(e))return;this.selects=this.selects.filter(a=>a!=e)}else{if(this.isDisabled(e))return;if(this.multipleMax&&this.selects.length>=this.multipleMax){$A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF");return}this.selects.push(e),this.$nextTick(()=>{$A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${e}"]`))})}},onSelectProject(e){switch(this.selectIcon(e)){case"ios-checkmark-circle":const a=e.filter(s=>!this.isUncancelable(s));a.length!=e.length&&$A.messageWarning("\u90E8\u5206\u6210\u5458\u7981\u6B62\u53D6\u6D88"),this.selects=this.selects.filter(s=>!a.includes(s));break;default:const t=e.filter(s=>!this.isDisabled(s));t.length!=e.length&&$A.messageWarning("\u90E8\u5206\u6210\u5458\u7981\u6B62\u9009\u62E9"),this.selects=this.selects.concat(t.filter(s=>!this.selects.includes(s))),this.multipleMax&&this.selects.length>this.multipleMax&&($A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF"),this.selects=this.selects.slice(0,this.multipleMax));break}},onRemoveItem(e){this.isUncancelable(e)||(this.selects=this.selects.filter(a=>a!=e))},onSubmit(){if(this.submittIng>0)return;const e=$A.cloneJSON(this.values);if(this.values=$A.cloneJSON(this.selects),this.$emit("input",this.values),this.$emit("onSubmit",this.values),!this.beforeSubmit){this.showModal=!1;return}const a=this.beforeSubmit();a&&a.then?(this.submittIng++,a.then(()=>{this.showModal=!1}).catch(()=>{this.values=e,this.$emit("input",this.values)}).finally(()=>{this.submittIng--})):this.showModal=!1}}},c={};var d=n(u,o,h,!1,f,null,null,null);function f(e){for(let a in c)this[a]=c[a]}var m=function(){return d.exports}();export{m as U}; +import{m as r,n}from"./app.6910ca56.js";var o=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"common-user-select",class:e.warpClass},[e.module?e._e():t("ul",[e._l(e.values,function(s){return s?t("li",{on:{click:e.onSelection}},[t("UserAvatar",{attrs:{userid:s,size:e.avatarSize,"show-icon":e.avatarIcon,"show-name":e.avatarName}})],1):e._e()}),e.addIcon||e.values.length===0?t("li",{staticClass:"add-icon",style:e.addStyle,on:{click:e.onSelection}}):e._e()],2),t("Modal",{attrs:{"class-name":"common-user-select-modal","mask-closable":!1,closable:!e.isFullscreen,fullscreen:e.isFullscreen,"footer-hide":e.isFullscreen,width:"640"},scopedSlots:e._u([{key:"header",fn:function(){return[e.isFullscreen?t("div",{staticClass:"user-modal-header"},[t("div",{staticClass:"user-modal-close",on:{click:function(s){e.showModal=!1}}},[e._v(e._s(e.$L("\u5173\u95ED")))]),t("div",{staticClass:"user-modal-title"},[t("span",[e._v(e._s(e.localTitle))])]),t("div",{staticClass:"user-modal-submit",on:{click:e.onSubmit}},[e.submittIng>0?t("div",{staticClass:"submit-loading"},[t("Loading")],1):e._e(),e._v(" "+e._s(e.$L("\u786E\u5B9A"))+" "),e.selects.length>0?[e._v(" ("+e._s(e.selects.length)),e.multipleMax?t("span",[e._v("/"+e._s(e.multipleMax))]):e._e(),e._v(") ")]:e._e()],2)]):t("div",{staticClass:"ivu-modal-header-inner"},[e._v(e._s(e.localTitle))])]},proxy:!0},{key:"close",fn:function(){return[t("i",{staticClass:"ivu-icon ivu-icon-ios-close"})]},proxy:!0},{key:"footer",fn:function(){return[t("Button",{attrs:{type:"primary",loading:e.submittIng>0},on:{click:e.onSubmit}},[e._v(" "+e._s(e.$L("\u786E\u5B9A"))+" "),e.selects.length>0?[e._v(" ("+e._s(e.selects.length)),e.multipleMax?t("span",[e._v("/"+e._s(e.multipleMax))]):e._e(),e._v(") ")]:e._e()],2)]},proxy:!0}]),model:{value:e.showModal,callback:function(s){e.showModal=s},expression:"showModal"}},[t("div",{staticClass:"user-modal-search"},[e.selects.length>0?t("Scrollbar",{ref:"selected",staticClass:"search-selected",attrs:{"enable-x":"","enable-y":!1}},[t("ul",e._l(e.formatSelect(e.selects),function(s){return t("li",{attrs:{"data-id":s.userid},on:{click:function(i){return i.stopPropagation(),e.onRemoveItem(s.userid)}}},[s.type=="group"?[s.avatar?t("EAvatar",{staticClass:"img-avatar",attrs:{src:s.avatar,size:32}}):s.group_type=="department"?t("i",{staticClass:"taskfont icon-avatar department"},[e._v("\uE75C")]):s.group_type=="project"?t("i",{staticClass:"taskfont icon-avatar project"},[e._v("\uE6F9")]):s.group_type=="task"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):s.group_type=="okr"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):t("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t("UserAvatar",{attrs:{userid:s.userid}})],2)}),0)]):e._e(),t("Input",{staticClass:"search-input",attrs:{placeholder:e.localPlaceholder,clearable:""},model:{value:e.searchKey,callback:function(s){e.searchKey=s},expression:"searchKey"}},[t("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[e.loadIng>0?t("Loading"):t("Icon",{attrs:{type:"ios-search"}})],1)])],1),e.isWhole?t("ul",{staticClass:"user-modal-switch"},e._l(e.switchItems,function(s){return t("li",{key:s.key,class:{active:e.switchActive===s.key},on:{click:function(i){e.switchActive=s.key}}},[e._v(e._s(e.$L(s.label)))])}),0):e._e(),e.lists.length>0?t("Scrollbar",{staticClass:"user-modal-list"},[e.switchActive=="project"?t("ul",{staticClass:"user-modal-project"},e._l(e.lists,function(s){return t("li",{class:e.selectClass(s.userid_list),on:{click:function(i){return e.onSelectProject(s.userid_list)}}},[t("Icon",{staticClass:"user-modal-icon",attrs:{type:e.selectIcon(s.userid_list)}}),t("div",{staticClass:"user-modal-avatar"},[t("i",{staticClass:"taskfont icon-avatar"},[e._v("\uE6F9")]),t("div",{staticClass:"project-name"},[t("div",{staticClass:"label"},[e._v(e._s(s.name))]),t("div",{staticClass:"subtitle"},[e._v(" "+e._s(s.userid_list.length)+" "+e._s(e.$L("\u9879\u76EE\u6210\u5458"))+" "),t("em",{staticClass:"all"},[e._v(e._s(e.$L("\u5DF2\u5168\u9009")))]),t("em",{staticClass:"some"},[e._v(e._s(e.$L("\u5DF2\u9009\u90E8\u5206")))])])])])],1)}),0):t("ul",[e.showSelectAll?t("li",{class:e.selectClass("all"),on:{click:e.onSelectAll}},[t("Icon",{staticClass:"user-modal-icon",attrs:{type:e.selectIcon("all")}}),t("div",{staticClass:"user-modal-all"},[e._v(e._s(e.$L("\u5168\u9009")))])],1):e._e(),e._l(e.lists,function(s){return t("li",{class:{selected:e.selects.includes(s.userid),disabled:e.isUncancelable(s.userid)||e.isDisabled(s.userid)},on:{click:function(i){return e.onSelectItem(s)}}},[e.selects.includes(s.userid)?t("Icon",{staticClass:"user-modal-icon",attrs:{type:"ios-checkmark-circle"}}):t("Icon",{staticClass:"user-modal-icon",attrs:{type:"ios-radio-button-off"}}),s.type=="group"?t("div",{staticClass:"user-modal-avatar"},[s.avatar?t("EAvatar",{staticClass:"img-avatar",attrs:{src:s.avatar,size:40}}):s.group_type=="department"?t("i",{staticClass:"taskfont icon-avatar department"},[e._v("\uE75C")]):s.group_type=="project"?t("i",{staticClass:"taskfont icon-avatar project"},[e._v("\uE6F9")]):s.group_type=="task"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):s.group_type=="okr"?t("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):t("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}}),t("div",{staticClass:"avatar-name"},[t("span",[e._v(e._s(s.name))])])],1):t("UserAvatar",{staticClass:"user-modal-avatar",attrs:{userid:s.userid,size:40,"show-name":""}})],1)})],2)]):t("div",{staticClass:"user-modal-empty"},[e.waitIng>0?t("Loading"):[t("div",{staticClass:"empty-icon"},[t("Icon",{attrs:{type:"ios-cafe-outline"}})],1),t("div",{staticClass:"empty-text"},[e._v(e._s(e.$L("\u6682\u65E0\u7ED3\u679C")))])]],2)],1)],1)},h=[];const u={name:"UserSelect",props:{value:{type:[String,Number,Array],default:()=>[]},uncancelable:{type:Array,default:()=>[]},disabledChoice:{type:Array,default:()=>[]},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0},showBot:{type:Boolean,default:!1},showDisable:{type:Boolean,default:!1},multipleMax:{type:Number},avatarSize:{type:Number,default:28},avatarIcon:{type:Boolean,default:!0},avatarName:{type:Boolean,default:!1},addIcon:{type:Boolean,default:!0},border:{type:Boolean,default:!1},title:{type:String},placeholder:{type:String},showSelectAll:{type:Boolean,default:!0},showDialog:{type:Boolean,default:!1},module:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},beforeSubmit:Function},data(){return{switchItems:[{key:"recent",label:"\u6700\u8FD1"},{key:"contact",label:"\u901A\u8BAF\u5F55"},{key:"project",label:"\u9879\u76EE\u6210\u5458"}],switchActive:"recent",loadIng:0,waitIng:0,submittIng:0,values:[],selects:[],recents:[],contacts:[],projects:[],showModal:!1,searchKey:null,searchCache:[]}},watch:{value:{handler(e){typeof e=="number"?this.$emit("input",e>0?[e]:[]):typeof e=="string"&&(e=e.indexOf(",")>-1?e.split(","):[e],this.$emit("input",e.map(a=>$A.runNum(a)).filter(a=>a>0))),this.values=e},immediate:!0},isWhole:{handler(e){e?this.switchActive="recent":this.switchActive="contact"},immediate:!0},showModal(e){e?this.searchBefore():this.searchKey="",this.$emit("on-show-change",e,this.values)},searchKey(){this.searchBefore()},switchActive(){this.searchBefore()}},computed:{...r(["cacheDialogs"]),isFullscreen({windowWidth:e}){return e<576},isWhole({projectId:e,noProjectId:a,dialogId:t}){return e===0&&a===0&&t===0},lists({switchActive:e,searchKey:a,recents:t,contacts:s,projects:i}){switch(e){case"recent":return a?t.filter(l=>`${l.name}`.indexOf(a)>-1):t;case"contact":return s;case"project":return i}return[]},isSelectAll({lists:e,selects:a}){return e.length>0&&e.filter(t=>a.includes(t.userid)).length===e.length},warpClass(){return{"select-module":this.module,"select-border":this.border,"select-whole":this.isWhole}},addStyle({avatarSize:e}){return{width:e+"px",height:e+"px"}},localTitle({title:e}){return e===void 0?this.$L("\u9009\u62E9\u4F1A\u5458"):e},localPlaceholder({placeholder:e}){return e===void 0?this.$L("\u641C\u7D22"):e}},methods:{isUncancelable(e){return this.uncancelable.length===0?!1:this.uncancelable.includes(e)},isDisabled(e){return this.disabledChoice.length===0?!1:this.disabledChoice.includes(e)},formatSelect(e){return e.map(a=>$A.leftExists(a,"d:")?this.recents.find(t=>t.userid===a):{type:"user",userid:a})},selectIcon(e){if(e==="all")return this.isSelectAll?"ios-checkmark-circle":"ios-radio-button-off";if($A.isArray(e)&&e.length>0){const a=e.filter(t=>this.selects.includes(t)).length;if(a===e.length)return"ios-checkmark-circle";if(a>0)return"ios-remove-circle"}return"ios-radio-button-off"},selectClass(e){switch(this.selectIcon(e)){case"ios-checkmark-circle":return"selected";case"ios-remove-circle":return"somed"}return""},searchBefore(){!this.showModal||(this.switchActive==="recent"?this.searchRecent():this.switchActive==="contact"?this.searchContact():this.switchActive==="project"&&this.searchProject())},searchRecent(){this.recents=this.cacheDialogs.filter(e=>e.name===void 0||e.dialog_delete===1||!this.showBot&&e.bot?!1:this.showDialog||e.type==="user").sort((e,a)=>e.top_at||a.top_at?$A.Date(a.top_at)-$A.Date(e.top_at):e.todo_num>0||a.todo_num>0?a.todo_num-e.todo_num:$A.Date(a.last_at)-$A.Date(e.last_at)).map(({id:e,name:a,type:t,group_type:s,avatar:i,dialog_user:l})=>({name:a,type:t,group_type:s,avatar:i,userid:t==="user"?l.userid:`d:${e}`}))},searchContact(){let e=this.searchKey;const a=this.searchCache.find(t=>t.type==="contact"&&t.key==e);a&&(this.contacts=a.data),this.waitIng++,setTimeout(()=>{if(this.searchKey!=e){this.waitIng--;return}setTimeout(()=>{this.loadIng++},300),this.$store.dispatch("call",{url:"users/search",data:{keys:{key:e,project_id:this.projectId,no_project_id:this.noProjectId,dialog_id:this.dialogId,bot:this.showBot&&e?2:0,disable:this.showDisable&&e?2:0},take:50}}).then(({data:t})=>{t=t.map(l=>Object.assign(l,{type:"user"})),this.contacts=t;const s=this.searchCache.findIndex(l=>l.key==e),i={type:"contact",key:e,data:t,time:$A.Time()};s>-1?this.searchCache.splice(s,1,i):this.searchCache.push(i)}).catch(({msg:t})=>{this.contacts=[],$A.messageWarning(t)}).finally(t=>{this.loadIng--,this.waitIng--})},this.searchCache.length>0?300:0)},searchProject(){let e=this.searchKey;const a=this.searchCache.find(t=>t.type==="project"&&t.key==e);a&&(this.projects=a.data),this.waitIng++,setTimeout(()=>{if(this.searchKey!=e){this.waitIng--;return}setTimeout(()=>{this.loadIng++},300),this.$store.dispatch("call",{url:"project/lists",data:{type:"team",keys:{name:e},getuserid:"yes",getstatistics:"no"}}).then(({data:t})=>{t=t.data.map(l=>Object.assign(l,{type:"project"})),this.projects=t;const s=this.searchCache.findIndex(l=>l.key==e),i={type:"project",key:e,data:t,time:$A.Time()};s>-1?this.searchCache.splice(s,1,i):this.searchCache.push(i)}).catch(({msg:t})=>{this.projects=[],$A.messageWarning(t)}).finally(t=>{this.loadIng--,this.waitIng--})},this.searchCache.length>0?300:0)},onSelection(){this.disable||this.$nextTick(e=>{this.selects=$A.cloneJSON(this.values),this.showModal=!0})},onSelectAll(){if(this.isSelectAll){this.selects=$A.cloneJSON(this.uncancelable);return}this.lists.some(e=>{if(this.isDisabled(e.userid))return!1;if(this.multipleMax&&this.selects.length>=this.multipleMax)return $A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF"),!0;this.selects.includes(e.userid)||this.selects.push(e.userid)})},onSelectItem({userid:e}){if(this.selects.includes(e)){if(this.isUncancelable(e))return;this.selects=this.selects.filter(a=>a!=e)}else{if(this.isDisabled(e))return;if(this.multipleMax&&this.selects.length>=this.multipleMax){$A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF");return}this.selects.push(e),this.$nextTick(()=>{$A.scrollIntoViewIfNeeded(this.$refs.selected.querySelector(`li[data-id="${e}"]`))})}},onSelectProject(e){switch(this.selectIcon(e)){case"ios-checkmark-circle":const a=e.filter(s=>!this.isUncancelable(s));a.length!=e.length&&$A.messageWarning("\u90E8\u5206\u6210\u5458\u7981\u6B62\u53D6\u6D88"),this.selects=this.selects.filter(s=>!a.includes(s));break;default:const t=e.filter(s=>!this.isDisabled(s));t.length!=e.length&&$A.messageWarning("\u90E8\u5206\u6210\u5458\u7981\u6B62\u9009\u62E9"),this.selects=this.selects.concat(t.filter(s=>!this.selects.includes(s))),this.multipleMax&&this.selects.length>this.multipleMax&&($A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF"),this.selects=this.selects.slice(0,this.multipleMax));break}},onRemoveItem(e){this.isUncancelable(e)||(this.selects=this.selects.filter(a=>a!=e))},onSubmit(){if(this.submittIng>0)return;const e=$A.cloneJSON(this.values);if(this.values=$A.cloneJSON(this.selects),this.$emit("input",this.values),this.$emit("onSubmit",this.values),!this.beforeSubmit){this.showModal=!1;return}const a=this.beforeSubmit();a&&a.then?(this.submittIng++,a.then(()=>{this.showModal=!1}).catch(()=>{this.values=e,this.$emit("input",this.values)}).finally(()=>{this.submittIng--})):this.showModal=!1}}},c={};var d=n(u,o,h,!1,f,null,null,null);function f(e){for(let a in c)this[a]=c[a]}var m=function(){return d.exports}();export{m as U}; diff --git a/public/js/build/app.6c8b31b1.js b/public/js/build/app.6910ca56.js similarity index 99% rename from public/js/build/app.6c8b31b1.js rename to public/js/build/app.6910ca56.js index 82ea732b4..da00bb07c 100644 --- a/public/js/build/app.6c8b31b1.js +++ b/public/js/build/app.6910ca56.js @@ -146,7 +146,7 @@ micro-app-head { display: none; }`,Bt.rawDocument.head.appendChild(e)}}class Rm{ `};yr.prototype.strong=function(e){return""+e+""};yr.prototype.em=function(e){return""+e+""};yr.prototype.codespan=function(e){return""+e+""};yr.prototype.br=function(){return this.options.xhtml?"
":"
"};yr.prototype.del=function(e){return""+e+""};yr.prototype.link=function(e,t,n){if(e=o8(this.options.sanitize,this.options.baseUrl,e),e===null)return n;var r='
",r};yr.prototype.image=function(e,t,n){if(e=o8(this.options.sanitize,this.options.baseUrl,e),e===null)return n;var r=''+n+'":">",r};yr.prototype.text=function(e){return e};function Rs(){}Rs.prototype.strong=Rs.prototype.em=Rs.prototype.codespan=Rs.prototype.del=Rs.prototype.text=function(e){return e};Rs.prototype.link=Rs.prototype.image=function(e,t,n){return""+n};Rs.prototype.br=function(){return""};function os(e){this.tokens=[],this.token=null,this.options=e||tr.defaults,this.options.renderer=this.options.renderer||new yr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i2}os.parse=function(e,t){var n=new os(t);return n.parse(e)};os.prototype.parse=function(e){this.inline=new Ni(e.links,this.options),this.inlineText=new Ni(e.links,ls({},this.options,{renderer:new Rs})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t};os.prototype.next=function(){return this.token=this.tokens.pop(),this.token};os.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};os.prototype.parseText=function(){for(var e=this.token.text;this.peek().type==="text";)e+=` `+this.next().text;return this.inline.output(e)};os.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,s8(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{var e="",t="",n,r,i,a;for(i="",n=0;n?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do this.seen[n]++,t=n+"-"+this.seen[n];while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t};function Yn(e,t){if(t){if(Yn.escapeTest.test(e))return e.replace(Yn.escapeReplace,function(n){return Yn.replacements[n]})}else if(Yn.escapeTestNoEncode.test(e))return e.replace(Yn.escapeReplaceNoEncode,function(n){return Yn.replacements[n]});return e}Yn.escapeTest=/[&<>"']/;Yn.escapeReplace=/[&<>"']/g;Yn.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"};Yn.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/;Yn.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;function s8(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,function(t,n){return n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""})}function Vr(e,t){return e=e.source||e,t=t||"",{replace:function(n,r){return r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(n,r),this},getRegex:function(){return new RegExp(e,t)}}}function o8(e,t,n){if(e){try{var r=decodeURIComponent(s8(n)).replace(/[^\w:]/g,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!cV.test(n)&&(n=uV(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}function uV(e,t){return Sv[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?Sv[" "+e]=e+"/":Sv[" "+e]=l8(e,"/",!0)),e=Sv[" "+e],t.slice(0,2)==="//"?e.replace(/:[\s\S]*/,":")+t:t.charAt(0)==="/"?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}var Sv={},cV=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function gu(){}gu.exec=gu;function ls(e){for(var t=1,n,r;t=0&&c[s]==="\\";)h=!h;return h?"|":" |"}),r=n.split(/ \|/),i=0;if(r.length>t)r.splice(t);else for(;r.lengthAn error occurred:

"+Yn(h.message+"",!0)+"
";throw h}}tr.options=tr.setOptions=function(e){return ls(tr.defaults,e),tr};tr.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new yr,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}};tr.defaults=tr.getDefaults();tr.Parser=os;tr.parser=os.parse;tr.Renderer=yr;tr.TextRenderer=Rs;tr.Lexer=Co;tr.lexer=Co.lex;tr.InlineLexer=Ni;tr.inlineLexer=Ni.output;tr.Slugger=i2;tr.parse=tr;ln.initHighlightingOnLoad();const fV=new tr.Renderer;var hV=tr.setOptions({renderer:fV,gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,highlight:function(e){return ln.highlightAuto(e).value}}),pV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"preview",staticClass:"markdown-preview-warp"},[n("div",{class:`markdown-preview ${"markdown-theme-"+e.theme}`,domProps:{innerHTML:e._s(e.html)}}),n("div",{class:["preview-img",e.previewImgModal?"active":""]},[n("span",{staticClass:"close icon-close iconfont",on:{click:function(r){e.previewImgModal=!1}}}),n("img",{class:[e.previewImgMode],attrs:{src:e.previewImgSrc,alt:""}})])])},vV=[];const mV={name:"markdown-preview",props:{initialValue:{type:String,default:""},markedOptions:{type:Object,default:()=>({})},theme:{type:String,default:"light"},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"\u590D\u5236\u4EE3\u7801"}},data(){return{html:"",previewImgModal:!1,previewImgSrc:"",previewImgMode:""}},mounted(){this.translateMarkdown()},methods:{tocLevel(e,t){let n=9999;return t.forEach(({level:r})=>{n=Math.min(n,r)}),n===9999?e:e-(n-1)},translateMarkdown(){let e=hV(this.initialValue,{sanitize:!1,...this.markedOptions}).replace(/href="/gi,'target="_blank" href="');if(this.copyCode&&(e=e.replace(/
/g,'
'+this.copyBtnText+"
").replace(/<\/pre>/g,"
")),/\[\[TOC\]\]/.test(e)){let t="";cb.tocItems.forEach(n=>{t+=`
  • ${n.text}
  • `}),e=e.replace(/\[\[TOC\]\]/g,`
      ${t}
    `)}this.html=e,this.addCopyListener(),this.addImageClickListener()},addCopyListener(){setTimeout(()=>{const e=document.querySelectorAll(".code-block .copy-code");this.btns=e;for(let t=0,n=e.length;t{const r=e[t].parentNode.querySelectorAll("pre")[0].innerText,i=document.createElement("input");i.setAttribute("value",r),document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i),this.$emit("on-copy",r)}},600)},addImageClickListener(){const{imgs:e=[]}=this;if(e.length>0)for(let t=0,n=e.length;t{if(!!this.$refs.preview){this.imgs=this.$refs.preview.querySelectorAll("img");for(let t=0,n=this.imgs.length;t{const r=this.imgs[t].getAttribute("src");this.previewImage(r)}}},600)},previewImage(e){const t=new Image;t.src=e,t.onload=()=>{const n=t.naturalWidth;t.naturalHeight/n>1.4?this.previewImgMode="horizontal":this.previewImgMode="vertical",this.previewImgSrc=e,this.previewImgModal=!0}}},watch:{initialValue(){this.translateMarkdown()}}},GE={};var gV=Zr(mV,pV,vV,!1,_V,"7c98e74e",null,null);function _V(e){for(let t in GE)this[t]=GE[t]}var yV=function(){return gV.exports}(),a2={exports:{}},u8=function(t,n){return function(){for(var i=new Array(arguments.length),a=0;a=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([i]):n[r]=n[r]?n[r]+", "+i:i}}),n},XE=Ea,ZV=XE.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(a){var l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){var c=XE.isString(l)?i(l):l;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function l2(e){this.message=e}l2.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};l2.prototype.__CANCEL__=!0;var Wg=l2,kv=Ea,QV=zV,qV=VV,eW=f8,tW=YV,nW=JV,rW=ZV,Iy=p8,iW=Kg,aW=Wg,JE=function(t){return new Promise(function(r,i){var a=t.data,l=t.headers,c=t.responseType,h;function s(){t.cancelToken&&t.cancelToken.unsubscribe(h),t.signal&&t.signal.removeEventListener("abort",h)}kv.isFormData(a)&&delete l["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";l.Authorization="Basic "+btoa(d+":"+v)}var m=tW(t.baseURL,t.url);p.open(t.method.toUpperCase(),eW(m,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function _(){if(!!p){var b="getAllResponseHeaders"in p?nW(p.getAllResponseHeaders()):null,E=!c||c==="text"||c==="json"?p.responseText:p.response,k={data:E,status:p.status,statusText:p.statusText,headers:b,config:t,request:p};QV(function(x){r(x),s()},function(x){i(x),s()},k),p=null}}if("onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(_)},p.onabort=function(){!p||(i(Iy("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){i(Iy("Network Error",t,null,p)),p=null},p.ontimeout=function(){var E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",k=t.transitional||iW.transitional;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),i(Iy(E,t,k.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},kv.isStandardBrowserEnv()){var y=(t.withCredentials||rW(m))&&t.xsrfCookieName?qV.read(t.xsrfCookieName):void 0;y&&(l[t.xsrfHeaderName]=y)}"setRequestHeader"in p&&kv.forEach(l,function(E,k){typeof a=="undefined"&&k.toLowerCase()==="content-type"?delete l[k]:p.setRequestHeader(k,E)}),kv.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),c&&c!=="json"&&(p.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&p.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(h=function(b){!p||(i(!b||b&&b.type?new aW("canceled"):b),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(h),t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h))),a||(a=null),p.send(a)})},ai=Ea,ZE=BV,sW=h8,oW={"Content-Type":"application/x-www-form-urlencoded"};function QE(e,t){!ai.isUndefined(e)&&ai.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function lW(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=JE),e}function uW(e,t,n){if(ai.isString(e))try{return(t||JSON.parse)(e),ai.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Hg={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:lW(),transformRequest:[function(t,n){return ZE(n,"Accept"),ZE(n,"Content-Type"),ai.isFormData(t)||ai.isArrayBuffer(t)||ai.isBuffer(t)||ai.isStream(t)||ai.isFile(t)||ai.isBlob(t)?t:ai.isArrayBufferView(t)?t.buffer:ai.isURLSearchParams(t)?(QE(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ai.isObject(t)||n&&n["Content-Type"]==="application/json"?(QE(n,"application/json"),uW(t)):t}],transformResponse:[function(t){var n=this.transitional||Hg.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,a=!r&&this.responseType==="json";if(a||i&&ai.isString(t)&&t.length)try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?sW(l,this,"E_JSON_PARSE"):l}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ai.forEach(["delete","get","head"],function(t){Hg.headers[t]={}});ai.forEach(["post","put","patch"],function(t){Hg.headers[t]=ai.merge(oW)});var Kg=Hg,cW=Ea,dW=Kg,fW=function(t,n,r){var i=this||dW;return cW.forEach(r,function(l){t=l.call(i,t,n)}),t},v8=function(t){return!!(t&&t.__CANCEL__)},qE=Ea,$y=fW,hW=v8,pW=Kg,vW=Wg;function Ry(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vW("canceled")}var mW=function(t){Ry(t),t.headers=t.headers||{},t.data=$y.call(t,t.data,t.headers,t.transformRequest),t.headers=qE.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),qE.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var n=t.adapter||pW.adapter;return n(t).then(function(i){return Ry(t),i.data=$y.call(t,i.data,i.headers,t.transformResponse),i},function(i){return hW(i)||(Ry(t),i&&i.response&&(i.response.data=$y.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},ca=Ea,m8=function(t,n){n=n||{};var r={};function i(p,d){return ca.isPlainObject(p)&&ca.isPlainObject(d)?ca.merge(p,d):ca.isPlainObject(d)?ca.merge({},d):ca.isArray(d)?d.slice():d}function a(p){if(ca.isUndefined(n[p])){if(!ca.isUndefined(t[p]))return i(void 0,t[p])}else return i(t[p],n[p])}function l(p){if(!ca.isUndefined(n[p]))return i(void 0,n[p])}function c(p){if(ca.isUndefined(n[p])){if(!ca.isUndefined(t[p]))return i(void 0,t[p])}else return i(void 0,n[p])}function h(p){if(p in n)return i(t[p],n[p]);if(p in t)return i(void 0,t[p])}var s={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:h};return ca.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var v=s[d]||a,m=v(d);ca.isUndefined(m)&&v!==h||(r[d]=m)}),r},g8={version:"0.24.0"},gW=g8.version,u2={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){u2[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var eD={};u2.transitional=function(t,n,r){function i(a,l){return"[Axios v"+gW+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return function(a,l,c){if(t===!1)throw new Error(i(l," has been removed"+(n?" in "+n:"")));return n&&!eD[l]&&(eD[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,c):!0}};function _W(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],l=t[a];if(l){var c=e[a],h=c===void 0||l(c,a,e);if(h!==!0)throw new TypeError("option "+a+" must be "+h);continue}if(n!==!0)throw Error("Unknown option "+a)}}var yW={assertOptions:_W,validators:u2},_8=Ea,bW=f8,tD=NV,nD=mW,Gg=m8,y8=yW,ec=y8.validators;function qf(e){this.defaults=e,this.interceptors={request:new tD,response:new tD}}qf.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=Gg(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;n!==void 0&&y8.assertOptions(n,{silentJSONParsing:ec.transitional(ec.boolean),forcedJSONParsing:ec.transitional(ec.boolean),clarifyTimeoutError:ec.transitional(ec.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(i=i&&v.synchronous,r.unshift(v.fulfilled,v.rejected))});var a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});var l;if(!i){var c=[nD,void 0];for(Array.prototype.unshift.apply(c,r),c=c.concat(a),l=Promise.resolve(t);c.length;)l=l.then(c.shift(),c.shift());return l}for(var h=t;r.length;){var s=r.shift(),p=r.shift();try{h=s(h)}catch(d){p(d);break}}try{l=nD(h)}catch(d){return Promise.reject(d)}for(;a.length;)l=l.then(a.shift(),a.shift());return l};qf.prototype.getUri=function(t){return t=Gg(this.defaults,t),bW(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};_8.forEach(["delete","get","head","options"],function(t){qf.prototype[t]=function(n,r){return this.request(Gg(r||{},{method:t,url:n,data:(r||{}).data}))}});_8.forEach(["post","put","patch"],function(t){qf.prototype[t]=function(n,r,i){return this.request(Gg(i||{},{method:t,url:n,data:r}))}});var wW=qf,CW=Wg;function Ic(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(i){t=i});var n=this;this.promise.then(function(r){if(!!n._listeners){var i,a=n._listeners.length;for(i=0;i v"+e._s(e.updateVersion))])],1),e.$Platform==="mac"?n("div",{staticClass:"notification-tip"},[e._v(e._s(e.$L("\u79BB\u6700\u65B0\u7248\u672C\u53EA\u6709\u4E00\u6B65\u4E4B\u9065\u4E86\uFF01\u91CD\u65B0\u542F\u52A8\u5E94\u7528\u5373\u53EF\u5B8C\u6210\u66F4\u65B0\u3002")))]):e._e()]),n("Scrollbar",{attrs:{"class-name":"notification-body"}},[n("MarkdownPreview",{attrs:{initialValue:e.updateNote}})],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.updateShow=!1}}},[e._v(e._s(e.$L("\u7A0D\u540E")))]),n("Button",{attrs:{type:"primary",loading:e.updateIng},on:{click:e.updateQuitAndInstall}},[e._v(e._s(e.$L(e.$Platform==="mac"?"\u91CD\u65B0\u542F\u52A8":"\u7ACB\u5373\u5347\u7EA7")))])],1)],1)],2)},NW=[];const FW={name:"RightBottom",components:{MarkdownPreview:yV},data(){return{loadIng:0,subscribe:null,apiVersion:"",systemVersion:window.systemInfo.version,updateVersion:"",updateNote:"",updateShow:!1,updateBottomShow:!1,updateIng:!1,downloadUrl:""}},mounted(){this.checkVersion(),this.$Electron&&(this.subscribe=Ts.Store.subscribe("updateNotification",e=>{this.updateShow=!0}),this.$Electron.registerMsgListener("updateDownloaded",e=>{this.$store.state.clientNewVersion=e.version,this.updateVersion=e.version,this.updateNote=e.releaseNotes||this.$L("\u6CA1\u6709\u66F4\u65B0\u63CF\u8FF0\u3002"),this.updateShow=$A.strExists(this.updateNote,`[${this.updateVersion}-Release]`)}))},beforeDestroy(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},watch:{updateShow(e){e&&(this.updateBottomShow=!0)}},computed:{isSoftware(){return this.$Electron||this.$isEEUiApp},showSSO(){return this.isSoftware&&["login"].includes(this.$route.name)},showDown(){return!this.$isEEUiApp&&!this.windowTouch&&["login","index","manage-dashboard"].includes(this.$route.name)},showPrivacy(){return $A.isDooServer()&&this.$isEEUiApp&&["login"].includes(this.$route.name)}},methods:{isNotServer(){let e=$A.getDomain(window.systemInfo.apiUrl);return this.isSoftware&&(e==""||e=="public")},checkVersion(){this.isNotServer()||(iD.get($A.apiUrl("system/version")).then(({status:e,data:t})=>{e===200&&(this.apiVersion=t.version||"",this.compareVersion(this.apiVersion,"0.19.0")===-1&&$A.modalWarning({title:"\u6E29\u99A8\u63D0\u793A",message:"\u670D\u52A1\u5668\u63A5\u53E3\u7248\u672C\u8FC7\u4F4E\uFF0C\u90E8\u5206\u529F\u80FD\u53EF\u80FD\u65E0\u6CD5\u6B63\u5E38\u4F7F\u7528\u3002"}),this.$Electron?this.$Electron.sendMessage("updateCheckAndDownload",{apiVersion:this.apiVersion}):this.getDownloadUrl(t.publish))}).catch(e=>{}),this.__checkVersion&&clearTimeout(this.__checkVersion),this.__checkVersion=setTimeout(this.checkVersion,600*1e3))},getDownloadUrl(e){if(!!$A.isJson(e))switch(e.provider){case"generic":this.downloadUrl=`${e.url}/latest`;break;case"github":(async t=>{let n="cacheAppdown::"+this.apiVersion,r=await $A.IDBJson(n),i=600;if(r.time&&r.time+i>Math.round(new Date().getTime()/1e3)){this.downloadUrl=r.data.html_url;return}this.loadIng>0||(this.loadIng++,iD.get(`https://api.github.com/repos/${e.owner}/${e.repo}/releases`).then(({status:a,data:l})=>{this.loadIng--,a===200&&$A.isArray(l)&&(r.time=Math.round(new Date().getTime()/1e3),r.data=l.find(({tag_name:c})=>this.compareVersion(this.tagVersion(c),this.apiVersion)===0)||{},$A.IDBSave(n,r),this.downloadUrl=r.data.html_url)}).catch(()=>{this.loadIng--}))})();break}},updateQuitAndInstall(){this.updateIng=!0,setTimeout(()=>{this.$Electron.sendMessage("updateQuitAndInstall")},301)},useSSOLogin(){Ts.Store.set("useSSOLogin",!0)},tagVersion(e){return e?$A.leftDelete(e.toLowerCase(),"v"):""},compareVersion(e,t){let n=0,r=0;if(e===t)return 0;const i=(a,l)=>{let c=l;for(;a[c]!=="."&&ch?1:-1;n=a+1,r=l+1}for(;n0)return 1;n=a+1}for(;r0)return-1;r=a+1}return 0}}},aD={};var BW=Zr(FW,LW,NW,!1,UW,null,null,null);function UW(e){for(let t in aD)this[t]=aD[t]}var jW=function(){return BW.exports}();const zW="modulepreload",sD={},VW="/",_n=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${VW}${r}`,r in sD)return;sD[r]=!0;const i=r.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const l=document.createElement("link");if(l.rel=i?"stylesheet":zW,i||(l.as="script",l.crossOrigin=""),l.href=r,document.head.appendChild(l),i)return new Promise((c,h)=>{l.addEventListener("load",c),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};var WW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Modal",{attrs:{mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":["",""],"class-name":e.viewMode==="desktop"?"common-preview-image-view":"common-preview-image-swipe",fullscreen:""},model:{value:e.show,callback:function(r){e.show=r},expression:"show"}},[e.list.length>0?[e.viewMode==="desktop"?n("PreviewImageView",{attrs:{"initial-index":e.index,"url-list":e.list,infinite:""}}):e._e(),e.viewMode==="mobile"?n("PreviewImageSwipe",{attrs:{"initial-index":e.index,"url-list":e.list},on:{"on-destroy":function(r){e.show=!1}}}):e._e()]:e._e()],2)},HW=[];const KW=()=>_n(()=>import("./view.332e3be1.js"),["js/build/view.332e3be1.js","js/build/view.5e67e6f1.css"]),GW=()=>_n(()=>import("./swipe.e89ae537.js"),["js/build/swipe.e89ae537.js","js/build/swipe.30a297b8.css"]),YW={name:"PreviewImage",components:{PreviewImageSwipe:GW,PreviewImageView:KW},props:{value:{type:Boolean,default:!1},index:{type:Number,default:0},list:{type:Array,default:()=>[]},mode:{type:String,default:null}},data(){return{show:this.value}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)}},computed:{viewMode(){return this.mode?this.mode:this.windowTouch?"mobile":"desktop"}}},oD={};var XW=Zr(YW,WW,HW,!1,JW,null,null,null);function JW(e){for(let t in oD)this[t]=oD[t]}var ZW=function(){return XW.exports}(),QW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PreviewImage",{attrs:{index:e.previewImageIndex,list:e.previewImageList},model:{value:e.show,callback:function(r){e.show=r},expression:"show"}})},qW=[];const eH={name:"PreviewImageState",components:{PreviewImage:ZW},computed:{...Po(["previewImageIndex","previewImageList"])},data(){return{show:!1}},watch:{show(e){e?this.$store.state.previewImageIndex=Math.min(Math.max(this.$store.state.previewImageIndex,0),this.$store.state.previewImageList.length-1):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[])},previewImageList(e){if(e.length>0)if($A.isEEUiApp){let t=Math.min(Math.max(this.$store.state.previewImageIndex,0),this.$store.state.previewImageList.length-1),n=e.map(i=>$A.isJson(i)?$A.thumbRestore(i.src):$A.thumbRestore(i)),r=50;if(n.length>r){const i=[];let a=0;for(;i.length=0&&i.unshift(n[l]),cl===n[t]),n=i}$A.eeuiAppSendMessage({action:"picturePreview",position:t,paths:n})}else this.show=!0}}},lD={};var tH=Zr(eH,QW,qW,!1,nH,null,null,null);function nH(e){for(let t in lD)this[t]=lD[t]}var rH=function(){return tH.exports}(),iH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-network-exception"},[e.type==="alert"?[e.show?n("Alert",{attrs:{type:"error","show-icon":"",closable:""}},[e._v(e._s(e.$L("\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8BBE\u7F6E\u3002")))]):e._e()]:e.type==="modal"?[n("Modal",{attrs:{width:416,closable:!1,"footer-hide":!0,"class-name":"common-network-exception-modal"},model:{value:e.show,callback:function(r){e.show=r},expression:"show"}},[n("div",{staticClass:"ivu-modal-confirm"},[n("div",{staticClass:"ivu-modal-confirm-head"},[n("div",{staticClass:"ivu-modal-confirm-head-icon ivu-modal-confirm-head-icon-error"},[n("Icon",{attrs:{type:"ios-close-circle"}})],1),n("div",{staticClass:"ivu-modal-confirm-head-title"},[e._v(e._s(e.$L("\u6E29\u99A8\u63D0\u793A")))])]),n("div",{staticClass:"ivu-modal-confirm-body"},[n("div",[e._v(e._s(e.$L("\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8BBE\u7F6E\u3002")))])]),n("div",{staticClass:"ivu-modal-confirm-footer"},[n("Button",{attrs:{type:"primary"},on:{click:function(r){e.show=!1}}},[e._v(e._s(e.$L("\u786E\u5B9A")))])],1)])])]:e._e()],2)},aH=[];const sH={name:"NetworkException",props:{type:{type:String,default:"modal"}},data(){return{show:!1}},beforeDestroy(){this.show=!1},computed:{...Po(["ajaxNetworkException"])},watch:{ajaxNetworkException:{handler(e){this.show=e},immediate:!0}}},uD={};var oH=Zr(sH,iH,aH,!1,lH,null,null,null);function lH(e){for(let t in uD)this[t]=uD[t]}var uH=function(){return oH.exports}(),cH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.show?n("div",{staticClass:"common-guide"},[n("img",{attrs:{src:e.src,width:"100%"}}),n("div",[n("Button",{attrs:{type:"default",size:"large"},on:{click:function(r){e.show=!1}}},[e._v(e._s(e.$L("\u5FCD\u5FC3\u62D2\u7EDD")))])],1)]):e._e()},dH=[];const fH={name:"GuidePage",data(){return{show:!1,src:""}},mounted(){this.src=$.apiUrl("../images/guide.png")},watch:{$route:{handler(e){this.show=!1,navigator.userAgent.indexOf("MicroMessenger")!==-1&&e.name=="manage-project-invite"&&(this.show=!0)},immediate:!0}}},cD={};var hH=Zr(fH,cH,dH,!1,pH,null,null,null);function pH(e){for(let t in cD)this[t]=cD[t]}var vH=function(){return hH.exports}(),mH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"task-add"},[n("Cascader",{attrs:{data:e.cascaderData,clearable:!1,placeholder:e.$L("\u8BF7\u9009\u62E9\u9879\u76EE"),"load-data":e.cascaderLoadData,filterable:""},on:{"on-input-change":e.cascaderInputChange,"on-visible-change":function(r){e.cascaderShow=!e.cascaderShow}},model:{value:e.cascader,callback:function(r){e.cascader=r},expression:"cascader"}}),n("div",{staticClass:"ivu-modal-footer"},[n("div",{staticClass:"adaption"},[n("Button",{attrs:{type:"default"},on:{click:e.close}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.loadIng>0},on:{click:e.onConfirm}},[e._v(e._s(e.$L("\u786E\u5B9A")))])],1)])],1)},gH=[];const _H={name:"TaskMove",props:{value:{type:Boolean,default:!1},task:{type:Object,default:!1}},data(){return{cascader:[],cascaderShow:!1,cascaderData:[],cascaderValue:"",cascaderLoading:0,cascaderAlready:[],loadIng:0,beforeClose:[]}},async mounted(){this.initCascaderData()},beforeDestroy(){this.beforeClose.some(e=>{typeof e=="function"&&e()}),this.beforeClose=[]},computed:{...Po(["cacheProjects","cacheColumns"])},watch:{task:{handler:function(e){this.cascader=[e.project_id,e.column_id]},deep:!0,immediate:!0}},methods:{initCascaderData(){const e=$A.cloneJSON(this.cacheProjects).sort((t,n)=>t.top_at||n.top_at?$A.Date(n.top_at)-$A.Date(t.top_at):n.id-t.id);this.cascaderData=e.map(t=>{const n=this.cacheColumns.filter(({project_id:i})=>i==t.id).map(i=>({value:i.id,label:i.name})),r={value:t.id,label:t.name,children:n};return n.length==0&&(r.loading=!1),r})},cascaderLoadData(e,t){e.loading=!0,this.$store.dispatch("getColumns",e.value).then(n=>{e.children=n.map(r=>({value:r.id,label:r.name})),e.loading=!1,t()}).catch(()=>{e.loading=!1,t()})},cascaderInputChange(e){this.cascaderValue=e||"",this.cascaderAlready[this.cascaderValue]!==!0&&(this.cascaderAlready[this.cascaderValue]=!0,setTimeout(()=>{this.cascaderLoading++},1e3),this.$store.dispatch("getProjects",{keys:{name:this.cascaderValue},getcolumn:"yes"}).then(()=>{this.cascaderLoading--,this.initCascaderData()}).catch(()=>{this.cascaderLoading--}))},async onConfirm(){this.loadIng++,this.$store.dispatch("call",{url:"project/task/move",data:{task_id:this.task.id,project_id:this.cascader[0],column_id:this.cascader[1]}}).then(({msg:e})=>{this.loadIng--,this.$store.dispatch("saveTask",{id:this.task.id,project_id:this.cascader[0],column_id:this.cascader[1]}),$A.messageSuccess(e),this.close()}).catch(({msg:e})=>{this.loadIng--,$A.modalError(e)})},close(){this.$emit("input",!this.value)}}},dD={};var yH=Zr(_H,mH,gH,!1,bH,null,null,null);function bH(e){for(let t in dD)this[t]=dD[t]}var wH=function(){return yH.exports}(),CH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("EDropdown",{ref:"dropdown",staticClass:"task-operation-dropdown",style:e.styles,attrs:{trigger:"click",disabled:e.disabled,size:e.size,placement:"bottom"},on:{command:e.dropTask,"visible-change":e.visibleChange}},[n("div",{ref:"icon",staticClass:"task-operation-icon"}),n("EDropdownMenu",{ref:"dropdownMenu",staticClass:"task-operation-more-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[n("li",{staticClass:"task-operation-more-warp",class:e.size},[n("ul",[e.flow?e.turns.length>0?e._l(e.turns,function(r){return n("EDropdownItem",{key:r.id,attrs:{command:`turn::${r.id}`}},[n("div",{staticClass:"item flow"},[r.id==e.task.flow_item_id&&e.flow.auto_assign!==!0?n("Icon",{staticClass:"check",attrs:{type:"md-checkmark-circle-outline"}}):n("Icon",{attrs:{type:"md-radio-button-off"}}),n("div",{staticClass:"flow-name",class:r.status},[e._v(e._s(r.name))])],1)])}):[e.task.complete_at?n("EDropdownItem",{attrs:{command:"uncomplete"}},[n("div",{staticClass:"item red"},[n("Icon",{attrs:{type:"md-checkmark-circle-outline"}}),e._v(e._s(e.$L("\u6807\u8BB0\u672A\u5B8C\u6210"))+" ")],1)]):n("EDropdownItem",{attrs:{command:"complete"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-radio-button-off"}}),e._v(e._s(e.$L("\u5B8C\u6210"))+" ")],1)])]:n("EDropdownItem",{staticClass:"load-flow",attrs:{disabled:""}},[n("div",{staticClass:"load-flow-warp"},[n("Loading")],1)]),e.task.parent_id===0?[n("EDropdownItem",{attrs:{divided:e.turns.length>0,command:"archived"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"ios-filing"}}),e._v(e._s(e.$L(e.task.archived_at?"\u8FD8\u539F\u5F52\u6863":"\u5F52\u6863"))+" ")],1)]),n("EDropdownItem",{attrs:{command:"move"}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont movefont"},[e._v("\uE7FC")]),e._v(e._s(e.$L("\u79FB\u52A8"))+" ")])]),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),e._v(e._s(e.$L("\u5220\u9664"))+" ")],1)]),e.colorShow?e._l(e.taskColorList,function(r,i){return n("EDropdownItem",{key:"c_"+i,attrs:{divided:i==0,command:r}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:r.primary||"#ddd"},domProps:{innerHTML:e._s(r.color==(e.task.color||"")?"":"")}}),e._v(e._s(e.$L(r.name))+" ")])])}):e._e()]:n("EDropdownItem",{attrs:{command:"remove",divided:e.turns.length>0}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),e._v(e._s(e.$L("\u5220\u9664"))+" ")],1)])],2)])])],1),n("Modal",{attrs:{title:e.$L("\u79FB\u52A8\u4EFB\u52A1"),"mask-closable":!1,styles:{width:"90%",maxWidth:"540px"},"footer-hide":""},model:{value:e.moveTaskShow,callback:function(r){e.moveTaskShow=r},expression:"moveTaskShow"}},[n("TaskMove",{ref:"addTask",attrs:{task:e.task},model:{value:e.moveTaskShow,callback:function(r){e.moveTaskShow=r},expression:"moveTaskShow"}})],1)],1)},xH=[];const SH={name:"TaskOperation",components:{TaskMove:wH},data(){return{task:{},loadStatus:!1,colorShow:!0,updateBefore:!1,disabled:!1,size:"small",onUpdate:null,element:null,target:null,styles:{},moveTaskShow:!1}},beforeDestroy(){this.target&&this.target.removeEventListener("scroll",this.handlerEventListeners)},computed:{...Po(["loads","taskOperation","taskColorList","taskFlows","taskFlowItems"]),...q1(["isLoad"]),loadIng(){return this.loadStatus?!0:this.isLoad(`task-${this.task.id}`)},flow(){return this.taskFlows.find(({task_id:e})=>e==this.task.id)},turns(){if(!this.flow)return[];let e=this.taskFlowItems.find(({id:t})=>t==this.flow.flow_item_id);return e?this.taskFlowItems.filter(({id:t})=>e.turns.includes(t)):[]}},watch:{taskOperation(e){if(e.event&&e.task){if(this.$refs.dropdown.visible&&this.element===e.event.target){this.hide();return}const t=e.event.target.getBoundingClientRect();this.styles={left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`},this.task=e.task,this.loadStatus=typeof e.loadStatus=="undefined"?!1:e.loadStatus,this.colorShow=typeof e.colorShow=="undefined"?!0:e.colorShow,this.updateBefore=typeof e.updateBefore=="undefined"?!1:e.updateBefore,this.disabled=typeof e.disabled=="undefined"?!1:e.disabled,this.size=typeof e.size=="undefined"?"small":e.size,this.onUpdate=typeof e.onUpdate=="function"?e.onUpdate:null,this.$refs.icon.focus(),this.updatePopper(),this.show(),this.$store.dispatch("getTaskFlow",this.task.id).finally(this.updatePopper),this.setupEventListeners(e.event)}else this.hide()}},methods:{show(){this.$refs.dropdown.show()},hide(){this.$refs.dropdown.hide()},dropTask(e){const t=this.task,n=r=>{r?this.$store.dispatch("saveTaskCompleteTemp",t.id):this.$store.dispatch("forgetTaskCompleteTemp",t.id)};if($A.isJson(e)){e.name&&this.updateTask({color:e.color}).catch(()=>{});return}if($A.leftExists(e,"turn::")){let r=$A.leftDelete(e,"turn::");if(r==this.task.flow_item_id)return;let i=this.taskFlowItems.find(({id:h})=>h==this.flow.flow_item_id)||{},a=this.taskFlowItems.find(({id:h})=>h==r)||{},l=i.status!=="end"&&a.status==="end",c=i.status==="end"&&a.status!=="end";this.updateBefore&&(l?n(!0):c&&n(!1)),this.updateTask({flow_item_id:r}).then(()=>{l?n(!0):c&&n(!1)}).catch(()=>{l?n(!1):c&&n(!0)});return}switch(e){case"complete":if(this.task.complete_at)return;this.updateBefore&&n(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then(()=>{n(!0)}).catch(()=>{n(!1)});break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&n(!1),this.updateTask({complete_at:!1}).then(()=>{n(!1)}).catch(()=>{n(!0)});break;case"archived":case"remove":this.archivedOrRemoveTask(e);break;case"move":this.moveTaskShow=!0;break}},updateTask(e){return new Promise((t,n)=>{if(this.loadIng){n();return}Object.keys(e).forEach(i=>this.$set(this.task,i,e[i]));const r=Object.assign(e,{task_id:this.task.id});this.$store.dispatch("taskUpdate",r).then(({data:i,msg:a})=>{$A.messageSuccess(a),t(),this.$store.dispatch("saveTaskBrowse",r.task_id),typeof this.onUpdate=="function"&&this.onUpdate(i)}).catch(({msg:i})=>{$A.modalError(i),this.$store.dispatch("getTaskOne",r.task_id).catch(()=>{}),n()})})},archivedOrRemoveTask(e){let t="removeTask",n="\u5220\u9664",r={task_id:this.task.id},i=this.task.parent_id>0?"\u5B50\u4EFB\u52A1":"\u4EFB\u52A1";e=="archived"&&(t="archivedTask",n="\u5F52\u6863",this.task.archived_at&&(n="\u8FD8\u539F\u5F52\u6863",r={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:n+i,content:"\u4F60\u786E\u5B9A\u8981"+n+i+"\u3010"+this.task.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>{if(!this.loadIng)return new Promise((a,l)=>{this.$store.dispatch(t,r).then(({msg:c})=>{a(c),this.$store.dispatch("saveTaskBrowse",r.task_id)}).catch(({msg:c})=>{l(c)})})}})},visibleChange(e){this.visible=e},updatePopper(){this.$nextTick(this.$refs.dropdownMenu.updatePopper)},setupEventListeners(e){this.element=e.target;let t=this.getScrollParent(this.element);if((t===window.document.body||t===window.document.documentElement)&&(t=window),this.target){if(this.target===t)return;this.target.removeEventListener("scroll",this.handlerEventListeners)}this.target=t,this.target.addEventListener("scroll",this.handlerEventListeners)},handlerEventListeners(e){if(!this.visible||!this.element)return;const t=e.target.getBoundingClientRect(),n=this.element.getBoundingClientRect();if(n.topt.top+t.height){this.hide();return}this.styles={left:`${n.left}px`,top:`${n.top}px`,width:`${n.width}px`,height:`${n.height}px`},this.updatePopper()},getScrollParent(e){const t=e.parentNode;return t?t===window.document?window.document.body.scrollTop||window.document.body.scrollLeft?window.document.body:window.document.documentElement:["scroll","auto"].indexOf(this.getStyleComputedProperty(t,"overflow"))!==-1||["scroll","auto"].indexOf(this.getStyleComputedProperty(t,"overflow-x"))!==-1||["scroll","auto"].indexOf(this.getStyleComputedProperty(t,"overflow-y"))!==-1?t:this.getScrollParent(e.parentNode):e},getStyleComputedProperty(e,t){return window.getComputedStyle(e,null)[t]}}},fD={};var EH=Zr(SH,CH,xH,!1,DH,null,null,null);function DH(e){for(let t in fD)this[t]=fD[t]}var kH=function(){return EH.exports}(),OH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("keep-alive",[n("router-view",{staticClass:"child-view"})],1),n("TaskOperation"),n("FloatSpinner"),n("RightBottom"),n("PreviewImageState"),e.windowLandscape?n("NetworkException"):e._e(),e._l(e.iframes,function(r){return r.url?n("iframe",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:r.key,attrs:{src:r.url}}):e._e()}),n("GuidePage")],2)},PH=[];const TH={components:{TaskOperation:kH,NetworkException:uH,PreviewImageState:rH,RightBottom:jW,FloatSpinner:Fz,GuidePage:vH},data(){return{routePath:null,searchInter:null,iframes:[]}},created(){this.electronEvents(),this.eeuiEvents(),this.otherEvents(),this.synchThemeLanguage(),this.synchAppTheme()},mounted(){window.addEventListener("resize",this.windowSizeListener),window.addEventListener("scroll",this.windowScrollListener),this.searchInter=setInterval(this.searchEnter,1e3)},beforeDestroy(){window.removeEventListener("resize",this.windowSizeListener),window.removeEventListener("scroll",this.windowScrollListener),this.searchInter&&clearInterval(this.searchInter)},computed:{...Po(["ws","themeMode","themeIsDark","windowOrientation"]),isSoftware(){return this.$Electron||this.$isEEUiApp}},watch:{$route:{handler(e){this.routePath=e.path},immediate:!0},routePath:{handler(e){e&&this.userId>0&&(e=e.replace(/^\/manage\/file\/\d+\/(\d+)$/,"/single/file/$1"),this.$store.dispatch("websocketPath",e))},immediate:!0},userId:{handler(){this.$store.dispatch("websocketConnection"),this.userId>0&&(this.$isEEUiApp&&($A.eeuiAppSendMessage({action:"intiUmeng"}),setTimeout(e=>{$A.eeuiAppSendMessage({action:"setUmengAlias",userid:this.userId,token:this.userToken,url:$A.apiUrl("users/umeng/alias")})},6e3)),$A.IDBString("logOpen").then(e=>{$A.openLog=e==="open",$A.openLog&&$A.loadScript("js/vconsole.min.js").then(t=>{window.vConsole=new window.VConsole({onReady:()=>{console.log("vConsole: onReady")},onClearLog:()=>{console.log("vConsole: onClearLog")}})}).catch(t=>{$A.modalError("vConsole \u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")})}))},immediate:!0},windowTouch:{handler(e){e?$A("body").addClass("window-touch"):$A("body").removeClass("window-touch")},immediate:!0},windowOrientation:{handler(e){$A("body").removeClass(["window-landscape","window-portrait"]),$A("body").addClass("window-"+e)},immediate:!0},windowActive(e){e?(this.autoTheme(),this.__windowTimer&&clearTimeout(this.__windowTimer),this.__windowTimer=setTimeout(t=>{this.$store.dispatch("call",{url:"users/socket/status"}).then(n=>{this.$store.dispatch("websocketSend",{type:"handshake"}).catch(r=>{this.$store.dispatch("websocketConnection")})}).catch(n=>{this.$store.dispatch("websocketConnection")})},600)):this.$store.dispatch("audioStop",!0)},themeIsDark(){this.synchThemeLanguage()}},methods:{searchEnter(){let e=$A(".sreachBox");if(e.length===0||e.attr("data-enter-init")==="init")return;e.attr("data-enter-init","init");let t=e.find("button[type='button']"),n=null;t.length!==0&&(t.each((r,i)=>{$A(i).text().indexOf("\u641C\u7D22")&&(n=$A(i))}),n!==null&&e.find("input.ivu-input").keydown(function(r){r.keyCode==13&&(n.hasClass("ivu-btn-loading")||n.click())}))},autoTheme(){this.themeMode==="auto"&&this.$store.dispatch("synchTheme")},synchThemeLanguage(){this.isSoftware&&(this.iframes=this.iframes.filter(({key:e})=>e!="synchThemeLanguage"),this.iframes.push({key:"synchThemeLanguage",url:$A.apiUrl(`../setting/theme_language?theme=${this.themeIsDark?"dark":"light"}&language=${au}`)})),this.synchAppTheme()},synchAppTheme(){this.$isEEUiApp&&$A.eeuiAppSendMessage({action:"updateTheme",themeName:this.themeIsDark?"dark":"light"})},windowSizeListener(){const e=$A(window).width(),t=$A(window).height(),n=$A.screenOrientation();this.$store.state.windowTouch="ontouchend"in document,this.$store.state.windowWidth=e,this.$store.state.windowHeight=t,this.$store.state.windowOrientation=n,this.$store.state.windowLandscape=n==="landscape",this.$store.state.windowPortrait=n==="portrait",this.$store.state.formLabelPosition=e>576?"right":"top",this.$store.state.formLabelWidth=e>576?"auto":""},windowScrollListener(){this.$store.state.windowScrollY=window.scrollY},electronEvents(){!this.$Electron||(window.__onBeforeUnload=()=>{if(this.$Modal.removeLast())return!0},this.$Electron.registerMsgListener("dispatch",e=>{if(!$A.isJson(e))return;let{action:t,data:n}=e;this.$store.dispatch(t,n)}),this.$Electron.registerMsgListener("browserWindowBlur",e=>{this.$store.state.windowActive=!1}),this.$Electron.registerMsgListener("browserWindowFocus",e=>{this.$store.state.windowActive=!0}),this.iframes.push({key:"manifest",url:$A.apiUrl("../manifest")}),$A.bindScreenshotKey($A.jsonParse(window.localStorage.getItem("__keyboard:data__"))||{}),this.$Electron.sendMessage("setMenuLanguage",{openInBrowser:this.$L("\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00"),saveImageAs:this.$L("\u56FE\u7247\u5B58\u50A8\u4E3A..."),copyImage:this.$L("\u590D\u5236\u56FE\u7247"),copyEmailAddress:this.$L("\u590D\u5236\u7535\u5B50\u90AE\u4EF6\u5730\u5740"),copyLinkAddress:this.$L("\u590D\u5236\u94FE\u63A5\u5730\u5740"),copyImageAddress:this.$L("\u590D\u5236\u56FE\u7247\u5730\u5740"),failedToSaveImage:this.$L("\u56FE\u7247\u4FDD\u5B58\u5931\u8D25"),theImageFailedToSave:this.$L("\u56FE\u7247\u65E0\u6CD5\u4FDD\u5B58")}))},eeuiEvents(){!this.$isEEUiApp||(window.__onAppActive=()=>{this.autoTheme()},window.__onPagePause=()=>{this.$store.state.windowActive=!1,this.$store.dispatch("getBasicData",-1)},window.__onPageResume=e=>{this.$store.state.windowActive=!0,e>0?this.$store.dispatch("getBasicData",600):this.autoTheme()},window.__onMeetingEvent=({act:e,uuid:t,meetingid:n})=>{switch(e){case"getInfo":const r=(t+"").indexOf("88888")!==-1;this.$store.dispatch("call",{url:r?"users/meeting/tourist":"users/basic",data:{userid:r?t:(t+"").substring(6),tourist_id:t}}).then(({data:i})=>{var a,l;$A.eeuiAppSendMessage({action:"updateMeetingInfo",infos:{uuid:t,avatar:r?i==null?void 0:i.userimg:(a=i[0])==null?void 0:a.userimg,username:r?i==null?void 0:i.nickname:(l=i[0])==null?void 0:l.nickname}})}).catch(({msg:i})=>{$A.modalError(i)});break;case"success":this.$store.dispatch("closeMeetingWindow","add");break;case"invent":this.$store.dispatch("showMeetingWindow",{type:"invitation",meetingid:n});break;case"endMeeting":break;case"error":this.$store.dispatch("closeMeetingWindow","error");break}},window.__onKeyboardStatus=e=>{const t=$A.jsonParse(decodeURIComponent(e));this.$store.state.keyboardType=t.keyboardType,this.$store.state.keyboardHeight=t.keyboardHeight,this.$store.state.safeAreaBottom=t.safeAreaBottom},window.__onNotificationPermissionStatus=e=>{this.$store.state.appNotificationPermission=$A.runNum(e)==1},window.__handleLink=e=>{this.goForward({path:(e||"").indexOf("/")!==0?"/"+e:e})})},otherEvents(){if(!this.isSoftware){const e="hidden"in document?"hidden":"webkitHidden"in document?"webkitHidden":"mozHidden"in document?"mozHidden":null,t=e.replace(/hidden/i,"visibilitychange");document.addEventListener(t,()=>{this.$store.state.windowActive=!document[e]})}}}},hD={};var AH=Zr(TH,OH,PH,!1,MH,"7cda3400",null,null);function MH(e){for(let t in hD)this[t]=hD[t]}var IH=function(){return AH.exports}(),$H=[{name:"index",path:"/",component:()=>_n(()=>import("./index.dfa0fc84.js"),[])},{name:"pro",path:"/pro",component:()=>_n(()=>import("./pro.e5312bee.js"),[])},{name:"meeting",path:"/meeting/:meetingId?/:sharekey?",component:()=>_n(()=>import("./meeting.a29351d2.js"),["js/build/meeting.a29351d2.js","js/build/MeetingManager.76c2e240.js","js/build/UserSelect.d62f565b.js"])},{name:"manage",path:"/manage",component:()=>_n(()=>import("./manage.8b64e6e6.js"),["js/build/manage.8b64e6e6.js","js/build/manage.5dc9aad0.css","js/build/CheckinExport.ac86aa08.js","js/build/ApproveExport.d0d486d1.css","js/build/UserSelect.d62f565b.js","js/build/tip.517649f6.js","js/build/ReportEdit.54eb60eb.js","js/build/ReportDetail.556c0891.js","js/build/index.31386d23.js","js/build/TaskDetail.3e00ee35.js","js/build/TaskDetail.6f25b368.css","js/build/ProjectLog.d63fd8b4.js","js/build/DialogWrapper.5fcf71c2.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/ImgUpload.0e64a5a8.js","js/build/details.6749696e.js","js/build/TaskMenu.a0d74239.js","js/build/TEditor.5f656e41.js","js/build/MeetingManager.76c2e240.js","js/build/ApproveExport.37a8254a.js","js/build/MicroApps.56fd4f5e.js"]),children:[{name:"manage-dashboard",path:"dashboard",component:()=>_n(()=>import("./dashboard.d6d0c216.js"),["js/build/dashboard.d6d0c216.js","js/build/TaskMenu.a0d74239.js"])},{name:"manage-calendar",path:"calendar",component:()=>_n(()=>import("./calendar.b1746b7c.js"),["js/build/calendar.b1746b7c.js","js/build/calendar.05643a5b.css","js/build/TaskMenu.a0d74239.js"])},{name:"manage-messenger",path:"messenger/:dialogAction?",component:()=>_n(()=>import("./messenger.f5205905.js"),["js/build/messenger.f5205905.js","js/build/DialogWrapper.5fcf71c2.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/index.31386d23.js","js/build/UserSelect.d62f565b.js","js/build/ImgUpload.0e64a5a8.js","js/build/details.6749696e.js","js/build/tip.517649f6.js"])},{name:"manage-approve",path:"approve",component:()=>_n(()=>import("./index.6bba8944.js"),["js/build/index.6bba8944.js","js/build/index.bc7e59ad.css","js/build/details.6749696e.js","js/build/ImgUpload.0e64a5a8.js","js/build/index.31386d23.js","js/build/ApproveExport.37a8254a.js","js/build/ApproveExport.d0d486d1.css"])},{name:"manage-approve-details",path:"approve/details",component:()=>_n(()=>import("./details.6749696e.js"),["js/build/details.6749696e.js","js/build/ImgUpload.0e64a5a8.js"])},{name:"manage-apps",path:"apps/*",component:()=>_n(()=>import("./apps.e0c18804.js"),["js/build/apps.e0c18804.js","js/build/MicroApps.56fd4f5e.js","js/build/DialogWrapper.5fcf71c2.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/index.31386d23.js","js/build/UserSelect.d62f565b.js","js/build/ImgUpload.0e64a5a8.js","js/build/details.6749696e.js","js/build/tip.517649f6.js"])},{name:"manage-setting",path:"setting",component:()=>_n(()=>import("./index.76a95eea.js"),["js/build/index.76a95eea.js","js/build/index.274f71f0.css"]),children:[{name:"manage-setting-personal",path:"personal",component:()=>_n(()=>import("./personal.590980db.js"),["js/build/personal.590980db.js","js/build/ImgUpload.0e64a5a8.js"])},{name:"manage-setting-checkin",path:"checkin",component:()=>_n(()=>import("./checkin.dbddec5e.js"),["js/build/checkin.dbddec5e.js","js/build/checkin.01811e2e.css"])},{name:"manage-setting-language",path:"language",component:()=>_n(()=>import("./language.24cda9c9.js"),[])},{name:"manage-setting-theme",path:"theme",component:()=>_n(()=>import("./theme.bbb22618.js"),[])},{name:"manage-setting-keyboard",path:"keyboard",component:()=>_n(()=>import("./keyboard.2aabed93.js"),["js/build/keyboard.2aabed93.js","js/build/keyboard.6dd986b9.css"])},{name:"manage-setting-license",path:"license",component:()=>_n(()=>import("./license.efaacf57.js"),["js/build/license.efaacf57.js","js/build/license.2d98adda.css"])},{name:"manage-setting-password",path:"password",component:()=>_n(()=>import("./password.64696635.js"),[])},{name:"manage-setting-email",path:"email",component:()=>_n(()=>import("./email.615b5786.js"),[])},{name:"manage-setting-system",path:"system",component:()=>_n(()=>import("./system.90a495f1.js"),[])},{name:"manage-setting-delete",path:"delete",component:()=>_n(()=>import("./delete.842d393e.js"),[])}]},{name:"manage-project-invite",path:"project/invite",component:()=>_n(()=>import("./projectInvite.6d31f4f4.js"),["js/build/projectInvite.6d31f4f4.js","js/build/projectInvite.d01e3a2d.css"])},{name:"manage-project",path:"project/:projectId",component:()=>_n(()=>import("./project.ff447f31.js"),["js/build/project.ff447f31.js","js/build/ProjectLog.d63fd8b4.js","js/build/TaskMenu.a0d74239.js","js/build/index.31386d23.js","js/build/UserSelect.d62f565b.js","js/build/tip.517649f6.js","js/build/DialogWrapper.5fcf71c2.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/ImgUpload.0e64a5a8.js","js/build/details.6749696e.js"])},{name:"manage-file",path:"file/:folderId?/:fileId?",component:()=>_n(()=>import("./file.0a3f0003.js"),["js/build/file.0a3f0003.js","js/build/index.31386d23.js","js/build/longpress.43ca7fd9.js","js/build/UserSelect.d62f565b.js","js/build/tip.517649f6.js"])},{name:"manage-application",path:"application",component:()=>_n(()=>import("./application.822f72e7.js"),["js/build/application.822f72e7.js","js/build/index.31386d23.js","js/build/UserSelect.d62f565b.js","js/build/CheckinExport.ac86aa08.js","js/build/ApproveExport.d0d486d1.css","js/build/tip.517649f6.js","js/build/ReportEdit.54eb60eb.js","js/build/ReportDetail.556c0891.js","js/build/checkin.dbddec5e.js","js/build/checkin.01811e2e.css"])}]},{name:"single-file-msg",path:"/single/file/msg/:msgId",component:()=>_n(()=>import("./fileMsg.3e945301.js"),["js/build/fileMsg.3e945301.js","js/build/fileMsg.1a0b76dd.css","js/build/IFrame.364b588a.js"])},{name:"single-file-task",path:"/single/file/task/:fileId",component:()=>_n(()=>import("./fileTask.45d83527.js"),["js/build/fileTask.45d83527.js","js/build/fileTask.93338ba0.css","js/build/IFrame.364b588a.js"])},{name:"single-file",path:"/single/file/:codeOrFileId",component:()=>_n(()=>import("./file.6049f56f.js"),["js/build/file.6049f56f.js","js/build/file.1cbb23e7.css","js/build/FileContent.f5b3c8be.js","js/build/FileContent.c015b499.css","js/build/IFrame.364b588a.js","js/build/FilePreview.22c023a8.js"])},{name:"single-task",path:"/single/task/:taskId",component:()=>_n(()=>import("./task.240d6dc5.js"),["js/build/task.240d6dc5.js","js/build/task.0d7ca2d3.css","js/build/TaskDetail.3e00ee35.js","js/build/TaskDetail.6f25b368.css","js/build/ProjectLog.d63fd8b4.js","js/build/DialogWrapper.5fcf71c2.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/index.31386d23.js","js/build/UserSelect.d62f565b.js","js/build/ImgUpload.0e64a5a8.js","js/build/details.6749696e.js","js/build/tip.517649f6.js","js/build/TaskMenu.a0d74239.js","js/build/TEditor.5f656e41.js"])},{name:"valid-email",path:"/single/valid/email",component:()=>_n(()=>import("./validEmail.91adfa74.js"),["js/build/validEmail.91adfa74.js","js/build/validEmail.6e361ca9.css"])},{name:"report-edit",path:"/single/report/edit/:reportEditId",component:()=>_n(()=>import("./reportEdit.b7be9cde.js"),["js/build/reportEdit.b7be9cde.js","js/build/reportEdit.5c397123.css","js/build/ReportEdit.54eb60eb.js","js/build/UserSelect.d62f565b.js"])},{name:"report-detail",path:"/single/report/detail/:reportDetailId",component:()=>_n(()=>import("./reportDetail.142aead0.js"),["js/build/reportDetail.142aead0.js","js/build/reportDetail.c12bef4b.css","js/build/ReportDetail.556c0891.js"])},{name:"token",path:"/token",component:()=>_n(()=>import("./token.94f56172.js"),["js/build/token.94f56172.js","js/build/token.7afc4e00.css"])},{name:"login",path:"/login",component:()=>_n(()=>import("./login.e56fbb44.js"),[])},{name:"404",path:"*",component:()=>_n(()=>import("./404.b2fd5df8.js"),["js/build/404.b2fd5df8.js","js/build/404.d686a01f.css"])}];/*! +`),function(c){if(a=c.indexOf(":"),r=My.trim(c.substr(0,a)).toLowerCase(),i=My.trim(c.substr(a+1)),r){if(n[r]&&XV.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([i]):n[r]=n[r]?n[r]+", "+i:i}}),n},XE=Ea,ZV=XE.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(a){var l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){var c=XE.isString(l)?i(l):l;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function l2(e){this.message=e}l2.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};l2.prototype.__CANCEL__=!0;var Wg=l2,kv=Ea,QV=zV,qV=VV,eW=f8,tW=YV,nW=JV,rW=ZV,Iy=p8,iW=Kg,aW=Wg,JE=function(t){return new Promise(function(r,i){var a=t.data,l=t.headers,c=t.responseType,h;function s(){t.cancelToken&&t.cancelToken.unsubscribe(h),t.signal&&t.signal.removeEventListener("abort",h)}kv.isFormData(a)&&delete l["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";l.Authorization="Basic "+btoa(d+":"+v)}var m=tW(t.baseURL,t.url);p.open(t.method.toUpperCase(),eW(m,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function _(){if(!!p){var b="getAllResponseHeaders"in p?nW(p.getAllResponseHeaders()):null,E=!c||c==="text"||c==="json"?p.responseText:p.response,k={data:E,status:p.status,statusText:p.statusText,headers:b,config:t,request:p};QV(function(x){r(x),s()},function(x){i(x),s()},k),p=null}}if("onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(_)},p.onabort=function(){!p||(i(Iy("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){i(Iy("Network Error",t,null,p)),p=null},p.ontimeout=function(){var E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",k=t.transitional||iW.transitional;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),i(Iy(E,t,k.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},kv.isStandardBrowserEnv()){var y=(t.withCredentials||rW(m))&&t.xsrfCookieName?qV.read(t.xsrfCookieName):void 0;y&&(l[t.xsrfHeaderName]=y)}"setRequestHeader"in p&&kv.forEach(l,function(E,k){typeof a=="undefined"&&k.toLowerCase()==="content-type"?delete l[k]:p.setRequestHeader(k,E)}),kv.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),c&&c!=="json"&&(p.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&p.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(h=function(b){!p||(i(!b||b&&b.type?new aW("canceled"):b),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(h),t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h))),a||(a=null),p.send(a)})},ai=Ea,ZE=BV,sW=h8,oW={"Content-Type":"application/x-www-form-urlencoded"};function QE(e,t){!ai.isUndefined(e)&&ai.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function lW(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=JE),e}function uW(e,t,n){if(ai.isString(e))try{return(t||JSON.parse)(e),ai.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Hg={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:lW(),transformRequest:[function(t,n){return ZE(n,"Accept"),ZE(n,"Content-Type"),ai.isFormData(t)||ai.isArrayBuffer(t)||ai.isBuffer(t)||ai.isStream(t)||ai.isFile(t)||ai.isBlob(t)?t:ai.isArrayBufferView(t)?t.buffer:ai.isURLSearchParams(t)?(QE(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ai.isObject(t)||n&&n["Content-Type"]==="application/json"?(QE(n,"application/json"),uW(t)):t}],transformResponse:[function(t){var n=this.transitional||Hg.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,a=!r&&this.responseType==="json";if(a||i&&ai.isString(t)&&t.length)try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?sW(l,this,"E_JSON_PARSE"):l}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ai.forEach(["delete","get","head"],function(t){Hg.headers[t]={}});ai.forEach(["post","put","patch"],function(t){Hg.headers[t]=ai.merge(oW)});var Kg=Hg,cW=Ea,dW=Kg,fW=function(t,n,r){var i=this||dW;return cW.forEach(r,function(l){t=l.call(i,t,n)}),t},v8=function(t){return!!(t&&t.__CANCEL__)},qE=Ea,$y=fW,hW=v8,pW=Kg,vW=Wg;function Ry(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vW("canceled")}var mW=function(t){Ry(t),t.headers=t.headers||{},t.data=$y.call(t,t.data,t.headers,t.transformRequest),t.headers=qE.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),qE.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var n=t.adapter||pW.adapter;return n(t).then(function(i){return Ry(t),i.data=$y.call(t,i.data,i.headers,t.transformResponse),i},function(i){return hW(i)||(Ry(t),i&&i.response&&(i.response.data=$y.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},ca=Ea,m8=function(t,n){n=n||{};var r={};function i(p,d){return ca.isPlainObject(p)&&ca.isPlainObject(d)?ca.merge(p,d):ca.isPlainObject(d)?ca.merge({},d):ca.isArray(d)?d.slice():d}function a(p){if(ca.isUndefined(n[p])){if(!ca.isUndefined(t[p]))return i(void 0,t[p])}else return i(t[p],n[p])}function l(p){if(!ca.isUndefined(n[p]))return i(void 0,n[p])}function c(p){if(ca.isUndefined(n[p])){if(!ca.isUndefined(t[p]))return i(void 0,t[p])}else return i(void 0,n[p])}function h(p){if(p in n)return i(t[p],n[p]);if(p in t)return i(void 0,t[p])}var s={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:h};return ca.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var v=s[d]||a,m=v(d);ca.isUndefined(m)&&v!==h||(r[d]=m)}),r},g8={version:"0.24.0"},gW=g8.version,u2={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){u2[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var eD={};u2.transitional=function(t,n,r){function i(a,l){return"[Axios v"+gW+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return function(a,l,c){if(t===!1)throw new Error(i(l," has been removed"+(n?" in "+n:"")));return n&&!eD[l]&&(eD[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,c):!0}};function _W(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],l=t[a];if(l){var c=e[a],h=c===void 0||l(c,a,e);if(h!==!0)throw new TypeError("option "+a+" must be "+h);continue}if(n!==!0)throw Error("Unknown option "+a)}}var yW={assertOptions:_W,validators:u2},_8=Ea,bW=f8,tD=NV,nD=mW,Gg=m8,y8=yW,ec=y8.validators;function qf(e){this.defaults=e,this.interceptors={request:new tD,response:new tD}}qf.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=Gg(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;n!==void 0&&y8.assertOptions(n,{silentJSONParsing:ec.transitional(ec.boolean),forcedJSONParsing:ec.transitional(ec.boolean),clarifyTimeoutError:ec.transitional(ec.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(i=i&&v.synchronous,r.unshift(v.fulfilled,v.rejected))});var a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});var l;if(!i){var c=[nD,void 0];for(Array.prototype.unshift.apply(c,r),c=c.concat(a),l=Promise.resolve(t);c.length;)l=l.then(c.shift(),c.shift());return l}for(var h=t;r.length;){var s=r.shift(),p=r.shift();try{h=s(h)}catch(d){p(d);break}}try{l=nD(h)}catch(d){return Promise.reject(d)}for(;a.length;)l=l.then(a.shift(),a.shift());return l};qf.prototype.getUri=function(t){return t=Gg(this.defaults,t),bW(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};_8.forEach(["delete","get","head","options"],function(t){qf.prototype[t]=function(n,r){return this.request(Gg(r||{},{method:t,url:n,data:(r||{}).data}))}});_8.forEach(["post","put","patch"],function(t){qf.prototype[t]=function(n,r,i){return this.request(Gg(i||{},{method:t,url:n,data:r}))}});var wW=qf,CW=Wg;function Ic(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(i){t=i});var n=this;this.promise.then(function(r){if(!!n._listeners){var i,a=n._listeners.length;for(i=0;i v"+e._s(e.updateVersion))])],1),e.$Platform==="mac"?n("div",{staticClass:"notification-tip"},[e._v(e._s(e.$L("\u79BB\u6700\u65B0\u7248\u672C\u53EA\u6709\u4E00\u6B65\u4E4B\u9065\u4E86\uFF01\u91CD\u65B0\u542F\u52A8\u5E94\u7528\u5373\u53EF\u5B8C\u6210\u66F4\u65B0\u3002")))]):e._e()]),n("Scrollbar",{attrs:{"class-name":"notification-body"}},[n("MarkdownPreview",{attrs:{initialValue:e.updateNote}})],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.updateShow=!1}}},[e._v(e._s(e.$L("\u7A0D\u540E")))]),n("Button",{attrs:{type:"primary",loading:e.updateIng},on:{click:e.updateQuitAndInstall}},[e._v(e._s(e.$L(e.$Platform==="mac"?"\u91CD\u65B0\u542F\u52A8":"\u7ACB\u5373\u5347\u7EA7")))])],1)],1)],2)},NW=[];const FW={name:"RightBottom",components:{MarkdownPreview:yV},data(){return{loadIng:0,subscribe:null,apiVersion:"",systemVersion:window.systemInfo.version,updateVersion:"",updateNote:"",updateShow:!1,updateBottomShow:!1,updateIng:!1,downloadUrl:""}},mounted(){this.checkVersion(),this.$Electron&&(this.subscribe=Ts.Store.subscribe("updateNotification",e=>{this.updateShow=!0}),this.$Electron.registerMsgListener("updateDownloaded",e=>{this.$store.state.clientNewVersion=e.version,this.updateVersion=e.version,this.updateNote=e.releaseNotes||this.$L("\u6CA1\u6709\u66F4\u65B0\u63CF\u8FF0\u3002"),this.updateShow=$A.strExists(this.updateNote,`[${this.updateVersion}-Release]`)}))},beforeDestroy(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},watch:{updateShow(e){e&&(this.updateBottomShow=!0)}},computed:{isSoftware(){return this.$Electron||this.$isEEUiApp},showSSO(){return this.isSoftware&&["login"].includes(this.$route.name)},showDown(){return!this.$isEEUiApp&&!this.windowTouch&&["login","index","manage-dashboard"].includes(this.$route.name)},showPrivacy(){return $A.isDooServer()&&this.$isEEUiApp&&["login"].includes(this.$route.name)}},methods:{isNotServer(){let e=$A.getDomain(window.systemInfo.apiUrl);return this.isSoftware&&(e==""||e=="public")},checkVersion(){this.isNotServer()||(iD.get($A.apiUrl("system/version")).then(({status:e,data:t})=>{e===200&&(this.apiVersion=t.version||"",this.compareVersion(this.apiVersion,"0.19.0")===-1&&$A.modalWarning({title:"\u6E29\u99A8\u63D0\u793A",message:"\u670D\u52A1\u5668\u63A5\u53E3\u7248\u672C\u8FC7\u4F4E\uFF0C\u90E8\u5206\u529F\u80FD\u53EF\u80FD\u65E0\u6CD5\u6B63\u5E38\u4F7F\u7528\u3002"}),this.$Electron?this.$Electron.sendMessage("updateCheckAndDownload",{apiVersion:this.apiVersion}):this.getDownloadUrl(t.publish))}).catch(e=>{}),this.__checkVersion&&clearTimeout(this.__checkVersion),this.__checkVersion=setTimeout(this.checkVersion,600*1e3))},getDownloadUrl(e){if(!!$A.isJson(e))switch(e.provider){case"generic":this.downloadUrl=`${e.url}/latest`;break;case"github":(async t=>{let n="cacheAppdown::"+this.apiVersion,r=await $A.IDBJson(n),i=600;if(r.time&&r.time+i>Math.round(new Date().getTime()/1e3)){this.downloadUrl=r.data.html_url;return}this.loadIng>0||(this.loadIng++,iD.get(`https://api.github.com/repos/${e.owner}/${e.repo}/releases`).then(({status:a,data:l})=>{this.loadIng--,a===200&&$A.isArray(l)&&(r.time=Math.round(new Date().getTime()/1e3),r.data=l.find(({tag_name:c})=>this.compareVersion(this.tagVersion(c),this.apiVersion)===0)||{},$A.IDBSave(n,r),this.downloadUrl=r.data.html_url)}).catch(()=>{this.loadIng--}))})();break}},updateQuitAndInstall(){this.updateIng=!0,setTimeout(()=>{this.$Electron.sendMessage("updateQuitAndInstall")},301)},useSSOLogin(){Ts.Store.set("useSSOLogin",!0)},tagVersion(e){return e?$A.leftDelete(e.toLowerCase(),"v"):""},compareVersion(e,t){let n=0,r=0;if(e===t)return 0;const i=(a,l)=>{let c=l;for(;a[c]!=="."&&ch?1:-1;n=a+1,r=l+1}for(;n0)return 1;n=a+1}for(;r0)return-1;r=a+1}return 0}}},aD={};var BW=Zr(FW,LW,NW,!1,UW,null,null,null);function UW(e){for(let t in aD)this[t]=aD[t]}var jW=function(){return BW.exports}();const zW="modulepreload",sD={},VW="/",_n=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${VW}${r}`,r in sD)return;sD[r]=!0;const i=r.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const l=document.createElement("link");if(l.rel=i?"stylesheet":zW,i||(l.as="script",l.crossOrigin=""),l.href=r,document.head.appendChild(l),i)return new Promise((c,h)=>{l.addEventListener("load",c),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};var WW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Modal",{attrs:{mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":["",""],"class-name":e.viewMode==="desktop"?"common-preview-image-view":"common-preview-image-swipe",fullscreen:""},model:{value:e.show,callback:function(r){e.show=r},expression:"show"}},[e.list.length>0?[e.viewMode==="desktop"?n("PreviewImageView",{attrs:{"initial-index":e.index,"url-list":e.list,infinite:""}}):e._e(),e.viewMode==="mobile"?n("PreviewImageSwipe",{attrs:{"initial-index":e.index,"url-list":e.list},on:{"on-destroy":function(r){e.show=!1}}}):e._e()]:e._e()],2)},HW=[];const KW=()=>_n(()=>import("./view.576fab2b.js"),["js/build/view.576fab2b.js","js/build/view.5e67e6f1.css"]),GW=()=>_n(()=>import("./swipe.9a0bfd93.js"),["js/build/swipe.9a0bfd93.js","js/build/swipe.30a297b8.css"]),YW={name:"PreviewImage",components:{PreviewImageSwipe:GW,PreviewImageView:KW},props:{value:{type:Boolean,default:!1},index:{type:Number,default:0},list:{type:Array,default:()=>[]},mode:{type:String,default:null}},data(){return{show:this.value}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)}},computed:{viewMode(){return this.mode?this.mode:this.windowTouch?"mobile":"desktop"}}},oD={};var XW=Zr(YW,WW,HW,!1,JW,null,null,null);function JW(e){for(let t in oD)this[t]=oD[t]}var ZW=function(){return XW.exports}(),QW=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PreviewImage",{attrs:{index:e.previewImageIndex,list:e.previewImageList},model:{value:e.show,callback:function(r){e.show=r},expression:"show"}})},qW=[];const eH={name:"PreviewImageState",components:{PreviewImage:ZW},computed:{...Po(["previewImageIndex","previewImageList"])},data(){return{show:!1}},watch:{show(e){e?this.$store.state.previewImageIndex=Math.min(Math.max(this.$store.state.previewImageIndex,0),this.$store.state.previewImageList.length-1):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[])},previewImageList(e){if(e.length>0)if($A.isEEUiApp){let t=Math.min(Math.max(this.$store.state.previewImageIndex,0),this.$store.state.previewImageList.length-1),n=e.map(i=>$A.isJson(i)?$A.thumbRestore(i.src):$A.thumbRestore(i)),r=50;if(n.length>r){const i=[];let a=0;for(;i.length=0&&i.unshift(n[l]),cl===n[t]),n=i}$A.eeuiAppSendMessage({action:"picturePreview",position:t,paths:n})}else this.show=!0}}},lD={};var tH=Zr(eH,QW,qW,!1,nH,null,null,null);function nH(e){for(let t in lD)this[t]=lD[t]}var rH=function(){return tH.exports}(),iH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-network-exception"},[e.type==="alert"?[e.show?n("Alert",{attrs:{type:"error","show-icon":"",closable:""}},[e._v(e._s(e.$L("\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8BBE\u7F6E\u3002")))]):e._e()]:e.type==="modal"?[n("Modal",{attrs:{width:416,closable:!1,"footer-hide":!0,"class-name":"common-network-exception-modal"},model:{value:e.show,callback:function(r){e.show=r},expression:"show"}},[n("div",{staticClass:"ivu-modal-confirm"},[n("div",{staticClass:"ivu-modal-confirm-head"},[n("div",{staticClass:"ivu-modal-confirm-head-icon ivu-modal-confirm-head-icon-error"},[n("Icon",{attrs:{type:"ios-close-circle"}})],1),n("div",{staticClass:"ivu-modal-confirm-head-title"},[e._v(e._s(e.$L("\u6E29\u99A8\u63D0\u793A")))])]),n("div",{staticClass:"ivu-modal-confirm-body"},[n("div",[e._v(e._s(e.$L("\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8BBE\u7F6E\u3002")))])]),n("div",{staticClass:"ivu-modal-confirm-footer"},[n("Button",{attrs:{type:"primary"},on:{click:function(r){e.show=!1}}},[e._v(e._s(e.$L("\u786E\u5B9A")))])],1)])])]:e._e()],2)},aH=[];const sH={name:"NetworkException",props:{type:{type:String,default:"modal"}},data(){return{show:!1}},beforeDestroy(){this.show=!1},computed:{...Po(["ajaxNetworkException"])},watch:{ajaxNetworkException:{handler(e){this.show=e},immediate:!0}}},uD={};var oH=Zr(sH,iH,aH,!1,lH,null,null,null);function lH(e){for(let t in uD)this[t]=uD[t]}var uH=function(){return oH.exports}(),cH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.show?n("div",{staticClass:"common-guide"},[n("img",{attrs:{src:e.src,width:"100%"}}),n("div",[n("Button",{attrs:{type:"default",size:"large"},on:{click:function(r){e.show=!1}}},[e._v(e._s(e.$L("\u5FCD\u5FC3\u62D2\u7EDD")))])],1)]):e._e()},dH=[];const fH={name:"GuidePage",data(){return{show:!1,src:""}},mounted(){this.src=$.apiUrl("../images/guide.png")},watch:{$route:{handler(e){this.show=!1,navigator.userAgent.indexOf("MicroMessenger")!==-1&&e.name=="manage-project-invite"&&(this.show=!0)},immediate:!0}}},cD={};var hH=Zr(fH,cH,dH,!1,pH,null,null,null);function pH(e){for(let t in cD)this[t]=cD[t]}var vH=function(){return hH.exports}(),mH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"task-add"},[n("Cascader",{attrs:{data:e.cascaderData,clearable:!1,placeholder:e.$L("\u8BF7\u9009\u62E9\u9879\u76EE"),"load-data":e.cascaderLoadData,filterable:""},on:{"on-input-change":e.cascaderInputChange,"on-visible-change":function(r){e.cascaderShow=!e.cascaderShow}},model:{value:e.cascader,callback:function(r){e.cascader=r},expression:"cascader"}}),n("div",{staticClass:"ivu-modal-footer"},[n("div",{staticClass:"adaption"},[n("Button",{attrs:{type:"default"},on:{click:e.close}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.loadIng>0},on:{click:e.onConfirm}},[e._v(e._s(e.$L("\u786E\u5B9A")))])],1)])],1)},gH=[];const _H={name:"TaskMove",props:{value:{type:Boolean,default:!1},task:{type:Object,default:!1}},data(){return{cascader:[],cascaderShow:!1,cascaderData:[],cascaderValue:"",cascaderLoading:0,cascaderAlready:[],loadIng:0,beforeClose:[]}},async mounted(){this.initCascaderData()},beforeDestroy(){this.beforeClose.some(e=>{typeof e=="function"&&e()}),this.beforeClose=[]},computed:{...Po(["cacheProjects","cacheColumns"])},watch:{task:{handler:function(e){this.cascader=[e.project_id,e.column_id]},deep:!0,immediate:!0}},methods:{initCascaderData(){const e=$A.cloneJSON(this.cacheProjects).sort((t,n)=>t.top_at||n.top_at?$A.Date(n.top_at)-$A.Date(t.top_at):n.id-t.id);this.cascaderData=e.map(t=>{const n=this.cacheColumns.filter(({project_id:i})=>i==t.id).map(i=>({value:i.id,label:i.name})),r={value:t.id,label:t.name,children:n};return n.length==0&&(r.loading=!1),r})},cascaderLoadData(e,t){e.loading=!0,this.$store.dispatch("getColumns",e.value).then(n=>{e.children=n.map(r=>({value:r.id,label:r.name})),e.loading=!1,t()}).catch(()=>{e.loading=!1,t()})},cascaderInputChange(e){this.cascaderValue=e||"",this.cascaderAlready[this.cascaderValue]!==!0&&(this.cascaderAlready[this.cascaderValue]=!0,setTimeout(()=>{this.cascaderLoading++},1e3),this.$store.dispatch("getProjects",{keys:{name:this.cascaderValue},getcolumn:"yes"}).then(()=>{this.cascaderLoading--,this.initCascaderData()}).catch(()=>{this.cascaderLoading--}))},async onConfirm(){this.loadIng++,this.$store.dispatch("call",{url:"project/task/move",data:{task_id:this.task.id,project_id:this.cascader[0],column_id:this.cascader[1]}}).then(({msg:e})=>{this.loadIng--,this.$store.dispatch("saveTask",{id:this.task.id,project_id:this.cascader[0],column_id:this.cascader[1]}),$A.messageSuccess(e),this.close()}).catch(({msg:e})=>{this.loadIng--,$A.modalError(e)})},close(){this.$emit("input",!this.value)}}},dD={};var yH=Zr(_H,mH,gH,!1,bH,null,null,null);function bH(e){for(let t in dD)this[t]=dD[t]}var wH=function(){return yH.exports}(),CH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("EDropdown",{ref:"dropdown",staticClass:"task-operation-dropdown",style:e.styles,attrs:{trigger:"click",disabled:e.disabled,size:e.size,placement:"bottom"},on:{command:e.dropTask,"visible-change":e.visibleChange}},[n("div",{ref:"icon",staticClass:"task-operation-icon"}),n("EDropdownMenu",{ref:"dropdownMenu",staticClass:"task-operation-more-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[n("li",{staticClass:"task-operation-more-warp",class:e.size},[n("ul",[e.flow?e.turns.length>0?e._l(e.turns,function(r){return n("EDropdownItem",{key:r.id,attrs:{command:`turn::${r.id}`}},[n("div",{staticClass:"item flow"},[r.id==e.task.flow_item_id&&e.flow.auto_assign!==!0?n("Icon",{staticClass:"check",attrs:{type:"md-checkmark-circle-outline"}}):n("Icon",{attrs:{type:"md-radio-button-off"}}),n("div",{staticClass:"flow-name",class:r.status},[e._v(e._s(r.name))])],1)])}):[e.task.complete_at?n("EDropdownItem",{attrs:{command:"uncomplete"}},[n("div",{staticClass:"item red"},[n("Icon",{attrs:{type:"md-checkmark-circle-outline"}}),e._v(e._s(e.$L("\u6807\u8BB0\u672A\u5B8C\u6210"))+" ")],1)]):n("EDropdownItem",{attrs:{command:"complete"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-radio-button-off"}}),e._v(e._s(e.$L("\u5B8C\u6210"))+" ")],1)])]:n("EDropdownItem",{staticClass:"load-flow",attrs:{disabled:""}},[n("div",{staticClass:"load-flow-warp"},[n("Loading")],1)]),e.task.parent_id===0?[n("EDropdownItem",{attrs:{divided:e.turns.length>0,command:"archived"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"ios-filing"}}),e._v(e._s(e.$L(e.task.archived_at?"\u8FD8\u539F\u5F52\u6863":"\u5F52\u6863"))+" ")],1)]),n("EDropdownItem",{attrs:{command:"move"}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont movefont"},[e._v("\uE7FC")]),e._v(e._s(e.$L("\u79FB\u52A8"))+" ")])]),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),e._v(e._s(e.$L("\u5220\u9664"))+" ")],1)]),e.colorShow?e._l(e.taskColorList,function(r,i){return n("EDropdownItem",{key:"c_"+i,attrs:{divided:i==0,command:r}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:r.primary||"#ddd"},domProps:{innerHTML:e._s(r.color==(e.task.color||"")?"":"")}}),e._v(e._s(e.$L(r.name))+" ")])])}):e._e()]:n("EDropdownItem",{attrs:{command:"remove",divided:e.turns.length>0}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),e._v(e._s(e.$L("\u5220\u9664"))+" ")],1)])],2)])])],1),n("Modal",{attrs:{title:e.$L("\u79FB\u52A8\u4EFB\u52A1"),"mask-closable":!1,styles:{width:"90%",maxWidth:"540px"},"footer-hide":""},model:{value:e.moveTaskShow,callback:function(r){e.moveTaskShow=r},expression:"moveTaskShow"}},[n("TaskMove",{ref:"addTask",attrs:{task:e.task},model:{value:e.moveTaskShow,callback:function(r){e.moveTaskShow=r},expression:"moveTaskShow"}})],1)],1)},xH=[];const SH={name:"TaskOperation",components:{TaskMove:wH},data(){return{task:{},loadStatus:!1,colorShow:!0,updateBefore:!1,disabled:!1,size:"small",onUpdate:null,element:null,target:null,styles:{},moveTaskShow:!1}},beforeDestroy(){this.target&&this.target.removeEventListener("scroll",this.handlerEventListeners)},computed:{...Po(["loads","taskOperation","taskColorList","taskFlows","taskFlowItems"]),...q1(["isLoad"]),loadIng(){return this.loadStatus?!0:this.isLoad(`task-${this.task.id}`)},flow(){return this.taskFlows.find(({task_id:e})=>e==this.task.id)},turns(){if(!this.flow)return[];let e=this.taskFlowItems.find(({id:t})=>t==this.flow.flow_item_id);return e?this.taskFlowItems.filter(({id:t})=>e.turns.includes(t)):[]}},watch:{taskOperation(e){if(e.event&&e.task){if(this.$refs.dropdown.visible&&this.element===e.event.target){this.hide();return}const t=e.event.target.getBoundingClientRect();this.styles={left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`},this.task=e.task,this.loadStatus=typeof e.loadStatus=="undefined"?!1:e.loadStatus,this.colorShow=typeof e.colorShow=="undefined"?!0:e.colorShow,this.updateBefore=typeof e.updateBefore=="undefined"?!1:e.updateBefore,this.disabled=typeof e.disabled=="undefined"?!1:e.disabled,this.size=typeof e.size=="undefined"?"small":e.size,this.onUpdate=typeof e.onUpdate=="function"?e.onUpdate:null,this.$refs.icon.focus(),this.updatePopper(),this.show(),this.$store.dispatch("getTaskFlow",this.task.id).finally(this.updatePopper),this.setupEventListeners(e.event)}else this.hide()}},methods:{show(){this.$refs.dropdown.show()},hide(){this.$refs.dropdown.hide()},dropTask(e){const t=this.task,n=r=>{r?this.$store.dispatch("saveTaskCompleteTemp",t.id):this.$store.dispatch("forgetTaskCompleteTemp",t.id)};if($A.isJson(e)){e.name&&this.updateTask({color:e.color}).catch(()=>{});return}if($A.leftExists(e,"turn::")){let r=$A.leftDelete(e,"turn::");if(r==this.task.flow_item_id)return;let i=this.taskFlowItems.find(({id:h})=>h==this.flow.flow_item_id)||{},a=this.taskFlowItems.find(({id:h})=>h==r)||{},l=i.status!=="end"&&a.status==="end",c=i.status==="end"&&a.status!=="end";this.updateBefore&&(l?n(!0):c&&n(!1)),this.updateTask({flow_item_id:r}).then(()=>{l?n(!0):c&&n(!1)}).catch(()=>{l?n(!1):c&&n(!0)});return}switch(e){case"complete":if(this.task.complete_at)return;this.updateBefore&&n(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then(()=>{n(!0)}).catch(()=>{n(!1)});break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&n(!1),this.updateTask({complete_at:!1}).then(()=>{n(!1)}).catch(()=>{n(!0)});break;case"archived":case"remove":this.archivedOrRemoveTask(e);break;case"move":this.moveTaskShow=!0;break}},updateTask(e){return new Promise((t,n)=>{if(this.loadIng){n();return}Object.keys(e).forEach(i=>this.$set(this.task,i,e[i]));const r=Object.assign(e,{task_id:this.task.id});this.$store.dispatch("taskUpdate",r).then(({data:i,msg:a})=>{$A.messageSuccess(a),t(),this.$store.dispatch("saveTaskBrowse",r.task_id),typeof this.onUpdate=="function"&&this.onUpdate(i)}).catch(({msg:i})=>{$A.modalError(i),this.$store.dispatch("getTaskOne",r.task_id).catch(()=>{}),n()})})},archivedOrRemoveTask(e){let t="removeTask",n="\u5220\u9664",r={task_id:this.task.id},i=this.task.parent_id>0?"\u5B50\u4EFB\u52A1":"\u4EFB\u52A1";e=="archived"&&(t="archivedTask",n="\u5F52\u6863",this.task.archived_at&&(n="\u8FD8\u539F\u5F52\u6863",r={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:n+i,content:"\u4F60\u786E\u5B9A\u8981"+n+i+"\u3010"+this.task.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>{if(!this.loadIng)return new Promise((a,l)=>{this.$store.dispatch(t,r).then(({msg:c})=>{a(c),this.$store.dispatch("saveTaskBrowse",r.task_id)}).catch(({msg:c})=>{l(c)})})}})},visibleChange(e){this.visible=e},updatePopper(){this.$nextTick(this.$refs.dropdownMenu.updatePopper)},setupEventListeners(e){this.element=e.target;let t=this.getScrollParent(this.element);if((t===window.document.body||t===window.document.documentElement)&&(t=window),this.target){if(this.target===t)return;this.target.removeEventListener("scroll",this.handlerEventListeners)}this.target=t,this.target.addEventListener("scroll",this.handlerEventListeners)},handlerEventListeners(e){if(!this.visible||!this.element)return;const t=e.target.getBoundingClientRect(),n=this.element.getBoundingClientRect();if(n.topt.top+t.height){this.hide();return}this.styles={left:`${n.left}px`,top:`${n.top}px`,width:`${n.width}px`,height:`${n.height}px`},this.updatePopper()},getScrollParent(e){const t=e.parentNode;return t?t===window.document?window.document.body.scrollTop||window.document.body.scrollLeft?window.document.body:window.document.documentElement:["scroll","auto"].indexOf(this.getStyleComputedProperty(t,"overflow"))!==-1||["scroll","auto"].indexOf(this.getStyleComputedProperty(t,"overflow-x"))!==-1||["scroll","auto"].indexOf(this.getStyleComputedProperty(t,"overflow-y"))!==-1?t:this.getScrollParent(e.parentNode):e},getStyleComputedProperty(e,t){return window.getComputedStyle(e,null)[t]}}},fD={};var EH=Zr(SH,CH,xH,!1,DH,null,null,null);function DH(e){for(let t in fD)this[t]=fD[t]}var kH=function(){return EH.exports}(),OH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("keep-alive",[n("router-view",{staticClass:"child-view"})],1),n("TaskOperation"),n("FloatSpinner"),n("RightBottom"),n("PreviewImageState"),e.windowLandscape?n("NetworkException"):e._e(),e._l(e.iframes,function(r){return r.url?n("iframe",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:r.key,attrs:{src:r.url}}):e._e()}),n("GuidePage")],2)},PH=[];const TH={components:{TaskOperation:kH,NetworkException:uH,PreviewImageState:rH,RightBottom:jW,FloatSpinner:Fz,GuidePage:vH},data(){return{routePath:null,searchInter:null,iframes:[]}},created(){this.electronEvents(),this.eeuiEvents(),this.otherEvents(),this.synchThemeLanguage(),this.synchAppTheme()},mounted(){window.addEventListener("resize",this.windowSizeListener),window.addEventListener("scroll",this.windowScrollListener),this.searchInter=setInterval(this.searchEnter,1e3)},beforeDestroy(){window.removeEventListener("resize",this.windowSizeListener),window.removeEventListener("scroll",this.windowScrollListener),this.searchInter&&clearInterval(this.searchInter)},computed:{...Po(["ws","themeMode","themeIsDark","windowOrientation"]),isSoftware(){return this.$Electron||this.$isEEUiApp}},watch:{$route:{handler(e){this.routePath=e.path},immediate:!0},routePath:{handler(e){e&&this.userId>0&&(e=e.replace(/^\/manage\/file\/\d+\/(\d+)$/,"/single/file/$1"),this.$store.dispatch("websocketPath",e))},immediate:!0},userId:{handler(){this.$store.dispatch("websocketConnection"),this.userId>0&&(this.$isEEUiApp&&($A.eeuiAppSendMessage({action:"intiUmeng"}),setTimeout(e=>{$A.eeuiAppSendMessage({action:"setUmengAlias",userid:this.userId,token:this.userToken,url:$A.apiUrl("users/umeng/alias")})},6e3)),$A.IDBString("logOpen").then(e=>{$A.openLog=e==="open",$A.openLog&&$A.loadScript("js/vconsole.min.js").then(t=>{window.vConsole=new window.VConsole({onReady:()=>{console.log("vConsole: onReady")},onClearLog:()=>{console.log("vConsole: onClearLog")}})}).catch(t=>{$A.modalError("vConsole \u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")})}))},immediate:!0},windowTouch:{handler(e){e?$A("body").addClass("window-touch"):$A("body").removeClass("window-touch")},immediate:!0},windowOrientation:{handler(e){$A("body").removeClass(["window-landscape","window-portrait"]),$A("body").addClass("window-"+e)},immediate:!0},windowActive(e){e?(this.autoTheme(),this.__windowTimer&&clearTimeout(this.__windowTimer),this.__windowTimer=setTimeout(t=>{this.$store.dispatch("call",{url:"users/socket/status"}).then(n=>{this.$store.dispatch("websocketSend",{type:"handshake"}).catch(r=>{this.$store.dispatch("websocketConnection")})}).catch(n=>{this.$store.dispatch("websocketConnection")})},600)):this.$store.dispatch("audioStop",!0)},themeIsDark(){this.synchThemeLanguage()}},methods:{searchEnter(){let e=$A(".sreachBox");if(e.length===0||e.attr("data-enter-init")==="init")return;e.attr("data-enter-init","init");let t=e.find("button[type='button']"),n=null;t.length!==0&&(t.each((r,i)=>{$A(i).text().indexOf("\u641C\u7D22")&&(n=$A(i))}),n!==null&&e.find("input.ivu-input").keydown(function(r){r.keyCode==13&&(n.hasClass("ivu-btn-loading")||n.click())}))},autoTheme(){this.themeMode==="auto"&&this.$store.dispatch("synchTheme")},synchThemeLanguage(){this.isSoftware&&(this.iframes=this.iframes.filter(({key:e})=>e!="synchThemeLanguage"),this.iframes.push({key:"synchThemeLanguage",url:$A.apiUrl(`../setting/theme_language?theme=${this.themeIsDark?"dark":"light"}&language=${au}`)})),this.synchAppTheme()},synchAppTheme(){this.$isEEUiApp&&$A.eeuiAppSendMessage({action:"updateTheme",themeName:this.themeIsDark?"dark":"light"})},windowSizeListener(){const e=$A(window).width(),t=$A(window).height(),n=$A.screenOrientation();this.$store.state.windowTouch="ontouchend"in document,this.$store.state.windowWidth=e,this.$store.state.windowHeight=t,this.$store.state.windowOrientation=n,this.$store.state.windowLandscape=n==="landscape",this.$store.state.windowPortrait=n==="portrait",this.$store.state.formLabelPosition=e>576?"right":"top",this.$store.state.formLabelWidth=e>576?"auto":""},windowScrollListener(){this.$store.state.windowScrollY=window.scrollY},electronEvents(){!this.$Electron||(window.__onBeforeUnload=()=>{if(this.$Modal.removeLast())return!0},this.$Electron.registerMsgListener("dispatch",e=>{if(!$A.isJson(e))return;let{action:t,data:n}=e;this.$store.dispatch(t,n)}),this.$Electron.registerMsgListener("browserWindowBlur",e=>{this.$store.state.windowActive=!1}),this.$Electron.registerMsgListener("browserWindowFocus",e=>{this.$store.state.windowActive=!0}),this.iframes.push({key:"manifest",url:$A.apiUrl("../manifest")}),$A.bindScreenshotKey($A.jsonParse(window.localStorage.getItem("__keyboard:data__"))||{}),this.$Electron.sendMessage("setMenuLanguage",{openInBrowser:this.$L("\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00"),saveImageAs:this.$L("\u56FE\u7247\u5B58\u50A8\u4E3A..."),copyImage:this.$L("\u590D\u5236\u56FE\u7247"),copyEmailAddress:this.$L("\u590D\u5236\u7535\u5B50\u90AE\u4EF6\u5730\u5740"),copyLinkAddress:this.$L("\u590D\u5236\u94FE\u63A5\u5730\u5740"),copyImageAddress:this.$L("\u590D\u5236\u56FE\u7247\u5730\u5740"),failedToSaveImage:this.$L("\u56FE\u7247\u4FDD\u5B58\u5931\u8D25"),theImageFailedToSave:this.$L("\u56FE\u7247\u65E0\u6CD5\u4FDD\u5B58")}))},eeuiEvents(){!this.$isEEUiApp||(window.__onAppActive=()=>{this.autoTheme()},window.__onPagePause=()=>{this.$store.state.windowActive=!1,this.$store.dispatch("getBasicData",-1)},window.__onPageResume=e=>{this.$store.state.windowActive=!0,e>0?this.$store.dispatch("getBasicData",600):this.autoTheme()},window.__onMeetingEvent=({act:e,uuid:t,meetingid:n})=>{switch(e){case"getInfo":const r=(t+"").indexOf("88888")!==-1;this.$store.dispatch("call",{url:r?"users/meeting/tourist":"users/basic",data:{userid:r?t:(t+"").substring(6),tourist_id:t}}).then(({data:i})=>{var a,l;$A.eeuiAppSendMessage({action:"updateMeetingInfo",infos:{uuid:t,avatar:r?i==null?void 0:i.userimg:(a=i[0])==null?void 0:a.userimg,username:r?i==null?void 0:i.nickname:(l=i[0])==null?void 0:l.nickname}})}).catch(({msg:i})=>{$A.modalError(i)});break;case"success":this.$store.dispatch("closeMeetingWindow","add");break;case"invent":this.$store.dispatch("showMeetingWindow",{type:"invitation",meetingid:n});break;case"endMeeting":break;case"error":this.$store.dispatch("closeMeetingWindow","error");break}},window.__onKeyboardStatus=e=>{const t=$A.jsonParse(decodeURIComponent(e));this.$store.state.keyboardType=t.keyboardType,this.$store.state.keyboardHeight=t.keyboardHeight,this.$store.state.safeAreaBottom=t.safeAreaBottom},window.__onNotificationPermissionStatus=e=>{this.$store.state.appNotificationPermission=$A.runNum(e)==1},window.__handleLink=e=>{this.goForward({path:(e||"").indexOf("/")!==0?"/"+e:e})})},otherEvents(){if(!this.isSoftware){const e="hidden"in document?"hidden":"webkitHidden"in document?"webkitHidden":"mozHidden"in document?"mozHidden":null,t=e.replace(/hidden/i,"visibilitychange");document.addEventListener(t,()=>{this.$store.state.windowActive=!document[e]})}}}},hD={};var AH=Zr(TH,OH,PH,!1,MH,"7cda3400",null,null);function MH(e){for(let t in hD)this[t]=hD[t]}var IH=function(){return AH.exports}(),$H=[{name:"index",path:"/",component:()=>_n(()=>import("./index.568a7810.js"),[])},{name:"pro",path:"/pro",component:()=>_n(()=>import("./pro.011c4bd5.js"),[])},{name:"meeting",path:"/meeting/:meetingId?/:sharekey?",component:()=>_n(()=>import("./meeting.0c7743f5.js"),["js/build/meeting.0c7743f5.js","js/build/MeetingManager.bf6d77cf.js","js/build/UserSelect.1938cd94.js"])},{name:"manage",path:"/manage",component:()=>_n(()=>import("./manage.d657f726.js"),["js/build/manage.d657f726.js","js/build/manage.5dc9aad0.css","js/build/CheckinExport.566afd3f.js","js/build/ApproveExport.d0d486d1.css","js/build/UserSelect.1938cd94.js","js/build/tip.6872e3c6.js","js/build/ReportEdit.cc7cc71b.js","js/build/ReportDetail.d9bb9dfa.js","js/build/index.8984a77c.js","js/build/TaskDetail.3379e7b2.js","js/build/TaskDetail.6f25b368.css","js/build/ProjectLog.55720685.js","js/build/DialogWrapper.54a1354f.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/ImgUpload.8863e78d.js","js/build/details.97854344.js","js/build/TaskMenu.0454bb90.js","js/build/TEditor.8daabc3e.js","js/build/MeetingManager.bf6d77cf.js","js/build/ApproveExport.7b859f1c.js","js/build/MicroApps.10c19f02.js"]),children:[{name:"manage-dashboard",path:"dashboard",component:()=>_n(()=>import("./dashboard.3f95cdc5.js"),["js/build/dashboard.3f95cdc5.js","js/build/TaskMenu.0454bb90.js"])},{name:"manage-calendar",path:"calendar",component:()=>_n(()=>import("./calendar.23380bdc.js"),["js/build/calendar.23380bdc.js","js/build/calendar.05643a5b.css","js/build/TaskMenu.0454bb90.js"])},{name:"manage-messenger",path:"messenger/:dialogAction?",component:()=>_n(()=>import("./messenger.306bf130.js"),["js/build/messenger.306bf130.js","js/build/DialogWrapper.54a1354f.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/index.8984a77c.js","js/build/UserSelect.1938cd94.js","js/build/ImgUpload.8863e78d.js","js/build/details.97854344.js","js/build/tip.6872e3c6.js"])},{name:"manage-approve",path:"approve",component:()=>_n(()=>import("./index.e3202dd6.js"),["js/build/index.e3202dd6.js","js/build/index.bc7e59ad.css","js/build/details.97854344.js","js/build/ImgUpload.8863e78d.js","js/build/index.8984a77c.js","js/build/ApproveExport.7b859f1c.js","js/build/ApproveExport.d0d486d1.css"])},{name:"manage-approve-details",path:"approve/details",component:()=>_n(()=>import("./details.97854344.js"),["js/build/details.97854344.js","js/build/ImgUpload.8863e78d.js"])},{name:"manage-apps",path:"apps/*",component:()=>_n(()=>import("./apps.5dbb9dd1.js"),["js/build/apps.5dbb9dd1.js","js/build/MicroApps.10c19f02.js","js/build/DialogWrapper.54a1354f.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/index.8984a77c.js","js/build/UserSelect.1938cd94.js","js/build/ImgUpload.8863e78d.js","js/build/details.97854344.js","js/build/tip.6872e3c6.js"])},{name:"manage-setting",path:"setting",component:()=>_n(()=>import("./index.197a221d.js"),["js/build/index.197a221d.js","js/build/index.274f71f0.css"]),children:[{name:"manage-setting-personal",path:"personal",component:()=>_n(()=>import("./personal.f12e3d14.js"),["js/build/personal.f12e3d14.js","js/build/ImgUpload.8863e78d.js"])},{name:"manage-setting-checkin",path:"checkin",component:()=>_n(()=>import("./checkin.9caf7776.js"),["js/build/checkin.9caf7776.js","js/build/checkin.01811e2e.css"])},{name:"manage-setting-language",path:"language",component:()=>_n(()=>import("./language.0e662f9b.js"),[])},{name:"manage-setting-theme",path:"theme",component:()=>_n(()=>import("./theme.e86b5680.js"),[])},{name:"manage-setting-keyboard",path:"keyboard",component:()=>_n(()=>import("./keyboard.b40eff10.js"),["js/build/keyboard.b40eff10.js","js/build/keyboard.6dd986b9.css"])},{name:"manage-setting-license",path:"license",component:()=>_n(()=>import("./license.93e62e1f.js"),["js/build/license.93e62e1f.js","js/build/license.2d98adda.css"])},{name:"manage-setting-password",path:"password",component:()=>_n(()=>import("./password.cfd6c864.js"),[])},{name:"manage-setting-email",path:"email",component:()=>_n(()=>import("./email.a38b55d3.js"),[])},{name:"manage-setting-system",path:"system",component:()=>_n(()=>import("./system.0a762fda.js"),[])},{name:"manage-setting-delete",path:"delete",component:()=>_n(()=>import("./delete.399f0038.js"),[])}]},{name:"manage-project-invite",path:"project/invite",component:()=>_n(()=>import("./projectInvite.7958ccd4.js"),["js/build/projectInvite.7958ccd4.js","js/build/projectInvite.d01e3a2d.css"])},{name:"manage-project",path:"project/:projectId",component:()=>_n(()=>import("./project.38fc5178.js"),["js/build/project.38fc5178.js","js/build/ProjectLog.55720685.js","js/build/TaskMenu.0454bb90.js","js/build/index.8984a77c.js","js/build/UserSelect.1938cd94.js","js/build/tip.6872e3c6.js","js/build/DialogWrapper.54a1354f.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/ImgUpload.8863e78d.js","js/build/details.97854344.js"])},{name:"manage-file",path:"file/:folderId?/:fileId?",component:()=>_n(()=>import("./file.3dcec3eb.js"),["js/build/file.3dcec3eb.js","js/build/index.8984a77c.js","js/build/longpress.43ca7fd9.js","js/build/UserSelect.1938cd94.js","js/build/tip.6872e3c6.js"])},{name:"manage-application",path:"application",component:()=>_n(()=>import("./application.1fcd9820.js"),["js/build/application.1fcd9820.js","js/build/index.8984a77c.js","js/build/UserSelect.1938cd94.js","js/build/CheckinExport.566afd3f.js","js/build/ApproveExport.d0d486d1.css","js/build/tip.6872e3c6.js","js/build/ReportEdit.cc7cc71b.js","js/build/ReportDetail.d9bb9dfa.js","js/build/checkin.9caf7776.js","js/build/checkin.01811e2e.css"])}]},{name:"single-file-msg",path:"/single/file/msg/:msgId",component:()=>_n(()=>import("./fileMsg.f47e5c3e.js"),["js/build/fileMsg.f47e5c3e.js","js/build/fileMsg.1a0b76dd.css","js/build/IFrame.1fc38451.js"])},{name:"single-file-task",path:"/single/file/task/:fileId",component:()=>_n(()=>import("./fileTask.472d19ff.js"),["js/build/fileTask.472d19ff.js","js/build/fileTask.93338ba0.css","js/build/IFrame.1fc38451.js"])},{name:"single-file",path:"/single/file/:codeOrFileId",component:()=>_n(()=>import("./file.7a934af0.js"),["js/build/file.7a934af0.js","js/build/file.1cbb23e7.css","js/build/FileContent.49414140.js","js/build/FileContent.c015b499.css","js/build/IFrame.1fc38451.js","js/build/FilePreview.55c206d9.js"])},{name:"single-task",path:"/single/task/:taskId",component:()=>_n(()=>import("./task.bf95724d.js"),["js/build/task.bf95724d.js","js/build/task.0d7ca2d3.css","js/build/TaskDetail.3379e7b2.js","js/build/TaskDetail.6f25b368.css","js/build/ProjectLog.55720685.js","js/build/DialogWrapper.54a1354f.js","js/build/DialogWrapper.c6b17693.css","js/build/longpress.43ca7fd9.js","js/build/index.8984a77c.js","js/build/UserSelect.1938cd94.js","js/build/ImgUpload.8863e78d.js","js/build/details.97854344.js","js/build/tip.6872e3c6.js","js/build/TaskMenu.0454bb90.js","js/build/TEditor.8daabc3e.js"])},{name:"valid-email",path:"/single/valid/email",component:()=>_n(()=>import("./validEmail.72ecc0d2.js"),["js/build/validEmail.72ecc0d2.js","js/build/validEmail.6e361ca9.css"])},{name:"report-edit",path:"/single/report/edit/:reportEditId",component:()=>_n(()=>import("./reportEdit.e5acde07.js"),["js/build/reportEdit.e5acde07.js","js/build/reportEdit.5c397123.css","js/build/ReportEdit.cc7cc71b.js","js/build/UserSelect.1938cd94.js"])},{name:"report-detail",path:"/single/report/detail/:reportDetailId",component:()=>_n(()=>import("./reportDetail.39c2af9e.js"),["js/build/reportDetail.39c2af9e.js","js/build/reportDetail.c12bef4b.css","js/build/ReportDetail.d9bb9dfa.js"])},{name:"token",path:"/token",component:()=>_n(()=>import("./token.71c3e093.js"),["js/build/token.71c3e093.js","js/build/token.7afc4e00.css"])},{name:"login",path:"/login",component:()=>_n(()=>import("./login.d3d06d73.js"),[])},{name:"404",path:"*",component:()=>_n(()=>import("./404.f3a5a7cb.js"),["js/build/404.f3a5a7cb.js","js/build/404.d686a01f.css"])}];/*! * vue-router v3.6.5 * (c) 2022 Evan You * @license MIT @@ -240,7 +240,7 @@ Please report this to https://github.com/markedjs/marked.`,(t||tr.defaults).sile `,he+="@keyframes "+oe+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",U(he)}}function C(K){K.className+=" "+_+"_animation_active"}function x(K,N,z){if(K.addEventListener)K.addEventListener(N,z);else if(K.attachEvent)K.attachEvent("on"+N,z);else return h.error("[scroll] Don't know how to add event listeners.")}function D(K,N,z){if(K.removeEventListener)K.removeEventListener(N,z);else if(K.detachEvent)K.detachEvent("on"+N,z);else return h.error("[scroll] Don't know how to remove event listeners.")}function P(K){return p(K).container.childNodes[0].childNodes[0].childNodes[0]}function w(K){return p(K).container.childNodes[0].childNodes[0].childNodes[1]}function M(K,N){var z=p(K).listeners;if(!z.push)throw new Error("Cannot add listener to an element that is not detectable.");p(K).listeners.push(N)}function T(K,N,z){z||(z=N,N=K,K=null),K=K||{};function U(){if(K.debug){var te=Array.prototype.slice.call(arguments);if(te.unshift(d.get(N),"Scroll: "),h.log.apply)h.log.apply(null,te);else for(var Ae=0;Ae0?[s._l(s.markList,function(v,m){return d("div",{key:m,class:[s.prefixCls+"-stop"],style:{left:v.position+"%"},on:{click:function(y){return y.target!==y.currentTarget?null:s.sliderClick.apply(null,arguments)}}})}),s._v(" "),d("div",{staticClass:"ivu-slider-marks"},s._l(s.markList,function(v,m){return d("SliderMarker",{key:m,style:{left:v.position+"%"},attrs:{mark:v.mark},nativeOn:{click:function(y){return s.sliderClick.apply(null,arguments)}}})}),1)]:s._e(),s._v(" "),d("div",{class:[s.prefixCls+"-button-wrap"],style:{left:s.minPosition+"%"},on:{touchstart:function(m){return s.onPointerDown(m,"min")},mousedown:function(m){return s.onPointerDown(m,"min")}}},[d("Tooltip",{ref:"minTooltip",attrs:{controlled:s.pointerDown==="min",placement:"top",content:s.tipFormat(s.exportValue[0]),disabled:s.tipDisabled,always:s.showTip==="always"}},[d("div",{class:s.minButtonClasses,attrs:{tabindex:"0"},on:{focus:function(m){return s.handleFocus("min")},blur:function(m){return s.handleBlur("min")},keydown:[function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"left",37,v.key,["Left","ArrowLeft"])||"button"in v&&v.button!==0?null:s.onKeyLeft(v,"min")},function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"down",40,v.key,["Down","ArrowDown"])?null:s.onKeyLeft(v,"min")},function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"right",39,v.key,["Right","ArrowRight"])||"button"in v&&v.button!==2?null:s.onKeyRight(v,"min")},function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"up",38,v.key,["Up","ArrowUp"])?null:s.onKeyRight(v,"min")}]}})])],1),s._v(" "),s.range?d("div",{class:[s.prefixCls+"-button-wrap"],style:{left:s.maxPosition+"%"},on:{touchstart:function(m){return s.onPointerDown(m,"max")},mousedown:function(m){return s.onPointerDown(m,"max")}}},[d("Tooltip",{ref:"maxTooltip",attrs:{controlled:s.pointerDown==="max",placement:"top",content:s.tipFormat(s.exportValue[1]),disabled:s.tipDisabled,always:s.showTip==="always"}},[d("div",{class:s.maxButtonClasses,attrs:{tabindex:"0"},on:{focus:function(m){return s.handleFocus("max")},blur:function(m){return s.handleBlur("max")},keydown:[function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"left",37,v.key,["Left","ArrowLeft"])||"button"in v&&v.button!==0?null:s.onKeyLeft(v,"max")},function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"down",40,v.key,["Down","ArrowDown"])?null:s.onKeyLeft(v,"max")},function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"right",39,v.key,["Right","ArrowRight"])||"button"in v&&v.button!==2?null:s.onKeyRight(v,"max")},function(v){return!v.type.indexOf("key")&&s._k(v.keyCode,"up",38,v.key,["Up","ArrowUp"])?null:s.onKeyRight(v,"max")}]}})])],1):s._e()],2)],1)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(1),c=p(l),h=a(543),s=p(h);function p(_){return _&&_.__esModule?_:{default:_}}var d=void 0;function v(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return d=d||s.default.newInstance({render:_}),d}function m(_){var y="render"in _?_.render:void 0,b=v(y);b.show(_)}s.default.show=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m(_)},s.default.hide=function(){var _=this;if(!d)return!1;var y=v();y.remove(function(){(0,c.default)(this,_),d=null}.bind(this))},i.default=s.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(14),c=y(l),h=a(1),s=y(h),p=a(17),d=y(p),v=a(91),m=y(v),_=a(33);function y(k){return k&&k.__esModule?k:{default:k}}function b(){return(0,_.transferIncrease)(),(0,_.getTransferIndex)()}var E=b();m.default.newInstance=function(k){(0,s.default)(void 0,void 0);var C=k||{},x=new d.default({data:(0,c.default)({},C,{}),render:function(M){var T="";return this.render?T=M(m.default,{props:{fix:!0,fullscreen:!0}},[this.render(M)]):T=M(m.default,{props:{size:"large",fix:!0,fullscreen:!0}}),M("div",{class:"ivu-spin-fullscreen ivu-spin-fullscreen-wrapper",style:{"z-index":(0,_.hasTransferIndex)(E,2010+E)}},[T])}}),D=x.$mount();document.body.appendChild(D.$el);var P=x.$children[0];return{show:function(){P.visible=!0,E=b()},remove:function(M){P.visible=!1,setTimeout(function(){P.$parent.$destroy(),document.getElementsByClassName("ivu-spin-fullscreen")[0]!==void 0&&document.body.removeChild(document.getElementsByClassName("ivu-spin-fullscreen")[0]),M()},500)},component:P}}.bind(void 0),i.default=m.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(545),c=p(l),h=a(547),s=p(h);function p(d){return d&&d.__esModule?d:{default:d}}c.default.Step=s.default,i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(232),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(546);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.classes},[s._t("default")],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(233),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(548);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.wrapClasses},[d("div",{class:[s.prefixCls+"-tail"]},[d("i")]),s._v(" "),d("div",{class:[s.prefixCls+"-head"]},[d("div",{class:[s.prefixCls+"-head-inner"]},[!s.icon&&!s.$slots.icon&&s.currentStatus!=="finish"&&s.currentStatus!=="error"?d("span",[s._v(s._s(s.stepNumber))]):s.$slots.icon?d("span",{staticClass:"ivu-steps-icon"},[s._t("icon")],2):d("span",{class:s.iconClasses})])]),s._v(" "),d("div",{class:[s.prefixCls+"-main"]},[d("div",{class:[s.prefixCls+"-title"]},[s._t("title",function(){return[s._v(s._s(s.title))]})],2),s._v(" "),s.content||s.$slots.content?d("div",{class:[s.prefixCls+"-content"]},[s._t("content",function(){return[s._v(s._s(s.content))]})],2):s._e()])])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(550),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(234),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(551);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("span",{class:s.wrapClasses,style:s.wrapStyles,attrs:{tabindex:"0"},on:{click:s.toggle,keydown:function(m){return!m.type.indexOf("key")&&s._k(m.keyCode,"space",32,m.key,[" ","Spacebar"])?null:s.toggle.apply(null,arguments)}}},[d("input",{attrs:{type:"hidden",name:s.name},domProps:{value:s.currentValue}}),s._v(" "),d("span",{class:s.innerClasses},[s.currentValue===s.trueValue?s._t("open"):s._e(),s._v(" "),s.currentValue===s.falseValue?s._t("close"):s._e()],2)])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(553),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(235),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(583);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){r.exports={default:a(555),__esModule:!0}},function(r,i,a){a(79),a(36),a(46),a(556),a(562),a(565),a(567),r.exports=a(5).Set},function(r,i,a){var l=a(557),c=a(236),h="Set";r.exports=a(558)(h,function(s){return function(){return s(this,arguments.length>0?arguments[0]:void 0)}},{add:function(p){return l.def(c(this,h),p=p===0?0:p,p)}},l)},function(r,i,a){var l=a(16).f,c=a(55),h=a(90),s=a(25),p=a(88),d=a(51),v=a(72),m=a(102),_=a(190),y=a(13),b=a(77).fastKey,E=a(236),k=y?"_s":"size",C=function(x,D){var P=b(D),w;if(P!=="F")return x._i[P];for(w=x._f;w;w=w.n)if(w.k==D)return w};r.exports={getConstructor:function(x,D,P,w){var M=x(function(T,R){p(T,M,D,"_i"),T._t=D,T._i=c(null),T._f=void 0,T._l=void 0,T[k]=0,R!=null&&d(R,P,T[w],T)});return h(M.prototype,{clear:function(){for(var R=E(this,D),K=R._i,N=R._f;N;N=N.n)N.r=!0,N.p&&(N.p=N.p.n=void 0),delete K[N.i];R._f=R._l=void 0,R[k]=0},delete:function(T){var R=E(this,D),K=C(R,T);if(K){var N=K.n,z=K.p;delete R._i[K.i],K.r=!0,z&&(z.n=N),N&&(N.p=z),R._f==K&&(R._f=N),R._l==K&&(R._l=z),R[k]--}return!!K},forEach:function(R){E(this,D);for(var K=s(R,arguments.length>1?arguments[1]:void 0,3),N;N=N?N.n:this._f;)for(K(N.v,N.k,this);N&&N.r;)N=N.p},has:function(R){return!!C(E(this,D),R)}}),y&&l(M.prototype,"size",{get:function(){return E(this,D)[k]}}),M},def:function(x,D,P){var w=C(x,D),M,T;return w?w.v=P:(x._l=w={i:T=b(D,!0),k:D,v:P,p:M=x._l,n:void 0,r:!1},x._f||(x._f=w),M&&(M.n=w),x[k]++,T!=="F"&&(x._i[T]=w)),x},getEntry:C,setStrong:function(x,D,P){v(x,D,function(w,M){this._t=E(w,D),this._k=M,this._l=void 0},function(){for(var w=this,M=w._k,T=w._l;T&&T.r;)T=T.p;return!w._t||!(w._l=T=T?T.n:w._t._f)?(w._t=void 0,m(1)):M=="keys"?m(0,T.k):M=="values"?m(0,T.v):m(0,[T.k,T.v])},P?"entries":"values",!P,!0),_(D)}}},function(r,i,a){var l=a(9),c=a(7),h=a(77),s=a(31),p=a(26),d=a(90),v=a(51),m=a(88),_=a(19),y=a(47),b=a(16).f,E=a(559)(0),k=a(13);r.exports=function(C,x,D,P,w,M){var T=l[C],R=T,K=w?"set":"add",N=R&&R.prototype,z={};return!k||typeof R!="function"||!(M||N.forEach&&!s(function(){new R().entries().next()}))?(R=P.getConstructor(x,C,w,K),d(R.prototype,D),h.NEED=!0):(R=x(function(U,oe){m(U,R,C,"_c"),U._c=new T,oe!=null&&v(oe,w,U[K],U)}),E("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(U){var oe=U=="add"||U=="set";U in N&&!(M&&U=="clear")&&p(R.prototype,U,function(Pe,he){if(m(this,R,U),!oe&&M&&!_(Pe))return U=="get"?void 0:!1;var ye=this._c[U](Pe===0?0:Pe,he);return oe?this:ye})}),M||b(R.prototype,"size",{get:function(){return this._c.size}})),y(R,C),z[C]=R,c(c.G+c.W+c.F,z),M||P.setStrong(R,C,w),R}},function(r,i,a){var l=a(25),c=a(64),h=a(29),s=a(52),p=a(560);r.exports=function(d,v){var m=d==1,_=d==2,y=d==3,b=d==4,E=d==6,k=d==5||E,C=v||p;return function(x,D,P){for(var w=h(x),M=c(w),T=l(D,P,3),R=s(M.length),K=0,N=m?C(x,R):_?C(x,0):void 0,z,U;R>K;K++)if((k||K in M)&&(z=M[K],U=T(z,K,w),d)){if(m)N[K]=U;else if(U)switch(d){case 3:return!0;case 5:return z;case 6:return K;case 2:N.push(z)}else if(b)return!1}return E?-1:y||b?b:N}}},function(r,i,a){var l=a(561);r.exports=function(c,h){return new(l(c))(h)}},function(r,i,a){var l=a(19),c=a(111),h=a(10)("species");r.exports=function(s){var p;return c(s)&&(p=s.constructor,typeof p=="function"&&(p===Array||c(p.prototype))&&(p=void 0),l(p)&&(p=p[h],p===null&&(p=void 0))),p===void 0?Array:p}},function(r,i,a){var l=a(7);l(l.P+l.R,"Set",{toJSON:a(563)("Set")})},function(r,i,a){var l=a(56),c=a(564);r.exports=function(h){return function(){if(l(this)!=h)throw TypeError(h+"#toJSON isn't generic");return c(this)}}},function(r,i,a){var l=a(51);r.exports=function(c,h){var s=[];return l(c,!1,s.push,s,h),s}},function(r,i,a){a(566)("Set")},function(r,i,a){var l=a(7);r.exports=function(c){l(l.S,c,{of:function(){for(var s=arguments.length,p=new Array(s);s--;)p[s]=arguments[s];return new this(p)}})}},function(r,i,a){a(568)("Set")},function(r,i,a){var l=a(7),c=a(43),h=a(25),s=a(51);r.exports=function(p){l(l.S,p,{from:function(v){var m=arguments[1],_,y,b,E;return c(this),_=m!==void 0,_&&c(m),v==null?new this:(y=[],_?(b=0,E=h(m,arguments[2],2),s(v,!1,function(k){y.push(E(k,b++))})):s(v,!1,y.push,y),new this(y))}})}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(237),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(571);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(1),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default={name:"TableRenderHeader",functional:!0,props:{render:Function,column:Object,index:Number},render:function(p,d){(0,c.default)(void 0,void 0);var v={column:d.props.column,index:d.props.index};return d.props.render(p,v)}.bind(void 0)}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("table",{style:s.styles,attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[d("colgroup",[s._l(s.columns,function(v,m){return d("col",{attrs:{width:s.setCellWidth(v)}})}),s._v(" "),s.$parent.showVerticalScrollBar?d("col",{attrs:{width:s.$parent.scrollBarWidth}}):s._e()],2),s._v(" "),d("thead",s._l(s.headRows,function(v,m){return d("tr",[s._l(v,function(_,y){var b;return d("th",{class:s.alignCls(_),attrs:{colspan:_.colSpan,rowspan:_.rowSpan}},[d("div",{class:s.cellClasses(_)},[_.type==="expand"?[_.renderHeader?d("render-header",{attrs:{render:_.renderHeader,column:_,index:y}}):d("span",[s._v(s._s(_.title||""))])]:_.type==="selection"?[_.hideSelectAll?s._e():d("Checkbox",{attrs:{value:s.isSelectAll,disabled:s.isSelectDisabled},on:{"on-change":s.selectAll}})]:[_.renderHeader?d("render-header",{attrs:{render:_.renderHeader,column:_,index:y}}):d("span",{class:(b={},b[s.prefixCls+"-cell-sort"]=_.sortable,b),on:{click:function(k){_.sortable&&s.handleSortByHead(s.getColumn(m,y)._index)}}},[s._v(s._s(_.title||"#"))]),s._v(" "),_.sortable?d("span",{class:[s.prefixCls+"-sort"]},[d("i",{staticClass:"ivu-icon ivu-icon-md-arrow-dropup",class:{on:s.getColumn(m,y)._sortType==="asc"},on:{click:function(k){s.handleSort(s.getColumn(m,y)._index,"asc")}}}),s._v(" "),d("i",{staticClass:"ivu-icon ivu-icon-md-arrow-dropdown",class:{on:s.getColumn(m,y)._sortType==="desc"},on:{click:function(k){s.handleSort(s.getColumn(m,y)._index,"desc")}}})]):s._e(),s._v(" "),s.isPopperShow(_)?d("Poptip",{attrs:{placement:"bottom","popper-class":"ivu-table-popper",transfer:"",capture:!1},on:{"on-popper-hide":function(k){s.handleFilterHide(s.getColumn(m,y)._index)}},model:{value:s.getColumn(m,y)._filterVisible,callback:function(k){s.$set(s.getColumn(m,y),"_filterVisible",k)},expression:"getColumn(rowIndex, index)._filterVisible"}},[d("span",{class:[s.prefixCls+"-filter"]},[d("i",{staticClass:"ivu-icon ivu-icon-ios-funnel",class:{on:s.getColumn(m,y)._isFiltered}})]),s._v(" "),s.getColumn(m,y)._filterMultiple?d("div",{class:[s.prefixCls+"-filter-list"],attrs:{slot:"content"},slot:"content"},[d("div",{class:[s.prefixCls+"-filter-list-item"]},[d("checkbox-group",{model:{value:s.getColumn(m,y)._filterChecked,callback:function(k){s.$set(s.getColumn(m,y),"_filterChecked",k)},expression:"getColumn(rowIndex, index)._filterChecked"}},s._l(_.filters,function(E,k){return d("checkbox",{key:k,attrs:{label:E.value}},[s._v(s._s(E.label))])}),1)],1),s._v(" "),d("div",{class:[s.prefixCls+"-filter-footer"]},[d("i-button",{attrs:{type:"text",size:"small",disabled:!s.getColumn(m,y)._filterChecked.length},nativeOn:{click:function(k){s.handleFilter(s.getColumn(m,y)._index)}}},[s._v(s._s(s.t("i.table.confirmFilter")))]),s._v(" "),d("i-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(k){s.handleReset(s.getColumn(m,y)._index)}}},[s._v(s._s(s.t("i.table.resetFilter")))])],1)]):d("div",{class:[s.prefixCls+"-filter-list"],attrs:{slot:"content"},slot:"content"},[d("ul",{class:[s.prefixCls+"-filter-list-single"]},[d("li",{class:s.itemAllClasses(s.getColumn(m,y)),on:{click:function(k){s.handleReset(s.getColumn(m,y)._index)}}},[s._v(s._s(s.t("i.table.clearFilter")))]),s._v(" "),s._l(_.filters,function(E){return d("li",{class:s.itemClasses(s.getColumn(m,y),E),on:{click:function(C){s.handleSelect(s.getColumn(m,y)._index,E.value)}}},[s._v(s._s(E.label))])})],2)])]):s._e()]],2),s._v(" "),_.resizable?d("div",{staticClass:"ivu-table-header-resizable",on:{mousedown:function(k){return s.handleMouseDown(_,k)},mousemove:function(k){return s.handleMouseMove(_,k)},mouseout:s.handleMouseOut}}):s._e()])}),s._v(" "),s.$parent.showVerticalScrollBar&&m===0?d("th",{class:s.scrollBarCellClass(),attrs:{rowspan:s.headRows.length}}):s._e()],2)}),0)])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(238),c=a.n(l);for(var h in l)h!=="default"&&function(E){a.d(i,E,function(){return l[E]})}(h);var s=a(0),p,d,v=!1,m=null,_=null,y=null,b=Object(s.a)(c.a,p,d,v,m,_,y);i.default=b.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(239),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(574);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return s.draggable?d("tr",{class:s.rowClasses(s.row._index),attrs:{draggable:s.draggable},on:{dragstart:function(m){return s.onDrag(m,s.row._index)},drop:function(m){return s.onDrop(m,s.row._index)},dragover:function(m){return s.allowDrop(m)}}},[s._t("default")],2):d("tr",{class:s.rowClasses(s.row._index),attrs:{draggable:!1}},[s._t("default")],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(240),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(577);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(1),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default={name:"TableSlot",functional:!0,inject:["tableRoot"],props:{row:Object,index:Number,column:{type:Object,default:null},display:{type:String,default:"block"}},render:function(p,d){return(0,c.default)(void 0,void 0),p("div",{class:{"ivu-table-cell-slot":!0,"ivu-table-cell-slot-inline":d.props.display==="inline","ivu-table-cell-slot-inline-block":d.props.display==="inline-block"}},d.injections.tableRoot.$scopedSlots[d.props.column.slot]({row:d.props.row,column:d.props.column,index:d.props.index}))}.bind(void 0)}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{ref:"cell",class:s.classes},[s.renderType==="index"?[d("span",[s._v(s._s(s.column.indexMethod?s.column.indexMethod(s.row,s.naturalIndex):s.naturalIndex+1))])]:s._e(),s._v(" "),s.renderType==="selection"?[d("Checkbox",{attrs:{value:s.checked,disabled:s.disabled},on:{"on-change":s.toggleSelect},nativeOn:{click:function(m){return m.stopPropagation(),s.handleClick.apply(null,arguments)}}})]:s._e(),s._v(" "),s.showLevel?d("div",{staticClass:"ivu-table-cell-tree-level",style:s.treeLevelStyle}):s._e(),s._v(" "),s.showChildren?d("div",{staticClass:"ivu-table-cell-tree",class:{"ivu-table-cell-tree-loading":s.childrenLoading},on:{click:function(m){return m.preventDefault(),m.stopPropagation(),s.handleToggleTree.apply(null,arguments)}}},[s.childrenLoading?d("Icon",{staticClass:"ivu-load-loop",attrs:{type:"ios-loading"}}):s.childrenExpand?d("Icon",{attrs:{type:"ios-remove"}}):d("Icon",{attrs:{type:"ios-add"}})],1):s.showTreeNode?d("div",{staticClass:"ivu-table-cell-tree ivu-table-cell-tree-empty"}):s._e(),s._v(" "),s.renderType==="html"?[d("span",{domProps:{innerHTML:s._s(s.row[s.column.key])}})]:s._e(),s._v(" "),s.renderType==="normal"?[s.column.tooltip?[d("Tooltip",{staticClass:"ivu-table-cell-tooltip",attrs:{transfer:"",content:s.row[s.column.key],theme:s.column.tooltipTheme?s.column.tooltipTheme:s.tableRoot.tooltipTheme,disabled:!s.showTooltip,"max-width":s.column.tooltipMaxWidth?s.column.tooltipMaxWidth:s.tableRoot.tooltipMaxWidth}},[d("span",{ref:"content",staticClass:"ivu-table-cell-tooltip-content",on:{mouseenter:s.handleTooltipIn}},[s._v(s._s(s.row[s.column.key]))])])]:d("span",[s._v(s._s(s.row[s.column.key]))])]:s._e(),s._v(" "),s.renderType==="expand"&&!s.row._disableExpand?[d("div",{class:s.expandCls,on:{click:s.toggleExpand}},[d("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]:s._e(),s._v(" "),s.renderType==="render"?d("table-expand",{attrs:{row:s.row,column:s.column,index:s.index,render:s.column.render}}):s._e(),s._v(" "),s.renderType==="slot"?d("table-slot",{attrs:{row:s.row,column:s.column,display:s.column.display||"block",index:s.index}}):s._e()],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(242),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(579);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{staticStyle:{overflow:"hidden"}},[d("table",{staticClass:"ivu-table-summary",style:s.styleObject,attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[d("colgroup",s._l(s.columns,function(v,m){return d("col",{attrs:{width:s.setCellWidth(v)}})}),0),s._v(" "),d("tbody",{class:[s.prefixCls+"-tbody"]},[d("tr",{staticClass:"ivu-table-row"},s._l(s.columns,function(v,m){return d("td",{class:s.alignCls(v)},[d("div",{staticClass:"ivu-table-cell",class:s.cellCls(v)},[d("span",[s._v(s._s(s.data[v.key].value))])])])}),0)])])])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(22),c=v(l),h=a(14),s=v(h),p=a(1),d=v(p);i.default=b;function v(E){return E&&E.__esModule?E:{default:E}}var m=`\r `,_=function(E,k,C){var x=C.separator,D=C.quoted;(0,d.default)(void 0,void 0);var P=k.map(function(w){return(0,d.default)(void 0,void 0),D?(w=typeof w=="string"?w.replace(/"/g,'"'):w,'"'+String(w)+'"'):w}.bind(void 0));E.push(P.join(x))}.bind(void 0),y={separator:",",quoted:!1};function b(E,k,C){var x=this,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;C=(0,s.default)({},y,C);var P=void 0,w=[],M=[];return E?(P=E.map(function(T){return(0,d.default)(this,x),typeof T=="string"?T:(D||M.push(typeof T.title!="undefined"?T.title:T.key),T.key)}.bind(this)),M.length>0&&_(w,M,C)):(P=[],k.forEach(function(T){(0,d.default)(this,x),Array.isArray(T)||(P=P.concat((0,c.default)(T)))}.bind(this)),P.length>0&&(P=P.filter(function(T,R,K){return(0,d.default)(this,x),K.indexOf(T)===R}.bind(this)),D||_(w,P,C))),Array.isArray(k)&&k.forEach(function(T){(0,d.default)(this,x),Array.isArray(T)||(T=P.map(function(R){return(0,d.default)(this,x),typeof T[R]!="undefined"?T[R]:""}.bind(this))),_(w,T,C)}.bind(this)),w.join(m)}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});function l(h){var s=navigator.userAgent;if(h==="ie"){var p=s.indexOf("compatible")>-1&&s.indexOf("MSIE")>-1;if(p){var d=new RegExp("MSIE (\\d+\\.\\d+);");return d.test(s),parseFloat(RegExp.$1)}else return!1}else return s.indexOf(h)>-1}var c={_isIE11:function(){var s=0,p=/MSIE (\d+\.\d+);/.test(navigator.userAgent),d=!!navigator.userAgent.match(/Trident\/7.0/),v=navigator.userAgent.indexOf("rv:11.0");return p&&(s=Number(RegExp.$1)),navigator.appVersion.indexOf("MSIE 10")!==-1&&(s=10),d&&v!==-1&&(s=11),s===11},_isEdge:function(){return/Edge/.test(navigator.userAgent)},_getDownloadUrl:function(s){var p="\uFEFF";if(window.Blob&&window.URL&&window.URL.createObjectURL){var d=new Blob([p+s],{type:"text/csv"});return URL.createObjectURL(d)}else return"data:attachment/csv;charset=utf-8,"+p+encodeURIComponent(s)},download:function(s,p){if(l("ie")&&l("ie")<10){var d=window.top.open("about:blank","_blank");d.document.charset="utf-8",d.document.write(p),d.document.close(),d.document.execCommand("SaveAs",s),d.close()}else if(l("ie")===10||this._isIE11()||this._isEdge()){var v="\uFEFF",m=new Blob([v+p],{type:"text/csv"});navigator.msSaveBlob(m,s)}else{var _=document.createElement("a");_.download=s,_.href=this._getDownloadUrl(p),document.body.appendChild(_),_.click(),document.body.removeChild(_)}}};i.default=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.getRandomStr=i.convertToRows=i.getAllColumns=i.convertColumnOrder=void 0;var l=a(1),c=s(l),h=a(3);function s(_){return _&&_.__esModule?_:{default:_}}var p=function(_,y){(0,c.default)(void 0,void 0);var b=[],E=[];return _.forEach(function(k){(0,c.default)(void 0,void 0),k.fixed&&k.fixed===y?b.push(k):E.push(k)}.bind(void 0)),b.concat(E)}.bind(void 0);i.convertColumnOrder=p;var d=function(_){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;(0,c.default)(void 0,void 0);var b=(0,h.deepCopy)(_),E=[];return b.forEach(function(k){(0,c.default)(void 0,void 0),k.children?(y&&E.push(k),E.push.apply(E,d(k.children,y))):E.push(k)}.bind(void 0)),E}.bind(void 0);i.getAllColumns=d;var v=function(_){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;(0,c.default)(void 0,void 0);var b=y?y==="left"?(0,h.deepCopy)(p(_,"left")):(0,h.deepCopy)(p(_,"right")):(0,h.deepCopy)(_),E=1,k=function(P,w){if((0,c.default)(void 0,void 0),w&&(P.level=w.level+1,E0&&arguments[0]!==void 0?arguments[0]:32,b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",E=b.length,k="",C=0;C=6e4&&E<36e5?k=Math.floor(E/6e4)+(_("i.time.minutes")||"\u5206\u949F")+C:E>=36e5&&E<864e5?k=Math.floor(E/36e5)+(_("i.time.hours")||"\u5C0F\u65F6")+C:E>=864e5&&E<262386e4?k=Math.floor(E/864e5)+(_("i.time.days")||"\u5929")+C:E>=262386e4&&E<=3156786e4&&b?k=d(m):k=d(m,"year"),k}.bind(void 0)},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("span",{class:s.classes,on:{click:s.handleClick}},[s._v(s._s(s.date))])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(597),c=p(l),h=a(599),s=p(h);function p(d){return d&&d.__esModule?d:{default:d}}c.default.Item=s.default,i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(247),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(598);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("ul",{class:s.classes},[s._t("default")],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(248),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(600);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("li",{class:s.itemClasses},[d("div",{class:s.tailClasses}),s._v(" "),d("div",{ref:"dot",class:s.headClasses,style:s.customColor},[s._t("dot")],2),s._v(" "),d("div",{class:s.contentClasses},[s._t("default")],2)])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(602),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(1),c=E(l),h=a(157),s=E(h),p=a(166),d=E(p),v=a(175),m=E(v),_=a(58),y=E(_),b=a(3);function E(k){return k&&k.__esModule?k:{default:k}}i.default={mixins:[s.default,y.default],components:{TimePickerPanel:d.default,RangeTimePickerPanel:m.default},props:{type:{validator:function(C){return(0,b.oneOf)(C,["time","timerange"])},default:"time"}},computed:{panel:function(){var C=this.type==="timerange";return C?"RangeTimePickerPanel":"TimePickerPanel"},ownPickerProps:function(){return{disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions}}},watch:{visible:function(C){var x=this;C&&this.$nextTick(function(){(0,c.default)(this,x);var D=(0,b.findComponentsDownward)(this,"TimeSpinner");D.forEach(function(P){return(0,c.default)(this,x),P.updateScroll()}.bind(this))}.bind(this))}}}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(93),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(605),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(249),c=a.n(l);for(var h in l)h!=="default"&&function(E){a.d(i,E,function(){return l[E]})}(h);var s=a(0),p,d,v=!1,m=null,_=null,y=null,b=Object(s.a)(c.a,p,d,v,m,_,y);i.default=b.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(250),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(609);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(251),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(608);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.prefixCls},[d("i-input",{attrs:{size:"small",icon:s.icon,placeholder:s.placeholder},on:{"on-click":s.handleClick},model:{value:s.currentQuery,callback:function(m){s.currentQuery=m},expression:"currentQuery"}})],1)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.classes,style:s.listStyle},[d("div",{class:s.prefixCls+"-header"},[d("Checkbox",{attrs:{value:s.checkedAll,disabled:s.checkedAllDisabled},on:{"on-change":s.toggleSelectAll}}),s._v(" "),d("span",{class:s.prefixCls+"-header-title",on:{click:function(m){return s.toggleSelectAll(!s.checkedAll)}}},[s._v(s._s(s.title))]),s._v(" "),d("span",{class:s.prefixCls+"-header-count"},[s._v(s._s(s.count))])],1),s._v(" "),d("div",{class:s.bodyClasses},[s.filterable?d("div",{class:s.prefixCls+"-body-search-wrapper"},[d("Search",{attrs:{"prefix-cls":s.prefixCls+"-search",query:s.query,placeholder:s.filterPlaceholder},on:{"on-query-clear":s.handleQueryClear,"on-query-change":s.handleQueryChange}})],1):s._e(),s._v(" "),d("ul",{class:s.prefixCls+"-content"},[s._l(s.filterData,function(v){return d("li",{class:s.itemClasses(v),on:{click:function(_){return _.preventDefault(),s.select(v)}}},[d("Checkbox",{attrs:{value:s.isCheck(v),disabled:v.disabled}}),s._v(" "),d("span",{domProps:{innerHTML:s._s(s.showLabel(v))}})],1)}),s._v(" "),d("li",{class:s.prefixCls+"-content-not-found"},[s._v(s._s(s.notFoundText))])],2)]),s._v(" "),s.showFooter?d("div",{class:s.prefixCls+"-footer"},[s._t("default")],2):s._e()])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(252),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(611);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.prefixCls+"-operation"},[s.reverseOperation?[d("i-button",{attrs:{type:"primary",size:"small",disabled:!s.leftActive},nativeOn:{click:function(m){return s.moveToRight.apply(null,arguments)}}},[d("span",[s._v(s._s(s.operations[1]))]),s._v(" "),d("Icon",{attrs:{type:"ios-arrow-forward"}})],1),s._v(" "),d("i-button",{attrs:{type:"primary",size:"small",disabled:!s.rightActive},nativeOn:{click:function(m){return s.moveToLeft.apply(null,arguments)}}},[d("Icon",{attrs:{type:"ios-arrow-back"}}),s._v(" "),d("span",[s._v(s._s(s.operations[0]))])],1)]:[d("i-button",{attrs:{type:"primary",size:"small",disabled:!s.rightActive},nativeOn:{click:function(m){return s.moveToLeft.apply(null,arguments)}}},[d("Icon",{attrs:{type:"ios-arrow-back"}}),s._v(" "),d("span",[s._v(s._s(s.operations[0]))])],1),s._v(" "),d("i-button",{attrs:{type:"primary",size:"small",disabled:!s.leftActive},nativeOn:{click:function(m){return s.moveToRight.apply(null,arguments)}}},[d("span",[s._v(s._s(s.operations[1]))]),s._v(" "),d("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(613),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(253),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(617);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(254),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(616);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(1),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default={name:"RenderCell",functional:!0,props:{render:Function,data:Object,node:Array},render:function(p,d){(0,c.default)(void 0,void 0);var v={root:d.props.node[0],node:d.props.node[1],data:d.props.data};return d.props.render(p,v)}.bind(void 0)}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("collapse-transition",{attrs:{appear:s.appear}},[d("ul",{class:s.classes},[d("li",{on:{contextmenu:function(m){return m.stopPropagation(),s.handleContextmenu(s.data,m)},selectstart:function(m){return m.stopPropagation(),s.handlePreventSelect(s.data,m)}}},[d("span",{class:s.arrowClasses,on:{click:s.handleExpand}},[s.showArrow?d("Icon",{attrs:{type:s.arrowType,custom:s.customArrowType,size:s.arrowSize}}):s._e(),s._v(" "),s.showLoading?d("Icon",{staticClass:"ivu-load-loop",attrs:{type:"ios-loading"}}):s._e()],1),s._v(" "),s.showCheckbox?d("Checkbox",{attrs:{value:s.data.checked,indeterminate:s.data.indeterminate,disabled:s.data.disabled||s.data.disableCheckbox},nativeOn:{click:function(m){return m.preventDefault(),s.handleCheck.apply(null,arguments)}}}):s._e(),s._v(" "),d("span",{class:s.titleClasses,on:{click:s.handleClickNode}},[s.data.render?d("Render",{attrs:{render:s.data.render,data:s.data,node:s.node}}):s.isParentRender?d("Render",{attrs:{render:s.parentRender,data:s.data,node:s.node}}):[s._v(s._s(s.data.title))]],2),s._v(" "),s._l(s.children,function(v,m){return s.data.expand?d("Tree-node",{key:m,attrs:{appear:s.appearByClickArrow,data:v,multiple:s.multiple,"show-checkbox":s.showCheckbox,"children-key":s.childrenKey}}):s._e()})],2)])])},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{ref:"treeWrap",class:s.prefixCls},[s._l(s.stateTree,function(v,m){return d("Tree-node",{key:m,attrs:{data:v,visible:"",multiple:s.multiple,"show-checkbox":s.showCheckbox,"children-key":s.childrenKey}})}),s._v(" "),s.stateTree.length?s._e():d("div",{class:[s.prefixCls+"-empty"]},[s._v(s._s(s.localeEmptyText))]),s._v(" "),d("div",{staticClass:"ivu-tree-context-menu",style:s.contextMenuStyles},[d("Dropdown",{attrs:{trigger:"custom",visible:s.contextMenuVisible,transfer:""},on:{"on-clickoutside":s.handleClickContextMenuOutside}},[d("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[s._t("contextMenu")],2)],1)],1)],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(619),c=h(l);function h(s){return s&&s.__esModule?s:{default:s}}i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(255),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(623);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(256),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(621);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("ul",{class:[s.prefixCls+"-list"]},s._l(s.files,function(v){return d("li",{class:s.fileCls(v),on:{click:function(_){return s.handleClick(v)}}},[d("span",{on:{click:function(_){return s.handlePreview(v)}}},[d("Icon",{attrs:{type:s.format(v)}}),s._v(" "+s._s(v.name)+` `)],1),s._v(" "),d("Icon",{directives:[{name:"show",rawName:"v-show",value:v.status==="finished",expression:"file.status === 'finished'"}],class:[s.prefixCls+"-list-remove"],attrs:{type:"ios-close"},nativeOn:{click:function(_){return s.handleRemove(v)}}}),s._v(" "),d("transition",{attrs:{name:"fade"}},[v.showProgress?d("i-progress",{attrs:{"stroke-width":2,percent:s.parsePercentage(v.percentage),status:v.status==="finished"&&v.showProgress?"success":"normal"}}):s._e()],1)],1)}),0)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(1),c=p(l),h=a(22),s=p(h);i.default=m;function p(_){return _&&_.__esModule?_:{default:_}}function d(_,y,b){var E="fail to post "+String(_)+" "+String(b.status)+"'",k=new Error(E);return k.status=b.status,k.method="post",k.url=_,k}function v(_){var y=_.responseText||_.response;if(!y)return y;try{return JSON.parse(y)}catch{return y}}function m(_){var y=this;if(typeof XMLHttpRequest!="undefined"){var b=new XMLHttpRequest,E=_.action;b.upload&&(b.upload.onprogress=function(P){P.total>0&&(P.percent=P.loaded/P.total*100),_.onProgress(P)});var k=new FormData;_.data&&(0,s.default)(_.data).map(function(D){(0,c.default)(this,y),k.append(D,_.data[D])}.bind(this)),k.append(_.filename,_.file),b.onerror=function(P){_.onError(P)},b.onload=function(){if(b.status<200||b.status>=300)return _.onError(d(E,_,b),v(b));_.onSuccess(v(b))},b.open("post",E,!0),_.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0);var C=_.headers||{};for(var x in C)C.hasOwnProperty(x)&&C[x]!==null&&b.setRequestHeader(x,C[x]);b.send(k)}}},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:[s.prefixCls]},[d("div",{class:s.classes,on:{click:s.handleClick,drop:function(m){return m.preventDefault(),s.onDrop.apply(null,arguments)},paste:s.handlePaste,dragover:function(m){m.preventDefault(),s.dragOver=!0},dragleave:function(m){m.preventDefault(),s.dragOver=!1}}},[d("input",{ref:"input",class:[s.prefixCls+"-input"],attrs:{type:"file",multiple:s.multiple,webkitdirectory:s.webkitdirectory,accept:s.accept},on:{change:s.handleChange}}),s._v(" "),s._t("default")],2),s._v(" "),s._t("tip"),s._v(" "),s.showUploadList?d("upload-list",{attrs:{files:s.fileList},on:{"on-file-remove":s.handleRemove,"on-file-preview":s.handlePreview}}):s._e()],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.Col=i.Row=void 0;var l=a(625),c=p(l),h=a(627),s=p(h);function p(d){return d&&d.__esModule?d:{default:d}}i.Row=c.default,i.Col=s.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(257),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(626);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.classes,style:s.styles},[s._t("default")],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(258),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(628);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("div",{class:s.classes,style:s.styles},[s._t("default")],2)},c=[];i.render=l,i.staticRenderFns=c},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0}),i.OptionGroup=i.Option=i.Select=void 0;var l=a(74),c=v(l),h=a(81),s=v(h),p=a(630),d=v(p);function v(m){return m&&m.__esModule?m:{default:m}}i.Select=c.default,i.Option=s.default,i.OptionGroup=d.default,i.default=c.default},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=a(259),c=a.n(l);for(var h in l)h!=="default"&&function(b){a.d(i,b,function(){return l[b]})}(h);var s=a(631);a.n(s);var p=a(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,s.render,s.staticRenderFns,d,v,m,_);i.default=y.exports},function(r,i,a){Object.defineProperty(i,"__esModule",{value:!0});var l=function(){var s=this,p=s.$createElement,d=s._self._c||p;return d("li",{directives:[{name:"show",rawName:"v-show",value:!s.hidden,expression:"!hidden"}],class:[s.prefixCls+"-wrap"]},[d("div",{class:[s.prefixCls+"-title"]},[s._v(s._s(s.label))]),s._v(" "),d("ul",[d("li",{ref:"options",class:[s.prefixCls]},[s._t("default")],2)])])},c=[];i.render=l,i.staticRenderFns=c}])})})(z8);var Ta=Q6(z8.exports);const Ly=$A(window).width(),NK=$A(window).height(),Ny=$A.screenOrientation();var FK={clientId:"",windowActive:!0,windowScrollY:0,windowTouch:"ontouchend"in document,windowWidth:Ly,windowHeight:NK,windowOrientation:Ny,windowLandscape:Ny==="landscape",windowPortrait:Ny==="portrait",formLabelPosition:Ly>576?"right":"top",formLabelWidth:Ly>576?"auto":"",keyboardType:null,keyboardHeight:0,safeAreaBottom:0,appNotificationPermission:!0,audioPlaying:null,routeHistorys:[],routeHistoryLast:{},callAt:[],loads:[],loadDashboardTasks:!1,loadUserBasic:!1,loadProjects:0,loadDialogs:0,floatSpinnerTimer:[],floatSpinnerLoad:0,touchBackInProgress:!1,cacheUserActive:{},cacheUserWait:[],cacheUserBasic:[],cacheDialogs:[],cacheProjects:[],cacheColumns:[],cacheTasks:[],cacheProjectParameter:[],cacheTaskBrowse:[],cacheEmojis:[],cacheServerUrl:"",ajaxWsReady:!1,ajaxWsListener:[],ajaxNetworkException:!1,ws:null,wsMsg:{},wsCall:{},wsTimeout:null,wsRandom:0,wsOpenNum:0,wsListener:{},wsReadTimeout:null,wsReadWaitData:{},userInfo:{},userId:0,userToken:"",userIsAdmin:!1,userAvatar:{},dialogId:0,dialogSearchMsgId:0,dialogIns:[],dialogMsgs:[],dialogTodos:[],dialogHistory:[],dialogDraftTimer:{},dialogMsgTransfer:{time:0},dialogSseList:[],messengerSearchKey:{dialog:"",contacts:""},fileLists:[],fileLinks:[],filePackLists:[],projectId:0,projectTotal:0,projectLoad:0,taskId:0,taskCompleteTemps:[],taskContents:[],taskFiles:[],taskLogs:[],taskOperation:{},taskArchiveView:0,taskOneLoad:{},taskFlows:[],taskFlowItems:[],taskPriority:[],columnTemplate:[],columnColorList:[{name:"\u9ED8\u8BA4",color:""},{name:"\u7070\u8272",color:"#999999"},{name:"\u68D5\u8272",color:"#947364"},{name:"\u6A58\u8272",color:"#faaa6c"},{name:"\u9EC4\u8272",color:"#f2d86d"},{name:"\u7EFF\u8272",color:"#73b45c"},{name:"\u84DD\u8272",color:"#51abea"},{name:"\u7D2B\u8272",color:"#b583e3"},{name:"\u7C89\u8272",color:"#ff819c"},{name:"\u7EA2\u8272",color:"#ff7070"}],taskColorList:[{name:"\u9ED8\u8BA4",color:"",primary:""},{name:"\u9EC4\u8272",color:"#fffae6",primary:"#f2d86d"},{name:"\u84DD\u8272",color:"#e5f5ff",primary:"#51abea"},{name:"\u7EFF\u8272",color:"#ecffe5",primary:"#73b45c"},{name:"\u7C89\u8272",color:"#ffeaee",primary:"#ff819c"},{name:"\u7D2B\u8272",color:"#f6ecff",primary:"#b583e3"},{name:"\u7070\u8272",color:"#f3f3f3",primary:"#999999"}],themeMode:window.localStorage.getItem("__theme:mode__"),themeList:[{name:"\u8DDF\u968F\u7CFB\u7EDF",value:"auto"},{name:"\u660E\u4EAE",value:"light"},{name:"\u6697\u9ED1",value:"dark"}],themeIsDark:!1,clientNewVersion:null,previewImageIndex:0,previewImageList:[],reportUnreadNumber:0,apiKeyData:{},localKeyPair:{},localKeyLock:!1,systemConfig:{},approveUnreadNumber:0,meetingWindow:{show:!1,type:"",meetingid:0},okrWindow:{type:"open",model:"details",id:0,show:!1}},BK={isLoad(e){return function(t){const n=e.loads.find(r=>r.key===t);return n&&n.num>0}},projectData(e){if(e.projectId>0){let t=e.cacheProjects.find(({id:n})=>n==e.projectId);if(t){let n=e.cacheProjectParameter.find(({project_id:r})=>r==e.projectId);return n||(n=$A.projectParameterTemplate(e.projectId),e.cacheProjectParameter.push(n)),n.menuType===void 0&&(n.menuType="column"),t.cacheParameter=n,t}}return{cacheParameter:{}}},taskData(e){let t=e.taskId;if(t==0&&(t=$A.runNum(window.__taskId)),t>0){window.__taskId=t;const n=e.cacheTasks.find(({id:r})=>r==t);if(n)return n}return{}},transforTasks(e){return function(t){return t.filter(({parent_id:n})=>!(n>0&&t.find(({id:r})=>r==n))).map(n=>{if(n.parent_id>0){const r=e.cacheTasks.find(({id:i})=>i==n.parent_id);return r?Object.assign({},r,{id:n.id,parent_id:n.parent_id,name:n.name,start_at:n.start_at,end_at:n.end_at,complete_at:n.complete_at,_time:n._time,flow_item_id:n.flow_item_id,flow_item_name:n.flow_item_name,flow_item_status:n.flow_item_status,sub_top:!0,sub_my:[]}):Object.assign({},n,{sub_top:!0,sub_my:[]})}else return Object.assign({},n,{sub_top:!1,sub_my:t.filter(({parent_id:r})=>r==n.id)})})}},dashboardTask(e){const t=$A.Date($A.formatDate("Y-m-d 00:00:00")),n=$A.Date($A.formatDate("Y-m-d 23:59:59")),r=$A.Date($A.formatDate("Y-m-d H:i:s")),i=(p,d=!0)=>p.archived_at||p.complete_at&&d===!0?!1:p.owner==1;let a=e.cacheTasks.filter(p=>i(p)),l=0;if(e.taskCompleteTemps.length>0){let p=e.cacheTasks.filter(d=>e.taskCompleteTemps.includes(d.id)&&i(d,!1));p.length>0&&(l=p.length,a=$A.cloneJSON(a),a.push(...p))}const c=a.filter(p=>{const d=$A.Date(p.end_at);return t<=d&&d<=n}),h=a.filter(p=>p.end_at&&$A.Date(p.end_at)<=r),s={today:c,today_count:c.length,overdue:h,overdue_count:h.length,all:a,all_count:a.length};return l>0&&(s.today_count-=c.filter(p=>e.taskCompleteTemps.includes(p.id)).length,s.overdue_count-=h.filter(p=>e.taskCompleteTemps.includes(p.id)).length,s.all_count-=l),s},assistTask(e){const t=(r,i=!0)=>r.archived_at||r.complete_at&&i===!0?!1:r.assist&&r.owner===0;let n=e.cacheTasks.filter(r=>t(r));if(e.taskCompleteTemps.length>0){let r=e.cacheTasks.filter(i=>e.taskCompleteTemps.includes(i.id)&&t(i,!1));r.length>0&&(n=$A.cloneJSON(n),n.push(...r))}return n}};const ba=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},gc=Symbol("doneWritingPromise"),V8=Symbol("doneWritingResolve"),W8=Symbol("doneWritingReject"),Md=Symbol("readingIndex");class zs extends Array{constructor(){super(),this[gc]=new Promise((t,n)=>{this[V8]=t,this[W8]=n}),this[gc].catch(()=>{})}}function Ar(e){return e&&e.getReader&&Array.isArray(e)}function Kd(e){if(!Ar(e)){const t=e.getWriter(),n=t.releaseLock;return t.releaseLock=()=>{t.closed.catch(function(){}),n.call(t)},t}this.stream=e}zs.prototype.getReader=function(){return this[Md]===void 0&&(this[Md]=0),{read:async()=>(await this[gc],this[Md]===this.length?{value:void 0,done:!0}:{value:this[this[Md]++],done:!1})}},zs.prototype.readToEnd=async function(e){await this[gc];const t=e(this.slice(this[Md]));return this.length=0,t},zs.prototype.clone=function(){const e=new zs;return e[gc]=this[gc].then(()=>{e.push(...this)}),e},Kd.prototype.write=async function(e){this.stream.push(e)},Kd.prototype.close=async function(){this.stream[V8]()},Kd.prototype.abort=async function(e){return this.stream[W8](e),e},Kd.prototype.releaseLock=function(){};const e_=typeof ba.process=="object"&&typeof ba.process.versions=="object",PD=e_&&void 0;function qi(e){return Ar(e)?"array":ba.ReadableStream&&ba.ReadableStream.prototype.isPrototypeOf(e)?"web":yo&&yo.prototype.isPrototypeOf(e)?"ponyfill":PD&&PD.prototype.isPrototypeOf(e)?"node":!(!e||!e.getReader)&&"web-like"}function t_(e){return Uint8Array.prototype.isPrototypeOf(e)}function H8(e){if(e.length===1)return e[0];let t=0;for(let i=0;i{n||(UK.isBuffer(i)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),r.enqueue(i),t.pause())}),t.on("end",()=>{n||r.close()}),t.on("error",i=>r.error(i))},pull(){t.resume()},cancel(r){n=!0,t.destroy(r)}})};class e extends TD{constructor(n,r){super(r),this._reader=qs(n)}async _read(n){try{for(;;){const{done:r,value:i}=await this._reader.read();if(r){this.push(null);break}if(!this.push(i)||this._cancelling){this._reading=!1;break}}}catch(r){this.emit("error",r)}}_destroy(n){this._reader.cancel(n)}}_2=function(t,n){return new e(t,n)}}const AD=new WeakSet,rr=Symbol("externalBuffer");function Es(e){if(this.stream=e,e[rr]&&(this[rr]=e[rr].slice()),Ar(e)){const r=e.getReader();return this._read=r.read.bind(r),this._releaseLock=()=>{},void(this._cancel=()=>{})}let t=qi(e);if(t==="node"&&(e=n_(e)),t){const r=e.getReader();return this._read=r.read.bind(r),this._releaseLock=()=>{r.closed.catch(function(){}),r.releaseLock()},void(this._cancel=r.cancel.bind(r))}let n=!1;this._read=async()=>n||AD.has(e)?{value:void 0,done:!0}:(n=!0,{value:e,done:!1}),this._releaseLock=()=>{if(n)try{AD.add(e)}catch{}}}Es.prototype.read=async function(){return this[rr]&&this[rr].length?{done:!1,value:this[rr].shift()}:this._read()},Es.prototype.releaseLock=function(){this[rr]&&(this.stream[rr]=this[rr]),this._releaseLock()},Es.prototype.cancel=function(e){return this._cancel(e)},Es.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:n,value:r}=await this.read();if(r+="",n)return t.length?Yi(t):void 0;const i=r.indexOf(` -`)+1;i&&(e=Yi(t.concat(r.substr(0,i))),t=[]),i!==r.length&&t.push(r.substr(i))}return this.unshift(...t),e},Es.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const n=t[0];return this.unshift(ui(t,1)),n},Es.prototype.readBytes=async function(e){const t=[];let n=0;for(;;){const{done:r,value:i}=await this.read();if(r)return t.length?Yi(t):void 0;if(t.push(i),n+=i.length,n>=e){const a=Yi(t);return this.unshift(ui(a,e)),ui(a,0,e)}}},Es.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},Es.prototype.unshift=function(...e){this[rr]||(this[rr]=[]),e.length===1&&t_(e[0])&&this[rr].length&&e[0].length&&this[rr][0].byteOffset>=e[0].length?this[rr][0]=new Uint8Array(this[rr][0].buffer,this[rr][0].byteOffset-e[0].length,this[rr][0].byteLength+e[0].length):this[rr].unshift(...e.filter(t=>t&&t.length))},Es.prototype.readToEnd=async function(e=Yi){const t=[];for(;;){const{done:n,value:r}=await this.read();if(n)break;t.push(r)}return e(t)};let bb,K8,{ReadableStream:yo,WritableStream:G8,TransformStream:Rc}=ba;async function Y8(){if(Rc)return;const[e,t]=await Promise.all([_n(()=>import("./ponyfill.es6.min.cf6531cc.js"),[]),_n(()=>import("./web-streams-adapter.min.da4ec8d3.js"),[])]);({ReadableStream:yo,WritableStream:G8,TransformStream:Rc}=e);const{createReadableStreamWrapper:n}=t;ba.ReadableStream&&yo!==ba.ReadableStream&&(bb=n(yo),K8=n(ba.ReadableStream))}const mf=e_&&void 0;function nh(e){let t=qi(e);return t==="node"?n_(e):t==="web"&&bb?bb(e):t?e:new yo({start(n){n.enqueue(e),n.close()}})}function X8(e){if(qi(e))return e;const t=new zs;return(async()=>{const n=ea(t);await n.write(e),await n.close()})(),t}function Yi(e){return e.some(t=>qi(t)&&!Ar(t))?function(t){t=t.map(nh);const n=Z8(async function(a){await Promise.all(i.map(l=>wb(l,a)))});let r=Promise.resolve();const i=t.map((a,l)=>xo(a,(c,h)=>(r=r.then(()=>pl(c,n.writable,{preventClose:l!==t.length-1})),r)));return n.readable}(e):e.some(t=>Ar(t))?function(t){const n=new zs;let r=Promise.resolve();return t.forEach((i,a)=>(r=r.then(()=>pl(i,n,{preventClose:a!==t.length-1})),r)),n}(e):typeof e[0]=="string"?e.join(""):mf&&mf.isBuffer(e[0])?mf.concat(e):H8(e)}function qs(e){return new Es(e)}function ea(e){return new Kd(e)}async function pl(e,t,{preventClose:n=!1,preventAbort:r=!1,preventCancel:i=!1}={}){if(qi(e)&&!Ar(e)){e=nh(e);try{if(e[rr]){const c=ea(t);for(let h=0;h{t=a}),t=null)},close:n.close.bind(n),abort:n.error.bind(n)})}}function Sr(e,t=()=>{},n=()=>{}){if(Ar(e)){const a=new zs;return(async()=>{const l=ea(a);try{const c=await Ir(e),h=t(c),s=n();let p;p=h!==void 0&&s!==void 0?Yi([h,s]):h!==void 0?h:s,await l.write(p),await l.close()}catch(c){await l.abort(c)}})(),a}if(qi(e))return J8(e,{async transform(a,l){try{const c=await t(a);c!==void 0&&l.enqueue(c)}catch(c){l.error(c)}},async flush(a){try{const l=await n();l!==void 0&&a.enqueue(l)}catch(l){a.error(l)}}});const r=t(e),i=n();return r!==void 0&&i!==void 0?Yi([r,i]):r!==void 0?r:i}function xo(e,t){if(qi(e)&&!Ar(e)){let r;const i=new Rc({start(c){r=c}}),a=pl(e,i.writable),l=Z8(async function(c){r.error(c),await a,await new Promise(setTimeout)});return t(i.readable,l.writable),l.readable}e=X8(e);const n=new zs;return t(e,n),n}function r_(e,t){let n;const r=xo(e,(i,a)=>{const l=qs(i);l.remainder=()=>(l.releaseLock(),pl(i,a),r),n=t(l)});return n}function _u(e){if(Ar(e))return e.clone();if(qi(e)){const t=function(n){if(Ar(n))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(qi(n)){const r=nh(n).tee();return r[0][rr]=r[1][rr]=n[rr],r}return[ui(n),ui(n)]}(e);return Q8(e,t[0]),t[1]}return ui(e)}function Sc(e){return Ar(e)?_u(e):qi(e)?new yo({start(t){const n=xo(e,async(r,i)=>{const a=qs(r),l=ea(i);try{for(;;){await l.ready;const{done:c,value:h}=await a.read();if(c){try{t.close()}catch{}return void await l.close()}try{t.enqueue(h)}catch{}await l.write(h)}}catch(c){t.error(c),await l.abort(c)}});Q8(e,n)}}):ui(e)}function Q8(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach(([n,r])=>{n!=="constructor"&&(r.value?r.value=r.value.bind(t):r.get=r.get.bind(t),Object.defineProperty(e,n,r))})}function ui(e,t=0,n=1/0){if(Ar(e))throw Error("Not implemented");if(qi(e)){if(t>=0&&n>=0){let r=0;return J8(e,{transform(i,a){r=t&&a.enqueue(ui(i,Math.max(t-r,0),n-r)),r+=i.length):a.terminate()}})}if(t<0&&(n<0||n===1/0)){let r=[];return Sr(e,i=>{i.length>=-t?r=[i]:r.push(i)},()=>ui(Yi(r),t,n))}if(t===0&&n<0){let r;return Sr(e,i=>{const a=r?Yi([r,i]):i;if(a.length>=-n)return r=ui(a,n),ui(a,t,n);r=a})}return console.warn(`stream.slice(input, ${t}, ${n}) not implemented efficiently.`),wl(async()=>ui(await Ir(e),t,n))}return e[rr]&&(e=Yi(e[rr].concat([e]))),!t_(e)||mf&&mf.isBuffer(e)?e.slice(t,n):(n===1/0&&(n=e.length),e.subarray(t,n))}async function Ir(e,t=Yi){return Ar(e)?e.readToEnd(t):qi(e)?qs(e).readToEnd(t):e}async function wb(e,t){if(qi(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}function wl(e){const t=new zs;return(async()=>{const n=ea(t);try{await n.write(await e()),await n.close()}catch(r){await n.abort(r)}})(),t}const q8="3.7.5",jK=q8,zK=typeof atob=="function",VK=typeof btoa=="function",Yc=typeof Buffer=="function",MD=typeof TextDecoder=="function"?new TextDecoder:void 0,ID=typeof TextEncoder=="function"?new TextEncoder:void 0,Gd=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Pv=(e=>{let t={};return Gd.forEach((n,r)=>t[n]=r),t})(),WK=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,si=String.fromCharCode.bind(String),$D=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),eP=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),tP=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),nP=e=>{let t,n,r,i,a="";const l=e.length%3;for(let c=0;c255||(r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,a+=Gd[t>>18&63]+Gd[t>>12&63]+Gd[t>>6&63]+Gd[63&t]}return l?a.slice(0,l-3)+"===".substring(l):a},y2=VK?e=>btoa(e):Yc?e=>Buffer.from(e,"binary").toString("base64"):nP,Cb=Yc?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;nt?eP(Cb(e)):Cb(e),HK=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?si(192|t>>>6)+si(128|63&t):si(224|t>>>12&15)+si(128|t>>>6&63)+si(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return si(240|t>>>18&7)+si(128|t>>>12&63)+si(128|t>>>6&63)+si(128|63&t)},KK=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rP=e=>e.replace(KK,HK),RD=Yc?e=>Buffer.from(e,"utf8").toString("base64"):ID?e=>Cb(ID.encode(e)):e=>y2(rP(e)),Ec=(e,t=!1)=>t?eP(RD(e)):RD(e),LD=e=>Ec(e,!0),GK=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,YK=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return si(55296+(t>>>10))+si(56320+(1023&t));case 3:return si((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return si((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},iP=e=>e.replace(GK,YK),aP=e=>{if(e=e.replace(/\s+/g,""),!WK.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,i="";for(let a=0;a>16&255):r===64?si(t>>16&255,t>>8&255):si(t>>16&255,t>>8&255,255&t);return i},b2=zK?e=>atob(tP(e)):Yc?e=>Buffer.from(e,"base64").toString("binary"):aP,sP=Yc?e=>$D(Buffer.from(e,"base64")):e=>$D(b2(e).split("").map(t=>t.charCodeAt(0))),oP=e=>sP(lP(e)),XK=Yc?e=>Buffer.from(e,"base64").toString("utf8"):MD?e=>MD.decode(sP(e)):e=>iP(b2(e)),lP=e=>tP(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),xb=e=>XK(lP(e)),uP=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),ND=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,uP(n));e("fromBase64",function(){return xb(this)}),e("toBase64",function(t){return Ec(this,t)}),e("toBase64URI",function(){return Ec(this,!0)}),e("toBase64URL",function(){return Ec(this,!0)}),e("toUint8Array",function(){return oP(this)})},FD=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,uP(n));e("toBase64",function(t){return mm(this,t)}),e("toBase64URI",function(){return mm(this,!0)}),e("toBase64URL",function(){return mm(this,!0)})},BD={version:q8,VERSION:jK,atob:b2,atobPolyfill:aP,btoa:y2,btoaPolyfill:nP,fromBase64:xb,toBase64:Ec,encode:Ec,encodeURI:LD,encodeURL:LD,utob:rP,btou:iP,decode:xb,isValid:e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:mm,toUint8Array:oP,extendString:ND,extendUint8Array:FD,extendBuiltins:()=>{ND(),FD()}};class Ii{constructor(t){if(t===void 0)throw Error("Invalid BigInteger input");if(t instanceof Uint8Array){const n=t,r=Array(n.length);for(let i=0;iBigInt(0);){const l=r&BigInt(1);r>>=BigInt(1);const c=a*i%n.value;a=l?c:a,i=i*i%n.value}return new Ii(a)}modInv(t){const{gcd:n,x:r}=this._egcd(t);if(!n.isOne())throw Error("Inverse does not exist");return r.add(t).mod(t)}_egcd(t){let n=BigInt(0),r=BigInt(1),i=BigInt(1),a=BigInt(0),l=this.value;for(t=t.value;t!==BigInt(0);){const c=l/t;let h=n;n=i-c*n,i=h,h=r,r=a-c*r,a=h,h=t,t=l%t,l=h}return{x:new Ii(i),y:new Ii(a),gcd:new Ii(l)}}gcd(t){let n=this.value;for(t=t.value;t!==BigInt(0);){const r=t;t=n%t,n=r}return new Ii(n)}ileftShift(t){return this.value<<=t.value,this}leftShift(t){return this.clone().ileftShift(t)}irightShift(t){return this.value>>=t.value,this}rightShift(t){return this.clone().irightShift(t)}equal(t){return this.value===t.value}lt(t){return this.valuet.value}gte(t){return this.value>=t.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.valueNumber.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return t}getBit(t){return(this.value>>BigInt(t)&BigInt(1))===BigInt(0)?0:1}bitLength(){const t=new Ii(0),n=new Ii(1),r=new Ii(-1),i=this.isNegative()?r:t;let a=1;const l=this.clone();for(;!l.irightShift(n).equal(i);)a++;return a}byteLength(){const t=new Ii(0),n=new Ii(-1),r=this.isNegative()?n:t,i=new Ii(8);let a=1;const l=this.clone();for(;!l.irightShift(i).equal(r);)a++;return a}toUint8Array(t="be",n){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const i=r.length/2,a=new Uint8Array(n||i),l=n?n-i:0;let c=0;for(;ctypeof BigInt!="undefined",UD=(()=>{try{return!1}catch{}return!1})(),Te={isString:function(e){return typeof e=="string"||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:t_,isStream:qi,readNumber:function(e){let t=0;for(let n=0;n>8*(t-r-1)&255;return n},readDate:function(e){const t=Te.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return Te.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return e===null||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=(e[0]<<8|e[1])+7>>>3;return e.subarray(2,2+t)},leftPad(e,t){const n=new Uint8Array(t),r=t-e.length;return n.set(e,r),n},uint8ArrayToMPI:function(e){const t=Te.uint8ArrayBitLength(e);if(t===0)throw Error("Zero MPI");const n=e.subarray(e.length-Math.ceil(t/8)),r=new Uint8Array([(65280&t)>>8,255&t]);return Te.concatUint8Array([r,n])},uint8ArrayBitLength:function(e){let t;for(t=0;t>1);for(let n=0;n>1;n++)t[n]=parseInt(e.substr(n<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],n=e.length;let r,i=0;for(;i{if(!Te.isString(t))throw Error("stringToUint8Array: Data must be in the form of a string");const n=new Uint8Array(t.length);for(let r=0;rn("",!0))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function n(r,i=!1){return t.decode(r,{stream:!i})}return Sr(e,n,()=>n(new Uint8Array,!0))},concat:Yi,concatUint8Array:H8,equalsUint8Array:function(e,t){if(!Te.isUint8Array(e)||!Te.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let n=0;n>>16;return n!==0&&(e=n,t+=16),n=e>>8,n!==0&&(e=n,t+=8),n=e>>4,n!==0&&(e=n,t+=4),n=e>>2,n!==0&&(e=n,t+=2),n=e>>1,n!==0&&(e=n,t+=1),t},double:function(e){const t=new Uint8Array(e.length),n=e.length-1;for(let r=0;r>7;return t[n]=e[n]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let n=e.length-1;n>=0;n--)e[n]>>=t,n>0&&(e[n]|=e[n-1]<<8-t);return e},getWebCrypto:function(){return ba!==void 0&&ba.crypto&&ba.crypto.subtle},getBigInteger:async function(){if(JK())return Ii;{const{default:e}=await _n(()=>import("./bn.interface.min.fafac8af.js"),["js/build/bn.interface.min.fafac8af.js","js/build/bn.min.2dc6411e.js"]);return e}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return typeof navigator!="undefined"?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(e){return Te.isString(e)?/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/.test(e):!1},canonicalizeEOL:function(e){let t=!1;return Sr(e,n=>{let r;t&&(n=Te.concatUint8Array([new Uint8Array([13]),n])),n[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;const i=[];for(let c=0;r=n.indexOf(10,c)+1,r;c=r)n[r-2]!==13&&i.push(r);if(!i.length)return n;const a=new Uint8Array(n.length+i.length);let l=0;for(let c=0;ct?new Uint8Array([13]):void 0)},nativeEOL:function(e){let t=!1;return Sr(e,n=>{let r;(n=t&&n[0]!==10?Te.concatUint8Array([new Uint8Array([13]),n]):new Uint8Array(n))[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;let i=0;for(let a=0;a!==n.length;a=r){r=n.indexOf(13,a)+1,r||(r=n.length);const l=r-(n[r]===10?1:0);a&&n.copyWithin(i,a,l),i+=l-a}return n.subarray(0,i)},()=>t?new Uint8Array([13]):void 0)},removeTrailingSpaces:function(e){return e.split(` +`)+1;i&&(e=Yi(t.concat(r.substr(0,i))),t=[]),i!==r.length&&t.push(r.substr(i))}return this.unshift(...t),e},Es.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const n=t[0];return this.unshift(ui(t,1)),n},Es.prototype.readBytes=async function(e){const t=[];let n=0;for(;;){const{done:r,value:i}=await this.read();if(r)return t.length?Yi(t):void 0;if(t.push(i),n+=i.length,n>=e){const a=Yi(t);return this.unshift(ui(a,e)),ui(a,0,e)}}},Es.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},Es.prototype.unshift=function(...e){this[rr]||(this[rr]=[]),e.length===1&&t_(e[0])&&this[rr].length&&e[0].length&&this[rr][0].byteOffset>=e[0].length?this[rr][0]=new Uint8Array(this[rr][0].buffer,this[rr][0].byteOffset-e[0].length,this[rr][0].byteLength+e[0].length):this[rr].unshift(...e.filter(t=>t&&t.length))},Es.prototype.readToEnd=async function(e=Yi){const t=[];for(;;){const{done:n,value:r}=await this.read();if(n)break;t.push(r)}return e(t)};let bb,K8,{ReadableStream:yo,WritableStream:G8,TransformStream:Rc}=ba;async function Y8(){if(Rc)return;const[e,t]=await Promise.all([_n(()=>import("./ponyfill.es6.min.cf6531cc.js"),[]),_n(()=>import("./web-streams-adapter.min.da4ec8d3.js"),[])]);({ReadableStream:yo,WritableStream:G8,TransformStream:Rc}=e);const{createReadableStreamWrapper:n}=t;ba.ReadableStream&&yo!==ba.ReadableStream&&(bb=n(yo),K8=n(ba.ReadableStream))}const mf=e_&&void 0;function nh(e){let t=qi(e);return t==="node"?n_(e):t==="web"&&bb?bb(e):t?e:new yo({start(n){n.enqueue(e),n.close()}})}function X8(e){if(qi(e))return e;const t=new zs;return(async()=>{const n=ea(t);await n.write(e),await n.close()})(),t}function Yi(e){return e.some(t=>qi(t)&&!Ar(t))?function(t){t=t.map(nh);const n=Z8(async function(a){await Promise.all(i.map(l=>wb(l,a)))});let r=Promise.resolve();const i=t.map((a,l)=>xo(a,(c,h)=>(r=r.then(()=>pl(c,n.writable,{preventClose:l!==t.length-1})),r)));return n.readable}(e):e.some(t=>Ar(t))?function(t){const n=new zs;let r=Promise.resolve();return t.forEach((i,a)=>(r=r.then(()=>pl(i,n,{preventClose:a!==t.length-1})),r)),n}(e):typeof e[0]=="string"?e.join(""):mf&&mf.isBuffer(e[0])?mf.concat(e):H8(e)}function qs(e){return new Es(e)}function ea(e){return new Kd(e)}async function pl(e,t,{preventClose:n=!1,preventAbort:r=!1,preventCancel:i=!1}={}){if(qi(e)&&!Ar(e)){e=nh(e);try{if(e[rr]){const c=ea(t);for(let h=0;h{t=a}),t=null)},close:n.close.bind(n),abort:n.error.bind(n)})}}function Sr(e,t=()=>{},n=()=>{}){if(Ar(e)){const a=new zs;return(async()=>{const l=ea(a);try{const c=await Ir(e),h=t(c),s=n();let p;p=h!==void 0&&s!==void 0?Yi([h,s]):h!==void 0?h:s,await l.write(p),await l.close()}catch(c){await l.abort(c)}})(),a}if(qi(e))return J8(e,{async transform(a,l){try{const c=await t(a);c!==void 0&&l.enqueue(c)}catch(c){l.error(c)}},async flush(a){try{const l=await n();l!==void 0&&a.enqueue(l)}catch(l){a.error(l)}}});const r=t(e),i=n();return r!==void 0&&i!==void 0?Yi([r,i]):r!==void 0?r:i}function xo(e,t){if(qi(e)&&!Ar(e)){let r;const i=new Rc({start(c){r=c}}),a=pl(e,i.writable),l=Z8(async function(c){r.error(c),await a,await new Promise(setTimeout)});return t(i.readable,l.writable),l.readable}e=X8(e);const n=new zs;return t(e,n),n}function r_(e,t){let n;const r=xo(e,(i,a)=>{const l=qs(i);l.remainder=()=>(l.releaseLock(),pl(i,a),r),n=t(l)});return n}function _u(e){if(Ar(e))return e.clone();if(qi(e)){const t=function(n){if(Ar(n))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(qi(n)){const r=nh(n).tee();return r[0][rr]=r[1][rr]=n[rr],r}return[ui(n),ui(n)]}(e);return Q8(e,t[0]),t[1]}return ui(e)}function Sc(e){return Ar(e)?_u(e):qi(e)?new yo({start(t){const n=xo(e,async(r,i)=>{const a=qs(r),l=ea(i);try{for(;;){await l.ready;const{done:c,value:h}=await a.read();if(c){try{t.close()}catch{}return void await l.close()}try{t.enqueue(h)}catch{}await l.write(h)}}catch(c){t.error(c),await l.abort(c)}});Q8(e,n)}}):ui(e)}function Q8(e,t){Object.entries(Object.getOwnPropertyDescriptors(e.constructor.prototype)).forEach(([n,r])=>{n!=="constructor"&&(r.value?r.value=r.value.bind(t):r.get=r.get.bind(t),Object.defineProperty(e,n,r))})}function ui(e,t=0,n=1/0){if(Ar(e))throw Error("Not implemented");if(qi(e)){if(t>=0&&n>=0){let r=0;return J8(e,{transform(i,a){r=t&&a.enqueue(ui(i,Math.max(t-r,0),n-r)),r+=i.length):a.terminate()}})}if(t<0&&(n<0||n===1/0)){let r=[];return Sr(e,i=>{i.length>=-t?r=[i]:r.push(i)},()=>ui(Yi(r),t,n))}if(t===0&&n<0){let r;return Sr(e,i=>{const a=r?Yi([r,i]):i;if(a.length>=-n)return r=ui(a,n),ui(a,t,n);r=a})}return console.warn(`stream.slice(input, ${t}, ${n}) not implemented efficiently.`),wl(async()=>ui(await Ir(e),t,n))}return e[rr]&&(e=Yi(e[rr].concat([e]))),!t_(e)||mf&&mf.isBuffer(e)?e.slice(t,n):(n===1/0&&(n=e.length),e.subarray(t,n))}async function Ir(e,t=Yi){return Ar(e)?e.readToEnd(t):qi(e)?qs(e).readToEnd(t):e}async function wb(e,t){if(qi(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}function wl(e){const t=new zs;return(async()=>{const n=ea(t);try{await n.write(await e()),await n.close()}catch(r){await n.abort(r)}})(),t}const q8="3.7.5",jK=q8,zK=typeof atob=="function",VK=typeof btoa=="function",Yc=typeof Buffer=="function",MD=typeof TextDecoder=="function"?new TextDecoder:void 0,ID=typeof TextEncoder=="function"?new TextEncoder:void 0,Gd=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Pv=(e=>{let t={};return Gd.forEach((n,r)=>t[n]=r),t})(),WK=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,si=String.fromCharCode.bind(String),$D=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),eP=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),tP=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),nP=e=>{let t,n,r,i,a="";const l=e.length%3;for(let c=0;c255||(r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,a+=Gd[t>>18&63]+Gd[t>>12&63]+Gd[t>>6&63]+Gd[63&t]}return l?a.slice(0,l-3)+"===".substring(l):a},y2=VK?e=>btoa(e):Yc?e=>Buffer.from(e,"binary").toString("base64"):nP,Cb=Yc?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;nt?eP(Cb(e)):Cb(e),HK=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?si(192|t>>>6)+si(128|63&t):si(224|t>>>12&15)+si(128|t>>>6&63)+si(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return si(240|t>>>18&7)+si(128|t>>>12&63)+si(128|t>>>6&63)+si(128|63&t)},KK=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rP=e=>e.replace(KK,HK),RD=Yc?e=>Buffer.from(e,"utf8").toString("base64"):ID?e=>Cb(ID.encode(e)):e=>y2(rP(e)),Ec=(e,t=!1)=>t?eP(RD(e)):RD(e),LD=e=>Ec(e,!0),GK=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,YK=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return si(55296+(t>>>10))+si(56320+(1023&t));case 3:return si((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return si((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},iP=e=>e.replace(GK,YK),aP=e=>{if(e=e.replace(/\s+/g,""),!WK.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,i="";for(let a=0;a>16&255):r===64?si(t>>16&255,t>>8&255):si(t>>16&255,t>>8&255,255&t);return i},b2=zK?e=>atob(tP(e)):Yc?e=>Buffer.from(e,"base64").toString("binary"):aP,sP=Yc?e=>$D(Buffer.from(e,"base64")):e=>$D(b2(e).split("").map(t=>t.charCodeAt(0))),oP=e=>sP(lP(e)),XK=Yc?e=>Buffer.from(e,"base64").toString("utf8"):MD?e=>MD.decode(sP(e)):e=>iP(b2(e)),lP=e=>tP(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),xb=e=>XK(lP(e)),uP=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),ND=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,uP(n));e("fromBase64",function(){return xb(this)}),e("toBase64",function(t){return Ec(this,t)}),e("toBase64URI",function(){return Ec(this,!0)}),e("toBase64URL",function(){return Ec(this,!0)}),e("toUint8Array",function(){return oP(this)})},FD=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,uP(n));e("toBase64",function(t){return mm(this,t)}),e("toBase64URI",function(){return mm(this,!0)}),e("toBase64URL",function(){return mm(this,!0)})},BD={version:q8,VERSION:jK,atob:b2,atobPolyfill:aP,btoa:y2,btoaPolyfill:nP,fromBase64:xb,toBase64:Ec,encode:Ec,encodeURI:LD,encodeURL:LD,utob:rP,btou:iP,decode:xb,isValid:e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:mm,toUint8Array:oP,extendString:ND,extendUint8Array:FD,extendBuiltins:()=>{ND(),FD()}};class Ii{constructor(t){if(t===void 0)throw Error("Invalid BigInteger input");if(t instanceof Uint8Array){const n=t,r=Array(n.length);for(let i=0;iBigInt(0);){const l=r&BigInt(1);r>>=BigInt(1);const c=a*i%n.value;a=l?c:a,i=i*i%n.value}return new Ii(a)}modInv(t){const{gcd:n,x:r}=this._egcd(t);if(!n.isOne())throw Error("Inverse does not exist");return r.add(t).mod(t)}_egcd(t){let n=BigInt(0),r=BigInt(1),i=BigInt(1),a=BigInt(0),l=this.value;for(t=t.value;t!==BigInt(0);){const c=l/t;let h=n;n=i-c*n,i=h,h=r,r=a-c*r,a=h,h=t,t=l%t,l=h}return{x:new Ii(i),y:new Ii(a),gcd:new Ii(l)}}gcd(t){let n=this.value;for(t=t.value;t!==BigInt(0);){const r=t;t=n%t,n=r}return new Ii(n)}ileftShift(t){return this.value<<=t.value,this}leftShift(t){return this.clone().ileftShift(t)}irightShift(t){return this.value>>=t.value,this}rightShift(t){return this.clone().irightShift(t)}equal(t){return this.value===t.value}lt(t){return this.valuet.value}gte(t){return this.value>=t.value}isZero(){return this.value===BigInt(0)}isOne(){return this.value===BigInt(1)}isNegative(){return this.valueNumber.MAX_SAFE_INTEGER)throw Error("Number can only safely store up to 53 bits");return t}getBit(t){return(this.value>>BigInt(t)&BigInt(1))===BigInt(0)?0:1}bitLength(){const t=new Ii(0),n=new Ii(1),r=new Ii(-1),i=this.isNegative()?r:t;let a=1;const l=this.clone();for(;!l.irightShift(n).equal(i);)a++;return a}byteLength(){const t=new Ii(0),n=new Ii(-1),r=this.isNegative()?n:t,i=new Ii(8);let a=1;const l=this.clone();for(;!l.irightShift(i).equal(r);)a++;return a}toUint8Array(t="be",n){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const i=r.length/2,a=new Uint8Array(n||i),l=n?n-i:0;let c=0;for(;ctypeof BigInt!="undefined",UD=(()=>{try{return!1}catch{}return!1})(),Te={isString:function(e){return typeof e=="string"||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:t_,isStream:qi,readNumber:function(e){let t=0;for(let n=0;n>8*(t-r-1)&255;return n},readDate:function(e){const t=Te.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return Te.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return e===null||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},readMPI:function(e){const t=(e[0]<<8|e[1])+7>>>3;return e.subarray(2,2+t)},leftPad(e,t){const n=new Uint8Array(t),r=t-e.length;return n.set(e,r),n},uint8ArrayToMPI:function(e){const t=Te.uint8ArrayBitLength(e);if(t===0)throw Error("Zero MPI");const n=e.subarray(e.length-Math.ceil(t/8)),r=new Uint8Array([(65280&t)>>8,255&t]);return Te.concatUint8Array([r,n])},uint8ArrayBitLength:function(e){let t;for(t=0;t>1);for(let n=0;n>1;n++)t[n]=parseInt(e.substr(n<<1,2),16);return t},uint8ArrayToHex:function(e){const t=[],n=e.length;let r,i=0;for(;i{if(!Te.isString(t))throw Error("stringToUint8Array: Data must be in the form of a string");const n=new Uint8Array(t.length);for(let r=0;rn("",!0))},decodeUTF8:function(e){const t=new TextDecoder("utf-8");function n(r,i=!1){return t.decode(r,{stream:!i})}return Sr(e,n,()=>n(new Uint8Array,!0))},concat:Yi,concatUint8Array:H8,equalsUint8Array:function(e,t){if(!Te.isUint8Array(e)||!Te.isUint8Array(t))throw Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let n=0;n>>16;return n!==0&&(e=n,t+=16),n=e>>8,n!==0&&(e=n,t+=8),n=e>>4,n!==0&&(e=n,t+=4),n=e>>2,n!==0&&(e=n,t+=2),n=e>>1,n!==0&&(e=n,t+=1),t},double:function(e){const t=new Uint8Array(e.length),n=e.length-1;for(let r=0;r>7;return t[n]=e[n]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let n=e.length-1;n>=0;n--)e[n]>>=t,n>0&&(e[n]|=e[n-1]<<8-t);return e},getWebCrypto:function(){return ba!==void 0&&ba.crypto&&ba.crypto.subtle},getBigInteger:async function(){if(JK())return Ii;{const{default:e}=await _n(()=>import("./bn.interface.min.9376436e.js"),["js/build/bn.interface.min.9376436e.js","js/build/bn.min.03db7fc1.js"]);return e}},getNodeCrypto:function(){},getNodeZlib:function(){},getNodeBuffer:function(){return{}.Buffer},getHardwareConcurrency:function(){return typeof navigator!="undefined"?navigator.hardwareConcurrency||1:(void 0).cpus().length},isEmailAddress:function(e){return Te.isString(e)?/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/.test(e):!1},canonicalizeEOL:function(e){let t=!1;return Sr(e,n=>{let r;t&&(n=Te.concatUint8Array([new Uint8Array([13]),n])),n[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;const i=[];for(let c=0;r=n.indexOf(10,c)+1,r;c=r)n[r-2]!==13&&i.push(r);if(!i.length)return n;const a=new Uint8Array(n.length+i.length);let l=0;for(let c=0;ct?new Uint8Array([13]):void 0)},nativeEOL:function(e){let t=!1;return Sr(e,n=>{let r;(n=t&&n[0]!==10?Te.concatUint8Array([new Uint8Array([13]),n]):new Uint8Array(n))[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;let i=0;for(let a=0;a!==n.length;a=r){r=n.indexOf(13,a)+1,r||(r=n.length);const l=r-(n[r]===10?1:0);a&&n.copyWithin(i,a,l),i+=l-a}return n.subarray(0,i)},()=>t?new Uint8Array([13]):void 0)},removeTrailingSpaces:function(e){return e.split(` `).map(t=>{let n=t.length-1;for(;n>=0&&(t[n]===" "||t[n]===" "||t[n]==="\r");n--);return t.substr(0,n+1)}).join(` `)},wrapError:function(e,t){if(!t)return Error(e);try{t.message=e+": "+t.message}catch{}return t},constructAllowedPackets:function(e){const t={};return e.forEach(n=>{if(!n.tag)throw Error("Invalid input: expected a packet class");t[n.tag]=n}),t},anyPromise:function(e){return new Promise(async(t,n)=>{let r;await Promise.all(e.map(async i=>{try{t(await i)}catch(a){r=a}})),n(r)})},selectUint8Array:function(e,t,n){const r=Math.max(t.length,n.length),i=new Uint8Array(r);let a=0;for(let l=0;l{t=Te.concatUint8Array([t,n]);const r=[],i=Math.floor(t.length/45),a=45*i,l=tg(t.subarray(0,a));for(let c=0;ct.length?tg(t)+` @@ -269,7 +269,7 @@ Please report this to https://github.com/markedjs/marked.`,(t||tr.defaults).sile `),s.push(Nl(i,a)),s.push(oo(t)),s.push("=",zo(h)),s.push(`-----END PGP PRIVATE KEY BLOCK----- `);break;case ve.armor.signature:s.push(`-----BEGIN PGP SIGNATURE----- `),s.push(Nl(i,a)),s.push(oo(t)),s.push("=",zo(h)),s.push(`-----END PGP SIGNATURE----- -`)}return Te.concat(s)}class vl{constructor(){this.bytes=""}read(t){this.bytes=Te.uint8ArrayToString(t.subarray(0,8))}write(){return Te.stringToUint8Array(this.bytes)}toHex(){return Te.uint8ArrayToHex(Te.stringToUint8Array(this.bytes))}equals(t,n=!1){return n&&(t.isWildcard()||this.isWildcard())||this.bytes===t.bytes}isNull(){return this.bytes===""}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(t){return t.toHex()}static fromID(t){const n=new vl;return n.read(Te.hexToUint8Array(t)),n}static wildcard(){const t=new vl;return t.read(new Uint8Array(8)),t}}var Tn=function(){var e,t,n=!1;function r(d,v){var m=e[(t[d]+t[v])%255];return d!==0&&v!==0||(m=0),m}var i,a,l,c,h=!1;function s(){function d(y){var b,E,k;for(E=k=function(C){var x=e[255-t[C]];return C===0&&(x=0),x}(y),b=0;b<4;b++)k^=E=255&(E<<1|E>>>7);return k^=99}n||function(){e=[],t=[];var y,b,E=1;for(y=0;y<255;y++)e[y]=E,b=128&E,E<<=1,E&=255,b===128&&(E^=27),E^=e[y],t[e[y]]=y;e[255]=e[0],t[0]=0,n=!0}(),i=[],a=[],l=[[],[],[],[]],c=[[],[],[],[]];for(var v=0;v<256;v++){var m=d(v);i[v]=m,a[m]=v,l[0][v]=r(2,m)<<24|m<<16|m<<8|r(3,m),c[0][m]=r(14,v)<<24|r(9,v)<<16|r(13,v)<<8|r(11,v);for(var _=1;_<4;_++)l[_][v]=l[_-1][v]>>>8|l[_-1][v]<<24,c[_][m]=c[_-1][m]>>>8|c[_-1][m]<<24}h=!0}var p=function(d,v){h||s();var m=new Uint32Array(v);m.set(i,512),m.set(a,768);for(var _=0;_<4;_++)m.set(l[_],4096+1024*_>>2),m.set(c[_],8192+1024*_>>2);var y=function(b,E,k){var C=0,x=0,D=0,P=0,w=0,M=0,T=0,R=0,K=0,N=0,z=0,U=0,oe=0,Pe=0,he=0,ye=0,de=0,Se=0,X=0,se=0,Ce=0,be=new b.Uint32Array(k),re=new b.Uint8Array(k);function Q(fe,ce,Ve,Je,vt,xt,kt,Nt){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,vt=vt|0,xt=xt|0,kt=kt|0,Nt=Nt|0;var pt=0,It=0,Ot=0,hn=0,qt=0,Zt=0,Qt=0,Yt=0;for(pt=Ve|1024,It=Ve|2048,Ot=Ve|3072,vt=vt^be[(fe|0)>>2],xt=xt^be[(fe|4)>>2],kt=kt^be[(fe|8)>>2],Nt=Nt^be[(fe|12)>>2],Yt=16;(Yt|0)<=Je<<4;Yt=Yt+16|0)hn=be[(Ve|vt>>22&1020)>>2]^be[(pt|xt>>14&1020)>>2]^be[(It|kt>>6&1020)>>2]^be[(Ot|Nt<<2&1020)>>2]^be[(fe|Yt|0)>>2],qt=be[(Ve|xt>>22&1020)>>2]^be[(pt|kt>>14&1020)>>2]^be[(It|Nt>>6&1020)>>2]^be[(Ot|vt<<2&1020)>>2]^be[(fe|Yt|4)>>2],Zt=be[(Ve|kt>>22&1020)>>2]^be[(pt|Nt>>14&1020)>>2]^be[(It|vt>>6&1020)>>2]^be[(Ot|xt<<2&1020)>>2]^be[(fe|Yt|8)>>2],Qt=be[(Ve|Nt>>22&1020)>>2]^be[(pt|vt>>14&1020)>>2]^be[(It|xt>>6&1020)>>2]^be[(Ot|kt<<2&1020)>>2]^be[(fe|Yt|12)>>2],vt=hn,xt=qt,kt=Zt,Nt=Qt;C=be[(ce|vt>>22&1020)>>2]<<24^be[(ce|xt>>14&1020)>>2]<<16^be[(ce|kt>>6&1020)>>2]<<8^be[(ce|Nt<<2&1020)>>2]^be[(fe|Yt|0)>>2],x=be[(ce|xt>>22&1020)>>2]<<24^be[(ce|kt>>14&1020)>>2]<<16^be[(ce|Nt>>6&1020)>>2]<<8^be[(ce|vt<<2&1020)>>2]^be[(fe|Yt|4)>>2],D=be[(ce|kt>>22&1020)>>2]<<24^be[(ce|Nt>>14&1020)>>2]<<16^be[(ce|vt>>6&1020)>>2]<<8^be[(ce|xt<<2&1020)>>2]^be[(fe|Yt|8)>>2],P=be[(ce|Nt>>22&1020)>>2]<<24^be[(ce|vt>>14&1020)>>2]<<16^be[(ce|xt>>6&1020)>>2]<<8^be[(ce|kt<<2&1020)>>2]^be[(fe|Yt|12)>>2]}function F(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,fe,ce,Ve,Je)}function I(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0;Q(1024,3072,8192,Ce,fe,Je,Ve,ce),vt=x,x=P,P=vt}function Z(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w^fe,M^ce,T^Ve,R^Je),w=C,M=x,T=D,R=P}function q(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0;Q(1024,3072,8192,Ce,fe,Je,Ve,ce),vt=x,x=P,P=vt,C=C^w,x=x^M,D=D^T,P=P^R,w=fe,M=ce,T=Ve,R=Je}function pe(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),w=C=C^fe,M=x=x^ce,T=D=D^Ve,R=P=P^Je}function Ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),C=C^fe,x=x^ce,D=D^Ve,P=P^Je,w=fe,M=ce,T=Ve,R=Je}function J(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),w=C,M=x,T=D,R=P,C=C^fe,x=x^ce,D=D^Ve,P=P^Je}function Y(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,K,N,z,U),U=~ye&U|ye&U+1,z=~he&z|he&z+((U|0)==0),N=~Pe&N|Pe&N+((z|0)==0),K=~oe&K|oe&K+((N|0)==0),C=C^fe,x=x^ce,D=D^Ve,P=P^Je}function ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0,xt=0,kt=0,Nt=0,pt=0,It=0,Ot=0,hn=0,qt=0,Zt=0;for(fe=fe^w,ce=ce^M,Ve=Ve^T,Je=Je^R,vt=de|0,xt=Se|0,kt=X|0,Nt=se|0;(qt|0)<128;qt=qt+1|0)vt>>>31&&(pt=pt^fe,It=It^ce,Ot=Ot^Ve,hn=hn^Je),vt=vt<<1|xt>>>31,xt=xt<<1|kt>>>31,kt=kt<<1|Nt>>>31,Nt=Nt<<1,Zt=Je&1,Je=Je>>>1|Ve<<31,Ve=Ve>>>1|ce<<31,ce=ce>>>1|fe<<31,fe=fe>>>1,Zt&&(fe=fe^3774873600);w=pt,M=It,T=Ot,R=hn}function te(fe){fe=fe|0,Ce=fe}function Ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,C=fe,x=ce,D=Ve,P=Je}function me(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,w=fe,M=ce,T=Ve,R=Je}function V(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,K=fe,N=ce,z=Ve,U=Je}function De(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,oe=fe,Pe=ce,he=Ve,ye=Je}function ge(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,U=~ye&U|ye&Je,z=~he&z|he&Ve,N=~Pe&N|Pe&ce,K=~oe&K|oe&fe}function le(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=C>>>24,re[fe|1]=C>>>16&255,re[fe|2]=C>>>8&255,re[fe|3]=C&255,re[fe|4]=x>>>24,re[fe|5]=x>>>16&255,re[fe|6]=x>>>8&255,re[fe|7]=x&255,re[fe|8]=D>>>24,re[fe|9]=D>>>16&255,re[fe|10]=D>>>8&255,re[fe|11]=D&255,re[fe|12]=P>>>24,re[fe|13]=P>>>16&255,re[fe|14]=P>>>8&255,re[fe|15]=P&255,16)}function B(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=w>>>24,re[fe|1]=w>>>16&255,re[fe|2]=w>>>8&255,re[fe|3]=w&255,re[fe|4]=M>>>24,re[fe|5]=M>>>16&255,re[fe|6]=M>>>8&255,re[fe|7]=M&255,re[fe|8]=T>>>24,re[fe|9]=T>>>16&255,re[fe|10]=T>>>8&255,re[fe|11]=T&255,re[fe|12]=R>>>24,re[fe|13]=R>>>16&255,re[fe|14]=R>>>8&255,re[fe|15]=R&255,16)}function H(){F(0,0,0,0),de=C,Se=x,X=D,se=P}function W(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)ue[fe&7](re[ce|0]<<24|re[ce|1]<<16|re[ce|2]<<8|re[ce|3],re[ce|4]<<24|re[ce|5]<<16|re[ce|6]<<8|re[ce|7],re[ce|8]<<24|re[ce|9]<<16|re[ce|10]<<8|re[ce|11],re[ce|12]<<24|re[ce|13]<<16|re[ce|14]<<8|re[ce|15]),re[ce|0]=C>>>24,re[ce|1]=C>>>16&255,re[ce|2]=C>>>8&255,re[ce|3]=C&255,re[ce|4]=x>>>24,re[ce|5]=x>>>16&255,re[ce|6]=x>>>8&255,re[ce|7]=x&255,re[ce|8]=D>>>24,re[ce|9]=D>>>16&255,re[ce|10]=D>>>8&255,re[ce|11]=D&255,re[ce|12]=P>>>24,re[ce|13]=P>>>16&255,re[ce|14]=P>>>8&255,re[ce|15]=P&255,Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}function ee(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)xe[fe&1](re[ce|0]<<24|re[ce|1]<<16|re[ce|2]<<8|re[ce|3],re[ce|4]<<24|re[ce|5]<<16|re[ce|6]<<8|re[ce|7],re[ce|8]<<24|re[ce|9]<<16|re[ce|10]<<8|re[ce|11],re[ce|12]<<24|re[ce|13]<<16|re[ce|14]<<8|re[ce|15]),Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}var ue=[F,I,Z,q,pe,Ee,J,Y],xe=[Z,ae];return{set_rounds:te,set_state:Ae,set_iv:me,set_nonce:V,set_mask:De,set_counter:ge,get_state:le,get_iv:B,gcm_init:H,cipher:W,mac:ee}}({Uint8Array,Uint32Array},d,v);return y.set_key=function(b,E,k,C,x,D,P,w,M){var T=m.subarray(0,60),R=m.subarray(256,316);T.set([E,k,C,x,D,P,w,M]);for(var K=b,N=1;K<4*b+28;K++){var z=T[K-1];(K%b==0||b===8&&K%b==4)&&(z=i[z>>>24]<<24^i[z>>>16&255]<<16^i[z>>>8&255]<<8^i[255&z]),K%b==0&&(z=z<<8^z>>>24^N<<24,N=N<<1^(128&N?27:0)),T[K]=T[K-b]^z}for(var U=0;U=K-4?z:c[0][i[z>>>24]]^c[1][i[z>>>16&255]]^c[2][i[z>>>8&255]]^c[3][i[255&z]];y.set_rounds(b+5)},y};return p.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},p.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},p.MAC={CBC:0,GCM:1},p.HEAP_DATA=16384,p}();function zD(e){return e instanceof Uint8Array}function w2(e,t){const n=e?e.byteLength:t||65536;if(4095&n||n<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(n))}function Zl(e,t,n,r,i){const a=e.length-t,l=ai+a.length,0),n=new Uint8Array(t);let r=0;for(let i=0;i>2,a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12),i>16?a.getUint32(16):0,i>16?a.getUint32(20):0,i>24?a.getUint32(24):0,i>24?a.getUint32(28):0),n!==void 0){if(n.length!==16)throw new go("illegal iv size");let l=new DataView(n.buffer,n.byteOffset,n.byteLength);r.set_iv(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(t){if(!zD(t))throw new TypeError("data isn't of expected type");let{heap:n,asm:r}=this.acquire_asm(),i=Tn.ENC[this.mode],a=Tn.HEAP_DATA,l=this.pos,c=this.len,h=0,s=t.length||0,p=0,d=0,v=new Uint8Array(c+s&-16);for(;s>0;)d=Zl(n,l+c,t,h,s),c+=d,h+=d,s-=d,d=r.cipher(i,a+l,c),d&&v.set(n.subarray(l,l+d),p),p+=d,d0;)m=Zl(n,l+c,t,h,s),c+=m,h+=m,s-=m,m=r.cipher(i,a+l,c-(s?0:v)),m&&_.set(n.subarray(l,l+m),p),p+=m,m0){if(l%16){if(this.hasOwnProperty("padding"))throw new go("data length must be a multiple of the block size");l+=16-l%16}if(n.cipher(r,i+a,l),this.hasOwnProperty("padding")&&this.padding){let s=t[a+c-1];if(s<1||s>16||s>c)throw new Eb("bad padding");let p=0;for(let d=s;d>1;d--)p|=s^t[a+c-d];if(p)throw new Eb("bad padding");c-=s}}const h=new Uint8Array(c);return c>0&&h.set(t.subarray(a,a+c)),this.pos=0,this.len=0,this.release_asm(),h}}class rg{static encrypt(t,n,r=!1){return new rg(n,r).encrypt(t)}static decrypt(t,n,r=!1){return new rg(n,r).decrypt(t)}constructor(t,n=!1,r){this.aes=r||new ah(t,void 0,n,"ECB")}encrypt(t){return ml(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return ml(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}function C2(e){const t=function(n){const r=new rg(n);this.encrypt=function(i){return r.encrypt(i)},this.decrypt=function(i){return r.decrypt(i)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function gf(e,t,n,r,i,a){const l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],c=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],h=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],s=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],p=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],d=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],m=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let _,y,b,E,k,C,x,D,P,w,M,T,R,K,N=0,z=t.length;const U=e.length===32?3:9;D=U===3?n?[0,32,2]:[30,-2,-2]:n?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],n&&(t=function(he,ye){const de=8-he.length%8;let Se;if(ye===2&&de<8)Se=32;else if(ye===1)Se=de;else{if(ye||!(de<8)){if(de===8)return he;throw Error("des: invalid padding")}Se=0}const X=new Uint8Array(he.length+de);for(let se=0;se>>4^x),x^=b,C^=b<<4,b=65535&(C>>>16^x),x^=b,C^=b<<16,b=858993459&(x>>>2^C),C^=b,x^=b<<2,b=16711935&(x>>>8^C),C^=b,x^=b<<8,b=1431655765&(C>>>1^x),x^=b,C^=b<<1,C=C<<1|C>>>31,x=x<<1|x>>>31,y=0;y>>4|x<<28)^e[_+1],b=C,C=x,x=b^(c[E>>>24&63]|s[E>>>16&63]|d[E>>>8&63]|m[63&E]|l[k>>>24&63]|h[k>>>16&63]|p[k>>>8&63]|v[63&k]);b=C,C=x,x=b}C=C>>>1|C<<31,x=x>>>1|x<<31,b=1431655765&(C>>>1^x),x^=b,C^=b<<1,b=16711935&(x>>>8^C),C^=b,x^=b<<8,b=858993459&(x>>>2^C),C^=b,x^=b<<2,b=65535&(C>>>16^x),x^=b,C^=b<<16,b=252645135&(C>>>4^x),x^=b,C^=b<<4,r===1&&(n?(P=C,M=x):(C^=w,x^=T)),oe[Pe++]=C>>>24,oe[Pe++]=C>>>16&255,oe[Pe++]=C>>>8&255,oe[Pe++]=255&C,oe[Pe++]=x>>>24,oe[Pe++]=x>>>16&255,oe[Pe++]=x>>>8&255,oe[Pe++]=255&x}return n||(oe=function(he,ye){let de,Se=null;if(ye===2)de=32;else if(ye===1)Se=he[he.length-1];else{if(ye)throw Error("des: invalid padding");de=0}if(!Se){for(Se=1;he[he.length-Se]===de;)Se++;Se--}return he.subarray(0,he.length-Se)}(oe,a)),oe}function _f(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],l=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],h=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],s=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],p=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],v=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],m=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],_=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length>8?3:1,b=Array(32*y),E=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let k,C,x,D=0,P=0;for(let w=0;w>>4^T),T^=x,M^=x<<4,x=65535&(T>>>-16^M),M^=x,T^=x<<-16,x=858993459&(M>>>2^T),T^=x,M^=x<<2,x=65535&(T>>>-16^M),M^=x,T^=x<<-16,x=1431655765&(M>>>1^T),T^=x,M^=x<<1,x=16711935&(T>>>8^M),M^=x,T^=x<<8,x=1431655765&(M>>>1^T),T^=x,M^=x<<1,x=M<<8|T>>>20&240,M=T<<24|T<<8&16711680|T>>>8&65280|T>>>24&240,T=x;for(let R=0;R<16;R++)E[R]?(M=M<<2|M>>>26,T=T<<2|T>>>26):(M=M<<1|M>>>27,T=T<<1|T>>>27),M&=-15,T&=-15,k=t[M>>>28]|n[M>>>24&15]|r[M>>>20&15]|i[M>>>16&15]|a[M>>>12&15]|l[M>>>8&15]|c[M>>>4&15],C=h[T>>>28]|s[T>>>24&15]|p[T>>>20&15]|d[T>>>16&15]|v[T>>>12&15]|m[T>>>8&15]|_[T>>>4&15],x=65535&(C>>>16^k),b[P++]=k^x,b[P++]=C^x<<16}return b}function Yd(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(t){return gf(_f(this.key[2]),gf(_f(this.key[1]),gf(_f(this.key[0]),t,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function eG(){this.BlockSize=8,this.KeySize=16,this.setKey=function(l){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),l.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(l),!0},this.reset=function(){for(let l=0;l<16;l++)this.masking[l]=0,this.rotate[l]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(l){const c=Array(l.length);for(let h=0;h>>24&255,c[h+1]=d>>>16&255,c[h+2]=d>>>8&255,c[h+3]=255&d,c[h+4]=p>>>24&255,c[h+5]=p>>>16&255,c[h+6]=p>>>8&255,c[h+7]=255&p}return c},this.decrypt=function(l){const c=Array(l.length);for(let h=0;h>>24&255,c[h+1]=d>>>16&255,c[h+2]=d>>>8&255,c[h+3]=255&d,c[h+4]=p>>>24&255,c[h+5]=p>>16&255,c[h+6]=p>>8&255,c[h+7]=255&p}return c};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function n(l,c,h){const s=c+l,p=s<>>32-h;return(a[0][p>>>24]^a[1][p>>>16&255])-a[2][p>>>8&255]+a[3][255&p]}function r(l,c,h){const s=c^l,p=s<>>32-h;return a[0][p>>>24]-a[1][p>>>16&255]+a[2][p>>>8&255]^a[3][255&p]}function i(l,c,h){const s=c-l,p=s<>>32-h;return(a[0][p>>>24]+a[1][p>>>16&255]^a[2][p>>>8&255])-a[3][255&p]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(l){const c=[,,,,,,,,],h=Array(32);let s;for(let m=0;m<4;m++)s=4*m,c[m]=l[s]<<24|l[s+1]<<16|l[s+2]<<8|l[s+3];const p=[6,7,4,5];let d,v=0;for(let m=0;m<2;m++)for(let _=0;_<4;_++){for(s=0;s<4;s++){const y=e[_][s];d=c[y[1]],d^=a[4][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=a[5][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=a[6][c[y[4]>>>2]>>>24-8*(3&y[4])&255],d^=a[7][c[y[5]>>>2]>>>24-8*(3&y[5])&255],d^=a[p[s]][c[y[6]>>>2]>>>24-8*(3&y[6])&255],c[y[0]]=d}for(s=0;s<4;s++){const y=t[_][s];d=a[4][c[y[0]>>>2]>>>24-8*(3&y[0])&255],d^=a[5][c[y[1]>>>2]>>>24-8*(3&y[1])&255],d^=a[6][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=a[7][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=a[4+s][c[y[4]>>>2]>>>24-8*(3&y[4])&255],h[v]=d,v++}}for(let m=0;m<16;m++)this.masking[m]=h[m],this.rotate[m]=31&h[16+m]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Xd(e){this.cast5=new eG,this.cast5.setKey(e),this.encrypt=function(t){return this.cast5.encrypt(t)}}Yd.keySize=Yd.prototype.keySize=24,Yd.blockSize=Yd.prototype.blockSize=8,Xd.blockSize=Xd.prototype.blockSize=8,Xd.keySize=Xd.prototype.keySize=16;const Aa=4294967295;function Cs(e,t){return(e<>>32-t)&Aa}function io(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Fo(e,t,n){e.splice(t,4,255&n,n>>>8&255,n>>>16&255,n>>>24&255)}function wn(e,t){return e>>>8*t&255}function Jd(e){this.tf=function(){let t=null,n=null,r=-1,i=[],a=[[],[],[],[]];function l(p){return a[0][wn(p,0)]^a[1][wn(p,1)]^a[2][wn(p,2)]^a[3][wn(p,3)]}function c(p){return a[0][wn(p,3)]^a[1][wn(p,0)]^a[2][wn(p,1)]^a[3][wn(p,2)]}function h(p,d){let v=l(d[0]),m=c(d[1]);d[2]=Cs(d[2]^v+m+i[4*p+8]&Aa,31),d[3]=Cs(d[3],1)^v+2*m+i[4*p+9]&Aa,v=l(d[2]),m=c(d[3]),d[0]=Cs(d[0]^v+m+i[4*p+10]&Aa,31),d[1]=Cs(d[1],1)^v+2*m+i[4*p+11]&Aa}function s(p,d){let v=l(d[0]),m=c(d[1]);d[2]=Cs(d[2],1)^v+m+i[4*p+10]&Aa,d[3]=Cs(d[3]^v+2*m+i[4*p+11]&Aa,31),v=l(d[2]),m=c(d[3]),d[0]=Cs(d[0],1)^v+m+i[4*p+8]&Aa,d[1]=Cs(d[1]^v+2*m+i[4*p+9]&Aa,31)}return{name:"twofish",blocksize:16,open:function(p){let d,v,m,_,y;t=p;const b=[],E=[],k=[];let C;const x=[];let D,P,w;const M=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],T=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],R=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],K=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],N=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],z=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],U=[[],[]],oe=[[],[],[],[]];function Pe(X){return X^X>>2^[0,90,180,238][3&X]}function he(X){return X^X>>1^X>>2^[0,238,180,90][3&X]}function ye(X,se){let Ce,be,re;for(Ce=0;Ce<8;Ce++)be=se>>>24,se=se<<8&Aa|X>>>24,X=X<<8&Aa,re=be<<1,128&be&&(re^=333),se^=be^re<<16,re^=be>>>1,1&be&&(re^=166),se^=re<<24|re<<8;return se}function de(X,se){const Ce=se>>4,be=15&se,re=M[X][Ce^be],Q=T[X][N[be]^z[Ce]];return K[X][N[Q]^z[re]]<<4|R[X][re^Q]}function Se(X,se){let Ce=wn(X,0),be=wn(X,1),re=wn(X,2),Q=wn(X,3);switch(C){case 4:Ce=U[1][Ce]^wn(se[3],0),be=U[0][be]^wn(se[3],1),re=U[0][re]^wn(se[3],2),Q=U[1][Q]^wn(se[3],3);case 3:Ce=U[1][Ce]^wn(se[2],0),be=U[1][be]^wn(se[2],1),re=U[0][re]^wn(se[2],2),Q=U[0][Q]^wn(se[2],3);case 2:Ce=U[0][U[0][Ce]^wn(se[1],0)]^wn(se[0],0),be=U[0][U[1][be]^wn(se[1],1)]^wn(se[0],1),re=U[1][U[0][re]^wn(se[1],2)]^wn(se[0],2),Q=U[1][U[1][Q]^wn(se[1],3)]^wn(se[0],3)}return oe[0][Ce]^oe[1][be]^oe[2][re]^oe[3][Q]}for(t=t.slice(0,32),d=t.length;d!==16&&d!==24&&d!==32;)t[d++]=0;for(d=0;d>2]=io(t,d);for(d=0;d<256;d++)U[0][d]=de(0,d),U[1][d]=de(1,d);for(d=0;d<256;d++)D=U[1][d],P=Pe(D),w=he(D),oe[0][d]=D+(P<<8)+(w<<16)+(w<<24),oe[2][d]=P+(w<<8)+(D<<16)+(w<<24),D=U[0][d],P=Pe(D),w=he(D),oe[1][d]=w+(w<<8)+(P<<16)+(D<<24),oe[3][d]=P+(D<<8)+(w<<16)+(P<<24);for(C=k.length/2,d=0;d=0;m--)s(m,v);Fo(n,r,v[2]^i[0]),Fo(n,r+4,v[3]^i[1]),Fo(n,r+8,v[0]^i[2]),Fo(n,r+12,v[1]^i[3]),r+=16},finalize:function(){return n}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(t){return this.tf.encrypt(Array.from(t),0)}}function Ya(){}function Zd(e){this.bf=new Ya,this.bf.init(e),this.encrypt=function(t){return this.bf.encryptBlock(t)}}Jd.keySize=Jd.prototype.keySize=32,Jd.blockSize=Jd.prototype.blockSize=16,Ya.prototype.BLOCKSIZE=8,Ya.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Ya.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Ya.prototype.NN=16,Ya.prototype._clean=function(e){return e<0&&(e=(2147483647&e)+2147483648),e},Ya.prototype._F=function(e){let t;const n=255&e,r=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][r],t+=this.sboxes[3][n],t},Ya.prototype._encryptBlock=function(e){let t,n=e[0],r=e[1];for(t=0;t>>24-8*t&255,i[t+r]=n[1]>>>24-8*t&255;return i},Ya.prototype._decryptBlock=function(e){let t,n=e[0],r=e[1];for(t=this.NN+1;t>1;--t){n^=this.parray[t],r=this._F(n)^r;const i=n;n=r,r=i}n^=this.parray[1],r^=this.parray[0],e[0]=this._clean(r),e[1]=this._clean(n)},Ya.prototype.init=function(e){let t,n=0;for(this.parray=[],t=0;t=e.length&&(n=0);this.parray[t]=this.PARRAY[t]^i}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],n=0;n<256;++n)this.sboxes[t][n]=this.SBOXES[t][n];const r=[0,0];for(t=0;t>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=ye+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=de+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Se+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=X+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=se+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Ce+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=be+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=re+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Q+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=F+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=I+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Z+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=q+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=pe+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Ee+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=q^re^de^he,De=me<<1|me>>>31,V=De+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=pe^Q^Se^ye,ge=me<<1|me>>>31,V=ge+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ee^F^X^de,le=me<<1|me>>>31,V=le+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=De^I^se^Se,B=me<<1|me>>>31,V=B+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ge^Z^Ce^X,H=me<<1|me>>>31,V=H+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=le^q^be^se,W=me<<1|me>>>31,V=W+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=B^pe^re^Ce,ee=me<<1|me>>>31,V=ee+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=H^Ee^Q^be,ue=me<<1|me>>>31,V=ue+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=W^De^F^re,xe=me<<1|me>>>31,V=xe+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ee^ge^I^Q,fe=me<<1|me>>>31,V=fe+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ue^le^Z^F,ce=me<<1|me>>>31,V=ce+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=xe^B^q^I,Ve=me<<1|me>>>31,V=Ve+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=fe^H^pe^Z,Je=me<<1|me>>>31,V=Je+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ce^W^Ee^q,vt=me<<1|me>>>31,V=vt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ve^ee^De^pe,xt=me<<1|me>>>31,V=xt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Je^ue^ge^Ee,kt=me<<1|me>>>31,V=kt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=vt^xe^le^De,Nt=me<<1|me>>>31,V=Nt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=xt^fe^B^ge,pt=me<<1|me>>>31,V=pt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=kt^ce^H^le,It=me<<1|me>>>31,V=It+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Nt^Ve^W^B,Ot=me<<1|me>>>31,V=Ot+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=pt^Je^ee^H,hn=me<<1|me>>>31,V=hn+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=It^vt^ue^W,qt=me<<1|me>>>31,V=qt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ot^xt^xe^ee,Zt=me<<1|me>>>31,V=Zt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=hn^kt^fe^ue,Qt=me<<1|me>>>31,V=Qt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=qt^Nt^ce^xe,Yt=me<<1|me>>>31,V=Yt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Zt^pt^Ve^fe,Ut=me<<1|me>>>31,V=Ut+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Qt^It^Je^ce,Xt=me<<1|me>>>31,V=Xt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Yt^Ot^vt^Ve,rn=me<<1|me>>>31,V=rn+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ut^hn^xt^Je,tt=me<<1|me>>>31,V=tt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Xt^qt^kt^vt,it=me<<1|me>>>31,V=it+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=rn^Zt^Nt^xt,yt=me<<1|me>>>31,V=yt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=tt^Qt^pt^kt,Ft=me<<1|me>>>31,V=Ft+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=it^Yt^It^Nt,Oe=me<<1|me>>>31,V=Oe+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=yt^Ut^Ot^pt,Fe=me<<1|me>>>31,V=Fe+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ft^Xt^hn^It,Ue=me<<1|me>>>31,V=Ue+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Oe^rn^qt^Ot,Re=me<<1|me>>>31,V=Re+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Fe^tt^Zt^hn,nt=me<<1|me>>>31,V=nt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ue^it^Qt^qt,ot=me<<1|me>>>31,V=ot+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Re^yt^Yt^Zt,ht=me<<1|me>>>31,V=ht+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=nt^Ft^Ut^Qt,_t=me<<1|me>>>31,V=_t+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ot^Oe^Xt^Yt,Pt=me<<1|me>>>31,V=Pt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ht^Fe^rn^Ut,jt=me<<1|me>>>31,V=jt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=_t^Ue^tt^Xt,Gt=me<<1|me>>>31,V=Gt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Pt^Re^it^rn,$t=me<<1|me>>>31,V=$t+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=jt^nt^yt^tt,tn=me<<1|me>>>31,V=tn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Gt^ot^Ft^it,nn=me<<1|me>>>31,V=nn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=$t^ht^Oe^yt,an=me<<1|me>>>31,V=an+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=tn^_t^Fe^Ft,On=me<<1|me>>>31,V=On+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=nn^Pt^Ue^Oe,hr=me<<1|me>>>31,V=hr+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=an^jt^Re^Fe,br=me<<1|me>>>31,V=br+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=On^Gt^nt^Ue,Vn=me<<1|me>>>31,V=Vn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=hr^$t^ot^Re,Qn=me<<1|me>>>31,V=Qn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=br^tn^ht^nt,Ur=me<<1|me>>>31,V=Ur+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Vn^nn^_t^ot,wr=me<<1|me>>>31,V=wr+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Qn^an^Pt^ht,Bi=me<<1|me>>>31,V=Bi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ur^On^jt^_t,fi=me<<1|me>>>31,V=fi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=wr^hr^Gt^Pt,ki=me<<1|me>>>31,V=ki+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Bi^br^$t^jt,na=me<<1|me>>>31,V=na+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=fi^Vn^tn^Gt,Na=me<<1|me>>>31,V=Na+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ki^Qn^nn^$t,Oi=me<<1|me>>>31,V=Oi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=na^Ur^an^tn,ra=me<<1|me>>>31,V=ra+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Na^wr^On^nn,hi=me<<1|me>>>31,V=hi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Oi^Bi^hr^an,Ie=me<<1|me>>>31,V=Ie+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ra^fi^br^On,je=me<<1|me>>>31,V=je+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,r=r+J|0,i=i+Y|0,a=a+ae|0,l=l+te|0,c=c+Ae|0}function P(he){he=he|0,D(x[he|0]<<24|x[he|1]<<16|x[he|2]<<8|x[he|3],x[he|4]<<24|x[he|5]<<16|x[he|6]<<8|x[he|7],x[he|8]<<24|x[he|9]<<16|x[he|10]<<8|x[he|11],x[he|12]<<24|x[he|13]<<16|x[he|14]<<8|x[he|15],x[he|16]<<24|x[he|17]<<16|x[he|18]<<8|x[he|19],x[he|20]<<24|x[he|21]<<16|x[he|22]<<8|x[he|23],x[he|24]<<24|x[he|25]<<16|x[he|26]<<8|x[he|27],x[he|28]<<24|x[he|29]<<16|x[he|30]<<8|x[he|31],x[he|32]<<24|x[he|33]<<16|x[he|34]<<8|x[he|35],x[he|36]<<24|x[he|37]<<16|x[he|38]<<8|x[he|39],x[he|40]<<24|x[he|41]<<16|x[he|42]<<8|x[he|43],x[he|44]<<24|x[he|45]<<16|x[he|46]<<8|x[he|47],x[he|48]<<24|x[he|49]<<16|x[he|50]<<8|x[he|51],x[he|52]<<24|x[he|53]<<16|x[he|54]<<8|x[he|55],x[he|56]<<24|x[he|57]<<16|x[he|58]<<8|x[he|59],x[he|60]<<24|x[he|61]<<16|x[he|62]<<8|x[he|63])}function w(he){he=he|0,x[he|0]=r>>>24,x[he|1]=r>>>16&255,x[he|2]=r>>>8&255,x[he|3]=r&255,x[he|4]=i>>>24,x[he|5]=i>>>16&255,x[he|6]=i>>>8&255,x[he|7]=i&255,x[he|8]=a>>>24,x[he|9]=a>>>16&255,x[he|10]=a>>>8&255,x[he|11]=a&255,x[he|12]=l>>>24,x[he|13]=l>>>16&255,x[he|14]=l>>>8&255,x[he|15]=l&255,x[he|16]=c>>>24,x[he|17]=c>>>16&255,x[he|18]=c>>>8&255,x[he|19]=c&255}function M(){r=1732584193,i=4023233417,a=2562383102,l=271733878,c=3285377520,h=s=0}function T(he,ye,de,Se,X,se,Ce){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0,se=se|0,Ce=Ce|0,r=he,i=ye,a=de,l=Se,c=X,h=se,s=Ce}function R(he,ye){he=he|0,ye=ye|0;var de=0;if(he&63)return-1;for(;(ye|0)>=64;)P(he),he=he+64|0,ye=ye-64|0,de=de+64|0;return h=h+de|0,h>>>0>>0&&(s=s+1|0),de|0}function K(he,ye,de){he=he|0,ye=ye|0,de=de|0;var Se=0,X=0;if(he&63||~de&&de&31)return-1;if((ye|0)>=64){if(Se=R(he,ye)|0,(Se|0)==-1)return-1;he=he+Se|0,ye=ye-Se|0}if(Se=Se+ye|0,h=h+ye|0,h>>>0>>0&&(s=s+1|0),x[he|ye]=128,(ye|0)>=56){for(X=ye+1|0;(X|0)<64;X=X+1|0)x[he|X]=0;P(he),ye=0,x[he|0]=0}for(X=ye+1|0;(X|0)<59;X=X+1|0)x[he|X]=0;return x[he|56]=s>>>21&255,x[he|57]=s>>>13&255,x[he|58]=s>>>5&255,x[he|59]=s<<3&255|h>>>29,x[he|60]=h>>>21&255,x[he|61]=h>>>13&255,x[he|62]=h>>>5&255,x[he|63]=h<<3&255,P(he),~de&&w(de),Se|0}function N(){r=p,i=d,a=v,l=m,c=_,h=64,s=0}function z(){r=y,i=b,a=E,l=k,c=C,h=64,s=0}function U(he,ye,de,Se,X,se,Ce,be,re,Q,F,I,Z,q,pe,Ee){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0,se=se|0,Ce=Ce|0,be=be|0,re=re|0,Q=Q|0,F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,M(),D(he^1549556828,ye^1549556828,de^1549556828,Se^1549556828,X^1549556828,se^1549556828,Ce^1549556828,be^1549556828,re^1549556828,Q^1549556828,F^1549556828,I^1549556828,Z^1549556828,q^1549556828,pe^1549556828,Ee^1549556828),y=r,b=i,E=a,k=l,C=c,M(),D(he^909522486,ye^909522486,de^909522486,Se^909522486,X^909522486,se^909522486,Ce^909522486,be^909522486,re^909522486,Q^909522486,F^909522486,I^909522486,Z^909522486,q^909522486,pe^909522486,Ee^909522486),p=r,d=i,v=a,m=l,_=c,h=64,s=0}function oe(he,ye,de){he=he|0,ye=ye|0,de=de|0;var Se=0,X=0,se=0,Ce=0,be=0,re=0;return he&63||~de&&de&31?-1:(re=K(he,ye,-1)|0,Se=r,X=i,se=a,Ce=l,be=c,z(),D(Se,X,se,Ce,be,2147483648,0,0,0,0,0,0,0,0,0,672),~de&&w(de),re|0)}function Pe(he,ye,de,Se,X){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0;var se=0,Ce=0,be=0,re=0,Q=0,F=0,I=0,Z=0,q=0,pe=0;if(he&63||~X&&X&31)return-1;for(x[he+ye|0]=de>>>24,x[he+ye+1|0]=de>>>16&255,x[he+ye+2|0]=de>>>8&255,x[he+ye+3|0]=de&255,oe(he,ye+4|0,-1)|0,se=F=r,Ce=I=i,be=Z=a,re=q=l,Q=pe=c,Se=Se-1|0;(Se|0)>0;)N(),D(F,I,Z,q,pe,2147483648,0,0,0,0,0,0,0,0,0,672),F=r,I=i,Z=a,q=l,pe=c,z(),D(F,I,Z,q,pe,2147483648,0,0,0,0,0,0,0,0,0,672),F=r,I=i,Z=a,q=l,pe=c,se=se^r,Ce=Ce^i,be=be^a,re=re^l,Q=Q^c,Se=Se-1|0;return r=se,i=Ce,a=be,l=re,c=Q,~X&&w(X),0}return{reset:M,init:T,process:R,finish:K,hmac_reset:N,hmac_init:U,hmac_finish:oe,pbkdf2_generate_block:Pe}};class fP{constructor(){this.pos=0,this.len=0}reset(){const{asm:t}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,t.reset(),this}process(t){if(this.result!==null)throw new Sb("state must be reset before processing new data");const{asm:n,heap:r}=this.acquire_asm();let i=this.pos,a=this.len,l=0,c=t.length,h=0;for(;c>0;)h=Zl(r,i+a,t,l,c),a+=h,l+=h,c-=h,h=n.process(i,a),i+=h,a-=h,a||(i=0);return this.pos=i,this.len=a,this}finish(){if(this.result!==null)throw new Sb("state must be reset before processing new data");const{asm:t,heap:n}=this.acquire_asm();return t.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(n.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const HD=[],KD=[];class Ql extends fP{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=HD.pop()||w2(),this.asm=KD.pop()||dP({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(HD.push(this.heap),KD.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new Ql().process(t).finish().result}}Ql.NAME="sha1",Ql.heap_pool=[],Ql.asm_pool=[],Ql.asm_function=dP;const GD=[],YD=[];class i_ extends fP{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=GD.pop()||w2(),this.asm=YD.pop()||function(t,n,r){var i=0,a=0,l=0,c=0,h=0,s=0,p=0,d=0,v=0,m=0,_=0,y=0,b=0,E=0,k=0,C=0,x=0,D=0,P=0,w=0,M=0,T=0,R=0,K=0,N=0,z=0,U=new t.Uint8Array(r);function oe(F,I,Z,q,pe,Ee,J,Y,ae,te,Ae,me,V,De,ge,le){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,Ae=Ae|0,me=me|0,V=V|0,De=De|0,ge=ge|0,le=le|0;var B=0,H=0,W=0,ee=0,ue=0,xe=0,fe=0,ce=0;B=i,H=a,W=l,ee=c,ue=h,xe=s,fe=p,ce=d,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+1116352408|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+1899447441|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+3049323471|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3921009573|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+961987163|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1508970993|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2453635748|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+2870763221|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+3624381080|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+310598401|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+607225278|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+1426881987|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+1925078388|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+2162078206|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2614888103|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+3248222580|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+3835390401|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+4022224774|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+264347078|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+604807628|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+770255983|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1249150122|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+1555081692|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+1996064986|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+2554220882|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2821834349|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+2952996808|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3210313671|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+3336571891|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+3584528711|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+113926993|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+338241895|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+666307205|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+773529912|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+1294757372|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+1396182291|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+1695183700|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1986661051|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2177026350|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+2456956037|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+2730485921|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2820302411|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+3259730800|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3345764771|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+3516065817|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+3600352804|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+4094571909|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+275423344|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+430227734|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+506948616|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+659060556|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+883997877|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+958139571|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1322822218|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+1537002063|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+1747873779|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+1955562222|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2024104815|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+2227730452|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+2361852424|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+2428436474|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+2756734187|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+3204031479|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+3329325298|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,i=i+B|0,a=a+H|0,l=l+W|0,c=c+ee|0,h=h+ue|0,s=s+xe|0,p=p+fe|0,d=d+ce|0}function Pe(F){F=F|0,oe(U[F|0]<<24|U[F|1]<<16|U[F|2]<<8|U[F|3],U[F|4]<<24|U[F|5]<<16|U[F|6]<<8|U[F|7],U[F|8]<<24|U[F|9]<<16|U[F|10]<<8|U[F|11],U[F|12]<<24|U[F|13]<<16|U[F|14]<<8|U[F|15],U[F|16]<<24|U[F|17]<<16|U[F|18]<<8|U[F|19],U[F|20]<<24|U[F|21]<<16|U[F|22]<<8|U[F|23],U[F|24]<<24|U[F|25]<<16|U[F|26]<<8|U[F|27],U[F|28]<<24|U[F|29]<<16|U[F|30]<<8|U[F|31],U[F|32]<<24|U[F|33]<<16|U[F|34]<<8|U[F|35],U[F|36]<<24|U[F|37]<<16|U[F|38]<<8|U[F|39],U[F|40]<<24|U[F|41]<<16|U[F|42]<<8|U[F|43],U[F|44]<<24|U[F|45]<<16|U[F|46]<<8|U[F|47],U[F|48]<<24|U[F|49]<<16|U[F|50]<<8|U[F|51],U[F|52]<<24|U[F|53]<<16|U[F|54]<<8|U[F|55],U[F|56]<<24|U[F|57]<<16|U[F|58]<<8|U[F|59],U[F|60]<<24|U[F|61]<<16|U[F|62]<<8|U[F|63])}function he(F){F=F|0,U[F|0]=i>>>24,U[F|1]=i>>>16&255,U[F|2]=i>>>8&255,U[F|3]=i&255,U[F|4]=a>>>24,U[F|5]=a>>>16&255,U[F|6]=a>>>8&255,U[F|7]=a&255,U[F|8]=l>>>24,U[F|9]=l>>>16&255,U[F|10]=l>>>8&255,U[F|11]=l&255,U[F|12]=c>>>24,U[F|13]=c>>>16&255,U[F|14]=c>>>8&255,U[F|15]=c&255,U[F|16]=h>>>24,U[F|17]=h>>>16&255,U[F|18]=h>>>8&255,U[F|19]=h&255,U[F|20]=s>>>24,U[F|21]=s>>>16&255,U[F|22]=s>>>8&255,U[F|23]=s&255,U[F|24]=p>>>24,U[F|25]=p>>>16&255,U[F|26]=p>>>8&255,U[F|27]=p&255,U[F|28]=d>>>24,U[F|29]=d>>>16&255,U[F|30]=d>>>8&255,U[F|31]=d&255}function ye(){i=1779033703,a=3144134277,l=1013904242,c=2773480762,h=1359893119,s=2600822924,p=528734635,d=1541459225,v=m=0}function de(F,I,Z,q,pe,Ee,J,Y,ae,te){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,i=F,a=I,l=Z,c=q,h=pe,s=Ee,p=J,d=Y,v=ae,m=te}function Se(F,I){F=F|0,I=I|0;var Z=0;if(F&63)return-1;for(;(I|0)>=64;)Pe(F),F=F+64|0,I=I-64|0,Z=Z+64|0;return v=v+Z|0,v>>>0>>0&&(m=m+1|0),Z|0}function X(F,I,Z){F=F|0,I=I|0,Z=Z|0;var q=0,pe=0;if(F&63||~Z&&Z&31)return-1;if((I|0)>=64){if(q=Se(F,I)|0,(q|0)==-1)return-1;F=F+q|0,I=I-q|0}if(q=q+I|0,v=v+I|0,v>>>0>>0&&(m=m+1|0),U[F|I]=128,(I|0)>=56){for(pe=I+1|0;(pe|0)<64;pe=pe+1|0)U[F|pe]=0;Pe(F),I=0,U[F|0]=0}for(pe=I+1|0;(pe|0)<59;pe=pe+1|0)U[F|pe]=0;return U[F|56]=m>>>21&255,U[F|57]=m>>>13&255,U[F|58]=m>>>5&255,U[F|59]=m<<3&255|v>>>29,U[F|60]=v>>>21&255,U[F|61]=v>>>13&255,U[F|62]=v>>>5&255,U[F|63]=v<<3&255,Pe(F),~Z&&he(Z),q|0}function se(){i=_,a=y,l=b,c=E,h=k,s=C,p=x,d=D,v=64,m=0}function Ce(){i=P,a=w,l=M,c=T,h=R,s=K,p=N,d=z,v=64,m=0}function be(F,I,Z,q,pe,Ee,J,Y,ae,te,Ae,me,V,De,ge,le){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,Ae=Ae|0,me=me|0,V=V|0,De=De|0,ge=ge|0,le=le|0,ye(),oe(F^1549556828,I^1549556828,Z^1549556828,q^1549556828,pe^1549556828,Ee^1549556828,J^1549556828,Y^1549556828,ae^1549556828,te^1549556828,Ae^1549556828,me^1549556828,V^1549556828,De^1549556828,ge^1549556828,le^1549556828),P=i,w=a,M=l,T=c,R=h,K=s,N=p,z=d,ye(),oe(F^909522486,I^909522486,Z^909522486,q^909522486,pe^909522486,Ee^909522486,J^909522486,Y^909522486,ae^909522486,te^909522486,Ae^909522486,me^909522486,V^909522486,De^909522486,ge^909522486,le^909522486),_=i,y=a,b=l,E=c,k=h,C=s,x=p,D=d,v=64,m=0}function re(F,I,Z){F=F|0,I=I|0,Z=Z|0;var q=0,pe=0,Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0;return F&63||~Z&&Z&31?-1:(me=X(F,I,-1)|0,q=i,pe=a,Ee=l,J=c,Y=h,ae=s,te=p,Ae=d,Ce(),oe(q,pe,Ee,J,Y,ae,te,Ae,2147483648,0,0,0,0,0,0,768),~Z&&he(Z),me|0)}function Q(F,I,Z,q,pe){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0;var Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0,V=0,De=0,ge=0,le=0,B=0,H=0,W=0,ee=0,ue=0;if(F&63||~pe&&pe&31)return-1;for(U[F+I|0]=Z>>>24,U[F+I+1|0]=Z>>>16&255,U[F+I+2|0]=Z>>>8&255,U[F+I+3|0]=Z&255,re(F,I+4|0,-1)|0,Ee=De=i,J=ge=a,Y=le=l,ae=B=c,te=H=h,Ae=W=s,me=ee=p,V=ue=d,q=q-1|0;(q|0)>0;)se(),oe(De,ge,le,B,H,W,ee,ue,2147483648,0,0,0,0,0,0,768),De=i,ge=a,le=l,B=c,H=h,W=s,ee=p,ue=d,Ce(),oe(De,ge,le,B,H,W,ee,ue,2147483648,0,0,0,0,0,0,768),De=i,ge=a,le=l,B=c,H=h,W=s,ee=p,ue=d,Ee=Ee^i,J=J^a,Y=Y^l,ae=ae^c,te=te^h,Ae=Ae^s,me=me^p,V=V^d,q=q-1|0;return i=Ee,a=J,l=Y,c=ae,h=te,s=Ae,p=me,d=V,~pe&&he(pe),0}return{reset:ye,init:de,process:Se,finish:X,hmac_reset:se,hmac_init:be,hmac_finish:re,pbkdf2_generate_block:Q}}({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(GD.push(this.heap),YD.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new i_().process(t).finish().result}}i_.NAME="sha256";var a_=hP;function hP(e,t){if(!e)throw Error(t||"Assertion failed")}hP.equal=function(e,t,n){if(e!=t)throw Error(n||"Assertion failed: "+e+" != "+t)};var Qne=ba!==void 0?ba:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function x2(e,t){return e(t={exports:{}},t.exports),t.exports}function iG(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var aG=x2(function(e){e.exports=typeof Object.create=="function"?function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),sG=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>8,l=255&i;a?n.push(a,l):n.push(l)}else for(r=0;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}var lG=function(e,t){for(var n="",r=0;r>>0}return a},cG=function(e,t){for(var n=Array(4*e.length),r=0,i=0;r>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},Ln={inherits:aG,toArray:sG,toHex:oG,htonl:pP,toHex32:lG,zero2:vP,zero8:mP,join32:uG,split32:cG,rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,l=(a>>0,e[t+1]=a},sum64_hi:function(e,t,n,r){return(t+r>>>0>>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,a,l,c){var h=0,s=t;return h+=(s=s+r>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,n,r,i,a,l,c){return t+r+a+c>>>0},sum64_5_hi:function(e,t,n,r,i,a,l,c,h,s){var p=0,d=t;return p+=(d=d+r>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,n,r,i,a,l,c,h,s){return t+r+a+c+s>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function gm(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var dG=gm;gm.prototype.update=function(e,t){if(e=Ln.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Ln.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a>>3},g1_256:function(e){return xs(e,17)^xs(e,19)^e>>>10}},Ha=Ln.sum32,hG=Ln.sum32_4,pG=Ln.sum32_5,vG=Xc.ch32,mG=Xc.maj32,gG=Xc.s0_256,_G=Xc.s1_256,yG=Xc.g0_256,bG=Xc.g1_256,bP=S2.BlockHash,wG=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function As(){if(!(this instanceof As))return new As;bP.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=wG,this.W=Array(64)}Ln.inherits(As,bP);var wP=As;function fo(){if(!(this instanceof fo))return new fo;wP.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}As.blockSize=512,As.outSize=256,As.hmacStrength=192,As.padLength=64,As.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r>>32-i,n)}function mi(e,t,n,r,i,a,l){return o_(t&n|~t&r,e,t,i,a,l)}function gi(e,t,n,r,i,a,l){return o_(t&r|n&~r,e,t,i,a,l)}function _i(e,t,n,r,i,a,l){return o_(t^n^r,e,t,i,a,l)}function yi(e,t,n,r,i,a,l){return o_(n^(t|~r),e,t,i,a,l)}function GG(e){const t=[];let n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}const QD="0123456789abcdef".split("");function YG(e){let t="",n=0;for(;n<4;n++)t+=QD[e>>8*n+4&15]+QD[e>>8*n&15];return t}function qo(e,t){return e+t&4294967295}const ig=Te.getWebCrypto(),ag=Te.getNodeCrypto(),XG=ag&&ag.getHashes();function Fl(e){if(ag&&XG.includes(e))return async function(t){const n=ag.createHash(e);return Sr(t,r=>{n.update(r)},()=>new Uint8Array(n.digest()))}}function Av(e,t){return async function(n,r=Lt){if(Ar(n)&&(n=await Ir(n)),!Te.isStream(n)&&ig&&t&&n.length>=r.minBytesForWebCrypto)return new Uint8Array(await ig.digest(t,n));const i=e();return Sr(n,a=>{i.update(a)},()=>new Uint8Array(i.digest()))}}function qD(e,t){return async function(n,r=Lt){if(Ar(n)&&(n=await Ir(n)),Te.isStream(n)){const i=new e;return Sr(n,a=>{i.process(a)},()=>i.finish().result)}return ig&&t&&n.length>=r.minBytesForWebCrypto?new Uint8Array(await ig.digest(t,n)):e.bytes(n)}}const Bl={md5:Fl("md5")||async function(e){const t=function(n){const r=n.length,i=[1732584193,-271733879,-1732584194,271733878];let a;for(a=64;a<=n.length;a+=64)jy(i,GG(n.substring(a-64,a)));n=n.substring(a-64);const l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(a=0;a>2]|=n.charCodeAt(a)<<(a%4<<3);if(l[a>>2]|=128<<(a%4<<3),a>55)for(jy(i,l),a=0;a<16;a++)l[a]=0;return l[14]=8*r,jy(i,l),i}(Te.uint8ArrayToString(e));return Te.hexToUint8Array(function(n){for(let r=0;rnew Uint8Array(b.update(E)))}(e,t,n,r);if(a.substr(0,3)==="aes")return function(d,v,m,_,y){if(Te.getWebCrypto()&&v.length!==24&&!Te.isStream(m)&&m.length>=3e3*y.minBytesForWebCrypto)return async function(E,k,C,x){const D="AES-CBC",P=await ek.importKey("raw",k,{name:D},!1,["encrypt"]),{blockSize:w}=ul(E),M=Te.concatUint8Array([new Uint8Array(w),C]),T=new Uint8Array(await ek.encrypt({name:D,iv:x},P,M)).subarray(0,C.length);return function(R,K){for(let N=0;Nb.aes.AES_Encrypt_process(E),()=>b.aes.AES_Encrypt_finish())}(e,t,n,r,i);const l=new(ul(e))(t),c=l.blockSize,h=r.slice();let s=new Uint8Array;const p=d=>{d&&(s=Te.concatUint8Array([s,d]));const v=new Uint8Array(s.length);let m,_=0;for(;d?s.length>=c:s.length;){const y=l.encrypt(h);for(m=0;mnew Uint8Array(y.update(b)))}(e,t,n,r);if(i.substr(0,3)==="aes")return function(p,d,v,m){if(Te.isStream(v)){const _=new Dc(d,m);return Sr(v,y=>_.aes.AES_Decrypt_process(y),()=>_.aes.AES_Decrypt_finish())}return Dc.decrypt(v,d,m)}(0,t,n,r);const a=new(ul(e))(t),l=a.blockSize;let c=r,h=new Uint8Array;const s=p=>{p&&(h=Te.concatUint8Array([h,p]));const d=new Uint8Array(h.length);let v,m=0;for(;p?h.length>=l:h.length;){const _=a.encrypt(c);for(c=h,v=0;v48)throw new go("illegal counter size");let a=Math.pow(2,r)-1;i.set_mask(0,0,a/4294967296|0,0|a)}else r=48,i.set_mask(0,0,65535,4294967295);if(t===void 0)throw Error("nonce is required");{let a=t.length;if(!a||a>16)throw new go("illegal nonce size");let l=new DataView(new ArrayBuffer(16));new Uint8Array(l.buffer).set(t),i.set_nonce(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}if(n!==void 0){if(n<0||n>=Math.pow(2,r))throw new go("illegal counter value");i.set_counter(0,0,n/4294967296|0,0|n)}}}class lg{static encrypt(t,n,r=!0,i){return new lg(n,i,r).encrypt(t)}static decrypt(t,n,r=!0,i){return new lg(n,i,r).decrypt(t)}constructor(t,n,r=!0,i){this.aes=i||new ah(t,n,r,"CBC")}encrypt(t){return ml(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return ml(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}const tk=Te.getWebCrypto(),ZG=Te.getNodeCrypto(),lo=16;function nk(e,t){const n=e.length-lo;for(let r=0;r>3),17+(m>>3)),8-(7&m)).subarray(1),E=new Uint8Array($i),k=new Uint8Array(h.length+Vo);let C,x=0;for(C=0;C16)throw new go("illegal tagSize value");const h=n.length||0,s=new Uint8Array(16);h!==12?(this._gcm_mac_process(n),c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=0,c[11]=h>>>29,c[12]=h>>>21&255,c[13]=h>>>13&255,c[14]=h>>>5&255,c[15]=h<<3&255,l.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),l.get_iv(Tn.HEAP_DATA),l.set_iv(0,0,0,0),s.set(c.subarray(0,16))):(s.set(n),s[15]=1);const p=new DataView(s.buffer);if(this.gamma0=p.getUint32(12),l.set_nonce(p.getUint32(0),p.getUint32(4),p.getUint32(8),0),l.set_mask(0,0,0,4294967295),r!==void 0){if(r.length>Vy)throw new go("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");l.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(t,n,r,i,a){return new ql(n,r,i,a).encrypt(t)}static decrypt(t,n,r,i,a){return new ql(n,r,i,a).decrypt(t)}encrypt(t){return this.AES_GCM_encrypt(t)}decrypt(t){return this.AES_GCM_decrypt(t)}AES_GCM_Encrypt_process(t){let n=0,r=t.length||0,{asm:i,heap:a}=this.aes.acquire_asm(),l=this.counter,c=this.aes.pos,h=this.aes.len,s=0,p=h+r&-16,d=0;if((l-1<<4)+h+r>Vy)throw new RangeError("counter overflow");const v=new Uint8Array(p);for(;r>0;)d=Zl(a,c+h,t,n,r),h+=d,n+=d,r-=d,d=i.cipher(Tn.ENC.CTR,Tn.HEAP_DATA+c,h),d=i.mac(Tn.MAC.GCM,Tn.HEAP_DATA+c,d),d&&v.set(a.subarray(c,c+d),s),l+=d>>>4,s+=d,d>>29,n[4]=p>>>21,n[5]=p>>>13&255,n[6]=p>>>5&255,n[7]=p<<3&255,n[8]=n[9]=n[10]=0,n[11]=d>>>29,n[12]=d>>>21&255,n[13]=d>>>13&255,n[14]=d>>>5&255,n[15]=d<<3&255,t.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),t.get_iv(Tn.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(Tn.ENC.CTR,Tn.HEAP_DATA,16),h.set(n.subarray(0,i),c),this.counter=1,this.aes.pos=0,this.aes.len=0,h}AES_GCM_Decrypt_process(t){let n=0,r=t.length||0,{asm:i,heap:a}=this.aes.acquire_asm(),l=this.counter,c=this.tagSize,h=this.aes.pos,s=this.aes.len,p=0,d=s+r>c?s+r-c&-16:0,v=s+r-d,m=0;if((l-1<<4)+s+r>Vy)throw new RangeError("counter overflow");const _=new Uint8Array(d);for(;r>v;)m=Zl(a,h+s,t,n,r-v),s+=m,n+=m,r-=m,m=i.mac(Tn.MAC.GCM,Tn.HEAP_DATA+h,m),m=i.cipher(Tn.DEC.CTR,Tn.HEAP_DATA+h,m),m&&_.set(a.subarray(h,h+m),p),l+=m>>>4,p+=m,h=0,s=0;return r>0&&(s+=Zl(a,0,t,n,r)),this.counter=l,this.aes.pos=h,this.aes.len=s,_}AES_GCM_Decrypt_finish(){let{asm:t,heap:n}=this.aes.acquire_asm(),r=this.tagSize,i=this.adata,a=this.counter,l=this.aes.pos,c=this.aes.len,h=c-r;if(c>>29,n[4]=v>>>21,n[5]=v>>>13&255,n[6]=v>>>5&255,n[7]=v<<3&255,n[8]=n[9]=n[10]=0,n[11]=m>>>29,n[12]=m>>>21&255,n[13]=m>>>13&255,n[14]=m>>>5&255,n[15]=m<<3&255,t.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),t.get_iv(Tn.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(Tn.ENC.CTR,Tn.HEAP_DATA,16);let _=0;for(let y=0;y0;){for(l=Zl(r,0,t,i,a),i+=l,a-=l;15&l;)r[l++]=0;n.mac(Tn.MAC.GCM,Tn.HEAP_DATA,l)}}}const Wy=Te.getWebCrypto(),sk=Te.getNodeCrypto(),ok=Te.getNodeBuffer(),dc=16,Hy="AES-GCM";async function _c(e,t){if(e!==ve.symmetric.aes128&&e!==ve.symmetric.aes192&&e!==ve.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Te.getWebCrypto()&&t.length!==24){const n=await Wy.importKey("raw",t,{name:Hy},!1,["encrypt","decrypt"]);return{encrypt:async function(r,i,a=new Uint8Array){if(!r.length)return ql.encrypt(r,t,i,a);const l=await Wy.encrypt({name:Hy,iv:i,additionalData:a,tagLength:8*dc},n,r);return new Uint8Array(l)},decrypt:async function(r,i,a=new Uint8Array){if(r.length===dc)return ql.decrypt(r,t,i,a);const l=await Wy.decrypt({name:Hy,iv:i,additionalData:a,tagLength:8*dc},n,r);return new Uint8Array(l)}}}return Te.getNodeCrypto()?{encrypt:async function(n,r,i=new Uint8Array){const a=new sk.createCipheriv("aes-"+8*t.length+"-gcm",t,r);a.setAAD(i);const l=ok.concat([a.update(n),a.final(),a.getAuthTag()]);return new Uint8Array(l)},decrypt:async function(n,r,i=new Uint8Array){const a=new sk.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);a.setAAD(i),a.setAuthTag(n.slice(n.length-dc,n.length));const l=ok.concat([a.update(n.slice(0,n.length-dc)),a.final()]);return new Uint8Array(l)}}:{encrypt:async function(n,r,i){return ql.encrypt(n,t,r,i)},decrypt:async function(n,r,i){return ql.decrypt(n,t,r,i)}}}_c.getNonce=function(e,t){const n=e.slice();for(let r=0;r>>8)-1}(re,Q,F,I,32)}function _(re,Q){var F;for(F=0;F<16;F++)re[F]=0|Q[F]}function y(re){var Q,F,I=1;for(Q=0;Q<16;Q++)F=re[Q]+I+65535,I=Math.floor(F/65536),re[Q]=F-65536*I;re[0]+=I-1+37*(I-1)}function b(re,Q,F){for(var I,Z=~(F-1),q=0;q<16;q++)I=Z&(re[q]^Q[q]),re[q]^=I,Q[q]^=I}function E(re,Q){var F,I,Z,q=n(),pe=n();for(F=0;F<16;F++)pe[F]=Q[F];for(y(pe),y(pe),y(pe),I=0;I<2;I++){for(q[0]=pe[0]-65517,F=1;F<15;F++)q[F]=pe[F]-65535-(q[F-1]>>16&1),q[F-1]&=65535;q[15]=pe[15]-32767-(q[14]>>16&1),Z=q[15]>>16&1,q[14]&=65535,b(pe,q,1-Z)}for(F=0;F<16;F++)re[2*F]=255&pe[F],re[2*F+1]=pe[F]>>8}function k(re,Q){var F=new Uint8Array(32),I=new Uint8Array(32);return E(F,re),E(I,Q),m(F,0,I,0)}function C(re){var Q=new Uint8Array(32);return E(Q,re),1&Q[0]}function x(re,Q){var F;for(F=0;F<16;F++)re[F]=Q[2*F]+(Q[2*F+1]<<8);re[15]&=32767}function D(re,Q,F){for(var I=0;I<16;I++)re[I]=Q[I]+F[I]}function P(re,Q,F){for(var I=0;I<16;I++)re[I]=Q[I]-F[I]}function w(re,Q,F){var I,Z,q=0,pe=0,Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0,V=0,De=0,ge=0,le=0,B=0,H=0,W=0,ee=0,ue=0,xe=0,fe=0,ce=0,Ve=0,Je=0,vt=0,xt=0,kt=0,Nt=0,pt=0,It=0,Ot=0,hn=0,qt=F[0],Zt=F[1],Qt=F[2],Yt=F[3],Ut=F[4],Xt=F[5],rn=F[6],tt=F[7],it=F[8],yt=F[9],Ft=F[10],Oe=F[11],Fe=F[12],Ue=F[13],Re=F[14],nt=F[15];q+=(I=Q[0])*qt,pe+=I*Zt,Ee+=I*Qt,J+=I*Yt,Y+=I*Ut,ae+=I*Xt,te+=I*rn,Ae+=I*tt,me+=I*it,V+=I*yt,De+=I*Ft,ge+=I*Oe,le+=I*Fe,B+=I*Ue,H+=I*Re,W+=I*nt,pe+=(I=Q[1])*qt,Ee+=I*Zt,J+=I*Qt,Y+=I*Yt,ae+=I*Ut,te+=I*Xt,Ae+=I*rn,me+=I*tt,V+=I*it,De+=I*yt,ge+=I*Ft,le+=I*Oe,B+=I*Fe,H+=I*Ue,W+=I*Re,ee+=I*nt,Ee+=(I=Q[2])*qt,J+=I*Zt,Y+=I*Qt,ae+=I*Yt,te+=I*Ut,Ae+=I*Xt,me+=I*rn,V+=I*tt,De+=I*it,ge+=I*yt,le+=I*Ft,B+=I*Oe,H+=I*Fe,W+=I*Ue,ee+=I*Re,ue+=I*nt,J+=(I=Q[3])*qt,Y+=I*Zt,ae+=I*Qt,te+=I*Yt,Ae+=I*Ut,me+=I*Xt,V+=I*rn,De+=I*tt,ge+=I*it,le+=I*yt,B+=I*Ft,H+=I*Oe,W+=I*Fe,ee+=I*Ue,ue+=I*Re,xe+=I*nt,Y+=(I=Q[4])*qt,ae+=I*Zt,te+=I*Qt,Ae+=I*Yt,me+=I*Ut,V+=I*Xt,De+=I*rn,ge+=I*tt,le+=I*it,B+=I*yt,H+=I*Ft,W+=I*Oe,ee+=I*Fe,ue+=I*Ue,xe+=I*Re,fe+=I*nt,ae+=(I=Q[5])*qt,te+=I*Zt,Ae+=I*Qt,me+=I*Yt,V+=I*Ut,De+=I*Xt,ge+=I*rn,le+=I*tt,B+=I*it,H+=I*yt,W+=I*Ft,ee+=I*Oe,ue+=I*Fe,xe+=I*Ue,fe+=I*Re,ce+=I*nt,te+=(I=Q[6])*qt,Ae+=I*Zt,me+=I*Qt,V+=I*Yt,De+=I*Ut,ge+=I*Xt,le+=I*rn,B+=I*tt,H+=I*it,W+=I*yt,ee+=I*Ft,ue+=I*Oe,xe+=I*Fe,fe+=I*Ue,ce+=I*Re,Ve+=I*nt,Ae+=(I=Q[7])*qt,me+=I*Zt,V+=I*Qt,De+=I*Yt,ge+=I*Ut,le+=I*Xt,B+=I*rn,H+=I*tt,W+=I*it,ee+=I*yt,ue+=I*Ft,xe+=I*Oe,fe+=I*Fe,ce+=I*Ue,Ve+=I*Re,Je+=I*nt,me+=(I=Q[8])*qt,V+=I*Zt,De+=I*Qt,ge+=I*Yt,le+=I*Ut,B+=I*Xt,H+=I*rn,W+=I*tt,ee+=I*it,ue+=I*yt,xe+=I*Ft,fe+=I*Oe,ce+=I*Fe,Ve+=I*Ue,Je+=I*Re,vt+=I*nt,V+=(I=Q[9])*qt,De+=I*Zt,ge+=I*Qt,le+=I*Yt,B+=I*Ut,H+=I*Xt,W+=I*rn,ee+=I*tt,ue+=I*it,xe+=I*yt,fe+=I*Ft,ce+=I*Oe,Ve+=I*Fe,Je+=I*Ue,vt+=I*Re,xt+=I*nt,De+=(I=Q[10])*qt,ge+=I*Zt,le+=I*Qt,B+=I*Yt,H+=I*Ut,W+=I*Xt,ee+=I*rn,ue+=I*tt,xe+=I*it,fe+=I*yt,ce+=I*Ft,Ve+=I*Oe,Je+=I*Fe,vt+=I*Ue,xt+=I*Re,kt+=I*nt,ge+=(I=Q[11])*qt,le+=I*Zt,B+=I*Qt,H+=I*Yt,W+=I*Ut,ee+=I*Xt,ue+=I*rn,xe+=I*tt,fe+=I*it,ce+=I*yt,Ve+=I*Ft,Je+=I*Oe,vt+=I*Fe,xt+=I*Ue,kt+=I*Re,Nt+=I*nt,le+=(I=Q[12])*qt,B+=I*Zt,H+=I*Qt,W+=I*Yt,ee+=I*Ut,ue+=I*Xt,xe+=I*rn,fe+=I*tt,ce+=I*it,Ve+=I*yt,Je+=I*Ft,vt+=I*Oe,xt+=I*Fe,kt+=I*Ue,Nt+=I*Re,pt+=I*nt,B+=(I=Q[13])*qt,H+=I*Zt,W+=I*Qt,ee+=I*Yt,ue+=I*Ut,xe+=I*Xt,fe+=I*rn,ce+=I*tt,Ve+=I*it,Je+=I*yt,vt+=I*Ft,xt+=I*Oe,kt+=I*Fe,Nt+=I*Ue,pt+=I*Re,It+=I*nt,H+=(I=Q[14])*qt,W+=I*Zt,ee+=I*Qt,ue+=I*Yt,xe+=I*Ut,fe+=I*Xt,ce+=I*rn,Ve+=I*tt,Je+=I*it,vt+=I*yt,xt+=I*Ft,kt+=I*Oe,Nt+=I*Fe,pt+=I*Ue,It+=I*Re,Ot+=I*nt,W+=(I=Q[15])*qt,pe+=38*(ue+=I*Qt),Ee+=38*(xe+=I*Yt),J+=38*(fe+=I*Ut),Y+=38*(ce+=I*Xt),ae+=38*(Ve+=I*rn),te+=38*(Je+=I*tt),Ae+=38*(vt+=I*it),me+=38*(xt+=I*yt),V+=38*(kt+=I*Ft),De+=38*(Nt+=I*Oe),ge+=38*(pt+=I*Fe),le+=38*(It+=I*Ue),B+=38*(Ot+=I*Re),H+=38*(hn+=I*nt),q=(I=(q+=38*(ee+=I*Zt))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),pe=(I=pe+Z+65535)-65536*(Z=Math.floor(I/65536)),Ee=(I=Ee+Z+65535)-65536*(Z=Math.floor(I/65536)),J=(I=J+Z+65535)-65536*(Z=Math.floor(I/65536)),Y=(I=Y+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),te=(I=te+Z+65535)-65536*(Z=Math.floor(I/65536)),Ae=(I=Ae+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),V=(I=V+Z+65535)-65536*(Z=Math.floor(I/65536)),De=(I=De+Z+65535)-65536*(Z=Math.floor(I/65536)),ge=(I=ge+Z+65535)-65536*(Z=Math.floor(I/65536)),le=(I=le+Z+65535)-65536*(Z=Math.floor(I/65536)),B=(I=B+Z+65535)-65536*(Z=Math.floor(I/65536)),H=(I=H+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=(q+=Z-1+37*(Z-1))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),pe=(I=pe+Z+65535)-65536*(Z=Math.floor(I/65536)),Ee=(I=Ee+Z+65535)-65536*(Z=Math.floor(I/65536)),J=(I=J+Z+65535)-65536*(Z=Math.floor(I/65536)),Y=(I=Y+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),te=(I=te+Z+65535)-65536*(Z=Math.floor(I/65536)),Ae=(I=Ae+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),V=(I=V+Z+65535)-65536*(Z=Math.floor(I/65536)),De=(I=De+Z+65535)-65536*(Z=Math.floor(I/65536)),ge=(I=ge+Z+65535)-65536*(Z=Math.floor(I/65536)),le=(I=le+Z+65535)-65536*(Z=Math.floor(I/65536)),B=(I=B+Z+65535)-65536*(Z=Math.floor(I/65536)),H=(I=H+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),q+=Z-1+37*(Z-1),re[0]=q,re[1]=pe,re[2]=Ee,re[3]=J,re[4]=Y,re[5]=ae,re[6]=te,re[7]=Ae,re[8]=me,re[9]=V,re[10]=De,re[11]=ge,re[12]=le,re[13]=B,re[14]=H,re[15]=W}function M(re,Q){w(re,Q,Q)}function T(re,Q){var F,I=n();for(F=0;F<16;F++)I[F]=Q[F];for(F=253;F>=0;F--)M(I,I),F!==2&&F!==4&&w(I,I,Q);for(F=0;F<16;F++)re[F]=I[F]}function R(re,Q,F){var I,Z,q=new Uint8Array(32),pe=new Float64Array(80),Ee=n(),J=n(),Y=n(),ae=n(),te=n(),Ae=n();for(Z=0;Z<31;Z++)q[Z]=Q[Z];for(q[31]=127&Q[31]|64,q[0]&=248,x(pe,F),Z=0;Z<16;Z++)J[Z]=pe[Z],ae[Z]=Ee[Z]=Y[Z]=0;for(Ee[0]=ae[0]=1,Z=254;Z>=0;--Z)b(Ee,J,I=q[Z>>>3]>>>(7&Z)&1),b(Y,ae,I),D(te,Ee,Y),P(Ee,Ee,Y),D(Y,J,ae),P(J,J,ae),M(ae,te),M(Ae,Ee),w(Ee,Y,Ee),w(Y,J,te),D(te,Ee,Y),P(Ee,Ee,Y),M(J,Ee),P(Y,ae,Ae),w(Ee,Y,c),D(Ee,Ee,ae),w(Y,Y,Ee),w(Ee,ae,Ae),w(ae,J,pe),M(J,te),b(Ee,J,I),b(Y,ae,I);for(Z=0;Z<16;Z++)pe[Z+16]=Ee[Z],pe[Z+32]=Y[Z],pe[Z+48]=J[Z],pe[Z+64]=ae[Z];var me=pe.subarray(32),V=pe.subarray(16);return T(me,me),w(V,V,me),E(re,V),0}function K(re,Q){return R(re,Q,i)}function N(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n(),Y=n(),ae=n();P(F,re[1],re[0]),P(ae,Q[1],Q[0]),w(F,F,ae),D(I,re[0],re[1]),D(ae,Q[0],Q[1]),w(I,I,ae),w(Z,re[3],Q[3]),w(Z,Z,s),w(q,re[2],Q[2]),D(q,q,q),P(pe,I,F),P(Ee,q,Z),D(J,q,Z),D(Y,I,F),w(re[0],pe,Ee),w(re[1],Y,J),w(re[2],J,Ee),w(re[3],pe,Y)}function z(re,Q,F){var I;for(I=0;I<4;I++)b(re[I],Q[I],F)}function U(re,Q){var F=n(),I=n(),Z=n();T(Z,Q[2]),w(F,Q[0],Z),w(I,Q[1],Z),E(re,I),re[31]^=C(F)<<7}function oe(re,Q,F){var I,Z;for(_(re[0],a),_(re[1],l),_(re[2],l),_(re[3],a),Z=255;Z>=0;--Z)z(re,Q,I=F[Z/8|0]>>(7&Z)&1),N(Q,re),N(re,re),z(re,Q,I)}function Pe(re,Q){var F=[n(),n(),n(),n()];_(F[0],p),_(F[1],d),_(F[2],l),w(F[3],p,d),oe(re,F,Q)}function he(re,Q,F){var I,Z,q=[n(),n(),n(),n()];for(F||r(Q,32),(I=t.hash(Q.subarray(0,32)))[0]&=248,I[31]&=127,I[31]|=64,Pe(q,I),U(re,q),Z=0;Z<32;Z++)Q[Z+32]=re[Z];return 0}var ye=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function de(re,Q){var F,I,Z,q;for(I=63;I>=32;--I){for(F=0,Z=I-32,q=I-12;Z>4)*ye[Z],F=Q[Z]>>8,Q[Z]&=255;for(Z=0;Z<32;Z++)Q[Z]-=F*ye[Z];for(I=0;I<32;I++)Q[I+1]+=Q[I]>>8,re[I]=255&Q[I]}function Se(re){var Q,F=new Float64Array(64);for(Q=0;Q<64;Q++)F[Q]=re[Q];for(Q=0;Q<64;Q++)re[Q]=0;de(re,F)}function X(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n();return _(re[2],l),x(re[1],Q),M(Z,re[1]),w(q,Z,h),P(Z,Z,re[2]),D(q,re[2],q),M(pe,q),M(Ee,pe),w(J,Ee,pe),w(F,J,Z),w(F,F,q),function(Y,ae){var te,Ae=n();for(te=0;te<16;te++)Ae[te]=ae[te];for(te=250;te>=0;te--)M(Ae,Ae),te!==1&&w(Ae,Ae,ae);for(te=0;te<16;te++)Y[te]=Ae[te]}(F,F),w(F,F,Z),w(F,F,q),w(F,F,q),w(re[0],F,q),M(I,re[0]),w(I,I,q),k(I,Z)&&w(re[0],re[0],v),M(I,re[0]),w(I,I,q),k(I,Z)?-1:(C(re[0])===Q[31]>>7&&P(re[0],a,re[0]),w(re[3],re[0],re[1]),0)}var se=64;function Ce(){for(var re=0;re=0},t.sign.keyPair=function(){var re=new Uint8Array(32),Q=new Uint8Array(64);return he(re,Q),{publicKey:re,secretKey:Q}},t.sign.keyPair.fromSecretKey=function(re){if(Ce(re),re.length!==64)throw Error("bad secret key size");for(var Q=new Uint8Array(32),F=0;Fe&&(h.imod(a.leftShift(i)).iadd(a),s=h.mod(l).toNumber());while(!await PP(h,t,n));return h}async function PP(e,t,n){return!(t&&!e.dec().gcd(t).isOne())&&!!await async function(r){const i=await Te.getBigInteger();return sY.every(a=>r.mod(new i(a))!==0)}(e)&&!!await async function(r,i){const a=await Te.getBigInteger();return i=i||new a(2),i.modExp(r.dec(),r).isOne()}(e)&&!!await async function(r,i,a){const l=await Te.getBigInteger(),c=r.bitLength();i||(i=Math.max(1,c/48|0));const h=r.dec();let s=0;for(;!h.getBit(s);)s++;const p=r.rightShift(new l(s));for(;i>0;i--){let d,v=(a?a():await Eo(new l(2),h)).modExp(p,r);if(!v.isOne()&&!v.equal(h)){for(d=1;dt-11)throw Error("Message too long");const r=function(a){const l=new Uint8Array(a);let c=0;for(;c=8&!r;if(t)return Te.selectUint8Array(l,a,t);if(l)return a;throw Error("Decryption error")}async function Ob(e,t,n){let r;if(t.length!==Lc.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(Os[e].length);for(r=0;rimport("./bn.min.2dc6411e.js"),[]),k=new E(_),C=new E(y),x=new E(m),D=x.mod(C.subn(1)),P=x.mod(k.subn(1)),w=Ci.createSign(ve.read(ve.hash,s));w.write(p),w.end();const M={version:0,modulus:new E(d),publicExponent:new E(v),privateExponent:new E(m),prime1:new E(y),prime2:new E(_),exponent1:D,exponent2:P,coefficient:new E(b)};if(Ci.createPrivateKey!==void 0){const R=rc.encode(M,"der");return new Uint8Array(w.sign({key:R,format:"der",type:"pkcs1"}))}const T=rc.encode(M,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(w.sign(T))}(e,t,n,r,i,a,l,c)}return async function(s,p,d,v){const m=await Te.getBigInteger();p=new m(p);const _=new m(await Ob(s,v,p.byteLength()));if(d=new m(d),_.gte(p))throw Error("Message size cannot exceed modulus size");return _.modExp(d,p).toUint8Array("be",p.byteLength())}(e,n,i,h)},verify:async function(e,t,n,r,i,a){if(t&&!Te.isStream(t)){if(Te.getWebCrypto())try{return await async function(l,c,h,s,p){const d=function(m,_){return{kty:"RSA",n:pa(m,!0),e:pa(_,!0),ext:!0}}(s,p),v=await nc.importKey("jwk",d,{name:"RSASSA-PKCS1-v1_5",hash:{name:l}},!1,["verify"]);return nc.verify("RSASSA-PKCS1-v1_5",v,h,c)}(ve.read(ve.webHash,e),t,n,r,i)}catch(l){Te.printDebugError(l)}else if(Te.getNodeCrypto())return async function(l,c,h,s,p){const{default:d}=await _n(()=>import("./bn.min.2dc6411e.js"),[]),v=Ci.createVerify(ve.read(ve.hash,l));v.write(c),v.end();const m={modulus:new d(s),publicExponent:new d(p)};let _;Ci.createPrivateKey!==void 0?_={key:Rv.encode(m,"der"),format:"der",type:"pkcs1"}:_=Rv.encode(m,"pem",{label:"RSA PUBLIC KEY"});try{return await v.verify(_,h)}catch{return!1}}(e,t,n,r,i)}return async function(l,c,h,s,p){const d=await Te.getBigInteger();if(h=new d(h),c=new d(c),s=new d(s),c.gte(h))throw Error("Signature size cannot exceed modulus size");const v=c.modExp(s,h).toUint8Array("be",h.byteLength()),m=await Ob(l,p,h.byteLength());return Te.equalsUint8Array(v,m)}(e,n,r,i,a)},encrypt:async function(e,t,n){return Te.getNodeCrypto()?async function(r,i,a){const{default:l}=await _n(()=>import("./bn.min.2dc6411e.js"),[]),c={modulus:new l(i),publicExponent:new l(a)};let h;return Ci.createPrivateKey!==void 0?h={key:Rv.encode(c,"der"),format:"der",type:"pkcs1",padding:Ci.constants.RSA_PKCS1_PADDING}:h={key:Rv.encode(c,"pem",{label:"RSA PUBLIC KEY"}),padding:Ci.constants.RSA_PKCS1_PADDING},new Uint8Array(Ci.publicEncrypt(h,r))}(e,t,n):async function(r,i,a){const l=await Te.getBigInteger();if(i=new l(i),r=new l(E2(r,i.byteLength())),a=new l(a),r.gte(i))throw Error("Message size cannot exceed modulus size");return r.modExp(a,i).toUint8Array("be",i.byteLength())}(e,t,n)},decrypt:async function(e,t,n,r,i,a,l,c){return Te.getNodeCrypto()?async function(h,s,p,d,v,m,_,y){const{default:b}=await _n(()=>import("./bn.min.2dc6411e.js"),[]),E=new b(v),k=new b(m),C=new b(d),x=C.mod(k.subn(1)),D=C.mod(E.subn(1)),P={version:0,modulus:new b(s),publicExponent:new b(p),privateExponent:new b(d),prime1:new b(m),prime2:new b(v),exponent1:x,exponent2:D,coefficient:new b(_)};let w;Ci.createPrivateKey!==void 0?w={key:rc.encode(P,"der"),format:"der",type:"pkcs1",padding:Ci.constants.RSA_PKCS1_PADDING}:w={key:rc.encode(P,"pem",{label:"RSA PRIVATE KEY"}),padding:Ci.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(Ci.privateDecrypt(w,h))}catch{if(y)return y;throw Error("Decryption error")}}(e,t,n,r,i,a,l,c):async function(h,s,p,d,v,m,_,y){const b=await Te.getBigInteger();if(h=new b(h),s=new b(s),p=new b(p),d=new b(d),v=new b(v),m=new b(m),_=new b(_),h.gte(s))throw Error("Data too large.");const E=d.mod(m.dec()),k=d.mod(v.dec()),C=(await Eo(new b(2),s)).mod(s),x=C.modInv(s).modExp(p,s);h=h.mul(x).mod(s);const D=h.modExp(k,v),P=h.modExp(E,m);let M=_.mul(P.sub(D)).mod(m).mul(v).add(D);return M=M.mul(C).mod(s),D2(M.toUint8Array("be",s.byteLength()),y)}(e,t,n,r,i,a,l,c)},generate:async function(e,t){if(t=new(await Te.getBigInteger())(t),Te.getWebCrypto()){const l={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},c=await nc.generateKey(l,!0,["sign","verify"]),h=await nc.exportKey("jwk",c.privateKey);return{n:co(h.n),e:t.toUint8Array(),d:co(h.d),p:co(h.q),q:co(h.p),u:co(h.qi)}}if(Te.getNodeCrypto()&&Ci.generateKeyPair&&rc){const l={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},c=await new Promise((h,s)=>{Ci.generateKeyPair("rsa",l,(p,d,v)=>{p?s(p):h(rc.decode(v,"der"))})});return{n:c.modulus.toArrayLike(Uint8Array),e:c.publicExponent.toArrayLike(Uint8Array),d:c.privateExponent.toArrayLike(Uint8Array),p:c.prime2.toArrayLike(Uint8Array),q:c.prime1.toArrayLike(Uint8Array),u:c.coefficient.toArrayLike(Uint8Array)}}let n,r,i;do r=await uk(e-(e>>1),t,40),n=await uk(e>>1,t,40),i=n.mul(r);while(i.bitLength()!==e);const a=n.dec().imul(r.dec());return r.lt(n)&&([n,r]=[r,n]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:n.toUint8Array(),q:r.toUint8Array(),u:n.modInv(r).toUint8Array()}},validateParams:async function(e,t,n,r,i,a){const l=await Te.getBigInteger();if(e=new l(e),r=new l(r),i=new l(i),!r.mul(i).equal(e))return!1;const c=new l(2);if(a=new l(a),!r.mul(a).mod(i).isOne())return!1;t=new l(t),n=new l(n);const h=new l(Math.floor(e.bitLength()/3)),s=await Eo(c,c.leftShift(h)),p=s.mul(n).mul(t);return!(!p.mod(r.dec()).equal(s)||!p.mod(i.dec()).equal(s))}}),uY=Object.freeze({__proto__:null,encrypt:async function(e,t,n,r){const i=await Te.getBigInteger();t=new i(t),n=new i(n),r=new i(r);const a=new i(E2(e,t.byteLength())),l=await Eo(new i(1),t.dec());return{c1:n.modExp(l,t).toUint8Array(),c2:r.modExp(l,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,n,r,i){const a=await Te.getBigInteger();return e=new a(e),t=new a(t),n=new a(n),r=new a(r),D2(e.modExp(r,n).modInv(n).imul(t).imod(n).toUint8Array("be",n.byteLength()),i)},validateParams:async function(e,t,n,r){const i=await Te.getBigInteger();e=new i(e),t=new i(t),n=new i(n);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const l=new i(e.bitLength()),c=new i(1023);if(l.lt(c)||!t.modExp(e.dec(),e).isOne())return!1;let h=t;const s=new i(1),p=new i(2).leftShift(new i(17));for(;s.lt(p);){if(h=h.mul(t).imod(e),h.isOne())return!1;s.iinc()}r=new i(r);const d=new i(2),v=await Eo(d.leftShift(l.dec()),d.leftShift(l)),m=e.dec().imul(v).iadd(r);return!!n.equal(t.modExp(m,e))}});class Is{constructor(t){if(t instanceof Is)this.oid=t.oid;else if(Te.isArray(t)||Te.isUint8Array(t)){if((t=new Uint8Array(t))[0]===6){if(t[1]!==t.length-2)throw Error("Length mismatch in DER encoded oid");t=t.subarray(2)}this.oid=t}else this.oid=""}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.oid=t.subarray(1,1+n),1+this.oid.length}throw Error("Invalid oid")}write(){return Te.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Te.uint8ArrayToHex(this.oid)}getName(){const t=this.toHex();if(ve.curve[t])return ve.write(ve.curve,t);throw Error("Unknown curve object identifier.")}}function l_(e,t){return e.keyPair({priv:t})}function u_(e,t){const n=e.keyPair({pub:t});if(n.validate().result!==!0)throw Error("Invalid elliptic public key");return n}async function Jc(e){if(!Lt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await _n(()=>import("./elliptic.min.cb2c4d59.js"),["js/build/elliptic.min.cb2c4d59.js","js/build/bn.min.2dc6411e.js"]);return new t.ec(e)}function AP(e){let t,n=0;const r=e[0];return r<192?([n]=e,t=1):r<255?(n=(e[0]-192<<8)+e[1]+192,t=2):r===255&&(n=Te.readNumber(e.subarray(1,5)),t=5),{len:n,offset:t}}function oh(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Te.concatUint8Array([new Uint8Array([255]),Te.writeNumber(e,4)])}function cY(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function MP(e){return new Uint8Array([192|e])}function ck(e,t){return Te.concatUint8Array([MP(e),oh(t)])}function _m(e){return[ve.packet.literalData,ve.packet.compressedData,ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData].includes(e)}async function dY(e,t){const n=qs(e);let r,i;try{const a=await n.peekBytes(2);if(!a||a.length<2||(128&a[0])==0)throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const l=await n.readByte();let c,h,s=-1,p=-1;p=0,(64&l)!=0&&(p=1),p?s=63&l:(s=(63&l)>>2,h=3&l);const d=_m(s);let v,m=null;if(d){if(Te.isStream(e)==="array"){const y=new zs;r=ea(y),m=y}else{const y=new Rc;r=ea(y.writable),m=y.readable}i=t({tag:s,packet:m})}else m=[];do{if(p){const y=await n.readByte();if(v=!1,y<192)c=y;else if(y>=192&&y<224)c=(y-192<<8)+await n.readByte()+192;else if(y>223&&y<255){if(c=1<<(31&y),v=!0,!d)throw new TypeError("This packet type does not support partial lengths.")}else c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte()}else switch(h){case 0:c=await n.readByte();break;case 1:c=await n.readByte()<<8|await n.readByte();break;case 2:c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte();break;default:c=1/0}if(c>0){let y=0;for(;;){r&&await r.ready;const{done:b,value:E}=await n.read();if(b){if(c===1/0)break;throw Error("Unexpected end of packet")}const k=c===1/0?E:E.subarray(0,c-y);if(r?await r.write(k):m.push(k),y+=E.length,y>=c){n.unshift(E.subarray(c-y+E.length));break}}}}while(v);const _=await n.peekBytes(d?1/0:2);return r?(await r.ready,await r.close()):(m=Te.concatUint8Array(m),await t({tag:s,packet:m})),!_||!_.length}catch(a){if(r)return await r.abort(a),!0;throw a}finally{r&&await i,n.releaseLock()}}class zr extends Error{constructor(...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,zr),this.name="UnsupportedError"}}class Pb{constructor(t,n){this.tag=t,this.rawContent=n}write(){return this.rawContent}}const Ky=Te.getWebCrypto(),ug=Te.getNodeCrypto(),Ys={p256:"P-256",p384:"P-384",p521:"P-521"},ao=ug?ug.getCurves():[],Wo=ug?{secp256k1:ao.includes("secp256k1")?"secp256k1":void 0,p256:ao.includes("prime256v1")?"prime256v1":void 0,p384:ao.includes("secp384r1")?"secp384r1":void 0,p521:ao.includes("secp521r1")?"secp521r1":void 0,ed25519:ao.includes("ED25519")?"ED25519":void 0,curve25519:ao.includes("X25519")?"X25519":void 0,brainpoolP256r1:ao.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:ao.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:ao.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},ym={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Wo.p256,web:Ys.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Wo.p384,web:Ys.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Wo.p521,web:Ys.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Wo.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:ve.publicKey.eddsa,hash:ve.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:ve.publicKey.ecdh,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Wo.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Wo.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Wo.brainpoolP512r1,payloadSize:64}};class Do{constructor(t,n){try{(Te.isArray(t)||Te.isUint8Array(t))&&(t=new Is(t)),t instanceof Is&&(t=t.getName()),this.name=ve.write(ve.curve,t)}catch{throw new zr("Unknown curve")}n=n||ym[this.name],this.keyType=n.keyType,this.oid=n.oid,this.hash=n.hash,this.cipher=n.cipher,this.node=n.node&&ym[this.name],this.web=n.web&&ym[this.name],this.payloadSize=n.payloadSize,this.web&&Te.getWebCrypto()?this.type="web":this.node&&Te.getNodeCrypto()?this.type="node":this.name==="curve25519"?this.type="curve25519":this.name==="ed25519"&&(this.type="ed25519")}async genKeyPair(){let t;switch(this.type){case"web":try{return await async function(r){const i=await Ky.generateKey({name:"ECDSA",namedCurve:Ys[r]},!0,["sign","verify"]),a=await Ky.exportKey("jwk",i.privateKey),l=await Ky.exportKey("jwk",i.publicKey);return{publicKey:$P(l),privateKey:co(a.d)}}(this.name)}catch(r){Te.printDebugError("Browser did not support generating ec key "+r.message);break}case"node":return async function(r){const i=ug.createECDH(Wo[r]);return await i.generateKeys(),{publicKey:new Uint8Array(i.getPublicKey()),privateKey:new Uint8Array(i.getPrivateKey())}}(this.name);case"curve25519":{const r=Gs(32);r[0]=127&r[0]|64,r[31]&=248;const i=r.slice().reverse();return t=Ks.box.keyPair.fromSecretKey(i),{publicKey:Te.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:r}}case"ed25519":{const r=Gs(32),i=Ks.sign.keyPair.fromSeed(r);return{publicKey:Te.concatUint8Array([new Uint8Array([64]),i.publicKey]),privateKey:r}}}return t=await(await Jc(this.name)).genKeyPair({entropy:Te.uint8ArrayToString(Gs(32))}),{publicKey:new Uint8Array(t.getPublic("array",!1)),privateKey:t.getPrivate().toArrayLike(Uint8Array)}}}async function IP(e,t,n,r){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===ve.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if(a==="curve25519"){r=r.slice().reverse();const{publicKey:c}=Ks.box.keyPair.fromSecretKey(r);n=new Uint8Array(n);const h=new Uint8Array([64,...c]);return!!Te.equalsUint8Array(h,n)}const l=await Jc(a);try{n=u_(l,n).getPublic()}catch{return!1}return!!l_(l,r).getPublic().eq(n)}function $P(e){const t=co(e.x),n=co(e.y),r=new Uint8Array(t.length+n.length+1);return r[0]=4,r.set(t,1),r.set(n,t.length+1),r}function c_(e,t,n){const r=e,i=n.slice(1,r+1),a=n.slice(r+1,2*r+1);return{kty:"EC",crv:t,x:pa(i,!0),y:pa(a,!0),ext:!0}}function RP(e,t,n,r){const i=c_(e,t,n);return i.d=pa(r,!0),i}const cg=Te.getWebCrypto(),Zc=Te.getNodeCrypto();async function dk(e,t,n,r,i,a){const l=new Do(e);if(n&&!Te.isStream(n)){const c={publicKey:r,privateKey:i};switch(l.type){case"web":try{return await async function(h,s,p,d){const v=h.payloadSize,m=RP(h.payloadSize,Ys[h.name],d.publicKey,d.privateKey),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Ys[h.name],hash:{name:ve.read(ve.webHash,h.hash)}},!1,["sign"]),y=new Uint8Array(await cg.sign({name:"ECDSA",namedCurve:Ys[h.name],hash:{name:ve.read(ve.webHash,s)}},_,p));return{r:y.slice(0,v),s:y.slice(v,v<<1)}}(l,t,n,c)}catch(h){if(l.name!=="p521"&&(h.name==="DataError"||h.name==="OperationError"))throw h;Te.printDebugError("Browser did not support signing: "+h.message)}break;case"node":{const h=await async function(s,p,d,v){const m=Zc.createSign(ve.read(ve.hash,p));m.write(d),m.end();const _=fY.encode({version:1,parameters:s.oid,privateKey:Array.from(v.privateKey),publicKey:{unused:0,data:Array.from(v.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return LP.decode(m.sign(_),"der")}(l,t,n,c);return{r:h.r.toArrayLike(Uint8Array),s:h.s.toArrayLike(Uint8Array)}}}}return async function(c,h,s){const p=await Jc(c.name),d=l_(p,s),v=d.sign(h);return{r:v.r.toArrayLike(Uint8Array),s:v.s.toArrayLike(Uint8Array)}}(l,a,i)}async function fk(e,t,n,r,i,a){const l=new Do(e);if(r&&!Te.isStream(r))switch(l.type){case"web":try{return await async function(c,h,{r:s,s:p},d,v){const m=c_(c.payloadSize,Ys[c.name],v),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Ys[c.name],hash:{name:ve.read(ve.webHash,c.hash)}},!1,["verify"]),y=Te.concatUint8Array([s,p]).buffer;return cg.verify({name:"ECDSA",namedCurve:Ys[c.name],hash:{name:ve.read(ve.webHash,h)}},_,y,d)}(l,t,n,r,i)}catch(c){if(l.name!=="p521"&&(c.name==="DataError"||c.name==="OperationError"))throw c;Te.printDebugError("Browser did not support verifying: "+c.message)}break;case"node":return async function(c,h,{r:s,s:p},d,v){const{default:m}=await _n(()=>import("./bn.min.2dc6411e.js"),[]),_=Zc.createVerify(ve.read(ve.hash,h));_.write(d),_.end();const y=pY.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:c.oid},subjectPublicKey:{unused:0,data:Array.from(v)}},"pem",{label:"PUBLIC KEY"}),b=LP.encode({r:new m(s),s:new m(p)},"der");try{return _.verify(y,b)}catch{return!1}}(l,t,n,r,i)}return async function(c,h,s,p){const d=await Jc(c.name);return u_(d,p).verify(s,h)}(l,n,t===void 0?r:a,i)}const d_=void 0,LP=Zc?d_.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,fY=Zc?d_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())}):void 0,hY=Zc?d_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,pY=Zc?d_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(hY),this.key("subjectPublicKey").bitstr())}):void 0;var vY=Object.freeze({__proto__:null,sign:dk,verify:fk,validateParams:async function(e,t,n){const r=new Do(e);if(r.keyType!==ve.publicKey.ecdsa)return!1;switch(r.type){case"web":case"node":{const i=Gs(8),a=ve.hash.sha256,l=await Lc.digest(a,i);try{const c=await dk(e,a,i,t,n,l);return await fk(e,a,c,i,t,l)}catch{return!1}}default:return IP(ve.publicKey.ecdsa,e,t,n)}}});Ks.hash=e=>new Uint8Array(s_().update(e).digest());var mY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){if(Lc.getHashByteLength(t)=0;--p)for(let d=c-1;d>=0;--d)h[1]=c*p+(d+1),s[0]=a[0]^h[0],s[1]=a[1]^h[1],s[2]=l[2*d],s[3]=l[2*d+1],s=dg(n.decrypt(fg(s))),a=s.subarray(0,2),l[2*d]=s[2],l[2*d+1]=s[3];if(a[0]===r[0]&&a[1]===r[1])return fg(l);throw Error("Key Data Integrity failed")}function dg(e){const{length:t}=e,n=function(a){if(Te.isString(a)){const{length:l}=a,c=new ArrayBuffer(l),h=new Uint8Array(c);for(let s=0;s0){const n=e[t-1];if(n>=1){const r=e.subarray(t-n),i=new Uint8Array(n).fill(n);if(Te.equalsUint8Array(r,i))return e.subarray(0,t-n)}}throw Error("Invalid padding")}var _Y=Object.freeze({__proto__:null,encode:BP,decode:UP});const el=Te.getWebCrypto(),jP=Te.getNodeCrypto();function hk(e,t,n,r){return Te.concatUint8Array([t.write(),new Uint8Array([e]),n.write(),Te.stringToUint8Array("Anonymous Sender "),r.subarray(0,20)])}async function pk(e,t,n,r,i=!1,a=!1){let l;if(i){for(l=0;l=0&&t[l]===0;l--);t=t.subarray(0,l+1)}return(await Lc.digest(e,Te.concatUint8Array([new Uint8Array([0,0,0,1]),t,r]))).subarray(0,n)}async function yY(e,t){switch(e.type){case"curve25519":{const n=Gs(32),{secretKey:r,sharedKey:i}=await zP(e,t,null,n);let{publicKey:a}=Ks.box.keyPair.fromSecretKey(r);return a=Te.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(n,r){const i=c_(n.payloadSize,n.web.web,r);let a=el.generateKey({name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]),l=el.importKey("jwk",i,{name:"ECDH",namedCurve:n.web.web},!1,[]);[a,l]=await Promise.all([a,l]);let c=el.deriveBits({name:"ECDH",namedCurve:n.web.web,public:l},a.privateKey,n.web.sharedSize),h=el.exportKey("jwk",a.publicKey);[c,h]=await Promise.all([c,h]);const s=new Uint8Array(c);return{publicKey:new Uint8Array($P(h)),sharedKey:s}}(e,t)}catch(n){Te.printDebugError(n)}break;case"node":return async function(n,r){const i=jP.createECDH(n.node.node);i.generateKeys();const a=new Uint8Array(i.computeSecret(r));return{publicKey:new Uint8Array(i.getPublicKey()),sharedKey:a}}(e,t)}return async function(n,r){const i=await Jc(n.name),a=await n.genKeyPair();r=u_(i,r);const l=l_(i,a.privateKey),c=a.publicKey,h=l.derive(r.getPublic()),s=i.curve.p.byteLength(),p=h.toArrayLike(Uint8Array,"be",s);return{publicKey:c,sharedKey:p}}(e,t)}async function zP(e,t,n,r){if(r.length!==e.payloadSize){const i=new Uint8Array(e.payloadSize);i.set(r,e.payloadSize-r.length),r=i}switch(e.type){case"curve25519":{const i=r.slice().reverse();return{secretKey:i,sharedKey:Ks.scalarMult(i,t.subarray(1))}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(i,a,l,c){const h=RP(i.payloadSize,i.web.web,l,c);let s=el.importKey("jwk",h,{name:"ECDH",namedCurve:i.web.web},!0,["deriveKey","deriveBits"]);const p=c_(i.payloadSize,i.web.web,a);let d=el.importKey("jwk",p,{name:"ECDH",namedCurve:i.web.web},!0,[]);[s,d]=await Promise.all([s,d]);let v=el.deriveBits({name:"ECDH",namedCurve:i.web.web,public:d},s,i.web.sharedSize),m=el.exportKey("jwk",s);[v,m]=await Promise.all([v,m]);const _=new Uint8Array(v);return{secretKey:co(m.d),sharedKey:_}}(e,t,n,r)}catch(i){Te.printDebugError(i)}break;case"node":return async function(i,a,l){const c=jP.createECDH(i.node.node);c.setPrivateKey(l);const h=new Uint8Array(c.computeSecret(a));return{secretKey:new Uint8Array(c.getPrivateKey()),sharedKey:h}}(e,t,r)}return async function(i,a,l){const c=await Jc(i.name);a=u_(c,a),l=l_(c,l);const h=new Uint8Array(l.getPrivate()),s=l.derive(a.getPublic()),p=c.curve.p.byteLength(),d=s.toArrayLike(Uint8Array,"be",p);return{secretKey:h,sharedKey:d}}(e,t,r)}var bY=Object.freeze({__proto__:null,validateParams:async function(e,t,n){return IP(ve.publicKey.ecdh,e,t,n)},encrypt:async function(e,t,n,r,i){const a=BP(n),l=new Do(e),{publicKey:c,sharedKey:h}=await yY(l,r),s=hk(ve.publicKey.ecdh,e,t,i),{keySize:p}=ul(t.cipher);return{publicKey:c,wrappedKey:NP(await pk(t.hash,h,p,s),a)}},decrypt:async function(e,t,n,r,i,a,l){const c=new Do(e),{sharedKey:h}=await zP(c,n,i,a),s=hk(ve.publicKey.ecdh,e,t,l),{keySize:p}=ul(t.cipher);let d;for(let v=0;v<3;v++)try{return UP(FP(await pk(t.hash,h,p,s,v===1,v===2),r))}catch(m){d=m}throw d}}),wY=Object.freeze({__proto__:null,Curve:Do,ecdh:bY,ecdsa:vY,eddsa:mY,generate:async function(e){const t=await Te.getBigInteger();e=new Do(e);const n=await e.genKeyPair(),r=new t(n.publicKey).toUint8Array(),i=new t(n.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:r,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return ym[ve.write(ve.curve,e.toHex())].hash}}),CY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){const l=await Te.getBigInteger(),c=new l(1);let h,s,p,d;r=new l(r),i=new l(i),n=new l(n),a=new l(a),n=n.mod(r),a=a.mod(i);const v=new l(t.subarray(0,i.byteLength())).mod(i);for(;;){if(h=await Eo(c,i),s=n.modExp(h,r).imod(i),s.isZero())continue;const m=a.mul(s).imod(i);if(d=v.add(m).imod(i),p=h.modInv(i).imul(d).imod(i),!p.isZero())break}return{r:s.toUint8Array("be",i.byteLength()),s:p.toUint8Array("be",i.byteLength())}},verify:async function(e,t,n,r,i,a,l,c){const h=await Te.getBigInteger(),s=new h(0);if(t=new h(t),n=new h(n),a=new h(a),l=new h(l),i=new h(i),c=new h(c),t.lte(s)||t.gte(l)||n.lte(s)||n.gte(l))return Te.printDebug("invalid DSA Signature"),!1;const p=new h(r.subarray(0,l.byteLength())).imod(l),d=n.modInv(l);if(d.isZero())return Te.printDebug("invalid DSA Signature"),!1;i=i.mod(a),c=c.mod(a);const v=p.mul(d).imod(l),m=t.mul(d).imod(l),_=i.modExp(v,a),y=c.modExp(m,a);return _.mul(y).imod(a).imod(l).equal(t)},validateParams:async function(e,t,n,r,i){const a=await Te.getBigInteger();e=new a(e),t=new a(t),n=new a(n),r=new a(r);const l=new a(1);if(n.lte(l)||n.gte(e)||!e.dec().mod(t).isZero()||!n.modExp(t,e).isOne())return!1;const c=new a(t.bitLength()),h=new a(150);if(c.lt(h)||!await PP(t,null,32))return!1;i=new a(i);const s=new a(2),p=await Eo(s.leftShift(c.dec()),s.leftShift(c)),d=t.mul(p).add(i);return!!r.equal(n.modExp(d,e))}}),dr={rsa:lY,elgamal:uY,elliptic:wY,dsa:CY,nacl:Ks},xY=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:return{s:Te.readMPI(t.subarray(n))};case ve.publicKey.dsa:case ve.publicKey.ecdsa:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{r,s:Te.readMPI(t.subarray(n))}}case ve.publicKey.eddsa:{let r=Te.readMPI(t.subarray(n));n+=r.length+2,r=Te.leftPad(r,32);let i=Te.readMPI(t.subarray(n));return i=Te.leftPad(i,32),{r,s:i}}default:throw new zr("Unknown signature algorithm.")}},verify:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=r,h=Te.leftPad(n.s,l.length);return dr.rsa.verify(t,i,h,l,c,a)}case ve.publicKey.dsa:{const{g:l,p:c,q:h,y:s}=r,{r:p,s:d}=n;return dr.dsa.verify(t,p,d,a,l,c,h,s)}case ve.publicKey.ecdsa:{const{oid:l,Q:c}=r,h=new dr.elliptic.Curve(l).payloadSize,s=Te.leftPad(n.r,h),p=Te.leftPad(n.s,h);return dr.elliptic.ecdsa.verify(l,t,{r:s,s:p},i,c,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=r;return dr.elliptic.eddsa.verify(l,t,n,i,c,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,n,r,i,a){if(!n||!r)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=n,{d:h,p:s,q:p,u:d}=r;return{s:await dr.rsa.sign(t,i,l,c,h,s,p,d,a)}}case ve.publicKey.dsa:{const{g:l,p:c,q:h}=n,{x:s}=r;return dr.dsa.sign(t,a,l,c,h,s)}case ve.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case ve.publicKey.ecdsa:{const{oid:l,Q:c}=n,{d:h}=r;return dr.elliptic.ecdsa.sign(l,t,i,c,h,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=n,{seed:h}=r;return dr.elliptic.eddsa.sign(l,t,i,c,h,a)}default:throw Error("Unknown signature algorithm.")}}});class vk{constructor(t){t=t===void 0?new Uint8Array([]):Te.isString(t)?Te.stringToUint8Array(t):new Uint8Array(t),this.data=t}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.data=t.subarray(1,1+n),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Te.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class mk{constructor(t){if(t){const{hash:n,cipher:r}=t;this.hash=n,this.cipher=r}else this.hash=null,this.cipher=null}read(t){if(t.length<4||t[0]!==3||t[1]!==1)throw Error("Cannot read KDFParams");return this.hash=t[2],this.cipher=t[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function Gy(e){try{e.getName()}catch{throw new zr("Unknown curve OID")}}var SY=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,n,r){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:{const{n:i,e:a}=t;return{c:await dr.rsa.encrypt(n,i,a)}}case ve.publicKey.elgamal:{const{p:i,g:a,y:l}=t;return dr.elgamal.encrypt(n,i,a,l)}case ve.publicKey.ecdh:{const{oid:i,Q:a,kdfParams:l}=t,{publicKey:c,wrappedKey:h}=await dr.elliptic.ecdh.encrypt(i,l,n,a,r);return{V:c,C:new vk(h)}}default:return[]}},publicKeyDecrypt:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:{const{c:l}=r,{n:c,e:h}=t,{d:s,p,q:d,u:v}=n;return dr.rsa.decrypt(l,c,h,s,p,d,v,a)}case ve.publicKey.elgamal:{const{c1:l,c2:c}=r,h=t.p,s=n.x;return dr.elgamal.decrypt(l,c,h,s,a)}case ve.publicKey.ecdh:{const{oid:l,Q:c,kdfParams:h}=t,{d:s}=n,{V:p,C:d}=r;return dr.elliptic.ecdh.decrypt(l,h,p,d.data,c,s,i)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{n:r,e:i}}}case ve.publicKey.dsa:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));n+=a.length+2;const l=Te.readMPI(t.subarray(n));return n+=l.length+2,{read:n,publicParams:{p:r,q:i,g:a,y:l}}}case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{p:r,g:i,y:a}}}case ve.publicKey.ecdsa:{const r=new Is;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.eddsa:{const r=new Is;n+=r.read(t),Gy(r);let i=Te.readMPI(t.subarray(n));return n+=i.length+2,i=Te.leftPad(i,33),{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.ecdh:{const r=new Is;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=new mk;return n+=a.read(t.subarray(n)),{read:n,publicParams:{oid:r,Q:i,kdfParams:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,n){let r=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const i=Te.readMPI(t.subarray(r));r+=i.length+2;const a=Te.readMPI(t.subarray(r));r+=a.length+2;const l=Te.readMPI(t.subarray(r));r+=l.length+2;const c=Te.readMPI(t.subarray(r));return r+=c.length+2,{read:r,privateParams:{d:i,p:a,q:l,u:c}}}case ve.publicKey.dsa:case ve.publicKey.elgamal:{const i=Te.readMPI(t.subarray(r));return r+=i.length+2,{read:r,privateParams:{x:i}}}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{d:a}}}case ve.publicKey.eddsa:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{seed:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:return{c:Te.readMPI(t.subarray(n))};case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{c1:r,c2:Te.readMPI(t.subarray(n))}}case ve.publicKey.ecdh:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=new vk;return i.read(t.subarray(n)),{V:r,C:i}}default:throw new zr("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const n=Object.keys(t).map(r=>{const i=t[r];return Te.isUint8Array(i)?Te.uint8ArrayToMPI(i):i.write()});return Te.concatUint8Array(n)},generateParams:function(e,t,n){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:return dr.rsa.generate(t,65537).then(({n:r,e:i,d:a,p:l,q:c,u:h})=>({privateParams:{d:a,p:l,q:c,u:h},publicParams:{n:r,e:i}}));case ve.publicKey.ecdsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{d:a},publicParams:{oid:new Is(r),Q:i}}));case ve.publicKey.eddsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{seed:a},publicParams:{oid:new Is(r),Q:i}}));case ve.publicKey.ecdh:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a,hash:l,cipher:c})=>({privateParams:{d:a},publicParams:{oid:new Is(r),Q:i,kdfParams:new mk({hash:l,cipher:c})}}));case ve.publicKey.dsa:case ve.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,n){if(!t||!n)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const{n:r,e:i}=t,{d:a,p:l,q:c,u:h}=n;return dr.rsa.validateParams(r,i,a,l,c,h)}case ve.publicKey.dsa:{const{p:r,q:i,g:a,y:l}=t,{x:c}=n;return dr.dsa.validateParams(r,i,a,l,c)}case ve.publicKey.elgamal:{const{p:r,g:i,y:a}=t,{x:l}=n;return dr.elgamal.validateParams(r,i,a,l)}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const r=dr.elliptic[ve.read(ve.publicKey,e)],{oid:i,Q:a}=t,{d:l}=n;return r.validateParams(i,a,l)}case ve.publicKey.eddsa:{const{oid:r,Q:i}=t,{seed:a}=n;return dr.elliptic.eddsa.validateParams(r,i,a)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=ul(e),n=await Gs(t),r=new Uint8Array([n[n.length-2],n[n.length-1]]);return Te.concat([n,r])},generateSessionKey:function(e){const{keySize:t}=ul(e);return Gs(t)},getAEADMode:function(e){const t=ve.read(ve.aead,e);return OP[t]},getCipher:ul});const Kt={cipher:sh,hash:Lc,mode:OP,publicKey:dr,signature:xY,random:aY,pkcs1:oY,pkcs5:_Y,aesKW:gY};Object.assign(Kt,SY);var lh=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function VP(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const WP={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(let a=0;a=0;)e[t]=0}const PY=0,JP=1,TY=2,O2=29,uh=256,Ff=uh+1+O2,kc=30,P2=19,bk=2*Ff+1,eu=15,Yy=16,AY=7,T2=256,ZP=16,QP=17,qP=18,Ab=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],bm=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],MY=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],wk=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],uo=Array(2*(Ff+2));Qc(uo);const bf=Array(2*kc);Qc(bf);const Bf=Array(512);Qc(Bf);const Uf=Array(256);Qc(Uf);const A2=Array(O2);Qc(A2);const pg=Array(kc);function Xy(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let Ck,xk,Sk;function Jy(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function eT(e){return e<256?Bf[e]:Bf[256+(e>>>7)]}function jf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Hi(e,t,n){e.bi_valid>Yy-n?(e.bi_buf|=t<>Yy-e.bi_valid,e.bi_valid+=n-Yy):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function nT(e,t,n){const r=Array(eu+1);let i,a,l=0;for(i=1;i<=eu;i++)r[i]=l=l+n[i-1]<<1;for(a=0;a<=t;a++){const c=e[2*a+1];c!==0&&(e[2*a]=tT(r[c]++,c))}}function rT(e){let t;for(t=0;t8?jf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ek(e,t,n,r){const i=2*t,a=2*n;return e[i]>1;l>=1;l--)Zy(e,n,l);h=a;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Zy(e,n,1),c=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=c,n[2*h]=n[2*l]+n[2*c],e.depth[h]=(e.depth[l]>=e.depth[c]?e.depth[l]:e.depth[c])+1,n[2*l+1]=n[2*c+1]=h,e.heap[1]=h++,Zy(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(p,d){const v=d.dyn_tree,m=d.max_code,_=d.stat_desc.static_tree,y=d.stat_desc.has_stree,b=d.stat_desc.extra_bits,E=d.stat_desc.extra_base,k=d.stat_desc.max_length;let C,x,D,P,w,M,T=0;for(P=0;P<=eu;P++)p.bl_count[P]=0;for(v[2*p.heap[p.heap_max]+1]=0,C=p.heap_max+1;Ck&&(P=k,T++),v[2*x+1]=P,x>m||(p.bl_count[P]++,w=0,x>=E&&(w=b[x-E]),M=v[2*x],p.opt_len+=M*(P+w),y&&(p.static_len+=M*(_[2*x+1]+w)));if(T!==0){do{for(P=k-1;p.bl_count[P]===0;)P--;p.bl_count[P]--,p.bl_count[P+1]+=2,p.bl_count[k]--,T-=2}while(T>0);for(P=k;P!==0;P--)for(x=p.bl_count[P];x!==0;)D=p.heap[--C],D>m||(v[2*D+1]!==P&&(p.opt_len+=(P-v[2*D+1])*v[2*D],v[2*D+1]=P),x--)}}(e,t),nT(n,s,e.bl_count)}function kk(e,t,n){let r,i,a=-1,l=t[1],c=0,h=7,s=4;for(l===0&&(h=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=l,l=t[2*(r+1)+1],++c>=7;i=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function RY(e,t,n,r){let i,a,l=0;e.level>0?(e.strm.data_type===XP&&(e.strm.data_type=function(c){let h,s=4093624447;for(h=0;h<=31;h++,s>>>=1)if(1&s&&c.dyn_ltree[2*h]!==0)return _k;if(c.dyn_ltree[18]!==0||c.dyn_ltree[20]!==0||c.dyn_ltree[26]!==0)return yk;for(h=32;h=3&&c.bl_tree[2*wk[h]+1]===0;h--);return c.opt_len+=3*(h+1)+5+5+4,h}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?aT(e,t,n,r):e.strategy===YP||a===i?(Hi(e,(JP<<1)+(r?1:0),3),Dk(e,uo,bf)):(Hi(e,(TY<<1)+(r?1:0),3),function(c,h,s,p){let d;for(Hi(c,h-257,5),Hi(c,s-1,5),Hi(c,p-4,4),d=0;d>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Uf[n]+uh+1)]++,e.dyn_dtree[2*eT(t)]++),e.last_lit===e.lit_bufsize-1}function zf(e,t,n,r){let i=65535&e|0,a=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,a=a+i|0;while(--l);i%=65521,a%=65521}return i|a<<16|0}const LY=function(){let e;const t=[];for(let n=0;n<256;n++){e=n;for(let r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Kr(e,t,n,r){const i=LY,a=r+n;e^=-1;for(let l=r;l>>8^i[255&(e^t[l])];return-1^e}var Vf={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const NY=9,Bn=3,tl=258,rs=tl+Bn+1,FY=32,vg=42,Mb=69,wm=73,Cm=91,xm=103,tu=113,ef=666,Gr=1,wf=2,nu=3,Oc=4,BY=3;function nl(e,t){return e.msg=Vf[t],t}function Tk(e){return(e<<1)-(e>4?9:0)}function Jo(e){let t=e.length;for(;--t>=0;)e[t]=0}function Ho(e){const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Xs(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function oi(e,t){RY(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ho(e.strm)}function zn(e,t){e.pending_buf[e.pending++]=t}function Rd(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function UY(e,t,n,r){let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Xs(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=zf(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Kr(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function sT(e,t){let n,r,i=e.max_chain_length,a=e.strstart,l=e.prev_length,c=e.nice_match;const h=e.strstart>e.w_size-rs?e.strstart-(e.w_size-rs):0,s=e.window,p=e.w_mask,d=e.prev,v=e.strstart+tl;let m=s[a+l-1],_=s[a+l];e.prev_length>=e.good_match&&(i>>=2),c>e.lookahead&&(c=e.lookahead);do if(n=t,s[n+l]===_&&s[n+l-1]===m&&s[n]===s[a]&&s[++n]===s[a+1]){a+=2,n++;do;while(s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&al){if(e.match_start=t,l=r,r>=c)break;m=s[a+l-1],_=s[a+l]}}while((t=d[t&p])>h&&--i!=0);return l<=e.lookahead?l:e.lookahead}function yu(e){const t=e.w_size;let n,r,i,a,l;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-rs)){Xs(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=UY(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=Bn)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=Bn&&(e.ins_h=(e.ins_h<=Bn)if(r=cl(e,e.strstart-e.match_start,e.match_length-Bn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Bn){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=Bn&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=Bn-1)),e.prev_length>=Bn&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Bn,r=cl(e,e.strstart-1-e.prev_match,e.prev_length-Bn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(yu(e),e.lookahead===0&&t===Js)return Gr;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,oi(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-rs&&(oi(e,!1),e.strm.avail_out===0))return Gr}return e.insert=0,t===Xr?(oi(e,!0),e.strm.avail_out===0?nu:Oc):(e.strstart>e.block_start&&(oi(e,!1),e.strm.avail_out),Gr)}),new Ss(4,4,8,4,qy),new Ss(4,5,16,8,qy),new Ss(4,6,32,32,qy),new Ss(4,4,16,16,ic),new Ss(8,16,32,32,ic),new Ss(8,16,128,128,ic),new Ss(8,32,128,256,ic),new Ss(32,128,258,1024,ic),new Ss(32,258,258,4096,ic)];class jY{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Nc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ia(1146),this.dyn_dtree=new Ia(122),this.bl_tree=new Ia(78),Jo(this.dyn_ltree),Jo(this.dyn_dtree),Jo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ia(16),this.heap=new Ia(573),Jo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ia(573),Jo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}}function zY(e){const t=function(n){let r;return n&&n.state?(n.total_in=n.total_out=0,n.data_type=XP,r=n.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?vg:tu,n.adler=r.wrap===2?0:1,r.last_flush=Js,IY(r),Xn):nl(n,Fr)}(e);return t===Xn&&function(n){n.window_size=2*n.w_size,Jo(n.head),n.max_lazy_match=tf[n.level].max_lazy,n.good_match=tf[n.level].good_length,n.nice_match=tf[n.level].nice_length,n.max_chain_length=tf[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=Bn-1,n.match_available=0,n.ins_h=0}(e.state),t}function VY(e,t){let n,r,i,a;if(!e||!e.state||t>Tb||t<0)return e?nl(e,Fr):Fr;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===ef&&t!==Xr)return nl(e,e.avail_out===0?yf:Fr);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===vg)if(r.wrap===2)e.adler=0,zn(r,31),zn(r,139),zn(r,8),r.gzhead?(zn(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),zn(r,255&r.gzhead.time),zn(r,r.gzhead.time>>8&255),zn(r,r.gzhead.time>>16&255),zn(r,r.gzhead.time>>24&255),zn(r,r.level===9?2:r.strategy>=Nv||r.level<2?4:0),zn(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(zn(r,255&r.gzhead.extra.length),zn(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Kr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Mb):(zn(r,0),zn(r,0),zn(r,0),zn(r,0),zn(r,0),zn(r,r.level===9?2:r.strategy>=Nv||r.level<2?4:0),zn(r,BY),r.status=tu);else{let c=Nc+(r.w_bits-8<<4)<<8,h=-1;h=r.strategy>=Nv||r.level<2?0:r.level<6?1:r.level===6?2:3,c|=h<<6,r.strstart!==0&&(c|=FY),c+=31-c%31,r.status=tu,Rd(r,c),r.strstart!==0&&(Rd(r,e.adler>>>16),Rd(r,65535&e.adler)),e.adler=1}if(r.status===Mb)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ho(e),i=r.pending,r.pending!==r.pending_buf_size));)zn(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=wm)}else r.status=wm;if(r.status===wm)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ho(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindexi&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=Cm)}else r.status=Cm;if(r.status===Cm)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ho(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindexi&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=xm)}else r.status=xm;if(r.status===xm&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ho(e),r.pending+2<=r.pending_buf_size&&(zn(r,255&e.adler),zn(r,e.adler>>8&255),e.adler=0,r.status=tu)):r.status=tu),r.pending!==0){if(Ho(e),e.avail_out===0)return r.last_flush=-1,Xn}else if(e.avail_in===0&&Tk(t)<=Tk(n)&&t!==Xr)return nl(e,yf);if(r.status===ef&&e.avail_in!==0)return nl(e,yf);if(e.avail_in!==0||r.lookahead!==0||t!==Js&&r.status!==ef){var l=r.strategy===Nv?function(c,h){let s;for(;;){if(c.lookahead===0&&(yu(c),c.lookahead===0)){if(h===Js)return Gr;break}if(c.match_length=0,s=cl(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++,s&&(oi(c,!1),c.strm.avail_out===0))return Gr}return c.insert=0,h===Xr?(oi(c,!0),c.strm.avail_out===0?nu:Oc):c.last_lit&&(oi(c,!1),c.strm.avail_out===0)?Gr:wf}(r,t):r.strategy===OY?function(c,h){let s,p,d,v;const m=c.window;for(;;){if(c.lookahead<=tl){if(yu(c),c.lookahead<=tl&&h===Js)return Gr;if(c.lookahead===0)break}if(c.match_length=0,c.lookahead>=Bn&&c.strstart>0&&(d=c.strstart-1,p=m[d],p===m[++d]&&p===m[++d]&&p===m[++d])){v=c.strstart+tl;do;while(p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&dc.lookahead&&(c.match_length=c.lookahead)}if(c.match_length>=Bn?(s=cl(c,1,c.match_length-Bn),c.lookahead-=c.match_length,c.strstart+=c.match_length,c.match_length=0):(s=cl(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++),s&&(oi(c,!1),c.strm.avail_out===0))return Gr}return c.insert=0,h===Xr?(oi(c,!0),c.strm.avail_out===0?nu:Oc):c.last_lit&&(oi(c,!1),c.strm.avail_out===0)?Gr:wf}(r,t):tf[r.level].func(r,t);if(l!==nu&&l!==Oc||(r.status=ef),l===Gr||l===nu)return e.avail_out===0&&(r.last_flush=-1),Xn;if(l===wf&&(t===EY?$Y(r):t!==Tb&&(aT(r,0,0,!1),t===DY&&(Jo(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Ho(e),e.avail_out===0))return r.last_flush=-1,Xn}return t!==Xr?Xn:r.wrap<=0?_o:(r.wrap===2?(zn(r,255&e.adler),zn(r,e.adler>>8&255),zn(r,e.adler>>16&255),zn(r,e.adler>>24&255),zn(r,255&e.total_in),zn(r,e.total_in>>8&255),zn(r,e.total_in>>16&255),zn(r,e.total_in>>24&255)):(Rd(r,e.adler>>>16),Rd(r,65535&e.adler)),Ho(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Xn:_o)}try{String.fromCharCode.call(null,0)}catch{}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const Ib=new Vs(256);for(let e=0;e<256;e++)Ib[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;function $b(e){let t,n,r,i,a=0;const l=e.length;for(r=0;r>>6,c[i++]=128|63&t):t<65536?(c[i++]=224|t>>>12,c[i++]=128|t>>>6&63,c[i++]=128|63&t):(c[i++]=240|t>>>18,c[i++]=128|t>>>12&63,c[i++]=128|t>>>6&63,c[i++]=128|63&t);return c}Ib[254]=Ib[254]=1;class oT{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}class Rb{constructor(t){this.options={level:gk,method:Nc,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...t||{}};const n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new oT,this.strm.avail_out=0;var r,i,a=function(l,c,h,s,p,d){if(!l)return Fr;let v=1;if(c===gk&&(c=6),s<0?(v=0,s=-s):s>15&&(v=2,s-=16),p<1||p>NY||h!==Nc||s<8||s>15||c<0||c>9||d<0||d>YP)return nl(l,Fr);s===8&&(s=9);const m=new jY;return l.state=m,m.strm=l,m.wrap=v,m.gzhead=null,m.w_bits=s,m.w_size=1<=s.w_size&&(v===0&&(Jo(s.head),s.strstart=0,s.block_start=0,s.insert=0),b=new Vs(s.w_size),Xs(b,h,E-s.w_size,s.w_size,0),h=b,E=s.w_size),m=c.avail_in,_=c.next_in,y=c.input,c.avail_in=E,c.next_in=0,c.input=h,yu(s);s.lookahead>=Bn;){p=s.strstart,d=s.lookahead-(Bn-1);do s.ins_h=(s.ins_h<0||r.avail_out===0)&&a!==_o);return l===Xr?(a=function(c){let h;return c&&c.state?(h=c.state.status,h!==vg&&h!==Mb&&h!==wm&&h!==Cm&&h!==xm&&h!==tu&&h!==ef?nl(c,Fr):(c.state=null,h===tu?nl(c,k2):Xn)):Fr}(this.strm),this.onEnd(a),this.ended=!0,a===Xn):l!==Nf||(this.onEnd(Xn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Xn&&(this.result=KP(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}const Fv=30,WY=12;function HY(e,t){let n,r,i,a,l,c,h,s,p,d;const v=e.state;n=e.next_in;const m=e.input,_=n+(e.avail_in-5);r=e.next_out;const y=e.output,b=r-(t-e.avail_out),E=r+(e.avail_out-257),k=v.dmax,C=v.wsize,x=v.whave,D=v.wnext,P=v.window;i=v.hold,a=v.bits;const w=v.lencode,M=v.distcode,T=(1<>>24,i>>>=c,a-=c,c=l>>>16&255,c===0)y[r++]=65535&l;else{if(!(16&c)){if((64&c)==0){l=w[(65535&l)+(i&(1<>>=c,a-=c),a<15&&(i+=m[n++]<>>24,i>>>=c,a-=c,c=l>>>16&255,!(16&c)){if((64&c)==0){l=M[(65535&l)+(i&(1<k){e.msg="invalid distance too far back",v.mode=Fv;break e}if(i>>>=c,a-=c,c=r-b,s>c){if(c=s-c,c>x&&v.sane){e.msg="invalid distance too far back",v.mode=Fv;break e}if(p=0,d=P,D===0){if(p+=C-c,c2;)y[r++]=d[p++],y[r++]=d[p++],y[r++]=d[p++],h-=3;h&&(y[r++]=d[p++],h>1&&(y[r++]=d[p++]))}else{p=r-s;do y[r++]=y[p++],y[r++]=y[p++],y[r++]=y[p++],h-=3;while(h>2);h&&(y[r++]=y[p++],h>1&&(y[r++]=y[p++]))}break}}break}}while(n<_&&r>3,n-=h,a-=h<<3,i&=(1<=1&&R[E]===0;E--);if(k>E&&(k=E),E===0)return i[a++]=20971520,i[a++]=20971520,c.bits=1,0;for(b=1;b0&&(e===Ik||E!==1))return-1;for(K[1]=0,_=1;_Ak||e===$k&&P>Mk)return 1;for(;;){N=_-x,l[y]m?(z=oe[Pe+l[y]],U=M[T+l[y]]):(z=96,U=0),s=1<<_-x,p=1<>x)+p]=N<<24|z<<16|U|0;while(p!==0);for(s=1<<_-1;w&s;)s>>=1;if(s!==0?(w&=s-1,w+=s):w=0,y++,--R[_]==0){if(_===E)break;_=t[n+l[y]]}if(_>k&&(w&he)!==d){for(x===0&&(x=k),v+=b,C=_-x,D=1<Ak||e===$k&&P>Mk)return 1;d=w&he,i[d]=k<<24|C<<16|v-a|0}}return w!==0&&(i[v+w]=_-x<<24|64<<16|0),c.bits=k,0}const JY=0,lT=1,uT=2,cT=1,Rk=2,Lk=3,Nk=4,Fk=5,Bk=6,Uk=7,jk=8,zk=9,Vk=10,mg=11,so=12,t0=13,Wk=14,n0=15,Hk=16,Kk=17,Gk=18,Yk=19,Bv=20,Uv=21,Xk=22,Jk=23,Zk=24,Qk=25,qk=26,r0=27,e4=28,t4=29,gr=30,ZY=852,QY=592;function n4(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}class qY{constructor(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ia(320),this.work=new Ia(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function eX(e){let t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,function(n){let r;return n&&n.state?(r=n.state,n.total_in=n.total_out=r.total=0,n.msg="",r.wrap&&(n.adler=1&r.wrap),r.mode=cT,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new hg(ZY),r.distcode=r.distdyn=new hg(QY),r.sane=1,r.back=-1,Xn):Fr}(e)):Fr}function tX(e,t){let n,r;return e?(r=new qY,e.state=r,r.window=null,n=function(i,a){let l,c;return i&&i.state?(c=i.state,a<0?(l=0,a=-a):(l=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?Fr:(c.window!==null&&c.wbits!==a&&(c.window=null),c.wrap=l,c.wbits=a,eX(i))):Fr}(e,t),n!==Xn&&(e.state=null),n):Fr}let i0,a0,r4=!0;function nX(e){if(r4){let t;for(i0=new hg(512),a0=new hg(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Cf(lT,e.lens,0,288,i0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Cf(uT,e.lens,0,32,a0,0,e.work,{bits:5}),r4=!1}e.lencode=i0,e.lenbits=9,e.distcode=a0,e.distbits=5}function dT(e,t,n,r){let i;const a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(Xs(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),Xs(a.window,t,n-r,i,a.wnext),(r-=i)?(Xs(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=Kr(n.check,K,2,0),s=0,p=0,n.mode=Rk;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&s)<<8)+(s>>8))%31){e.msg="incorrect header check",n.mode=gr;break}if((15&s)!==Nc){e.msg="unknown compression method",n.mode=gr;break}if(s>>>=4,p-=4,P=8+(15&s),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=gr;break}n.dmax=1<>8&1),512&n.flags&&(K[0]=255&s,K[1]=s>>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0,n.mode=Lk;case Lk:for(;p<32;){if(c===0)break e;c--,s+=r[a++]<>>8&255,K[2]=s>>>16&255,K[3]=s>>>24&255,n.check=Kr(n.check,K,4,0)),s=0,p=0,n.mode=Nk;case Nk:for(;p<16;){if(c===0)break e;c--,s+=r[a++]<>8),512&n.flags&&(K[0]=255&s,K[1]=s>>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0,n.mode=Fk;case Fk:if(1024&n.flags){for(;p<16;){if(c===0)break e;c--,s+=r[a++]<>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0}else n.head&&(n.head.extra=null);n.mode=Bk;case Bk:if(1024&n.flags&&(m=n.length,m>c&&(m=c),m&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),Xs(n.head.extra,r,a,m,P)),512&n.flags&&(n.check=Kr(n.check,r,m,a)),c-=m,a+=m,n.length-=m),n.length))break e;n.length=0,n.mode=Uk;case Uk:if(2048&n.flags){if(c===0)break e;m=0;do P=r[a+m++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=so;break;case Vk:for(;p<32;){if(c===0)break e;c--,s+=r[a++]<>>=7&p,p-=7&p,n.mode=r0;break}for(;p<3;){if(c===0)break e;c--,s+=r[a++]<>>=1,p-=1,3&s){case 0:n.mode=Wk;break;case 1:if(nX(n),n.mode=Bv,t===Lv){s>>>=2,p-=2;break e}break;case 2:n.mode=Kk;break;case 3:e.msg="invalid block type",n.mode=gr}s>>>=2,p-=2;break;case Wk:for(s>>>=7&p,p-=7&p;p<32;){if(c===0)break e;c--,s+=r[a++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=gr;break}if(n.length=65535&s,s=0,p=0,n.mode=n0,t===Lv)break e;case n0:n.mode=Hk;case Hk:if(m=n.length,m){if(m>c&&(m=c),m>h&&(m=h),m===0)break e;Xs(i,r,a,m,l),c-=m,a+=m,h-=m,l+=m,n.length-=m;break}n.mode=so;break;case Kk:for(;p<14;){if(c===0)break e;c--,s+=r[a++]<>>=5,p-=5,n.ndist=1+(31&s),s>>>=5,p-=5,n.ncode=4+(15&s),s>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=gr;break}n.have=0,n.mode=Gk;case Gk:for(;n.have>>=3,p-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},w=Cf(JY,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,w){e.msg="invalid code lengths set",n.mode=gr;break}n.have=0,n.mode=Yk;case Yk:for(;n.have>>24,E=R>>>16&255,k=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]<>>=b,p-=b,n.lens[n.have++]=k;else{if(k===16){for(T=b+2;p>>=b,p-=b,n.have===0){e.msg="invalid bit length repeat",n.mode=gr;break}P=n.lens[n.have-1],m=3+(3&s),s>>>=2,p-=2}else if(k===17){for(T=b+3;p>>=b,p-=b,P=0,m=3+(7&s),s>>>=3,p-=3}else{for(T=b+7;p>>=b,p-=b,P=0,m=11+(127&s),s>>>=7,p-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=gr;break}for(;m--;)n.lens[n.have++]=P}}if(n.mode===gr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=gr;break}if(n.lenbits=9,M={bits:n.lenbits},w=Cf(lT,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,w){e.msg="invalid literal/lengths set",n.mode=gr;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},w=Cf(uT,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,w){e.msg="invalid distances set",n.mode=gr;break}if(n.mode=Bv,t===Lv)break e;case Bv:n.mode=Uv;case Uv:if(c>=6&&h>=258){e.next_out=l,e.avail_out=h,e.next_in=a,e.avail_in=c,n.hold=s,n.bits=p,HY(e,v),l=e.next_out,i=e.output,h=e.avail_out,a=e.next_in,r=e.input,c=e.avail_in,s=n.hold,p=n.bits,n.mode===so&&(n.back=-1);break}for(n.back=0;R=n.lencode[s&(1<>>24,E=R>>>16&255,k=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]<>C)],b=R>>>24,E=R>>>16&255,k=65535&R,!(C+b<=p);){if(c===0)break e;c--,s+=r[a++]<>>=C,p-=C,n.back+=C}if(s>>>=b,p-=b,n.back+=b,n.length=k,E===0){n.mode=qk;break}if(32&E){n.back=-1,n.mode=so;break}if(64&E){e.msg="invalid literal/length code",n.mode=gr;break}n.extra=15&E,n.mode=Xk;case Xk:if(n.extra){for(T=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Jk;case Jk:for(;R=n.distcode[s&(1<>>24,E=R>>>16&255,k=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]<>C)],b=R>>>24,E=R>>>16&255,k=65535&R,!(C+b<=p);){if(c===0)break e;c--,s+=r[a++]<>>=C,p-=C,n.back+=C}if(s>>>=b,p-=b,n.back+=b,64&E){e.msg="invalid distance code",n.mode=gr;break}n.offset=k,n.extra=15&E,n.mode=Zk;case Zk:if(n.extra){for(T=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=gr;break}n.mode=Qk;case Qk:if(h===0)break e;if(m=v-h,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=gr;break}m>n.wnext?(m-=n.wnext,_=n.wsize-m):_=n.wnext-m,m>n.length&&(m=n.length),y=n.window}else y=i,_=l-n.offset,m=n.length;m>h&&(m=h),h-=m,n.length-=m;do i[l++]=y[_++];while(--m);n.length===0&&(n.mode=Uv);break;case qk:if(h===0)break e;i[l++]=n.length,h--,n.mode=Uv;break;case r0:if(n.wrap){for(;p<32;){if(c===0)break e;c--,s|=r[a++]<=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),!(n.windowBits>=0&&n.windowBits<16)||t&&t.windowBits||(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(15&n.windowBits)==0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new oT,this.strm.avail_out=0;let r=tX(this.strm,n.windowBits);if(r!==Xn||(this.header=new iX,function(i,a){let l;i&&i.state&&(l=i.state,(2&l.wrap)==0||(l.head=a,a.done=!1))}(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=$b(n.dictionary):n.dictionary instanceof ArrayBuffer&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(r=i4(this.strm,n.dictionary),r!==Xn))))throw Error(Vf[r])}push(t,n){const{strm:r,options:{chunkSize:i,dictionary:a}}=this;let l,c,h=!1;if(this.ended)return!1;c=n===~~n?n:n===!0?Xr:Js,typeof t=="string"?r.input=function(s){const p=new Vs(s.length);for(let d=0,v=p.length;d0||r.avail_out===0)&&l!==_o);return l===_o&&(c=Xr),c===Xr?(l=function(s){if(!s||!s.state)return Fr;const p=s.state;return p.window&&(p.window=null),s.state=null,Xn}(this.strm),this.onEnd(l),this.ended=!0,l===Xn):c!==Nf||(this.onEnd(Xn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Xn&&(this.result=KP(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}var s4=[0,1,3,7,15,31,63,127,255],nf=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};nf.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},nf.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var n=8-this.bitOffset;if(e>=n)t<<=n,t|=s4[n]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=n;else{t<<=e;var r=n-e;t|=(this.curByte&s4[e]<>r,this.bitOffset+=e,e=0}}return t},nf.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},nf.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+r.toString(16)).slice(-2)).join("")}(t)};var aX=nf,Hl=function(){};Hl.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Hl.prototype.read=function(e,t,n){for(var r=0;r>>0},this.updateCRC=function(t){e=e<<8^s0[255&(e>>>24^t)]},this.updateCRCRun=function(t,n){for(;n-- >0;)e=e<<8^s0[255&(e>>>24^t)]}}),o4=function(e,t){var n,r=e[t];for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},_r={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Ko={};Ko[_r.LAST_BLOCK]="Bad file checksum",Ko[_r.NOT_BZIP_DATA]="Not bzip data",Ko[_r.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Ko[_r.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Ko[_r.DATA_ERROR]="Data error",Ko[_r.OUT_OF_MEMORY]="Out of memory",Ko[_r.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var ri=function(e,t){var n=Ko[e]||"unknown error";t&&(n+=": "+t);var r=new TypeError(n);throw r.errorCode=e,r},rf=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};rf.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new sX,!0):(this.writeCount=-1,!1)},rf.prototype._start_bunzip=function(e,t){var n=new Uint8Array(4);e.read(n,0,4)===4&&String.fromCharCode(n[0],n[1],n[2])==="BZh"||ri(_r.NOT_BZIP_DATA,"bad magic");var r=n[3]-48;(r<1||r>9)&&ri(_r.NOT_BZIP_DATA,"level out of range"),this.reader=new aX(e),this.dbufSize=1e5*r,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},rf.prototype._get_next_block=function(){var e,t,n,r=this.reader,i=r.pi();if(i==="177245385090")return!1;i!=="314159265359"&&ri(_r.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&ri(_r.OBSOLETE_INPUT);var a=r.read(24);a>this.dbufSize&&ri(_r.DATA_ERROR,"initial position out of bounds");var l=r.read(16),c=new Uint8Array(256),h=0;for(e=0;e<16;e++)if(l&1<<15-e){var s=16*e;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(c[h++]=s+t)}var p=r.read(3);(p<2||p>6)&&ri(_r.DATA_ERROR);var d=r.read(15);d===0&&ri(_r.DATA_ERROR);var v=new Uint8Array(256);for(e=0;e=p&&ri(_r.DATA_ERROR);m[e]=o4(v,t)}var _,y=h+2,b=[];for(t=0;t20)&&ri(_r.DATA_ERROR),r.read(1);)r.read(1)?l--:l++;C[e]=l}for(E=k=C[0],e=1;ek?k=C[e]:C[e]=d&&ri(_r.DATA_ERROR),_=b[m[R++]]),e=_.minLen,t=r.read(e);e>_.maxLen&&ri(_r.DATA_ERROR),!(t<=_.limit[e]);e++)t=t<<1|r.read(1);((t-=_.base[e])<0||t>=258)&&ri(_r.DATA_ERROR);var N=_.permute[t];if(N!==0&&N!==1){if(M)for(M=0,T+l>this.dbufSize&&ri(_r.DATA_ERROR),P[w=c[v[0]]]+=l;l--;)K[T++]=w;if(N>h)break;T>=this.dbufSize&&ri(_r.DATA_ERROR),P[w=c[w=o4(v,e=N-1)]]++,K[T++]=w}else M||(M=1,l=0),l+=N===0?M:2*M,M<<=1}for((a<0||a>=T)&&ri(_r.DATA_ERROR),t=0,e=0;e<256;e++)n=t+P[e],P[e]=t,t=n;for(e=0;e>=8,oe=-1),this.writePos=z,this.writeCurrent=U,this.writeCount=T,this.writeRun=oe,!0},rf.prototype._read_bunzip=function(e,t){var n,r,i;if(this.writeCount<0)return 0;var a=this.dbuf,l=this.writePos,c=this.writeCurrent,h=this.writeCount;this.outputsize;for(var s=this.writeRun;h;){for(h--,r=c,c=255&(l=a[l]),l>>=8,s++==3?(n=c,i=r,c=-1):(n=1,i=c),this.blockCRC.updateCRCRun(i,n);n--;)this.outputStream.writeByte(i),this.nextoutput++;c!=r&&(s=0)}return this.writeCount=h,this.blockCRC.getCRC()!==this.targetBlockCRC&&ri(_r.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var oX=function(e){if("readByte"in e)return e;var t=new fT;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(n){this.pos=n},t.eof=function(){return this.pos>=e.length},t},lX=function(e){var t=new fT,n=!0;if(e)if(typeof e=="number")t.buffer=new Uint8Array(e),n=!1;else{if("writeByte"in e)return e;t.buffer=e,n=!1}else t.buffer=new Uint8Array(16384);return t.pos=0,t.writeByte=function(r){if(n&&this.pos>=this.buffer.length){var i=new Uint8Array(2*this.buffer.length);i.set(this.buffer),this.buffer=i}this.buffer[this.pos++]=r},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!n)throw new TypeError("outputsize does not match decoded input");var r=new Uint8Array(this.pos);r.set(this.buffer.subarray(0,this.pos)),this.buffer=r}return this.buffer},t._coerced=!0,t},l4=function(e,t,n){for(var r=oX(e),i=lX(t),a=new rf(r,i);!("eof"in r)||!r.eof();)if(a._init_block())a._read_bunzip();else{var l=a.reader.read(32)>>>0;if(l!==a.streamCRC&&ri(_r.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+l.toString(16)+")"),!n||!("eof"in r)||r.eof())break;a._start_bunzip(r,i)}if("getBuffer"in i)return i.getBuffer()};class qc{static get tag(){return ve.packet.literalData}constructor(t=new Date){this.format=ve.literal.utf8,this.date=Te.normalizeDate(t),this.text=null,this.data=null,this.filename=""}setText(t,n=ve.literal.utf8){this.format=n,this.text=t,this.data=null}getText(t=!1){return(this.text===null||Te.isStream(this.text))&&(this.text=Te.decodeUTF8(Te.nativeEOL(this.getBytes(t)))),this.text}setBytes(t,n){this.format=n,this.data=t,this.text=null}getBytes(t=!1){return this.data===null&&(this.data=Te.canonicalizeEOL(Te.encodeUTF8(this.text))),t?Sc(this.data):this.data}setFilename(t){this.filename=t}getFilename(){return this.filename}async read(t){await r_(t,async n=>{const r=await n.readByte(),i=await n.readByte();this.filename=Te.decodeUTF8(await n.readBytes(i)),this.date=Te.readDate(await n.readBytes(4));let a=n.remainder();Ar(a)&&(a=await Ir(a)),this.setBytes(a,r)})}writeHeader(){const t=Te.encodeUTF8(this.filename),n=new Uint8Array([t.length]),r=new Uint8Array([this.format]),i=Te.writeDate(this.date);return Te.concatUint8Array([r,n,t,i])}write(){const t=this.writeHeader(),n=this.getBytes();return Te.concat([t,n])}}const Ld=Symbol("verified"),uX=new Set([ve.signatureSubpacket.issuer,ve.signatureSubpacket.issuerFingerprint,ve.signatureSubpacket.embeddedSignature]);class di{static get tag(){return ve.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new vl,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[Ld]=null}read(t){let n=0;if(this.version=t[n++],this.version!==4&&this.version!==5)throw new zr(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=t[n++],this.publicKeyAlgorithm=t[n++],this.hashAlgorithm=t[n++],n+=this.readSubPackets(t.subarray(n,t.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=t.subarray(0,n),n+=this.readSubPackets(t.subarray(n,t.length),!1),this.signedHashValue=t.subarray(n,n+2),n+=2,this.params=Kt.signature.parseSignatureParams(this.publicKeyAlgorithm,t.subarray(n,t.length))}writeParams(){return this.params instanceof Promise?wl(async()=>Kt.serializeParams(this.publicKeyAlgorithm,await this.params)):Kt.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const t=[];return t.push(this.signatureData),t.push(this.writeUnhashedSubPackets()),t.push(this.signedHashValue),t.push(this.writeParams()),Te.concat(t)}async sign(t,n,r=new Date,i=!1){t.version===5?this.version=5:this.version=4;const a=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Te.normalizeDate(r),this.issuerKeyVersion=t.version,this.issuerFingerprint=t.getFingerprintBytes(),this.issuerKeyID=t.getKeyID(),a.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Te.concat(a);const l=this.toHash(this.signatureType,n,i),c=await this.hash(this.signatureType,n,l,i);this.signedHashValue=ui(_u(c),0,2);const h=async()=>Kt.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,t.publicParams,t.privateParams,l,await Ir(c));Te.isStream(c)?this.params=h():(this.params=await h(),this[Ld]=!0)}writeHashedSubPackets(){const t=ve.signatureSubpacket,n=[];let r;if(this.created===null)throw Error("Missing signature creation time");n.push(cr(t.signatureCreationTime,!0,Te.writeDate(this.created))),this.signatureExpirationTime!==null&&n.push(cr(t.signatureExpirationTime,!0,Te.writeNumber(this.signatureExpirationTime,4))),this.exportable!==null&&n.push(cr(t.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),this.trustLevel!==null&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),n.push(cr(t.trustSignature,!0,r))),this.regularExpression!==null&&n.push(cr(t.regularExpression,!0,this.regularExpression)),this.revocable!==null&&n.push(cr(t.revocable,!0,new Uint8Array([this.revocable?1:0]))),this.keyExpirationTime!==null&&n.push(cr(t.keyExpirationTime,!0,Te.writeNumber(this.keyExpirationTime,4))),this.preferredSymmetricAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredSymmetricAlgorithms)),n.push(cr(t.preferredSymmetricAlgorithms,!1,r))),this.revocationKeyClass!==null&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Te.concat([r,this.revocationKeyFingerprint]),n.push(cr(t.revocationKey,!1,r))),this.issuerKeyID.isNull()||this.issuerKeyVersion===5||n.push(cr(t.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach(({name:l,value:c,humanReadable:h,critical:s})=>{r=[new Uint8Array([h?128:0,0,0,0])];const p=Te.encodeUTF8(l);r.push(Te.writeNumber(p.length,2)),r.push(Te.writeNumber(c.length,2)),r.push(p),r.push(c),r=Te.concat(r),n.push(cr(t.notationData,s,r))}),this.preferredHashAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredHashAlgorithms)),n.push(cr(t.preferredHashAlgorithms,!1,r))),this.preferredCompressionAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredCompressionAlgorithms)),n.push(cr(t.preferredCompressionAlgorithms,!1,r))),this.keyServerPreferences!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.keyServerPreferences)),n.push(cr(t.keyServerPreferences,!1,r))),this.preferredKeyServer!==null&&n.push(cr(t.preferredKeyServer,!1,Te.encodeUTF8(this.preferredKeyServer))),this.isPrimaryUserID!==null&&n.push(cr(t.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),this.policyURI!==null&&n.push(cr(t.policyURI,!1,Te.encodeUTF8(this.policyURI))),this.keyFlags!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.keyFlags)),n.push(cr(t.keyFlags,!0,r))),this.signersUserID!==null&&n.push(cr(t.signersUserID,!1,Te.encodeUTF8(this.signersUserID))),this.reasonForRevocationFlag!==null&&(r=Te.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),n.push(cr(t.reasonForRevocation,!0,r))),this.features!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.features)),n.push(cr(t.features,!1,r))),this.signatureTargetPublicKeyAlgorithm!==null&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Te.stringToUint8Array(this.signatureTargetHash)),r=Te.concat(r),n.push(cr(t.signatureTarget,!0,r))),this.embeddedSignature!==null&&n.push(cr(t.embeddedSignature,!0,this.embeddedSignature.write())),this.issuerFingerprint!==null&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Te.concat(r),n.push(cr(t.issuerFingerprint,this.version===5,r))),this.preferredAEADAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredAEADAlgorithms)),n.push(cr(t.preferredAEADAlgorithms,!1,r)));const i=Te.concat(n),a=Te.writeNumber(i.length,2);return Te.concat([a,i])}writeUnhashedSubPackets(){const t=[];this.unhashedSubpackets.forEach(i=>{t.push(oh(i.length)),t.push(i)});const n=Te.concat(t),r=Te.writeNumber(n.length,2);return Te.concat([r,n])}readSubPacket(t,n=!0){let r=0;const i=!!(128&t[r]),a=127&t[r];if(n||(this.unhashedSubpackets.push(t.subarray(r,t.length)),uX.has(a)))switch(r++,a){case ve.signatureSubpacket.signatureCreationTime:this.created=Te.readDate(t.subarray(r,t.length));break;case ve.signatureSubpacket.signatureExpirationTime:{const l=Te.readNumber(t.subarray(r,t.length));this.signatureNeverExpires=l===0,this.signatureExpirationTime=l;break}case ve.signatureSubpacket.exportableCertification:this.exportable=t[r++]===1;break;case ve.signatureSubpacket.trustSignature:this.trustLevel=t[r++],this.trustAmount=t[r++];break;case ve.signatureSubpacket.regularExpression:this.regularExpression=t[r];break;case ve.signatureSubpacket.revocable:this.revocable=t[r++]===1;break;case ve.signatureSubpacket.keyExpirationTime:{const l=Te.readNumber(t.subarray(r,t.length));this.keyExpirationTime=l,this.keyNeverExpires=l===0;break}case ve.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.revocationKey:this.revocationKeyClass=t[r++],this.revocationKeyAlgorithm=t[r++],this.revocationKeyFingerprint=t.subarray(r,r+20);break;case ve.signatureSubpacket.issuer:this.issuerKeyID.read(t.subarray(r,t.length));break;case ve.signatureSubpacket.notationData:{const l=!!(128&t[r]);r+=4;const c=Te.readNumber(t.subarray(r,r+2));r+=2;const h=Te.readNumber(t.subarray(r,r+2));r+=2;const s=Te.decodeUTF8(t.subarray(r,r+c)),p=t.subarray(r+c,r+c+h);this.rawNotations.push({name:s,humanReadable:l,value:p,critical:i}),l&&(this.notations[s]=Te.decodeUTF8(p));break}case ve.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.primaryUserID:this.isPrimaryUserID=t[r++]!==0;break;case ve.signatureSubpacket.policyURI:this.policyURI=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.keyFlags:this.keyFlags=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.signersUserID:this.signersUserID=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=t[r++],this.reasonForRevocationString=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.features:this.features=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=t[r++],this.signatureTargetHashAlgorithm=t[r++];const l=Kt.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Te.uint8ArrayToString(t.subarray(r,r+l));break}case ve.signatureSubpacket.embeddedSignature:this.embeddedSignature=new di,this.embeddedSignature.read(t.subarray(r,t.length));break;case ve.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=t[r++],this.issuerFingerprint=t.subarray(r,t.length),this.issuerKeyVersion===5?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case ve.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...t.subarray(r,t.length)];break;default:{const l=Error("Unknown signature subpacket type "+a);if(i)throw l;Te.printDebug(l)}}}readSubPackets(t,n=!0,r){const i=Te.readNumber(t.subarray(0,2));let a=2;for(;a<2+i;){const l=AP(t.subarray(a,t.length));a+=l.offset,this.readSubPacket(t.subarray(a,a+l.len),n,r),a+=l.len}return a}toSign(t,n){const r=ve.signature;switch(t){case r.binary:return n.text!==null?Te.encodeUTF8(n.getText(!0)):n.getBytes(!0);case r.text:{const i=n.getBytes(!0);return Te.canonicalizeEOL(i)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let i,a;if(n.userID)a=180,i=n.userID;else{if(!n.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");a=209,i=n.userAttribute}const l=i.write();return Te.concat([this.toSign(r.key,n),new Uint8Array([a]),Te.writeNumber(l.length,4),l])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Te.concat([this.toSign(r.key,n),this.toSign(r.key,{key:n.bind})]);case r.key:if(n.key===void 0)throw Error("Key packet is required for this signature.");return n.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,n);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(t,n){let r=0;return Sr(_u(this.signatureData),i=>{r+=i.length},()=>{const i=[];return this.version!==5||this.signatureType!==ve.signature.binary&&this.signatureType!==ve.signature.text||(n?i.push(new Uint8Array(6)):i.push(t.writeHeader())),i.push(new Uint8Array([this.version,255])),this.version===5&&i.push(new Uint8Array(4)),i.push(Te.writeNumber(r,4)),Te.concat(i)})}toHash(t,n,r=!1){const i=this.toSign(t,n);return Te.concat([i,this.signatureData,this.calculateTrailer(n,r)])}async hash(t,n,r,i=!1){return r||(r=this.toHash(t,n,i)),Kt.hash.digest(this.hashAlgorithm,r)}async verify(t,n,r,i=new Date,a=!1,l=Lt){if(!this.issuerKeyID.equals(t.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==t.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const c=n===ve.signature.binary||n===ve.signature.text;if(!(this[Ld]&&!c)){let s,p;if(this.hashed?p=await this.hashed:(s=this.toHash(n,r,a),p=await this.hash(n,r,s)),p=await Ir(p),this.signedHashValue[0]!==p[0]||this.signedHashValue[1]!==p[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[Ld]=await Kt.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,t.publicParams,s,p),!this[Ld])throw Error("Signature verification failed")}const h=Te.normalizeDate(i);if(h&&this.created>h)throw Error("Signature creation time is in the future");if(h&&h>=this.getExpirationTime())throw Error("Signature is expired");if(l.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+ve.read(ve.hash,this.hashAlgorithm).toUpperCase());if(l.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[ve.signature.binary,ve.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+ve.read(ve.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach(({name:s,critical:p})=>{if(p&&l.knownNotations.indexOf(s)<0)throw Error("Unknown critical notation: "+s)}),this.revocationKeyClass!==null)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(t=new Date){const n=Te.normalizeDate(t);return n!==null&&!(this.created<=n&&ndi.prototype.calculateTrailer.apply(await this.correspondingSig,t))}async verify(){const t=await this.correspondingSig;if(!t||t.constructor.tag!==ve.packet.signature)throw Error("Corresponding signature packet missing");if(t.signatureType!==this.signatureType||t.hashAlgorithm!==this.hashAlgorithm||t.publicKeyAlgorithm!==this.publicKeyAlgorithm||!t.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return t.hashed=this.hashed,t.verify.apply(t,arguments)}}function cX(e,t){if(!t[e]){let n;try{n=ve.read(ve.packet,e)}catch{throw new zr("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+n)}return new t[e]}is.prototype.hash=di.prototype.hash,is.prototype.toHash=di.prototype.toHash,is.prototype.toSign=di.prototype.toSign;class Gn extends Array{static async fromBinary(t,n,r=Lt){const i=new Gn;return await i.read(t,n,r),i}async read(t,n,r=Lt){this.stream=xo(t,async(a,l)=>{const c=ea(l);try{for(;;)if(await c.ready,await dY(a,async h=>{try{if(h.tag===ve.packet.marker||h.tag===ve.packet.trust)return;const s=cX(h.tag,n);s.packets=new Gn,s.fromStream=Te.isStream(h.packet),await s.read(h.packet,r),await c.write(s)}catch(s){const p=!r.ignoreUnsupportedPackets&&s instanceof zr,d=!(r.ignoreMalformedPackets||s instanceof zr);if(p||d||_m(h.tag))await c.abort(s);else{const v=new Pb(h.tag,h.packet);await c.write(v)}Te.printDebugError(s)}}))return await c.ready,void await c.close()}catch(h){await c.abort(h)}});const i=qs(this.stream);for(;;){const{done:a,value:l}=await i.read();if(a?this.stream=null:this.push(l),a||_m(l.constructor.tag))break}i.releaseLock()}write(){const t=[];for(let n=0;n{if(a.push(h),l+=h.length,l>=c){const s=Math.min(Math.log(l)/Math.LN2|0,30),p=2**s,d=Te.concat([cY(s)].concat(a));return a=[d.subarray(1+p)],l=a[0].length,d.subarray(0,1+p)}},()=>Te.concat([oh(l)].concat(a))))}else{if(Te.isStream(i)){let a=0;t.push(Sr(_u(i),l=>{a+=l.length},()=>ck(r,a)))}else t.push(ck(r,i.length));t.push(i)}}return Te.concat(t)}filterByTag(...t){const n=new Gn,r=i=>a=>i===a;for(let i=0;in.constructor.tag===t)}indexOfTag(...t){const n=[],r=this,i=a=>l=>a===l;for(let a=0;a{this.algorithm=await r.readByte(),this.compressed=r.remainder(),await this.decompress(n)})}write(){return this.compressed===null&&this.compress(),Te.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(t=Lt){const n=ve.read(ve.compression,this.algorithm),r=hX[n];if(!r)throw Error(n+" decompression not supported");this.packets=await Gn.fromBinary(r(this.compressed),dX,t)}compress(){const t=ve.read(ve.compression,this.algorithm),n=fX[t];if(!n)throw Error(t+" compression not supported");this.compressed=n(this.packets.write(),this.deflateLevel)}}const Ns=Te.getNodeZlib();function u4(e){return e}function gg(e,t,n={}){return function(r){return!Te.isStream(r)||Ar(r)?wl(()=>Ir(r).then(i=>new Promise((a,l)=>{e(i,n,(c,h)=>{if(c)return l(c);a(h)})}))):n_(_2(r).pipe(t(n)))}}function _g(e,t={}){return function(n){const r=new e(t);return Sr(n,i=>{if(i.length)return r.push(i,Nf),r.result},()=>{if(e===Rb)return r.push([],Xr),r.result})}}function c4(e){return function(t){return wl(async()=>e(await Ir(t)))}}const fX=Ns?{zip:(e,t)=>gg(Ns.deflateRaw,Ns.createDeflateRaw,{level:t})(e),zlib:(e,t)=>gg(Ns.deflate,Ns.createDeflate,{level:t})(e)}:{zip:(e,t)=>_g(Rb,{raw:!0,level:t})(e),zlib:(e,t)=>_g(Rb,{level:t})(e)},hX=Ns?{uncompressed:u4,zip:gg(Ns.inflateRaw,Ns.createInflateRaw),zlib:gg(Ns.inflate,Ns.createInflate),bzip2:c4(l4)}:{uncompressed:u4,zip:_g(a4,{raw:!0}),zlib:_g(a4),bzip2:c4(l4)},pX=Te.constructAllowedPackets([qc,ch,is,di]);class hT{static get tag(){return ve.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(t){await r_(t,async n=>{const r=await n.readByte();if(r!==1)throw new zr(`Version ${r} of the SEIP packet is unsupported.`);this.encrypted=n.remainder()})}write(){return Te.concat([new Uint8Array([1]),this.encrypted])}async encrypt(t,n,r=Lt){const{blockSize:i}=Kt.getCipher(t);let a=this.packets.write();Ar(a)&&(a=await Ir(a));const l=await Kt.getPrefixRandom(t),c=new Uint8Array([211,20]),h=Te.concat([l,a,c]),s=await Kt.hash.sha1(Sc(h)),p=Te.concat([h,s]);return this.encrypted=await Kt.mode.cfb.encrypt(t,n,p,new Uint8Array(i),r),!0}async decrypt(t,n,r=Lt){const{blockSize:i}=Kt.getCipher(t);let a=_u(this.encrypted);Ar(a)&&(a=await Ir(a));const l=await Kt.mode.cfb.decrypt(t,n,a,new Uint8Array(i)),c=ui(Sc(l),-20),h=ui(l,0,-20),s=Promise.all([Ir(await Kt.hash.sha1(Sc(h))),Ir(c)]).then(([v,m])=>{if(!Te.equalsUint8Array(v,m))throw Error("Modification detected.");return new Uint8Array}),p=ui(h,i+2);let d=ui(p,0,-2);return d=Yi([d,wl(()=>s)]),Te.isStream(a)&&r.allowUnauthenticatedStream||(d=await Ir(d)),this.packets=await Gn.fromBinary(d,pX,r),!0}}const vX=Te.constructAllowedPackets([qc,ch,is,di]);class f_{static get tag(){return ve.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=ve.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(t){await r_(t,async n=>{const r=await n.readByte();if(r!==1)throw new zr(`Version ${r} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await n.readByte(),this.aeadAlgorithm=await n.readByte(),this.chunkSizeByte=await n.readByte();const i=Kt.getAEADMode(this.aeadAlgorithm);this.iv=await n.readBytes(i.ivLength),this.encrypted=n.remainder()})}write(){return Te.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(t,n,r=Lt){this.packets=await Gn.fromBinary(await this.crypt("decrypt",n,_u(this.encrypted)),vX,r)}async encrypt(t,n,r=Lt){this.cipherAlgorithm=t;const{ivLength:i}=Kt.getAEADMode(this.aeadAlgorithm);this.iv=Kt.random.getRandomBytes(i),this.chunkSizeByte=r.aeadChunkSizeByte;const a=this.packets.write();this.encrypted=await this.crypt("encrypt",n,a)}async crypt(t,n,r){const i=Kt.getAEADMode(this.aeadAlgorithm),a=await i(this.cipherAlgorithm,n),l=t==="decrypt"?i.tagLength:0,c=t==="encrypt"?i.tagLength:0,h=2**(this.chunkSizeByte+6)+l,s=new ArrayBuffer(21),p=new Uint8Array(s,0,13),d=new Uint8Array(s),v=new DataView(s),m=new Uint8Array(s,5,8);p.set([192|f_.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let _=0,y=Promise.resolve(),b=0,E=0;const k=this.iv;return xo(r,async(C,x)=>{if(Te.isStream(C)!=="array"){const w=new Rc({},{highWaterMark:Te.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:M=>M.length});pl(w.readable,x),x=w.writable}const D=qs(C),P=ea(x);try{for(;;){let w=await D.readBytes(h+l)||new Uint8Array;const M=w.subarray(w.length-l);let T,R;if(w=w.subarray(0,w.length-l),!_||w.length?(D.unshift(M),T=a[t](w,i.getNonce(k,m),p),E+=w.length-l+c):(v.setInt32(17,b),T=a[t](M,i.getNonce(k,m),d),E+=c,R=!0),b+=w.length-l,y=y.then(()=>T).then(async K=>{await P.ready,await P.write(K),E-=K.length}).catch(K=>P.abort(K)),(R||E>P.desiredSize)&&await y,R){await P.close();break}v.setInt32(9,++_)}}catch(w){await P.abort(w)}})}}class Lb{static get tag(){return ve.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new vl,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(t){if(this.version=t[0],this.version!==3)throw new zr(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(t.subarray(1,t.length)),this.publicKeyAlgorithm=t[9],this.encrypted=Kt.parseEncSessionKeyParams(this.publicKeyAlgorithm,t.subarray(10))}write(){const t=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),Kt.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return Te.concatUint8Array(t)}async encrypt(t){const n=Te.concatUint8Array([new Uint8Array([ve.write(ve.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,Te.writeChecksum(this.sessionKey)]),r=ve.write(ve.publicKey,this.publicKeyAlgorithm);this.encrypted=await Kt.publicKeyEncrypt(r,t.publicParams,n,t.getFingerprintBytes())}async decrypt(t,n){if(this.publicKeyAlgorithm!==t.algorithm)throw Error("Decryption error");const r=n?Te.concatUint8Array([new Uint8Array([n.sessionKeyAlgorithm]),n.sessionKey,Te.writeChecksum(n.sessionKey)]):null,i=await Kt.publicKeyDecrypt(this.publicKeyAlgorithm,t.publicParams,t.privateParams,this.encrypted,t.getFingerprintBytes(),r),a=i[0],l=i.subarray(1,i.length-2),c=i.subarray(i.length-2),h=Te.writeChecksum(l),s=h[0]===c[0]&h[1]===c[1];if(n){const p=s&a===n.sessionKeyAlgorithm&l.length===n.sessionKey.length;this.sessionKeyAlgorithm=Te.selectUint8(p,a,n.sessionKeyAlgorithm),this.sessionKey=Te.selectUint8Array(p,l,n.sessionKey)}else{if(!(s&&ve.read(ve.symmetric,a)))throw Error("Decryption error");this.sessionKey=l,this.sessionKeyAlgorithm=a}}}class xf{constructor(t=Lt){this.algorithm=ve.hash.sha256,this.type="iterated",this.c=t.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(t){let n=0;switch(this.type=ve.read(ve.s2k,t[n++]),this.algorithm=t[n++],this.type){case"simple":break;case"salted":this.salt=t.subarray(n,n+8),n+=8;break;case"iterated":this.salt=t.subarray(n,n+8),n+=8,this.c=t[n++];break;case"gnu":if(Te.uint8ArrayToString(t.subarray(n,n+3))!=="GNU")throw Error("Unknown s2k type.");if(n+=3,1e3+t[n++]!==1001)throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return n}write(){if(this.type==="gnu-dummy")return new Uint8Array([101,0,...Te.stringToUint8Array("GNU"),1]);const t=[new Uint8Array([ve.write(ve.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":t.push(this.salt);break;case"iterated":t.push(this.salt),t.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return Te.concatUint8Array(t)}async produceKey(t,n){t=Te.encodeUTF8(t);const r=[];let i=0,a=0;for(;i{this.privateParams[t].fill(0),delete this.privateParams[t]}),this.privateParams=null,this.isEncrypted=!0)}}async function d4(e,t,n){const{keySize:r}=Kt.getCipher(n);return e.produceKey(t,r)}var _X=x2(function(e){(function(t){function n(i){function a(){return Yt0&&(it.semantic=" "),it}}function C(tt,it){return function(){var yt,Ft,Oe,Fe,Ue;for(Fe=l(),yt=s("star"),Oe=0,Ue=it===void 0?0:it;(Ft=tt())!==null;)Oe+=1,d(yt,Ft);return Oe>=Ue?yt:(c(Fe),null)}}function x(tt){return tt.charCodeAt(0)>=128}function D(){return p("cr",m("\r")())}function P(){return p("crlf",_(D,T)())}function w(){return p("dquote",m('"')())}function M(){return p("htab",m(" ")())}function T(){return p("lf",m(` +`)}return Te.concat(s)}class vl{constructor(){this.bytes=""}read(t){this.bytes=Te.uint8ArrayToString(t.subarray(0,8))}write(){return Te.stringToUint8Array(this.bytes)}toHex(){return Te.uint8ArrayToHex(Te.stringToUint8Array(this.bytes))}equals(t,n=!1){return n&&(t.isWildcard()||this.isWildcard())||this.bytes===t.bytes}isNull(){return this.bytes===""}isWildcard(){return/^0+$/.test(this.toHex())}static mapToHex(t){return t.toHex()}static fromID(t){const n=new vl;return n.read(Te.hexToUint8Array(t)),n}static wildcard(){const t=new vl;return t.read(new Uint8Array(8)),t}}var Tn=function(){var e,t,n=!1;function r(d,v){var m=e[(t[d]+t[v])%255];return d!==0&&v!==0||(m=0),m}var i,a,l,c,h=!1;function s(){function d(y){var b,E,k;for(E=k=function(C){var x=e[255-t[C]];return C===0&&(x=0),x}(y),b=0;b<4;b++)k^=E=255&(E<<1|E>>>7);return k^=99}n||function(){e=[],t=[];var y,b,E=1;for(y=0;y<255;y++)e[y]=E,b=128&E,E<<=1,E&=255,b===128&&(E^=27),E^=e[y],t[e[y]]=y;e[255]=e[0],t[0]=0,n=!0}(),i=[],a=[],l=[[],[],[],[]],c=[[],[],[],[]];for(var v=0;v<256;v++){var m=d(v);i[v]=m,a[m]=v,l[0][v]=r(2,m)<<24|m<<16|m<<8|r(3,m),c[0][m]=r(14,v)<<24|r(9,v)<<16|r(13,v)<<8|r(11,v);for(var _=1;_<4;_++)l[_][v]=l[_-1][v]>>>8|l[_-1][v]<<24,c[_][m]=c[_-1][m]>>>8|c[_-1][m]<<24}h=!0}var p=function(d,v){h||s();var m=new Uint32Array(v);m.set(i,512),m.set(a,768);for(var _=0;_<4;_++)m.set(l[_],4096+1024*_>>2),m.set(c[_],8192+1024*_>>2);var y=function(b,E,k){var C=0,x=0,D=0,P=0,w=0,M=0,T=0,R=0,K=0,N=0,z=0,U=0,oe=0,Pe=0,he=0,ye=0,de=0,Se=0,X=0,se=0,Ce=0,be=new b.Uint32Array(k),re=new b.Uint8Array(k);function Q(fe,ce,Ve,Je,vt,xt,kt,Nt){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,vt=vt|0,xt=xt|0,kt=kt|0,Nt=Nt|0;var pt=0,It=0,Ot=0,hn=0,qt=0,Zt=0,Qt=0,Yt=0;for(pt=Ve|1024,It=Ve|2048,Ot=Ve|3072,vt=vt^be[(fe|0)>>2],xt=xt^be[(fe|4)>>2],kt=kt^be[(fe|8)>>2],Nt=Nt^be[(fe|12)>>2],Yt=16;(Yt|0)<=Je<<4;Yt=Yt+16|0)hn=be[(Ve|vt>>22&1020)>>2]^be[(pt|xt>>14&1020)>>2]^be[(It|kt>>6&1020)>>2]^be[(Ot|Nt<<2&1020)>>2]^be[(fe|Yt|0)>>2],qt=be[(Ve|xt>>22&1020)>>2]^be[(pt|kt>>14&1020)>>2]^be[(It|Nt>>6&1020)>>2]^be[(Ot|vt<<2&1020)>>2]^be[(fe|Yt|4)>>2],Zt=be[(Ve|kt>>22&1020)>>2]^be[(pt|Nt>>14&1020)>>2]^be[(It|vt>>6&1020)>>2]^be[(Ot|xt<<2&1020)>>2]^be[(fe|Yt|8)>>2],Qt=be[(Ve|Nt>>22&1020)>>2]^be[(pt|vt>>14&1020)>>2]^be[(It|xt>>6&1020)>>2]^be[(Ot|kt<<2&1020)>>2]^be[(fe|Yt|12)>>2],vt=hn,xt=qt,kt=Zt,Nt=Qt;C=be[(ce|vt>>22&1020)>>2]<<24^be[(ce|xt>>14&1020)>>2]<<16^be[(ce|kt>>6&1020)>>2]<<8^be[(ce|Nt<<2&1020)>>2]^be[(fe|Yt|0)>>2],x=be[(ce|xt>>22&1020)>>2]<<24^be[(ce|kt>>14&1020)>>2]<<16^be[(ce|Nt>>6&1020)>>2]<<8^be[(ce|vt<<2&1020)>>2]^be[(fe|Yt|4)>>2],D=be[(ce|kt>>22&1020)>>2]<<24^be[(ce|Nt>>14&1020)>>2]<<16^be[(ce|vt>>6&1020)>>2]<<8^be[(ce|xt<<2&1020)>>2]^be[(fe|Yt|8)>>2],P=be[(ce|Nt>>22&1020)>>2]<<24^be[(ce|vt>>14&1020)>>2]<<16^be[(ce|xt>>6&1020)>>2]<<8^be[(ce|kt<<2&1020)>>2]^be[(fe|Yt|12)>>2]}function F(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,fe,ce,Ve,Je)}function I(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0;Q(1024,3072,8192,Ce,fe,Je,Ve,ce),vt=x,x=P,P=vt}function Z(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w^fe,M^ce,T^Ve,R^Je),w=C,M=x,T=D,R=P}function q(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0;Q(1024,3072,8192,Ce,fe,Je,Ve,ce),vt=x,x=P,P=vt,C=C^w,x=x^M,D=D^T,P=P^R,w=fe,M=ce,T=Ve,R=Je}function pe(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),w=C=C^fe,M=x=x^ce,T=D=D^Ve,R=P=P^Je}function Ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),C=C^fe,x=x^ce,D=D^Ve,P=P^Je,w=fe,M=ce,T=Ve,R=Je}function J(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,w,M,T,R),w=C,M=x,T=D,R=P,C=C^fe,x=x^ce,D=D^Ve,P=P^Je}function Y(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,Ce,K,N,z,U),U=~ye&U|ye&U+1,z=~he&z|he&z+((U|0)==0),N=~Pe&N|Pe&N+((z|0)==0),K=~oe&K|oe&K+((N|0)==0),C=C^fe,x=x^ce,D=D^Ve,P=P^Je}function ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var vt=0,xt=0,kt=0,Nt=0,pt=0,It=0,Ot=0,hn=0,qt=0,Zt=0;for(fe=fe^w,ce=ce^M,Ve=Ve^T,Je=Je^R,vt=de|0,xt=Se|0,kt=X|0,Nt=se|0;(qt|0)<128;qt=qt+1|0)vt>>>31&&(pt=pt^fe,It=It^ce,Ot=Ot^Ve,hn=hn^Je),vt=vt<<1|xt>>>31,xt=xt<<1|kt>>>31,kt=kt<<1|Nt>>>31,Nt=Nt<<1,Zt=Je&1,Je=Je>>>1|Ve<<31,Ve=Ve>>>1|ce<<31,ce=ce>>>1|fe<<31,fe=fe>>>1,Zt&&(fe=fe^3774873600);w=pt,M=It,T=Ot,R=hn}function te(fe){fe=fe|0,Ce=fe}function Ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,C=fe,x=ce,D=Ve,P=Je}function me(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,w=fe,M=ce,T=Ve,R=Je}function V(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,K=fe,N=ce,z=Ve,U=Je}function De(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,oe=fe,Pe=ce,he=Ve,ye=Je}function ge(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,U=~ye&U|ye&Je,z=~he&z|he&Ve,N=~Pe&N|Pe&ce,K=~oe&K|oe&fe}function le(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=C>>>24,re[fe|1]=C>>>16&255,re[fe|2]=C>>>8&255,re[fe|3]=C&255,re[fe|4]=x>>>24,re[fe|5]=x>>>16&255,re[fe|6]=x>>>8&255,re[fe|7]=x&255,re[fe|8]=D>>>24,re[fe|9]=D>>>16&255,re[fe|10]=D>>>8&255,re[fe|11]=D&255,re[fe|12]=P>>>24,re[fe|13]=P>>>16&255,re[fe|14]=P>>>8&255,re[fe|15]=P&255,16)}function B(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=w>>>24,re[fe|1]=w>>>16&255,re[fe|2]=w>>>8&255,re[fe|3]=w&255,re[fe|4]=M>>>24,re[fe|5]=M>>>16&255,re[fe|6]=M>>>8&255,re[fe|7]=M&255,re[fe|8]=T>>>24,re[fe|9]=T>>>16&255,re[fe|10]=T>>>8&255,re[fe|11]=T&255,re[fe|12]=R>>>24,re[fe|13]=R>>>16&255,re[fe|14]=R>>>8&255,re[fe|15]=R&255,16)}function H(){F(0,0,0,0),de=C,Se=x,X=D,se=P}function W(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)ue[fe&7](re[ce|0]<<24|re[ce|1]<<16|re[ce|2]<<8|re[ce|3],re[ce|4]<<24|re[ce|5]<<16|re[ce|6]<<8|re[ce|7],re[ce|8]<<24|re[ce|9]<<16|re[ce|10]<<8|re[ce|11],re[ce|12]<<24|re[ce|13]<<16|re[ce|14]<<8|re[ce|15]),re[ce|0]=C>>>24,re[ce|1]=C>>>16&255,re[ce|2]=C>>>8&255,re[ce|3]=C&255,re[ce|4]=x>>>24,re[ce|5]=x>>>16&255,re[ce|6]=x>>>8&255,re[ce|7]=x&255,re[ce|8]=D>>>24,re[ce|9]=D>>>16&255,re[ce|10]=D>>>8&255,re[ce|11]=D&255,re[ce|12]=P>>>24,re[ce|13]=P>>>16&255,re[ce|14]=P>>>8&255,re[ce|15]=P&255,Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}function ee(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)xe[fe&1](re[ce|0]<<24|re[ce|1]<<16|re[ce|2]<<8|re[ce|3],re[ce|4]<<24|re[ce|5]<<16|re[ce|6]<<8|re[ce|7],re[ce|8]<<24|re[ce|9]<<16|re[ce|10]<<8|re[ce|11],re[ce|12]<<24|re[ce|13]<<16|re[ce|14]<<8|re[ce|15]),Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}var ue=[F,I,Z,q,pe,Ee,J,Y],xe=[Z,ae];return{set_rounds:te,set_state:Ae,set_iv:me,set_nonce:V,set_mask:De,set_counter:ge,get_state:le,get_iv:B,gcm_init:H,cipher:W,mac:ee}}({Uint8Array,Uint32Array},d,v);return y.set_key=function(b,E,k,C,x,D,P,w,M){var T=m.subarray(0,60),R=m.subarray(256,316);T.set([E,k,C,x,D,P,w,M]);for(var K=b,N=1;K<4*b+28;K++){var z=T[K-1];(K%b==0||b===8&&K%b==4)&&(z=i[z>>>24]<<24^i[z>>>16&255]<<16^i[z>>>8&255]<<8^i[255&z]),K%b==0&&(z=z<<8^z>>>24^N<<24,N=N<<1^(128&N?27:0)),T[K]=T[K-b]^z}for(var U=0;U=K-4?z:c[0][i[z>>>24]]^c[1][i[z>>>16&255]]^c[2][i[z>>>8&255]]^c[3][i[255&z]];y.set_rounds(b+5)},y};return p.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},p.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},p.MAC={CBC:0,GCM:1},p.HEAP_DATA=16384,p}();function zD(e){return e instanceof Uint8Array}function w2(e,t){const n=e?e.byteLength:t||65536;if(4095&n||n<=0)throw Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(n))}function Zl(e,t,n,r,i){const a=e.length-t,l=ai+a.length,0),n=new Uint8Array(t);let r=0;for(let i=0;i>2,a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12),i>16?a.getUint32(16):0,i>16?a.getUint32(20):0,i>24?a.getUint32(24):0,i>24?a.getUint32(28):0),n!==void 0){if(n.length!==16)throw new go("illegal iv size");let l=new DataView(n.buffer,n.byteOffset,n.byteLength);r.set_iv(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}else r.set_iv(0,0,0,0)}AES_Encrypt_process(t){if(!zD(t))throw new TypeError("data isn't of expected type");let{heap:n,asm:r}=this.acquire_asm(),i=Tn.ENC[this.mode],a=Tn.HEAP_DATA,l=this.pos,c=this.len,h=0,s=t.length||0,p=0,d=0,v=new Uint8Array(c+s&-16);for(;s>0;)d=Zl(n,l+c,t,h,s),c+=d,h+=d,s-=d,d=r.cipher(i,a+l,c),d&&v.set(n.subarray(l,l+d),p),p+=d,d0;)m=Zl(n,l+c,t,h,s),c+=m,h+=m,s-=m,m=r.cipher(i,a+l,c-(s?0:v)),m&&_.set(n.subarray(l,l+m),p),p+=m,m0){if(l%16){if(this.hasOwnProperty("padding"))throw new go("data length must be a multiple of the block size");l+=16-l%16}if(n.cipher(r,i+a,l),this.hasOwnProperty("padding")&&this.padding){let s=t[a+c-1];if(s<1||s>16||s>c)throw new Eb("bad padding");let p=0;for(let d=s;d>1;d--)p|=s^t[a+c-d];if(p)throw new Eb("bad padding");c-=s}}const h=new Uint8Array(c);return c>0&&h.set(t.subarray(a,a+c)),this.pos=0,this.len=0,this.release_asm(),h}}class rg{static encrypt(t,n,r=!1){return new rg(n,r).encrypt(t)}static decrypt(t,n,r=!1){return new rg(n,r).decrypt(t)}constructor(t,n=!1,r){this.aes=r||new ah(t,void 0,n,"ECB")}encrypt(t){return ml(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return ml(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}function C2(e){const t=function(n){const r=new rg(n);this.encrypt=function(i){return r.encrypt(i)},this.decrypt=function(i){return r.decrypt(i)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function gf(e,t,n,r,i,a){const l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],c=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],h=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],s=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],p=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],d=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],m=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let _,y,b,E,k,C,x,D,P,w,M,T,R,K,N=0,z=t.length;const U=e.length===32?3:9;D=U===3?n?[0,32,2]:[30,-2,-2]:n?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],n&&(t=function(he,ye){const de=8-he.length%8;let Se;if(ye===2&&de<8)Se=32;else if(ye===1)Se=de;else{if(ye||!(de<8)){if(de===8)return he;throw Error("des: invalid padding")}Se=0}const X=new Uint8Array(he.length+de);for(let se=0;se>>4^x),x^=b,C^=b<<4,b=65535&(C>>>16^x),x^=b,C^=b<<16,b=858993459&(x>>>2^C),C^=b,x^=b<<2,b=16711935&(x>>>8^C),C^=b,x^=b<<8,b=1431655765&(C>>>1^x),x^=b,C^=b<<1,C=C<<1|C>>>31,x=x<<1|x>>>31,y=0;y>>4|x<<28)^e[_+1],b=C,C=x,x=b^(c[E>>>24&63]|s[E>>>16&63]|d[E>>>8&63]|m[63&E]|l[k>>>24&63]|h[k>>>16&63]|p[k>>>8&63]|v[63&k]);b=C,C=x,x=b}C=C>>>1|C<<31,x=x>>>1|x<<31,b=1431655765&(C>>>1^x),x^=b,C^=b<<1,b=16711935&(x>>>8^C),C^=b,x^=b<<8,b=858993459&(x>>>2^C),C^=b,x^=b<<2,b=65535&(C>>>16^x),x^=b,C^=b<<16,b=252645135&(C>>>4^x),x^=b,C^=b<<4,r===1&&(n?(P=C,M=x):(C^=w,x^=T)),oe[Pe++]=C>>>24,oe[Pe++]=C>>>16&255,oe[Pe++]=C>>>8&255,oe[Pe++]=255&C,oe[Pe++]=x>>>24,oe[Pe++]=x>>>16&255,oe[Pe++]=x>>>8&255,oe[Pe++]=255&x}return n||(oe=function(he,ye){let de,Se=null;if(ye===2)de=32;else if(ye===1)Se=he[he.length-1];else{if(ye)throw Error("des: invalid padding");de=0}if(!Se){for(Se=1;he[he.length-Se]===de;)Se++;Se--}return he.subarray(0,he.length-Se)}(oe,a)),oe}function _f(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],l=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],h=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],s=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],p=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],v=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],m=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],_=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length>8?3:1,b=Array(32*y),E=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let k,C,x,D=0,P=0;for(let w=0;w>>4^T),T^=x,M^=x<<4,x=65535&(T>>>-16^M),M^=x,T^=x<<-16,x=858993459&(M>>>2^T),T^=x,M^=x<<2,x=65535&(T>>>-16^M),M^=x,T^=x<<-16,x=1431655765&(M>>>1^T),T^=x,M^=x<<1,x=16711935&(T>>>8^M),M^=x,T^=x<<8,x=1431655765&(M>>>1^T),T^=x,M^=x<<1,x=M<<8|T>>>20&240,M=T<<24|T<<8&16711680|T>>>8&65280|T>>>24&240,T=x;for(let R=0;R<16;R++)E[R]?(M=M<<2|M>>>26,T=T<<2|T>>>26):(M=M<<1|M>>>27,T=T<<1|T>>>27),M&=-15,T&=-15,k=t[M>>>28]|n[M>>>24&15]|r[M>>>20&15]|i[M>>>16&15]|a[M>>>12&15]|l[M>>>8&15]|c[M>>>4&15],C=h[T>>>28]|s[T>>>24&15]|p[T>>>20&15]|d[T>>>16&15]|v[T>>>12&15]|m[T>>>8&15]|_[T>>>4&15],x=65535&(C>>>16^k),b[P++]=k^x,b[P++]=C^x<<16}return b}function Yd(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(t){return gf(_f(this.key[2]),gf(_f(this.key[1]),gf(_f(this.key[0]),t,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function eG(){this.BlockSize=8,this.KeySize=16,this.setKey=function(l){if(this.masking=Array(16),this.rotate=Array(16),this.reset(),l.length!==this.KeySize)throw Error("CAST-128: keys must be 16 bytes");return this.keySchedule(l),!0},this.reset=function(){for(let l=0;l<16;l++)this.masking[l]=0,this.rotate[l]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(l){const c=Array(l.length);for(let h=0;h>>24&255,c[h+1]=d>>>16&255,c[h+2]=d>>>8&255,c[h+3]=255&d,c[h+4]=p>>>24&255,c[h+5]=p>>>16&255,c[h+6]=p>>>8&255,c[h+7]=255&p}return c},this.decrypt=function(l){const c=Array(l.length);for(let h=0;h>>24&255,c[h+1]=d>>>16&255,c[h+2]=d>>>8&255,c[h+3]=255&d,c[h+4]=p>>>24&255,c[h+5]=p>>16&255,c[h+6]=p>>8&255,c[h+7]=255&p}return c};const e=[,,,,];e[0]=[,,,,],e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=[,,,,],e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=[,,,,],e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=[,,,,],e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=[,,,,];function n(l,c,h){const s=c+l,p=s<>>32-h;return(a[0][p>>>24]^a[1][p>>>16&255])-a[2][p>>>8&255]+a[3][255&p]}function r(l,c,h){const s=c^l,p=s<>>32-h;return a[0][p>>>24]-a[1][p>>>16&255]+a[2][p>>>8&255]^a[3][255&p]}function i(l,c,h){const s=c-l,p=s<>>32-h;return(a[0][p>>>24]+a[1][p>>>16&255]^a[2][p>>>8&255])-a[3][255&p]}t[0]=[,,,,],t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=[,,,,],t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=[,,,,],t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=[,,,,],t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(l){const c=[,,,,,,,,],h=Array(32);let s;for(let m=0;m<4;m++)s=4*m,c[m]=l[s]<<24|l[s+1]<<16|l[s+2]<<8|l[s+3];const p=[6,7,4,5];let d,v=0;for(let m=0;m<2;m++)for(let _=0;_<4;_++){for(s=0;s<4;s++){const y=e[_][s];d=c[y[1]],d^=a[4][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=a[5][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=a[6][c[y[4]>>>2]>>>24-8*(3&y[4])&255],d^=a[7][c[y[5]>>>2]>>>24-8*(3&y[5])&255],d^=a[p[s]][c[y[6]>>>2]>>>24-8*(3&y[6])&255],c[y[0]]=d}for(s=0;s<4;s++){const y=t[_][s];d=a[4][c[y[0]>>>2]>>>24-8*(3&y[0])&255],d^=a[5][c[y[1]>>>2]>>>24-8*(3&y[1])&255],d^=a[6][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=a[7][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=a[4+s][c[y[4]>>>2]>>>24-8*(3&y[4])&255],h[v]=d,v++}}for(let m=0;m<16;m++)this.masking[m]=h[m],this.rotate[m]=31&h[16+m]};const a=[,,,,,,,,];a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function Xd(e){this.cast5=new eG,this.cast5.setKey(e),this.encrypt=function(t){return this.cast5.encrypt(t)}}Yd.keySize=Yd.prototype.keySize=24,Yd.blockSize=Yd.prototype.blockSize=8,Xd.blockSize=Xd.prototype.blockSize=8,Xd.keySize=Xd.prototype.keySize=16;const Aa=4294967295;function Cs(e,t){return(e<>>32-t)&Aa}function io(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function Fo(e,t,n){e.splice(t,4,255&n,n>>>8&255,n>>>16&255,n>>>24&255)}function wn(e,t){return e>>>8*t&255}function Jd(e){this.tf=function(){let t=null,n=null,r=-1,i=[],a=[[],[],[],[]];function l(p){return a[0][wn(p,0)]^a[1][wn(p,1)]^a[2][wn(p,2)]^a[3][wn(p,3)]}function c(p){return a[0][wn(p,3)]^a[1][wn(p,0)]^a[2][wn(p,1)]^a[3][wn(p,2)]}function h(p,d){let v=l(d[0]),m=c(d[1]);d[2]=Cs(d[2]^v+m+i[4*p+8]&Aa,31),d[3]=Cs(d[3],1)^v+2*m+i[4*p+9]&Aa,v=l(d[2]),m=c(d[3]),d[0]=Cs(d[0]^v+m+i[4*p+10]&Aa,31),d[1]=Cs(d[1],1)^v+2*m+i[4*p+11]&Aa}function s(p,d){let v=l(d[0]),m=c(d[1]);d[2]=Cs(d[2],1)^v+m+i[4*p+10]&Aa,d[3]=Cs(d[3]^v+2*m+i[4*p+11]&Aa,31),v=l(d[2]),m=c(d[3]),d[0]=Cs(d[0],1)^v+m+i[4*p+8]&Aa,d[1]=Cs(d[1]^v+2*m+i[4*p+9]&Aa,31)}return{name:"twofish",blocksize:16,open:function(p){let d,v,m,_,y;t=p;const b=[],E=[],k=[];let C;const x=[];let D,P,w;const M=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],T=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],R=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],K=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],N=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],z=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],U=[[],[]],oe=[[],[],[],[]];function Pe(X){return X^X>>2^[0,90,180,238][3&X]}function he(X){return X^X>>1^X>>2^[0,238,180,90][3&X]}function ye(X,se){let Ce,be,re;for(Ce=0;Ce<8;Ce++)be=se>>>24,se=se<<8&Aa|X>>>24,X=X<<8&Aa,re=be<<1,128&be&&(re^=333),se^=be^re<<16,re^=be>>>1,1&be&&(re^=166),se^=re<<24|re<<8;return se}function de(X,se){const Ce=se>>4,be=15&se,re=M[X][Ce^be],Q=T[X][N[be]^z[Ce]];return K[X][N[Q]^z[re]]<<4|R[X][re^Q]}function Se(X,se){let Ce=wn(X,0),be=wn(X,1),re=wn(X,2),Q=wn(X,3);switch(C){case 4:Ce=U[1][Ce]^wn(se[3],0),be=U[0][be]^wn(se[3],1),re=U[0][re]^wn(se[3],2),Q=U[1][Q]^wn(se[3],3);case 3:Ce=U[1][Ce]^wn(se[2],0),be=U[1][be]^wn(se[2],1),re=U[0][re]^wn(se[2],2),Q=U[0][Q]^wn(se[2],3);case 2:Ce=U[0][U[0][Ce]^wn(se[1],0)]^wn(se[0],0),be=U[0][U[1][be]^wn(se[1],1)]^wn(se[0],1),re=U[1][U[0][re]^wn(se[1],2)]^wn(se[0],2),Q=U[1][U[1][Q]^wn(se[1],3)]^wn(se[0],3)}return oe[0][Ce]^oe[1][be]^oe[2][re]^oe[3][Q]}for(t=t.slice(0,32),d=t.length;d!==16&&d!==24&&d!==32;)t[d++]=0;for(d=0;d>2]=io(t,d);for(d=0;d<256;d++)U[0][d]=de(0,d),U[1][d]=de(1,d);for(d=0;d<256;d++)D=U[1][d],P=Pe(D),w=he(D),oe[0][d]=D+(P<<8)+(w<<16)+(w<<24),oe[2][d]=P+(w<<8)+(D<<16)+(w<<24),D=U[0][d],P=Pe(D),w=he(D),oe[1][d]=w+(w<<8)+(P<<16)+(D<<24),oe[3][d]=P+(D<<8)+(w<<16)+(P<<24);for(C=k.length/2,d=0;d=0;m--)s(m,v);Fo(n,r,v[2]^i[0]),Fo(n,r+4,v[3]^i[1]),Fo(n,r+8,v[0]^i[2]),Fo(n,r+12,v[1]^i[3]),r+=16},finalize:function(){return n}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(t){return this.tf.encrypt(Array.from(t),0)}}function Ya(){}function Zd(e){this.bf=new Ya,this.bf.init(e),this.encrypt=function(t){return this.bf.encryptBlock(t)}}Jd.keySize=Jd.prototype.keySize=32,Jd.blockSize=Jd.prototype.blockSize=16,Ya.prototype.BLOCKSIZE=8,Ya.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],Ya.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Ya.prototype.NN=16,Ya.prototype._clean=function(e){return e<0&&(e=(2147483647&e)+2147483648),e},Ya.prototype._F=function(e){let t;const n=255&e,r=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][r],t+=this.sboxes[3][n],t},Ya.prototype._encryptBlock=function(e){let t,n=e[0],r=e[1];for(t=0;t>>24-8*t&255,i[t+r]=n[1]>>>24-8*t&255;return i},Ya.prototype._decryptBlock=function(e){let t,n=e[0],r=e[1];for(t=this.NN+1;t>1;--t){n^=this.parray[t],r=this._F(n)^r;const i=n;n=r,r=i}n^=this.parray[1],r^=this.parray[0],e[0]=this._clean(r),e[1]=this._clean(n)},Ya.prototype.init=function(e){let t,n=0;for(this.parray=[],t=0;t=e.length&&(n=0);this.parray[t]=this.PARRAY[t]^i}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],n=0;n<256;++n)this.sboxes[t][n]=this.SBOXES[t][n];const r=[0,0];for(t=0;t>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=ye+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=de+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Se+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=X+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=se+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Ce+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=be+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=re+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Q+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=F+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=I+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Z+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=q+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=pe+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,V=Ee+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=q^re^de^he,De=me<<1|me>>>31,V=De+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=pe^Q^Se^ye,ge=me<<1|me>>>31,V=ge+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ee^F^X^de,le=me<<1|me>>>31,V=le+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=De^I^se^Se,B=me<<1|me>>>31,V=B+(J<<5|J>>>27)+Ae+(Y&ae|~Y&te)+1518500249|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ge^Z^Ce^X,H=me<<1|me>>>31,V=H+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=le^q^be^se,W=me<<1|me>>>31,V=W+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=B^pe^re^Ce,ee=me<<1|me>>>31,V=ee+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=H^Ee^Q^be,ue=me<<1|me>>>31,V=ue+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=W^De^F^re,xe=me<<1|me>>>31,V=xe+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ee^ge^I^Q,fe=me<<1|me>>>31,V=fe+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ue^le^Z^F,ce=me<<1|me>>>31,V=ce+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=xe^B^q^I,Ve=me<<1|me>>>31,V=Ve+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=fe^H^pe^Z,Je=me<<1|me>>>31,V=Je+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ce^W^Ee^q,vt=me<<1|me>>>31,V=vt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ve^ee^De^pe,xt=me<<1|me>>>31,V=xt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Je^ue^ge^Ee,kt=me<<1|me>>>31,V=kt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=vt^xe^le^De,Nt=me<<1|me>>>31,V=Nt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=xt^fe^B^ge,pt=me<<1|me>>>31,V=pt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=kt^ce^H^le,It=me<<1|me>>>31,V=It+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Nt^Ve^W^B,Ot=me<<1|me>>>31,V=Ot+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=pt^Je^ee^H,hn=me<<1|me>>>31,V=hn+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=It^vt^ue^W,qt=me<<1|me>>>31,V=qt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ot^xt^xe^ee,Zt=me<<1|me>>>31,V=Zt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=hn^kt^fe^ue,Qt=me<<1|me>>>31,V=Qt+(J<<5|J>>>27)+Ae+(Y^ae^te)+1859775393|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=qt^Nt^ce^xe,Yt=me<<1|me>>>31,V=Yt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Zt^pt^Ve^fe,Ut=me<<1|me>>>31,V=Ut+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Qt^It^Je^ce,Xt=me<<1|me>>>31,V=Xt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Yt^Ot^vt^Ve,rn=me<<1|me>>>31,V=rn+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ut^hn^xt^Je,tt=me<<1|me>>>31,V=tt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Xt^qt^kt^vt,it=me<<1|me>>>31,V=it+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=rn^Zt^Nt^xt,yt=me<<1|me>>>31,V=yt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=tt^Qt^pt^kt,Ft=me<<1|me>>>31,V=Ft+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=it^Yt^It^Nt,Oe=me<<1|me>>>31,V=Oe+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=yt^Ut^Ot^pt,Fe=me<<1|me>>>31,V=Fe+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ft^Xt^hn^It,Ue=me<<1|me>>>31,V=Ue+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Oe^rn^qt^Ot,Re=me<<1|me>>>31,V=Re+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Fe^tt^Zt^hn,nt=me<<1|me>>>31,V=nt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ue^it^Qt^qt,ot=me<<1|me>>>31,V=ot+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Re^yt^Yt^Zt,ht=me<<1|me>>>31,V=ht+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=nt^Ft^Ut^Qt,_t=me<<1|me>>>31,V=_t+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ot^Oe^Xt^Yt,Pt=me<<1|me>>>31,V=Pt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ht^Fe^rn^Ut,jt=me<<1|me>>>31,V=jt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=_t^Ue^tt^Xt,Gt=me<<1|me>>>31,V=Gt+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Pt^Re^it^rn,$t=me<<1|me>>>31,V=$t+(J<<5|J>>>27)+Ae+(Y&ae|Y&te|ae&te)-1894007588|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=jt^nt^yt^tt,tn=me<<1|me>>>31,V=tn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Gt^ot^Ft^it,nn=me<<1|me>>>31,V=nn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=$t^ht^Oe^yt,an=me<<1|me>>>31,V=an+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=tn^_t^Fe^Ft,On=me<<1|me>>>31,V=On+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=nn^Pt^Ue^Oe,hr=me<<1|me>>>31,V=hr+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=an^jt^Re^Fe,br=me<<1|me>>>31,V=br+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=On^Gt^nt^Ue,Vn=me<<1|me>>>31,V=Vn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=hr^$t^ot^Re,Qn=me<<1|me>>>31,V=Qn+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=br^tn^ht^nt,Ur=me<<1|me>>>31,V=Ur+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Vn^nn^_t^ot,wr=me<<1|me>>>31,V=wr+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Qn^an^Pt^ht,Bi=me<<1|me>>>31,V=Bi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Ur^On^jt^_t,fi=me<<1|me>>>31,V=fi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=wr^hr^Gt^Pt,ki=me<<1|me>>>31,V=ki+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Bi^br^$t^jt,na=me<<1|me>>>31,V=na+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=fi^Vn^tn^Gt,Na=me<<1|me>>>31,V=Na+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ki^Qn^nn^$t,Oi=me<<1|me>>>31,V=Oi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=na^Ur^an^tn,ra=me<<1|me>>>31,V=ra+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Na^wr^On^nn,hi=me<<1|me>>>31,V=hi+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=Oi^Bi^hr^an,Ie=me<<1|me>>>31,V=Ie+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,me=ra^fi^br^On,je=me<<1|me>>>31,V=je+(J<<5|J>>>27)+Ae+(Y^ae^te)-899497514|0,Ae=te,te=ae,ae=Y<<30|Y>>>2,Y=J,J=V,r=r+J|0,i=i+Y|0,a=a+ae|0,l=l+te|0,c=c+Ae|0}function P(he){he=he|0,D(x[he|0]<<24|x[he|1]<<16|x[he|2]<<8|x[he|3],x[he|4]<<24|x[he|5]<<16|x[he|6]<<8|x[he|7],x[he|8]<<24|x[he|9]<<16|x[he|10]<<8|x[he|11],x[he|12]<<24|x[he|13]<<16|x[he|14]<<8|x[he|15],x[he|16]<<24|x[he|17]<<16|x[he|18]<<8|x[he|19],x[he|20]<<24|x[he|21]<<16|x[he|22]<<8|x[he|23],x[he|24]<<24|x[he|25]<<16|x[he|26]<<8|x[he|27],x[he|28]<<24|x[he|29]<<16|x[he|30]<<8|x[he|31],x[he|32]<<24|x[he|33]<<16|x[he|34]<<8|x[he|35],x[he|36]<<24|x[he|37]<<16|x[he|38]<<8|x[he|39],x[he|40]<<24|x[he|41]<<16|x[he|42]<<8|x[he|43],x[he|44]<<24|x[he|45]<<16|x[he|46]<<8|x[he|47],x[he|48]<<24|x[he|49]<<16|x[he|50]<<8|x[he|51],x[he|52]<<24|x[he|53]<<16|x[he|54]<<8|x[he|55],x[he|56]<<24|x[he|57]<<16|x[he|58]<<8|x[he|59],x[he|60]<<24|x[he|61]<<16|x[he|62]<<8|x[he|63])}function w(he){he=he|0,x[he|0]=r>>>24,x[he|1]=r>>>16&255,x[he|2]=r>>>8&255,x[he|3]=r&255,x[he|4]=i>>>24,x[he|5]=i>>>16&255,x[he|6]=i>>>8&255,x[he|7]=i&255,x[he|8]=a>>>24,x[he|9]=a>>>16&255,x[he|10]=a>>>8&255,x[he|11]=a&255,x[he|12]=l>>>24,x[he|13]=l>>>16&255,x[he|14]=l>>>8&255,x[he|15]=l&255,x[he|16]=c>>>24,x[he|17]=c>>>16&255,x[he|18]=c>>>8&255,x[he|19]=c&255}function M(){r=1732584193,i=4023233417,a=2562383102,l=271733878,c=3285377520,h=s=0}function T(he,ye,de,Se,X,se,Ce){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0,se=se|0,Ce=Ce|0,r=he,i=ye,a=de,l=Se,c=X,h=se,s=Ce}function R(he,ye){he=he|0,ye=ye|0;var de=0;if(he&63)return-1;for(;(ye|0)>=64;)P(he),he=he+64|0,ye=ye-64|0,de=de+64|0;return h=h+de|0,h>>>0>>0&&(s=s+1|0),de|0}function K(he,ye,de){he=he|0,ye=ye|0,de=de|0;var Se=0,X=0;if(he&63||~de&&de&31)return-1;if((ye|0)>=64){if(Se=R(he,ye)|0,(Se|0)==-1)return-1;he=he+Se|0,ye=ye-Se|0}if(Se=Se+ye|0,h=h+ye|0,h>>>0>>0&&(s=s+1|0),x[he|ye]=128,(ye|0)>=56){for(X=ye+1|0;(X|0)<64;X=X+1|0)x[he|X]=0;P(he),ye=0,x[he|0]=0}for(X=ye+1|0;(X|0)<59;X=X+1|0)x[he|X]=0;return x[he|56]=s>>>21&255,x[he|57]=s>>>13&255,x[he|58]=s>>>5&255,x[he|59]=s<<3&255|h>>>29,x[he|60]=h>>>21&255,x[he|61]=h>>>13&255,x[he|62]=h>>>5&255,x[he|63]=h<<3&255,P(he),~de&&w(de),Se|0}function N(){r=p,i=d,a=v,l=m,c=_,h=64,s=0}function z(){r=y,i=b,a=E,l=k,c=C,h=64,s=0}function U(he,ye,de,Se,X,se,Ce,be,re,Q,F,I,Z,q,pe,Ee){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0,se=se|0,Ce=Ce|0,be=be|0,re=re|0,Q=Q|0,F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,M(),D(he^1549556828,ye^1549556828,de^1549556828,Se^1549556828,X^1549556828,se^1549556828,Ce^1549556828,be^1549556828,re^1549556828,Q^1549556828,F^1549556828,I^1549556828,Z^1549556828,q^1549556828,pe^1549556828,Ee^1549556828),y=r,b=i,E=a,k=l,C=c,M(),D(he^909522486,ye^909522486,de^909522486,Se^909522486,X^909522486,se^909522486,Ce^909522486,be^909522486,re^909522486,Q^909522486,F^909522486,I^909522486,Z^909522486,q^909522486,pe^909522486,Ee^909522486),p=r,d=i,v=a,m=l,_=c,h=64,s=0}function oe(he,ye,de){he=he|0,ye=ye|0,de=de|0;var Se=0,X=0,se=0,Ce=0,be=0,re=0;return he&63||~de&&de&31?-1:(re=K(he,ye,-1)|0,Se=r,X=i,se=a,Ce=l,be=c,z(),D(Se,X,se,Ce,be,2147483648,0,0,0,0,0,0,0,0,0,672),~de&&w(de),re|0)}function Pe(he,ye,de,Se,X){he=he|0,ye=ye|0,de=de|0,Se=Se|0,X=X|0;var se=0,Ce=0,be=0,re=0,Q=0,F=0,I=0,Z=0,q=0,pe=0;if(he&63||~X&&X&31)return-1;for(x[he+ye|0]=de>>>24,x[he+ye+1|0]=de>>>16&255,x[he+ye+2|0]=de>>>8&255,x[he+ye+3|0]=de&255,oe(he,ye+4|0,-1)|0,se=F=r,Ce=I=i,be=Z=a,re=q=l,Q=pe=c,Se=Se-1|0;(Se|0)>0;)N(),D(F,I,Z,q,pe,2147483648,0,0,0,0,0,0,0,0,0,672),F=r,I=i,Z=a,q=l,pe=c,z(),D(F,I,Z,q,pe,2147483648,0,0,0,0,0,0,0,0,0,672),F=r,I=i,Z=a,q=l,pe=c,se=se^r,Ce=Ce^i,be=be^a,re=re^l,Q=Q^c,Se=Se-1|0;return r=se,i=Ce,a=be,l=re,c=Q,~X&&w(X),0}return{reset:M,init:T,process:R,finish:K,hmac_reset:N,hmac_init:U,hmac_finish:oe,pbkdf2_generate_block:Pe}};class fP{constructor(){this.pos=0,this.len=0}reset(){const{asm:t}=this.acquire_asm();return this.result=null,this.pos=0,this.len=0,t.reset(),this}process(t){if(this.result!==null)throw new Sb("state must be reset before processing new data");const{asm:n,heap:r}=this.acquire_asm();let i=this.pos,a=this.len,l=0,c=t.length,h=0;for(;c>0;)h=Zl(r,i+a,t,l,c),a+=h,l+=h,c-=h,h=n.process(i,a),i+=h,a-=h,a||(i=0);return this.pos=i,this.len=a,this}finish(){if(this.result!==null)throw new Sb("state must be reset before processing new data");const{asm:t,heap:n}=this.acquire_asm();return t.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(n.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this}}const HD=[],KD=[];class Ql extends fP{constructor(){super(),this.NAME="sha1",this.BLOCK_SIZE=64,this.HASH_SIZE=20,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=HD.pop()||w2(),this.asm=KD.pop()||dP({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(HD.push(this.heap),KD.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new Ql().process(t).finish().result}}Ql.NAME="sha1",Ql.heap_pool=[],Ql.asm_pool=[],Ql.asm_function=dP;const GD=[],YD=[];class i_ extends fP{constructor(){super(),this.NAME="sha256",this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.acquire_asm()}acquire_asm(){return this.heap!==void 0&&this.asm!==void 0||(this.heap=GD.pop()||w2(),this.asm=YD.pop()||function(t,n,r){var i=0,a=0,l=0,c=0,h=0,s=0,p=0,d=0,v=0,m=0,_=0,y=0,b=0,E=0,k=0,C=0,x=0,D=0,P=0,w=0,M=0,T=0,R=0,K=0,N=0,z=0,U=new t.Uint8Array(r);function oe(F,I,Z,q,pe,Ee,J,Y,ae,te,Ae,me,V,De,ge,le){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,Ae=Ae|0,me=me|0,V=V|0,De=De|0,ge=ge|0,le=le|0;var B=0,H=0,W=0,ee=0,ue=0,xe=0,fe=0,ce=0;B=i,H=a,W=l,ee=c,ue=h,xe=s,fe=p,ce=d,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+1116352408|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+1899447441|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+3049323471|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3921009573|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+961987163|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1508970993|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2453635748|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+2870763221|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+3624381080|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+310598401|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+607225278|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+1426881987|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+1925078388|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+2162078206|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2614888103|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+3248222580|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+3835390401|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+4022224774|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+264347078|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+604807628|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+770255983|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1249150122|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+1555081692|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+1996064986|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+2554220882|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2821834349|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+2952996808|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3210313671|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+3336571891|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+3584528711|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+113926993|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+338241895|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+666307205|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+773529912|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+1294757372|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+1396182291|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+1695183700|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1986661051|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+2177026350|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+2456956037|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+2730485921|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2820302411|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+3259730800|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+3345764771|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+3516065817|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+3600352804|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+4094571909|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+275423344|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,F=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+F+te|0,ce=F+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+430227734|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Ae|0,fe=I+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+506948616|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(q>>>7^q>>>18^q>>>3^q<<25^q<<14)+(F>>>17^F>>>19^F>>>10^F<<15^F<<13)+Z+me|0,xe=Z+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+659060556|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,q=(pe>>>7^pe>>>18^pe>>>3^pe<<25^pe<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+q+V|0,ue=q+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+883997877|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,pe=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+pe+De|0,ee=pe+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+958139571|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+Ee+ge|0,W=Ee+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+1322822218|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,J=(Y>>>7^Y>>>18^Y>>>3^Y<<25^Y<<14)+(pe>>>17^pe>>>19^pe>>>10^pe<<15^pe<<13)+J+le|0,H=J+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+1537002063|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,Y=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+Y+F|0,B=Y+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+1747873779|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,ae=(te>>>7^te>>>18^te>>>3^te<<25^te<<14)+(J>>>17^J>>>19^J>>>10^J<<15^J<<13)+ae+I|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(xe^fe))+1955562222|0,ee=ee+ce|0,ce=ce+(B&H^W&(B^H))+(B>>>2^B>>>13^B>>>22^B<<30^B<<19^B<<10)|0,te=(Ae>>>7^Ae>>>18^Ae>>>3^Ae<<25^Ae<<14)+(Y>>>17^Y>>>19^Y>>>10^Y<<15^Y<<13)+te+Z|0,fe=te+fe+(ee>>>6^ee>>>11^ee>>>25^ee<<26^ee<<21^ee<<7)+(xe^ee&(ue^xe))+2024104815|0,W=W+fe|0,fe=fe+(ce&B^H&(ce^B))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Ae=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Ae+q|0,xe=Ae+xe+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ue^W&(ee^ue))+2227730452|0,H=H+xe|0,xe=xe+(fe&ce^B&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(V>>>7^V>>>18^V>>>3^V<<25^V<<14)+(te>>>17^te>>>19^te>>>10^te<<15^te<<13)+me+pe|0,ue=me+ue+(H>>>6^H>>>11^H>>>25^H<<26^H<<21^H<<7)+(ee^H&(W^ee))+2361852424|0,B=B+ue|0,ue=ue+(xe&fe^ce&(xe^fe))+(xe>>>2^xe>>>13^xe>>>22^xe<<30^xe<<19^xe<<10)|0,V=(De>>>7^De>>>18^De>>>3^De<<25^De<<14)+(Ae>>>17^Ae>>>19^Ae>>>10^Ae<<15^Ae<<13)+V+Ee|0,ee=V+ee+(B>>>6^B>>>11^B>>>25^B<<26^B<<21^B<<7)+(W^B&(H^W))+2428436474|0,ce=ce+ee|0,ee=ee+(ue&xe^fe&(ue^xe))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,De=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+De+J|0,W=De+W+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(H^ce&(B^H))+2756734187|0,fe=fe+W|0,W=W+(ee&ue^xe&(ee^ue))+(ee>>>2^ee>>>13^ee>>>22^ee<<30^ee<<19^ee<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(V>>>17^V>>>19^V>>>10^V<<15^V<<13)+ge+Y|0,H=ge+H+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(B^fe&(ce^B))+3204031479|0,xe=xe+H|0,H=H+(W&ee^ue&(W^ee))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,le=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(De>>>17^De>>>19^De>>>10^De<<15^De<<13)+le+ae|0,B=le+B+(xe>>>6^xe>>>11^xe>>>25^xe<<26^xe<<21^xe<<7)+(ce^xe&(fe^ce))+3329325298|0,ue=ue+B|0,B=B+(H&W^ee&(H^W))+(H>>>2^H>>>13^H>>>22^H<<30^H<<19^H<<10)|0,i=i+B|0,a=a+H|0,l=l+W|0,c=c+ee|0,h=h+ue|0,s=s+xe|0,p=p+fe|0,d=d+ce|0}function Pe(F){F=F|0,oe(U[F|0]<<24|U[F|1]<<16|U[F|2]<<8|U[F|3],U[F|4]<<24|U[F|5]<<16|U[F|6]<<8|U[F|7],U[F|8]<<24|U[F|9]<<16|U[F|10]<<8|U[F|11],U[F|12]<<24|U[F|13]<<16|U[F|14]<<8|U[F|15],U[F|16]<<24|U[F|17]<<16|U[F|18]<<8|U[F|19],U[F|20]<<24|U[F|21]<<16|U[F|22]<<8|U[F|23],U[F|24]<<24|U[F|25]<<16|U[F|26]<<8|U[F|27],U[F|28]<<24|U[F|29]<<16|U[F|30]<<8|U[F|31],U[F|32]<<24|U[F|33]<<16|U[F|34]<<8|U[F|35],U[F|36]<<24|U[F|37]<<16|U[F|38]<<8|U[F|39],U[F|40]<<24|U[F|41]<<16|U[F|42]<<8|U[F|43],U[F|44]<<24|U[F|45]<<16|U[F|46]<<8|U[F|47],U[F|48]<<24|U[F|49]<<16|U[F|50]<<8|U[F|51],U[F|52]<<24|U[F|53]<<16|U[F|54]<<8|U[F|55],U[F|56]<<24|U[F|57]<<16|U[F|58]<<8|U[F|59],U[F|60]<<24|U[F|61]<<16|U[F|62]<<8|U[F|63])}function he(F){F=F|0,U[F|0]=i>>>24,U[F|1]=i>>>16&255,U[F|2]=i>>>8&255,U[F|3]=i&255,U[F|4]=a>>>24,U[F|5]=a>>>16&255,U[F|6]=a>>>8&255,U[F|7]=a&255,U[F|8]=l>>>24,U[F|9]=l>>>16&255,U[F|10]=l>>>8&255,U[F|11]=l&255,U[F|12]=c>>>24,U[F|13]=c>>>16&255,U[F|14]=c>>>8&255,U[F|15]=c&255,U[F|16]=h>>>24,U[F|17]=h>>>16&255,U[F|18]=h>>>8&255,U[F|19]=h&255,U[F|20]=s>>>24,U[F|21]=s>>>16&255,U[F|22]=s>>>8&255,U[F|23]=s&255,U[F|24]=p>>>24,U[F|25]=p>>>16&255,U[F|26]=p>>>8&255,U[F|27]=p&255,U[F|28]=d>>>24,U[F|29]=d>>>16&255,U[F|30]=d>>>8&255,U[F|31]=d&255}function ye(){i=1779033703,a=3144134277,l=1013904242,c=2773480762,h=1359893119,s=2600822924,p=528734635,d=1541459225,v=m=0}function de(F,I,Z,q,pe,Ee,J,Y,ae,te){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,i=F,a=I,l=Z,c=q,h=pe,s=Ee,p=J,d=Y,v=ae,m=te}function Se(F,I){F=F|0,I=I|0;var Z=0;if(F&63)return-1;for(;(I|0)>=64;)Pe(F),F=F+64|0,I=I-64|0,Z=Z+64|0;return v=v+Z|0,v>>>0>>0&&(m=m+1|0),Z|0}function X(F,I,Z){F=F|0,I=I|0,Z=Z|0;var q=0,pe=0;if(F&63||~Z&&Z&31)return-1;if((I|0)>=64){if(q=Se(F,I)|0,(q|0)==-1)return-1;F=F+q|0,I=I-q|0}if(q=q+I|0,v=v+I|0,v>>>0>>0&&(m=m+1|0),U[F|I]=128,(I|0)>=56){for(pe=I+1|0;(pe|0)<64;pe=pe+1|0)U[F|pe]=0;Pe(F),I=0,U[F|0]=0}for(pe=I+1|0;(pe|0)<59;pe=pe+1|0)U[F|pe]=0;return U[F|56]=m>>>21&255,U[F|57]=m>>>13&255,U[F|58]=m>>>5&255,U[F|59]=m<<3&255|v>>>29,U[F|60]=v>>>21&255,U[F|61]=v>>>13&255,U[F|62]=v>>>5&255,U[F|63]=v<<3&255,Pe(F),~Z&&he(Z),q|0}function se(){i=_,a=y,l=b,c=E,h=k,s=C,p=x,d=D,v=64,m=0}function Ce(){i=P,a=w,l=M,c=T,h=R,s=K,p=N,d=z,v=64,m=0}function be(F,I,Z,q,pe,Ee,J,Y,ae,te,Ae,me,V,De,ge,le){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0,Ee=Ee|0,J=J|0,Y=Y|0,ae=ae|0,te=te|0,Ae=Ae|0,me=me|0,V=V|0,De=De|0,ge=ge|0,le=le|0,ye(),oe(F^1549556828,I^1549556828,Z^1549556828,q^1549556828,pe^1549556828,Ee^1549556828,J^1549556828,Y^1549556828,ae^1549556828,te^1549556828,Ae^1549556828,me^1549556828,V^1549556828,De^1549556828,ge^1549556828,le^1549556828),P=i,w=a,M=l,T=c,R=h,K=s,N=p,z=d,ye(),oe(F^909522486,I^909522486,Z^909522486,q^909522486,pe^909522486,Ee^909522486,J^909522486,Y^909522486,ae^909522486,te^909522486,Ae^909522486,me^909522486,V^909522486,De^909522486,ge^909522486,le^909522486),_=i,y=a,b=l,E=c,k=h,C=s,x=p,D=d,v=64,m=0}function re(F,I,Z){F=F|0,I=I|0,Z=Z|0;var q=0,pe=0,Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0;return F&63||~Z&&Z&31?-1:(me=X(F,I,-1)|0,q=i,pe=a,Ee=l,J=c,Y=h,ae=s,te=p,Ae=d,Ce(),oe(q,pe,Ee,J,Y,ae,te,Ae,2147483648,0,0,0,0,0,0,768),~Z&&he(Z),me|0)}function Q(F,I,Z,q,pe){F=F|0,I=I|0,Z=Z|0,q=q|0,pe=pe|0;var Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0,V=0,De=0,ge=0,le=0,B=0,H=0,W=0,ee=0,ue=0;if(F&63||~pe&&pe&31)return-1;for(U[F+I|0]=Z>>>24,U[F+I+1|0]=Z>>>16&255,U[F+I+2|0]=Z>>>8&255,U[F+I+3|0]=Z&255,re(F,I+4|0,-1)|0,Ee=De=i,J=ge=a,Y=le=l,ae=B=c,te=H=h,Ae=W=s,me=ee=p,V=ue=d,q=q-1|0;(q|0)>0;)se(),oe(De,ge,le,B,H,W,ee,ue,2147483648,0,0,0,0,0,0,768),De=i,ge=a,le=l,B=c,H=h,W=s,ee=p,ue=d,Ce(),oe(De,ge,le,B,H,W,ee,ue,2147483648,0,0,0,0,0,0,768),De=i,ge=a,le=l,B=c,H=h,W=s,ee=p,ue=d,Ee=Ee^i,J=J^a,Y=Y^l,ae=ae^c,te=te^h,Ae=Ae^s,me=me^p,V=V^d,q=q-1|0;return i=Ee,a=J,l=Y,c=ae,h=te,s=Ae,p=me,d=V,~pe&&he(pe),0}return{reset:ye,init:de,process:Se,finish:X,hmac_reset:se,hmac_init:be,hmac_finish:re,pbkdf2_generate_block:Q}}({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(GD.push(this.heap),YD.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new i_().process(t).finish().result}}i_.NAME="sha256";var a_=hP;function hP(e,t){if(!e)throw Error(t||"Assertion failed")}hP.equal=function(e,t,n){if(e!=t)throw Error(n||"Assertion failed: "+e+" != "+t)};var Qne=ba!==void 0?ba:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function x2(e,t){return e(t={exports:{}},t.exports),t.exports}function iG(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var aG=x2(function(e){e.exports=typeof Object.create=="function"?function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),sG=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>8,l=255&i;a?n.push(a,l):n.push(l)}else for(r=0;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}var lG=function(e,t){for(var n="",r=0;r>>0}return a},cG=function(e,t){for(var n=Array(4*e.length),r=0,i=0;r>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},Ln={inherits:aG,toArray:sG,toHex:oG,htonl:pP,toHex32:lG,zero2:vP,zero8:mP,join32:uG,split32:cG,rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,n){return e+t+n>>>0},sum32_4:function(e,t,n,r){return e+t+n+r>>>0},sum32_5:function(e,t,n,r,i){return e+t+n+r+i>>>0},sum64:function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,l=(a>>0,e[t+1]=a},sum64_hi:function(e,t,n,r){return(t+r>>>0>>0},sum64_lo:function(e,t,n,r){return t+r>>>0},sum64_4_hi:function(e,t,n,r,i,a,l,c){var h=0,s=t;return h+=(s=s+r>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,n,r,i,a,l,c){return t+r+a+c>>>0},sum64_5_hi:function(e,t,n,r,i,a,l,c,h,s){var p=0,d=t;return p+=(d=d+r>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,n,r,i,a,l,c,h,s){return t+r+a+c+s>>>0},rotr64_hi:function(e,t,n){return(t<<32-n|e>>>n)>>>0},rotr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0},shr64_hi:function(e,t,n){return e>>>n},shr64_lo:function(e,t,n){return(e<<32-n|t>>>n)>>>0}};function gm(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var dG=gm;gm.prototype.update=function(e,t){if(e=Ln.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Ln.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a>>3},g1_256:function(e){return xs(e,17)^xs(e,19)^e>>>10}},Ha=Ln.sum32,hG=Ln.sum32_4,pG=Ln.sum32_5,vG=Xc.ch32,mG=Xc.maj32,gG=Xc.s0_256,_G=Xc.s1_256,yG=Xc.g0_256,bG=Xc.g1_256,bP=S2.BlockHash,wG=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function As(){if(!(this instanceof As))return new As;bP.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=wG,this.W=Array(64)}Ln.inherits(As,bP);var wP=As;function fo(){if(!(this instanceof fo))return new fo;wP.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}As.blockSize=512,As.outSize=256,As.hmacStrength=192,As.padLength=64,As.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r>>32-i,n)}function mi(e,t,n,r,i,a,l){return o_(t&n|~t&r,e,t,i,a,l)}function gi(e,t,n,r,i,a,l){return o_(t&r|n&~r,e,t,i,a,l)}function _i(e,t,n,r,i,a,l){return o_(t^n^r,e,t,i,a,l)}function yi(e,t,n,r,i,a,l){return o_(n^(t|~r),e,t,i,a,l)}function GG(e){const t=[];let n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}const QD="0123456789abcdef".split("");function YG(e){let t="",n=0;for(;n<4;n++)t+=QD[e>>8*n+4&15]+QD[e>>8*n&15];return t}function qo(e,t){return e+t&4294967295}const ig=Te.getWebCrypto(),ag=Te.getNodeCrypto(),XG=ag&&ag.getHashes();function Fl(e){if(ag&&XG.includes(e))return async function(t){const n=ag.createHash(e);return Sr(t,r=>{n.update(r)},()=>new Uint8Array(n.digest()))}}function Av(e,t){return async function(n,r=Lt){if(Ar(n)&&(n=await Ir(n)),!Te.isStream(n)&&ig&&t&&n.length>=r.minBytesForWebCrypto)return new Uint8Array(await ig.digest(t,n));const i=e();return Sr(n,a=>{i.update(a)},()=>new Uint8Array(i.digest()))}}function qD(e,t){return async function(n,r=Lt){if(Ar(n)&&(n=await Ir(n)),Te.isStream(n)){const i=new e;return Sr(n,a=>{i.process(a)},()=>i.finish().result)}return ig&&t&&n.length>=r.minBytesForWebCrypto?new Uint8Array(await ig.digest(t,n)):e.bytes(n)}}const Bl={md5:Fl("md5")||async function(e){const t=function(n){const r=n.length,i=[1732584193,-271733879,-1732584194,271733878];let a;for(a=64;a<=n.length;a+=64)jy(i,GG(n.substring(a-64,a)));n=n.substring(a-64);const l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(a=0;a>2]|=n.charCodeAt(a)<<(a%4<<3);if(l[a>>2]|=128<<(a%4<<3),a>55)for(jy(i,l),a=0;a<16;a++)l[a]=0;return l[14]=8*r,jy(i,l),i}(Te.uint8ArrayToString(e));return Te.hexToUint8Array(function(n){for(let r=0;rnew Uint8Array(b.update(E)))}(e,t,n,r);if(a.substr(0,3)==="aes")return function(d,v,m,_,y){if(Te.getWebCrypto()&&v.length!==24&&!Te.isStream(m)&&m.length>=3e3*y.minBytesForWebCrypto)return async function(E,k,C,x){const D="AES-CBC",P=await ek.importKey("raw",k,{name:D},!1,["encrypt"]),{blockSize:w}=ul(E),M=Te.concatUint8Array([new Uint8Array(w),C]),T=new Uint8Array(await ek.encrypt({name:D,iv:x},P,M)).subarray(0,C.length);return function(R,K){for(let N=0;Nb.aes.AES_Encrypt_process(E),()=>b.aes.AES_Encrypt_finish())}(e,t,n,r,i);const l=new(ul(e))(t),c=l.blockSize,h=r.slice();let s=new Uint8Array;const p=d=>{d&&(s=Te.concatUint8Array([s,d]));const v=new Uint8Array(s.length);let m,_=0;for(;d?s.length>=c:s.length;){const y=l.encrypt(h);for(m=0;mnew Uint8Array(y.update(b)))}(e,t,n,r);if(i.substr(0,3)==="aes")return function(p,d,v,m){if(Te.isStream(v)){const _=new Dc(d,m);return Sr(v,y=>_.aes.AES_Decrypt_process(y),()=>_.aes.AES_Decrypt_finish())}return Dc.decrypt(v,d,m)}(0,t,n,r);const a=new(ul(e))(t),l=a.blockSize;let c=r,h=new Uint8Array;const s=p=>{p&&(h=Te.concatUint8Array([h,p]));const d=new Uint8Array(h.length);let v,m=0;for(;p?h.length>=l:h.length;){const _=a.encrypt(c);for(c=h,v=0;v48)throw new go("illegal counter size");let a=Math.pow(2,r)-1;i.set_mask(0,0,a/4294967296|0,0|a)}else r=48,i.set_mask(0,0,65535,4294967295);if(t===void 0)throw Error("nonce is required");{let a=t.length;if(!a||a>16)throw new go("illegal nonce size");let l=new DataView(new ArrayBuffer(16));new Uint8Array(l.buffer).set(t),i.set_nonce(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}if(n!==void 0){if(n<0||n>=Math.pow(2,r))throw new go("illegal counter value");i.set_counter(0,0,n/4294967296|0,0|n)}}}class lg{static encrypt(t,n,r=!0,i){return new lg(n,i,r).encrypt(t)}static decrypt(t,n,r=!0,i){return new lg(n,i,r).decrypt(t)}constructor(t,n,r=!0,i){this.aes=i||new ah(t,n,r,"CBC")}encrypt(t){return ml(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return ml(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}const tk=Te.getWebCrypto(),ZG=Te.getNodeCrypto(),lo=16;function nk(e,t){const n=e.length-lo;for(let r=0;r>3),17+(m>>3)),8-(7&m)).subarray(1),E=new Uint8Array($i),k=new Uint8Array(h.length+Vo);let C,x=0;for(C=0;C16)throw new go("illegal tagSize value");const h=n.length||0,s=new Uint8Array(16);h!==12?(this._gcm_mac_process(n),c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=0,c[11]=h>>>29,c[12]=h>>>21&255,c[13]=h>>>13&255,c[14]=h>>>5&255,c[15]=h<<3&255,l.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),l.get_iv(Tn.HEAP_DATA),l.set_iv(0,0,0,0),s.set(c.subarray(0,16))):(s.set(n),s[15]=1);const p=new DataView(s.buffer);if(this.gamma0=p.getUint32(12),l.set_nonce(p.getUint32(0),p.getUint32(4),p.getUint32(8),0),l.set_mask(0,0,0,4294967295),r!==void 0){if(r.length>Vy)throw new go("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");l.set_counter(0,0,0,this.gamma0+this.counter|0)}static encrypt(t,n,r,i,a){return new ql(n,r,i,a).encrypt(t)}static decrypt(t,n,r,i,a){return new ql(n,r,i,a).decrypt(t)}encrypt(t){return this.AES_GCM_encrypt(t)}decrypt(t){return this.AES_GCM_decrypt(t)}AES_GCM_Encrypt_process(t){let n=0,r=t.length||0,{asm:i,heap:a}=this.aes.acquire_asm(),l=this.counter,c=this.aes.pos,h=this.aes.len,s=0,p=h+r&-16,d=0;if((l-1<<4)+h+r>Vy)throw new RangeError("counter overflow");const v=new Uint8Array(p);for(;r>0;)d=Zl(a,c+h,t,n,r),h+=d,n+=d,r-=d,d=i.cipher(Tn.ENC.CTR,Tn.HEAP_DATA+c,h),d=i.mac(Tn.MAC.GCM,Tn.HEAP_DATA+c,d),d&&v.set(a.subarray(c,c+d),s),l+=d>>>4,s+=d,d>>29,n[4]=p>>>21,n[5]=p>>>13&255,n[6]=p>>>5&255,n[7]=p<<3&255,n[8]=n[9]=n[10]=0,n[11]=d>>>29,n[12]=d>>>21&255,n[13]=d>>>13&255,n[14]=d>>>5&255,n[15]=d<<3&255,t.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),t.get_iv(Tn.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(Tn.ENC.CTR,Tn.HEAP_DATA,16),h.set(n.subarray(0,i),c),this.counter=1,this.aes.pos=0,this.aes.len=0,h}AES_GCM_Decrypt_process(t){let n=0,r=t.length||0,{asm:i,heap:a}=this.aes.acquire_asm(),l=this.counter,c=this.tagSize,h=this.aes.pos,s=this.aes.len,p=0,d=s+r>c?s+r-c&-16:0,v=s+r-d,m=0;if((l-1<<4)+s+r>Vy)throw new RangeError("counter overflow");const _=new Uint8Array(d);for(;r>v;)m=Zl(a,h+s,t,n,r-v),s+=m,n+=m,r-=m,m=i.mac(Tn.MAC.GCM,Tn.HEAP_DATA+h,m),m=i.cipher(Tn.DEC.CTR,Tn.HEAP_DATA+h,m),m&&_.set(a.subarray(h,h+m),p),l+=m>>>4,p+=m,h=0,s=0;return r>0&&(s+=Zl(a,0,t,n,r)),this.counter=l,this.aes.pos=h,this.aes.len=s,_}AES_GCM_Decrypt_finish(){let{asm:t,heap:n}=this.aes.acquire_asm(),r=this.tagSize,i=this.adata,a=this.counter,l=this.aes.pos,c=this.aes.len,h=c-r;if(c>>29,n[4]=v>>>21,n[5]=v>>>13&255,n[6]=v>>>5&255,n[7]=v<<3&255,n[8]=n[9]=n[10]=0,n[11]=m>>>29,n[12]=m>>>21&255,n[13]=m>>>13&255,n[14]=m>>>5&255,n[15]=m<<3&255,t.mac(Tn.MAC.GCM,Tn.HEAP_DATA,16),t.get_iv(Tn.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(Tn.ENC.CTR,Tn.HEAP_DATA,16);let _=0;for(let y=0;y0;){for(l=Zl(r,0,t,i,a),i+=l,a-=l;15&l;)r[l++]=0;n.mac(Tn.MAC.GCM,Tn.HEAP_DATA,l)}}}const Wy=Te.getWebCrypto(),sk=Te.getNodeCrypto(),ok=Te.getNodeBuffer(),dc=16,Hy="AES-GCM";async function _c(e,t){if(e!==ve.symmetric.aes128&&e!==ve.symmetric.aes192&&e!==ve.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Te.getWebCrypto()&&t.length!==24){const n=await Wy.importKey("raw",t,{name:Hy},!1,["encrypt","decrypt"]);return{encrypt:async function(r,i,a=new Uint8Array){if(!r.length)return ql.encrypt(r,t,i,a);const l=await Wy.encrypt({name:Hy,iv:i,additionalData:a,tagLength:8*dc},n,r);return new Uint8Array(l)},decrypt:async function(r,i,a=new Uint8Array){if(r.length===dc)return ql.decrypt(r,t,i,a);const l=await Wy.decrypt({name:Hy,iv:i,additionalData:a,tagLength:8*dc},n,r);return new Uint8Array(l)}}}return Te.getNodeCrypto()?{encrypt:async function(n,r,i=new Uint8Array){const a=new sk.createCipheriv("aes-"+8*t.length+"-gcm",t,r);a.setAAD(i);const l=ok.concat([a.update(n),a.final(),a.getAuthTag()]);return new Uint8Array(l)},decrypt:async function(n,r,i=new Uint8Array){const a=new sk.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);a.setAAD(i),a.setAuthTag(n.slice(n.length-dc,n.length));const l=ok.concat([a.update(n.slice(0,n.length-dc)),a.final()]);return new Uint8Array(l)}}:{encrypt:async function(n,r,i){return ql.encrypt(n,t,r,i)},decrypt:async function(n,r,i){return ql.decrypt(n,t,r,i)}}}_c.getNonce=function(e,t){const n=e.slice();for(let r=0;r>>8)-1}(re,Q,F,I,32)}function _(re,Q){var F;for(F=0;F<16;F++)re[F]=0|Q[F]}function y(re){var Q,F,I=1;for(Q=0;Q<16;Q++)F=re[Q]+I+65535,I=Math.floor(F/65536),re[Q]=F-65536*I;re[0]+=I-1+37*(I-1)}function b(re,Q,F){for(var I,Z=~(F-1),q=0;q<16;q++)I=Z&(re[q]^Q[q]),re[q]^=I,Q[q]^=I}function E(re,Q){var F,I,Z,q=n(),pe=n();for(F=0;F<16;F++)pe[F]=Q[F];for(y(pe),y(pe),y(pe),I=0;I<2;I++){for(q[0]=pe[0]-65517,F=1;F<15;F++)q[F]=pe[F]-65535-(q[F-1]>>16&1),q[F-1]&=65535;q[15]=pe[15]-32767-(q[14]>>16&1),Z=q[15]>>16&1,q[14]&=65535,b(pe,q,1-Z)}for(F=0;F<16;F++)re[2*F]=255&pe[F],re[2*F+1]=pe[F]>>8}function k(re,Q){var F=new Uint8Array(32),I=new Uint8Array(32);return E(F,re),E(I,Q),m(F,0,I,0)}function C(re){var Q=new Uint8Array(32);return E(Q,re),1&Q[0]}function x(re,Q){var F;for(F=0;F<16;F++)re[F]=Q[2*F]+(Q[2*F+1]<<8);re[15]&=32767}function D(re,Q,F){for(var I=0;I<16;I++)re[I]=Q[I]+F[I]}function P(re,Q,F){for(var I=0;I<16;I++)re[I]=Q[I]-F[I]}function w(re,Q,F){var I,Z,q=0,pe=0,Ee=0,J=0,Y=0,ae=0,te=0,Ae=0,me=0,V=0,De=0,ge=0,le=0,B=0,H=0,W=0,ee=0,ue=0,xe=0,fe=0,ce=0,Ve=0,Je=0,vt=0,xt=0,kt=0,Nt=0,pt=0,It=0,Ot=0,hn=0,qt=F[0],Zt=F[1],Qt=F[2],Yt=F[3],Ut=F[4],Xt=F[5],rn=F[6],tt=F[7],it=F[8],yt=F[9],Ft=F[10],Oe=F[11],Fe=F[12],Ue=F[13],Re=F[14],nt=F[15];q+=(I=Q[0])*qt,pe+=I*Zt,Ee+=I*Qt,J+=I*Yt,Y+=I*Ut,ae+=I*Xt,te+=I*rn,Ae+=I*tt,me+=I*it,V+=I*yt,De+=I*Ft,ge+=I*Oe,le+=I*Fe,B+=I*Ue,H+=I*Re,W+=I*nt,pe+=(I=Q[1])*qt,Ee+=I*Zt,J+=I*Qt,Y+=I*Yt,ae+=I*Ut,te+=I*Xt,Ae+=I*rn,me+=I*tt,V+=I*it,De+=I*yt,ge+=I*Ft,le+=I*Oe,B+=I*Fe,H+=I*Ue,W+=I*Re,ee+=I*nt,Ee+=(I=Q[2])*qt,J+=I*Zt,Y+=I*Qt,ae+=I*Yt,te+=I*Ut,Ae+=I*Xt,me+=I*rn,V+=I*tt,De+=I*it,ge+=I*yt,le+=I*Ft,B+=I*Oe,H+=I*Fe,W+=I*Ue,ee+=I*Re,ue+=I*nt,J+=(I=Q[3])*qt,Y+=I*Zt,ae+=I*Qt,te+=I*Yt,Ae+=I*Ut,me+=I*Xt,V+=I*rn,De+=I*tt,ge+=I*it,le+=I*yt,B+=I*Ft,H+=I*Oe,W+=I*Fe,ee+=I*Ue,ue+=I*Re,xe+=I*nt,Y+=(I=Q[4])*qt,ae+=I*Zt,te+=I*Qt,Ae+=I*Yt,me+=I*Ut,V+=I*Xt,De+=I*rn,ge+=I*tt,le+=I*it,B+=I*yt,H+=I*Ft,W+=I*Oe,ee+=I*Fe,ue+=I*Ue,xe+=I*Re,fe+=I*nt,ae+=(I=Q[5])*qt,te+=I*Zt,Ae+=I*Qt,me+=I*Yt,V+=I*Ut,De+=I*Xt,ge+=I*rn,le+=I*tt,B+=I*it,H+=I*yt,W+=I*Ft,ee+=I*Oe,ue+=I*Fe,xe+=I*Ue,fe+=I*Re,ce+=I*nt,te+=(I=Q[6])*qt,Ae+=I*Zt,me+=I*Qt,V+=I*Yt,De+=I*Ut,ge+=I*Xt,le+=I*rn,B+=I*tt,H+=I*it,W+=I*yt,ee+=I*Ft,ue+=I*Oe,xe+=I*Fe,fe+=I*Ue,ce+=I*Re,Ve+=I*nt,Ae+=(I=Q[7])*qt,me+=I*Zt,V+=I*Qt,De+=I*Yt,ge+=I*Ut,le+=I*Xt,B+=I*rn,H+=I*tt,W+=I*it,ee+=I*yt,ue+=I*Ft,xe+=I*Oe,fe+=I*Fe,ce+=I*Ue,Ve+=I*Re,Je+=I*nt,me+=(I=Q[8])*qt,V+=I*Zt,De+=I*Qt,ge+=I*Yt,le+=I*Ut,B+=I*Xt,H+=I*rn,W+=I*tt,ee+=I*it,ue+=I*yt,xe+=I*Ft,fe+=I*Oe,ce+=I*Fe,Ve+=I*Ue,Je+=I*Re,vt+=I*nt,V+=(I=Q[9])*qt,De+=I*Zt,ge+=I*Qt,le+=I*Yt,B+=I*Ut,H+=I*Xt,W+=I*rn,ee+=I*tt,ue+=I*it,xe+=I*yt,fe+=I*Ft,ce+=I*Oe,Ve+=I*Fe,Je+=I*Ue,vt+=I*Re,xt+=I*nt,De+=(I=Q[10])*qt,ge+=I*Zt,le+=I*Qt,B+=I*Yt,H+=I*Ut,W+=I*Xt,ee+=I*rn,ue+=I*tt,xe+=I*it,fe+=I*yt,ce+=I*Ft,Ve+=I*Oe,Je+=I*Fe,vt+=I*Ue,xt+=I*Re,kt+=I*nt,ge+=(I=Q[11])*qt,le+=I*Zt,B+=I*Qt,H+=I*Yt,W+=I*Ut,ee+=I*Xt,ue+=I*rn,xe+=I*tt,fe+=I*it,ce+=I*yt,Ve+=I*Ft,Je+=I*Oe,vt+=I*Fe,xt+=I*Ue,kt+=I*Re,Nt+=I*nt,le+=(I=Q[12])*qt,B+=I*Zt,H+=I*Qt,W+=I*Yt,ee+=I*Ut,ue+=I*Xt,xe+=I*rn,fe+=I*tt,ce+=I*it,Ve+=I*yt,Je+=I*Ft,vt+=I*Oe,xt+=I*Fe,kt+=I*Ue,Nt+=I*Re,pt+=I*nt,B+=(I=Q[13])*qt,H+=I*Zt,W+=I*Qt,ee+=I*Yt,ue+=I*Ut,xe+=I*Xt,fe+=I*rn,ce+=I*tt,Ve+=I*it,Je+=I*yt,vt+=I*Ft,xt+=I*Oe,kt+=I*Fe,Nt+=I*Ue,pt+=I*Re,It+=I*nt,H+=(I=Q[14])*qt,W+=I*Zt,ee+=I*Qt,ue+=I*Yt,xe+=I*Ut,fe+=I*Xt,ce+=I*rn,Ve+=I*tt,Je+=I*it,vt+=I*yt,xt+=I*Ft,kt+=I*Oe,Nt+=I*Fe,pt+=I*Ue,It+=I*Re,Ot+=I*nt,W+=(I=Q[15])*qt,pe+=38*(ue+=I*Qt),Ee+=38*(xe+=I*Yt),J+=38*(fe+=I*Ut),Y+=38*(ce+=I*Xt),ae+=38*(Ve+=I*rn),te+=38*(Je+=I*tt),Ae+=38*(vt+=I*it),me+=38*(xt+=I*yt),V+=38*(kt+=I*Ft),De+=38*(Nt+=I*Oe),ge+=38*(pt+=I*Fe),le+=38*(It+=I*Ue),B+=38*(Ot+=I*Re),H+=38*(hn+=I*nt),q=(I=(q+=38*(ee+=I*Zt))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),pe=(I=pe+Z+65535)-65536*(Z=Math.floor(I/65536)),Ee=(I=Ee+Z+65535)-65536*(Z=Math.floor(I/65536)),J=(I=J+Z+65535)-65536*(Z=Math.floor(I/65536)),Y=(I=Y+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),te=(I=te+Z+65535)-65536*(Z=Math.floor(I/65536)),Ae=(I=Ae+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),V=(I=V+Z+65535)-65536*(Z=Math.floor(I/65536)),De=(I=De+Z+65535)-65536*(Z=Math.floor(I/65536)),ge=(I=ge+Z+65535)-65536*(Z=Math.floor(I/65536)),le=(I=le+Z+65535)-65536*(Z=Math.floor(I/65536)),B=(I=B+Z+65535)-65536*(Z=Math.floor(I/65536)),H=(I=H+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=(q+=Z-1+37*(Z-1))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),pe=(I=pe+Z+65535)-65536*(Z=Math.floor(I/65536)),Ee=(I=Ee+Z+65535)-65536*(Z=Math.floor(I/65536)),J=(I=J+Z+65535)-65536*(Z=Math.floor(I/65536)),Y=(I=Y+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),te=(I=te+Z+65535)-65536*(Z=Math.floor(I/65536)),Ae=(I=Ae+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),V=(I=V+Z+65535)-65536*(Z=Math.floor(I/65536)),De=(I=De+Z+65535)-65536*(Z=Math.floor(I/65536)),ge=(I=ge+Z+65535)-65536*(Z=Math.floor(I/65536)),le=(I=le+Z+65535)-65536*(Z=Math.floor(I/65536)),B=(I=B+Z+65535)-65536*(Z=Math.floor(I/65536)),H=(I=H+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),q+=Z-1+37*(Z-1),re[0]=q,re[1]=pe,re[2]=Ee,re[3]=J,re[4]=Y,re[5]=ae,re[6]=te,re[7]=Ae,re[8]=me,re[9]=V,re[10]=De,re[11]=ge,re[12]=le,re[13]=B,re[14]=H,re[15]=W}function M(re,Q){w(re,Q,Q)}function T(re,Q){var F,I=n();for(F=0;F<16;F++)I[F]=Q[F];for(F=253;F>=0;F--)M(I,I),F!==2&&F!==4&&w(I,I,Q);for(F=0;F<16;F++)re[F]=I[F]}function R(re,Q,F){var I,Z,q=new Uint8Array(32),pe=new Float64Array(80),Ee=n(),J=n(),Y=n(),ae=n(),te=n(),Ae=n();for(Z=0;Z<31;Z++)q[Z]=Q[Z];for(q[31]=127&Q[31]|64,q[0]&=248,x(pe,F),Z=0;Z<16;Z++)J[Z]=pe[Z],ae[Z]=Ee[Z]=Y[Z]=0;for(Ee[0]=ae[0]=1,Z=254;Z>=0;--Z)b(Ee,J,I=q[Z>>>3]>>>(7&Z)&1),b(Y,ae,I),D(te,Ee,Y),P(Ee,Ee,Y),D(Y,J,ae),P(J,J,ae),M(ae,te),M(Ae,Ee),w(Ee,Y,Ee),w(Y,J,te),D(te,Ee,Y),P(Ee,Ee,Y),M(J,Ee),P(Y,ae,Ae),w(Ee,Y,c),D(Ee,Ee,ae),w(Y,Y,Ee),w(Ee,ae,Ae),w(ae,J,pe),M(J,te),b(Ee,J,I),b(Y,ae,I);for(Z=0;Z<16;Z++)pe[Z+16]=Ee[Z],pe[Z+32]=Y[Z],pe[Z+48]=J[Z],pe[Z+64]=ae[Z];var me=pe.subarray(32),V=pe.subarray(16);return T(me,me),w(V,V,me),E(re,V),0}function K(re,Q){return R(re,Q,i)}function N(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n(),Y=n(),ae=n();P(F,re[1],re[0]),P(ae,Q[1],Q[0]),w(F,F,ae),D(I,re[0],re[1]),D(ae,Q[0],Q[1]),w(I,I,ae),w(Z,re[3],Q[3]),w(Z,Z,s),w(q,re[2],Q[2]),D(q,q,q),P(pe,I,F),P(Ee,q,Z),D(J,q,Z),D(Y,I,F),w(re[0],pe,Ee),w(re[1],Y,J),w(re[2],J,Ee),w(re[3],pe,Y)}function z(re,Q,F){var I;for(I=0;I<4;I++)b(re[I],Q[I],F)}function U(re,Q){var F=n(),I=n(),Z=n();T(Z,Q[2]),w(F,Q[0],Z),w(I,Q[1],Z),E(re,I),re[31]^=C(F)<<7}function oe(re,Q,F){var I,Z;for(_(re[0],a),_(re[1],l),_(re[2],l),_(re[3],a),Z=255;Z>=0;--Z)z(re,Q,I=F[Z/8|0]>>(7&Z)&1),N(Q,re),N(re,re),z(re,Q,I)}function Pe(re,Q){var F=[n(),n(),n(),n()];_(F[0],p),_(F[1],d),_(F[2],l),w(F[3],p,d),oe(re,F,Q)}function he(re,Q,F){var I,Z,q=[n(),n(),n(),n()];for(F||r(Q,32),(I=t.hash(Q.subarray(0,32)))[0]&=248,I[31]&=127,I[31]|=64,Pe(q,I),U(re,q),Z=0;Z<32;Z++)Q[Z+32]=re[Z];return 0}var ye=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function de(re,Q){var F,I,Z,q;for(I=63;I>=32;--I){for(F=0,Z=I-32,q=I-12;Z>4)*ye[Z],F=Q[Z]>>8,Q[Z]&=255;for(Z=0;Z<32;Z++)Q[Z]-=F*ye[Z];for(I=0;I<32;I++)Q[I+1]+=Q[I]>>8,re[I]=255&Q[I]}function Se(re){var Q,F=new Float64Array(64);for(Q=0;Q<64;Q++)F[Q]=re[Q];for(Q=0;Q<64;Q++)re[Q]=0;de(re,F)}function X(re,Q){var F=n(),I=n(),Z=n(),q=n(),pe=n(),Ee=n(),J=n();return _(re[2],l),x(re[1],Q),M(Z,re[1]),w(q,Z,h),P(Z,Z,re[2]),D(q,re[2],q),M(pe,q),M(Ee,pe),w(J,Ee,pe),w(F,J,Z),w(F,F,q),function(Y,ae){var te,Ae=n();for(te=0;te<16;te++)Ae[te]=ae[te];for(te=250;te>=0;te--)M(Ae,Ae),te!==1&&w(Ae,Ae,ae);for(te=0;te<16;te++)Y[te]=Ae[te]}(F,F),w(F,F,Z),w(F,F,q),w(F,F,q),w(re[0],F,q),M(I,re[0]),w(I,I,q),k(I,Z)&&w(re[0],re[0],v),M(I,re[0]),w(I,I,q),k(I,Z)?-1:(C(re[0])===Q[31]>>7&&P(re[0],a,re[0]),w(re[3],re[0],re[1]),0)}var se=64;function Ce(){for(var re=0;re=0},t.sign.keyPair=function(){var re=new Uint8Array(32),Q=new Uint8Array(64);return he(re,Q),{publicKey:re,secretKey:Q}},t.sign.keyPair.fromSecretKey=function(re){if(Ce(re),re.length!==64)throw Error("bad secret key size");for(var Q=new Uint8Array(32),F=0;Fe&&(h.imod(a.leftShift(i)).iadd(a),s=h.mod(l).toNumber());while(!await PP(h,t,n));return h}async function PP(e,t,n){return!(t&&!e.dec().gcd(t).isOne())&&!!await async function(r){const i=await Te.getBigInteger();return sY.every(a=>r.mod(new i(a))!==0)}(e)&&!!await async function(r,i){const a=await Te.getBigInteger();return i=i||new a(2),i.modExp(r.dec(),r).isOne()}(e)&&!!await async function(r,i,a){const l=await Te.getBigInteger(),c=r.bitLength();i||(i=Math.max(1,c/48|0));const h=r.dec();let s=0;for(;!h.getBit(s);)s++;const p=r.rightShift(new l(s));for(;i>0;i--){let d,v=(a?a():await Eo(new l(2),h)).modExp(p,r);if(!v.isOne()&&!v.equal(h)){for(d=1;dt-11)throw Error("Message too long");const r=function(a){const l=new Uint8Array(a);let c=0;for(;c=8&!r;if(t)return Te.selectUint8Array(l,a,t);if(l)return a;throw Error("Decryption error")}async function Ob(e,t,n){let r;if(t.length!==Lc.getHashByteLength(e))throw Error("Invalid hash length");const i=new Uint8Array(Os[e].length);for(r=0;rimport("./bn.min.03db7fc1.js"),[]),k=new E(_),C=new E(y),x=new E(m),D=x.mod(C.subn(1)),P=x.mod(k.subn(1)),w=Ci.createSign(ve.read(ve.hash,s));w.write(p),w.end();const M={version:0,modulus:new E(d),publicExponent:new E(v),privateExponent:new E(m),prime1:new E(y),prime2:new E(_),exponent1:D,exponent2:P,coefficient:new E(b)};if(Ci.createPrivateKey!==void 0){const R=rc.encode(M,"der");return new Uint8Array(w.sign({key:R,format:"der",type:"pkcs1"}))}const T=rc.encode(M,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(w.sign(T))}(e,t,n,r,i,a,l,c)}return async function(s,p,d,v){const m=await Te.getBigInteger();p=new m(p);const _=new m(await Ob(s,v,p.byteLength()));if(d=new m(d),_.gte(p))throw Error("Message size cannot exceed modulus size");return _.modExp(d,p).toUint8Array("be",p.byteLength())}(e,n,i,h)},verify:async function(e,t,n,r,i,a){if(t&&!Te.isStream(t)){if(Te.getWebCrypto())try{return await async function(l,c,h,s,p){const d=function(m,_){return{kty:"RSA",n:pa(m,!0),e:pa(_,!0),ext:!0}}(s,p),v=await nc.importKey("jwk",d,{name:"RSASSA-PKCS1-v1_5",hash:{name:l}},!1,["verify"]);return nc.verify("RSASSA-PKCS1-v1_5",v,h,c)}(ve.read(ve.webHash,e),t,n,r,i)}catch(l){Te.printDebugError(l)}else if(Te.getNodeCrypto())return async function(l,c,h,s,p){const{default:d}=await _n(()=>import("./bn.min.03db7fc1.js"),[]),v=Ci.createVerify(ve.read(ve.hash,l));v.write(c),v.end();const m={modulus:new d(s),publicExponent:new d(p)};let _;Ci.createPrivateKey!==void 0?_={key:Rv.encode(m,"der"),format:"der",type:"pkcs1"}:_=Rv.encode(m,"pem",{label:"RSA PUBLIC KEY"});try{return await v.verify(_,h)}catch{return!1}}(e,t,n,r,i)}return async function(l,c,h,s,p){const d=await Te.getBigInteger();if(h=new d(h),c=new d(c),s=new d(s),c.gte(h))throw Error("Signature size cannot exceed modulus size");const v=c.modExp(s,h).toUint8Array("be",h.byteLength()),m=await Ob(l,p,h.byteLength());return Te.equalsUint8Array(v,m)}(e,n,r,i,a)},encrypt:async function(e,t,n){return Te.getNodeCrypto()?async function(r,i,a){const{default:l}=await _n(()=>import("./bn.min.03db7fc1.js"),[]),c={modulus:new l(i),publicExponent:new l(a)};let h;return Ci.createPrivateKey!==void 0?h={key:Rv.encode(c,"der"),format:"der",type:"pkcs1",padding:Ci.constants.RSA_PKCS1_PADDING}:h={key:Rv.encode(c,"pem",{label:"RSA PUBLIC KEY"}),padding:Ci.constants.RSA_PKCS1_PADDING},new Uint8Array(Ci.publicEncrypt(h,r))}(e,t,n):async function(r,i,a){const l=await Te.getBigInteger();if(i=new l(i),r=new l(E2(r,i.byteLength())),a=new l(a),r.gte(i))throw Error("Message size cannot exceed modulus size");return r.modExp(a,i).toUint8Array("be",i.byteLength())}(e,t,n)},decrypt:async function(e,t,n,r,i,a,l,c){return Te.getNodeCrypto()?async function(h,s,p,d,v,m,_,y){const{default:b}=await _n(()=>import("./bn.min.03db7fc1.js"),[]),E=new b(v),k=new b(m),C=new b(d),x=C.mod(k.subn(1)),D=C.mod(E.subn(1)),P={version:0,modulus:new b(s),publicExponent:new b(p),privateExponent:new b(d),prime1:new b(m),prime2:new b(v),exponent1:x,exponent2:D,coefficient:new b(_)};let w;Ci.createPrivateKey!==void 0?w={key:rc.encode(P,"der"),format:"der",type:"pkcs1",padding:Ci.constants.RSA_PKCS1_PADDING}:w={key:rc.encode(P,"pem",{label:"RSA PRIVATE KEY"}),padding:Ci.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(Ci.privateDecrypt(w,h))}catch{if(y)return y;throw Error("Decryption error")}}(e,t,n,r,i,a,l,c):async function(h,s,p,d,v,m,_,y){const b=await Te.getBigInteger();if(h=new b(h),s=new b(s),p=new b(p),d=new b(d),v=new b(v),m=new b(m),_=new b(_),h.gte(s))throw Error("Data too large.");const E=d.mod(m.dec()),k=d.mod(v.dec()),C=(await Eo(new b(2),s)).mod(s),x=C.modInv(s).modExp(p,s);h=h.mul(x).mod(s);const D=h.modExp(k,v),P=h.modExp(E,m);let M=_.mul(P.sub(D)).mod(m).mul(v).add(D);return M=M.mul(C).mod(s),D2(M.toUint8Array("be",s.byteLength()),y)}(e,t,n,r,i,a,l,c)},generate:async function(e,t){if(t=new(await Te.getBigInteger())(t),Te.getWebCrypto()){const l={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},c=await nc.generateKey(l,!0,["sign","verify"]),h=await nc.exportKey("jwk",c.privateKey);return{n:co(h.n),e:t.toUint8Array(),d:co(h.d),p:co(h.q),q:co(h.p),u:co(h.qi)}}if(Te.getNodeCrypto()&&Ci.generateKeyPair&&rc){const l={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},c=await new Promise((h,s)=>{Ci.generateKeyPair("rsa",l,(p,d,v)=>{p?s(p):h(rc.decode(v,"der"))})});return{n:c.modulus.toArrayLike(Uint8Array),e:c.publicExponent.toArrayLike(Uint8Array),d:c.privateExponent.toArrayLike(Uint8Array),p:c.prime2.toArrayLike(Uint8Array),q:c.prime1.toArrayLike(Uint8Array),u:c.coefficient.toArrayLike(Uint8Array)}}let n,r,i;do r=await uk(e-(e>>1),t,40),n=await uk(e>>1,t,40),i=n.mul(r);while(i.bitLength()!==e);const a=n.dec().imul(r.dec());return r.lt(n)&&([n,r]=[r,n]),{n:i.toUint8Array(),e:t.toUint8Array(),d:t.modInv(a).toUint8Array(),p:n.toUint8Array(),q:r.toUint8Array(),u:n.modInv(r).toUint8Array()}},validateParams:async function(e,t,n,r,i,a){const l=await Te.getBigInteger();if(e=new l(e),r=new l(r),i=new l(i),!r.mul(i).equal(e))return!1;const c=new l(2);if(a=new l(a),!r.mul(a).mod(i).isOne())return!1;t=new l(t),n=new l(n);const h=new l(Math.floor(e.bitLength()/3)),s=await Eo(c,c.leftShift(h)),p=s.mul(n).mul(t);return!(!p.mod(r.dec()).equal(s)||!p.mod(i.dec()).equal(s))}}),uY=Object.freeze({__proto__:null,encrypt:async function(e,t,n,r){const i=await Te.getBigInteger();t=new i(t),n=new i(n),r=new i(r);const a=new i(E2(e,t.byteLength())),l=await Eo(new i(1),t.dec());return{c1:n.modExp(l,t).toUint8Array(),c2:r.modExp(l,t).imul(a).imod(t).toUint8Array()}},decrypt:async function(e,t,n,r,i){const a=await Te.getBigInteger();return e=new a(e),t=new a(t),n=new a(n),r=new a(r),D2(e.modExp(r,n).modInv(n).imul(t).imod(n).toUint8Array("be",n.byteLength()),i)},validateParams:async function(e,t,n,r){const i=await Te.getBigInteger();e=new i(e),t=new i(t),n=new i(n);const a=new i(1);if(t.lte(a)||t.gte(e))return!1;const l=new i(e.bitLength()),c=new i(1023);if(l.lt(c)||!t.modExp(e.dec(),e).isOne())return!1;let h=t;const s=new i(1),p=new i(2).leftShift(new i(17));for(;s.lt(p);){if(h=h.mul(t).imod(e),h.isOne())return!1;s.iinc()}r=new i(r);const d=new i(2),v=await Eo(d.leftShift(l.dec()),d.leftShift(l)),m=e.dec().imul(v).iadd(r);return!!n.equal(t.modExp(m,e))}});class Is{constructor(t){if(t instanceof Is)this.oid=t.oid;else if(Te.isArray(t)||Te.isUint8Array(t)){if((t=new Uint8Array(t))[0]===6){if(t[1]!==t.length-2)throw Error("Length mismatch in DER encoded oid");t=t.subarray(2)}this.oid=t}else this.oid=""}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.oid=t.subarray(1,1+n),1+this.oid.length}throw Error("Invalid oid")}write(){return Te.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Te.uint8ArrayToHex(this.oid)}getName(){const t=this.toHex();if(ve.curve[t])return ve.write(ve.curve,t);throw Error("Unknown curve object identifier.")}}function l_(e,t){return e.keyPair({priv:t})}function u_(e,t){const n=e.keyPair({pub:t});if(n.validate().result!==!0)throw Error("Invalid elliptic public key");return n}async function Jc(e){if(!Lt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await _n(()=>import("./elliptic.min.b3d8d4c2.js"),["js/build/elliptic.min.b3d8d4c2.js","js/build/bn.min.03db7fc1.js"]);return new t.ec(e)}function AP(e){let t,n=0;const r=e[0];return r<192?([n]=e,t=1):r<255?(n=(e[0]-192<<8)+e[1]+192,t=2):r===255&&(n=Te.readNumber(e.subarray(1,5)),t=5),{len:n,offset:t}}function oh(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Te.concatUint8Array([new Uint8Array([255]),Te.writeNumber(e,4)])}function cY(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function MP(e){return new Uint8Array([192|e])}function ck(e,t){return Te.concatUint8Array([MP(e),oh(t)])}function _m(e){return[ve.packet.literalData,ve.packet.compressedData,ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData].includes(e)}async function dY(e,t){const n=qs(e);let r,i;try{const a=await n.peekBytes(2);if(!a||a.length<2||(128&a[0])==0)throw Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const l=await n.readByte();let c,h,s=-1,p=-1;p=0,(64&l)!=0&&(p=1),p?s=63&l:(s=(63&l)>>2,h=3&l);const d=_m(s);let v,m=null;if(d){if(Te.isStream(e)==="array"){const y=new zs;r=ea(y),m=y}else{const y=new Rc;r=ea(y.writable),m=y.readable}i=t({tag:s,packet:m})}else m=[];do{if(p){const y=await n.readByte();if(v=!1,y<192)c=y;else if(y>=192&&y<224)c=(y-192<<8)+await n.readByte()+192;else if(y>223&&y<255){if(c=1<<(31&y),v=!0,!d)throw new TypeError("This packet type does not support partial lengths.")}else c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte()}else switch(h){case 0:c=await n.readByte();break;case 1:c=await n.readByte()<<8|await n.readByte();break;case 2:c=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte();break;default:c=1/0}if(c>0){let y=0;for(;;){r&&await r.ready;const{done:b,value:E}=await n.read();if(b){if(c===1/0)break;throw Error("Unexpected end of packet")}const k=c===1/0?E:E.subarray(0,c-y);if(r?await r.write(k):m.push(k),y+=E.length,y>=c){n.unshift(E.subarray(c-y+E.length));break}}}}while(v);const _=await n.peekBytes(d?1/0:2);return r?(await r.ready,await r.close()):(m=Te.concatUint8Array(m),await t({tag:s,packet:m})),!_||!_.length}catch(a){if(r)return await r.abort(a),!0;throw a}finally{r&&await i,n.releaseLock()}}class zr extends Error{constructor(...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,zr),this.name="UnsupportedError"}}class Pb{constructor(t,n){this.tag=t,this.rawContent=n}write(){return this.rawContent}}const Ky=Te.getWebCrypto(),ug=Te.getNodeCrypto(),Ys={p256:"P-256",p384:"P-384",p521:"P-521"},ao=ug?ug.getCurves():[],Wo=ug?{secp256k1:ao.includes("secp256k1")?"secp256k1":void 0,p256:ao.includes("prime256v1")?"prime256v1":void 0,p384:ao.includes("secp384r1")?"secp384r1":void 0,p521:ao.includes("secp521r1")?"secp521r1":void 0,ed25519:ao.includes("ED25519")?"ED25519":void 0,curve25519:ao.includes("X25519")?"X25519":void 0,brainpoolP256r1:ao.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:ao.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:ao.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},ym={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Wo.p256,web:Ys.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Wo.p384,web:Ys.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Wo.p521,web:Ys.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Wo.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:ve.publicKey.eddsa,hash:ve.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:ve.publicKey.ecdh,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha256,cipher:ve.symmetric.aes128,node:Wo.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha384,cipher:ve.symmetric.aes192,node:Wo.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:ve.publicKey.ecdsa,hash:ve.hash.sha512,cipher:ve.symmetric.aes256,node:Wo.brainpoolP512r1,payloadSize:64}};class Do{constructor(t,n){try{(Te.isArray(t)||Te.isUint8Array(t))&&(t=new Is(t)),t instanceof Is&&(t=t.getName()),this.name=ve.write(ve.curve,t)}catch{throw new zr("Unknown curve")}n=n||ym[this.name],this.keyType=n.keyType,this.oid=n.oid,this.hash=n.hash,this.cipher=n.cipher,this.node=n.node&&ym[this.name],this.web=n.web&&ym[this.name],this.payloadSize=n.payloadSize,this.web&&Te.getWebCrypto()?this.type="web":this.node&&Te.getNodeCrypto()?this.type="node":this.name==="curve25519"?this.type="curve25519":this.name==="ed25519"&&(this.type="ed25519")}async genKeyPair(){let t;switch(this.type){case"web":try{return await async function(r){const i=await Ky.generateKey({name:"ECDSA",namedCurve:Ys[r]},!0,["sign","verify"]),a=await Ky.exportKey("jwk",i.privateKey),l=await Ky.exportKey("jwk",i.publicKey);return{publicKey:$P(l),privateKey:co(a.d)}}(this.name)}catch(r){Te.printDebugError("Browser did not support generating ec key "+r.message);break}case"node":return async function(r){const i=ug.createECDH(Wo[r]);return await i.generateKeys(),{publicKey:new Uint8Array(i.getPublicKey()),privateKey:new Uint8Array(i.getPrivateKey())}}(this.name);case"curve25519":{const r=Gs(32);r[0]=127&r[0]|64,r[31]&=248;const i=r.slice().reverse();return t=Ks.box.keyPair.fromSecretKey(i),{publicKey:Te.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:r}}case"ed25519":{const r=Gs(32),i=Ks.sign.keyPair.fromSeed(r);return{publicKey:Te.concatUint8Array([new Uint8Array([64]),i.publicKey]),privateKey:r}}}return t=await(await Jc(this.name)).genKeyPair({entropy:Te.uint8ArrayToString(Gs(32))}),{publicKey:new Uint8Array(t.getPublic("array",!1)),privateKey:t.getPrivate().toArrayLike(Uint8Array)}}}async function IP(e,t,n,r){const i={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===ve.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},a=t.getName();if(!i[a])return!1;if(a==="curve25519"){r=r.slice().reverse();const{publicKey:c}=Ks.box.keyPair.fromSecretKey(r);n=new Uint8Array(n);const h=new Uint8Array([64,...c]);return!!Te.equalsUint8Array(h,n)}const l=await Jc(a);try{n=u_(l,n).getPublic()}catch{return!1}return!!l_(l,r).getPublic().eq(n)}function $P(e){const t=co(e.x),n=co(e.y),r=new Uint8Array(t.length+n.length+1);return r[0]=4,r.set(t,1),r.set(n,t.length+1),r}function c_(e,t,n){const r=e,i=n.slice(1,r+1),a=n.slice(r+1,2*r+1);return{kty:"EC",crv:t,x:pa(i,!0),y:pa(a,!0),ext:!0}}function RP(e,t,n,r){const i=c_(e,t,n);return i.d=pa(r,!0),i}const cg=Te.getWebCrypto(),Zc=Te.getNodeCrypto();async function dk(e,t,n,r,i,a){const l=new Do(e);if(n&&!Te.isStream(n)){const c={publicKey:r,privateKey:i};switch(l.type){case"web":try{return await async function(h,s,p,d){const v=h.payloadSize,m=RP(h.payloadSize,Ys[h.name],d.publicKey,d.privateKey),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Ys[h.name],hash:{name:ve.read(ve.webHash,h.hash)}},!1,["sign"]),y=new Uint8Array(await cg.sign({name:"ECDSA",namedCurve:Ys[h.name],hash:{name:ve.read(ve.webHash,s)}},_,p));return{r:y.slice(0,v),s:y.slice(v,v<<1)}}(l,t,n,c)}catch(h){if(l.name!=="p521"&&(h.name==="DataError"||h.name==="OperationError"))throw h;Te.printDebugError("Browser did not support signing: "+h.message)}break;case"node":{const h=await async function(s,p,d,v){const m=Zc.createSign(ve.read(ve.hash,p));m.write(d),m.end();const _=fY.encode({version:1,parameters:s.oid,privateKey:Array.from(v.privateKey),publicKey:{unused:0,data:Array.from(v.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return LP.decode(m.sign(_),"der")}(l,t,n,c);return{r:h.r.toArrayLike(Uint8Array),s:h.s.toArrayLike(Uint8Array)}}}}return async function(c,h,s){const p=await Jc(c.name),d=l_(p,s),v=d.sign(h);return{r:v.r.toArrayLike(Uint8Array),s:v.s.toArrayLike(Uint8Array)}}(l,a,i)}async function fk(e,t,n,r,i,a){const l=new Do(e);if(r&&!Te.isStream(r))switch(l.type){case"web":try{return await async function(c,h,{r:s,s:p},d,v){const m=c_(c.payloadSize,Ys[c.name],v),_=await cg.importKey("jwk",m,{name:"ECDSA",namedCurve:Ys[c.name],hash:{name:ve.read(ve.webHash,c.hash)}},!1,["verify"]),y=Te.concatUint8Array([s,p]).buffer;return cg.verify({name:"ECDSA",namedCurve:Ys[c.name],hash:{name:ve.read(ve.webHash,h)}},_,y,d)}(l,t,n,r,i)}catch(c){if(l.name!=="p521"&&(c.name==="DataError"||c.name==="OperationError"))throw c;Te.printDebugError("Browser did not support verifying: "+c.message)}break;case"node":return async function(c,h,{r:s,s:p},d,v){const{default:m}=await _n(()=>import("./bn.min.03db7fc1.js"),[]),_=Zc.createVerify(ve.read(ve.hash,h));_.write(d),_.end();const y=pY.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:c.oid},subjectPublicKey:{unused:0,data:Array.from(v)}},"pem",{label:"PUBLIC KEY"}),b=LP.encode({r:new m(s),s:new m(p)},"der");try{return _.verify(y,b)}catch{return!1}}(l,t,n,r,i)}return async function(c,h,s,p){const d=await Jc(c.name);return u_(d,p).verify(s,h)}(l,n,t===void 0?r:a,i)}const d_=void 0,LP=Zc?d_.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,fY=Zc?d_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())}):void 0,hY=Zc?d_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,pY=Zc?d_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(hY),this.key("subjectPublicKey").bitstr())}):void 0;var vY=Object.freeze({__proto__:null,sign:dk,verify:fk,validateParams:async function(e,t,n){const r=new Do(e);if(r.keyType!==ve.publicKey.ecdsa)return!1;switch(r.type){case"web":case"node":{const i=Gs(8),a=ve.hash.sha256,l=await Lc.digest(a,i);try{const c=await dk(e,a,i,t,n,l);return await fk(e,a,c,i,t,l)}catch{return!1}}default:return IP(ve.publicKey.ecdsa,e,t,n)}}});Ks.hash=e=>new Uint8Array(s_().update(e).digest());var mY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){if(Lc.getHashByteLength(t)=0;--p)for(let d=c-1;d>=0;--d)h[1]=c*p+(d+1),s[0]=a[0]^h[0],s[1]=a[1]^h[1],s[2]=l[2*d],s[3]=l[2*d+1],s=dg(n.decrypt(fg(s))),a=s.subarray(0,2),l[2*d]=s[2],l[2*d+1]=s[3];if(a[0]===r[0]&&a[1]===r[1])return fg(l);throw Error("Key Data Integrity failed")}function dg(e){const{length:t}=e,n=function(a){if(Te.isString(a)){const{length:l}=a,c=new ArrayBuffer(l),h=new Uint8Array(c);for(let s=0;s0){const n=e[t-1];if(n>=1){const r=e.subarray(t-n),i=new Uint8Array(n).fill(n);if(Te.equalsUint8Array(r,i))return e.subarray(0,t-n)}}throw Error("Invalid padding")}var _Y=Object.freeze({__proto__:null,encode:BP,decode:UP});const el=Te.getWebCrypto(),jP=Te.getNodeCrypto();function hk(e,t,n,r){return Te.concatUint8Array([t.write(),new Uint8Array([e]),n.write(),Te.stringToUint8Array("Anonymous Sender "),r.subarray(0,20)])}async function pk(e,t,n,r,i=!1,a=!1){let l;if(i){for(l=0;l=0&&t[l]===0;l--);t=t.subarray(0,l+1)}return(await Lc.digest(e,Te.concatUint8Array([new Uint8Array([0,0,0,1]),t,r]))).subarray(0,n)}async function yY(e,t){switch(e.type){case"curve25519":{const n=Gs(32),{secretKey:r,sharedKey:i}=await zP(e,t,null,n);let{publicKey:a}=Ks.box.keyPair.fromSecretKey(r);return a=Te.concatUint8Array([new Uint8Array([64]),a]),{publicKey:a,sharedKey:i}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(n,r){const i=c_(n.payloadSize,n.web.web,r);let a=el.generateKey({name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]),l=el.importKey("jwk",i,{name:"ECDH",namedCurve:n.web.web},!1,[]);[a,l]=await Promise.all([a,l]);let c=el.deriveBits({name:"ECDH",namedCurve:n.web.web,public:l},a.privateKey,n.web.sharedSize),h=el.exportKey("jwk",a.publicKey);[c,h]=await Promise.all([c,h]);const s=new Uint8Array(c);return{publicKey:new Uint8Array($P(h)),sharedKey:s}}(e,t)}catch(n){Te.printDebugError(n)}break;case"node":return async function(n,r){const i=jP.createECDH(n.node.node);i.generateKeys();const a=new Uint8Array(i.computeSecret(r));return{publicKey:new Uint8Array(i.getPublicKey()),sharedKey:a}}(e,t)}return async function(n,r){const i=await Jc(n.name),a=await n.genKeyPair();r=u_(i,r);const l=l_(i,a.privateKey),c=a.publicKey,h=l.derive(r.getPublic()),s=i.curve.p.byteLength(),p=h.toArrayLike(Uint8Array,"be",s);return{publicKey:c,sharedKey:p}}(e,t)}async function zP(e,t,n,r){if(r.length!==e.payloadSize){const i=new Uint8Array(e.payloadSize);i.set(r,e.payloadSize-r.length),r=i}switch(e.type){case"curve25519":{const i=r.slice().reverse();return{secretKey:i,sharedKey:Ks.scalarMult(i,t.subarray(1))}}case"web":if(e.web&&Te.getWebCrypto())try{return await async function(i,a,l,c){const h=RP(i.payloadSize,i.web.web,l,c);let s=el.importKey("jwk",h,{name:"ECDH",namedCurve:i.web.web},!0,["deriveKey","deriveBits"]);const p=c_(i.payloadSize,i.web.web,a);let d=el.importKey("jwk",p,{name:"ECDH",namedCurve:i.web.web},!0,[]);[s,d]=await Promise.all([s,d]);let v=el.deriveBits({name:"ECDH",namedCurve:i.web.web,public:d},s,i.web.sharedSize),m=el.exportKey("jwk",s);[v,m]=await Promise.all([v,m]);const _=new Uint8Array(v);return{secretKey:co(m.d),sharedKey:_}}(e,t,n,r)}catch(i){Te.printDebugError(i)}break;case"node":return async function(i,a,l){const c=jP.createECDH(i.node.node);c.setPrivateKey(l);const h=new Uint8Array(c.computeSecret(a));return{secretKey:new Uint8Array(c.getPrivateKey()),sharedKey:h}}(e,t,r)}return async function(i,a,l){const c=await Jc(i.name);a=u_(c,a),l=l_(c,l);const h=new Uint8Array(l.getPrivate()),s=l.derive(a.getPublic()),p=c.curve.p.byteLength(),d=s.toArrayLike(Uint8Array,"be",p);return{secretKey:h,sharedKey:d}}(e,t,r)}var bY=Object.freeze({__proto__:null,validateParams:async function(e,t,n){return IP(ve.publicKey.ecdh,e,t,n)},encrypt:async function(e,t,n,r,i){const a=BP(n),l=new Do(e),{publicKey:c,sharedKey:h}=await yY(l,r),s=hk(ve.publicKey.ecdh,e,t,i),{keySize:p}=ul(t.cipher);return{publicKey:c,wrappedKey:NP(await pk(t.hash,h,p,s),a)}},decrypt:async function(e,t,n,r,i,a,l){const c=new Do(e),{sharedKey:h}=await zP(c,n,i,a),s=hk(ve.publicKey.ecdh,e,t,l),{keySize:p}=ul(t.cipher);let d;for(let v=0;v<3;v++)try{return UP(FP(await pk(t.hash,h,p,s,v===1,v===2),r))}catch(m){d=m}throw d}}),wY=Object.freeze({__proto__:null,Curve:Do,ecdh:bY,ecdsa:vY,eddsa:mY,generate:async function(e){const t=await Te.getBigInteger();e=new Do(e);const n=await e.genKeyPair(),r=new t(n.publicKey).toUint8Array(),i=new t(n.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:r,secret:i,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return ym[ve.write(ve.curve,e.toHex())].hash}}),CY=Object.freeze({__proto__:null,sign:async function(e,t,n,r,i,a){const l=await Te.getBigInteger(),c=new l(1);let h,s,p,d;r=new l(r),i=new l(i),n=new l(n),a=new l(a),n=n.mod(r),a=a.mod(i);const v=new l(t.subarray(0,i.byteLength())).mod(i);for(;;){if(h=await Eo(c,i),s=n.modExp(h,r).imod(i),s.isZero())continue;const m=a.mul(s).imod(i);if(d=v.add(m).imod(i),p=h.modInv(i).imul(d).imod(i),!p.isZero())break}return{r:s.toUint8Array("be",i.byteLength()),s:p.toUint8Array("be",i.byteLength())}},verify:async function(e,t,n,r,i,a,l,c){const h=await Te.getBigInteger(),s=new h(0);if(t=new h(t),n=new h(n),a=new h(a),l=new h(l),i=new h(i),c=new h(c),t.lte(s)||t.gte(l)||n.lte(s)||n.gte(l))return Te.printDebug("invalid DSA Signature"),!1;const p=new h(r.subarray(0,l.byteLength())).imod(l),d=n.modInv(l);if(d.isZero())return Te.printDebug("invalid DSA Signature"),!1;i=i.mod(a),c=c.mod(a);const v=p.mul(d).imod(l),m=t.mul(d).imod(l),_=i.modExp(v,a),y=c.modExp(m,a);return _.mul(y).imod(a).imod(l).equal(t)},validateParams:async function(e,t,n,r,i){const a=await Te.getBigInteger();e=new a(e),t=new a(t),n=new a(n),r=new a(r);const l=new a(1);if(n.lte(l)||n.gte(e)||!e.dec().mod(t).isZero()||!n.modExp(t,e).isOne())return!1;const c=new a(t.bitLength()),h=new a(150);if(c.lt(h)||!await PP(t,null,32))return!1;i=new a(i);const s=new a(2),p=await Eo(s.leftShift(c.dec()),s.leftShift(c)),d=t.mul(p).add(i);return!!r.equal(n.modExp(d,e))}}),dr={rsa:lY,elgamal:uY,elliptic:wY,dsa:CY,nacl:Ks},xY=Object.freeze({__proto__:null,parseSignatureParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:return{s:Te.readMPI(t.subarray(n))};case ve.publicKey.dsa:case ve.publicKey.ecdsa:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{r,s:Te.readMPI(t.subarray(n))}}case ve.publicKey.eddsa:{let r=Te.readMPI(t.subarray(n));n+=r.length+2,r=Te.leftPad(r,32);let i=Te.readMPI(t.subarray(n));return i=Te.leftPad(i,32),{r,s:i}}default:throw new zr("Unknown signature algorithm.")}},verify:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=r,h=Te.leftPad(n.s,l.length);return dr.rsa.verify(t,i,h,l,c,a)}case ve.publicKey.dsa:{const{g:l,p:c,q:h,y:s}=r,{r:p,s:d}=n;return dr.dsa.verify(t,p,d,a,l,c,h,s)}case ve.publicKey.ecdsa:{const{oid:l,Q:c}=r,h=new dr.elliptic.Curve(l).payloadSize,s=Te.leftPad(n.r,h),p=Te.leftPad(n.s,h);return dr.elliptic.ecdsa.verify(l,t,{r:s,s:p},i,c,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=r;return dr.elliptic.eddsa.verify(l,t,n,i,c,a)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,n,r,i,a){if(!n||!r)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=n,{d:h,p:s,q:p,u:d}=r;return{s:await dr.rsa.sign(t,i,l,c,h,s,p,d,a)}}case ve.publicKey.dsa:{const{g:l,p:c,q:h}=n,{x:s}=r;return dr.dsa.sign(t,a,l,c,h,s)}case ve.publicKey.elgamal:throw Error("Signing with Elgamal is not defined in the OpenPGP standard.");case ve.publicKey.ecdsa:{const{oid:l,Q:c}=n,{d:h}=r;return dr.elliptic.ecdsa.sign(l,t,i,c,h,a)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=n,{seed:h}=r;return dr.elliptic.eddsa.sign(l,t,i,c,h,a)}default:throw Error("Unknown signature algorithm.")}}});class vk{constructor(t){t=t===void 0?new Uint8Array([]):Te.isString(t)?Te.stringToUint8Array(t):new Uint8Array(t),this.data=t}read(t){if(t.length>=1){const n=t[0];if(t.length>=1+n)return this.data=t.subarray(1,1+n),1+this.data.length}throw Error("Invalid symmetric key")}write(){return Te.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class mk{constructor(t){if(t){const{hash:n,cipher:r}=t;this.hash=n,this.cipher=r}else this.hash=null,this.cipher=null}read(t){if(t.length<4||t[0]!==3||t[1]!==1)throw Error("Cannot read KDFParams");return this.hash=t[2],this.cipher=t[3],4}write(){return new Uint8Array([3,1,this.hash,this.cipher])}}function Gy(e){try{e.getName()}catch{throw new zr("Unknown curve OID")}}var SY=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,n,r){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:{const{n:i,e:a}=t;return{c:await dr.rsa.encrypt(n,i,a)}}case ve.publicKey.elgamal:{const{p:i,g:a,y:l}=t;return dr.elgamal.encrypt(n,i,a,l)}case ve.publicKey.ecdh:{const{oid:i,Q:a,kdfParams:l}=t,{publicKey:c,wrappedKey:h}=await dr.elliptic.ecdh.encrypt(i,l,n,a,r);return{V:c,C:new vk(h)}}default:return[]}},publicKeyDecrypt:async function(e,t,n,r,i,a){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:{const{c:l}=r,{n:c,e:h}=t,{d:s,p,q:d,u:v}=n;return dr.rsa.decrypt(l,c,h,s,p,d,v,a)}case ve.publicKey.elgamal:{const{c1:l,c2:c}=r,h=t.p,s=n.x;return dr.elgamal.decrypt(l,c,h,s,a)}case ve.publicKey.ecdh:{const{oid:l,Q:c,kdfParams:h}=t,{d:s}=n,{V:p,C:d}=r;return dr.elliptic.ecdh.decrypt(l,h,p,d.data,c,s,i)}default:throw Error("Unknown public key encryption algorithm.")}},parsePublicKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{n:r,e:i}}}case ve.publicKey.dsa:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));n+=a.length+2;const l=Te.readMPI(t.subarray(n));return n+=l.length+2,{read:n,publicParams:{p:r,q:i,g:a,y:l}}}case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=Te.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{p:r,g:i,y:a}}}case ve.publicKey.ecdsa:{const r=new Is;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));return n+=i.length+2,{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.eddsa:{const r=new Is;n+=r.read(t),Gy(r);let i=Te.readMPI(t.subarray(n));return n+=i.length+2,i=Te.leftPad(i,33),{read:n,publicParams:{oid:r,Q:i}}}case ve.publicKey.ecdh:{const r=new Is;n+=r.read(t),Gy(r);const i=Te.readMPI(t.subarray(n));n+=i.length+2;const a=new mk;return n+=a.read(t.subarray(n)),{read:n,publicParams:{oid:r,Q:i,kdfParams:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parsePrivateKeyParams:function(e,t,n){let r=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const i=Te.readMPI(t.subarray(r));r+=i.length+2;const a=Te.readMPI(t.subarray(r));r+=a.length+2;const l=Te.readMPI(t.subarray(r));r+=l.length+2;const c=Te.readMPI(t.subarray(r));return r+=c.length+2,{read:r,privateParams:{d:i,p:a,q:l,u:c}}}case ve.publicKey.dsa:case ve.publicKey.elgamal:{const i=Te.readMPI(t.subarray(r));return r+=i.length+2,{read:r,privateParams:{x:i}}}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{d:a}}}case ve.publicKey.eddsa:{const i=new Do(n.oid);let a=Te.readMPI(t.subarray(r));return r+=a.length+2,a=Te.leftPad(a,i.payloadSize),{read:r,privateParams:{seed:a}}}default:throw new zr("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:return{c:Te.readMPI(t.subarray(n))};case ve.publicKey.elgamal:{const r=Te.readMPI(t.subarray(n));return n+=r.length+2,{c1:r,c2:Te.readMPI(t.subarray(n))}}case ve.publicKey.ecdh:{const r=Te.readMPI(t.subarray(n));n+=r.length+2;const i=new vk;return i.read(t.subarray(n)),{V:r,C:i}}default:throw new zr("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const n=Object.keys(t).map(r=>{const i=t[r];return Te.isUint8Array(i)?Te.uint8ArrayToMPI(i):i.write()});return Te.concatUint8Array(n)},generateParams:function(e,t,n){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:return dr.rsa.generate(t,65537).then(({n:r,e:i,d:a,p:l,q:c,u:h})=>({privateParams:{d:a,p:l,q:c,u:h},publicParams:{n:r,e:i}}));case ve.publicKey.ecdsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{d:a},publicParams:{oid:new Is(r),Q:i}}));case ve.publicKey.eddsa:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a})=>({privateParams:{seed:a},publicParams:{oid:new Is(r),Q:i}}));case ve.publicKey.ecdh:return dr.elliptic.generate(n).then(({oid:r,Q:i,secret:a,hash:l,cipher:c})=>({privateParams:{d:a},publicParams:{oid:new Is(r),Q:i,kdfParams:new mk({hash:l,cipher:c})}}));case ve.publicKey.dsa:case ve.publicKey.elgamal:throw Error("Unsupported algorithm for key generation.");default:throw Error("Unknown public key algorithm.")}},validateParams:async function(e,t,n){if(!t||!n)throw Error("Missing key parameters");switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:{const{n:r,e:i}=t,{d:a,p:l,q:c,u:h}=n;return dr.rsa.validateParams(r,i,a,l,c,h)}case ve.publicKey.dsa:{const{p:r,q:i,g:a,y:l}=t,{x:c}=n;return dr.dsa.validateParams(r,i,a,l,c)}case ve.publicKey.elgamal:{const{p:r,g:i,y:a}=t,{x:l}=n;return dr.elgamal.validateParams(r,i,a,l)}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const r=dr.elliptic[ve.read(ve.publicKey,e)],{oid:i,Q:a}=t,{d:l}=n;return r.validateParams(i,a,l)}case ve.publicKey.eddsa:{const{oid:r,Q:i}=t,{seed:a}=n;return dr.elliptic.eddsa.validateParams(r,i,a)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=ul(e),n=await Gs(t),r=new Uint8Array([n[n.length-2],n[n.length-1]]);return Te.concat([n,r])},generateSessionKey:function(e){const{keySize:t}=ul(e);return Gs(t)},getAEADMode:function(e){const t=ve.read(ve.aead,e);return OP[t]},getCipher:ul});const Kt={cipher:sh,hash:Lc,mode:OP,publicKey:dr,signature:xY,random:aY,pkcs1:oY,pkcs5:_Y,aesKW:gY};Object.assign(Kt,SY);var lh=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function VP(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const WP={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(let a=0;a=0;)e[t]=0}const PY=0,JP=1,TY=2,O2=29,uh=256,Ff=uh+1+O2,kc=30,P2=19,bk=2*Ff+1,eu=15,Yy=16,AY=7,T2=256,ZP=16,QP=17,qP=18,Ab=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],bm=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],MY=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],wk=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],uo=Array(2*(Ff+2));Qc(uo);const bf=Array(2*kc);Qc(bf);const Bf=Array(512);Qc(Bf);const Uf=Array(256);Qc(Uf);const A2=Array(O2);Qc(A2);const pg=Array(kc);function Xy(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let Ck,xk,Sk;function Jy(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function eT(e){return e<256?Bf[e]:Bf[256+(e>>>7)]}function jf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Hi(e,t,n){e.bi_valid>Yy-n?(e.bi_buf|=t<>Yy-e.bi_valid,e.bi_valid+=n-Yy):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function nT(e,t,n){const r=Array(eu+1);let i,a,l=0;for(i=1;i<=eu;i++)r[i]=l=l+n[i-1]<<1;for(a=0;a<=t;a++){const c=e[2*a+1];c!==0&&(e[2*a]=tT(r[c]++,c))}}function rT(e){let t;for(t=0;t8?jf(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ek(e,t,n,r){const i=2*t,a=2*n;return e[i]>1;l>=1;l--)Zy(e,n,l);h=a;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Zy(e,n,1),c=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=c,n[2*h]=n[2*l]+n[2*c],e.depth[h]=(e.depth[l]>=e.depth[c]?e.depth[l]:e.depth[c])+1,n[2*l+1]=n[2*c+1]=h,e.heap[1]=h++,Zy(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(p,d){const v=d.dyn_tree,m=d.max_code,_=d.stat_desc.static_tree,y=d.stat_desc.has_stree,b=d.stat_desc.extra_bits,E=d.stat_desc.extra_base,k=d.stat_desc.max_length;let C,x,D,P,w,M,T=0;for(P=0;P<=eu;P++)p.bl_count[P]=0;for(v[2*p.heap[p.heap_max]+1]=0,C=p.heap_max+1;Ck&&(P=k,T++),v[2*x+1]=P,x>m||(p.bl_count[P]++,w=0,x>=E&&(w=b[x-E]),M=v[2*x],p.opt_len+=M*(P+w),y&&(p.static_len+=M*(_[2*x+1]+w)));if(T!==0){do{for(P=k-1;p.bl_count[P]===0;)P--;p.bl_count[P]--,p.bl_count[P+1]+=2,p.bl_count[k]--,T-=2}while(T>0);for(P=k;P!==0;P--)for(x=p.bl_count[P];x!==0;)D=p.heap[--C],D>m||(v[2*D+1]!==P&&(p.opt_len+=(P-v[2*D+1])*v[2*D],v[2*D+1]=P),x--)}}(e,t),nT(n,s,e.bl_count)}function kk(e,t,n){let r,i,a=-1,l=t[1],c=0,h=7,s=4;for(l===0&&(h=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=l,l=t[2*(r+1)+1],++c>=7;i=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function RY(e,t,n,r){let i,a,l=0;e.level>0?(e.strm.data_type===XP&&(e.strm.data_type=function(c){let h,s=4093624447;for(h=0;h<=31;h++,s>>>=1)if(1&s&&c.dyn_ltree[2*h]!==0)return _k;if(c.dyn_ltree[18]!==0||c.dyn_ltree[20]!==0||c.dyn_ltree[26]!==0)return yk;for(h=32;h=3&&c.bl_tree[2*wk[h]+1]===0;h--);return c.opt_len+=3*(h+1)+5+5+4,h}(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?aT(e,t,n,r):e.strategy===YP||a===i?(Hi(e,(JP<<1)+(r?1:0),3),Dk(e,uo,bf)):(Hi(e,(TY<<1)+(r?1:0),3),function(c,h,s,p){let d;for(Hi(c,h-257,5),Hi(c,s-1,5),Hi(c,p-4,4),d=0;d>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Uf[n]+uh+1)]++,e.dyn_dtree[2*eT(t)]++),e.last_lit===e.lit_bufsize-1}function zf(e,t,n,r){let i=65535&e|0,a=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,a=a+i|0;while(--l);i%=65521,a%=65521}return i|a<<16|0}const LY=function(){let e;const t=[];for(let n=0;n<256;n++){e=n;for(let r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Kr(e,t,n,r){const i=LY,a=r+n;e^=-1;for(let l=r;l>>8^i[255&(e^t[l])];return-1^e}var Vf={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const NY=9,Bn=3,tl=258,rs=tl+Bn+1,FY=32,vg=42,Mb=69,wm=73,Cm=91,xm=103,tu=113,ef=666,Gr=1,wf=2,nu=3,Oc=4,BY=3;function nl(e,t){return e.msg=Vf[t],t}function Tk(e){return(e<<1)-(e>4?9:0)}function Jo(e){let t=e.length;for(;--t>=0;)e[t]=0}function Ho(e){const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Xs(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function oi(e,t){RY(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ho(e.strm)}function zn(e,t){e.pending_buf[e.pending++]=t}function Rd(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function UY(e,t,n,r){let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Xs(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=zf(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Kr(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function sT(e,t){let n,r,i=e.max_chain_length,a=e.strstart,l=e.prev_length,c=e.nice_match;const h=e.strstart>e.w_size-rs?e.strstart-(e.w_size-rs):0,s=e.window,p=e.w_mask,d=e.prev,v=e.strstart+tl;let m=s[a+l-1],_=s[a+l];e.prev_length>=e.good_match&&(i>>=2),c>e.lookahead&&(c=e.lookahead);do if(n=t,s[n+l]===_&&s[n+l-1]===m&&s[n]===s[a]&&s[++n]===s[a+1]){a+=2,n++;do;while(s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&s[++a]===s[++n]&&al){if(e.match_start=t,l=r,r>=c)break;m=s[a+l-1],_=s[a+l]}}while((t=d[t&p])>h&&--i!=0);return l<=e.lookahead?l:e.lookahead}function yu(e){const t=e.w_size;let n,r,i,a,l;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-rs)){Xs(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=UY(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=Bn)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=Bn&&(e.ins_h=(e.ins_h<=Bn)if(r=cl(e,e.strstart-e.match_start,e.match_length-Bn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Bn){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=Bn&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=Bn-1)),e.prev_length>=Bn&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Bn,r=cl(e,e.strstart-1-e.prev_match,e.prev_length-Bn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(yu(e),e.lookahead===0&&t===Js)return Gr;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,oi(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-rs&&(oi(e,!1),e.strm.avail_out===0))return Gr}return e.insert=0,t===Xr?(oi(e,!0),e.strm.avail_out===0?nu:Oc):(e.strstart>e.block_start&&(oi(e,!1),e.strm.avail_out),Gr)}),new Ss(4,4,8,4,qy),new Ss(4,5,16,8,qy),new Ss(4,6,32,32,qy),new Ss(4,4,16,16,ic),new Ss(8,16,32,32,ic),new Ss(8,16,128,128,ic),new Ss(8,32,128,256,ic),new Ss(32,128,258,1024,ic),new Ss(32,258,258,4096,ic)];class jY{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Nc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ia(1146),this.dyn_dtree=new Ia(122),this.bl_tree=new Ia(78),Jo(this.dyn_ltree),Jo(this.dyn_dtree),Jo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ia(16),this.heap=new Ia(573),Jo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ia(573),Jo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}}function zY(e){const t=function(n){let r;return n&&n.state?(n.total_in=n.total_out=0,n.data_type=XP,r=n.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?vg:tu,n.adler=r.wrap===2?0:1,r.last_flush=Js,IY(r),Xn):nl(n,Fr)}(e);return t===Xn&&function(n){n.window_size=2*n.w_size,Jo(n.head),n.max_lazy_match=tf[n.level].max_lazy,n.good_match=tf[n.level].good_length,n.nice_match=tf[n.level].nice_length,n.max_chain_length=tf[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=Bn-1,n.match_available=0,n.ins_h=0}(e.state),t}function VY(e,t){let n,r,i,a;if(!e||!e.state||t>Tb||t<0)return e?nl(e,Fr):Fr;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===ef&&t!==Xr)return nl(e,e.avail_out===0?yf:Fr);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===vg)if(r.wrap===2)e.adler=0,zn(r,31),zn(r,139),zn(r,8),r.gzhead?(zn(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),zn(r,255&r.gzhead.time),zn(r,r.gzhead.time>>8&255),zn(r,r.gzhead.time>>16&255),zn(r,r.gzhead.time>>24&255),zn(r,r.level===9?2:r.strategy>=Nv||r.level<2?4:0),zn(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(zn(r,255&r.gzhead.extra.length),zn(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Kr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Mb):(zn(r,0),zn(r,0),zn(r,0),zn(r,0),zn(r,0),zn(r,r.level===9?2:r.strategy>=Nv||r.level<2?4:0),zn(r,BY),r.status=tu);else{let c=Nc+(r.w_bits-8<<4)<<8,h=-1;h=r.strategy>=Nv||r.level<2?0:r.level<6?1:r.level===6?2:3,c|=h<<6,r.strstart!==0&&(c|=FY),c+=31-c%31,r.status=tu,Rd(r,c),r.strstart!==0&&(Rd(r,e.adler>>>16),Rd(r,65535&e.adler)),e.adler=1}if(r.status===Mb)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ho(e),i=r.pending,r.pending!==r.pending_buf_size));)zn(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=wm)}else r.status=wm;if(r.status===wm)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ho(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindexi&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=Cm)}else r.status=Cm;if(r.status===Cm)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),Ho(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindexi&&(e.adler=Kr(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=xm)}else r.status=xm;if(r.status===xm&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ho(e),r.pending+2<=r.pending_buf_size&&(zn(r,255&e.adler),zn(r,e.adler>>8&255),e.adler=0,r.status=tu)):r.status=tu),r.pending!==0){if(Ho(e),e.avail_out===0)return r.last_flush=-1,Xn}else if(e.avail_in===0&&Tk(t)<=Tk(n)&&t!==Xr)return nl(e,yf);if(r.status===ef&&e.avail_in!==0)return nl(e,yf);if(e.avail_in!==0||r.lookahead!==0||t!==Js&&r.status!==ef){var l=r.strategy===Nv?function(c,h){let s;for(;;){if(c.lookahead===0&&(yu(c),c.lookahead===0)){if(h===Js)return Gr;break}if(c.match_length=0,s=cl(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++,s&&(oi(c,!1),c.strm.avail_out===0))return Gr}return c.insert=0,h===Xr?(oi(c,!0),c.strm.avail_out===0?nu:Oc):c.last_lit&&(oi(c,!1),c.strm.avail_out===0)?Gr:wf}(r,t):r.strategy===OY?function(c,h){let s,p,d,v;const m=c.window;for(;;){if(c.lookahead<=tl){if(yu(c),c.lookahead<=tl&&h===Js)return Gr;if(c.lookahead===0)break}if(c.match_length=0,c.lookahead>=Bn&&c.strstart>0&&(d=c.strstart-1,p=m[d],p===m[++d]&&p===m[++d]&&p===m[++d])){v=c.strstart+tl;do;while(p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&p===m[++d]&&dc.lookahead&&(c.match_length=c.lookahead)}if(c.match_length>=Bn?(s=cl(c,1,c.match_length-Bn),c.lookahead-=c.match_length,c.strstart+=c.match_length,c.match_length=0):(s=cl(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++),s&&(oi(c,!1),c.strm.avail_out===0))return Gr}return c.insert=0,h===Xr?(oi(c,!0),c.strm.avail_out===0?nu:Oc):c.last_lit&&(oi(c,!1),c.strm.avail_out===0)?Gr:wf}(r,t):tf[r.level].func(r,t);if(l!==nu&&l!==Oc||(r.status=ef),l===Gr||l===nu)return e.avail_out===0&&(r.last_flush=-1),Xn;if(l===wf&&(t===EY?$Y(r):t!==Tb&&(aT(r,0,0,!1),t===DY&&(Jo(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Ho(e),e.avail_out===0))return r.last_flush=-1,Xn}return t!==Xr?Xn:r.wrap<=0?_o:(r.wrap===2?(zn(r,255&e.adler),zn(r,e.adler>>8&255),zn(r,e.adler>>16&255),zn(r,e.adler>>24&255),zn(r,255&e.total_in),zn(r,e.total_in>>8&255),zn(r,e.total_in>>16&255),zn(r,e.total_in>>24&255)):(Rd(r,e.adler>>>16),Rd(r,65535&e.adler)),Ho(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Xn:_o)}try{String.fromCharCode.call(null,0)}catch{}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const Ib=new Vs(256);for(let e=0;e<256;e++)Ib[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;function $b(e){let t,n,r,i,a=0;const l=e.length;for(r=0;r>>6,c[i++]=128|63&t):t<65536?(c[i++]=224|t>>>12,c[i++]=128|t>>>6&63,c[i++]=128|63&t):(c[i++]=240|t>>>18,c[i++]=128|t>>>12&63,c[i++]=128|t>>>6&63,c[i++]=128|63&t);return c}Ib[254]=Ib[254]=1;class oT{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}class Rb{constructor(t){this.options={level:gk,method:Nc,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,...t||{}};const n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new oT,this.strm.avail_out=0;var r,i,a=function(l,c,h,s,p,d){if(!l)return Fr;let v=1;if(c===gk&&(c=6),s<0?(v=0,s=-s):s>15&&(v=2,s-=16),p<1||p>NY||h!==Nc||s<8||s>15||c<0||c>9||d<0||d>YP)return nl(l,Fr);s===8&&(s=9);const m=new jY;return l.state=m,m.strm=l,m.wrap=v,m.gzhead=null,m.w_bits=s,m.w_size=1<=s.w_size&&(v===0&&(Jo(s.head),s.strstart=0,s.block_start=0,s.insert=0),b=new Vs(s.w_size),Xs(b,h,E-s.w_size,s.w_size,0),h=b,E=s.w_size),m=c.avail_in,_=c.next_in,y=c.input,c.avail_in=E,c.next_in=0,c.input=h,yu(s);s.lookahead>=Bn;){p=s.strstart,d=s.lookahead-(Bn-1);do s.ins_h=(s.ins_h<0||r.avail_out===0)&&a!==_o);return l===Xr?(a=function(c){let h;return c&&c.state?(h=c.state.status,h!==vg&&h!==Mb&&h!==wm&&h!==Cm&&h!==xm&&h!==tu&&h!==ef?nl(c,Fr):(c.state=null,h===tu?nl(c,k2):Xn)):Fr}(this.strm),this.onEnd(a),this.ended=!0,a===Xn):l!==Nf||(this.onEnd(Xn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Xn&&(this.result=KP(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}const Fv=30,WY=12;function HY(e,t){let n,r,i,a,l,c,h,s,p,d;const v=e.state;n=e.next_in;const m=e.input,_=n+(e.avail_in-5);r=e.next_out;const y=e.output,b=r-(t-e.avail_out),E=r+(e.avail_out-257),k=v.dmax,C=v.wsize,x=v.whave,D=v.wnext,P=v.window;i=v.hold,a=v.bits;const w=v.lencode,M=v.distcode,T=(1<>>24,i>>>=c,a-=c,c=l>>>16&255,c===0)y[r++]=65535&l;else{if(!(16&c)){if((64&c)==0){l=w[(65535&l)+(i&(1<>>=c,a-=c),a<15&&(i+=m[n++]<>>24,i>>>=c,a-=c,c=l>>>16&255,!(16&c)){if((64&c)==0){l=M[(65535&l)+(i&(1<k){e.msg="invalid distance too far back",v.mode=Fv;break e}if(i>>>=c,a-=c,c=r-b,s>c){if(c=s-c,c>x&&v.sane){e.msg="invalid distance too far back",v.mode=Fv;break e}if(p=0,d=P,D===0){if(p+=C-c,c2;)y[r++]=d[p++],y[r++]=d[p++],y[r++]=d[p++],h-=3;h&&(y[r++]=d[p++],h>1&&(y[r++]=d[p++]))}else{p=r-s;do y[r++]=y[p++],y[r++]=y[p++],y[r++]=y[p++],h-=3;while(h>2);h&&(y[r++]=y[p++],h>1&&(y[r++]=y[p++]))}break}}break}}while(n<_&&r>3,n-=h,a-=h<<3,i&=(1<=1&&R[E]===0;E--);if(k>E&&(k=E),E===0)return i[a++]=20971520,i[a++]=20971520,c.bits=1,0;for(b=1;b0&&(e===Ik||E!==1))return-1;for(K[1]=0,_=1;_Ak||e===$k&&P>Mk)return 1;for(;;){N=_-x,l[y]m?(z=oe[Pe+l[y]],U=M[T+l[y]]):(z=96,U=0),s=1<<_-x,p=1<>x)+p]=N<<24|z<<16|U|0;while(p!==0);for(s=1<<_-1;w&s;)s>>=1;if(s!==0?(w&=s-1,w+=s):w=0,y++,--R[_]==0){if(_===E)break;_=t[n+l[y]]}if(_>k&&(w&he)!==d){for(x===0&&(x=k),v+=b,C=_-x,D=1<Ak||e===$k&&P>Mk)return 1;d=w&he,i[d]=k<<24|C<<16|v-a|0}}return w!==0&&(i[v+w]=_-x<<24|64<<16|0),c.bits=k,0}const JY=0,lT=1,uT=2,cT=1,Rk=2,Lk=3,Nk=4,Fk=5,Bk=6,Uk=7,jk=8,zk=9,Vk=10,mg=11,so=12,t0=13,Wk=14,n0=15,Hk=16,Kk=17,Gk=18,Yk=19,Bv=20,Uv=21,Xk=22,Jk=23,Zk=24,Qk=25,qk=26,r0=27,e4=28,t4=29,gr=30,ZY=852,QY=592;function n4(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}class qY{constructor(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ia(320),this.work=new Ia(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function eX(e){let t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,function(n){let r;return n&&n.state?(r=n.state,n.total_in=n.total_out=r.total=0,n.msg="",r.wrap&&(n.adler=1&r.wrap),r.mode=cT,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new hg(ZY),r.distcode=r.distdyn=new hg(QY),r.sane=1,r.back=-1,Xn):Fr}(e)):Fr}function tX(e,t){let n,r;return e?(r=new qY,e.state=r,r.window=null,n=function(i,a){let l,c;return i&&i.state?(c=i.state,a<0?(l=0,a=-a):(l=1+(a>>4),a<48&&(a&=15)),a&&(a<8||a>15)?Fr:(c.window!==null&&c.wbits!==a&&(c.window=null),c.wrap=l,c.wbits=a,eX(i))):Fr}(e,t),n!==Xn&&(e.state=null),n):Fr}let i0,a0,r4=!0;function nX(e){if(r4){let t;for(i0=new hg(512),a0=new hg(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Cf(lT,e.lens,0,288,i0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Cf(uT,e.lens,0,32,a0,0,e.work,{bits:5}),r4=!1}e.lencode=i0,e.lenbits=9,e.distcode=a0,e.distbits=5}function dT(e,t,n,r){let i;const a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(Xs(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),Xs(a.window,t,n-r,i,a.wnext),(r-=i)?(Xs(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=Kr(n.check,K,2,0),s=0,p=0,n.mode=Rk;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&s)<<8)+(s>>8))%31){e.msg="incorrect header check",n.mode=gr;break}if((15&s)!==Nc){e.msg="unknown compression method",n.mode=gr;break}if(s>>>=4,p-=4,P=8+(15&s),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=gr;break}n.dmax=1<>8&1),512&n.flags&&(K[0]=255&s,K[1]=s>>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0,n.mode=Lk;case Lk:for(;p<32;){if(c===0)break e;c--,s+=r[a++]<>>8&255,K[2]=s>>>16&255,K[3]=s>>>24&255,n.check=Kr(n.check,K,4,0)),s=0,p=0,n.mode=Nk;case Nk:for(;p<16;){if(c===0)break e;c--,s+=r[a++]<>8),512&n.flags&&(K[0]=255&s,K[1]=s>>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0,n.mode=Fk;case Fk:if(1024&n.flags){for(;p<16;){if(c===0)break e;c--,s+=r[a++]<>>8&255,n.check=Kr(n.check,K,2,0)),s=0,p=0}else n.head&&(n.head.extra=null);n.mode=Bk;case Bk:if(1024&n.flags&&(m=n.length,m>c&&(m=c),m&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),Xs(n.head.extra,r,a,m,P)),512&n.flags&&(n.check=Kr(n.check,r,m,a)),c-=m,a+=m,n.length-=m),n.length))break e;n.length=0,n.mode=Uk;case Uk:if(2048&n.flags){if(c===0)break e;m=0;do P=r[a+m++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=so;break;case Vk:for(;p<32;){if(c===0)break e;c--,s+=r[a++]<>>=7&p,p-=7&p,n.mode=r0;break}for(;p<3;){if(c===0)break e;c--,s+=r[a++]<>>=1,p-=1,3&s){case 0:n.mode=Wk;break;case 1:if(nX(n),n.mode=Bv,t===Lv){s>>>=2,p-=2;break e}break;case 2:n.mode=Kk;break;case 3:e.msg="invalid block type",n.mode=gr}s>>>=2,p-=2;break;case Wk:for(s>>>=7&p,p-=7&p;p<32;){if(c===0)break e;c--,s+=r[a++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=gr;break}if(n.length=65535&s,s=0,p=0,n.mode=n0,t===Lv)break e;case n0:n.mode=Hk;case Hk:if(m=n.length,m){if(m>c&&(m=c),m>h&&(m=h),m===0)break e;Xs(i,r,a,m,l),c-=m,a+=m,h-=m,l+=m,n.length-=m;break}n.mode=so;break;case Kk:for(;p<14;){if(c===0)break e;c--,s+=r[a++]<>>=5,p-=5,n.ndist=1+(31&s),s>>>=5,p-=5,n.ncode=4+(15&s),s>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=gr;break}n.have=0,n.mode=Gk;case Gk:for(;n.have>>=3,p-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},w=Cf(JY,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,w){e.msg="invalid code lengths set",n.mode=gr;break}n.have=0,n.mode=Yk;case Yk:for(;n.have>>24,E=R>>>16&255,k=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]<>>=b,p-=b,n.lens[n.have++]=k;else{if(k===16){for(T=b+2;p>>=b,p-=b,n.have===0){e.msg="invalid bit length repeat",n.mode=gr;break}P=n.lens[n.have-1],m=3+(3&s),s>>>=2,p-=2}else if(k===17){for(T=b+3;p>>=b,p-=b,P=0,m=3+(7&s),s>>>=3,p-=3}else{for(T=b+7;p>>=b,p-=b,P=0,m=11+(127&s),s>>>=7,p-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=gr;break}for(;m--;)n.lens[n.have++]=P}}if(n.mode===gr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=gr;break}if(n.lenbits=9,M={bits:n.lenbits},w=Cf(lT,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,w){e.msg="invalid literal/lengths set",n.mode=gr;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},w=Cf(uT,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,w){e.msg="invalid distances set",n.mode=gr;break}if(n.mode=Bv,t===Lv)break e;case Bv:n.mode=Uv;case Uv:if(c>=6&&h>=258){e.next_out=l,e.avail_out=h,e.next_in=a,e.avail_in=c,n.hold=s,n.bits=p,HY(e,v),l=e.next_out,i=e.output,h=e.avail_out,a=e.next_in,r=e.input,c=e.avail_in,s=n.hold,p=n.bits,n.mode===so&&(n.back=-1);break}for(n.back=0;R=n.lencode[s&(1<>>24,E=R>>>16&255,k=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]<>C)],b=R>>>24,E=R>>>16&255,k=65535&R,!(C+b<=p);){if(c===0)break e;c--,s+=r[a++]<>>=C,p-=C,n.back+=C}if(s>>>=b,p-=b,n.back+=b,n.length=k,E===0){n.mode=qk;break}if(32&E){n.back=-1,n.mode=so;break}if(64&E){e.msg="invalid literal/length code",n.mode=gr;break}n.extra=15&E,n.mode=Xk;case Xk:if(n.extra){for(T=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Jk;case Jk:for(;R=n.distcode[s&(1<>>24,E=R>>>16&255,k=65535&R,!(b<=p);){if(c===0)break e;c--,s+=r[a++]<>C)],b=R>>>24,E=R>>>16&255,k=65535&R,!(C+b<=p);){if(c===0)break e;c--,s+=r[a++]<>>=C,p-=C,n.back+=C}if(s>>>=b,p-=b,n.back+=b,64&E){e.msg="invalid distance code",n.mode=gr;break}n.offset=k,n.extra=15&E,n.mode=Zk;case Zk:if(n.extra){for(T=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=gr;break}n.mode=Qk;case Qk:if(h===0)break e;if(m=v-h,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=gr;break}m>n.wnext?(m-=n.wnext,_=n.wsize-m):_=n.wnext-m,m>n.length&&(m=n.length),y=n.window}else y=i,_=l-n.offset,m=n.length;m>h&&(m=h),h-=m,n.length-=m;do i[l++]=y[_++];while(--m);n.length===0&&(n.mode=Uv);break;case qk:if(h===0)break e;i[l++]=n.length,h--,n.mode=Uv;break;case r0:if(n.wrap){for(;p<32;){if(c===0)break e;c--,s|=r[a++]<=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),!(n.windowBits>=0&&n.windowBits<16)||t&&t.windowBits||(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(15&n.windowBits)==0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new oT,this.strm.avail_out=0;let r=tX(this.strm,n.windowBits);if(r!==Xn||(this.header=new iX,function(i,a){let l;i&&i.state&&(l=i.state,(2&l.wrap)==0||(l.head=a,a.done=!1))}(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=$b(n.dictionary):n.dictionary instanceof ArrayBuffer&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(r=i4(this.strm,n.dictionary),r!==Xn))))throw Error(Vf[r])}push(t,n){const{strm:r,options:{chunkSize:i,dictionary:a}}=this;let l,c,h=!1;if(this.ended)return!1;c=n===~~n?n:n===!0?Xr:Js,typeof t=="string"?r.input=function(s){const p=new Vs(s.length);for(let d=0,v=p.length;d0||r.avail_out===0)&&l!==_o);return l===_o&&(c=Xr),c===Xr?(l=function(s){if(!s||!s.state)return Fr;const p=s.state;return p.window&&(p.window=null),s.state=null,Xn}(this.strm),this.onEnd(l),this.ended=!0,l===Xn):c!==Nf||(this.onEnd(Xn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Xn&&(this.result=KP(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}var s4=[0,1,3,7,15,31,63,127,255],nf=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};nf.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},nf.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var n=8-this.bitOffset;if(e>=n)t<<=n,t|=s4[n]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=n;else{t<<=e;var r=n-e;t|=(this.curByte&s4[e]<>r,this.bitOffset+=e,e=0}}return t},nf.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},nf.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+r.toString(16)).slice(-2)).join("")}(t)};var aX=nf,Hl=function(){};Hl.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Hl.prototype.read=function(e,t,n){for(var r=0;r>>0},this.updateCRC=function(t){e=e<<8^s0[255&(e>>>24^t)]},this.updateCRCRun=function(t,n){for(;n-- >0;)e=e<<8^s0[255&(e>>>24^t)]}}),o4=function(e,t){var n,r=e[t];for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},_r={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Ko={};Ko[_r.LAST_BLOCK]="Bad file checksum",Ko[_r.NOT_BZIP_DATA]="Not bzip data",Ko[_r.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Ko[_r.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Ko[_r.DATA_ERROR]="Data error",Ko[_r.OUT_OF_MEMORY]="Out of memory",Ko[_r.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var ri=function(e,t){var n=Ko[e]||"unknown error";t&&(n+=": "+t);var r=new TypeError(n);throw r.errorCode=e,r},rf=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};rf.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new sX,!0):(this.writeCount=-1,!1)},rf.prototype._start_bunzip=function(e,t){var n=new Uint8Array(4);e.read(n,0,4)===4&&String.fromCharCode(n[0],n[1],n[2])==="BZh"||ri(_r.NOT_BZIP_DATA,"bad magic");var r=n[3]-48;(r<1||r>9)&&ri(_r.NOT_BZIP_DATA,"level out of range"),this.reader=new aX(e),this.dbufSize=1e5*r,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},rf.prototype._get_next_block=function(){var e,t,n,r=this.reader,i=r.pi();if(i==="177245385090")return!1;i!=="314159265359"&&ri(_r.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&ri(_r.OBSOLETE_INPUT);var a=r.read(24);a>this.dbufSize&&ri(_r.DATA_ERROR,"initial position out of bounds");var l=r.read(16),c=new Uint8Array(256),h=0;for(e=0;e<16;e++)if(l&1<<15-e){var s=16*e;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(c[h++]=s+t)}var p=r.read(3);(p<2||p>6)&&ri(_r.DATA_ERROR);var d=r.read(15);d===0&&ri(_r.DATA_ERROR);var v=new Uint8Array(256);for(e=0;e=p&&ri(_r.DATA_ERROR);m[e]=o4(v,t)}var _,y=h+2,b=[];for(t=0;t20)&&ri(_r.DATA_ERROR),r.read(1);)r.read(1)?l--:l++;C[e]=l}for(E=k=C[0],e=1;ek?k=C[e]:C[e]=d&&ri(_r.DATA_ERROR),_=b[m[R++]]),e=_.minLen,t=r.read(e);e>_.maxLen&&ri(_r.DATA_ERROR),!(t<=_.limit[e]);e++)t=t<<1|r.read(1);((t-=_.base[e])<0||t>=258)&&ri(_r.DATA_ERROR);var N=_.permute[t];if(N!==0&&N!==1){if(M)for(M=0,T+l>this.dbufSize&&ri(_r.DATA_ERROR),P[w=c[v[0]]]+=l;l--;)K[T++]=w;if(N>h)break;T>=this.dbufSize&&ri(_r.DATA_ERROR),P[w=c[w=o4(v,e=N-1)]]++,K[T++]=w}else M||(M=1,l=0),l+=N===0?M:2*M,M<<=1}for((a<0||a>=T)&&ri(_r.DATA_ERROR),t=0,e=0;e<256;e++)n=t+P[e],P[e]=t,t=n;for(e=0;e>=8,oe=-1),this.writePos=z,this.writeCurrent=U,this.writeCount=T,this.writeRun=oe,!0},rf.prototype._read_bunzip=function(e,t){var n,r,i;if(this.writeCount<0)return 0;var a=this.dbuf,l=this.writePos,c=this.writeCurrent,h=this.writeCount;this.outputsize;for(var s=this.writeRun;h;){for(h--,r=c,c=255&(l=a[l]),l>>=8,s++==3?(n=c,i=r,c=-1):(n=1,i=c),this.blockCRC.updateCRCRun(i,n);n--;)this.outputStream.writeByte(i),this.nextoutput++;c!=r&&(s=0)}return this.writeCount=h,this.blockCRC.getCRC()!==this.targetBlockCRC&&ri(_r.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var oX=function(e){if("readByte"in e)return e;var t=new fT;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(n){this.pos=n},t.eof=function(){return this.pos>=e.length},t},lX=function(e){var t=new fT,n=!0;if(e)if(typeof e=="number")t.buffer=new Uint8Array(e),n=!1;else{if("writeByte"in e)return e;t.buffer=e,n=!1}else t.buffer=new Uint8Array(16384);return t.pos=0,t.writeByte=function(r){if(n&&this.pos>=this.buffer.length){var i=new Uint8Array(2*this.buffer.length);i.set(this.buffer),this.buffer=i}this.buffer[this.pos++]=r},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!n)throw new TypeError("outputsize does not match decoded input");var r=new Uint8Array(this.pos);r.set(this.buffer.subarray(0,this.pos)),this.buffer=r}return this.buffer},t._coerced=!0,t},l4=function(e,t,n){for(var r=oX(e),i=lX(t),a=new rf(r,i);!("eof"in r)||!r.eof();)if(a._init_block())a._read_bunzip();else{var l=a.reader.read(32)>>>0;if(l!==a.streamCRC&&ri(_r.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+l.toString(16)+")"),!n||!("eof"in r)||r.eof())break;a._start_bunzip(r,i)}if("getBuffer"in i)return i.getBuffer()};class qc{static get tag(){return ve.packet.literalData}constructor(t=new Date){this.format=ve.literal.utf8,this.date=Te.normalizeDate(t),this.text=null,this.data=null,this.filename=""}setText(t,n=ve.literal.utf8){this.format=n,this.text=t,this.data=null}getText(t=!1){return(this.text===null||Te.isStream(this.text))&&(this.text=Te.decodeUTF8(Te.nativeEOL(this.getBytes(t)))),this.text}setBytes(t,n){this.format=n,this.data=t,this.text=null}getBytes(t=!1){return this.data===null&&(this.data=Te.canonicalizeEOL(Te.encodeUTF8(this.text))),t?Sc(this.data):this.data}setFilename(t){this.filename=t}getFilename(){return this.filename}async read(t){await r_(t,async n=>{const r=await n.readByte(),i=await n.readByte();this.filename=Te.decodeUTF8(await n.readBytes(i)),this.date=Te.readDate(await n.readBytes(4));let a=n.remainder();Ar(a)&&(a=await Ir(a)),this.setBytes(a,r)})}writeHeader(){const t=Te.encodeUTF8(this.filename),n=new Uint8Array([t.length]),r=new Uint8Array([this.format]),i=Te.writeDate(this.date);return Te.concatUint8Array([r,n,t,i])}write(){const t=this.writeHeader(),n=this.getBytes();return Te.concat([t,n])}}const Ld=Symbol("verified"),uX=new Set([ve.signatureSubpacket.issuer,ve.signatureSubpacket.issuerFingerprint,ve.signatureSubpacket.embeddedSignature]);class di{static get tag(){return ve.packet.signature}constructor(){this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=null,this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyID=new vl,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserID=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAEADAlgorithms=null,this.revoked=null,this[Ld]=null}read(t){let n=0;if(this.version=t[n++],this.version!==4&&this.version!==5)throw new zr(`Version ${this.version} of the signature packet is unsupported.`);if(this.signatureType=t[n++],this.publicKeyAlgorithm=t[n++],this.hashAlgorithm=t[n++],n+=this.readSubPackets(t.subarray(n,t.length),!0),!this.created)throw Error("Missing signature creation time subpacket.");this.signatureData=t.subarray(0,n),n+=this.readSubPackets(t.subarray(n,t.length),!1),this.signedHashValue=t.subarray(n,n+2),n+=2,this.params=Kt.signature.parseSignatureParams(this.publicKeyAlgorithm,t.subarray(n,t.length))}writeParams(){return this.params instanceof Promise?wl(async()=>Kt.serializeParams(this.publicKeyAlgorithm,await this.params)):Kt.serializeParams(this.publicKeyAlgorithm,this.params)}write(){const t=[];return t.push(this.signatureData),t.push(this.writeUnhashedSubPackets()),t.push(this.signedHashValue),t.push(this.writeParams()),Te.concat(t)}async sign(t,n,r=new Date,i=!1){t.version===5?this.version=5:this.version=4;const a=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Te.normalizeDate(r),this.issuerKeyVersion=t.version,this.issuerFingerprint=t.getFingerprintBytes(),this.issuerKeyID=t.getKeyID(),a.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Te.concat(a);const l=this.toHash(this.signatureType,n,i),c=await this.hash(this.signatureType,n,l,i);this.signedHashValue=ui(_u(c),0,2);const h=async()=>Kt.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,t.publicParams,t.privateParams,l,await Ir(c));Te.isStream(c)?this.params=h():(this.params=await h(),this[Ld]=!0)}writeHashedSubPackets(){const t=ve.signatureSubpacket,n=[];let r;if(this.created===null)throw Error("Missing signature creation time");n.push(cr(t.signatureCreationTime,!0,Te.writeDate(this.created))),this.signatureExpirationTime!==null&&n.push(cr(t.signatureExpirationTime,!0,Te.writeNumber(this.signatureExpirationTime,4))),this.exportable!==null&&n.push(cr(t.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),this.trustLevel!==null&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),n.push(cr(t.trustSignature,!0,r))),this.regularExpression!==null&&n.push(cr(t.regularExpression,!0,this.regularExpression)),this.revocable!==null&&n.push(cr(t.revocable,!0,new Uint8Array([this.revocable?1:0]))),this.keyExpirationTime!==null&&n.push(cr(t.keyExpirationTime,!0,Te.writeNumber(this.keyExpirationTime,4))),this.preferredSymmetricAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredSymmetricAlgorithms)),n.push(cr(t.preferredSymmetricAlgorithms,!1,r))),this.revocationKeyClass!==null&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Te.concat([r,this.revocationKeyFingerprint]),n.push(cr(t.revocationKey,!1,r))),this.issuerKeyID.isNull()||this.issuerKeyVersion===5||n.push(cr(t.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach(({name:l,value:c,humanReadable:h,critical:s})=>{r=[new Uint8Array([h?128:0,0,0,0])];const p=Te.encodeUTF8(l);r.push(Te.writeNumber(p.length,2)),r.push(Te.writeNumber(c.length,2)),r.push(p),r.push(c),r=Te.concat(r),n.push(cr(t.notationData,s,r))}),this.preferredHashAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredHashAlgorithms)),n.push(cr(t.preferredHashAlgorithms,!1,r))),this.preferredCompressionAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredCompressionAlgorithms)),n.push(cr(t.preferredCompressionAlgorithms,!1,r))),this.keyServerPreferences!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.keyServerPreferences)),n.push(cr(t.keyServerPreferences,!1,r))),this.preferredKeyServer!==null&&n.push(cr(t.preferredKeyServer,!1,Te.encodeUTF8(this.preferredKeyServer))),this.isPrimaryUserID!==null&&n.push(cr(t.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),this.policyURI!==null&&n.push(cr(t.policyURI,!1,Te.encodeUTF8(this.policyURI))),this.keyFlags!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.keyFlags)),n.push(cr(t.keyFlags,!0,r))),this.signersUserID!==null&&n.push(cr(t.signersUserID,!1,Te.encodeUTF8(this.signersUserID))),this.reasonForRevocationFlag!==null&&(r=Te.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),n.push(cr(t.reasonForRevocation,!0,r))),this.features!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.features)),n.push(cr(t.features,!1,r))),this.signatureTargetPublicKeyAlgorithm!==null&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Te.stringToUint8Array(this.signatureTargetHash)),r=Te.concat(r),n.push(cr(t.signatureTarget,!0,r))),this.embeddedSignature!==null&&n.push(cr(t.embeddedSignature,!0,this.embeddedSignature.write())),this.issuerFingerprint!==null&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Te.concat(r),n.push(cr(t.issuerFingerprint,this.version===5,r))),this.preferredAEADAlgorithms!==null&&(r=Te.stringToUint8Array(Te.uint8ArrayToString(this.preferredAEADAlgorithms)),n.push(cr(t.preferredAEADAlgorithms,!1,r)));const i=Te.concat(n),a=Te.writeNumber(i.length,2);return Te.concat([a,i])}writeUnhashedSubPackets(){const t=[];this.unhashedSubpackets.forEach(i=>{t.push(oh(i.length)),t.push(i)});const n=Te.concat(t),r=Te.writeNumber(n.length,2);return Te.concat([r,n])}readSubPacket(t,n=!0){let r=0;const i=!!(128&t[r]),a=127&t[r];if(n||(this.unhashedSubpackets.push(t.subarray(r,t.length)),uX.has(a)))switch(r++,a){case ve.signatureSubpacket.signatureCreationTime:this.created=Te.readDate(t.subarray(r,t.length));break;case ve.signatureSubpacket.signatureExpirationTime:{const l=Te.readNumber(t.subarray(r,t.length));this.signatureNeverExpires=l===0,this.signatureExpirationTime=l;break}case ve.signatureSubpacket.exportableCertification:this.exportable=t[r++]===1;break;case ve.signatureSubpacket.trustSignature:this.trustLevel=t[r++],this.trustAmount=t[r++];break;case ve.signatureSubpacket.regularExpression:this.regularExpression=t[r];break;case ve.signatureSubpacket.revocable:this.revocable=t[r++]===1;break;case ve.signatureSubpacket.keyExpirationTime:{const l=Te.readNumber(t.subarray(r,t.length));this.keyExpirationTime=l,this.keyNeverExpires=l===0;break}case ve.signatureSubpacket.preferredSymmetricAlgorithms:this.preferredSymmetricAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.revocationKey:this.revocationKeyClass=t[r++],this.revocationKeyAlgorithm=t[r++],this.revocationKeyFingerprint=t.subarray(r,r+20);break;case ve.signatureSubpacket.issuer:this.issuerKeyID.read(t.subarray(r,t.length));break;case ve.signatureSubpacket.notationData:{const l=!!(128&t[r]);r+=4;const c=Te.readNumber(t.subarray(r,r+2));r+=2;const h=Te.readNumber(t.subarray(r,r+2));r+=2;const s=Te.decodeUTF8(t.subarray(r,r+c)),p=t.subarray(r+c,r+c+h);this.rawNotations.push({name:s,humanReadable:l,value:p,critical:i}),l&&(this.notations[s]=Te.decodeUTF8(p));break}case ve.signatureSubpacket.preferredHashAlgorithms:this.preferredHashAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.preferredCompressionAlgorithms:this.preferredCompressionAlgorithms=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.keyServerPreferences:this.keyServerPreferences=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.preferredKeyServer:this.preferredKeyServer=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.primaryUserID:this.isPrimaryUserID=t[r++]!==0;break;case ve.signatureSubpacket.policyURI:this.policyURI=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.keyFlags:this.keyFlags=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.signersUserID:this.signersUserID=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=t[r++],this.reasonForRevocationString=Te.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.features:this.features=[...t.subarray(r,t.length)];break;case ve.signatureSubpacket.signatureTarget:{this.signatureTargetPublicKeyAlgorithm=t[r++],this.signatureTargetHashAlgorithm=t[r++];const l=Kt.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=Te.uint8ArrayToString(t.subarray(r,r+l));break}case ve.signatureSubpacket.embeddedSignature:this.embeddedSignature=new di,this.embeddedSignature.read(t.subarray(r,t.length));break;case ve.signatureSubpacket.issuerFingerprint:this.issuerKeyVersion=t[r++],this.issuerFingerprint=t.subarray(r,t.length),this.issuerKeyVersion===5?this.issuerKeyID.read(this.issuerFingerprint):this.issuerKeyID.read(this.issuerFingerprint.subarray(-8));break;case ve.signatureSubpacket.preferredAEADAlgorithms:this.preferredAEADAlgorithms=[...t.subarray(r,t.length)];break;default:{const l=Error("Unknown signature subpacket type "+a);if(i)throw l;Te.printDebug(l)}}}readSubPackets(t,n=!0,r){const i=Te.readNumber(t.subarray(0,2));let a=2;for(;a<2+i;){const l=AP(t.subarray(a,t.length));a+=l.offset,this.readSubPacket(t.subarray(a,a+l.len),n,r),a+=l.len}return a}toSign(t,n){const r=ve.signature;switch(t){case r.binary:return n.text!==null?Te.encodeUTF8(n.getText(!0)):n.getBytes(!0);case r.text:{const i=n.getBytes(!0);return Te.canonicalizeEOL(i)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let i,a;if(n.userID)a=180,i=n.userID;else{if(!n.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");a=209,i=n.userAttribute}const l=i.write();return Te.concat([this.toSign(r.key,n),new Uint8Array([a]),Te.writeNumber(l.length,4),l])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Te.concat([this.toSign(r.key,n),this.toSign(r.key,{key:n.bind})]);case r.key:if(n.key===void 0)throw Error("Key packet is required for this signature.");return n.key.writeForHash(this.version);case r.keyRevocation:return this.toSign(r.key,n);case r.timestamp:return new Uint8Array(0);case r.thirdParty:throw Error("Not implemented");default:throw Error("Unknown signature type.")}}calculateTrailer(t,n){let r=0;return Sr(_u(this.signatureData),i=>{r+=i.length},()=>{const i=[];return this.version!==5||this.signatureType!==ve.signature.binary&&this.signatureType!==ve.signature.text||(n?i.push(new Uint8Array(6)):i.push(t.writeHeader())),i.push(new Uint8Array([this.version,255])),this.version===5&&i.push(new Uint8Array(4)),i.push(Te.writeNumber(r,4)),Te.concat(i)})}toHash(t,n,r=!1){const i=this.toSign(t,n);return Te.concat([i,this.signatureData,this.calculateTrailer(n,r)])}async hash(t,n,r,i=!1){return r||(r=this.toHash(t,n,i)),Kt.hash.digest(this.hashAlgorithm,r)}async verify(t,n,r,i=new Date,a=!1,l=Lt){if(!this.issuerKeyID.equals(t.getKeyID()))throw Error("Signature was not issued by the given public key");if(this.publicKeyAlgorithm!==t.algorithm)throw Error("Public key algorithm used to sign signature does not match issuer key algorithm.");const c=n===ve.signature.binary||n===ve.signature.text;if(!(this[Ld]&&!c)){let s,p;if(this.hashed?p=await this.hashed:(s=this.toHash(n,r,a),p=await this.hash(n,r,s)),p=await Ir(p),this.signedHashValue[0]!==p[0]||this.signedHashValue[1]!==p[1])throw Error("Signed digest did not match");if(this.params=await this.params,this[Ld]=await Kt.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,t.publicParams,s,p),!this[Ld])throw Error("Signature verification failed")}const h=Te.normalizeDate(i);if(h&&this.created>h)throw Error("Signature creation time is in the future");if(h&&h>=this.getExpirationTime())throw Error("Signature is expired");if(l.rejectHashAlgorithms.has(this.hashAlgorithm))throw Error("Insecure hash algorithm: "+ve.read(ve.hash,this.hashAlgorithm).toUpperCase());if(l.rejectMessageHashAlgorithms.has(this.hashAlgorithm)&&[ve.signature.binary,ve.signature.text].includes(this.signatureType))throw Error("Insecure message hash algorithm: "+ve.read(ve.hash,this.hashAlgorithm).toUpperCase());if(this.rawNotations.forEach(({name:s,critical:p})=>{if(p&&l.knownNotations.indexOf(s)<0)throw Error("Unknown critical notation: "+s)}),this.revocationKeyClass!==null)throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.")}isExpired(t=new Date){const n=Te.normalizeDate(t);return n!==null&&!(this.created<=n&&ndi.prototype.calculateTrailer.apply(await this.correspondingSig,t))}async verify(){const t=await this.correspondingSig;if(!t||t.constructor.tag!==ve.packet.signature)throw Error("Corresponding signature packet missing");if(t.signatureType!==this.signatureType||t.hashAlgorithm!==this.hashAlgorithm||t.publicKeyAlgorithm!==this.publicKeyAlgorithm||!t.issuerKeyID.equals(this.issuerKeyID))throw Error("Corresponding signature packet does not match one-pass signature packet");return t.hashed=this.hashed,t.verify.apply(t,arguments)}}function cX(e,t){if(!t[e]){let n;try{n=ve.read(ve.packet,e)}catch{throw new zr("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+n)}return new t[e]}is.prototype.hash=di.prototype.hash,is.prototype.toHash=di.prototype.toHash,is.prototype.toSign=di.prototype.toSign;class Gn extends Array{static async fromBinary(t,n,r=Lt){const i=new Gn;return await i.read(t,n,r),i}async read(t,n,r=Lt){this.stream=xo(t,async(a,l)=>{const c=ea(l);try{for(;;)if(await c.ready,await dY(a,async h=>{try{if(h.tag===ve.packet.marker||h.tag===ve.packet.trust)return;const s=cX(h.tag,n);s.packets=new Gn,s.fromStream=Te.isStream(h.packet),await s.read(h.packet,r),await c.write(s)}catch(s){const p=!r.ignoreUnsupportedPackets&&s instanceof zr,d=!(r.ignoreMalformedPackets||s instanceof zr);if(p||d||_m(h.tag))await c.abort(s);else{const v=new Pb(h.tag,h.packet);await c.write(v)}Te.printDebugError(s)}}))return await c.ready,void await c.close()}catch(h){await c.abort(h)}});const i=qs(this.stream);for(;;){const{done:a,value:l}=await i.read();if(a?this.stream=null:this.push(l),a||_m(l.constructor.tag))break}i.releaseLock()}write(){const t=[];for(let n=0;n{if(a.push(h),l+=h.length,l>=c){const s=Math.min(Math.log(l)/Math.LN2|0,30),p=2**s,d=Te.concat([cY(s)].concat(a));return a=[d.subarray(1+p)],l=a[0].length,d.subarray(0,1+p)}},()=>Te.concat([oh(l)].concat(a))))}else{if(Te.isStream(i)){let a=0;t.push(Sr(_u(i),l=>{a+=l.length},()=>ck(r,a)))}else t.push(ck(r,i.length));t.push(i)}}return Te.concat(t)}filterByTag(...t){const n=new Gn,r=i=>a=>i===a;for(let i=0;in.constructor.tag===t)}indexOfTag(...t){const n=[],r=this,i=a=>l=>a===l;for(let a=0;a{this.algorithm=await r.readByte(),this.compressed=r.remainder(),await this.decompress(n)})}write(){return this.compressed===null&&this.compress(),Te.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(t=Lt){const n=ve.read(ve.compression,this.algorithm),r=hX[n];if(!r)throw Error(n+" decompression not supported");this.packets=await Gn.fromBinary(r(this.compressed),dX,t)}compress(){const t=ve.read(ve.compression,this.algorithm),n=fX[t];if(!n)throw Error(t+" compression not supported");this.compressed=n(this.packets.write(),this.deflateLevel)}}const Ns=Te.getNodeZlib();function u4(e){return e}function gg(e,t,n={}){return function(r){return!Te.isStream(r)||Ar(r)?wl(()=>Ir(r).then(i=>new Promise((a,l)=>{e(i,n,(c,h)=>{if(c)return l(c);a(h)})}))):n_(_2(r).pipe(t(n)))}}function _g(e,t={}){return function(n){const r=new e(t);return Sr(n,i=>{if(i.length)return r.push(i,Nf),r.result},()=>{if(e===Rb)return r.push([],Xr),r.result})}}function c4(e){return function(t){return wl(async()=>e(await Ir(t)))}}const fX=Ns?{zip:(e,t)=>gg(Ns.deflateRaw,Ns.createDeflateRaw,{level:t})(e),zlib:(e,t)=>gg(Ns.deflate,Ns.createDeflate,{level:t})(e)}:{zip:(e,t)=>_g(Rb,{raw:!0,level:t})(e),zlib:(e,t)=>_g(Rb,{level:t})(e)},hX=Ns?{uncompressed:u4,zip:gg(Ns.inflateRaw,Ns.createInflateRaw),zlib:gg(Ns.inflate,Ns.createInflate),bzip2:c4(l4)}:{uncompressed:u4,zip:_g(a4,{raw:!0}),zlib:_g(a4),bzip2:c4(l4)},pX=Te.constructAllowedPackets([qc,ch,is,di]);class hT{static get tag(){return ve.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(t){await r_(t,async n=>{const r=await n.readByte();if(r!==1)throw new zr(`Version ${r} of the SEIP packet is unsupported.`);this.encrypted=n.remainder()})}write(){return Te.concat([new Uint8Array([1]),this.encrypted])}async encrypt(t,n,r=Lt){const{blockSize:i}=Kt.getCipher(t);let a=this.packets.write();Ar(a)&&(a=await Ir(a));const l=await Kt.getPrefixRandom(t),c=new Uint8Array([211,20]),h=Te.concat([l,a,c]),s=await Kt.hash.sha1(Sc(h)),p=Te.concat([h,s]);return this.encrypted=await Kt.mode.cfb.encrypt(t,n,p,new Uint8Array(i),r),!0}async decrypt(t,n,r=Lt){const{blockSize:i}=Kt.getCipher(t);let a=_u(this.encrypted);Ar(a)&&(a=await Ir(a));const l=await Kt.mode.cfb.decrypt(t,n,a,new Uint8Array(i)),c=ui(Sc(l),-20),h=ui(l,0,-20),s=Promise.all([Ir(await Kt.hash.sha1(Sc(h))),Ir(c)]).then(([v,m])=>{if(!Te.equalsUint8Array(v,m))throw Error("Modification detected.");return new Uint8Array}),p=ui(h,i+2);let d=ui(p,0,-2);return d=Yi([d,wl(()=>s)]),Te.isStream(a)&&r.allowUnauthenticatedStream||(d=await Ir(d)),this.packets=await Gn.fromBinary(d,pX,r),!0}}const vX=Te.constructAllowedPackets([qc,ch,is,di]);class f_{static get tag(){return ve.packet.aeadEncryptedData}constructor(){this.version=1,this.cipherAlgorithm=null,this.aeadAlgorithm=ve.aead.eax,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}async read(t){await r_(t,async n=>{const r=await n.readByte();if(r!==1)throw new zr(`Version ${r} of the AEAD-encrypted data packet is not supported.`);this.cipherAlgorithm=await n.readByte(),this.aeadAlgorithm=await n.readByte(),this.chunkSizeByte=await n.readByte();const i=Kt.getAEADMode(this.aeadAlgorithm);this.iv=await n.readBytes(i.ivLength),this.encrypted=n.remainder()})}write(){return Te.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(t,n,r=Lt){this.packets=await Gn.fromBinary(await this.crypt("decrypt",n,_u(this.encrypted)),vX,r)}async encrypt(t,n,r=Lt){this.cipherAlgorithm=t;const{ivLength:i}=Kt.getAEADMode(this.aeadAlgorithm);this.iv=Kt.random.getRandomBytes(i),this.chunkSizeByte=r.aeadChunkSizeByte;const a=this.packets.write();this.encrypted=await this.crypt("encrypt",n,a)}async crypt(t,n,r){const i=Kt.getAEADMode(this.aeadAlgorithm),a=await i(this.cipherAlgorithm,n),l=t==="decrypt"?i.tagLength:0,c=t==="encrypt"?i.tagLength:0,h=2**(this.chunkSizeByte+6)+l,s=new ArrayBuffer(21),p=new Uint8Array(s,0,13),d=new Uint8Array(s),v=new DataView(s),m=new Uint8Array(s,5,8);p.set([192|f_.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let _=0,y=Promise.resolve(),b=0,E=0;const k=this.iv;return xo(r,async(C,x)=>{if(Te.isStream(C)!=="array"){const w=new Rc({},{highWaterMark:Te.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:M=>M.length});pl(w.readable,x),x=w.writable}const D=qs(C),P=ea(x);try{for(;;){let w=await D.readBytes(h+l)||new Uint8Array;const M=w.subarray(w.length-l);let T,R;if(w=w.subarray(0,w.length-l),!_||w.length?(D.unshift(M),T=a[t](w,i.getNonce(k,m),p),E+=w.length-l+c):(v.setInt32(17,b),T=a[t](M,i.getNonce(k,m),d),E+=c,R=!0),b+=w.length-l,y=y.then(()=>T).then(async K=>{await P.ready,await P.write(K),E-=K.length}).catch(K=>P.abort(K)),(R||E>P.desiredSize)&&await y,R){await P.close();break}v.setInt32(9,++_)}}catch(w){await P.abort(w)}})}}class Lb{static get tag(){return ve.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new vl,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(t){if(this.version=t[0],this.version!==3)throw new zr(`Version ${this.version} of the PKESK packet is unsupported.`);this.publicKeyID.read(t.subarray(1,t.length)),this.publicKeyAlgorithm=t[9],this.encrypted=Kt.parseEncSessionKeyParams(this.publicKeyAlgorithm,t.subarray(10))}write(){const t=[new Uint8Array([this.version]),this.publicKeyID.write(),new Uint8Array([this.publicKeyAlgorithm]),Kt.serializeParams(this.publicKeyAlgorithm,this.encrypted)];return Te.concatUint8Array(t)}async encrypt(t){const n=Te.concatUint8Array([new Uint8Array([ve.write(ve.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,Te.writeChecksum(this.sessionKey)]),r=ve.write(ve.publicKey,this.publicKeyAlgorithm);this.encrypted=await Kt.publicKeyEncrypt(r,t.publicParams,n,t.getFingerprintBytes())}async decrypt(t,n){if(this.publicKeyAlgorithm!==t.algorithm)throw Error("Decryption error");const r=n?Te.concatUint8Array([new Uint8Array([n.sessionKeyAlgorithm]),n.sessionKey,Te.writeChecksum(n.sessionKey)]):null,i=await Kt.publicKeyDecrypt(this.publicKeyAlgorithm,t.publicParams,t.privateParams,this.encrypted,t.getFingerprintBytes(),r),a=i[0],l=i.subarray(1,i.length-2),c=i.subarray(i.length-2),h=Te.writeChecksum(l),s=h[0]===c[0]&h[1]===c[1];if(n){const p=s&a===n.sessionKeyAlgorithm&l.length===n.sessionKey.length;this.sessionKeyAlgorithm=Te.selectUint8(p,a,n.sessionKeyAlgorithm),this.sessionKey=Te.selectUint8Array(p,l,n.sessionKey)}else{if(!(s&&ve.read(ve.symmetric,a)))throw Error("Decryption error");this.sessionKey=l,this.sessionKeyAlgorithm=a}}}class xf{constructor(t=Lt){this.algorithm=ve.hash.sha256,this.type="iterated",this.c=t.s2kIterationCountByte,this.salt=null}getCount(){return 16+(15&this.c)<<6+(this.c>>4)}read(t){let n=0;switch(this.type=ve.read(ve.s2k,t[n++]),this.algorithm=t[n++],this.type){case"simple":break;case"salted":this.salt=t.subarray(n,n+8),n+=8;break;case"iterated":this.salt=t.subarray(n,n+8),n+=8,this.c=t[n++];break;case"gnu":if(Te.uint8ArrayToString(t.subarray(n,n+3))!=="GNU")throw Error("Unknown s2k type.");if(n+=3,1e3+t[n++]!==1001)throw Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw Error("Unknown s2k type.")}return n}write(){if(this.type==="gnu-dummy")return new Uint8Array([101,0,...Te.stringToUint8Array("GNU"),1]);const t=[new Uint8Array([ve.write(ve.s2k,this.type),this.algorithm])];switch(this.type){case"simple":break;case"salted":t.push(this.salt);break;case"iterated":t.push(this.salt),t.push(new Uint8Array([this.c]));break;case"gnu":throw Error("GNU s2k type not supported.");default:throw Error("Unknown s2k type.")}return Te.concatUint8Array(t)}async produceKey(t,n){t=Te.encodeUTF8(t);const r=[];let i=0,a=0;for(;i{this.privateParams[t].fill(0),delete this.privateParams[t]}),this.privateParams=null,this.isEncrypted=!0)}}async function d4(e,t,n){const{keySize:r}=Kt.getCipher(n);return e.produceKey(t,r)}var _X=x2(function(e){(function(t){function n(i){function a(){return Yt0&&(it.semantic=" "),it}}function C(tt,it){return function(){var yt,Ft,Oe,Fe,Ue;for(Fe=l(),yt=s("star"),Oe=0,Ue=it===void 0?0:it;(Ft=tt())!==null;)Oe+=1,d(yt,Ft);return Oe>=Ue?yt:(c(Fe),null)}}function x(tt){return tt.charCodeAt(0)>=128}function D(){return p("cr",m("\r")())}function P(){return p("crlf",_(D,T)())}function w(){return p("dquote",m('"')())}function M(){return p("htab",m(" ")())}function T(){return p("lf",m(` `)())}function R(){return p("sp",m(" ")())}function K(){return p("vchar",v(function(tt){var it=tt.charCodeAt(0),yt=33<=it&&it<=126;return i.rfc6532&&(yt=yt||x(tt)),yt}))}function N(){return p("wsp",y(R,M)())}function z(){var tt=p("quoted-pair",y(_(m("\\"),y(K,N)),H)());return tt===null?null:(tt.semantic=tt.semantic[1],tt)}function U(){return p("fws",y(ee,_(b(_(C(N),E(P))),C(N,1)))())}function oe(){return p("ctext",y(function(){return v(function(tt){var it=tt.charCodeAt(0),yt=33<=it&&it<=39||42<=it&&it<=91||93<=it&&it<=126;return i.rfc6532&&(yt=yt||x(tt)),yt})},le)())}function Pe(){return p("ccontent",y(oe,z,he)())}function he(){return p("comment",_(m("("),C(_(b(U),Pe)),b(U),m(")"))())}function ye(){return p("cfws",y(_(C(_(b(U),he),1),b(U)),U)())}function de(){return p("atext",v(function(tt){var it="a"<=tt&&tt<="z"||"A"<=tt&&tt<="Z"||"0"<=tt&&tt<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(tt)>=0;return i.rfc6532&&(it=it||x(tt)),it}))}function Se(){return p("atom",_(k(b(ye)),C(de,1),k(b(ye)))())}function X(){var tt,it;return(tt=p("dot-atom-text",C(de,1)()))===null||(it=C(_(m("."),C(de,1)))())!==null&&d(tt,it),tt}function se(){return p("dot-atom",_(E(b(ye)),X,E(b(ye)))())}function Ce(){return p("qtext",y(function(){return v(function(tt){var it=tt.charCodeAt(0),yt=it===33||35<=it&&it<=91||93<=it&&it<=126;return i.rfc6532&&(yt=yt||x(tt)),yt})},B)())}function be(){return p("qcontent",y(Ce,z)())}function re(){return p("quoted-string",_(E(b(ye)),E(w),C(_(b(k(U)),be)),b(E(U)),E(w),E(b(ye)))())}function Q(){return p("word",y(Se,re)())}function F(){return p("address",y(I,pe)())}function I(){return p("mailbox",y(Z,De)())}function Z(){return p("name-addr",_(b(Ee),q)())}function q(){return p("angle-addr",y(_(E(b(ye)),m("<"),De,m(">"),E(b(ye))),ue)())}function pe(){return p("group",_(Ee,m(":"),b(ae),m(";"),E(b(ye)))())}function Ee(){return p("display-name",((tt=p("phrase",y(W,C(Q,1))()))!==null&&(tt.semantic=function(it){return it.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(tt.semantic)),tt));var tt}function J(){return p("mailbox-list",y(_(I,C(_(m(","),I))),ce)())}function Y(){return p("address-list",y(_(F,C(_(m(","),F))),Ve)())}function ae(){return p("group-list",y(J,E(ye),Je)())}function te(){return p("local-part",y(vt,se,re)())}function Ae(){return p("dtext",y(function(){return v(function(tt){var it=tt.charCodeAt(0),yt=33<=it&&it<=90||94<=it&&it<=126;return i.rfc6532&&(yt=yt||x(tt)),yt})},kt)())}function me(){return p("domain-literal",_(E(b(ye)),m("["),C(_(b(U),Ae)),b(U),m("]"),E(b(ye)))())}function V(){return p("domain",(tt=y(xt,se,me)(),i.rejectTLD&&tt&&tt.semantic&&tt.semantic.indexOf(".")<0?null:(tt&&(tt.semantic=tt.semantic.replace(/\s+/g,"")),tt)));var tt}function De(){return p("addr-spec",_(te,m("@"),V)())}function ge(){return i.strict?null:p("obs-NO-WS-CTL",v(function(tt){var it=tt.charCodeAt(0);return 1<=it&&it<=8||it===11||it===12||14<=it&&it<=31||it===127}))}function le(){return i.strict?null:p("obs-ctext",ge())}function B(){return i.strict?null:p("obs-qtext",ge())}function H(){return i.strict?null:p("obs-qp",_(m("\\"),y(m("\0"),ge,T,D))())}function W(){return i.strict?null:i.atInDisplayName?p("obs-phrase",_(Q,C(y(Q,m("."),m("@"),k(ye))))()):p("obs-phrase",_(Q,C(y(Q,m("."),k(ye))))())}function ee(){return i.strict?null:p("obs-FWS",C(_(E(b(P)),N),1)())}function ue(){return i.strict?null:p("obs-angle-addr",_(E(b(ye)),m("<"),xe,De,m(">"),E(b(ye)))())}function xe(){return i.strict?null:p("obs-route",_(fe,m(":"))())}function fe(){return i.strict?null:p("obs-domain-list",_(C(y(E(ye),m(","))),m("@"),V,C(_(m(","),E(b(ye)),b(_(m("@"),V)))))())}function ce(){return i.strict?null:p("obs-mbox-list",_(C(_(E(b(ye)),m(","))),I,C(_(m(","),b(_(I,E(ye))))))())}function Ve(){return i.strict?null:p("obs-addr-list",_(C(_(E(b(ye)),m(","))),F,C(_(m(","),b(_(F,E(ye))))))())}function Je(){return i.strict?null:p("obs-group-list",_(C(_(E(b(ye)),m(",")),1),E(b(ye)))())}function vt(){return i.strict?null:p("obs-local-part",_(Q,C(_(m("."),Q)))())}function xt(){return i.strict?null:p("obs-domain",_(Se,C(_(m("."),Se)))())}function kt(){return i.strict?null:p("obs-dtext",y(ge,z)())}function Nt(tt,it){var yt,Ft,Oe;if(it==null)return null;for(Ft=[it];Ft.length>0;){if((Oe=Ft.pop()).name===tt)return Oe;for(yt=Oe.children.length-1;yt>=0;yt-=1)Ft.push(Oe.children[yt])}return null}function pt(tt,it){var yt,Ft,Oe,Fe,Ue;if(it==null)return null;for(Ft=[it],Fe=[],Ue={},yt=0;yt0;)if((Oe=Ft.pop()).name in Ue)Fe.push(Oe);else for(yt=Oe.children.length-1;yt>=0;yt-=1)Ft.push(Oe.children[yt]);return Fe}function It(tt){var it,yt,Ft,Oe,Fe;if(tt===null)return null;for(it=[],yt=pt(["group","mailbox"],tt),Ft=0;Ft1?null:Ue.addresses&&Ue.addresses[0]}(Fe):i.simple?Fe&&Fe.addresses:Fe}function Ot(tt){var it,yt=Nt("display-name",tt),Ft=[],Oe=pt(["mailbox"],tt);for(it=0;it0;)for((_t=ht.pop()).name===Re&&Pt.push(_t),ot=_t.children.length-1;ot>=0;ot-=1)ht.push(_t.children[ot]);return Pt}("cfws",tt),Oe=pt(["comment"],tt),Fe=Nt("local-part",yt),Ue=Nt("domain",yt);return{node:tt,parts:{name:it,address:yt,local:Fe,domain:Ue,comments:Ft},type:tt.name,name:qt(it),address:qt(yt),local:qt(Fe),domain:qt(Ue),comments:Zt(Oe),groupName:qt(tt.groupName)}}function qt(tt){return tt!=null?tt.semantic:null}function Zt(tt){var it="";if(tt)for(var yt=0;yt`),n.userID=r.join(" "),n}read(t,n=Lt){const r=Te.decodeUTF8(t);if(r.length>n.maxUserIDLength)throw Error("User ID string is too long");try{const{name:i,address:a,comments:l}=_X.parseOneAddress({input:r,atInDisplayName:!0});this.comment=l.replace(/^\(|\)$/g,""),this.name=i,this.email=a}catch{}this.userID=r}write(){return Te.encodeUTF8(this.userID)}equals(t){return t&&t.userID===this.userID}}class I2 extends h_{static get tag(){return ve.packet.secretSubkey}constructor(t=new Date,n=Lt){super(t,n)}}class pT{constructor(t){this.packets=t||new Gn}write(){return this.packets.write()}armor(t=Lt){return ih(ve.armor.signature,this.write(),void 0,void 0,void 0,t)}getSigningKeyIDs(){return this.packets.map(t=>t.issuerKeyID)}}async function vT(e,t){const n=new I2(e.date,t);return n.packets=null,n.algorithm=ve.write(ve.publicKey,e.algorithm),await n.generate(e.rsaBits,e.curve),await n.computeFingerprintAndKeyID(),n}async function yX(e,t){const n=new h_(e.date,t);return n.packets=null,n.algorithm=ve.write(ve.publicKey,e.algorithm),await n.generate(e.rsaBits,e.curve,e.config),await n.computeFingerprintAndKeyID(),n}async function Ps(e,t,n,r,i=new Date,a){let l,c;for(let h=e.length-1;h>=0;h--)try{(!l||e[h].created>=l.created)&&(await e[h].verify(t,n,r,i,void 0,a),l=e[h])}catch(s){c=s}if(!l)throw Te.wrapError(`Could not find valid ${ve.read(ve.signature,n)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ","self-").replace(/([a-z])([A-Z])/g,(h,s,p)=>s+" "+p.toLowerCase()),c);return l}function Nb(e,t,n=new Date){const r=Te.normalizeDate(n);if(r!==null){const i=yg(e,t);return!(e.created<=r&&r0&&(a.keyExpirationTime=n.keyExpirationTime,a.keyNeverExpires=!1),await a.sign(t,i,n.date),a}async function v_(e,t,n=new Date,r={},i){let a=i.preferredHashAlgorithm,l=a;if(e){const c=await e.getPrimaryUser(n,r,i);c.selfCertification.preferredHashAlgorithms&&([l]=c.selfCertification.preferredHashAlgorithms,a=Kt.hash.getHashByteLength(a)<=Kt.hash.getHashByteLength(l)?l:a)}switch(Object.getPrototypeOf(t)){case h_.prototype:case ts.prototype:case I2.prototype:case dh.prototype:switch(t.algorithm){case ve.publicKey.ecdh:case ve.publicKey.ecdsa:case ve.publicKey.eddsa:l=Kt.publicKey.elliptic.getPreferredHashAlgo(t.publicParams.oid)}}return Kt.hash.getHashByteLength(a)<=Kt.hash.getHashByteLength(l)?l:a}async function Fb(e,t=[],n=new Date,r=[],i=Lt){const a={symmetric:ve.symmetric.aes128,aead:ve.aead.eax,compression:ve.compression.uncompressed}[e],l={symmetric:i.preferredSymmetricAlgorithm,aead:i.preferredAEADAlgorithm,compression:i.preferredCompressionAlgorithm}[e],c={symmetric:"preferredSymmetricAlgorithms",aead:"preferredAEADAlgorithms",compression:"preferredCompressionAlgorithms"}[e];return(await Promise.all(t.map(async function(h,s){const p=(await h.getPrimaryUser(n,r[s],i)).selfCertification[c];return!!p&&p.indexOf(l)>=0}))).every(Boolean)?l:a}async function bu(e,t,n,r,i,a,l=[],c=!1,h){if(n.isDummy())throw Error("Cannot sign with a gnu-dummy key.");if(!n.isDecrypted())throw Error("Signing key is not decrypted.");const s=new di;return Object.assign(s,r),s.publicKeyAlgorithm=n.algorithm,s.hashAlgorithm=await v_(t,n,i,a,h),s.rawNotations=l,await s.sign(n,e,i,c),s}async function uu(e,t,n,r=new Date,i){(e=e[n])&&(t[n].length?await Promise.all(e.map(async function(a){a.isExpired(r)||i&&!await i(a)||t[n].some(function(l){return Te.equalsUint8Array(l.writeParams(),a.writeParams())})||t[n].push(a)})):t[n]=e)}async function Bc(e,t,n,r,i,a,l=new Date,c){a=a||e;const h=[];return await Promise.all(r.map(async function(s){try{i&&!s.issuerKeyID.equals(i.issuerKeyID)||(await s.verify(a,t,n,c.revocationsExpire?l:null,!1,c),h.push(s.issuerKeyID))}catch{}})),i?(i.revoked=!!h.some(s=>s.equals(i.issuerKeyID))||i.revoked||!1,i.revoked):h.length>0}function yg(e,t){let n;return t.keyNeverExpires===!1&&(n=e.created.getTime()+1e3*t.keyExpirationTime),n?new Date(n):1/0}function Bb(e,t={}){switch(e.type=e.type||t.type,e.curve=e.curve||t.curve,e.rsaBits=e.rsaBits||t.rsaBits,e.keyExpirationTime=e.keyExpirationTime!==void 0?e.keyExpirationTime:t.keyExpirationTime,e.passphrase=Te.isString(e.passphrase)?e.passphrase:t.passphrase,e.date=e.date||t.date,e.sign=e.sign||!1,e.type){case"ecc":try{e.curve=ve.write(ve.curve,e.curve)}catch{throw Error("Unknown curve")}e.curve!==ve.curve.ed25519&&e.curve!==ve.curve.curve25519||(e.curve=e.sign?ve.curve.ed25519:ve.curve.curve25519),e.sign?e.algorithm=e.curve===ve.curve.ed25519?ve.publicKey.eddsa:ve.publicKey.ecdsa:e.algorithm=ve.publicKey.ecdh;break;case"rsa":e.algorithm=ve.publicKey.rsaEncryptSign;break;default:throw Error("Unsupported key type "+e.type)}return e}function f4(e,t){const n=e.algorithm;return n!==ve.publicKey.rsaEncrypt&&n!==ve.publicKey.elgamal&&n!==ve.publicKey.ecdh&&(!t.keyFlags||(t.keyFlags[0]&ve.keyFlags.signData)!=0)}function h4(e,t){const n=e.algorithm;return n!==ve.publicKey.dsa&&n!==ve.publicKey.rsaSign&&n!==ve.publicKey.ecdsa&&n!==ve.publicKey.eddsa&&(!t.keyFlags||(t.keyFlags[0]&ve.keyFlags.encryptCommunication)!=0||(t.keyFlags[0]&ve.keyFlags.encryptStorage)!=0)}function p4(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||!e.keyFlags||(e.keyFlags[0]&ve.keyFlags.encryptCommunication)!=0||(e.keyFlags[0]&ve.keyFlags.encryptStorage)!=0}function yc(e,t){const n=ve.write(ve.publicKey,e.algorithm),r=e.getAlgorithmInfo();if(t.rejectPublicKeyAlgorithms.has(n))throw Error(r.algorithm+" keys are considered too weak.");switch(n){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:case ve.publicKey.rsaEncrypt:if(r.bitsp.getKeys(h).length>0);return s.length===0?null:(await Promise.all(s.map(async p=>{const d=await p.getSigningKey(h,t.created,void 0,i);if(t.revoked||await a.isRevoked(t,d.keyPacket,r,i))throw Error("User certificate is revoked");try{await t.verify(d.keyPacket,ve.signature.certGeneric,c,r,void 0,i)}catch(v){throw Te.wrapError("User certificate is invalid",v)}})),!0)}async verifyAllCertifications(t,n=new Date,r){const i=this,a=this.selfCertifications.concat(this.otherCertifications);return Promise.all(a.map(async l=>({keyID:l.issuerKeyID,valid:await i.verifyCertificate(l,t,n,r).catch(()=>!1)})))}async verify(t=new Date,n){if(!this.selfCertifications.length)throw Error("No self-certifications found");const r=this,i=this.mainKey.keyPacket,a={userID:this.userID,userAttribute:this.userAttribute,key:i};let l;for(let c=this.selfCertifications.length-1;c>=0;c--)try{const h=this.selfCertifications[c];if(h.revoked||await r.isRevoked(h,void 0,t,n))throw Error("Self-certification is revoked");try{await h.verify(i,ve.signature.certGeneric,a,t,void 0,n)}catch(s){throw Te.wrapError("Self-certification is invalid",s)}return!0}catch(h){l=h}throw l}async update(t,n,r){const i=this.mainKey.keyPacket,a={userID:this.userID,userAttribute:this.userAttribute,key:i};await uu(t,this,"selfCertifications",n,async function(l){try{return await l.verify(i,ve.signature.certGeneric,a,n,!1,r),!0}catch{return!1}}),await uu(t,this,"otherCertifications",n),await uu(t,this,"revocationSignatures",n,function(l){return Bc(i,ve.signature.certRevocation,a,[l],void 0,void 0,n,r)})}async revoke(t,{flag:n=ve.reasonForRevocation.noReason,string:r=""}={},i=new Date,a=Lt){const l={userID:this.userID,userAttribute:this.userAttribute,key:t},c=new Sf(l.userID||l.userAttribute,this.mainKey);return c.revocationSignatures.push(await bu(l,null,t,{signatureType:ve.signature.certRevocation,reasonForRevocationFlag:ve.write(ve.reasonForRevocation,n),reasonForRevocationString:r},i,void 0,void 0,!1,a)),await c.update(this),c}}class Uc{constructor(t,n){this.keyPacket=t,this.bindingSignatures=[],this.revocationSignatures=[],this.mainKey=n}toPacketList(){const t=new Gn;return t.push(this.keyPacket),t.push(...this.revocationSignatures),t.push(...this.bindingSignatures),t}clone(){const t=new Uc(this.keyPacket,this.mainKey);return t.bindingSignatures=[...this.bindingSignatures],t.revocationSignatures=[...this.revocationSignatures],t}async isRevoked(t,n,r=new Date,i=Lt){const a=this.mainKey.keyPacket;return Bc(a,ve.signature.subkeyRevocation,{key:a,bind:this.keyPacket},this.revocationSignatures,t,n,r,i)}async verify(t=new Date,n=Lt){const r=this.mainKey.keyPacket,i={key:r,bind:this.keyPacket},a=await Ps(this.bindingSignatures,r,ve.signature.subkeyBinding,i,t,n);if(a.revoked||await this.isRevoked(a,null,t,n))throw Error("Subkey is revoked");if(Nb(this.keyPacket,a,t))throw Error("Subkey is expired");return a}async getExpirationTime(t=new Date,n=Lt){const r=this.mainKey.keyPacket,i={key:r,bind:this.keyPacket};let a;try{a=await Ps(this.bindingSignatures,r,ve.signature.subkeyBinding,i,t,n)}catch{return null}const l=yg(this.keyPacket,a),c=a.getExpirationTime();return la.bindingSignatures[h].created&&(a.bindingSignatures[h]=c),!1;try{return await c.verify(i,ve.signature.subkeyBinding,l,n,void 0,r),!0}catch{return!1}}),await uu(t,this,"revocationSignatures",n,function(c){return Bc(i,ve.signature.subkeyRevocation,l,[c],void 0,void 0,n,r)})}async revoke(t,{flag:n=ve.reasonForRevocation.noReason,string:r=""}={},i=new Date,a=Lt){const l={key:t,bind:this.keyPacket},c=new Uc(this.keyPacket,this.mainKey);return c.revocationSignatures.push(await bu(l,null,t,{signatureType:ve.signature.subkeyRevocation,reasonForRevocationFlag:ve.write(ve.reasonForRevocation,n),reasonForRevocationString:r},i,void 0,void 0,!1,a)),await c.update(this),c}hasSameFingerprintAs(t){return this.keyPacket.hasSameFingerprintAs(t.keyPacket||t)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach(e=>{Uc.prototype[e]=function(){return this.keyPacket[e]()}});const bX=Te.constructAllowedPackets([di]),v4=new Set([ve.packet.publicKey,ve.packet.privateKey]),m4=new Set([ve.packet.publicKey,ve.packet.privateKey,ve.packet.publicSubkey,ve.packet.privateSubkey]);class gT{packetListToStructure(t,n=new Set){let r,i,a,l;for(const c of t){if(c instanceof Pb){m4.has(c.tag)&&!l&&(l=v4.has(c.tag)?v4:m4);continue}const h=c.constructor.tag;if(l){if(!l.has(h))continue;l=null}if(n.has(h))throw Error("Unexpected packet type: "+h);switch(h){case ve.packet.publicKey:case ve.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=c,i=this.getKeyID(),!i)throw Error("Missing Key ID");break;case ve.packet.userID:case ve.packet.userAttribute:r=new Sf(c,this),this.users.push(r);break;case ve.packet.publicSubkey:case ve.packet.secretSubkey:r=null,a=new Uc(c,this),this.subkeys.push(a);break;case ve.packet.signature:switch(c.signatureType){case ve.signature.certGeneric:case ve.signature.certPersona:case ve.signature.certCasual:case ve.signature.certPositive:if(!r){Te.printDebug("Dropping certification signatures without preceding user packet");continue}c.issuerKeyID.equals(i)?r.selfCertifications.push(c):r.otherCertifications.push(c);break;case ve.signature.certRevocation:r?r.revocationSignatures.push(c):this.directSignatures.push(c);break;case ve.signature.key:this.directSignatures.push(c);break;case ve.signature.subkeyBinding:if(!a){Te.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}a.bindingSignatures.push(c);break;case ve.signature.keyRevocation:this.revocationSignatures.push(c);break;case ve.signature.subkeyRevocation:if(!a){Te.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}a.revocationSignatures.push(c)}}}}toPacketList(){const t=new Gn;return t.push(this.keyPacket),t.push(...this.revocationSignatures),t.push(...this.directSignatures),this.users.map(n=>t.push(...n.toPacketList())),this.subkeys.map(n=>t.push(...n.toPacketList())),t}clone(t=!1){const n=new this.constructor(this.toPacketList());return t&&n.getKeys().forEach(r=>{if(r.keyPacket=Object.create(Object.getPrototypeOf(r.keyPacket),Object.getOwnPropertyDescriptors(r.keyPacket)),!r.keyPacket.isDecrypted())return;const i={};Object.keys(r.keyPacket.privateParams).forEach(a=>{i[a]=new Uint8Array(r.keyPacket.privateParams[a])}),r.keyPacket.privateParams=i}),n}getSubkeys(t=null){return this.subkeys.filter(n=>!t||n.getKeyID().equals(t,!0))}getKeys(t=null){const n=[];return t&&!this.getKeyID().equals(t,!0)||n.push(this),n.concat(this.getSubkeys(t))}getKeyIDs(){return this.getKeys().map(t=>t.getKeyID())}getUserIDs(){return this.users.map(t=>t.userID?t.userID.userID:null).filter(t=>t!==null)}write(){return this.toPacketList().write()}async getSigningKey(t=null,n=new Date,r={},i=Lt){await this.verifyPrimaryKey(n,r,i);const a=this.keyPacket,l=this.subkeys.slice().sort((h,s)=>s.keyPacket.created-h.keyPacket.created);let c;for(const h of l)if(!t||h.getKeyID().equals(t))try{await h.verify(n,i);const s={key:a,bind:h.keyPacket},p=await Ps(h.bindingSignatures,a,ve.signature.subkeyBinding,s,n,i);if(!f4(h.keyPacket,p))continue;if(!p.embeddedSignature)throw Error("Missing embedded signature");return await Ps([p.embeddedSignature],h.keyPacket,ve.signature.keyBinding,s,n,i),yc(h.keyPacket,i),h}catch(s){c=s}try{const h=await this.getPrimaryUser(n,r,i);if((!t||a.getKeyID().equals(t))&&f4(a,h.selfCertification))return yc(a,i),this}catch(h){c=h}throw Te.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),c)}async getEncryptionKey(t,n=new Date,r={},i=Lt){await this.verifyPrimaryKey(n,r,i);const a=this.keyPacket,l=this.subkeys.slice().sort((h,s)=>s.keyPacket.created-h.keyPacket.created);let c;for(const h of l)if(!t||h.getKeyID().equals(t))try{await h.verify(n,i);const s={key:a,bind:h.keyPacket},p=await Ps(h.bindingSignatures,a,ve.signature.subkeyBinding,s,n,i);if(h4(h.keyPacket,p))return yc(h.keyPacket,i),h}catch(s){c=s}try{const h=await this.getPrimaryUser(n,r,i);if((!t||a.getKeyID().equals(t))&&h4(a,h.selfCertification))return yc(a,i),this}catch(h){c=h}throw Te.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),c)}async isRevoked(t,n,r=new Date,i=Lt){return Bc(this.keyPacket,ve.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,t,n,r,i)}async verifyPrimaryKey(t=new Date,n={},r=Lt){const i=this.keyPacket;if(await this.isRevoked(null,null,t,r))throw Error("Primary key is revoked");const{selfCertification:a}=await this.getPrimaryUser(t,n,r);if(Nb(i,a,t))throw Error("Primary key is expired");const l=await Ps(this.directSignatures,i,ve.signature.key,{key:i},t,r).catch(()=>{});if(l&&Nb(i,l,t))throw Error("Primary key is expired")}async getExpirationTime(t,n=Lt){let r;try{const{selfCertification:i}=await this.getPrimaryUser(null,t,n),a=yg(this.keyPacket,i),l=i.getExpirationTime(),c=await Ps(this.directSignatures,this.keyPacket,ve.signature.key,{key:this.keyPacket},null,n).catch(()=>{});if(c){const h=yg(this.keyPacket,c);r=Math.min(a,l,h)}else r=at.subkeys.some(l=>a.hasSameFingerprintAs(l)))))throw Error("Cannot update public key with private key if subkeys mismatch");return t.update(this,r)}const i=this.clone();return await uu(t,i,"revocationSignatures",n,a=>Bc(i.keyPacket,ve.signature.keyRevocation,i,[a],null,t.keyPacket,n,r)),await uu(t,i,"directSignatures",n),await Promise.all(t.users.map(async a=>{const l=i.users.filter(c=>a.userID&&a.userID.equals(c.userID)||a.userAttribute&&a.userAttribute.equals(c.userAttribute));if(l.length>0)await Promise.all(l.map(c=>c.update(a,n,r)));else{const c=a.clone();c.mainKey=i,i.users.push(c)}})),await Promise.all(t.subkeys.map(async a=>{const l=i.subkeys.filter(c=>c.hasSameFingerprintAs(a));if(l.length>0)await Promise.all(l.map(c=>c.update(a,n,r)));else{const c=a.clone();c.mainKey=i,i.subkeys.push(c)}})),i}async getRevocationCertificate(t=new Date,n=Lt){const r={key:this.keyPacket},i=await Ps(this.revocationSignatures,this.keyPacket,ve.signature.keyRevocation,r,t,n),a=new Gn;return a.push(i),ih(ve.armor.publicKey,a.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(t,n=new Date,r=Lt){const i=await rh(t,r),a=(await Gn.fromBinary(i.data,bX,r)).findPacket(ve.packet.signature);if(!a||a.signatureType!==ve.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!a.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await a.verify(this.keyPacket,ve.signature.keyRevocation,{key:this.keyPacket},n,void 0,r)}catch(c){throw Te.wrapError("Could not verify revocation signature",c)}const l=this.clone();return l.revocationSignatures.push(a),l}async signPrimaryUser(t,n,r,i=Lt){const{index:a,user:l}=await this.getPrimaryUser(n,r,i),c=await l.certify(t,n,i),h=this.clone();return h.users[a]=c,h}async signAllUsers(t,n=new Date,r=Lt){const i=this.clone();return i.users=await Promise.all(this.users.map(function(a){return a.certify(t,n,r)})),i}async verifyPrimaryUser(t,n=new Date,r,i=Lt){const a=this.keyPacket,{user:l}=await this.getPrimaryUser(n,r,i);return t?await l.verifyAllCertifications(t,n,i):[{keyID:a.getKeyID(),valid:await l.verify(n,i).catch(()=>!1)}]}async verifyAllUsers(t,n=new Date,r=Lt){const i=this.keyPacket,a=[];return await Promise.all(this.users.map(async l=>{const c=t?await l.verifyAllCertifications(t,n,r):[{keyID:i.getKeyID(),valid:await l.verify(n,r).catch(()=>!1)}];a.push(...c.map(h=>({userID:l.userID.userID,keyID:h.keyID,valid:h.valid})))})),a}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach(e=>{gT.prototype[e]=Uc.prototype[e]});class Ub extends gT{constructor(t){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],t&&(this.packetListToStructure(t,new Set([ve.packet.secretKey,ve.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(t=Lt){return ih(ve.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,t)}}class fh extends Ub{constructor(t){if(super(),this.packetListToStructure(t,new Set([ve.packet.publicKey,ve.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const t=new Gn,n=this.toPacketList();for(const r of n)switch(r.constructor.tag){case ve.packet.secretKey:{const i=ts.fromSecretKeyPacket(r);t.push(i);break}case ve.packet.secretSubkey:{const i=dh.fromSecretSubkeyPacket(r);t.push(i);break}default:t.push(r)}return new Ub(t)}armor(t=Lt){return ih(ve.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,t)}async getDecryptionKeys(t,n=new Date,r={},i=Lt){const a=this.keyPacket,l=[];for(let h=0;ht.isDecrypted())}async validate(t=Lt){if(!this.isPrivate())throw Error("Cannot validate a public key");let n;if(this.keyPacket.isDummy()){const r=await this.getSigningKey(null,null,void 0,{...t,rejectPublicKeyAlgorithms:new Set,minRSABits:0});r&&!r.keyPacket.isDummy()&&(n=r.keyPacket)}else n=this.keyPacket;if(n)return n.validate();{const r=this.getKeys();if(r.map(i=>i.keyPacket.isDummy()).every(Boolean))throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(r.map(async i=>i.keyPacket.validate()))}}clearPrivateParams(){this.getKeys().forEach(({keyPacket:t})=>{t.isDecrypted()&&t.clearPrivateParams()})}async revoke({flag:t=ve.reasonForRevocation.noReason,string:n=""}={},r=new Date,i=Lt){if(!this.isPrivate())throw Error("Need private key for revoking");const a={key:this.keyPacket},l=this.clone();return l.revocationSignatures.push(await bu(a,null,this.keyPacket,{signatureType:ve.signature.keyRevocation,reasonForRevocationFlag:ve.write(ve.reasonForRevocation,t),reasonForRevocationString:n},r,void 0,void 0,void 0,i)),l}async addSubkey(t={}){const n={...Lt,...t.config};if(t.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(t.rsaBits_!==m)]}const s=p_.fromObject(l),p={};p.userID=s,p.key=e;const d=new di;return d.signatureType=ve.signature.certGeneric,d.publicKeyAlgorithm=e.algorithm,d.hashAlgorithm=await v_(null,e,void 0,void 0,r),d.keyFlags=[ve.keyFlags.certifyKeys|ve.keyFlags.signData],d.preferredSymmetricAlgorithms=h([ve.symmetric.aes256,ve.symmetric.aes128,ve.symmetric.aes192],r.preferredSymmetricAlgorithm),r.aeadProtect&&(d.preferredAEADAlgorithms=h([ve.aead.eax,ve.aead.ocb],r.preferredAEADAlgorithm)),d.preferredHashAlgorithms=h([ve.hash.sha256,ve.hash.sha512],r.preferredHashAlgorithm),d.preferredCompressionAlgorithms=h([ve.compression.zlib,ve.compression.zip,ve.compression.uncompressed],r.preferredCompressionAlgorithm),c===0&&(d.isPrimaryUserID=!0),d.features=[0],d.features[0]|=ve.features.modificationDetection,r.aeadProtect&&(d.features[0]|=ve.features.aead),r.v5Keys&&(d.features[0]|=ve.features.v5Keys),n.keyExpirationTime>0&&(d.keyExpirationTime=n.keyExpirationTime,d.keyNeverExpires=!1),await d.sign(e,p,n.date),{userIDPacket:s,signaturePacket:d}})).then(l=>{l.forEach(({userIDPacket:c,signaturePacket:h})=>{i.push(c),i.push(h)})}),await Promise.all(t.map(async function(l,c){const h=n.subkeys[c];return{secretSubkeyPacket:l,subkeySignaturePacket:await mT(l,e,h,r)}})).then(l=>{l.forEach(({secretSubkeyPacket:c,subkeySignaturePacket:h})=>{i.push(c),i.push(h)})});const a={key:e};return i.push(await bu(a,null,e,{signatureType:ve.signature.keyRevocation,reasonForRevocationFlag:ve.reasonForRevocation.noReason,reasonForRevocationString:""},n.date,void 0,void 0,void 0,r)),n.passphrase&&e.clearPrivateParams(),await Promise.all(t.map(async function(l,c){n.subkeys[c].passphrase&&l.clearPrivateParams()})),new fh(i)}async function xX({armoredKey:e,binaryKey:t,config:n,...r}){if(n={...Lt,...n},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!Te.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!Te.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const i=Object.keys(r);if(i.length>0)throw Error("Unknown option: "+i.join(", "));let a;if(e){const{type:l,data:c}=await rh(e,n);if(l!==ve.armor.publicKey&&l!==ve.armor.privateKey)throw Error("Armored text not of type key");a=c}else a=t;return wX(await Gn.fromBinary(a,_T,n))}async function SX({armoredKey:e,binaryKey:t,config:n,...r}){if(n={...Lt,...n},!e&&!t)throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!Te.isString(e))throw Error("readPrivateKey: options.armoredKey must be a string");if(t&&!Te.isUint8Array(t))throw Error("readPrivateKey: options.binaryKey must be a Uint8Array");const i=Object.keys(r);if(i.length>0)throw Error("Unknown option: "+i.join(", "));let a;if(e){const{type:c,data:h}=await rh(e,n);if(c!==ve.armor.privateKey)throw Error("Armored text not of type private key");a=h}else a=t;const l=await Gn.fromBinary(a,_T,n);return new fh(l)}const EX=Te.constructAllowedPackets([qc,ch,f_,hT,gX,Lb,Fc,is,di]),DX=Te.constructAllowedPackets([Fc]),kX=Te.constructAllowedPackets([di]);class Ma{constructor(t){this.packets=t||new Gn}getEncryptionKeyIDs(){const t=[];return this.packets.filterByTag(ve.packet.publicKeyEncryptedSessionKey).forEach(function(n){t.push(n.publicKeyID)}),t}getSigningKeyIDs(){const t=this.unwrapCompressed(),n=t.packets.filterByTag(ve.packet.onePassSignature);return n.length>0?n.map(r=>r.issuerKeyID):t.packets.filterByTag(ve.packet.signature).map(r=>r.issuerKeyID)}async decrypt(t,n,r,i=new Date,a=Lt){const l=r||await this.decryptSessionKeys(t,n,i,a),c=this.packets.filterByTag(ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData);if(c.length===0)throw Error("No encrypted data found");const h=c[0];let s=null;const p=Promise.all(l.map(async({algorithm:v,data:m})=>{if(!Te.isUint8Array(m)||!Te.isString(v))throw Error("Invalid session key for decryption.");try{const _=ve.write(ve.symmetric,v);await h.decrypt(_,m,a)}catch(_){Te.printDebugError(_),s=_}}));if(wb(h.encrypted),h.encrypted=null,await p,!h.packets||!h.packets.length)throw s||Error("Decryption failed.");const d=new Ma(h.packets);return h.packets=new Gn,d}async decryptSessionKeys(t,n,r=new Date,i=Lt){let a,l=[];if(n){const c=this.packets.filterByTag(ve.packet.symEncryptedSessionKey);if(c.length===0)throw Error("No symmetrically encrypted session key packet found.");await Promise.all(n.map(async function(h,s){let p;p=s?await Gn.fromBinary(c.write(),DX,i):c,await Promise.all(p.map(async function(d){try{await d.decrypt(h),l.push(d)}catch(v){Te.printDebugError(v)}}))}))}else{if(!t)throw Error("No key or password specified.");{const c=this.packets.filterByTag(ve.packet.publicKeyEncryptedSessionKey);if(c.length===0)throw Error("No public key encrypted session key packet found.");await Promise.all(c.map(async function(h){await Promise.all(t.map(async function(s){let p=[ve.symmetric.aes256,ve.symmetric.aes128,ve.symmetric.tripledes,ve.symmetric.cast5];try{const v=await s.getPrimaryUser(r,void 0,i);v.selfCertification.preferredSymmetricAlgorithms&&(p=p.concat(v.selfCertification.preferredSymmetricAlgorithms))}catch{}const d=(await s.getDecryptionKeys(h.publicKeyID,null,void 0,i)).map(v=>v.keyPacket);await Promise.all(d.map(async function(v){if(!(!v||v.isDummy())){if(!v.isDecrypted())throw Error("Decryption key is not decrypted.");if(i.constantTimePKCS1Decryption&&(h.publicKeyAlgorithm===ve.publicKey.rsaEncrypt||h.publicKeyAlgorithm===ve.publicKey.rsaEncryptSign||h.publicKeyAlgorithm===ve.publicKey.rsaSign||h.publicKeyAlgorithm===ve.publicKey.elgamal)){const m=h.write();await Promise.all(Array.from(i.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map(async _=>{const y=new Lb;y.read(m);const b={sessionKeyAlgorithm:_,sessionKey:Kt.generateSessionKey(_)};try{await y.decrypt(v,b),l.push(y)}catch(E){Te.printDebugError(E),a=E}}))}else try{if(await h.decrypt(v),!p.includes(ve.write(ve.symmetric,h.sessionKeyAlgorithm)))throw Error("A non-preferred symmetric algorithm was used.");l.push(h)}catch(m){Te.printDebugError(m),a=m}}}))})),wb(h.encrypted),h.encrypted=null}))}}if(l.length>0){if(l.length>1){const c=new Set;l=l.filter(h=>{const s=h.sessionKeyAlgorithm+Te.uint8ArrayToString(h.sessionKey);return!c.has(s)&&(c.add(s),!0)})}return l.map(c=>({data:c.sessionKey,algorithm:ve.read(ve.symmetric,c.sessionKeyAlgorithm)}))}throw a||Error("Session key decryption failed.")}getLiteralData(){const t=this.unwrapCompressed().packets.findPacket(ve.packet.literalData);return t&&t.getBytes()||null}getFilename(){const t=this.unwrapCompressed().packets.findPacket(ve.packet.literalData);return t&&t.getFilename()||null}getText(){const t=this.unwrapCompressed().packets.findPacket(ve.packet.literalData);return t?t.getText():null}static async generateSessionKey(t=[],n=new Date,r=[],i=Lt){const a=await Fb("symmetric",t,n,r,i),l=ve.read(ve.symmetric,a),c=i.aeadProtect&&await async function(h,s=new Date,p=[],d=Lt){let v=!0;return await Promise.all(h.map(async function(m,_){const y=await m.getPrimaryUser(s,p[_],d);y.selfCertification.features&&y.selfCertification.features[0]&ve.features.aead||(v=!1)})),v}(t,n,r,i)?ve.read(ve.aead,await Fb("aead",t,n,r,i)):void 0;return{data:Kt.generateSessionKey(a),algorithm:l,aeadAlgorithm:c}}async encrypt(t,n,r,i=!1,a=[],l=new Date,c=[],h=Lt){if(r){if(!Te.isUint8Array(r.data)||!Te.isString(r.algorithm))throw Error("Invalid session key for encryption.")}else if(t&&t.length)r=await Ma.generateSessionKey(t,l,c,h);else{if(!n||!n.length)throw Error("No keys, passwords, or session key provided.");r=await Ma.generateSessionKey(void 0,void 0,void 0,h)}const{data:s,algorithm:p,aeadAlgorithm:d}=r,v=await Ma.encryptSessionKey(s,p,d,t,n,i,a,l,c,h);let m;d?(m=new f_,m.aeadAlgorithm=ve.write(ve.aead,d)):m=new hT,m.packets=this.packets;const _=ve.write(ve.symmetric,p);return await m.encrypt(_,s,h),v.packets.push(m),m.packets=new Gn,v}static async encryptSessionKey(t,n,r,i,a,l=!1,c=[],h=new Date,s=[],p=Lt){const d=new Gn,v=ve.write(ve.symmetric,n),m=r&&ve.write(ve.aead,r);if(i){const _=await Promise.all(i.map(async function(y,b){const E=await y.getEncryptionKey(c[b],h,s,p),k=new Lb;return k.publicKeyID=l?vl.wildcard():E.getKeyID(),k.publicKeyAlgorithm=E.keyPacket.algorithm,k.sessionKey=t,k.sessionKeyAlgorithm=v,await k.encrypt(E.keyPacket),delete k.sessionKey,k}));d.push(..._)}if(a){const _=async function(k,C){try{return await k.decrypt(C),1}catch{return 0}},y=(k,C)=>k+C,b=async function(k,C,x,D){const P=new Fc(p);return P.sessionKey=k,P.sessionKeyAlgorithm=C,x&&(P.aeadAlgorithm=x),await P.encrypt(D,p),p.passwordCollisionCheck&&(await Promise.all(a.map(w=>_(P,w)))).reduce(y)!==1?b(k,C,D):(delete P.sessionKey,P)},E=await Promise.all(a.map(k=>b(t,v,m,k)));d.push(...E)}return new Ma(d)}async sign(t=[],n=null,r=[],i=new Date,a=[],l=[],c=Lt){const h=new Gn,s=this.packets.findPacket(ve.packet.literalData);if(!s)throw Error("No literal data packet to sign.");let p,d;const v=s.text===null?ve.signature.binary:ve.signature.text;if(n)for(d=n.packets.filterByTag(ve.packet.signature),p=d.length-1;p>=0;p--){const m=d[p],_=new is;_.signatureType=m.signatureType,_.hashAlgorithm=m.hashAlgorithm,_.publicKeyAlgorithm=m.publicKeyAlgorithm,_.issuerKeyID=m.issuerKeyID,t.length||p!==0||(_.flags=1),h.push(_)}return await Promise.all(Array.from(t).reverse().map(async function(m,_){if(!m.isPrivate())throw Error("Need private key for signing");const y=r[t.length-1-_],b=await m.getSigningKey(y,i,a,c),E=new is;return E.signatureType=v,E.hashAlgorithm=await v_(m,b.keyPacket,i,a,c),E.publicKeyAlgorithm=b.keyPacket.algorithm,E.issuerKeyID=b.getKeyID(),_===t.length-1&&(E.flags=1),E})).then(m=>{m.forEach(_=>h.push(_))}),h.push(s),h.push(...await g4(s,t,n,r,i,a,l,!1,c)),new Ma(h)}compress(t,n=Lt){if(t===ve.compression.uncompressed)return this;const r=new ch(n);r.algorithm=t,r.packets=this.packets;const i=new Gn;return i.push(r),new Ma(i)}async signDetached(t=[],n=null,r=[],i=new Date,a=[],l=[],c=Lt){const h=this.packets.findPacket(ve.packet.literalData);if(!h)throw Error("No literal data packet to sign.");return new pT(await g4(h,t,n,r,i,a,l,!0,c))}async verify(t,n=new Date,r=Lt){const i=this.unwrapCompressed(),a=i.packets.filterByTag(ve.packet.literalData);if(a.length!==1)throw Error("Can only verify message with one literal data packet.");Ar(i.packets.stream)&&i.packets.push(...await Ir(i.packets.stream,h=>h||[]));const l=i.packets.filterByTag(ve.packet.onePassSignature).reverse(),c=i.packets.filterByTag(ve.packet.signature);return l.length&&!c.length&&Te.isStream(i.packets.stream)&&!Ar(i.packets.stream)?(await Promise.all(l.map(async h=>{h.correspondingSig=new Promise((s,p)=>{h.correspondingSigResolve=s,h.correspondingSigReject=p}),h.signatureData=wl(async()=>(await h.correspondingSig).signatureData),h.hashed=Ir(await h.hash(h.signatureType,a[0],void 0,!1)),h.hashed.catch(()=>{})})),i.packets.stream=xo(i.packets.stream,async(h,s)=>{const p=qs(h),d=ea(s);try{for(let v=0;v{m.correspondingSigReject(v)}),await d.abort(v)}}),o0(l,a,t,n,!1,r)):o0(c,a,t,n,!1,r)}verifyDetached(t,n,r=new Date,i=Lt){const a=this.unwrapCompressed().packets.filterByTag(ve.packet.literalData);if(a.length!==1)throw Error("Can only verify message with one literal data packet.");return o0(t.packets,a,n,r,!0,i)}unwrapCompressed(){const t=this.packets.filterByTag(ve.packet.compressedData);return t.length?new Ma(t[0].packets):this}async appendSignature(t,n=Lt){await this.packets.read(Te.isUint8Array(t)?t:(await rh(t)).data,kX,n)}write(){return this.packets.write()}armor(t=Lt){return ih(ve.armor.message,this.write(),null,null,null,t)}}async function g4(e,t,n=null,r=[],i=new Date,a=[],l=[],c=!1,h=Lt){const s=new Gn,p=e.text===null?ve.signature.binary:ve.signature.text;if(await Promise.all(t.map(async(d,v)=>{const m=a[v];if(!d.isPrivate())throw Error("Need private key for signing");const _=await d.getSigningKey(r[v],i,m,h);return bu(e,d,_.keyPacket,{signatureType:p},i,m,l,c,h)})).then(d=>{s.push(...d)}),n){const d=n.packets.filterByTag(ve.packet.signature);s.push(...d)}return s}async function o0(e,t,n,r=new Date,i=!1,a=Lt){return Promise.all(e.filter(function(l){return["text","binary"].includes(ve.read(ve.signature,l.signatureType))}).map(async function(l){return async function(c,h,s,p=new Date,d=!1,v=Lt){let m,_;for(const E of s){const k=E.getKeys(c.issuerKeyID);if(k.length>0){m=E,_=k[0];break}}const y=c instanceof is?c.correspondingSig:c,b={keyID:c.issuerKeyID,verified:(async()=>{if(!_)throw Error("Could not find signing key with key ID "+c.issuerKeyID.toHex());await c.verify(_.keyPacket,c.signatureType,h[0],p,d,v);const E=await y;if(_.getCreationTime()>E.created)throw Error("Key is newer than the signature");try{await m.getSigningKey(_.getKeyID(),E.created,void 0,v)}catch(k){if(!v.allowInsecureVerificationWithReformattedKeys||!k.message.match(/Signature creation time is in the future/))throw k;await m.getSigningKey(_.getKeyID(),p,void 0,v)}return!0})(),signature:(async()=>{const E=await y,k=new Gn;return E&&k.push(E),new pT(k)})()};return b.signature.catch(()=>{}),b.verified.catch(()=>{}),b}(l,t,n,r,i,a)}))}async function OX({armoredMessage:e,binaryMessage:t,config:n,...r}){n={...Lt,...n};let i=e||t;if(!i)throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`");if(e&&!Te.isString(e)&&!Te.isStream(e))throw Error("readMessage: options.armoredMessage must be a string or stream");if(t&&!Te.isUint8Array(t)&&!Te.isStream(t))throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream");const a=Object.keys(r);if(a.length>0)throw Error("Unknown option: "+a.join(", "));const l=Te.isStream(i);if(l&&(await Y8(),i=nh(i)),e){const{type:s,data:p}=await rh(i,n);if(s!==ve.armor.message)throw Error("Armored text not of type message");i=p}const c=await Gn.fromBinary(i,EX,n),h=new Ma(c);return h.fromStream=l,h}async function PX({text:e,binary:t,filename:n,date:r=new Date,format:i=e!==void 0?"utf8":"binary",...a}){let l=e!==void 0?e:t;if(l===void 0)throw Error("createMessage: must pass options object containing `text` or `binary`");if(e&&!Te.isString(e)&&!Te.isStream(e))throw Error("createMessage: options.text must be a string or stream");if(t&&!Te.isUint8Array(t)&&!Te.isStream(t))throw Error("createMessage: options.binary must be a Uint8Array or stream");const c=Object.keys(a);if(c.length>0)throw Error("Unknown option: "+c.join(", "));const h=Te.isStream(l);h&&(await Y8(),l=nh(l));const s=new qc(r);e!==void 0?s.setText(l,ve.write(ve.literal,i)):s.setBytes(l,ve.write(ve.literal,i)),n!==void 0&&s.setFilename(n);const p=new Gn;p.push(s);const d=new Ma(p);return d.fromStream=h,d}async function TX({userIDs:e=[],passphrase:t,type:n="ecc",rsaBits:r=4096,curve:i="curve25519",keyExpirationTime:a=0,date:l=new Date,subkeys:c=[{}],format:h="armored",config:s,...p}){m_(s={...Lt,...s}),e=va(e);const d=Object.keys(p);if(d.length>0)throw Error("Unknown option: "+d.join(", "));if(e.length===0)throw Error("UserIDs are required for key generation");if(n==="rsa"&&rBb(y.subkeys[P],y));let E=[yX(y,b)];E=E.concat(y.subkeys.map(D=>vT(D,b)));const k=await Promise.all(E),C=await CX(k[0],k.slice(1),y,b),x=await C.getRevocationCertificate(y.date,b);return C.revocationSignatures=[],{key:C,revocationCertificate:x}}(v,s);return m.getKeys().forEach(({keyPacket:y})=>yc(y,s)),{privateKey:_4(m,h,s),publicKey:_4(m.toPublic(),h,s),revocationCertificate:_}}catch(m){throw Te.wrapError("Error generating keypair",m)}}async function AX({privateKey:e,passphrase:t,config:n,...r}){m_(n={...Lt,...n});const i=Object.keys(r);if(i.length>0)throw Error("Unknown option: "+i.join(", "));if(!e.isPrivate())throw Error("Cannot decrypt a public key");const a=e.clone(!0),l=Te.isArray(t)?t:[t];try{return await Promise.all(a.getKeys().map(c=>Te.anyPromise(l.map(h=>c.keyPacket.decrypt(h))))),await a.validate(n),a}catch(c){throw a.clearPrivateParams(),Te.wrapError("Error decrypting private key",c)}}async function MX({message:e,encryptionKeys:t,signingKeys:n,passwords:r,sessionKey:i,format:a="armored",signature:l=null,wildcard:c=!1,signingKeyIDs:h=[],encryptionKeyIDs:s=[],date:p=new Date,signingUserIDs:d=[],encryptionUserIDs:v=[],signatureNotations:m=[],config:_,...y}){if(m_(_={...Lt,..._}),yT(e),$X(a),t=va(t),n=va(n),r=va(r),h=va(h),s=va(s),d=va(d),v=va(v),m=va(m),y.detached)throw Error("The `detached` option has been removed from openpgp.encrypt, separately call openpgp.sign instead. Don't forget to remove the `privateKeys` option as well.");if(y.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.encrypt, pass `encryptionKeys` instead");if(y.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.encrypt, pass `signingKeys` instead");if(y.armor!==void 0)throw Error("The `armor` option has been removed from openpgp.encrypt, pass `format` instead.");const b=Object.keys(y);if(b.length>0)throw Error("Unknown option: "+b.join(", "));n||(n=[]);const E=e.fromStream;try{if((n.length||l)&&(e=await e.sign(n,l,h,p,d,m,_)),e=e.compress(await Fb("compression",t,p,v,_),_),e=await e.encrypt(t,r,i,c,s,p,v,_),a==="object")return e;const k=a==="armored";return bT(k?e.armor(_):e.write(),E,k?"utf8":"binary")}catch(k){throw Te.wrapError("Error encrypting message",k)}}async function IX({message:e,decryptionKeys:t,passwords:n,sessionKeys:r,verificationKeys:i,expectSigned:a=!1,format:l="utf8",signature:c=null,date:h=new Date,config:s,...p}){if(m_(s={...Lt,...s}),yT(e),i=va(i),t=va(t),n=va(n),r=va(r),p.privateKeys)throw Error("The `privateKeys` option has been removed from openpgp.decrypt, pass `decryptionKeys` instead");if(p.publicKeys)throw Error("The `publicKeys` option has been removed from openpgp.decrypt, pass `verificationKeys` instead");const d=Object.keys(p);if(d.length>0)throw Error("Unknown option: "+d.join(", "));try{const v=await e.decrypt(t,n,r,h,s);i||(i=[]);const m={};if(m.signatures=c?await v.verifyDetached(c,i,h,s):await v.verify(i,h,s),m.data=l==="binary"?v.getLiteralData():v.getText(),m.filename=v.getFilename(),LX(m,e),a){if(i.length===0)throw Error("Verification keys are required to verify message signatures");if(m.signatures.length===0)throw Error("Message is not signed");m.data=Yi([m.data,wl(async()=>{await Te.anyPromise(m.signatures.map(_=>_.verified))})])}return m.data=await bT(m.data,e.fromStream,l),m}catch(v){throw Te.wrapError("Error decrypting message",v)}}function yT(e){if(!(e instanceof Ma))throw Error("Parameter [message] needs to be of type Message")}function $X(e){if(e!=="armored"&&e!=="binary"&&e!=="object")throw Error("Unsupported format "+e)}const RX=Object.keys(Lt).length;function m_(e){const t=Object.keys(e);if(t.length!==RX){for(const n of t)if(Lt[n]===void 0)throw Error("Unknown config property: "+n)}}function va(e){return e&&!Te.isArray(e)&&(e=[e]),e}async function bT(e,t,n="utf8"){const r=Te.isStream(e);return r==="array"?Ir(e):t==="node"?(e=_2(e),n!=="binary"&&e.setEncoding(n),e):t==="web"&&r==="ponyfill"?K8(e):e}function LX(e,t){e.data=xo(t.packets.stream,async(n,r)=>{await pl(e.data,r,{preventClose:!0});const i=ea(r);try{await Ir(n,a=>a),await i.close()}catch(a){await i.abort(a)}})}function _4(e,t,n){switch(t){case"object":return e;case"armored":return e.armor(n);case"binary":return e.write();default:throw Error("Unsupported format "+t)}}function NX(e,t,n){$A.isJson(t)||(t={});const r=e+"::"+encodeURIComponent(new URLSearchParams($.sortObject(t,["page","pagesize","hideload","timerange"])).toString()),i=n.callAt.find(a=>a.key===r)||{};return typeof i.key=="undefined"&&(i.key=r,i.updated=0,i.deleted=0,n.callAt.push(i),$A.IDBSet("callAt",n.callAt).then(a=>{})),this.get=()=>(t.timerange=t.timerange||`${i.updated}-${i.deleted}`,t),this.save=({total:a,current_page:l,deleted_id:c})=>new Promise(h=>{if(l===1){let s=!1;const p=$A.Time();a>0&&(i.updated=p,s=!0),$A.isArray(c)&&c.length>0?(i.deleted=p,s=!0):c=[],s?$A.IDBSet("callAt",n.callAt).then(d=>h(c)):h(c)}}),this.showLoad=()=>!t.hideload,this}function l0(e,t,n){return new NX(e,t,n)}function FX(e,t=!0){return e&&(t?e=String(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\n/g,"$"):e=String(e).replace(/\-/g,"+").replace(/\_/g,"/").replace(/\$/g,` `)),e}const BX={retry:5,interval:3*1e3};class UX{constructor(t,n=BX){this.url=t,this.es=null,this.options=n,this.retry=n.retry,this.timer=null}_onOpen(){window.systemInfo.debug==="yes"&&console.log("SSE open: "+this.url)}_onMessage(t,n){return r=>{this.retry=this.options.retry,typeof n=="function"&&n(t,r)}}_onError(t,n){return()=>{window.systemInfo.debug==="yes"&&console.log("SSE retry: "+this.url),this.es&&(this._removeAllEvent(t,n),this.unsunscribe()),this.retry>0&&(this.retry--,this.timer=setTimeout(()=>{this.subscribe(t,n)},this.options.interval))}}_removeAllEvent(t,n){t=$A.isArray(t)?t:[t],this.es.removeEventListener("open",this._onOpen),t.some(r=>{this.es.removeEventListener(r,this._onMessage(r,n))}),this.es.removeEventListener("error",this._onError(t,n))}subscribe(t,n){t=$A.isArray(t)?t:[t],this.es=new EventSource(this.url),this.es.addEventListener("open",this._onOpen),t.some(r=>{this.es.addEventListener(r,this._onMessage(r,n))}),this.es.addEventListener("error",this._onError(t,n))}unsunscribe(){this.es&&(this.es.close(),this.es=null),this.timer&&clearTimeout(this.timer),window.systemInfo.debug==="yes"&&console.log("SSE cancel: "+this.url)}}var jX={init({state:e,dispatch:t}){return new Promise(async n=>{let r=null;if(!await $A.IDBBoolean("initTag")){await $A.IDBSet("initTag",!0);const l=$A.getStorageJson("userInfo");l.userid>0&&(await $A.IDBSet("userInfo",l),await $A.IDBSet("cacheServerUrl",$A.getStorageString("cacheServerUrl")),window.localStorage.clear())}e.clientId=await $A.IDBString("clientId"),e.cacheServerUrl=await $A.IDBString("cacheServerUrl"),e.cacheUserBasic=await $A.IDBArray("cacheUserBasic"),e.cacheDialogs=(await $A.IDBArray("cacheDialogs")).map(l=>Object.assign(l,{loading:!1,extra_draft_has:l.extra_draft_content?1:0})),e.cacheProjects=await $A.IDBArray("cacheProjects"),e.cacheColumns=await $A.IDBArray("cacheColumns"),e.cacheTasks=await $A.IDBArray("cacheTasks"),e.cacheProjectParameter=await $A.IDBArray("cacheProjectParameter"),e.cacheTaskBrowse=await $A.IDBArray("cacheTaskBrowse"),e.dialogMsgs=await $A.IDBArray("dialogMsgs"),e.fileLists=await $A.IDBArray("fileLists"),e.userInfo=await $A.IDBJson("userInfo"),e.callAt=await $A.IDBArray("callAt"),e.cacheEmojis=await $A.IDBArray("cacheEmojis"),e.userInfo.userid&&(e.userId=e.userInfo.userid=$A.runNum(e.userInfo.userid),e.userToken=e.userInfo.token,e.userIsAdmin=$A.inArray("admin",e.userInfo.identity)),e.cacheServerUrl&&(window.systemInfo.apiUrl=e.cacheServerUrl),await t("synchTheme"),e.clientId||(e.clientId=$A.randomString(6),await $A.IDBSet("clientId",e.clientId));const a=await $A.IDBString("clearCache");a&&(await $A.IDBRemove("clearCache"),await $A.IDBSet("callAt",e.callAt=[]),a==="handle"&&await t(r="handleClearCache")),t("call",{url:"users/key/client",data:{client_id:e.clientId},encrypt:!1}).then(({data:l})=>{e.apiKeyData=l}),t("systemSetting"),await $A.loadScriptS(["language/web/key.js",`language/web/${au}.js`]),n(r)})},call({state:e,dispatch:t},n){var a;$A.isJson(n)||(n={url:n});const r={"Content-Type":"application/json",language:au,token:e.userToken,fd:$A.getSessionStorageString("userWsFd"),version:window.systemInfo.version||"0.0.1",platform:$A.Platform};if(!e.userToken&&((a=e.meetingWindow)==null?void 0:a.meetingSharekey)&&(r.sharekey=e.meetingWindow.meetingSharekey),$A.isJson(n.header)?n.header=Object.assign(r,n.header):n.header=r,n.encrypt===void 0&&$A.inArray(n.url,["users/login","users/editpass","users/operation","users/delete/account","system/license","users/bot/*","dialog/msg/*"],!0)&&(n.encrypt=!0),n.encrypt){const l=window.navigator.userAgent;(window.systemInfo.debug==="yes"||/Windows NT 5.1|Windows XP/.test(l)||l.indexOf("Windows NT 6.0")!==-1||l.indexOf("Windows NT 6.1")!==-1||l.indexOf("Windows NT 6.2")!==-1)&&(n.encrypt=!1)}n.url=$A.apiUrl(n.url),n.data=$A.date2string(n.data);const i=$A.cloneJSON(n);return new Promise(async(l,c)=>{if(/^https*:\/\/public\//.test(n.url)){c({ret:-1,data:{},msg:"No server address"});return}const h=[];if(n.encrypt===!0&&(n.data&&e.apiKeyData.type==="pgp"&&(h.push(`encrypt_type=${e.apiKeyData.type};encrypt_id=${e.apiKeyData.id}`),n.method="post",n.data={encrypted:await t("pgpEncryptApi",n.data)}),h.push("client_type=pgp;client_key="+(await t("pgpGetLocalKey")).publicKeyB64)),h.length>0&&(n.header.encrypt=h.join(";")),n.method==="post"&&(n.data=JSON.stringify(n.data)),n.spinner===!0||typeof n.spinner=="number"&&n.spinner>0){const{before:s,complete:p}=n;n.before=()=>{t("showSpinner",typeof n.spinner=="number"?n.spinner:0),typeof s=="function"&&s()},n.complete=()=>{t("hiddenSpinner"),typeof p=="function"&&p()}}if(n.success=async(s,p,d)=>{if(e.ajaxNetworkException=!1,!$A.isJson(s)){console.log(s,p,d),c({ret:-1,data:{},msg:"Return error"});return}n.encrypt===!0&&s.encrypted&&(s=await t("pgpDecryptApi",s.encrypted));const{ret:v,data:m,msg:_}=s;if(v===-1&&(e.userId=0,n.skipAuthError!==!0)){$A.modalError({content:_,onOk:()=>{t("logout")}}),c(s);return}if(v===-2&&n.checkNick!==!1){t("userEditInput","nickname").then(()=>{t("call",i).then(l).catch(c)}).catch(y=>{c({ret:-1,data:m,msg:y||$A.L("\u8BF7\u8BBE\u7F6E\u6635\u79F0\uFF01")})});return}if(v===-3&&n.checkTel!==!1){t("userEditInput","tel").then(()=>{t("call",i).then(l).catch(c)}).catch(y=>{c({ret:-1,data:m,msg:y||$A.L("\u8BF7\u8BBE\u7F6E\u8054\u7CFB\u7535\u8BDD\uFF01")})});return}v===1?l({data:m,msg:_}):(c({ret:v,data:m,msg:_||"Unknown error"}),v===-4001?t("forgetProject",m.project_id):v===-4002?t("forgetTask",m.task_id):v===-4003&&t("forgetDialog",m.dialog_id))},n.error=(s,p)=>{const d=window.navigator.onLine===!1||p===0&&s.readyState===4;if(d&&i.__networkFailureRetry!==!0){setTimeout(v=>{i.__networkFailureRetry=!0,t("call",i).then(l).catch(c)},300);return}n.checkNetwork!==!1&&(e.ajaxNetworkException=d),c(d?{ret:-1001,data:{},msg:"Network exception"}:{ret:-1,data:{},msg:"System error"}),console.error(s,p)},n.websocket===!0){const s=$A.randomString(16),p=setTimeout(()=>{const d=e.ajaxWsListener.find(v=>v.apiWebsocket==s);d&&(d.complete(),d.error("timeout"),d.after()),e.ajaxWsListener=e.ajaxWsListener.filter(v=>v.apiWebsocket!=s)},n.timeout||3e4);e.ajaxWsListener.push({apiWebsocket:s,complete:typeof n.complete=="function"?n.complete:()=>{},success:typeof n.success=="function"?n.success:()=>{},error:typeof n.error=="function"?n.error:()=>{},after:typeof n.after=="function"?n.after:()=>{}}),n.complete=()=>{},n.success=()=>{},n.error=()=>{},n.after=()=>{},n.header["Api-Websocket"]=s,e.ajaxWsReady===!1&&(e.ajaxWsReady=!0,t("websocketMsgListener",{name:"apiWebsocket",callback:d=>{switch(d.type){case"apiWebsocket":clearTimeout(p);const v=d.apiWebsocket,m=d.apiSuccess,_=d.data,y=e.ajaxWsListener.find(b=>b.apiWebsocket==v);y&&(y.complete(),m?y.success(_):y.error(_),y.after()),e.ajaxWsListener=e.ajaxWsListener.filter(b=>b.apiWebsocket!=v);break}}}))}$A.ajaxc(n)})},systemSetting({dispatch:e,state:t}){return new Promise((n,r)=>{switch(t.systemConfig.__state){case"success":n(t.systemConfig);break;case"loading":setTimeout(i=>{e("systemSetting").then(n).catch(r)},100);break;default:t.systemConfig.__state="loading",e("call",{url:"system/setting"}).then(({data:i})=>{t.systemConfig=Object.assign(i,{__state:"success"}),n(t.systemConfig)}).catch(i=>{t.systemConfig.__state="error",r()});break}})},needHome({dispatch:e,state:t}){return new Promise((n,r)=>{e("systemSetting").then(i=>{i.start_home==="open"?n():r()}).catch(r)})},downUrl({state:e},t){if(!t)return;let n=t,r=!0;if($A.isJson(t)&&(n=t.url,r=!!t.token),r){let i={token:e.userToken};$A.isJson(t)&&(n=t.url,i=t.params||{}),n=$A.urlAddParams(n,i)}$A.Electron?$A.Electron.request({action:"openExternal",url:n},()=>{},()=>{}):$A.isEEUiApp?$A.eeuiAppOpenWeb(n):window.open(n)},filePos({state:e,dispatch:t},n){if($A.isSubElectron){$A.execMainDispatch("filePos",n),$A.Electron.sendMessage("mainWindowActive");return}t("openTask",0),e.windowPortrait&&t("openDialog",0),$A.goForward({name:"manage-file",params:n})},toggleProjectParameter({state:e},t){$A.execMainDispatch("toggleProjectParameter",t);let n=t,r=null,i=e.projectId;if($A.isJson(t)&&(n=t.key,r=t.value,i=t.project_id),i){let a=e.cacheProjectParameter.findIndex(c=>c.project_id==i);a===-1&&(e.cacheProjectParameter.push($A.projectParameterTemplate(i)),a=e.cacheProjectParameter.findIndex(c=>c.project_id==i));const l=e.cacheProjectParameter[a];$A.isJson(n)||(n={[n]:r||!l[n]}),e.cacheProjectParameter.splice(a,1,Object.assign(l,n)),$A.IDBSave("cacheProjectParameter",e.cacheProjectParameter)}},setTheme({state:e},t){return new Promise(function(n){if(t===void 0){n(!1);return}if(!$A.dark.utils.supportMode()){$A.isEEUiApp?$A.modalWarning("\u4EC5Android\u8BBE\u7F6E\u652F\u6301\u4E3B\u9898\u529F\u80FD"):$A.modalWarning("\u4EC5\u5BA2\u6237\u7AEF\u6216Chrome\u6D4F\u89C8\u5668\u652F\u6301\u4E3B\u9898\u529F\u80FD"),n(!1);return}switch(t){case"dark":$A.dark.enableDarkMode();break;case"light":$A.dark.disableDarkMode();break;default:$A.dark.autoDarkMode();break}e.themeMode=t,e.themeIsDark=$A.dark.isDarkEnabled(),window.localStorage.setItem("__theme:mode__",t),n(!0)})},synchTheme({state:e}){switch(e.themeMode){case"dark":$A.dark.enableDarkMode();break;case"light":$A.dark.disableDarkMode();break;default:e.themeMode="auto",$A.dark.autoDarkMode();break}e.themeIsDark=$A.dark.isDarkEnabled()},getBasicData({state:e,dispatch:t},n){if(typeof n=="number"){window.__getBasicDataTimer&&clearTimeout(window.__getBasicDataTimer),n>-1&&(window.__getBasicDataTimer=setTimeout(a=>t("getBasicData",null),n));return}const r=e.userId+$A.Time();if(window.__getBasicDataKey===r)return;window.__getBasicDataKey=r,t("getProjects").catch(()=>{}),t("getDialogs").catch(()=>{}),t("getReportUnread",1e3),t("getApproveUnread",1e3),t("getTaskForDashboard"),t("dialogMsgRead");const i=Object.values(e.userAvatar).map(({userid:a})=>a);[...new Set(i)].some(a=>t("getUserBasic",{userid:a}))},getReportUnread({state:e,dispatch:t},n){window.__getReportUnread&&clearTimeout(window.__getReportUnread),window.__getReportUnread=setTimeout(()=>{e.userId===0?e.reportUnreadNumber=0:t("call",{url:"report/unread"}).then(({data:r})=>{e.reportUnreadNumber=r.total||0}).catch(r=>{})},typeof n=="number"?n:1e3)},getApproveUnread({state:e,dispatch:t},n){window.__getApproveUnread&&clearTimeout(window.__getApproveUnread),window.__getApproveUnread=setTimeout(()=>{e.userId===0?e.approveUnreadNumber=0:t("call",{url:"approve/process/findTask",data:{page:1,page_size:500}}).then(({data:r})=>{e.approveUnreadNumber=r.total||0}).catch(r=>{})},typeof n=="number"?n:1e3)},getUserInfo({dispatch:e}){return new Promise(function(t,n){e("call",{url:"users/info"}).then(r=>{e("saveUserInfo",r.data),t(r)}).catch(r=>{console.warn(r),n(r)})})},saveUserInfoBase({state:e,dispatch:t},n){return new Promise(async r=>{const i=$A.cloneJSON(n);i.userid=$A.runNum(i.userid),i.token=i.userid>0?i.token||e.userToken:"",e.userInfo=i,e.userId=i.userid,e.userToken=i.token,e.userIsAdmin=$A.inArray("admin",i.identity),await $A.IDBSet("userInfo",e.userInfo),$A.eeuiAppSendMessage({action:"userChatList",token:e.userToken,url:$A.apiUrl("../api/users/share/list")+`?token=${e.userToken}`}),$A.eeuiAppSendMessage({action:"userUploadUrl",token:e.userToken,dirUrl:$A.apiUrl("../api/file/content/upload")+`?token=${e.userToken}`,chatUrl:$A.apiUrl("../api/dialog/msg/sendfiles")+`?token=${e.userToken}`}),r()})},saveUserInfo({state:e,dispatch:t},n){return new Promise(async r=>{await t("saveUserInfoBase",n),t("getBasicData",null),e.userId>0&&(e.cacheUserBasic=e.cacheUserBasic.filter(({userid:i})=>i!==e.userId),t("saveUserBasic",e.userInfo)),r()})},getUserBasic({state:e,dispatch:t},n){if(e.loadUserBasic===!0){n&&e.cacheUserWait.push(n);return}let r=$A.Time(),i=$A.cloneJSON(e.cacheUserWait);n&&n.userid&&i.push(n),e.cacheUserWait=[];let a=[],l=0;i.some(c=>{let h=e.cacheUserBasic.find(({userid:s})=>s==c.userid);if(h&&r-h._time<=30)return setTimeout(()=>{e.cacheUserActive=Object.assign(h,{__:Math.random()}),Ts.Store.set("userActive",{type:"cache",data:h})},l+=5),!1;a.push(c)}),a.length!==0&&(a.length>30&&(e.cacheUserWait=a.slice(30),a=a.slice(0,30)),e.loadUserBasic=!0,t("call",{url:"users/basic",data:{userid:[...new Set(a.map(({userid:c})=>c))]},skipAuthError:!0}).then(c=>{r=$A.Time(),a.forEach(h=>{let s=c.data.find(({userid:p})=>p==h.userid)||Object.assign(h,{email:""});s._time=r,t("saveUserBasic",s)}),e.loadUserBasic=!1,t("getUserBasic")}).catch(c=>{console.warn(c),e.loadUserBasic=!1,t("getUserBasic")}))},saveUserBasic({state:e},t){$A.execMainDispatch("saveUserBasic",t);const n=e.cacheUserBasic.findIndex(({userid:r})=>r==t.userid);n>-1?(t=Object.assign({},e.cacheUserBasic[n],t),e.cacheUserBasic.splice(n,1,t)):e.cacheUserBasic.push(t),e.cacheUserActive=Object.assign(t,{__:Math.random()}),Ts.Store.set("userActive",{type:"cache",data:t}),$A.IDBSave("cacheUserBasic",e.cacheUserBasic)},userEditInput({dispatch:e},t){return new Promise(function(n,r){let i="";if(t==="nickname")i="\u6635\u79F0";else if(t==="tel")i="\u8054\u7CFB\u7535\u8BDD";else{r("\u53C2\u6570\u9519\u8BEF");return}setTimeout(a=>{$A.modalInput({title:`\u8BBE\u7F6E${i}`,placeholder:`\u8BF7\u8F93\u5165\u60A8\u7684${i}`,okText:"\u4FDD\u5B58",onOk:l=>l?new Promise((c,h)=>{e("call",{url:"users/editdata",data:{[t]:l},checkNick:!1,checkTel:!1}).then(()=>{e("getUserInfo").finally(s=>{c(),n()})}).catch(({msg:s})=>{h(s)})}):`\u8BF7\u8F93\u5165${i}`,onCancel:l=>r})},100)})},logout({state:e,dispatch:t},n=!0){t("handleClearCache",{}).then(()=>{let r=["/","/login"].includes(window.location.pathname)?"":encodeURIComponent(window.location.href);n===!1&&(r=null),$A.goForward({name:"login",query:r?{from:r}:{}},!0)})},handleClearCache({state:e,dispatch:t},n){return new Promise(async r=>{try{e.cacheUserBasic=[],e.cacheDialogs=[],e.cacheProjects=[],e.cacheColumns=[],e.cacheTasks=[],e.callAt=[];const i=window.localStorage.getItem("__language:type__"),a=window.localStorage.getItem("__keyboard:data__"),l=window.localStorage.getItem("__theme:mode__");window.localStorage.clear(),window.localStorage.setItem("__language:type__",i),window.localStorage.setItem("__keyboard:data__",a),window.localStorage.setItem("__theme:mode__",l);const c=await $A.IDBString("cacheLoginEmail"),h=await $A.IDBJson("cacheFileSort");await $A.IDBClear(),await $A.IDBSet("clientId",e.clientId),await $A.IDBSet("cacheServerUrl",e.cacheServerUrl),await $A.IDBSet("cacheProjectParameter",e.cacheProjectParameter),await $A.IDBSet("cacheLoginEmail",c),await $A.IDBSet("cacheFileSort",h),await $A.IDBSet("cacheTaskBrowse",e.cacheTaskBrowse),await $A.IDBSet("cacheEmojis",e.cacheEmojis),t("saveUserInfoBase",$A.isJson(n)?n:e.userInfo).then(r)}catch{r()}})},saveFile({state:e,dispatch:t},n){if($A.execMainDispatch("saveFile",n),$A.isArray(n))n.forEach(r=>{t("saveFile",r)});else if($A.isJson(n)){let r={_load:!1,_edit:!1};const i=e.fileLists.findIndex(({id:a})=>a==n.id);i>-1?e.fileLists.splice(i,1,Object.assign(r,e.fileLists[i],n)):e.fileLists.push(Object.assign(r,n)),$A.IDBSave("fileLists",e.fileLists,600)}},forgetFile({state:e,dispatch:t},n){$A.execMainDispatch("forgetFile",n),($A.isArray(n)?n:[n]).some(i=>{e.fileLists=e.fileLists.filter(a=>a.id!=i),e.fileLists.some(a=>{a.pid==i&&t("forgetFile",a.id)}),$A.IDBSave("fileLists",e.fileLists,600)})},packProgress({state:e,dispatch:t},n){$A.execMainDispatch("packProgress",n);const r=e.filePackLists.findIndex(({name:i})=>i==n.name);r>-1?e.filePackLists[r].progress=n.progress:(e.filePackLists.push(n),$A.IDBSave("filePackLists",e.filePackLists,600))},getFiles({state:e,dispatch:t},n){return new Promise(function(r,i){t("call",{url:"file/lists",data:{pid:n}}).then(a=>{const l=a.data.map(({id:c})=>c);e.fileLists=e.fileLists.filter(c=>c.pid!=n||l.includes(c.id)),$A.IDBSave("fileLists",e.fileLists,600),t("saveFile",a.data),r(a)}).catch(a=>{console.warn(a),i(a)})})},searchFiles({state:e,dispatch:t},n){return $A.isJson(n)||(n={key:n}),new Promise(function(r,i){t("call",{url:"file/search",data:n}).then(a=>{t("saveFile",a.data),r(a)}).catch(a=>{console.warn(a),i(a)})})},saveProject({state:e,dispatch:t},n){if($A.execMainDispatch("saveProject",n),$A.isArray(n))n.forEach(r=>{t("saveProject",r)});else if($A.isJson(n)){typeof n.project_column!="undefined"&&(t("saveColumn",n.project_column),delete n.project_column);const r=e.cacheProjects.findIndex(({id:i})=>i==n.id);r>-1?e.cacheProjects.splice(r,1,Object.assign({},e.cacheProjects[r],n)):(typeof n.project_user=="undefined"&&(n.project_user=[]),e.cacheProjects.push(n),e.projectTotal++),e.cacheDialogs.some(i=>{if(i.type=="group"&&i.group_type=="project"&&i.group_info.id==n.id){n.name!==void 0&&(i.name=n.name);for(let a in i.group_info)!i.group_info.hasOwnProperty(a)||n[a]===void 0||(i.group_info[a]=n[a])}}),$A.IDBSave("cacheProjects",e.cacheProjects)}},forgetProject({state:e,dispatch:t},n){$A.execMainDispatch("forgetProject",n);const r=$A.isArray(n)?n:[n];if(r.some(i=>{const a=e.cacheProjects.findIndex(l=>l.id==i);a>-1&&(t("forgetTask",e.cacheTasks.filter(l=>l.project_id==n).map(l=>l.id)),t("forgetColumn",e.cacheColumns.filter(l=>l.project_id==n).map(l=>l.id)),e.cacheProjects.splice(a,1),e.projectTotal=Math.max(0,e.projectTotal-1))}),r.includes(e.projectId)){const i=$A.cloneJSON(e.cacheProjects).sort((a,l)=>a.top_at||l.top_at?$A.Date(l.top_at)-$A.Date(a.top_at):l.id-a.id).find(({id:a})=>a&&a!=n);i?$A.goForward({name:"manage-project",params:{projectId:i.id}}):$A.goForward({name:"manage-dashboard"})}$A.IDBSave("cacheProjects",e.cacheProjects)},getProjects({state:e,dispatch:t,getters:n},r){return new Promise(function(i,a){if(e.userId===0){e.cacheProjects=[],a({msg:"Parameter error"});return}const l=l0("projects",r,e);l.showLoad()&&e.loadProjects++,t("call",{url:"project/lists",data:l.get()}).then(({data:c})=>{e.projectTotal=c.total_all,t("saveProject",c.data),l.save(c).then(h=>t("forgetProject",h)),i(c)}).catch(c=>{console.warn(c),a(c)}).finally(c=>{l.showLoad()&&e.loadProjects--})})},getProjectOne({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n)===0){i({msg:"Parameter error"});return}e.projectLoad++,t("call",{url:"project/one",data:{project_id:n}}).then(a=>{setTimeout(()=>{e.projectLoad--},10),t("saveProject",a.data),r(a)}).catch(a=>{console.warn(a),e.projectLoad--,i(a)})})},archivedProject({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n)===0){i({msg:"Parameter error"});return}t("call",{url:"project/archived",data:{project_id:n}}).then(a=>{t("forgetProject",n),r(a)}).catch(a=>{console.warn(a),t("getProjectOne",n).catch(()=>{}),i(a)})})},removeProject({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n)===0){i({msg:"Parameter error"});return}t("call",{url:"project/remove",data:{project_id:n}}).then(a=>{t("forgetProject",n),r(a)}).catch(a=>{console.warn(a),t("getProjectOne",n).catch(()=>{}),i(a)})})},exitProject({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n)===0){i({msg:"Parameter error"});return}t("call",{url:"project/exit",data:{project_id:n}}).then(a=>{t("forgetProject",n),r(a)}).catch(a=>{console.warn(a),t("getProjectOne",n).catch(()=>{}),i(a)})})},saveColumn({state:e,dispatch:t},n){if($A.execMainDispatch("saveColumn",n),$A.isArray(n))n.forEach(r=>{t("saveColumn",r)});else if($A.isJson(n)){const r=e.cacheColumns.findIndex(({id:i})=>i==n.id);r>-1?e.cacheColumns.splice(r,1,Object.assign({},e.cacheColumns[r],n)):e.cacheColumns.push(n),$A.IDBSave("cacheColumns",e.cacheColumns)}},forgetColumn({state:e,dispatch:t},n){$A.execMainDispatch("forgetColumn",n);const r=$A.isArray(n)?n:[n],i=[];r.some(a=>{const l=e.cacheColumns.findIndex(c=>c.id==a);l>-1&&(t("forgetTask",e.cacheTasks.filter(c=>c.column_id==n).map(c=>c.id)),i.push(e.cacheColumns[l].project_id),e.cacheColumns.splice(l,1))}),Array.from(new Set(i)).some(a=>t("getProjectOne",a).catch(()=>{})),$A.IDBSave("cacheColumns",e.cacheColumns)},getColumns({state:e,dispatch:t},n){return new Promise(function(r,i){if(e.userId===0){e.cacheColumns=[],i({msg:"Parameter error"});return}e.projectLoad++,t("call",{url:"project/column/lists",data:{project_id:n}}).then(({data:a})=>{e.projectLoad--;const l=a.data.map(({id:c})=>c);if(e.cacheColumns=e.cacheColumns.filter(c=>c.project_id!=n||l.includes(c.id)),t("saveColumn",a.data),r(a.data),e.cacheColumns.filter(c=>c.project_id==n).length===1){const c=e.cacheProjectParameter.find(h=>h.project_id==n)||{};(typeof c.menuInit=="undefined"||c.menuInit===!1)&&t("toggleProjectParameter",{project_id:n,key:{menuInit:!0,menuType:"table"}})}}).catch(a=>{console.warn(a),e.projectLoad--,i(a)})})},removeColumn({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n)===0){i({msg:"Parameter error"});return}t("call",{url:"project/column/remove",data:{column_id:n}}).then(a=>{t("forgetColumn",n),r(a)}).catch(a=>{console.warn(a),i(a)})})},saveTask({state:e,dispatch:t},n){if($A.execMainDispatch("saveTask",n),$A.isArray(n))n.forEach(r=>{t("saveTask",r)});else if($A.isJson(n)){n._time=$A.Time(),n.flow_item_name&&n.flow_item_name.indexOf("|")!==-1&&([n.flow_item_status,n.flow_item_name]=n.flow_item_name.split("|")),typeof n.archived_at!="undefined"&&e.cacheTasks.filter(a=>a.parent_id==n.id).some(a=>{t("saveTask",Object.assign(a,{archived_at:n.archived_at,archived_userid:n.archived_userid}))});let r={};typeof n.update_marking!="undefined"&&(r=$A.isJson(n.update_marking)?n.update_marking:{},delete n.update_marking);const i=e.cacheTasks.findIndex(({id:a})=>a==n.id);i>-1?e.cacheTasks.splice(i,1,Object.assign({},e.cacheTasks[i],n)):e.cacheTasks.push(n),(r.is_update_maintask===!0||n.parent_id>0&&e.cacheTasks.findIndex(({id:a})=>a==n.parent_id)===-1)&&t("getTaskOne",n.parent_id).catch(()=>{}),r.is_update_project===!0&&t("getProjectOne",n.project_id).catch(()=>{}),r.is_update_content===!0&&t("getTaskContent",n.id),r.is_update_subtask===!0&&t("getTaskForParent",n.id).catch(()=>{}),e.cacheDialogs.some(a=>{if(a.name===void 0||a.dialog_delete===1)return!1;if(a.type=="group"&&a.group_type=="task"&&a.group_info.id==n.id){n.name!==void 0&&(a.name=n.name);for(let l in a.group_info)!a.group_info.hasOwnProperty(l)||n[l]===void 0||(a.group_info[l]=n[l])}}),$A.IDBSave("cacheTasks",e.cacheTasks)}},forgetTask({state:e,dispatch:t},n){$A.execMainDispatch("forgetTask",n);const r=($A.isArray(n)?n:[n]).filter(l=>l!=e.taskArchiveView),i=[],a=[];r.some(l=>{const c=e.cacheTasks.findIndex(h=>h.id==l);c>-1&&(e.cacheTasks[c].parent_id&&i.push(e.cacheTasks[c].parent_id),a.push(e.cacheTasks[c].project_id),e.cacheTasks.splice(c,1)),e.cacheTasks.filter(h=>h.parent_id==l).some(h=>{let s=e.cacheTasks.findIndex(p=>p.id==h.id);s>-1&&(a.push(h.project_id),e.cacheTasks.splice(s,1))})}),Array.from(new Set(i)).some(l=>t("getTaskOne",l).catch(()=>{})),Array.from(new Set(a)).some(l=>t("getProjectOne",l).catch(()=>{})),r.includes(e.taskId)&&(e.taskId=0),$A.IDBSave("cacheTasks",e.cacheTasks)},increaseTaskMsgNum({state:e},t){if($A.execMainDispatch("increaseTaskMsgNum",t),!$A.execMainCacheJudge(`increaseTaskMsgNum:${t.id}`)&&t.dialog_id){const n=e.cacheTasks.find(({dialog_id:r})=>r===t.dialog_id);n&&n.msg_num++}},increaseMsgReplyNum({state:e,dispatch:t},n){if($A.execMainDispatch("increaseMsgReplyNum",n),!$A.execMainCacheJudge(`increaseMsgReplyNum:${n.id}`)&&n.reply_id>0){const r=e.dialogMsgs.find(({id:i})=>i==n.reply_id);r&&r.reply_num++}},decrementMsgReplyNum({state:e,dispatch:t},n){if($A.execMainDispatch("decrementMsgReplyNum",n),!$A.execMainCacheJudge(`decrementMsgReplyNum:${n.id}`)&&n.reply_id>0){const r=e.dialogMsgs.find(({id:i})=>i==n.reply_id);r&&r.reply_num--}},getTasks({state:e,dispatch:t},n){const r=[];n===null&&(n={}),$A.isArray(n.taskData)&&(r.push(...n.taskData),delete n.taskData);const i=l0("tasks",n,e);return new Promise(function(a,l){if(e.userId===0){e.cacheTasks=[],l({msg:"Parameter error"});return}n.project_id&&e.projectLoad++,t("call",{url:"project/task/lists",data:i.get()}).then(({data:c})=>{n.project_id&&e.projectLoad--,r.push(...c.data),i.save(c).then(h=>t("forgetTask",h)),c.next_page_url?(n.page=c.current_page+1,n.taskData=r,c.current_page%10===0?$A.modalWarning({content:"\u6570\u636E\u5DF2\u8D85\u8FC7"+c.to+"\u6761\uFF0C\u662F\u5426\u7EE7\u7EED\u52A0\u8F7D\uFF1F",onOk:()=>{t("getTasks",n).then(a).catch(l)},onCancel:()=>{t("saveTask",r),a()}}):t("getTasks",n).then(a).catch(l)):(t("saveTask",r),a())}).catch(c=>{console.warn(c),l(c),n.project_id&&e.projectLoad--})})},getTaskOne({state:e,dispatch:t},n){return new Promise(function(r,i){if(/^\d+$/.test(n)&&(n={task_id:n}),$A.runNum(n.task_id)===0){i({msg:"Parameter error"});return}if($A.isArray(e.taskOneLoad[n.task_id])){e.taskOneLoad[n.task_id].push({resolve:r,reject:i});return}e.taskOneLoad[n.task_id]=[],t("call",{url:"project/task/one",data:n}).then(a=>{t("saveTask",a.data),r(a),e.taskOneLoad[n.task_id].some(l=>{l.resolve(a)})}).catch(a=>{console.warn(a),i(a),e.taskOneLoad[n.task_id].some(l=>{l.reject(a)})}).finally(a=>{delete e.taskOneLoad[n.task_id]})})},getTaskForDashboard({state:e,dispatch:t,getters:n},r){if(window.__getTaskForDashboard&&clearTimeout(window.__getTaskForDashboard),typeof r=="number"){r>-1&&(window.__getTaskForDashboard=setTimeout(i=>t("getTaskForDashboard",null),r));return}e.loadDashboardTasks!==!0&&(e.loadDashboardTasks=!0,t("getTasks",null).finally(i=>{e.loadDashboardTasks=!1}))},getTaskForProject({state:e,dispatch:t},n){return new Promise(function(r,i){t("getTasks",{project_id:n}).then(r).catch(i)})},getTaskForParent({state:e,dispatch:t},n){return new Promise(function(r,i){t("getTasks",{parent_id:n}).then(r).catch(i)})},removeTask({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n.task_id)===0){i({msg:"Parameter error"});return}t("setLoad",{key:`task-${n.task_id}`,delay:300}),t("call",{url:"project/task/remove",data:n}).then(a=>{e.taskArchiveView=0,t("forgetTask",n.task_id),r(a)}).catch(a=>{console.warn(a),t("getTaskOne",n.task_id).catch(()=>{}),i(a)}).finally(a=>{t("cancelLoad",`task-${n.task_id}`)})})},archivedTask({state:e,dispatch:t},n){return new Promise(function(r,i){if(/^\d+$/.test(n)&&(n={task_id:n}),$A.runNum(n.task_id)===0){i({msg:"Parameter error"});return}t("setLoad",{key:`task-${n.task_id}`,delay:300}),t("call",{url:"project/task/archived",data:n}).then(a=>{t("saveTask",a.data),r(a)}).catch(a=>{console.warn(a),t("getTaskOne",n.task_id).catch(()=>{}),i(a)}).finally(a=>{t("cancelLoad",`task-${n.task_id}`)})})},getTaskContent({state:e,dispatch:t},n){$A.runNum(n)!==0&&t("call",{url:"project/task/content",data:{task_id:n}}).then(r=>{t("saveTaskContent",r.data)}).catch(r=>{console.warn(r)})},saveTaskContent({state:e,dispatch:t},n){if($A.execMainDispatch("saveTaskContent",n),$A.isArray(n))n.forEach(r=>{t("saveTaskContent",r)});else if($A.isJson(n)){const r=e.taskContents.findIndex(({task_id:i})=>i==n.task_id);r>-1?e.taskContents.splice(r,1,Object.assign({},e.taskContents[r],n)):e.taskContents.push(n)}},getTaskFiles({state:e,dispatch:t},n){$A.runNum(n)!==0&&t("call",{url:"project/task/files",data:{task_id:n}}).then(r=>{r.data.forEach(i=>{const a=e.taskFiles.findIndex(({id:l})=>l==i.id);a>-1?e.taskFiles.splice(a,1,i):e.taskFiles.push(i)}),t("saveTask",{id:n,file_num:r.data.length})}).catch(r=>{console.warn(r)})},forgetTaskFile({state:e,dispatch:t},n){($A.isArray(n)?n:[n]).some(i=>{const a=e.taskFiles.findIndex(l=>l.id==i);a>-1&&e.taskFiles.splice(a,1)})},openTask({state:e,dispatch:t},n){let r=n;if($A.isJson(n)&&(n.parent_id>0?r=n.parent_id:r=n.id),$A.isSubElectron){r>0?$A.Electron.sendMessage("updateRouter",{name:`task-${r}`,path:`/single/task/${r}`}):$A.Electron.sendMessage("windowClose");return}e.taskArchiveView=r,e.taskId=r,r>0&&t("getTaskOne",{task_id:r,archived:"all"}).then(()=>{t("getTaskContent",r),t("getTaskFiles",r),t("getTaskForParent",r).catch(()=>{}),t("saveTaskBrowse",r)}).catch(({msg:i})=>{$A.modalWarning({content:i,onOk:()=>{e.taskId=0}})})},taskAdd({state:e,dispatch:t},n){return new Promise(function(r,i){const a=$A.cloneJSON($A.date2string(n));$A.isArray(a.column_id)&&(a.column_id=a.column_id.find(l=>l)),t("call",{url:"project/task/add",data:a,method:"post"}).then(l=>{l.data.is_visible===1&&t("addTaskSuccess",l.data),r(l)}).catch(l=>{console.warn(l),i(l)})})},taskAddSub({dispatch:e},t){return new Promise(function(n,r){e("call",{url:"project/task/addsub",data:t}).then(i=>{e("addTaskSuccess",i.data),n(i)}).catch(i=>{console.warn(i),r(i)})})},addTaskSuccess({dispatch:e},t){typeof t.new_column!="undefined"&&(e("saveColumn",t.new_column),delete t.new_column),e("saveTask",t),e("getProjectOne",t.project_id).catch(()=>{})},taskUpdate({state:e,dispatch:t},n){return new Promise(function(r,i){t("taskBeforeUpdate",n).then(({post:a})=>{t("setLoad",{key:`task-${a.task_id}`,delay:300}),t("call",{url:"project/task/update",data:a,method:"post"}).then(l=>{t("saveTask",l.data),r(l)}).catch(l=>{console.warn(l),t("getTaskOne",a.task_id).catch(()=>{}),i(l)}).finally(l=>{t("cancelLoad",`task-${a.task_id}`)})}).catch(i)})},taskBeforeUpdate({state:e,dispatch:t},n){return new Promise(function(r,i){let a=$A.cloneJSON($A.date2string(n)),l="\u6E29\u99A8\u63D0\u793A",c=null;if(typeof a.times!="undefined"){n.times[0]===!1&&(c="\u4F60\u786E\u5B9A\u8981\u53D6\u6D88\u4EFB\u52A1\u65F6\u95F4\u5417\uFF1F");const h=e.cacheTasks.find(({id:s})=>s==a.task_id);l=h.parent_id>0?"\u66F4\u65B0\u5B50\u4EFB\u52A1":"\u66F4\u65B0\u4E3B\u4EFB\u52A1",h&&(h.parent_id>0?a.times[0]&&e.cacheTasks.some(s=>{if(s.id!=h.parent_id)return!1;if(!s.end_at)return c="\u4E3B\u4EFB\u52A1\u6CA1\u6709\u8BBE\u7F6E\u65F6\u95F4\uFF0C\u8BBE\u7F6E\u5B50\u4EFB\u52A1\u5C06\u540C\u6B65\u8BBE\u7F6E\u4E3B\u4EFB\u52A1",!0;let p=$A.Date(a.times[0],!0),d=$A.Date(a.times[1],!0),v=$A.Date(s.start_at,!0),m=$A.Date(s.end_at,!0);if(pm)return c="\u65B0\u8BBE\u7F6E\u7684\u5B50\u4EFB\u52A1\u7ED3\u675F\u65F6\u95F4\u5728\u4E3B\u4EFB\u52A1\u65F6\u95F4\u4E4B\u5916\uFF0C\u4FEE\u6539\u540E\u5C06\u540C\u6B65\u4FEE\u6539\u4E3B\u4EFB\u52A1",!0}):e.cacheTasks.some(s=>{if(s.parent_id!=h.id||!s.end_at)return!1;let p=$A.Date(a.times[0],!0),d=$A.Date(a.times[1],!0),v=$A.Date(h.start_at,!0),m=$A.Date(h.end_at,!0),_=$A.Date(s.start_at,!0),y=$A.Date(s.end_at,!0);if(v==_&&m==y)return!1;if(!a.times[0])return c=`\u5B50\u4EFB\u52A1\uFF08${s.name}\uFF09\u5DF2\u8BBE\u7F6E\u65F6\u95F4\uFF0C\u6E05\u9664\u4E3B\u4EFB\u52A1\u65F6\u95F4\u540E\u5C06\u540C\u6B65\u6E05\u9664\u5B50\u4EFB\u52A1\u7684\u65F6\u95F4`,!0;if(p>_)return c=`\u65B0\u8BBE\u7F6E\u7684\u5F00\u59CB\u65F6\u95F4\u5728\u5B50\u4EFB\u52A1\uFF08${s.name}\uFF09\u65F6\u95F4\u4E4B\u5185\uFF0C\u4FEE\u6539\u540E\u5C06\u540C\u6B65\u4FEE\u6539\u5B50\u4EFB\u52A1`,!0;if(d{r({confirm:!0,post:a})},onCancel:()=>{i({msg:!1})}})})},getTaskFlow({state:e,dispatch:t},n){return new Promise(function(r,i){t("call",{url:"project/task/flow",data:{task_id:n}}).then(a=>{let l=e.cacheTasks.find(({id:s})=>s==n),{data:c}=a;c.turns.some(s=>{const p=e.taskFlowItems.findIndex(({id:d})=>d==s.id);p>-1?e.taskFlowItems.splice(p,1,s):e.taskFlowItems.push(s),l&&l.flow_item_id==s.id&&l.flow_item_name!=s.name&&e.cacheTasks.filter(({flow_item_id:d})=>d==s.id).some(d=>{t("saveTask",{id:d.id,flow_item_name:`${s.status}|${s.name}`})})}),delete c.turns;const h=e.taskFlows.findIndex(({task_id:s})=>s==c.task_id);h>-1?e.taskFlows.splice(h,1,c):e.taskFlows.push(c),r(a)}).catch(a=>{console.warn(a),i(a)})})},getTaskPriority({state:e,dispatch:t}){return new Promise(function(n,r){t("call",{url:"system/priority"}).then(i=>{e.taskPriority=i.data,n(i)}).catch(i=>{console.warn(i),r(i)})})},getColumnTemplate({state:e,dispatch:t}){return new Promise(function(n,r){t("call",{url:"system/column/template"}).then(i=>{e.columnTemplate=i.data,n(i)}).catch(i=>{console.warn(i),r(i)})})},saveTaskCompleteTemp({state:e},t){/^\d+$/.test(t)&&!e.taskCompleteTemps.includes(t)&&e.taskCompleteTemps.push(t)},forgetTaskCompleteTemp({state:e},t){t===!0?e.taskCompleteTemps=[]:/^\d+$/.test(t)&&(e.taskCompleteTemps=e.taskCompleteTemps.filter(n=>n!=t))},saveTaskBrowse({state:e},t){const n=e.cacheTaskBrowse.findIndex(({id:r})=>r==t);n>-1&&e.cacheTaskBrowse.splice(n,1),e.cacheTaskBrowse.unshift({id:t,userid:e.userId}),e.cacheTaskBrowse.length>200&&e.cacheTaskBrowse.splice(200),$A.IDBSave("cacheTaskBrowse",e.cacheTaskBrowse)},taskDefaultTime({state:e,dispatch:t},n){return new Promise(async r=>{$A.isArray(n)&&(n[0]=await t("taskDefaultStartTime",n[0]),n[1]=await t("taskDefaultEndTime",n[1])),r(n)})},taskDefaultStartTime({state:e},t){return new Promise(n=>{/(\s|^)([0-2]\d):([0-5]\d)(:\d{1,2})*$/.test(t)&&(t=t.replace(/(\s|^)([0-2]\d):([0-5]\d)(:\d{1,2})*$/,"$1"+e.systemConfig.task_default_time[0])),n(t)})},taskDefaultEndTime({state:e},t){return new Promise(n=>{/(\s|^)([0-2]\d):([0-5]\d)(:\d{1,2})*$/.test(t)&&(t=t.replace(/(\s|^)([0-2]\d):([0-5]\d)(:\d{1,2})*$/,"$1"+e.systemConfig.task_default_time[1])),n(t)})},saveDialog({state:e,dispatch:t},n){if($A.execMainDispatch("saveDialog",n),$A.isArray(n))n.forEach(r=>{t("saveDialog",r)});else if($A.isJson(n)){n.id=parseInt(n.id);const r=e.cacheDialogs.findIndex(({id:i})=>i==n.id);if(r>-1){const i=e.cacheDialogs[r],a=n.user_ms,l=i.user_ms||0;a{t("updateDialogLastMsg",r)});else if($A.isJson(n))if(e.cacheDialogs.findIndex(({id:i})=>i==n.dialog_id)>-1){const i={id:n.dialog_id,last_msg:n,last_at:$A.formatDate("Y-m-d H:i:s")};n.mtype=="tag"&&(i.has_tag=!0),n.mtype=="todo"&&(i.has_todo=!0),n.mtype=="image"&&(i.has_image=!0),n.mtype=="file"&&(i.has_file=!0),n.link&&(i.has_link=!0),t("saveDialog",i)}else t("getDialogOne",n.dialog_id).catch(()=>{})},getDialogs({state:e,dispatch:t,getters:n},r){return new Promise(function(i,a){if(e.userId===0){e.cacheDialogs=[],a({msg:"Parameter error"});return}$A.isJson(r)||(r={}),typeof r.page=="undefined"&&(r.page=1),typeof r.pagesize=="undefined"&&(r.pagesize=20);const l=l0("dialogs",r,e);l.showLoad()&&e.loadDialogs++,t("call",{url:"dialog/lists",data:l.get()}).then(({data:c})=>{t("saveDialog",c.data),l.save(c).then(h=>t("forgetDialog",h)),c.next_page_url&&c.current_page<5?(r.page++,t("getDialogs",r).then(i).catch(a)):i()}).catch(c=>{console.warn(c),a(c)}).finally(c=>{l.showLoad()&&e.loadDialogs--})})},getDialogOne({state:e,dispatch:t},n){return new Promise(function(r,i){if($A.runNum(n)===0){i({msg:"Parameter error"});return}t("call",{url:"dialog/one",data:{dialog_id:n}}).then(a=>{t("saveDialog",a.data),r(a)}).catch(a=>{console.warn(a),i(a)})})},getDialogTodo({state:e,dispatch:t},n){t("call",{url:"dialog/todo",data:{dialog_id:n}}).then(({data:r})=>{$A.arrayLength(r)>0?(t("saveDialog",{id:n,todo_num:$A.arrayLength(r)}),e.dialogTodos=e.dialogTodos.filter(i=>i.dialog_id!=n),t("saveDialogTodo",r)):t("saveDialog",{id:n,todo_num:0})}).catch(console.warn)},openDialog({state:e,dispatch:t},n){return new Promise(r=>{let i;$A.isJson(n)&&(i=n.search_msg_id,n=n.dialog_id),requestAnimationFrame(a=>{e.dialogSearchMsgId=/^\d+$/.test(i)?i:0,e.dialogId=/^\d+$/.test(n)?n:0,r()})})},openDialogUserid({state:e,dispatch:t},n){return new Promise(function(r,i){const a=e.cacheDialogs.find(l=>l.type!=="user"||!l.dialog_user?!1:l.dialog_user.userid===n);if(a){t("openDialog",a.id),r(a);return}t("showSpinner",600),t("call",{url:"dialog/open/user",data:{userid:n}}).then(({data:l})=>{t("saveDialog",l),t("openDialog",l.id),r(l)}).catch(l=>{console.warn(l),i(l)}).finally(l=>{t("hiddenSpinner")})})},forgetDialog({state:e,dispatch:t},n){$A.execMainDispatch("forgetDialog",n);const r=$A.isArray(n)?n:[n];r.some(i=>{const a=e.cacheDialogs.findIndex(l=>l.id==i);a>-1&&(t("forgetDialogMsg",e.dialogMsgs.filter(l=>l.dialog_id==n).map(l=>l.id)),e.cacheDialogs.splice(a,1))}),r.includes(e.dialogId)&&(e.dialogId=0),$A.IDBSave("cacheDialogs",e.cacheDialogs)},saveInDialog({state:e,dispatch:t},n){$A.execMainDispatch("saveInDialog",n);const r=e.dialogIns.findIndex(l=>l.uid==n.uid);r>-1?e.dialogIns.splice(r,1,Object.assign({},e.dialogIns[r],n)):e.dialogIns.push(n);const i=1500,a=30;if(e.dialogHistory=e.dialogHistory.filter(l=>l!=n.dialog_id),e.dialogHistory.push(n.dialog_id),e.dialogMsgs.length>i&&e.dialogHistory.length>a){const l=e.dialogHistory.slice().reverse(),c=[],h=[];l.forEach(s=>{c.lengthp.dialog_id==s)>-1?c.push(s):h.push(s)}),h.length>0&&(e.dialogMsgs=e.dialogMsgs.filter(s=>!h.includes(s.dialog_id)),$A.IDBSave("dialogMsgs",e.dialogMsgs,600)),e.dialogHistory=c}},forgetInDialog({state:e,dispatch:t},n){$A.execMainDispatch("forgetInDialog",n);const r=e.dialogIns.findIndex(i=>i.uid==n);r>-1&&e.dialogIns.splice(r,1)},closeDialog({state:e,dispatch:t},n){if($A.execMainDispatch("closeDialog",n),!/^\d+$/.test(n))return;const r=e.cacheDialogs.find(l=>l.id==n);r&&(r.extra_draft_has=r.extra_draft_content?1:0);const i=25,a=e.dialogMsgs.filter(l=>l.dialog_id==n);if(a.length>i){const l=a.sort((c,h)=>h.id-c.id).splice(i).map(c=>c.id);e.dialogMsgs=e.dialogMsgs.filter(c=>!l.includes(c.id)),$A.IDBSave("dialogMsgs",e.dialogMsgs,600)}},saveDialogTodo({state:e,dispatch:t},n){if($A.execMainDispatch("saveDialogTodo",n),$A.isArray(n))n.forEach(r=>{t("saveDialogTodo",r)});else if($A.isJson(n)){const r=e.dialogTodos.findIndex(i=>i.id==n.id);r>-1?e.dialogTodos.splice(r,1,Object.assign({},e.dialogTodos[r],n)):e.dialogTodos.push(n)}},forgetDialogTodoForMsgId({state:e,dispatch:t},n){$A.execMainDispatch("forgetDialogTodoForMsgId",n);const r=e.dialogTodos.findIndex(i=>i.msg_id==n);r>-1&&e.dialogTodos.splice(r,1)},saveDialogDraft({state:e,dispatch:t},n){e.dialogDraftTimer[n.id]&&clearInterval(e.dialogDraftTimer[n.id]),e.dialogDraftTimer[n.id]=setTimeout(r=>{e.dialogId!=n.id&&(n.extra_draft_has=n.extra_draft_content?1:0),t("saveDialog",n)},n.extra_draft_content?600:0)},saveDialogMsg({state:e,dispatch:t},n){if($A.execMainDispatch("saveDialogMsg",n),$A.isArray(n))n.forEach(r=>{t("saveDialogMsg",r)});else if($A.isJson(n)){const r=e.dialogMsgs.findIndex(({id:a})=>a==n.id);n=Object.assign({},e.dialogMsgs[r],n),r>-1?e.dialogMsgs.splice(r,1,n):e.dialogMsgs.push(n),$A.IDBSave("dialogMsgs",e.dialogMsgs,600);const i=e.cacheDialogs.find(({id:a,last_msg:l})=>a==n.dialog_id&&l&&l.id===n.id);i&&t("saveDialog",{id:n.dialog_id,last_msg:Object.assign({},i.last_msg,n)})}},forgetDialogMsg({state:e,dispatch:t},n){$A.execMainDispatch("forgetDialogMsg",n),($A.isArray(n)?n:[n]).some(i=>{const a=e.dialogMsgs.findIndex(l=>l.id==i);if(a>-1){const l=e.dialogMsgs[a];t("decrementMsgReplyNum",l),t("audioStop",$A.getObject(l,"msg.path")),e.dialogMsgs.splice(a,1),$A.IDBSave("dialogMsgs",e.dialogMsgs,600)}}),t("forgetDialogTodoForMsgId",n)},getDialogMsgs({state:e,dispatch:t,getters:n},r){return new Promise((i,a)=>{let l=d=>{},c=d=>{},h=!1,s=!1;typeof r.save_before!="undefined"&&(l=typeof r.save_before=="function"?r.save_before:d=>{},delete r.save_before),typeof r.save_after!="undefined"&&(c=typeof r.save_after=="function"?r.save_after:d=>{},delete r.save_after),typeof r.clear_before!="undefined"&&(h=typeof r.clear_before=="boolean"?r.clear_before:!1,delete r.clear_before),typeof r.spinner!="undefined"&&(s=r.spinner,delete r.spinner);const p=`msg::${r.dialog_id}-${r.msg_id}-${r.msg_type||""}`;if(n.isLoad(p)){a({msg:"Loading"});return}t("setLoad",p),h&&(e.dialogMsgs=e.dialogMsgs.filter(({dialog_id:d})=>d!==r.dialog_id),$A.IDBSave("dialogMsgs",e.dialogMsgs,600)),r.pagesize=25,t("call",{url:"dialog/msg/list",data:r,spinner:s,complete:d=>t("cancelLoad",p)}).then(d=>{l();const v=d.data;if($A.isJson(v.dialog)){setTimeout(_=>t("saveDialog",v.dialog),10);const m=v.list.map(({id:_})=>_);e.dialogMsgs=e.dialogMsgs.filter(_=>_.dialog_id!=r.dialog_id||m.includes(_.id)||$A.Time(_.created_at)>=v.time),$A.IDBSave("dialogMsgs",e.dialogMsgs,600)}$A.isArray(v.todo)&&(e.dialogTodos=e.dialogTodos.filter(m=>m.dialog_id!=r.dialog_id),t("saveDialogTodo",v.todo)),t("saveDialogMsg",v.list),i(d),c()}).catch(d=>{console.warn(d),a(d)}).finally(d=>{if(r.prev_id){const v=e.dialogMsgs.find(({prev_id:m})=>m==r.prev_id);v&&(v.prev_id=0)}if(r.next_id){const v=e.dialogMsgs.find(({next_id:m})=>m==r.next_id);v&&(v.next_id=0)}})})},dialogMsgRead({state:e,dispatch:t},n){if($A.isJson(n)){if(n.userid==e.userId||n.read_at)return;n.read_at=$A.formatDate(),e.wsReadWaitData[n.id]=n.id}clearTimeout(e.wsReadTimeout),e.wsReadTimeout=setTimeout(r=>{if(e.userId===0)return;const i=Object.values(e.wsReadWaitData);e.wsReadWaitData={},i.length!==0&&t("call",{url:"dialog/msg/read",data:{id:i.join(",")}}).then(({data:a})=>{t("saveDialog",a)}).catch(a=>{i.some(l=>{e.wsReadWaitData[l]=l})})},50)},dialogMsgMark({state:e,dispatch:t},n){return new Promise((r,i)=>{t("call",{url:"dialog/msg/mark",data:n}).then(a=>{t("saveDialog",a.data),r(a)}).catch(a=>{i(a)})})},streamDialogMsg({state:e,dispatch:t},n){if(/^https*:\/\//i.test(n)||(n=$A.apiUrl(`..${n}`)),e.dialogSseList.find(i=>i.streamUrl==n))return;const r=new UX(n);r.subscribe(["append","replace","done"],(i,a)=>{switch(i){case"append":Ts.Store.set("dialogMsgChange",{id:a.lastEventId,type:"append",text:a.data});break;case"replace":Ts.Store.set("dialogMsgChange",{id:a.lastEventId,type:"replace",text:a.data});break;case"done":const l=e.dialogSseList.findIndex(c=>r===c.sse);l>-1&&e.dialogSseList.splice(l,1),r.unsunscribe();break}}),e.dialogSseList.push({sse:r,streamUrl:n,time:$A.Time()}),e.dialogSseList.length>10&&e.dialogSseList.shift().sse.close()},setLoad({state:e,dispatch:t},n){if($A.isJson(n)){setTimeout(i=>{t("setLoad",n.key)},n.delay||0);return}const r=e.loads.find(i=>i.key==n);r?r.num++:e.loads.push({key:n,num:1})},cancelLoad({state:e},t){const n=e.loads.find(r=>r.key==t);n?n.num--:e.loads.push({key:t,num:-1})},showSpinner({state:e},t){const n=$A.randomString(6);e.floatSpinnerTimer.push({id:n,timer:setTimeout(r=>{e.floatSpinnerTimer=e.floatSpinnerTimer.filter(i=>i.id!==n),e.floatSpinnerLoad++},typeof t=="number"?t:0)})},hiddenSpinner({state:e}){const t=e.floatSpinnerTimer.shift();t?clearTimeout(t.timer):e.floatSpinnerLoad--},previewImage({state:e},t){$A.isJson(t)||(t={index:0,list:[t]}),e.previewImageIndex=t.index,e.previewImageList=t.list},audioPlay({state:e,dispatch:t},n){const r=document.getElementById("__audio_play_element__");if(r&&(r.pause(),r.src=null,r.parentNode.removeChild(r)),!n||n===e.audioPlaying){e.audioPlaying=null;return}const i=document.createElement("audio");i.id=e.audioPlayId="__audio_play_element__",i.controls=!1,i.loop=!1,i.volume=1,i.src=e.audioPlaying=n,i.onended=a=>{t("audioStop",i.src)},document.body.appendChild(i),i.play().then(a=>{})},audioStop({state:e},t){const n=document.getElementById("__audio_play_element__");!n||(n.src===t||t===!0)&&(n.pause(),n.src=null,n.parentNode.removeChild(n),e.audioPlaying=null)},websocketConnection({state:e,dispatch:t,commit:n}){if(clearTimeout(e.wsTimeout),e.ws&&(e.ws.close(),e.ws=null),e.userId===0)return;let r=$A.apiUrl("../ws");r=r.replace("https://","wss://"),r=r.replace("http://","ws://"),r+=`?action=web&token=${e.userToken}&language=${au}`;const i=$A.openLog,a=$A.randomString(16);e.wsRandom=a,e.ws=new WebSocket(r),e.ws.onopen=async l=>{i&&console.log("[WS] Open",l,$A.formatDate()),e.wsOpenNum++,window.systemInfo.debug!=="yes"&&t("websocketSend",{type:"encrypt",data:{type:"pgp",key:(await t("pgpGetLocalKey")).publicKeyB64}})},e.ws.onclose=async l=>{i&&console.log("[WS] Close",l,$A.formatDate()),e.ws=null,clearTimeout(e.wsTimeout),e.wsTimeout=setTimeout(()=>{a===e.wsRandom&&t("websocketConnection")},3e3)},e.ws.onerror=async l=>{i&&console.log("[WS] Error",l,$A.formatDate()),e.ws=null,clearTimeout(e.wsTimeout),e.wsTimeout=setTimeout(()=>{a===e.wsRandom&&t("websocketConnection")},3e3)},e.ws.onmessage=async l=>{i&&console.log("[WS] Message",l);let c=$A.jsonParse(l.data);c.type==="encrypt"&&c.encrypted&&(c=await t("pgpDecryptApi",c.encrypted));const h=$A.formatMsgBasic(c),{type:s,msgId:p}=h;switch(s){case"open":$A.setSessionStorage("userWsFd",h.data.fd);break;case"receipt":typeof e.wsCall[p]=="function"&&e.wsCall[p](h.body,!0),delete e.wsCall[p];break;case"line":Ts.Store.set("userActive",{type:"line",data:h.data});break;case"msgStream":t("streamDialogMsg",h.stream_url);break;default:switch(p&&t("websocketSend",{type:"receipt",msgId:p}).catch(d=>{}),e.wsMsg=h,Object.values(e.wsListener).forEach(d=>{if(typeof d=="function")try{d(h)}catch(v){i&&console.log("[WS] Callerr",v)}}),s){case"dialog":(function(d){const{mode:v,silence:m,data:_}=d,{dialog_id:y}=_;switch(v){case"delete":if(t("forgetDialogMsg",_.id),e.cacheDialogs.find(({id:k})=>k==y)){const k={id:y,last_at:_.last_msg&&_.last_msg.created_at,last_msg:_.last_msg};_.update_read?t("call",{url:"dialog/msg/unread",data:{dialog_id:y}}).then(({data:C})=>{t("saveDialog",Object.assign(k,C))}).catch(()=>{}):t("saveDialog",k)}break;case"add":case"chat":if(!e.dialogMsgs.find(({id:k})=>k==_.id)){if(t("increaseTaskMsgNum",_),t("increaseMsgReplyNum",_),v==="chat"||$A.isSubElectron)return;if(_.userid!==e.userId){const k=e.cacheDialogs.find(({id:C})=>C==y);if(k){const C={id:y,unread:k.unread+1,mention:k.mention,user_at:_.user_at,user_ms:_.user_ms};_.mention&&C.mention++,t("saveDialog",C)}}m||Ts.Store.set("dialogMsgPush",_)}t("saveDialogMsg",_),t("updateDialogLastMsg",_);break;case"update":case"readed":const E=(k,C)=>{if(e.dialogMsgs.find(({id:x})=>x==k.id)){t("saveDialogMsg",k),typeof k.todo!="undefined"&&t("getDialogTodo",y);return}C<=5&&setTimeout(x=>{E(k,++C)},500)};E(_,0);break;case"groupAdd":case"groupJoin":case"groupRestore":t("getDialogOne",_.id).catch(()=>{});break;case"groupUpdate":e.cacheDialogs.find(({id:k})=>k==_.id)&&t("saveDialog",_);break;case"groupExit":case"groupDelete":t("forgetDialog",_.id);break}})(h);break;case"project":(function(d){const{action:v,data:m}=d;switch(v){case"add":case"update":case"recovery":t("saveProject",m);break;case"detail":t("getProjectOne",m.id).catch(()=>{}),t("getTaskForProject",m.id).catch(()=>{});break;case"delete":case"archived":t("forgetProject",m.id);break;case"sort":t("getTaskForProject",m.id).catch(()=>{});break}})(h);break;case"projectColumn":(function(d){const{action:v,data:m}=d;switch(v){case"add":case"update":case"recovery":t("saveColumn",m);break;case"delete":t("forgetColumn",m.id);break}})(h);break;case"projectTask":(function(d){const{action:v,data:m}=d;switch(v){case"add":case"restore":t("addTaskSuccess",m);break;case"update":case"archived":case"recovery":t("saveTask",m);break;case"dialog":t("saveTask",m),t("getDialogOne",m.dialog_id).catch(()=>{});break;case"upload":t("getTaskFiles",m.task_id);break;case"filedelete":t("forgetTaskFile",m.id);break;case"delete":t("forgetTask",m.id);break}})(h);break;case"file":(function(d){const{action:v,data:m}=d;switch(v){case"add":case"update":t("saveFile",m);break;case"delete":t("forgetFile",m.id);break;case"compress":t("packProgress",m);break}})(h);break}break}}},websocketSend({state:e},t){return new Promise((n,r)=>{var h;if(!$A.isJson(t)){r();return}const{type:i,data:a,callback:l}=t;let c;if(!e.ws){typeof l=="function"&&l(null,!1),r();return}typeof l=="function"&&(c=$A.randomString(16),e.wsCall[c]=l);try{(h=e.ws)==null||h.send(JSON.stringify({type:i,msgId:c,data:a})),n()}catch(s){typeof l=="function"&&l(null,!1),r(s)}})},websocketPath({state:e,dispatch:t},n){clearTimeout(e.wsPathTimeout),e.wsPathValue=n,e.wsPathTimeout=setTimeout(()=>{e.wsPathValue==n&&t("websocketSend",{type:"path",data:{path:n}}).catch(r=>{})},1e3)},websocketMsgListener({state:e},t){const{name:n,callback:r}=t;typeof r=="function"?e.wsListener[n]=r:e.wsListener[n]&&delete e.wsListener[n]},websocketClose({state:e}){e.ws&&(e.ws.close(),e.ws=null)},pgpGenerate({state:e}){return new Promise(async t=>{const n=await TX({type:"ecc",curve:"curve25519",passphrase:e.clientId,userIDs:[{name:"doo",email:"admin@admin.com"}]});n.publicKeyB64=FX(n.publicKey.replace(/\s*-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----\s*/g,"")),t(n)})},pgpGetLocalKey({state:e,dispatch:t}){return new Promise(async n=>{if(e.localKeyPair.privateKey)return n(e.localKeyPair);for(;e.localKeyLock===!0;)await new Promise(r=>setTimeout(r,100));if(e.localKeyPair.privateKey)return n(e.localKeyPair);e.localKeyLock=!0,e.localKeyPair=await t("pgpGenerate"),e.localKeyLock=!1,n(e.localKeyPair)})},pgpEncrypt({state:e,dispatch:t},n){return new Promise(async r=>{$A.isJson(n)||(n={message:n});const i=n.message||n.text,a=n.publicKey||n.key||(await t("pgpGetLocalKey")).publicKey,l=await xX({armoredKey:a}),c=await MX({message:await PX({text:i}),encryptionKeys:l});r(c)})},pgpDecrypt({state:e,dispatch:t},n){return new Promise(async r=>{$A.isJson(n)||(n={encrypted:n});const i=n.encrypted||n.text,a=n.privateKey||n.key||(await t("pgpGetLocalKey")).privateKey,l=await AX({privateKey:await SX({armoredKey:a}),passphrase:n.passphrase||e.clientId}),{data:c}=await IX({message:await OX({armoredMessage:i}),decryptionKeys:l});r(c)})},pgpEncryptApi({state:e,dispatch:t},n){return new Promise(r=>{n=$A.jsonStringify(n),t("pgpEncrypt",{message:n,publicKey:e.apiKeyData.key}).then(i=>{r(i.replace(/\s*-----(BEGIN|END) PGP MESSAGE-----\s*/g,""))})})},pgpDecryptApi({state:e,dispatch:t},n){return new Promise(r=>{t("pgpDecrypt",{encrypted:`-----BEGIN PGP MESSAGE----- diff --git a/public/js/build/application.822f72e7.js b/public/js/build/application.1fcd9820.js similarity index 99% rename from public/js/build/application.822f72e7.js rename to public/js/build/application.1fcd9820.js index 431dd7c32..fab0460f4 100644 --- a/public/js/build/application.822f72e7.js +++ b/public/js/build/application.1fcd9820.js @@ -1 +1 @@ -import{n as r,m as h,a as n}from"./app.6c8b31b1.js";import{D as v}from"./index.31386d23.js";import{U as b}from"./UserSelect.d62f565b.js";import{C as g,T as $,R as y}from"./CheckinExport.ac86aa08.js";import D from"./checkin.dbddec5e.js";import"./tip.517649f6.js";import"./ReportEdit.54eb60eb.js";import"./ReportDetail.556c0891.js";var k=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[t.type=="all"||t.type=="ChatGPT"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("ChatGPT")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"API Key",prop:"openai_key"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"OpenAI API Key"},model:{value:t.formData.openai_key,callback:function(e){t.$set(t.formData,"openai_key",e)},expression:"formData.openai_key"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u8BBF\u95EEOpenAI\u7F51\u7AD9\u67E5\u770B\uFF1A"))),a("a",{attrs:{href:"https://platform.openai.com/account/api-keys",target:"_blank"}},[t._v("https://platform.openai.com/account/api-keys")])])],1),a("FormItem",{attrs:{label:t.$L("\u6A21\u578B"),prop:"openai_model"}},[a("Select",{attrs:{placement:"top"},model:{value:t.formData.openai_model,callback:function(e){t.$set(t.formData,"openai_model",e)},expression:"formData.openai_model"}},[a("Option",{attrs:{value:"gpt-3.5-turbo"}},[t._v("gpt-3.5-turbo")]),a("Option",{attrs:{value:"gpt-4"}},[t._v("gpt-4")])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u67E5\u770B\u8BF4\u660E"))+" "),a("a",{attrs:{href:"https://platform.openai.com/docs/models",target:"_blank"}},[t._v("https://platform.openai.com/docs/models")])])],1),a("FormItem",{attrs:{label:t.$L("\u4F7F\u7528\u4EE3\u7406"),prop:"openai_agency"}},[a("Input",{attrs:{maxlength:500,placeholder:t.$L("\u652F\u6301 http \u6216 socks \u4EE3\u7406")},model:{value:t.formData.openai_agency,callback:function(e){t.$set(t.formData,"openai_agency",e)},expression:"formData.openai_agency"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4F8B\u5982\uFF1Ahttp://proxy.com \u6216 socks5://proxy.com")))])],1)],1)]):t._e(),t.type=="all"||t.type=="Claude"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("Claude")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"Token",prop:"claude_token"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"Claude Token"},model:{value:t.formData.claude_token,callback:function(e){t.$set(t.formData,"claude_token",e)},expression:"formData.claude_token"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u767B\u5F55"))+" "),a("a",{attrs:{href:"https://claude.ai",target:"_blank"}},[t._v("https://claude.ai")]),t._v(" "+t._s(t.$L("\u67E5\u770B Cookie \u4E2D\u7684 sessionKey \u4FBF\u662F")))])],1),a("FormItem",{attrs:{label:t.$L("\u4F7F\u7528\u4EE3\u7406"),prop:"claude_agency"}},[a("Input",{attrs:{maxlength:500,placeholder:t.$L("\u652F\u6301 http \u6216 socks \u4EE3\u7406")},model:{value:t.formData.claude_agency,callback:function(e){t.$set(t.formData,"claude_agency",e)},expression:"formData.claude_agency"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4F8B\u5982\uFF1Ahttp://proxy.com \u6216 socks5://proxy.com")))])],1)],1)]):t._e(),t.type=="all"||t.type=="Wenxin"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("\u6587\u5FC3\u4E00\u8A00 (Wenxin)")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"API Key",prop:"wenxin_key"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"API Key"},model:{value:t.formData.wenxin_key,callback:function(e){t.$set(t.formData,"wenxin_key",e)},expression:"formData.wenxin_key"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u83B7\u53D6\u65B9\u5F0F"))+" "),a("a",{attrs:{href:"https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3#3-%E8%8E%B7%E5%8F%96%E5%AF%86%E9%92%A5",target:"_blank"}},[t._v("https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3")])])],1),a("FormItem",{attrs:{label:"API Secret",prop:"wenxin_secret"}},[a("Input",{attrs:{maxlength:500,type:"password",placeholder:"API Secret"},model:{value:t.formData.wenxin_secret,callback:function(e){t.$set(t.formData,"wenxin_secret",e)},expression:"formData.wenxin_secret"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u83B7\u53D6\u65B9\u5F0F"))+" "),a("a",{attrs:{href:"https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3#3-%E8%8E%B7%E5%8F%96%E5%AF%86%E9%92%A5",target:"_blank"}},[t._v("https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3")])])],1),a("FormItem",{attrs:{label:t.$L("\u6A21\u578B"),prop:"wenxin_model"}},[a("Select",{attrs:{placement:"top"},model:{value:t.formData.wenxin_model,callback:function(e){t.$set(t.formData,"wenxin_model",e)},expression:"formData.wenxin_model"}},[a("Option",{attrs:{value:"completions_pro"}},[t._v("ERNIE-Bot 4.0")]),a("Option",{attrs:{value:"completions"}},[t._v("ERNIE-Bot")]),a("Option",{attrs:{value:"eb-instant"}},[t._v("ERNIE-Bot-turbo")]),a("Option",{attrs:{value:"llama_2_7b"}},[t._v("Llama-2-7b-chat")]),a("Option",{attrs:{value:"llama_2_13b"}},[t._v("Llama-2-13B-Chat")])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u67E5\u770B\u8BF4\u660E"))+" "),a("a",{attrs:{href:"https://cloud.baidu.com/doc/WENXINWORKSHOP/s/vliu6vq7u",target:"_blank"}},[t._v("https://cloud.baidu.com/doc/WENXINWORKSHOP/s/vliu6vq7u")])])],1)],1)]):t._e(),t.type=="all"||t.type=="Qianwen"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("\u901A\u4E49\u5343\u95EE (Qianwen)")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"API Key",prop:"qianwen_key"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"API Key"},model:{value:t.formData.qianwen_key,callback:function(e){t.$set(t.formData,"qianwen_key",e)},expression:"formData.qianwen_key"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u83B7\u53D6\u65B9\u5F0F"))+" "),a("a",{attrs:{href:"https://help.aliyun.com/document_detail/611472.html",target:"_blank"}},[t._v("https://help.aliyun.com/document_detail/611472.html")])])],1),a("FormItem",{attrs:{label:t.$L("\u6A21\u578B"),prop:"qianwen_model"}},[a("Select",{attrs:{placement:"top"},model:{value:t.formData.qianwen_model,callback:function(e){t.$set(t.formData,"qianwen_model",e)},expression:"formData.qianwen_model"}},[a("Option",{attrs:{value:"qwen-v1"}},[t._v("qwen-v1")]),a("Option",{attrs:{value:"qwen-plus-v1"}},[t._v("qwen-plus-v1")])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u67E5\u770B\u8BF4\u660E"))+" "),a("a",{attrs:{href:"https://help.aliyun.com/document_detail/2399481.html",target:"_blank"}},[t._v("https://help.aliyun.com/document_detail/2399481.html")])])],1)],1)]):t._e()]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},L=[];const w={name:"SystemAibot",props:{type:{default:"all"}},data(){return{loadIng:0,formData:{},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/aibot?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},c={};var x=r(w,k,L,!1,C,null,null,null);function C(t){for(let s in c)this[s]=c[s]}var S=function(){return x.exports}(),I=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u7B7E\u5230\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u529F\u80FD\u5F00\u542F"),prop:"open"}},[a("RadioGroup",{model:{value:t.formData.open,callback:function(e){t.$set(t.formData,"open",e)},expression:"formData.open"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"export-data"},[a("p",{on:{click:function(e){t.allUserShow=!0}}},[t._v(t._s(t.$L("\u7BA1\u7406\u6210\u5458MAC\u5730\u5740")))]),a("p",{on:{click:function(e){t.exportShow=!0}}},[t._v(t._s(t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E")))])])],1),t.formData.open==="open"?[a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65F6\u95F4"),prop:"time"}},[a("TimePicker",{attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u7B7E\u5230\u65F6\u95F4")},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}}),a("Form",{staticClass:"block-setting-advance",nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:t.$L("\u6700\u65E9\u53EF\u63D0\u524D"),prop:"advance"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.advance,callback:function(e){t.$set(t.formData,"advance",e)},expression:"formData.advance"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("FormItem",{attrs:{label:t.$L("\u6700\u665A\u53EF\u5EF6\u540E"),prop:"delay"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.delay,callback:function(e){t.$set(t.formData,"delay",e)},expression:"formData.delay"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7B7E\u5230\u524D\u540E\u65F6\u95F4\u6536\u5230\u6D88\u606F\u901A\u77E5")))]),a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u6253\u5361\u63D0\u9192"),prop:"remindin"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.remindin,callback:function(e){t.$set(t.formData,"remindin",e)},expression:"formData.remindin"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u7F3A\u5361\u63D0\u9192"),prop:"remindexceed"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.remindexceed,callback:function(e){t.$set(t.formData,"remindexceed",e)},expression:"formData.remindexceed"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7B7E\u5230\u63D0\u9192\u5BF9\u8C61\uFF1A3\u5929\u5185\u6709\u7B7E\u5230\u7684\u6210\u5458\uFF08\u6CD5\u5B9A\u5DE5\u4F5C\u65E5\uFF09")))])],1)],1),a("FormItem",{attrs:{label:t.$L("\u5141\u8BB8\u4FEE\u6539"),prop:"edit"}},[a("RadioGroup",{model:{value:t.formData.edit,callback:function(e){t.$set(t.formData,"edit",e)},expression:"formData.edit"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5141\u8BB8")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u7981\u6B62")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5141\u8BB8\u6210\u5458\u81EA\u5DF1\u4FEE\u6539MAC\u5730\u5740")))])],1),a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65B9\u5F0F"),prop:"modes"}},[a("CheckboxGroup",{model:{value:t.formData.modes,callback:function(e){t.$set(t.formData,"modes",e)},expression:"formData.modes"}},[a("Checkbox",{attrs:{label:"auto"}},[t._v(t._s(t.$L("\u81EA\u52A8\u7B7E\u5230")))]),a("Checkbox",{attrs:{label:"manual"}},[t._v(t._s(t.$L("\u624B\u52A8\u7B7E\u5230")))]),t._e()],1),t.formData.modes.includes("auto")?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\u7B7E\u5230"))+": "+t._s(t.$L("\u8BE6\u60C5\u770B\u4E0B\u6587\u5B89\u88C5\u8BF4\u660E")))]):t._e(),t.formData.modes.includes("manual")?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u624B\u52A8\u7B7E\u5230"))+": "+t._s(t.$L("\u901A\u8FC7\u5728\u7B7E\u5230\u6253\u5361\u673A\u5668\u4EBA\u53D1\u9001\u6307\u4EE4\u7B7E\u5230")))]):t._e(),t.formData.modes.includes("location")?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5B9A\u4F4D\u7B7E\u5230"))+": "+t._s(t.$L("\u901A\u8FC7\u5728\u7B7E\u5230\u6253\u5361\u673A\u5668\u4EBA\u53D1\u9001\u4F4D\u7F6E\u7B7E\u5230")))]):t._e()],1)]:t._e()],2)]),t.formData.open==="open"&&t.formData.modes.includes("auto")?[a("div",{staticClass:"block-setting-placeholder"}),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u81EA\u52A8\u7B7E\u5230")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5B89\u88C5\u8BF4\u660E"),prop:"explain"}},[a("p",[t._v("1. "+t._s(t.$L("\u81EA\u52A8\u7B7E\u5230\u5EF6\u8FDF\u65F6\u957F\u4E3A\xB11\u5206\u949F\u3002")))]),a("p",[t._v("2. "+t._s(t.$L("\u8BBE\u5907\u8FDE\u63A5\u4E0A\u6307\u5B9A\u8DEF\u7531\u5668\uFF08WiFi\uFF09\u540E\u81EA\u52A8\u7B7E\u5230\u3002")))]),a("p",[t._v("3. "+t._s(t.$L("\u4EC5\u652F\u6301Openwrt\u7CFB\u7EDF\u7684\u8DEF\u7531\u5668\u3002")))]),a("p",[t._v("4. "+t._s(t.$L("\u5173\u95ED\u7B7E\u5230\u529F\u80FD\u518D\u5F00\u542F\u9700\u8981\u91CD\u65B0\u5B89\u88C5\u3002")))]),a("p",[t._v("5. "+t._s(t.$L("\u8FDB\u5165\u8DEF\u7531\u5668\u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u5373\u53EF\u5B8C\u6210\u5B89\u88C5\uFF1A")))]),a("Input",{ref:"cmd",staticStyle:{"margin-top":"6px"},attrs:{type:"textarea",readonly:"",value:t.formData.cmd},on:{"on-focus":t.clickCmd}})],1)],1)])]:t._e()],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1),a("CheckinExport",{model:{value:t.exportShow,callback:function(e){t.exportShow=e},expression:"exportShow"}}),a("DrawerOverlay",{attrs:{placement:"right",size:1380},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?a("TeamManagement",{attrs:{"checkin-mac":""}}):t._e()],1)],1)},A=[];const F={name:"SystemCheckin",components:{CheckinExport:g,TeamManagement:$,DrawerOverlay:v},data(){return{loadIng:0,formData:{open:"",edit:"",cmd:"",modes:[]},ruleData:{},allUserShow:!1,exportShow:!1}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/checkin?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})},clickCmd(){this.$nextTick(t=>{this.$refs.cmd.focus({cursor:"all"})})}}},m={};var E=r(F,I,A,!1,R,null,null,null);function R(t){for(let s in m)this[s]=m[s]}var T=function(){return E.exports}(),O=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("AgoraIO")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u4F1A\u8BAE\u529F\u80FD"),prop:"open"}},[a("RadioGroup",{model:{value:t.formData.open,callback:function(e){t.$set(t.formData,"open",e)},expression:"formData.open"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1)],1),t.formData.open==="open"?[a("FormItem",{attrs:{label:"App ID ",prop:"appid"}},[a("Input",{attrs:{maxlength:255},model:{value:t.formData.appid,callback:function(e){t.$set(t.formData,"appid",e)},expression:"formData.appid"}})],1),a("FormItem",{attrs:{label:"App certificate",prop:"app_certificate"}},[a("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.app_certificate,callback:function(e){t.$set(t.formData,"app_certificate",e)},expression:"formData.app_certificate"}})],1)]:t._e()],2)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},P=[];const N={name:"SystemMeeting",data(){return{loadIng:0,formData:{open:"",appid:"",app_certificate:""},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/meeting?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},p={};var B=r(N,O,P,!1,M,null,null,null);function M(t){for(let s in p)this[s]=p[s]}var U=function(){return B.exports}(),j=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("LDAP")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u542F\u7528 LDAP \u8BA4\u8BC1"),prop:"ldap_open"}},[a("RadioGroup",{model:{value:t.formData.ldap_open,callback:function(e){t.$set(t.formData,"ldap_open",e)},expression:"formData.ldap_open"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540E\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528 LDAP \u5E10\u53F7\u5BC6\u7801\u767B\u5F55")))])],1),t.formData.ldap_open==="open"?[a("FormItem",{attrs:{label:t.$L("LDAP \u5730\u5740"),prop:"ldap_host"}},[a("Input",{model:{value:t.formData.ldap_host,callback:function(e){t.$set(t.formData,"ldap_host",e)},expression:"formData.ldap_host"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4F8B\u5982"))+": 192.168.1.200\u3001www.ldap.com")])],1),a("FormItem",{attrs:{label:t.$L("LDAP \u7AEF\u53E3"),prop:"ldap_port"}},[a("Input",{attrs:{type:"number",placeholder:`${t.$L("\u9ED8\u8BA4")}: 389`},model:{value:t.formData.ldap_port,callback:function(e){t.$set(t.formData,"ldap_port",e)},expression:"formData.ldap_port"}})],1),a("FormItem",{attrs:{label:"Base DN",prop:"ldap_base_dn"}},[a("Input",{model:{value:t.formData.ldap_base_dn,callback:function(e){t.$set(t.formData,"ldap_base_dn",e)},expression:"formData.ldap_base_dn"}})],1),a("FormItem",{attrs:{label:"User DN",prop:"ldap_user_dn"}},[a("Input",{model:{value:t.formData.ldap_user_dn,callback:function(e){t.$set(t.formData,"ldap_user_dn",e)},expression:"formData.ldap_user_dn"}})],1),a("FormItem",{attrs:{label:t.$L("\u5BC6\u7801"),prop:"ldap_password"}},[a("Input",{attrs:{type:"password"},model:{value:t.formData.ldap_password,callback:function(e){t.$set(t.formData,"ldap_password",e)},expression:"formData.ldap_password"}})],1),a("FormItem",{attrs:{label:t.$L("\u540C\u6B65\u672C\u5730\u5E10\u53F7"),prop:"ldap_sync_local"}},[a("RadioGroup",{model:{value:t.formData.ldap_sync_local,callback:function(e){t.$set(t.formData,"ldap_sync_local",e)},expression:"formData.ldap_sync_local"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540C\u6B65\u672C\u5730\u5E10\u53F7\u767B\u5F55\u540E\u5C06\u540C\u6B65\u5230 LDAP \u670D\u52A1\u5668")))])],1),a("FormItem",[a("Button",{attrs:{loading:t.testLoad},on:{click:t.checkTest}},[t._v(t._s(t.$L("\u6D4B\u8BD5\u94FE\u63A5")))])],1)]:t._e()],2)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},q=[];const G={name:"SystemThirdAccess",data(){return{loadIng:0,formData:{},ruleData:{},testLoad:!1}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/thirdaccess?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})},checkTest(){this.testLoad||(this.testLoad=!0,this.$store.dispatch("call",{url:"system/setting/thirdaccess?type=testldap",data:this.formData}).then(({msg:t})=>{$A.messageSuccess(t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.testLoad=!1}))}}},d={};var z=r(G,j,q,!1,J,null,null,null);function J(t){for(let s in d)this[s]=d[s]}var K=function(){return z.exports}(),W=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u90AE\u7BB1\u670D\u52A1\u5668\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("SMTP\u670D\u52A1\u5668"),prop:"smtp_server"}},[a("Input",{model:{value:t.formData.smtp_server,callback:function(e){t.$set(t.formData,"smtp_server",e)},expression:"formData.smtp_server"}})],1),a("FormItem",{attrs:{label:t.$L("\u7AEF\u53E3"),prop:"port"}},[a("Input",{attrs:{maxlength:20},model:{value:t.formData.port,callback:function(e){t.$set(t.formData,"port",e)},expression:"formData.port"}})],1),a("FormItem",{attrs:{label:t.$L("\u5E10\u53F7"),prop:"account"}},[a("Input",{attrs:{maxlength:128},model:{value:t.formData.account,callback:function(e){t.$set(t.formData,"account",e)},expression:"formData.account"}})],1),a("FormItem",{attrs:{label:t.$L("\u5BC6\u7801"),prop:"password"}},[a("Input",{attrs:{maxlength:128,type:"password"},model:{value:t.formData.password,callback:function(e){t.$set(t.formData,"password",e)},expression:"formData.password"}})],1),a("FormItem",[a("Button",{on:{click:t.checkEmailSend}},[t._v(t._s(t.$L("\u90AE\u4EF6\u53D1\u9001\u6D4B\u8BD5")))])],1)],1)]),a("div",{staticClass:"block-setting-placeholder"}),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u90AE\u4EF6\u901A\u77E5\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5F00\u542F\u6CE8\u518C\u9A8C\u8BC1"),prop:"reg_verify"}},[a("RadioGroup",{model:{value:t.formData.reg_verify,callback:function(e){t.$set(t.formData,"reg_verify",e)},expression:"formData.reg_verify"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formData.reg_verify=="open"?a("div",{staticClass:"form-tip"},[t._v(" "+t._s(t.$L("\u5F00\u542F\u540E\uFF1A"))),a("br"),t._v(" \u2460 "+t._s(t.$L("\u5E10\u53F7\u9700\u9A8C\u8BC1\u901A\u8FC7\u624D\u53EF\u767B\u5F55"))),a("br"),t._v(" \u2461 "+t._s(t.$L("\u4FEE\u6539\u90AE\u7BB1\u548C\u5220\u9664\u5E10\u53F7\u9700\u8981\u90AE\u7BB1\u9A8C\u8BC1\u7801"))+" ")]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u6D88\u606F\u63D0\u9192"),prop:"notice_msg"}},[a("RadioGroup",{model:{value:t.formData.notice_msg,callback:function(e){t.$set(t.formData,"notice_msg",e)},expression:"formData.notice_msg"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formData.notice_msg=="open"?a("Form",{staticClass:"block-setting-msg-unread",nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:t.$L("\u672A\u8BFB\u4E2A\u4EBA\u6D88\u606F"),prop:"msg_unread_user_minute"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.msg_unread_user_minute,callback:function(e){t.$set(t.formData,"msg_unread_user_minute",e)},expression:"formData.msg_unread_user_minute"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F"))+"(m)")])],1)]),a("FormItem",{attrs:{label:t.$L("\u672A\u8BFB\u7FA4\u804A\u6D88\u606F"),prop:"msg_unread_group_minute"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.msg_unread_group_minute,callback:function(e){t.$set(t.formData,"msg_unread_group_minute",e)},expression:"formData.msg_unread_group_minute"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F"))+"(m)")])],1)]),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u586B\u5199-1\u5219\u4E0D\u901A\u77E5\uFF0C\u8BEF\u5DEE\xB110\u5206\u949F")))])],1):t._e()],1)],1)]),a("div",{staticClass:"block-setting-placeholder"}),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u5FFD\u7565\u90AE\u7BB1\u5730\u5740")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5FFD\u7565\u90AE\u7BB1"),prop:"ignore_addr"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:3,maxRows:50}},model:{value:t.formData.ignore_addr,callback:function(e){t.$set(t.formData,"ignore_addr",e)},expression:"formData.ignore_addr"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4E0D\u4F1A\u5411\u5FFD\u7565\u7684\u90AE\u7BB1\u5730\u5740\u53D1\u9001\u90AE\u4EF6\uFF0C\u53EF\u4F7F\u7528\u6362\u884C\u5206\u5272\u591A\u4E2A\u5730\u5740\u3002")))])],1)],1)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},H=[];const Q={name:"SystemEmailSetting",data(){return{loadIng:0,formData:{smtp_server:"",port:"",account:"",password:"",reg_verify:"colse",notice_msg:"open",msg_unread_user_minute:-1,msg_unread_group_minute:-1,ignore_addr:""},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/email?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})},checkEmailSend(){$A.modalInput({title:"\u6D4B\u8BD5\u90AE\u4EF6",placeholder:"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u5730\u5740",onOk:t=>t?$A.isEmail(t)?new Promise((s,a)=>{this.$store.dispatch("call",{url:"system/email/check",data:Object.assign(this.formData,{to:t})}).then(({msg:e})=>{s(e)}).catch(({msg:e})=>{a(e)})}):"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u6536\u4EF6\u4EBA\u5730\u5740":"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u5730\u5740"})}}},u={};var X=r(Q,W,H,!1,Z,null,null,null);function Z(t){for(let s in u)this[s]=u[s]}var V=function(){return X.exports}(),Y=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u53CB\u76DF\u63A8\u9001")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5F00\u542F\u63A8\u9001"),prop:"push"}},[a("RadioGroup",{model:{value:t.formData.push,callback:function(e){t.$set(t.formData,"push",e)},expression:"formData.push"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1)],1),t.formData.push==="open"?[a("Divider",{attrs:{orientation:"left"}},[t._v("iOS "+t._s(t.$L("\u53C2\u6570\u914D\u7F6E")))]),a("FormItem",{attrs:{label:"Appkey",prop:"ios_appkey"}},[a("Input",{attrs:{maxlength:255},model:{value:t.formData.ios_key,callback:function(e){t.$set(t.formData,"ios_key",e)},expression:"formData.ios_key"}})],1),a("FormItem",{attrs:{label:"App Master Secret",prop:"secret"}},[a("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.ios_secret,callback:function(e){t.$set(t.formData,"ios_secret",e)},expression:"formData.ios_secret"}})],1),a("Divider",{attrs:{orientation:"left"}},[t._v("Android "+t._s(t.$L("\u53C2\u6570\u914D\u7F6E")))]),a("FormItem",{attrs:{label:"Appkey",prop:"android_appkey"}},[a("Input",{attrs:{maxlength:255},model:{value:t.formData.android_key,callback:function(e){t.$set(t.formData,"android_key",e)},expression:"formData.android_key"}})],1),a("FormItem",{attrs:{label:"App Master Secret",prop:"secret"}},[a("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.android_secret,callback:function(e){t.$set(t.formData,"android_secret",e)},expression:"formData.android_secret"}})],1)]:t._e()],2)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},tt=[];const at={name:"SystemAppPush",data(){return{loadIng:0,formData:{push:"",ios_key:"",ios_secret:"",android_key:"",android_secret:""},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/apppush?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},_={};var et=r(at,Y,tt,!1,st,null,null,null);function st(t){for(let s in _)this[s]=_[s]}var ot=function(){return et.exports}(),it=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"page-apply"},[a("PageTitle",{attrs:{title:t.$L("\u5E94\u7528")}}),a("div",{staticClass:"apply-wrapper"},[a("div",{staticClass:"apply-head"},[a("div",{staticClass:"apply-nav"},[a("h1",[t._v(t._s(t.$L("\u5E94\u7528")))])])]),a("div",{staticClass:"apply-content"},[t._l(t.applyListTypes,function(e){return[t.isExistAdminList?a("div",{staticClass:"apply-row-title"},[t._v(" "+t._s(e=="base"?t.$L("\u5E38\u7528"):t.$L("\u7BA1\u7406\u5458"))+" ")]):t._e(),a("Row",{attrs:{gutter:16}},t._l(t.applyList,function(o,i){return(e=="base"&&!o.type||o.type==e)&&o.show!==!1?a("Col",{key:i,attrs:{xs:{span:6},sm:{span:6},lg:{span:6},xl:{span:6},xxl:{span:3}}},[a("div",{staticClass:"apply-col"},[a("div",{on:{click:function(l){return t.applyClick(o)}}},[a("div",{staticClass:"logo"},[a("img",{attrs:{src:t.getLogoPath(o.value)}}),a("div",{staticClass:"apply-box-top-report",on:{click:function(l){return l.stopPropagation(),t.applyClick(o,"badge")}}},[t.showBadge(o,"approve")?a("Badge",{attrs:{"overflow-count":999,count:t.approveUnreadNumber}}):t._e(),t.showBadge(o,"report")?a("Badge",{attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)]),a("p",[t._v(t._s(t.$L(o.label)))])])])]):t._e()}),1)]})],2)]),a("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.workReportShow,callback:function(e){t.workReportShow=e},expression:"workReportShow"}},[t.workReportShow?a("Report",{on:{"on-read":function(e){return t.$store.dispatch("getReportUnread",1e3)}},model:{value:t.workReportTabs,callback:function(e){t.workReportTabs=e},expression:"workReportTabs"}}):t._e()],1),a("DrawerOverlay",{attrs:{placement:"right",size:600},model:{value:t.aibotShow,callback:function(e){t.aibotShow=e},expression:"aibotShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("AI\u673A\u5668\u4EBA"))+" "),t.userIsAdmin?a("p",{on:{click:function(e){t.aibotType=t.aibotType==1?2:1}}},[t._v(" "+t._s(t.aibotType==1?t.$L("\u673A\u5668\u4EBA\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")]):t._e()]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[t.aibotType==1?a("ul",{staticClass:"ivu-modal-wrap-ul"},t._l(t.aibotList,function(e,o){return a("li",{key:o},[a("img",{attrs:{src:e.src}}),a("h4",[t._v(t._s(e.label))]),a("p",{staticClass:"desc",on:{click:function(i){return t.openDetail(e.desc)}}},[t._v(t._s(e.desc))]),a("p",{staticClass:"btn",on:{click:function(i){return t.onGoToChat(e.value)}}},[t._v(t._s(t.$L("\u5F00\u59CB\u804A\u5929")))]),t.aibotDialogSearchLoad==e.value?a("div",{staticClass:"load"},[a("Loading")],1):t._e()])}),0):a("Tabs",{model:{value:t.aibotTabAction,callback:function(e){t.aibotTabAction=e},expression:"aibotTabAction"}},[a("TabPane",{attrs:{label:"ChatGPT",name:"opanai"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="opanai"?a("SystemAibot",{attrs:{type:"ChatGPT"}}):t._e()],1)]),a("TabPane",{attrs:{label:"Claude",name:"claude"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="claude"?a("SystemAibot",{attrs:{type:"Claude"}}):t._e()],1)]),a("TabPane",{attrs:{label:t.$L("\u6587\u5FC3\u4E00\u8A00"),name:"wenxin"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="wenxin"?a("SystemAibot",{attrs:{type:"Wenxin"}}):t._e()],1)]),a("TabPane",{attrs:{label:t.$L("\u901A\u4E49\u5343\u95EE"),name:"qianwen"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="qianwen"?a("SystemAibot",{attrs:{type:"Qianwen"}}):t._e()],1)])],1)],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.signInShow,callback:function(e){t.signInShow=e},expression:"signInShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("\u7B7E\u5230\u7BA1\u7406"))+" "),t.userIsAdmin?a("p",{on:{click:function(e){t.signInType=t.signInType==1?2:1}}},[t._v(" "+t._s(t.signInType==1?t.$L("\u7B7E\u5230\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")]):t._e()]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[t.signInType==1?a("Checkin"):a("SystemCheckin")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:600},model:{value:t.meetingShow,callback:function(e){t.meetingShow=e},expression:"meetingShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("\u4F1A\u8BAE"))+" "),a("p",{on:{click:function(e){t.meetingType=t.meetingType==1?2:1}}},[t._v(" "+t._s(t.meetingType==1?t.$L("\u4F1A\u8BAE\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")])]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[t.meetingType==1?a("ul",{staticClass:"ivu-modal-wrap-ul"},[a("li",[a("img",{attrs:{src:t.getLogoPath("meeting")}}),a("h4",[t._v(t._s(t.$L("\u65B0\u4F1A\u8BAE")))]),a("p",{staticClass:"desc",on:{click:function(e){return t.openDetail(t.meetingDescs.add)}}},[t._v(" "+t._s(t.meetingDescs.add)+" ")]),a("p",{staticClass:"btn",on:{click:function(e){return t.onMeeting("createMeeting")}}},[t._v(t._s(t.$L("\u65B0\u5EFA\u4F1A\u8BAE")))])]),a("li",[a("img",{attrs:{src:t.getLogoPath("meeting-join")}}),a("h4",[t._v(t._s(t.$L("\u52A0\u5165\u4F1A\u8BAE")))]),a("p",{staticClass:"desc",on:{click:function(e){return t.openDetail(t.meetingDescs.join)}}},[t._v(t._s(t.meetingDescs.join))]),a("p",{staticClass:"btn",on:{click:function(e){return t.onMeeting("joinMeeting")}}},[t._v(t._s(t.$L("\u52A0\u5165\u4F1A\u8BAE")))])])]):a("SystemMeeting")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.ldapShow,callback:function(e){t.ldapShow=e},expression:"ldapShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("LDAP\u8BBE\u7F6E"))+" ")]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[a("SystemThirdAccess")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.mailShow,callback:function(e){t.mailShow=e},expression:"mailShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("\u90AE\u4EF6\u901A\u77E5"))+" ")]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[a("SystemEmailSetting")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.appPushShow,callback:function(e){t.appPushShow=e},expression:"appPushShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("APP\u63A8\u9001"))+" ")]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[a("SystemAppPush")],1)])]),a("Modal",{attrs:{title:t.$L("\u626B\u7801\u767B\u5F55"),"mask-closable":!1},model:{value:t.scanLoginShow,callback:function(e){t.scanLoginShow=e},expression:"scanLoginShow"}},[a("div",{staticClass:"mobile-scan-login-box"},[a("div",{staticClass:"mobile-scan-login-title"},[t._v(t._s(t.$L("\u4F60\u597D\uFF0C\u626B\u7801\u786E\u8BA4\u767B\u5F55")))]),a("div",{staticClass:"mobile-scan-login-subtitle"},[t._v("\u300C"+t._s(t.$L("\u4E3A\u786E\u4FDD\u5E10\u53F7\u5B89\u5168\uFF0C\u8BF7\u786E\u8BA4\u662F\u672C\u4EBA\u64CD\u4F5C"))+"\u300D")])]),a("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"default"},on:{click:function(e){t.scanLoginShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u767B\u5F55")))]),a("Button",{attrs:{type:"primary",loading:t.scanLoginLoad},on:{click:t.scanLoginSubmit}},[t._v(t._s(t.$L("\u786E\u8BA4\u767B\u5F55")))])],1)])],1)},rt=[];const lt={components:{UserSelect:b,DrawerOverlay:v,Report:y,SystemAibot:S,SystemCheckin:T,Checkin:D,SystemMeeting:U,SystemThirdAccess:K,SystemEmailSetting:V,SystemAppPush:ot},data(){return{applyList:[],applyListTypes:["base","admin"],workReportShow:!1,workReportTabs:"my",aibotList:[{value:"openai",label:"ChatGPT",src:$A.apiUrl("../images/avatar/default_openai.png"),desc:this.$L("\u6211\u662F\u4E00\u4E2A\u4EBA\u5DE5\u667A\u80FD\u52A9\u624B\uFF0C\u4E3A\u7528\u6237\u63D0\u4F9B\u95EE\u9898\u89E3\u7B54\u548C\u6307\u5BFC\u3002\u6211\u6CA1\u6709\u5177\u4F53\u7684\u8EAB\u4EFD\uFF0C\u53EA\u662F\u4E00\u4E2A\u7A0B\u5E8F\u3002\u60A8\u6709\u4EC0\u4E48\u95EE\u9898\u53EF\u4EE5\u95EE\u6211\u54E6\uFF1F")},{value:"claude",label:"Claude",src:$A.apiUrl("../images/avatar/default_claude.png"),desc:this.$L("\u6211\u662FClaude,\u4E00\u4E2A\u7531Anthropic\u516C\u53F8\u521B\u9020\u51FA\u6765\u7684AI\u52A9\u624B\u673A\u5668\u4EBA\u3002\u6211\u7684\u5DE5\u4F5C\u662F\u5E2E\u52A9\u4EBA\u7C7B,\u4E0E\u4EBA\u5BF9\u8BDD\u5E76\u7ED9\u51FA\u89E3\u7B54\u3002")},{value:"wenxin",label:"Wenxin",src:$A.apiUrl("../avatar/Wenxin.png"),desc:this.$L("\u6211\u662F\u6587\u5FC3\u4E00\u8A00\uFF0C\u82F1\u6587\u540D\u662FERNIE Bot\u3002\u6211\u80FD\u591F\u4E0E\u4EBA\u5BF9\u8BDD\u4E92\u52A8\uFF0C\u56DE\u7B54\u95EE\u9898\uFF0C\u534F\u52A9\u521B\u4F5C\uFF0C\u9AD8\u6548\u4FBF\u6377\u5730\u5E2E\u52A9\u4EBA\u4EEC\u83B7\u53D6\u4FE1\u606F\u3001\u77E5\u8BC6\u548C\u7075\u611F\u3002")},{value:"qianwen",label:"Qianwen",src:$A.apiUrl("../avatar/%E9%80%9A%E4%B9%89%E5%8D%83%E9%97%AE.png"),desc:this.$L("\u6211\u662F\u8FBE\u6469\u9662\u81EA\u4E3B\u7814\u53D1\u7684\u8D85\u5927\u89C4\u6A21\u8BED\u8A00\u6A21\u578B\uFF0C\u80FD\u591F\u56DE\u7B54\u95EE\u9898\u3001\u521B\u4F5C\u6587\u5B57\uFF0C\u8FD8\u80FD\u8868\u8FBE\u89C2\u70B9\u3001\u64B0\u5199\u4EE3\u7801\u3002")}],aibotTabAction:"opanai",aibotShow:!1,aibotType:1,aibotDialogSearchLoad:"",signInShow:!1,signInType:1,meetingShow:!1,meetingType:1,meetingDescs:{add:this.$L("\u521B\u5EFA\u4E00\u4E2A\u5168\u65B0\u7684\u4F1A\u8BAE\u89C6\u9891\u4F1A\u8BAE\uFF0C\u4E0E\u4F1A\u8005\u53EF\u4EE5\u5728\u5B9E\u65F6\u4E2D\u8FDB\u884C\u9762\u5BF9\u9762\u7684\u89C6\u542C\u4EA4\u6D41\u3002\u901A\u8FC7\u89C6\u9891\u4F1A\u8BAE\u5E73\u53F0\uFF0C\u53C2\u4E0E\u8005\u53EF\u4EE5\u5206\u4EAB\u5C4F\u5E55\u3001\u5171\u4EAB\u6587\u6863\uFF0C\u5E76\u4E0E\u5176\u4ED6\u4E0E\u4F1A\u4EBA\u5458\u8FDB\u884C\u8BA8\u8BBA\u548C\u534F\u3002"),join:this.$L("\u52A0\u5165\u89C6\u9891\u4F1A\u8BAE\uFF0C\u53C2\u4E0E\u5DF2\u7ECF\u521B\u5EFA\u7684\u4F1A\u8BAE\uFF0C\u5728\u4F1A\u8BAE\u8FC7\u7A0B\u4E2D\u4E0E\u5176\u4ED6\u53C2\u4F1A\u4EBA\u5458\u8FDB\u884C\u8FDC\u7A0B\u5B9E\u65F6\u89C6\u542C\u4EA4\u6D41\u548C\u534F\u4F5C\u3002")},ldapShow:!1,mailType:1,mailShow:!1,appPushType:1,appPushShow:!1,scanLoginShow:!1,scanLoginLoad:!1,scanLoginCode:""}},activated(){this.initList()},computed:{...h(["userIsAdmin","reportUnreadNumber","approveUnreadNumber","cacheDialogs","windowOrientation"]),isExistAdminList(){return this.applyList.map(t=>t.type).indexOf("admin")!==-1}},watch:{windowOrientation(){this.initList()}},methods:{initList(){const t=[{value:"approve",label:"\u5BA1\u6279\u4E2D\u5FC3"},{value:"okr",label:"OKR\u7BA1\u7406"},{value:"report",label:"\u5DE5\u4F5C\u62A5\u544A"},{value:"robot",label:"AI\u673A\u5668\u4EBA"},{value:"signin",label:"\u7B7E\u5230"},{value:"meeting",label:"\u4F1A\u8BAE"}];this.windowOrientation=="landscape"?t.push({value:"scan",label:"\u626B\u4E00\u626B",show:$A.isEEUiApp}):(t.unshift({value:"calendar",label:"\u65E5\u5386"},{value:"file",label:"\u6587\u4EF6"}),t.push({value:"addProject",label:"\u521B\u5EFA\u9879\u76EE"},{value:"addTask",label:"\u6DFB\u52A0\u4EFB\u52A1"},{value:"scan",label:"\u626B\u4E00\u626B",show:$A.isEEUiApp},{value:"setting",label:"\u8BBE\u7F6E"}));const s=this.userIsAdmin?[{value:"okrAnalyze",label:"OKR\u7ED3\u679C"},{value:"ldap",label:"LDAP"},{value:"mail",label:"\u90AE\u4EF6\u901A\u77E5"},{value:"appPush",label:"APP\u63A8\u9001"},{value:"allUser",label:"\u56E2\u961F\u7BA1\u7406"}].map(a=>(a.type="admin",a)):[];this.applyList=[...t,...s]},getLogoPath(t){return t=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),$A.apiUrl(`../images/application/${t}.svg`)},showBadge(t,s){let a=0;switch(s){case"approve":a=this.approveUnreadNumber;break;case"report":a=this.reportUnreadNumber;break}return t.value==s&&a>0},applyClick(t,s=""){switch(t.value){case"approve":case"calendar":case"file":case"setting":this.goForward({name:"manage-"+t.value});break;case"okr":case"okrAnalyze":this.goForward({path:"/manage/apps/okr/"+(t.value=="okr"?"list":"analysis")});break;case"report":this.workReportTabs=s=="badge"?"receive":"my",this.workReportShow=!0;break;case"robot":this.aibotType=1,this.aibotTabAction="opanai",this.aibotShow=!0;break;case"signin":this.signInType=1,this.signInShow=!0;break;case"meeting":this.meetingType=1,this.meetingShow=!0;break;case"ldap":this.ldapShow=!0;break;case"mail":this.mailType=1,this.mailShow=!0;break;case"appPush":this.appPushType=1,this.appPushShow=!0;break;case"scan":$A.eeuiAppScan(this.scanResult);return}this.$emit("on-click",t.value)},onGoToChat(t){let s=0,a=`ai-${t}@bot.system`;this.cacheDialogs.map(e=>{e.email==a&&(s=e.id)}),s?(this.windowOrientation=="landscape"?this.goForward({name:"manage-messenger",params:{dialog_id:s}}):this.$store.dispatch("openDialog",s),this.aibotShow=!1):(this.aibotDialogSearchLoad=t,this.$store.dispatch("call",{url:"dialog/search",data:{key:a}}).then(({data:e})=>{var o;if((e==null?void 0:e.length)<1){$A.messageError("\u673A\u5668\u4EBA\u6682\u672A\u5F00\u542F"),this.aibotDialogSearchLoad="";return}this.$store.dispatch("openDialogUserid",(o=e[0])==null?void 0:o.dialog_user.userid).then(i=>{this.windowOrientation=="landscape"&&this.goForward({name:"manage-messenger"}),this.aibotShow=!1}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.aibotDialogSearchLoad=""})}).catch(e=>{this.aibotDialogSearchLoad=""}))},onMeeting(t){switch(t){case"createMeeting":n.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":n.Store.set("addMeeting",{type:"join"});break}this.meetingShow=!1},scanResult(t){const s=(t+"").match(/^https*:\/\/(.*?)\/login\?qrcode=(.*?)$/);if(s){if($A.getDomain(t)!=$A.getDomain($A.apiUrl("../"))){let a=this.$L("\u8BF7\u786E\u8BA4\u626B\u7801\u7684\u670D\u52A1\u5668\u4E0E\u5F53\u524D\u670D\u52A1\u5668\u4E00\u81F4");a+=`
    ${this.$L("\u4E8C\u7EF4\u7801\u670D\u52A1\u5668")}: ${$A.getDomain(t)}`,a+=`
    ${this.$L("\u5F53\u524D\u670D\u52A1\u5668")}: ${$A.getDomain($A.apiUrl("../"))}`,$A.modalWarning({language:!1,title:this.$L("\u626B\u7801\u767B\u5F55"),content:a});return}this.scanLoginCode=s[2],this.scanLoginShow=!0;return}/^https*:\/\//i.test(t)&&$A.eeuiAppOpenPage({pageType:"app",pageTitle:" ",url:"web.js",params:{url:t,browser:!0,showProgress:!0}})},scanLoginSubmit(){this.scanLoginLoad!==!0&&(this.scanLoginLoad=!0,this.$store.dispatch("call",{url:"users/login/qrcode",data:{type:"login",code:this.scanLoginCode}}).then(({msg:t})=>{this.scanLoginShow=!1,$A.messageSuccess(t)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.scanLoginLoad=!1}))},openDetail(t){$A.modalInfo({content:t,onOk:()=>new Promise((s,a)=>{this.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:this.dialogId}}).then(({msg:e})=>{s(e),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{a(e)})})})}}},f={};var nt=r(lt,it,rt,!1,ct,null,null,null);function ct(t){for(let s in f)this[s]=f[s]}var bt=function(){return nt.exports}();export{bt as default}; +import{n as r,m as h,a as n}from"./app.6910ca56.js";import{D as v}from"./index.8984a77c.js";import{U as b}from"./UserSelect.1938cd94.js";import{C as g,T as $,R as y}from"./CheckinExport.566afd3f.js";import D from"./checkin.9caf7776.js";import"./tip.6872e3c6.js";import"./ReportEdit.cc7cc71b.js";import"./ReportDetail.d9bb9dfa.js";var k=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[t.type=="all"||t.type=="ChatGPT"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("ChatGPT")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"API Key",prop:"openai_key"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"OpenAI API Key"},model:{value:t.formData.openai_key,callback:function(e){t.$set(t.formData,"openai_key",e)},expression:"formData.openai_key"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u8BBF\u95EEOpenAI\u7F51\u7AD9\u67E5\u770B\uFF1A"))),a("a",{attrs:{href:"https://platform.openai.com/account/api-keys",target:"_blank"}},[t._v("https://platform.openai.com/account/api-keys")])])],1),a("FormItem",{attrs:{label:t.$L("\u6A21\u578B"),prop:"openai_model"}},[a("Select",{attrs:{placement:"top"},model:{value:t.formData.openai_model,callback:function(e){t.$set(t.formData,"openai_model",e)},expression:"formData.openai_model"}},[a("Option",{attrs:{value:"gpt-3.5-turbo"}},[t._v("gpt-3.5-turbo")]),a("Option",{attrs:{value:"gpt-4"}},[t._v("gpt-4")])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u67E5\u770B\u8BF4\u660E"))+" "),a("a",{attrs:{href:"https://platform.openai.com/docs/models",target:"_blank"}},[t._v("https://platform.openai.com/docs/models")])])],1),a("FormItem",{attrs:{label:t.$L("\u4F7F\u7528\u4EE3\u7406"),prop:"openai_agency"}},[a("Input",{attrs:{maxlength:500,placeholder:t.$L("\u652F\u6301 http \u6216 socks \u4EE3\u7406")},model:{value:t.formData.openai_agency,callback:function(e){t.$set(t.formData,"openai_agency",e)},expression:"formData.openai_agency"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4F8B\u5982\uFF1Ahttp://proxy.com \u6216 socks5://proxy.com")))])],1)],1)]):t._e(),t.type=="all"||t.type=="Claude"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("Claude")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"Token",prop:"claude_token"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"Claude Token"},model:{value:t.formData.claude_token,callback:function(e){t.$set(t.formData,"claude_token",e)},expression:"formData.claude_token"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u767B\u5F55"))+" "),a("a",{attrs:{href:"https://claude.ai",target:"_blank"}},[t._v("https://claude.ai")]),t._v(" "+t._s(t.$L("\u67E5\u770B Cookie \u4E2D\u7684 sessionKey \u4FBF\u662F")))])],1),a("FormItem",{attrs:{label:t.$L("\u4F7F\u7528\u4EE3\u7406"),prop:"claude_agency"}},[a("Input",{attrs:{maxlength:500,placeholder:t.$L("\u652F\u6301 http \u6216 socks \u4EE3\u7406")},model:{value:t.formData.claude_agency,callback:function(e){t.$set(t.formData,"claude_agency",e)},expression:"formData.claude_agency"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4F8B\u5982\uFF1Ahttp://proxy.com \u6216 socks5://proxy.com")))])],1)],1)]):t._e(),t.type=="all"||t.type=="Wenxin"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("\u6587\u5FC3\u4E00\u8A00 (Wenxin)")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"API Key",prop:"wenxin_key"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"API Key"},model:{value:t.formData.wenxin_key,callback:function(e){t.$set(t.formData,"wenxin_key",e)},expression:"formData.wenxin_key"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u83B7\u53D6\u65B9\u5F0F"))+" "),a("a",{attrs:{href:"https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3#3-%E8%8E%B7%E5%8F%96%E5%AF%86%E9%92%A5",target:"_blank"}},[t._v("https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3")])])],1),a("FormItem",{attrs:{label:"API Secret",prop:"wenxin_secret"}},[a("Input",{attrs:{maxlength:500,type:"password",placeholder:"API Secret"},model:{value:t.formData.wenxin_secret,callback:function(e){t.$set(t.formData,"wenxin_secret",e)},expression:"formData.wenxin_secret"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u83B7\u53D6\u65B9\u5F0F"))+" "),a("a",{attrs:{href:"https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3#3-%E8%8E%B7%E5%8F%96%E5%AF%86%E9%92%A5",target:"_blank"}},[t._v("https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3")])])],1),a("FormItem",{attrs:{label:t.$L("\u6A21\u578B"),prop:"wenxin_model"}},[a("Select",{attrs:{placement:"top"},model:{value:t.formData.wenxin_model,callback:function(e){t.$set(t.formData,"wenxin_model",e)},expression:"formData.wenxin_model"}},[a("Option",{attrs:{value:"completions_pro"}},[t._v("ERNIE-Bot 4.0")]),a("Option",{attrs:{value:"completions"}},[t._v("ERNIE-Bot")]),a("Option",{attrs:{value:"eb-instant"}},[t._v("ERNIE-Bot-turbo")]),a("Option",{attrs:{value:"llama_2_7b"}},[t._v("Llama-2-7b-chat")]),a("Option",{attrs:{value:"llama_2_13b"}},[t._v("Llama-2-13B-Chat")])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u67E5\u770B\u8BF4\u660E"))+" "),a("a",{attrs:{href:"https://cloud.baidu.com/doc/WENXINWORKSHOP/s/vliu6vq7u",target:"_blank"}},[t._v("https://cloud.baidu.com/doc/WENXINWORKSHOP/s/vliu6vq7u")])])],1)],1)]):t._e(),t.type=="all"||t.type=="Qianwen"?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("\u901A\u4E49\u5343\u95EE (Qianwen)")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:"API Key",prop:"qianwen_key"}},[a("Input",{attrs:{maxlength:255,type:"password",placeholder:"API Key"},model:{value:t.formData.qianwen_key,callback:function(e){t.$set(t.formData,"qianwen_key",e)},expression:"formData.qianwen_key"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u83B7\u53D6\u65B9\u5F0F"))+" "),a("a",{attrs:{href:"https://help.aliyun.com/document_detail/611472.html",target:"_blank"}},[t._v("https://help.aliyun.com/document_detail/611472.html")])])],1),a("FormItem",{attrs:{label:t.$L("\u6A21\u578B"),prop:"qianwen_model"}},[a("Select",{attrs:{placement:"top"},model:{value:t.formData.qianwen_model,callback:function(e){t.$set(t.formData,"qianwen_model",e)},expression:"formData.qianwen_model"}},[a("Option",{attrs:{value:"qwen-v1"}},[t._v("qwen-v1")]),a("Option",{attrs:{value:"qwen-plus-v1"}},[t._v("qwen-plus-v1")])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u67E5\u770B\u8BF4\u660E"))+" "),a("a",{attrs:{href:"https://help.aliyun.com/document_detail/2399481.html",target:"_blank"}},[t._v("https://help.aliyun.com/document_detail/2399481.html")])])],1)],1)]):t._e()]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},L=[];const w={name:"SystemAibot",props:{type:{default:"all"}},data(){return{loadIng:0,formData:{},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/aibot?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},c={};var x=r(w,k,L,!1,C,null,null,null);function C(t){for(let s in c)this[s]=c[s]}var S=function(){return x.exports}(),I=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u7B7E\u5230\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u529F\u80FD\u5F00\u542F"),prop:"open"}},[a("RadioGroup",{model:{value:t.formData.open,callback:function(e){t.$set(t.formData,"open",e)},expression:"formData.open"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"export-data"},[a("p",{on:{click:function(e){t.allUserShow=!0}}},[t._v(t._s(t.$L("\u7BA1\u7406\u6210\u5458MAC\u5730\u5740")))]),a("p",{on:{click:function(e){t.exportShow=!0}}},[t._v(t._s(t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E")))])])],1),t.formData.open==="open"?[a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65F6\u95F4"),prop:"time"}},[a("TimePicker",{attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u7B7E\u5230\u65F6\u95F4")},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}}),a("Form",{staticClass:"block-setting-advance",nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:t.$L("\u6700\u65E9\u53EF\u63D0\u524D"),prop:"advance"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.advance,callback:function(e){t.$set(t.formData,"advance",e)},expression:"formData.advance"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("FormItem",{attrs:{label:t.$L("\u6700\u665A\u53EF\u5EF6\u540E"),prop:"delay"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.delay,callback:function(e){t.$set(t.formData,"delay",e)},expression:"formData.delay"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7B7E\u5230\u524D\u540E\u65F6\u95F4\u6536\u5230\u6D88\u606F\u901A\u77E5")))]),a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u6253\u5361\u63D0\u9192"),prop:"remindin"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.remindin,callback:function(e){t.$set(t.formData,"remindin",e)},expression:"formData.remindin"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u7F3A\u5361\u63D0\u9192"),prop:"remindexceed"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.remindexceed,callback:function(e){t.$set(t.formData,"remindexceed",e)},expression:"formData.remindexceed"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F")))])],1)]),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7B7E\u5230\u63D0\u9192\u5BF9\u8C61\uFF1A3\u5929\u5185\u6709\u7B7E\u5230\u7684\u6210\u5458\uFF08\u6CD5\u5B9A\u5DE5\u4F5C\u65E5\uFF09")))])],1)],1),a("FormItem",{attrs:{label:t.$L("\u5141\u8BB8\u4FEE\u6539"),prop:"edit"}},[a("RadioGroup",{model:{value:t.formData.edit,callback:function(e){t.$set(t.formData,"edit",e)},expression:"formData.edit"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5141\u8BB8")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u7981\u6B62")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5141\u8BB8\u6210\u5458\u81EA\u5DF1\u4FEE\u6539MAC\u5730\u5740")))])],1),a("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65B9\u5F0F"),prop:"modes"}},[a("CheckboxGroup",{model:{value:t.formData.modes,callback:function(e){t.$set(t.formData,"modes",e)},expression:"formData.modes"}},[a("Checkbox",{attrs:{label:"auto"}},[t._v(t._s(t.$L("\u81EA\u52A8\u7B7E\u5230")))]),a("Checkbox",{attrs:{label:"manual"}},[t._v(t._s(t.$L("\u624B\u52A8\u7B7E\u5230")))]),t._e()],1),t.formData.modes.includes("auto")?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\u7B7E\u5230"))+": "+t._s(t.$L("\u8BE6\u60C5\u770B\u4E0B\u6587\u5B89\u88C5\u8BF4\u660E")))]):t._e(),t.formData.modes.includes("manual")?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u624B\u52A8\u7B7E\u5230"))+": "+t._s(t.$L("\u901A\u8FC7\u5728\u7B7E\u5230\u6253\u5361\u673A\u5668\u4EBA\u53D1\u9001\u6307\u4EE4\u7B7E\u5230")))]):t._e(),t.formData.modes.includes("location")?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5B9A\u4F4D\u7B7E\u5230"))+": "+t._s(t.$L("\u901A\u8FC7\u5728\u7B7E\u5230\u6253\u5361\u673A\u5668\u4EBA\u53D1\u9001\u4F4D\u7F6E\u7B7E\u5230")))]):t._e()],1)]:t._e()],2)]),t.formData.open==="open"&&t.formData.modes.includes("auto")?[a("div",{staticClass:"block-setting-placeholder"}),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u81EA\u52A8\u7B7E\u5230")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5B89\u88C5\u8BF4\u660E"),prop:"explain"}},[a("p",[t._v("1. "+t._s(t.$L("\u81EA\u52A8\u7B7E\u5230\u5EF6\u8FDF\u65F6\u957F\u4E3A\xB11\u5206\u949F\u3002")))]),a("p",[t._v("2. "+t._s(t.$L("\u8BBE\u5907\u8FDE\u63A5\u4E0A\u6307\u5B9A\u8DEF\u7531\u5668\uFF08WiFi\uFF09\u540E\u81EA\u52A8\u7B7E\u5230\u3002")))]),a("p",[t._v("3. "+t._s(t.$L("\u4EC5\u652F\u6301Openwrt\u7CFB\u7EDF\u7684\u8DEF\u7531\u5668\u3002")))]),a("p",[t._v("4. "+t._s(t.$L("\u5173\u95ED\u7B7E\u5230\u529F\u80FD\u518D\u5F00\u542F\u9700\u8981\u91CD\u65B0\u5B89\u88C5\u3002")))]),a("p",[t._v("5. "+t._s(t.$L("\u8FDB\u5165\u8DEF\u7531\u5668\u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u5373\u53EF\u5B8C\u6210\u5B89\u88C5\uFF1A")))]),a("Input",{ref:"cmd",staticStyle:{"margin-top":"6px"},attrs:{type:"textarea",readonly:"",value:t.formData.cmd},on:{"on-focus":t.clickCmd}})],1)],1)])]:t._e()],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1),a("CheckinExport",{model:{value:t.exportShow,callback:function(e){t.exportShow=e},expression:"exportShow"}}),a("DrawerOverlay",{attrs:{placement:"right",size:1380},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?a("TeamManagement",{attrs:{"checkin-mac":""}}):t._e()],1)],1)},A=[];const F={name:"SystemCheckin",components:{CheckinExport:g,TeamManagement:$,DrawerOverlay:v},data(){return{loadIng:0,formData:{open:"",edit:"",cmd:"",modes:[]},ruleData:{},allUserShow:!1,exportShow:!1}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/checkin?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})},clickCmd(){this.$nextTick(t=>{this.$refs.cmd.focus({cursor:"all"})})}}},m={};var E=r(F,I,A,!1,R,null,null,null);function R(t){for(let s in m)this[s]=m[s]}var T=function(){return E.exports}(),O=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("AgoraIO")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u4F1A\u8BAE\u529F\u80FD"),prop:"open"}},[a("RadioGroup",{model:{value:t.formData.open,callback:function(e){t.$set(t.formData,"open",e)},expression:"formData.open"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1)],1),t.formData.open==="open"?[a("FormItem",{attrs:{label:"App ID ",prop:"appid"}},[a("Input",{attrs:{maxlength:255},model:{value:t.formData.appid,callback:function(e){t.$set(t.formData,"appid",e)},expression:"formData.appid"}})],1),a("FormItem",{attrs:{label:"App certificate",prop:"app_certificate"}},[a("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.app_certificate,callback:function(e){t.$set(t.formData,"app_certificate",e)},expression:"formData.app_certificate"}})],1)]:t._e()],2)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},P=[];const N={name:"SystemMeeting",data(){return{loadIng:0,formData:{open:"",appid:"",app_certificate:""},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/meeting?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},p={};var B=r(N,O,P,!1,M,null,null,null);function M(t){for(let s in p)this[s]=p[s]}var U=function(){return B.exports}(),j=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v("LDAP")]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u542F\u7528 LDAP \u8BA4\u8BC1"),prop:"ldap_open"}},[a("RadioGroup",{model:{value:t.formData.ldap_open,callback:function(e){t.$set(t.formData,"ldap_open",e)},expression:"formData.ldap_open"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540E\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528 LDAP \u5E10\u53F7\u5BC6\u7801\u767B\u5F55")))])],1),t.formData.ldap_open==="open"?[a("FormItem",{attrs:{label:t.$L("LDAP \u5730\u5740"),prop:"ldap_host"}},[a("Input",{model:{value:t.formData.ldap_host,callback:function(e){t.$set(t.formData,"ldap_host",e)},expression:"formData.ldap_host"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4F8B\u5982"))+": 192.168.1.200\u3001www.ldap.com")])],1),a("FormItem",{attrs:{label:t.$L("LDAP \u7AEF\u53E3"),prop:"ldap_port"}},[a("Input",{attrs:{type:"number",placeholder:`${t.$L("\u9ED8\u8BA4")}: 389`},model:{value:t.formData.ldap_port,callback:function(e){t.$set(t.formData,"ldap_port",e)},expression:"formData.ldap_port"}})],1),a("FormItem",{attrs:{label:"Base DN",prop:"ldap_base_dn"}},[a("Input",{model:{value:t.formData.ldap_base_dn,callback:function(e){t.$set(t.formData,"ldap_base_dn",e)},expression:"formData.ldap_base_dn"}})],1),a("FormItem",{attrs:{label:"User DN",prop:"ldap_user_dn"}},[a("Input",{model:{value:t.formData.ldap_user_dn,callback:function(e){t.$set(t.formData,"ldap_user_dn",e)},expression:"formData.ldap_user_dn"}})],1),a("FormItem",{attrs:{label:t.$L("\u5BC6\u7801"),prop:"ldap_password"}},[a("Input",{attrs:{type:"password"},model:{value:t.formData.ldap_password,callback:function(e){t.$set(t.formData,"ldap_password",e)},expression:"formData.ldap_password"}})],1),a("FormItem",{attrs:{label:t.$L("\u540C\u6B65\u672C\u5730\u5E10\u53F7"),prop:"ldap_sync_local"}},[a("RadioGroup",{model:{value:t.formData.ldap_sync_local,callback:function(e){t.$set(t.formData,"ldap_sync_local",e)},expression:"formData.ldap_sync_local"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540C\u6B65\u672C\u5730\u5E10\u53F7\u767B\u5F55\u540E\u5C06\u540C\u6B65\u5230 LDAP \u670D\u52A1\u5668")))])],1),a("FormItem",[a("Button",{attrs:{loading:t.testLoad},on:{click:t.checkTest}},[t._v(t._s(t.$L("\u6D4B\u8BD5\u94FE\u63A5")))])],1)]:t._e()],2)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},q=[];const G={name:"SystemThirdAccess",data(){return{loadIng:0,formData:{},ruleData:{},testLoad:!1}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/thirdaccess?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})},checkTest(){this.testLoad||(this.testLoad=!0,this.$store.dispatch("call",{url:"system/setting/thirdaccess?type=testldap",data:this.formData}).then(({msg:t})=>{$A.messageSuccess(t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.testLoad=!1}))}}},d={};var z=r(G,j,q,!1,J,null,null,null);function J(t){for(let s in d)this[s]=d[s]}var K=function(){return z.exports}(),W=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u90AE\u7BB1\u670D\u52A1\u5668\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("SMTP\u670D\u52A1\u5668"),prop:"smtp_server"}},[a("Input",{model:{value:t.formData.smtp_server,callback:function(e){t.$set(t.formData,"smtp_server",e)},expression:"formData.smtp_server"}})],1),a("FormItem",{attrs:{label:t.$L("\u7AEF\u53E3"),prop:"port"}},[a("Input",{attrs:{maxlength:20},model:{value:t.formData.port,callback:function(e){t.$set(t.formData,"port",e)},expression:"formData.port"}})],1),a("FormItem",{attrs:{label:t.$L("\u5E10\u53F7"),prop:"account"}},[a("Input",{attrs:{maxlength:128},model:{value:t.formData.account,callback:function(e){t.$set(t.formData,"account",e)},expression:"formData.account"}})],1),a("FormItem",{attrs:{label:t.$L("\u5BC6\u7801"),prop:"password"}},[a("Input",{attrs:{maxlength:128,type:"password"},model:{value:t.formData.password,callback:function(e){t.$set(t.formData,"password",e)},expression:"formData.password"}})],1),a("FormItem",[a("Button",{on:{click:t.checkEmailSend}},[t._v(t._s(t.$L("\u90AE\u4EF6\u53D1\u9001\u6D4B\u8BD5")))])],1)],1)]),a("div",{staticClass:"block-setting-placeholder"}),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u90AE\u4EF6\u901A\u77E5\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5F00\u542F\u6CE8\u518C\u9A8C\u8BC1"),prop:"reg_verify"}},[a("RadioGroup",{model:{value:t.formData.reg_verify,callback:function(e){t.$set(t.formData,"reg_verify",e)},expression:"formData.reg_verify"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formData.reg_verify=="open"?a("div",{staticClass:"form-tip"},[t._v(" "+t._s(t.$L("\u5F00\u542F\u540E\uFF1A"))),a("br"),t._v(" \u2460 "+t._s(t.$L("\u5E10\u53F7\u9700\u9A8C\u8BC1\u901A\u8FC7\u624D\u53EF\u767B\u5F55"))),a("br"),t._v(" \u2461 "+t._s(t.$L("\u4FEE\u6539\u90AE\u7BB1\u548C\u5220\u9664\u5E10\u53F7\u9700\u8981\u90AE\u7BB1\u9A8C\u8BC1\u7801"))+" ")]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u6D88\u606F\u63D0\u9192"),prop:"notice_msg"}},[a("RadioGroup",{model:{value:t.formData.notice_msg,callback:function(e){t.$set(t.formData,"notice_msg",e)},expression:"formData.notice_msg"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formData.notice_msg=="open"?a("Form",{staticClass:"block-setting-msg-unread",nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:t.$L("\u672A\u8BFB\u4E2A\u4EBA\u6D88\u606F"),prop:"msg_unread_user_minute"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.msg_unread_user_minute,callback:function(e){t.$set(t.formData,"msg_unread_user_minute",e)},expression:"formData.msg_unread_user_minute"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F"))+"(m)")])],1)]),a("FormItem",{attrs:{label:t.$L("\u672A\u8BFB\u7FA4\u804A\u6D88\u606F"),prop:"msg_unread_group_minute"}},[a("div",{staticClass:"input-number-box"},[a("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.msg_unread_group_minute,callback:function(e){t.$set(t.formData,"msg_unread_group_minute",e)},expression:"formData.msg_unread_group_minute"}}),a("label",[t._v(t._s(t.$L("\u5206\u949F"))+"(m)")])],1)]),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u586B\u5199-1\u5219\u4E0D\u901A\u77E5\uFF0C\u8BEF\u5DEE\xB110\u5206\u949F")))])],1):t._e()],1)],1)]),a("div",{staticClass:"block-setting-placeholder"}),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u5FFD\u7565\u90AE\u7BB1\u5730\u5740")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5FFD\u7565\u90AE\u7BB1"),prop:"ignore_addr"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:3,maxRows:50}},model:{value:t.formData.ignore_addr,callback:function(e){t.$set(t.formData,"ignore_addr",e)},expression:"formData.ignore_addr"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4E0D\u4F1A\u5411\u5FFD\u7565\u7684\u90AE\u7BB1\u5730\u5740\u53D1\u9001\u90AE\u4EF6\uFF0C\u53EF\u4F7F\u7528\u6362\u884C\u5206\u5272\u591A\u4E2A\u5730\u5740\u3002")))])],1)],1)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},H=[];const Q={name:"SystemEmailSetting",data(){return{loadIng:0,formData:{smtp_server:"",port:"",account:"",password:"",reg_verify:"colse",notice_msg:"open",msg_unread_user_minute:-1,msg_unread_group_minute:-1,ignore_addr:""},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/email?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})},checkEmailSend(){$A.modalInput({title:"\u6D4B\u8BD5\u90AE\u4EF6",placeholder:"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u5730\u5740",onOk:t=>t?$A.isEmail(t)?new Promise((s,a)=>{this.$store.dispatch("call",{url:"system/email/check",data:Object.assign(this.formData,{to:t})}).then(({msg:e})=>{s(e)}).catch(({msg:e})=>{a(e)})}):"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u6536\u4EF6\u4EBA\u5730\u5740":"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u5730\u5740"})}}},u={};var X=r(Q,W,H,!1,Z,null,null,null);function Z(t){for(let s in u)this[s]=u[s]}var V=function(){return X.exports}(),Y=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u53CB\u76DF\u63A8\u9001")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5F00\u542F\u63A8\u9001"),prop:"push"}},[a("RadioGroup",{model:{value:t.formData.push,callback:function(e){t.$set(t.formData,"push",e)},expression:"formData.push"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1)],1),t.formData.push==="open"?[a("Divider",{attrs:{orientation:"left"}},[t._v("iOS "+t._s(t.$L("\u53C2\u6570\u914D\u7F6E")))]),a("FormItem",{attrs:{label:"Appkey",prop:"ios_appkey"}},[a("Input",{attrs:{maxlength:255},model:{value:t.formData.ios_key,callback:function(e){t.$set(t.formData,"ios_key",e)},expression:"formData.ios_key"}})],1),a("FormItem",{attrs:{label:"App Master Secret",prop:"secret"}},[a("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.ios_secret,callback:function(e){t.$set(t.formData,"ios_secret",e)},expression:"formData.ios_secret"}})],1),a("Divider",{attrs:{orientation:"left"}},[t._v("Android "+t._s(t.$L("\u53C2\u6570\u914D\u7F6E")))]),a("FormItem",{attrs:{label:"Appkey",prop:"android_appkey"}},[a("Input",{attrs:{maxlength:255},model:{value:t.formData.android_key,callback:function(e){t.$set(t.formData,"android_key",e)},expression:"formData.android_key"}})],1),a("FormItem",{attrs:{label:"App Master Secret",prop:"secret"}},[a("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.android_secret,callback:function(e){t.$set(t.formData,"android_secret",e)},expression:"formData.android_secret"}})],1)]:t._e()],2)])]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},tt=[];const at={name:"SystemAppPush",data(){return{loadIng:0,formData:{push:"",ios_key:"",ios_secret:"",android_key:"",android_secret:""},ruleData:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting/apppush?type="+(t?"save":"all"),data:this.formData}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=s,this.formDatum_bak=$A.cloneJSON(this.formData)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},_={};var et=r(at,Y,tt,!1,st,null,null,null);function st(t){for(let s in _)this[s]=_[s]}var ot=function(){return et.exports}(),it=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"page-apply"},[a("PageTitle",{attrs:{title:t.$L("\u5E94\u7528")}}),a("div",{staticClass:"apply-wrapper"},[a("div",{staticClass:"apply-head"},[a("div",{staticClass:"apply-nav"},[a("h1",[t._v(t._s(t.$L("\u5E94\u7528")))])])]),a("div",{staticClass:"apply-content"},[t._l(t.applyListTypes,function(e){return[t.isExistAdminList?a("div",{staticClass:"apply-row-title"},[t._v(" "+t._s(e=="base"?t.$L("\u5E38\u7528"):t.$L("\u7BA1\u7406\u5458"))+" ")]):t._e(),a("Row",{attrs:{gutter:16}},t._l(t.applyList,function(o,i){return(e=="base"&&!o.type||o.type==e)&&o.show!==!1?a("Col",{key:i,attrs:{xs:{span:6},sm:{span:6},lg:{span:6},xl:{span:6},xxl:{span:3}}},[a("div",{staticClass:"apply-col"},[a("div",{on:{click:function(l){return t.applyClick(o)}}},[a("div",{staticClass:"logo"},[a("img",{attrs:{src:t.getLogoPath(o.value)}}),a("div",{staticClass:"apply-box-top-report",on:{click:function(l){return l.stopPropagation(),t.applyClick(o,"badge")}}},[t.showBadge(o,"approve")?a("Badge",{attrs:{"overflow-count":999,count:t.approveUnreadNumber}}):t._e(),t.showBadge(o,"report")?a("Badge",{attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)]),a("p",[t._v(t._s(t.$L(o.label)))])])])]):t._e()}),1)]})],2)]),a("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.workReportShow,callback:function(e){t.workReportShow=e},expression:"workReportShow"}},[t.workReportShow?a("Report",{on:{"on-read":function(e){return t.$store.dispatch("getReportUnread",1e3)}},model:{value:t.workReportTabs,callback:function(e){t.workReportTabs=e},expression:"workReportTabs"}}):t._e()],1),a("DrawerOverlay",{attrs:{placement:"right",size:600},model:{value:t.aibotShow,callback:function(e){t.aibotShow=e},expression:"aibotShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("AI\u673A\u5668\u4EBA"))+" "),t.userIsAdmin?a("p",{on:{click:function(e){t.aibotType=t.aibotType==1?2:1}}},[t._v(" "+t._s(t.aibotType==1?t.$L("\u673A\u5668\u4EBA\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")]):t._e()]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[t.aibotType==1?a("ul",{staticClass:"ivu-modal-wrap-ul"},t._l(t.aibotList,function(e,o){return a("li",{key:o},[a("img",{attrs:{src:e.src}}),a("h4",[t._v(t._s(e.label))]),a("p",{staticClass:"desc",on:{click:function(i){return t.openDetail(e.desc)}}},[t._v(t._s(e.desc))]),a("p",{staticClass:"btn",on:{click:function(i){return t.onGoToChat(e.value)}}},[t._v(t._s(t.$L("\u5F00\u59CB\u804A\u5929")))]),t.aibotDialogSearchLoad==e.value?a("div",{staticClass:"load"},[a("Loading")],1):t._e()])}),0):a("Tabs",{model:{value:t.aibotTabAction,callback:function(e){t.aibotTabAction=e},expression:"aibotTabAction"}},[a("TabPane",{attrs:{label:"ChatGPT",name:"opanai"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="opanai"?a("SystemAibot",{attrs:{type:"ChatGPT"}}):t._e()],1)]),a("TabPane",{attrs:{label:"Claude",name:"claude"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="claude"?a("SystemAibot",{attrs:{type:"Claude"}}):t._e()],1)]),a("TabPane",{attrs:{label:t.$L("\u6587\u5FC3\u4E00\u8A00"),name:"wenxin"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="wenxin"?a("SystemAibot",{attrs:{type:"Wenxin"}}):t._e()],1)]),a("TabPane",{attrs:{label:t.$L("\u901A\u4E49\u5343\u95EE"),name:"qianwen"}},[a("div",{staticClass:"aibot-warp"},[t.aibotTabAction=="qianwen"?a("SystemAibot",{attrs:{type:"Qianwen"}}):t._e()],1)])],1)],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.signInShow,callback:function(e){t.signInShow=e},expression:"signInShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("\u7B7E\u5230\u7BA1\u7406"))+" "),t.userIsAdmin?a("p",{on:{click:function(e){t.signInType=t.signInType==1?2:1}}},[t._v(" "+t._s(t.signInType==1?t.$L("\u7B7E\u5230\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")]):t._e()]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[t.signInType==1?a("Checkin"):a("SystemCheckin")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:600},model:{value:t.meetingShow,callback:function(e){t.meetingShow=e},expression:"meetingShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("\u4F1A\u8BAE"))+" "),a("p",{on:{click:function(e){t.meetingType=t.meetingType==1?2:1}}},[t._v(" "+t._s(t.meetingType==1?t.$L("\u4F1A\u8BAE\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")])]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[t.meetingType==1?a("ul",{staticClass:"ivu-modal-wrap-ul"},[a("li",[a("img",{attrs:{src:t.getLogoPath("meeting")}}),a("h4",[t._v(t._s(t.$L("\u65B0\u4F1A\u8BAE")))]),a("p",{staticClass:"desc",on:{click:function(e){return t.openDetail(t.meetingDescs.add)}}},[t._v(" "+t._s(t.meetingDescs.add)+" ")]),a("p",{staticClass:"btn",on:{click:function(e){return t.onMeeting("createMeeting")}}},[t._v(t._s(t.$L("\u65B0\u5EFA\u4F1A\u8BAE")))])]),a("li",[a("img",{attrs:{src:t.getLogoPath("meeting-join")}}),a("h4",[t._v(t._s(t.$L("\u52A0\u5165\u4F1A\u8BAE")))]),a("p",{staticClass:"desc",on:{click:function(e){return t.openDetail(t.meetingDescs.join)}}},[t._v(t._s(t.meetingDescs.join))]),a("p",{staticClass:"btn",on:{click:function(e){return t.onMeeting("joinMeeting")}}},[t._v(t._s(t.$L("\u52A0\u5165\u4F1A\u8BAE")))])])]):a("SystemMeeting")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.ldapShow,callback:function(e){t.ldapShow=e},expression:"ldapShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("LDAP\u8BBE\u7F6E"))+" ")]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[a("SystemThirdAccess")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.mailShow,callback:function(e){t.mailShow=e},expression:"mailShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("\u90AE\u4EF6\u901A\u77E5"))+" ")]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[a("SystemEmailSetting")],1)])]),a("DrawerOverlay",{attrs:{placement:"right",size:700},model:{value:t.appPushShow,callback:function(e){t.appPushShow=e},expression:"appPushShow"}},[a("div",{staticClass:"ivu-modal-wrap-apply"},[a("div",{staticClass:"ivu-modal-wrap-apply-title"},[t._v(" "+t._s(t.$L("APP\u63A8\u9001"))+" ")]),a("div",{staticClass:"ivu-modal-wrap-apply-body"},[a("SystemAppPush")],1)])]),a("Modal",{attrs:{title:t.$L("\u626B\u7801\u767B\u5F55"),"mask-closable":!1},model:{value:t.scanLoginShow,callback:function(e){t.scanLoginShow=e},expression:"scanLoginShow"}},[a("div",{staticClass:"mobile-scan-login-box"},[a("div",{staticClass:"mobile-scan-login-title"},[t._v(t._s(t.$L("\u4F60\u597D\uFF0C\u626B\u7801\u786E\u8BA4\u767B\u5F55")))]),a("div",{staticClass:"mobile-scan-login-subtitle"},[t._v("\u300C"+t._s(t.$L("\u4E3A\u786E\u4FDD\u5E10\u53F7\u5B89\u5168\uFF0C\u8BF7\u786E\u8BA4\u662F\u672C\u4EBA\u64CD\u4F5C"))+"\u300D")])]),a("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"default"},on:{click:function(e){t.scanLoginShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u767B\u5F55")))]),a("Button",{attrs:{type:"primary",loading:t.scanLoginLoad},on:{click:t.scanLoginSubmit}},[t._v(t._s(t.$L("\u786E\u8BA4\u767B\u5F55")))])],1)])],1)},rt=[];const lt={components:{UserSelect:b,DrawerOverlay:v,Report:y,SystemAibot:S,SystemCheckin:T,Checkin:D,SystemMeeting:U,SystemThirdAccess:K,SystemEmailSetting:V,SystemAppPush:ot},data(){return{applyList:[],applyListTypes:["base","admin"],workReportShow:!1,workReportTabs:"my",aibotList:[{value:"openai",label:"ChatGPT",src:$A.apiUrl("../images/avatar/default_openai.png"),desc:this.$L("\u6211\u662F\u4E00\u4E2A\u4EBA\u5DE5\u667A\u80FD\u52A9\u624B\uFF0C\u4E3A\u7528\u6237\u63D0\u4F9B\u95EE\u9898\u89E3\u7B54\u548C\u6307\u5BFC\u3002\u6211\u6CA1\u6709\u5177\u4F53\u7684\u8EAB\u4EFD\uFF0C\u53EA\u662F\u4E00\u4E2A\u7A0B\u5E8F\u3002\u60A8\u6709\u4EC0\u4E48\u95EE\u9898\u53EF\u4EE5\u95EE\u6211\u54E6\uFF1F")},{value:"claude",label:"Claude",src:$A.apiUrl("../images/avatar/default_claude.png"),desc:this.$L("\u6211\u662FClaude,\u4E00\u4E2A\u7531Anthropic\u516C\u53F8\u521B\u9020\u51FA\u6765\u7684AI\u52A9\u624B\u673A\u5668\u4EBA\u3002\u6211\u7684\u5DE5\u4F5C\u662F\u5E2E\u52A9\u4EBA\u7C7B,\u4E0E\u4EBA\u5BF9\u8BDD\u5E76\u7ED9\u51FA\u89E3\u7B54\u3002")},{value:"wenxin",label:"Wenxin",src:$A.apiUrl("../avatar/Wenxin.png"),desc:this.$L("\u6211\u662F\u6587\u5FC3\u4E00\u8A00\uFF0C\u82F1\u6587\u540D\u662FERNIE Bot\u3002\u6211\u80FD\u591F\u4E0E\u4EBA\u5BF9\u8BDD\u4E92\u52A8\uFF0C\u56DE\u7B54\u95EE\u9898\uFF0C\u534F\u52A9\u521B\u4F5C\uFF0C\u9AD8\u6548\u4FBF\u6377\u5730\u5E2E\u52A9\u4EBA\u4EEC\u83B7\u53D6\u4FE1\u606F\u3001\u77E5\u8BC6\u548C\u7075\u611F\u3002")},{value:"qianwen",label:"Qianwen",src:$A.apiUrl("../avatar/%E9%80%9A%E4%B9%89%E5%8D%83%E9%97%AE.png"),desc:this.$L("\u6211\u662F\u8FBE\u6469\u9662\u81EA\u4E3B\u7814\u53D1\u7684\u8D85\u5927\u89C4\u6A21\u8BED\u8A00\u6A21\u578B\uFF0C\u80FD\u591F\u56DE\u7B54\u95EE\u9898\u3001\u521B\u4F5C\u6587\u5B57\uFF0C\u8FD8\u80FD\u8868\u8FBE\u89C2\u70B9\u3001\u64B0\u5199\u4EE3\u7801\u3002")}],aibotTabAction:"opanai",aibotShow:!1,aibotType:1,aibotDialogSearchLoad:"",signInShow:!1,signInType:1,meetingShow:!1,meetingType:1,meetingDescs:{add:this.$L("\u521B\u5EFA\u4E00\u4E2A\u5168\u65B0\u7684\u4F1A\u8BAE\u89C6\u9891\u4F1A\u8BAE\uFF0C\u4E0E\u4F1A\u8005\u53EF\u4EE5\u5728\u5B9E\u65F6\u4E2D\u8FDB\u884C\u9762\u5BF9\u9762\u7684\u89C6\u542C\u4EA4\u6D41\u3002\u901A\u8FC7\u89C6\u9891\u4F1A\u8BAE\u5E73\u53F0\uFF0C\u53C2\u4E0E\u8005\u53EF\u4EE5\u5206\u4EAB\u5C4F\u5E55\u3001\u5171\u4EAB\u6587\u6863\uFF0C\u5E76\u4E0E\u5176\u4ED6\u4E0E\u4F1A\u4EBA\u5458\u8FDB\u884C\u8BA8\u8BBA\u548C\u534F\u3002"),join:this.$L("\u52A0\u5165\u89C6\u9891\u4F1A\u8BAE\uFF0C\u53C2\u4E0E\u5DF2\u7ECF\u521B\u5EFA\u7684\u4F1A\u8BAE\uFF0C\u5728\u4F1A\u8BAE\u8FC7\u7A0B\u4E2D\u4E0E\u5176\u4ED6\u53C2\u4F1A\u4EBA\u5458\u8FDB\u884C\u8FDC\u7A0B\u5B9E\u65F6\u89C6\u542C\u4EA4\u6D41\u548C\u534F\u4F5C\u3002")},ldapShow:!1,mailType:1,mailShow:!1,appPushType:1,appPushShow:!1,scanLoginShow:!1,scanLoginLoad:!1,scanLoginCode:""}},activated(){this.initList()},computed:{...h(["userIsAdmin","reportUnreadNumber","approveUnreadNumber","cacheDialogs","windowOrientation"]),isExistAdminList(){return this.applyList.map(t=>t.type).indexOf("admin")!==-1}},watch:{windowOrientation(){this.initList()}},methods:{initList(){const t=[{value:"approve",label:"\u5BA1\u6279\u4E2D\u5FC3"},{value:"okr",label:"OKR\u7BA1\u7406"},{value:"report",label:"\u5DE5\u4F5C\u62A5\u544A"},{value:"robot",label:"AI\u673A\u5668\u4EBA"},{value:"signin",label:"\u7B7E\u5230"},{value:"meeting",label:"\u4F1A\u8BAE"}];this.windowOrientation=="landscape"?t.push({value:"scan",label:"\u626B\u4E00\u626B",show:$A.isEEUiApp}):(t.unshift({value:"calendar",label:"\u65E5\u5386"},{value:"file",label:"\u6587\u4EF6"}),t.push({value:"addProject",label:"\u521B\u5EFA\u9879\u76EE"},{value:"addTask",label:"\u6DFB\u52A0\u4EFB\u52A1"},{value:"scan",label:"\u626B\u4E00\u626B",show:$A.isEEUiApp},{value:"setting",label:"\u8BBE\u7F6E"}));const s=this.userIsAdmin?[{value:"okrAnalyze",label:"OKR\u7ED3\u679C"},{value:"ldap",label:"LDAP"},{value:"mail",label:"\u90AE\u4EF6\u901A\u77E5"},{value:"appPush",label:"APP\u63A8\u9001"},{value:"allUser",label:"\u56E2\u961F\u7BA1\u7406"}].map(a=>(a.type="admin",a)):[];this.applyList=[...t,...s]},getLogoPath(t){return t=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),$A.apiUrl(`../images/application/${t}.svg`)},showBadge(t,s){let a=0;switch(s){case"approve":a=this.approveUnreadNumber;break;case"report":a=this.reportUnreadNumber;break}return t.value==s&&a>0},applyClick(t,s=""){switch(t.value){case"approve":case"calendar":case"file":case"setting":this.goForward({name:"manage-"+t.value});break;case"okr":case"okrAnalyze":this.goForward({path:"/manage/apps/okr/"+(t.value=="okr"?"list":"analysis")});break;case"report":this.workReportTabs=s=="badge"?"receive":"my",this.workReportShow=!0;break;case"robot":this.aibotType=1,this.aibotTabAction="opanai",this.aibotShow=!0;break;case"signin":this.signInType=1,this.signInShow=!0;break;case"meeting":this.meetingType=1,this.meetingShow=!0;break;case"ldap":this.ldapShow=!0;break;case"mail":this.mailType=1,this.mailShow=!0;break;case"appPush":this.appPushType=1,this.appPushShow=!0;break;case"scan":$A.eeuiAppScan(this.scanResult);return}this.$emit("on-click",t.value)},onGoToChat(t){let s=0,a=`ai-${t}@bot.system`;this.cacheDialogs.map(e=>{e.email==a&&(s=e.id)}),s?(this.windowOrientation=="landscape"?this.goForward({name:"manage-messenger",params:{dialog_id:s}}):this.$store.dispatch("openDialog",s),this.aibotShow=!1):(this.aibotDialogSearchLoad=t,this.$store.dispatch("call",{url:"dialog/search",data:{key:a}}).then(({data:e})=>{var o;if((e==null?void 0:e.length)<1){$A.messageError("\u673A\u5668\u4EBA\u6682\u672A\u5F00\u542F"),this.aibotDialogSearchLoad="";return}this.$store.dispatch("openDialogUserid",(o=e[0])==null?void 0:o.dialog_user.userid).then(i=>{this.windowOrientation=="landscape"&&this.goForward({name:"manage-messenger"}),this.aibotShow=!1}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.aibotDialogSearchLoad=""})}).catch(e=>{this.aibotDialogSearchLoad=""}))},onMeeting(t){switch(t){case"createMeeting":n.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":n.Store.set("addMeeting",{type:"join"});break}this.meetingShow=!1},scanResult(t){const s=(t+"").match(/^https*:\/\/(.*?)\/login\?qrcode=(.*?)$/);if(s){if($A.getDomain(t)!=$A.getDomain($A.apiUrl("../"))){let a=this.$L("\u8BF7\u786E\u8BA4\u626B\u7801\u7684\u670D\u52A1\u5668\u4E0E\u5F53\u524D\u670D\u52A1\u5668\u4E00\u81F4");a+=`
    ${this.$L("\u4E8C\u7EF4\u7801\u670D\u52A1\u5668")}: ${$A.getDomain(t)}`,a+=`
    ${this.$L("\u5F53\u524D\u670D\u52A1\u5668")}: ${$A.getDomain($A.apiUrl("../"))}`,$A.modalWarning({language:!1,title:this.$L("\u626B\u7801\u767B\u5F55"),content:a});return}this.scanLoginCode=s[2],this.scanLoginShow=!0;return}/^https*:\/\//i.test(t)&&$A.eeuiAppOpenPage({pageType:"app",pageTitle:" ",url:"web.js",params:{url:t,browser:!0,showProgress:!0}})},scanLoginSubmit(){this.scanLoginLoad!==!0&&(this.scanLoginLoad=!0,this.$store.dispatch("call",{url:"users/login/qrcode",data:{type:"login",code:this.scanLoginCode}}).then(({msg:t})=>{this.scanLoginShow=!1,$A.messageSuccess(t)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.scanLoginLoad=!1}))},openDetail(t){$A.modalInfo({content:t,onOk:()=>new Promise((s,a)=>{this.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:this.dialogId}}).then(({msg:e})=>{s(e),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{a(e)})})})}}},f={};var nt=r(lt,it,rt,!1,ct,null,null,null);function ct(t){for(let s in f)this[s]=f[s]}var bt=function(){return nt.exports}();export{bt as default}; diff --git a/public/js/build/apps.e0c18804.js b/public/js/build/apps.5dbb9dd1.js similarity index 66% rename from public/js/build/apps.e0c18804.js rename to public/js/build/apps.5dbb9dd1.js index cf4c95a0e..1e1021847 100644 --- a/public/js/build/apps.e0c18804.js +++ b/public/js/build/apps.5dbb9dd1.js @@ -1 +1 @@ -import{M as p}from"./MicroApps.56fd4f5e.js";import{n as i}from"./app.6c8b31b1.js";import"./DialogWrapper.5fcf71c2.js";import"./longpress.43ca7fd9.js";import"./index.31386d23.js";import"./UserSelect.d62f565b.js";import"./ImgUpload.0e64a5a8.js";import"./details.6749696e.js";import"./tip.517649f6.js";var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return!t.loading&&t.$route.name=="manage-apps"?e("MicroApps",{attrs:{url:t.appUrl,path:t.path}}):t._e()},o=[];const s={components:{MicroApps:p},data(){return{loading:!1,appUrl:"",path:""}},deactivated(){this.loading=!0},watch:{$route:{handler(t){this.loading=!0,t.name=="manage-apps"?this.$nextTick(()=>{this.loading=!1,this.appUrl={}.VITE_OKR_WEB_URL||$A.apiUrl("../apps/okr"),this.path=this.$route.query.path||""}):this.appUrl=""},immediate:!0}}},a={};var l=i(s,n,o,!1,m,null,null,null);function m(t){for(let r in a)this[r]=a[r]}var $=function(){return l.exports}();export{$ as default}; +import{M as p}from"./MicroApps.10c19f02.js";import{n as i}from"./app.6910ca56.js";import"./DialogWrapper.54a1354f.js";import"./longpress.43ca7fd9.js";import"./index.8984a77c.js";import"./UserSelect.1938cd94.js";import"./ImgUpload.8863e78d.js";import"./details.97854344.js";import"./tip.6872e3c6.js";var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return!t.loading&&t.$route.name=="manage-apps"?e("MicroApps",{attrs:{url:t.appUrl,path:t.path}}):t._e()},o=[];const s={components:{MicroApps:p},data(){return{loading:!1,appUrl:"",path:""}},deactivated(){this.loading=!0},watch:{$route:{handler(t){this.loading=!0,t.name=="manage-apps"?this.$nextTick(()=>{this.loading=!1,this.appUrl={}.VITE_OKR_WEB_URL||$A.apiUrl("../apps/okr"),this.path=this.$route.query.path||""}):this.appUrl=""},immediate:!0}}},a={};var l=i(s,n,o,!1,m,null,null,null);function m(t){for(let r in a)this[r]=a[r]}var $=function(){return l.exports}();export{$ as default}; diff --git a/public/js/build/bn.interface.min.fafac8af.js b/public/js/build/bn.interface.min.9376436e.js similarity index 96% rename from public/js/build/bn.interface.min.fafac8af.js rename to public/js/build/bn.interface.min.9376436e.js index 00e05322b..877cf823e 100644 --- a/public/js/build/bn.interface.min.fafac8af.js +++ b/public/js/build/bn.interface.min.9376436e.js @@ -1 +1 @@ -import t from"./bn.min.2dc6411e.js";import"./app.6c8b31b1.js";/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */class i{constructor(e){if(e===void 0)throw Error("Invalid BigInteger input");this.value=new t(e)}clone(){const e=new i(null);return this.value.copy(e.value),e}iinc(){return this.value.iadd(new t(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new t(1)),this}dec(){return this.clone().idec()}iadd(e){return this.value.iadd(e.value),this}add(e){return this.clone().iadd(e)}isub(e){return this.value.isub(e.value),this}sub(e){return this.clone().isub(e)}imul(e){return this.value.imul(e.value),this}mul(e){return this.clone().imul(e)}imod(e){return this.value=this.value.umod(e.value),this}mod(e){return this.clone().imod(e)}modExp(e,r){const n=r.isEven()?t.red(r.value):t.mont(r.value),u=this.clone();return u.value=u.value.toRed(n).redPow(e.value).fromRed(),u}modInv(e){if(!this.gcd(e).isOne())throw Error("Inverse does not exist");return new i(this.value.invm(e.value))}gcd(e){return new i(this.value.gcd(e.value))}ileftShift(e){return this.value.ishln(e.value.toNumber()),this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value.ishrn(e.value.toNumber()),this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value.eq(e.value)}lt(e){return this.value.lt(e.value)}lte(e){return this.value.lte(e.value)}gt(e){return this.value.gt(e.value)}gte(e){return this.value.gte(e.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new t(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const e=this.clone();return e.value=e.value.abs(),e}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(e){return this.value.testn(e)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(e="be",r){return this.value.toArrayLike(Uint8Array,e,r)}}export{i as default}; +import t from"./bn.min.03db7fc1.js";import"./app.6910ca56.js";/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */class i{constructor(e){if(e===void 0)throw Error("Invalid BigInteger input");this.value=new t(e)}clone(){const e=new i(null);return this.value.copy(e.value),e}iinc(){return this.value.iadd(new t(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new t(1)),this}dec(){return this.clone().idec()}iadd(e){return this.value.iadd(e.value),this}add(e){return this.clone().iadd(e)}isub(e){return this.value.isub(e.value),this}sub(e){return this.clone().isub(e)}imul(e){return this.value.imul(e.value),this}mul(e){return this.clone().imul(e)}imod(e){return this.value=this.value.umod(e.value),this}mod(e){return this.clone().imod(e)}modExp(e,r){const n=r.isEven()?t.red(r.value):t.mont(r.value),u=this.clone();return u.value=u.value.toRed(n).redPow(e.value).fromRed(),u}modInv(e){if(!this.gcd(e).isOne())throw Error("Inverse does not exist");return new i(this.value.invm(e.value))}gcd(e){return new i(this.value.gcd(e.value))}ileftShift(e){return this.value.ishln(e.value.toNumber()),this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value.ishrn(e.value.toNumber()),this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value.eq(e.value)}lt(e){return this.value.lt(e.value)}lte(e){return this.value.lte(e.value)}gt(e){return this.value.gt(e.value)}gte(e){return this.value.gte(e.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new t(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const e=this.clone();return e.value=e.value.abs(),e}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(e){return this.value.testn(e)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(e="be",r){return this.value.toArrayLike(Uint8Array,e,r)}}export{i as default}; diff --git a/public/js/build/bn.min.2dc6411e.js b/public/js/build/bn.min.03db7fc1.js similarity index 99% rename from public/js/build/bn.min.2dc6411e.js rename to public/js/build/bn.min.03db7fc1.js index 0b42e6c9b..d13aa093c 100644 --- a/public/js/build/bn.min.2dc6411e.js +++ b/public/js/build/bn.min.03db7fc1.js @@ -1 +1 @@ -import{L as ei,O as si}from"./app.6c8b31b1.js";/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */var ui=ei(function(ii){(function(qt,ri){function m(t,h){if(!t)throw Error(h||"Assertion failed")}function et(t,h){t.super_=h;var e=function(){};e.prototype=h.prototype,t.prototype=new e,t.prototype.constructor=t}function s(t,h,e){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,t!==null&&(h!=="le"&&h!=="be"||(e=h,h=10),this._init(t||0,h||10,e||"be"))}var ot;typeof qt=="object"?qt.exports=s:ri.BN=s,s.BN=s,s.wordSize=26;try{ot=void 0}catch{}function Bt(t,h,e){for(var r=0,i=Math.min(t.length,e),n=h;n=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return r}function Nt(t,h,e,r){for(var i=0,n=Math.min(t.length,e),o=h;o=49?l-49+10:l>=17?l-17+10:l}return i}s.isBN=function(t){return t instanceof s||t!==null&&typeof t=="object"&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,h){return t.cmp(h)>0?t:h},s.min=function(t,h){return t.cmp(h)<0?t:h},s.prototype._init=function(t,h,e){if(typeof t=="number")return this._initNumber(t,h,e);if(typeof t=="object")return this._initArray(t,h,e);h==="hex"&&(h=16),m(h===(0|h)&&h>=2&&h<=36);var r=0;(t=t.toString().replace(/\s+/g,""))[0]==="-"&&r++,h===16?this._parseHex(t,r):this._parseBase(t,h,r),t[0]==="-"&&(this.negative=1),this.strip(),e==="le"&&this._initArray(this.toArray(),h,e)},s.prototype._initNumber=function(t,h,e){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(m(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),e==="le"&&this._initArray(this.toArray(),h,e)},s.prototype._initArray=function(t,h,e){if(m(typeof t.length=="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var r=0;r=0;r-=3)n=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[i]|=n<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if(e==="le")for(r=0,i=0;r>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},s.prototype._parseHex=function(t,h){this.length=Math.ceil((t.length-h)/6),this.words=Array(this.length);for(var e=0;e=h;e-=6)i=Bt(t,e,e+6),this.words[r]|=i<>>26-n&4194303,(n+=24)>=26&&(n-=26,r++);e+6!==h&&(i=Bt(t,h,e+6),this.words[r]|=i<>>26-n&4194303),this.strip()},s.prototype._parseBase=function(t,h,e){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=h)r++;r--,i=i/h|0;for(var n=t.length-e,o=n%r,l=Math.min(n,n-o)+e,a=0,u=e;u1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var Lt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],hi=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],ni=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function It(t,h,e){e.negative=h.negative^t.negative;var r=t.length+h.length|0;e.length=r,r=r-1|0;var i=0|t.words[0],n=0|h.words[0],o=i*n,l=67108863&o,a=o/67108864|0;e.words[0]=l;for(var u=1;u>>26,d=67108863&a,p=Math.min(u,h.length-1),M=Math.max(0,u-t.length+1);M<=p;M++){var v=u-M|0;f+=(o=(i=0|t.words[v])*(n=0|h.words[M])+d)/67108864|0,d=67108863&o}e.words[u]=0|d,a=0|f}return a!==0?e.words[u]=0|a:e.length--,e.strip()}s.prototype.toString=function(t,h){var e;if(h=0|h||1,(t=t||10)===16||t==="hex"){e="";for(var r=0,i=0,n=0;n>>24-r&16777215)!==0||n!==this.length-1?Lt[6-l.length]+l+e:l+e,(r+=2)>=26&&(r-=26,n--)}for(i!==0&&(e=i.toString(16)+e);e.length%h!=0;)e="0"+e;return this.negative!==0&&(e="-"+e),e}if(t===(0|t)&&t>=2&&t<=36){var a=hi[t],u=ni[t];e="";var f=this.clone();for(f.negative=0;!f.isZero();){var d=f.modn(u).toString(t);e=(f=f.idivn(u)).isZero()?d+e:Lt[a-d.length]+d+e}for(this.isZero()&&(e="0"+e);e.length%h!=0;)e="0"+e;return this.negative!==0&&(e="-"+e),e}m(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return this.length===2?t+=67108864*this.words[1]:this.length===3&&this.words[2]===1?t+=4503599627370496+67108864*this.words[1]:this.length>2&&m(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-t:t},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(t,h){return m(ot!==void 0),this.toArrayLike(ot,t,h)},s.prototype.toArray=function(t,h){return this.toArrayLike(Array,t,h)},s.prototype.toArrayLike=function(t,h,e){var r=this.byteLength(),i=e||Math.max(1,r);m(r<=i,"byte array longer than desired length"),m(i>0,"Requested array length <= 0"),this.strip();var n,o,l=h==="le",a=new t(i),u=this.clone();if(l){for(o=0;!u.isZero();o++)n=u.andln(255),u.iushrn(8),a[o]=n;for(;o=4096&&(e+=13,h>>>=13),h>=64&&(e+=7,h>>>=7),h>=8&&(e+=4,h>>>=4),h>=2&&(e+=2,h>>>=2),e+h},s.prototype._zeroBits=function(t){if(t===0)return 26;var h=t,e=0;return(8191&h)==0&&(e+=13,h>>>=13),(127&h)==0&&(e+=7,h>>>=7),(15&h)==0&&(e+=4,h>>>=4),(3&h)==0&&(e+=2,h>>>=2),(1&h)==0&&e++,e},s.prototype.bitLength=function(){var t=this.words[this.length-1],h=this._countBits(t);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,h=0;ht.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var h;h=this.length>t.length?t:this;for(var e=0;et.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var h,e;this.length>t.length?(h=this,e=t):(h=t,e=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){m(typeof t=="number"&&t>=0);var h=0|Math.ceil(t/26),e=t%26;this._expand(h),e>0&&h--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-e),this.strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,h){m(typeof t=="number"&&t>=0);var e=t/26|0,r=t%26;return this._expand(e+1),this.words[e]=h?this.words[e]|1<t.length?(e=this,r=t):(e=t,r=this);for(var i=0,n=0;n>>26;for(;i!==0&&n>>26;if(this.length=e.length,i!==0)this.words[this.length]=i,this.length++;else if(e!==this)for(;nt.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var h=this.iadd(t);return t.negative=1,h._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var e,r,i=this.cmp(t);if(i===0)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var n=0,o=0;o>26,this.words[o]=67108863&h;for(;n!==0&&o>26,this.words[o]=67108863&h;if(n===0&&o>>13,M=0|o[1],v=8191&M,g=M>>>13,rt=0|o[2],c=8191&rt,w=rt>>>13,jt=0|o[3],b=8191&jt,_=jt>>>13,Kt=0|o[4],k=8191&Kt,A=Kt>>>13,Pt=0|o[5],x=8191&Pt,S=Pt>>>13,Ft=0|o[6],Z=8191&Ft,R=Ft>>>13,Ct=0|o[7],q=8191&Ct,B=Ct>>>13,Dt=0|o[8],N=8191&Dt,L=Dt>>>13,Ht=0|o[9],I=8191&Ht,z=Ht>>>13,Jt=0|l[0],E=8191&Jt,O=Jt>>>13,Ut=0|l[1],T=8191&Ut,j=Ut>>>13,Gt=0|l[2],K=8191&Gt,P=Gt>>>13,Qt=0|l[3],F=8191&Qt,C=Qt>>>13,Vt=0|l[4],D=8191&Vt,H=Vt>>>13,Wt=0|l[5],J=8191&Wt,U=Wt>>>13,Xt=0|l[6],G=8191&Xt,Q=Xt>>>13,Yt=0|l[7],V=8191&Yt,W=Yt>>>13,$t=0|l[8],X=8191&$t,Y=$t>>>13,ti=0|l[9],$=8191&ti,tt=ti>>>13;e.negative=t.negative^h.negative,e.length=19;var lt=(u+(r=Math.imul(d,E))|0)+((8191&(i=(i=Math.imul(d,O))+Math.imul(p,E)|0))<<13)|0;u=((n=Math.imul(p,O))+(i>>>13)|0)+(lt>>>26)|0,lt&=67108863,r=Math.imul(v,E),i=(i=Math.imul(v,O))+Math.imul(g,E)|0,n=Math.imul(g,O);var mt=(u+(r=r+Math.imul(d,T)|0)|0)+((8191&(i=(i=i+Math.imul(d,j)|0)+Math.imul(p,T)|0))<<13)|0;u=((n=n+Math.imul(p,j)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(c,E),i=(i=Math.imul(c,O))+Math.imul(w,E)|0,n=Math.imul(w,O),r=r+Math.imul(v,T)|0,i=(i=i+Math.imul(v,j)|0)+Math.imul(g,T)|0,n=n+Math.imul(g,j)|0;var ft=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,P)|0)+Math.imul(p,K)|0))<<13)|0;u=((n=n+Math.imul(p,P)|0)+(i>>>13)|0)+(ft>>>26)|0,ft&=67108863,r=Math.imul(b,E),i=(i=Math.imul(b,O))+Math.imul(_,E)|0,n=Math.imul(_,O),r=r+Math.imul(c,T)|0,i=(i=i+Math.imul(c,j)|0)+Math.imul(w,T)|0,n=n+Math.imul(w,j)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,P)|0)+Math.imul(g,K)|0,n=n+Math.imul(g,P)|0;var dt=(u+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,C)|0)+Math.imul(p,F)|0))<<13)|0;u=((n=n+Math.imul(p,C)|0)+(i>>>13)|0)+(dt>>>26)|0,dt&=67108863,r=Math.imul(k,E),i=(i=Math.imul(k,O))+Math.imul(A,E)|0,n=Math.imul(A,O),r=r+Math.imul(b,T)|0,i=(i=i+Math.imul(b,j)|0)+Math.imul(_,T)|0,n=n+Math.imul(_,j)|0,r=r+Math.imul(c,K)|0,i=(i=i+Math.imul(c,P)|0)+Math.imul(w,K)|0,n=n+Math.imul(w,P)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,C)|0)+Math.imul(g,F)|0,n=n+Math.imul(g,C)|0;var pt=(u+(r=r+Math.imul(d,D)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(p,D)|0))<<13)|0;u=((n=n+Math.imul(p,H)|0)+(i>>>13)|0)+(pt>>>26)|0,pt&=67108863,r=Math.imul(x,E),i=(i=Math.imul(x,O))+Math.imul(S,E)|0,n=Math.imul(S,O),r=r+Math.imul(k,T)|0,i=(i=i+Math.imul(k,j)|0)+Math.imul(A,T)|0,n=n+Math.imul(A,j)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,P)|0)+Math.imul(_,K)|0,n=n+Math.imul(_,P)|0,r=r+Math.imul(c,F)|0,i=(i=i+Math.imul(c,C)|0)+Math.imul(w,F)|0,n=n+Math.imul(w,C)|0,r=r+Math.imul(v,D)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(g,D)|0,n=n+Math.imul(g,H)|0;var Mt=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,U)|0)+Math.imul(p,J)|0))<<13)|0;u=((n=n+Math.imul(p,U)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(Z,E),i=(i=Math.imul(Z,O))+Math.imul(R,E)|0,n=Math.imul(R,O),r=r+Math.imul(x,T)|0,i=(i=i+Math.imul(x,j)|0)+Math.imul(S,T)|0,n=n+Math.imul(S,j)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,P)|0)+Math.imul(A,K)|0,n=n+Math.imul(A,P)|0,r=r+Math.imul(b,F)|0,i=(i=i+Math.imul(b,C)|0)+Math.imul(_,F)|0,n=n+Math.imul(_,C)|0,r=r+Math.imul(c,D)|0,i=(i=i+Math.imul(c,H)|0)+Math.imul(w,D)|0,n=n+Math.imul(w,H)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,U)|0)+Math.imul(g,J)|0,n=n+Math.imul(g,U)|0;var vt=(u+(r=r+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(p,G)|0))<<13)|0;u=((n=n+Math.imul(p,Q)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(q,E),i=(i=Math.imul(q,O))+Math.imul(B,E)|0,n=Math.imul(B,O),r=r+Math.imul(Z,T)|0,i=(i=i+Math.imul(Z,j)|0)+Math.imul(R,T)|0,n=n+Math.imul(R,j)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,P)|0)+Math.imul(S,K)|0,n=n+Math.imul(S,P)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,C)|0)+Math.imul(A,F)|0,n=n+Math.imul(A,C)|0,r=r+Math.imul(b,D)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(_,D)|0,n=n+Math.imul(_,H)|0,r=r+Math.imul(c,J)|0,i=(i=i+Math.imul(c,U)|0)+Math.imul(w,J)|0,n=n+Math.imul(w,U)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(g,G)|0,n=n+Math.imul(g,Q)|0;var gt=(u+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(p,V)|0))<<13)|0;u=((n=n+Math.imul(p,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(N,E),i=(i=Math.imul(N,O))+Math.imul(L,E)|0,n=Math.imul(L,O),r=r+Math.imul(q,T)|0,i=(i=i+Math.imul(q,j)|0)+Math.imul(B,T)|0,n=n+Math.imul(B,j)|0,r=r+Math.imul(Z,K)|0,i=(i=i+Math.imul(Z,P)|0)+Math.imul(R,K)|0,n=n+Math.imul(R,P)|0,r=r+Math.imul(x,F)|0,i=(i=i+Math.imul(x,C)|0)+Math.imul(S,F)|0,n=n+Math.imul(S,C)|0,r=r+Math.imul(k,D)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(A,D)|0,n=n+Math.imul(A,H)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,U)|0)+Math.imul(_,J)|0,n=n+Math.imul(_,U)|0,r=r+Math.imul(c,G)|0,i=(i=i+Math.imul(c,Q)|0)+Math.imul(w,G)|0,n=n+Math.imul(w,Q)|0,r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(g,V)|0,n=n+Math.imul(g,W)|0;var ct=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,X)|0))<<13)|0;u=((n=n+Math.imul(p,Y)|0)+(i>>>13)|0)+(ct>>>26)|0,ct&=67108863,r=Math.imul(I,E),i=(i=Math.imul(I,O))+Math.imul(z,E)|0,n=Math.imul(z,O),r=r+Math.imul(N,T)|0,i=(i=i+Math.imul(N,j)|0)+Math.imul(L,T)|0,n=n+Math.imul(L,j)|0,r=r+Math.imul(q,K)|0,i=(i=i+Math.imul(q,P)|0)+Math.imul(B,K)|0,n=n+Math.imul(B,P)|0,r=r+Math.imul(Z,F)|0,i=(i=i+Math.imul(Z,C)|0)+Math.imul(R,F)|0,n=n+Math.imul(R,C)|0,r=r+Math.imul(x,D)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(S,D)|0,n=n+Math.imul(S,H)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,U)|0)+Math.imul(A,J)|0,n=n+Math.imul(A,U)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(_,G)|0,n=n+Math.imul(_,Q)|0,r=r+Math.imul(c,V)|0,i=(i=i+Math.imul(c,W)|0)+Math.imul(w,V)|0,n=n+Math.imul(w,W)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(g,X)|0,n=n+Math.imul(g,Y)|0;var wt=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(p,$)|0))<<13)|0;u=((n=n+Math.imul(p,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,T),i=(i=Math.imul(I,j))+Math.imul(z,T)|0,n=Math.imul(z,j),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,P)|0)+Math.imul(L,K)|0,n=n+Math.imul(L,P)|0,r=r+Math.imul(q,F)|0,i=(i=i+Math.imul(q,C)|0)+Math.imul(B,F)|0,n=n+Math.imul(B,C)|0,r=r+Math.imul(Z,D)|0,i=(i=i+Math.imul(Z,H)|0)+Math.imul(R,D)|0,n=n+Math.imul(R,H)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,U)|0)+Math.imul(S,J)|0,n=n+Math.imul(S,U)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(A,G)|0,n=n+Math.imul(A,Q)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,V)|0,n=n+Math.imul(_,W)|0,r=r+Math.imul(c,X)|0,i=(i=i+Math.imul(c,Y)|0)+Math.imul(w,X)|0,n=n+Math.imul(w,Y)|0;var yt=(u+(r=r+Math.imul(v,$)|0)|0)+((8191&(i=(i=i+Math.imul(v,tt)|0)+Math.imul(g,$)|0))<<13)|0;u=((n=n+Math.imul(g,tt)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,P))+Math.imul(z,K)|0,n=Math.imul(z,P),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,C)|0)+Math.imul(L,F)|0,n=n+Math.imul(L,C)|0,r=r+Math.imul(q,D)|0,i=(i=i+Math.imul(q,H)|0)+Math.imul(B,D)|0,n=n+Math.imul(B,H)|0,r=r+Math.imul(Z,J)|0,i=(i=i+Math.imul(Z,U)|0)+Math.imul(R,J)|0,n=n+Math.imul(R,U)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,G)|0,n=n+Math.imul(S,Q)|0,r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,V)|0,n=n+Math.imul(A,W)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(_,X)|0,n=n+Math.imul(_,Y)|0;var bt=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(w,$)|0))<<13)|0;u=((n=n+Math.imul(w,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(I,F),i=(i=Math.imul(I,C))+Math.imul(z,F)|0,n=Math.imul(z,C),r=r+Math.imul(N,D)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(L,D)|0,n=n+Math.imul(L,H)|0,r=r+Math.imul(q,J)|0,i=(i=i+Math.imul(q,U)|0)+Math.imul(B,J)|0,n=n+Math.imul(B,U)|0,r=r+Math.imul(Z,G)|0,i=(i=i+Math.imul(Z,Q)|0)+Math.imul(R,G)|0,n=n+Math.imul(R,Q)|0,r=r+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,V)|0,n=n+Math.imul(S,W)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(A,X)|0,n=n+Math.imul(A,Y)|0;var _t=(u+(r=r+Math.imul(b,$)|0)|0)+((8191&(i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0))<<13)|0;u=((n=n+Math.imul(_,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,D),i=(i=Math.imul(I,H))+Math.imul(z,D)|0,n=Math.imul(z,H),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,U)|0)+Math.imul(L,J)|0,n=n+Math.imul(L,U)|0,r=r+Math.imul(q,G)|0,i=(i=i+Math.imul(q,Q)|0)+Math.imul(B,G)|0,n=n+Math.imul(B,Q)|0,r=r+Math.imul(Z,V)|0,i=(i=i+Math.imul(Z,W)|0)+Math.imul(R,V)|0,n=n+Math.imul(R,W)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,X)|0,n=n+Math.imul(S,Y)|0;var kt=(u+(r=r+Math.imul(k,$)|0)|0)+((8191&(i=(i=i+Math.imul(k,tt)|0)+Math.imul(A,$)|0))<<13)|0;u=((n=n+Math.imul(A,tt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(I,J),i=(i=Math.imul(I,U))+Math.imul(z,J)|0,n=Math.imul(z,U),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(L,G)|0,n=n+Math.imul(L,Q)|0,r=r+Math.imul(q,V)|0,i=(i=i+Math.imul(q,W)|0)+Math.imul(B,V)|0,n=n+Math.imul(B,W)|0,r=r+Math.imul(Z,X)|0,i=(i=i+Math.imul(Z,Y)|0)+Math.imul(R,X)|0,n=n+Math.imul(R,Y)|0;var At=(u+(r=r+Math.imul(x,$)|0)|0)+((8191&(i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0))<<13)|0;u=((n=n+Math.imul(S,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(I,G),i=(i=Math.imul(I,Q))+Math.imul(z,G)|0,n=Math.imul(z,Q),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(L,V)|0,n=n+Math.imul(L,W)|0,r=r+Math.imul(q,X)|0,i=(i=i+Math.imul(q,Y)|0)+Math.imul(B,X)|0,n=n+Math.imul(B,Y)|0;var xt=(u+(r=r+Math.imul(Z,$)|0)|0)+((8191&(i=(i=i+Math.imul(Z,tt)|0)+Math.imul(R,$)|0))<<13)|0;u=((n=n+Math.imul(R,tt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,V),i=(i=Math.imul(I,W))+Math.imul(z,V)|0,n=Math.imul(z,W),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(L,X)|0,n=n+Math.imul(L,Y)|0;var St=(u+(r=r+Math.imul(q,$)|0)|0)+((8191&(i=(i=i+Math.imul(q,tt)|0)+Math.imul(B,$)|0))<<13)|0;u=((n=n+Math.imul(B,tt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(I,X),i=(i=Math.imul(I,Y))+Math.imul(z,X)|0,n=Math.imul(z,Y);var Zt=(u+(r=r+Math.imul(N,$)|0)|0)+((8191&(i=(i=i+Math.imul(N,tt)|0)+Math.imul(L,$)|0))<<13)|0;u=((n=n+Math.imul(L,tt)|0)+(i>>>13)|0)+(Zt>>>26)|0,Zt&=67108863;var Rt=(u+(r=Math.imul(I,$))|0)+((8191&(i=(i=Math.imul(I,tt))+Math.imul(z,$)|0))<<13)|0;return u=((n=Math.imul(z,tt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,a[0]=lt,a[1]=mt,a[2]=ft,a[3]=dt,a[4]=pt,a[5]=Mt,a[6]=vt,a[7]=gt,a[8]=ct,a[9]=wt,a[10]=yt,a[11]=bt,a[12]=_t,a[13]=kt,a[14]=At,a[15]=xt,a[16]=St,a[17]=Zt,a[18]=Rt,u!==0&&(a[19]=u,e.length++),e};function Et(t,h,e){return new ht().mulp(t,h,e)}function ht(t,h){this.x=t,this.y=h}Math.imul||(zt=It),s.prototype.mulTo=function(t,h){var e,r=this.length+t.length;return e=this.length===10&&t.length===10?zt(this,t,h):r<63?It(this,t,h):r<1024?function(i,n,o){o.negative=n.negative^i.negative,o.length=i.length+n.length;for(var l=0,a=0,u=0;u>>26)|0)>>>26,f&=67108863}o.words[u]=d,l=f,f=a}return l!==0?o.words[u]=l:o.length--,o.strip()}(this,t,h):Et(this,t,h),e},ht.prototype.makeRBT=function(t){for(var h=Array(t),e=s.prototype._countBits(t)-1,r=0;r>=1;return r},ht.prototype.permute=function(t,h,e,r,i,n){for(var o=0;o>>=1)i++;return 1<>>=13,e[2*n+1]=8191&i,i>>>=13;for(n=2*h;n>=26,h+=r/67108864|0,h+=i>>>26,this.words[e]=67108863&i}return h!==0&&(this.words[e]=h,this.length++),this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var h=function(n){for(var o=Array(n.bitLength()),l=0;l>>u}return o}(t);if(h.length===0)return new s(1);for(var e=this,r=0;r=0);var h,e=t%26,r=(t-e)/26,i=67108863>>>26-e<<26-e;if(e!==0){var n=0;for(h=0;h>>26-e}n&&(this.words[h]=n,this.length++)}if(r!==0){for(h=this.length-1;h>=0;h--)this.words[h+r]=this.words[h];for(h=0;h=0),r=h?(h-h%26)/26:0;var i=t%26,n=Math.min((t-i)/26,this.length),o=67108863^67108863>>>i<n)for(this.length-=n,a=0;a=0&&(u!==0||a>=r);a--){var f=0|this.words[a];this.words[a]=u<<26-i|f>>>i,u=f&o}return l&&u!==0&&(l.words[l.length++]=u),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(t,h,e){return m(this.negative===0),this.iushrn(t,h,e)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){m(typeof t=="number"&&t>=0);var h=t%26,e=(t-h)/26,r=1<=0);var h=t%26,e=(t-h)/26;if(m(this.negative===0,"imaskn works only with positive numbers"),this.length<=e)return this;if(h!==0&&e++,this.length=Math.min(e,this.length),h!==0){var r=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(t){if(m(typeof t=="number"),m(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(l/67108864|0),this.words[r+e]=67108863&i}for(;r>26,this.words[r+e]=67108863&i;if(o===0)return this.strip();for(m(o===-1),o=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},s.prototype._wordDiv=function(t,h){var e=(this.length,t.length),r=this.clone(),i=t,n=0|i.words[i.length-1];(e=26-this._countBits(n))!==0&&(i=i.ushln(e),r.iushln(e),n=0|i.words[i.length-1]);var o,l=r.length-i.length;if(h!=="mod"){(o=new s(null)).length=l+1,o.words=Array(o.length);for(var a=0;a=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/n|0,67108863),r._ishlnsubmul(i,d,f);r.negative!==0;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);o&&(o.words[f]=d)}return o&&o.strip(),r.strip(),h!=="div"&&e!==0&&r.iushrn(e),{div:o||null,mod:r}},s.prototype.divmod=function(t,h,e){return m(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:this.negative!==0&&t.negative===0?(n=this.neg().divmod(t,h),h!=="mod"&&(r=n.div.neg()),h!=="div"&&(i=n.mod.neg(),e&&i.negative!==0&&i.iadd(t)),{div:r,mod:i}):this.negative===0&&t.negative!==0?(n=this.divmod(t.neg(),h),h!=="mod"&&(r=n.div.neg()),{div:r,mod:n.mod}):(this.negative&t.negative)!=0?(n=this.neg().divmod(t.neg(),h),h!=="div"&&(i=n.mod.neg(),e&&i.negative!==0&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:t.length===1?h==="div"?{div:this.divn(t.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modn(t.words[0]))}:this._wordDiv(t,h);var r,i,n},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var h=this.divmod(t);if(h.mod.isZero())return h.div;var e=h.div.negative!==0?h.mod.isub(t):h.mod,r=t.ushrn(1),i=t.andln(1),n=e.cmp(r);return n<0||i===1&&n===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(t){m(t<=67108863);for(var h=(1<<26)%t,e=0,r=this.length-1;r>=0;r--)e=(h*e+(0|this.words[r]))%t;return e},s.prototype.idivn=function(t){m(t<=67108863);for(var h=0,e=this.length-1;e>=0;e--){var r=(0|this.words[e])+67108864*h;this.words[e]=r/t|0,h=r%t}return this.strip()},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){m(t.negative===0),m(!t.isZero());var h=this,e=t.clone();h=h.negative!==0?h.umod(t):h.clone();for(var r=new s(1),i=new s(0),n=new s(0),o=new s(1),l=0;h.isEven()&&e.isEven();)h.iushrn(1),e.iushrn(1),++l;for(var a=e.clone(),u=h.clone();!h.isZero();){for(var f=0,d=1;(h.words[0]&d)==0&&f<26;++f,d<<=1);if(f>0)for(h.iushrn(f);f-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(a),i.isub(u)),r.iushrn(1),i.iushrn(1);for(var p=0,M=1;(e.words[0]&M)==0&&p<26;++p,M<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(a),o.isub(u)),n.iushrn(1),o.iushrn(1);h.cmp(e)>=0?(h.isub(e),r.isub(n),i.isub(o)):(e.isub(h),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:e.iushln(l)}},s.prototype._invmp=function(t){m(t.negative===0),m(!t.isZero());var h=this,e=t.clone();h=h.negative!==0?h.umod(t):h.clone();for(var r,i=new s(1),n=new s(0),o=e.clone();h.cmpn(1)>0&&e.cmpn(1)>0;){for(var l=0,a=1;(h.words[0]&a)==0&&l<26;++l,a<<=1);if(l>0)for(h.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var u=0,f=1;(e.words[0]&f)==0&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);h.cmp(e)>=0?(h.isub(e),i.isub(n)):(e.isub(h),n.isub(i))}return(r=h.cmpn(1)===0?i:n).cmpn(0)<0&&r.iadd(t),r},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var h=this.clone(),e=t.clone();h.negative=0,e.negative=0;for(var r=0;h.isEven()&&e.isEven();r++)h.iushrn(1),e.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;e.isEven();)e.iushrn(1);var i=h.cmp(e);if(i<0){var n=h;h=e,e=n}else if(i===0||e.cmpn(1)===0)break;h.isub(e)}return e.iushln(r)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){m(typeof t=="number");var h=t%26,e=(t-h)/26,r=1<>>26,o&=67108863,this.words[n]=o}return i!==0&&(this.words[n]=i,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(t){var h,e=t<0;if(this.negative!==0&&!e)return-1;if(this.negative===0&&e)return 1;if(this.strip(),this.length>1)h=1;else{e&&(t=-t),m(t<=67108863,"Number is too big");var r=0|this.words[0];h=r===t?0:rt.length)return 1;if(this.length=0;e--){var r=0|this.words[e],i=0|t.words[e];if(r!==i){ri&&(h=1);break}}return h},s.prototype.gtn=function(t){return this.cmpn(t)===1},s.prototype.gt=function(t){return this.cmp(t)===1},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return this.cmpn(t)===-1},s.prototype.lt=function(t){return this.cmp(t)===-1},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return this.cmpn(t)===0},s.prototype.eq=function(t){return this.cmp(t)===0},s.red=function(t){return new y(t)},s.prototype.toRed=function(t){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return m(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return m(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return m(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var ut={k256:null,p224:null,p192:null,p25519:null};function it(t,h){this.name=t,this.p=new s(h,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function st(){it.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Ot(){it.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Tt(){it.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function at(){it.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if(typeof t=="string"){var h=s._prime(t);this.m=h.p,this.prime=h}else m(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function nt(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}it.prototype._tmp=function(){var t=new s(null);return t.words=Array(Math.ceil(this.n/13)),t},it.prototype.ireduce=function(t){var h,e=t;do this.split(e,this.tmp),h=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength();while(h>this.n);var r=h0?e.isub(this.p):e.strip(),e},it.prototype.split=function(t,h){t.iushrn(this.n,0,h)},it.prototype.imulK=function(t){return t.imul(this.k)},et(st,it),st.prototype.split=function(t,h){for(var e=4194303,r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,n===0&&t.length>10?t.length-=10:t.length-=9},st.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var h=0,e=0;e>>=26,t.words[e]=i,h=r}return h!==0&&(t.words[t.length++]=h),t},s._prime=function(t){if(ut[t])return ut[t];var h;if(t==="k256")h=new st;else if(t==="p224")h=new Ot;else if(t==="p192")h=new Tt;else{if(t!=="p25519")throw Error("Unknown prime "+t);h=new at}return ut[t]=h,h},y.prototype._verify1=function(t){m(t.negative===0,"red works only with positives"),m(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,h){m((t.negative|h.negative)==0,"red works only with positives"),m(t.red&&t.red===h.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,h){this._verify2(t,h);var e=t.add(h);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},y.prototype.iadd=function(t,h){this._verify2(t,h);var e=t.iadd(h);return e.cmp(this.m)>=0&&e.isub(this.m),e},y.prototype.sub=function(t,h){this._verify2(t,h);var e=t.sub(h);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},y.prototype.isub=function(t,h){this._verify2(t,h);var e=t.isub(h);return e.cmpn(0)<0&&e.iadd(this.m),e},y.prototype.shl=function(t,h){return this._verify1(t),this.imod(t.ushln(h))},y.prototype.imul=function(t,h){return this._verify2(t,h),this.imod(t.imul(h))},y.prototype.mul=function(t,h){return this._verify2(t,h),this.imod(t.mul(h))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var h=this.m.andln(3);if(m(h%2==1),h===3){var e=this.m.add(new s(1)).iushrn(2);return this.pow(t,e)}for(var r=this.m.subn(1),i=0;!r.isZero()&&r.andln(1)===0;)i++,r.iushrn(1);m(!r.isZero());var n=new s(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new s(2*a*a).toRed(this);this.pow(a,l).cmp(o)!==0;)a.redIAdd(o);for(var u=this.pow(a,r),f=this.pow(t,r.addn(1).iushrn(1)),d=this.pow(t,r),p=i;d.cmp(n)!==0;){for(var M=d,v=0;M.cmp(n)!==0;v++)M=M.redSqr();m(v=0;r--){for(var a=h.words[r],u=l-1;u>=0;u--){var f=a>>u&1;i!==e[0]&&(i=this.sqr(i)),f!==0||n!==0?(n<<=1,n|=f,(++o===4||r===0&&u===0)&&(i=this.mul(i,e[n]),o=0,n=0)):o=0}l=26}return i},y.prototype.convertTo=function(t){var h=t.umod(this.m);return h===t?h.clone():h},y.prototype.convertFrom=function(t){var h=t.clone();return h.red=null,h},s.mont=function(t){return new nt(t)},et(nt,y),nt.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},nt.prototype.convertFrom=function(t){var h=this.imod(t.mul(this.rinv));return h.red=null,h},nt.prototype.imul=function(t,h){if(t.isZero()||h.isZero())return t.words[0]=0,t.length=1,t;var e=t.imul(h),r=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=e.isub(r).iushrn(this.shift),n=i;return i.cmp(this.m)>=0?n=i.isub(this.m):i.cmpn(0)<0&&(n=i.iadd(this.m)),n._forceRed(this)},nt.prototype.mul=function(t,h){if(t.isZero()||h.isZero())return new s(0)._forceRed(this);var e=t.mul(h),r=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=e.isub(r).iushrn(this.shift),n=i;return i.cmp(this.m)>=0?n=i.isub(this.m):i.cmpn(0)<0&&(n=i.iadd(this.m)),n._forceRed(this)},nt.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}})(ii,si)});export{ui as __moduleExports,ui as default}; +import{L as ei,O as si}from"./app.6910ca56.js";/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */var ui=ei(function(ii){(function(qt,ri){function m(t,h){if(!t)throw Error(h||"Assertion failed")}function et(t,h){t.super_=h;var e=function(){};e.prototype=h.prototype,t.prototype=new e,t.prototype.constructor=t}function s(t,h,e){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,t!==null&&(h!=="le"&&h!=="be"||(e=h,h=10),this._init(t||0,h||10,e||"be"))}var ot;typeof qt=="object"?qt.exports=s:ri.BN=s,s.BN=s,s.wordSize=26;try{ot=void 0}catch{}function Bt(t,h,e){for(var r=0,i=Math.min(t.length,e),n=h;n=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return r}function Nt(t,h,e,r){for(var i=0,n=Math.min(t.length,e),o=h;o=49?l-49+10:l>=17?l-17+10:l}return i}s.isBN=function(t){return t instanceof s||t!==null&&typeof t=="object"&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,h){return t.cmp(h)>0?t:h},s.min=function(t,h){return t.cmp(h)<0?t:h},s.prototype._init=function(t,h,e){if(typeof t=="number")return this._initNumber(t,h,e);if(typeof t=="object")return this._initArray(t,h,e);h==="hex"&&(h=16),m(h===(0|h)&&h>=2&&h<=36);var r=0;(t=t.toString().replace(/\s+/g,""))[0]==="-"&&r++,h===16?this._parseHex(t,r):this._parseBase(t,h,r),t[0]==="-"&&(this.negative=1),this.strip(),e==="le"&&this._initArray(this.toArray(),h,e)},s.prototype._initNumber=function(t,h,e){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(m(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),e==="le"&&this._initArray(this.toArray(),h,e)},s.prototype._initArray=function(t,h,e){if(m(typeof t.length=="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var r=0;r=0;r-=3)n=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[i]|=n<>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);else if(e==="le")for(r=0,i=0;r>>26-o&67108863,(o+=24)>=26&&(o-=26,i++);return this.strip()},s.prototype._parseHex=function(t,h){this.length=Math.ceil((t.length-h)/6),this.words=Array(this.length);for(var e=0;e=h;e-=6)i=Bt(t,e,e+6),this.words[r]|=i<>>26-n&4194303,(n+=24)>=26&&(n-=26,r++);e+6!==h&&(i=Bt(t,h,e+6),this.words[r]|=i<>>26-n&4194303),this.strip()},s.prototype._parseBase=function(t,h,e){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=h)r++;r--,i=i/h|0;for(var n=t.length-e,o=n%r,l=Math.min(n,n-o)+e,a=0,u=e;u1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var Lt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],hi=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],ni=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function It(t,h,e){e.negative=h.negative^t.negative;var r=t.length+h.length|0;e.length=r,r=r-1|0;var i=0|t.words[0],n=0|h.words[0],o=i*n,l=67108863&o,a=o/67108864|0;e.words[0]=l;for(var u=1;u>>26,d=67108863&a,p=Math.min(u,h.length-1),M=Math.max(0,u-t.length+1);M<=p;M++){var v=u-M|0;f+=(o=(i=0|t.words[v])*(n=0|h.words[M])+d)/67108864|0,d=67108863&o}e.words[u]=0|d,a=0|f}return a!==0?e.words[u]=0|a:e.length--,e.strip()}s.prototype.toString=function(t,h){var e;if(h=0|h||1,(t=t||10)===16||t==="hex"){e="";for(var r=0,i=0,n=0;n>>24-r&16777215)!==0||n!==this.length-1?Lt[6-l.length]+l+e:l+e,(r+=2)>=26&&(r-=26,n--)}for(i!==0&&(e=i.toString(16)+e);e.length%h!=0;)e="0"+e;return this.negative!==0&&(e="-"+e),e}if(t===(0|t)&&t>=2&&t<=36){var a=hi[t],u=ni[t];e="";var f=this.clone();for(f.negative=0;!f.isZero();){var d=f.modn(u).toString(t);e=(f=f.idivn(u)).isZero()?d+e:Lt[a-d.length]+d+e}for(this.isZero()&&(e="0"+e);e.length%h!=0;)e="0"+e;return this.negative!==0&&(e="-"+e),e}m(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return this.length===2?t+=67108864*this.words[1]:this.length===3&&this.words[2]===1?t+=4503599627370496+67108864*this.words[1]:this.length>2&&m(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-t:t},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(t,h){return m(ot!==void 0),this.toArrayLike(ot,t,h)},s.prototype.toArray=function(t,h){return this.toArrayLike(Array,t,h)},s.prototype.toArrayLike=function(t,h,e){var r=this.byteLength(),i=e||Math.max(1,r);m(r<=i,"byte array longer than desired length"),m(i>0,"Requested array length <= 0"),this.strip();var n,o,l=h==="le",a=new t(i),u=this.clone();if(l){for(o=0;!u.isZero();o++)n=u.andln(255),u.iushrn(8),a[o]=n;for(;o=4096&&(e+=13,h>>>=13),h>=64&&(e+=7,h>>>=7),h>=8&&(e+=4,h>>>=4),h>=2&&(e+=2,h>>>=2),e+h},s.prototype._zeroBits=function(t){if(t===0)return 26;var h=t,e=0;return(8191&h)==0&&(e+=13,h>>>=13),(127&h)==0&&(e+=7,h>>>=7),(15&h)==0&&(e+=4,h>>>=4),(3&h)==0&&(e+=2,h>>>=2),(1&h)==0&&e++,e},s.prototype.bitLength=function(){var t=this.words[this.length-1],h=this._countBits(t);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,h=0;ht.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var h;h=this.length>t.length?t:this;for(var e=0;et.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var h,e;this.length>t.length?(h=this,e=t):(h=t,e=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){m(typeof t=="number"&&t>=0);var h=0|Math.ceil(t/26),e=t%26;this._expand(h),e>0&&h--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-e),this.strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,h){m(typeof t=="number"&&t>=0);var e=t/26|0,r=t%26;return this._expand(e+1),this.words[e]=h?this.words[e]|1<t.length?(e=this,r=t):(e=t,r=this);for(var i=0,n=0;n>>26;for(;i!==0&&n>>26;if(this.length=e.length,i!==0)this.words[this.length]=i,this.length++;else if(e!==this)for(;nt.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var h=this.iadd(t);return t.negative=1,h._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var e,r,i=this.cmp(t);if(i===0)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var n=0,o=0;o>26,this.words[o]=67108863&h;for(;n!==0&&o>26,this.words[o]=67108863&h;if(n===0&&o>>13,M=0|o[1],v=8191&M,g=M>>>13,rt=0|o[2],c=8191&rt,w=rt>>>13,jt=0|o[3],b=8191&jt,_=jt>>>13,Kt=0|o[4],k=8191&Kt,A=Kt>>>13,Pt=0|o[5],x=8191&Pt,S=Pt>>>13,Ft=0|o[6],Z=8191&Ft,R=Ft>>>13,Ct=0|o[7],q=8191&Ct,B=Ct>>>13,Dt=0|o[8],N=8191&Dt,L=Dt>>>13,Ht=0|o[9],I=8191&Ht,z=Ht>>>13,Jt=0|l[0],E=8191&Jt,O=Jt>>>13,Ut=0|l[1],T=8191&Ut,j=Ut>>>13,Gt=0|l[2],K=8191&Gt,P=Gt>>>13,Qt=0|l[3],F=8191&Qt,C=Qt>>>13,Vt=0|l[4],D=8191&Vt,H=Vt>>>13,Wt=0|l[5],J=8191&Wt,U=Wt>>>13,Xt=0|l[6],G=8191&Xt,Q=Xt>>>13,Yt=0|l[7],V=8191&Yt,W=Yt>>>13,$t=0|l[8],X=8191&$t,Y=$t>>>13,ti=0|l[9],$=8191&ti,tt=ti>>>13;e.negative=t.negative^h.negative,e.length=19;var lt=(u+(r=Math.imul(d,E))|0)+((8191&(i=(i=Math.imul(d,O))+Math.imul(p,E)|0))<<13)|0;u=((n=Math.imul(p,O))+(i>>>13)|0)+(lt>>>26)|0,lt&=67108863,r=Math.imul(v,E),i=(i=Math.imul(v,O))+Math.imul(g,E)|0,n=Math.imul(g,O);var mt=(u+(r=r+Math.imul(d,T)|0)|0)+((8191&(i=(i=i+Math.imul(d,j)|0)+Math.imul(p,T)|0))<<13)|0;u=((n=n+Math.imul(p,j)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(c,E),i=(i=Math.imul(c,O))+Math.imul(w,E)|0,n=Math.imul(w,O),r=r+Math.imul(v,T)|0,i=(i=i+Math.imul(v,j)|0)+Math.imul(g,T)|0,n=n+Math.imul(g,j)|0;var ft=(u+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,P)|0)+Math.imul(p,K)|0))<<13)|0;u=((n=n+Math.imul(p,P)|0)+(i>>>13)|0)+(ft>>>26)|0,ft&=67108863,r=Math.imul(b,E),i=(i=Math.imul(b,O))+Math.imul(_,E)|0,n=Math.imul(_,O),r=r+Math.imul(c,T)|0,i=(i=i+Math.imul(c,j)|0)+Math.imul(w,T)|0,n=n+Math.imul(w,j)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,P)|0)+Math.imul(g,K)|0,n=n+Math.imul(g,P)|0;var dt=(u+(r=r+Math.imul(d,F)|0)|0)+((8191&(i=(i=i+Math.imul(d,C)|0)+Math.imul(p,F)|0))<<13)|0;u=((n=n+Math.imul(p,C)|0)+(i>>>13)|0)+(dt>>>26)|0,dt&=67108863,r=Math.imul(k,E),i=(i=Math.imul(k,O))+Math.imul(A,E)|0,n=Math.imul(A,O),r=r+Math.imul(b,T)|0,i=(i=i+Math.imul(b,j)|0)+Math.imul(_,T)|0,n=n+Math.imul(_,j)|0,r=r+Math.imul(c,K)|0,i=(i=i+Math.imul(c,P)|0)+Math.imul(w,K)|0,n=n+Math.imul(w,P)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,C)|0)+Math.imul(g,F)|0,n=n+Math.imul(g,C)|0;var pt=(u+(r=r+Math.imul(d,D)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(p,D)|0))<<13)|0;u=((n=n+Math.imul(p,H)|0)+(i>>>13)|0)+(pt>>>26)|0,pt&=67108863,r=Math.imul(x,E),i=(i=Math.imul(x,O))+Math.imul(S,E)|0,n=Math.imul(S,O),r=r+Math.imul(k,T)|0,i=(i=i+Math.imul(k,j)|0)+Math.imul(A,T)|0,n=n+Math.imul(A,j)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,P)|0)+Math.imul(_,K)|0,n=n+Math.imul(_,P)|0,r=r+Math.imul(c,F)|0,i=(i=i+Math.imul(c,C)|0)+Math.imul(w,F)|0,n=n+Math.imul(w,C)|0,r=r+Math.imul(v,D)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(g,D)|0,n=n+Math.imul(g,H)|0;var Mt=(u+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,U)|0)+Math.imul(p,J)|0))<<13)|0;u=((n=n+Math.imul(p,U)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(Z,E),i=(i=Math.imul(Z,O))+Math.imul(R,E)|0,n=Math.imul(R,O),r=r+Math.imul(x,T)|0,i=(i=i+Math.imul(x,j)|0)+Math.imul(S,T)|0,n=n+Math.imul(S,j)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,P)|0)+Math.imul(A,K)|0,n=n+Math.imul(A,P)|0,r=r+Math.imul(b,F)|0,i=(i=i+Math.imul(b,C)|0)+Math.imul(_,F)|0,n=n+Math.imul(_,C)|0,r=r+Math.imul(c,D)|0,i=(i=i+Math.imul(c,H)|0)+Math.imul(w,D)|0,n=n+Math.imul(w,H)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,U)|0)+Math.imul(g,J)|0,n=n+Math.imul(g,U)|0;var vt=(u+(r=r+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(p,G)|0))<<13)|0;u=((n=n+Math.imul(p,Q)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(q,E),i=(i=Math.imul(q,O))+Math.imul(B,E)|0,n=Math.imul(B,O),r=r+Math.imul(Z,T)|0,i=(i=i+Math.imul(Z,j)|0)+Math.imul(R,T)|0,n=n+Math.imul(R,j)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,P)|0)+Math.imul(S,K)|0,n=n+Math.imul(S,P)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,C)|0)+Math.imul(A,F)|0,n=n+Math.imul(A,C)|0,r=r+Math.imul(b,D)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(_,D)|0,n=n+Math.imul(_,H)|0,r=r+Math.imul(c,J)|0,i=(i=i+Math.imul(c,U)|0)+Math.imul(w,J)|0,n=n+Math.imul(w,U)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(g,G)|0,n=n+Math.imul(g,Q)|0;var gt=(u+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(p,V)|0))<<13)|0;u=((n=n+Math.imul(p,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(N,E),i=(i=Math.imul(N,O))+Math.imul(L,E)|0,n=Math.imul(L,O),r=r+Math.imul(q,T)|0,i=(i=i+Math.imul(q,j)|0)+Math.imul(B,T)|0,n=n+Math.imul(B,j)|0,r=r+Math.imul(Z,K)|0,i=(i=i+Math.imul(Z,P)|0)+Math.imul(R,K)|0,n=n+Math.imul(R,P)|0,r=r+Math.imul(x,F)|0,i=(i=i+Math.imul(x,C)|0)+Math.imul(S,F)|0,n=n+Math.imul(S,C)|0,r=r+Math.imul(k,D)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(A,D)|0,n=n+Math.imul(A,H)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,U)|0)+Math.imul(_,J)|0,n=n+Math.imul(_,U)|0,r=r+Math.imul(c,G)|0,i=(i=i+Math.imul(c,Q)|0)+Math.imul(w,G)|0,n=n+Math.imul(w,Q)|0,r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(g,V)|0,n=n+Math.imul(g,W)|0;var ct=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,X)|0))<<13)|0;u=((n=n+Math.imul(p,Y)|0)+(i>>>13)|0)+(ct>>>26)|0,ct&=67108863,r=Math.imul(I,E),i=(i=Math.imul(I,O))+Math.imul(z,E)|0,n=Math.imul(z,O),r=r+Math.imul(N,T)|0,i=(i=i+Math.imul(N,j)|0)+Math.imul(L,T)|0,n=n+Math.imul(L,j)|0,r=r+Math.imul(q,K)|0,i=(i=i+Math.imul(q,P)|0)+Math.imul(B,K)|0,n=n+Math.imul(B,P)|0,r=r+Math.imul(Z,F)|0,i=(i=i+Math.imul(Z,C)|0)+Math.imul(R,F)|0,n=n+Math.imul(R,C)|0,r=r+Math.imul(x,D)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(S,D)|0,n=n+Math.imul(S,H)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,U)|0)+Math.imul(A,J)|0,n=n+Math.imul(A,U)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(_,G)|0,n=n+Math.imul(_,Q)|0,r=r+Math.imul(c,V)|0,i=(i=i+Math.imul(c,W)|0)+Math.imul(w,V)|0,n=n+Math.imul(w,W)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(g,X)|0,n=n+Math.imul(g,Y)|0;var wt=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(p,$)|0))<<13)|0;u=((n=n+Math.imul(p,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,T),i=(i=Math.imul(I,j))+Math.imul(z,T)|0,n=Math.imul(z,j),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,P)|0)+Math.imul(L,K)|0,n=n+Math.imul(L,P)|0,r=r+Math.imul(q,F)|0,i=(i=i+Math.imul(q,C)|0)+Math.imul(B,F)|0,n=n+Math.imul(B,C)|0,r=r+Math.imul(Z,D)|0,i=(i=i+Math.imul(Z,H)|0)+Math.imul(R,D)|0,n=n+Math.imul(R,H)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,U)|0)+Math.imul(S,J)|0,n=n+Math.imul(S,U)|0,r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(A,G)|0,n=n+Math.imul(A,Q)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,V)|0,n=n+Math.imul(_,W)|0,r=r+Math.imul(c,X)|0,i=(i=i+Math.imul(c,Y)|0)+Math.imul(w,X)|0,n=n+Math.imul(w,Y)|0;var yt=(u+(r=r+Math.imul(v,$)|0)|0)+((8191&(i=(i=i+Math.imul(v,tt)|0)+Math.imul(g,$)|0))<<13)|0;u=((n=n+Math.imul(g,tt)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,P))+Math.imul(z,K)|0,n=Math.imul(z,P),r=r+Math.imul(N,F)|0,i=(i=i+Math.imul(N,C)|0)+Math.imul(L,F)|0,n=n+Math.imul(L,C)|0,r=r+Math.imul(q,D)|0,i=(i=i+Math.imul(q,H)|0)+Math.imul(B,D)|0,n=n+Math.imul(B,H)|0,r=r+Math.imul(Z,J)|0,i=(i=i+Math.imul(Z,U)|0)+Math.imul(R,J)|0,n=n+Math.imul(R,U)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,G)|0,n=n+Math.imul(S,Q)|0,r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(A,V)|0,n=n+Math.imul(A,W)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(_,X)|0,n=n+Math.imul(_,Y)|0;var bt=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(w,$)|0))<<13)|0;u=((n=n+Math.imul(w,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(I,F),i=(i=Math.imul(I,C))+Math.imul(z,F)|0,n=Math.imul(z,C),r=r+Math.imul(N,D)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(L,D)|0,n=n+Math.imul(L,H)|0,r=r+Math.imul(q,J)|0,i=(i=i+Math.imul(q,U)|0)+Math.imul(B,J)|0,n=n+Math.imul(B,U)|0,r=r+Math.imul(Z,G)|0,i=(i=i+Math.imul(Z,Q)|0)+Math.imul(R,G)|0,n=n+Math.imul(R,Q)|0,r=r+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,V)|0,n=n+Math.imul(S,W)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(A,X)|0,n=n+Math.imul(A,Y)|0;var _t=(u+(r=r+Math.imul(b,$)|0)|0)+((8191&(i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0))<<13)|0;u=((n=n+Math.imul(_,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,D),i=(i=Math.imul(I,H))+Math.imul(z,D)|0,n=Math.imul(z,H),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,U)|0)+Math.imul(L,J)|0,n=n+Math.imul(L,U)|0,r=r+Math.imul(q,G)|0,i=(i=i+Math.imul(q,Q)|0)+Math.imul(B,G)|0,n=n+Math.imul(B,Q)|0,r=r+Math.imul(Z,V)|0,i=(i=i+Math.imul(Z,W)|0)+Math.imul(R,V)|0,n=n+Math.imul(R,W)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,X)|0,n=n+Math.imul(S,Y)|0;var kt=(u+(r=r+Math.imul(k,$)|0)|0)+((8191&(i=(i=i+Math.imul(k,tt)|0)+Math.imul(A,$)|0))<<13)|0;u=((n=n+Math.imul(A,tt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(I,J),i=(i=Math.imul(I,U))+Math.imul(z,J)|0,n=Math.imul(z,U),r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(L,G)|0,n=n+Math.imul(L,Q)|0,r=r+Math.imul(q,V)|0,i=(i=i+Math.imul(q,W)|0)+Math.imul(B,V)|0,n=n+Math.imul(B,W)|0,r=r+Math.imul(Z,X)|0,i=(i=i+Math.imul(Z,Y)|0)+Math.imul(R,X)|0,n=n+Math.imul(R,Y)|0;var At=(u+(r=r+Math.imul(x,$)|0)|0)+((8191&(i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,$)|0))<<13)|0;u=((n=n+Math.imul(S,tt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(I,G),i=(i=Math.imul(I,Q))+Math.imul(z,G)|0,n=Math.imul(z,Q),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(L,V)|0,n=n+Math.imul(L,W)|0,r=r+Math.imul(q,X)|0,i=(i=i+Math.imul(q,Y)|0)+Math.imul(B,X)|0,n=n+Math.imul(B,Y)|0;var xt=(u+(r=r+Math.imul(Z,$)|0)|0)+((8191&(i=(i=i+Math.imul(Z,tt)|0)+Math.imul(R,$)|0))<<13)|0;u=((n=n+Math.imul(R,tt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,V),i=(i=Math.imul(I,W))+Math.imul(z,V)|0,n=Math.imul(z,W),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(L,X)|0,n=n+Math.imul(L,Y)|0;var St=(u+(r=r+Math.imul(q,$)|0)|0)+((8191&(i=(i=i+Math.imul(q,tt)|0)+Math.imul(B,$)|0))<<13)|0;u=((n=n+Math.imul(B,tt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(I,X),i=(i=Math.imul(I,Y))+Math.imul(z,X)|0,n=Math.imul(z,Y);var Zt=(u+(r=r+Math.imul(N,$)|0)|0)+((8191&(i=(i=i+Math.imul(N,tt)|0)+Math.imul(L,$)|0))<<13)|0;u=((n=n+Math.imul(L,tt)|0)+(i>>>13)|0)+(Zt>>>26)|0,Zt&=67108863;var Rt=(u+(r=Math.imul(I,$))|0)+((8191&(i=(i=Math.imul(I,tt))+Math.imul(z,$)|0))<<13)|0;return u=((n=Math.imul(z,tt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,a[0]=lt,a[1]=mt,a[2]=ft,a[3]=dt,a[4]=pt,a[5]=Mt,a[6]=vt,a[7]=gt,a[8]=ct,a[9]=wt,a[10]=yt,a[11]=bt,a[12]=_t,a[13]=kt,a[14]=At,a[15]=xt,a[16]=St,a[17]=Zt,a[18]=Rt,u!==0&&(a[19]=u,e.length++),e};function Et(t,h,e){return new ht().mulp(t,h,e)}function ht(t,h){this.x=t,this.y=h}Math.imul||(zt=It),s.prototype.mulTo=function(t,h){var e,r=this.length+t.length;return e=this.length===10&&t.length===10?zt(this,t,h):r<63?It(this,t,h):r<1024?function(i,n,o){o.negative=n.negative^i.negative,o.length=i.length+n.length;for(var l=0,a=0,u=0;u>>26)|0)>>>26,f&=67108863}o.words[u]=d,l=f,f=a}return l!==0?o.words[u]=l:o.length--,o.strip()}(this,t,h):Et(this,t,h),e},ht.prototype.makeRBT=function(t){for(var h=Array(t),e=s.prototype._countBits(t)-1,r=0;r>=1;return r},ht.prototype.permute=function(t,h,e,r,i,n){for(var o=0;o>>=1)i++;return 1<>>=13,e[2*n+1]=8191&i,i>>>=13;for(n=2*h;n>=26,h+=r/67108864|0,h+=i>>>26,this.words[e]=67108863&i}return h!==0&&(this.words[e]=h,this.length++),this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var h=function(n){for(var o=Array(n.bitLength()),l=0;l>>u}return o}(t);if(h.length===0)return new s(1);for(var e=this,r=0;r=0);var h,e=t%26,r=(t-e)/26,i=67108863>>>26-e<<26-e;if(e!==0){var n=0;for(h=0;h>>26-e}n&&(this.words[h]=n,this.length++)}if(r!==0){for(h=this.length-1;h>=0;h--)this.words[h+r]=this.words[h];for(h=0;h=0),r=h?(h-h%26)/26:0;var i=t%26,n=Math.min((t-i)/26,this.length),o=67108863^67108863>>>i<n)for(this.length-=n,a=0;a=0&&(u!==0||a>=r);a--){var f=0|this.words[a];this.words[a]=u<<26-i|f>>>i,u=f&o}return l&&u!==0&&(l.words[l.length++]=u),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(t,h,e){return m(this.negative===0),this.iushrn(t,h,e)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){m(typeof t=="number"&&t>=0);var h=t%26,e=(t-h)/26,r=1<=0);var h=t%26,e=(t-h)/26;if(m(this.negative===0,"imaskn works only with positive numbers"),this.length<=e)return this;if(h!==0&&e++,this.length=Math.min(e,this.length),h!==0){var r=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(t){if(m(typeof t=="number"),m(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(l/67108864|0),this.words[r+e]=67108863&i}for(;r>26,this.words[r+e]=67108863&i;if(o===0)return this.strip();for(m(o===-1),o=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},s.prototype._wordDiv=function(t,h){var e=(this.length,t.length),r=this.clone(),i=t,n=0|i.words[i.length-1];(e=26-this._countBits(n))!==0&&(i=i.ushln(e),r.iushln(e),n=0|i.words[i.length-1]);var o,l=r.length-i.length;if(h!=="mod"){(o=new s(null)).length=l+1,o.words=Array(o.length);for(var a=0;a=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/n|0,67108863),r._ishlnsubmul(i,d,f);r.negative!==0;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);o&&(o.words[f]=d)}return o&&o.strip(),r.strip(),h!=="div"&&e!==0&&r.iushrn(e),{div:o||null,mod:r}},s.prototype.divmod=function(t,h,e){return m(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:this.negative!==0&&t.negative===0?(n=this.neg().divmod(t,h),h!=="mod"&&(r=n.div.neg()),h!=="div"&&(i=n.mod.neg(),e&&i.negative!==0&&i.iadd(t)),{div:r,mod:i}):this.negative===0&&t.negative!==0?(n=this.divmod(t.neg(),h),h!=="mod"&&(r=n.div.neg()),{div:r,mod:n.mod}):(this.negative&t.negative)!=0?(n=this.neg().divmod(t.neg(),h),h!=="div"&&(i=n.mod.neg(),e&&i.negative!==0&&i.isub(t)),{div:n.div,mod:i}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:t.length===1?h==="div"?{div:this.divn(t.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modn(t.words[0]))}:this._wordDiv(t,h);var r,i,n},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var h=this.divmod(t);if(h.mod.isZero())return h.div;var e=h.div.negative!==0?h.mod.isub(t):h.mod,r=t.ushrn(1),i=t.andln(1),n=e.cmp(r);return n<0||i===1&&n===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(t){m(t<=67108863);for(var h=(1<<26)%t,e=0,r=this.length-1;r>=0;r--)e=(h*e+(0|this.words[r]))%t;return e},s.prototype.idivn=function(t){m(t<=67108863);for(var h=0,e=this.length-1;e>=0;e--){var r=(0|this.words[e])+67108864*h;this.words[e]=r/t|0,h=r%t}return this.strip()},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){m(t.negative===0),m(!t.isZero());var h=this,e=t.clone();h=h.negative!==0?h.umod(t):h.clone();for(var r=new s(1),i=new s(0),n=new s(0),o=new s(1),l=0;h.isEven()&&e.isEven();)h.iushrn(1),e.iushrn(1),++l;for(var a=e.clone(),u=h.clone();!h.isZero();){for(var f=0,d=1;(h.words[0]&d)==0&&f<26;++f,d<<=1);if(f>0)for(h.iushrn(f);f-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(a),i.isub(u)),r.iushrn(1),i.iushrn(1);for(var p=0,M=1;(e.words[0]&M)==0&&p<26;++p,M<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(a),o.isub(u)),n.iushrn(1),o.iushrn(1);h.cmp(e)>=0?(h.isub(e),r.isub(n),i.isub(o)):(e.isub(h),n.isub(r),o.isub(i))}return{a:n,b:o,gcd:e.iushln(l)}},s.prototype._invmp=function(t){m(t.negative===0),m(!t.isZero());var h=this,e=t.clone();h=h.negative!==0?h.umod(t):h.clone();for(var r,i=new s(1),n=new s(0),o=e.clone();h.cmpn(1)>0&&e.cmpn(1)>0;){for(var l=0,a=1;(h.words[0]&a)==0&&l<26;++l,a<<=1);if(l>0)for(h.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);for(var u=0,f=1;(e.words[0]&f)==0&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);h.cmp(e)>=0?(h.isub(e),i.isub(n)):(e.isub(h),n.isub(i))}return(r=h.cmpn(1)===0?i:n).cmpn(0)<0&&r.iadd(t),r},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var h=this.clone(),e=t.clone();h.negative=0,e.negative=0;for(var r=0;h.isEven()&&e.isEven();r++)h.iushrn(1),e.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;e.isEven();)e.iushrn(1);var i=h.cmp(e);if(i<0){var n=h;h=e,e=n}else if(i===0||e.cmpn(1)===0)break;h.isub(e)}return e.iushln(r)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){m(typeof t=="number");var h=t%26,e=(t-h)/26,r=1<>>26,o&=67108863,this.words[n]=o}return i!==0&&(this.words[n]=i,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(t){var h,e=t<0;if(this.negative!==0&&!e)return-1;if(this.negative===0&&e)return 1;if(this.strip(),this.length>1)h=1;else{e&&(t=-t),m(t<=67108863,"Number is too big");var r=0|this.words[0];h=r===t?0:rt.length)return 1;if(this.length=0;e--){var r=0|this.words[e],i=0|t.words[e];if(r!==i){ri&&(h=1);break}}return h},s.prototype.gtn=function(t){return this.cmpn(t)===1},s.prototype.gt=function(t){return this.cmp(t)===1},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return this.cmpn(t)===-1},s.prototype.lt=function(t){return this.cmp(t)===-1},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return this.cmpn(t)===0},s.prototype.eq=function(t){return this.cmp(t)===0},s.red=function(t){return new y(t)},s.prototype.toRed=function(t){return m(!this.red,"Already a number in reduction context"),m(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return m(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return m(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return m(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return m(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return m(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return m(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return m(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return m(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return m(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return m(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return m(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return m(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return m(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return m(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var ut={k256:null,p224:null,p192:null,p25519:null};function it(t,h){this.name=t,this.p=new s(h,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function st(){it.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Ot(){it.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Tt(){it.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function at(){it.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if(typeof t=="string"){var h=s._prime(t);this.m=h.p,this.prime=h}else m(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function nt(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}it.prototype._tmp=function(){var t=new s(null);return t.words=Array(Math.ceil(this.n/13)),t},it.prototype.ireduce=function(t){var h,e=t;do this.split(e,this.tmp),h=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength();while(h>this.n);var r=h0?e.isub(this.p):e.strip(),e},it.prototype.split=function(t,h){t.iushrn(this.n,0,h)},it.prototype.imulK=function(t){return t.imul(this.k)},et(st,it),st.prototype.split=function(t,h){for(var e=4194303,r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,n===0&&t.length>10?t.length-=10:t.length-=9},st.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var h=0,e=0;e>>=26,t.words[e]=i,h=r}return h!==0&&(t.words[t.length++]=h),t},s._prime=function(t){if(ut[t])return ut[t];var h;if(t==="k256")h=new st;else if(t==="p224")h=new Ot;else if(t==="p192")h=new Tt;else{if(t!=="p25519")throw Error("Unknown prime "+t);h=new at}return ut[t]=h,h},y.prototype._verify1=function(t){m(t.negative===0,"red works only with positives"),m(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,h){m((t.negative|h.negative)==0,"red works only with positives"),m(t.red&&t.red===h.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,h){this._verify2(t,h);var e=t.add(h);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},y.prototype.iadd=function(t,h){this._verify2(t,h);var e=t.iadd(h);return e.cmp(this.m)>=0&&e.isub(this.m),e},y.prototype.sub=function(t,h){this._verify2(t,h);var e=t.sub(h);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},y.prototype.isub=function(t,h){this._verify2(t,h);var e=t.isub(h);return e.cmpn(0)<0&&e.iadd(this.m),e},y.prototype.shl=function(t,h){return this._verify1(t),this.imod(t.ushln(h))},y.prototype.imul=function(t,h){return this._verify2(t,h),this.imod(t.imul(h))},y.prototype.mul=function(t,h){return this._verify2(t,h),this.imod(t.mul(h))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var h=this.m.andln(3);if(m(h%2==1),h===3){var e=this.m.add(new s(1)).iushrn(2);return this.pow(t,e)}for(var r=this.m.subn(1),i=0;!r.isZero()&&r.andln(1)===0;)i++,r.iushrn(1);m(!r.isZero());var n=new s(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new s(2*a*a).toRed(this);this.pow(a,l).cmp(o)!==0;)a.redIAdd(o);for(var u=this.pow(a,r),f=this.pow(t,r.addn(1).iushrn(1)),d=this.pow(t,r),p=i;d.cmp(n)!==0;){for(var M=d,v=0;M.cmp(n)!==0;v++)M=M.redSqr();m(v=0;r--){for(var a=h.words[r],u=l-1;u>=0;u--){var f=a>>u&1;i!==e[0]&&(i=this.sqr(i)),f!==0||n!==0?(n<<=1,n|=f,(++o===4||r===0&&u===0)&&(i=this.mul(i,e[n]),o=0,n=0)):o=0}l=26}return i},y.prototype.convertTo=function(t){var h=t.umod(this.m);return h===t?h.clone():h},y.prototype.convertFrom=function(t){var h=t.clone();return h.red=null,h},s.mont=function(t){return new nt(t)},et(nt,y),nt.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},nt.prototype.convertFrom=function(t){var h=this.imod(t.mul(this.rinv));return h.red=null,h},nt.prototype.imul=function(t,h){if(t.isZero()||h.isZero())return t.words[0]=0,t.length=1,t;var e=t.imul(h),r=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=e.isub(r).iushrn(this.shift),n=i;return i.cmp(this.m)>=0?n=i.isub(this.m):i.cmpn(0)<0&&(n=i.iadd(this.m)),n._forceRed(this)},nt.prototype.mul=function(t,h){if(t.isZero()||h.isZero())return new s(0)._forceRed(this);var e=t.mul(h),r=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=e.isub(r).iushrn(this.shift),n=i;return i.cmp(this.m)>=0?n=i.isub(this.m):i.cmpn(0)<0&&(n=i.iadd(this.m)),n._forceRed(this)},nt.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}})(ii,si)});export{ui as __moduleExports,ui as default}; diff --git a/public/js/build/calendar.b1746b7c.js b/public/js/build/calendar.23380bdc.js similarity index 99% rename from public/js/build/calendar.b1746b7c.js rename to public/js/build/calendar.23380bdc.js index 58ea466f5..540421623 100644 --- a/public/js/build/calendar.b1746b7c.js +++ b/public/js/build/calendar.23380bdc.js @@ -1,4 +1,4 @@ -import{f as vs,h as Ss,n as tr,k as Es,m as Cs,b as Ds,a as Ps}from"./app.6c8b31b1.js";import{T as ks}from"./TaskMenu.a0d74239.js";var nr={exports:{}},ir={exports:{}};/*! +import{f as vs,h as Ss,n as tr,k as Es,m as Cs,b as Ds,a as Ps}from"./app.6910ca56.js";import{T as ks}from"./TaskMenu.0454bb90.js";var nr={exports:{}},ir={exports:{}};/*! * tui-code-snippet.js * @version 1.5.2 * @author NHN. FE Development Lab diff --git a/public/js/build/checkin.dbddec5e.js b/public/js/build/checkin.9caf7776.js similarity index 99% rename from public/js/build/checkin.dbddec5e.js rename to public/js/build/checkin.9caf7776.js index 75f26bea6..e6e3d0be7 100644 --- a/public/js/build/checkin.dbddec5e.js +++ b/public/js/build/checkin.9caf7776.js @@ -1 +1 @@ -import{n as h}from"./app.6c8b31b1.js";var d=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"checkin-calendar"},[e("div",{staticClass:"calendar-header"},[e("div",{staticClass:"calendar-header-menu"},[e("Icon",{staticClass:"month-less",attrs:{type:"ios-arrow-back"},on:{click:t.prevMonth}}),e("h4",[t._v(t._s(t.$L("(*)\u5E74(*)\u6708",t.year,t.month)))]),t.hasNextMonth?e("Icon",{staticClass:"month-add",attrs:{type:"ios-arrow-forward"},on:{click:t.nextMonth}}):t._e()],1),t.hasNextMonth?e("Button",{staticClass:"calendar-header-back",attrs:{size:"small"},on:{click:t.nowMonth}},[t._v(t._s(t.$L("\u8FD4\u56DE\u672C\u6708")))]):t._e()],1),e("table",{staticClass:"check-table"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.$L("\u65E5")))]),e("th",[t._v(t._s(t.$L("\u4E00")))]),e("th",[t._v(t._s(t.$L("\u4E8C")))]),e("th",[t._v(t._s(t.$L("\u4E09")))]),e("th",[t._v(t._s(t.$L("\u56DB")))]),e("th",[t._v(t._s(t.$L("\u4E94")))]),e("th",[t._v(t._s(t.$L("\u516D")))])])]),e("tbody",t._l(t.dateArray,function(s){return e("tr",[t._l(s,function(n){return[n.month?e("td",{class:{today:n.today,checkin:t.isCheck(n.date)}},[e("ETooltip",{attrs:{"max-width":"auto",disabled:!t.isCheck(n.date)}},[e("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.getTimes(n.date))},slot:"content"}),e("div",{staticClass:"item-day"},[n.today?e("div",[t._v(t._s(t.$L("\u4ECA\u5929")))]):e("div",[t._v(t._s(n.day))]),t.isCheck(n.date)?e("div",{staticClass:"ui-state-down"},[t._v(t._s(t.$L("\u5DF2\u7B7E\u5230")))]):n.today?e("div",{staticClass:"ui-state-default"},[t._v(t._s(t.$L("\u5C1A\u672A\u7B7E\u5230")))]):t._e()])])],1):e("td",{staticClass:"disabled"},[e("div",{staticClass:"item-day"},[e("div",[t._v(t._s(n.day))]),t.isCheck(n.date)?e("div",{staticClass:"ui-state-down"},[t._v(t._s(t.$L("\u5DF2\u7B7E\u5230")))]):t._e()])])]})],2)}),0)]),t.loadIng?e("div",{staticClass:"calendar-loading"},[e("Loading")],1):t._e()])},m=[];const _={name:"CheckinCalendar",props:{checkin:{type:Array},loadIng:{type:Boolean,default:!1}},data(){return{year:"",month:"",startTime:"",endTime:"",dateArray:[],historys:[]}},created(){const t=new Date;this.year=t.getFullYear(),this.month=t.getMonth()+1,this.generateCalendar()},watch:{checkin:{handler(t){t.some(({date:a,section:e})=>{a=a.replace(/-0?/g,"/");let s=this.historys.findIndex(n=>n.date==a);s>-1?this.historys.splice(s,1,{date:a,section:e}):this.historys.push({date:a,section:e})})},immediate:!0}},computed:{hasNextMonth(){const{year:t,month:a}=this;return parseInt(t)!=$A.formatDate("Y")||parseInt(a)<$A.formatDate("m")}},methods:{ym(){return this.year+"-"+(this.month<10?"0"+this.month:this.month)},isCheck(t){return!!this.historys.find(a=>a.date==t)},setMonth(t){this.$emit("setMonth",t,[this.startTime,this.endTime])},getTimes(t){const a=this.historys.find(e=>e.date==t);return a==null?void 0:a.section.map(e=>`${e[0]} - ${e[1]||"None"}`).join("
    ")},generateCalendar(){let t=new Date($A.formatDate("Y/m/d")),a=new Date(this.year,this.month-1,1),e=a.getTime()-a.getDay()*86400*1e3,s=[];for(let n=0;n<6;n++){s[n]=[];for(let i=0;i<7;i++){let r=new Date(e),o=r.getMonth()+1;s[n][i]={day:r.getDate(),date:`${r.getFullYear()}/${o}/${r.getDate()}`,today:t.getTime()==r.getTime(),future:t.getTime()0?e("div",{staticClass:"setting-checkin-load"},[e("Loading")],1):e("Timeline",{staticClass:"setting-checkin-lately"},t._l(t.latelyData,function(s,n){return e("TimelineItem",{key:n,attrs:{color:s.section.length>0?"blue":"#F29D38"}},[e("Icon",{attrs:{slot:"dot",type:s.section.length>0?"md-checkmark-circle":"md-close-circle"},slot:"dot"}),e("p",{staticClass:"time"},[t._v(t._s(s.date))]),e("p",{staticClass:"content",domProps:{innerHTML:t._s(s.section.length>0?t.latelySection(s.section):t.$L("\u672A\u7B7E\u5230"))}})],1)}),1),e("div",{staticClass:"setting-checkin-button",on:{click:function(s){t.calendarShow=!0}}},[t._v(t._s(t.$L("\u67E5\u770B\u66F4\u591A\u7B7E\u5230\u6570\u636E")))]),e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("\u7B7E\u5230\u8BBE\u7F6E")))]),e("Alert",[t._v(" "+t._s(t.$L("\u8BBE\u5907\u8FDE\u63A5\u4E0A\u6307\u5B9A\u8DEF\u7531\u5668\uFF08WiFi\uFF09\u540E\u81EA\u52A8\u7B7E\u5230\u3002"))+" ")]),e("div",{staticClass:"setting-checkin-row"},[e("Row",{staticClass:"setting-template"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u8BBE\u5907MAC\u5730\u5740")))]),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u5907\u6CE8")))])],1),t._l(t.formData,function(s,n){return e("Row",{key:n,staticClass:"setting-template"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8BBE\u5907MAC\u5730\u5740"),clearable:""},on:{"on-clear":function(i){return t.delDatum(n)}},model:{value:s.mac,callback:function(i){t.$set(s,"mac",i)},expression:"item.mac"}})],1),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("\u5907\u6CE8")},model:{value:s.remark,callback:function(i){t.$set(s,"remark",i)},expression:"item.remark"}})],1)],1)})],2),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u8BBE\u5907")))])],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1),e("Modal",{attrs:{title:t.$L("\u7B7E\u5230\u6570\u636E"),"footer-hide":"","mask-closable":!1},model:{value:t.calendarShow,callback:function(s){t.calendarShow=s},expression:"calendarShow"}},[e("CheckinCalendar",{ref:"calendar",attrs:{loadIng:t.calendarLoading>0,checkin:t.calendarData},on:{changeMonth:t.changeMonth}})],1)],1)},$=[];const g={name:"ManageCheckin",components:{CheckinCalendar:v},data(){return{loadIng:0,formData:[],nullDatum:{mac:"",remark:""},latelyLoad:0,latelyData:[],calendarShow:!1,calendarLoading:0,calendarData:[]}},mounted(){this.initData(),this.getLately()},watch:{calendarShow(t){t&&this.$nextTick(a=>{this.changeMonth(this.$refs.calendar.ym())})}},methods:{initData(){this.loadIng++,this.$store.dispatch("call",{url:"users/checkin/get"}).then(({data:t})=>{this.formData=t.length>0?t:[$A.cloneJSON(this.nullDatum)],this.formData_bak=$A.cloneJSON(this.formData)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},submitForm(){this.$refs.formData.validate(t=>{if(t){const a=this.formData.filter(e=>/^[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}$/.test(e.mac.trim())).map(e=>({mac:e.mac.trim(),remark:e.remark.trim()}));this.loadIng++,this.$store.dispatch("call",{url:"users/checkin/save",data:{list:a},method:"post"}).then(({data:e})=>{this.formData=e,this.formData_bak=$A.cloneJSON(this.formData),$A.messageSuccess("\u4FEE\u6539\u6210\u529F")}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--})}})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)},addDatum(){this.formData.push($A.cloneJSON(this.nullDatum))},delDatum(t){this.formData.splice(t,1),this.formData.length===0&&this.addDatum()},getLately(){this.latelyLoad++,this.$store.dispatch("call",{url:"users/checkin/list",data:{ym:$A.formatDate("Y-m"),before:1}}).then(({data:t})=>{this.latelyFormat(t)}).finally(t=>{this.latelyLoad--})},latelyFormat(t){const a=$A.Time();this.latelyData=[];for(let e=0;e<5;e++){const s=$A.formatDate("Y-m-d",a-e*86400),n=t.find(({date:i})=>i==s)||{date:s,section:[]};this.latelyData.push(n)}},latelySection(t){return t.map(a=>`${a[0]} - ${a[1]||"None"}`).join("
    ")},changeMonth(t){setTimeout(a=>{this.calendarLoading++},600),this.$store.dispatch("call",{url:"users/checkin/list",data:{ym:t,before:1}}).then(({data:a})=>{this.$refs.calendar.ym()==t&&(this.calendarData=a,t==$A.formatDate("Y-m")&&this.latelyFormat(a))}).catch(({msg:a})=>{this.calendarData=[],$A.modalError(a)}).finally(a=>{this.calendarLoading--})}}},c={};var p=h(g,y,$,!1,D,null,null,null);function D(t){for(let a in c)this[a]=c[a]}var C=function(){return p.exports}();export{C as default}; +import{n as h}from"./app.6910ca56.js";var d=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"checkin-calendar"},[e("div",{staticClass:"calendar-header"},[e("div",{staticClass:"calendar-header-menu"},[e("Icon",{staticClass:"month-less",attrs:{type:"ios-arrow-back"},on:{click:t.prevMonth}}),e("h4",[t._v(t._s(t.$L("(*)\u5E74(*)\u6708",t.year,t.month)))]),t.hasNextMonth?e("Icon",{staticClass:"month-add",attrs:{type:"ios-arrow-forward"},on:{click:t.nextMonth}}):t._e()],1),t.hasNextMonth?e("Button",{staticClass:"calendar-header-back",attrs:{size:"small"},on:{click:t.nowMonth}},[t._v(t._s(t.$L("\u8FD4\u56DE\u672C\u6708")))]):t._e()],1),e("table",{staticClass:"check-table"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.$L("\u65E5")))]),e("th",[t._v(t._s(t.$L("\u4E00")))]),e("th",[t._v(t._s(t.$L("\u4E8C")))]),e("th",[t._v(t._s(t.$L("\u4E09")))]),e("th",[t._v(t._s(t.$L("\u56DB")))]),e("th",[t._v(t._s(t.$L("\u4E94")))]),e("th",[t._v(t._s(t.$L("\u516D")))])])]),e("tbody",t._l(t.dateArray,function(s){return e("tr",[t._l(s,function(n){return[n.month?e("td",{class:{today:n.today,checkin:t.isCheck(n.date)}},[e("ETooltip",{attrs:{"max-width":"auto",disabled:!t.isCheck(n.date)}},[e("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.getTimes(n.date))},slot:"content"}),e("div",{staticClass:"item-day"},[n.today?e("div",[t._v(t._s(t.$L("\u4ECA\u5929")))]):e("div",[t._v(t._s(n.day))]),t.isCheck(n.date)?e("div",{staticClass:"ui-state-down"},[t._v(t._s(t.$L("\u5DF2\u7B7E\u5230")))]):n.today?e("div",{staticClass:"ui-state-default"},[t._v(t._s(t.$L("\u5C1A\u672A\u7B7E\u5230")))]):t._e()])])],1):e("td",{staticClass:"disabled"},[e("div",{staticClass:"item-day"},[e("div",[t._v(t._s(n.day))]),t.isCheck(n.date)?e("div",{staticClass:"ui-state-down"},[t._v(t._s(t.$L("\u5DF2\u7B7E\u5230")))]):t._e()])])]})],2)}),0)]),t.loadIng?e("div",{staticClass:"calendar-loading"},[e("Loading")],1):t._e()])},m=[];const _={name:"CheckinCalendar",props:{checkin:{type:Array},loadIng:{type:Boolean,default:!1}},data(){return{year:"",month:"",startTime:"",endTime:"",dateArray:[],historys:[]}},created(){const t=new Date;this.year=t.getFullYear(),this.month=t.getMonth()+1,this.generateCalendar()},watch:{checkin:{handler(t){t.some(({date:a,section:e})=>{a=a.replace(/-0?/g,"/");let s=this.historys.findIndex(n=>n.date==a);s>-1?this.historys.splice(s,1,{date:a,section:e}):this.historys.push({date:a,section:e})})},immediate:!0}},computed:{hasNextMonth(){const{year:t,month:a}=this;return parseInt(t)!=$A.formatDate("Y")||parseInt(a)<$A.formatDate("m")}},methods:{ym(){return this.year+"-"+(this.month<10?"0"+this.month:this.month)},isCheck(t){return!!this.historys.find(a=>a.date==t)},setMonth(t){this.$emit("setMonth",t,[this.startTime,this.endTime])},getTimes(t){const a=this.historys.find(e=>e.date==t);return a==null?void 0:a.section.map(e=>`${e[0]} - ${e[1]||"None"}`).join("
    ")},generateCalendar(){let t=new Date($A.formatDate("Y/m/d")),a=new Date(this.year,this.month-1,1),e=a.getTime()-a.getDay()*86400*1e3,s=[];for(let n=0;n<6;n++){s[n]=[];for(let i=0;i<7;i++){let r=new Date(e),o=r.getMonth()+1;s[n][i]={day:r.getDate(),date:`${r.getFullYear()}/${o}/${r.getDate()}`,today:t.getTime()==r.getTime(),future:t.getTime()0?e("div",{staticClass:"setting-checkin-load"},[e("Loading")],1):e("Timeline",{staticClass:"setting-checkin-lately"},t._l(t.latelyData,function(s,n){return e("TimelineItem",{key:n,attrs:{color:s.section.length>0?"blue":"#F29D38"}},[e("Icon",{attrs:{slot:"dot",type:s.section.length>0?"md-checkmark-circle":"md-close-circle"},slot:"dot"}),e("p",{staticClass:"time"},[t._v(t._s(s.date))]),e("p",{staticClass:"content",domProps:{innerHTML:t._s(s.section.length>0?t.latelySection(s.section):t.$L("\u672A\u7B7E\u5230"))}})],1)}),1),e("div",{staticClass:"setting-checkin-button",on:{click:function(s){t.calendarShow=!0}}},[t._v(t._s(t.$L("\u67E5\u770B\u66F4\u591A\u7B7E\u5230\u6570\u636E")))]),e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("\u7B7E\u5230\u8BBE\u7F6E")))]),e("Alert",[t._v(" "+t._s(t.$L("\u8BBE\u5907\u8FDE\u63A5\u4E0A\u6307\u5B9A\u8DEF\u7531\u5668\uFF08WiFi\uFF09\u540E\u81EA\u52A8\u7B7E\u5230\u3002"))+" ")]),e("div",{staticClass:"setting-checkin-row"},[e("Row",{staticClass:"setting-template"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u8BBE\u5907MAC\u5730\u5740")))]),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u5907\u6CE8")))])],1),t._l(t.formData,function(s,n){return e("Row",{key:n,staticClass:"setting-template"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8BBE\u5907MAC\u5730\u5740"),clearable:""},on:{"on-clear":function(i){return t.delDatum(n)}},model:{value:s.mac,callback:function(i){t.$set(s,"mac",i)},expression:"item.mac"}})],1),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("\u5907\u6CE8")},model:{value:s.remark,callback:function(i){t.$set(s,"remark",i)},expression:"item.remark"}})],1)],1)})],2),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u8BBE\u5907")))])],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1),e("Modal",{attrs:{title:t.$L("\u7B7E\u5230\u6570\u636E"),"footer-hide":"","mask-closable":!1},model:{value:t.calendarShow,callback:function(s){t.calendarShow=s},expression:"calendarShow"}},[e("CheckinCalendar",{ref:"calendar",attrs:{loadIng:t.calendarLoading>0,checkin:t.calendarData},on:{changeMonth:t.changeMonth}})],1)],1)},$=[];const g={name:"ManageCheckin",components:{CheckinCalendar:v},data(){return{loadIng:0,formData:[],nullDatum:{mac:"",remark:""},latelyLoad:0,latelyData:[],calendarShow:!1,calendarLoading:0,calendarData:[]}},mounted(){this.initData(),this.getLately()},watch:{calendarShow(t){t&&this.$nextTick(a=>{this.changeMonth(this.$refs.calendar.ym())})}},methods:{initData(){this.loadIng++,this.$store.dispatch("call",{url:"users/checkin/get"}).then(({data:t})=>{this.formData=t.length>0?t:[$A.cloneJSON(this.nullDatum)],this.formData_bak=$A.cloneJSON(this.formData)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},submitForm(){this.$refs.formData.validate(t=>{if(t){const a=this.formData.filter(e=>/^[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}:[A-Fa-f\d]{2}$/.test(e.mac.trim())).map(e=>({mac:e.mac.trim(),remark:e.remark.trim()}));this.loadIng++,this.$store.dispatch("call",{url:"users/checkin/save",data:{list:a},method:"post"}).then(({data:e})=>{this.formData=e,this.formData_bak=$A.cloneJSON(this.formData),$A.messageSuccess("\u4FEE\u6539\u6210\u529F")}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--})}})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)},addDatum(){this.formData.push($A.cloneJSON(this.nullDatum))},delDatum(t){this.formData.splice(t,1),this.formData.length===0&&this.addDatum()},getLately(){this.latelyLoad++,this.$store.dispatch("call",{url:"users/checkin/list",data:{ym:$A.formatDate("Y-m"),before:1}}).then(({data:t})=>{this.latelyFormat(t)}).finally(t=>{this.latelyLoad--})},latelyFormat(t){const a=$A.Time();this.latelyData=[];for(let e=0;e<5;e++){const s=$A.formatDate("Y-m-d",a-e*86400),n=t.find(({date:i})=>i==s)||{date:s,section:[]};this.latelyData.push(n)}},latelySection(t){return t.map(a=>`${a[0]} - ${a[1]||"None"}`).join("
    ")},changeMonth(t){setTimeout(a=>{this.calendarLoading++},600),this.$store.dispatch("call",{url:"users/checkin/list",data:{ym:t,before:1}}).then(({data:a})=>{this.$refs.calendar.ym()==t&&(this.calendarData=a,t==$A.formatDate("Y-m")&&this.latelyFormat(a))}).catch(({msg:a})=>{this.calendarData=[],$A.modalError(a)}).finally(a=>{this.calendarLoading--})}}},c={};var p=h(g,y,$,!1,D,null,null,null);function D(t){for(let a in c)this[a]=c[a]}var C=function(){return p.exports}();export{C as default}; diff --git a/public/js/build/dashboard.d6d0c216.js b/public/js/build/dashboard.3f95cdc5.js similarity index 97% rename from public/js/build/dashboard.d6d0c216.js rename to public/js/build/dashboard.3f95cdc5.js index e070148fa..967c23e1c 100644 --- a/public/js/build/dashboard.d6d0c216.js +++ b/public/js/build/dashboard.3f95cdc5.js @@ -1 +1 @@ -import{m as l,b as c,n as d}from"./app.6c8b31b1.js";import{T as _}from"./TaskMenu.a0d74239.js";var u=function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("div",{staticClass:"page-dashboard"},[t("PageTitle",{attrs:{title:s.$L("\u4EEA\u8868\u76D8")}}),s.warningMsg?t("Alert",{staticClass:"dashboard-warning",attrs:{type:"warning","show-icon":""}},[t("span",{on:{click:function(o){return s.goForward({name:"manage-setting-license"})}}},[s._v(s._s(s.warningMsg))])]):s._e(),t("div",{staticClass:"dashboard-wrapper",style:s.wrapperStyle},[t("div",{staticClass:"dashboard-hello"},[s._v(s._s(s.$L("\u6B22\u8FCE\u60A8\uFF0C"+s.userInfo.nickname)))]),t("div",{staticClass:"dashboard-desc"},[s._v(" "+s._s(s.$L("\u4EE5\u4E0B\u662F\u4F60\u5F53\u524D\u7684\u4EFB\u52A1\u7EDF\u8BA1\u6570\u636E"))+" "),t("transition",{attrs:{name:"dashboard-load"}},[s.loadDashboardTasks?t("div",{staticClass:"dashboard-load"},[t("Loading")],1):s._e()])],1),t("ul",{staticClass:"dashboard-block"},[t("li",{on:{click:function(o){return s.scrollTo("today")}}},[t("div",{staticClass:"block-title"},[s._v(s._s(s.getTitle("today")))]),t("div",{staticClass:"block-data"},[t("div",{staticClass:"block-num"},[s._v(s._s(s.dashboardTask.today_count))]),t("i",{staticClass:"taskfont"},[s._v("\uE6F4")])])]),t("li",{on:{click:function(o){return s.scrollTo("overdue")}}},[t("div",{staticClass:"block-title"},[s._v(s._s(s.getTitle("overdue")))]),t("div",{staticClass:"block-data"},[t("div",{staticClass:"block-num"},[s._v(s._s(s.dashboardTask.overdue_count))]),t("i",{staticClass:"taskfont"},[s._v("\uE603")])])]),t("li",{on:{click:function(o){return s.scrollTo("all")}}},[t("div",{staticClass:"block-title"},[s._v(s._s(s.getTitle("all")))]),t("div",{staticClass:"block-data"},[t("div",{staticClass:"block-num"},[s._v(s._s(s.dashboardTask.all_count))]),t("i",{staticClass:"taskfont"},[s._v("\uE6F9")])])])]),t("Scrollbar",{staticClass:"dashboard-list"},[s._l(s.columns,function(o){return o.list.length>0?[t("div",{ref:`type_${o.type}`,refInFor:!0,staticClass:"dashboard-ref"}),t("div",{staticClass:"dashboard-title"},[s._v(s._s(o.title))]),t("ul",{staticClass:"dashboard-ul"},s._l(o.list,function(a,r){return t("li",{key:r,class:{complete:a.complete_at},style:a.color?{backgroundColor:a.color}:{},on:{click:function(n){return s.openTask(a)}}},[a.p_name?t("em",{staticClass:"priority-color",style:{backgroundColor:a.p_color}}):s._e(),t("div",{staticClass:"item-select",on:{click:function(n){return n.stopPropagation(),s.openMenu(n,a)}}},[t("i",{staticClass:"taskfont",domProps:{innerHTML:s._s(a.complete_at?"":"")}})]),t("div",{staticClass:"item-title"},[a.flow_item_name?t("span",{class:a.flow_item_status,on:{click:function(n){return n.stopPropagation(),s.openMenu(n,a)}}},[s._v(s._s(a.flow_item_name))]):s._e(),a.sub_top===!0?t("span",[s._v(s._s(s.$L("\u5B50\u4EFB\u52A1")))]):s._e(),a.sub_my&&a.sub_my.length>0?t("span",[s._v("+"+s._s(a.sub_my.length))]):s._e(),s._v(" "+s._s(a.name)+" ")]),a.desc?t("div",{staticClass:"item-icon"},[t("i",{staticClass:"taskfont"},[s._v("\uE71A")])]):s._e(),a.sub_num>0?t("div",{staticClass:"item-icon"},[t("i",{staticClass:"taskfont"},[s._v("\uE71F")]),t("em",[s._v(s._s(a.sub_complete)+"/"+s._s(a.sub_num))])]):s._e(),a.end_at?t("ETooltip",{attrs:{disabled:s.$isEEUiApp||s.windowTouch,content:a.end_at,placement:"right"}},[t("div",{class:["item-icon",a.today?"today":"",a.overdue?"overdue":""]},[t("i",{staticClass:"taskfont"},[s._v("\uE71D")]),t("em",[s._v(s._s(s.expiresFormat(a.end_at)))])])]):s._e()],1)}),0)]:s._e()})],2)],1)],1)},h=[];const v={components:{TaskMenu:_},data(){return{nowTime:$A.Time(),nowInter:null,licenseTimer:null,loadIng:0,dashboard:"today",warningMsg:""}},activated(){this.$store.dispatch("getTaskForDashboard",600),this.loadInterval(!0),this.loadLicense(!0)},deactivated(){this.$store.dispatch("forgetTaskCompleteTemp",!0),this.loadInterval(!1),this.loadLicense(!1)},computed:{...l(["userInfo","userIsAdmin","cacheTasks","taskCompleteTemps","loadDashboardTasks"]),...c(["dashboardTask","assistTask","transforTasks"]),columns(){const s=[];return["today","overdue","all"].some(e=>{let t=this.transforTasks(this.dashboardTask[e]);s.push({type:e,title:this.getTitle(e),list:t.sort((o,a)=>$A.Date(o.end_at||"2099-12-31 23:59:59")-$A.Date(a.end_at||"2099-12-31 23:59:59"))})}),s.push({type:"assist",title:this.getTitle("assist"),list:this.assistTask.sort((e,t)=>$A.Date(e.end_at||"2099-12-31 23:59:59")-$A.Date(t.end_at||"2099-12-31 23:59:59"))}),s},total(){const{dashboardTask:s}=this;return s.today_count+s.overdue_count+s.all_count},wrapperStyle({warningMsg:s}){return s?{"max-height":"calc(100% - 50px)"}:null}},watch:{windowActive(s){this.loadInterval(s),this.loadLicense(s)}},methods:{getTitle(s){switch(s){case"today":return this.$L("\u4ECA\u65E5\u5230\u671F");case"overdue":return this.$L("\u8D85\u671F\u4EFB\u52A1");case"all":return this.$L("\u5F85\u5B8C\u6210\u4EFB\u52A1");case"assist":return this.$L("\u534F\u52A9\u7684\u4EFB\u52A1");default:return""}},scrollTo(s){let e=this.$refs[`type_${s}`];e&&$A.scrollToView(e[0],{behavior:"smooth",inline:"end"})},openTask(s){this.$store.dispatch("openTask",s)},openMenu(s,e){this.$store.state.taskOperation={event:s,task:e}},expiresFormat(s){return $A.countDownFormat(s,this.nowTime)},loadInterval(s){this.nowInter&&(clearInterval(this.nowInter),this.nowInter=null),s!==!1&&(this.nowInter=setInterval(e=>{this.nowTime=$A.Time()},1e3))},loadLicense(s){this.licenseTimer&&(clearTimeout(this.licenseTimer),this.licenseTimer=null),!(s===!1||!this.userIsAdmin)&&(this.licenseTimer=setTimeout(e=>{this.$store.dispatch("call",{url:"system/license",data:{type:"get"}}).then(({data:t})=>{this.warningMsg=t.error.length>0?t.error[0]:""}).catch(t=>{this.warningMsg=""})},1500))}}},i={};var p=d(v,u,h,!1,k,null,null,null);function k(s){for(let e in i)this[e]=i[e]}var m=function(){return p.exports}();export{m as default}; +import{m as l,b as c,n as d}from"./app.6910ca56.js";import{T as _}from"./TaskMenu.0454bb90.js";var u=function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("div",{staticClass:"page-dashboard"},[t("PageTitle",{attrs:{title:s.$L("\u4EEA\u8868\u76D8")}}),s.warningMsg?t("Alert",{staticClass:"dashboard-warning",attrs:{type:"warning","show-icon":""}},[t("span",{on:{click:function(o){return s.goForward({name:"manage-setting-license"})}}},[s._v(s._s(s.warningMsg))])]):s._e(),t("div",{staticClass:"dashboard-wrapper",style:s.wrapperStyle},[t("div",{staticClass:"dashboard-hello"},[s._v(s._s(s.$L("\u6B22\u8FCE\u60A8\uFF0C"+s.userInfo.nickname)))]),t("div",{staticClass:"dashboard-desc"},[s._v(" "+s._s(s.$L("\u4EE5\u4E0B\u662F\u4F60\u5F53\u524D\u7684\u4EFB\u52A1\u7EDF\u8BA1\u6570\u636E"))+" "),t("transition",{attrs:{name:"dashboard-load"}},[s.loadDashboardTasks?t("div",{staticClass:"dashboard-load"},[t("Loading")],1):s._e()])],1),t("ul",{staticClass:"dashboard-block"},[t("li",{on:{click:function(o){return s.scrollTo("today")}}},[t("div",{staticClass:"block-title"},[s._v(s._s(s.getTitle("today")))]),t("div",{staticClass:"block-data"},[t("div",{staticClass:"block-num"},[s._v(s._s(s.dashboardTask.today_count))]),t("i",{staticClass:"taskfont"},[s._v("\uE6F4")])])]),t("li",{on:{click:function(o){return s.scrollTo("overdue")}}},[t("div",{staticClass:"block-title"},[s._v(s._s(s.getTitle("overdue")))]),t("div",{staticClass:"block-data"},[t("div",{staticClass:"block-num"},[s._v(s._s(s.dashboardTask.overdue_count))]),t("i",{staticClass:"taskfont"},[s._v("\uE603")])])]),t("li",{on:{click:function(o){return s.scrollTo("all")}}},[t("div",{staticClass:"block-title"},[s._v(s._s(s.getTitle("all")))]),t("div",{staticClass:"block-data"},[t("div",{staticClass:"block-num"},[s._v(s._s(s.dashboardTask.all_count))]),t("i",{staticClass:"taskfont"},[s._v("\uE6F9")])])])]),t("Scrollbar",{staticClass:"dashboard-list"},[s._l(s.columns,function(o){return o.list.length>0?[t("div",{ref:`type_${o.type}`,refInFor:!0,staticClass:"dashboard-ref"}),t("div",{staticClass:"dashboard-title"},[s._v(s._s(o.title))]),t("ul",{staticClass:"dashboard-ul"},s._l(o.list,function(a,r){return t("li",{key:r,class:{complete:a.complete_at},style:a.color?{backgroundColor:a.color}:{},on:{click:function(n){return s.openTask(a)}}},[a.p_name?t("em",{staticClass:"priority-color",style:{backgroundColor:a.p_color}}):s._e(),t("div",{staticClass:"item-select",on:{click:function(n){return n.stopPropagation(),s.openMenu(n,a)}}},[t("i",{staticClass:"taskfont",domProps:{innerHTML:s._s(a.complete_at?"":"")}})]),t("div",{staticClass:"item-title"},[a.flow_item_name?t("span",{class:a.flow_item_status,on:{click:function(n){return n.stopPropagation(),s.openMenu(n,a)}}},[s._v(s._s(a.flow_item_name))]):s._e(),a.sub_top===!0?t("span",[s._v(s._s(s.$L("\u5B50\u4EFB\u52A1")))]):s._e(),a.sub_my&&a.sub_my.length>0?t("span",[s._v("+"+s._s(a.sub_my.length))]):s._e(),s._v(" "+s._s(a.name)+" ")]),a.desc?t("div",{staticClass:"item-icon"},[t("i",{staticClass:"taskfont"},[s._v("\uE71A")])]):s._e(),a.sub_num>0?t("div",{staticClass:"item-icon"},[t("i",{staticClass:"taskfont"},[s._v("\uE71F")]),t("em",[s._v(s._s(a.sub_complete)+"/"+s._s(a.sub_num))])]):s._e(),a.end_at?t("ETooltip",{attrs:{disabled:s.$isEEUiApp||s.windowTouch,content:a.end_at,placement:"right"}},[t("div",{class:["item-icon",a.today?"today":"",a.overdue?"overdue":""]},[t("i",{staticClass:"taskfont"},[s._v("\uE71D")]),t("em",[s._v(s._s(s.expiresFormat(a.end_at)))])])]):s._e()],1)}),0)]:s._e()})],2)],1)],1)},h=[];const v={components:{TaskMenu:_},data(){return{nowTime:$A.Time(),nowInter:null,licenseTimer:null,loadIng:0,dashboard:"today",warningMsg:""}},activated(){this.$store.dispatch("getTaskForDashboard",600),this.loadInterval(!0),this.loadLicense(!0)},deactivated(){this.$store.dispatch("forgetTaskCompleteTemp",!0),this.loadInterval(!1),this.loadLicense(!1)},computed:{...l(["userInfo","userIsAdmin","cacheTasks","taskCompleteTemps","loadDashboardTasks"]),...c(["dashboardTask","assistTask","transforTasks"]),columns(){const s=[];return["today","overdue","all"].some(e=>{let t=this.transforTasks(this.dashboardTask[e]);s.push({type:e,title:this.getTitle(e),list:t.sort((o,a)=>$A.Date(o.end_at||"2099-12-31 23:59:59")-$A.Date(a.end_at||"2099-12-31 23:59:59"))})}),s.push({type:"assist",title:this.getTitle("assist"),list:this.assistTask.sort((e,t)=>$A.Date(e.end_at||"2099-12-31 23:59:59")-$A.Date(t.end_at||"2099-12-31 23:59:59"))}),s},total(){const{dashboardTask:s}=this;return s.today_count+s.overdue_count+s.all_count},wrapperStyle({warningMsg:s}){return s?{"max-height":"calc(100% - 50px)"}:null}},watch:{windowActive(s){this.loadInterval(s),this.loadLicense(s)}},methods:{getTitle(s){switch(s){case"today":return this.$L("\u4ECA\u65E5\u5230\u671F");case"overdue":return this.$L("\u8D85\u671F\u4EFB\u52A1");case"all":return this.$L("\u5F85\u5B8C\u6210\u4EFB\u52A1");case"assist":return this.$L("\u534F\u52A9\u7684\u4EFB\u52A1");default:return""}},scrollTo(s){let e=this.$refs[`type_${s}`];e&&$A.scrollToView(e[0],{behavior:"smooth",inline:"end"})},openTask(s){this.$store.dispatch("openTask",s)},openMenu(s,e){this.$store.state.taskOperation={event:s,task:e}},expiresFormat(s){return $A.countDownFormat(s,this.nowTime)},loadInterval(s){this.nowInter&&(clearInterval(this.nowInter),this.nowInter=null),s!==!1&&(this.nowInter=setInterval(e=>{this.nowTime=$A.Time()},1e3))},loadLicense(s){this.licenseTimer&&(clearTimeout(this.licenseTimer),this.licenseTimer=null),!(s===!1||!this.userIsAdmin)&&(this.licenseTimer=setTimeout(e=>{this.$store.dispatch("call",{url:"system/license",data:{type:"get"}}).then(({data:t})=>{this.warningMsg=t.error.length>0?t.error[0]:""}).catch(t=>{this.warningMsg=""})},1500))}}},i={};var p=d(v,u,h,!1,k,null,null,null);function k(s){for(let e in i)this[e]=i[e]}var m=function(){return p.exports}();export{m as default}; diff --git a/public/js/build/delete.842d393e.js b/public/js/build/delete.399f0038.js similarity index 99% rename from public/js/build/delete.842d393e.js rename to public/js/build/delete.399f0038.js index d8fbe3e6c..d17cf23ef 100644 --- a/public/js/build/delete.842d393e.js +++ b/public/js/build/delete.399f0038.js @@ -1 +1 @@ -import{m as a,n as o}from"./app.6c8b31b1.js";var n=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[t.configLoad>0?e("Loading"):e("Form",{ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(r){r.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5E10\u53F7"),prop:"email"}},[t.isRegVerify==1?e("Input",{class:t.count>0?"setting-send-input":"setting-input",attrs:{search:"","enter-button":t.$L(t.sendBtnText),placeholder:t.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1")},on:{"on-search":t.sendEmailCode},model:{value:t.formDatum.email,callback:function(r){t.$set(t.formDatum,"email",r)},expression:"formDatum.email"}}):e("Input",{staticClass:"setting-input",attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u5E10\u53F7")},model:{value:t.formDatum.email,callback:function(r){t.$set(t.formDatum,"email",r)},expression:"formDatum.email"}})],1),t.isRegVerify==1?e("FormItem",{attrs:{label:t.$L("\u90AE\u7BB1\u9A8C\u8BC1\u7801"),prop:"code"}},[e("Input",{attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u9A8C\u8BC1\u7801")},model:{value:t.formDatum.code,callback:function(r){t.$set(t.formDatum,"code",r)},expression:"formDatum.code"}})],1):e("FormItem",{attrs:{label:t.$L("\u767B\u5F55\u5BC6\u7801"),prop:"code"}},[e("Input",{attrs:{type:"password",placeholder:t.$L("\u8BF7\u8F93\u5165\u767B\u5F55\u5BC6\u7801")},model:{value:t.formDatum.password,callback:function(r){t.$set(t.formDatum,"password",r)},expression:"formDatum.password"}})],1),e("FormItem",{attrs:{label:t.$L("\u5220\u9664\u539F\u56E0")}},[e("Input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:t.$L("\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0")},model:{value:t.formDatum.reason,callback:function(r){t.$set(t.formDatum,"reason",r)},expression:"formDatum.reason"}})],1)],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(r){return t.submitForm("warning")}}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1),e("Modal",{staticClass:"page-setting-delete-box",attrs:{title:t.$L(`\u5220\u9664${t.appTitle}\u5E10\u53F7`)},model:{value:t.warningShow,callback:function(r){t.warningShow=r},expression:"warningShow"}},[e("div",{staticClass:"big-text"},[t._v(t._s(t.$L("\u5E10\u53F7\u5220\u9664\u540E\uFF0C\u8BE5\u5E10\u53F7\u5C06\u65E0\u6CD5\u6B63\u5E38\u767B\u5F55\u4E14\u65E0\u6CD5\u6062\u590D\uFF0C\u5E10\u53F7\u4E0B\u7684\u6240\u6709\u6570\u636E\u4E5F\u5C06\u88AB\u5220\u9664\u3002")))]),e("div",{staticClass:"small-text"},[e("div",[t._v(t._s(t.$L("\u5220\u9664\u524D\uFF0C\u8BF7\u786E\u8BA4\u4EE5\u4E0B\u4E8B\u9879\uFF1A")))]),e("div",[t._v(t._s(t.$L("1\u3001\u60A8\u5C06\u65E0\u6CD5\u67E5\u770B\u8BE5\u5E10\u53F7\u5185\u7684\u4EFB\u4F55\u4FE1\u606F\uFF0C\u5305\u62EC\u5E10\u53F7\u4FE1\u606F\u3001\u6587\u4EF6\u8BB0\u5F55\u3001\u804A\u5929\u8BB0\u5F55\u3001\u9879\u76EE\u4FE1\u606F\u3001\u56E2\u961F\u6210\u5458\u4FE1\u606F\u7B49\u3002")))]),e("div",[t._v(t._s(t.$L("2\u3001\u82E5\u4F60\u662F\u56E2\u961F\u7684\u6240\u6709\u8005\uFF0C\u8BF7\u5728\u5220\u9664\u60A8\u7684\u5E10\u53F7\u524D\u8F6C\u79FB\u6240\u6709\u6743\u3002\u4F8B\u5982\u8BE5\u5E10\u53F7\u6240\u521B\u5EFA\u7684\u9879\u76EE\uFF08\u53EF\u5C06\u9879\u76EE\u79FB\u4EA4\u4ED6\u4EBA\u6216\u5220\u9664\u9879\u76EE\uFF09\u4EE5\u53CA\u6587\u4EF6\u5939\u3002")))]),e("div",[t._v(t._s(t.$L("3\u3001\u60A8\u5C06\u9000\u51FA\u6240\u6709\u7FA4\u804A\uFF0C\u65E0\u6CD5\u67E5\u5230\u8FC7\u5F80\u6D88\u606F\u548C\u4EBA\u5458\u3002")))]),e("div",[t._v(t._s(t.$L("4\u3001\u8BF7\u4FDD\u8BC1\u5E10\u53F7\u672A\u88AB\u6682\u505C\u4F7F\u7528\u3002")))])]),e("div",{staticClass:"button-box",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:function(r){return t.submitForm("confirm")}}},[t._v(t._s(t.$L("\u5DF2\u6E05\u695A\u98CE\u9669\uFF0C\u786E\u5B9A\u5220\u9664"))+" ")])],1)])],1)},l=[];const m={data(){return{loadIng:0,configLoad:0,formDatum:{email:"",code:"",reason:"",password:""},ruleDatum:{email:[{validator:(t,s,e)=>{s.trim()===""?e(new Error(this.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u5E10\u53F7\uFF01"))):$A.isEmail(s.trim())?e():e(new Error(this.$L("\u8BF7\u8F93\u5165\u6B63\u786E\u90AE\u7BB1\u5E10\u53F7\uFF01")))},required:!0,trigger:"change"}],code:[{validator:(t,s,e)=>{s.trim()===""&&this.isRegVerify==1?e(new Error(this.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u9A8C\u8BC1\u7801"))):e()},required:!0,trigger:"change"}],password:[{validator:(t,s,e)=>{s.trim()===""&&this.isRegVerify!=1?e(new Error(this.$L("\u8BF7\u8F93\u5165\u767B\u5F55\u5BC6\u7801"))):e()},required:!0,trigger:"change"}]},count:0,isSendButtonShow:!0,codeShow:!1,isRegVerify:0,warningShow:!1,sendBtnText:this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801")}},mounted(){this.formDatum.email=this.userInfo.email,this.getRegVerify()},computed:{...a(["userInfo","formLabelPosition","formLabelWidth"]),appTitle(){return window.systemInfo.title||"DooTask"}},methods:{sendEmailCode(){this.count>0||this.$store.dispatch("call",{url:"users/email/send",data:{type:3,email:this.formDatum.email},spinner:!0}).then(t=>{this.isSendButtonShow=!1,this.count=120,this.sendBtnText=this.count+" \u79D2";let s=setInterval(()=>{this.count--,this.sendBtnText=this.count+" \u79D2",this.count<=0&&(this.sendBtnText=this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801"),clearInterval(s))},1e3)}).catch(({msg:t})=>{$A.messageError(t)})},submitForm(t){this.$refs.formDatum.validate(s=>{s&&(this.loadIng++,this.formDatum.type=t,this.$store.dispatch("call",{url:"users/delete/account",data:this.formDatum}).then(({data:e})=>{t==="warning"?this.warningShow=!0:($A.messageSuccess("\u5220\u9664\u6210\u529F"),this.warningShow=!1,this.$store.dispatch("saveUserInfo",e),this.isSendButtonShow=!0,this.$refs.formDatum.resetFields())}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()},getRegVerify(){this.configLoad++,this.$store.dispatch("call",{url:"system/setting/email"}).then(({data:t})=>{this.isRegVerify=t.reg_verify==="open"}).finally(t=>{this.configLoad--})}}},i={};var u=o(m,n,l,!1,d,null,null,null);function d(t){for(let s in i)this[s]=i[s]}var f=function(){return u.exports}();export{f as default}; +import{m as a,n as o}from"./app.6910ca56.js";var n=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[t.configLoad>0?e("Loading"):e("Form",{ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(r){r.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5E10\u53F7"),prop:"email"}},[t.isRegVerify==1?e("Input",{class:t.count>0?"setting-send-input":"setting-input",attrs:{search:"","enter-button":t.$L(t.sendBtnText),placeholder:t.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1")},on:{"on-search":t.sendEmailCode},model:{value:t.formDatum.email,callback:function(r){t.$set(t.formDatum,"email",r)},expression:"formDatum.email"}}):e("Input",{staticClass:"setting-input",attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u5E10\u53F7")},model:{value:t.formDatum.email,callback:function(r){t.$set(t.formDatum,"email",r)},expression:"formDatum.email"}})],1),t.isRegVerify==1?e("FormItem",{attrs:{label:t.$L("\u90AE\u7BB1\u9A8C\u8BC1\u7801"),prop:"code"}},[e("Input",{attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u9A8C\u8BC1\u7801")},model:{value:t.formDatum.code,callback:function(r){t.$set(t.formDatum,"code",r)},expression:"formDatum.code"}})],1):e("FormItem",{attrs:{label:t.$L("\u767B\u5F55\u5BC6\u7801"),prop:"code"}},[e("Input",{attrs:{type:"password",placeholder:t.$L("\u8BF7\u8F93\u5165\u767B\u5F55\u5BC6\u7801")},model:{value:t.formDatum.password,callback:function(r){t.$set(t.formDatum,"password",r)},expression:"formDatum.password"}})],1),e("FormItem",{attrs:{label:t.$L("\u5220\u9664\u539F\u56E0")}},[e("Input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:t.$L("\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0")},model:{value:t.formDatum.reason,callback:function(r){t.$set(t.formDatum,"reason",r)},expression:"formDatum.reason"}})],1)],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(r){return t.submitForm("warning")}}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1),e("Modal",{staticClass:"page-setting-delete-box",attrs:{title:t.$L(`\u5220\u9664${t.appTitle}\u5E10\u53F7`)},model:{value:t.warningShow,callback:function(r){t.warningShow=r},expression:"warningShow"}},[e("div",{staticClass:"big-text"},[t._v(t._s(t.$L("\u5E10\u53F7\u5220\u9664\u540E\uFF0C\u8BE5\u5E10\u53F7\u5C06\u65E0\u6CD5\u6B63\u5E38\u767B\u5F55\u4E14\u65E0\u6CD5\u6062\u590D\uFF0C\u5E10\u53F7\u4E0B\u7684\u6240\u6709\u6570\u636E\u4E5F\u5C06\u88AB\u5220\u9664\u3002")))]),e("div",{staticClass:"small-text"},[e("div",[t._v(t._s(t.$L("\u5220\u9664\u524D\uFF0C\u8BF7\u786E\u8BA4\u4EE5\u4E0B\u4E8B\u9879\uFF1A")))]),e("div",[t._v(t._s(t.$L("1\u3001\u60A8\u5C06\u65E0\u6CD5\u67E5\u770B\u8BE5\u5E10\u53F7\u5185\u7684\u4EFB\u4F55\u4FE1\u606F\uFF0C\u5305\u62EC\u5E10\u53F7\u4FE1\u606F\u3001\u6587\u4EF6\u8BB0\u5F55\u3001\u804A\u5929\u8BB0\u5F55\u3001\u9879\u76EE\u4FE1\u606F\u3001\u56E2\u961F\u6210\u5458\u4FE1\u606F\u7B49\u3002")))]),e("div",[t._v(t._s(t.$L("2\u3001\u82E5\u4F60\u662F\u56E2\u961F\u7684\u6240\u6709\u8005\uFF0C\u8BF7\u5728\u5220\u9664\u60A8\u7684\u5E10\u53F7\u524D\u8F6C\u79FB\u6240\u6709\u6743\u3002\u4F8B\u5982\u8BE5\u5E10\u53F7\u6240\u521B\u5EFA\u7684\u9879\u76EE\uFF08\u53EF\u5C06\u9879\u76EE\u79FB\u4EA4\u4ED6\u4EBA\u6216\u5220\u9664\u9879\u76EE\uFF09\u4EE5\u53CA\u6587\u4EF6\u5939\u3002")))]),e("div",[t._v(t._s(t.$L("3\u3001\u60A8\u5C06\u9000\u51FA\u6240\u6709\u7FA4\u804A\uFF0C\u65E0\u6CD5\u67E5\u5230\u8FC7\u5F80\u6D88\u606F\u548C\u4EBA\u5458\u3002")))]),e("div",[t._v(t._s(t.$L("4\u3001\u8BF7\u4FDD\u8BC1\u5E10\u53F7\u672A\u88AB\u6682\u505C\u4F7F\u7528\u3002")))])]),e("div",{staticClass:"button-box",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:function(r){return t.submitForm("confirm")}}},[t._v(t._s(t.$L("\u5DF2\u6E05\u695A\u98CE\u9669\uFF0C\u786E\u5B9A\u5220\u9664"))+" ")])],1)])],1)},l=[];const m={data(){return{loadIng:0,configLoad:0,formDatum:{email:"",code:"",reason:"",password:""},ruleDatum:{email:[{validator:(t,s,e)=>{s.trim()===""?e(new Error(this.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u5E10\u53F7\uFF01"))):$A.isEmail(s.trim())?e():e(new Error(this.$L("\u8BF7\u8F93\u5165\u6B63\u786E\u90AE\u7BB1\u5E10\u53F7\uFF01")))},required:!0,trigger:"change"}],code:[{validator:(t,s,e)=>{s.trim()===""&&this.isRegVerify==1?e(new Error(this.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u9A8C\u8BC1\u7801"))):e()},required:!0,trigger:"change"}],password:[{validator:(t,s,e)=>{s.trim()===""&&this.isRegVerify!=1?e(new Error(this.$L("\u8BF7\u8F93\u5165\u767B\u5F55\u5BC6\u7801"))):e()},required:!0,trigger:"change"}]},count:0,isSendButtonShow:!0,codeShow:!1,isRegVerify:0,warningShow:!1,sendBtnText:this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801")}},mounted(){this.formDatum.email=this.userInfo.email,this.getRegVerify()},computed:{...a(["userInfo","formLabelPosition","formLabelWidth"]),appTitle(){return window.systemInfo.title||"DooTask"}},methods:{sendEmailCode(){this.count>0||this.$store.dispatch("call",{url:"users/email/send",data:{type:3,email:this.formDatum.email},spinner:!0}).then(t=>{this.isSendButtonShow=!1,this.count=120,this.sendBtnText=this.count+" \u79D2";let s=setInterval(()=>{this.count--,this.sendBtnText=this.count+" \u79D2",this.count<=0&&(this.sendBtnText=this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801"),clearInterval(s))},1e3)}).catch(({msg:t})=>{$A.messageError(t)})},submitForm(t){this.$refs.formDatum.validate(s=>{s&&(this.loadIng++,this.formDatum.type=t,this.$store.dispatch("call",{url:"users/delete/account",data:this.formDatum}).then(({data:e})=>{t==="warning"?this.warningShow=!0:($A.messageSuccess("\u5220\u9664\u6210\u529F"),this.warningShow=!1,this.$store.dispatch("saveUserInfo",e),this.isSendButtonShow=!0,this.$refs.formDatum.resetFields())}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()},getRegVerify(){this.configLoad++,this.$store.dispatch("call",{url:"system/setting/email"}).then(({data:t})=>{this.isRegVerify=t.reg_verify==="open"}).finally(t=>{this.configLoad--})}}},i={};var u=o(m,n,l,!1,d,null,null,null);function d(t){for(let s in i)this[s]=i[s]}var f=function(){return u.exports}();export{f as default}; diff --git a/public/js/build/details.6749696e.js b/public/js/build/details.97854344.js similarity index 99% rename from public/js/build/details.6749696e.js rename to public/js/build/details.97854344.js index 08fdea7c7..d7a1abda2 100644 --- a/public/js/build/details.6749696e.js +++ b/public/js/build/details.97854344.js @@ -1 +1 @@ -import{n as S,I as B}from"./app.6c8b31b1.js";import{I as O}from"./ImgUpload.0e64a5a8.js";var z=function(){var a,i,o,n,r,l,p,m,u,h,$,f,g,y,L,t=this,b=t.$createElement,e=t._self._c||b;return e("div",{staticClass:"approve-details",style:{"z-index":t.modalTransferIndex}},[e("div",{staticClass:"approve-details-nav"},[e("div",{staticClass:"common-nav-back",on:{click:function(s){return t.goBack()}}},[e("i",{staticClass:"taskfont"},[t._v("\uE676")])]),e("h2",[t._v(t._s(t.$L("\u5BA1\u6279\u8BE6\u60C5")))])]),e("div",{ref:"approveDetailsBox",staticClass:"approve-details-box"},[e("h2",{staticClass:"approve-details-title"},[e("span",[t._v(t._s(t.$L(t.datas.proc_def_name||"- -")))]),t.datas.state==0?e("Tag",{attrs:{color:"cyan"}},[t._v(t._s(t.$L("\u5F85\u5BA1\u6279")))]):t._e(),t.datas.state==1?e("Tag",{attrs:{color:"cyan"}},[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D")))]):t._e(),t.datas.state==2?e("Tag",{attrs:{color:"green"}},[t._v(t._s(t.$L("\u5DF2\u901A\u8FC7")))]):t._e(),t.datas.state==3?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u5DF2\u62D2\u7EDD")))]):t._e(),t.datas.state==4?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u5DF2\u64A4\u56DE")))]):t._e()],1),e("h3",{staticClass:"approve-details-subtitle"},[e("Avatar",{attrs:{src:t.datas.userimg,size:"24"}}),e("span",[t._v(t._s(t.datas.start_user_name))])],1),e("h3",{staticClass:"approve-details-subtitle"},[e("span",[t._v(t._s(t.$L("\u63D0\u4EA4\u4E8E"))+" "+t._s(t.datas.start_time))])]),e("Divider"),(t.datas.proc_def_name||"").indexOf("\u8BF7\u5047")!==-1&&(a=t.datas.var)!==null&&a!==void 0&&a.type?e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u5047\u671F\u7C7B\u578B")))]),e("p",[t._v(t._s(t.$L(((i=t.datas.var)===null||i===void 0?void 0:i.type)||"- -")))])]):t._e(),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u5F00\u59CB\u65F6\u95F4")))]),e("div",{staticClass:"time-text"},[e("span",[t._v(t._s(((o=t.datas.var)===null||o===void 0?void 0:o.start_time)||"- -"))]),(n=t.datas.var)!==null&&n!==void 0&&n.start_time?e("span",[t._v("("+t._s(t.getWeekday((r=t.datas.var)===null||r===void 0?void 0:r.start_time))+")")]):t._e()])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4")))]),e("div",{staticClass:"time-text"},[e("span",[t._v(t._s(((l=t.datas.var)===null||l===void 0?void 0:l.end_time)||"- -"))]),(p=t.datas.var)!==null&&p!==void 0&&p.end_time?e("span",[t._v("("+t._s(t.getWeekday((m=t.datas.var)===null||m===void 0?void 0:m.end_time))+")")]):t._e()])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u65F6\u957F"))+"\uFF08"+t._s(t.getTimeDifference((u=t.datas.var)===null||u===void 0?void 0:u.start_time,(h=t.datas.var)===null||h===void 0?void 0:h.end_time).unit)+"\uFF09")]),e("p",[t._v(t._s(($=t.datas.var)!==null&&$!==void 0&&$.start_time?t.getTimeDifference((f=t.datas.var)===null||f===void 0?void 0:f.start_time,(g=t.datas.var)===null||g===void 0?void 0:g.end_time).time:"- -"))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u4E8B\u7531")))]),e("p",[t._v(t._s(((y=t.datas.var)===null||y===void 0?void 0:y.description)||"- -"))])]),(L=t.datas.var)!==null&&L!==void 0&&L.other?e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u56FE\u7247")))]),e("div",{staticClass:"img-body"},t._l(t.datas.var.other.split(","),function(s,d){return e("div",{on:{click:function(c){return t.onViewPicture(s)}}},[e("ImgView",{key:d,staticClass:"img-view",attrs:{src:s}})],1)}),0)]):t._e(),e("Divider"),e("h3",{staticClass:"approve-details-subtitle"},[t._v(t._s(t.$L("\u5BA1\u6279\u8BB0\u5F55")))]),e("Timeline",{staticClass:"approve-record-timeline"},[t._l(t.datas.node_infos,function(s,d){var c,v,_,C,k,w,I,T,x;return[s.type=="starter"?e("TimelineItem",{key:d,attrs:{color:"green"}},[e("p",{staticClass:"timeline-title"},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("div",{staticClass:"timeline-body"},[e("Avatar",{attrs:{src:t.data.userimg||t.datas.userimg,size:"38"}}),e("div",{staticClass:"approve-process-left"},[e("p",{staticClass:"approve-process-name"},[t._v(t._s(t.data.start_user_name||t.datas.start_user_name))]),e("p",{staticClass:"approve-process-state"},[t._v(t._s(t.$L("\u5DF2\u63D0\u4EA4")))])]),e("div",{staticClass:"approve-process-right"},[parseInt(t.getTimeAgo(s.claim_time))1?"#f03f3f":"green":"#ccc"}},[e("p",{staticClass:"timeline-title"},[t._v(t._s(t.$L("\u5BA1\u6279")))]),e("div",{staticClass:"timeline-body"},[e("Avatar",{attrs:{src:s.node_user_list&&((_=s.node_user_list[0])===null||_===void 0?void 0:_.userimg)||s.userimg,size:"38"}}),e("div",{staticClass:"approve-process-left"},[e("p",{staticClass:"approve-process-name"},[t._v(t._s(s.approver))]),s.identitylink?t._e():e("p",{staticClass:"approve-process-state",staticStyle:{color:"#6d6d6d"}},[t._v("\u5F85\u5BA1\u6279")]),s.identitylink?e("p",{staticClass:"approve-process-state"},[s.identitylink.state==0?e("span",{staticStyle:{color:"#496dff"}},[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D")))]):t._e(),s.identitylink.state==1?e("span",[t._v(t._s(t.$L("\u5DF2\u901A\u8FC7")))]):t._e(),s.identitylink.state==2?e("span",{staticStyle:{color:"#f03f3f"}},[t._v(t._s(t.$L("\u5DF2\u62D2\u7EDD")))]):t._e(),s.identitylink.state==3?e("span",{staticStyle:{color:"#f03f3f"}},[t._v(t._s(t.$L("\u5DF2\u64A4\u56DE")))]):t._e()]):t._e()]),e("div",{staticClass:"approve-process-right"},[parseInt(t.getTimeAgo(s.claim_time))0,ghost:""},on:{click:t.comment}},[t._v("+"+t._s(t.$L("\u6DFB\u52A0\u8BC4\u8BBA")))])],1),t.loadIng>0?e("div",{staticClass:"approve-load"},[e("Loading")],1):t._e(),e("Modal",{staticClass:"page-approve-initiate",attrs:{title:t.$L("\u8BC4\u8BBA"),"mask-closable":!1},model:{value:t.commentShow,callback:function(s){t.commentShow=s},expression:"commentShow"}},[e("Form",{ref:"initiateRef",attrs:{model:t.commentData,rules:t.commentRule,"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{prop:"content",label:t.$L("\u5185\u5BB9")}},[e("Input",{attrs:{type:"textarea"},model:{value:t.commentData.content,callback:function(s){t.$set(t.commentData,"content",s)},expression:"commentData.content"}})],1),e("FormItem",{attrs:{prop:"pictures",label:t.$L("\u56FE\u7247")}},[e("ImgUpload",{attrs:{num:3,width:2e3,height:2e3,whcut:0},model:{value:t.commentData.pictures,callback:function(s){t.$set(t.commentData,"pictures",s)},expression:"commentData.pictures"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.commentShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.commentLoad>0},on:{click:t.confirmComment}},[t._v(t._s(t.$L("\u786E\u8BA4")))])],1)],1)],1)},M=[];const P={name:"ApproveDetails",components:{ImgView:B,ImgUpload:O},props:{data:{type:Object,default(){return{}}}},data(){return{datas:{},loadIng:0,showTimeNum:24,modalTransferIndex:window.modalTransferIndex,commentLoad:0,commentShow:!1,commentData:{content:"",pictures:[]},commentRule:{content:{type:"string",required:!0,message:this.$L("\u8BF7\u8F93\u5165\u5185\u5BB9\uFF01"),trigger:"change"}}}},watch:{$route(a,i){a.name=="manage-approve-details"&&this.init()},data:{handler(a,i){a.id&&this.getInfo()},deep:!0}},computed:{isShowAgreeBtn(){return(this.datas.candidate||"").split(",").indexOf(this.userId+"")!=-1&&!this.datas.is_finished},isShowWarningBtn(){var i;let a=this.userId==this.datas.start_user_id&&((i=this.datas)==null?void 0:i.is_finished)!=!0;return(this.datas.node_infos||[]).map(o=>{var n;o.type!="starter"&&o.is_finished==!0&&((n=o.identitylink)==null?void 0:n.userid)!=this.userId&&(a=!1)}),a}},mounted(){this.init()},methods:{init(){this.modalTransferIndex=window.modalTransferIndex=window.modalTransferIndex+1,this.$route.query.id&&this.getInfo()},getTimeAgo(a,i){const n=(new Date-new Date((a+"").replace(/-/g,"/")))/1e3;if(n<60)return i==2?"0"+this.$L("\u5206\u949F"):this.$L("\u521A\u521A");if(n<3600){const r=Math.floor(n/60);return i==2?`${r}${this.$L("\u5206\u949F")}`:`${r} ${this.$L("\u5206\u949F\u524D")}`}else if(n<3600*24){const r=Math.floor(n/3600);return i==2?`${r}${this.$L("\u5C0F\u65F6")}`:`${r} ${this.$L("\u5C0F\u65F6\u524D")}`}else if(n<3600*24*30){const r=Math.floor(n/3600/24);return i==2?`${r+1}${this.$L("\u5929")}`:`${r+1} ${this.$L("\u5929\u524D")}`}else{const r=Math.floor(n/3600/720);return i==2?`${r+1}${this.$L("\u6708")}`:`${r+1} ${this.$L("\u6708\u524D")}`}},getWeekday(a){return["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"][new Date(a).getDay()]},getTimeDifference(a,i){const o=new Date((i+"").replace(/-/g,"/")),n=new Date((a+"").replace(/-/g,"/")),r=(o-n)/1e3;return r<60?{time:r,unit:this.$L("\u79D2")}:r<3600?{time:Math.floor(r/60),unit:this.$L("\u5206\u949F")}:r<3600*24?{time:(o-n)/36e5,unit:this.$L("\u5C0F\u65F6")}:{time:Math.floor(r/3600/24)+1,unit:this.$L("\u5929")}},getInfo(a=!1){this.loadIng++,this.$store.dispatch("call",{method:"get",url:"approve/process/detail",data:{id:this.$route.query.id||this.data.id}}).then(({data:i})=>{var o=!0;i.node_infos=i.node_infos.map(n=>{var r,l;return n._show=o,(((r=n.identitylink)==null?void 0:r.state)==2||((l=n.identitylink)==null?void 0:l.state)==3)&&(o=!1),n}),this.datas=i,a&&this.scrollToBottom()}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng--})},approve(a){$A.modalInput({title:"\u5BA1\u6279",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u610F\u89C1",type:"textarea",okText:a==1?"\u540C\u610F":"\u62D2\u7EDD",okType:a==1?"primary":"error",onOk:i=>a!=1&&!i?"\u8BF7\u8F93\u5165\u5BA1\u6279\u610F\u89C1":new Promise((o,n)=>{this.$store.dispatch("call",{url:"approve/task/complete",data:{task_id:this.datas.task_id,pass:a==1,comment:i}}).then(({msg:r})=>{$A.messageSuccess(r),this.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo():this.$emit("approve"),o()}).catch(({msg:r})=>{n(r)})})})},revocation(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u64A4\u9500\u5417\uFF1F",loading:!0,okType:"warning",onOk:()=>new Promise((a,i)=>{this.$store.dispatch("call",{url:"approve/task/withdraw",data:{task_id:this.datas.task_id,proc_inst_id:this.datas.id}}).then(({msg:o})=>{$A.messageSuccess(o),a(),this.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo():this.$emit("revocation")}).catch(({msg:o})=>{i(o)})})})},comment(){this.commentData.content="",this.commentData.pictures=[],this.commentShow=!0},confirmComment(){this.commentLoad++,this.$store.dispatch("call",{method:"post",url:"approve/process/addGlobalComment",data:{proc_inst_id:this.$route.query.id||this.data.id,content:JSON.stringify({content:this.commentData.content,pictures:this.commentData.pictures.map(a=>a.path)})}}).then(({msg:a})=>{$A.messageSuccess("\u6DFB\u52A0\u6210\u529F"),this.getInfo(!0),this.commentShow=!1}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.commentLoad--})},scrollToBottom(){this.$nextTick(()=>{const a=this.$refs.approveDetailsBox;a.scrollTo({top:a.scrollHeight+1e3,behavior:"smooth"})})},getContent(a){try{return JSON.parse(a).content||""}catch{return""}},getPictures(a){try{return JSON.parse(a).pictures||[]}catch{return""}},onViewPicture(a){this.$store.dispatch("previewImage",$A.apiUrl("../"+a))}}},D={};var V=S(P,z,M,!1,N,null,null,null);function N(a){for(let i in D)this[i]=D[i]}var q=function(){return V.exports}();export{q as default}; +import{n as S,I as B}from"./app.6910ca56.js";import{I as O}from"./ImgUpload.8863e78d.js";var z=function(){var a,i,o,n,r,l,p,m,u,h,$,f,g,y,L,t=this,b=t.$createElement,e=t._self._c||b;return e("div",{staticClass:"approve-details",style:{"z-index":t.modalTransferIndex}},[e("div",{staticClass:"approve-details-nav"},[e("div",{staticClass:"common-nav-back",on:{click:function(s){return t.goBack()}}},[e("i",{staticClass:"taskfont"},[t._v("\uE676")])]),e("h2",[t._v(t._s(t.$L("\u5BA1\u6279\u8BE6\u60C5")))])]),e("div",{ref:"approveDetailsBox",staticClass:"approve-details-box"},[e("h2",{staticClass:"approve-details-title"},[e("span",[t._v(t._s(t.$L(t.datas.proc_def_name||"- -")))]),t.datas.state==0?e("Tag",{attrs:{color:"cyan"}},[t._v(t._s(t.$L("\u5F85\u5BA1\u6279")))]):t._e(),t.datas.state==1?e("Tag",{attrs:{color:"cyan"}},[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D")))]):t._e(),t.datas.state==2?e("Tag",{attrs:{color:"green"}},[t._v(t._s(t.$L("\u5DF2\u901A\u8FC7")))]):t._e(),t.datas.state==3?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u5DF2\u62D2\u7EDD")))]):t._e(),t.datas.state==4?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u5DF2\u64A4\u56DE")))]):t._e()],1),e("h3",{staticClass:"approve-details-subtitle"},[e("Avatar",{attrs:{src:t.datas.userimg,size:"24"}}),e("span",[t._v(t._s(t.datas.start_user_name))])],1),e("h3",{staticClass:"approve-details-subtitle"},[e("span",[t._v(t._s(t.$L("\u63D0\u4EA4\u4E8E"))+" "+t._s(t.datas.start_time))])]),e("Divider"),(t.datas.proc_def_name||"").indexOf("\u8BF7\u5047")!==-1&&(a=t.datas.var)!==null&&a!==void 0&&a.type?e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u5047\u671F\u7C7B\u578B")))]),e("p",[t._v(t._s(t.$L(((i=t.datas.var)===null||i===void 0?void 0:i.type)||"- -")))])]):t._e(),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u5F00\u59CB\u65F6\u95F4")))]),e("div",{staticClass:"time-text"},[e("span",[t._v(t._s(((o=t.datas.var)===null||o===void 0?void 0:o.start_time)||"- -"))]),(n=t.datas.var)!==null&&n!==void 0&&n.start_time?e("span",[t._v("("+t._s(t.getWeekday((r=t.datas.var)===null||r===void 0?void 0:r.start_time))+")")]):t._e()])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4")))]),e("div",{staticClass:"time-text"},[e("span",[t._v(t._s(((l=t.datas.var)===null||l===void 0?void 0:l.end_time)||"- -"))]),(p=t.datas.var)!==null&&p!==void 0&&p.end_time?e("span",[t._v("("+t._s(t.getWeekday((m=t.datas.var)===null||m===void 0?void 0:m.end_time))+")")]):t._e()])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u65F6\u957F"))+"\uFF08"+t._s(t.getTimeDifference((u=t.datas.var)===null||u===void 0?void 0:u.start_time,(h=t.datas.var)===null||h===void 0?void 0:h.end_time).unit)+"\uFF09")]),e("p",[t._v(t._s(($=t.datas.var)!==null&&$!==void 0&&$.start_time?t.getTimeDifference((f=t.datas.var)===null||f===void 0?void 0:f.start_time,(g=t.datas.var)===null||g===void 0?void 0:g.end_time).time:"- -"))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u4E8B\u7531")))]),e("p",[t._v(t._s(((y=t.datas.var)===null||y===void 0?void 0:y.description)||"- -"))])]),(L=t.datas.var)!==null&&L!==void 0&&L.other?e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u56FE\u7247")))]),e("div",{staticClass:"img-body"},t._l(t.datas.var.other.split(","),function(s,d){return e("div",{on:{click:function(c){return t.onViewPicture(s)}}},[e("ImgView",{key:d,staticClass:"img-view",attrs:{src:s}})],1)}),0)]):t._e(),e("Divider"),e("h3",{staticClass:"approve-details-subtitle"},[t._v(t._s(t.$L("\u5BA1\u6279\u8BB0\u5F55")))]),e("Timeline",{staticClass:"approve-record-timeline"},[t._l(t.datas.node_infos,function(s,d){var c,v,_,C,k,w,I,T,x;return[s.type=="starter"?e("TimelineItem",{key:d,attrs:{color:"green"}},[e("p",{staticClass:"timeline-title"},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("div",{staticClass:"timeline-body"},[e("Avatar",{attrs:{src:t.data.userimg||t.datas.userimg,size:"38"}}),e("div",{staticClass:"approve-process-left"},[e("p",{staticClass:"approve-process-name"},[t._v(t._s(t.data.start_user_name||t.datas.start_user_name))]),e("p",{staticClass:"approve-process-state"},[t._v(t._s(t.$L("\u5DF2\u63D0\u4EA4")))])]),e("div",{staticClass:"approve-process-right"},[parseInt(t.getTimeAgo(s.claim_time))1?"#f03f3f":"green":"#ccc"}},[e("p",{staticClass:"timeline-title"},[t._v(t._s(t.$L("\u5BA1\u6279")))]),e("div",{staticClass:"timeline-body"},[e("Avatar",{attrs:{src:s.node_user_list&&((_=s.node_user_list[0])===null||_===void 0?void 0:_.userimg)||s.userimg,size:"38"}}),e("div",{staticClass:"approve-process-left"},[e("p",{staticClass:"approve-process-name"},[t._v(t._s(s.approver))]),s.identitylink?t._e():e("p",{staticClass:"approve-process-state",staticStyle:{color:"#6d6d6d"}},[t._v("\u5F85\u5BA1\u6279")]),s.identitylink?e("p",{staticClass:"approve-process-state"},[s.identitylink.state==0?e("span",{staticStyle:{color:"#496dff"}},[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D")))]):t._e(),s.identitylink.state==1?e("span",[t._v(t._s(t.$L("\u5DF2\u901A\u8FC7")))]):t._e(),s.identitylink.state==2?e("span",{staticStyle:{color:"#f03f3f"}},[t._v(t._s(t.$L("\u5DF2\u62D2\u7EDD")))]):t._e(),s.identitylink.state==3?e("span",{staticStyle:{color:"#f03f3f"}},[t._v(t._s(t.$L("\u5DF2\u64A4\u56DE")))]):t._e()]):t._e()]),e("div",{staticClass:"approve-process-right"},[parseInt(t.getTimeAgo(s.claim_time))0,ghost:""},on:{click:t.comment}},[t._v("+"+t._s(t.$L("\u6DFB\u52A0\u8BC4\u8BBA")))])],1),t.loadIng>0?e("div",{staticClass:"approve-load"},[e("Loading")],1):t._e(),e("Modal",{staticClass:"page-approve-initiate",attrs:{title:t.$L("\u8BC4\u8BBA"),"mask-closable":!1},model:{value:t.commentShow,callback:function(s){t.commentShow=s},expression:"commentShow"}},[e("Form",{ref:"initiateRef",attrs:{model:t.commentData,rules:t.commentRule,"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{prop:"content",label:t.$L("\u5185\u5BB9")}},[e("Input",{attrs:{type:"textarea"},model:{value:t.commentData.content,callback:function(s){t.$set(t.commentData,"content",s)},expression:"commentData.content"}})],1),e("FormItem",{attrs:{prop:"pictures",label:t.$L("\u56FE\u7247")}},[e("ImgUpload",{attrs:{num:3,width:2e3,height:2e3,whcut:0},model:{value:t.commentData.pictures,callback:function(s){t.$set(t.commentData,"pictures",s)},expression:"commentData.pictures"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.commentShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.commentLoad>0},on:{click:t.confirmComment}},[t._v(t._s(t.$L("\u786E\u8BA4")))])],1)],1)],1)},M=[];const P={name:"ApproveDetails",components:{ImgView:B,ImgUpload:O},props:{data:{type:Object,default(){return{}}}},data(){return{datas:{},loadIng:0,showTimeNum:24,modalTransferIndex:window.modalTransferIndex,commentLoad:0,commentShow:!1,commentData:{content:"",pictures:[]},commentRule:{content:{type:"string",required:!0,message:this.$L("\u8BF7\u8F93\u5165\u5185\u5BB9\uFF01"),trigger:"change"}}}},watch:{$route(a,i){a.name=="manage-approve-details"&&this.init()},data:{handler(a,i){a.id&&this.getInfo()},deep:!0}},computed:{isShowAgreeBtn(){return(this.datas.candidate||"").split(",").indexOf(this.userId+"")!=-1&&!this.datas.is_finished},isShowWarningBtn(){var i;let a=this.userId==this.datas.start_user_id&&((i=this.datas)==null?void 0:i.is_finished)!=!0;return(this.datas.node_infos||[]).map(o=>{var n;o.type!="starter"&&o.is_finished==!0&&((n=o.identitylink)==null?void 0:n.userid)!=this.userId&&(a=!1)}),a}},mounted(){this.init()},methods:{init(){this.modalTransferIndex=window.modalTransferIndex=window.modalTransferIndex+1,this.$route.query.id&&this.getInfo()},getTimeAgo(a,i){const n=(new Date-new Date((a+"").replace(/-/g,"/")))/1e3;if(n<60)return i==2?"0"+this.$L("\u5206\u949F"):this.$L("\u521A\u521A");if(n<3600){const r=Math.floor(n/60);return i==2?`${r}${this.$L("\u5206\u949F")}`:`${r} ${this.$L("\u5206\u949F\u524D")}`}else if(n<3600*24){const r=Math.floor(n/3600);return i==2?`${r}${this.$L("\u5C0F\u65F6")}`:`${r} ${this.$L("\u5C0F\u65F6\u524D")}`}else if(n<3600*24*30){const r=Math.floor(n/3600/24);return i==2?`${r+1}${this.$L("\u5929")}`:`${r+1} ${this.$L("\u5929\u524D")}`}else{const r=Math.floor(n/3600/720);return i==2?`${r+1}${this.$L("\u6708")}`:`${r+1} ${this.$L("\u6708\u524D")}`}},getWeekday(a){return["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"][new Date(a).getDay()]},getTimeDifference(a,i){const o=new Date((i+"").replace(/-/g,"/")),n=new Date((a+"").replace(/-/g,"/")),r=(o-n)/1e3;return r<60?{time:r,unit:this.$L("\u79D2")}:r<3600?{time:Math.floor(r/60),unit:this.$L("\u5206\u949F")}:r<3600*24?{time:(o-n)/36e5,unit:this.$L("\u5C0F\u65F6")}:{time:Math.floor(r/3600/24)+1,unit:this.$L("\u5929")}},getInfo(a=!1){this.loadIng++,this.$store.dispatch("call",{method:"get",url:"approve/process/detail",data:{id:this.$route.query.id||this.data.id}}).then(({data:i})=>{var o=!0;i.node_infos=i.node_infos.map(n=>{var r,l;return n._show=o,(((r=n.identitylink)==null?void 0:r.state)==2||((l=n.identitylink)==null?void 0:l.state)==3)&&(o=!1),n}),this.datas=i,a&&this.scrollToBottom()}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng--})},approve(a){$A.modalInput({title:"\u5BA1\u6279",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u610F\u89C1",type:"textarea",okText:a==1?"\u540C\u610F":"\u62D2\u7EDD",okType:a==1?"primary":"error",onOk:i=>a!=1&&!i?"\u8BF7\u8F93\u5165\u5BA1\u6279\u610F\u89C1":new Promise((o,n)=>{this.$store.dispatch("call",{url:"approve/task/complete",data:{task_id:this.datas.task_id,pass:a==1,comment:i}}).then(({msg:r})=>{$A.messageSuccess(r),this.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo():this.$emit("approve"),o()}).catch(({msg:r})=>{n(r)})})})},revocation(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u64A4\u9500\u5417\uFF1F",loading:!0,okType:"warning",onOk:()=>new Promise((a,i)=>{this.$store.dispatch("call",{url:"approve/task/withdraw",data:{task_id:this.datas.task_id,proc_inst_id:this.datas.id}}).then(({msg:o})=>{$A.messageSuccess(o),a(),this.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo():this.$emit("revocation")}).catch(({msg:o})=>{i(o)})})})},comment(){this.commentData.content="",this.commentData.pictures=[],this.commentShow=!0},confirmComment(){this.commentLoad++,this.$store.dispatch("call",{method:"post",url:"approve/process/addGlobalComment",data:{proc_inst_id:this.$route.query.id||this.data.id,content:JSON.stringify({content:this.commentData.content,pictures:this.commentData.pictures.map(a=>a.path)})}}).then(({msg:a})=>{$A.messageSuccess("\u6DFB\u52A0\u6210\u529F"),this.getInfo(!0),this.commentShow=!1}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.commentLoad--})},scrollToBottom(){this.$nextTick(()=>{const a=this.$refs.approveDetailsBox;a.scrollTo({top:a.scrollHeight+1e3,behavior:"smooth"})})},getContent(a){try{return JSON.parse(a).content||""}catch{return""}},getPictures(a){try{return JSON.parse(a).pictures||[]}catch{return""}},onViewPicture(a){this.$store.dispatch("previewImage",$A.apiUrl("../"+a))}}},D={};var V=S(P,z,M,!1,N,null,null,null);function N(a){for(let i in D)this[i]=D[i]}var q=function(){return V.exports}();export{q as default}; diff --git a/public/js/build/elliptic.min.cb2c4d59.js b/public/js/build/elliptic.min.b3d8d4c2.js similarity index 99% rename from public/js/build/elliptic.min.cb2c4d59.js rename to public/js/build/elliptic.min.b3d8d4c2.js index f44fef618..041156250 100644 --- a/public/js/build/elliptic.min.cb2c4d59.js +++ b/public/js/build/elliptic.min.b3d8d4c2.js @@ -1 +1 @@ -import{L as Y,M as ae,v as J,Y as j,w as we,y as Me,x as xe,z as Be,A as Ce,Q as _e,R as De}from"./app.6c8b31b1.js";import u from"./bn.min.2dc6411e.js";/*! OpenPGP.js v5.7.0-1 - 2023-06-10 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */var be,F=Y(function(e,f){var d=f;function t(c){return c.length===1?"0"+c:c}function a(c){for(var r="",b=0;b>8,s=255&n;o?b.push(o,s):b.push(s)}return b},d.zero2=t,d.toHex=a,d.encode=function(c,r){return r==="hex"?a(c):c}}),v=Y(function(e,f){var d=f;d.assert=ae,d.toArray=F.toArray,d.zero2=F.zero2,d.toHex=F.toHex,d.encode=F.encode,d.getNAF=function(t,a){for(var c=[],r=1<=0;){var i;if(b.isOdd()){var n=b.andln(r-1);i=n>(r>>1)-1?(r>>1)-n:n,b.isubn(i)}else i=0;c.push(i);for(var o=b.cmpn(0)!==0&&b.andln(r-1)===0?a+1:1,s=1;s0||a.cmpn(-b)>0;){var i,n,o,s=t.andln(3)+r&3,h=a.andln(3)+b&3;s===3&&(s=-1),h===3&&(h=-1),(1&s)==0?i=0:i=(o=t.andln(7)+r&7)!==3&&o!==5||h!==2?s:-s,c[0].push(i),(1&h)==0?n=0:n=(o=a.andln(7)+b&7)!==3&&o!==5||s!==2?h:-h,c[1].push(n),2*r===i+1&&(r=1-r),2*b===n+1&&(b=1-b),t.iushrn(1),a.iushrn(1)}return c},d.cachedProperty=function(t,a,c){var r="_"+a;t.prototype[a]=function(){return this[r]!==void 0?this[r]:this[r]=c.call(this)}},d.parseBytes=function(t){return typeof t=="string"?d.toArray(t,"hex"):t},d.intFromLE=function(t){return new u(t,"hex","le")}}),ce=function(e){return be||(be=new k(null)),be.generate(e)};function k(e){this.rand=e}var Fe=k;if(k.prototype.generate=function(e){return this._rand(e)},k.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var f=new Uint8Array(e),d=0;d0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var x=N;function _(e,f){this.curve=e,this.type=f,this.precomputed=null}N.prototype.point=function(){throw Error("Not implemented")},N.prototype.validate=function(){throw Error("Not implemented")},N.prototype._fixedNafMul=function(e,f){$(e.precomputed);var d=e._getDoubles(),t=Z(f,1),a=(1<=r;f--)b=(b<<1)+t[f];c.push(b)}for(var i=this.jpoint(null,null,null),n=this.jpoint(null,null,null),o=a;o>0;o--){for(r=0;r=0;b--){for(f=0;b>=0&&c[b]===0;b--)f++;if(b>=0&&f++,r=r.dblp(f),b<0)break;var i=c[b];$(i!==0),r=e.type==="affine"?i>0?r.mixedAdd(a[i-1>>1]):r.mixedAdd(a[-i-1>>1].neg()):i>0?r.add(a[i-1>>1]):r.add(a[-i-1>>1].neg())}return e.type==="affine"?r.toP():r},N.prototype._wnafMulAdd=function(e,f,d,t,a){for(var c=this._wnafT1,r=this._wnafT2,b=this._wnafT3,i=0,n=0;n=1;n-=2){var s=n-1,h=n;if(c[s]===1&&c[h]===1){var p=[f[s],null,null,f[h]];f[s].y.cmp(f[h].y)===0?(p[1]=f[s].add(f[h]),p[2]=f[s].toJ().mixedAdd(f[h].neg())):f[s].y.cmp(f[h].y.redNeg())===0?(p[1]=f[s].toJ().mixedAdd(f[h]),p[2]=f[s].add(f[h].neg())):(p[1]=f[s].toJ().mixedAdd(f[h]),p[2]=f[s].toJ().mixedAdd(f[h].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],I=ze(d[s],d[h]);i=Math.max(I[0].length,i),b[s]=Array(i),b[h]=Array(i);for(var l=0;l=0;n--){for(var re=0;n>=0;){var pe=!0;for(l=0;l=0&&re++,R=R.dblp(re),n<0)break;for(l=0;l0?X=r[l][W-1>>1]:W<0&&(X=r[l][-W-1>>1].neg()),R=X.type==="affine"?R.mixedAdd(X):R.add(X))}}for(n=0;n=Math.ceil((e.bitLength()+1)/f.step)},_.prototype._getDoubles=function(e,f){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],t=this,a=0;a=0&&(c=f,r=d),t.negative&&(t=t.neg(),a=a.neg()),c.negative&&(c=c.neg(),r=r.neg()),[{a:t,b:a},{a:c,b:r}]},D.prototype._endoSplit=function(e){var f=this.endo.basis,d=f[0],t=f[1],a=t.b.mul(e).divRound(this.n),c=d.b.neg().mul(e).divRound(this.n),r=a.mul(d.a),b=c.mul(t.a),i=a.mul(d.b),n=c.mul(t.b);return{k1:e.sub(r).sub(b),k2:i.add(n).neg()}},D.prototype.pointFromX=function(e,f){(e=new u(e,16)).red||(e=e.toRed(this.red));var d=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),t=d.redSqrt();if(t.redSqr().redSub(d).cmp(this.zero)!==0)throw Error("invalid point");var a=t.fromRed().isOdd();return(f&&!a||!f&&a)&&(t=t.redNeg()),this.point(e,t)},D.prototype.validate=function(e){if(e.inf)return!0;var f=e.x,d=e.y,t=this.a.redMul(f),a=f.redSqr().redMul(f).redIAdd(t).redIAdd(this.b);return d.redSqr().redISub(a).cmpn(0)===0},D.prototype._endoWnafMulAdd=function(e,f,d){for(var t=this._endoWnafT1,a=this._endoWnafT2,c=0;c":""},A.prototype.isInfinity=function(){return this.inf},A.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var f=this.y.redSub(e.y);f.cmpn(0)!==0&&(f=f.redMul(this.x.redSub(e.x).redInvm()));var d=f.redSqr().redISub(this.x).redISub(e.x),t=f.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,t)},A.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var f=this.curve.a,d=this.x.redSqr(),t=e.redInvm(),a=d.redAdd(d).redIAdd(d).redIAdd(f).redMul(t),c=a.redSqr().redISub(this.x.redAdd(this.x)),r=a.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,r)},A.prototype.getX=function(){return this.x.fromRed()},A.prototype.getY=function(){return this.y.fromRed()},A.prototype.mul=function(e){return e=new u(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},A.prototype.mulAdd=function(e,f,d){var t=[this,f],a=[e,d];return this.curve.endo?this.curve._endoWnafMulAdd(t,a):this.curve._wnafMulAdd(1,t,a,2)},A.prototype.jmulAdd=function(e,f,d){var t=[this,f],a=[e,d];return this.curve.endo?this.curve._endoWnafMulAdd(t,a,!0):this.curve._wnafMulAdd(1,t,a,2,!0)},A.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},A.prototype.neg=function(e){if(this.inf)return this;var f=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var d=this.precomputed,t=function(a){return a.neg()};f.precomputed={naf:d.naf&&{wnd:d.naf.wnd,points:d.naf.points.map(t)},doubles:d.doubles&&{step:d.doubles.step,points:d.doubles.points.map(t)}}}return f},A.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},J(w,x.BasePoint),D.prototype.jpoint=function(e,f,d){return new w(this,e,f,d)},w.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),f=e.redSqr(),d=this.x.redMul(f),t=this.y.redMul(f).redMul(e);return this.curve.point(d,t)},w.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},w.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var f=e.z.redSqr(),d=this.z.redSqr(),t=this.x.redMul(f),a=e.x.redMul(d),c=this.y.redMul(f.redMul(e.z)),r=e.y.redMul(d.redMul(this.z)),b=t.redSub(a),i=c.redSub(r);if(b.cmpn(0)===0)return i.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var n=b.redSqr(),o=n.redMul(b),s=t.redMul(n),h=i.redSqr().redIAdd(o).redISub(s).redISub(s),p=i.redMul(s.redISub(h)).redISub(c.redMul(o)),y=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(h,p,y)},w.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var f=this.z.redSqr(),d=this.x,t=e.x.redMul(f),a=this.y,c=e.y.redMul(f).redMul(this.z),r=d.redSub(t),b=a.redSub(c);if(r.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var i=r.redSqr(),n=i.redMul(r),o=d.redMul(i),s=b.redSqr().redIAdd(n).redISub(o).redISub(o),h=b.redMul(o.redISub(s)).redISub(a.redMul(n)),p=this.z.redMul(r);return this.curve.jpoint(s,h,p)},w.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var f=this,d=0;d=0)return!1;if(d.redIAdd(a),this.x.cmp(d)===0)return!0}},w.prototype.inspect=function(){return this.isInfinity()?"":""},w.prototype.isInfinity=function(){return this.z.cmpn(0)===0},J(K,x);var Pe=K;function g(e,f,d){x.BasePoint.call(this,e,"projective"),f===null&&d===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new u(f,16),this.z=new u(d,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}K.prototype.validate=function(e){var f=e.normalize().x,d=f.redSqr(),t=d.redMul(f).redAdd(d.redMul(this.a)).redAdd(f);return t.redSqrt().redSqr().cmp(t)===0},J(g,x.BasePoint),K.prototype.decodePoint=function(e,f){if((e=v.toArray(e,f)).length===33&&e[0]===64&&(e=e.slice(1,33).reverse()),e.length!==32)throw Error("Unknown point compression format");return this.point(e,1)},K.prototype.point=function(e,f){return new g(this,e,f)},K.prototype.pointFromJSON=function(e){return g.fromJSON(this,e)},g.prototype.precompute=function(){},g.prototype._encode=function(e){var f=this.curve.p.byteLength();return e?[64].concat(this.getX().toArray("le",f)):this.getX().toArray("be",f)},g.fromJSON=function(e,f){return new g(e,f[0],f[1]||e.one)},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return this.z.cmpn(0)===0},g.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),f=this.x.redSub(this.z).redSqr(),d=e.redSub(f),t=e.redMul(f),a=d.redMul(f.redAdd(this.curve.a24.redMul(d)));return this.curve.point(t,a)},g.prototype.add=function(){throw Error("Not supported on Montgomery curve")},g.prototype.diffAdd=function(e,f){var d=this.x.redAdd(this.z),t=this.x.redSub(this.z),a=e.x.redAdd(e.z),c=e.x.redSub(e.z).redMul(d),r=a.redMul(t),b=f.z.redMul(c.redAdd(r).redSqr()),i=f.x.redMul(c.redISub(r).redSqr());return this.curve.point(b,i)},g.prototype.mul=function(e){for(var f=(e=new u(e,16)).clone(),d=this,t=this.curve.point(null,null),a=[];f.cmpn(0)!==0;f.iushrn(1))a.push(f.andln(1));for(var c=a.length-1;c>=0;c--)a[c]===0?(d=d.diffAdd(t,this),t=t.dbl()):(t=d.diffAdd(t,this),d=d.dbl());return t},g.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},g.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},g.prototype.eq=function(e){return this.getX().cmp(e.getX())===0},g.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},g.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ne=v.assert;function z(e){this.twisted=(0|e.a)!=1,this.mOneA=this.twisted&&(0|e.a)==-1,this.extended=this.mOneA,x.call(this,"edwards",e),this.a=new u(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new u(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new u(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Ne(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|e.c)==1}J(z,x);var ke=z;function m(e,f,d,t,a){x.BasePoint.call(this,e,"projective"),f===null&&d===null&&t===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new u(f,16),this.y=new u(d,16),this.z=t?new u(t,16):this.curve.one,this.t=a&&new u(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}z.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},z.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},z.prototype.jpoint=function(e,f,d,t){return this.point(e,f,d,t)},z.prototype.pointFromX=function(e,f){(e=new u(e,16)).red||(e=e.toRed(this.red));var d=e.redSqr(),t=this.c2.redSub(this.a.redMul(d)),a=this.one.redSub(this.c2.redMul(this.d).redMul(d)),c=t.redMul(a.redInvm()),r=c.redSqrt();if(r.redSqr().redSub(c).cmp(this.zero)!==0)throw Error("invalid point");var b=r.fromRed().isOdd();return(f&&!b||!f&&b)&&(r=r.redNeg()),this.point(e,r)},z.prototype.pointFromY=function(e,f){(e=new u(e,16)).red||(e=e.toRed(this.red));var d=e.redSqr(),t=d.redSub(this.c2),a=d.redMul(this.d).redMul(this.c2).redSub(this.a),c=t.redMul(a.redInvm());if(c.cmp(this.zero)===0){if(f)throw Error("invalid point");return this.point(this.zero,e)}var r=c.redSqrt();if(r.redSqr().redSub(c).cmp(this.zero)!==0)throw Error("invalid point");return r.fromRed().isOdd()!==f&&(r=r.redNeg()),this.point(r,e)},z.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var f=e.x.redSqr(),d=e.y.redSqr(),t=f.redMul(this.a).redAdd(d),a=this.c2.redMul(this.one.redAdd(this.d.redMul(f).redMul(d)));return t.cmp(a)===0},J(m,x.BasePoint),z.prototype.pointFromJSON=function(e){return m.fromJSON(this,e)},z.prototype.point=function(e,f,d,t){return new m(this,e,f,d,t)},m.fromJSON=function(e,f){return new m(e,f[0],f[1],f[2])},m.prototype.inspect=function(){return this.isInfinity()?"":""},m.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},m.prototype._extDbl=function(){var e=this.x.redSqr(),f=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var t=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(f),c=t.redAdd(f),r=c.redSub(d),b=t.redSub(f),i=a.redMul(r),n=c.redMul(b),o=a.redMul(b),s=r.redMul(c);return this.curve.point(i,n,s,o)},m.prototype._projDbl=function(){var e,f,d,t=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var r=(n=this.curve._mulA(a)).redAdd(c);if(this.zOne)e=t.redSub(a).redSub(c).redMul(r.redSub(this.curve.two)),f=r.redMul(n.redSub(c)),d=r.redSqr().redSub(r).redSub(r);else{var b=this.z.redSqr(),i=r.redSub(b).redISub(b);e=t.redSub(a).redISub(c).redMul(i),f=r.redMul(n.redSub(c)),d=r.redMul(i)}}else{var n=a.redAdd(c);b=this.curve._mulC(this.z).redSqr(),i=n.redSub(b).redSub(b),e=this.curve._mulC(t.redISub(n)).redMul(i),f=this.curve._mulC(n).redMul(a.redISub(c)),d=n.redMul(i)}return this.curve.point(e,f,d)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},m.prototype._extAdd=function(e){var f=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),d=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),t=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),c=d.redSub(f),r=a.redSub(t),b=a.redAdd(t),i=d.redAdd(f),n=c.redMul(r),o=b.redMul(i),s=c.redMul(i),h=r.redMul(b);return this.curve.point(n,o,h,s)},m.prototype._projAdd=function(e){var f,d,t=this.z.redMul(e.z),a=t.redSqr(),c=this.x.redMul(e.x),r=this.y.redMul(e.y),b=this.curve.d.redMul(c).redMul(r),i=a.redSub(b),n=a.redAdd(b),o=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(c).redISub(r),s=t.redMul(i).redMul(o);return this.curve.twisted?(f=t.redMul(n).redMul(r.redSub(this.curve._mulA(c))),d=i.redMul(n)):(f=t.redMul(n).redMul(r.redSub(c)),d=this.curve._mulC(i).redMul(n)),this.curve.point(s,f,d)},m.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},m.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},m.prototype.mulAdd=function(e,f,d){return this.curve._wnafMulAdd(1,[this,f],[e,d],2,!1)},m.prototype.jmulAdd=function(e,f,d){return this.curve._wnafMulAdd(1,[this,f],[e,d],2,!0)},m.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},m.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},m.prototype.getX=function(){return this.normalize(),this.x.fromRed()},m.prototype.getY=function(){return this.normalize(),this.y.fromRed()},m.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0},m.prototype.eqXToP=function(e){var f=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(f)===0)return!0;for(var d=e.clone(),t=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(f.redIAdd(t),this.x.cmp(f)===0)return!0}},m.prototype.toP=m.prototype.normalize,m.prototype.mixedAdd=m.prototype.add;var de=Y(function(e,f){var d=f;d.base=x,d.short=Re,d.mont=Pe,d.edwards=ke}),ie=j.rotl32,Q=j.sum32,Oe=j.sum32_5,je=xe.ft_1,Ie=we.BlockHash,Le=[1518500249,1859775393,2400959708,3395469782];function q(){if(!(this instanceof q))return new q;Ie.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}j.inherits(q,Ie);var Te=q;q.blockSize=512,q.outSize=160,q.hmacStrength=80,q.padLength=64,q.prototype._update=function(e,f){for(var d=this.W,t=0;t<16;t++)d[t]=e[f+t];for(;tthis.blockSize&&(e=new this.Hash().update(e).digest()),ae(e.length<=this.blockSize);for(var f=e.length;f=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,d,t)}var ue=O;O.prototype._init=function(e,f,d){var t=e.concat(f).concat(d);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(d||[])),this._reseed=1},O.prototype.generate=function(e,f,d,t){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");typeof f!="string"&&(t=d,d=f,f=null),d&&(d=F.toArray(d,t||"hex"),this._update(d));for(var a=[];a.length"};var Ke=v.assert;function te(e,f){if(e instanceof te)return e;this._importDER(e,f)||(Ke(e.r&&e.s,"Signature without r or s"),this.r=new u(e.r,16),this.s=new u(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var ee=te;function Ue(){this.place=0}function se(e,f){var d=e[f.place++];if(!(128&d))return d;for(var t=15&d,a=0,c=0,r=f.place;c>>3);for(e.push(128|d);--d;)e.push(f>>>(d<<3)&255);e.push(f)}}te.prototype._importDER=function(e,f){e=v.toArray(e,f);var d=new Ue;if(e[d.place++]!==48||se(e,d)+d.place!==e.length||e[d.place++]!==2)return!1;var t=se(e,d),a=e.slice(d.place,t+d.place);if(d.place+=t,e[d.place++]!==2)return!1;var c=se(e,d);if(e.length!==c+d.place)return!1;var r=e.slice(d.place,c+d.place);return a[0]===0&&128&a[1]&&(a=a.slice(1)),r[0]===0&&128&r[1]&&(r=r.slice(1)),this.r=new u(a),this.s=new u(r),this.recoveryParam=null,!0},te.prototype.toDER=function(e){var f=this.r.toArray(),d=this.s.toArray();for(128&f[0]&&(f=[0].concat(f)),128&d[0]&&(d=[0].concat(d)),f=ye(f),d=ye(d);!(d[0]||128&d[1]);)d=d.slice(1);var t=[2];oe(t,f.length),(t=t.concat(f)).push(2),oe(t,d.length);var a=t.concat(d),c=[48];return oe(c,a.length),c=c.concat(a),v.encode(c,e)};var Ee=v.assert;function B(e){if(!(this instanceof B))return new B(e);typeof e=="string"&&(Ee(G.hasOwnProperty(e),"Unknown curve "+e),e=G[e]),e instanceof G.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Ye=B;B.prototype.keyPair=function(e){return new ne(this,e)},B.prototype.keyFromPrivate=function(e,f){return ne.fromPrivate(this,e,f)},B.prototype.keyFromPublic=function(e,f){return ne.fromPublic(this,e,f)},B.prototype.genKeyPair=function(e){e||(e={});var f=new ue({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ce(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()});if(this.curve.type==="mont"){var d=new u(f.generate(32));return this.keyFromPrivate(d)}for(var t=this.n.byteLength(),a=this.n.sub(new u(2));;)if(!((d=new u(f.generate(t))).cmp(a)>0))return d.iaddn(1),this.keyFromPrivate(d)},B.prototype._truncateToN=function(e,f,d){var t=(d=d||8*e.byteLength())-this.n.bitLength();return t>0&&(e=e.ushrn(t)),!f&&e.cmp(this.n)>=0?e.sub(this.n):e},B.prototype.truncateMsg=function(e){var f;return e instanceof Uint8Array?(f=8*e.byteLength,e=this._truncateToN(new u(e,16),!1,f)):typeof e=="string"?(f=4*e.length,e=this._truncateToN(new u(e,16),!1,f)):e=this._truncateToN(new u(e,16)),e},B.prototype.sign=function(e,f,d,t){typeof d=="object"&&(t=d,d=null),t||(t={}),f=this.keyFromPrivate(f,d),e=this.truncateMsg(e);for(var a=this.n.byteLength(),c=f.getPrivate().toArray("be",a),r=e.toArray("be",a),b=new ue({hash:this.hash,entropy:c,nonce:r,pers:t.pers,persEnc:t.persEnc||"utf8"}),i=this.n.sub(new u(1)),n=0;;n++){var o=t.k?t.k(n):new u(b.generate(this.n.byteLength()));if(!((o=this._truncateToN(o,!0)).cmpn(1)<=0||o.cmp(i)>=0)){var s=this.g.mul(o);if(!s.isInfinity()){var h=s.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var y=o.invm(this.n).mul(p.mul(f.getPrivate()).iadd(e));if((y=y.umod(this.n)).cmpn(0)!==0){var I=(s.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return t.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),I^=1),new ee({r:p,s:y,recoveryParam:I})}}}}}},B.prototype.verify=function(e,f,d,t){return d=this.keyFromPublic(d,t),f=new ee(f,"hex"),this._verify(this.truncateMsg(e),f,d)||this._verify(this._truncateToN(new u(e,16)),f,d)},B.prototype._verify=function(e,f,d){var t=f.r,a=f.s;if(t.cmpn(1)<0||t.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var c,r=a.invm(this.n),b=r.mul(e).umod(this.n),i=r.mul(t).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(b,d.getPublic(),i)).isInfinity()&&c.eqXToP(t):!(c=this.g.mulAdd(b,d.getPublic(),i)).isInfinity()&&c.getX().umod(this.n).cmp(t)===0},B.prototype.recoverPubKey=function(e,f,d,t){Ee((3&d)===d,"The recovery param is more than two bits"),f=new ee(f,t);var a=this.n,c=new u(e),r=f.r,b=f.s,i=1&d,n=d>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&n)throw Error("Unable to find sencond key candinate");r=n?this.curve.pointFromX(r.add(this.curve.n),i):this.curve.pointFromX(r,i);var o=f.r.invm(a),s=a.sub(c).mul(o).umod(a),h=b.mul(o).umod(a);return this.g.mulAdd(s,r,h)},B.prototype.getKeyRecoveryParam=function(e,f,d,t){if((f=new ee(f,t)).recoveryParam!==null)return f.recoveryParam;for(var a=0;a<4;a++){var c;try{c=this.recoverPubKey(e,f,a)}catch{continue}if(c.eq(d))return a}throw Error("Unable to find valid recovery factor")};var me=v.assert,Ae=v.parseBytes,V=v.cachedProperty;function S(e,f){if(this.eddsa=e,f.hasOwnProperty("secret")&&(this._secret=Ae(f.secret)),e.isPoint(f.pub))this._pub=f.pub;else if(this._pubBytes=Ae(f.pub),this._pubBytes&&this._pubBytes.length===33&&this._pubBytes[0]===64&&(this._pubBytes=this._pubBytes.slice(1,33)),this._pubBytes&&this._pubBytes.length!==32)throw Error("Unknown point compression format")}S.fromPublic=function(e,f){return f instanceof S?f:new S(e,{pub:f})},S.fromSecret=function(e,f){return f instanceof S?f:new S(e,{secret:f})},S.prototype.secret=function(){return this._secret},V(S,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),V(S,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),V(S,"privBytes",function(){var e=this.eddsa,f=this.hash(),d=e.encodingLength-1,t=f.slice(0,e.encodingLength);return t[0]&=248,t[d]&=127,t[d]|=64,t}),V(S,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),V(S,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),V(S,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),S.prototype.sign=function(e){return me(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},S.prototype.verify=function(e,f){return this.eddsa.verify(e,f,this)},S.prototype.getSecret=function(e){return me(this._secret,"KeyPair is public only"),v.encode(this.secret(),e)},S.prototype.getPublic=function(e,f){return v.encode((f?[64]:[]).concat(this.pubBytes()),e)};var he=S,He=v.assert,fe=v.cachedProperty,We=v.parseBytes;function T(e,f){this.eddsa=e,typeof f!="object"&&(f=We(f)),Array.isArray(f)&&(f={R:f.slice(0,e.encodingLength),S:f.slice(e.encodingLength)}),He(f.R&&f.S,"Signature without R or S"),e.isPoint(f.R)&&(this._R=f.R),f.S instanceof u&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}fe(T,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),fe(T,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),fe(T,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),fe(T,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),T.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},T.prototype.toHex=function(){return v.encode(this.toBytes(),"hex").toUpperCase()};var ge=T,Qe=v.assert,Se=v.parseBytes;function M(e){if(Qe(e==="ed25519","only tested with ed25519 so far"),!(this instanceof M))return new M(e);e=G[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=C.sha512}var Ge=M;M.prototype.sign=function(e,f){e=Se(e);var d=this.keyFromSecret(f),t=this.hashInt(d.messagePrefix(),e),a=this.g.mul(t),c=this.encodePoint(a),r=this.hashInt(c,d.pubBytes(),e).mul(d.priv()),b=t.add(r).umod(this.curve.n);return this.makeSignature({R:a,S:b,Rencoded:c})},M.prototype.verify=function(e,f,d){e=Se(e),f=this.makeSignature(f);var t=this.keyFromPublic(d),a=this.hashInt(f.Rencoded(),t.pubBytes(),e),c=this.g.mul(f.S());return f.R().add(t.pub().mul(a)).eq(c)},M.prototype.hashInt=function(){for(var e=this.hash(),f=0;f>8,s=255&n;o?b.push(o,s):b.push(s)}return b},d.zero2=t,d.toHex=a,d.encode=function(c,r){return r==="hex"?a(c):c}}),v=Y(function(e,f){var d=f;d.assert=ae,d.toArray=F.toArray,d.zero2=F.zero2,d.toHex=F.toHex,d.encode=F.encode,d.getNAF=function(t,a){for(var c=[],r=1<=0;){var i;if(b.isOdd()){var n=b.andln(r-1);i=n>(r>>1)-1?(r>>1)-n:n,b.isubn(i)}else i=0;c.push(i);for(var o=b.cmpn(0)!==0&&b.andln(r-1)===0?a+1:1,s=1;s0||a.cmpn(-b)>0;){var i,n,o,s=t.andln(3)+r&3,h=a.andln(3)+b&3;s===3&&(s=-1),h===3&&(h=-1),(1&s)==0?i=0:i=(o=t.andln(7)+r&7)!==3&&o!==5||h!==2?s:-s,c[0].push(i),(1&h)==0?n=0:n=(o=a.andln(7)+b&7)!==3&&o!==5||s!==2?h:-h,c[1].push(n),2*r===i+1&&(r=1-r),2*b===n+1&&(b=1-b),t.iushrn(1),a.iushrn(1)}return c},d.cachedProperty=function(t,a,c){var r="_"+a;t.prototype[a]=function(){return this[r]!==void 0?this[r]:this[r]=c.call(this)}},d.parseBytes=function(t){return typeof t=="string"?d.toArray(t,"hex"):t},d.intFromLE=function(t){return new u(t,"hex","le")}}),ce=function(e){return be||(be=new k(null)),be.generate(e)};function k(e){this.rand=e}var Fe=k;if(k.prototype.generate=function(e){return this._rand(e)},k.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var f=new Uint8Array(e),d=0;d0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var x=N;function _(e,f){this.curve=e,this.type=f,this.precomputed=null}N.prototype.point=function(){throw Error("Not implemented")},N.prototype.validate=function(){throw Error("Not implemented")},N.prototype._fixedNafMul=function(e,f){$(e.precomputed);var d=e._getDoubles(),t=Z(f,1),a=(1<=r;f--)b=(b<<1)+t[f];c.push(b)}for(var i=this.jpoint(null,null,null),n=this.jpoint(null,null,null),o=a;o>0;o--){for(r=0;r=0;b--){for(f=0;b>=0&&c[b]===0;b--)f++;if(b>=0&&f++,r=r.dblp(f),b<0)break;var i=c[b];$(i!==0),r=e.type==="affine"?i>0?r.mixedAdd(a[i-1>>1]):r.mixedAdd(a[-i-1>>1].neg()):i>0?r.add(a[i-1>>1]):r.add(a[-i-1>>1].neg())}return e.type==="affine"?r.toP():r},N.prototype._wnafMulAdd=function(e,f,d,t,a){for(var c=this._wnafT1,r=this._wnafT2,b=this._wnafT3,i=0,n=0;n=1;n-=2){var s=n-1,h=n;if(c[s]===1&&c[h]===1){var p=[f[s],null,null,f[h]];f[s].y.cmp(f[h].y)===0?(p[1]=f[s].add(f[h]),p[2]=f[s].toJ().mixedAdd(f[h].neg())):f[s].y.cmp(f[h].y.redNeg())===0?(p[1]=f[s].toJ().mixedAdd(f[h]),p[2]=f[s].add(f[h].neg())):(p[1]=f[s].toJ().mixedAdd(f[h]),p[2]=f[s].toJ().mixedAdd(f[h].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],I=ze(d[s],d[h]);i=Math.max(I[0].length,i),b[s]=Array(i),b[h]=Array(i);for(var l=0;l=0;n--){for(var re=0;n>=0;){var pe=!0;for(l=0;l=0&&re++,R=R.dblp(re),n<0)break;for(l=0;l0?X=r[l][W-1>>1]:W<0&&(X=r[l][-W-1>>1].neg()),R=X.type==="affine"?R.mixedAdd(X):R.add(X))}}for(n=0;n=Math.ceil((e.bitLength()+1)/f.step)},_.prototype._getDoubles=function(e,f){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],t=this,a=0;a=0&&(c=f,r=d),t.negative&&(t=t.neg(),a=a.neg()),c.negative&&(c=c.neg(),r=r.neg()),[{a:t,b:a},{a:c,b:r}]},D.prototype._endoSplit=function(e){var f=this.endo.basis,d=f[0],t=f[1],a=t.b.mul(e).divRound(this.n),c=d.b.neg().mul(e).divRound(this.n),r=a.mul(d.a),b=c.mul(t.a),i=a.mul(d.b),n=c.mul(t.b);return{k1:e.sub(r).sub(b),k2:i.add(n).neg()}},D.prototype.pointFromX=function(e,f){(e=new u(e,16)).red||(e=e.toRed(this.red));var d=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),t=d.redSqrt();if(t.redSqr().redSub(d).cmp(this.zero)!==0)throw Error("invalid point");var a=t.fromRed().isOdd();return(f&&!a||!f&&a)&&(t=t.redNeg()),this.point(e,t)},D.prototype.validate=function(e){if(e.inf)return!0;var f=e.x,d=e.y,t=this.a.redMul(f),a=f.redSqr().redMul(f).redIAdd(t).redIAdd(this.b);return d.redSqr().redISub(a).cmpn(0)===0},D.prototype._endoWnafMulAdd=function(e,f,d){for(var t=this._endoWnafT1,a=this._endoWnafT2,c=0;c":""},A.prototype.isInfinity=function(){return this.inf},A.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var f=this.y.redSub(e.y);f.cmpn(0)!==0&&(f=f.redMul(this.x.redSub(e.x).redInvm()));var d=f.redSqr().redISub(this.x).redISub(e.x),t=f.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,t)},A.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var f=this.curve.a,d=this.x.redSqr(),t=e.redInvm(),a=d.redAdd(d).redIAdd(d).redIAdd(f).redMul(t),c=a.redSqr().redISub(this.x.redAdd(this.x)),r=a.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,r)},A.prototype.getX=function(){return this.x.fromRed()},A.prototype.getY=function(){return this.y.fromRed()},A.prototype.mul=function(e){return e=new u(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},A.prototype.mulAdd=function(e,f,d){var t=[this,f],a=[e,d];return this.curve.endo?this.curve._endoWnafMulAdd(t,a):this.curve._wnafMulAdd(1,t,a,2)},A.prototype.jmulAdd=function(e,f,d){var t=[this,f],a=[e,d];return this.curve.endo?this.curve._endoWnafMulAdd(t,a,!0):this.curve._wnafMulAdd(1,t,a,2,!0)},A.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)},A.prototype.neg=function(e){if(this.inf)return this;var f=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var d=this.precomputed,t=function(a){return a.neg()};f.precomputed={naf:d.naf&&{wnd:d.naf.wnd,points:d.naf.points.map(t)},doubles:d.doubles&&{step:d.doubles.step,points:d.doubles.points.map(t)}}}return f},A.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},J(w,x.BasePoint),D.prototype.jpoint=function(e,f,d){return new w(this,e,f,d)},w.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),f=e.redSqr(),d=this.x.redMul(f),t=this.y.redMul(f).redMul(e);return this.curve.point(d,t)},w.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},w.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var f=e.z.redSqr(),d=this.z.redSqr(),t=this.x.redMul(f),a=e.x.redMul(d),c=this.y.redMul(f.redMul(e.z)),r=e.y.redMul(d.redMul(this.z)),b=t.redSub(a),i=c.redSub(r);if(b.cmpn(0)===0)return i.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var n=b.redSqr(),o=n.redMul(b),s=t.redMul(n),h=i.redSqr().redIAdd(o).redISub(s).redISub(s),p=i.redMul(s.redISub(h)).redISub(c.redMul(o)),y=this.z.redMul(e.z).redMul(b);return this.curve.jpoint(h,p,y)},w.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var f=this.z.redSqr(),d=this.x,t=e.x.redMul(f),a=this.y,c=e.y.redMul(f).redMul(this.z),r=d.redSub(t),b=a.redSub(c);if(r.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var i=r.redSqr(),n=i.redMul(r),o=d.redMul(i),s=b.redSqr().redIAdd(n).redISub(o).redISub(o),h=b.redMul(o.redISub(s)).redISub(a.redMul(n)),p=this.z.redMul(r);return this.curve.jpoint(s,h,p)},w.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var f=this,d=0;d=0)return!1;if(d.redIAdd(a),this.x.cmp(d)===0)return!0}},w.prototype.inspect=function(){return this.isInfinity()?"":""},w.prototype.isInfinity=function(){return this.z.cmpn(0)===0},J(K,x);var Pe=K;function g(e,f,d){x.BasePoint.call(this,e,"projective"),f===null&&d===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new u(f,16),this.z=new u(d,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}K.prototype.validate=function(e){var f=e.normalize().x,d=f.redSqr(),t=d.redMul(f).redAdd(d.redMul(this.a)).redAdd(f);return t.redSqrt().redSqr().cmp(t)===0},J(g,x.BasePoint),K.prototype.decodePoint=function(e,f){if((e=v.toArray(e,f)).length===33&&e[0]===64&&(e=e.slice(1,33).reverse()),e.length!==32)throw Error("Unknown point compression format");return this.point(e,1)},K.prototype.point=function(e,f){return new g(this,e,f)},K.prototype.pointFromJSON=function(e){return g.fromJSON(this,e)},g.prototype.precompute=function(){},g.prototype._encode=function(e){var f=this.curve.p.byteLength();return e?[64].concat(this.getX().toArray("le",f)):this.getX().toArray("be",f)},g.fromJSON=function(e,f){return new g(e,f[0],f[1]||e.one)},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return this.z.cmpn(0)===0},g.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),f=this.x.redSub(this.z).redSqr(),d=e.redSub(f),t=e.redMul(f),a=d.redMul(f.redAdd(this.curve.a24.redMul(d)));return this.curve.point(t,a)},g.prototype.add=function(){throw Error("Not supported on Montgomery curve")},g.prototype.diffAdd=function(e,f){var d=this.x.redAdd(this.z),t=this.x.redSub(this.z),a=e.x.redAdd(e.z),c=e.x.redSub(e.z).redMul(d),r=a.redMul(t),b=f.z.redMul(c.redAdd(r).redSqr()),i=f.x.redMul(c.redISub(r).redSqr());return this.curve.point(b,i)},g.prototype.mul=function(e){for(var f=(e=new u(e,16)).clone(),d=this,t=this.curve.point(null,null),a=[];f.cmpn(0)!==0;f.iushrn(1))a.push(f.andln(1));for(var c=a.length-1;c>=0;c--)a[c]===0?(d=d.diffAdd(t,this),t=t.dbl()):(t=d.diffAdd(t,this),d=d.dbl());return t},g.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},g.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},g.prototype.eq=function(e){return this.getX().cmp(e.getX())===0},g.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},g.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var Ne=v.assert;function z(e){this.twisted=(0|e.a)!=1,this.mOneA=this.twisted&&(0|e.a)==-1,this.extended=this.mOneA,x.call(this,"edwards",e),this.a=new u(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new u(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new u(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Ne(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|e.c)==1}J(z,x);var ke=z;function m(e,f,d,t,a){x.BasePoint.call(this,e,"projective"),f===null&&d===null&&t===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new u(f,16),this.y=new u(d,16),this.z=t?new u(t,16):this.curve.one,this.t=a&&new u(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}z.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},z.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},z.prototype.jpoint=function(e,f,d,t){return this.point(e,f,d,t)},z.prototype.pointFromX=function(e,f){(e=new u(e,16)).red||(e=e.toRed(this.red));var d=e.redSqr(),t=this.c2.redSub(this.a.redMul(d)),a=this.one.redSub(this.c2.redMul(this.d).redMul(d)),c=t.redMul(a.redInvm()),r=c.redSqrt();if(r.redSqr().redSub(c).cmp(this.zero)!==0)throw Error("invalid point");var b=r.fromRed().isOdd();return(f&&!b||!f&&b)&&(r=r.redNeg()),this.point(e,r)},z.prototype.pointFromY=function(e,f){(e=new u(e,16)).red||(e=e.toRed(this.red));var d=e.redSqr(),t=d.redSub(this.c2),a=d.redMul(this.d).redMul(this.c2).redSub(this.a),c=t.redMul(a.redInvm());if(c.cmp(this.zero)===0){if(f)throw Error("invalid point");return this.point(this.zero,e)}var r=c.redSqrt();if(r.redSqr().redSub(c).cmp(this.zero)!==0)throw Error("invalid point");return r.fromRed().isOdd()!==f&&(r=r.redNeg()),this.point(r,e)},z.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var f=e.x.redSqr(),d=e.y.redSqr(),t=f.redMul(this.a).redAdd(d),a=this.c2.redMul(this.one.redAdd(this.d.redMul(f).redMul(d)));return t.cmp(a)===0},J(m,x.BasePoint),z.prototype.pointFromJSON=function(e){return m.fromJSON(this,e)},z.prototype.point=function(e,f,d,t){return new m(this,e,f,d,t)},m.fromJSON=function(e,f){return new m(e,f[0],f[1],f[2])},m.prototype.inspect=function(){return this.isInfinity()?"":""},m.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},m.prototype._extDbl=function(){var e=this.x.redSqr(),f=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var t=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(f),c=t.redAdd(f),r=c.redSub(d),b=t.redSub(f),i=a.redMul(r),n=c.redMul(b),o=a.redMul(b),s=r.redMul(c);return this.curve.point(i,n,s,o)},m.prototype._projDbl=function(){var e,f,d,t=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var r=(n=this.curve._mulA(a)).redAdd(c);if(this.zOne)e=t.redSub(a).redSub(c).redMul(r.redSub(this.curve.two)),f=r.redMul(n.redSub(c)),d=r.redSqr().redSub(r).redSub(r);else{var b=this.z.redSqr(),i=r.redSub(b).redISub(b);e=t.redSub(a).redISub(c).redMul(i),f=r.redMul(n.redSub(c)),d=r.redMul(i)}}else{var n=a.redAdd(c);b=this.curve._mulC(this.z).redSqr(),i=n.redSub(b).redSub(b),e=this.curve._mulC(t.redISub(n)).redMul(i),f=this.curve._mulC(n).redMul(a.redISub(c)),d=n.redMul(i)}return this.curve.point(e,f,d)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},m.prototype._extAdd=function(e){var f=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),d=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),t=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),c=d.redSub(f),r=a.redSub(t),b=a.redAdd(t),i=d.redAdd(f),n=c.redMul(r),o=b.redMul(i),s=c.redMul(i),h=r.redMul(b);return this.curve.point(n,o,h,s)},m.prototype._projAdd=function(e){var f,d,t=this.z.redMul(e.z),a=t.redSqr(),c=this.x.redMul(e.x),r=this.y.redMul(e.y),b=this.curve.d.redMul(c).redMul(r),i=a.redSub(b),n=a.redAdd(b),o=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(c).redISub(r),s=t.redMul(i).redMul(o);return this.curve.twisted?(f=t.redMul(n).redMul(r.redSub(this.curve._mulA(c))),d=i.redMul(n)):(f=t.redMul(n).redMul(r.redSub(c)),d=this.curve._mulC(i).redMul(n)),this.curve.point(s,f,d)},m.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},m.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},m.prototype.mulAdd=function(e,f,d){return this.curve._wnafMulAdd(1,[this,f],[e,d],2,!1)},m.prototype.jmulAdd=function(e,f,d){return this.curve._wnafMulAdd(1,[this,f],[e,d],2,!0)},m.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},m.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},m.prototype.getX=function(){return this.normalize(),this.x.fromRed()},m.prototype.getY=function(){return this.normalize(),this.y.fromRed()},m.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0},m.prototype.eqXToP=function(e){var f=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(f)===0)return!0;for(var d=e.clone(),t=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(f.redIAdd(t),this.x.cmp(f)===0)return!0}},m.prototype.toP=m.prototype.normalize,m.prototype.mixedAdd=m.prototype.add;var de=Y(function(e,f){var d=f;d.base=x,d.short=Re,d.mont=Pe,d.edwards=ke}),ie=j.rotl32,Q=j.sum32,Oe=j.sum32_5,je=xe.ft_1,Ie=we.BlockHash,Le=[1518500249,1859775393,2400959708,3395469782];function q(){if(!(this instanceof q))return new q;Ie.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}j.inherits(q,Ie);var Te=q;q.blockSize=512,q.outSize=160,q.hmacStrength=80,q.padLength=64,q.prototype._update=function(e,f){for(var d=this.W,t=0;t<16;t++)d[t]=e[f+t];for(;tthis.blockSize&&(e=new this.Hash().update(e).digest()),ae(e.length<=this.blockSize);for(var f=e.length;f=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,d,t)}var ue=O;O.prototype._init=function(e,f,d){var t=e.concat(f).concat(d);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(d||[])),this._reseed=1},O.prototype.generate=function(e,f,d,t){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");typeof f!="string"&&(t=d,d=f,f=null),d&&(d=F.toArray(d,t||"hex"),this._update(d));for(var a=[];a.length"};var Ke=v.assert;function te(e,f){if(e instanceof te)return e;this._importDER(e,f)||(Ke(e.r&&e.s,"Signature without r or s"),this.r=new u(e.r,16),this.s=new u(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var ee=te;function Ue(){this.place=0}function se(e,f){var d=e[f.place++];if(!(128&d))return d;for(var t=15&d,a=0,c=0,r=f.place;c>>3);for(e.push(128|d);--d;)e.push(f>>>(d<<3)&255);e.push(f)}}te.prototype._importDER=function(e,f){e=v.toArray(e,f);var d=new Ue;if(e[d.place++]!==48||se(e,d)+d.place!==e.length||e[d.place++]!==2)return!1;var t=se(e,d),a=e.slice(d.place,t+d.place);if(d.place+=t,e[d.place++]!==2)return!1;var c=se(e,d);if(e.length!==c+d.place)return!1;var r=e.slice(d.place,c+d.place);return a[0]===0&&128&a[1]&&(a=a.slice(1)),r[0]===0&&128&r[1]&&(r=r.slice(1)),this.r=new u(a),this.s=new u(r),this.recoveryParam=null,!0},te.prototype.toDER=function(e){var f=this.r.toArray(),d=this.s.toArray();for(128&f[0]&&(f=[0].concat(f)),128&d[0]&&(d=[0].concat(d)),f=ye(f),d=ye(d);!(d[0]||128&d[1]);)d=d.slice(1);var t=[2];oe(t,f.length),(t=t.concat(f)).push(2),oe(t,d.length);var a=t.concat(d),c=[48];return oe(c,a.length),c=c.concat(a),v.encode(c,e)};var Ee=v.assert;function B(e){if(!(this instanceof B))return new B(e);typeof e=="string"&&(Ee(G.hasOwnProperty(e),"Unknown curve "+e),e=G[e]),e instanceof G.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Ye=B;B.prototype.keyPair=function(e){return new ne(this,e)},B.prototype.keyFromPrivate=function(e,f){return ne.fromPrivate(this,e,f)},B.prototype.keyFromPublic=function(e,f){return ne.fromPublic(this,e,f)},B.prototype.genKeyPair=function(e){e||(e={});var f=new ue({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ce(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()});if(this.curve.type==="mont"){var d=new u(f.generate(32));return this.keyFromPrivate(d)}for(var t=this.n.byteLength(),a=this.n.sub(new u(2));;)if(!((d=new u(f.generate(t))).cmp(a)>0))return d.iaddn(1),this.keyFromPrivate(d)},B.prototype._truncateToN=function(e,f,d){var t=(d=d||8*e.byteLength())-this.n.bitLength();return t>0&&(e=e.ushrn(t)),!f&&e.cmp(this.n)>=0?e.sub(this.n):e},B.prototype.truncateMsg=function(e){var f;return e instanceof Uint8Array?(f=8*e.byteLength,e=this._truncateToN(new u(e,16),!1,f)):typeof e=="string"?(f=4*e.length,e=this._truncateToN(new u(e,16),!1,f)):e=this._truncateToN(new u(e,16)),e},B.prototype.sign=function(e,f,d,t){typeof d=="object"&&(t=d,d=null),t||(t={}),f=this.keyFromPrivate(f,d),e=this.truncateMsg(e);for(var a=this.n.byteLength(),c=f.getPrivate().toArray("be",a),r=e.toArray("be",a),b=new ue({hash:this.hash,entropy:c,nonce:r,pers:t.pers,persEnc:t.persEnc||"utf8"}),i=this.n.sub(new u(1)),n=0;;n++){var o=t.k?t.k(n):new u(b.generate(this.n.byteLength()));if(!((o=this._truncateToN(o,!0)).cmpn(1)<=0||o.cmp(i)>=0)){var s=this.g.mul(o);if(!s.isInfinity()){var h=s.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var y=o.invm(this.n).mul(p.mul(f.getPrivate()).iadd(e));if((y=y.umod(this.n)).cmpn(0)!==0){var I=(s.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return t.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),I^=1),new ee({r:p,s:y,recoveryParam:I})}}}}}},B.prototype.verify=function(e,f,d,t){return d=this.keyFromPublic(d,t),f=new ee(f,"hex"),this._verify(this.truncateMsg(e),f,d)||this._verify(this._truncateToN(new u(e,16)),f,d)},B.prototype._verify=function(e,f,d){var t=f.r,a=f.s;if(t.cmpn(1)<0||t.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var c,r=a.invm(this.n),b=r.mul(e).umod(this.n),i=r.mul(t).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(b,d.getPublic(),i)).isInfinity()&&c.eqXToP(t):!(c=this.g.mulAdd(b,d.getPublic(),i)).isInfinity()&&c.getX().umod(this.n).cmp(t)===0},B.prototype.recoverPubKey=function(e,f,d,t){Ee((3&d)===d,"The recovery param is more than two bits"),f=new ee(f,t);var a=this.n,c=new u(e),r=f.r,b=f.s,i=1&d,n=d>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&n)throw Error("Unable to find sencond key candinate");r=n?this.curve.pointFromX(r.add(this.curve.n),i):this.curve.pointFromX(r,i);var o=f.r.invm(a),s=a.sub(c).mul(o).umod(a),h=b.mul(o).umod(a);return this.g.mulAdd(s,r,h)},B.prototype.getKeyRecoveryParam=function(e,f,d,t){if((f=new ee(f,t)).recoveryParam!==null)return f.recoveryParam;for(var a=0;a<4;a++){var c;try{c=this.recoverPubKey(e,f,a)}catch{continue}if(c.eq(d))return a}throw Error("Unable to find valid recovery factor")};var me=v.assert,Ae=v.parseBytes,V=v.cachedProperty;function S(e,f){if(this.eddsa=e,f.hasOwnProperty("secret")&&(this._secret=Ae(f.secret)),e.isPoint(f.pub))this._pub=f.pub;else if(this._pubBytes=Ae(f.pub),this._pubBytes&&this._pubBytes.length===33&&this._pubBytes[0]===64&&(this._pubBytes=this._pubBytes.slice(1,33)),this._pubBytes&&this._pubBytes.length!==32)throw Error("Unknown point compression format")}S.fromPublic=function(e,f){return f instanceof S?f:new S(e,{pub:f})},S.fromSecret=function(e,f){return f instanceof S?f:new S(e,{secret:f})},S.prototype.secret=function(){return this._secret},V(S,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),V(S,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),V(S,"privBytes",function(){var e=this.eddsa,f=this.hash(),d=e.encodingLength-1,t=f.slice(0,e.encodingLength);return t[0]&=248,t[d]&=127,t[d]|=64,t}),V(S,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),V(S,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),V(S,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),S.prototype.sign=function(e){return me(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},S.prototype.verify=function(e,f){return this.eddsa.verify(e,f,this)},S.prototype.getSecret=function(e){return me(this._secret,"KeyPair is public only"),v.encode(this.secret(),e)},S.prototype.getPublic=function(e,f){return v.encode((f?[64]:[]).concat(this.pubBytes()),e)};var he=S,He=v.assert,fe=v.cachedProperty,We=v.parseBytes;function T(e,f){this.eddsa=e,typeof f!="object"&&(f=We(f)),Array.isArray(f)&&(f={R:f.slice(0,e.encodingLength),S:f.slice(e.encodingLength)}),He(f.R&&f.S,"Signature without R or S"),e.isPoint(f.R)&&(this._R=f.R),f.S instanceof u&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}fe(T,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),fe(T,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),fe(T,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),fe(T,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),T.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},T.prototype.toHex=function(){return v.encode(this.toBytes(),"hex").toUpperCase()};var ge=T,Qe=v.assert,Se=v.parseBytes;function M(e){if(Qe(e==="ed25519","only tested with ed25519 so far"),!(this instanceof M))return new M(e);e=G[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=C.sha512}var Ge=M;M.prototype.sign=function(e,f){e=Se(e);var d=this.keyFromSecret(f),t=this.hashInt(d.messagePrefix(),e),a=this.g.mul(t),c=this.encodePoint(a),r=this.hashInt(c,d.pubBytes(),e).mul(d.priv()),b=t.add(r).umod(this.curve.n);return this.makeSignature({R:a,S:b,Rencoded:c})},M.prototype.verify=function(e,f,d){e=Se(e),f=this.makeSignature(f);var t=this.keyFromPublic(d),a=this.hashInt(f.Rencoded(),t.pubBytes(),e),c=this.g.mul(f.S());return f.R().add(t.pub().mul(a)).eq(c)},M.prototype.hashInt=function(){for(var e=this.hash(),f=0;f0?e("Loading"):e("Form",{ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(i){i.preventDefault()}}},[t.isLdap?e("Alert",{attrs:{type:"warning"}},[t._v(t._s(t.$L("LDAP \u7528\u6237\u7981\u6B62\u4FEE\u6539\u90AE\u7BB1\u5730\u5740")))]):t._e(),e("FormItem",{attrs:{label:t.$L("\u65B0\u90AE\u7BB1\u5730\u5740"),prop:"newEmail"}},[t.isRegVerify==1?e("Input",{class:t.count>0?"setting-send-input":"setting-input",attrs:{search:"","enter-button":t.$L(t.sendBtnText),disabled:t.isLdap,placeholder:t.$L("\u8F93\u5165\u65B0\u90AE\u7BB1\u5730\u5740")},on:{"on-search":t.sendEmailCode},model:{value:t.formDatum.newEmail,callback:function(i){t.$set(t.formDatum,"newEmail",i)},expression:"formDatum.newEmail"}}):e("Input",{staticClass:"setting-input",attrs:{disabled:t.isLdap,placeholder:t.$L("\u8F93\u5165\u65B0\u90AE\u7BB1\u5730\u5740")},model:{value:t.formDatum.newEmail,callback:function(i){t.$set(t.formDatum,"newEmail",i)},expression:"formDatum.newEmail"}})],1),t.isRegVerify==1?e("FormItem",{attrs:{label:t.$L("\u9A8C\u8BC1\u7801"),prop:"code"}},[e("Input",{attrs:{placeholder:t.$L("\u8F93\u5165\u90AE\u7BB1\u9A8C\u8BC1\u7801")},model:{value:t.formDatum.code,callback:function(i){t.$set(t.formDatum,"code",i)},expression:"formDatum.code"}})],1):t._e()],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",disabled:t.isLdap},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const m={data(){return{loadIng:0,configLoad:0,formDatum:{newEmail:"",code:""},ruleDatum:{newEmail:[{validator:(t,s,e)=>{s.trim()===""?e(new Error(this.$L("\u8BF7\u8F93\u5165\u65B0\u90AE\u7BB1\u5730\u5740\uFF01"))):$A.isEmail(s.trim())?e():e(new Error(this.$L("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740\uFF01")))},required:!0,trigger:"change"}]},count:0,isSendButtonShow:!0,isRegVerify:0,sendBtnText:this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801")}},mounted(){this.getRegVerify()},computed:{...r(["formLabelPosition","formLabelWidth"]),isLdap(){return this.$store.state.userInfo.identity.includes("ldap")}},methods:{sendEmailCode(){this.$store.dispatch("call",{url:"users/email/send",data:{type:2,email:this.formDatum.newEmail},spinner:!0}).then(t=>{this.isSendButtonShow=!1,this.count=120,this.sendBtnText=this.count+" \u79D2";let s=setInterval(()=>{this.count--,this.sendBtnText=this.count+" \u79D2",this.count<=0&&(this.sendBtnText=this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801"),clearInterval(s))},1e3)}).catch(({msg:t})=>{$A.messageError(t)})},submitForm(){this.$refs.formDatum.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/email/edit",data:this.formDatum}).then(({data:s})=>{this.count=0,this.sendBtnText=this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801"),$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("saveUserInfo",s),this.$refs.formDatum.resetFields(),this.isSendButtonShow=!0}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()},getRegVerify(){this.configLoad++,this.$store.dispatch("call",{url:"system/setting/email"}).then(({data:t})=>{this.isRegVerify=t.reg_verify==="open"}).finally(t=>{this.configLoad--})}}},a={};var u=n(m,o,l,!1,d,null,null,null);function d(t){for(let s in a)this[s]=a[s]}var f=function(){return u.exports}();export{f as default}; +import{m as r,n}from"./app.6910ca56.js";var o=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[t.configLoad>0?e("Loading"):e("Form",{ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(i){i.preventDefault()}}},[t.isLdap?e("Alert",{attrs:{type:"warning"}},[t._v(t._s(t.$L("LDAP \u7528\u6237\u7981\u6B62\u4FEE\u6539\u90AE\u7BB1\u5730\u5740")))]):t._e(),e("FormItem",{attrs:{label:t.$L("\u65B0\u90AE\u7BB1\u5730\u5740"),prop:"newEmail"}},[t.isRegVerify==1?e("Input",{class:t.count>0?"setting-send-input":"setting-input",attrs:{search:"","enter-button":t.$L(t.sendBtnText),disabled:t.isLdap,placeholder:t.$L("\u8F93\u5165\u65B0\u90AE\u7BB1\u5730\u5740")},on:{"on-search":t.sendEmailCode},model:{value:t.formDatum.newEmail,callback:function(i){t.$set(t.formDatum,"newEmail",i)},expression:"formDatum.newEmail"}}):e("Input",{staticClass:"setting-input",attrs:{disabled:t.isLdap,placeholder:t.$L("\u8F93\u5165\u65B0\u90AE\u7BB1\u5730\u5740")},model:{value:t.formDatum.newEmail,callback:function(i){t.$set(t.formDatum,"newEmail",i)},expression:"formDatum.newEmail"}})],1),t.isRegVerify==1?e("FormItem",{attrs:{label:t.$L("\u9A8C\u8BC1\u7801"),prop:"code"}},[e("Input",{attrs:{placeholder:t.$L("\u8F93\u5165\u90AE\u7BB1\u9A8C\u8BC1\u7801")},model:{value:t.formDatum.code,callback:function(i){t.$set(t.formDatum,"code",i)},expression:"formDatum.code"}})],1):t._e()],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",disabled:t.isLdap},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const m={data(){return{loadIng:0,configLoad:0,formDatum:{newEmail:"",code:""},ruleDatum:{newEmail:[{validator:(t,s,e)=>{s.trim()===""?e(new Error(this.$L("\u8BF7\u8F93\u5165\u65B0\u90AE\u7BB1\u5730\u5740\uFF01"))):$A.isEmail(s.trim())?e():e(new Error(this.$L("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740\uFF01")))},required:!0,trigger:"change"}]},count:0,isSendButtonShow:!0,isRegVerify:0,sendBtnText:this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801")}},mounted(){this.getRegVerify()},computed:{...r(["formLabelPosition","formLabelWidth"]),isLdap(){return this.$store.state.userInfo.identity.includes("ldap")}},methods:{sendEmailCode(){this.$store.dispatch("call",{url:"users/email/send",data:{type:2,email:this.formDatum.newEmail},spinner:!0}).then(t=>{this.isSendButtonShow=!1,this.count=120,this.sendBtnText=this.count+" \u79D2";let s=setInterval(()=>{this.count--,this.sendBtnText=this.count+" \u79D2",this.count<=0&&(this.sendBtnText=this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801"),clearInterval(s))},1e3)}).catch(({msg:t})=>{$A.messageError(t)})},submitForm(){this.$refs.formDatum.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/email/edit",data:this.formDatum}).then(({data:s})=>{this.count=0,this.sendBtnText=this.$L("\u53D1\u9001\u9A8C\u8BC1\u7801"),$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("saveUserInfo",s),this.$refs.formDatum.resetFields(),this.isSendButtonShow=!0}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()},getRegVerify(){this.configLoad++,this.$store.dispatch("call",{url:"system/setting/email"}).then(({data:t})=>{this.isRegVerify=t.reg_verify==="open"}).finally(t=>{this.configLoad--})}}},a={};var u=n(m,o,l,!1,d,null,null,null);function d(t){for(let s in a)this[s]=a[s]}var f=function(){return u.exports}();export{f as default}; diff --git a/public/js/build/file.0a3f0003.js b/public/js/build/file.3dcec3eb.js similarity index 99% rename from public/js/build/file.0a3f0003.js rename to public/js/build/file.3dcec3eb.js index d9808f68a..01b2ffdcc 100644 --- a/public/js/build/file.0a3f0003.js +++ b/public/js/build/file.3dcec3eb.js @@ -1,4 +1,4 @@ -import{f as on,P as ag,m as ug,n as lg,_ as lu}from"./app.6c8b31b1.js";import{D as og}from"./index.31386d23.js";import{l as fg}from"./longpress.43ca7fd9.js";import{U as cg}from"./UserSelect.d62f565b.js";import{U as hg}from"./tip.517649f6.js";var Ci={exports:{}};/** +import{f as on,P as ag,m as ug,n as lg,_ as lu}from"./app.6910ca56.js";import{D as og}from"./index.8984a77c.js";import{l as fg}from"./longpress.43ca7fd9.js";import{U as cg}from"./UserSelect.1938cd94.js";import{U as hg}from"./tip.6872e3c6.js";var Ci={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -24,4 +24,4 @@ __p += '`),D&&(w+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+w+`return __p -}`;var F=iu(function(){return M(l,$+"return "+w).apply(s,o)});if(F.source=w,gi(F))throw F;return F}function dp(e){return B(e).toLowerCase()}function pp(e){return B(e).toUpperCase()}function gp(e,t,n){if(e=B(e),e&&(n||t===s))return ds(e);if(!e||!(t=ce(t)))return e;var i=ye(e),a=ye(t),l=ps(i,a),o=gs(i,a)+1;return it(i,l,o).join("")}function _p(e,t,n){if(e=B(e),e&&(n||t===s))return e.slice(0,vs(e)+1);if(!e||!(t=ce(t)))return e;var i=ye(e),a=gs(i,ye(t))+1;return it(i,0,a).join("")}function vp(e,t,n){if(e=B(e),e&&(n||t===s))return e.replace(gr,"");if(!e||!(t=ce(t)))return e;var i=ye(e),a=ps(i,ye(t));return it(i,a).join("")}function mp(e,t){var n=ou,i=fu;if(K(t)){var a="separator"in t?t.separator:a;n="length"in t?T(t.length):n,i="omission"in t?ce(t.omission):i}e=B(e);var l=e.length;if(yt(e)){var o=ye(e);l=o.length}if(n>=l)return e;var f=n-bt(i);if(f<1)return i;var p=o?it(o,0,f).join(""):e.slice(0,f);if(a===s)return p+i;if(o&&(f+=p.length-f),_i(a)){if(e.slice(f).search(a)){var v,m=p;for(a.global||(a=kr(a.source,B(Di.exec(a))+"g")),a.lastIndex=0;v=a.exec(m);)var w=v.index;p=p.slice(0,w===s?f:w)}}else if(e.indexOf(ce(a),f)!=f){var I=p.lastIndexOf(a);I>-1&&(p=p.slice(0,I))}return p+i}function wp(e){return e=B(e),e&&bu.test(e)?e.replace(ki,ql):e}var xp=Dt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),wi=sa("toUpperCase");function ru(e,t,n){return e=B(e),t=n?s:t,t===s?Nl(e)?Jl(e):kl(e):e.match(t)||[]}var iu=E(function(e,t){try{return oe(e,s,t)}catch(n){return gi(n)?n:new y(n)}}),Ip=He(function(e,t){return me(t,function(n){n=Me(n),Ne(e,n,di(e[n],e))}),e});function Lp(e){var t=e==null?0:e.length,n=A();return e=t?H(e,function(i){if(typeof i[1]!="function")throw new we(P);return[n(i[0]),i[1]]}):[],E(function(i){for(var a=-1;++aXe)return[];var n=Re,i=ee(e,Re);t=A(t),e-=Re;for(var a=Tr(i,t);++n0||t<0)?new R(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==s&&(t=T(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},R.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},R.prototype.toArray=function(){return this.take(Re)},Oe(R.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=u[i?"take"+(t=="last"?"Right":""):t],l=i||/^find/.test(t);!a||(u.prototype[t]=function(){var o=this.__wrapped__,f=i?[1]:arguments,p=o instanceof R,v=f[0],m=p||b(o),w=function(k){var D=a.apply(u,Ve([k],f));return i&&I?D[0]:D};m&&n&&typeof v=="function"&&v.length!=1&&(p=m=!1);var I=this.__chain__,$=!!this.__actions__.length,S=l&&!I,F=p&&!$;if(!l&&m){o=F?o:new R(this);var C=e.apply(o,f);return C.__actions__.push({func:Xn,args:[w],thisArg:s}),new xe(C,I)}return S&&F?e.apply(this,f):(C=this.thru(w),S?i?C.value()[0]:C.value():C)})}),me(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ln[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);u.prototype[e]=function(){var a=arguments;if(i&&!this.__chain__){var l=this.value();return t.apply(b(l)?l:[],a)}return this[n](function(o){return t.apply(b(o)?o:[],a)})}}),Oe(R.prototype,function(e,t){var n=u[t];if(n){var i=n.name+"";U.call(kt,i)||(kt[i]=[]),kt[i].push({name:t,func:n})}}),kt[Hn(s,at).name]=[{name:"wrapper",func:s}],R.prototype.clone=mo,R.prototype.reverse=wo,R.prototype.value=xo,u.prototype.at=Xc,u.prototype.chain=Qc,u.prototype.commit=Vc,u.prototype.next=jc,u.prototype.plant=th,u.prototype.reverse=nh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=rh,u.prototype.first=u.prototype.head,Yt&&(u.prototype[Yt]=eh),u},Tt=Xl();lt?((lt.exports=Tt)._=Tt,Ir._=Tt):V._=Tt}).call(on)})(Ci,Ci.exports);var dg=function(){var r=this,h=r.$createElement,s=r._self._c||h;return s("div",{staticClass:"page-file"},[s("PageTitle",{attrs:{title:r.$L("\u6587\u4EF6")}}),s("div",{ref:"fileWrapper",staticClass:"file-wrapper"},[s("div",{staticClass:"file-head"},[s("div",{staticClass:"file-nav"},[s("div",{staticClass:"common-nav-back portrait",on:{click:function(c){return r.goForward({name:"manage-application"},!0)}}},[s("i",{staticClass:"taskfont"},[r._v("\uE676")])]),s("h1",[r._v(r._s(r.$L("\u6587\u4EF6")))]),r.loadIng==0?s("div",{staticClass:"file-refresh",on:{click:r.getFileList}},[s("i",{staticClass:"taskfont"},[r._v("\uE6AE")])]):r._e()]),r.uploadList.length>0?s("div",{staticClass:"file-status",on:{click:function(c){r.uploadShow=!0,r.packShow=!1}}},[r.uploadList.find(function(c){var x=c.status;return x!=="finished"})?s("Loading"):s("Button",{attrs:{shape:"circle",icon:"md-arrow-round-up"}})],1):r._e(),r.packList.length>0?s("div",{staticClass:"file-status",on:{click:function(c){r.packShow=!0,r.uploadShow=!1}}},[r.packList.find(function(c){var x=c.status;return x!=="finished"})?s("Loading"):s("Button",{attrs:{shape:"circle",icon:"md-arrow-round-down"}})],1):r._e(),s("div",{class:["file-search",r.searchKey?"has-value":""],on:{click:r.onSearchFocus,mouseenter:r.onSearchFocus}},[s("Input",{ref:"searchInput",attrs:{suffix:"ios-search",placeholder:r.$L("\u641C\u7D22\u540D\u79F0")},on:{"on-change":r.onSearchChange},model:{value:r.searchKey,callback:function(c){r.searchKey=c},expression:"searchKey"}})],1),s("div",{staticClass:"file-add"},[s("Button",{attrs:{shape:"circle",icon:"md-add"},on:{click:function(c){return c.stopPropagation(),r.handleRightClick(c,null,!0)}}})],1)]),s("div",{staticClass:"file-navigator"},[s("ul",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText||!r.selectIds.length&&!r.shearFirst,expression:"showBtnText || (!selectIds.length && !shearFirst)"}],staticClass:"scrollbar-hidden"},[s("li",{on:{click:function(c){return r.browseFolder(0)}}},[s("span",[r._v(r._s(r.$L("\u5168\u90E8\u6587\u4EF6")))])]),r.searchKey?s("li",[r._v(r._s(r.$L("\u641C\u7D22"))+' "'+r._s(r.searchKey)+'"')]):r._l(r.navigator,function(c){return s("li",{ref:`nav_${c.id}`,refInFor:!0,on:{click:function(x){return r.browseFolder(c.id)}}},[c.share?s("i",{staticClass:"taskfont"},[r._v("\uE63F")]):r._e(),s("span",{attrs:{title:c.name}},[r._v(r._s(c.name))]),c.share&&c.permission==0?s("span",{staticClass:"readonly"},[r._v(r._s(r.$L("\u53EA\u8BFB")))]):r._e()])})],2),r.shearFirst?[s("Button",{style:{marginLeft:r.showBtnText?"12px":0},attrs:{disabled:r.shearFirst.pid==r.pid,size:"small",type:"primary"},on:{click:r.shearTo}},[s("div",{staticClass:"file-shear"},[s("span",[r._v(r._s(r.$L("\u7C98\u8D34")))]),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v('"'),s("em",[r._v(r._s(r.shearFirst.name))]),r._v('"')]),r.shearIds.length>1?s("span",[r._v(r._s(r.$L("\u7B49"))+r._s(r.shearIds.length)+r._s(r.$L("\u4E2A\u6587\u4EF6")))]):r._e()])]),s("Button",{attrs:{type:"primary",size:"small"},on:{click:r.clearShear}},[r._v(r._s(r.$L("\u53D6\u6D88\u526A\u5207")))])]:r.selectIds.length>0?[s("Button",{style:{marginLeft:r.showBtnText?"12px":0},attrs:{size:"small",type:"info"},on:{click:function(c){return r.handleContextClick("shearSelect")}}},[s("Icon",{attrs:{type:"ios-cut"}}),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v(r._s(r.$L("\u526A\u5207")))])],1),s("Button",{attrs:{disabled:r.compressedSownloadDisabled,size:"small",type:"info"},on:{click:function(c){return r.downloadZipFile(r.selectIds)}}},[s("Icon",{attrs:{type:"ios-download"}}),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v(r._s(r.$L("\u6253\u5305\u4E0B\u8F7D")))])],1),s("Button",{attrs:{size:"small",type:"error"},on:{click:function(c){return r.deleteFile(r.selectIds)}}},[s("Icon",{attrs:{type:"ios-trash"}}),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v(r._s(r.$L("\u5220\u9664")))])],1),s("Button",{attrs:{type:"primary",size:"small"},on:{click:r.clearSelect}},[r._v(" "+r._s(r.showBtnText?r.$L("\u53D6\u6D88\u9009\u62E9"):r.$L("\u53D6\u6D88"))+" ")])]:r._e(),r.loadIng>0?s("div",{staticClass:"nav-load"},[s("Loading")],1):r._e(),s("div",{staticClass:"flex-full"}),r.hasShareFile?s("div",{staticClass:"only-checkbox"},[s("Checkbox",{model:{value:r.hideShared,callback:function(c){r.hideShared=c},expression:"hideShared"}},[r._v(" "+r._s(r.showBtnText?r.$L("\u4EC5\u663E\u793A\u6211\u7684"):r.$L("\u4EC5\u6211\u7684"))+" ")])],1):r._e(),s("div",{class:["switch-button",r.tableMode]},[s("div",{on:{click:function(c){r.tableMode="block"}}},[s("i",{staticClass:"taskfont"},[r._v("\uE60C")])]),s("div",{on:{click:function(c){r.tableMode="table"}}},[s("i",{staticClass:"taskfont"},[r._v("\uE66A")])])])],2),s("div",{staticClass:"file-drag",on:{drop:function(c){return c.preventDefault(),r.filePasteDrag(c,"drag")},dragover:function(c){return c.preventDefault(),r.fileDragOver(!0,c)},dragleave:function(c){return c.preventDefault(),r.fileDragOver(!1,c)}}},[r.tableMode==="table"?s("div",{staticClass:"file-table",on:{contextmenu:function(c){return c.preventDefault(),r.handleContextmenu.apply(null,arguments)}}},[s("Table",{attrs:{columns:r.columns,data:r.fileList,height:r.tableHeight,"no-data-text":r.$L("\u6CA1\u6709\u4EFB\u4F55\u6587\u4EF6"),"context-menu":"",stripe:""},on:{"on-cell-click":r.clickRow,"on-contextmenu":r.handleContextMenu,"on-select":r.handleTableSelect,"on-select-cancel":r.handleTableSelect,"on-select-all-cancel":r.handleTableSelect,"on-select-all":r.handleTableSelect,"on-sort-change":r.handleTableSort}})],1):[r.fileList.length==0&&r.loadIng==0?s("div",{staticClass:"file-no",on:{contextmenu:function(c){return c.preventDefault(),r.handleContextmenu.apply(null,arguments)}}},[s("i",{staticClass:"taskfont"},[r._v("\uE60B")]),s("p",[r._v(r._s(r.$L("\u6CA1\u6709\u4EFB\u4F55\u6587\u4EF6")))])]):s("div",{staticClass:"file-list",on:{contextmenu:function(c){return c.preventDefault(),r.handleContextmenu.apply(null,arguments)}}},[s("ul",r._l(r.fileList,function(c){return s("li",[s("div",{directives:[{name:"longpress",rawName:"v-longpress",value:r.handleLongpress,expression:"handleLongpress"}],staticClass:"file-item",class:{shear:r.shearIds.includes(c.id),highlight:r.selectIds.includes(c.id),operate:r.contextMenuVisible&&c.id===r.contextMenuItem.id},attrs:{"data-id":c.id},on:{click:function(x){return r.dropFile(c,"openCheckMenu")}}},[s("div",{staticClass:"file-check",class:{"file-checked":r.selectIds.includes(c.id)},on:{click:function(x){return x.stopPropagation(),r.dropFile(c,"select")}}},[s("Checkbox",{attrs:{value:r.selectIds.includes(c.id)}})],1),s("div",{staticClass:"file-menu",on:{click:function(x){return x.stopPropagation(),r.handleRightClick(x,c)}}},[s("Icon",{attrs:{type:"ios-more"}})],1),s("div",{class:`no-dark-before file-icon ${c.type}${c.share?" share":""}`},[c.share?[c.userid!=r.userId?s("UserAvatarTip",{staticClass:"share-avatar",attrs:{userid:c.userid,size:20}},[s("p",[r._v(r._s(r.$L("\u5171\u4EAB\u6743\u9650"))+": "+r._s(r.$L(c.permission==1?"\u8BFB/\u5199":"\u53EA\u8BFB")))])]):s("div",{staticClass:"share-icon no-dark-content"},[s("i",{staticClass:"taskfont"},[r._v("\uE757")])])]:r.isParentShare?[s("UserAvatarTip",{staticClass:"share-avatar",attrs:{userid:c.created_id,size:20}},[c.created_id!=c.userid?s("p",[s("strong",[r._v(r._s(r.$L("\u6210\u5458\u521B\u5EFA\u4E8E"))+": "+r._s(c.created_at))])]):s("p",[r._v(r._s(r.$L("\u6240\u6709\u8005\u521B\u5EFA\u4E8E"))+": "+r._s(c.created_at))])])]:r._e()],2),c._edit?s("div",{staticClass:"file-input"},[s("Input",{ref:"input_"+c.id,refInFor:!0,attrs:{size:"small",disabled:!!c._load,parser:r.onParser},on:{"on-blur":function(x){return r.onBlur(c)},"on-keyup":function(x){return r.onKeyup(x,c)}},model:{value:c.newname,callback:function(x){r.$set(c,"newname",x)},expression:"item.newname"}}),c._load?s("div",{staticClass:"file-load"},[s("Loading")],1):r._e()],1):s("div",{staticClass:"file-name",attrs:{title:c.name}},[r._v(r._s(r.$A.getFileName(c)))])])])}),0)])],r.dialogDrag?s("div",{staticClass:"drag-over",on:{click:function(c){r.dialogDrag=!1}}},[s("div",{staticClass:"drag-text"},[r._v(r._s(r.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):r._e()],2),s("div",{staticClass:"file-menu",style:r.contextMenuStyles},[s("Dropdown",{attrs:{trigger:"custom",visible:r.contextMenuVisible,"transfer-class-name":"page-file-dropdown-menu",transfer:""},on:{"on-click":r.handleContextClick,"on-clickoutside":r.handleClickContextMenuOutside,"on-visible-change":r.handleVisibleChangeMenu}},[s("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[r.contextMenuItem.id?[s("DropdownItem",{staticClass:"item-open",attrs:{name:"open"}},[r._v(" "+r._s(r.$L("\u6253\u5F00"))+" "),s("div",{staticClass:"open-name"},[r._v("\u201C"+r._s(r.contextMenuItem.name)+"\u201D")])]),r.searchKey?s("DropdownItem",{staticClass:"item-open",attrs:{name:"upperFolder"}},[r._v(" "+r._s(r.$L("\u5728\u4E0A\u5C42\u6587\u4EF6\u5939\u4E2D\u663E\u793A"))+" ")]):r._e(),s("DropdownItem",{attrs:{name:"select"}},[r._v(r._s(r.$L(r.selectIds.includes(r.contextMenuItem.id)?"\u53D6\u6D88\u9009\u62E9":"\u9009\u62E9")))]),s("Dropdown",{attrs:{placement:"right-start",transfer:""}},[s("DropdownItem",{attrs:{divided:"",name:"new:"},nativeOn:{click:function(c){c.stopPropagation()}}},[s("div",{staticClass:"arrow-forward-item"},[r._v(r._s(r.$L("\u65B0\u5EFA"))),s("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),s("DropdownMenu",{staticClass:"page-file-dropdown-menu",attrs:{slot:"list"},slot:"list"},r._l(r.types,function(c,x){return c.label?s("DropdownItem",{key:x,attrs:{divided:!!c.divided,name:`new:${c.value}`}},[s("div",{class:`no-dark-before file-item file-icon ${c.value}`},[r._v(r._s(r.$L(c.label)))])]):r._e()}),1)],1),s("DropdownItem",{attrs:{name:"rename",divided:""}},[r._v(r._s(r.$L("\u91CD\u547D\u540D")))]),s("DropdownItem",{attrs:{name:"copy",disabled:r.contextMenuItem.type=="folder"}},[r._v(r._s(r.$L("\u590D\u5236")))]),s("DropdownItem",{attrs:{name:"shear",disabled:r.contextMenuItem.userid!=r.userId}},[r._v(r._s(r.$L("\u526A\u5207")))]),r.contextMenuItem.userid==r.userId?s("DropdownItem",{attrs:{name:"share",divided:""}},[r._v(r._s(r.$L("\u5171\u4EAB")))]):r.contextMenuItem.share?s("DropdownItem",{attrs:{name:"outshare",divided:""}},[r._v(r._s(r.$L("\u9000\u51FA\u5171\u4EAB")))]):r._e(),s("DropdownItem",{attrs:{name:"send",disabled:r.contextMenuItem.type=="folder"}},[r._v(r._s(r.$L("\u53D1\u9001")))]),s("DropdownItem",{attrs:{name:"link",divided:r.contextMenuItem.userid!=r.userId&&!r.contextMenuItem.share,disabled:r.contextMenuItem.type=="folder"}},[r._v(r._s(r.$L("\u94FE\u63A5")))]),s("DropdownItem",{attrs:{name:"download",disabled:r.contextMenuItem.ext==""||r.contextMenuItem.userid!=r.userId&&r.contextMenuItem.permission==0}},[r._v(r._s(r.$L("\u4E0B\u8F7D")))]),s("DropdownItem",{attrs:{name:"downloadzip",disabled:r.contextMenuItem.userid!=r.userId&&r.contextMenuItem.permission==0}},[r._v(r._s(r.$L("\u6253\u5305\u4E0B\u8F7D")))]),s("DropdownItem",{staticStyle:{color:"red"},attrs:{name:"delete",divided:""}},[r._v(r._s(r.$L("\u5220\u9664")))])]:r._l(r.types,function(c,x){return c.label?s("DropdownItem",{key:x,attrs:{divided:!!c.divided,name:`new:${c.value}`}},[s("div",{class:`no-dark-before file-item file-icon ${c.value}`},[r._v(r._s(r.$L(c.label)))])]):r._e()})],2)],1)],1)]),r.uploadShow&&r.uploadList.length>0?s("div",{staticClass:"file-upload-list"},[s("div",{staticClass:"upload-wrap"},[s("div",{staticClass:"title"},[r._v(" "+r._s(r.$L("\u4E0A\u4F20\u5217\u8868"))+" ("+r._s(r.uploadList.length)+") "),r.uploadList.find(function(c){var x=c.status;return x==="finished"})?s("em",{on:{click:r.uploadClear}},[r._v(r._s(r.$L("\u6E05\u7A7A\u5DF2\u5B8C\u6210")))]):r._e()]),s("ul",{staticClass:"content"},r._l(r.uploadList,function(c,x){return x<100?s("li",{key:x},[s("AutoTip",{staticClass:"file-name"},[r._v(r._s(r.uploadName(c)))]),c.status==="finished"&&c.response&&c.response.ret!==1?s("AutoTip",{staticClass:"file-error"},[r._v(r._s(c.response.msg))]):s("Progress",{attrs:{percent:r.uploadPercentageParse(c.percentage),"stroke-width":5}}),s("Icon",{staticClass:"file-close",attrs:{type:"ios-close-circle-outline"},on:{click:function(O){return r.uploadList.splice(x,1)}}})],1):r._e()}),0),s("Icon",{staticClass:"close",attrs:{type:"md-close"},on:{click:function(c){r.uploadShow=!1}}})],1)]):r._e(),r.packShow&&r.packList.length>0?s("div",{staticClass:"file-upload-list"},[s("div",{staticClass:"upload-wrap"},[s("div",{staticClass:"title"},[s("span",[r._v(r._s(r.$L("\u6253\u5305\u5217\u8868"))+"("+r._s(r.packList.length)+")")]),r.packList.find(function(c){var x=c.status;return x==="finished"})?s("em",{on:{click:r.packClear}},[r._v(r._s(r.$L("\u6E05\u7A7A\u5DF2\u5B8C\u6210")))]):r._e()]),s("ul",{staticClass:"content"},r._l(r.packList,function(c,x){return x<100?s("li",{key:x},[s("AutoTip",{staticClass:"file-name"},[c.status!=="finished"?s("span",[r._v(r._s(c.name))]):s("a",{attrs:{href:"javascript:void(0)"},on:{click:function(O){return r.downloadPackFile(c.name)}}},[r._v(r._s(c.name))])]),c.status==="finished"&&c.response&&c.response.ret!==1?s("AutoTip",{staticClass:"file-error"},[r._v(r._s(c.response.msg))]):s("Progress",{attrs:{percent:r.packPercentageParse(c.percentage),"stroke-width":5}}),s("Icon",{staticClass:"file-close",attrs:{type:"ios-close-circle-outline"},on:{click:function(O){return r.packList.splice(x,1)}}})],1):r._e()}),0),s("Icon",{staticClass:"close",attrs:{type:"md-close"},on:{click:function(c){r.packShow=!1}}})],1)]):r._e(),s("Upload",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"fileUpload",attrs:{name:"files",action:r.actionUrl,headers:r.headers,multiple:!0,webkitdirectory:!1,format:r.uploadFormat,accept:r.uploadAccept,"show-upload-list":!1,"max-size":r.maxSize,"on-progress":r.handleProgress,"on-success":r.handleSuccess,"on-error":r.handleError,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload}}),s("Upload",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"dirUpload",attrs:{name:"files",action:r.actionUrl,headers:r.headers,multiple:!0,webkitdirectory:!0,format:r.uploadFormat,accept:r.uploadAccept,"show-upload-list":!1,"max-size":r.maxSize,"on-progress":r.handleProgress,"on-success":r.handleSuccess,"on-error":r.handleError,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload}}),s("Modal",{attrs:{title:r.$L("\u5171\u4EAB\u8BBE\u7F6E"),"mask-closable":!1,"footer-hide":""},model:{value:r.shareShow,callback:function(c){r.shareShow=c},expression:"shareShow"}},[s("Form",{staticClass:"page-file-share-form",attrs:{model:r.shareInfo,inline:""},nativeOn:{submit:function(c){c.preventDefault()}}},[s("FormItem",{staticClass:"share-userid",attrs:{prop:"userids"}},[s("RadioGroup",{model:{value:r.shareInfo.type,callback:function(c){r.$set(r.shareInfo,"type",c)},expression:"shareInfo.type"}},[s("Radio",{attrs:{label:"all"}},[r._v(r._s(r.$L("\u6240\u6709\u4EBA")))]),s("Radio",{attrs:{label:"custom"}},[r._v(r._s(r.$L("\u6307\u5B9A\u6210\u5458")))])],1),r.shareInfo.type==="custom"?s("UserSelect",{attrs:{disabledChoice:r.shareAlready,"multiple-max":100,placeholder:r.$L("\u9009\u62E9\u5171\u4EAB\u6210\u5458"),"avatar-size":24,border:""},model:{value:r.shareInfo.userids,callback:function(c){r.$set(r.shareInfo,"userids",c)},expression:"shareInfo.userids"}}):r._e()],1),s("FormItem",[s("Select",{attrs:{placeholder:r.$L("\u6743\u9650")},model:{value:r.shareInfo.permission,callback:function(c){r.$set(r.shareInfo,"permission",c)},expression:"shareInfo.permission"}},[s("Option",{attrs:{value:1}},[r._v(r._s(r.$L("\u8BFB/\u5199")))]),s("Option",{attrs:{value:0}},[r._v(r._s(r.$L("\u53EA\u8BFB")))])],1)],1),s("FormItem",[s("Button",{attrs:{type:"primary",loading:r.shareLoad>0},on:{click:r.onShare}},[r._v(r._s(r.$L("\u5171\u4EAB")))])],1)],1),r.shareList.length>0?s("div",{staticClass:"page-file-share-items"},[s("div",{staticClass:"page-file-share-title"},[r._v(r._s(r.$L("\u5DF2\u5171\u4EAB\u6210\u5458"))+":")]),s("ul",{staticClass:"page-file-share-list"},r._l(r.shareList,function(c){return s("li",[c.userid==0?s("div",{staticClass:"all-avatar"},[s("EAvatar",{staticClass:"avatar-text",attrs:{icon:"el-icon-s-custom"}}),s("span",{staticClass:"avatar-name"},[r._v(r._s(r.$L("\u6240\u6709\u4EBA")))])],1):s("UserAvatar",{attrs:{size:32,userid:c.userid,showName:""}}),s("Select",{attrs:{placeholder:r.$L("\u6743\u9650")},on:{"on-change":function(x){return r.upShare(c)}},model:{value:c.permission,callback:function(x){r.$set(c,"permission",x)},expression:"item.permission"}},[s("Option",{attrs:{value:1}},[r._v(r._s(r.$L("\u8BFB/\u5199")))]),s("Option",{attrs:{value:0}},[r._v(r._s(r.$L("\u53EA\u8BFB")))]),s("Option",{staticClass:"delete",attrs:{value:-1}},[r._v(r._s(r.$L("\u5220\u9664")))])],1)],1)}),0)]):r._e()],1),s("UserSelect",{ref:"sendFile",attrs:{"multiple-max":50,title:r.$L("\u53D1\u9001\u6587\u4EF6"),"before-submit":r.onSendFile,"show-select-all":!1,"show-dialog":"",module:""},model:{value:r.sendData,callback:function(c){r.sendData=c},expression:"sendData"}}),s("Modal",{attrs:{title:r.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:r.linkShow,callback:function(c){r.linkShow=c},expression:"linkShow"}},[s("div",[s("div",{staticStyle:{margin:"-10px 0 8px"}},[r._v(r._s(r.$L("\u6587\u4EF6\u540D\u79F0"))+": "+r._s(r.linkData.name))]),s("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":r.linkFocus},model:{value:r.linkData.url,callback:function(c){r.$set(r.linkData,"url",c)},expression:"linkData.url"}}),s("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[r._v(" "+r._s(r.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))+" "),s("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":r.$L("\u786E\u5B9A"),"cancel-text":r.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(c){return r.linkGet(!0)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[s("p",[s("strong",[r._v(r._s(r.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),s("a",{attrs:{href:"javascript:void(0)"}},[r._v(r._s(r.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1),s("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[s("Button",{attrs:{type:"default"},on:{click:function(c){r.linkShow=!1}}},[r._v(r._s(r.$L("\u53D6\u6D88")))]),s("Button",{attrs:{type:"primary",loading:r.linkLoad>0},on:{click:r.linkCopy}},[r._v(r._s(r.$L("\u590D\u5236")))])],1)]),s("DrawerOverlay",{staticClass:"page-file-drawer",attrs:{beforeClose:r.fileBeforeClose,"mask-closable":!1},model:{value:r.fileShow,callback:function(c){r.fileShow=c},expression:"fileShow"}},[r.isPreview?s("FilePreview",{attrs:{file:r.fileInfo}}):s("FileContent",{ref:"fileContent",attrs:{file:r.fileInfo},model:{value:r.fileShow,callback:function(c){r.fileShow=c},expression:"fileShow"}})],1),s("PreviewImage",{attrs:{index:r.imageIndex,list:r.imageList},model:{value:r.imageShow,callback:function(c){r.imageShow=c},expression:"imageShow"}}),s("Modal",{attrs:{title:r.$L(r.pasteTitle),"cancel-text":r.$L("\u53D6\u6D88"),"ok-text":r.$L("\u7ACB\u5373\u4E0A\u4F20"),"enter-ok":!0},on:{"on-ok":r.pasteSend},model:{value:r.pasteShow,callback:function(c){r.pasteShow=c},expression:"pasteShow"}},[s("ul",{staticClass:"dialog-wrapper-paste",class:r.pasteWrapperClass},r._l(r.pasteItem,function(c){return s("li",[c.type=="image"?s("img",{attrs:{src:c.result}}):s("div",[r._v(r._s(r.$L("\u6587\u4EF6"))+": "+r._s(c.name)+" ("+r._s(r.$A.bytesToSize(c.size))+")")])])}),0)])],1)},pg=[];const gg=()=>lu(()=>import("./FilePreview.22c023a8.js"),["js/build/FilePreview.22c023a8.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),_g=()=>lu(()=>import("./FileContent.f5b3c8be.js"),["js/build/FileContent.f5b3c8be.js","js/build/FileContent.c015b499.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),vt={sort:null,mode:null,shared:null},vg={components:{UserAvatarTip:hg,UserSelect:cg,PreviewImage:ag,FilePreview:gg,DrawerOverlay:og,FileContent:_g},directives:{longpress:fg},data(){return{packList:[],packShow:!1,loadIng:0,searchKey:"",searchTimeout:null,types:[{value:"folder",label:"\u65B0\u5EFA\u6587\u4EF6\u5939",name:"\u6587\u4EF6\u5939"},{value:"upload",label:"\u4E0A\u4F20\u6587\u4EF6",name:null,divided:!0},{value:"updir",label:"\u4E0A\u4F20\u6587\u4EF6\u5939",name:null},{value:"document",label:"\u6587\u672C",name:"\u6587\u672C",divided:!0},{value:"drawio",label:"\u56FE\u8868",name:"\u56FE\u8868"},{value:"mind",label:"\u601D\u7EF4\u5BFC\u56FE",name:"\u5BFC\u56FE"},{value:"word",label:"Word \u6587\u6863",name:"Word",divided:!0},{value:"excel",label:"Excel \u5DE5\u4F5C\u8868",name:"Excel"},{value:"ppt",label:"PPT \u6F14\u793A\u6587\u7A3F",name:"PPT"}],tableMode:"",hideShared:!1,columns:[],shareShow:!1,shareInfo:{id:0,type:"all",userid:0,permission:1},shareList:[],shareLoad:0,sendFileId:0,sendData:[],linkShow:!1,linkData:{},linkLoad:0,fileShow:!1,fileInfo:{permission:-1},imageShow:!1,imageIndex:0,imageList:[],uploadDir:!1,uploadIng:0,uploadShow:!1,uploadList:[],uploadFormat:[],uploadAccept:"",contextMenuItem:{},contextMenuVisible:!1,contextMenuStyles:{top:0,left:0},shearIds:[],selectIds:[],dialogDrag:!1,pasteShow:!1,pasteFile:[],pasteItem:[]}},async beforeRouteEnter(r,h,s){vt.sort=await $A.IDBJson("cacheFileSort"),vt.mode=await $A.IDBString("fileTableMode"),vt.shared=await $A.IDBBoolean("fileHideShared"),s()},created(){this.tableMode=vt.mode,this.hideShared=vt.shared,this.columns=[{type:"selection",width:50,align:"right"},{title:this.$L("\u6587\u4EF6\u540D"),key:"name",minWidth:300,sortable:!0,render:(r,{row:h})=>{let s=[];if(!/^\d+$/.test(h.id))return s.push(r("Input",{props:{elementId:"input_"+h.id,value:h.newname,autofocus:!0,disabled:!!h._load,parser:this.onParser},style:{width:"auto"},on:{"on-change":x=>{h.newname=x.target.value},"on-blur":()=>{const x=this.fileLists.find(({id:O})=>O==h.id);x&&(x.newname=h.newname,this.onBlur(x))},"on-enter":()=>{const x=this.fileLists.find(({id:O})=>O==h.id);x&&(x.newname=h.newname,this.onEnter(x))}}})),r("div",{class:"file-nbox"},[r("div",{class:`no-dark-before file-name file-icon ${h.type}`},s)]);{s.push(r("QuickEdit",{props:{value:h.name,autoEdit:!!h._edit,clickOutSide:!1,parser:this.onParser},on:{"on-edit-change":G=>{const ge=this.fileLists.find(({id:Ye})=>Ye==h.id);ge&&setTimeout(()=>{this.setEdit(ge.id,G)},100)},"on-update":(G,ge)=>{const Ye=this.fileLists.find(({id:mt})=>mt==h.id);Ye&&Ye._edit===!0&&(Ye.newname=G,this.onEnter(Ye)),ge()}}},[r("AutoTip",{props:{placement:"right"}},$A.getFileName(h))]));const x=[];h.share?h.userid!=this.userId?x.push(r("UserAvatar",{props:{userid:h.userid,size:20}})):x.push(r("i",{class:"taskfont",domProps:{innerHTML:""}})):this.isParentShare&&x.push(r("UserAvatar",{props:{userid:h.created_id,size:20}},[h.created_id!=h.userid?r("p",[r("strong",this.$L("\u6210\u5458\u521B\u5EFA\u4E8E")+": "+h.created_at)]):r("p",this.$L("\u6240\u6709\u8005\u521B\u5EFA\u4E8E")+": "+h.created_at)]));const O=this.shearIds.includes(h.id)?" shear":"",P=h.share?" share":"";return r("div",{class:`file-nbox${O}`,attrs:{"data-id":h.id}},[r("div",{class:`no-dark-before file-name file-icon ${h.type}${P}`},s),x])}}},{title:this.$L("\u5927\u5C0F"),key:"size",width:110,resizable:!0,sortable:!0,render:(r,{row:h})=>h.type=="folder"?r("div","-"):r("AutoTip",$A.bytesToSize(h.size))},{title:this.$L("\u7C7B\u578B"),key:"type",width:110,resizable:!0,sortable:!0,render:(r,{row:h})=>{let s=this.types.find(({value:c,name:x})=>c==h.type&&x);return s?r("AutoTip",this.$L(s.name)):r("div",(h.ext||h.type).toUpperCase())}},{title:this.$L("\u6240\u6709\u8005"),key:"userid",width:130,resizable:!0,sortable:!0,render:(r,{row:h})=>r("UserAvatar",{props:{size:18,userid:h.userid,showIcon:!1,showName:!0}})},{title:this.$L("\u6700\u540E\u4FEE\u6539"),key:"updated_at",width:168,resizable:!0,sortable:!0}].map(r=>(r.key===vt.sort.key&&(r.sortType=vt.sort.order),r))},mounted(){this.uploadAccept=this.uploadFormat.map(r=>"."+r).join(",")},activated(){this.getFileList()},computed:{...ug(["systemConfig","userIsAdmin","userInfo","fileLists","wsOpenNum","windowWidth","filePackLists"]),pid(){const{folderId:r}=this.$route.params;return parseInt(/^\d+$/.test(r)?r:0)},fid(){const{fileId:r}=this.$route.params;return parseInt(/^\d+$/.test(r)?r:0)},actionUrl(){return $A.apiUrl("file/content/upload?pid="+this.pid)},headers(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},shareAlready(){let r=this.shareList?this.shareList.map(({userid:h})=>h):[];return this.shareInfo.userid&&r.push(this.shareInfo.userid),r},fileList(){const{fileLists:r,searchKey:h,hideShared:s,pid:c,selectIds:x,userId:O}=this;return $A.cloneJSON(Ci.exports.sortBy(r.filter(G=>s&&G.userid!=O&&G.created_id!=O?!1:h?G.name.indexOf(h)!==-1:G.pid==c),G=>(G.type=="folder"?"a":"b")+G.name)).map(G=>(G._checked=x.includes(G.id),G))},hasShareFile(){const{fileLists:r,userId:h}=this;return r.findIndex(s=>s.share&&s.userid!=h)!==-1},shearFirst(){const{fileLists:r,shearIds:h}=this;return h.length===0?null:r.find(s=>s.id==h[0])},navigator(){let{pid:r,fileLists:h}=this,s=[];for(;r>0;){let c=h.find(({id:x,permission:O})=>x==r&&O>-1);c?(s.unshift(c),r=c.pid):r=0}return s},isPreview(){return this.windowPortrait&&this.fileInfo.type!="document"||this.fileInfo.permission===0},isParentShare(){const{navigator:r}=this;return!!r.find(({share:h})=>h)},pasteTitle(){const{pasteItem:r}=this;let h=r.find(({type:c})=>c=="image"),s=r.find(({type:c})=>c!="image");return h&&s?"\u4E0A\u4F20\u6587\u4EF6/\u56FE\u7247":h?"\u4E0A\u4F20\u56FE\u7247":"\u4E0A\u4F20\u6587\u4EF6"},pasteWrapperClass(){return this.pasteItem.find(({type:r})=>r!=="image")?["multiple"]:[]},tableHeight(){return this.windowHeight-150},compressedSownloadDisabled(){var r;return!!((r=this.fileList)!=null&&r.find(h=>h._checked&&h.permission<1))},maxSize(){var r;return(r=this.systemConfig)!=null&&r.file_upload_limit?this.systemConfig.file_upload_limit*1024:1024e3},showBtnText(){return this.windowWidth>600}},watch:{pid(){this.searchKey="",this.selectIds=[],this.getFileList()},fid(){this.openFileJudge()},tableMode(r){$A.IDBSave("fileTableMode",r)},hideShared(r){$A.IDBSave("fileHideShared",r)},fileShow(r){r||(this.browseFile(0),this.windowPortrait&&$A.onBlur(!0))},imageShow(r){r||this.browseFile(0)},navigator:{handler(){this.$nextTick(r=>{this.$refs[`nav_${this.pid}`]&&$A.scrollToView(this.$refs[`nav_${this.pid}`][0],!1)})},immediate:!0},selectIds:{handler(r){r.length>0&&(this.shearIds=[])},deep:!0},shearIds:{handler(r){r.length>0&&(this.selectIds=[])},deep:!0},wsOpenNum(r){r<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout(()=>{this.$route.name=="manage-file"&&this.getFileList()},5e3))},filePackLists:{handler(){this.updatePackProgress()},deep:!0}},methods:{getFileList(){this.$route.name==="manage-file"&&(this.loadIng++,this.$store.dispatch("getFiles",this.pid).then(async()=>{this.loadIng--,this.openFileJudge(),this.shakeFile(this.$route.params.shakeId),await $A.IDBSet("fileFolderId",this.pid)}).catch(({msg:r})=>{this.loadIng--,$A.modalError({content:r,onOk:()=>{this.browseFolder(0)}})}))},addFile(r){if(r){if(r=="upload"){this.uploadDir=!1,this.$refs.fileUpload.handleClick();return}else if(r=="updir"){this.uploadDir=!0,this.$refs.dirUpload.handleClick();return}}else return;let h=$A.randomString(8);this.fileLists.push({_edit:!0,pid:this.pid,id:h,type:r,name:"",userid:this.userId,newname:this.$L("\u672A\u547D\u540D")}),this.autoBlur(h)},handleLongpress(r,h){const s=$A.getAttr(h,"data-id"),c=this.fileList.find(x=>x.id==s);!c||this.handleRightClick(r,c)},handleContextmenu(r){this.windowLandscape&&this.handleRightClick(r)},handleRightClick(r,h,s){this.contextMenuItem=$A.isJson(h)?h:{},this.contextMenuVisible&&this.handleClickContextMenuOutside(),this.$nextTick(()=>{const x=this.$refs.fileWrapper.getBoundingClientRect();this.contextMenuStyles={left:`${r.clientX-x.left}px`,top:`${r.clientY-x.top}px`},s===!0&&(this.contextMenuStyles.top=`${r.target.clientHeight+r.target.offsetTop-5}px`),this.contextMenuVisible=!0})},browseFolder(r,h=null){r>0?this.goForward({name:"manage-file",params:{folderId:r,fileId:null,shakeId:h}}):(this.searchKey="",this.goForward({name:"manage-file"}))},browseFile(r){r>0?this.goForward({name:"manage-file",params:{folderId:this.pid,fileId:r}}):this.browseFolder(this.pid)},openFileJudge(){if(this.$route.name!=="manage-file"){this.fileShow=!1,this.imageShow=!1;return}if(this.fid<=0){this.fileShow=!1,this.imageShow=!1;return}const r=this.fileList.find(({id:h})=>h===this.fid);if(!r){this.fileShow=!1,this.imageShow=!1;return}if(r.image_url){const h=this.fileList.filter(({image_url:s})=>!!s);if(h.length>0){this.imageIndex=h.findIndex(({id:s})=>r.id===s),this.imageList=h.map(s=>s.image_width?{src:s.image_url,width:s.image_width,height:s.image_height}:s.image_url),this.imageShow=!0;return}}if(this.$Electron||this.$isEEUiApp){this.openFileSingle(r);return}this.fileInfo=r,this.fileShow=!0},openFileSingle(r){const h=`/single/file/${r.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${r.id}`,path:h,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(r),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:r.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(r),url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${h}`}}):window.open($A.apiUrl(`..${h}`)),this.browseFile(0)},clickRow(r,h){if(this.contextMenuVisible){this.handleClickContextMenuOutside();return}h.type=="selection"?this.dropFile(r,"select"):this.dropFile(r,"open")},handleContextMenu(r,h){this.handleRightClick(h,this.fileLists.find(({id:s})=>s===r.id)||{})},handleContextClick(r){$A.leftExists(r,"new:")?this.addFile($A.leftDelete(r,"new:")):this.dropFile(this.contextMenuItem,r)},handleClickContextMenuOutside(){this.contextMenuVisible=!1},handleVisibleChangeMenu(r){let h=this.fileLists.find(({_highlight:s})=>!!s);h&&this.$set(h,"_highlight",!1),r&&this.contextMenuItem.id&&this.$set(this.contextMenuItem,"_highlight",!0)},dropFile(r,h){switch(h){case"open":case"openCheckMenu":if(h==="openCheckMenu"&&this.contextMenuVisible||this.fileList.findIndex(c=>c._edit===!0)>-1||r._load)return;r.type=="folder"?this.browseFolder(r.id):this.browseFile(r.id);break;case"upperFolder":this.searchKey="",this.browseFolder(r.pid,r.id);break;case"select":let s=this.selectIds.findIndex(c=>c==r.id);s>-1?this.selectIds.splice(s,1):this.selectIds.push(r.id);break;case"rename":this.setEdit(r.id,!0),this.autoBlur(r.id);break;case"copy":this.$store.dispatch("call",{url:"file/copy",data:{id:r.id}}).then(({data:c,msg:x})=>{$A.messageSuccess(x),this.$store.dispatch("saveFile",c)}).catch(({msg:c})=>{$A.modalError(c)});break;case"shear":this.shearIds=[r.id];break;case"shearSelect":this.shearIds=$A.cloneJSON(this.selectIds);break;case"send":this.sendFileId=r.id,this.sendData=[],this.$refs.sendFile.onSelection();break;case"share":this.shareInfo={id:r.id,type:"all",userid:r.userid,permission:1},this.shareList=[],this.shareShow=!0,this.getShare();break;case"outshare":$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u3010"+r.name+"\u3011\u5171\u4EAB\u6210\u5458\u5417\uFF1F",loading:!0,onOk:()=>new Promise((c,x)=>{this.$store.dispatch("call",{url:"file/share/out",data:{id:r.id}}).then(({msg:O})=>{c(O),this.$store.dispatch("forgetFile",r.id)}).catch(({msg:O})=>{x(O)})})});break;case"link":this.linkData={id:r.id,name:r.name},this.linkShow=!0,this.linkGet();break;case"download":if(!r.ext)return;$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${r.name}.${r.ext} (${$A.bytesToSize(r.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`file/content?id=${r.id}&down=yes`))}});break;case"downloadzip":this.downloadZipFile([r.id]);break;case"delete":this.deleteFile([r.id]);break}},onSendFile(){return new Promise((r,h)=>{if(this.sendData.length===0){$A.messageError("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458"),h();return}const s=this.sendData.filter(x=>$A.leftExists(x,"d:")).map(x=>x.replace("d:","")),c=this.sendData.filter(x=>!$A.leftExists(x,"d:"));this.$store.dispatch("call",{url:"dialog/msg/sendfileid",data:{dialogids:s,userids:c,file_id:this.sendFileId}}).then(({data:x,msg:O})=>{this.$store.dispatch("saveDialogMsg",x.msgs),this.$store.dispatch("updateDialogLastMsg",x.msgs),$A.messageSuccess(O),r()}).catch(({msg:x})=>{$A.modalError(x),h()})})},linkGet(r){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:r===!0?"yes":"no"}}).then(({data:h})=>{this.linkData=Object.assign(h,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:h})=>{this.linkShow=!1,$A.modalError(h)}).finally(h=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(r=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(r=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(r=>{this.$refs.linkInput.focus({cursor:"all"})})},shearTo(){if(this.shearIds.length!=0){if(this.isParentShare){const r=this.fileLists.find(({id:h,share:s})=>s&&this.shearIds.includes(h));if(r){$A.modalError(`${r.name} \u5F53\u524D\u6B63\u5728\u5171\u4EAB\uFF0C\u65E0\u6CD5\u79FB\u52A8\u5230\u53E6\u4E00\u4E2A\u5171\u4EAB\u6587\u4EF6\u5939\u5185`);return}}this.$store.dispatch("call",{url:"file/move",data:{ids:this.shearIds,pid:this.pid}}).then(({data:r,msg:h})=>{$A.messageSuccess(h),this.shearIds=[],this.$store.dispatch("saveFile",r)}).catch(({msg:r})=>{$A.modalError(r)})}},deleteFile(r){if(r.length===0)return;const h=this.fileLists.find(O=>O.id==r[0])||{};let c=!r.find(O=>this.fileLists.find(P=>P.type!="folder"&&P.id==O))?"\u6587\u4EF6\u5939":"\u6587\u4EF6",x=`\u3010${h.name}\u3011\u7B49${r.length}\u4E2A${c}`;r.length===1&&(x=`\u3010${h.name}\u3011${c}`),$A.modalConfirm({title:"\u5220\u9664"+c,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664"+x+"\u5417\uFF1F",loading:!0,onOk:()=>new Promise((O,P)=>{this.$store.dispatch("call",{url:"file/remove",data:{ids:r}}).then(({msg:G})=>{O(G),this.$store.dispatch("forgetFile",r),this.selectIds=this.selectIds.filter(ge=>!r.includes(ge))}).catch(({msg:G})=>{P(G)})})})},packPercentageParse(r){return parseInt(r,10)},packClear(){this.packList=this.packList.filter(r=>r.status!=="finished"),this.packShow=!1},async startPack(r){const h={name:r,status:"packing",percentage:0};this.packList.push(h),this.uploadShow=!1,this.packShow=!0},updatePackProgress(){this.packList.forEach(r=>{const h=this.filePackLists.find(({name:s})=>s==r.name);h&&(r.percentage=Math.max(1,h.progress),r.status!="finished"&&r.percentage>=100&&(r.status="finished",this.downloadPackFile(r.name)))})},downloadPackFile(r){const h=$A.apiUrl(`file/download/confirm?name=${r}&token=${this.userToken}`);if(!$A.Electron&&!$A.isEEUiApp){const s=document.createElement("a");s.setAttribute("href",h),s.setAttribute("download",`${r}`),document.body.appendChild(s),s.click(),document.body.removeChild(s)}else this.$store.dispatch("downUrl",h)},downloadZipFile(r){if(r.length===0)return;const h=this.fileLists.find(({id:P})=>P===r[0])||{},c=!r.some(P=>this.fileLists.some(({type:G,id:ge})=>G!=="folder"&&ge===P))?"\u6587\u4EF6\u5939":"\u6587\u4EF6",x=r.length===1?`\u3010${h.name}\u3011${c}`:`\u3010${h.name}\u3011\u7B49${r.length}\u4E2A${c}`,O=`file_${$A.formatDate("YmdHis")}.zip`;$A.modalConfirm({title:"\u6253\u5305\u4E0B\u8F7D",content:`\u4F60\u786E\u5B9A\u8981\u6253\u5305\u4E0B\u8F7D${x}\u5417\uFF1F`,okText:"\u786E\u5B9A",onOk:async()=>{if(this.packList.find(({status:P})=>P==="packing")){$A.messageWarning("\u8BF7\u7B49\u5F85\u6253\u5305\u5B8C\u6210");return}try{await this.$store.dispatch("call",{url:"file/download/pack",data:{ids:r,name:O}}),this.startPack(O)}catch({msg:P}){$A.modalError(P)}}})},autoBlur(r){this.$nextTick(()=>{if(this.$refs["input_"+r])this.$refs["input_"+r][0].focus({cursor:"all"});else if(document.getElementById("input_"+r)){const h=document.getElementById("input_"+r),s=h.value.length;h.focus(),h.setSelectionRange(0,s)}})},onParser(r){return r.replace(/[\\\/:*?\"<>|]/g,"")},onBlur(r){this.fileLists.find(({id:h,_edit:s})=>h==r.id&&!s)||this.onEnter(r)},onKeyup(r,h){r.keyCode===13?this.onEnter(h):r.keyCode===27&&(!/^\d+$/.test(h.id)?(h.newname="",this.$store.dispatch("forgetFile",h.id)):(this.setLoad(h.id,!1),this.setEdit(h.id,!1)))},onEnter(r){const h=!/^\d+$/.test(r.id);if(!r.newname){h?this.$store.dispatch("forgetFile",r.id):this.setEdit(r.id,!1);return}if(r.newname==r.name){this.setEdit(r.id,!1);return}r._load||(this.setLoad(r.id,!0),this.$store.dispatch("call",{url:"file/add",data:{id:h?0:r.id,pid:r.pid,name:r.newname,type:r.type},spinner:2e3}).then(({data:s,msg:c})=>{$A.messageSuccess(c),this.setLoad(r.id,!1),this.setEdit(r.id,!1),this.$store.dispatch("saveFile",s),h&&(this.$store.dispatch("forgetFile",r.id),this.shakeFile(s.id))}).catch(({msg:s})=>{$A.modalError(s),this.setLoad(r.id,!1),h&&this.$store.dispatch("forgetFile",r.id)}))},setEdit(r,h){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&(this.$set(s,"_edit",h),h&&this.$set(s,"newname",s.name))},setLoad(r,h){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&this.$set(s,"_load",h)},onSearchFocus(){this.$nextTick(()=>{this.$refs.searchInput.focus({cursor:"end"})})},onSearchChange(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchKey.trim()!=""&&(this.searchTimeout=setTimeout(()=>{this.loadIng++,this.$store.dispatch("searchFiles",this.searchKey.trim()).then(()=>{this.loadIng--}).catch(()=>{this.loadIng--})},600))},getShare(){this.shareLoad++,this.$store.dispatch("call",{url:"file/share",data:{id:this.shareInfo.id}}).then(({data:r})=>{r.id==this.shareInfo.id&&(this.shareList=r.list.map(h=>(h._permission=h.permission,h)))}).catch(({msg:r})=>{this.shareShow=!1,$A.modalError(r)}).finally(r=>{this.shareLoad--})},onShare(r=!1){if(this.shareInfo.type==="all"&&(this.shareInfo.userids=[0]),this.shareInfo.userids.length==0){$A.messageWarning("\u8BF7\u9009\u62E9\u5171\u4EAB\u6210\u5458");return}this.shareLoad++,this.$store.dispatch("call",{url:"file/share/update",data:Object.assign(this.shareInfo,{force:r===!0?1:0})}).then(({data:h,msg:s})=>{$A.messageSuccess(s),this.$store.dispatch("saveFile",h),this.$set(this.shareInfo,"userids",[]),this.getShare()}).catch(({ret:h,msg:s})=>{h===-3001?$A.modalConfirm({content:"\u6B64\u6587\u4EF6\u5939\u5185\u5DF2\u6709\u5171\u4EAB\u6587\u4EF6\u5939\uFF0C\u5B50\u6587\u4EF6\u7684\u5171\u4EAB\u72B6\u6001\u5C06\u88AB\u53D6\u6D88\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",onOk:()=>{this.onShare(!0)}}):$A.modalError(s)}).finally(h=>{this.shareLoad--})},upShare(r,h=!1){r.loading!==!0&&(r.loading=!0,this.$store.dispatch("call",{url:"file/share/update",data:{id:this.shareInfo.id,userids:[r.userid],permission:r.permission,force:h===!0?1:0}}).then(({data:s,msg:c})=>{if(r.loading=!1,r._permission=r.permission,$A.messageSuccess(c),this.$store.dispatch("saveFile",s),r.permission===-1){let x=this.shareList.findIndex(({userid:O})=>O==r.userid);x>-1&&this.shareList.splice(x,1)}}).catch(({ret:s,msg:c})=>{r.loading=!1,s===-3001?$A.modalConfirm({content:"\u6B64\u6587\u4EF6\u5939\u5185\u5DF2\u6709\u5171\u4EAB\u6587\u4EF6\u5939\uFF0C\u5B50\u6587\u4EF6\u7684\u5171\u4EAB\u72B6\u6001\u5C06\u88AB\u53D6\u6D88\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",onOk:()=>{this.upShare(r,!0)},onCancel:()=>{r.permission=r._permission}}):(r.permission=r._permission,$A.modalError(c))}))},uploadName(r){return $A.getObject(r,"response.data.full_name")||r.name},handleTableSort({key:r,order:h}){$A.IDBSave("cacheFileSort",["asc","desc"].includes(h)?{key:r,order:h}:{})},handleTableSelect(r){this.selectIds=r.map(h=>h.id)},clearSelect(){this.selectIds=[]},clearShear(){this.shearIds=[]},shakeFile(r){!r||this.$nextTick(h=>{const s=$A(this.$el).find(`[data-id="${r}"]`);s.length>0&&($A.scrollIntoViewIfNeeded(s[0]),$A(s[0]).addClass("common-shake"),setTimeout(c=>$A(s[0]).removeClass("common-shake"),800))})},pasteDragNext(r,h){let s=h==="drag"?r.dataTransfer.files:r.clipboardData.files;s=Array.prototype.slice.call(s),s.length>0&&(r.preventDefault(),this.pasteFile=[],this.pasteItem=[],s.some(c=>{const x={type:$A.getMiddle(c.type,null,"/"),name:c.name,size:c.size,result:null};if(x.type==="image"){const O=new FileReader;O.readAsDataURL(c),O.onload=({target:P})=>{x.result=P.result,this.pasteFile.push(c),this.pasteItem.push(x),this.pasteShow=!0}}else this.pasteFile.push(c),this.pasteItem.push(x),this.pasteShow=!0}))},filePasteDrag(r,h){if(this.dialogDrag=!1,$A.dataHasFolder(h==="drag"?r.dataTransfer:r.clipboardData)){r.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${h==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\uFF0C\u8BF7\u624B\u52A8\u4E0A\u4F20\u6587\u4EF6\u5939\u3002`);return}this.pasteDragNext(r,h)},fileDragOver(r,h){let s=this.__dialogDrag=$A.randomString(8);if(!r)setTimeout(()=>{s===this.__dialogDrag&&(this.dialogDrag=r)},150);else{if(h.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},pasteSend(){if(this.__paste_send_index)return;this.__paste_send_index=1,setTimeout(()=>{this.__paste_send_index=0},300);const r=[];this.pasteFile.some(h=>{r.find(s=>s===h.name)||(r.push(h.name),this.$refs.fileUpload.upload(h))})},fileBeforeClose(){return new Promise(r=>{if(!this.$refs.fileContent){r();return}if(this.$refs.fileContent.equalContent){r();return}$A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{r()}})})},uploadUpdate(r){r.forEach(h=>{let s=this.uploadList.findIndex(({uid:c})=>c==h.uid);s>-1?this.uploadList.splice(s,1,h):this.uploadList.unshift(h)})},uploadClear(){this.uploadList=this.uploadList.filter(({status:r})=>r!=="finished"),this.$refs.fileUpload.clearFiles(),this.$refs.dirUpload.clearFiles()},uploadPercentageParse(r){return parseInt(r,10)},handleProgress(r,h,s){h._uploadIng===void 0&&(h._uploadIng=!0,this.uploadIng++),this.uploadUpdate(s)},handleSuccess(r,h,s){this.uploadIng--,this.uploadUpdate(s),r.ret===1?this.$store.dispatch("saveFile",r.data):$A.modalWarning({title:"\u4E0A\u4F20\u5931\u8D25",content:"\u6587\u4EF6 "+h.name+" \u4E0A\u4F20\u5931\u8D25\uFF0C"+r.msg})},handleError(r,h,s){this.uploadIng--,this.uploadUpdate(s)},handleFormatError(r){this.uploadDir||$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+r.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u4E0A\u4F20\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(r){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+r.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(){return this.uploadShow=!0,this.packShow=!1,!0}}},uu={};var mg=lg(vg,dg,pg,!1,wg,null,null,null);function wg(r){for(let h in uu)this[h]=uu[h]}var Sg=function(){return mg.exports}();export{Sg as default}; +}`;var F=iu(function(){return M(l,$+"return "+w).apply(s,o)});if(F.source=w,gi(F))throw F;return F}function dp(e){return B(e).toLowerCase()}function pp(e){return B(e).toUpperCase()}function gp(e,t,n){if(e=B(e),e&&(n||t===s))return ds(e);if(!e||!(t=ce(t)))return e;var i=ye(e),a=ye(t),l=ps(i,a),o=gs(i,a)+1;return it(i,l,o).join("")}function _p(e,t,n){if(e=B(e),e&&(n||t===s))return e.slice(0,vs(e)+1);if(!e||!(t=ce(t)))return e;var i=ye(e),a=gs(i,ye(t))+1;return it(i,0,a).join("")}function vp(e,t,n){if(e=B(e),e&&(n||t===s))return e.replace(gr,"");if(!e||!(t=ce(t)))return e;var i=ye(e),a=ps(i,ye(t));return it(i,a).join("")}function mp(e,t){var n=ou,i=fu;if(K(t)){var a="separator"in t?t.separator:a;n="length"in t?T(t.length):n,i="omission"in t?ce(t.omission):i}e=B(e);var l=e.length;if(yt(e)){var o=ye(e);l=o.length}if(n>=l)return e;var f=n-bt(i);if(f<1)return i;var p=o?it(o,0,f).join(""):e.slice(0,f);if(a===s)return p+i;if(o&&(f+=p.length-f),_i(a)){if(e.slice(f).search(a)){var v,m=p;for(a.global||(a=kr(a.source,B(Di.exec(a))+"g")),a.lastIndex=0;v=a.exec(m);)var w=v.index;p=p.slice(0,w===s?f:w)}}else if(e.indexOf(ce(a),f)!=f){var I=p.lastIndexOf(a);I>-1&&(p=p.slice(0,I))}return p+i}function wp(e){return e=B(e),e&&bu.test(e)?e.replace(ki,ql):e}var xp=Dt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),wi=sa("toUpperCase");function ru(e,t,n){return e=B(e),t=n?s:t,t===s?Nl(e)?Jl(e):kl(e):e.match(t)||[]}var iu=E(function(e,t){try{return oe(e,s,t)}catch(n){return gi(n)?n:new y(n)}}),Ip=He(function(e,t){return me(t,function(n){n=Me(n),Ne(e,n,di(e[n],e))}),e});function Lp(e){var t=e==null?0:e.length,n=A();return e=t?H(e,function(i){if(typeof i[1]!="function")throw new we(P);return[n(i[0]),i[1]]}):[],E(function(i){for(var a=-1;++aXe)return[];var n=Re,i=ee(e,Re);t=A(t),e-=Re;for(var a=Tr(i,t);++n0||t<0)?new R(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==s&&(t=T(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},R.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},R.prototype.toArray=function(){return this.take(Re)},Oe(R.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=u[i?"take"+(t=="last"?"Right":""):t],l=i||/^find/.test(t);!a||(u.prototype[t]=function(){var o=this.__wrapped__,f=i?[1]:arguments,p=o instanceof R,v=f[0],m=p||b(o),w=function(k){var D=a.apply(u,Ve([k],f));return i&&I?D[0]:D};m&&n&&typeof v=="function"&&v.length!=1&&(p=m=!1);var I=this.__chain__,$=!!this.__actions__.length,S=l&&!I,F=p&&!$;if(!l&&m){o=F?o:new R(this);var C=e.apply(o,f);return C.__actions__.push({func:Xn,args:[w],thisArg:s}),new xe(C,I)}return S&&F?e.apply(this,f):(C=this.thru(w),S?i?C.value()[0]:C.value():C)})}),me(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ln[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);u.prototype[e]=function(){var a=arguments;if(i&&!this.__chain__){var l=this.value();return t.apply(b(l)?l:[],a)}return this[n](function(o){return t.apply(b(o)?o:[],a)})}}),Oe(R.prototype,function(e,t){var n=u[t];if(n){var i=n.name+"";U.call(kt,i)||(kt[i]=[]),kt[i].push({name:t,func:n})}}),kt[Hn(s,at).name]=[{name:"wrapper",func:s}],R.prototype.clone=mo,R.prototype.reverse=wo,R.prototype.value=xo,u.prototype.at=Xc,u.prototype.chain=Qc,u.prototype.commit=Vc,u.prototype.next=jc,u.prototype.plant=th,u.prototype.reverse=nh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=rh,u.prototype.first=u.prototype.head,Yt&&(u.prototype[Yt]=eh),u},Tt=Xl();lt?((lt.exports=Tt)._=Tt,Ir._=Tt):V._=Tt}).call(on)})(Ci,Ci.exports);var dg=function(){var r=this,h=r.$createElement,s=r._self._c||h;return s("div",{staticClass:"page-file"},[s("PageTitle",{attrs:{title:r.$L("\u6587\u4EF6")}}),s("div",{ref:"fileWrapper",staticClass:"file-wrapper"},[s("div",{staticClass:"file-head"},[s("div",{staticClass:"file-nav"},[s("div",{staticClass:"common-nav-back portrait",on:{click:function(c){return r.goForward({name:"manage-application"},!0)}}},[s("i",{staticClass:"taskfont"},[r._v("\uE676")])]),s("h1",[r._v(r._s(r.$L("\u6587\u4EF6")))]),r.loadIng==0?s("div",{staticClass:"file-refresh",on:{click:r.getFileList}},[s("i",{staticClass:"taskfont"},[r._v("\uE6AE")])]):r._e()]),r.uploadList.length>0?s("div",{staticClass:"file-status",on:{click:function(c){r.uploadShow=!0,r.packShow=!1}}},[r.uploadList.find(function(c){var x=c.status;return x!=="finished"})?s("Loading"):s("Button",{attrs:{shape:"circle",icon:"md-arrow-round-up"}})],1):r._e(),r.packList.length>0?s("div",{staticClass:"file-status",on:{click:function(c){r.packShow=!0,r.uploadShow=!1}}},[r.packList.find(function(c){var x=c.status;return x!=="finished"})?s("Loading"):s("Button",{attrs:{shape:"circle",icon:"md-arrow-round-down"}})],1):r._e(),s("div",{class:["file-search",r.searchKey?"has-value":""],on:{click:r.onSearchFocus,mouseenter:r.onSearchFocus}},[s("Input",{ref:"searchInput",attrs:{suffix:"ios-search",placeholder:r.$L("\u641C\u7D22\u540D\u79F0")},on:{"on-change":r.onSearchChange},model:{value:r.searchKey,callback:function(c){r.searchKey=c},expression:"searchKey"}})],1),s("div",{staticClass:"file-add"},[s("Button",{attrs:{shape:"circle",icon:"md-add"},on:{click:function(c){return c.stopPropagation(),r.handleRightClick(c,null,!0)}}})],1)]),s("div",{staticClass:"file-navigator"},[s("ul",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText||!r.selectIds.length&&!r.shearFirst,expression:"showBtnText || (!selectIds.length && !shearFirst)"}],staticClass:"scrollbar-hidden"},[s("li",{on:{click:function(c){return r.browseFolder(0)}}},[s("span",[r._v(r._s(r.$L("\u5168\u90E8\u6587\u4EF6")))])]),r.searchKey?s("li",[r._v(r._s(r.$L("\u641C\u7D22"))+' "'+r._s(r.searchKey)+'"')]):r._l(r.navigator,function(c){return s("li",{ref:`nav_${c.id}`,refInFor:!0,on:{click:function(x){return r.browseFolder(c.id)}}},[c.share?s("i",{staticClass:"taskfont"},[r._v("\uE63F")]):r._e(),s("span",{attrs:{title:c.name}},[r._v(r._s(c.name))]),c.share&&c.permission==0?s("span",{staticClass:"readonly"},[r._v(r._s(r.$L("\u53EA\u8BFB")))]):r._e()])})],2),r.shearFirst?[s("Button",{style:{marginLeft:r.showBtnText?"12px":0},attrs:{disabled:r.shearFirst.pid==r.pid,size:"small",type:"primary"},on:{click:r.shearTo}},[s("div",{staticClass:"file-shear"},[s("span",[r._v(r._s(r.$L("\u7C98\u8D34")))]),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v('"'),s("em",[r._v(r._s(r.shearFirst.name))]),r._v('"')]),r.shearIds.length>1?s("span",[r._v(r._s(r.$L("\u7B49"))+r._s(r.shearIds.length)+r._s(r.$L("\u4E2A\u6587\u4EF6")))]):r._e()])]),s("Button",{attrs:{type:"primary",size:"small"},on:{click:r.clearShear}},[r._v(r._s(r.$L("\u53D6\u6D88\u526A\u5207")))])]:r.selectIds.length>0?[s("Button",{style:{marginLeft:r.showBtnText?"12px":0},attrs:{size:"small",type:"info"},on:{click:function(c){return r.handleContextClick("shearSelect")}}},[s("Icon",{attrs:{type:"ios-cut"}}),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v(r._s(r.$L("\u526A\u5207")))])],1),s("Button",{attrs:{disabled:r.compressedSownloadDisabled,size:"small",type:"info"},on:{click:function(c){return r.downloadZipFile(r.selectIds)}}},[s("Icon",{attrs:{type:"ios-download"}}),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v(r._s(r.$L("\u6253\u5305\u4E0B\u8F7D")))])],1),s("Button",{attrs:{size:"small",type:"error"},on:{click:function(c){return r.deleteFile(r.selectIds)}}},[s("Icon",{attrs:{type:"ios-trash"}}),s("span",{directives:[{name:"show",rawName:"v-show",value:r.showBtnText,expression:"showBtnText"}]},[r._v(r._s(r.$L("\u5220\u9664")))])],1),s("Button",{attrs:{type:"primary",size:"small"},on:{click:r.clearSelect}},[r._v(" "+r._s(r.showBtnText?r.$L("\u53D6\u6D88\u9009\u62E9"):r.$L("\u53D6\u6D88"))+" ")])]:r._e(),r.loadIng>0?s("div",{staticClass:"nav-load"},[s("Loading")],1):r._e(),s("div",{staticClass:"flex-full"}),r.hasShareFile?s("div",{staticClass:"only-checkbox"},[s("Checkbox",{model:{value:r.hideShared,callback:function(c){r.hideShared=c},expression:"hideShared"}},[r._v(" "+r._s(r.showBtnText?r.$L("\u4EC5\u663E\u793A\u6211\u7684"):r.$L("\u4EC5\u6211\u7684"))+" ")])],1):r._e(),s("div",{class:["switch-button",r.tableMode]},[s("div",{on:{click:function(c){r.tableMode="block"}}},[s("i",{staticClass:"taskfont"},[r._v("\uE60C")])]),s("div",{on:{click:function(c){r.tableMode="table"}}},[s("i",{staticClass:"taskfont"},[r._v("\uE66A")])])])],2),s("div",{staticClass:"file-drag",on:{drop:function(c){return c.preventDefault(),r.filePasteDrag(c,"drag")},dragover:function(c){return c.preventDefault(),r.fileDragOver(!0,c)},dragleave:function(c){return c.preventDefault(),r.fileDragOver(!1,c)}}},[r.tableMode==="table"?s("div",{staticClass:"file-table",on:{contextmenu:function(c){return c.preventDefault(),r.handleContextmenu.apply(null,arguments)}}},[s("Table",{attrs:{columns:r.columns,data:r.fileList,height:r.tableHeight,"no-data-text":r.$L("\u6CA1\u6709\u4EFB\u4F55\u6587\u4EF6"),"context-menu":"",stripe:""},on:{"on-cell-click":r.clickRow,"on-contextmenu":r.handleContextMenu,"on-select":r.handleTableSelect,"on-select-cancel":r.handleTableSelect,"on-select-all-cancel":r.handleTableSelect,"on-select-all":r.handleTableSelect,"on-sort-change":r.handleTableSort}})],1):[r.fileList.length==0&&r.loadIng==0?s("div",{staticClass:"file-no",on:{contextmenu:function(c){return c.preventDefault(),r.handleContextmenu.apply(null,arguments)}}},[s("i",{staticClass:"taskfont"},[r._v("\uE60B")]),s("p",[r._v(r._s(r.$L("\u6CA1\u6709\u4EFB\u4F55\u6587\u4EF6")))])]):s("div",{staticClass:"file-list",on:{contextmenu:function(c){return c.preventDefault(),r.handleContextmenu.apply(null,arguments)}}},[s("ul",r._l(r.fileList,function(c){return s("li",[s("div",{directives:[{name:"longpress",rawName:"v-longpress",value:r.handleLongpress,expression:"handleLongpress"}],staticClass:"file-item",class:{shear:r.shearIds.includes(c.id),highlight:r.selectIds.includes(c.id),operate:r.contextMenuVisible&&c.id===r.contextMenuItem.id},attrs:{"data-id":c.id},on:{click:function(x){return r.dropFile(c,"openCheckMenu")}}},[s("div",{staticClass:"file-check",class:{"file-checked":r.selectIds.includes(c.id)},on:{click:function(x){return x.stopPropagation(),r.dropFile(c,"select")}}},[s("Checkbox",{attrs:{value:r.selectIds.includes(c.id)}})],1),s("div",{staticClass:"file-menu",on:{click:function(x){return x.stopPropagation(),r.handleRightClick(x,c)}}},[s("Icon",{attrs:{type:"ios-more"}})],1),s("div",{class:`no-dark-before file-icon ${c.type}${c.share?" share":""}`},[c.share?[c.userid!=r.userId?s("UserAvatarTip",{staticClass:"share-avatar",attrs:{userid:c.userid,size:20}},[s("p",[r._v(r._s(r.$L("\u5171\u4EAB\u6743\u9650"))+": "+r._s(r.$L(c.permission==1?"\u8BFB/\u5199":"\u53EA\u8BFB")))])]):s("div",{staticClass:"share-icon no-dark-content"},[s("i",{staticClass:"taskfont"},[r._v("\uE757")])])]:r.isParentShare?[s("UserAvatarTip",{staticClass:"share-avatar",attrs:{userid:c.created_id,size:20}},[c.created_id!=c.userid?s("p",[s("strong",[r._v(r._s(r.$L("\u6210\u5458\u521B\u5EFA\u4E8E"))+": "+r._s(c.created_at))])]):s("p",[r._v(r._s(r.$L("\u6240\u6709\u8005\u521B\u5EFA\u4E8E"))+": "+r._s(c.created_at))])])]:r._e()],2),c._edit?s("div",{staticClass:"file-input"},[s("Input",{ref:"input_"+c.id,refInFor:!0,attrs:{size:"small",disabled:!!c._load,parser:r.onParser},on:{"on-blur":function(x){return r.onBlur(c)},"on-keyup":function(x){return r.onKeyup(x,c)}},model:{value:c.newname,callback:function(x){r.$set(c,"newname",x)},expression:"item.newname"}}),c._load?s("div",{staticClass:"file-load"},[s("Loading")],1):r._e()],1):s("div",{staticClass:"file-name",attrs:{title:c.name}},[r._v(r._s(r.$A.getFileName(c)))])])])}),0)])],r.dialogDrag?s("div",{staticClass:"drag-over",on:{click:function(c){r.dialogDrag=!1}}},[s("div",{staticClass:"drag-text"},[r._v(r._s(r.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):r._e()],2),s("div",{staticClass:"file-menu",style:r.contextMenuStyles},[s("Dropdown",{attrs:{trigger:"custom",visible:r.contextMenuVisible,"transfer-class-name":"page-file-dropdown-menu",transfer:""},on:{"on-click":r.handleContextClick,"on-clickoutside":r.handleClickContextMenuOutside,"on-visible-change":r.handleVisibleChangeMenu}},[s("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[r.contextMenuItem.id?[s("DropdownItem",{staticClass:"item-open",attrs:{name:"open"}},[r._v(" "+r._s(r.$L("\u6253\u5F00"))+" "),s("div",{staticClass:"open-name"},[r._v("\u201C"+r._s(r.contextMenuItem.name)+"\u201D")])]),r.searchKey?s("DropdownItem",{staticClass:"item-open",attrs:{name:"upperFolder"}},[r._v(" "+r._s(r.$L("\u5728\u4E0A\u5C42\u6587\u4EF6\u5939\u4E2D\u663E\u793A"))+" ")]):r._e(),s("DropdownItem",{attrs:{name:"select"}},[r._v(r._s(r.$L(r.selectIds.includes(r.contextMenuItem.id)?"\u53D6\u6D88\u9009\u62E9":"\u9009\u62E9")))]),s("Dropdown",{attrs:{placement:"right-start",transfer:""}},[s("DropdownItem",{attrs:{divided:"",name:"new:"},nativeOn:{click:function(c){c.stopPropagation()}}},[s("div",{staticClass:"arrow-forward-item"},[r._v(r._s(r.$L("\u65B0\u5EFA"))),s("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),s("DropdownMenu",{staticClass:"page-file-dropdown-menu",attrs:{slot:"list"},slot:"list"},r._l(r.types,function(c,x){return c.label?s("DropdownItem",{key:x,attrs:{divided:!!c.divided,name:`new:${c.value}`}},[s("div",{class:`no-dark-before file-item file-icon ${c.value}`},[r._v(r._s(r.$L(c.label)))])]):r._e()}),1)],1),s("DropdownItem",{attrs:{name:"rename",divided:""}},[r._v(r._s(r.$L("\u91CD\u547D\u540D")))]),s("DropdownItem",{attrs:{name:"copy",disabled:r.contextMenuItem.type=="folder"}},[r._v(r._s(r.$L("\u590D\u5236")))]),s("DropdownItem",{attrs:{name:"shear",disabled:r.contextMenuItem.userid!=r.userId}},[r._v(r._s(r.$L("\u526A\u5207")))]),r.contextMenuItem.userid==r.userId?s("DropdownItem",{attrs:{name:"share",divided:""}},[r._v(r._s(r.$L("\u5171\u4EAB")))]):r.contextMenuItem.share?s("DropdownItem",{attrs:{name:"outshare",divided:""}},[r._v(r._s(r.$L("\u9000\u51FA\u5171\u4EAB")))]):r._e(),s("DropdownItem",{attrs:{name:"send",disabled:r.contextMenuItem.type=="folder"}},[r._v(r._s(r.$L("\u53D1\u9001")))]),s("DropdownItem",{attrs:{name:"link",divided:r.contextMenuItem.userid!=r.userId&&!r.contextMenuItem.share,disabled:r.contextMenuItem.type=="folder"}},[r._v(r._s(r.$L("\u94FE\u63A5")))]),s("DropdownItem",{attrs:{name:"download",disabled:r.contextMenuItem.ext==""||r.contextMenuItem.userid!=r.userId&&r.contextMenuItem.permission==0}},[r._v(r._s(r.$L("\u4E0B\u8F7D")))]),s("DropdownItem",{attrs:{name:"downloadzip",disabled:r.contextMenuItem.userid!=r.userId&&r.contextMenuItem.permission==0}},[r._v(r._s(r.$L("\u6253\u5305\u4E0B\u8F7D")))]),s("DropdownItem",{staticStyle:{color:"red"},attrs:{name:"delete",divided:""}},[r._v(r._s(r.$L("\u5220\u9664")))])]:r._l(r.types,function(c,x){return c.label?s("DropdownItem",{key:x,attrs:{divided:!!c.divided,name:`new:${c.value}`}},[s("div",{class:`no-dark-before file-item file-icon ${c.value}`},[r._v(r._s(r.$L(c.label)))])]):r._e()})],2)],1)],1)]),r.uploadShow&&r.uploadList.length>0?s("div",{staticClass:"file-upload-list"},[s("div",{staticClass:"upload-wrap"},[s("div",{staticClass:"title"},[r._v(" "+r._s(r.$L("\u4E0A\u4F20\u5217\u8868"))+" ("+r._s(r.uploadList.length)+") "),r.uploadList.find(function(c){var x=c.status;return x==="finished"})?s("em",{on:{click:r.uploadClear}},[r._v(r._s(r.$L("\u6E05\u7A7A\u5DF2\u5B8C\u6210")))]):r._e()]),s("ul",{staticClass:"content"},r._l(r.uploadList,function(c,x){return x<100?s("li",{key:x},[s("AutoTip",{staticClass:"file-name"},[r._v(r._s(r.uploadName(c)))]),c.status==="finished"&&c.response&&c.response.ret!==1?s("AutoTip",{staticClass:"file-error"},[r._v(r._s(c.response.msg))]):s("Progress",{attrs:{percent:r.uploadPercentageParse(c.percentage),"stroke-width":5}}),s("Icon",{staticClass:"file-close",attrs:{type:"ios-close-circle-outline"},on:{click:function(O){return r.uploadList.splice(x,1)}}})],1):r._e()}),0),s("Icon",{staticClass:"close",attrs:{type:"md-close"},on:{click:function(c){r.uploadShow=!1}}})],1)]):r._e(),r.packShow&&r.packList.length>0?s("div",{staticClass:"file-upload-list"},[s("div",{staticClass:"upload-wrap"},[s("div",{staticClass:"title"},[s("span",[r._v(r._s(r.$L("\u6253\u5305\u5217\u8868"))+"("+r._s(r.packList.length)+")")]),r.packList.find(function(c){var x=c.status;return x==="finished"})?s("em",{on:{click:r.packClear}},[r._v(r._s(r.$L("\u6E05\u7A7A\u5DF2\u5B8C\u6210")))]):r._e()]),s("ul",{staticClass:"content"},r._l(r.packList,function(c,x){return x<100?s("li",{key:x},[s("AutoTip",{staticClass:"file-name"},[c.status!=="finished"?s("span",[r._v(r._s(c.name))]):s("a",{attrs:{href:"javascript:void(0)"},on:{click:function(O){return r.downloadPackFile(c.name)}}},[r._v(r._s(c.name))])]),c.status==="finished"&&c.response&&c.response.ret!==1?s("AutoTip",{staticClass:"file-error"},[r._v(r._s(c.response.msg))]):s("Progress",{attrs:{percent:r.packPercentageParse(c.percentage),"stroke-width":5}}),s("Icon",{staticClass:"file-close",attrs:{type:"ios-close-circle-outline"},on:{click:function(O){return r.packList.splice(x,1)}}})],1):r._e()}),0),s("Icon",{staticClass:"close",attrs:{type:"md-close"},on:{click:function(c){r.packShow=!1}}})],1)]):r._e(),s("Upload",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"fileUpload",attrs:{name:"files",action:r.actionUrl,headers:r.headers,multiple:!0,webkitdirectory:!1,format:r.uploadFormat,accept:r.uploadAccept,"show-upload-list":!1,"max-size":r.maxSize,"on-progress":r.handleProgress,"on-success":r.handleSuccess,"on-error":r.handleError,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload}}),s("Upload",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"dirUpload",attrs:{name:"files",action:r.actionUrl,headers:r.headers,multiple:!0,webkitdirectory:!0,format:r.uploadFormat,accept:r.uploadAccept,"show-upload-list":!1,"max-size":r.maxSize,"on-progress":r.handleProgress,"on-success":r.handleSuccess,"on-error":r.handleError,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload}}),s("Modal",{attrs:{title:r.$L("\u5171\u4EAB\u8BBE\u7F6E"),"mask-closable":!1,"footer-hide":""},model:{value:r.shareShow,callback:function(c){r.shareShow=c},expression:"shareShow"}},[s("Form",{staticClass:"page-file-share-form",attrs:{model:r.shareInfo,inline:""},nativeOn:{submit:function(c){c.preventDefault()}}},[s("FormItem",{staticClass:"share-userid",attrs:{prop:"userids"}},[s("RadioGroup",{model:{value:r.shareInfo.type,callback:function(c){r.$set(r.shareInfo,"type",c)},expression:"shareInfo.type"}},[s("Radio",{attrs:{label:"all"}},[r._v(r._s(r.$L("\u6240\u6709\u4EBA")))]),s("Radio",{attrs:{label:"custom"}},[r._v(r._s(r.$L("\u6307\u5B9A\u6210\u5458")))])],1),r.shareInfo.type==="custom"?s("UserSelect",{attrs:{disabledChoice:r.shareAlready,"multiple-max":100,placeholder:r.$L("\u9009\u62E9\u5171\u4EAB\u6210\u5458"),"avatar-size":24,border:""},model:{value:r.shareInfo.userids,callback:function(c){r.$set(r.shareInfo,"userids",c)},expression:"shareInfo.userids"}}):r._e()],1),s("FormItem",[s("Select",{attrs:{placeholder:r.$L("\u6743\u9650")},model:{value:r.shareInfo.permission,callback:function(c){r.$set(r.shareInfo,"permission",c)},expression:"shareInfo.permission"}},[s("Option",{attrs:{value:1}},[r._v(r._s(r.$L("\u8BFB/\u5199")))]),s("Option",{attrs:{value:0}},[r._v(r._s(r.$L("\u53EA\u8BFB")))])],1)],1),s("FormItem",[s("Button",{attrs:{type:"primary",loading:r.shareLoad>0},on:{click:r.onShare}},[r._v(r._s(r.$L("\u5171\u4EAB")))])],1)],1),r.shareList.length>0?s("div",{staticClass:"page-file-share-items"},[s("div",{staticClass:"page-file-share-title"},[r._v(r._s(r.$L("\u5DF2\u5171\u4EAB\u6210\u5458"))+":")]),s("ul",{staticClass:"page-file-share-list"},r._l(r.shareList,function(c){return s("li",[c.userid==0?s("div",{staticClass:"all-avatar"},[s("EAvatar",{staticClass:"avatar-text",attrs:{icon:"el-icon-s-custom"}}),s("span",{staticClass:"avatar-name"},[r._v(r._s(r.$L("\u6240\u6709\u4EBA")))])],1):s("UserAvatar",{attrs:{size:32,userid:c.userid,showName:""}}),s("Select",{attrs:{placeholder:r.$L("\u6743\u9650")},on:{"on-change":function(x){return r.upShare(c)}},model:{value:c.permission,callback:function(x){r.$set(c,"permission",x)},expression:"item.permission"}},[s("Option",{attrs:{value:1}},[r._v(r._s(r.$L("\u8BFB/\u5199")))]),s("Option",{attrs:{value:0}},[r._v(r._s(r.$L("\u53EA\u8BFB")))]),s("Option",{staticClass:"delete",attrs:{value:-1}},[r._v(r._s(r.$L("\u5220\u9664")))])],1)],1)}),0)]):r._e()],1),s("UserSelect",{ref:"sendFile",attrs:{"multiple-max":50,title:r.$L("\u53D1\u9001\u6587\u4EF6"),"before-submit":r.onSendFile,"show-select-all":!1,"show-dialog":"",module:""},model:{value:r.sendData,callback:function(c){r.sendData=c},expression:"sendData"}}),s("Modal",{attrs:{title:r.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:r.linkShow,callback:function(c){r.linkShow=c},expression:"linkShow"}},[s("div",[s("div",{staticStyle:{margin:"-10px 0 8px"}},[r._v(r._s(r.$L("\u6587\u4EF6\u540D\u79F0"))+": "+r._s(r.linkData.name))]),s("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":r.linkFocus},model:{value:r.linkData.url,callback:function(c){r.$set(r.linkData,"url",c)},expression:"linkData.url"}}),s("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[r._v(" "+r._s(r.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))+" "),s("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":r.$L("\u786E\u5B9A"),"cancel-text":r.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(c){return r.linkGet(!0)}}},[s("div",{attrs:{slot:"title"},slot:"title"},[s("p",[s("strong",[r._v(r._s(r.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),s("a",{attrs:{href:"javascript:void(0)"}},[r._v(r._s(r.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1),s("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[s("Button",{attrs:{type:"default"},on:{click:function(c){r.linkShow=!1}}},[r._v(r._s(r.$L("\u53D6\u6D88")))]),s("Button",{attrs:{type:"primary",loading:r.linkLoad>0},on:{click:r.linkCopy}},[r._v(r._s(r.$L("\u590D\u5236")))])],1)]),s("DrawerOverlay",{staticClass:"page-file-drawer",attrs:{beforeClose:r.fileBeforeClose,"mask-closable":!1},model:{value:r.fileShow,callback:function(c){r.fileShow=c},expression:"fileShow"}},[r.isPreview?s("FilePreview",{attrs:{file:r.fileInfo}}):s("FileContent",{ref:"fileContent",attrs:{file:r.fileInfo},model:{value:r.fileShow,callback:function(c){r.fileShow=c},expression:"fileShow"}})],1),s("PreviewImage",{attrs:{index:r.imageIndex,list:r.imageList},model:{value:r.imageShow,callback:function(c){r.imageShow=c},expression:"imageShow"}}),s("Modal",{attrs:{title:r.$L(r.pasteTitle),"cancel-text":r.$L("\u53D6\u6D88"),"ok-text":r.$L("\u7ACB\u5373\u4E0A\u4F20"),"enter-ok":!0},on:{"on-ok":r.pasteSend},model:{value:r.pasteShow,callback:function(c){r.pasteShow=c},expression:"pasteShow"}},[s("ul",{staticClass:"dialog-wrapper-paste",class:r.pasteWrapperClass},r._l(r.pasteItem,function(c){return s("li",[c.type=="image"?s("img",{attrs:{src:c.result}}):s("div",[r._v(r._s(r.$L("\u6587\u4EF6"))+": "+r._s(c.name)+" ("+r._s(r.$A.bytesToSize(c.size))+")")])])}),0)])],1)},pg=[];const gg=()=>lu(()=>import("./FilePreview.55c206d9.js"),["js/build/FilePreview.55c206d9.js","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),_g=()=>lu(()=>import("./FileContent.49414140.js"),["js/build/FileContent.49414140.js","js/build/FileContent.c015b499.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),vt={sort:null,mode:null,shared:null},vg={components:{UserAvatarTip:hg,UserSelect:cg,PreviewImage:ag,FilePreview:gg,DrawerOverlay:og,FileContent:_g},directives:{longpress:fg},data(){return{packList:[],packShow:!1,loadIng:0,searchKey:"",searchTimeout:null,types:[{value:"folder",label:"\u65B0\u5EFA\u6587\u4EF6\u5939",name:"\u6587\u4EF6\u5939"},{value:"upload",label:"\u4E0A\u4F20\u6587\u4EF6",name:null,divided:!0},{value:"updir",label:"\u4E0A\u4F20\u6587\u4EF6\u5939",name:null},{value:"document",label:"\u6587\u672C",name:"\u6587\u672C",divided:!0},{value:"drawio",label:"\u56FE\u8868",name:"\u56FE\u8868"},{value:"mind",label:"\u601D\u7EF4\u5BFC\u56FE",name:"\u5BFC\u56FE"},{value:"word",label:"Word \u6587\u6863",name:"Word",divided:!0},{value:"excel",label:"Excel \u5DE5\u4F5C\u8868",name:"Excel"},{value:"ppt",label:"PPT \u6F14\u793A\u6587\u7A3F",name:"PPT"}],tableMode:"",hideShared:!1,columns:[],shareShow:!1,shareInfo:{id:0,type:"all",userid:0,permission:1},shareList:[],shareLoad:0,sendFileId:0,sendData:[],linkShow:!1,linkData:{},linkLoad:0,fileShow:!1,fileInfo:{permission:-1},imageShow:!1,imageIndex:0,imageList:[],uploadDir:!1,uploadIng:0,uploadShow:!1,uploadList:[],uploadFormat:[],uploadAccept:"",contextMenuItem:{},contextMenuVisible:!1,contextMenuStyles:{top:0,left:0},shearIds:[],selectIds:[],dialogDrag:!1,pasteShow:!1,pasteFile:[],pasteItem:[]}},async beforeRouteEnter(r,h,s){vt.sort=await $A.IDBJson("cacheFileSort"),vt.mode=await $A.IDBString("fileTableMode"),vt.shared=await $A.IDBBoolean("fileHideShared"),s()},created(){this.tableMode=vt.mode,this.hideShared=vt.shared,this.columns=[{type:"selection",width:50,align:"right"},{title:this.$L("\u6587\u4EF6\u540D"),key:"name",minWidth:300,sortable:!0,render:(r,{row:h})=>{let s=[];if(!/^\d+$/.test(h.id))return s.push(r("Input",{props:{elementId:"input_"+h.id,value:h.newname,autofocus:!0,disabled:!!h._load,parser:this.onParser},style:{width:"auto"},on:{"on-change":x=>{h.newname=x.target.value},"on-blur":()=>{const x=this.fileLists.find(({id:O})=>O==h.id);x&&(x.newname=h.newname,this.onBlur(x))},"on-enter":()=>{const x=this.fileLists.find(({id:O})=>O==h.id);x&&(x.newname=h.newname,this.onEnter(x))}}})),r("div",{class:"file-nbox"},[r("div",{class:`no-dark-before file-name file-icon ${h.type}`},s)]);{s.push(r("QuickEdit",{props:{value:h.name,autoEdit:!!h._edit,clickOutSide:!1,parser:this.onParser},on:{"on-edit-change":G=>{const ge=this.fileLists.find(({id:Ye})=>Ye==h.id);ge&&setTimeout(()=>{this.setEdit(ge.id,G)},100)},"on-update":(G,ge)=>{const Ye=this.fileLists.find(({id:mt})=>mt==h.id);Ye&&Ye._edit===!0&&(Ye.newname=G,this.onEnter(Ye)),ge()}}},[r("AutoTip",{props:{placement:"right"}},$A.getFileName(h))]));const x=[];h.share?h.userid!=this.userId?x.push(r("UserAvatar",{props:{userid:h.userid,size:20}})):x.push(r("i",{class:"taskfont",domProps:{innerHTML:""}})):this.isParentShare&&x.push(r("UserAvatar",{props:{userid:h.created_id,size:20}},[h.created_id!=h.userid?r("p",[r("strong",this.$L("\u6210\u5458\u521B\u5EFA\u4E8E")+": "+h.created_at)]):r("p",this.$L("\u6240\u6709\u8005\u521B\u5EFA\u4E8E")+": "+h.created_at)]));const O=this.shearIds.includes(h.id)?" shear":"",P=h.share?" share":"";return r("div",{class:`file-nbox${O}`,attrs:{"data-id":h.id}},[r("div",{class:`no-dark-before file-name file-icon ${h.type}${P}`},s),x])}}},{title:this.$L("\u5927\u5C0F"),key:"size",width:110,resizable:!0,sortable:!0,render:(r,{row:h})=>h.type=="folder"?r("div","-"):r("AutoTip",$A.bytesToSize(h.size))},{title:this.$L("\u7C7B\u578B"),key:"type",width:110,resizable:!0,sortable:!0,render:(r,{row:h})=>{let s=this.types.find(({value:c,name:x})=>c==h.type&&x);return s?r("AutoTip",this.$L(s.name)):r("div",(h.ext||h.type).toUpperCase())}},{title:this.$L("\u6240\u6709\u8005"),key:"userid",width:130,resizable:!0,sortable:!0,render:(r,{row:h})=>r("UserAvatar",{props:{size:18,userid:h.userid,showIcon:!1,showName:!0}})},{title:this.$L("\u6700\u540E\u4FEE\u6539"),key:"updated_at",width:168,resizable:!0,sortable:!0}].map(r=>(r.key===vt.sort.key&&(r.sortType=vt.sort.order),r))},mounted(){this.uploadAccept=this.uploadFormat.map(r=>"."+r).join(",")},activated(){this.getFileList()},computed:{...ug(["systemConfig","userIsAdmin","userInfo","fileLists","wsOpenNum","windowWidth","filePackLists"]),pid(){const{folderId:r}=this.$route.params;return parseInt(/^\d+$/.test(r)?r:0)},fid(){const{fileId:r}=this.$route.params;return parseInt(/^\d+$/.test(r)?r:0)},actionUrl(){return $A.apiUrl("file/content/upload?pid="+this.pid)},headers(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},shareAlready(){let r=this.shareList?this.shareList.map(({userid:h})=>h):[];return this.shareInfo.userid&&r.push(this.shareInfo.userid),r},fileList(){const{fileLists:r,searchKey:h,hideShared:s,pid:c,selectIds:x,userId:O}=this;return $A.cloneJSON(Ci.exports.sortBy(r.filter(G=>s&&G.userid!=O&&G.created_id!=O?!1:h?G.name.indexOf(h)!==-1:G.pid==c),G=>(G.type=="folder"?"a":"b")+G.name)).map(G=>(G._checked=x.includes(G.id),G))},hasShareFile(){const{fileLists:r,userId:h}=this;return r.findIndex(s=>s.share&&s.userid!=h)!==-1},shearFirst(){const{fileLists:r,shearIds:h}=this;return h.length===0?null:r.find(s=>s.id==h[0])},navigator(){let{pid:r,fileLists:h}=this,s=[];for(;r>0;){let c=h.find(({id:x,permission:O})=>x==r&&O>-1);c?(s.unshift(c),r=c.pid):r=0}return s},isPreview(){return this.windowPortrait&&this.fileInfo.type!="document"||this.fileInfo.permission===0},isParentShare(){const{navigator:r}=this;return!!r.find(({share:h})=>h)},pasteTitle(){const{pasteItem:r}=this;let h=r.find(({type:c})=>c=="image"),s=r.find(({type:c})=>c!="image");return h&&s?"\u4E0A\u4F20\u6587\u4EF6/\u56FE\u7247":h?"\u4E0A\u4F20\u56FE\u7247":"\u4E0A\u4F20\u6587\u4EF6"},pasteWrapperClass(){return this.pasteItem.find(({type:r})=>r!=="image")?["multiple"]:[]},tableHeight(){return this.windowHeight-150},compressedSownloadDisabled(){var r;return!!((r=this.fileList)!=null&&r.find(h=>h._checked&&h.permission<1))},maxSize(){var r;return(r=this.systemConfig)!=null&&r.file_upload_limit?this.systemConfig.file_upload_limit*1024:1024e3},showBtnText(){return this.windowWidth>600}},watch:{pid(){this.searchKey="",this.selectIds=[],this.getFileList()},fid(){this.openFileJudge()},tableMode(r){$A.IDBSave("fileTableMode",r)},hideShared(r){$A.IDBSave("fileHideShared",r)},fileShow(r){r||(this.browseFile(0),this.windowPortrait&&$A.onBlur(!0))},imageShow(r){r||this.browseFile(0)},navigator:{handler(){this.$nextTick(r=>{this.$refs[`nav_${this.pid}`]&&$A.scrollToView(this.$refs[`nav_${this.pid}`][0],!1)})},immediate:!0},selectIds:{handler(r){r.length>0&&(this.shearIds=[])},deep:!0},shearIds:{handler(r){r.length>0&&(this.selectIds=[])},deep:!0},wsOpenNum(r){r<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout(()=>{this.$route.name=="manage-file"&&this.getFileList()},5e3))},filePackLists:{handler(){this.updatePackProgress()},deep:!0}},methods:{getFileList(){this.$route.name==="manage-file"&&(this.loadIng++,this.$store.dispatch("getFiles",this.pid).then(async()=>{this.loadIng--,this.openFileJudge(),this.shakeFile(this.$route.params.shakeId),await $A.IDBSet("fileFolderId",this.pid)}).catch(({msg:r})=>{this.loadIng--,$A.modalError({content:r,onOk:()=>{this.browseFolder(0)}})}))},addFile(r){if(r){if(r=="upload"){this.uploadDir=!1,this.$refs.fileUpload.handleClick();return}else if(r=="updir"){this.uploadDir=!0,this.$refs.dirUpload.handleClick();return}}else return;let h=$A.randomString(8);this.fileLists.push({_edit:!0,pid:this.pid,id:h,type:r,name:"",userid:this.userId,newname:this.$L("\u672A\u547D\u540D")}),this.autoBlur(h)},handleLongpress(r,h){const s=$A.getAttr(h,"data-id"),c=this.fileList.find(x=>x.id==s);!c||this.handleRightClick(r,c)},handleContextmenu(r){this.windowLandscape&&this.handleRightClick(r)},handleRightClick(r,h,s){this.contextMenuItem=$A.isJson(h)?h:{},this.contextMenuVisible&&this.handleClickContextMenuOutside(),this.$nextTick(()=>{const x=this.$refs.fileWrapper.getBoundingClientRect();this.contextMenuStyles={left:`${r.clientX-x.left}px`,top:`${r.clientY-x.top}px`},s===!0&&(this.contextMenuStyles.top=`${r.target.clientHeight+r.target.offsetTop-5}px`),this.contextMenuVisible=!0})},browseFolder(r,h=null){r>0?this.goForward({name:"manage-file",params:{folderId:r,fileId:null,shakeId:h}}):(this.searchKey="",this.goForward({name:"manage-file"}))},browseFile(r){r>0?this.goForward({name:"manage-file",params:{folderId:this.pid,fileId:r}}):this.browseFolder(this.pid)},openFileJudge(){if(this.$route.name!=="manage-file"){this.fileShow=!1,this.imageShow=!1;return}if(this.fid<=0){this.fileShow=!1,this.imageShow=!1;return}const r=this.fileList.find(({id:h})=>h===this.fid);if(!r){this.fileShow=!1,this.imageShow=!1;return}if(r.image_url){const h=this.fileList.filter(({image_url:s})=>!!s);if(h.length>0){this.imageIndex=h.findIndex(({id:s})=>r.id===s),this.imageList=h.map(s=>s.image_width?{src:s.image_url,width:s.image_width,height:s.image_height}:s.image_url),this.imageShow=!0;return}}if(this.$Electron||this.$isEEUiApp){this.openFileSingle(r);return}this.fileInfo=r,this.fileShow=!0},openFileSingle(r){const h=`/single/file/${r.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${r.id}`,path:h,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(r),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:r.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(r),url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${h}`}}):window.open($A.apiUrl(`..${h}`)),this.browseFile(0)},clickRow(r,h){if(this.contextMenuVisible){this.handleClickContextMenuOutside();return}h.type=="selection"?this.dropFile(r,"select"):this.dropFile(r,"open")},handleContextMenu(r,h){this.handleRightClick(h,this.fileLists.find(({id:s})=>s===r.id)||{})},handleContextClick(r){$A.leftExists(r,"new:")?this.addFile($A.leftDelete(r,"new:")):this.dropFile(this.contextMenuItem,r)},handleClickContextMenuOutside(){this.contextMenuVisible=!1},handleVisibleChangeMenu(r){let h=this.fileLists.find(({_highlight:s})=>!!s);h&&this.$set(h,"_highlight",!1),r&&this.contextMenuItem.id&&this.$set(this.contextMenuItem,"_highlight",!0)},dropFile(r,h){switch(h){case"open":case"openCheckMenu":if(h==="openCheckMenu"&&this.contextMenuVisible||this.fileList.findIndex(c=>c._edit===!0)>-1||r._load)return;r.type=="folder"?this.browseFolder(r.id):this.browseFile(r.id);break;case"upperFolder":this.searchKey="",this.browseFolder(r.pid,r.id);break;case"select":let s=this.selectIds.findIndex(c=>c==r.id);s>-1?this.selectIds.splice(s,1):this.selectIds.push(r.id);break;case"rename":this.setEdit(r.id,!0),this.autoBlur(r.id);break;case"copy":this.$store.dispatch("call",{url:"file/copy",data:{id:r.id}}).then(({data:c,msg:x})=>{$A.messageSuccess(x),this.$store.dispatch("saveFile",c)}).catch(({msg:c})=>{$A.modalError(c)});break;case"shear":this.shearIds=[r.id];break;case"shearSelect":this.shearIds=$A.cloneJSON(this.selectIds);break;case"send":this.sendFileId=r.id,this.sendData=[],this.$refs.sendFile.onSelection();break;case"share":this.shareInfo={id:r.id,type:"all",userid:r.userid,permission:1},this.shareList=[],this.shareShow=!0,this.getShare();break;case"outshare":$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u3010"+r.name+"\u3011\u5171\u4EAB\u6210\u5458\u5417\uFF1F",loading:!0,onOk:()=>new Promise((c,x)=>{this.$store.dispatch("call",{url:"file/share/out",data:{id:r.id}}).then(({msg:O})=>{c(O),this.$store.dispatch("forgetFile",r.id)}).catch(({msg:O})=>{x(O)})})});break;case"link":this.linkData={id:r.id,name:r.name},this.linkShow=!0,this.linkGet();break;case"download":if(!r.ext)return;$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${r.name}.${r.ext} (${$A.bytesToSize(r.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`file/content?id=${r.id}&down=yes`))}});break;case"downloadzip":this.downloadZipFile([r.id]);break;case"delete":this.deleteFile([r.id]);break}},onSendFile(){return new Promise((r,h)=>{if(this.sendData.length===0){$A.messageError("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458"),h();return}const s=this.sendData.filter(x=>$A.leftExists(x,"d:")).map(x=>x.replace("d:","")),c=this.sendData.filter(x=>!$A.leftExists(x,"d:"));this.$store.dispatch("call",{url:"dialog/msg/sendfileid",data:{dialogids:s,userids:c,file_id:this.sendFileId}}).then(({data:x,msg:O})=>{this.$store.dispatch("saveDialogMsg",x.msgs),this.$store.dispatch("updateDialogLastMsg",x.msgs),$A.messageSuccess(O),r()}).catch(({msg:x})=>{$A.modalError(x),h()})})},linkGet(r){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:r===!0?"yes":"no"}}).then(({data:h})=>{this.linkData=Object.assign(h,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:h})=>{this.linkShow=!1,$A.modalError(h)}).finally(h=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(r=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(r=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(r=>{this.$refs.linkInput.focus({cursor:"all"})})},shearTo(){if(this.shearIds.length!=0){if(this.isParentShare){const r=this.fileLists.find(({id:h,share:s})=>s&&this.shearIds.includes(h));if(r){$A.modalError(`${r.name} \u5F53\u524D\u6B63\u5728\u5171\u4EAB\uFF0C\u65E0\u6CD5\u79FB\u52A8\u5230\u53E6\u4E00\u4E2A\u5171\u4EAB\u6587\u4EF6\u5939\u5185`);return}}this.$store.dispatch("call",{url:"file/move",data:{ids:this.shearIds,pid:this.pid}}).then(({data:r,msg:h})=>{$A.messageSuccess(h),this.shearIds=[],this.$store.dispatch("saveFile",r)}).catch(({msg:r})=>{$A.modalError(r)})}},deleteFile(r){if(r.length===0)return;const h=this.fileLists.find(O=>O.id==r[0])||{};let c=!r.find(O=>this.fileLists.find(P=>P.type!="folder"&&P.id==O))?"\u6587\u4EF6\u5939":"\u6587\u4EF6",x=`\u3010${h.name}\u3011\u7B49${r.length}\u4E2A${c}`;r.length===1&&(x=`\u3010${h.name}\u3011${c}`),$A.modalConfirm({title:"\u5220\u9664"+c,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664"+x+"\u5417\uFF1F",loading:!0,onOk:()=>new Promise((O,P)=>{this.$store.dispatch("call",{url:"file/remove",data:{ids:r}}).then(({msg:G})=>{O(G),this.$store.dispatch("forgetFile",r),this.selectIds=this.selectIds.filter(ge=>!r.includes(ge))}).catch(({msg:G})=>{P(G)})})})},packPercentageParse(r){return parseInt(r,10)},packClear(){this.packList=this.packList.filter(r=>r.status!=="finished"),this.packShow=!1},async startPack(r){const h={name:r,status:"packing",percentage:0};this.packList.push(h),this.uploadShow=!1,this.packShow=!0},updatePackProgress(){this.packList.forEach(r=>{const h=this.filePackLists.find(({name:s})=>s==r.name);h&&(r.percentage=Math.max(1,h.progress),r.status!="finished"&&r.percentage>=100&&(r.status="finished",this.downloadPackFile(r.name)))})},downloadPackFile(r){const h=$A.apiUrl(`file/download/confirm?name=${r}&token=${this.userToken}`);if(!$A.Electron&&!$A.isEEUiApp){const s=document.createElement("a");s.setAttribute("href",h),s.setAttribute("download",`${r}`),document.body.appendChild(s),s.click(),document.body.removeChild(s)}else this.$store.dispatch("downUrl",h)},downloadZipFile(r){if(r.length===0)return;const h=this.fileLists.find(({id:P})=>P===r[0])||{},c=!r.some(P=>this.fileLists.some(({type:G,id:ge})=>G!=="folder"&&ge===P))?"\u6587\u4EF6\u5939":"\u6587\u4EF6",x=r.length===1?`\u3010${h.name}\u3011${c}`:`\u3010${h.name}\u3011\u7B49${r.length}\u4E2A${c}`,O=`file_${$A.formatDate("YmdHis")}.zip`;$A.modalConfirm({title:"\u6253\u5305\u4E0B\u8F7D",content:`\u4F60\u786E\u5B9A\u8981\u6253\u5305\u4E0B\u8F7D${x}\u5417\uFF1F`,okText:"\u786E\u5B9A",onOk:async()=>{if(this.packList.find(({status:P})=>P==="packing")){$A.messageWarning("\u8BF7\u7B49\u5F85\u6253\u5305\u5B8C\u6210");return}try{await this.$store.dispatch("call",{url:"file/download/pack",data:{ids:r,name:O}}),this.startPack(O)}catch({msg:P}){$A.modalError(P)}}})},autoBlur(r){this.$nextTick(()=>{if(this.$refs["input_"+r])this.$refs["input_"+r][0].focus({cursor:"all"});else if(document.getElementById("input_"+r)){const h=document.getElementById("input_"+r),s=h.value.length;h.focus(),h.setSelectionRange(0,s)}})},onParser(r){return r.replace(/[\\\/:*?\"<>|]/g,"")},onBlur(r){this.fileLists.find(({id:h,_edit:s})=>h==r.id&&!s)||this.onEnter(r)},onKeyup(r,h){r.keyCode===13?this.onEnter(h):r.keyCode===27&&(!/^\d+$/.test(h.id)?(h.newname="",this.$store.dispatch("forgetFile",h.id)):(this.setLoad(h.id,!1),this.setEdit(h.id,!1)))},onEnter(r){const h=!/^\d+$/.test(r.id);if(!r.newname){h?this.$store.dispatch("forgetFile",r.id):this.setEdit(r.id,!1);return}if(r.newname==r.name){this.setEdit(r.id,!1);return}r._load||(this.setLoad(r.id,!0),this.$store.dispatch("call",{url:"file/add",data:{id:h?0:r.id,pid:r.pid,name:r.newname,type:r.type},spinner:2e3}).then(({data:s,msg:c})=>{$A.messageSuccess(c),this.setLoad(r.id,!1),this.setEdit(r.id,!1),this.$store.dispatch("saveFile",s),h&&(this.$store.dispatch("forgetFile",r.id),this.shakeFile(s.id))}).catch(({msg:s})=>{$A.modalError(s),this.setLoad(r.id,!1),h&&this.$store.dispatch("forgetFile",r.id)}))},setEdit(r,h){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&(this.$set(s,"_edit",h),h&&this.$set(s,"newname",s.name))},setLoad(r,h){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&this.$set(s,"_load",h)},onSearchFocus(){this.$nextTick(()=>{this.$refs.searchInput.focus({cursor:"end"})})},onSearchChange(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchKey.trim()!=""&&(this.searchTimeout=setTimeout(()=>{this.loadIng++,this.$store.dispatch("searchFiles",this.searchKey.trim()).then(()=>{this.loadIng--}).catch(()=>{this.loadIng--})},600))},getShare(){this.shareLoad++,this.$store.dispatch("call",{url:"file/share",data:{id:this.shareInfo.id}}).then(({data:r})=>{r.id==this.shareInfo.id&&(this.shareList=r.list.map(h=>(h._permission=h.permission,h)))}).catch(({msg:r})=>{this.shareShow=!1,$A.modalError(r)}).finally(r=>{this.shareLoad--})},onShare(r=!1){if(this.shareInfo.type==="all"&&(this.shareInfo.userids=[0]),this.shareInfo.userids.length==0){$A.messageWarning("\u8BF7\u9009\u62E9\u5171\u4EAB\u6210\u5458");return}this.shareLoad++,this.$store.dispatch("call",{url:"file/share/update",data:Object.assign(this.shareInfo,{force:r===!0?1:0})}).then(({data:h,msg:s})=>{$A.messageSuccess(s),this.$store.dispatch("saveFile",h),this.$set(this.shareInfo,"userids",[]),this.getShare()}).catch(({ret:h,msg:s})=>{h===-3001?$A.modalConfirm({content:"\u6B64\u6587\u4EF6\u5939\u5185\u5DF2\u6709\u5171\u4EAB\u6587\u4EF6\u5939\uFF0C\u5B50\u6587\u4EF6\u7684\u5171\u4EAB\u72B6\u6001\u5C06\u88AB\u53D6\u6D88\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",onOk:()=>{this.onShare(!0)}}):$A.modalError(s)}).finally(h=>{this.shareLoad--})},upShare(r,h=!1){r.loading!==!0&&(r.loading=!0,this.$store.dispatch("call",{url:"file/share/update",data:{id:this.shareInfo.id,userids:[r.userid],permission:r.permission,force:h===!0?1:0}}).then(({data:s,msg:c})=>{if(r.loading=!1,r._permission=r.permission,$A.messageSuccess(c),this.$store.dispatch("saveFile",s),r.permission===-1){let x=this.shareList.findIndex(({userid:O})=>O==r.userid);x>-1&&this.shareList.splice(x,1)}}).catch(({ret:s,msg:c})=>{r.loading=!1,s===-3001?$A.modalConfirm({content:"\u6B64\u6587\u4EF6\u5939\u5185\u5DF2\u6709\u5171\u4EAB\u6587\u4EF6\u5939\uFF0C\u5B50\u6587\u4EF6\u7684\u5171\u4EAB\u72B6\u6001\u5C06\u88AB\u53D6\u6D88\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",onOk:()=>{this.upShare(r,!0)},onCancel:()=>{r.permission=r._permission}}):(r.permission=r._permission,$A.modalError(c))}))},uploadName(r){return $A.getObject(r,"response.data.full_name")||r.name},handleTableSort({key:r,order:h}){$A.IDBSave("cacheFileSort",["asc","desc"].includes(h)?{key:r,order:h}:{})},handleTableSelect(r){this.selectIds=r.map(h=>h.id)},clearSelect(){this.selectIds=[]},clearShear(){this.shearIds=[]},shakeFile(r){!r||this.$nextTick(h=>{const s=$A(this.$el).find(`[data-id="${r}"]`);s.length>0&&($A.scrollIntoViewIfNeeded(s[0]),$A(s[0]).addClass("common-shake"),setTimeout(c=>$A(s[0]).removeClass("common-shake"),800))})},pasteDragNext(r,h){let s=h==="drag"?r.dataTransfer.files:r.clipboardData.files;s=Array.prototype.slice.call(s),s.length>0&&(r.preventDefault(),this.pasteFile=[],this.pasteItem=[],s.some(c=>{const x={type:$A.getMiddle(c.type,null,"/"),name:c.name,size:c.size,result:null};if(x.type==="image"){const O=new FileReader;O.readAsDataURL(c),O.onload=({target:P})=>{x.result=P.result,this.pasteFile.push(c),this.pasteItem.push(x),this.pasteShow=!0}}else this.pasteFile.push(c),this.pasteItem.push(x),this.pasteShow=!0}))},filePasteDrag(r,h){if(this.dialogDrag=!1,$A.dataHasFolder(h==="drag"?r.dataTransfer:r.clipboardData)){r.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${h==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\uFF0C\u8BF7\u624B\u52A8\u4E0A\u4F20\u6587\u4EF6\u5939\u3002`);return}this.pasteDragNext(r,h)},fileDragOver(r,h){let s=this.__dialogDrag=$A.randomString(8);if(!r)setTimeout(()=>{s===this.__dialogDrag&&(this.dialogDrag=r)},150);else{if(h.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},pasteSend(){if(this.__paste_send_index)return;this.__paste_send_index=1,setTimeout(()=>{this.__paste_send_index=0},300);const r=[];this.pasteFile.some(h=>{r.find(s=>s===h.name)||(r.push(h.name),this.$refs.fileUpload.upload(h))})},fileBeforeClose(){return new Promise(r=>{if(!this.$refs.fileContent){r();return}if(this.$refs.fileContent.equalContent){r();return}$A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{r()}})})},uploadUpdate(r){r.forEach(h=>{let s=this.uploadList.findIndex(({uid:c})=>c==h.uid);s>-1?this.uploadList.splice(s,1,h):this.uploadList.unshift(h)})},uploadClear(){this.uploadList=this.uploadList.filter(({status:r})=>r!=="finished"),this.$refs.fileUpload.clearFiles(),this.$refs.dirUpload.clearFiles()},uploadPercentageParse(r){return parseInt(r,10)},handleProgress(r,h,s){h._uploadIng===void 0&&(h._uploadIng=!0,this.uploadIng++),this.uploadUpdate(s)},handleSuccess(r,h,s){this.uploadIng--,this.uploadUpdate(s),r.ret===1?this.$store.dispatch("saveFile",r.data):$A.modalWarning({title:"\u4E0A\u4F20\u5931\u8D25",content:"\u6587\u4EF6 "+h.name+" \u4E0A\u4F20\u5931\u8D25\uFF0C"+r.msg})},handleError(r,h,s){this.uploadIng--,this.uploadUpdate(s)},handleFormatError(r){this.uploadDir||$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+r.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u4E0A\u4F20\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(r){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+r.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(){return this.uploadShow=!0,this.packShow=!1,!0}}},uu={};var mg=lg(vg,dg,pg,!1,wg,null,null,null);function wg(r){for(let h in uu)this[h]=uu[h]}var Sg=function(){return mg.exports}();export{Sg as default}; diff --git a/public/js/build/file.6049f56f.js b/public/js/build/file.7a934af0.js similarity index 88% rename from public/js/build/file.6049f56f.js rename to public/js/build/file.7a934af0.js index 8630bd01a..c72febc46 100644 --- a/public/js/build/file.6049f56f.js +++ b/public/js/build/file.7a934af0.js @@ -1 +1 @@ -import n from"./FileContent.f5b3c8be.js";import l from"./FilePreview.22c023a8.js";import{n as s}from"./app.6c8b31b1.js";import"./IFrame.364b588a.js";var a=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"single-file"},[t("PageTitle",{attrs:{title:e.pageName}}),e.loadIng>0?t("Loading"):e.fileInfo?[e.isPreview?t("FilePreview",{attrs:{code:e.code,file:e.fileInfo,historyId:e.historyId,headerShow:!e.$isEEUiApp}}):t("FileContent",{attrs:{file:e.fileInfo},model:{value:e.fileShow,callback:function(r){e.fileShow=r},expression:"fileShow"}})]:e._e()],2)},f=[];const u={components:{FilePreview:l,FileContent:n},data(){return{loadIng:0,code:null,fileShow:!0,fileInfo:null}},mounted(){},computed:{historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},isPreview(){return this.windowPortrait||this.code||this.historyId>0||this.fileInfo&&this.fileInfo.permission===0},pageName(){let e=this.fileInfo?this.fileInfo.name:"";return this.$route.query&&this.$route.query.history_at&&(e+=` [${this.$route.query.history_at}]`),e}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){let{codeOrFileId:e}=this.$route.params,i={id:e};if(/^\d+$/.test(e))this.code=null;else if(e)this.code=e;else return;setTimeout(t=>{this.loadIng++},600),this.$store.dispatch("call",{url:"file/one",data:i}).then(({data:t})=>{this.fileInfo=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{window.close()}})}).finally(t=>{this.loadIng--})}}},o={};var h=s(u,a,f,!1,d,"b8037598",null,null);function d(e){for(let i in o)this[i]=o[i]}var I=function(){return h.exports}();export{I as default}; +import n from"./FileContent.49414140.js";import l from"./FilePreview.55c206d9.js";import{n as s}from"./app.6910ca56.js";import"./IFrame.1fc38451.js";var a=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"single-file"},[t("PageTitle",{attrs:{title:e.pageName}}),e.loadIng>0?t("Loading"):e.fileInfo?[e.isPreview?t("FilePreview",{attrs:{code:e.code,file:e.fileInfo,historyId:e.historyId,headerShow:!e.$isEEUiApp}}):t("FileContent",{attrs:{file:e.fileInfo},model:{value:e.fileShow,callback:function(r){e.fileShow=r},expression:"fileShow"}})]:e._e()],2)},f=[];const u={components:{FilePreview:l,FileContent:n},data(){return{loadIng:0,code:null,fileShow:!0,fileInfo:null}},mounted(){},computed:{historyId(){return this.$route.query?$A.runNum(this.$route.query.history_id):0},isPreview(){return this.windowPortrait||this.code||this.historyId>0||this.fileInfo&&this.fileInfo.permission===0},pageName(){let e=this.fileInfo?this.fileInfo.name:"";return this.$route.query&&this.$route.query.history_at&&(e+=` [${this.$route.query.history_at}]`),e}},watch:{$route:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){let{codeOrFileId:e}=this.$route.params,i={id:e};if(/^\d+$/.test(e))this.code=null;else if(e)this.code=e;else return;setTimeout(t=>{this.loadIng++},600),this.$store.dispatch("call",{url:"file/one",data:i}).then(({data:t})=>{this.fileInfo=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{window.close()}})}).finally(t=>{this.loadIng--})}}},o={};var h=s(u,a,f,!1,d,"b8037598",null,null);function d(e){for(let i in o)this[i]=o[i]}var I=function(){return h.exports}();export{I as default}; diff --git a/public/js/build/fileMsg.3e945301.js b/public/js/build/fileMsg.f47e5c3e.js similarity index 71% rename from public/js/build/fileMsg.3e945301.js rename to public/js/build/fileMsg.f47e5c3e.js index 4d9c1bab2..9c5a6b116 100644 --- a/public/js/build/fileMsg.3e945301.js +++ b/public/js/build/fileMsg.f47e5c3e.js @@ -1 +1 @@ -import{m as a,n as r,_ as s}from"./app.6c8b31b1.js";import{I as l}from"./IFrame.364b588a.js";var c=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"single-file-msg"},[e("PageTitle",{attrs:{title:t.title}}),t.loadIng>0?e("Loading"):t.isWait?t._e():[t.isType("md")?e("MDPreview",{attrs:{initialValue:t.msgDetail.content.content}}):t.isType("text")?e("TEditor",{attrs:{value:t.msgDetail.content.content,height:"100%",readOnly:""}}):t.isType("drawio")?e("Drawio",{attrs:{title:t.msgDetail.msg.name,readOnly:""},model:{value:t.msgDetail.content,callback:function(n){t.$set(t.msgDetail,"content",n)},expression:"msgDetail.content"}}):t.isType("mind")?e("Minder",{attrs:{value:t.msgDetail.content,readOnly:""}}):t.isType("code")?[t.isLongText(t.msgDetail.msg.name)?e("div",{staticClass:"view-code",domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msgDetail.content.content,t.userId))}}):e("AceEditor",{staticClass:"view-editor",attrs:{ext:t.msgDetail.msg.ext,readOnly:""},model:{value:t.msgDetail.content.content,callback:function(n){t.$set(t.msgDetail.content,"content",n)},expression:"msgDetail.content.content"}})]:t.isType("office")?e("OnlyOffice",{attrs:{code:t.officeCode,documentKey:t.documentKey,readOnly:""},model:{value:t.officeContent,callback:function(n){t.officeContent=n},expression:"officeContent"}}):t.isType("preview")?e("IFrame",{staticClass:"preview-iframe",attrs:{src:t.previewUrl}}):e("div",{staticClass:"no-support"},[t._v(t._s(t.$L("\u4E0D\u652F\u6301\u5355\u72EC\u67E5\u770B\u6B64\u6D88\u606F")))])]],2)},m=[];const d=()=>s(()=>import("./preview.438bb1b4.js"),["js/build/preview.438bb1b4.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),_=()=>s(()=>import("./TEditor.5f656e41.js"),["js/build/TEditor.5f656e41.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/ImgUpload.0e64a5a8.js"]),u=()=>s(()=>import("./AceEditor.2ebeaef8.js"),["js/build/AceEditor.2ebeaef8.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),g=()=>s(()=>import("./OnlyOffice.3b8ff0fe.js"),["js/build/OnlyOffice.3b8ff0fe.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),f=()=>s(()=>import("./Drawio.32180b15.js"),["js/build/Drawio.32180b15.js","js/build/Drawio.fc5c6326.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),p=()=>s(()=>import("./Minder.37c15ccd.js"),["js/build/Minder.37c15ccd.js","js/build/Minder.3ba64342.css","js/build/IFrame.364b588a.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),v={components:{IFrame:l,AceEditor:u,TEditor:_,MDPreview:d,OnlyOffice:g,Drawio:f,Minder:p},data(){return{loadIng:0,isWait:!1,msgDetail:{}}},mounted(){},watch:{$route:{handler(){this.getInfo()},immediate:!0}},computed:{...a(["userId"]),msgId(){const{msgId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},title(){const{msg:t}=this.msgDetail;return t&&t.name?t.name:"Loading..."},isType(){const{msgDetail:t}=this;return function(i){return t.type=="file"&&t.file_mode==i}},officeContent(){return{id:this.msgDetail.id||0,type:this.msgDetail.msg.ext,name:this.title}},officeCode(){return"msgFile_"+this.msgDetail.id},previewUrl(){const{name:t,key:i}=this.msgDetail.content;return $A.apiUrl(`../online/preview/${t}?key=${i}`)}},methods:{getInfo(){this.msgId<=0||(setTimeout(t=>{this.loadIng++},600),this.isWait=!0,this.$store.dispatch("call",{url:"dialog/msg/detail",data:{msg_id:this.msgId}}).then(({data:t})=>{this.msgDetail=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{this.$Electron&&window.close()}})}).finally(t=>{this.loadIng--,this.isWait=!1}))},documentKey(){return new Promise(t=>{this.$store.dispatch("call",{url:"dialog/msg/detail",data:{msg_id:this.msgId,only_update_at:"yes"}}).then(({data:i})=>{t(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{t(0)})})},isLongText(t){return/^LongText-/.test(t)}}},o={};var h=r(v,c,m,!1,D,null,null,null);function D(t){for(let i in o)this[i]=o[i]}var I=function(){return h.exports}();export{I as default}; +import{m as a,n as r,_ as s}from"./app.6910ca56.js";import{I as l}from"./IFrame.1fc38451.js";var c=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"single-file-msg"},[e("PageTitle",{attrs:{title:t.title}}),t.loadIng>0?e("Loading"):t.isWait?t._e():[t.isType("md")?e("MDPreview",{attrs:{initialValue:t.msgDetail.content.content}}):t.isType("text")?e("TEditor",{attrs:{value:t.msgDetail.content.content,height:"100%",readOnly:""}}):t.isType("drawio")?e("Drawio",{attrs:{title:t.msgDetail.msg.name,readOnly:""},model:{value:t.msgDetail.content,callback:function(n){t.$set(t.msgDetail,"content",n)},expression:"msgDetail.content"}}):t.isType("mind")?e("Minder",{attrs:{value:t.msgDetail.content,readOnly:""}}):t.isType("code")?[t.isLongText(t.msgDetail.msg.name)?e("div",{staticClass:"view-code",domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msgDetail.content.content,t.userId))}}):e("AceEditor",{staticClass:"view-editor",attrs:{ext:t.msgDetail.msg.ext,readOnly:""},model:{value:t.msgDetail.content.content,callback:function(n){t.$set(t.msgDetail.content,"content",n)},expression:"msgDetail.content.content"}})]:t.isType("office")?e("OnlyOffice",{attrs:{code:t.officeCode,documentKey:t.documentKey,readOnly:""},model:{value:t.officeContent,callback:function(n){t.officeContent=n},expression:"officeContent"}}):t.isType("preview")?e("IFrame",{staticClass:"preview-iframe",attrs:{src:t.previewUrl}}):e("div",{staticClass:"no-support"},[t._v(t._s(t.$L("\u4E0D\u652F\u6301\u5355\u72EC\u67E5\u770B\u6B64\u6D88\u606F")))])]],2)},m=[];const d=()=>s(()=>import("./preview.0ba2d7e4.js"),["js/build/preview.0ba2d7e4.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),_=()=>s(()=>import("./TEditor.8daabc3e.js"),["js/build/TEditor.8daabc3e.js","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/ImgUpload.8863e78d.js"]),u=()=>s(()=>import("./AceEditor.aa9651a2.js"),["js/build/AceEditor.aa9651a2.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),g=()=>s(()=>import("./OnlyOffice.8a3b23b9.js"),["js/build/OnlyOffice.8a3b23b9.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),f=()=>s(()=>import("./Drawio.98aed49e.js"),["js/build/Drawio.98aed49e.js","js/build/Drawio.fc5c6326.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),p=()=>s(()=>import("./Minder.c159d06d.js"),["js/build/Minder.c159d06d.js","js/build/Minder.3ba64342.css","js/build/IFrame.1fc38451.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),v={components:{IFrame:l,AceEditor:u,TEditor:_,MDPreview:d,OnlyOffice:g,Drawio:f,Minder:p},data(){return{loadIng:0,isWait:!1,msgDetail:{}}},mounted(){},watch:{$route:{handler(){this.getInfo()},immediate:!0}},computed:{...a(["userId"]),msgId(){const{msgId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},title(){const{msg:t}=this.msgDetail;return t&&t.name?t.name:"Loading..."},isType(){const{msgDetail:t}=this;return function(i){return t.type=="file"&&t.file_mode==i}},officeContent(){return{id:this.msgDetail.id||0,type:this.msgDetail.msg.ext,name:this.title}},officeCode(){return"msgFile_"+this.msgDetail.id},previewUrl(){const{name:t,key:i}=this.msgDetail.content;return $A.apiUrl(`../online/preview/${t}?key=${i}`)}},methods:{getInfo(){this.msgId<=0||(setTimeout(t=>{this.loadIng++},600),this.isWait=!0,this.$store.dispatch("call",{url:"dialog/msg/detail",data:{msg_id:this.msgId}}).then(({data:t})=>{this.msgDetail=t}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{this.$Electron&&window.close()}})}).finally(t=>{this.loadIng--,this.isWait=!1}))},documentKey(){return new Promise(t=>{this.$store.dispatch("call",{url:"dialog/msg/detail",data:{msg_id:this.msgId,only_update_at:"yes"}}).then(({data:i})=>{t(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{t(0)})})},isLongText(t){return/^LongText-/.test(t)}}},o={};var h=r(v,c,m,!1,D,null,null,null);function D(t){for(let i in o)this[i]=o[i]}var I=function(){return h.exports}();export{I as default}; diff --git a/public/js/build/fileTask.45d83527.js b/public/js/build/fileTask.472d19ff.js similarity index 69% rename from public/js/build/fileTask.45d83527.js rename to public/js/build/fileTask.472d19ff.js index 1898b4556..b4735835a 100644 --- a/public/js/build/fileTask.45d83527.js +++ b/public/js/build/fileTask.472d19ff.js @@ -1 +1 @@ -import{n as o,_ as n}from"./app.6c8b31b1.js";import{I as r}from"./IFrame.364b588a.js";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"single-file-task"},[i("PageTitle",{attrs:{title:e.title}}),e.loadIng>0?i("Loading"):e.isWait?e._e():[e.isType("md")?i("MDPreview",{attrs:{initialValue:e.fileDetail.content.content}}):e.isType("text")?i("TEditor",{attrs:{value:e.fileDetail.content.content,height:"100%",readOnly:""}}):e.isType("drawio")?i("Drawio",{attrs:{title:e.fileDetail.name,readOnly:""},model:{value:e.fileDetail.content,callback:function(l){e.$set(e.fileDetail,"content",l)},expression:"fileDetail.content"}}):e.isType("mind")?i("Minder",{attrs:{value:e.fileDetail.content,readOnly:""}}):e.isType("code")?i("AceEditor",{staticClass:"view-editor",attrs:{ext:e.fileDetail.ext,readOnly:""},model:{value:e.fileDetail.content.content,callback:function(l){e.$set(e.fileDetail.content,"content",l)},expression:"fileDetail.content.content"}}):e.isType("office")?i("OnlyOffice",{attrs:{code:e.officeCode,documentKey:e.documentKey,readOnly:""},model:{value:e.officeContent,callback:function(l){e.officeContent=l},expression:"officeContent"}}):e.isType("preview")?i("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl}}):i("div",{staticClass:"no-support"},[e._v(e._s(e.$L("\u4E0D\u652F\u6301\u5355\u72EC\u67E5\u770B\u6B64\u6D88\u606F")))])]],2)},c=[];const d=()=>n(()=>import("./preview.438bb1b4.js"),["js/build/preview.438bb1b4.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),f=()=>n(()=>import("./TEditor.5f656e41.js"),["js/build/TEditor.5f656e41.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/ImgUpload.0e64a5a8.js"]),_=()=>n(()=>import("./AceEditor.2ebeaef8.js"),["js/build/AceEditor.2ebeaef8.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),u=()=>n(()=>import("./OnlyOffice.3b8ff0fe.js"),["js/build/OnlyOffice.3b8ff0fe.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),p=()=>n(()=>import("./Drawio.32180b15.js"),["js/build/Drawio.32180b15.js","js/build/Drawio.fc5c6326.css","js/build/app.6c8b31b1.js","js/build/app.9b013997.css","js/build/IFrame.364b588a.js"]),m=()=>n(()=>import("./Minder.37c15ccd.js"),["js/build/Minder.37c15ccd.js","js/build/Minder.3ba64342.css","js/build/IFrame.364b588a.js","js/build/app.6c8b31b1.js","js/build/app.9b013997.css"]),v={components:{IFrame:r,AceEditor:_,TEditor:f,MDPreview:d,OnlyOffice:u,Drawio:p,Minder:m},data(){return{loadIng:0,isWait:!1,fileDetail:{}}},mounted(){},watch:{$route:{handler(){this.getInfo()},immediate:!0}},computed:{fileId(){const{fileId:e}=this.$route.params;return parseInt(/^\d+$/.test(e)?e:0)},title(){const{name:e}=this.fileDetail;return e||"Loading..."},isType(){const{fileDetail:e}=this;return function(t){return e.file_mode==t}},officeContent(){return{id:this.fileDetail.id||0,type:this.fileDetail.ext,name:this.title}},officeCode(){return"taskFile_"+this.fileDetail.id},previewUrl(){const{name:e,key:t}=this.fileDetail.content;return $A.apiUrl(`../online/preview/${e}?key=${t}`)}},methods:{getInfo(){this.fileId<=0||(setTimeout(e=>{this.loadIng++},600),this.isWait=!0,this.$store.dispatch("call",{url:"project/task/filedetail",data:{file_id:this.fileId}}).then(({data:e})=>{this.fileDetail=e}).catch(({msg:e})=>{$A.modalError({content:e,onOk:()=>{this.$Electron&&window.close()}})}).finally(e=>{this.loadIng--,this.isWait=!1}))},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"project/task/filedetail",data:{file_id:this.fileId,only_update_at:"yes"}}).then(({data:t})=>{e(`${t.id}-${$A.Time(t.update_at)}`)}).catch(()=>{e(0)})})}}},a={};var h=o(v,s,c,!1,D,null,null,null);function D(e){for(let t in a)this[t]=a[t]}var T=function(){return h.exports}();export{T as default}; +import{n as o,_ as n}from"./app.6910ca56.js";import{I as r}from"./IFrame.1fc38451.js";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"single-file-task"},[i("PageTitle",{attrs:{title:e.title}}),e.loadIng>0?i("Loading"):e.isWait?e._e():[e.isType("md")?i("MDPreview",{attrs:{initialValue:e.fileDetail.content.content}}):e.isType("text")?i("TEditor",{attrs:{value:e.fileDetail.content.content,height:"100%",readOnly:""}}):e.isType("drawio")?i("Drawio",{attrs:{title:e.fileDetail.name,readOnly:""},model:{value:e.fileDetail.content,callback:function(l){e.$set(e.fileDetail,"content",l)},expression:"fileDetail.content"}}):e.isType("mind")?i("Minder",{attrs:{value:e.fileDetail.content,readOnly:""}}):e.isType("code")?i("AceEditor",{staticClass:"view-editor",attrs:{ext:e.fileDetail.ext,readOnly:""},model:{value:e.fileDetail.content.content,callback:function(l){e.$set(e.fileDetail.content,"content",l)},expression:"fileDetail.content.content"}}):e.isType("office")?i("OnlyOffice",{attrs:{code:e.officeCode,documentKey:e.documentKey,readOnly:""},model:{value:e.officeContent,callback:function(l){e.officeContent=l},expression:"officeContent"}}):e.isType("preview")?i("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl}}):i("div",{staticClass:"no-support"},[e._v(e._s(e.$L("\u4E0D\u652F\u6301\u5355\u72EC\u67E5\u770B\u6B64\u6D88\u606F")))])]],2)},c=[];const d=()=>n(()=>import("./preview.0ba2d7e4.js"),["js/build/preview.0ba2d7e4.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),f=()=>n(()=>import("./TEditor.8daabc3e.js"),["js/build/TEditor.8daabc3e.js","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/ImgUpload.8863e78d.js"]),_=()=>n(()=>import("./AceEditor.aa9651a2.js"),["js/build/AceEditor.aa9651a2.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),u=()=>n(()=>import("./OnlyOffice.8a3b23b9.js"),["js/build/OnlyOffice.8a3b23b9.js","js/build/OnlyOffice.97177ac3.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),p=()=>n(()=>import("./Drawio.98aed49e.js"),["js/build/Drawio.98aed49e.js","js/build/Drawio.fc5c6326.css","js/build/app.6910ca56.js","js/build/app.9b013997.css","js/build/IFrame.1fc38451.js"]),m=()=>n(()=>import("./Minder.c159d06d.js"),["js/build/Minder.c159d06d.js","js/build/Minder.3ba64342.css","js/build/IFrame.1fc38451.js","js/build/app.6910ca56.js","js/build/app.9b013997.css"]),v={components:{IFrame:r,AceEditor:_,TEditor:f,MDPreview:d,OnlyOffice:u,Drawio:p,Minder:m},data(){return{loadIng:0,isWait:!1,fileDetail:{}}},mounted(){},watch:{$route:{handler(){this.getInfo()},immediate:!0}},computed:{fileId(){const{fileId:e}=this.$route.params;return parseInt(/^\d+$/.test(e)?e:0)},title(){const{name:e}=this.fileDetail;return e||"Loading..."},isType(){const{fileDetail:e}=this;return function(t){return e.file_mode==t}},officeContent(){return{id:this.fileDetail.id||0,type:this.fileDetail.ext,name:this.title}},officeCode(){return"taskFile_"+this.fileDetail.id},previewUrl(){const{name:e,key:t}=this.fileDetail.content;return $A.apiUrl(`../online/preview/${e}?key=${t}`)}},methods:{getInfo(){this.fileId<=0||(setTimeout(e=>{this.loadIng++},600),this.isWait=!0,this.$store.dispatch("call",{url:"project/task/filedetail",data:{file_id:this.fileId}}).then(({data:e})=>{this.fileDetail=e}).catch(({msg:e})=>{$A.modalError({content:e,onOk:()=>{this.$Electron&&window.close()}})}).finally(e=>{this.loadIng--,this.isWait=!1}))},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"project/task/filedetail",data:{file_id:this.fileId,only_update_at:"yes"}}).then(({data:t})=>{e(`${t.id}-${$A.Time(t.update_at)}`)}).catch(()=>{e(0)})})}}},a={};var h=o(v,s,c,!1,D,null,null,null);function D(e){for(let t in a)this[t]=a[t]}var T=function(){return h.exports}();export{T as default}; diff --git a/public/js/build/index.76a95eea.js b/public/js/build/index.197a221d.js similarity index 98% rename from public/js/build/index.76a95eea.js rename to public/js/build/index.197a221d.js index 9e05e21da..a48800e21 100644 --- a/public/js/build/index.76a95eea.js +++ b/public/js/build/index.197a221d.js @@ -1 +1 @@ -import{n as o,m as l,a as c,p as u}from"./app.6c8b31b1.js";var d=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"mobile-nav-box"},[e._t("left",function(){return[t("div",{staticClass:"nav-back",on:{click:e.onBack}},[t("i",{staticClass:"taskfont"},[e._v("\uE676")])])]}),t("div",{staticClass:"nav-title"},[e._v(e._s(e.title))]),e._t("right")],2)},v=[];const m={name:"MobileNavTitle",props:{title:{default:""},beforeBack:{type:Function}},methods:{onBack(){if(typeof this.beforeBack=="function"){const e=this.beforeBack();e&&e.then&&e.then(()=>{this.goBack()});return}this.goBack()}}},i={};var h=o(m,d,v,!1,p,"305e6ddf",null,null);function p(e){for(let s in i)this[s]=i[s]}var _=function(){return h.exports}(),g=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"page-setting"},[t("PageTitle",{attrs:{title:e.titleNameRoute}}),t("div",{staticClass:"setting-head"},[t("div",{staticClass:"setting-titbox"},[t("div",{staticClass:"setting-title"},[t("h1",[e._v(e._s(e.settingTitleName))])])])]),t("div",{staticClass:"setting-box"},[t("div",{staticClass:"setting-menu"},[t("MobileNavTitle",{attrs:{title:e.$L("\u8BBE\u7F6E")}}),t("ul",[e._l(e.menu,function(a,r){return t("li",{key:r,class:e.classNameRoute(a.path,a.divided),on:{click:function(C){return e.toggleRoute(a.path)}}},[e._v(e._s(e.$L(a.name)))])}),e.clientNewVersion?t("li",{staticClass:"flex",class:e.classNameRoute("version",!0),on:{click:function(a){return e.toggleRoute("version")}}},[t("AutoTip",{attrs:{disabled:""}},[e._v(e._s(e.$L("\u7248\u672C"))+": "+e._s(e.version))]),t("Badge",{attrs:{text:e.clientNewVersion}})],1):t("li",{staticClass:"version divided",on:{click:e.onVersion}},[t("AutoTip",[e._v(e._s(e.$L("\u7248\u672C"))+": "+e._s(e.version))])],1)],2)],1),t("transition",{attrs:{name:"mobile-dialog"}},[e.showContent?t("div",{staticClass:"setting-content"},[t("MobileNavTitle",{attrs:{title:e.settingTitleName}}),t("div",{staticClass:"setting-content-title"},[e._v(e._s(e.titleNameRoute))]),t("div",{staticClass:"setting-content-view"},[t("router-view",{staticClass:"setting-router-view"})],1)],1):e._e()])],1)],1)},$=[];const f={components:{MobileNavTitle:_},data(){return{version:window.systemInfo.version}},mounted(){},computed:{...l(["userInfo","userIsAdmin","clientNewVersion"]),routeName(){return this.$route.name},showContent(){return this.$route.path.match(/^\/manage\/setting\/\w+$/)},menu(){const e=[{path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E"},{path:"password",name:"\u5BC6\u7801\u8BBE\u7F6E"},{path:"email",name:"\u4FEE\u6539\u90AE\u7BB1"},{path:"language",name:"\u8BED\u8A00\u8BBE\u7F6E",divided:!0},{path:"theme",name:"\u4E3B\u9898\u8BBE\u7F6E"}];return(this.$Electron||this.$isEEUiApp)&&e.push({path:"keyboard",name:"\u952E\u76D8\u8BBE\u7F6E",desc:" (Beta)"}),$A.isDooServer()&&this.$isEEUiApp&&e.push({path:"privacy",name:"\u9690\u79C1\u653F\u7B56",divided:!0},{path:"delete",name:"\u5220\u9664\u5E10\u53F7"}),this.userIsAdmin&&e.push({path:"system",name:"\u7CFB\u7EDF\u8BBE\u7F6E",divided:!0},{path:"license",name:"License Key"}),e.push({path:"clearCache",name:"\u6E05\u9664\u7F13\u5B58",divided:!0},{path:"logout",name:"\u9000\u51FA\u767B\u5F55"}),e},titleNameRoute(){const{routeName:e,menu:s}=this;let t="";return s.some(a=>{if(e===`manage-setting-${a.path}`)return t=`${this.$L(a.name)}${a.desc||""}`,!0}),t||this.$L("\u8BBE\u7F6E")},settingTitleName(){return this.windowPortrait?this.titleNameRoute:this.$L("\u8BBE\u7F6E")}},watch:{routeName:{handler(e){e==="manage-setting"&&this.windowLandscape&&this.goForward({name:"manage-setting-personal"},!0)},immediate:!0}},methods:{toggleRoute(e){switch(e){case"clearCache":$A.modalConfirm({title:"\u6E05\u9664\u7F13\u5B58",content:"\u4F60\u786E\u5B9A\u8981\u6E05\u9664\u7F13\u5B58\u5417\uFF1F",onOk:()=>{$A.IDBSet("clearCache","handle").then(s=>{$A.reloadUrl()})}});break;case"logout":$A.modalConfirm({title:"\u9000\u51FA\u767B\u5F55",content:"\u4F60\u786E\u5B9A\u8981\u767B\u51FA\u7CFB\u7EDF\u5417\uFF1F",onOk:()=>{this.$store.dispatch("logout",!1)}});break;case"version":c.Store.set("updateNotification",null);break;case"privacy":this.openPrivacy();break;case"index":this.goForward({name:"manage-setting"});break;default:this.goForward({name:"manage-setting-"+e});break}},openPrivacy(){const e=$A.apiUrl("privacy");this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:" ",url:"web.js",params:{url:e,browser:!0,showProgress:!0}}):window.open(e)},classNameRoute(e,s){return{active:this.windowLandscape&&this.routeName===`manage-setting-${e}`,divided:!!s}},onVersion(){u.get($A.apiUrl("system/version")).then(({status:e,data:s})=>{if(e===200){let t=`${this.$L("\u670D\u52A1\u5668")}: ${$A.getDomain($A.apiUrl("../"))}`;t+=`
    ${this.$L("\u670D\u52A1\u5668\u7248\u672C")}: v${s.version}`,t+=`
    ${this.$L("\u5BA2\u6237\u7AEF\u7248\u672C")}: v${this.version}`,$A.modalInfo({language:!1,title:this.$L("\u7248\u672C\u4FE1\u606F"),content:t})}}).catch(e=>{})}}},n={};var w=o(f,g,$,!1,b,null,null,null);function b(e){for(let s in n)this[s]=n[s]}var N=function(){return w.exports}();export{N as default}; +import{n as o,m as l,a as c,p as u}from"./app.6910ca56.js";var d=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"mobile-nav-box"},[e._t("left",function(){return[t("div",{staticClass:"nav-back",on:{click:e.onBack}},[t("i",{staticClass:"taskfont"},[e._v("\uE676")])])]}),t("div",{staticClass:"nav-title"},[e._v(e._s(e.title))]),e._t("right")],2)},v=[];const m={name:"MobileNavTitle",props:{title:{default:""},beforeBack:{type:Function}},methods:{onBack(){if(typeof this.beforeBack=="function"){const e=this.beforeBack();e&&e.then&&e.then(()=>{this.goBack()});return}this.goBack()}}},i={};var h=o(m,d,v,!1,p,"305e6ddf",null,null);function p(e){for(let s in i)this[s]=i[s]}var _=function(){return h.exports}(),g=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"page-setting"},[t("PageTitle",{attrs:{title:e.titleNameRoute}}),t("div",{staticClass:"setting-head"},[t("div",{staticClass:"setting-titbox"},[t("div",{staticClass:"setting-title"},[t("h1",[e._v(e._s(e.settingTitleName))])])])]),t("div",{staticClass:"setting-box"},[t("div",{staticClass:"setting-menu"},[t("MobileNavTitle",{attrs:{title:e.$L("\u8BBE\u7F6E")}}),t("ul",[e._l(e.menu,function(a,r){return t("li",{key:r,class:e.classNameRoute(a.path,a.divided),on:{click:function(C){return e.toggleRoute(a.path)}}},[e._v(e._s(e.$L(a.name)))])}),e.clientNewVersion?t("li",{staticClass:"flex",class:e.classNameRoute("version",!0),on:{click:function(a){return e.toggleRoute("version")}}},[t("AutoTip",{attrs:{disabled:""}},[e._v(e._s(e.$L("\u7248\u672C"))+": "+e._s(e.version))]),t("Badge",{attrs:{text:e.clientNewVersion}})],1):t("li",{staticClass:"version divided",on:{click:e.onVersion}},[t("AutoTip",[e._v(e._s(e.$L("\u7248\u672C"))+": "+e._s(e.version))])],1)],2)],1),t("transition",{attrs:{name:"mobile-dialog"}},[e.showContent?t("div",{staticClass:"setting-content"},[t("MobileNavTitle",{attrs:{title:e.settingTitleName}}),t("div",{staticClass:"setting-content-title"},[e._v(e._s(e.titleNameRoute))]),t("div",{staticClass:"setting-content-view"},[t("router-view",{staticClass:"setting-router-view"})],1)],1):e._e()])],1)],1)},$=[];const f={components:{MobileNavTitle:_},data(){return{version:window.systemInfo.version}},mounted(){},computed:{...l(["userInfo","userIsAdmin","clientNewVersion"]),routeName(){return this.$route.name},showContent(){return this.$route.path.match(/^\/manage\/setting\/\w+$/)},menu(){const e=[{path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E"},{path:"password",name:"\u5BC6\u7801\u8BBE\u7F6E"},{path:"email",name:"\u4FEE\u6539\u90AE\u7BB1"},{path:"language",name:"\u8BED\u8A00\u8BBE\u7F6E",divided:!0},{path:"theme",name:"\u4E3B\u9898\u8BBE\u7F6E"}];return(this.$Electron||this.$isEEUiApp)&&e.push({path:"keyboard",name:"\u952E\u76D8\u8BBE\u7F6E",desc:" (Beta)"}),$A.isDooServer()&&this.$isEEUiApp&&e.push({path:"privacy",name:"\u9690\u79C1\u653F\u7B56",divided:!0},{path:"delete",name:"\u5220\u9664\u5E10\u53F7"}),this.userIsAdmin&&e.push({path:"system",name:"\u7CFB\u7EDF\u8BBE\u7F6E",divided:!0},{path:"license",name:"License Key"}),e.push({path:"clearCache",name:"\u6E05\u9664\u7F13\u5B58",divided:!0},{path:"logout",name:"\u9000\u51FA\u767B\u5F55"}),e},titleNameRoute(){const{routeName:e,menu:s}=this;let t="";return s.some(a=>{if(e===`manage-setting-${a.path}`)return t=`${this.$L(a.name)}${a.desc||""}`,!0}),t||this.$L("\u8BBE\u7F6E")},settingTitleName(){return this.windowPortrait?this.titleNameRoute:this.$L("\u8BBE\u7F6E")}},watch:{routeName:{handler(e){e==="manage-setting"&&this.windowLandscape&&this.goForward({name:"manage-setting-personal"},!0)},immediate:!0}},methods:{toggleRoute(e){switch(e){case"clearCache":$A.modalConfirm({title:"\u6E05\u9664\u7F13\u5B58",content:"\u4F60\u786E\u5B9A\u8981\u6E05\u9664\u7F13\u5B58\u5417\uFF1F",onOk:()=>{$A.IDBSet("clearCache","handle").then(s=>{$A.reloadUrl()})}});break;case"logout":$A.modalConfirm({title:"\u9000\u51FA\u767B\u5F55",content:"\u4F60\u786E\u5B9A\u8981\u767B\u51FA\u7CFB\u7EDF\u5417\uFF1F",onOk:()=>{this.$store.dispatch("logout",!1)}});break;case"version":c.Store.set("updateNotification",null);break;case"privacy":this.openPrivacy();break;case"index":this.goForward({name:"manage-setting"});break;default:this.goForward({name:"manage-setting-"+e});break}},openPrivacy(){const e=$A.apiUrl("privacy");this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:" ",url:"web.js",params:{url:e,browser:!0,showProgress:!0}}):window.open(e)},classNameRoute(e,s){return{active:this.windowLandscape&&this.routeName===`manage-setting-${e}`,divided:!!s}},onVersion(){u.get($A.apiUrl("system/version")).then(({status:e,data:s})=>{if(e===200){let t=`${this.$L("\u670D\u52A1\u5668")}: ${$A.getDomain($A.apiUrl("../"))}`;t+=`
    ${this.$L("\u670D\u52A1\u5668\u7248\u672C")}: v${s.version}`,t+=`
    ${this.$L("\u5BA2\u6237\u7AEF\u7248\u672C")}: v${this.version}`,$A.modalInfo({language:!1,title:this.$L("\u7248\u672C\u4FE1\u606F"),content:t})}}).catch(e=>{})}}},n={};var w=o(f,g,$,!1,b,null,null,null);function b(e){for(let s in n)this[s]=n[s]}var N=function(){return w.exports}();export{N as default}; diff --git a/public/js/build/index.dfa0fc84.js b/public/js/build/index.568a7810.js similarity index 94% rename from public/js/build/index.dfa0fc84.js rename to public/js/build/index.568a7810.js index f595f8fc1..d0f9761ba 100644 --- a/public/js/build/index.dfa0fc84.js +++ b/public/js/build/index.568a7810.js @@ -1 +1 @@ -import{n as r,l as i}from"./app.6c8b31b1.js";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div")},a=[];const h={data(){return{}},computed:{isSoftware(){return this.$Electron||this.$isEEUiApp}},mounted(){/^https*:/i.test(window.location.protocol)&&(this.$router.mode==="hash"?$A.stringLength(window.location.pathname)>2&&(window.location.href=`${window.location.origin}/#${window.location.pathname}${window.location.search}`):this.$router.mode==="history"&&$A.strExists(window.location.href,"/#/")&&(window.location.href=window.location.href.replace("/#/","/")))},activated(){this.start()},methods:{start(){if(this.isSoftware){this.goNext();return}this.$store.dispatch("showSpinner",1e3),this.$store.dispatch("needHome").then(t=>{this.goIndex()}).catch(t=>{this.goNext()}).finally(t=>{this.$store.dispatch("hiddenSpinner")})},goIndex(){i==="zh"||i==="zh-CHT"?window.location.href=$A.apiUrl("../site/zh/index.html"):window.location.href=$A.apiUrl("../site/en/index.html")},goNext(){this.userId>0?this.goForward({name:"manage-dashboard"},!0):this.goForward({name:"login"},!0)}}},o={};var l=r(h,s,a,!1,d,null,null,null);function d(t){for(let e in o)this[e]=o[e]}var w=function(){return l.exports}();export{w as default}; +import{n as r,l as i}from"./app.6910ca56.js";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div")},a=[];const h={data(){return{}},computed:{isSoftware(){return this.$Electron||this.$isEEUiApp}},mounted(){/^https*:/i.test(window.location.protocol)&&(this.$router.mode==="hash"?$A.stringLength(window.location.pathname)>2&&(window.location.href=`${window.location.origin}/#${window.location.pathname}${window.location.search}`):this.$router.mode==="history"&&$A.strExists(window.location.href,"/#/")&&(window.location.href=window.location.href.replace("/#/","/")))},activated(){this.start()},methods:{start(){if(this.isSoftware){this.goNext();return}this.$store.dispatch("showSpinner",1e3),this.$store.dispatch("needHome").then(t=>{this.goIndex()}).catch(t=>{this.goNext()}).finally(t=>{this.$store.dispatch("hiddenSpinner")})},goIndex(){i==="zh"||i==="zh-CHT"?window.location.href=$A.apiUrl("../site/zh/index.html"):window.location.href=$A.apiUrl("../site/en/index.html")},goNext(){this.userId>0?this.goForward({name:"manage-dashboard"},!0):this.goForward({name:"login"},!0)}}},o={};var l=r(h,s,a,!1,d,null,null,null);function d(t){for(let e in o)this[e]=o[e]}var w=function(){return l.exports}();export{w as default}; diff --git a/public/js/build/index.8d4e26d2.js b/public/js/build/index.62cf0925.js similarity index 99% rename from public/js/build/index.8d4e26d2.js rename to public/js/build/index.62cf0925.js index cbd0c0d2d..e4f57e34e 100644 --- a/public/js/build/index.8d4e26d2.js +++ b/public/js/build/index.62cf0925.js @@ -1,4 +1,4 @@ -import{C as br,t as Ls,n as gl}from"./app.6c8b31b1.js";import{I as Ts}from"./ImgUpload.0e64a5a8.js";var Te=navigator.userAgent,ml=navigator.platform,gt=/gecko\/\d/i.test(Te),yl=/MSIE \d/.test(Te),bl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Te),Zr=/Edge\/(\d+)/.exec(Te),re=yl||bl||Zr,ce=re&&(yl?document.documentMode||6:+(Zr||bl)[1]),Le=!Zr&&/WebKit\//.test(Te),Ms=Le&&/Qt\/\d+\.\d+/.test(Te),On=!Zr&&/Chrome\//.test(Te),Xe=/Opera\//.test(Te),wl=/Apple Computer/.test(navigator.vendor),Ds=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Te),As=/PhantomJS/.test(Te),Qr=!Zr&&/AppleWebKit/.test(Te)&&/Mobile\/\w+/.test(Te),In=/Android/.test(Te),zr=Qr||In||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Te),Ye=Qr||/Mac/.test(ml),Fs=/\bCrOS\b/.test(Te),Es=/win/i.test(ml),Nt=Xe&&Te.match(/Version\/(\d*\.\d*)/);Nt&&(Nt=Number(Nt[1]));Nt&&Nt>=15&&(Xe=!1,Le=!0);var Fo=Ye&&(Ms||Xe&&(Nt==null||Nt<12.11)),Ii=gt||re&&ce>=9;function Pr(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Rt=function(e,t){var r=e.className,n=Pr(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function mt(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ie(e,t){return mt(e).appendChild(t)}function G(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}var bt=function(){this.id=null,this.f=null,this.time=0,this.handler=Hn(this.onTimeout,this)};bt.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)};bt.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var hn=[""];function Hi(e){for(;hn.length<=e;)hn.push(ie(hn)+" ");return hn[e]}function ie(e){return e[e.length-1]}function Pn(e,t){for(var r=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Os.test(e))}function bn(e,t){return t?t.source.indexOf("\\w")>-1&&vi(e)?!0:t.test(e):vi(e)}function No(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Is=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function gi(e){return e.charCodeAt(0)>=768&&Is.test(e)}function Cl(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function Hs(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),l.level==1?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var Lr=null;function Br(e,t,r){var n;Lr=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&r=="before"?n=i:Lr=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:Lr=i)}return n!=null?n:Lr}var zs=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,p){this.level=u,this.from=h,this.to=p}return function(u,h){var p=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!n.test(u))return!1;for(var b=u.length,y=[],k=0;k-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function de(e,t){var r=zi(e,t);if(!!r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function hr(e){e.prototype.on=function(t,r){X(this,t,r)},e.prototype.off=function(t,r){Oe(this,t,r)}}function Ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Tl(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function mi(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Rr(e){Ae(e),Tl(e)}function Pi(e){return e.target||e.srcElement}function Ml(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Ye&&e.ctrlKey&&t==1&&(t=3),t}var Ps=function(){if(re&&ce<9)return!1;var e=G("div");return"draggable"in e||"dragDrop"in e}(),ui;function Ws(e){if(ui==null){var t=G("span","\u200B");Ie(e,G("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ui=t.offsetWidth<=1&&t.offsetHeight>2&&!(re&&ce<8))}var r=ui?G("span","\u200B"):G("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var fi;function _s(e){if(fi!=null)return fi;var t=Ie(e,document.createTextNode("A\u062EA")),r=It(t,0,1).getBoundingClientRect(),n=It(t,1,2).getBoundingClientRect();return mt(e),!r||r.left==r.right?!1:fi=n.right-r.right<3}var Wi=` +import{C as br,t as Ls,n as gl}from"./app.6910ca56.js";import{I as Ts}from"./ImgUpload.8863e78d.js";var Te=navigator.userAgent,ml=navigator.platform,gt=/gecko\/\d/i.test(Te),yl=/MSIE \d/.test(Te),bl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Te),Zr=/Edge\/(\d+)/.exec(Te),re=yl||bl||Zr,ce=re&&(yl?document.documentMode||6:+(Zr||bl)[1]),Le=!Zr&&/WebKit\//.test(Te),Ms=Le&&/Qt\/\d+\.\d+/.test(Te),On=!Zr&&/Chrome\//.test(Te),Xe=/Opera\//.test(Te),wl=/Apple Computer/.test(navigator.vendor),Ds=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Te),As=/PhantomJS/.test(Te),Qr=!Zr&&/AppleWebKit/.test(Te)&&/Mobile\/\w+/.test(Te),In=/Android/.test(Te),zr=Qr||In||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Te),Ye=Qr||/Mac/.test(ml),Fs=/\bCrOS\b/.test(Te),Es=/win/i.test(ml),Nt=Xe&&Te.match(/Version\/(\d*\.\d*)/);Nt&&(Nt=Number(Nt[1]));Nt&&Nt>=15&&(Xe=!1,Le=!0);var Fo=Ye&&(Ms||Xe&&(Nt==null||Nt<12.11)),Ii=gt||re&&ce>=9;function Pr(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Rt=function(e,t){var r=e.className,n=Pr(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function mt(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ie(e,t){return mt(e).appendChild(t)}function G(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}var bt=function(){this.id=null,this.f=null,this.time=0,this.handler=Hn(this.onTimeout,this)};bt.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)};bt.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var hn=[""];function Hi(e){for(;hn.length<=e;)hn.push(ie(hn)+" ");return hn[e]}function ie(e){return e[e.length-1]}function Pn(e,t){for(var r=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Os.test(e))}function bn(e,t){return t?t.source.indexOf("\\w")>-1&&vi(e)?!0:t.test(e):vi(e)}function No(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Is=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function gi(e){return e.charCodeAt(0)>=768&&Is.test(e)}function Cl(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function Hs(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),l.level==1?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var Lr=null;function Br(e,t,r){var n;Lr=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&r=="before"?n=i:Lr=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:Lr=i)}return n!=null?n:Lr}var zs=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,p){this.level=u,this.from=h,this.to=p}return function(u,h){var p=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!n.test(u))return!1;for(var b=u.length,y=[],k=0;k-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function de(e,t){var r=zi(e,t);if(!!r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function hr(e){e.prototype.on=function(t,r){X(this,t,r)},e.prototype.off=function(t,r){Oe(this,t,r)}}function Ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Tl(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function mi(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Rr(e){Ae(e),Tl(e)}function Pi(e){return e.target||e.srcElement}function Ml(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Ye&&e.ctrlKey&&t==1&&(t=3),t}var Ps=function(){if(re&&ce<9)return!1;var e=G("div");return"draggable"in e||"dragDrop"in e}(),ui;function Ws(e){if(ui==null){var t=G("span","\u200B");Ie(e,G("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ui=t.offsetWidth<=1&&t.offsetHeight>2&&!(re&&ce<8))}var r=ui?G("span","\u200B"):G("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var fi;function _s(e){if(fi!=null)return fi;var t=Ie(e,document.createTextNode("A\u062EA")),r=It(t,0,1).getBoundingClientRect(),n=It(t,1,2).getBoundingClientRect();return mt(e),!r||r.left==r.right?!1:fi=n.right-r.right<3}var Wi=` b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(` `,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Bs=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Rs=function(){var e=G("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ci=null;function Us(e){if(ci!=null)return ci;var t=Ie(e,G("span","x")),r=t.getBoundingClientRect(),n=It(t,0,1).getBoundingClientRect();return ci=Math.abs(r.left-n.left)>1}var _i={},er={};function Ks(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_i[e]=t}function qs(e,t){er[e]=t}function Sn(e){if(typeof e=="string"&&er.hasOwnProperty(e))e=er[e];else if(e&&typeof e.name=="string"&&er.hasOwnProperty(e.name)){var t=er[e.name];typeof t=="string"&&(t={name:t}),e=xl(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Sn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Sn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Bi(e,t){t=Sn(t);var r=_i[t.name];if(!r)return Bi(e,"text/plain");var n=r(e,t);if(ir.hasOwnProperty(t.name)){var i=ir[t.name];for(var o in i)!i.hasOwnProperty(o)||(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var ir={};function Gs(e,t){var r=ir.hasOwnProperty(e)?ir[e]:ir[e]={};Ht(t,r)}function zt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ri(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Dl(e,t,r){return e.startState?e.startState(t,r):!0}var pe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};pe.prototype.eol=function(){return this.pos>=this.string.length};pe.prototype.sol=function(){return this.pos==this.lineStart};pe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0};pe.prototype.next=function(){if(this.post};pe.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t};pe.prototype.skipToEnd=function(){this.pos=this.string.length};pe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0};pe.prototype.backUp=function(e){this.pos-=e};pe.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}};pe.prototype.current=function(){return this.string.slice(this.start,this.pos)};pe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};pe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)};pe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function q(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?F(r,q(e,r).text.length):Xs(t,q(e,t.line).text.length)}function Xs(e,t){var r=e.ch;return r==null||r>t?F(e.line,t):r<0?F(e.line,0):e}function Oo(e,t){for(var r=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t};Ze.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}};Ze.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--};Ze.fromSaved=function(e,t,r){return t instanceof Bn?new Ze(e,zt(e.mode,t.state),r,t.lookAhead):new Ze(e,zt(e.mode,t),r)};Ze.prototype.save=function(e){var t=e!==!1?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Bn(t,this.maxLookAhead):t};function Fl(e,t,r,n){var i=[e.state.modeGen],o={};Po(e,t.text,e.doc.mode,r,function(u,h){return i.push(u,h)},o,n);for(var l=r.state,a=function(u){r.baseTokens=i;var h=e.state.overlays[u],p=1,b=0;r.state=!0,Po(e,t.text,h.mode,r,function(y,k){for(var S=p;by&&i.splice(p,1,y,i[p+1],D),p+=2,b=Math.min(y,D)}if(!!k)if(h.opaque)i.splice(S,p-S,y,"overlay "+k),p=S+2;else for(;Se.options.maxHighlightLength&&zt(e.doc.mode,n.state),o=Fl(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Jr(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Ze(n,!0,t);var o=Ys(e,t,r),l=o>n.first&&q(n,o-1).stateAfter,a=l?Ze.fromSaved(n,l,o):new Ze(n,Dl(n.mode),o);return n.iter(o,t,function(s){Ki(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var Io=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ho(e,t,r,n){var i=e.doc,o=i.mode,l;t=V(i,t);var a=q(i,t.line),s=Jr(e,t.line,r),u=new pe(a.text,e.options.tabSize,s),h;for(n&&(h=[]);(n||u.pose.options.maxHighlightLength?(a=!1,l&&Ki(e,t,n,h.pos),h.pos=t.length,p=null):p=zo(qi(r,h,n.state,b),o),b){var y=b[0].name;y&&(p="m-"+(p?y+" "+p:y))}if(!a||u!=p){for(;sl;--a){if(a<=o.first)return o.first;var s=q(o,a-1),u=s.stateAfter;if(u&&(!r||a+(u instanceof Bn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Pe(s.text,null,e.options.tabSize);(i==null||n>h)&&(i=a-1,n=h)}return i}function js(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=q(e,n).stateAfter;if(i&&(!(i instanceof Bn)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new Rn(l,o.from,s?null:o.to))}}return n}function eu(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!r||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var E=0;E0)){var h=[s,1],p=Z(u.from,a.from),b=Z(u.to,a.to);(p<0||!l.inclusiveLeft&&!p)&&h.push({from:u.from,to:a.from}),(b>0||!l.inclusiveRight&&!b)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function Il(e){var t=e.markedSpans;if(!!t){for(var r=0;rt)&&(!n||Gi(n,o.marker)<0)&&(n=o.marker)}return n}function _o(e,t,r,n,i){var o=q(e,t),l=it&&o.markedSpans;if(l)for(var a=0;a=0&&p<=0||h<=0&&p>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.to,r)>=0:Z(u.to,r)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.from,n)<=0:Z(u.from,n)<0)))return!0}}}function Je(e){for(var t;t=Pl(e);)e=t.find(-1,!0).line;return e}function nu(e){for(var t;t=Un(e);)e=t.find(1,!0).line;return e}function iu(e){for(var t,r;t=Un(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Xi(e,t){var r=q(e,t),n=Je(r);return r==n?t:le(n)}function Wl(e,t){if(t>e.lastLine())return t;var r=q(e,t),n;if(!Ct(e,r))return t;for(;n=Un(r);)r=n.find(1,!0).line;return le(r)+1}function Ct(e,t){var r=it&&t.markedSpans;if(r){for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var ar=function(e,t,r){this.text=e,Hl(this,t),this.height=r?r(this):1};ar.prototype.lineNo=function(){return le(this)};hr(ar);function ou(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Il(e),Hl(e,r);var i=n?n(e):1;i!=e.height&&Qe(e,i)}function lu(e){e.parent=null,Il(e)}var au={},su={};function Bo(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?su:au;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function _l(e,t){var r=nr("span",null,null,Le?"padding-right: .1px":null),n={pre:nr("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=fu,_s(e.display.measure)&&(l=st(o,e.doc.direction))&&(n.addToken=hu(n.addToken,l)),n.map=[];var a=t!=e.display.externalMeasured&&le(o);du(o,n,El(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=ai(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=ai(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ws(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Le){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return de(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=ai(n.pre.className,n.textClass||"")),n}function uu(e){var t=G("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function fu(e,t,r,n,i,o,l){if(!!t){var a=e.splitSpaces?cu(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),re&&ce<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var p=0;;){s.lastIndex=p;var b=s.exec(t),y=b?b.index-p:t.length-p;if(y){var k=document.createTextNode(a.slice(p,p+y));re&&ce<9?h.appendChild(G("span",[k])):h.appendChild(k),e.map.push(e.pos,e.pos+y,k),e.col+=y,e.pos+=y}if(!b)break;p+=y+1;var S=void 0;if(b[0]==" "){var D=e.cm.options.tabSize,A=D-e.col%D;S=h.appendChild(G("span",Hi(A),"cm-tab")),S.setAttribute("role","presentation"),S.setAttribute("cm-text"," "),e.col+=A}else b[0]=="\r"||b[0]==` diff --git a/public/js/build/index.31386d23.js b/public/js/build/index.8984a77c.js similarity index 98% rename from public/js/build/index.31386d23.js rename to public/js/build/index.8984a77c.js index 255c2bb7e..4f19204c7 100644 --- a/public/js/build/index.31386d23.js +++ b/public/js/build/index.8984a77c.js @@ -1 +1 @@ -import{n}from"./app.6c8b31b1.js";var l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"component-resize-line",class:[e.resizing?"resizing":"",e.placement],on:{mousedown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"left",37,i.key,["Left","ArrowLeft"])||"button"in i&&i.button!==0?null:(i.stopPropagation(),i.preventDefault(),e.resizeDown.apply(null,arguments))}}})},u=[];const m={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},reverse:{type:Boolean,default:!1},beforeResize:Function},data(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown(e){if(!this.beforeResize){this.handleDown(e);return}const t=this.beforeResize();t&&t.then?t.then(s=>{this.handleDown(e)}):this.handleDown(e)},handleDown(e){this.mouseX=e.pageX||e.clientX+document.documentElement.scrollLeft,this.mouseY=e.pageY||e.clientY+document.documentElement.scrollTop,this.offset={left:e.target.offsetLeft,top:e.target.offsetTop},this.resizing=!0,typeof this.value=="number"&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove(e){if(!this.resizing)return;let t=(e.pageX||e.clientX+document.documentElement.scrollLeft)-this.mouseX,s=(e.pageY||e.clientY+document.documentElement.scrollTop)-this.mouseY;if(typeof this.tmpSize=="number"){let i;this.placement=="bottom"?i=this.reverse?this.tmpSize-s:this.tmpSize+s:i=this.reverse?this.tmpSize-t:this.tmpSize+t,this.min>0&&(i=Math.max(this.min,i)),this.max>0&&(i=Math.min(this.max,i)),this.$emit("input",i)}this.$emit("on-change",{event:"move",diff:{x:t,y:s},offset:this.offset})},handleUp(){!this.resizing||(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}},o={};var c=n(m,l,u,!1,d,null,null,null);function d(e){for(let t in o)this[t]=o[t]}var h=function(){return c.exports}(),f=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{ref:"body",staticClass:"overlay-body",style:e.bodyStyle},[s("div",{staticClass:"overlay-close"},[s("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return i.stopPropagation(),e.onClose.apply(null,arguments)}}},[s("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[s("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),e.resize?s("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:e.placement,min:e.minSize,max:0,reverse:!0,beforeResize:e.beforeResize},on:{"on-change":e.onChangeResize},model:{value:e.dynamicSize,callback:function(i){e.dynamicSize=i},expression:"dynamicSize"}}):e._e(),s("div",{staticClass:"overlay-content"},[e._t("default")],2)],1)},p=[];const v={name:"DrawerOverlayView",components:{ResizeLine:h},props:{placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data(){return{dynamicSize:0}},computed:{bodyStyle(){let e=this.dynamicSize;return e=e<=100?`${e}%`:`${e}px`,this.placement=="right"?{width:e,height:"100%"}:{width:"100%",height:e}}},watch:{size:{handler(e){this.dynamicSize=parseInt(e)},immediate:!0}},methods:{onClose(){this.$emit("on-close")},beforeResize(){return new Promise(e=>{this.dynamicSize<=100&&this.updateSize(),e()})},onChangeResize({event:e}){e==="up"&&this.updateSize()},updateSize(){this.placement==="bottom"?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}},r={};var z=n(v,f,p,!1,_,null,null,null);function _(e){for(let t in r)this[t]=r[t]}var y=function(){return z.exports}(),b=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("Modal",{ref:"modal",attrs:{closable:e.escClosable,"mask-closable":e.maskClosable,"footer-hide":!0,"transition-names":[e.$A.isAndroid()?"":`drawer-slide-${e.transitionName}`,""],beforeClose:e.beforeClose,fullscreen:"","class-name":e.modalClass},model:{value:e.show,callback:function(i){e.show=i},expression:"show"}},[e.isFullscreen?e._t("default"):s("DrawerOverlayView",{attrs:{placement:e.transitionName,size:e.size,minSize:e.minSize,resize:e.resize},on:{"on-close":e.onClose}},[e._t("default")],2)],2)},w=[];const g={name:"DrawerOverlay",components:{DrawerOverlayView:y},props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data(){return{show:this.value,isFullscreen:!1}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)},windowWidth(e){this.isFullscreen=e<500&&this.placement!="bottom"}},computed:{transitionName(){return this.isFullscreen?"bottom":this.placement},modalClass(){return this.isFullscreen?"common-drawer-modal":this.className?`common-drawer-overlay ${this.className} ${this.transitionName}`:`common-drawer-overlay ${this.transitionName}`}},mounted(){this.isFullscreen=this.windowWidth<500&&this.placement!="bottom"},methods:{onClose(){this.$refs.modal.close()}}},a={};var S=n(g,b,w,!1,C,null,null,null);function C(e){for(let t in a)this[t]=a[t]}var x=function(){return S.exports}();export{x as D}; +import{n}from"./app.6910ca56.js";var l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"component-resize-line",class:[e.resizing?"resizing":"",e.placement],on:{mousedown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"left",37,i.key,["Left","ArrowLeft"])||"button"in i&&i.button!==0?null:(i.stopPropagation(),i.preventDefault(),e.resizeDown.apply(null,arguments))}}})},u=[];const m={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},reverse:{type:Boolean,default:!1},beforeResize:Function},data(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown(e){if(!this.beforeResize){this.handleDown(e);return}const t=this.beforeResize();t&&t.then?t.then(s=>{this.handleDown(e)}):this.handleDown(e)},handleDown(e){this.mouseX=e.pageX||e.clientX+document.documentElement.scrollLeft,this.mouseY=e.pageY||e.clientY+document.documentElement.scrollTop,this.offset={left:e.target.offsetLeft,top:e.target.offsetTop},this.resizing=!0,typeof this.value=="number"&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove(e){if(!this.resizing)return;let t=(e.pageX||e.clientX+document.documentElement.scrollLeft)-this.mouseX,s=(e.pageY||e.clientY+document.documentElement.scrollTop)-this.mouseY;if(typeof this.tmpSize=="number"){let i;this.placement=="bottom"?i=this.reverse?this.tmpSize-s:this.tmpSize+s:i=this.reverse?this.tmpSize-t:this.tmpSize+t,this.min>0&&(i=Math.max(this.min,i)),this.max>0&&(i=Math.min(this.max,i)),this.$emit("input",i)}this.$emit("on-change",{event:"move",diff:{x:t,y:s},offset:this.offset})},handleUp(){!this.resizing||(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}},o={};var c=n(m,l,u,!1,d,null,null,null);function d(e){for(let t in o)this[t]=o[t]}var h=function(){return c.exports}(),f=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{ref:"body",staticClass:"overlay-body",style:e.bodyStyle},[s("div",{staticClass:"overlay-close"},[s("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return i.stopPropagation(),e.onClose.apply(null,arguments)}}},[s("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[s("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),e.resize?s("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:e.placement,min:e.minSize,max:0,reverse:!0,beforeResize:e.beforeResize},on:{"on-change":e.onChangeResize},model:{value:e.dynamicSize,callback:function(i){e.dynamicSize=i},expression:"dynamicSize"}}):e._e(),s("div",{staticClass:"overlay-content"},[e._t("default")],2)],1)},p=[];const v={name:"DrawerOverlayView",components:{ResizeLine:h},props:{placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data(){return{dynamicSize:0}},computed:{bodyStyle(){let e=this.dynamicSize;return e=e<=100?`${e}%`:`${e}px`,this.placement=="right"?{width:e,height:"100%"}:{width:"100%",height:e}}},watch:{size:{handler(e){this.dynamicSize=parseInt(e)},immediate:!0}},methods:{onClose(){this.$emit("on-close")},beforeResize(){return new Promise(e=>{this.dynamicSize<=100&&this.updateSize(),e()})},onChangeResize({event:e}){e==="up"&&this.updateSize()},updateSize(){this.placement==="bottom"?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}},r={};var z=n(v,f,p,!1,_,null,null,null);function _(e){for(let t in r)this[t]=r[t]}var y=function(){return z.exports}(),b=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("Modal",{ref:"modal",attrs:{closable:e.escClosable,"mask-closable":e.maskClosable,"footer-hide":!0,"transition-names":[e.$A.isAndroid()?"":`drawer-slide-${e.transitionName}`,""],beforeClose:e.beforeClose,fullscreen:"","class-name":e.modalClass},model:{value:e.show,callback:function(i){e.show=i},expression:"show"}},[e.isFullscreen?e._t("default"):s("DrawerOverlayView",{attrs:{placement:e.transitionName,size:e.size,minSize:e.minSize,resize:e.resize},on:{"on-close":e.onClose}},[e._t("default")],2)],2)},w=[];const g={name:"DrawerOverlay",components:{DrawerOverlayView:y},props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data(){return{show:this.value,isFullscreen:!1}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)},windowWidth(e){this.isFullscreen=e<500&&this.placement!="bottom"}},computed:{transitionName(){return this.isFullscreen?"bottom":this.placement},modalClass(){return this.isFullscreen?"common-drawer-modal":this.className?`common-drawer-overlay ${this.className} ${this.transitionName}`:`common-drawer-overlay ${this.transitionName}`}},mounted(){this.isFullscreen=this.windowWidth<500&&this.placement!="bottom"},methods:{onClose(){this.$refs.modal.close()}}},a={};var S=n(g,b,w,!1,C,null,null,null);function C(e){for(let t in a)this[t]=a[t]}var x=function(){return S.exports}();export{x as D}; diff --git a/public/js/build/index.6bba8944.js b/public/js/build/index.e3202dd6.js similarity index 99% rename from public/js/build/index.6bba8944.js rename to public/js/build/index.e3202dd6.js index f407ee9f3..399182010 100644 --- a/public/js/build/index.6bba8944.js +++ b/public/js/build/index.e3202dd6.js @@ -1 +1 @@ -import{n as r,o as h,l as v,m as u}from"./app.6c8b31b1.js";import m from"./details.6749696e.js";import{D as c}from"./index.31386d23.js";import{I as f}from"./ImgUpload.0e64a5a8.js";import{A as _}from"./ApproveExport.37a8254a.js";var g=function(){var t,i,a,e,s=this,o=s.$createElement,n=s._self._c||o;return n("div",{staticClass:"approve-list"},[n("h2",[n("span",{staticClass:"list-name"},[s._v(s._s(s.$L(s.data.proc_def_name)))]),s.data.state==0?n("Tag",{attrs:{color:"cyan"}},[s._v(s._s(s.$L("\u5F85\u5BA1\u6279")))]):s._e(),s.data.state==1?n("Tag",{attrs:{color:"cyan"}},[s._v(s._s(s.$L("\u5BA1\u6279\u4E2D")))]):s._e(),s.data.state==2?n("Tag",{attrs:{color:"green"}},[s._v(s._s(s.$L("\u5DF2\u901A\u8FC7")))]):s._e(),s.data.state==3?n("Tag",{attrs:{color:"red"}},[s._v(s._s(s.$L("\u5DF2\u62D2\u7EDD")))]):s._e(),s.data.state==4?n("Tag",{attrs:{color:"red"}},[s._v(s._s(s.$L("\u5DF2\u64A4\u56DE")))]):s._e()],1),(t=s.data.var)!==null&&t!==void 0&&t.type?n("p",[s._v(s._s(s.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"),n("span",[s._v(s._s(s.$L((i=s.data.var)===null||i===void 0?void 0:i.type)))])]):s._e(),n("p",[s._v(s._s(s.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"),n("span",[s._v(s._s((a=s.data.var)===null||a===void 0?void 0:a.start_time))])]),n("p",[s._v(s._s(s.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"),n("span",[s._v(s._s((e=s.data.var)===null||e===void 0?void 0:e.end_time))])]),n("div",{staticClass:"list-member"},[n("span",[n("Avatar",{attrs:{src:s.data.userimg,size:"20"}}),s._v(" "+s._s(s.data.start_user_name)+" ")],1),n("span",[s._v(" "+s._s(s.$L("\u53D1\u8D77\u65F6\u95F4"))+"\uFF1A"+s._s(s.data.start_time)+" ")])])])},y=[];const L={name:"list",props:{data:{type:Object,default(){return{}}}},data(){return{}}},l={};var w=r(L,g,y,!1,$,null,null,null);function $(t){for(let i in l)this[i]=l[i]}var S=function(){return w.exports}(),T=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"page-approve-setting"},[a("Row",{staticClass:"approve-row",attrs:{gutter:16}},[a("Col",{attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:12},xs:{span:24}}},[a("div",{staticClass:"approve-col-box approve-col-add",on:{click:t.add}},[a("Icon",{attrs:{type:"md-add"}})],1)]),t._l(t.list,function(e,s){return a("Col",{key:s,attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:12},xs:{span:24}}},[a("div",{staticClass:"approve-col-box approve-col-for",on:{click:function(o){return t.edit(e)}}},[a("p",[t._v(t._s(t.$L("\u6D41\u7A0B\u540D\u79F0"))+"\uFF1A"),a("span",{staticClass:"approve-name"},[t._v(t._s(t.$L(e.name)))])]),a("Divider",{staticClass:"divider"}),a("div",{staticClass:"approve-button-box",on:{click:function(o){return o.stopPropagation(),t.edit(e)}}},[a("p",[t._v(t._s(t.$L("\u5DF2\u53D1\u5E03")))]),a("p",{staticClass:"icon-warp",on:{click:function(o){return o.stopPropagation(),t.change(e)}}},[a("Icon",{staticClass:"delcon",attrs:{type:"md-trash",size:"16"}})],1)])],1)])})],2),a("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.approvalSettingShow,callback:function(e){t.approvalSettingShow=e},expression:"approvalSettingShow"}},[a("iframe",{attrs:{src:t.iframeSrc}})])],1)},k=[];const b={name:"ApproveSetting",components:{DrawerOverlay:c},data(){return{value:!1,loadIng:0,approvalSettingShow:!1,iframeSrc:"",name:"",list:[]}},watch:{approvalSettingShow(t){t&&(this.iframeSrc=$A.apiUrl(`../approve/#/?name=${this.name}&token=${h.userToken}&lang=${v}`))}},mounted(){window.addEventListener("message",this.saveSuccess),this.getList()},beforeDestroy(){window.removeEventListener("message",this.saveSuccess)},methods:{getList(){this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:t})=>{this.list=t.rows,t.rows.forEach((i,a)=>{this.list.forEach((e,s)=>{e.name==i.name&&(e.issue=!0,e.id=i.id,e.version=i.version)})})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},saveSuccess(t){typeof t.data=="string"&&JSON.parse(t.data).method=="saveSuccess"&&(this.getList(),this.list.forEach((a,e)=>{a.name==this.name&&(a.issue=!0,this.$set(this.list,e,a))}),this.approvalSettingShow=!1,$A.messageSuccess("\u53D1\u5E03\u6210\u529F"))},add(){$A.modalInput({title:"\u6DFB\u52A0\u6D41\u7A0B",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0",okText:"\u786E\u5B9A",onOk:t=>t?(this.name=t,this.approvalSettingShow=!0,!1):"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0"})},edit(t){this.name=t.name,this.approvalSettingShow=!0},change(t){this.$nextTick(()=>{t.issue=!0,$A.modalConfirm({title:"\u5220\u9664",content:"\u5C06\u4F1A\u6E05\u7A7A\u6D41\u7A0B\u6570\u636E\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D",onOk:()=>{this.del(t)}})})},del(t){if(!t.id)return t.issue=!1,!0;this.$store.dispatch("call",{url:"approve/procdef/del",data:{id:t.id},method:"post"}).then(({data:i})=>{t.issue=!1,this.getList(),$A.messageSuccess("\u6210\u529F")}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng--})}}},d={};var x=r(b,T,k,!1,C,"b8311c12",null,null);function C(t){for(let i in d)this[i]=d[i]}var I=function(){return x.exports}(),D=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"page-approve"},[a("PageTitle",{attrs:{title:t.$L("\u5BA1\u6279\u4E2D\u5FC3")}}),a("div",{ref:"fileWrapper",staticClass:"approve-wrapper"},[a("div",{staticClass:"approve-head"},[a("div",{staticClass:"approve-nav"},[a("div",{staticClass:"common-nav-back",on:{click:function(e){return t.goBack()}}},[a("i",{staticClass:"taskfont"},[t._v("\uE676")])]),a("h1",[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D\u5FC3")))])]),a("Button",{directives:[{name:"show",rawName:"v-show",value:t.showType==1&&t.isShowIcon,expression:"showType == 1 && isShowIcon"}],staticClass:"ivu-btn-icon-only",attrs:{loading:t.addLoadIng,type:"primary",shape:"circle",icon:"md-add"},on:{click:t.addApply}}),t.showType==1&&!t.isShowIcon?a("Button",{attrs:{loading:t.addLoadIng,type:"primary"},on:{click:t.addApply}},[a("span",[t._v(" "+t._s(t.$L("\u6DFB\u52A0\u7533\u8BF7"))+" ")])]):t._e(),a("Button",{directives:[{name:"show",rawName:"v-show",value:t.showType==1&&t.userIsAdmin&&!t.isShowIcon,expression:"showType == 1 && userIsAdmin && !isShowIcon"}],on:{click:function(e){t.exportApproveShow=!0}}},[a("span",[t._v(" "+t._s(t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E"))+" ")])]),t.showType==1&&t.userIsAdmin&&t.isShowIcon?a("Button",{staticClass:"ivu-btn-icon-only",attrs:{shape:"circle"},on:{click:function(e){t.exportApproveShow=!0}}},[a("i",{staticClass:"taskfont"},[t._v("\uE7A8")])]):t._e(),t.userIsAdmin&&!t.isShowIcon?a("Button",{on:{click:function(e){t.showType=t.showType==1?2:1}}},[a("span",[t._v(" "+t._s(t.showType==1?t.$L("\u6D41\u7A0B\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")])]):t._e(),t.userIsAdmin&&t.isShowIcon?a("Button",{staticClass:"ivu-btn-icon-only",attrs:{shape:"circle"},on:{click:function(e){t.showType=t.showType==1?2:1}}},[t.showType==1?a("i",{staticClass:"taskfont"},[t._v("\uE67B")]):t._e(),t.showType==2?a("i",{staticClass:"taskfont"},[t._v("\uE637")]):t._e()]):t._e()],1),a("Tabs",{directives:[{name:"show",rawName:"v-show",value:t.showType==1,expression:"showType==1"}],staticClass:"page-approve-tabs",attrs:{value:t.tabsValue,size:"small"},on:{"on-click":t.tabsClick}},[a("TabPane",{staticStyle:{height:"100%"},attrs:{label:t.$L("\u5F85\u529E")+(t.unreadTotal>0?"("+t.unreadTotal+")":""),name:"unread"}},[a("div",{staticClass:"approve-main-search"},[a("div",[a("Select",{on:{"on-change":function(e){return t.tabsClick(!1,0)}},model:{value:t.approvalType,callback:function(e){t.approvalType=e},expression:"approvalType"}},t._l(t.approvalList,function(e){return a("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])}),1),a("Input",{attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u7528\u6237\u540D")},model:{value:t.approvalName,callback:function(e){t.approvalName=e},expression:"approvalName"}}),a("Button",{directives:[{name:"show",rawName:"v-show",value:!t.isShowIcon,expression:"!isShowIcon"}],attrs:{type:"primary",loading:t.loadIng,icon:"ios-search"},on:{click:function(e){return t.tabsClick(!1,0)}}},[t._v(t._s(t.$L("\u641C\u7D22")))]),a("Button",{directives:[{name:"show",rawName:"v-show",value:t.isShowIcon,expression:"isShowIcon"}],attrs:{type:"primary",loading:t.loadIng,icon:"ios-search"},on:{click:function(e){return t.tabsClick(!1,0)}}})],1)]),t.loadIng&&t.unreadList.length==0?a("div",{staticClass:"approve-load"},[a("Loading")],1):t.unreadList.length==0?a("div",{staticClass:"noData"},[t._v(t._s(t.$L("\u6682\u65E0\u6570\u636E")))]):a("div",{staticClass:"approve-mains"},[a("div",{staticClass:"approve-main-left"},[a("div",{staticClass:"approve-main-list",on:{scroll:t.handleScroll}},[t._l(t.unreadList,function(e,s){return a("div",{on:{click:function(o){return o.stopPropagation(),t.clickList(e,s)}}},[a("list",{class:{"approve-list-active":e._active},attrs:{data:e}})],1)}),t.unreadList.length1?a("FormItem",{attrs:{prop:"department_id",label:t.$L("\u9009\u62E9\u90E8\u95E8")}},[a("Select",{attrs:{placeholder:t.$L("\u8BF7\u9009\u62E9\u90E8\u95E8")},model:{value:t.addData.department_id,callback:function(e){t.$set(t.addData,"department_id",e)},expression:"addData.department_id"}},t._l(t.departmentList,function(e,s){return a("Option",{key:s,attrs:{value:e.id}},[t._v(t._s(e.name))])}),1)],1):t._e(),a("FormItem",{attrs:{prop:"applyType",label:t.$L("\u7533\u8BF7\u7C7B\u578B")}},[a("Select",{attrs:{placeholder:t.$L("\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B")},model:{value:t.addData.applyType,callback:function(e){t.$set(t.addData,"applyType",e)},expression:"addData.applyType"}},t._l(t.procdefList,function(e,s){return a("Option",{key:s,attrs:{value:e.name}},[t._v(t._s(e.name))])}),1)],1),(t.addData.applyType||"").indexOf("\u8BF7\u5047")!==-1?a("FormItem",{attrs:{prop:"type",label:t.$L("\u5047\u671F\u7C7B\u578B")}},[a("Select",{attrs:{placeholder:t.$L("\u8BF7\u9009\u62E9\u5047\u671F\u7C7B\u578B")},model:{value:t.addData.type,callback:function(e){t.$set(t.addData,"type",e)},expression:"addData.type"}},t._l(t.selectTypes,function(e,s){return a("Option",{key:s,attrs:{value:e}},[t._v(t._s(t.$L(e)))])}),1)],1):t._e(),a("FormItem",{attrs:{prop:"startTime",label:t.$L("\u5F00\u59CB\u65F6\u95F4")}},[a("div",{staticStyle:{display:"flex",gap:"3px"}},[a("DatePicker",{staticStyle:{flex:"1","min-width":"122px"},attrs:{type:"date",format:"yyyy-MM-dd",editable:!1,placeholder:t.$L("\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4")},on:{"on-change":function(e){t.addData.startTime=e}},model:{value:t.addData.startTime,callback:function(e){t.$set(t.addData,"startTime",e)},expression:"addData.startTime"}}),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.startTimeHour,callback:function(e){t.$set(t.addData,"startTimeHour",e)},expression:"addData.startTimeHour"}},t._l(24,function(e,s){return a("Option",{key:s,attrs:{value:e-1<10?"0"+(e-1):e-1}},[t._v(t._s(e-1<10?"0":"")+t._s(e-1))])}),1),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.startTimeMinute,callback:function(e){t.$set(t.addData,"startTimeMinute",e)},expression:"addData.startTimeMinute"}},[a("Option",{attrs:{value:"00"}},[t._v("00")]),a("Option",{attrs:{value:"30"}},[t._v("30")])],1)],1)]),a("FormItem",{attrs:{prop:"endTime",label:t.$L("\u7ED3\u675F\u65F6\u95F4")}},[a("div",{staticStyle:{display:"flex",gap:"3px"}},[a("DatePicker",{staticStyle:{flex:"1","min-width":"122px"},attrs:{type:"date",format:"yyyy-MM-dd",editable:!1,placeholder:t.$L("\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4")},on:{"on-change":function(e){t.addData.endTime=e}},model:{value:t.addData.endTime,callback:function(e){t.$set(t.addData,"endTime",e)},expression:"addData.endTime"}}),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.endTimeHour,callback:function(e){t.$set(t.addData,"endTimeHour",e)},expression:"addData.endTimeHour"}},t._l(24,function(e,s){return a("Option",{key:s,attrs:{value:e-1<10?"0"+(e-1):e-1+""}},[t._v(t._s(e-1<10?"0":"")+t._s(e-1))])}),1),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.endTimeMinute,callback:function(e){t.$set(t.addData,"endTimeMinute",e)},expression:"addData.endTimeMinute"}},[a("Option",{attrs:{value:"00"}},[t._v("00")]),a("Option",{attrs:{value:"30"}},[t._v("30")])],1)],1)]),a("FormItem",{attrs:{prop:"description",label:t.$L("\u4E8B\u7531")}},[a("Input",{attrs:{type:"textarea"},model:{value:t.addData.description,callback:function(e){t.$set(t.addData,"description",e)},expression:"addData.description"}})],1),a("FormItem",{attrs:{prop:"other",label:t.$L("\u56FE\u7247")}},[a("ImgUpload",{attrs:{num:3,width:2e3,height:2e3,whcut:0},model:{value:t.addData.other,callback:function(e){t.$set(t.addData,"other",e)},expression:"addData.other"}})],1)],1),a("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),a("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onInitiate}},[t._v(t._s(t.$L("\u786E\u8BA4")))])],1)],1),a("ApproveExport",{model:{value:t.exportApproveShow,callback:function(e){t.exportApproveShow=e},expression:"exportApproveShow"}})],1)},P=[];const A={components:{list:S,listDetails:m,DrawerOverlay:c,ImgUpload:f,ApproveSetting:I,ApproveExport:_},name:"approve",data(){return{showType:1,exportApproveShow:!1,isShowIcon:!1,modalTransferIndex:window.modalTransferIndex,minDate:new Date(2020,0,1),maxDate:new Date(2025,10,1),currentDate:new Date(2021,0,17),procdefList:[],page:1,pageSize:10,total:0,noText:"",loadIng:!1,addLoadIng:!1,tabsValue:"",approvalType:"all",approvalName:"",approvalList:[{value:"all",label:this.$L("\u5168\u90E8\u5BA1\u6279")}],searchState:"all",searchStateList:[{value:"all",label:this.$L("\u5168\u90E8\u72B6\u6001")},{value:1,label:this.$L("\u5BA1\u6279\u4E2D")},{value:2,label:this.$L("\u5DF2\u901A\u8FC7")},{value:3,label:this.$L("\u5DF2\u62D2\u7EDD")},{value:4,label:this.$L("\u5DF2\u64A4\u56DE")}],unreadList:[],unreadPage:1,unreadTotal:0,unreadLoad:!1,doneList:[],donePage:1,doneLoad:!1,doneTotal:0,notifyList:[],notifyPage:1,notifyLoad:!1,notifyTotal:0,initiatedList:[],initiatedPage:1,initiatedLoad:!1,initiatedTotal:0,details:{},detailsShow:!1,addTitle:"",addShow:!1,startTimeOpen:!1,endTimeOpen:!1,addData:{department_id:0,applyType:"",type:"",startTime:"2023-04-20",startTimeHour:"09",startTimeMinute:"00",endTime:"2023-04-20",endTimeHour:"18",endTimeMinute:"00",other:""},addRule:{department_id:{type:"number",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u90E8\u95E8\uFF01"),trigger:"change"},applyType:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B\uFF01"),trigger:"change"},type:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u5047\u671F\u7C7B\u578B\uFF01"),trigger:"change"},startTime:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4\uFF01"),trigger:"change"},endTime:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4\uFF01"),trigger:"change"},description:{type:"string",required:!0,message:this.$L("\u8BF7\u8F93\u5165\u4E8B\u7531\uFF01"),trigger:"change"}},selectTypes:["\u5E74\u5047","\u4E8B\u5047","\u75C5\u5047","\u8C03\u4F11","\u4EA7\u5047","\u966A\u4EA7\u5047","\u5A5A\u5047","\u4E27\u5047","\u54FA\u4E73\u5047"],showDateTime:!1}},computed:{...u(["wsMsg","userInfo","userIsAdmin","windowWidth"]),departmentList(){let t=(this.userInfo.department_name||"").split(",");return(this.userInfo.department||[]).map((i,a)=>({id:i,name:t[a]}))}},watch:{$route(t){t.name=="manage-approve"&&this.init()},wsMsg:{handler(t){var o,n;const{type:i,action:a,mode:e,data:s}=t;switch(i){case"approve":a=="unread"&&this.tabsClick();break;case"dialog":e=="add"&&((n=(o=s==null?void 0:s.msg)==null?void 0:o.text)==null?void 0:n.indexOf("open-approve-details"))!=-1&&this.tabsClick();break}},deep:!0},addShow(t){t||(this.addData.other="")},showType(t){t==1&&this.init()},windowWidth(t){this.isShowIcon=t<515}},activated(){this.showType=1},mounted(){this.tabsValue="unread",this.init()},methods:{init(){this.tabsClick(),this.getProcdefList(),this.tabsValue!="unread"&&this.getUnreadList(),this.addData.department_id=this.userInfo.department[0]||0,this.addData.startTime=this.addData.endTime=this.getCurrentDate(),this.isShowIcon=this.windowWidth<515},getProcdefList(){return new Promise((t,i)=>{this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:a})=>{this.procdefList=a.rows||[],this.approvalList=this.procdefList.map(e=>({value:e.name,label:e.name})),this.approvalList.unshift({value:"all",label:this.$L("\u5168\u90E8\u5BA1\u6279")}),t()}).catch(({msg:a})=>{$A.modalError(a),i()})})},getCurrentDate(){const t=new Date,i=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${i}-${a}-${e}`},tabsClick(t,i=1e3){!t&&this.__tabsClick&&i>0||(this.__tabsClick=setTimeout(()=>{this.__tabsClick=null},i),i==0&&(this.loadIng=!0),this.tabsValue=t||this.tabsValue,t&&(this.approvalType=this.searchState="all",this.approvalName=""),this.detailsShow=!1,this.tabsValue=="unread"&&(t===!1&&(this.unreadPage=1,this.unreadList=[]),this.getUnreadList()),this.tabsValue=="done"&&(t===!1&&(this.donePage=1,this.doneList=[]),this.getDoneList()),this.tabsValue=="notify"&&(t===!1&&(this.notifyPage=1,this.notifyList=[]),this.getNotifyList()),this.tabsValue=="initiated"&&(t===!1&&(this.initiatedPage=1,this.initiatedList=[]),this.getInitiatedList()))},clickList(t){if(this.unreadList.map(i=>{i._active=!1}),this.doneList.map(i=>{i._active=!1}),this.notifyList.map(i=>{i._active=!1}),this.initiatedList.map(i=>{i._active=!1}),t._active=!0,window.innerWidth<426){this.goForward({name:"manage-approve-details",query:{id:t.id}});return}window.innerWidth<1010&&(this.detailsShow=!0),this.details={},this.$nextTick(()=>{this.details=t})},handleScroll(t){t.target.scrollTop+t.target.clientHeight>=t.target.scrollHeight&&(this.tabsValue=="unread"&&!this.unreadLoad&&this.unreadList.length{this.updateData("unread",i,t)}).catch(i=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.unreadLoad=!1})},getDoneList(t="init"){this.$store.dispatch("call",{method:"get",url:"approve/procHistory/findTask",data:{page:t=="scroll"?this.donePage:1,page_size:t=="scroll"?this.pageSize:this.donePage*this.pageSize,proc_def_name:this.approvalType=="all"?"":this.approvalType,username:this.approvalName}}).then(({data:i})=>{this.updateData("done",i,t)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.doneLoad=!1})},getNotifyList(t){this.$store.dispatch("call",{method:"get",url:"approve/procHistory/findProcNotify",data:{page:t=="scroll"?this.notifyPage:1,page_size:t=="scroll"?this.pageSize:this.notifyPage*this.pageSize,proc_def_name:this.approvalType=="all"?"":this.approvalType,username:this.approvalName}}).then(({data:i})=>{this.updateData("notify",i,t)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.notifyLoad=!1})},getInitiatedList(t){this.$store.dispatch("call",{method:"post",url:"approve/process/startByMyselfAll",data:{page:t=="scroll"?this.initiatedPage:1,page_size:t=="scroll"?this.pageSize:this.initiatedPage*this.pageSize,proc_def_name:this.approvalType=="all"?"":this.approvalType,state:this.searchState=="all"?"":this.searchState,username:this.approvalName}}).then(({data:i})=>{this.updateData("initiated",i,t)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.initiatedLoad=!1})},addApply(){this.addLoadIng=!0,this.$store.dispatch("call",{url:"users/basic",data:{userid:[this.userInfo.userid]},skipAuthError:!0}).then(({data:t})=>{var i;this.addData.department_id=((i=t[0])==null?void 0:i.department[0])||0,this.getProcdefList().then(a=>{this.addTitle=this.$L("\u6DFB\u52A0\u7533\u8BF7"),this.addShow=!0,this.addLoadIng=!1}).catch(a=>{this.addLoadIng=!1})}).catch(({msg:t})=>{this.addLoadIng=!1,$A.modalError(t)})},updateData(t,i,a){let e=t+"List",s=this[e].map((o,n)=>o._active?n:-1).filter(o=>o>-1)[0]||0;this[t+"Total"]=i.total,a!="scroll"?this[e]=i.rows:i.rows.map(o=>{this[e].map(n=>n.id).indexOf(o.id)==-1&&this[e].push(o)}),this[e].length>0&&(this[e][s]._active=!0,this.tabsValue==t&&this.$nextTick(()=>{this.details=this[e][s]||{}}))},onInitiate(){this.$refs.initiateRef.validate(t=>{if(t){this.loadIng=!0;var i=JSON.parse(JSON.stringify(this.addData));i.startTime=i.startTime+" "+i.startTimeHour+":"+i.startTimeMinute,i.endTime=i.endTime+" "+i.endTimeHour+":"+i.endTimeMinute,this.addData.other&&(i.other=this.addData.other.map(a=>a.path).join(",")),this.$store.dispatch("call",{url:"approve/process/start",data:{proc_name:i.applyType,department_id:i.department_id,var:JSON.stringify(i)},method:"post"}).then(({data:a,msg:e})=>{$A.messageSuccess(e),this.addShow=!1,this.$refs.initiateRef.resetFields(),this.tabsValue="initiated",this.initiatedList.map(s=>{s._active=!1}),this.$nextTick(()=>{this.tabsClick(!1,0)})}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng=!1})}})}}},p={};var N=r(A,D,P,!1,O,null,null,null);function O(t){for(let i in p)this[i]=p[i]}var F=function(){return N.exports}();export{F as default}; +import{n as r,o as h,l as v,m as u}from"./app.6910ca56.js";import m from"./details.97854344.js";import{D as c}from"./index.8984a77c.js";import{I as f}from"./ImgUpload.8863e78d.js";import{A as _}from"./ApproveExport.7b859f1c.js";var g=function(){var t,i,a,e,s=this,o=s.$createElement,n=s._self._c||o;return n("div",{staticClass:"approve-list"},[n("h2",[n("span",{staticClass:"list-name"},[s._v(s._s(s.$L(s.data.proc_def_name)))]),s.data.state==0?n("Tag",{attrs:{color:"cyan"}},[s._v(s._s(s.$L("\u5F85\u5BA1\u6279")))]):s._e(),s.data.state==1?n("Tag",{attrs:{color:"cyan"}},[s._v(s._s(s.$L("\u5BA1\u6279\u4E2D")))]):s._e(),s.data.state==2?n("Tag",{attrs:{color:"green"}},[s._v(s._s(s.$L("\u5DF2\u901A\u8FC7")))]):s._e(),s.data.state==3?n("Tag",{attrs:{color:"red"}},[s._v(s._s(s.$L("\u5DF2\u62D2\u7EDD")))]):s._e(),s.data.state==4?n("Tag",{attrs:{color:"red"}},[s._v(s._s(s.$L("\u5DF2\u64A4\u56DE")))]):s._e()],1),(t=s.data.var)!==null&&t!==void 0&&t.type?n("p",[s._v(s._s(s.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"),n("span",[s._v(s._s(s.$L((i=s.data.var)===null||i===void 0?void 0:i.type)))])]):s._e(),n("p",[s._v(s._s(s.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"),n("span",[s._v(s._s((a=s.data.var)===null||a===void 0?void 0:a.start_time))])]),n("p",[s._v(s._s(s.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"),n("span",[s._v(s._s((e=s.data.var)===null||e===void 0?void 0:e.end_time))])]),n("div",{staticClass:"list-member"},[n("span",[n("Avatar",{attrs:{src:s.data.userimg,size:"20"}}),s._v(" "+s._s(s.data.start_user_name)+" ")],1),n("span",[s._v(" "+s._s(s.$L("\u53D1\u8D77\u65F6\u95F4"))+"\uFF1A"+s._s(s.data.start_time)+" ")])])])},y=[];const L={name:"list",props:{data:{type:Object,default(){return{}}}},data(){return{}}},l={};var w=r(L,g,y,!1,$,null,null,null);function $(t){for(let i in l)this[i]=l[i]}var S=function(){return w.exports}(),T=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"page-approve-setting"},[a("Row",{staticClass:"approve-row",attrs:{gutter:16}},[a("Col",{attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:12},xs:{span:24}}},[a("div",{staticClass:"approve-col-box approve-col-add",on:{click:t.add}},[a("Icon",{attrs:{type:"md-add"}})],1)]),t._l(t.list,function(e,s){return a("Col",{key:s,attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:12},xs:{span:24}}},[a("div",{staticClass:"approve-col-box approve-col-for",on:{click:function(o){return t.edit(e)}}},[a("p",[t._v(t._s(t.$L("\u6D41\u7A0B\u540D\u79F0"))+"\uFF1A"),a("span",{staticClass:"approve-name"},[t._v(t._s(t.$L(e.name)))])]),a("Divider",{staticClass:"divider"}),a("div",{staticClass:"approve-button-box",on:{click:function(o){return o.stopPropagation(),t.edit(e)}}},[a("p",[t._v(t._s(t.$L("\u5DF2\u53D1\u5E03")))]),a("p",{staticClass:"icon-warp",on:{click:function(o){return o.stopPropagation(),t.change(e)}}},[a("Icon",{staticClass:"delcon",attrs:{type:"md-trash",size:"16"}})],1)])],1)])})],2),a("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.approvalSettingShow,callback:function(e){t.approvalSettingShow=e},expression:"approvalSettingShow"}},[a("iframe",{attrs:{src:t.iframeSrc}})])],1)},k=[];const b={name:"ApproveSetting",components:{DrawerOverlay:c},data(){return{value:!1,loadIng:0,approvalSettingShow:!1,iframeSrc:"",name:"",list:[]}},watch:{approvalSettingShow(t){t&&(this.iframeSrc=$A.apiUrl(`../approve/#/?name=${this.name}&token=${h.userToken}&lang=${v}`))}},mounted(){window.addEventListener("message",this.saveSuccess),this.getList()},beforeDestroy(){window.removeEventListener("message",this.saveSuccess)},methods:{getList(){this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:t})=>{this.list=t.rows,t.rows.forEach((i,a)=>{this.list.forEach((e,s)=>{e.name==i.name&&(e.issue=!0,e.id=i.id,e.version=i.version)})})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},saveSuccess(t){typeof t.data=="string"&&JSON.parse(t.data).method=="saveSuccess"&&(this.getList(),this.list.forEach((a,e)=>{a.name==this.name&&(a.issue=!0,this.$set(this.list,e,a))}),this.approvalSettingShow=!1,$A.messageSuccess("\u53D1\u5E03\u6210\u529F"))},add(){$A.modalInput({title:"\u6DFB\u52A0\u6D41\u7A0B",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0",okText:"\u786E\u5B9A",onOk:t=>t?(this.name=t,this.approvalSettingShow=!0,!1):"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0"})},edit(t){this.name=t.name,this.approvalSettingShow=!0},change(t){this.$nextTick(()=>{t.issue=!0,$A.modalConfirm({title:"\u5220\u9664",content:"\u5C06\u4F1A\u6E05\u7A7A\u6D41\u7A0B\u6570\u636E\uFF0C\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D",onOk:()=>{this.del(t)}})})},del(t){if(!t.id)return t.issue=!1,!0;this.$store.dispatch("call",{url:"approve/procdef/del",data:{id:t.id},method:"post"}).then(({data:i})=>{t.issue=!1,this.getList(),$A.messageSuccess("\u6210\u529F")}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng--})}}},d={};var x=r(b,T,k,!1,C,"b8311c12",null,null);function C(t){for(let i in d)this[i]=d[i]}var I=function(){return x.exports}(),D=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"page-approve"},[a("PageTitle",{attrs:{title:t.$L("\u5BA1\u6279\u4E2D\u5FC3")}}),a("div",{ref:"fileWrapper",staticClass:"approve-wrapper"},[a("div",{staticClass:"approve-head"},[a("div",{staticClass:"approve-nav"},[a("div",{staticClass:"common-nav-back",on:{click:function(e){return t.goBack()}}},[a("i",{staticClass:"taskfont"},[t._v("\uE676")])]),a("h1",[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D\u5FC3")))])]),a("Button",{directives:[{name:"show",rawName:"v-show",value:t.showType==1&&t.isShowIcon,expression:"showType == 1 && isShowIcon"}],staticClass:"ivu-btn-icon-only",attrs:{loading:t.addLoadIng,type:"primary",shape:"circle",icon:"md-add"},on:{click:t.addApply}}),t.showType==1&&!t.isShowIcon?a("Button",{attrs:{loading:t.addLoadIng,type:"primary"},on:{click:t.addApply}},[a("span",[t._v(" "+t._s(t.$L("\u6DFB\u52A0\u7533\u8BF7"))+" ")])]):t._e(),a("Button",{directives:[{name:"show",rawName:"v-show",value:t.showType==1&&t.userIsAdmin&&!t.isShowIcon,expression:"showType == 1 && userIsAdmin && !isShowIcon"}],on:{click:function(e){t.exportApproveShow=!0}}},[a("span",[t._v(" "+t._s(t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E"))+" ")])]),t.showType==1&&t.userIsAdmin&&t.isShowIcon?a("Button",{staticClass:"ivu-btn-icon-only",attrs:{shape:"circle"},on:{click:function(e){t.exportApproveShow=!0}}},[a("i",{staticClass:"taskfont"},[t._v("\uE7A8")])]):t._e(),t.userIsAdmin&&!t.isShowIcon?a("Button",{on:{click:function(e){t.showType=t.showType==1?2:1}}},[a("span",[t._v(" "+t._s(t.showType==1?t.$L("\u6D41\u7A0B\u8BBE\u7F6E"):t.$L("\u8FD4\u56DE"))+" ")])]):t._e(),t.userIsAdmin&&t.isShowIcon?a("Button",{staticClass:"ivu-btn-icon-only",attrs:{shape:"circle"},on:{click:function(e){t.showType=t.showType==1?2:1}}},[t.showType==1?a("i",{staticClass:"taskfont"},[t._v("\uE67B")]):t._e(),t.showType==2?a("i",{staticClass:"taskfont"},[t._v("\uE637")]):t._e()]):t._e()],1),a("Tabs",{directives:[{name:"show",rawName:"v-show",value:t.showType==1,expression:"showType==1"}],staticClass:"page-approve-tabs",attrs:{value:t.tabsValue,size:"small"},on:{"on-click":t.tabsClick}},[a("TabPane",{staticStyle:{height:"100%"},attrs:{label:t.$L("\u5F85\u529E")+(t.unreadTotal>0?"("+t.unreadTotal+")":""),name:"unread"}},[a("div",{staticClass:"approve-main-search"},[a("div",[a("Select",{on:{"on-change":function(e){return t.tabsClick(!1,0)}},model:{value:t.approvalType,callback:function(e){t.approvalType=e},expression:"approvalType"}},t._l(t.approvalList,function(e){return a("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])}),1),a("Input",{attrs:{placeholder:t.$L("\u8BF7\u8F93\u5165\u7528\u6237\u540D")},model:{value:t.approvalName,callback:function(e){t.approvalName=e},expression:"approvalName"}}),a("Button",{directives:[{name:"show",rawName:"v-show",value:!t.isShowIcon,expression:"!isShowIcon"}],attrs:{type:"primary",loading:t.loadIng,icon:"ios-search"},on:{click:function(e){return t.tabsClick(!1,0)}}},[t._v(t._s(t.$L("\u641C\u7D22")))]),a("Button",{directives:[{name:"show",rawName:"v-show",value:t.isShowIcon,expression:"isShowIcon"}],attrs:{type:"primary",loading:t.loadIng,icon:"ios-search"},on:{click:function(e){return t.tabsClick(!1,0)}}})],1)]),t.loadIng&&t.unreadList.length==0?a("div",{staticClass:"approve-load"},[a("Loading")],1):t.unreadList.length==0?a("div",{staticClass:"noData"},[t._v(t._s(t.$L("\u6682\u65E0\u6570\u636E")))]):a("div",{staticClass:"approve-mains"},[a("div",{staticClass:"approve-main-left"},[a("div",{staticClass:"approve-main-list",on:{scroll:t.handleScroll}},[t._l(t.unreadList,function(e,s){return a("div",{on:{click:function(o){return o.stopPropagation(),t.clickList(e,s)}}},[a("list",{class:{"approve-list-active":e._active},attrs:{data:e}})],1)}),t.unreadList.length1?a("FormItem",{attrs:{prop:"department_id",label:t.$L("\u9009\u62E9\u90E8\u95E8")}},[a("Select",{attrs:{placeholder:t.$L("\u8BF7\u9009\u62E9\u90E8\u95E8")},model:{value:t.addData.department_id,callback:function(e){t.$set(t.addData,"department_id",e)},expression:"addData.department_id"}},t._l(t.departmentList,function(e,s){return a("Option",{key:s,attrs:{value:e.id}},[t._v(t._s(e.name))])}),1)],1):t._e(),a("FormItem",{attrs:{prop:"applyType",label:t.$L("\u7533\u8BF7\u7C7B\u578B")}},[a("Select",{attrs:{placeholder:t.$L("\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B")},model:{value:t.addData.applyType,callback:function(e){t.$set(t.addData,"applyType",e)},expression:"addData.applyType"}},t._l(t.procdefList,function(e,s){return a("Option",{key:s,attrs:{value:e.name}},[t._v(t._s(e.name))])}),1)],1),(t.addData.applyType||"").indexOf("\u8BF7\u5047")!==-1?a("FormItem",{attrs:{prop:"type",label:t.$L("\u5047\u671F\u7C7B\u578B")}},[a("Select",{attrs:{placeholder:t.$L("\u8BF7\u9009\u62E9\u5047\u671F\u7C7B\u578B")},model:{value:t.addData.type,callback:function(e){t.$set(t.addData,"type",e)},expression:"addData.type"}},t._l(t.selectTypes,function(e,s){return a("Option",{key:s,attrs:{value:e}},[t._v(t._s(t.$L(e)))])}),1)],1):t._e(),a("FormItem",{attrs:{prop:"startTime",label:t.$L("\u5F00\u59CB\u65F6\u95F4")}},[a("div",{staticStyle:{display:"flex",gap:"3px"}},[a("DatePicker",{staticStyle:{flex:"1","min-width":"122px"},attrs:{type:"date",format:"yyyy-MM-dd",editable:!1,placeholder:t.$L("\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4")},on:{"on-change":function(e){t.addData.startTime=e}},model:{value:t.addData.startTime,callback:function(e){t.$set(t.addData,"startTime",e)},expression:"addData.startTime"}}),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.startTimeHour,callback:function(e){t.$set(t.addData,"startTimeHour",e)},expression:"addData.startTimeHour"}},t._l(24,function(e,s){return a("Option",{key:s,attrs:{value:e-1<10?"0"+(e-1):e-1}},[t._v(t._s(e-1<10?"0":"")+t._s(e-1))])}),1),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.startTimeMinute,callback:function(e){t.$set(t.addData,"startTimeMinute",e)},expression:"addData.startTimeMinute"}},[a("Option",{attrs:{value:"00"}},[t._v("00")]),a("Option",{attrs:{value:"30"}},[t._v("30")])],1)],1)]),a("FormItem",{attrs:{prop:"endTime",label:t.$L("\u7ED3\u675F\u65F6\u95F4")}},[a("div",{staticStyle:{display:"flex",gap:"3px"}},[a("DatePicker",{staticStyle:{flex:"1","min-width":"122px"},attrs:{type:"date",format:"yyyy-MM-dd",editable:!1,placeholder:t.$L("\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4")},on:{"on-change":function(e){t.addData.endTime=e}},model:{value:t.addData.endTime,callback:function(e){t.$set(t.addData,"endTime",e)},expression:"addData.endTime"}}),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.endTimeHour,callback:function(e){t.$set(t.addData,"endTimeHour",e)},expression:"addData.endTimeHour"}},t._l(24,function(e,s){return a("Option",{key:s,attrs:{value:e-1<10?"0"+(e-1):e-1+""}},[t._v(t._s(e-1<10?"0":"")+t._s(e-1))])}),1),a("Select",{staticStyle:{"max-width":"100px"},model:{value:t.addData.endTimeMinute,callback:function(e){t.$set(t.addData,"endTimeMinute",e)},expression:"addData.endTimeMinute"}},[a("Option",{attrs:{value:"00"}},[t._v("00")]),a("Option",{attrs:{value:"30"}},[t._v("30")])],1)],1)]),a("FormItem",{attrs:{prop:"description",label:t.$L("\u4E8B\u7531")}},[a("Input",{attrs:{type:"textarea"},model:{value:t.addData.description,callback:function(e){t.$set(t.addData,"description",e)},expression:"addData.description"}})],1),a("FormItem",{attrs:{prop:"other",label:t.$L("\u56FE\u7247")}},[a("ImgUpload",{attrs:{num:3,width:2e3,height:2e3,whcut:0},model:{value:t.addData.other,callback:function(e){t.$set(t.addData,"other",e)},expression:"addData.other"}})],1)],1),a("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),a("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onInitiate}},[t._v(t._s(t.$L("\u786E\u8BA4")))])],1)],1),a("ApproveExport",{model:{value:t.exportApproveShow,callback:function(e){t.exportApproveShow=e},expression:"exportApproveShow"}})],1)},P=[];const A={components:{list:S,listDetails:m,DrawerOverlay:c,ImgUpload:f,ApproveSetting:I,ApproveExport:_},name:"approve",data(){return{showType:1,exportApproveShow:!1,isShowIcon:!1,modalTransferIndex:window.modalTransferIndex,minDate:new Date(2020,0,1),maxDate:new Date(2025,10,1),currentDate:new Date(2021,0,17),procdefList:[],page:1,pageSize:10,total:0,noText:"",loadIng:!1,addLoadIng:!1,tabsValue:"",approvalType:"all",approvalName:"",approvalList:[{value:"all",label:this.$L("\u5168\u90E8\u5BA1\u6279")}],searchState:"all",searchStateList:[{value:"all",label:this.$L("\u5168\u90E8\u72B6\u6001")},{value:1,label:this.$L("\u5BA1\u6279\u4E2D")},{value:2,label:this.$L("\u5DF2\u901A\u8FC7")},{value:3,label:this.$L("\u5DF2\u62D2\u7EDD")},{value:4,label:this.$L("\u5DF2\u64A4\u56DE")}],unreadList:[],unreadPage:1,unreadTotal:0,unreadLoad:!1,doneList:[],donePage:1,doneLoad:!1,doneTotal:0,notifyList:[],notifyPage:1,notifyLoad:!1,notifyTotal:0,initiatedList:[],initiatedPage:1,initiatedLoad:!1,initiatedTotal:0,details:{},detailsShow:!1,addTitle:"",addShow:!1,startTimeOpen:!1,endTimeOpen:!1,addData:{department_id:0,applyType:"",type:"",startTime:"2023-04-20",startTimeHour:"09",startTimeMinute:"00",endTime:"2023-04-20",endTimeHour:"18",endTimeMinute:"00",other:""},addRule:{department_id:{type:"number",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u90E8\u95E8\uFF01"),trigger:"change"},applyType:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B\uFF01"),trigger:"change"},type:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u5047\u671F\u7C7B\u578B\uFF01"),trigger:"change"},startTime:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4\uFF01"),trigger:"change"},endTime:{type:"string",required:!0,message:this.$L("\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4\uFF01"),trigger:"change"},description:{type:"string",required:!0,message:this.$L("\u8BF7\u8F93\u5165\u4E8B\u7531\uFF01"),trigger:"change"}},selectTypes:["\u5E74\u5047","\u4E8B\u5047","\u75C5\u5047","\u8C03\u4F11","\u4EA7\u5047","\u966A\u4EA7\u5047","\u5A5A\u5047","\u4E27\u5047","\u54FA\u4E73\u5047"],showDateTime:!1}},computed:{...u(["wsMsg","userInfo","userIsAdmin","windowWidth"]),departmentList(){let t=(this.userInfo.department_name||"").split(",");return(this.userInfo.department||[]).map((i,a)=>({id:i,name:t[a]}))}},watch:{$route(t){t.name=="manage-approve"&&this.init()},wsMsg:{handler(t){var o,n;const{type:i,action:a,mode:e,data:s}=t;switch(i){case"approve":a=="unread"&&this.tabsClick();break;case"dialog":e=="add"&&((n=(o=s==null?void 0:s.msg)==null?void 0:o.text)==null?void 0:n.indexOf("open-approve-details"))!=-1&&this.tabsClick();break}},deep:!0},addShow(t){t||(this.addData.other="")},showType(t){t==1&&this.init()},windowWidth(t){this.isShowIcon=t<515}},activated(){this.showType=1},mounted(){this.tabsValue="unread",this.init()},methods:{init(){this.tabsClick(),this.getProcdefList(),this.tabsValue!="unread"&&this.getUnreadList(),this.addData.department_id=this.userInfo.department[0]||0,this.addData.startTime=this.addData.endTime=this.getCurrentDate(),this.isShowIcon=this.windowWidth<515},getProcdefList(){return new Promise((t,i)=>{this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:a})=>{this.procdefList=a.rows||[],this.approvalList=this.procdefList.map(e=>({value:e.name,label:e.name})),this.approvalList.unshift({value:"all",label:this.$L("\u5168\u90E8\u5BA1\u6279")}),t()}).catch(({msg:a})=>{$A.modalError(a),i()})})},getCurrentDate(){const t=new Date,i=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${i}-${a}-${e}`},tabsClick(t,i=1e3){!t&&this.__tabsClick&&i>0||(this.__tabsClick=setTimeout(()=>{this.__tabsClick=null},i),i==0&&(this.loadIng=!0),this.tabsValue=t||this.tabsValue,t&&(this.approvalType=this.searchState="all",this.approvalName=""),this.detailsShow=!1,this.tabsValue=="unread"&&(t===!1&&(this.unreadPage=1,this.unreadList=[]),this.getUnreadList()),this.tabsValue=="done"&&(t===!1&&(this.donePage=1,this.doneList=[]),this.getDoneList()),this.tabsValue=="notify"&&(t===!1&&(this.notifyPage=1,this.notifyList=[]),this.getNotifyList()),this.tabsValue=="initiated"&&(t===!1&&(this.initiatedPage=1,this.initiatedList=[]),this.getInitiatedList()))},clickList(t){if(this.unreadList.map(i=>{i._active=!1}),this.doneList.map(i=>{i._active=!1}),this.notifyList.map(i=>{i._active=!1}),this.initiatedList.map(i=>{i._active=!1}),t._active=!0,window.innerWidth<426){this.goForward({name:"manage-approve-details",query:{id:t.id}});return}window.innerWidth<1010&&(this.detailsShow=!0),this.details={},this.$nextTick(()=>{this.details=t})},handleScroll(t){t.target.scrollTop+t.target.clientHeight>=t.target.scrollHeight&&(this.tabsValue=="unread"&&!this.unreadLoad&&this.unreadList.length{this.updateData("unread",i,t)}).catch(i=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.unreadLoad=!1})},getDoneList(t="init"){this.$store.dispatch("call",{method:"get",url:"approve/procHistory/findTask",data:{page:t=="scroll"?this.donePage:1,page_size:t=="scroll"?this.pageSize:this.donePage*this.pageSize,proc_def_name:this.approvalType=="all"?"":this.approvalType,username:this.approvalName}}).then(({data:i})=>{this.updateData("done",i,t)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.doneLoad=!1})},getNotifyList(t){this.$store.dispatch("call",{method:"get",url:"approve/procHistory/findProcNotify",data:{page:t=="scroll"?this.notifyPage:1,page_size:t=="scroll"?this.pageSize:this.notifyPage*this.pageSize,proc_def_name:this.approvalType=="all"?"":this.approvalType,username:this.approvalName}}).then(({data:i})=>{this.updateData("notify",i,t)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.notifyLoad=!1})},getInitiatedList(t){this.$store.dispatch("call",{method:"post",url:"approve/process/startByMyselfAll",data:{page:t=="scroll"?this.initiatedPage:1,page_size:t=="scroll"?this.pageSize:this.initiatedPage*this.pageSize,proc_def_name:this.approvalType=="all"?"":this.approvalType,state:this.searchState=="all"?"":this.searchState,username:this.approvalName}}).then(({data:i})=>{this.updateData("initiated",i,t)}).catch(({msg:i})=>{$A.modalError(i)}).finally(i=>{this.loadIng=!1,this.initiatedLoad=!1})},addApply(){this.addLoadIng=!0,this.$store.dispatch("call",{url:"users/basic",data:{userid:[this.userInfo.userid]},skipAuthError:!0}).then(({data:t})=>{var i;this.addData.department_id=((i=t[0])==null?void 0:i.department[0])||0,this.getProcdefList().then(a=>{this.addTitle=this.$L("\u6DFB\u52A0\u7533\u8BF7"),this.addShow=!0,this.addLoadIng=!1}).catch(a=>{this.addLoadIng=!1})}).catch(({msg:t})=>{this.addLoadIng=!1,$A.modalError(t)})},updateData(t,i,a){let e=t+"List",s=this[e].map((o,n)=>o._active?n:-1).filter(o=>o>-1)[0]||0;this[t+"Total"]=i.total,a!="scroll"?this[e]=i.rows:i.rows.map(o=>{this[e].map(n=>n.id).indexOf(o.id)==-1&&this[e].push(o)}),this[e].length>0&&(this[e][s]._active=!0,this.tabsValue==t&&this.$nextTick(()=>{this.details=this[e][s]||{}}))},onInitiate(){this.$refs.initiateRef.validate(t=>{if(t){this.loadIng=!0;var i=JSON.parse(JSON.stringify(this.addData));i.startTime=i.startTime+" "+i.startTimeHour+":"+i.startTimeMinute,i.endTime=i.endTime+" "+i.endTimeHour+":"+i.endTimeMinute,this.addData.other&&(i.other=this.addData.other.map(a=>a.path).join(",")),this.$store.dispatch("call",{url:"approve/process/start",data:{proc_name:i.applyType,department_id:i.department_id,var:JSON.stringify(i)},method:"post"}).then(({data:a,msg:e})=>{$A.messageSuccess(e),this.addShow=!1,this.$refs.initiateRef.resetFields(),this.tabsValue="initiated",this.initiatedList.map(s=>{s._active=!1}),this.$nextTick(()=>{this.tabsClick(!1,0)})}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng=!1})}})}}},p={};var N=r(A,D,P,!1,O,null,null,null);function O(t){for(let i in p)this[i]=p[i]}var F=function(){return N.exports}();export{F as default}; diff --git a/public/js/build/keyboard.2aabed93.js b/public/js/build/keyboard.b40eff10.js similarity index 98% rename from public/js/build/keyboard.2aabed93.js rename to public/js/build/keyboard.b40eff10.js index 2aee341f2..d0fa51bed 100644 --- a/public/js/build/keyboard.2aabed93.js +++ b/public/js/build/keyboard.b40eff10.js @@ -1 +1 @@ -import{n as r}from"./app.6c8b31b1.js";var i=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-item submit"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[t.$Electron?[a("FormItem",{attrs:{label:t.$L("\u622A\u56FE\u5FEB\u6377\u952E"),prop:"screenshot_key"}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("Shift"),a("div",{staticClass:"input-box-push"},[t._v("+")]),a("Input",{staticClass:"input-box-key",attrs:{maxlength:2},model:{value:t.formData.screenshot_key,callback:function(e){t.$set(t.formData,"screenshot_key",e)},expression:"formData.screenshot_key"}})],1)]),a("FormItem",{attrs:{label:t.$L("\u65B0\u5EFA\u9879\u76EE")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("B ")])]),a("FormItem",{attrs:{label:t.$L("\u65B0\u5EFA\u4EFB\u52A1")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("N (K) ")])]),a("FormItem",{attrs:{label:t.$L("\u65B0\u4F1A\u8BAE")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("J ")])]),a("FormItem",{attrs:{label:t.$L("\u8BBE\u7F6E")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v(", ")])])]:t._e(),a("FormItem",{attrs:{label:t.$L("\u53D1\u9001\u6309\u94AE"),prop:"anonMessage"}},[a("RadioGroup",{model:{value:t.formData.separate_send_button,callback:function(e){t.$set(t.formData,"separate_send_button",e)},expression:"formData.separate_send_button"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540E\uFF0C\u53D1\u9001\u6D88\u606F\u65F6\u952E\u76D8\u4E0A\u7684\u53D1\u9001\u6309\u94AE\u4F1A\u88AB\u66FF\u6362\u6210\u6362\u884C")))])],1)],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u4FDD\u5B58")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},n=[];const _={data(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"Command":"Ctrl",formData:{screenshot_key:"",separate_send_button:"open"},ruleData:{screenshot_key:[{validator:(t,s,a)=>{s=s.trim(),s=s.substring(s.length-1),s&&!/^[A-Za-z0-9]?$/.test(s)?a(new Error(this.$L("\u53EA\u80FD\u8F93\u5165\u5B57\u6BCD\u6216\u6570\u5B57"))):a(),this.$nextTick(e=>{this.$set(this.formData,t.field,s.toUpperCase())})},trigger:"change"}]}}},mounted(){this.initData()},methods:{initData(){this.formData=Object.assign({screenshot_key:"",separate_send_button:"open"},$A.jsonParse(window.localStorage.getItem("__keyboard:data__"))||{}),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&(window.localStorage.setItem("__keyboard:data__",$A.jsonStringify(this.formData)),this.$Electron&&$A.bindScreenshotKey(this.formData),$A.messageSuccess("\u4FDD\u5B58\u6210\u529F"))})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},o={};var l=r(_,i,n,!1,m,"c1fe678c",null,null);function m(t){for(let s in o)this[s]=o[s]}var d=function(){return l.exports}();export{d as default}; +import{n as r}from"./app.6910ca56.js";var i=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-item submit"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[t.$Electron?[a("FormItem",{attrs:{label:t.$L("\u622A\u56FE\u5FEB\u6377\u952E"),prop:"screenshot_key"}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("Shift"),a("div",{staticClass:"input-box-push"},[t._v("+")]),a("Input",{staticClass:"input-box-key",attrs:{maxlength:2},model:{value:t.formData.screenshot_key,callback:function(e){t.$set(t.formData,"screenshot_key",e)},expression:"formData.screenshot_key"}})],1)]),a("FormItem",{attrs:{label:t.$L("\u65B0\u5EFA\u9879\u76EE")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("B ")])]),a("FormItem",{attrs:{label:t.$L("\u65B0\u5EFA\u4EFB\u52A1")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("N (K) ")])]),a("FormItem",{attrs:{label:t.$L("\u65B0\u4F1A\u8BAE")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v("J ")])]),a("FormItem",{attrs:{label:t.$L("\u8BBE\u7F6E")}},[a("div",{staticClass:"input-box"},[t._v(" "+t._s(t.mateName)),a("div",{staticClass:"input-box-push"},[t._v("+")]),t._v(", ")])])]:t._e(),a("FormItem",{attrs:{label:t.$L("\u53D1\u9001\u6309\u94AE"),prop:"anonMessage"}},[a("RadioGroup",{model:{value:t.formData.separate_send_button,callback:function(e){t.$set(t.formData,"separate_send_button",e)},expression:"formData.separate_send_button"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540E\uFF0C\u53D1\u9001\u6D88\u606F\u65F6\u952E\u76D8\u4E0A\u7684\u53D1\u9001\u6309\u94AE\u4F1A\u88AB\u66FF\u6362\u6210\u6362\u884C")))])],1)],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u4FDD\u5B58")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},n=[];const _={data(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"Command":"Ctrl",formData:{screenshot_key:"",separate_send_button:"open"},ruleData:{screenshot_key:[{validator:(t,s,a)=>{s=s.trim(),s=s.substring(s.length-1),s&&!/^[A-Za-z0-9]?$/.test(s)?a(new Error(this.$L("\u53EA\u80FD\u8F93\u5165\u5B57\u6BCD\u6216\u6570\u5B57"))):a(),this.$nextTick(e=>{this.$set(this.formData,t.field,s.toUpperCase())})},trigger:"change"}]}}},mounted(){this.initData()},methods:{initData(){this.formData=Object.assign({screenshot_key:"",separate_send_button:"open"},$A.jsonParse(window.localStorage.getItem("__keyboard:data__"))||{}),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&(window.localStorage.setItem("__keyboard:data__",$A.jsonStringify(this.formData)),this.$Electron&&$A.bindScreenshotKey(this.formData),$A.messageSuccess("\u4FDD\u5B58\u6210\u529F"))})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},o={};var l=r(_,i,n,!1,m,"c1fe678c",null,null);function m(t){for(let s in o)this[s]=o[s]}var d=function(){return l.exports}();export{d as default}; diff --git a/public/js/build/language.24cda9c9.js b/public/js/build/language.0e662f9b.js similarity index 95% rename from public/js/build/language.24cda9c9.js rename to public/js/build/language.0e662f9b.js index bfb00d737..752f77145 100644 --- a/public/js/build/language.24cda9c9.js +++ b/public/js/build/language.0e662f9b.js @@ -1 +1 @@ -import{d as s,m as l,l as i,q as m,n as u}from"./app.6c8b31b1.js";var f=function(){var t=this,o=t.$createElement,a=t._self._c||o;return a("div",{staticClass:"setting-item submit"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u8BED\u8A00"),prop:"language"}},[a("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u8BED\u8A00")},model:{value:t.formData.language,callback:function(e){t.$set(t.formData,"language",e)},expression:"formData.language"}},t._l(t.languageList,function(e,n){return a("Option",{key:n,attrs:{value:n}},[t._v(t._s(e))])}),1)],1)],1),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},g=[];const c={data(){return{loadIng:0,languageList:s,formData:{language:""},ruleData:{}}},mounted(){this.initData()},computed:{...l(["formLabelPosition","formLabelWidth"])},methods:{initData(){this.$set(this.formData,"language",i),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&m(this.formData.language)})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},r={};var _=u(c,f,g,!1,d,null,null,null);function d(t){for(let o in r)this[o]=r[o]}var p=function(){return _.exports}();export{p as default}; +import{d as s,m as l,l as i,q as m,n as u}from"./app.6910ca56.js";var f=function(){var t=this,o=t.$createElement,a=t._self._c||o;return a("div",{staticClass:"setting-item submit"},[a("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u8BED\u8A00"),prop:"language"}},[a("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u8BED\u8A00")},model:{value:t.formData.language,callback:function(e){t.$set(t.formData,"language",e)},expression:"formData.language"}},t._l(t.languageList,function(e,n){return a("Option",{key:n,attrs:{value:n}},[t._v(t._s(e))])}),1)],1)],1),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},g=[];const c={data(){return{loadIng:0,languageList:s,formData:{language:""},ruleData:{}}},mounted(){this.initData()},computed:{...l(["formLabelPosition","formLabelWidth"])},methods:{initData(){this.$set(this.formData,"language",i),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&m(this.formData.language)})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},r={};var _=u(c,f,g,!1,d,null,null,null);function d(t){for(let o in r)this[o]=r[o]}var p=function(){return _.exports}();export{p as default}; diff --git a/public/js/build/license.efaacf57.js b/public/js/build/license.93e62e1f.js similarity index 98% rename from public/js/build/license.efaacf57.js rename to public/js/build/license.93e62e1f.js index 0b1a61bf7..f5e0ccfee 100644 --- a/public/js/build/license.efaacf57.js +++ b/public/js/build/license.93e62e1f.js @@ -1 +1 @@ -import{m as e,n}from"./app.6c8b31b1.js";var r=function(){var t=this,a=t.$createElement,o=t._self._c||a;return o("div",{staticClass:"setting-item submit"},[o("Form",{ref:"formData",attrs:{model:t.formData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(s){s.preventDefault()}}},[o("FormItem",{attrs:{label:"License",prop:"license"}},[o("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:t.$L("\u8BF7\u8F93\u5165License...")},model:{value:t.formData.license,callback:function(s){t.$set(t.formData,"license",s)},expression:"formData.license"}})],1),o("FormItem",{attrs:{label:t.$L("\u8BE6\u7EC6\u4FE1\u606F")}},[o("div",{staticClass:"license-box"},[t.formData.info.sn?o("ul",[o("li",[o("em",[t._v("SN:")]),o("span",[t._v(t._s(t.formData.info.sn))]),o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u5F53\u524D\u73AF\u5883"))+": "+t._s(t.formData.doo_sn))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1)],1),o("li",[o("em",[t._v("IP:")]),o("span",[t._v(t._s(t.infoJoin(t.formData.info.ip)))])]),o("li",[o("em",[t._v(t._s(t.$L("\u57DF\u540D"))+":")]),o("span",[t._v(t._s(t.infoJoin(t.formData.info.domain)))])]),o("li",[o("em",[t._v("MAC:")]),o("span",[t._v(t._s(t.infoJoin(t.formData.info.mac)))]),o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u5F53\u524D\u73AF\u5883"))+": "+t._s(t.infoJoin(t.formData.macs,"-")))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1)],1),o("li",[o("em",[t._v(t._s(t.$L("\u4F7F\u7528\u4EBA\u6570"))+":")]),o("span",[t._v(t._s(t.formData.info.people||t.$L("\u65E0\u9650\u5236"))+" ("+t._s(t.$L("\u5DF2\u4F7F\u7528"))+": "+t._s(t.formData.user_count)+")")]),o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u9650\u5236\u6CE8\u518C\u4EBA\u6570")))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1)],1),o("li",[o("em",[t._v(t._s(t.$L("\u521B\u5EFA\u65F6\u95F4"))+":")]),o("span",[t._v(t._s(t.formData.info.created_at))])]),o("li",[o("em",[t._v(t._s(t.$L("\u5230\u671F\u65F6\u95F4"))+":")]),o("span",[t._v(t._s(t.formData.info.expired_at||t.$L("\u6C38\u4E45")))]),t.formData.info.expired_at?o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u5230\u671F\u540E\u9650\u5236\u6CE8\u518C\u5E10\u53F7")))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1):t._e()],1),t._l(t.formData.error,function(s){return o("li",{staticClass:"warning"},[t._v(t._s(s))])})],2):o("ul",[o("li",[t._v(" "+t._s(t.$L("\u52A0\u8F7D\u4E2D..."))+" ")])])])])],1),o("div",{staticClass:"setting-footer"},[o("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),o("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const m={data(){return{loadIng:0,formData:{license:"",info:{},macs:[],doo_sn:"",user_count:0,error:[]}}},mounted(){this.systemSetting()},computed:{...e(["userInfo","formLabelPosition","formLabelWidth"])},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/license",data:Object.assign(this.formData,{type:t?"save":"get"}),method:"post"}).then(({data:a})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=a,this.formData_bak=$A.cloneJSON(this.formData)}).catch(({msg:a})=>{t&&$A.modalError(a)}).finally(a=>{this.loadIng--})},infoJoin(t,a=null){return $A.isArray(t)&&(t=t.join(",")),t||(a===null?this.$L("\u65E0\u9650\u5236"):a)}}},i={};var c=n(m,r,l,!1,_,"2888f6cc",null,null);function _(t){for(let a in i)this[a]=i[a]}var u=function(){return c.exports}();export{u as default}; +import{m as e,n}from"./app.6910ca56.js";var r=function(){var t=this,a=t.$createElement,o=t._self._c||a;return o("div",{staticClass:"setting-item submit"},[o("Form",{ref:"formData",attrs:{model:t.formData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(s){s.preventDefault()}}},[o("FormItem",{attrs:{label:"License",prop:"license"}},[o("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:t.$L("\u8BF7\u8F93\u5165License...")},model:{value:t.formData.license,callback:function(s){t.$set(t.formData,"license",s)},expression:"formData.license"}})],1),o("FormItem",{attrs:{label:t.$L("\u8BE6\u7EC6\u4FE1\u606F")}},[o("div",{staticClass:"license-box"},[t.formData.info.sn?o("ul",[o("li",[o("em",[t._v("SN:")]),o("span",[t._v(t._s(t.formData.info.sn))]),o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u5F53\u524D\u73AF\u5883"))+": "+t._s(t.formData.doo_sn))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1)],1),o("li",[o("em",[t._v("IP:")]),o("span",[t._v(t._s(t.infoJoin(t.formData.info.ip)))])]),o("li",[o("em",[t._v(t._s(t.$L("\u57DF\u540D"))+":")]),o("span",[t._v(t._s(t.infoJoin(t.formData.info.domain)))])]),o("li",[o("em",[t._v("MAC:")]),o("span",[t._v(t._s(t.infoJoin(t.formData.info.mac)))]),o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u5F53\u524D\u73AF\u5883"))+": "+t._s(t.infoJoin(t.formData.macs,"-")))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1)],1),o("li",[o("em",[t._v(t._s(t.$L("\u4F7F\u7528\u4EBA\u6570"))+":")]),o("span",[t._v(t._s(t.formData.info.people||t.$L("\u65E0\u9650\u5236"))+" ("+t._s(t.$L("\u5DF2\u4F7F\u7528"))+": "+t._s(t.formData.user_count)+")")]),o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u9650\u5236\u6CE8\u518C\u4EBA\u6570")))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1)],1),o("li",[o("em",[t._v(t._s(t.$L("\u521B\u5EFA\u65F6\u95F4"))+":")]),o("span",[t._v(t._s(t.formData.info.created_at))])]),o("li",[o("em",[t._v(t._s(t.$L("\u5230\u671F\u65F6\u95F4"))+":")]),o("span",[t._v(t._s(t.formData.info.expired_at||t.$L("\u6C38\u4E45")))]),t.formData.info.expired_at?o("ETooltip",{attrs:{"max-width":"auto",placement:"right"}},[o("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u5230\u671F\u540E\u9650\u5236\u6CE8\u518C\u5E10\u53F7")))]),o("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}})],1):t._e()],1),t._l(t.formData.error,function(s){return o("li",{staticClass:"warning"},[t._v(t._s(s))])})],2):o("ul",[o("li",[t._v(" "+t._s(t.$L("\u52A0\u8F7D\u4E2D..."))+" ")])])])])],1),o("div",{staticClass:"setting-footer"},[o("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),o("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const m={data(){return{loadIng:0,formData:{license:"",info:{},macs:[],doo_sn:"",user_count:0,error:[]}}},mounted(){this.systemSetting()},computed:{...e(["userInfo","formLabelPosition","formLabelWidth"])},methods:{submitForm(){this.$refs.formData.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/license",data:Object.assign(this.formData,{type:t?"save":"get"}),method:"post"}).then(({data:a})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formData=a,this.formData_bak=$A.cloneJSON(this.formData)}).catch(({msg:a})=>{t&&$A.modalError(a)}).finally(a=>{this.loadIng--})},infoJoin(t,a=null){return $A.isArray(t)&&(t=t.join(",")),t||(a===null?this.$L("\u65E0\u9650\u5236"):a)}}},i={};var c=n(m,r,l,!1,_,"2888f6cc",null,null);function _(t){for(let a in i)this[a]=i[a]}var u=function(){return c.exports}();export{u as default}; diff --git a/public/js/build/login.e56fbb44.js b/public/js/build/login.d3d06d73.js similarity index 99% rename from public/js/build/login.e56fbb44.js rename to public/js/build/login.d3d06d73.js index 618c43faa..c47dede25 100644 --- a/public/js/build/login.e56fbb44.js +++ b/public/js/build/login.d3d06d73.js @@ -1,4 +1,4 @@ -import{d as wr,l as yr,a as Ar,m as xr,q as Cr,n as _r}from"./app.6c8b31b1.js";/*! +import{d as wr,l as yr,a as Ar,m as xr,q as Cr,n as _r}from"./app.6910ca56.js";/*! * vue-qrcode v1.0.2 * https://fengyuanchen.github.io/vue-qrcode * diff --git a/public/js/build/manage.8b64e6e6.js b/public/js/build/manage.8b64e6e6.js deleted file mode 100644 index c7eaba2cb..000000000 --- a/public/js/build/manage.8b64e6e6.js +++ /dev/null @@ -1 +0,0 @@ -import{n as l,N as M,m as h,b as g,a as d,c as $}from"./app.6c8b31b1.js";import{C as P,R as N,T as R}from"./CheckinExport.ac86aa08.js";import{D as E}from"./index.31386d23.js";import{U as I}from"./UserSelect.d62f565b.js";import{T as B,a as O,b as U}from"./TaskDetail.3e00ee35.js";import{M as F}from"./MeetingManager.76c2e240.js";import{l as z}from"./longpress.43ca7fd9.js";import{D as V}from"./DialogWrapper.5fcf71c2.js";import{A as K}from"./ApproveExport.37a8254a.js";import{M as H}from"./MicroApps.56fd4f5e.js";import"./tip.517649f6.js";import"./ReportEdit.54eb60eb.js";import"./ReportDetail.556c0891.js";import"./ProjectLog.d63fd8b4.js";import"./TaskMenu.a0d74239.js";import"./TEditor.5f656e41.js";import"./ImgUpload.0e64a5a8.js";import"./details.6749696e.js";var W=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"project-archived"},[e("div",{staticClass:"archived-title"},[t._v(" "+t._s(t.$L("\u5F52\u6863\u7684\u9879\u76EE"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u540D"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(s){t.$set(t.keys,"name",s)},expression:"keys.name"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(s){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},Y=[];const q={name:"ProjectArchived",data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:a,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",a.id)])},{title:this.$L("\u9879\u76EE\u540D\u79F0"),key:"name",minWidth:200,render:(t,{row:a})=>t("AutoTip",a.name)},{title:this.$L("\u5F52\u6863\u65F6\u95F4"),key:"archived_at",width:168},{title:this.$L("\u5F52\u6863\u4EBA\u5458"),key:"archived_userid",minWidth:80,render:(t,{row:a})=>a.archived_userid?t("UserAvatar",{props:{userid:a.archived_userid,size:24,showName:!0}}):t("Tag",this.$L("\u7CFB\u7EDF\u81EA\u52A8"))},{title:this.$L("\u8D1F\u8D23\u4EBA"),minWidth:80,render:(t,{row:a})=>t("UserAvatar",{props:{showName:!0,size:22,userid:a.owner_userid}})},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,a)=>{const e=[t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(a.row)}}},this.$L("\u8FD8\u539F")),t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u9879\u76EE\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{marginLeft:"8px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":()=>{this.delete(a.row)}}},this.$L("\u5220\u9664"))];return t("TableAction",{props:{column:a.column}},e)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,archived:"yes",page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:t})=>{this.page=t.current_page,this.total=t.total,this.list=t.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(t=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},recovery(t){this.list=this.list.filter(({id:a})=>a!=t.id),this.loadIng++,this.$store.dispatch("call",{url:"project/archived",data:{project_id:t.id,type:"recovery"}}).then(()=>{this.getLists(),this.$store.dispatch("getProjectOne",t.id).catch(()=>{})}).catch(({msg:a})=>{$A.modalError(a),this.getLists()}).finally(a=>{this.loadIng--})},delete(t){this.list=this.list.filter(({id:a})=>a!=t.id),this.loadIng++,this.$store.dispatch("removeProject",t.id).then(({msg:a})=>{$A.messageSuccess(a),this.getLists()}).catch(({msg:a})=>{$A.modalError(a),this.getLists()}).finally(a=>{this.loadIng--})}}},b={};var G=l(q,W,Y,!1,J,null,null,null);function J(t){for(let a in b)this[a]=b[a]}var X=function(){return G.exports}(),Q=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"project-management"},[e("div",{staticClass:"management-title"},[t._v(" "+t._s(t.$L("\u6240\u6709\u9879\u76EE"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u540D"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(s){t.$set(t.keys,"name",s)},expression:"keys.name"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u7C7B\u578B"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u56E2\u961F\u9879\u76EE")},model:{value:t.keys.type,callback:function(s){t.$set(t.keys,"type",s)},expression:"keys.type"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u56E2\u961F\u9879\u76EE")))]),e("Option",{attrs:{value:"personal"}},[t._v(t._s(t.$L("\u4E2A\u4EBA\u9879\u76EE")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8\u9879\u76EE")))])],1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u72B6\u6001"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u672A\u5F52\u6863")},model:{value:t.keys.status,callback:function(s){t.$set(t.keys,"status",s)},expression:"keys.status"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u672A\u5F52\u6863")))]),e("Option",{attrs:{value:"archived"}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8")))])],1)],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(s){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},Z=[];const tt={name:"ProjectManagement",data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:a,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",a.id)])},{title:this.$L("\u9879\u76EE\u540D\u79F0"),key:"name",minWidth:100,render:(t,{row:a})=>{const e=[t("AutoTip",a.name)];return a.archived_at&&e.push(t("Tag",{props:{color:"error"}},this.$L("\u5DF2\u5F52\u6863"))),t("div",{class:"project-name"},e)}},{title:this.$L("\u9879\u76EE\u8FDB\u5EA6"),minWidth:100,render:(t,{row:a})=>{const e=[t("AutoTip",a.task_complete+"/"+a.task_num),t("Progress",{props:{percent:a.task_percent,strokeWidth:5}})];return t("div",{class:"project-percent"},e)}},{title:this.$L("\u8D1F\u8D23\u4EBA"),minWidth:80,render:(t,{row:a})=>t("UserAvatar",{props:{showName:!0,size:22,userid:a.owner_userid}})},{title:this.$L("\u521B\u5EFA\u4EBA"),minWidth:80,render:(t,{row:a})=>t("UserAvatar",{props:{showName:!0,size:22,userid:a.userid}})},{title:this.$L("\u521B\u5EFA\u65F6\u95F4"),key:"created_at",width:168}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){let t="team";this.keys.type=="all"?t="all":this.keys.type=="personal"&&(t="personal");let a="no";this.keys.status=="all"?a="all":this.keys.status=="archived"&&(a="yes"),this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,all:1,archived:a,type:t,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()}}},w={};var et=l(tt,Q,Z,!1,at,null,null,null);function at(t){for(let a in w)this[a]=w[a]}var st=function(){return et.exports}(),it=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mobile-tabbar"},[t.windowPortrait?e("NetworkException",{attrs:{type:"alert"}}):t._e(),e("ul",{staticClass:"tabbar-box"},t._l(t.navList,function(s){return e("li",{class:{active:t.activeName===s.name},on:{click:function(i){return t.toggleRoute(s.name)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(s.icon)}}),e("div",{staticClass:"tabbar-title"},[t._v(t._s(t.$L(s.label)))]),s.name==="dashboard"?[t.dashboardTask.overdue_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"error","overflow-count":999,count:t.dashboardTask.overdue_count}}):t.dashboardTask.today_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"info","overflow-count":999,count:t.dashboardTask.today_count}}):t.dashboardTask.all_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"primary","overflow-count":999,count:t.dashboardTask.all_count}}):t._e()]:s.name==="dialog"?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,text:t.msgUnreadMention}})]:s.name==="application"?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber+t.approveUnreadNumber}})]:t._e()],2)}),0)],1)},ot=[];const rt={name:"MobileTabbar",components:{NetworkException:M},data(){return{navList:[{icon:"",name:"dashboard",label:"\u4EEA\u8868\u76D8"},{icon:"",name:"project",label:"\u9879\u76EE"},{icon:"",name:"dialog",label:"\u6D88\u606F"},{icon:"",name:"contacts",label:"\u901A\u8BAF\u5F55"},{icon:"",name:"application",label:"\u5E94\u7528"}]}},computed:{...h(["cacheDialogs","reportUnreadNumber","approveUnreadNumber"]),...g(["dashboardTask"]),routeName(){return this.$route.name},msgUnreadMention(){let t=0,a=0;this.cacheDialogs.some(s=>{t+=$A.getDialogUnread(s,!1),a+=$A.getDialogMention(s)}),t>999&&(t="999+"),a>999&&(a="999+");const e=this.msgTodoTotal;return e?a?`@${a}\xB7${e}`:t?`${t}\xB7${e}`:e:t?a?`${t}\xB7@${a}`:String(t):a?`@${a}`:""},msgAllUnread(){let t=0;return this.cacheDialogs.some(a=>{t+=$A.getDialogNum(a)}),t},msgTodoTotal(){let t=this.cacheDialogs.reduce((a,e)=>a+(e.todo_num||0),0);return t>0?(t>999?t="999+":t===1&&(t=""),`${this.$L("\u5F85\u529E")}${t}`):null},unreadAndOverdue(){return this.userId>0?this.msgAllUnread+this.dashboardTask.overdue_count:0},activeName(){return["manage-calendar","manage-file","manage-setting","manage-application","manage-approve","manage-apps"].includes(this.routeName)?"application":this.routeName==="manage-dashboard"?"dashboard":this.routeName==="manage-project"&&!/^\d+$/.test(this.$route.params.projectId)?"project":this.routeName==="manage-messenger"?this.$route.params.dialogAction==="contacts"?"contacts":"dialog":""}},watch:{windowActive(t){t||$A.eeuiAppSendMessage({action:"setBdageNotify",bdage:this.unreadAndOverdue})}},methods:{toggleRoute(t){this.$emit("on-click",t);let a;switch(t){case"project":a={name:"manage-project",params:{projectId:"all"}};break;case"dialog":a={name:"manage-messenger",params:{dialogAction:"dialog"}},this.routeName==="manage-messenger"&&d.Store.set("clickAgainDialog",!0);break;case"contacts":a={name:"manage-messenger",params:{dialogAction:"contacts"}};break;default:a={name:"manage-"+t};break}this.goForward(a)}}},y={};var nt=l(rt,it,ot,!1,lt,null,null,null);function lt(t){for(let a in y)this[a]=y[a]}var ct=function(){return nt.exports}(),dt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"task-add"},[e("div",{staticClass:"head",class:{empty:t.addData.cascader.length==0,visible:t.cascaderShow}},[e("Cascader",{attrs:{data:t.cascaderData,clearable:!1,placeholder:t.$L("\u8BF7\u9009\u62E9\u9879\u76EE"),"load-data":t.cascaderLoadData,filterable:""},on:{"on-change":t.cascaderChange,"on-input-change":t.cascaderInputChange,"on-visible-change":function(s){t.cascaderShow=!t.cascaderShow}},model:{value:t.addData.cascader,callback:function(s){t.$set(t.addData,"cascader",s)},expression:"addData.cascader"}})],1),e("div",{staticClass:"task-add-form"},[e("div",{staticClass:"title"},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,placeholder:t.$L("\u4EFB\u52A1\u63CF\u8FF0"),enterkeyhint:"done"},on:{"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(s){t.$set(t.addData,"name",s)},expression:"addData.name"}})],1),e("TEditorTask",{staticClass:"desc",attrs:{placeholder:t.$L(t.windowLandscape?"\u8BE6\u7EC6\u63CF\u8FF0\uFF0C\u9009\u586B...\uFF08\u70B9\u51FB\u53F3\u952E\u4F7F\u7528\u5DE5\u5177\u680F\uFF09":"\u8BE6\u7EC6\u63CF\u8FF0\uFF0C\u9009\u586B..."),placeholderFull:t.$L("\u8BE6\u7EC6\u63CF\u8FF0...")},model:{value:t.addData.content,callback:function(s){t.$set(t.addData,"content",s)},expression:"addData.content"}}),e("div",{staticClass:"advanced-option",class:{"advanced-open":t.advanced}},[e("Button",{on:{click:function(s){t.advanced=!t.advanced}}},[t._v(t._s(t.$L("\u9AD8\u7EA7\u9009\u9879")))]),e("ul",{staticClass:"advanced-priority"},t._l(t.taskPriority,function(s,i){return e("li",{key:i},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.taskPriorityContent(s)}},[e("i",{staticClass:"taskfont",style:{color:s.color},domProps:{innerHTML:t._s(t.addData.p_name==s.name?"":"")},on:{click:function(o){return t.choosePriority(s)}}})])],1)}),0),t.taskDays>0?e("DatePicker",{attrs:{open:t.taskTimeOpen,options:t.timeOptions,placeholder:t.$L("\u9009\u62E9\u8BA1\u5212\u8303\u56F4"),format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom"},on:{"on-change":function(s){return t.taskTimeChange(t.addData)},"on-open-change":t.taskTimeOpenChange},model:{value:t.addData.times,callback:function(s){t.$set(t.addData,"times",s)},expression:"addData.times"}},[e("div",{staticClass:"advanced-time",on:{click:function(s){return t.taskTimeOpenChange(!t.taskTimeOpen)}}},[e("Icon",{attrs:{type:"ios-clock-outline"}}),e("em",{style:t.addData.p_color?{backgroundColor:t.addData.p_color}:{},attrs:{type:"primary"}},[t._v(t._s(t.taskDays))])],1)]):t._e()],1)],1),t.advanced?e("Form",{staticClass:"task-add-advanced",attrs:{"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u8BA1\u5212\u65F6\u95F4")}},[e("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("\u9009\u62E9\u8BA1\u5212\u8303\u56F4"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(s){return t.taskTimeChange(t.addData)}},model:{value:t.addData.times,callback:function(s){t.$set(t.addData,"times",s)},expression:"addData.times"}})],1),e("FormItem",{attrs:{label:t.$L("\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"multiple-max":10,title:t.$L("\u9009\u62E9\u4EFB\u52A1\u8D1F\u8D23\u4EBA"),"project-id":t.addData.project_id,"avatar-size":24,border:""},model:{value:t.addData.owner,callback:function(s){t.$set(t.addData,"owner",s)},expression:"addData.owner"}})],1),e("FormItem",{attrs:{label:t.$L("\u534F\u52A9\u4EBA\u5458")}},[e("UserSelect",{attrs:{"multiple-max":10,title:t.$L("\u9009\u62E9\u4EFB\u52A1\u534F\u52A9\u4EBA\u5458"),"project-id":t.addData.project_id,"disabled-choice":t.addData.owner,"avatar-size":24,border:""},model:{value:t.addData.assist,callback:function(s){t.$set(t.addData,"assist",s)},expression:"addData.assist"}})],1),e("FormItem",[e("div",{attrs:{slot:"label"},slot:"label"},[e("EDropdown",{ref:"eDropdownRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropVisible}},[e("span",{staticClass:"visibility-text"},[t._v(t._s(t.$L("\u53EF\u89C1\u6027"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE740")])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t.addData.visibility_appoint==1?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u9879\u76EE\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t.addData.visibility_appoint==2?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:3}},[e("div",{staticClass:"task-menu-icon"},[t.addData.visibility_appoint==3?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u6307\u5B9A\u6210\u5458"))+" ")],1)])],1)],1)],1),t.addData.visibility_appoint<3?e("div",{staticClass:"ivu-input task-add-visibility",on:{click:t.showCisibleDropdown}},[t.addData.visibility_appoint==1?e("span",[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.addData.visibility_appoint==2?e("span",[t._v(t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458\u53EF\u89C1")))]):t._e()]):e("UserSelect",{ref:"visibleUserSelectRef",attrs:{"avatar-size":24,title:t.$L("\u9009\u62E9\u6307\u5B9A\u4EBA\u5458"),"project-id":t.addData.project_id,border:""},on:{"on-show-change":t.visibleUserSelectShowChange},model:{value:t.addData.visibility_appointor,callback:function(s){t.$set(t.addData,"visibility_appointor",s)},expression:"addData.visibility_appointor"}})],1),e("div",{staticClass:"subtasks"},[t.addData.subtasks.length>0?e("div",{staticClass:"sublist"},[e("Row",[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u4EFB\u52A1\u63CF\u8FF0")))]),e("Col",{attrs:{span:"8"}},[t._v(t._s(t.$L("\u8BA1\u5212\u65F6\u95F4")))]),e("Col",{attrs:{span:"4"}},[t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA")))])],1),t._l(t.addData.subtasks,function(s,i){return e("Row",{key:i},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:255,clearable:""},on:{"on-clear":function(o){return t.addData.subtasks.splice(i,1)}},model:{value:s.name,callback:function(o){t.$set(s,"name",o)},expression:"item.name"}})],1),e("Col",{attrs:{span:"8",title:t.formatDate(s.times)}},[e("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("\u9009\u62E9\u65F6\u95F4"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(o){return t.taskTimeChange(s)}},model:{value:s.times,callback:function(o){t.$set(s,"times",o)},expression:"item.times"}})],1),e("Col",{attrs:{span:"4"}},[e("UserSelect",{attrs:{"multiple-max":1,title:t.$L("\u9009\u62E9\u8D1F\u8D23\u4EBA"),"project-id":t.addData.project_id,"avatar-size":24,border:""},model:{value:s.owner,callback:function(o){t.$set(s,"owner",o)},expression:"item.owner"}})],1)],1)})],2):t._e(),e("Input",{class:["enter-input",t.subName==""?"empty":""],attrs:{type:"text",placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1")},on:{"on-enter":t.addSubTask},model:{value:t.subName,callback:function(s){t.subName=s},expression:"subName"}})],1)],1):t._e(),e("div",{staticClass:"ivu-modal-footer"},[e("div",{staticClass:"adaption"},[e("Button",{attrs:{type:"default"},on:{click:t.close}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("ButtonGroup",{staticClass:"page-manage-add-task-button-group"},[e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u6DFB\u52A0\u4EFB\u52A1")))]),e("Dropdown",{attrs:{transfer:""},on:{"on-click":function(s){return t.onAdd(!0)}}},[e("Button",{attrs:{type:"primary"}},[e("Icon",{attrs:{type:"ios-arrow-down"}})],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{disabled:t.loadIng>0}},[t._v(t._s(t.$L("\u63D0\u4EA4\u7EE7\u7EED\u6DFB\u52A0")))])],1)],1)],1)],1)]),e("TaskExistTips",{ref:"taskExistTipsRef",on:{onAdd:function(s){return t.onAdd(t.again,!0)}}})],1)},ht=[];const ut={name:"TaskAdd",components:{TEditorTask:B,UserSelect:I,TaskExistTips:O},props:{value:{type:Boolean,default:!1}},data(){return{addData:{cascader:[],name:"",content:"",owner:[],assist:[],project_id:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:"",visibility_appoint:1,visibility_appointor:[]},cascaderShow:!1,cascaderData:[],cascaderValue:"",cascaderLoading:0,cascaderAlready:[],advanced:!1,subName:"",taskTimeOpen:!1,timeOptions:{shortcuts:$A.timeOptionShortcuts()},loadIng:0,isMounted:!1,beforeClose:[],again:!1}},async mounted(){this.initCascaderData(),await this.initProjectData(),this.$nextTick(()=>this.$refs.input.focus()),this.isMounted=!0},beforeDestroy(){this.beforeClose.some(t=>{typeof t=="function"&&t()}),this.beforeClose=[]},computed:{...h(["cacheProjects","projectId","cacheColumns","taskPriority"]),taskDays(){const{times:t}=this.addData;let a=$A.date2string(t,"Y-m-d H:i");if(a[0]&&a[1]){let e=Math.ceil(($A.Date(a[1],!0)-$A.Date(a[0],!0))/86400);if(e>0)return e}return 0}},watch:{"addData.owner"(t){this.addData.assist=this.addData.assist.filter(a=>t.indexOf(a)===-1),this.addData.assist.length===0&&t.indexOf(this.userId)===-1&&(this.addData.assist=[this.userId])},"addData.project_id"(t){t>0&&$A.IDBSave("cacheAddTaskProjectId",t)},"addData.column_id"(t){t>0&&$A.IDBSave("cacheAddTaskColumnId",t);const{project_id:a}=this.addData;a&&t?this.$set(this.addData,"cascader",[a,t]):this.$set(this.addData,"cascader",[])}},methods:{initCascaderData(){const t=$A.cloneJSON(this.cacheProjects).sort((a,e)=>a.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(a.top_at):e.id-a.id);this.cascaderData=t.map(a=>{const e=this.cacheColumns.filter(({project_id:i})=>i==a.id).map(i=>({value:i.id,label:i.name})),s={value:a.id,label:a.name,children:e};return e.length==0&&(s.loading=!1),s})},async initProjectData(){let t=await $A.IDBInt("cacheAddTaskProjectId"),a=this.cacheProjects.find(({id:e})=>e==this.projectId)||this.cacheProjects.find(({id:e})=>e==t)||this.cacheProjects.find(({id:e})=>e>0);if(a){let e=await $A.IDBInt("cacheAddTaskColumnId"),s=this.cacheColumns.find(({project_id:i,id:o})=>i==a.id&&o==e)||this.cacheColumns.find(({project_id:i})=>i==a.id);s?(this.addData.project_id=s.project_id,this.addData.column_id=s.id):this.$store.dispatch("getColumns",a.id).then(()=>{s=this.cacheColumns.find(({project_id:i,id:o})=>i==a.id&&o==e)||this.cacheColumns.find(({project_id:i})=>i==a.id),s&&(this.addData.project_id=s.project_id,this.addData.column_id=s.id)}).catch(()=>{})}this.taskPriority.length>0&&await this.choosePriority(this.taskPriority[0])},async taskTimeChange(t){const a=$A.date2string(t.times,"Y-m-d H:i");$A.rightExists(a[0],"00:00")&&$A.rightExists(a[1],"00:00")&&this.$set(t,"times",await this.$store.dispatch("taskDefaultTime",a))},taskTimeOpenChange(t){this.taskTimeOpen=t},formatDate(t){return t?$A.date2string(t):null},onKeydown(t){if(t.keyCode===13){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},addSubTask(){this.subName.trim()!==""&&(this.addData.subtasks.push({name:this.subName.trim(),owner:[this.userId],times:[]}),this.subName="")},taskPriorityContent(t){const a=$A.runNum(t.days);return a<=0?t.name+" ("+this.$L("\u65E0\u65F6\u95F4\u9650\u5236")+")":t.name+" ("+a+this.$L("\u5929")+")"},async choosePriority(t){const a=new Date,e=$A.runNum(t.days);if(e>0){const s=new Date(new Date().setDate(a.getDate()+e));this.$set(this.addData,"times",await this.$store.dispatch("taskDefaultTime",$A.date2string([a,s])))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color)},cascaderLoadData(t,a){t.loading=!0,this.$store.dispatch("getColumns",t.value).then(e=>{t.children=e.map(s=>({value:s.id,label:s.name})),t.loading=!1,a()}).catch(()=>{t.loading=!1,a()})},cascaderChange(t){t[1]&&(this.$set(this.addData,"project_id",t[0]),this.$set(this.addData,"column_id",t[1]))},cascaderInputChange(t){this.cascaderValue=t||"",this.cascaderAlready[this.cascaderValue]!==!0&&(this.cascaderAlready[this.cascaderValue]=!0,setTimeout(()=>{this.cascaderLoading++},1e3),this.$store.dispatch("getProjects",{keys:{name:this.cascaderValue},getcolumn:"yes"}).then(()=>{this.cascaderLoading--,this.initCascaderData()}).catch(()=>{this.cascaderLoading--}))},setData(t){if(!this.isMounted){this.__setData&&clearTimeout(this.__setData),this.__setData=setTimeout(a=>this.setData(t),10);return}typeof t.beforeClose!="undefined"&&(this.beforeClose.push(t.beforeClose),delete t.beforeClose),this.addData=Object.assign({},this.addData,t)},async onAdd(t,a=!1){if(!this.addData.name){$A.messageError("\u4EFB\u52A1\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}if(this.loadIng++,!a&&this.addData.owner.length>0){this.$refs.taskExistTipsRef.isExistTask({userids:this.addData.owner,timerange:this.addData.times}).then(e=>{e?(this.loadIng--,this.again=t):this.onAdd(t,!0)});return}this.$store.dispatch("taskAdd",this.addData).then(({msg:e})=>{this.loadIng--,$A.messageSuccess(e),t===!0?(this.addData=Object.assign({},this.addData,{name:"",content:"",subtasks:[]}),this.$refs.input.focus()):(this.addData={cascader:[],name:"",content:"",owner:[],assist:[],column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""},this.close())}).catch(({msg:e})=>{this.loadIng--,$A.modalError(e)})},close(){this.$emit("input",!this.value)},showCisibleDropdown(){this.$refs.eDropdownRef.show()},visibleUserSelectShowChange(t){if(!t&&(this.addData.visibility_appointor.length==0||!this.addData.visibility_appointor[0])){let a=this.addData.old_visibility_appoint;this.addData.visibility_appoint=a>2?1:a||1,this.addData.visibility_appoint<3}},dropVisible(t){switch(t){case 1:case 2:this.addData.visibility_appoint=t;break;case 3:this.addData.old_visibility_appoint=this.addData.visibility_appoint,this.addData.visibility_appoint=t,this.$nextTick(()=>{this.$refs.visibleUserSelectRef.onSelection()});break}}}},D={};var pt=l(ut,dt,ht,!1,mt,null,null,null);function mt(t){for(let a in D)this[a]=D[a]}var ft=function(){return pt.exports}(),gt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mobile-back"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.windowScrollY>0,expression:"windowScrollY > 0"}],ref:"bar",staticClass:"back-bar"}),t.show?e("div",{staticClass:"back-semicircle",style:t.style}):t._e()])},vt=[];const _t={name:"MobileBack",props:{showTabbar:{type:Boolean,default:!1}},data(){return{show:!1,x:0,y:0}},created(){this.appAndroidEvents()},mounted(){this.$refs.bar.addEventListener("touchmove",this.barListener),document.addEventListener("touchstart",this.touchstart),document.addEventListener("touchmove",this.touchmove),document.addEventListener("touchend",this.touchend)},beforeDestroy(){this.$refs.bar.removeEventListener("touchmove",this.barListener),document.removeEventListener("touchstart",this.touchstart),document.removeEventListener("touchmove",this.touchmove),document.removeEventListener("touchend",this.touchend)},computed:{...h(["fileLists","messengerSearchKey"]),style(){const a=Math.max(135,this.y)+this.windowScrollY,e=this.windowHeight-135;return{top:Math.min(a,e)+"px",left:this.x>20?0:"-50px"}},routeName(){return this.$route.name},fileFolderId(){const{folderId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)}},watch:{show(t){t?document.body.classList.add("touch-back"):document.body.classList.remove("touch-back"),this.$store.state.touchBackInProgress=t}},methods:{getXY(t){let a=t.touches[0];this.x=a.clientX,this.y=a.clientY},barListener(t){t.preventDefault()},touchstart(t){this.getXY(t),this.show=this.canBack()&&this.x<20},touchmove(t){this.show&&this.getXY(t)},touchend(){this.x>90&&this.show&&this.onBack(),this.x=0,this.show=!1},canBack(){if(!this.showTabbar||this.$Modal.visibles().length>0||this.fileFolderId>0)return!0;if(this.routeName==="manage-messenger"){if(this.$route.params.dialogAction==="contacts"){if(this.messengerSearchKey.contacts)return!0}else if(this.messengerSearchKey.dialog)return!0}let t=!1;return $.setGlobalData({type:"modalVisible",callback:(a,e)=>{e&&(t=!0)}}),!!t},onBack(){let t=!1;if($.setGlobalData({type:"route",action:"back",route:this.$route,callback:(a,e)=>{e&&(t=!0)}}),!t&&!this.$Modal.removeLast()){if(this.fileFolderId>0){const a=this.fileLists.find(({id:e,permission:s})=>e==this.fileFolderId&&s>-1);if(a){const e=this.fileLists.find(({id:s,permission:i})=>s==a.pid&&i>-1);if(e){this.goForward({name:"manage-file",params:{folderId:e.id,fileId:null}});return}}this.goForward({name:"manage-file"});return}if(this.routeName==="manage-messenger"){if(this.$route.params.dialogAction==="contacts"){if(this.messengerSearchKey.contacts){this.$store.state.messengerSearchKey.contacts="";return}}else if(this.messengerSearchKey.dialog){this.$store.state.messengerSearchKey.dialog="";return}}this.goBack()}},appAndroidEvents(){this.$isEEUiApp&&$A.isAndroid()&&$A.eeuiAppSetPageBackPressed({pageName:"firstPage"},t=>{this.canBack()?this.onBack():$A.eeuiAppGoDesktop()})}}},x={};var kt=l(_t,gt,vt,!1,$t,null,null,null);function $t(t){for(let a in x)this[a]=x[a]}var bt=function(){return kt.exports}(),wt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return t.show&&t.userid>0?e("transition",{attrs:{name:"mobile-notify"}},[e("div",{staticClass:"mobile-notification",class:{show:t.show},on:{click:function(s){return s.stopPropagation(),t.onClick.apply(null,arguments)},touchstart:t.onTouchstart,touchmove:t.onTouchmove}},[e("UserAvatar",{attrs:{userid:t.userid,size:40,"show-name":"","name-text":t.title}}),e("div",{staticClass:"notification-desc no-dark-content"},[t._v(t._s(t.desc))])],1)]):t._e()},yt=[];const Dt={name:"MobileNotification",data(){return{userid:0,title:"",desc:"",duration:6e3,callback:null,show:!1,timer:null,startY:0}},beforeDestroy(){this.timer&&clearTimeout(this.timer),this.show=!1},methods:{open(t){!$A.isJson(t)||(this.userid=t.userid||0,this.title=t.title||"",this.desc=t.desc||"",this.duration=typeof t.duration=="number"?t.duration:6e3,this.callback=typeof t.callback=="function"?t.callback:null,this.show=!0,this.timer&&clearTimeout(this.timer),this.duration>0&&(this.timer=setTimeout(this.close,this.duration)),$A.eeuiAppSendMessage({action:"setVibrate"}))},close(){this.show=!1},onClick(){this.close(),typeof this.callback=="function"&&this.callback()},onTouchstart(t){this.startY=t.touches[0].clientY},onTouchmove(t){this.startY>0&&this.startY-t.touches[0].clientY>10&&(this.startY=0,this.close())}}},C={};var xt=l(Dt,wt,yt,!1,Ct,null,null,null);function Ct(t){for(let a in C)this[a]=C[a]}var Tt=function(){return xt.exports}(),Lt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{value:t.visible,mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":["mobile-dialog",""],beforeClose:t.onBeforeClose,"class-name":"dialog-modal",fullscreen:""}},[t.windowPortrait&&t.dialogId>0?e("DialogWrapper",{attrs:{dialogId:t.dialogId,beforeBack:t.onBeforeClose}}):t._e()],1)},At=[];const St={name:"DialogModal",components:{DialogWrapper:V},data(){return{timer:null}},computed:{...h(["dialogId"]),visible(){return this.dialogId>0&&this.windowPortrait}},methods:{onBeforeClose(){return new Promise(t=>{this.$store.dispatch("openDialog",0)})}}},T={};var It=l(St,Lt,At,!1,jt,null,null,null);function jt(t){for(let a in T)this[a]=T[a]}var Mt=function(){return It.exports}(),Pt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{value:t.show,styles:t.styles,"mask-closable":!1,"footer-hide":!0,beforeClose:t.onBeforeClose,"class-name":"task-modal"}},[e("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskId,"open-task":t.taskData,modalMode:""}})],1)},Nt=[];const Rt={name:"TaskModal",components:{TaskDetail:U},computed:{...h(["taskId"]),...g(["taskData"]),show(){return this.taskId>0},styles(){return{width:"90%",maxWidth:this.taskData.dialog_id?"1200px":"700px"}}},methods:{onBeforeClose(){return new Promise(t=>{this.$store.dispatch("openTask",0)})},checkUpdate(){if(this.show)return this.$refs.taskDetail.checkUpdate(!0),!0}}},L={};var Et=l(Rt,Pt,Nt,!1,Bt,null,null,null);function Bt(t){for(let a in L)this[a]=L[a]}var Ot=function(){return Et.exports}(),Ut=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u4EFB\u52A1\u7EDF\u8BA1"),"mask-closable":!1},model:{value:t.show,callback:function(s){t.show=s},expression:"show"}},[e("Form",{ref:"exportTask",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BFC\u51FA\u6210\u5458")}},[e("UserSelect",{attrs:{"multiple-max":100,"avatar-name":"","show-disable":"",title:t.$L("\u8BF7\u9009\u62E9\u6210\u5458")},model:{value:t.formData.userid,callback:function(s){t.$set(t.formData,"userid",s)},expression:"formData.userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6BCF\u6B21\u6700\u591A\u9009\u62E9\u5BFC\u51FA100\u4E2A\u6210\u5458")))])],1),e("FormItem",{attrs:{label:t.$L("\u65F6\u95F4\u8303\u56F4")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.formData.time,callback:function(s){t.$set(t.formData,"time",s)},expression:"formData.time"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(s){t.formData.time=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(s){t.formData.time=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{prop:"type",label:t.$L("\u5BFC\u51FA\u65F6\u95F4\u7C7B\u578B")}},[e("RadioGroup",{model:{value:t.formData.type,callback:function(s){t.$set(t.formData,"type",s)},expression:"formData.type"}},[e("Radio",{attrs:{label:"taskTime"}},[t._v(t._s(t.$L("\u4EFB\u52A1\u65F6\u95F4")))]),e("Radio",{attrs:{label:"createdTime"}},[t._v(t._s(t.$L("\u521B\u5EFA\u65F6\u95F4")))])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},Ft=[];const zt={name:"TaskExport",components:{UserSelect:I},props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{userid:[],time:[],type:"taskTime"}}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"project/task/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},A={};var Vt=l(zt,Ut,Ft,!1,Kt,null,null,null);function Kt(t){for(let a in A)this[a]=A[a]}var Ht=function(){return Vt.exports}();const Wt=(t,a)=>!t||!a?!1:t==="String"?typeof a=="string":t==="Object"?Object.prototype.toString.call(a)==="[object Object]":t==="number"?typeof a=="number":t==="function"?Object.prototype.toString.call(a)==="[object Function]":!1,Yt=(t,a,e)=>t.findIndex(s=>s[a]===e);var n={checkData:Wt,searchArrObj:Yt};class qt{constructor(a="\u9ED8\u8BA4\u6807\u9898",e={}){this.title=a,this.options=e,this.support=!1,this.supportFn()}supportFn(){window.Notification?(this.initStatus(),this.support=!0):this.support=!1}initStatus(){this.notification=null,this.state=Notification.permission,this.msg=null,this.callBackObj={},this.notificationAll=[],this.requireInteractionTimeout=!1,this.timeout=null}initNotification(a){if(!!this.checkStatus("support")){if(!n.checkData("function",a))return console.error("initNotification\u7684\u53C2\u6570\u5FC5\u987B\u4E3A\u51FD\u6570");if(this.state==="granted")this.msg="already granted";else if(this.state==="default"){const e=s=>(this.state=s,s==="granted"?this.msg="granted":s==="default"?this.msg="close":this.msg="denied",a(this.msg));try{Notification.requestPermission().then(e)}catch{Notification.requestPermission(e)}}else this.msg="already denied";if(this.state!=="default")return a(this.msg)}}userAgreed(){if(!!this.checkStatus("userAgreed")){this.notification=new Notification(this.title,this.options),this.notificationWatch();for(const a in this.callBackObj)this.notification[a]=e=>{this.callBackObj[a](e)}}}notificationTimeoutFn(a){a&&n.checkData("number",a)?this.timeout=a:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){!n.checkData("number",this.timeout)||(this.options.timeOut&&n.checkData("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(a){const e=this.notification.timestamp;setTimeout(()=>{const s=n.searchArrObj(this.notificationAll,"timestamp",e);s!==-1&&this.notificationAll[s].close()},a)}watchClose(){const a=this.notification.timestamp;this.notification.addEventListener("close",e=>{const s=n.searchArrObj(this.notificationAll,"timestamp",a);s!==-1&&this.notificationAll.splice(s,1)})}autoClose(){const a=this.notification.timestamp;setTimeout(()=>{const e=n.searchArrObj(this.notificationAll,"timestamp",a);e!==-1&&this.notificationAll.splice(e,1)},6e3)}notificationEvent(a){if(!!this.checkStatus("support"))if(n.checkData("Object",a)){for(const e in a)if(!n.checkData("function",a[e]))return console.error("callObj\u5BF9\u8C61\u4E2D\u7684\u6BCF\u4E2Avalue\u5FC5\u987B\u4E3A\u51FD\u6570");this.callBackObj=a}else return console.error("callObj\u5FC5\u987B\u4E3A\u5BF9\u8C61")}closeAll(){for(let a of this.notificationAll.values())a.close();this.notificationAll=[]}close(){if(!this.notification)return console.warn("this.notification\u4E3Anull,\u901A\u77E5\u5C1A\u672A\u8C03\u7528/\u7528\u6237\u672A\u540C\u610F\u663E\u793A\u901A\u77E5");this.notification.close()}updateOptions(a){if(a&&n.checkData("Object",a))for(const e in a)this.options[e]=a[e];else console.warn("updateOptions\u53C2\u6570\u9519\u8BEF\uFF1Aoptions\u4E3A\u5FC5\u586B\u5BF9\u8C61")}replaceTitle(a){a&&n.checkData("String",a)?this.title=a:console.warn("replaceTitle: title(\u901A\u77E5\u6807\u9898)\u4E3A\u5FC5\u586B\u5B57\u7B26\u4E32")}replaceOptions(a){a&&n.checkData("Object",a)?this.options=a:console.warn("replaceOptions\u53C2\u6570\u9519\u8BEF\uFF1Aoptions\u4E3A\u5FC5\u586B\u5BF9\u8C61")}checkStatus(a){if(a==="support"){if(!this.support)return console.warn("\u7528\u6237\u6D4F\u89C8\u5668\u4E0D\u652F\u6301"),!1}else if(a==="userAgreed"&&(this.state!=="granted"||!this.checkStatus("support")))return!1;return!0}}var Gt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-manage",class:{"show-tabbar":t.showMobileTabbar,"not-logged":t.userId<=0}},[e("div",{staticClass:"manage-box-menu",class:{"show-mobile-menu":t.showMobileMenu}},[e("Dropdown",{staticClass:"page-manage-menu-dropdown main-menu",attrs:{trigger:"click"},on:{"on-click":t.settingRoute,"on-visible-change":t.menuVisibleChange}},[e("div",{class:["manage-box-title",t.visibleMenu?"menu-visible":""]},[e("div",{staticClass:"manage-box-avatar"},[e("UserAvatar",{attrs:{userid:t.userId,size:36}})],1),e("span",[t._v(t._s(t.userInfo.nickname))]),t.clientNewVersion?e("Badge",{staticClass:"manage-box-top-report",attrs:{dot:""}}):t._e(),e("div",{staticClass:"manage-box-arrow"},[e("Icon",{attrs:{type:"ios-arrow-up"}}),e("Icon",{attrs:{type:"ios-arrow-down"}})],1)],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t._l(t.menu,function(s){return[s.path==="taskBrowse"?e("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[e("DropdownItem",{attrs:{divided:!!s.divided}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L(s.name))+" "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t.taskBrowseLists.length>0?e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.taskBrowseLists,function(i,o){return i.id>0&&o<10?e("DropdownItem",{key:o,staticClass:"task-title",attrs:{name:i.name},nativeOn:{click:function(c){return t.openTask(i)}}},[i.flow_item_name?e("span",{class:i.flow_item_status},[t._v(t._s(i.flow_item_name))]):t._e(),e("div",{staticClass:"task-title-text"},[t._v(t._s(i.name))])]):t._e()}),1):e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{staticStyle:{color:"darkgrey"}},[t._v(t._s(t.$L("\u6682\u65E0\u6253\u5F00\u8BB0\u5F55")))])],1)],1):s.path==="team"?e("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[e("DropdownItem",{attrs:{divided:!!s.divided}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L(s.name))+" "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"allUser"}},[t._v(t._s(t.$L("\u56E2\u961F\u7BA1\u7406")))]),e("DropdownItem",{attrs:{name:"exportTask"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u4EFB\u52A1\u7EDF\u8BA1")))]),e("DropdownItem",{attrs:{name:"exportOverdueTask"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u8D85\u671F\u4EFB\u52A1")))]),e("DropdownItem",{attrs:{name:"exportApprove"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E")))]),e("DropdownItem",{attrs:{name:"exportCheckin"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E")))])],1)],1):s.visible!==!1?e("DropdownItem",{style:s.style||{},attrs:{divided:!!s.divided,name:s.path}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L(s.name))+" "),s.path==="version"?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{text:t.clientNewVersion}}):s.path==="workReport"&&t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):s.path==="approve"&&t.approveUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.approveUnreadNumber}}):t._e()],1)]):t._e()]})],2)],1),e("Scrollbar",{attrs:{"class-name":"manage-item"},on:{"on-scroll":function(s){t.operateVisible=!1}}},[e("div",{staticClass:"menu-base"},[e("ul",[e("li",{class:t.classNameRoute("dashboard"),on:{click:function(s){return t.toggleRoute("dashboard")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6FB")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u4EEA\u8868\u76D8")))]),t.dashboardTask.overdue_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"error","overflow-count":999,count:t.dashboardTask.overdue_count}}):t.dashboardTask.today_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"info","overflow-count":999,count:t.dashboardTask.today_count}}):t.dashboardTask.all_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"primary","overflow-count":999,count:t.dashboardTask.all_count}}):t._e()],1),e("li",{class:t.classNameRoute("calendar"),on:{click:function(s){return t.toggleRoute("calendar")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F5")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u65E5\u5386")))])]),e("li",{class:t.classNameRoute("messenger"),on:{click:function(s){return t.toggleRoute("messenger")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u6D88\u606F")))]),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,text:t.msgUnreadMention}})],1),e("li",{class:t.classNameRoute("file"),on:{click:function(s){return t.toggleRoute("file")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F3")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u6587\u4EF6")))])]),e("li",{class:t.classNameRoute("application"),on:{click:function(s){return t.toggleRoute("application")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE60C")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u5E94\u7528")))]),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,text:String(t.reportUnreadNumber+t.approveUnreadNumber||"")}})],1)])]),e("div",{ref:"menuProject",staticClass:"menu-project"},[e("ul",[t._l(t.projectLists,function(s,i){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:i,ref:`project_${s.id}`,refInFor:!0,class:t.classNameProject(s),attrs:{"data-id":s.id},on:{click:function(o){return t.toggleRoute("project",{projectId:s.id})}}},[e("div",{staticClass:"project-h1"},[e("em",{on:{click:function(o){return o.stopPropagation(),t.toggleOpenMenu(s.id)}}}),e("div",{staticClass:"title"},[t._v(t._s(s.name))]),s.top_at?e("div",{staticClass:"icon-top"}):t._e(),s.task_my_num-s.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(s.task_my_num-s.task_my_complete))]):t._e()]),e("div",{staticClass:"project-h2"},[e("p",[e("em",[t._v(t._s(t.$L("\u6211\u7684"))+":")]),e("span",[t._v(t._s(s.task_my_complete)+"/"+t._s(s.task_my_num))]),e("Progress",{attrs:{percent:s.task_my_percent,"stroke-width":6}})],1),e("p",[e("em",[t._v(t._s(t.$L("\u5168\u90E8"))+":")]),e("span",[t._v(t._s(s.task_complete)+"/"+t._s(s.task_num))]),e("Progress",{attrs:{percent:s.task_percent,"stroke-width":6}})],1)])])}),t.projectKeyLoading>0?e("li",{staticClass:"loading"},[e("Loading")],1):t._e()],2)])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLandscape?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(s){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(s){return t.handleTopClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.operateItem.top_at?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876\u8BE5\u9879\u76EE"))+" ")])],1)],1)],1),(t.projectSearchShow||t.projectTotal>20)&&t.windowHeight>600?e("div",{staticClass:"manage-project-search"},[e("Input",{attrs:{placeholder:t.$L(`\u5171${t.projectTotal||t.cacheProjects.length}\u4E2A\u9879\u76EE\uFF0C\u641C\u7D22...`),clearable:""},model:{value:t.projectKeyValue,callback:function(s){t.projectKeyValue=s},expression:"projectKeyValue"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.projectKeyLoading>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)])],1):t._e(),e("ButtonGroup",{staticClass:"manage-box-new-group"},[e("Button",{staticClass:"manage-box-new",attrs:{type:"primary",icon:"md-add"},on:{click:t.onAddShow}},[t._v(t._s(t.$L("\u65B0\u5EFA\u9879\u76EE")))]),e("Dropdown",{attrs:{trigger:"click"},on:{"on-click":t.onAddMenu}},[e("Button",{attrs:{type:"primary"}},[e("Icon",{attrs:{type:"ios-arrow-down"}})],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"task"}},[t._v(t._s(t.$L("\u65B0\u5EFA\u4EFB\u52A1"))+" ("+t._s(t.mateName)+"+K)")]),e("DropdownItem",{attrs:{name:"createMeeting"}},[t._v(t._s(t.$L("\u65B0\u4F1A\u8BAE"))+" ("+t._s(t.mateName)+"+J)")]),e("DropdownItem",{attrs:{name:"joinMeeting"}},[t._v(t._s(t.$L("\u52A0\u5165\u4F1A\u8BAE")))])],1)],1)],1)],1),e("div",{staticClass:"manage-box-main"},[e("keep-alive",[e("router-view",{staticClass:"manage-box-view",on:{"on-click":t.onTabbarClick}})],1)],1),e("Modal",{attrs:{title:t.$L("\u65B0\u5EFA\u9879\u76EE"),"mask-closable":!1},model:{value:t.addShow,callback:function(s){t.addShow=s},expression:"addShow"}},[e("Form",{ref:"addProject",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u9879\u76EE\u540D\u79F0")}},[e("Input",{ref:"projectName",attrs:{type:"text"},model:{value:t.addData.name,callback:function(s){t.$set(t.addData,"name",s)},expression:"addData.name"}})],1),t.addData.columns?e("FormItem",{attrs:{label:t.$L("\u4EFB\u52A1\u5217\u8868")}},[e("TagInput",{model:{value:t.addData.columns,callback:function(s){t.$set(t.addData,"columns",s)},expression:"addData.columns"}})],1):e("FormItem",{attrs:{label:t.$L("\u9879\u76EE\u6A21\u677F")}},[e("Select",{attrs:{value:0,placeholder:t.$L("\u8BF7\u9009\u62E9\u6A21\u677F")},on:{"on-change":t.selectChange}},t._l(t.columns,function(s,i){return e("Option",{key:i,attrs:{value:i}},[t._v(t._s(s.name))])}),1)],1),e("FormItem",{attrs:{prop:"flow",label:t.$L("\u5F00\u542F\u5DE5\u4F5C\u6D41")}},[e("RadioGroup",{model:{value:t.addData.flow,callback:function(s){t.$set(t.addData,"flow",s)},expression:"addData.flow"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAddProject}},[t._v(t._s(t.$L("\u6DFB\u52A0")))])],1)],1),e("Modal",{attrs:{"mask-closable":!1,styles:{width:"90%",maxWidth:"640px"},"footer-hide":""},model:{value:t.addTaskShow,callback:function(s){t.addTaskShow=s},expression:"addTaskShow"}},[e("TaskAdd",{ref:"addTask",model:{value:t.addTaskShow,callback:function(s){t.addTaskShow=s},expression:"addTaskShow"}})],1),e("TaskExport",{model:{value:t.exportTaskShow,callback:function(s){t.exportTaskShow=s},expression:"exportTaskShow"}}),e("CheckinExport",{model:{value:t.exportCheckinShow,callback:function(s){t.exportCheckinShow=s},expression:"exportCheckinShow"}}),e("ApproveExport",{model:{value:t.exportApproveShow,callback:function(s){t.exportApproveShow=s},expression:"exportApproveShow"}}),e("TaskModal",{ref:"taskModal"}),e("DialogModal",{ref:"dialogModal"}),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.workReportShow,callback:function(s){t.workReportShow=s},expression:"workReportShow"}},[t.workReportShow?e("Report",{on:{"on-read":function(s){return t.$store.dispatch("getReportUnread",1e3)}},model:{value:t.reportTabs,callback:function(s){t.reportTabs=s},expression:"reportTabs"}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1380},model:{value:t.allUserShow,callback:function(s){t.allUserShow=s},expression:"allUserShow"}},[t.allUserShow?e("TeamManagement"):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.allProjectShow,callback:function(s){t.allProjectShow=s},expression:"allProjectShow"}},[t.allProjectShow?e("ProjectManagement"):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.archivedProjectShow,callback:function(s){t.archivedProjectShow=s},expression:"archivedProjectShow"}},[t.archivedProjectShow?e("ProjectArchived"):t._e()],1),e("MeetingManager"),e("transition",{attrs:{name:"mobile-slide"}},[t.showMobileTabbar?e("MobileTabbar",{on:{"on-click":t.onTabbarClick}}):t._e()],1),e("MobileBack",{attrs:{showTabbar:t.showMobileTabbar}}),e("MobileNotification",{ref:"mobileNotification"}),t.$route.name!="manage-apps"?e("MicroApps",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{name:"okr-details",url:t.okrUrl,datas:t.okrWindow}}):t._e()],1)},Jt=[];const Xt={components:{TaskExport:Ht,CheckinExport:P,ApproveExport:K,TaskModal:Ot,DialogModal:Mt,MeetingManager:F,MobileNotification:Tt,MobileBack:bt,MobileTabbar:ct,TaskAdd:ft,Report:N,DrawerOverlay:E,ProjectManagement:st,TeamManagement:R,ProjectArchived:X,MicroApps:H},directives:{longpress:z},data(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl",addShow:!1,addData:{name:"",columns:"",flow:"open"},addRule:{name:[{required:!0,message:this.$L("\u8BF7\u586B\u5199\u9879\u76EE\u540D\u79F0\uFF01"),trigger:"change"},{type:"string",min:2,message:this.$L("\u9879\u76EE\u540D\u79F0\u81F3\u5C112\u4E2A\u5B57\uFF01"),trigger:"change"}]},addTaskShow:!1,addTaskSubscribe:null,exportTaskShow:!1,exportCheckinShow:!1,exportApproveShow:!1,dialogMsgSubscribe:null,projectKeyValue:"",projectKeyLoading:0,projectSearchShow:!1,openMenu:{},visibleMenu:!1,showMobileMenu:!1,workReportShow:!1,allUserShow:!1,allProjectShow:!1,archivedProjectShow:!1,natificationReady:!1,notificationManage:null,reportTabs:"my",operateStyles:{},operateVisible:!1,operateItem:{},needStartHome:!1}},mounted(){this.notificationInit(),this.addTaskSubscribe=d.Store.subscribe("addTask",this.onAddTask),this.dialogMsgSubscribe=d.Store.subscribe("dialogMsgPush",this.addDialogMsg),document.addEventListener("keydown",this.shortcutEvent)},activated(){this.$store.dispatch("getUserInfo").catch(t=>{}),this.$store.dispatch("getTaskPriority").catch(t=>{}),this.$store.dispatch("getReportUnread",0),this.$store.dispatch("getApproveUnread",0),this.$store.dispatch("needHome").then(t=>{this.needStartHome=!0}).catch(t=>{this.needStartHome=!1})},beforeDestroy(){this.addTaskSubscribe&&(this.addTaskSubscribe.unsubscribe(),this.addTaskSubscribe=null),this.dialogMsgSubscribe&&(this.dialogMsgSubscribe.unsubscribe(),this.dialogMsgSubscribe=null),document.removeEventListener("keydown",this.shortcutEvent)},deactivated(){this.addShow=!1},computed:{...h(["userInfo","userIsAdmin","cacheUserBasic","cacheTasks","cacheDialogs","cacheProjects","projectTotal","wsOpenNum","columnTemplate","wsMsg","clientNewVersion","cacheTaskBrowse","dialogIns","reportUnreadNumber","approveUnreadNumber","okrWindow"]),...g(["dashboardTask"]),routeName(){return this.$route.name},okrUrl(){return{}.VITE_OKR_WEB_URL||$A.apiUrl("../apps/okr")},msgUnreadMention(){let t=0,a=0;this.cacheDialogs.some(s=>{t+=$A.getDialogUnread(s,!1),a+=$A.getDialogMention(s)}),t>999&&(t="999+"),a>999&&(a="999+");const e=this.msgTodoTotal;return e?a?`@${a}\xB7${e}`:t?`${t}\xB7${e}`:e:t?a?`${t}\xB7@${a}`:String(t):a?`@${a}`:""},msgAllUnread(){let t=0;return this.cacheDialogs.some(a=>{t+=$A.getDialogNum(a)}),t},msgTodoTotal(){let t=this.cacheDialogs.reduce((a,e)=>a+(e.todo_num||0),0);return t>0?(t>99?t="99+":t===1&&(t=""),`${this.$L("\u5F85\u529E")}${t}`):null},unreadAndOverdue(){return this.userId>0?this.msgAllUnread+this.dashboardTask.overdue_count:0},menu(){const{userIsAdmin:t,needStartHome:a}=this,e=[{path:"taskBrowse",name:"\u6700\u8FD1\u6253\u5F00\u7684\u4EFB\u52A1"}];return t?e.push({path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E",divided:!0},{path:"system",name:"\u7CFB\u7EDF\u8BBE\u7F6E"},{path:"license",name:"License Key"},{path:"version",name:"\u66F4\u65B0\u7248\u672C",divided:!0,visible:!!this.clientNewVersion},{path:"allProject",name:"\u6240\u6709\u9879\u76EE",divided:!0},{path:"archivedProject",name:"\u5DF2\u5F52\u6863\u7684\u9879\u76EE"},{path:"team",name:"\u56E2\u961F\u7BA1\u7406",divided:!0}):e.push({path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E",divided:!0},{path:"version",name:"\u66F4\u65B0\u7248\u672C",divided:!0,visible:!!this.clientNewVersion},{path:"workReport",name:"\u5DE5\u4F5C\u62A5\u544A",divided:!0},{path:"archivedProject",name:"\u5DF2\u5F52\u6863\u7684\u9879\u76EE"}),a?e.push({path:"goHome",name:"\u6253\u5F00\u9996\u9875",divided:!0},{path:"clearCache",name:"\u6E05\u9664\u7F13\u5B58"},{path:"logout",name:"\u9000\u51FA\u767B\u5F55",style:{color:"#f40"}}):e.push({path:"clearCache",name:"\u6E05\u9664\u7F13\u5B58",divided:!0},{path:"logout",name:"\u9000\u51FA\u767B\u5F55",style:{color:"#f40"}}),e},columns(){const t=$A.cloneJSON(this.columnTemplate);return t.unshift({name:this.$L("\u7A7A\u767D\u6A21\u677F"),columns:[]}),t},projectLists(){const{projectKeyValue:t,cacheProjects:a}=this,e=$A.cloneJSON(a).sort((s,i)=>s.top_at||i.top_at?$A.Date(i.top_at)-$A.Date(s.top_at):i.id-s.id);return t?e.filter(s=>$A.strExists(`${s.name} ${s.desc}`,t)):e},taskBrowseLists(){const{cacheTasks:t,cacheTaskBrowse:a,userId:e}=this;return a.filter(({userid:s})=>s===e).map(({id:s})=>t.find(i=>i.id===s)||{})},showMobileTabbar(){return this.routeName==="manage-project"&&!/^\d+$/.test(this.$route.params.projectId)?!0:["manage-dashboard","manage-messenger","manage-application"].includes(this.routeName)}},watch:{$route(){this.chackPass()},userInfo(){this.chackPass()},projectKeyValue(t){t!=""&&setTimeout(()=>{this.projectKeyValue==t&&this.searchProject()},600)},wsOpenNum(t){t<=1||this.$store.dispatch("getBasicData",600)},workReportShow(t){t&&this.$store.dispatch("getReportUnread",0)},"cacheProjects.length":{handler(){this.$nextTick(t=>{const a=this.$refs.menuProject,e=$A.last($A.getObject(a,"children.0.children"));if(e){const s=e.getBoundingClientRect(),i=a.getBoundingClientRect();if(s.top>i.top+i.height){this.projectSearchShow=!0;return}}this.projectSearchShow=!1})},immediate:!0},unreadAndOverdue:{handler(t){this.$Electron&&this.$Electron.sendMessage("setDockBadge",t)},immediate:!0},wsMsg:{handler(t){const{type:a,action:e}=t;switch(a){case"report":e=="unreadUpdate"&&this.$store.dispatch("getReportUnread",1e3);break;case"approve":e=="unread"&&this.$store.dispatch("getApproveUnread",1e3);break}},deep:!0}},methods:{chackPass(){this.userInfo.changepass===1&&this.goForward({name:"manage-setting-password"})},async toggleRoute(t,a){this.showMobileMenu=!1;let e={name:"manage-"+t,params:a||{}},s=await $A.IDBInt("fileFolderId");t==="file"&&s>0&&(e.params.folderId=s),this.goForward(e)},toggleOpenMenu(t){this.$set(this.openMenu,t,!this.openMenu[t])},settingRoute(t){switch(t){case"allUser":this.allUserShow=!0;return;case"allProject":this.allProjectShow=!0;return;case"archivedProject":this.archivedProjectShow=!0;return;case"exportTask":this.exportTaskShow=!0;return;case"exportOverdueTask":this.exportOverdueTask();return;case"exportCheckin":this.exportCheckinShow=!0;return;case"exportApprove":this.exportApproveShow=!0;return;case"workReport":this.reportUnreadNumber>0&&(this.reportTabs="receive"),this.workReportShow=!0;return;case"version":d.Store.set("updateNotification",null);return;case"clearCache":$A.IDBSet("clearCache","handle").then(a=>{$A.reloadUrl()});return;case"goHome":this.needStartHome&&this.goForward("index");return;case"approve":this.menu.findIndex(a=>a.path==t)>-1&&this.goForward({name:"manage-approve"});return;case"okrManage":case"okrAnalyze":this.goForward({path:"/manage/apps/"+(t=="okrManage"?"/#/list":"/#/analysis")});return;case"logout":$A.modalConfirm({title:"\u9000\u51FA\u767B\u5F55",content:"\u4F60\u786E\u5B9A\u8981\u767B\u51FA\u7CFB\u7EDF\uFF1F",onOk:()=>{this.$store.dispatch("logout",!1)}});return}this.menu.findIndex(a=>a.path==t)>-1&&this.toggleRoute("setting-"+t)},exportOverdueTask(){$A.modalConfirm({title:"\u5BFC\u51FA\u4EFB\u52A1",content:"\u4F60\u786E\u5B9A\u8981\u5BFC\u51FA\u6240\u6709\u8D85\u671F\u4EFB\u52A1\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,a)=>{this.$store.dispatch("call",{url:"project/task/exportoverdue"}).then(({data:e})=>{t(),this.$store.dispatch("downUrl",{url:e.url})}).catch(({msg:e})=>{a(e)})})})},menuVisibleChange(t){this.visibleMenu=t},classNameRoute(t){let a=this.routeName;return(a=="manage-approve"||a=="manage-apps")&&(a="manage-application"),{active:a===`manage-${t}`}},classNameProject(t){return{active:this.routeName==="manage-project"&&this.$route.params.projectId==t.id,"open-menu":this.openMenu[t.id]===!0,operate:t.id==this.operateItem.id&&this.operateVisible}},onAddMenu(t){switch(t){case"task":this.onAddTask(0);break;case"createMeeting":d.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":d.Store.set("addMeeting",{type:"join"});break}},onAddShow(){this.$store.dispatch("getColumnTemplate").catch(()=>{}),this.addShow=!0,this.$nextTick(()=>{this.$refs.projectName.focus()})},onAddProject(){this.$refs.addProject.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"project/add",data:this.addData}).then(({data:a,msg:e})=>{$A.messageSuccess(e),this.addShow=!1,this.$refs.addProject.resetFields(),this.$store.dispatch("saveProject",a),this.toggleRoute("project",{projectId:a.id})}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng--}))})},searchProject(){setTimeout(()=>{this.projectKeyLoading++},1e3),this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue}}).finally(t=>{this.projectKeyLoading--})},selectChange(t){this.$nextTick(()=>{this.$set(this.addData,"columns",this.columns[t].columns.join(","))})},shortcutEvent(t){if(t.metaKey||t.ctrlKey)switch(t.keyCode){case 66:t.preventDefault(),this.onAddShow();break;case 74:t.preventDefault(),this.onAddMenu("createMeeting");break;case 75:case 78:t.preventDefault(),this.onAddMenu("task");break;case 83:this.$refs.taskModal.checkUpdate()&&t.preventDefault();break;case 188:t.preventDefault(),this.toggleRoute("setting");break}},onAddTask(t){this.addTaskShow=!0,this.$nextTick(a=>{let e={owner:[this.userId]};$A.isJson(t)?e=t:/^[1-9]\d*$/.test(t)&&(e.column_id=t),this.$refs.addTask.setData(e)})},openTask(t){this.$store.dispatch("openTask",t)},addDialogMsg(t){var k;if(!this.natificationReady&&!this.$isEEUiApp||this.windowActive&&t.dialog_id===((k=$A.last(this.dialogIns))==null?void 0:k.dialog_id))return;const{id:a,dialog_id:e,dialog_type:s,type:i,msg:o,userid:c}=t;if(c==this.userId)return;let u;switch(i){case"text":u=$A.getMsgTextPreview(o.text);break;case"file":u="["+this.$L(o.type=="img"?"\u56FE\u7247\u4FE1\u606F":"\u6587\u4EF6\u4FE1\u606F")+"]";break;default:return}this.__notificationId=a;const v=r=>{if(s==="group"){let p=this.cacheUserBasic.find(f=>f.userid==c);p?m(`${r} (${p.nickname})`):this.$store.dispatch("call",{url:"users/basic",data:{userid:[c]},skipAuthError:!0}).then(({data:f})=>{p=f.find(j=>j.userid==c),p&&m(`${r} (${p.nickname})`)}).catch(f=>{m(r)})}else m(r)},m=r=>{this.__notificationId===a&&(this.$isEEUiApp?this.$refs.mobileNotification.open({userid:c,title:r,desc:u,callback:()=>{this.goForward({name:"manage-messenger"}),this.$store.dispatch("openDialog",e)}}):this.$Electron?this.$Electron.sendMessage("openNotification",{icon:$A.originUrl("images/logo.png"),title:r,body:u,data:t,tag:"dialog",hasReply:!0,replyPlaceholder:this.$L("\u56DE\u590D\u6D88\u606F")}):(this.notificationManage.replaceOptions({icon:$A.originUrl("images/logo.png"),body:u,data:t,tag:"dialog"}),this.notificationManage.replaceTitle(r),this.notificationManage.userAgreed()))},_=this.cacheDialogs.find(r=>r.id==e);_?v(_.name):this.$store.dispatch("getDialogOne",e).then(({data:r})=>v(r.name)).catch(()=>{})},handleLongpress(t,a){const e=$A.getAttr(a,"data-id"),s=this.projectLists.find(i=>i.id==e);!s||(this.operateVisible=!1,this.operateItem=$A.isJson(s)?s:{},this.$nextTick(()=>{const i=a.getBoundingClientRect(),o=this.$refs.menuProject.getBoundingClientRect();this.operateStyles={left:`${t.clientX-o.left}px`,top:`${i.top+this.windowScrollY}px`,height:i.height+"px"},this.operateVisible=!0}))},handleTopClick(){this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then(({data:t})=>{this.$store.dispatch("saveProject",t),this.$nextTick(()=>{const a=this.$refs.menuProject.querySelector(".active");a&&$A.scrollIntoViewIfNeeded(a)})}).catch(({msg:t})=>{$A.modalError(t)})},onTabbarClick(t){switch(t){case"addTask":this.onAddTask(0);break;case"addProject":this.onAddShow();break;case"allUser":case"workReport":this.settingRoute(t);break}},notificationInit(){this.notificationManage=new qt(this.$L("\u6253\u5F00\u901A\u77E5\u6210\u529F")),this.notificationManage.support&&(this.notificationManage.notificationEvent({onclick:({target:t})=>{console.log("[Notification] A Click",t),this.notificationManage.close(),this.notificationClick(t),window.focus()}}),this.notificationPermission()),this.$Electron&&(this.$Electron.registerMsgListener("clickNotification",t=>{console.log("[Notification] B Click",t),this.$Electron.sendMessage("mainWindowActive"),this.notificationClick(t)}),this.$Electron.registerMsgListener("replyNotification",t=>{console.log("[Notification] B Reply",t),this.notificationReply(t)}))},notificationPermission(){const t=a=>{switch(a){case"already granted":case"granted":return this.natificationReady=!0;case"close":return this.notificationManage.initNotification(t);case"denied":case"already denied":console.log(a==="denied"?"\u60A8\u521A\u521A\u62D2\u7EDD\u663E\u793A\u901A\u77E5 \u8BF7\u5728\u8BBE\u7F6E\u4E2D\u66F4\u6539\u8BBE\u7F6E":"\u60A8\u66FE\u7EA7\u62D2\u7EDD\u663E\u793A\u901A\u77E5 \u8BF7\u5728\u8BBE\u7F6E\u4E2D\u66F4\u6539\u8BBE\u7F6E");break}};this.notificationManage.initNotification(t)},notificationClick(t){const{tag:a,data:e}=t;if(a=="dialog"){if(!$A.isJson(e))return;this.goForward({name:"manage-messenger"}),this.$nextTick(s=>{this.$store.dispatch("openDialog",e.dialog_id)})}},notificationReply(t){const{tag:a,data:e,reply:s}=t;a=="dialog"&&s&&this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:e.dialog_id,text:s},method:"post"}).then(({data:i})=>{this.$store.dispatch("saveDialogMsg",i),this.$store.dispatch("increaseTaskMsgNum",i),this.$store.dispatch("increaseMsgReplyNum",i),this.$store.dispatch("updateDialogLastMsg",i)}).catch(({msg:i})=>{$A.modalError(i)})}}},S={};var Qt=l(Xt,Gt,Jt,!1,Zt,null,null,null);function Zt(t){for(let a in S)this[a]=S[a]}var _e=function(){return Qt.exports}();export{_e as default}; diff --git a/public/js/build/manage.d657f726.js b/public/js/build/manage.d657f726.js new file mode 100644 index 000000000..91723ded2 --- /dev/null +++ b/public/js/build/manage.d657f726.js @@ -0,0 +1 @@ +import{n as l,N as M,m as h,b as g,a as d,c as $}from"./app.6910ca56.js";import{C as P,R as N,T as R}from"./CheckinExport.566afd3f.js";import{D as E}from"./index.8984a77c.js";import{U as I}from"./UserSelect.1938cd94.js";import{T as B,a as O,b as U}from"./TaskDetail.3379e7b2.js";import{M as F}from"./MeetingManager.bf6d77cf.js";import{l as z}from"./longpress.43ca7fd9.js";import{D as V}from"./DialogWrapper.54a1354f.js";import{A as K}from"./ApproveExport.7b859f1c.js";import{M as H}from"./MicroApps.10c19f02.js";import"./tip.6872e3c6.js";import"./ReportEdit.cc7cc71b.js";import"./ReportDetail.d9bb9dfa.js";import"./ProjectLog.55720685.js";import"./TaskMenu.0454bb90.js";import"./TEditor.8daabc3e.js";import"./ImgUpload.8863e78d.js";import"./details.97854344.js";var W=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"project-archived"},[e("div",{staticClass:"archived-title"},[t._v(" "+t._s(t.$L("\u5F52\u6863\u7684\u9879\u76EE"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u540D"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(s){t.$set(t.keys,"name",s)},expression:"keys.name"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(s){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},Y=[];const q={name:"ProjectArchived",data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:a,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",a.id)])},{title:this.$L("\u9879\u76EE\u540D\u79F0"),key:"name",minWidth:200,render:(t,{row:a})=>t("AutoTip",a.name)},{title:this.$L("\u5F52\u6863\u65F6\u95F4"),key:"archived_at",width:168},{title:this.$L("\u5F52\u6863\u4EBA\u5458"),key:"archived_userid",minWidth:80,render:(t,{row:a})=>a.archived_userid?t("UserAvatar",{props:{userid:a.archived_userid,size:24,showName:!0}}):t("Tag",this.$L("\u7CFB\u7EDF\u81EA\u52A8"))},{title:this.$L("\u8D1F\u8D23\u4EBA"),minWidth:80,render:(t,{row:a})=>t("UserAvatar",{props:{showName:!0,size:22,userid:a.owner_userid}})},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,a)=>{const e=[t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(a.row)}}},this.$L("\u8FD8\u539F")),t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u9879\u76EE\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{marginLeft:"8px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":()=>{this.delete(a.row)}}},this.$L("\u5220\u9664"))];return t("TableAction",{props:{column:a.column}},e)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,archived:"yes",page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:t})=>{this.page=t.current_page,this.total=t.total,this.list=t.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(t=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},recovery(t){this.list=this.list.filter(({id:a})=>a!=t.id),this.loadIng++,this.$store.dispatch("call",{url:"project/archived",data:{project_id:t.id,type:"recovery"}}).then(()=>{this.getLists(),this.$store.dispatch("getProjectOne",t.id).catch(()=>{})}).catch(({msg:a})=>{$A.modalError(a),this.getLists()}).finally(a=>{this.loadIng--})},delete(t){this.list=this.list.filter(({id:a})=>a!=t.id),this.loadIng++,this.$store.dispatch("removeProject",t.id).then(({msg:a})=>{$A.messageSuccess(a),this.getLists()}).catch(({msg:a})=>{$A.modalError(a),this.getLists()}).finally(a=>{this.loadIng--})}}},b={};var G=l(q,W,Y,!1,J,null,null,null);function J(t){for(let a in b)this[a]=b[a]}var X=function(){return G.exports}(),Q=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"project-management"},[e("div",{staticClass:"management-title"},[t._v(" "+t._s(t.$L("\u6240\u6709\u9879\u76EE"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u540D"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(s){t.$set(t.keys,"name",s)},expression:"keys.name"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u7C7B\u578B"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u56E2\u961F\u9879\u76EE")},model:{value:t.keys.type,callback:function(s){t.$set(t.keys,"type",s)},expression:"keys.type"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u56E2\u961F\u9879\u76EE")))]),e("Option",{attrs:{value:"personal"}},[t._v(t._s(t.$L("\u4E2A\u4EBA\u9879\u76EE")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8\u9879\u76EE")))])],1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u9879\u76EE\u72B6\u6001"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u672A\u5F52\u6863")},model:{value:t.keys.status,callback:function(s){t.$set(t.keys,"status",s)},expression:"keys.status"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u672A\u5F52\u6863")))]),e("Option",{attrs:{value:"archived"}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8")))])],1)],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(s){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},Z=[];const tt={name:"ProjectManagement",data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:a,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",a.id)])},{title:this.$L("\u9879\u76EE\u540D\u79F0"),key:"name",minWidth:100,render:(t,{row:a})=>{const e=[t("AutoTip",a.name)];return a.archived_at&&e.push(t("Tag",{props:{color:"error"}},this.$L("\u5DF2\u5F52\u6863"))),t("div",{class:"project-name"},e)}},{title:this.$L("\u9879\u76EE\u8FDB\u5EA6"),minWidth:100,render:(t,{row:a})=>{const e=[t("AutoTip",a.task_complete+"/"+a.task_num),t("Progress",{props:{percent:a.task_percent,strokeWidth:5}})];return t("div",{class:"project-percent"},e)}},{title:this.$L("\u8D1F\u8D23\u4EBA"),minWidth:80,render:(t,{row:a})=>t("UserAvatar",{props:{showName:!0,size:22,userid:a.owner_userid}})},{title:this.$L("\u521B\u5EFA\u4EBA"),minWidth:80,render:(t,{row:a})=>t("UserAvatar",{props:{showName:!0,size:22,userid:a.userid}})},{title:this.$L("\u521B\u5EFA\u65F6\u95F4"),key:"created_at",width:168}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){this.getLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){let t="team";this.keys.type=="all"?t="all":this.keys.type=="personal"&&(t="personal");let a="no";this.keys.status=="all"?a="all":this.keys.status=="archived"&&(a="yes"),this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,all:1,archived:a,type:t,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()}}},w={};var et=l(tt,Q,Z,!1,at,null,null,null);function at(t){for(let a in w)this[a]=w[a]}var st=function(){return et.exports}(),it=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mobile-tabbar"},[t.windowPortrait?e("NetworkException",{attrs:{type:"alert"}}):t._e(),e("ul",{staticClass:"tabbar-box"},t._l(t.navList,function(s){return e("li",{class:{active:t.activeName===s.name},on:{click:function(i){return t.toggleRoute(s.name)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(s.icon)}}),e("div",{staticClass:"tabbar-title"},[t._v(t._s(t.$L(s.label)))]),s.name==="dashboard"?[t.dashboardTask.overdue_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"error","overflow-count":999,count:t.dashboardTask.overdue_count}}):t.dashboardTask.today_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"info","overflow-count":999,count:t.dashboardTask.today_count}}):t.dashboardTask.all_count>0?e("Badge",{staticClass:"tabbar-badge",attrs:{type:"primary","overflow-count":999,count:t.dashboardTask.all_count}}):t._e()]:s.name==="dialog"?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,text:t.msgUnreadMention}})]:s.name==="application"?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber+t.approveUnreadNumber}})]:t._e()],2)}),0)],1)},ot=[];const rt={name:"MobileTabbar",components:{NetworkException:M},data(){return{navList:[{icon:"",name:"dashboard",label:"\u4EEA\u8868\u76D8"},{icon:"",name:"project",label:"\u9879\u76EE"},{icon:"",name:"dialog",label:"\u6D88\u606F"},{icon:"",name:"contacts",label:"\u901A\u8BAF\u5F55"},{icon:"",name:"application",label:"\u5E94\u7528"}]}},computed:{...h(["cacheDialogs","reportUnreadNumber","approveUnreadNumber"]),...g(["dashboardTask"]),routeName(){return this.$route.name},msgUnreadMention(){let t=0,a=0;this.cacheDialogs.some(s=>{t+=$A.getDialogUnread(s,!1),a+=$A.getDialogMention(s)}),t>999&&(t="999+"),a>999&&(a="999+");const e=this.msgTodoTotal;return e?a?`@${a}\xB7${e}`:t?`${t}\xB7${e}`:e:t?a?`${t}\xB7@${a}`:String(t):a?`@${a}`:""},msgAllUnread(){let t=0;return this.cacheDialogs.some(a=>{t+=$A.getDialogNum(a)}),t},msgTodoTotal(){let t=this.cacheDialogs.reduce((a,e)=>a+(e.todo_num||0),0);return t>0?(t>999?t="999+":t===1&&(t=""),`${this.$L("\u5F85\u529E")}${t}`):null},unreadAndOverdue(){return this.userId>0?this.msgAllUnread+this.dashboardTask.overdue_count:0},activeName(){return["manage-calendar","manage-file","manage-setting","manage-application","manage-approve","manage-apps"].includes(this.routeName)?"application":this.routeName==="manage-dashboard"?"dashboard":this.routeName==="manage-project"&&!/^\d+$/.test(this.$route.params.projectId)?"project":this.routeName==="manage-messenger"?this.$route.params.dialogAction==="contacts"?"contacts":"dialog":""}},watch:{windowActive(t){t||$A.eeuiAppSendMessage({action:"setBdageNotify",bdage:this.unreadAndOverdue})}},methods:{toggleRoute(t){this.$emit("on-click",t);let a;switch(t){case"project":a={name:"manage-project",params:{projectId:"all"}};break;case"dialog":a={name:"manage-messenger",params:{dialogAction:"dialog"}},this.routeName==="manage-messenger"&&d.Store.set("clickAgainDialog",!0);break;case"contacts":a={name:"manage-messenger",params:{dialogAction:"contacts"}};break;default:a={name:"manage-"+t};break}this.goForward(a)}}},y={};var nt=l(rt,it,ot,!1,lt,null,null,null);function lt(t){for(let a in y)this[a]=y[a]}var ct=function(){return nt.exports}(),dt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"task-add"},[e("div",{staticClass:"head",class:{empty:t.addData.cascader.length==0,visible:t.cascaderShow}},[e("Cascader",{attrs:{data:t.cascaderData,clearable:!1,placeholder:t.$L("\u8BF7\u9009\u62E9\u9879\u76EE"),"load-data":t.cascaderLoadData,filterable:""},on:{"on-change":t.cascaderChange,"on-input-change":t.cascaderInputChange,"on-visible-change":function(s){t.cascaderShow=!t.cascaderShow}},model:{value:t.addData.cascader,callback:function(s){t.$set(t.addData,"cascader",s)},expression:"addData.cascader"}})],1),e("div",{staticClass:"task-add-form"},[e("div",{staticClass:"title"},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,placeholder:t.$L("\u4EFB\u52A1\u63CF\u8FF0"),enterkeyhint:"done"},on:{"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(s){t.$set(t.addData,"name",s)},expression:"addData.name"}})],1),e("TEditorTask",{staticClass:"desc",attrs:{placeholder:t.$L(t.windowLandscape?"\u8BE6\u7EC6\u63CF\u8FF0\uFF0C\u9009\u586B...\uFF08\u70B9\u51FB\u53F3\u952E\u4F7F\u7528\u5DE5\u5177\u680F\uFF09":"\u8BE6\u7EC6\u63CF\u8FF0\uFF0C\u9009\u586B..."),placeholderFull:t.$L("\u8BE6\u7EC6\u63CF\u8FF0...")},model:{value:t.addData.content,callback:function(s){t.$set(t.addData,"content",s)},expression:"addData.content"}}),e("div",{staticClass:"advanced-option",class:{"advanced-open":t.advanced}},[e("Button",{on:{click:function(s){t.advanced=!t.advanced}}},[t._v(t._s(t.$L("\u9AD8\u7EA7\u9009\u9879")))]),e("ul",{staticClass:"advanced-priority"},t._l(t.taskPriority,function(s,i){return e("li",{key:i},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.taskPriorityContent(s)}},[e("i",{staticClass:"taskfont",style:{color:s.color},domProps:{innerHTML:t._s(t.addData.p_name==s.name?"":"")},on:{click:function(o){return t.choosePriority(s)}}})])],1)}),0),t.taskDays>0?e("DatePicker",{attrs:{open:t.taskTimeOpen,options:t.timeOptions,placeholder:t.$L("\u9009\u62E9\u8BA1\u5212\u8303\u56F4"),format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom"},on:{"on-change":function(s){return t.taskTimeChange(t.addData)},"on-open-change":t.taskTimeOpenChange},model:{value:t.addData.times,callback:function(s){t.$set(t.addData,"times",s)},expression:"addData.times"}},[e("div",{staticClass:"advanced-time",on:{click:function(s){return t.taskTimeOpenChange(!t.taskTimeOpen)}}},[e("Icon",{attrs:{type:"ios-clock-outline"}}),e("em",{style:t.addData.p_color?{backgroundColor:t.addData.p_color}:{},attrs:{type:"primary"}},[t._v(t._s(t.taskDays))])],1)]):t._e()],1)],1),t.advanced?e("Form",{staticClass:"task-add-advanced",attrs:{"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u8BA1\u5212\u65F6\u95F4")}},[e("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("\u9009\u62E9\u8BA1\u5212\u8303\u56F4"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(s){return t.taskTimeChange(t.addData)}},model:{value:t.addData.times,callback:function(s){t.$set(t.addData,"times",s)},expression:"addData.times"}})],1),e("FormItem",{attrs:{label:t.$L("\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"multiple-max":10,title:t.$L("\u9009\u62E9\u4EFB\u52A1\u8D1F\u8D23\u4EBA"),"project-id":t.addData.project_id,"avatar-size":24,border:""},model:{value:t.addData.owner,callback:function(s){t.$set(t.addData,"owner",s)},expression:"addData.owner"}})],1),e("FormItem",{attrs:{label:t.$L("\u534F\u52A9\u4EBA\u5458")}},[e("UserSelect",{attrs:{"multiple-max":10,title:t.$L("\u9009\u62E9\u4EFB\u52A1\u534F\u52A9\u4EBA\u5458"),"project-id":t.addData.project_id,"disabled-choice":t.addData.owner,"avatar-size":24,border:""},model:{value:t.addData.assist,callback:function(s){t.$set(t.addData,"assist",s)},expression:"addData.assist"}})],1),e("FormItem",[e("div",{attrs:{slot:"label"},slot:"label"},[e("EDropdown",{ref:"eDropdownRef",attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropVisible}},[e("span",{staticClass:"visibility-text"},[t._v(t._s(t.$L("\u53EF\u89C1\u6027"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE740")])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:1}},[e("div",{staticClass:"task-menu-icon"},[t.addData.visibility_appoint==1?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u9879\u76EE\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:2}},[e("div",{staticClass:"task-menu-icon"},[t.addData.visibility_appoint==2?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458"))+" ")],1)]),e("EDropdownItem",{attrs:{command:3}},[e("div",{staticClass:"task-menu-icon"},[t.addData.visibility_appoint==3?e("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):e("Icon",{staticClass:"uncomplete",attrs:{type:"md-radio-button-off"}}),t._v(" "+t._s(t.$L("\u6307\u5B9A\u6210\u5458"))+" ")],1)])],1)],1)],1),t.addData.visibility_appoint<3?e("div",{staticClass:"ivu-input task-add-visibility",on:{click:t.showCisibleDropdown}},[t.addData.visibility_appoint==1?e("span",[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.addData.visibility_appoint==2?e("span",[t._v(t._s(t.$L("\u4EFB\u52A1\u4EBA\u5458\u53EF\u89C1")))]):t._e()]):e("UserSelect",{ref:"visibleUserSelectRef",attrs:{"avatar-size":24,title:t.$L("\u9009\u62E9\u6307\u5B9A\u4EBA\u5458"),"project-id":t.addData.project_id,border:""},on:{"on-show-change":t.visibleUserSelectShowChange},model:{value:t.addData.visibility_appointor,callback:function(s){t.$set(t.addData,"visibility_appointor",s)},expression:"addData.visibility_appointor"}})],1),e("div",{staticClass:"subtasks"},[t.addData.subtasks.length>0?e("div",{staticClass:"sublist"},[e("Row",[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u4EFB\u52A1\u63CF\u8FF0")))]),e("Col",{attrs:{span:"8"}},[t._v(t._s(t.$L("\u8BA1\u5212\u65F6\u95F4")))]),e("Col",{attrs:{span:"4"}},[t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA")))])],1),t._l(t.addData.subtasks,function(s,i){return e("Row",{key:i},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:255,clearable:""},on:{"on-clear":function(o){return t.addData.subtasks.splice(i,1)}},model:{value:s.name,callback:function(o){t.$set(s,"name",o)},expression:"item.name"}})],1),e("Col",{attrs:{span:"8",title:t.formatDate(s.times)}},[e("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("\u9009\u62E9\u65F6\u95F4"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(o){return t.taskTimeChange(s)}},model:{value:s.times,callback:function(o){t.$set(s,"times",o)},expression:"item.times"}})],1),e("Col",{attrs:{span:"4"}},[e("UserSelect",{attrs:{"multiple-max":1,title:t.$L("\u9009\u62E9\u8D1F\u8D23\u4EBA"),"project-id":t.addData.project_id,"avatar-size":24,border:""},model:{value:s.owner,callback:function(o){t.$set(s,"owner",o)},expression:"item.owner"}})],1)],1)})],2):t._e(),e("Input",{class:["enter-input",t.subName==""?"empty":""],attrs:{type:"text",placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1")},on:{"on-enter":t.addSubTask},model:{value:t.subName,callback:function(s){t.subName=s},expression:"subName"}})],1)],1):t._e(),e("div",{staticClass:"ivu-modal-footer"},[e("div",{staticClass:"adaption"},[e("Button",{attrs:{type:"default"},on:{click:t.close}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("ButtonGroup",{staticClass:"page-manage-add-task-button-group"},[e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u6DFB\u52A0\u4EFB\u52A1")))]),e("Dropdown",{attrs:{transfer:""},on:{"on-click":function(s){return t.onAdd(!0)}}},[e("Button",{attrs:{type:"primary"}},[e("Icon",{attrs:{type:"ios-arrow-down"}})],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{disabled:t.loadIng>0}},[t._v(t._s(t.$L("\u63D0\u4EA4\u7EE7\u7EED\u6DFB\u52A0")))])],1)],1)],1)],1)]),e("TaskExistTips",{ref:"taskExistTipsRef",on:{onAdd:function(s){return t.onAdd(t.again,!0)}}})],1)},ht=[];const ut={name:"TaskAdd",components:{TEditorTask:B,UserSelect:I,TaskExistTips:O},props:{value:{type:Boolean,default:!1}},data(){return{addData:{cascader:[],name:"",content:"",owner:[],assist:[],project_id:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:"",visibility_appoint:1,visibility_appointor:[]},cascaderShow:!1,cascaderData:[],cascaderValue:"",cascaderLoading:0,cascaderAlready:[],advanced:!1,subName:"",taskTimeOpen:!1,timeOptions:{shortcuts:$A.timeOptionShortcuts()},loadIng:0,isMounted:!1,beforeClose:[],again:!1}},async mounted(){this.initCascaderData(),await this.initProjectData(),this.$nextTick(()=>this.$refs.input.focus()),this.isMounted=!0},beforeDestroy(){this.beforeClose.some(t=>{typeof t=="function"&&t()}),this.beforeClose=[]},computed:{...h(["cacheProjects","projectId","cacheColumns","taskPriority"]),taskDays(){const{times:t}=this.addData;let a=$A.date2string(t,"Y-m-d H:i");if(a[0]&&a[1]){let e=Math.ceil(($A.Date(a[1],!0)-$A.Date(a[0],!0))/86400);if(e>0)return e}return 0}},watch:{"addData.owner"(t){this.addData.assist=this.addData.assist.filter(a=>t.indexOf(a)===-1),this.addData.assist.length===0&&t.indexOf(this.userId)===-1&&(this.addData.assist=[this.userId])},"addData.project_id"(t){t>0&&$A.IDBSave("cacheAddTaskProjectId",t)},"addData.column_id"(t){t>0&&$A.IDBSave("cacheAddTaskColumnId",t);const{project_id:a}=this.addData;a&&t?this.$set(this.addData,"cascader",[a,t]):this.$set(this.addData,"cascader",[])}},methods:{initCascaderData(){const t=$A.cloneJSON(this.cacheProjects).sort((a,e)=>a.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(a.top_at):e.id-a.id);this.cascaderData=t.map(a=>{const e=this.cacheColumns.filter(({project_id:i})=>i==a.id).map(i=>({value:i.id,label:i.name})),s={value:a.id,label:a.name,children:e};return e.length==0&&(s.loading=!1),s})},async initProjectData(){let t=await $A.IDBInt("cacheAddTaskProjectId"),a=this.cacheProjects.find(({id:e})=>e==this.projectId)||this.cacheProjects.find(({id:e})=>e==t)||this.cacheProjects.find(({id:e})=>e>0);if(a){let e=await $A.IDBInt("cacheAddTaskColumnId"),s=this.cacheColumns.find(({project_id:i,id:o})=>i==a.id&&o==e)||this.cacheColumns.find(({project_id:i})=>i==a.id);s?(this.addData.project_id=s.project_id,this.addData.column_id=s.id):this.$store.dispatch("getColumns",a.id).then(()=>{s=this.cacheColumns.find(({project_id:i,id:o})=>i==a.id&&o==e)||this.cacheColumns.find(({project_id:i})=>i==a.id),s&&(this.addData.project_id=s.project_id,this.addData.column_id=s.id)}).catch(()=>{})}this.taskPriority.length>0&&await this.choosePriority(this.taskPriority[0])},async taskTimeChange(t){const a=$A.date2string(t.times,"Y-m-d H:i");$A.rightExists(a[0],"00:00")&&$A.rightExists(a[1],"00:00")&&this.$set(t,"times",await this.$store.dispatch("taskDefaultTime",a))},taskTimeOpenChange(t){this.taskTimeOpen=t},formatDate(t){return t?$A.date2string(t):null},onKeydown(t){if(t.keyCode===13){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},addSubTask(){this.subName.trim()!==""&&(this.addData.subtasks.push({name:this.subName.trim(),owner:[this.userId],times:[]}),this.subName="")},taskPriorityContent(t){const a=$A.runNum(t.days);return a<=0?t.name+" ("+this.$L("\u65E0\u65F6\u95F4\u9650\u5236")+")":t.name+" ("+a+this.$L("\u5929")+")"},async choosePriority(t){const a=new Date,e=$A.runNum(t.days);if(e>0){const s=new Date(new Date().setDate(a.getDate()+e));this.$set(this.addData,"times",await this.$store.dispatch("taskDefaultTime",$A.date2string([a,s])))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color)},cascaderLoadData(t,a){t.loading=!0,this.$store.dispatch("getColumns",t.value).then(e=>{t.children=e.map(s=>({value:s.id,label:s.name})),t.loading=!1,a()}).catch(()=>{t.loading=!1,a()})},cascaderChange(t){t[1]&&(this.$set(this.addData,"project_id",t[0]),this.$set(this.addData,"column_id",t[1]))},cascaderInputChange(t){this.cascaderValue=t||"",this.cascaderAlready[this.cascaderValue]!==!0&&(this.cascaderAlready[this.cascaderValue]=!0,setTimeout(()=>{this.cascaderLoading++},1e3),this.$store.dispatch("getProjects",{keys:{name:this.cascaderValue},getcolumn:"yes"}).then(()=>{this.cascaderLoading--,this.initCascaderData()}).catch(()=>{this.cascaderLoading--}))},setData(t){if(!this.isMounted){this.__setData&&clearTimeout(this.__setData),this.__setData=setTimeout(a=>this.setData(t),10);return}typeof t.beforeClose!="undefined"&&(this.beforeClose.push(t.beforeClose),delete t.beforeClose),this.addData=Object.assign({},this.addData,t)},async onAdd(t,a=!1){if(!this.addData.name){$A.messageError("\u4EFB\u52A1\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}if(this.loadIng++,!a&&this.addData.owner.length>0){this.$refs.taskExistTipsRef.isExistTask({userids:this.addData.owner,timerange:this.addData.times}).then(e=>{e?(this.loadIng--,this.again=t):this.onAdd(t,!0)});return}this.$store.dispatch("taskAdd",this.addData).then(({msg:e})=>{this.loadIng--,$A.messageSuccess(e),t===!0?(this.addData=Object.assign({},this.addData,{name:"",content:"",subtasks:[]}),this.$refs.input.focus()):(this.addData={cascader:[],name:"",content:"",owner:[],assist:[],column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""},this.close())}).catch(({msg:e})=>{this.loadIng--,$A.modalError(e)})},close(){this.$emit("input",!this.value)},showCisibleDropdown(){this.$refs.eDropdownRef.show()},visibleUserSelectShowChange(t){if(!t&&(this.addData.visibility_appointor.length==0||!this.addData.visibility_appointor[0])){let a=this.addData.old_visibility_appoint;this.addData.visibility_appoint=a>2?1:a||1,this.addData.visibility_appoint<3}},dropVisible(t){switch(t){case 1:case 2:this.addData.visibility_appoint=t;break;case 3:this.addData.old_visibility_appoint=this.addData.visibility_appoint,this.addData.visibility_appoint=t,this.$nextTick(()=>{this.$refs.visibleUserSelectRef.onSelection()});break}}}},D={};var pt=l(ut,dt,ht,!1,mt,null,null,null);function mt(t){for(let a in D)this[a]=D[a]}var ft=function(){return pt.exports}(),gt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mobile-back"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.windowScrollY>0,expression:"windowScrollY > 0"}],ref:"bar",staticClass:"back-bar"}),t.show?e("div",{staticClass:"back-semicircle",style:t.style}):t._e()])},vt=[];const _t={name:"MobileBack",props:{showTabbar:{type:Boolean,default:!1}},data(){return{show:!1,x:0,y:0}},created(){this.appAndroidEvents()},mounted(){this.$refs.bar.addEventListener("touchmove",this.barListener),document.addEventListener("touchstart",this.touchstart),document.addEventListener("touchmove",this.touchmove),document.addEventListener("touchend",this.touchend)},beforeDestroy(){this.$refs.bar.removeEventListener("touchmove",this.barListener),document.removeEventListener("touchstart",this.touchstart),document.removeEventListener("touchmove",this.touchmove),document.removeEventListener("touchend",this.touchend)},computed:{...h(["fileLists","messengerSearchKey"]),style(){const a=Math.max(135,this.y)+this.windowScrollY,e=this.windowHeight-135;return{top:Math.min(a,e)+"px",left:this.x>20?0:"-50px"}},routeName(){return this.$route.name},fileFolderId(){const{folderId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)}},watch:{show(t){t?document.body.classList.add("touch-back"):document.body.classList.remove("touch-back"),this.$store.state.touchBackInProgress=t}},methods:{getXY(t){let a=t.touches[0];this.x=a.clientX,this.y=a.clientY},barListener(t){t.preventDefault()},touchstart(t){this.getXY(t),this.show=this.canBack()&&this.x<20},touchmove(t){this.show&&this.getXY(t)},touchend(){this.x>90&&this.show&&this.onBack(),this.x=0,this.show=!1},canBack(){if(!this.showTabbar||this.$Modal.visibles().length>0||this.fileFolderId>0)return!0;if(this.routeName==="manage-messenger"){if(this.$route.params.dialogAction==="contacts"){if(this.messengerSearchKey.contacts)return!0}else if(this.messengerSearchKey.dialog)return!0}let t=!1;return $.setGlobalData({type:"modalVisible",callback:(a,e)=>{e&&(t=!0)}}),!!t},onBack(){let t=!1;if($.setGlobalData({type:"route",action:"back",route:this.$route,callback:(a,e)=>{e&&(t=!0)}}),!t&&!this.$Modal.removeLast()){if(this.routeName==="manage-file"){if(this.fileFolderId>0){const a=this.fileLists.find(({id:e,permission:s})=>e==this.fileFolderId&&s>-1);if(a){const e=this.fileLists.find(({id:s,permission:i})=>s==a.pid&&i>-1);if(e){this.goForward({name:"manage-file",params:{folderId:e.id,fileId:null}});return}}this.goForward({name:"manage-file"});return}this.goForward({name:"manage-application"},!0);return}if(this.routeName==="manage-messenger"){if(this.$route.params.dialogAction==="contacts"){if(this.messengerSearchKey.contacts){this.$store.state.messengerSearchKey.contacts="";return}}else if(this.messengerSearchKey.dialog){this.$store.state.messengerSearchKey.dialog="";return}}this.goBack()}},appAndroidEvents(){this.$isEEUiApp&&$A.isAndroid()&&$A.eeuiAppSetPageBackPressed({pageName:"firstPage"},t=>{this.canBack()?this.onBack():$A.eeuiAppGoDesktop()})}}},x={};var kt=l(_t,gt,vt,!1,$t,null,null,null);function $t(t){for(let a in x)this[a]=x[a]}var bt=function(){return kt.exports}(),wt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return t.show&&t.userid>0?e("transition",{attrs:{name:"mobile-notify"}},[e("div",{staticClass:"mobile-notification",class:{show:t.show},on:{click:function(s){return s.stopPropagation(),t.onClick.apply(null,arguments)},touchstart:t.onTouchstart,touchmove:t.onTouchmove}},[e("UserAvatar",{attrs:{userid:t.userid,size:40,"show-name":"","name-text":t.title}}),e("div",{staticClass:"notification-desc no-dark-content"},[t._v(t._s(t.desc))])],1)]):t._e()},yt=[];const Dt={name:"MobileNotification",data(){return{userid:0,title:"",desc:"",duration:6e3,callback:null,show:!1,timer:null,startY:0}},beforeDestroy(){this.timer&&clearTimeout(this.timer),this.show=!1},methods:{open(t){!$A.isJson(t)||(this.userid=t.userid||0,this.title=t.title||"",this.desc=t.desc||"",this.duration=typeof t.duration=="number"?t.duration:6e3,this.callback=typeof t.callback=="function"?t.callback:null,this.show=!0,this.timer&&clearTimeout(this.timer),this.duration>0&&(this.timer=setTimeout(this.close,this.duration)),$A.eeuiAppSendMessage({action:"setVibrate"}))},close(){this.show=!1},onClick(){this.close(),typeof this.callback=="function"&&this.callback()},onTouchstart(t){this.startY=t.touches[0].clientY},onTouchmove(t){this.startY>0&&this.startY-t.touches[0].clientY>10&&(this.startY=0,this.close())}}},C={};var xt=l(Dt,wt,yt,!1,Ct,null,null,null);function Ct(t){for(let a in C)this[a]=C[a]}var Tt=function(){return xt.exports}(),Lt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{value:t.visible,mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":["mobile-dialog",""],beforeClose:t.onBeforeClose,"class-name":"dialog-modal",fullscreen:""}},[t.windowPortrait&&t.dialogId>0?e("DialogWrapper",{attrs:{dialogId:t.dialogId,beforeBack:t.onBeforeClose}}):t._e()],1)},At=[];const St={name:"DialogModal",components:{DialogWrapper:V},data(){return{timer:null}},computed:{...h(["dialogId"]),visible(){return this.dialogId>0&&this.windowPortrait}},methods:{onBeforeClose(){return new Promise(t=>{this.$store.dispatch("openDialog",0)})}}},T={};var It=l(St,Lt,At,!1,jt,null,null,null);function jt(t){for(let a in T)this[a]=T[a]}var Mt=function(){return It.exports}(),Pt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{value:t.show,styles:t.styles,"mask-closable":!1,"footer-hide":!0,beforeClose:t.onBeforeClose,"class-name":"task-modal"}},[e("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskId,"open-task":t.taskData,modalMode:""}})],1)},Nt=[];const Rt={name:"TaskModal",components:{TaskDetail:U},computed:{...h(["taskId"]),...g(["taskData"]),show(){return this.taskId>0},styles(){return{width:"90%",maxWidth:this.taskData.dialog_id?"1200px":"700px"}}},methods:{onBeforeClose(){return new Promise(t=>{this.$store.dispatch("openTask",0)})},checkUpdate(){if(this.show)return this.$refs.taskDetail.checkUpdate(!0),!0}}},L={};var Et=l(Rt,Pt,Nt,!1,Bt,null,null,null);function Bt(t){for(let a in L)this[a]=L[a]}var Ot=function(){return Et.exports}(),Ut=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u4EFB\u52A1\u7EDF\u8BA1"),"mask-closable":!1},model:{value:t.show,callback:function(s){t.show=s},expression:"show"}},[e("Form",{ref:"exportTask",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BFC\u51FA\u6210\u5458")}},[e("UserSelect",{attrs:{"multiple-max":100,"avatar-name":"","show-disable":"",title:t.$L("\u8BF7\u9009\u62E9\u6210\u5458")},model:{value:t.formData.userid,callback:function(s){t.$set(t.formData,"userid",s)},expression:"formData.userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6BCF\u6B21\u6700\u591A\u9009\u62E9\u5BFC\u51FA100\u4E2A\u6210\u5458")))])],1),e("FormItem",{attrs:{label:t.$L("\u65F6\u95F4\u8303\u56F4")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u65F6\u95F4")},model:{value:t.formData.time,callback:function(s){t.$set(t.formData,"time",s)},expression:"formData.time"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(s){t.formData.time=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(s){t.formData.time=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{prop:"type",label:t.$L("\u5BFC\u51FA\u65F6\u95F4\u7C7B\u578B")}},[e("RadioGroup",{model:{value:t.formData.type,callback:function(s){t.$set(t.formData,"type",s)},expression:"formData.type"}},[e("Radio",{attrs:{label:"taskTime"}},[t._v(t._s(t.$L("\u4EFB\u52A1\u65F6\u95F4")))]),e("Radio",{attrs:{label:"createdTime"}},[t._v(t._s(t.$L("\u521B\u5EFA\u65F6\u95F4")))])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},Ft=[];const zt={name:"TaskExport",components:{UserSelect:I},props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{userid:[],time:[],type:"taskTime"}}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"project/task/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},A={};var Vt=l(zt,Ut,Ft,!1,Kt,null,null,null);function Kt(t){for(let a in A)this[a]=A[a]}var Ht=function(){return Vt.exports}();const Wt=(t,a)=>!t||!a?!1:t==="String"?typeof a=="string":t==="Object"?Object.prototype.toString.call(a)==="[object Object]":t==="number"?typeof a=="number":t==="function"?Object.prototype.toString.call(a)==="[object Function]":!1,Yt=(t,a,e)=>t.findIndex(s=>s[a]===e);var n={checkData:Wt,searchArrObj:Yt};class qt{constructor(a="\u9ED8\u8BA4\u6807\u9898",e={}){this.title=a,this.options=e,this.support=!1,this.supportFn()}supportFn(){window.Notification?(this.initStatus(),this.support=!0):this.support=!1}initStatus(){this.notification=null,this.state=Notification.permission,this.msg=null,this.callBackObj={},this.notificationAll=[],this.requireInteractionTimeout=!1,this.timeout=null}initNotification(a){if(!!this.checkStatus("support")){if(!n.checkData("function",a))return console.error("initNotification\u7684\u53C2\u6570\u5FC5\u987B\u4E3A\u51FD\u6570");if(this.state==="granted")this.msg="already granted";else if(this.state==="default"){const e=s=>(this.state=s,s==="granted"?this.msg="granted":s==="default"?this.msg="close":this.msg="denied",a(this.msg));try{Notification.requestPermission().then(e)}catch{Notification.requestPermission(e)}}else this.msg="already denied";if(this.state!=="default")return a(this.msg)}}userAgreed(){if(!!this.checkStatus("userAgreed")){this.notification=new Notification(this.title,this.options),this.notificationWatch();for(const a in this.callBackObj)this.notification[a]=e=>{this.callBackObj[a](e)}}}notificationTimeoutFn(a){a&&n.checkData("number",a)?this.timeout=a:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){!n.checkData("number",this.timeout)||(this.options.timeOut&&n.checkData("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(a){const e=this.notification.timestamp;setTimeout(()=>{const s=n.searchArrObj(this.notificationAll,"timestamp",e);s!==-1&&this.notificationAll[s].close()},a)}watchClose(){const a=this.notification.timestamp;this.notification.addEventListener("close",e=>{const s=n.searchArrObj(this.notificationAll,"timestamp",a);s!==-1&&this.notificationAll.splice(s,1)})}autoClose(){const a=this.notification.timestamp;setTimeout(()=>{const e=n.searchArrObj(this.notificationAll,"timestamp",a);e!==-1&&this.notificationAll.splice(e,1)},6e3)}notificationEvent(a){if(!!this.checkStatus("support"))if(n.checkData("Object",a)){for(const e in a)if(!n.checkData("function",a[e]))return console.error("callObj\u5BF9\u8C61\u4E2D\u7684\u6BCF\u4E2Avalue\u5FC5\u987B\u4E3A\u51FD\u6570");this.callBackObj=a}else return console.error("callObj\u5FC5\u987B\u4E3A\u5BF9\u8C61")}closeAll(){for(let a of this.notificationAll.values())a.close();this.notificationAll=[]}close(){if(!this.notification)return console.warn("this.notification\u4E3Anull,\u901A\u77E5\u5C1A\u672A\u8C03\u7528/\u7528\u6237\u672A\u540C\u610F\u663E\u793A\u901A\u77E5");this.notification.close()}updateOptions(a){if(a&&n.checkData("Object",a))for(const e in a)this.options[e]=a[e];else console.warn("updateOptions\u53C2\u6570\u9519\u8BEF\uFF1Aoptions\u4E3A\u5FC5\u586B\u5BF9\u8C61")}replaceTitle(a){a&&n.checkData("String",a)?this.title=a:console.warn("replaceTitle: title(\u901A\u77E5\u6807\u9898)\u4E3A\u5FC5\u586B\u5B57\u7B26\u4E32")}replaceOptions(a){a&&n.checkData("Object",a)?this.options=a:console.warn("replaceOptions\u53C2\u6570\u9519\u8BEF\uFF1Aoptions\u4E3A\u5FC5\u586B\u5BF9\u8C61")}checkStatus(a){if(a==="support"){if(!this.support)return console.warn("\u7528\u6237\u6D4F\u89C8\u5668\u4E0D\u652F\u6301"),!1}else if(a==="userAgreed"&&(this.state!=="granted"||!this.checkStatus("support")))return!1;return!0}}var Gt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-manage",class:{"show-tabbar":t.showMobileTabbar,"not-logged":t.userId<=0}},[e("div",{staticClass:"manage-box-menu",class:{"show-mobile-menu":t.showMobileMenu}},[e("Dropdown",{staticClass:"page-manage-menu-dropdown main-menu",attrs:{trigger:"click"},on:{"on-click":t.settingRoute,"on-visible-change":t.menuVisibleChange}},[e("div",{class:["manage-box-title",t.visibleMenu?"menu-visible":""]},[e("div",{staticClass:"manage-box-avatar"},[e("UserAvatar",{attrs:{userid:t.userId,size:36}})],1),e("span",[t._v(t._s(t.userInfo.nickname))]),t.clientNewVersion?e("Badge",{staticClass:"manage-box-top-report",attrs:{dot:""}}):t._e(),e("div",{staticClass:"manage-box-arrow"},[e("Icon",{attrs:{type:"ios-arrow-up"}}),e("Icon",{attrs:{type:"ios-arrow-down"}})],1)],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t._l(t.menu,function(s){return[s.path==="taskBrowse"?e("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[e("DropdownItem",{attrs:{divided:!!s.divided}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L(s.name))+" "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t.taskBrowseLists.length>0?e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.taskBrowseLists,function(i,o){return i.id>0&&o<10?e("DropdownItem",{key:o,staticClass:"task-title",attrs:{name:i.name},nativeOn:{click:function(c){return t.openTask(i)}}},[i.flow_item_name?e("span",{class:i.flow_item_status},[t._v(t._s(i.flow_item_name))]):t._e(),e("div",{staticClass:"task-title-text"},[t._v(t._s(i.name))])]):t._e()}),1):e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{staticStyle:{color:"darkgrey"}},[t._v(t._s(t.$L("\u6682\u65E0\u6253\u5F00\u8BB0\u5F55")))])],1)],1):s.path==="team"?e("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[e("DropdownItem",{attrs:{divided:!!s.divided}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L(s.name))+" "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"allUser"}},[t._v(t._s(t.$L("\u56E2\u961F\u7BA1\u7406")))]),e("DropdownItem",{attrs:{name:"exportTask"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u4EFB\u52A1\u7EDF\u8BA1")))]),e("DropdownItem",{attrs:{name:"exportOverdueTask"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u8D85\u671F\u4EFB\u52A1")))]),e("DropdownItem",{attrs:{name:"exportApprove"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E")))]),e("DropdownItem",{attrs:{name:"exportCheckin"}},[t._v(t._s(t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E")))])],1)],1):s.visible!==!1?e("DropdownItem",{style:s.style||{},attrs:{divided:!!s.divided,name:s.path}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L(s.name))+" "),s.path==="version"?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{text:t.clientNewVersion}}):s.path==="workReport"&&t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):s.path==="approve"&&t.approveUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.approveUnreadNumber}}):t._e()],1)]):t._e()]})],2)],1),e("Scrollbar",{attrs:{"class-name":"manage-item"},on:{"on-scroll":function(s){t.operateVisible=!1}}},[e("div",{staticClass:"menu-base"},[e("ul",[e("li",{class:t.classNameRoute("dashboard"),on:{click:function(s){return t.toggleRoute("dashboard")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6FB")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u4EEA\u8868\u76D8")))]),t.dashboardTask.overdue_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"error","overflow-count":999,count:t.dashboardTask.overdue_count}}):t.dashboardTask.today_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"info","overflow-count":999,count:t.dashboardTask.today_count}}):t.dashboardTask.all_count>0?e("Badge",{staticClass:"menu-badge",attrs:{type:"primary","overflow-count":999,count:t.dashboardTask.all_count}}):t._e()],1),e("li",{class:t.classNameRoute("calendar"),on:{click:function(s){return t.toggleRoute("calendar")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F5")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u65E5\u5386")))])]),e("li",{class:t.classNameRoute("messenger"),on:{click:function(s){return t.toggleRoute("messenger")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u6D88\u606F")))]),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,text:t.msgUnreadMention}})],1),e("li",{class:t.classNameRoute("file"),on:{click:function(s){return t.toggleRoute("file")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F3")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u6587\u4EF6")))])]),e("li",{class:t.classNameRoute("application"),on:{click:function(s){return t.toggleRoute("application")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE60C")]),e("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("\u5E94\u7528")))]),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,text:String(t.reportUnreadNumber+t.approveUnreadNumber||"")}})],1)])]),e("div",{ref:"menuProject",staticClass:"menu-project"},[e("ul",[t._l(t.projectLists,function(s,i){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:i,ref:`project_${s.id}`,refInFor:!0,class:t.classNameProject(s),attrs:{"data-id":s.id},on:{click:function(o){return t.toggleRoute("project",{projectId:s.id})}}},[e("div",{staticClass:"project-h1"},[e("em",{on:{click:function(o){return o.stopPropagation(),t.toggleOpenMenu(s.id)}}}),e("div",{staticClass:"title"},[t._v(t._s(s.name))]),s.top_at?e("div",{staticClass:"icon-top"}):t._e(),s.task_my_num-s.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(s.task_my_num-s.task_my_complete))]):t._e()]),e("div",{staticClass:"project-h2"},[e("p",[e("em",[t._v(t._s(t.$L("\u6211\u7684"))+":")]),e("span",[t._v(t._s(s.task_my_complete)+"/"+t._s(s.task_my_num))]),e("Progress",{attrs:{percent:s.task_my_percent,"stroke-width":6}})],1),e("p",[e("em",[t._v(t._s(t.$L("\u5168\u90E8"))+":")]),e("span",[t._v(t._s(s.task_complete)+"/"+t._s(s.task_num))]),e("Progress",{attrs:{percent:s.task_percent,"stroke-width":6}})],1)])])}),t.projectKeyLoading>0?e("li",{staticClass:"loading"},[e("Loading")],1):t._e()],2)])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLandscape?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(s){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(s){return t.handleTopClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.operateItem.top_at?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876\u8BE5\u9879\u76EE"))+" ")])],1)],1)],1),(t.projectSearchShow||t.projectTotal>20)&&t.windowHeight>600?e("div",{staticClass:"manage-project-search"},[e("Input",{attrs:{placeholder:t.$L(`\u5171${t.projectTotal||t.cacheProjects.length}\u4E2A\u9879\u76EE\uFF0C\u641C\u7D22...`),clearable:""},model:{value:t.projectKeyValue,callback:function(s){t.projectKeyValue=s},expression:"projectKeyValue"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.projectKeyLoading>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)])],1):t._e(),e("ButtonGroup",{staticClass:"manage-box-new-group"},[e("Button",{staticClass:"manage-box-new",attrs:{type:"primary",icon:"md-add"},on:{click:t.onAddShow}},[t._v(t._s(t.$L("\u65B0\u5EFA\u9879\u76EE")))]),e("Dropdown",{attrs:{trigger:"click"},on:{"on-click":t.onAddMenu}},[e("Button",{attrs:{type:"primary"}},[e("Icon",{attrs:{type:"ios-arrow-down"}})],1),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"task"}},[t._v(t._s(t.$L("\u65B0\u5EFA\u4EFB\u52A1"))+" ("+t._s(t.mateName)+"+K)")]),e("DropdownItem",{attrs:{name:"createMeeting"}},[t._v(t._s(t.$L("\u65B0\u4F1A\u8BAE"))+" ("+t._s(t.mateName)+"+J)")]),e("DropdownItem",{attrs:{name:"joinMeeting"}},[t._v(t._s(t.$L("\u52A0\u5165\u4F1A\u8BAE")))])],1)],1)],1)],1),e("div",{staticClass:"manage-box-main"},[e("keep-alive",[e("router-view",{staticClass:"manage-box-view",on:{"on-click":t.onTabbarClick}})],1)],1),e("Modal",{attrs:{title:t.$L("\u65B0\u5EFA\u9879\u76EE"),"mask-closable":!1},model:{value:t.addShow,callback:function(s){t.addShow=s},expression:"addShow"}},[e("Form",{ref:"addProject",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u9879\u76EE\u540D\u79F0")}},[e("Input",{ref:"projectName",attrs:{type:"text"},model:{value:t.addData.name,callback:function(s){t.$set(t.addData,"name",s)},expression:"addData.name"}})],1),t.addData.columns?e("FormItem",{attrs:{label:t.$L("\u4EFB\u52A1\u5217\u8868")}},[e("TagInput",{model:{value:t.addData.columns,callback:function(s){t.$set(t.addData,"columns",s)},expression:"addData.columns"}})],1):e("FormItem",{attrs:{label:t.$L("\u9879\u76EE\u6A21\u677F")}},[e("Select",{attrs:{value:0,placeholder:t.$L("\u8BF7\u9009\u62E9\u6A21\u677F")},on:{"on-change":t.selectChange}},t._l(t.columns,function(s,i){return e("Option",{key:i,attrs:{value:i}},[t._v(t._s(s.name))])}),1)],1),e("FormItem",{attrs:{prop:"flow",label:t.$L("\u5F00\u542F\u5DE5\u4F5C\u6D41")}},[e("RadioGroup",{model:{value:t.addData.flow,callback:function(s){t.$set(t.addData,"flow",s)},expression:"addData.flow"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAddProject}},[t._v(t._s(t.$L("\u6DFB\u52A0")))])],1)],1),e("Modal",{attrs:{"mask-closable":!1,styles:{width:"90%",maxWidth:"640px"},"footer-hide":""},model:{value:t.addTaskShow,callback:function(s){t.addTaskShow=s},expression:"addTaskShow"}},[e("TaskAdd",{ref:"addTask",model:{value:t.addTaskShow,callback:function(s){t.addTaskShow=s},expression:"addTaskShow"}})],1),e("TaskExport",{model:{value:t.exportTaskShow,callback:function(s){t.exportTaskShow=s},expression:"exportTaskShow"}}),e("CheckinExport",{model:{value:t.exportCheckinShow,callback:function(s){t.exportCheckinShow=s},expression:"exportCheckinShow"}}),e("ApproveExport",{model:{value:t.exportApproveShow,callback:function(s){t.exportApproveShow=s},expression:"exportApproveShow"}}),e("TaskModal",{ref:"taskModal"}),e("DialogModal",{ref:"dialogModal"}),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.workReportShow,callback:function(s){t.workReportShow=s},expression:"workReportShow"}},[t.workReportShow?e("Report",{on:{"on-read":function(s){return t.$store.dispatch("getReportUnread",1e3)}},model:{value:t.reportTabs,callback:function(s){t.reportTabs=s},expression:"reportTabs"}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1380},model:{value:t.allUserShow,callback:function(s){t.allUserShow=s},expression:"allUserShow"}},[t.allUserShow?e("TeamManagement"):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.allProjectShow,callback:function(s){t.allProjectShow=s},expression:"allProjectShow"}},[t.allProjectShow?e("ProjectManagement"):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.archivedProjectShow,callback:function(s){t.archivedProjectShow=s},expression:"archivedProjectShow"}},[t.archivedProjectShow?e("ProjectArchived"):t._e()],1),e("MeetingManager"),e("transition",{attrs:{name:"mobile-slide"}},[t.showMobileTabbar?e("MobileTabbar",{on:{"on-click":t.onTabbarClick}}):t._e()],1),e("MobileBack",{attrs:{showTabbar:t.showMobileTabbar}}),e("MobileNotification",{ref:"mobileNotification"}),t.$route.name!="manage-apps"?e("MicroApps",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{name:"okr-details",url:t.okrUrl,datas:t.okrWindow}}):t._e()],1)},Jt=[];const Xt={components:{TaskExport:Ht,CheckinExport:P,ApproveExport:K,TaskModal:Ot,DialogModal:Mt,MeetingManager:F,MobileNotification:Tt,MobileBack:bt,MobileTabbar:ct,TaskAdd:ft,Report:N,DrawerOverlay:E,ProjectManagement:st,TeamManagement:R,ProjectArchived:X,MicroApps:H},directives:{longpress:z},data(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl",addShow:!1,addData:{name:"",columns:"",flow:"open"},addRule:{name:[{required:!0,message:this.$L("\u8BF7\u586B\u5199\u9879\u76EE\u540D\u79F0\uFF01"),trigger:"change"},{type:"string",min:2,message:this.$L("\u9879\u76EE\u540D\u79F0\u81F3\u5C112\u4E2A\u5B57\uFF01"),trigger:"change"}]},addTaskShow:!1,addTaskSubscribe:null,exportTaskShow:!1,exportCheckinShow:!1,exportApproveShow:!1,dialogMsgSubscribe:null,projectKeyValue:"",projectKeyLoading:0,projectSearchShow:!1,openMenu:{},visibleMenu:!1,showMobileMenu:!1,workReportShow:!1,allUserShow:!1,allProjectShow:!1,archivedProjectShow:!1,natificationReady:!1,notificationManage:null,reportTabs:"my",operateStyles:{},operateVisible:!1,operateItem:{},needStartHome:!1}},mounted(){this.notificationInit(),this.addTaskSubscribe=d.Store.subscribe("addTask",this.onAddTask),this.dialogMsgSubscribe=d.Store.subscribe("dialogMsgPush",this.addDialogMsg),document.addEventListener("keydown",this.shortcutEvent)},activated(){this.$store.dispatch("getUserInfo").catch(t=>{}),this.$store.dispatch("getTaskPriority").catch(t=>{}),this.$store.dispatch("getReportUnread",0),this.$store.dispatch("getApproveUnread",0),this.$store.dispatch("needHome").then(t=>{this.needStartHome=!0}).catch(t=>{this.needStartHome=!1})},beforeDestroy(){this.addTaskSubscribe&&(this.addTaskSubscribe.unsubscribe(),this.addTaskSubscribe=null),this.dialogMsgSubscribe&&(this.dialogMsgSubscribe.unsubscribe(),this.dialogMsgSubscribe=null),document.removeEventListener("keydown",this.shortcutEvent)},deactivated(){this.addShow=!1},computed:{...h(["userInfo","userIsAdmin","cacheUserBasic","cacheTasks","cacheDialogs","cacheProjects","projectTotal","wsOpenNum","columnTemplate","wsMsg","clientNewVersion","cacheTaskBrowse","dialogIns","reportUnreadNumber","approveUnreadNumber","okrWindow"]),...g(["dashboardTask"]),routeName(){return this.$route.name},okrUrl(){return{}.VITE_OKR_WEB_URL||$A.apiUrl("../apps/okr")},msgUnreadMention(){let t=0,a=0;this.cacheDialogs.some(s=>{t+=$A.getDialogUnread(s,!1),a+=$A.getDialogMention(s)}),t>999&&(t="999+"),a>999&&(a="999+");const e=this.msgTodoTotal;return e?a?`@${a}\xB7${e}`:t?`${t}\xB7${e}`:e:t?a?`${t}\xB7@${a}`:String(t):a?`@${a}`:""},msgAllUnread(){let t=0;return this.cacheDialogs.some(a=>{t+=$A.getDialogNum(a)}),t},msgTodoTotal(){let t=this.cacheDialogs.reduce((a,e)=>a+(e.todo_num||0),0);return t>0?(t>99?t="99+":t===1&&(t=""),`${this.$L("\u5F85\u529E")}${t}`):null},unreadAndOverdue(){return this.userId>0?this.msgAllUnread+this.dashboardTask.overdue_count:0},menu(){const{userIsAdmin:t,needStartHome:a}=this,e=[{path:"taskBrowse",name:"\u6700\u8FD1\u6253\u5F00\u7684\u4EFB\u52A1"}];return t?e.push({path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E",divided:!0},{path:"system",name:"\u7CFB\u7EDF\u8BBE\u7F6E"},{path:"license",name:"License Key"},{path:"version",name:"\u66F4\u65B0\u7248\u672C",divided:!0,visible:!!this.clientNewVersion},{path:"allProject",name:"\u6240\u6709\u9879\u76EE",divided:!0},{path:"archivedProject",name:"\u5DF2\u5F52\u6863\u7684\u9879\u76EE"},{path:"team",name:"\u56E2\u961F\u7BA1\u7406",divided:!0}):e.push({path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E",divided:!0},{path:"version",name:"\u66F4\u65B0\u7248\u672C",divided:!0,visible:!!this.clientNewVersion},{path:"workReport",name:"\u5DE5\u4F5C\u62A5\u544A",divided:!0},{path:"archivedProject",name:"\u5DF2\u5F52\u6863\u7684\u9879\u76EE"}),a?e.push({path:"goHome",name:"\u6253\u5F00\u9996\u9875",divided:!0},{path:"clearCache",name:"\u6E05\u9664\u7F13\u5B58"},{path:"logout",name:"\u9000\u51FA\u767B\u5F55",style:{color:"#f40"}}):e.push({path:"clearCache",name:"\u6E05\u9664\u7F13\u5B58",divided:!0},{path:"logout",name:"\u9000\u51FA\u767B\u5F55",style:{color:"#f40"}}),e},columns(){const t=$A.cloneJSON(this.columnTemplate);return t.unshift({name:this.$L("\u7A7A\u767D\u6A21\u677F"),columns:[]}),t},projectLists(){const{projectKeyValue:t,cacheProjects:a}=this,e=$A.cloneJSON(a).sort((s,i)=>s.top_at||i.top_at?$A.Date(i.top_at)-$A.Date(s.top_at):i.id-s.id);return t?e.filter(s=>$A.strExists(`${s.name} ${s.desc}`,t)):e},taskBrowseLists(){const{cacheTasks:t,cacheTaskBrowse:a,userId:e}=this;return a.filter(({userid:s})=>s===e).map(({id:s})=>t.find(i=>i.id===s)||{})},showMobileTabbar(){return this.routeName==="manage-project"&&!/^\d+$/.test(this.$route.params.projectId)?!0:["manage-dashboard","manage-messenger","manage-application"].includes(this.routeName)}},watch:{$route(){this.chackPass()},userInfo(){this.chackPass()},projectKeyValue(t){t!=""&&setTimeout(()=>{this.projectKeyValue==t&&this.searchProject()},600)},wsOpenNum(t){t<=1||this.$store.dispatch("getBasicData",600)},workReportShow(t){t&&this.$store.dispatch("getReportUnread",0)},"cacheProjects.length":{handler(){this.$nextTick(t=>{const a=this.$refs.menuProject,e=$A.last($A.getObject(a,"children.0.children"));if(e){const s=e.getBoundingClientRect(),i=a.getBoundingClientRect();if(s.top>i.top+i.height){this.projectSearchShow=!0;return}}this.projectSearchShow=!1})},immediate:!0},unreadAndOverdue:{handler(t){this.$Electron&&this.$Electron.sendMessage("setDockBadge",t)},immediate:!0},wsMsg:{handler(t){const{type:a,action:e}=t;switch(a){case"report":e=="unreadUpdate"&&this.$store.dispatch("getReportUnread",1e3);break;case"approve":e=="unread"&&this.$store.dispatch("getApproveUnread",1e3);break}},deep:!0}},methods:{chackPass(){this.userInfo.changepass===1&&this.goForward({name:"manage-setting-password"})},async toggleRoute(t,a){this.showMobileMenu=!1;let e={name:"manage-"+t,params:a||{}},s=await $A.IDBInt("fileFolderId");t==="file"&&s>0&&(e.params.folderId=s),this.goForward(e)},toggleOpenMenu(t){this.$set(this.openMenu,t,!this.openMenu[t])},settingRoute(t){switch(t){case"allUser":this.allUserShow=!0;return;case"allProject":this.allProjectShow=!0;return;case"archivedProject":this.archivedProjectShow=!0;return;case"exportTask":this.exportTaskShow=!0;return;case"exportOverdueTask":this.exportOverdueTask();return;case"exportCheckin":this.exportCheckinShow=!0;return;case"exportApprove":this.exportApproveShow=!0;return;case"workReport":this.reportUnreadNumber>0&&(this.reportTabs="receive"),this.workReportShow=!0;return;case"version":d.Store.set("updateNotification",null);return;case"clearCache":$A.IDBSet("clearCache","handle").then(a=>{$A.reloadUrl()});return;case"goHome":this.needStartHome&&this.goForward("index");return;case"approve":this.menu.findIndex(a=>a.path==t)>-1&&this.goForward({name:"manage-approve"});return;case"okrManage":case"okrAnalyze":this.goForward({path:"/manage/apps/"+(t=="okrManage"?"/#/list":"/#/analysis")});return;case"logout":$A.modalConfirm({title:"\u9000\u51FA\u767B\u5F55",content:"\u4F60\u786E\u5B9A\u8981\u767B\u51FA\u7CFB\u7EDF\uFF1F",onOk:()=>{this.$store.dispatch("logout",!1)}});return}this.menu.findIndex(a=>a.path==t)>-1&&this.toggleRoute("setting-"+t)},exportOverdueTask(){$A.modalConfirm({title:"\u5BFC\u51FA\u4EFB\u52A1",content:"\u4F60\u786E\u5B9A\u8981\u5BFC\u51FA\u6240\u6709\u8D85\u671F\u4EFB\u52A1\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,a)=>{this.$store.dispatch("call",{url:"project/task/exportoverdue"}).then(({data:e})=>{t(),this.$store.dispatch("downUrl",{url:e.url})}).catch(({msg:e})=>{a(e)})})})},menuVisibleChange(t){this.visibleMenu=t},classNameRoute(t){let a=this.routeName;return(a=="manage-approve"||a=="manage-apps")&&(a="manage-application"),{active:a===`manage-${t}`}},classNameProject(t){return{active:this.routeName==="manage-project"&&this.$route.params.projectId==t.id,"open-menu":this.openMenu[t.id]===!0,operate:t.id==this.operateItem.id&&this.operateVisible}},onAddMenu(t){switch(t){case"task":this.onAddTask(0);break;case"createMeeting":d.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":d.Store.set("addMeeting",{type:"join"});break}},onAddShow(){this.$store.dispatch("getColumnTemplate").catch(()=>{}),this.addShow=!0,this.$nextTick(()=>{this.$refs.projectName.focus()})},onAddProject(){this.$refs.addProject.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"project/add",data:this.addData}).then(({data:a,msg:e})=>{$A.messageSuccess(e),this.addShow=!1,this.$refs.addProject.resetFields(),this.$store.dispatch("saveProject",a),this.toggleRoute("project",{projectId:a.id})}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng--}))})},searchProject(){setTimeout(()=>{this.projectKeyLoading++},1e3),this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue}}).finally(t=>{this.projectKeyLoading--})},selectChange(t){this.$nextTick(()=>{this.$set(this.addData,"columns",this.columns[t].columns.join(","))})},shortcutEvent(t){if(t.metaKey||t.ctrlKey)switch(t.keyCode){case 66:t.preventDefault(),this.onAddShow();break;case 74:t.preventDefault(),this.onAddMenu("createMeeting");break;case 75:case 78:t.preventDefault(),this.onAddMenu("task");break;case 83:this.$refs.taskModal.checkUpdate()&&t.preventDefault();break;case 188:t.preventDefault(),this.toggleRoute("setting");break}},onAddTask(t){this.addTaskShow=!0,this.$nextTick(a=>{let e={owner:[this.userId]};$A.isJson(t)?e=t:/^[1-9]\d*$/.test(t)&&(e.column_id=t),this.$refs.addTask.setData(e)})},openTask(t){this.$store.dispatch("openTask",t)},addDialogMsg(t){var k;if(!this.natificationReady&&!this.$isEEUiApp||this.windowActive&&t.dialog_id===((k=$A.last(this.dialogIns))==null?void 0:k.dialog_id))return;const{id:a,dialog_id:e,dialog_type:s,type:i,msg:o,userid:c}=t;if(c==this.userId)return;let u;switch(i){case"text":u=$A.getMsgTextPreview(o.text);break;case"file":u="["+this.$L(o.type=="img"?"\u56FE\u7247\u4FE1\u606F":"\u6587\u4EF6\u4FE1\u606F")+"]";break;default:return}this.__notificationId=a;const v=r=>{if(s==="group"){let p=this.cacheUserBasic.find(f=>f.userid==c);p?m(`${r} (${p.nickname})`):this.$store.dispatch("call",{url:"users/basic",data:{userid:[c]},skipAuthError:!0}).then(({data:f})=>{p=f.find(j=>j.userid==c),p&&m(`${r} (${p.nickname})`)}).catch(f=>{m(r)})}else m(r)},m=r=>{this.__notificationId===a&&(this.$isEEUiApp?this.$refs.mobileNotification.open({userid:c,title:r,desc:u,callback:()=>{this.goForward({name:"manage-messenger"}),this.$store.dispatch("openDialog",e)}}):this.$Electron?this.$Electron.sendMessage("openNotification",{icon:$A.originUrl("images/logo.png"),title:r,body:u,data:t,tag:"dialog",hasReply:!0,replyPlaceholder:this.$L("\u56DE\u590D\u6D88\u606F")}):(this.notificationManage.replaceOptions({icon:$A.originUrl("images/logo.png"),body:u,data:t,tag:"dialog"}),this.notificationManage.replaceTitle(r),this.notificationManage.userAgreed()))},_=this.cacheDialogs.find(r=>r.id==e);_?v(_.name):this.$store.dispatch("getDialogOne",e).then(({data:r})=>v(r.name)).catch(()=>{})},handleLongpress(t,a){const e=$A.getAttr(a,"data-id"),s=this.projectLists.find(i=>i.id==e);!s||(this.operateVisible=!1,this.operateItem=$A.isJson(s)?s:{},this.$nextTick(()=>{const i=a.getBoundingClientRect(),o=this.$refs.menuProject.getBoundingClientRect();this.operateStyles={left:`${t.clientX-o.left}px`,top:`${i.top+this.windowScrollY}px`,height:i.height+"px"},this.operateVisible=!0}))},handleTopClick(){this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then(({data:t})=>{this.$store.dispatch("saveProject",t),this.$nextTick(()=>{const a=this.$refs.menuProject.querySelector(".active");a&&$A.scrollIntoViewIfNeeded(a)})}).catch(({msg:t})=>{$A.modalError(t)})},onTabbarClick(t){switch(t){case"addTask":this.onAddTask(0);break;case"addProject":this.onAddShow();break;case"allUser":case"workReport":this.settingRoute(t);break}},notificationInit(){this.notificationManage=new qt(this.$L("\u6253\u5F00\u901A\u77E5\u6210\u529F")),this.notificationManage.support&&(this.notificationManage.notificationEvent({onclick:({target:t})=>{console.log("[Notification] A Click",t),this.notificationManage.close(),this.notificationClick(t),window.focus()}}),this.notificationPermission()),this.$Electron&&(this.$Electron.registerMsgListener("clickNotification",t=>{console.log("[Notification] B Click",t),this.$Electron.sendMessage("mainWindowActive"),this.notificationClick(t)}),this.$Electron.registerMsgListener("replyNotification",t=>{console.log("[Notification] B Reply",t),this.notificationReply(t)}))},notificationPermission(){const t=a=>{switch(a){case"already granted":case"granted":return this.natificationReady=!0;case"close":return this.notificationManage.initNotification(t);case"denied":case"already denied":console.log(a==="denied"?"\u60A8\u521A\u521A\u62D2\u7EDD\u663E\u793A\u901A\u77E5 \u8BF7\u5728\u8BBE\u7F6E\u4E2D\u66F4\u6539\u8BBE\u7F6E":"\u60A8\u66FE\u7EA7\u62D2\u7EDD\u663E\u793A\u901A\u77E5 \u8BF7\u5728\u8BBE\u7F6E\u4E2D\u66F4\u6539\u8BBE\u7F6E");break}};this.notificationManage.initNotification(t)},notificationClick(t){const{tag:a,data:e}=t;if(a=="dialog"){if(!$A.isJson(e))return;this.goForward({name:"manage-messenger"}),this.$nextTick(s=>{this.$store.dispatch("openDialog",e.dialog_id)})}},notificationReply(t){const{tag:a,data:e,reply:s}=t;a=="dialog"&&s&&this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:e.dialog_id,text:s},method:"post"}).then(({data:i})=>{this.$store.dispatch("saveDialogMsg",i),this.$store.dispatch("increaseTaskMsgNum",i),this.$store.dispatch("increaseMsgReplyNum",i),this.$store.dispatch("updateDialogLastMsg",i)}).catch(({msg:i})=>{$A.modalError(i)})}}},S={};var Qt=l(Xt,Gt,Jt,!1,Zt,null,null,null);function Zt(t){for(let a in S)this[a]=S[a]}var _e=function(){return Qt.exports}();export{_e as default}; diff --git a/public/js/build/meeting.a29351d2.js b/public/js/build/meeting.0c7743f5.js similarity index 77% rename from public/js/build/meeting.a29351d2.js rename to public/js/build/meeting.0c7743f5.js index 53174511e..152d66efd 100644 --- a/public/js/build/meeting.a29351d2.js +++ b/public/js/build/meeting.0c7743f5.js @@ -1 +1 @@ -import{M as i}from"./MeetingManager.76c2e240.js";import{n as o}from"./app.6c8b31b1.js";import"./UserSelect.d62f565b.js";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("MeetingManager")],1)},a=[];const m={components:{MeetingManager:i},mounted(){this.$store.dispatch("showMeetingWindow",{type:"join",meetingid:this.$route.params.meetingId,meetingSharekey:this.$route.params.sharekey,meetingdisabled:!0})}},r={};var _=o(m,s,a,!1,c,null,null,null);function c(t){for(let e in r)this[e]=r[e]}var d=function(){return _.exports}();export{d as default}; +import{M as i}from"./MeetingManager.bf6d77cf.js";import{n as o}from"./app.6910ca56.js";import"./UserSelect.1938cd94.js";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("MeetingManager")],1)},a=[];const m={components:{MeetingManager:i},mounted(){this.$store.dispatch("showMeetingWindow",{type:"join",meetingid:this.$route.params.meetingId,meetingSharekey:this.$route.params.sharekey,meetingdisabled:!0})}},r={};var _=o(m,s,a,!1,c,null,null,null);function c(t){for(let e in r)this[e]=r[e]}var d=function(){return _.exports}();export{d as default}; diff --git a/public/js/build/messenger.f5205905.js b/public/js/build/messenger.306bf130.js similarity index 98% rename from public/js/build/messenger.f5205905.js rename to public/js/build/messenger.306bf130.js index bb437311f..ed7717950 100644 --- a/public/js/build/messenger.f5205905.js +++ b/public/js/build/messenger.306bf130.js @@ -1 +1 @@ -import{a as l,m as h,n as p}from"./app.6c8b31b1.js";import{D as g}from"./DialogWrapper.5fcf71c2.js";import{l as f}from"./longpress.43ca7fd9.js";import"./index.31386d23.js";import"./UserSelect.d62f565b.js";import"./ImgUpload.0e64a5a8.js";import"./details.6749696e.js";import"./tip.517649f6.js";var m=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-messenger"},[e("PageTitle",{attrs:{title:t.$L(t.tabActive==="dialog"?"\u6D88\u606F":"\u901A\u8BAF\u5F55")}}),e("div",{staticClass:"messenger-wrapper"},[e("div",{staticClass:"messenger-select"},[e("div",{staticClass:"messenger-search"},[e("div",{staticClass:"search-wrapper"},[t.tabActive==="dialog"?e("Input",{ref:"searchInput",attrs:{placeholder:t.$L(t.loadDialogs?"\u66F4\u65B0\u4E2D...":"\u641C\u7D22\u6D88\u606F"),clearable:""},on:{"on-keydown":t.onKeydown},model:{value:t.dialogSearchKey,callback:function(s){t.dialogSearchKey=s},expression:"dialogSearchKey"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.loadDialogs||t.dialogSearchLoad>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)]):e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("\u641C\u7D22\u8054\u7CFB\u4EBA"),clearable:""},model:{value:t.contactsKey,callback:function(s){t.contactsKey=s},expression:"contactsKey"}})],1)]),t.tabActive==="dialog"&&!t.dialogSearchKey?e("div",{staticClass:"messenger-nav"},[e("EDropdown",{ref:"navMenu",staticClass:"nav-menu",attrs:{trigger:"click",placement:"bottom-start"},on:{command:t.onActive}},[e("div",{staticClass:"nav-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE634")])]),e("EDropdownMenu",{staticClass:"messenger-nav-menu",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.dialogMenus,function(s,i){return e("EDropdownItem",{key:i,attrs:{command:s.type}},[e("div",{staticClass:"messenger-nav-item",class:{active:t.dialogActive==s.type}},[e("div",{staticClass:"nav-title"},[t._v(t._s(t.$L(s.name)))]),e("Badge",{staticClass:"nav-num",attrs:{"overflow-count":999,count:t.msgUnread(s.type)}})],1)])}),1)],1),t._l(t.typeItems,function(s,i){return e("div",{key:i,class:{active:t.dialogActive==s.type},on:{click:function(o){return t.onActive(s.type)}}},[e("div",{staticClass:"nav-title"},[e("em",[t._v(t._s(t.$L(s.name)))]),e("Badge",{staticClass:"nav-num",attrs:{"overflow-count":999,count:t.msgUnread(s.type)}})],1)])})],2):t._e(),t.$isEEUiApp&&!t.appNotificationPermission?e("div",{staticClass:"messenger-notify-permission",on:{click:t.onOpenAppSetting}},[t._v(" "+t._s(t.$L("\u672A\u5F00\u542F\u901A\u77E5\u6743\u9650"))),e("i",{staticClass:"taskfont"},[t._v("\uE733")])]):t._e(),e("Scrollbar",{ref:"list",staticClass:"messenger-list",attrs:{"hide-bar":this.operateVisible},on:{"on-scroll":t.listScroll},nativeOn:{touchstart:function(s){return t.listTouch.apply(null,arguments)}}},[t.tabActive==="dialog"?e("ul",{ref:"ul",staticClass:"dialog"},t._l(t.dialogList,function(s,i){return t.dialogList.length>0?e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:i,ref:`dialog_${s.id}`,refInFor:!0,class:t.dialogClass(s),style:{"background-color":s.color},attrs:{"data-id":s.id},on:{click:function(o){return t.openDialog({dialog_id:s.id,search_msg_id:s.search_msg_id})}}},[s.type=="group"?[s.avatar?e("EAvatar",{staticClass:"img-avatar",attrs:{src:s.avatar,size:42}}):s.group_type=="department"?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):s.group_type=="project"?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):s.group_type=="task"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):s.group_type=="okr"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:s.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{userid:s.dialog_user.userid,size:42}})],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}}),e("div",{staticClass:"dialog-box"},[e("div",{staticClass:"dialog-title"},[s.todo_num?e("div",{staticClass:"todo"},[t._v("["+t._s(t.$L("\u5F85\u529E"))+t._s(t.formatTodoNum(s.todo_num))+"]")]):t._e(),t.$A.getDialogMention(s)>0?e("div",{staticClass:"mention"},[t._v("[@"+t._s(t.$A.getDialogMention(s))+"]")]):t._e(),s.bot?e("div",{staticClass:"taskfont bot"},[t._v("\uE68C")]):t._e(),t._l(t.$A.dialogTags(s),function(o){return o.color!="success"?[e("Tag",{attrs:{color:o.color,fade:!1},on:{"on-click":function(r){return t.openDialog(s.id)}}},[t._v(t._s(t.$L(o.text)))])]:t._e()}),e("span",[t._v(t._s(s.name))]),s.type=="user"&&t.lastMsgReadDone(s.last_msg)&&s.dialog_user.userid!=t.userId?e("Icon",{attrs:{type:t.lastMsgReadDone(s.last_msg)}}):t._e(),s.last_at?e("em",[t._v(t._s(t.$A.formatTime(s.last_at)))]):t._e()],2),e("div",{staticClass:"dialog-text no-dark-content"},[s.extra_draft_has&&s.id!=t.dialogId?[e("div",{staticClass:"last-draft"},[t._v("["+t._s(t.$L("\u8349\u7A3F"))+"]")]),e("div",{staticClass:"last-text"},[e("span",[t._v(t._s(t.formatDraft(s.extra_draft_content)))])])]:[s.type=="group"&&s.last_msg&&s.last_msg.userid?[s.last_msg.userid==t.userId?e("div",{staticClass:"last-self"},[t._v(t._s(t.$L("\u4F60")))]):e("UserAvatar",{attrs:{userid:s.last_msg.userid,"show-name":!0,"show-icon":!1}})]:t._e(),e("div",{staticClass:"last-text"},[t.formatMsgEmojiDesc(s.last_msg)?e("em",[t._v(t._s(t.formatMsgEmojiDesc(s.last_msg)))]):t._e(),e("span",[t._v(t._s(t.$A.getMsgSimpleDesc(s.last_msg)))])])],s.silence?e("div",{staticClass:"taskfont last-silence"},[t._v("\uE7D7")]):t._e()],2)]),e("Badge",{staticClass:"dialog-num",attrs:{type:s.silence?"normal":"error","overflow-count":999,count:t.$A.getDialogUnread(s,!0)}}),e("div",{staticClass:"dialog-line"})],2):t.dialogSearchLoad===0?e("li",{staticClass:"nothing"},[t._v(" "+t._s(t.$L(t.dialogSearchKey?`\u6CA1\u6709\u4EFB\u4F55\u4E0E"${t.dialogSearchKey}"\u76F8\u5173\u7684\u4F1A\u8BDD`:"\u6CA1\u6709\u4EFB\u4F55\u4F1A\u8BDD"))+" ")]):t._e()}),0):e("ul",{staticClass:"contacts"},[t.contactsFilter.length===0?[t.contactsLoad>0?e("li",{staticClass:"loading"},[e("Loading")],1):e("li",{staticClass:"nothing"},[t._v(" "+t._s(t.$L(t.contactsKey?`\u6CA1\u6709\u4EFB\u4F55\u4E0E"${t.contactsKey}"\u76F8\u5173\u7684\u8054\u7CFB\u4EBA`:"\u6CA1\u6709\u4EFB\u4F55\u8054\u7CFB\u4EBA"))+" ")])]:[t._l(t.contactsList,function(s){return e("li",[e("div",{staticClass:"label"},[t._v(t._s(s.az))]),e("ul",t._l(s.list,function(i,o){return e("li",{key:o,on:{click:function(r){return t.openContacts(i)}}},[e("div",{staticClass:"avatar"},[e("UserAvatar",{attrs:{userid:i.userid,size:30}})],1),e("div",{staticClass:"nickname"},[e("em",[t._v(t._s(i.nickname))]),i.tags?e("div",{staticClass:"tags"},t._l(i.tags,function(r){return e("span",{style:t.tagField(r,"style")},[t._v(t._s(t.tagField(r,"label")))])}),0):t._e()]),i.loading?e("div",{staticClass:"loading"},[e("Loading")],1):t._e()])}),0)])}),e("li",{staticClass:"loaded"},[t.contactsKey?[t._v(t._s(t.$L("\u641C\u7D22\u5230"+t.contactsFilter.length+"\u4F4D\u8054\u7CFB\u4EBA")))]:[t._v(t._s(t.$L("\u5171"+t.contactsTotal+"\u4F4D\u8054\u7CFB\u4EBA")))]],2)]],2),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLandscape?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(s){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{staticClass:"messenger-dialog-operation",attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(s){return t.handleTopClick.apply(null,arguments)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(t.operateItem.top_at?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"))+" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.operateItem.top_at?"":"")}})])]),e("DropdownItem",{nativeOn:{click:function(s){return t.handleReadClick.apply(null,arguments)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(t.$A.getDialogUnread(t.operateItem,!0)>0?"\u6807\u8BB0\u5DF2\u8BFB":"\u6807\u8BB0\u672A\u8BFB"))+" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.$A.getDialogUnread(t.operateItem,!0)>0?"":"")}})])]),e("DropdownItem",{attrs:{disabled:t.silenceDisabled(t.operateItem)},nativeOn:{click:function(s){return t.handleSilenceClick.apply(null,arguments)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(t.operateItem.silence?"\u5141\u8BB8\u6D88\u606F\u901A\u77E5":"\u6D88\u606F\u514D\u6253\u6270"))+" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.operateItem.silence?"":"")}})])]),t._l(t.taskColorList,function(s,i){return i<6?e("DropdownItem",{key:"c_"+i,attrs:{divided:i==0},nativeOn:{click:function(o){return t.handleColorClick(s.color)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(s.name))+" "),e("i",{staticClass:"taskfont color",style:{color:s.primary||"#ddd"},domProps:{innerHTML:t._s(s.color==(t.operateItem.color||"")?"":"")}})])]):t._e()})],2)],1)],1)]),e("div",{staticClass:"messenger-menu"},[e("div",{staticClass:"menu-icon"},[e("Icon",{class:{active:t.tabActive==="dialog"},attrs:{type:"ios-chatbubbles"},on:{click:function(s){return t.onActive(null)}}}),e("Badge",{staticClass:"menu-num",attrs:{"overflow-count":999,count:t.msgUnread("all")}})],1),e("div",{staticClass:"menu-icon"},[e("Icon",{class:{active:t.tabActive==="contacts"},attrs:{type:"md-person"},on:{click:function(s){t.tabActive="contacts"}}})],1)])],1),t.activeNum>0&&t.routeName==="manage-messenger"?e("div",{staticClass:"messenger-msg"},[e("div",{staticClass:"msg-dialog-bg"},[e("div",{staticClass:"msg-dialog-bg-icon"},[e("Icon",{attrs:{type:"ios-chatbubbles"}})],1),e("div",{staticClass:"msg-dialog-bg-text"},[t._v(t._s(t.$L("\u9009\u62E9\u4E00\u4E2A\u4F1A\u8BDD\u5F00\u59CB\u804A\u5929")))])]),t.windowLandscape&&t.dialogId>0?e("DialogWrapper",{attrs:{dialogId:t.dialogId,"auto-focus":t.$A.isDesktop(),"is-messenger":""},on:{"on-active":t.scrollIntoActive}}):t._e()],1):t._e()])],1)},_=[];const d={menuHistory:[]},v={components:{DialogWrapper:g},directives:{longpress:f},data(){return{activeNum:0,tabActive:"dialog",dialogSearchLoad:0,dialogSearchKey:"",dialogSearchList:[],dialogActive:"",dialogMenus:[{type:"",name:"\u5168\u90E8"},{type:"project",name:"\u9879\u76EE"},{type:"task",name:"\u4EFB\u52A1"},{type:"user",name:"\u5355\u804A"},{type:"group",name:"\u7FA4\u804A"},{type:"bot",name:"\u673A\u5668\u4EBA"}],dialogHistory:d.menuHistory,contactsKey:"",contactsLoad:0,contactsData:null,contactsTotal:0,contactsCurrentPage:1,contactsHasMorePages:!1,contactsLastTime:0,operateItem:{},operateStyles:{},operateVisible:!1,clickAgainSubscribe:null}},async beforeRouteEnter(t,a,e){d.menuHistory=await $A.IDBArray("dialogMenuHistory"),e()},mounted(){const t=$A.runNum(this.$route.query.dialog_id);t>0&&this.openDialog(t),this.clickAgainSubscribe=l.Store.subscribe("clickAgainDialog",this.shakeUnread)},beforeDestroy(){this.clickAgainSubscribe&&(this.clickAgainSubscribe.unsubscribe(),this.clickAgainSubscribe=null),document.removeEventListener("keydown",this.shortcutEvent)},activated(){this.updateDialogs(1e3),this.$nextTick(t=>this.activeNum++),$A.isEEUiApp&&$A.eeuiAppSendMessage({action:"getNotificationPermission"})},deactivated(){this.updateDialogs(-1),this.$nextTick(t=>this.activeNum--)},computed:{...h(["cacheDialogs","loadDialogs","dialogId","messengerSearchKey","appNotificationPermission","taskColorList"]),routeName(){return this.$route.name},typeItems(){const{dialogActive:t,dialogMenus:a,dialogHistory:e}=this,s=[];return this.dialogHistory.includes(t)?s.push(...this.dialogHistory):(s.push(""),t&&s.push(t),e.some(i=>{s.includes(i)||s.push(i)}),["project","task","user"].some(i=>{s.includes(i)||s.push(i)}),this.dialogHistory=s.slice(0,4),$A.IDBSave("dialogMenuHistory",this.dialogHistory)),this.dialogHistory.map(i=>a.find(o=>o.type==i))},dialogList(){const{dialogActive:t,dialogSearchKey:a,dialogSearchList:e}=this;return e.length>0?e.sort((i,o)=>(i.is_search===!0?1:0)-(o.is_search===!0?1:0)):t==""&&a==""?this.cacheDialogs.filter(i=>this.filterDialog(i)).sort(this.dialogSort):this.cacheDialogs.filter(i=>{if(!this.filterDialog(i))return!1;if(a){const{name:o,pinyin:r,last_msg:n}=i;let c=`${o} ${r}`;if(n)switch(n.type){case"text":c+=` ${n.msg.text.replace(/<[^>]+>/g,"")}`;break;case"meeting":case"file":c+=` ${n.msg.name}`;break}if(!$A.strExists(c,a))return!1}else if(t)switch(t){case"project":case"task":if(t!=i.group_type)return!1;break;case"user":if(t!=i.type||i.bot)return!1;break;case"group":if(t!=i.type||["project","task"].includes(i.group_type))return!1;break;case"bot":if(!i.bot)return!1;break;default:return!1}return!0}).sort(this.dialogSort)},contactsFilter(){const{contactsData:t,contactsKey:a}=this;return t===null?[]:a?t.filter(e=>$A.strExists(`${e.email} ${e.nickname} ${e.profession} ${e.pinyin}`,a)):t},contactsList(){const t=[];return this.contactsFilter.some(a=>{let e=a.az?a.az.toUpperCase():"#",s=t.find(i=>i.az==e);s?s.list.findIndex(({userid:i})=>i==a.userid)===-1&&s.list.push(a):t.push({az:e,list:[a]})}),t},msgUnread(){return function(t){let a=0;return this.cacheDialogs.some(e=>{switch(t){case"project":case"task":if(t!=e.group_type)return!1;break;case"user":if(t!=e.type||e.bot)return!1;break;case"group":if(t!=e.type||["project","task"].includes(e.group_type))return!1;break;case"bot":if(!e.bot)return!1;break}a+=$A.getDialogNum(e)}),a}}},watch:{$route:{handler({params:t}){if(["dialog","contacts"].includes(t.dialogAction)&&(this.tabActive=t.dialogAction),t.dialog_id){this.tabActive="dialog";const a=$A.runNum(t.dialog_id);a>0&&this.openDialog(a),this.clickAgainSubscribe=l.Store.subscribe("clickAgainDialog",this.shakeUnread)}},immediate:!0},messengerSearchKey:{handler(t){this.$nextTick(a=>{this.dialogSearchKey=t.dialog,this.contactsKey=t.contacts})},deep:!0},dialogSearchKey(t){switch(this.$store.state.messengerSearchKey.dialog=t,t){case"log.o":$A.IDBSet("logOpen","open").then(a=>{$A.reloadUrl()});break;case"log.c":$A.IDBSet("logOpen","close").then(a=>{$A.reloadUrl()});break}this.dialogSearchList=[],t!=""&&(this.__searchTimer&&clearTimeout(this.__searchTimer),this.__searchTimer=setTimeout(this.searchDialog,600),this.dialogSearchLoad++,setTimeout(a=>this.dialogSearchLoad--,600))},contactsKey(t){this.$store.state.messengerSearchKey.contacts=t,t!=""&&(this.contactsLoad++,setTimeout(()=>{this.contactsKey==t&&this.getContactsList(1),this.contactsLoad--},600))},tabActive:{handler(t){t=="contacts"?($A.Time()-this.contactsLastTime>24*3600&&(this.contactsData=null),this.contactsData===null?this.getContactsList(1):this.updateContactsList(1e3)):this.updateDialogs(1e3)},immediate:!0},dialogId:{handler(t){t>0&&this.scrollIntoActive()},immediate:!0}},methods:{listTouch(){var t;(t=this.$refs.navMenu)!=null&&t.visible&&this.$refs.navMenu.hide()},listScroll(){this.scrollE()<10&&this.getContactsNextPage(),this.operateVisible=!1},scrollE(){return this.$refs.list?this.$refs.list.scrollInfo().scrollE:0},onKeydown(t){t.key==="Escape"&&this.$refs.searchInput.handleClear()},onActive(t){if(t===null){if(this.tabActive!=="dialog"){this.tabActive="dialog";return}t=this.dialogActive}this.dialogActive==t?this.shakeUnread():this.dialogActive=t},shakeUnread(){var a;let t=this.dialogList.findIndex(e=>$A.getDialogNum(e)>0);if(t===-1&&(t=this.dialogList.findIndex(e=>e.todo_num>0)),t===-1&&(t=this.dialogList.findIndex(e=>$A.getDialogUnread(e,!0)>0)),t>-1){const e=this.$refs[`dialog_${(a=this.dialogList[t])==null?void 0:a.id}`];if(e&&e[0]){if(e[0].classList.contains("common-shake"))return;$A.scrollIntoViewIfNeeded(e[0]),requestAnimationFrame(s=>{e[0].classList.add("common-shake"),setTimeout(i=>{e[0].classList.remove("common-shake")},600)})}}},dialogClass(t){return this.dialogSearchKey?null:{top:t.top_at,active:t.id==this.dialogId,operate:this.operateVisible&&t.id==this.operateItem.id,completed:$A.dialogCompleted(t)}},dialogSort(t,a){return t.top_at||a.top_at?$A.Date(a.top_at)-$A.Date(t.top_at):t.todo_num>0||a.todo_num>0?a.todo_num-t.todo_num:t.extra_draft_has||a.extra_draft_has?a.extra_draft_has-t.extra_draft_has:$A.Date(a.last_at)-$A.Date(t.last_at)},openDialog(t){this.operateVisible||($A.isJson(t)&&$A.leftExists(t.dialog_id,"u:")?this.$store.dispatch("openDialogUserid",$A.leftDelete(t.dialog_id,"u:")).catch(({msg:a})=>{$A.modalError(a)}):this.$store.dispatch("openDialog",t))},openContacts(t){t.loading||(this.$set(t,"loading",!0),this.$store.dispatch("openDialogUserid",t.userid).then(a=>{this.windowLandscape&&(this.tabActive="dialog")}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.$set(t,"loading",!1)}))},tagField(t,a){switch($A.isJson(t)||(t={label:t}),a){case"style":return t.style||null;case"label":return t.label}return null},filterDialog(t){if(t.id>0&&t.id==this.dialogId||t.top_at||t.todo_num>0||$A.getDialogNum(t)>0)return!0;if(t.name===void 0||t.dialog_delete===1||!t.last_at)return!1;if(t.type=="group"&&["project","task"].includes(t.group_type)&&$A.isJson(t.group_info)){if(t.group_type=="task"&&t.group_info.complete_at){let a=Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.complete_at,!0));if(5*86400+a<$A.Time())return!1}if(t.group_info.deleted_at){let a=Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.deleted_at,!0));if(2*86400+a<$A.Time())return!1}if(t.group_info.archived_at){let a=Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.archived_at,!0));if(3*86400+a<$A.Time())return!1}}return!0},searchDialog(){const t=this.dialogSearchKey;t!=""&&(this.dialogSearchLoad++,this.$store.dispatch("call",{url:"dialog/search",data:{key:t}}).then(({data:a})=>{if(t!==this.dialogSearchKey)return;const e=$A.cloneJSON(this.dialogList),s=[],i=[];e.forEach(o=>{o.last_msg&&!s.includes(o.last_msg.id)&&s.push(o.last_msg.id),o.dialog_user&&!i.includes(o.dialog_user.userid)&&i.push(o.dialog_user.userid)}),a.some(o=>{$A.leftExists(o.id,"u:")?i.includes(o.dialog_user.userid)||e.push(Object.assign(o,{is_search:!0})):(!o.last_msg||!s.includes(o.last_msg.id))&&e.push(Object.assign(o,{is_search:!0}))}),this.dialogSearchList=e}).finally(a=>{this.dialogSearchLoad--}))},getContactsList(t){this.contactsLoad++;const a=this.contactsKey;this.$store.dispatch("call",{url:"users/search",data:{keys:{key:a},sorts:{az:"asc"},page:t,pagesize:50}}).then(({data:e})=>{a==""&&(this.contactsTotal=e.total),this.contactsData===null&&(this.contactsData=[]),e.data.some(s=>{this.contactsData.findIndex(i=>i.userid==s.userid)===-1&&this.contactsData.push(s)}),this.contactsCurrentPage=e.current_page,this.contactsHasMorePages=e.current_page{a==""&&(this.contactsTotal=0),this.contactsHasMorePages=!1}).finally(e=>{this.contactsLoad--,this.contactsLastTime=$A.Time()})},getContactsNextPage(){this.scrollE()<10&&this.tabActive==="contacts"&&this.contactsLoad===0&&this.contactsHasMorePages&&this.getContactsList(this.contactsCurrentPage+1)},updateContactsList(t){this.__updateContactsList&&clearTimeout(this.__updateContactsList),t>-1&&(this.__updateContactsList=setTimeout(a=>{this.tabActive==="contacts"&&this.$store.dispatch("call",{url:"users/search",data:{updated_time:this.contactsLastTime,take:100}}).then(({data:e})=>{e.some(s=>{const i=this.contactsData.findIndex(o=>o.userid==s.userid);i>-1?this.contactsData.splice(i,1,s):this.contactsData.push(s)})}).finally(e=>{this.contactsLastTime=$A.Time()})},t))},formatDraft(t){return(t==null?void 0:t.replace(/]*>/gi,`[${$A.L("\u56FE\u7247")}]`).replace(/<[^>]*>/g,""))||null},formatTodoNum(t){return t>999?"999+":t>1?t:""},formatMsgEmojiDesc(t){return $A.isJson(t)&&$A.arrayLength(t.emoji)>0?t.emoji[0].symbol:null},lastMsgReadDone(t){if($A.isJson(t)){const{userid:a,percentage:e}=t;if(a===this.userId)return e===100?"md-done-all":"md-checkmark"}return null},scrollIntoActive(){this.$nextTick(()=>{if(this.windowLandscape&&this.$refs.list){const t=this.$refs.list.querySelector(".active");t?$A.scrollIntoViewIfNeeded(t):this.cacheDialogs.find(({id:e})=>e==this.dialogId)&&this.dialogActive&&(this.dialogActive="",this.$nextTick(()=>{const e=this.$refs.list.querySelector(".active");e&&$A.scrollIntoViewIfNeeded(e)}))}})},handleLongpress(t,a){if(this.dialogSearchKey)return;const e=$A.getAttr(a,"data-id"),s=this.dialogList.find(i=>i.id==e);!s||(this.operateVisible=!1,this.operateItem=$A.isJson(s)?s:{},this.$nextTick(()=>{const i=a.getBoundingClientRect(),o=this.$refs.list.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-o.left}px`,top:`${i.top-i.height+this.windowScrollY}px`,height:i.height+"px"},this.operateVisible=!0}))},handleTopClick(){this.$store.dispatch("call",{url:"dialog/top",data:{dialog_id:this.operateItem.id}}).then(({data:t})=>{this.$store.dispatch("saveDialog",t),this.$nextTick(this.scrollIntoActive)}).catch(({msg:t})=>{$A.modalError(t)})},handleReadClick(){this.$store.dispatch("showSpinner",600),this.$store.dispatch("dialogMsgMark",{dialog_id:this.operateItem.id,type:$A.getDialogUnread(this.operateItem,!0)>0?"read":"unread"}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.$store.dispatch("hiddenSpinner")})},handleSilenceClick(){this.silenceDisabled(this.operateItem)||this.$store.dispatch("call",{url:"dialog/msg/silence",data:{dialog_id:this.operateItem.id,type:this.operateItem.silence?"cancel":"set"}}).then(({data:t})=>{this.$store.dispatch("saveDialog",t)}).catch(({msg:t})=>{$A.modalError(t)})},handleColorClick(t){this.$store.dispatch("call",{url:"dialog/msg/color",data:{dialog_id:this.operateItem.id,color:t}}).then(({data:a})=>{this.$store.dispatch("saveDialog",a)}).catch(({msg:a})=>{$A.modalError(a)})},updateDialogs(t){this.__updateDialogs&&clearTimeout(this.__updateDialogs),t>-1&&(this.__updateDialogs=setTimeout(a=>{this.tabActive==="dialog"&&this.$store.dispatch("getDialogs",{hideload:!0}).catch(()=>{})},t))},onOpenAppSetting(){$A.eeuiAppSendMessage({action:"gotoSetting"})},silenceDisabled(t){const{type:a,group_type:e}=t;return a==="group"&&e!=="user"}}},u={};var $=p(v,m,_,!1,y,null,null,null);function y(t){for(let a in u)this[a]=u[a]}var x=function(){return $.exports}();export{x as default}; +import{a as l,m as h,n as p}from"./app.6910ca56.js";import{D as g}from"./DialogWrapper.54a1354f.js";import{l as f}from"./longpress.43ca7fd9.js";import"./index.8984a77c.js";import"./UserSelect.1938cd94.js";import"./ImgUpload.8863e78d.js";import"./details.97854344.js";import"./tip.6872e3c6.js";var m=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-messenger"},[e("PageTitle",{attrs:{title:t.$L(t.tabActive==="dialog"?"\u6D88\u606F":"\u901A\u8BAF\u5F55")}}),e("div",{staticClass:"messenger-wrapper"},[e("div",{staticClass:"messenger-select"},[e("div",{staticClass:"messenger-search"},[e("div",{staticClass:"search-wrapper"},[t.tabActive==="dialog"?e("Input",{ref:"searchInput",attrs:{placeholder:t.$L(t.loadDialogs?"\u66F4\u65B0\u4E2D...":"\u641C\u7D22\u6D88\u606F"),clearable:""},on:{"on-keydown":t.onKeydown},model:{value:t.dialogSearchKey,callback:function(s){t.dialogSearchKey=s},expression:"dialogSearchKey"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.loadDialogs||t.dialogSearchLoad>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)]):e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("\u641C\u7D22\u8054\u7CFB\u4EBA"),clearable:""},model:{value:t.contactsKey,callback:function(s){t.contactsKey=s},expression:"contactsKey"}})],1)]),t.tabActive==="dialog"&&!t.dialogSearchKey?e("div",{staticClass:"messenger-nav"},[e("EDropdown",{ref:"navMenu",staticClass:"nav-menu",attrs:{trigger:"click",placement:"bottom-start"},on:{command:t.onActive}},[e("div",{staticClass:"nav-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE634")])]),e("EDropdownMenu",{staticClass:"messenger-nav-menu",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.dialogMenus,function(s,i){return e("EDropdownItem",{key:i,attrs:{command:s.type}},[e("div",{staticClass:"messenger-nav-item",class:{active:t.dialogActive==s.type}},[e("div",{staticClass:"nav-title"},[t._v(t._s(t.$L(s.name)))]),e("Badge",{staticClass:"nav-num",attrs:{"overflow-count":999,count:t.msgUnread(s.type)}})],1)])}),1)],1),t._l(t.typeItems,function(s,i){return e("div",{key:i,class:{active:t.dialogActive==s.type},on:{click:function(o){return t.onActive(s.type)}}},[e("div",{staticClass:"nav-title"},[e("em",[t._v(t._s(t.$L(s.name)))]),e("Badge",{staticClass:"nav-num",attrs:{"overflow-count":999,count:t.msgUnread(s.type)}})],1)])})],2):t._e(),t.$isEEUiApp&&!t.appNotificationPermission?e("div",{staticClass:"messenger-notify-permission",on:{click:t.onOpenAppSetting}},[t._v(" "+t._s(t.$L("\u672A\u5F00\u542F\u901A\u77E5\u6743\u9650"))),e("i",{staticClass:"taskfont"},[t._v("\uE733")])]):t._e(),e("Scrollbar",{ref:"list",staticClass:"messenger-list",attrs:{"hide-bar":this.operateVisible},on:{"on-scroll":t.listScroll},nativeOn:{touchstart:function(s){return t.listTouch.apply(null,arguments)}}},[t.tabActive==="dialog"?e("ul",{ref:"ul",staticClass:"dialog"},t._l(t.dialogList,function(s,i){return t.dialogList.length>0?e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:i,ref:`dialog_${s.id}`,refInFor:!0,class:t.dialogClass(s),style:{"background-color":s.color},attrs:{"data-id":s.id},on:{click:function(o){return t.openDialog({dialog_id:s.id,search_msg_id:s.search_msg_id})}}},[s.type=="group"?[s.avatar?e("EAvatar",{staticClass:"img-avatar",attrs:{src:s.avatar,size:42}}):s.group_type=="department"?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):s.group_type=="project"?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):s.group_type=="task"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):s.group_type=="okr"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:s.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{userid:s.dialog_user.userid,size:42}})],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}}),e("div",{staticClass:"dialog-box"},[e("div",{staticClass:"dialog-title"},[s.todo_num?e("div",{staticClass:"todo"},[t._v("["+t._s(t.$L("\u5F85\u529E"))+t._s(t.formatTodoNum(s.todo_num))+"]")]):t._e(),t.$A.getDialogMention(s)>0?e("div",{staticClass:"mention"},[t._v("[@"+t._s(t.$A.getDialogMention(s))+"]")]):t._e(),s.bot?e("div",{staticClass:"taskfont bot"},[t._v("\uE68C")]):t._e(),t._l(t.$A.dialogTags(s),function(o){return o.color!="success"?[e("Tag",{attrs:{color:o.color,fade:!1},on:{"on-click":function(r){return t.openDialog(s.id)}}},[t._v(t._s(t.$L(o.text)))])]:t._e()}),e("span",[t._v(t._s(s.name))]),s.type=="user"&&t.lastMsgReadDone(s.last_msg)&&s.dialog_user.userid!=t.userId?e("Icon",{attrs:{type:t.lastMsgReadDone(s.last_msg)}}):t._e(),s.last_at?e("em",[t._v(t._s(t.$A.formatTime(s.last_at)))]):t._e()],2),e("div",{staticClass:"dialog-text no-dark-content"},[s.extra_draft_has&&s.id!=t.dialogId?[e("div",{staticClass:"last-draft"},[t._v("["+t._s(t.$L("\u8349\u7A3F"))+"]")]),e("div",{staticClass:"last-text"},[e("span",[t._v(t._s(t.formatDraft(s.extra_draft_content)))])])]:[s.type=="group"&&s.last_msg&&s.last_msg.userid?[s.last_msg.userid==t.userId?e("div",{staticClass:"last-self"},[t._v(t._s(t.$L("\u4F60")))]):e("UserAvatar",{attrs:{userid:s.last_msg.userid,"show-name":!0,"show-icon":!1}})]:t._e(),e("div",{staticClass:"last-text"},[t.formatMsgEmojiDesc(s.last_msg)?e("em",[t._v(t._s(t.formatMsgEmojiDesc(s.last_msg)))]):t._e(),e("span",[t._v(t._s(t.$A.getMsgSimpleDesc(s.last_msg)))])])],s.silence?e("div",{staticClass:"taskfont last-silence"},[t._v("\uE7D7")]):t._e()],2)]),e("Badge",{staticClass:"dialog-num",attrs:{type:s.silence?"normal":"error","overflow-count":999,count:t.$A.getDialogUnread(s,!0)}}),e("div",{staticClass:"dialog-line"})],2):t.dialogSearchLoad===0?e("li",{staticClass:"nothing"},[t._v(" "+t._s(t.$L(t.dialogSearchKey?`\u6CA1\u6709\u4EFB\u4F55\u4E0E"${t.dialogSearchKey}"\u76F8\u5173\u7684\u4F1A\u8BDD`:"\u6CA1\u6709\u4EFB\u4F55\u4F1A\u8BDD"))+" ")]):t._e()}),0):e("ul",{staticClass:"contacts"},[t.contactsFilter.length===0?[t.contactsLoad>0?e("li",{staticClass:"loading"},[e("Loading")],1):e("li",{staticClass:"nothing"},[t._v(" "+t._s(t.$L(t.contactsKey?`\u6CA1\u6709\u4EFB\u4F55\u4E0E"${t.contactsKey}"\u76F8\u5173\u7684\u8054\u7CFB\u4EBA`:"\u6CA1\u6709\u4EFB\u4F55\u8054\u7CFB\u4EBA"))+" ")])]:[t._l(t.contactsList,function(s){return e("li",[e("div",{staticClass:"label"},[t._v(t._s(s.az))]),e("ul",t._l(s.list,function(i,o){return e("li",{key:o,on:{click:function(r){return t.openContacts(i)}}},[e("div",{staticClass:"avatar"},[e("UserAvatar",{attrs:{userid:i.userid,size:30}})],1),e("div",{staticClass:"nickname"},[e("em",[t._v(t._s(i.nickname))]),i.tags?e("div",{staticClass:"tags"},t._l(i.tags,function(r){return e("span",{style:t.tagField(r,"style")},[t._v(t._s(t.tagField(r,"label")))])}),0):t._e()]),i.loading?e("div",{staticClass:"loading"},[e("Loading")],1):t._e()])}),0)])}),e("li",{staticClass:"loaded"},[t.contactsKey?[t._v(t._s(t.$L("\u641C\u7D22\u5230"+t.contactsFilter.length+"\u4F4D\u8054\u7CFB\u4EBA")))]:[t._v(t._s(t.$L("\u5171"+t.contactsTotal+"\u4F4D\u8054\u7CFB\u4EBA")))]],2)]],2),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLandscape?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(s){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{staticClass:"messenger-dialog-operation",attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(s){return t.handleTopClick.apply(null,arguments)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(t.operateItem.top_at?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"))+" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.operateItem.top_at?"":"")}})])]),e("DropdownItem",{nativeOn:{click:function(s){return t.handleReadClick.apply(null,arguments)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(t.$A.getDialogUnread(t.operateItem,!0)>0?"\u6807\u8BB0\u5DF2\u8BFB":"\u6807\u8BB0\u672A\u8BFB"))+" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.$A.getDialogUnread(t.operateItem,!0)>0?"":"")}})])]),e("DropdownItem",{attrs:{disabled:t.silenceDisabled(t.operateItem)},nativeOn:{click:function(s){return t.handleSilenceClick.apply(null,arguments)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(t.operateItem.silence?"\u5141\u8BB8\u6D88\u606F\u901A\u77E5":"\u6D88\u606F\u514D\u6253\u6270"))+" "),e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(t.operateItem.silence?"":"")}})])]),t._l(t.taskColorList,function(s,i){return i<6?e("DropdownItem",{key:"c_"+i,attrs:{divided:i==0},nativeOn:{click:function(o){return t.handleColorClick(s.color)}}},[e("div",{staticClass:"item"},[t._v(" "+t._s(t.$L(s.name))+" "),e("i",{staticClass:"taskfont color",style:{color:s.primary||"#ddd"},domProps:{innerHTML:t._s(s.color==(t.operateItem.color||"")?"":"")}})])]):t._e()})],2)],1)],1)]),e("div",{staticClass:"messenger-menu"},[e("div",{staticClass:"menu-icon"},[e("Icon",{class:{active:t.tabActive==="dialog"},attrs:{type:"ios-chatbubbles"},on:{click:function(s){return t.onActive(null)}}}),e("Badge",{staticClass:"menu-num",attrs:{"overflow-count":999,count:t.msgUnread("all")}})],1),e("div",{staticClass:"menu-icon"},[e("Icon",{class:{active:t.tabActive==="contacts"},attrs:{type:"md-person"},on:{click:function(s){t.tabActive="contacts"}}})],1)])],1),t.activeNum>0&&t.routeName==="manage-messenger"?e("div",{staticClass:"messenger-msg"},[e("div",{staticClass:"msg-dialog-bg"},[e("div",{staticClass:"msg-dialog-bg-icon"},[e("Icon",{attrs:{type:"ios-chatbubbles"}})],1),e("div",{staticClass:"msg-dialog-bg-text"},[t._v(t._s(t.$L("\u9009\u62E9\u4E00\u4E2A\u4F1A\u8BDD\u5F00\u59CB\u804A\u5929")))])]),t.windowLandscape&&t.dialogId>0?e("DialogWrapper",{attrs:{dialogId:t.dialogId,"auto-focus":t.$A.isDesktop(),"is-messenger":""},on:{"on-active":t.scrollIntoActive}}):t._e()],1):t._e()])],1)},_=[];const d={menuHistory:[]},v={components:{DialogWrapper:g},directives:{longpress:f},data(){return{activeNum:0,tabActive:"dialog",dialogSearchLoad:0,dialogSearchKey:"",dialogSearchList:[],dialogActive:"",dialogMenus:[{type:"",name:"\u5168\u90E8"},{type:"project",name:"\u9879\u76EE"},{type:"task",name:"\u4EFB\u52A1"},{type:"user",name:"\u5355\u804A"},{type:"group",name:"\u7FA4\u804A"},{type:"bot",name:"\u673A\u5668\u4EBA"}],dialogHistory:d.menuHistory,contactsKey:"",contactsLoad:0,contactsData:null,contactsTotal:0,contactsCurrentPage:1,contactsHasMorePages:!1,contactsLastTime:0,operateItem:{},operateStyles:{},operateVisible:!1,clickAgainSubscribe:null}},async beforeRouteEnter(t,a,e){d.menuHistory=await $A.IDBArray("dialogMenuHistory"),e()},mounted(){const t=$A.runNum(this.$route.query.dialog_id);t>0&&this.openDialog(t),this.clickAgainSubscribe=l.Store.subscribe("clickAgainDialog",this.shakeUnread)},beforeDestroy(){this.clickAgainSubscribe&&(this.clickAgainSubscribe.unsubscribe(),this.clickAgainSubscribe=null),document.removeEventListener("keydown",this.shortcutEvent)},activated(){this.updateDialogs(1e3),this.$nextTick(t=>this.activeNum++),$A.isEEUiApp&&$A.eeuiAppSendMessage({action:"getNotificationPermission"})},deactivated(){this.updateDialogs(-1),this.$nextTick(t=>this.activeNum--)},computed:{...h(["cacheDialogs","loadDialogs","dialogId","messengerSearchKey","appNotificationPermission","taskColorList"]),routeName(){return this.$route.name},typeItems(){const{dialogActive:t,dialogMenus:a,dialogHistory:e}=this,s=[];return this.dialogHistory.includes(t)?s.push(...this.dialogHistory):(s.push(""),t&&s.push(t),e.some(i=>{s.includes(i)||s.push(i)}),["project","task","user"].some(i=>{s.includes(i)||s.push(i)}),this.dialogHistory=s.slice(0,4),$A.IDBSave("dialogMenuHistory",this.dialogHistory)),this.dialogHistory.map(i=>a.find(o=>o.type==i))},dialogList(){const{dialogActive:t,dialogSearchKey:a,dialogSearchList:e}=this;return e.length>0?e.sort((i,o)=>(i.is_search===!0?1:0)-(o.is_search===!0?1:0)):t==""&&a==""?this.cacheDialogs.filter(i=>this.filterDialog(i)).sort(this.dialogSort):this.cacheDialogs.filter(i=>{if(!this.filterDialog(i))return!1;if(a){const{name:o,pinyin:r,last_msg:n}=i;let c=`${o} ${r}`;if(n)switch(n.type){case"text":c+=` ${n.msg.text.replace(/<[^>]+>/g,"")}`;break;case"meeting":case"file":c+=` ${n.msg.name}`;break}if(!$A.strExists(c,a))return!1}else if(t)switch(t){case"project":case"task":if(t!=i.group_type)return!1;break;case"user":if(t!=i.type||i.bot)return!1;break;case"group":if(t!=i.type||["project","task"].includes(i.group_type))return!1;break;case"bot":if(!i.bot)return!1;break;default:return!1}return!0}).sort(this.dialogSort)},contactsFilter(){const{contactsData:t,contactsKey:a}=this;return t===null?[]:a?t.filter(e=>$A.strExists(`${e.email} ${e.nickname} ${e.profession} ${e.pinyin}`,a)):t},contactsList(){const t=[];return this.contactsFilter.some(a=>{let e=a.az?a.az.toUpperCase():"#",s=t.find(i=>i.az==e);s?s.list.findIndex(({userid:i})=>i==a.userid)===-1&&s.list.push(a):t.push({az:e,list:[a]})}),t},msgUnread(){return function(t){let a=0;return this.cacheDialogs.some(e=>{switch(t){case"project":case"task":if(t!=e.group_type)return!1;break;case"user":if(t!=e.type||e.bot)return!1;break;case"group":if(t!=e.type||["project","task"].includes(e.group_type))return!1;break;case"bot":if(!e.bot)return!1;break}a+=$A.getDialogNum(e)}),a}}},watch:{$route:{handler({params:t}){if(["dialog","contacts"].includes(t.dialogAction)&&(this.tabActive=t.dialogAction),t.dialog_id){this.tabActive="dialog";const a=$A.runNum(t.dialog_id);a>0&&this.openDialog(a),this.clickAgainSubscribe=l.Store.subscribe("clickAgainDialog",this.shakeUnread)}},immediate:!0},messengerSearchKey:{handler(t){this.$nextTick(a=>{this.dialogSearchKey=t.dialog,this.contactsKey=t.contacts})},deep:!0},dialogSearchKey(t){switch(this.$store.state.messengerSearchKey.dialog=t,t){case"log.o":$A.IDBSet("logOpen","open").then(a=>{$A.reloadUrl()});break;case"log.c":$A.IDBSet("logOpen","close").then(a=>{$A.reloadUrl()});break}this.dialogSearchList=[],t!=""&&(this.__searchTimer&&clearTimeout(this.__searchTimer),this.__searchTimer=setTimeout(this.searchDialog,600),this.dialogSearchLoad++,setTimeout(a=>this.dialogSearchLoad--,600))},contactsKey(t){this.$store.state.messengerSearchKey.contacts=t,t!=""&&(this.contactsLoad++,setTimeout(()=>{this.contactsKey==t&&this.getContactsList(1),this.contactsLoad--},600))},tabActive:{handler(t){t=="contacts"?($A.Time()-this.contactsLastTime>24*3600&&(this.contactsData=null),this.contactsData===null?this.getContactsList(1):this.updateContactsList(1e3)):this.updateDialogs(1e3)},immediate:!0},dialogId:{handler(t){t>0&&this.scrollIntoActive()},immediate:!0}},methods:{listTouch(){var t;(t=this.$refs.navMenu)!=null&&t.visible&&this.$refs.navMenu.hide()},listScroll(){this.scrollE()<10&&this.getContactsNextPage(),this.operateVisible=!1},scrollE(){return this.$refs.list?this.$refs.list.scrollInfo().scrollE:0},onKeydown(t){t.key==="Escape"&&this.$refs.searchInput.handleClear()},onActive(t){if(t===null){if(this.tabActive!=="dialog"){this.tabActive="dialog";return}t=this.dialogActive}this.dialogActive==t?this.shakeUnread():this.dialogActive=t},shakeUnread(){var a;let t=this.dialogList.findIndex(e=>$A.getDialogNum(e)>0);if(t===-1&&(t=this.dialogList.findIndex(e=>e.todo_num>0)),t===-1&&(t=this.dialogList.findIndex(e=>$A.getDialogUnread(e,!0)>0)),t>-1){const e=this.$refs[`dialog_${(a=this.dialogList[t])==null?void 0:a.id}`];if(e&&e[0]){if(e[0].classList.contains("common-shake"))return;$A.scrollIntoViewIfNeeded(e[0]),requestAnimationFrame(s=>{e[0].classList.add("common-shake"),setTimeout(i=>{e[0].classList.remove("common-shake")},600)})}}},dialogClass(t){return this.dialogSearchKey?null:{top:t.top_at,active:t.id==this.dialogId,operate:this.operateVisible&&t.id==this.operateItem.id,completed:$A.dialogCompleted(t)}},dialogSort(t,a){return t.top_at||a.top_at?$A.Date(a.top_at)-$A.Date(t.top_at):t.todo_num>0||a.todo_num>0?a.todo_num-t.todo_num:t.extra_draft_has||a.extra_draft_has?a.extra_draft_has-t.extra_draft_has:$A.Date(a.last_at)-$A.Date(t.last_at)},openDialog(t){this.operateVisible||($A.isJson(t)&&$A.leftExists(t.dialog_id,"u:")?this.$store.dispatch("openDialogUserid",$A.leftDelete(t.dialog_id,"u:")).catch(({msg:a})=>{$A.modalError(a)}):this.$store.dispatch("openDialog",t))},openContacts(t){t.loading||(this.$set(t,"loading",!0),this.$store.dispatch("openDialogUserid",t.userid).then(a=>{this.windowLandscape&&(this.tabActive="dialog")}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.$set(t,"loading",!1)}))},tagField(t,a){switch($A.isJson(t)||(t={label:t}),a){case"style":return t.style||null;case"label":return t.label}return null},filterDialog(t){if(t.id>0&&t.id==this.dialogId||t.top_at||t.todo_num>0||$A.getDialogNum(t)>0)return!0;if(t.name===void 0||t.dialog_delete===1||!t.last_at)return!1;if(t.type=="group"&&["project","task"].includes(t.group_type)&&$A.isJson(t.group_info)){if(t.group_type=="task"&&t.group_info.complete_at){let a=Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.complete_at,!0));if(5*86400+a<$A.Time())return!1}if(t.group_info.deleted_at){let a=Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.deleted_at,!0));if(2*86400+a<$A.Time())return!1}if(t.group_info.archived_at){let a=Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.archived_at,!0));if(3*86400+a<$A.Time())return!1}}return!0},searchDialog(){const t=this.dialogSearchKey;t!=""&&(this.dialogSearchLoad++,this.$store.dispatch("call",{url:"dialog/search",data:{key:t}}).then(({data:a})=>{if(t!==this.dialogSearchKey)return;const e=$A.cloneJSON(this.dialogList),s=[],i=[];e.forEach(o=>{o.last_msg&&!s.includes(o.last_msg.id)&&s.push(o.last_msg.id),o.dialog_user&&!i.includes(o.dialog_user.userid)&&i.push(o.dialog_user.userid)}),a.some(o=>{$A.leftExists(o.id,"u:")?i.includes(o.dialog_user.userid)||e.push(Object.assign(o,{is_search:!0})):(!o.last_msg||!s.includes(o.last_msg.id))&&e.push(Object.assign(o,{is_search:!0}))}),this.dialogSearchList=e}).finally(a=>{this.dialogSearchLoad--}))},getContactsList(t){this.contactsLoad++;const a=this.contactsKey;this.$store.dispatch("call",{url:"users/search",data:{keys:{key:a},sorts:{az:"asc"},page:t,pagesize:50}}).then(({data:e})=>{a==""&&(this.contactsTotal=e.total),this.contactsData===null&&(this.contactsData=[]),e.data.some(s=>{this.contactsData.findIndex(i=>i.userid==s.userid)===-1&&this.contactsData.push(s)}),this.contactsCurrentPage=e.current_page,this.contactsHasMorePages=e.current_page{a==""&&(this.contactsTotal=0),this.contactsHasMorePages=!1}).finally(e=>{this.contactsLoad--,this.contactsLastTime=$A.Time()})},getContactsNextPage(){this.scrollE()<10&&this.tabActive==="contacts"&&this.contactsLoad===0&&this.contactsHasMorePages&&this.getContactsList(this.contactsCurrentPage+1)},updateContactsList(t){this.__updateContactsList&&clearTimeout(this.__updateContactsList),t>-1&&(this.__updateContactsList=setTimeout(a=>{this.tabActive==="contacts"&&this.$store.dispatch("call",{url:"users/search",data:{updated_time:this.contactsLastTime,take:100}}).then(({data:e})=>{e.some(s=>{const i=this.contactsData.findIndex(o=>o.userid==s.userid);i>-1?this.contactsData.splice(i,1,s):this.contactsData.push(s)})}).finally(e=>{this.contactsLastTime=$A.Time()})},t))},formatDraft(t){return(t==null?void 0:t.replace(/]*>/gi,`[${$A.L("\u56FE\u7247")}]`).replace(/<[^>]*>/g,""))||null},formatTodoNum(t){return t>999?"999+":t>1?t:""},formatMsgEmojiDesc(t){return $A.isJson(t)&&$A.arrayLength(t.emoji)>0?t.emoji[0].symbol:null},lastMsgReadDone(t){if($A.isJson(t)){const{userid:a,percentage:e}=t;if(a===this.userId)return e===100?"md-done-all":"md-checkmark"}return null},scrollIntoActive(){this.$nextTick(()=>{if(this.windowLandscape&&this.$refs.list){const t=this.$refs.list.querySelector(".active");t?$A.scrollIntoViewIfNeeded(t):this.cacheDialogs.find(({id:e})=>e==this.dialogId)&&this.dialogActive&&(this.dialogActive="",this.$nextTick(()=>{const e=this.$refs.list.querySelector(".active");e&&$A.scrollIntoViewIfNeeded(e)}))}})},handleLongpress(t,a){if(this.dialogSearchKey)return;const e=$A.getAttr(a,"data-id"),s=this.dialogList.find(i=>i.id==e);!s||(this.operateVisible=!1,this.operateItem=$A.isJson(s)?s:{},this.$nextTick(()=>{const i=a.getBoundingClientRect(),o=this.$refs.list.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-o.left}px`,top:`${i.top-i.height+this.windowScrollY}px`,height:i.height+"px"},this.operateVisible=!0}))},handleTopClick(){this.$store.dispatch("call",{url:"dialog/top",data:{dialog_id:this.operateItem.id}}).then(({data:t})=>{this.$store.dispatch("saveDialog",t),this.$nextTick(this.scrollIntoActive)}).catch(({msg:t})=>{$A.modalError(t)})},handleReadClick(){this.$store.dispatch("showSpinner",600),this.$store.dispatch("dialogMsgMark",{dialog_id:this.operateItem.id,type:$A.getDialogUnread(this.operateItem,!0)>0?"read":"unread"}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.$store.dispatch("hiddenSpinner")})},handleSilenceClick(){this.silenceDisabled(this.operateItem)||this.$store.dispatch("call",{url:"dialog/msg/silence",data:{dialog_id:this.operateItem.id,type:this.operateItem.silence?"cancel":"set"}}).then(({data:t})=>{this.$store.dispatch("saveDialog",t)}).catch(({msg:t})=>{$A.modalError(t)})},handleColorClick(t){this.$store.dispatch("call",{url:"dialog/msg/color",data:{dialog_id:this.operateItem.id,color:t}}).then(({data:a})=>{this.$store.dispatch("saveDialog",a)}).catch(({msg:a})=>{$A.modalError(a)})},updateDialogs(t){this.__updateDialogs&&clearTimeout(this.__updateDialogs),t>-1&&(this.__updateDialogs=setTimeout(a=>{this.tabActive==="dialog"&&this.$store.dispatch("getDialogs",{hideload:!0}).catch(()=>{})},t))},onOpenAppSetting(){$A.eeuiAppSendMessage({action:"gotoSetting"})},silenceDisabled(t){const{type:a,group_type:e}=t;return a==="group"&&e!=="user"}}},u={};var $=p(v,m,_,!1,y,null,null,null);function y(t){for(let a in u)this[a]=u[a]}var x=function(){return $.exports}();export{x as default}; diff --git a/public/js/build/password.64696635.js b/public/js/build/password.cfd6c864.js similarity index 97% rename from public/js/build/password.64696635.js rename to public/js/build/password.cfd6c864.js index 591b7b6c8..d7c316759 100644 --- a/public/js/build/password.64696635.js +++ b/public/js/build/password.cfd6c864.js @@ -1 +1 @@ -import{m as o,n as i}from"./app.6c8b31b1.js";var n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"setting-item submit"},[s("Form",{ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(r){r.preventDefault()}}},[t.userInfo.changepass?s("Alert",{staticStyle:{"margin-bottom":"32px"},attrs:{type:"warning",showIcon:""}},[t._v(t._s(t.$L("\u8BF7\u5148\u4FEE\u6539\u767B\u5F55\u5BC6\u7801\uFF01")))]):t._e(),s("FormItem",{attrs:{label:t.$L("\u65E7\u5BC6\u7801"),prop:"oldpass"}},[s("Input",{attrs:{type:"password"},model:{value:t.formDatum.oldpass,callback:function(r){t.$set(t.formDatum,"oldpass",r)},expression:"formDatum.oldpass"}})],1),s("FormItem",{attrs:{label:t.$L("\u65B0\u5BC6\u7801"),prop:"newpass"}},[s("Input",{attrs:{type:"password"},model:{value:t.formDatum.newpass,callback:function(r){t.$set(t.formDatum,"newpass",r)},expression:"formDatum.newpass"}})],1),s("FormItem",{attrs:{label:t.$L("\u786E\u8BA4\u65B0\u5BC6\u7801"),prop:"checkpass"}},[s("Input",{attrs:{type:"password"},model:{value:t.formDatum.checkpass,callback:function(r){t.$set(t.formDatum,"checkpass",r)},expression:"formDatum.checkpass"}})],1)],1),s("div",{staticClass:"setting-footer"},[s("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),s("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},m=[];const l={data(){return{loadIng:0,formDatum:{oldpass:"",newpass:"",checkpass:""},ruleDatum:{oldpass:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801\uFF01"),trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],newpass:[{validator:(t,e,s)=>{e===""?s(new Error(this.$L("\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):(this.formDatum.checkpass!==""&&this.$refs.formDatum.validateField("checkpass"),s())},required:!0,trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],checkpass:[{validator:(t,e,s)=>{e===""?s(new Error(this.$L("\u8BF7\u91CD\u65B0\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):e!==this.formDatum.newpass?s(new Error(this.$L("\u4E24\u6B21\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4\uFF01"))):s()},required:!0,trigger:"change"}]}}},computed:{...o(["userInfo","formLabelPosition","formLabelWidth"])},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/editpass",data:this.formDatum}).then(({data:e})=>{$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("saveUserInfo",e),this.$refs.formDatum.resetFields()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()}}},a={};var u=i(l,n,m,!1,p,null,null,null);function p(t){for(let e in a)this[e]=a[e]}var f=function(){return u.exports}();export{f as default}; +import{m as o,n as i}from"./app.6910ca56.js";var n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"setting-item submit"},[s("Form",{ref:"formDatum",attrs:{model:t.formDatum,rules:t.ruleDatum,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(r){r.preventDefault()}}},[t.userInfo.changepass?s("Alert",{staticStyle:{"margin-bottom":"32px"},attrs:{type:"warning",showIcon:""}},[t._v(t._s(t.$L("\u8BF7\u5148\u4FEE\u6539\u767B\u5F55\u5BC6\u7801\uFF01")))]):t._e(),s("FormItem",{attrs:{label:t.$L("\u65E7\u5BC6\u7801"),prop:"oldpass"}},[s("Input",{attrs:{type:"password"},model:{value:t.formDatum.oldpass,callback:function(r){t.$set(t.formDatum,"oldpass",r)},expression:"formDatum.oldpass"}})],1),s("FormItem",{attrs:{label:t.$L("\u65B0\u5BC6\u7801"),prop:"newpass"}},[s("Input",{attrs:{type:"password"},model:{value:t.formDatum.newpass,callback:function(r){t.$set(t.formDatum,"newpass",r)},expression:"formDatum.newpass"}})],1),s("FormItem",{attrs:{label:t.$L("\u786E\u8BA4\u65B0\u5BC6\u7801"),prop:"checkpass"}},[s("Input",{attrs:{type:"password"},model:{value:t.formDatum.checkpass,callback:function(r){t.$set(t.formDatum,"checkpass",r)},expression:"formDatum.checkpass"}})],1)],1),s("div",{staticClass:"setting-footer"},[s("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),s("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},m=[];const l={data(){return{loadIng:0,formDatum:{oldpass:"",newpass:"",checkpass:""},ruleDatum:{oldpass:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801\uFF01"),trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],newpass:[{validator:(t,e,s)=>{e===""?s(new Error(this.$L("\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):(this.formDatum.checkpass!==""&&this.$refs.formDatum.validateField("checkpass"),s())},required:!0,trigger:"change"},{type:"string",min:6,message:this.$L("\u5BC6\u7801\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],checkpass:[{validator:(t,e,s)=>{e===""?s(new Error(this.$L("\u8BF7\u91CD\u65B0\u8F93\u5165\u65B0\u5BC6\u7801\uFF01"))):e!==this.formDatum.newpass?s(new Error(this.$L("\u4E24\u6B21\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4\uFF01"))):s()},required:!0,trigger:"change"}]}}},computed:{...o(["userInfo","formLabelPosition","formLabelWidth"])},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&(this.loadIng++,this.$store.dispatch("call",{url:"users/editpass",data:this.formDatum}).then(({data:e})=>{$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("saveUserInfo",e),this.$refs.formDatum.resetFields()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--}))})},resetForm(){this.$refs.formDatum.resetFields()}}},a={};var u=i(l,n,m,!1,p,null,null,null);function p(t){for(let e in a)this[e]=a[e]}var f=function(){return u.exports}();export{f as default}; diff --git a/public/js/build/personal.590980db.js b/public/js/build/personal.f12e3d14.js similarity index 96% rename from public/js/build/personal.590980db.js rename to public/js/build/personal.f12e3d14.js index b072aa4c6..62102af05 100644 --- a/public/js/build/personal.590980db.js +++ b/public/js/build/personal.f12e3d14.js @@ -1 +1 @@ -import{I as i}from"./ImgUpload.0e64a5a8.js";import{m as o,n}from"./app.6c8b31b1.js";var m=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5934\u50CF"),prop:"userimg"}},[e("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:t.formData.userimg,callback:function(a){t.$set(t.formData,"userimg",a)},expression:"formData.userimg"}}),e("span",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A200x200")))])],1),e("FormItem",{attrs:{label:t.$L("\u90AE\u7BB1"),prop:"email"}},[e("Input",{attrs:{disabled:""},model:{value:t.userInfo.email,callback:function(a){t.$set(t.userInfo,"email",a)},expression:"userInfo.email"}})],1),e("FormItem",{attrs:{label:t.$L("\u7535\u8BDD"),prop:"tel"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD")},model:{value:t.formData.tel,callback:function(a){t.$set(t.formData,"tel",a)},expression:"formData.tel"}})],1),e("FormItem",{attrs:{label:t.$L("\u6635\u79F0"),prop:"nickname"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u6635\u79F0")},model:{value:t.formData.nickname,callback:function(a){t.$set(t.formData,"nickname",a)},expression:"formData.nickname"}})],1),e("FormItem",{attrs:{label:t.$L("\u804C\u4F4D/\u804C\u79F0"),prop:"profession"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u804C\u4F4D/\u804C\u79F0")},model:{value:t.formData.profession,callback:function(a){t.$set(t.formData,"profession",a)},expression:"formData.profession"}})],1)],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const f={components:{ImgUpload:i},data(){return{loadIng:0,formData:{userimg:"",email:"",tel:"",nickname:"",profession:""},ruleData:{email:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740\uFF01"),trigger:"change"}],tel:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD\uFF01"),trigger:"change"},{type:"string",min:6,message:this.$L("\u7535\u8BDD\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],nickname:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u6635\u79F0\uFF01"),trigger:"change"},{type:"string",min:2,message:this.$L("\u6635\u79F0\u957F\u5EA6\u81F3\u5C112\u4F4D\uFF01"),trigger:"change"}]}}},mounted(){this.initData()},computed:{...o(["userInfo","formLabelPosition","formLabelWidth"])},watch:{userInfo(){this.initData()}},methods:{initData(){this.$set(this.formData,"userimg",$A.strExists(this.userInfo.userimg,"/avatar")?"":this.userInfo.userimg),this.$set(this.formData,"email",this.userInfo.email),this.$set(this.formData,"tel",this.userInfo.tel),this.$set(this.formData,"nickname",typeof this.userInfo.nickname_original!="undefined"?this.userInfo.nickname_original:this.userInfo.nickname),this.$set(this.formData,"profession",this.userInfo.profession),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{if(t){let s=$A.cloneJSON(this.formData);$A.count(s.userimg)==0&&(s.userimg=""),this.loadIng++,this.$store.dispatch("call",{url:"users/editdata",data:s}).then(()=>{$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("getUserInfo").catch(()=>{})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--})}})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},r={};var u=n(f,m,l,!1,c,null,null,null);function c(t){for(let s in r)this[s]=r[s]}var g=function(){return u.exports}();export{g as default}; +import{I as i}from"./ImgUpload.8863e78d.js";import{m as o,n}from"./app.6910ca56.js";var m=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5934\u50CF"),prop:"userimg"}},[e("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:t.formData.userimg,callback:function(a){t.$set(t.formData,"userimg",a)},expression:"formData.userimg"}}),e("span",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A200x200")))])],1),e("FormItem",{attrs:{label:t.$L("\u90AE\u7BB1"),prop:"email"}},[e("Input",{attrs:{disabled:""},model:{value:t.userInfo.email,callback:function(a){t.$set(t.userInfo,"email",a)},expression:"userInfo.email"}})],1),e("FormItem",{attrs:{label:t.$L("\u7535\u8BDD"),prop:"tel"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD")},model:{value:t.formData.tel,callback:function(a){t.$set(t.formData,"tel",a)},expression:"formData.tel"}})],1),e("FormItem",{attrs:{label:t.$L("\u6635\u79F0"),prop:"nickname"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u6635\u79F0")},model:{value:t.formData.nickname,callback:function(a){t.$set(t.formData,"nickname",a)},expression:"formData.nickname"}})],1),e("FormItem",{attrs:{label:t.$L("\u804C\u4F4D/\u804C\u79F0"),prop:"profession"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u804C\u4F4D/\u804C\u79F0")},model:{value:t.formData.profession,callback:function(a){t.$set(t.formData,"profession",a)},expression:"formData.profession"}})],1)],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const f={components:{ImgUpload:i},data(){return{loadIng:0,formData:{userimg:"",email:"",tel:"",nickname:"",profession:""},ruleData:{email:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740\uFF01"),trigger:"change"}],tel:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD\uFF01"),trigger:"change"},{type:"string",min:6,message:this.$L("\u7535\u8BDD\u957F\u5EA6\u81F3\u5C116\u4F4D\uFF01"),trigger:"change"}],nickname:[{required:!0,message:this.$L("\u8BF7\u8F93\u5165\u6635\u79F0\uFF01"),trigger:"change"},{type:"string",min:2,message:this.$L("\u6635\u79F0\u957F\u5EA6\u81F3\u5C112\u4F4D\uFF01"),trigger:"change"}]}}},mounted(){this.initData()},computed:{...o(["userInfo","formLabelPosition","formLabelWidth"])},watch:{userInfo(){this.initData()}},methods:{initData(){this.$set(this.formData,"userimg",$A.strExists(this.userInfo.userimg,"/avatar")?"":this.userInfo.userimg),this.$set(this.formData,"email",this.userInfo.email),this.$set(this.formData,"tel",this.userInfo.tel),this.$set(this.formData,"nickname",typeof this.userInfo.nickname_original!="undefined"?this.userInfo.nickname_original:this.userInfo.nickname),this.$set(this.formData,"profession",this.userInfo.profession),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{if(t){let s=$A.cloneJSON(this.formData);$A.count(s.userimg)==0&&(s.userimg=""),this.loadIng++,this.$store.dispatch("call",{url:"users/editdata",data:s}).then(()=>{$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.dispatch("getUserInfo").catch(()=>{})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--})}})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},r={};var u=n(f,m,l,!1,c,null,null,null);function c(t){for(let s in r)this[s]=r[s]}var g=function(){return u.exports}();export{g as default}; diff --git a/public/js/build/preview.0ba2d7e4.js b/public/js/build/preview.0ba2d7e4.js new file mode 100644 index 000000000..1a98b385c --- /dev/null +++ b/public/js/build/preview.0ba2d7e4.js @@ -0,0 +1 @@ +import"./app.6910ca56.js";import{B as f}from"./app.6910ca56.js";export{f as default}; diff --git a/public/js/build/preview.438bb1b4.js b/public/js/build/preview.438bb1b4.js deleted file mode 100644 index 840496241..000000000 --- a/public/js/build/preview.438bb1b4.js +++ /dev/null @@ -1 +0,0 @@ -import"./app.6c8b31b1.js";import{B as f}from"./app.6c8b31b1.js";export{f as default}; diff --git a/public/js/build/pro.e5312bee.js b/public/js/build/pro.011c4bd5.js similarity index 85% rename from public/js/build/pro.e5312bee.js rename to public/js/build/pro.011c4bd5.js index 5359a51f2..01a6ba33b 100644 --- a/public/js/build/pro.e5312bee.js +++ b/public/js/build/pro.011c4bd5.js @@ -1 +1 @@ -import{n as i,l as t}from"./app.6c8b31b1.js";var l=function(){var n=this,e=n.$createElement,o=n._self._c||e;return o("div")},a=[];const s={mounted(){t==="zh"||t==="zh-CHT"?window.location.href=$A.apiUrl("../site/zh/price.html"):window.location.href=$A.apiUrl("../site/en/price.html")}},r={};var c=i(s,l,a,!1,_,null,null,null);function _(n){for(let e in r)this[e]=r[e]}var p=function(){return c.exports}();export{p as default}; +import{n as i,l as t}from"./app.6910ca56.js";var l=function(){var n=this,e=n.$createElement,o=n._self._c||e;return o("div")},a=[];const s={mounted(){t==="zh"||t==="zh-CHT"?window.location.href=$A.apiUrl("../site/zh/price.html"):window.location.href=$A.apiUrl("../site/en/price.html")}},r={};var c=i(s,l,a,!1,_,null,null,null);function _(n){for(let e in r)this[e]=r[e]}var p=function(){return c.exports}();export{p as default}; diff --git a/public/js/build/project.ff447f31.js b/public/js/build/project.38fc5178.js similarity index 99% rename from public/js/build/project.ff447f31.js rename to public/js/build/project.38fc5178.js index f209f0a83..cc75fa8d6 100644 --- a/public/js/build/project.ff447f31.js +++ b/public/js/build/project.38fc5178.js @@ -1 +1 @@ -import{m as p,n as d,a as g,D as P,b as w,t as N}from"./app.6c8b31b1.js";import{T as E,P as O}from"./ProjectLog.d63fd8b4.js";import{T as M}from"./TaskMenu.a0d74239.js";import{D as z}from"./index.31386d23.js";import{U as F}from"./UserSelect.d62f565b.js";import{U as R}from"./tip.517649f6.js";import{D as U}from"./DialogWrapper.5fcf71c2.js";import{l as B}from"./longpress.43ca7fd9.js";import"./ImgUpload.0e64a5a8.js";import"./details.6749696e.js";var V=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.rowMode?e("Row",{staticClass:"task-add-row"},[e("Col",{class:["row-add",t.active?"active":""],attrs:{span:"12"}},[e("div",{staticClass:"add-input",on:{mouseenter:function(a){t.mouseEnter=!0},mouseleave:function(a){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"\u63CF\u8FF0\uFF0C\u56DE\u8F66\u521B\u5EFA"),enterkeyhint:"done"},on:{"on-focus":function(a){t.onFocus=!0},"on-blur":function(a){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}}),t.parentId==0?e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,function(a,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.taskPriorityContent(a)}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.addData.p_name==a.name?"":"")},on:{click:function(i){return t.choosePriority(a)}}})]):t._e()],1)}),0),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1):t._e()],1),e("div",{staticClass:"add-btn",on:{click:t.openAdd}},[e("Icon",{staticClass:"add-icon",attrs:{type:"md-add"}}),t._v(t._s(t.$L("\u6DFB\u52A0"+t.typeName))+" ")],1)]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1):e("div",{class:["task-add-simple",t.active?"active":""],on:{mouseenter:function(a){t.mouseEnter=!0},mouseleave:function(a){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"\u63CF\u8FF0\uFF0C\u56DE\u8F66\u521B\u5EFA"),enterkeyhint:"done"},on:{"on-focus":function(a){t.onFocus=!0},"on-blur":function(a){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}}),e("div",{staticClass:"add-placeholder",on:{click:t.openAdd}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("\u6DFB\u52A0"+t.typeName))+" ")],1),e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,function(a,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.taskPriorityContent(a)}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.addData.p_name==a.name?"":"")},on:{click:function(i){return t.choosePriority(a)}}})]):t._e()],1)}),0),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)},H=[];const K={name:"TaskAddSimple",props:{parentId:{type:Number,default:0},projectId:{type:Number,default:0},columnId:{type:Number,default:0},addTop:{type:Boolean,default:!1},autoActive:{type:Boolean,default:!1},rowMode:{type:Boolean,default:!1}},data(){return{addData:{name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:"",visibility_appoint:1,visibility_appointor:[]},active:!1,onFocus:!1,mouseEnter:!1}},mounted(){this.autoActive&&this.$nextTick(this.openAdd)},computed:{...p(["taskPriority"]),typeName(){return this.parentId>0?"\u5B50\u4EFB\u52A1":"\u4EFB\u52A1"}},watch:{active(t){t||this.$emit("on-close")},mouseEnter(){this.chackClose()},onFocus(){this.chackClose()}},methods:{getData(){return this.parentId>0?{task_id:this.parentId,name:this.addData.name}:(this.addData.project_id=this.projectId||this.$store.state.projectId,this.addData.column_id=this.columnId||"",this.addData.owner=[this.userId],this.addData.top=this.addTop?1:0,$A.cloneJSON(this.addData))},openAdd(){this.active=!0,this.defaultPriority(),this.$nextTick(()=>{this.$refs.input.focus()})},chackClose(){this.mouseEnter||this.onFocus||this.addData.name||(this.active=!1)},onPriority(){this.$emit("on-priority",this.getData()),this.active=!1},onKeydown(t){if(t.keyCode===13){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},onAdd(){if(!this.addData.name){$A.messageWarning("\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0");return}this.loadIng++;let t=this.parentId>0?"taskAddSub":"taskAdd";this.$store.dispatch(t,this.getData()).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.active=!1,this.addData={name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:"",visibility_appoint:1,visibility_appointor:[]}}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--})},taskPriorityContent(t){let s=$A.runNum(t.days);return s<=0?t.name+" ("+this.$L("\u65E0\u65F6\u95F4\u9650\u5236")+")":t.name+" ("+s+this.$L("\u5929")+")"},choosePriority(t){if($A.runNum(t.days)>0){let s=new Date,e=new Date(new Date().setDate(s.getDate()+$A.runNum(t.days)));this.$set(this.addData,"times",$A.date2string([s,e]))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color),this.$nextTick(()=>{this.$refs.input.focus()})},defaultPriority(){this.taskPriority.length!==0&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))}}},k={};var Y=d(K,V,H,!1,X,null,null,null);function X(t){for(let s in k)this[s]=k[s]}var W=function(){return Y.exports}(),J=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-rows"},[t._l(t.list,function(a,o){return e("div",{key:o},[e("Row",{staticClass:"task-row",style:a.color?{backgroundColor:a.color,borderBottomColor:a.color}:{}},[a.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:a.p_color}}):t._e(),e("Col",{class:["row-name",a.complete_at?"complete":""],attrs:{span:"12"}},[a.sub_num>0&&a.sub_top!==!0||a.parent_id===0&&t.fastAddTask?e("Icon",{class:["sub-icon",t.taskOpen[a.id]?"active":""],attrs:{type:"ios-arrow-forward"},on:{click:function(i){return t.getSublist(a)}}}):t._e(),e("TaskMenu",{ref:`taskMenu_${a.id}`,refInFor:!0,attrs:{task:a}}),e("div",{staticClass:"item-title",on:{click:function(i){return t.openTask(a)}}},[a.flow_item_name?e("span",{class:a.flow_item_status,on:{click:function(i){return i.stopPropagation(),t.openMenu(i,a)}}},[t._v(t._s(a.flow_item_name))]):t._e(),a.sub_top===!0?e("span",[t._v(t._s(t.$L("\u5B50\u4EFB\u52A1")))]):t._e(),a.sub_my&&a.sub_my.length>0?e("span",[t._v("+"+t._s(a.sub_my.length))]):t._e(),t._v(" "+t._s(a.name)+" ")]),e("div",{staticClass:"item-icons",on:{click:function(i){return t.openTask(a)}}},[a.desc?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE71A")])]):t._e(),a.file_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE71C")]),e("em",[t._v(t._s(a.file_num))])]):t._e(),a.msg_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE71E")]),e("em",[t._v(t._s(a.msg_num))])]):t._e(),a.sub_num>0?e("div",{staticClass:"item-icon",on:{click:function(i){return i.stopPropagation(),t.getSublist(a)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE71F")]),e("em",[t._v(t._s(a.sub_complete)+"/"+t._s(a.sub_num))])]):t._e()])],1),e("Col",{staticClass:"row-column",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:a.sub_top===!0},on:{command:function(i){return t.dropTask(a,i)}}},[e("div",{staticClass:"task-column"},[t._v(t._s(t.columnName(a.column_id)))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.columnList(a.project_id),function(i){return e("EDropdownItem",{key:i.id,attrs:{command:"column::"+i.id}},[t._v(" "+t._s(i.name)+" ")])}),1)],1)],1),e("Col",{staticClass:"row-priority",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:a.sub_top===!0},on:{command:function(i){return t.dropTask(a,i)}}},[e("TaskPriority",{attrs:{backgroundColor:a.p_color}},[t._v(t._s(a.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(i,r){return e("EDropdownItem",{key:r,attrs:{command:"priority::"+r}},[e("i",{staticClass:"taskfont",style:{color:i.color},domProps:{innerHTML:t._s(i.p_name==i.name?"":"")}}),t._v(" "+t._s(i.name)+" ")])}),1)],1)],1),e("Col",{staticClass:"row-user",attrs:{span:"3"}},[e("ul",{on:{click:function(i){return t.openTask(a)}}},[t._l(t.ownerUser(a.task_user),function(i,r){return r<3?e("li",{key:r},[e("UserAvatar",{attrs:{userid:i.userid,size:"32",borderWitdh:2,borderColor:a.color,showName:t.ownerUser(a.task_user).length===1}})],1):t._e()}),t.ownerUser(a.task_user).length===0?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small"},on:{click:function(i){return i.stopPropagation(),t.openTask(a,!0)}}},[t._v(t._s(t.$L("\u9886\u53D6\u4EFB\u52A1")))])],1):t._e()],2)]),e("Col",{staticClass:"row-time",attrs:{span:"3"}},[!a.complete_at&&a.end_at?e("ETooltip",{class:["task-time",a.today?"today":"",a.overdue?"overdue":""],attrs:{disabled:t.$isEEUiApp||t.windowTouch,"open-delay":600,content:a.end_at}},[e("div",{on:{click:function(i){return t.openTask(a)}}},[t._v(t._s(t.expiresFormat(a.end_at)))])]):t.showCompleteAt&&a.complete_at?e("div",{attrs:{title:a.complete_at}},[t._v(t._s(t.completeAtFormat(a.complete_at)))]):t._e()],1)],1),t.taskOpen[a.id]===!0?e("TaskRow",{attrs:{list:t.subTask(a.id),"parent-id":a.id,"fast-add-task":a.parent_id===0&&t.fastAddTask,"open-key":t.openKey},on:{command:t.dropTask}}):t._e()],1)}),t.fastAddTask||t.parentId>0?e("TaskAddSimple",{attrs:{"parent-id":t.parentId,"row-mode":""},on:{"on-priority":t.onPriority}}):t._e()],2)},G=[];const q={name:"TaskRow",components:{TaskMenu:M,TaskAddSimple:W,TaskPriority:E},props:{list:{type:Array,default:()=>[]},parentId:{type:Number,default:0},fastAddTask:{type:Boolean,default:!1},openKey:{type:String,default:"default"},showCompleteAt:{type:Boolean,default:!1}},data(){return{nowTime:$A.Time(),nowInterval:null,taskLoad:{},taskOpen:{}}},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3)},destroyed(){clearInterval(this.nowInterval)},computed:{...p(["cacheTasks","taskPriority","cacheColumns"]),subTask(){return function(t){return this.cacheTasks.filter(s=>s.archived_at?!1:s.parent_id==t).sort((s,e)=>s.id-e.id)}}},methods:{columnName(t){const s=this.cacheColumns.find(({id:e})=>e==t);return s?s.name:""},dropTask(t,s){const e=this.$refs[`taskMenu_${t.id}`];if(!!e){if($A.leftExists(s,"column::")){e[0].updateTask({column_id:$A.leftDelete(s,"column::")});return}if($A.leftExists(s,"priority::")){let a=this.taskPriority[parseInt($A.leftDelete(s,"priority::"))];a&&e[0].updateTask({p_level:a.priority,p_name:a.name,p_color:a.color})}}},onPriority(t){this.$emit("on-priority",t)},getSublist(t){if(t.sub_top===!0){this.openTask(t);return}if(this.taskOpen[t.id]===!0){this.$set(this.taskOpen,t.id,!1);return}this.taskLoad[t.id]!==!0&&(this.$set(this.taskLoad,t.id,!0),this.$store.dispatch("getTaskForParent",t.id).then(()=>{this.$set(this.taskLoad,t.id,!1),this.$set(this.taskOpen,t.id,!0)}).catch(({msg:s})=>{$A.modalError(s),this.$set(this.taskLoad,t.id,!1)}))},columnList(t){return this.cacheColumns.filter(({project_id:s})=>s==t)},openTask(t,s){this.$store.dispatch("openTask",t),s===!0&&setTimeout(()=>{g.Store.set("receiveTask",!0)},300)},openMenu(t,s){const e=this.$refs[`taskMenu_${s.id}`];e&&e[0].handleClick(t)},ownerUser(t){return t.filter(({owner:s})=>s==1).sort((s,e)=>s.id-e.id)},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},completeAtFormat(t){let s=$A.Date(t,!0);return $A.formatDate("Y")===$A.formatDate("Y",s)?$A.formatDate("m-d H:i",s):$A.formatDate("Y-m-d",s)}}},y={};var Q=d(q,J,G,!1,Z,null,null,null);function Z(t){for(let s in y)this[s]=y[s]}var tt=function(){return Q.exports}(),et=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-archived"},[e("div",{staticClass:"archived-title"},[t._v(" "+t._s(t.$L("\u5F52\u6863\u7684\u4EFB\u52A1"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("ID\u3001\u4EFB\u52A1\u540D..."),clearable:""},model:{value:t.keys.name,callback:function(a){t.$set(t.keys,"name",a)},expression:"keys.name"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},st=[];const at={name:"TaskArchived",props:{projectId:{type:Number,default:0}},data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.id)])},{title:this.$L("\u4EFB\u52A1\u540D\u79F0"),key:"name",minWidth:200,render:(t,{row:s})=>t("AutoTip",{on:{"on-click":()=>{this.$store.dispatch("openTask",s)}}},s.name)},{title:this.$L("\u5B8C\u6210\u65F6\u95F4"),key:"complete_at",width:168,render:(t,{row:s})=>t("div",{style:{color:s.complete_at?"":"#f00"}},s.complete_at||this.$L("\u672A\u5B8C\u6210"))},{title:this.$L("\u5F52\u6863\u65F6\u95F4"),key:"archived_at",width:168},{title:this.$L("\u5F52\u6863\u4EBA\u5458"),key:"archived_userid",minWidth:100,render:(t,{row:s})=>s.archived_userid?t("UserAvatar",{props:{userid:s.archived_userid,size:24,showName:!0}}):t("Tag",this.$L("\u7CFB\u7EDF\u81EA\u52A8"))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{if(this.cacheTasks.find(a=>a.id==s.row.id&&!a.archived_at))return t("div",{style:{color:"#888"}},this.$L("\u5DF2\u8FD8\u539F"));const e=[t("span",{style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{click:()=>{this.$store.dispatch("openTask",s.row)}}},this.$L("\u67E5\u770B")),t("Poptip",{props:{title:s.row.__restorePoptipTitle,confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88"),value:s.row.__restorePoptipShow,width:220},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(s.row)},"on-popper-hide":()=>{s.row.__restorePoptipLoadIng=!1,s.row.__restorePoptipTitle=this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F"),s.row.__restorePoptipShow=!1}}},[t("span",{on:{click:a=>{a.stopPropagation(),s.row.__restorePoptipLoadIng=!0,this.$store.dispatch("call",{url:"project/column/one",data:{column_id:s.row.column_id,deleted:"all"}}).then(({data:o})=>{o.deleted_at&&(s.row.__restorePoptipTitle=this.$L("\u68C0\u6D4B\u5230\u6240\u5C5E\u7684\u4EFB\u52A1\u5217\u8868\u5DF2\u88AB\u5220\u9664\uFF0C\u8BE5\u64CD\u4F5C\u5C06\u4F1A\u8FD8\u539F\u4EFB\u52A1\u5217\u8868\uFF0C\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F")),s.row.__restorePoptipShow=!0}).catch(({msg:o})=>{$A.modalError({content:o})}).finally(o=>{s.row.__restorePoptipLoadIng=!1})}}},[s.row.__restorePoptipLoadIng?t("Loading",{style:{width:"26px",height:"15px"}}):this.$L("\u8FD8\u539F")])]),t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u4EFB\u52A1\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":()=>{this.delete(s.row)}}},this.$L("\u5220\u9664"))];return t("TableAction",{props:{column:s.column}},e)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){},computed:{...p(["cacheTasks"])},watch:{projectId:{handler(){this.getLists()},immediate:!0},keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){!this.projectId||(this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/task/lists",data:{keys:this.keys,project_id:this.projectId,parent_id:-1,archived:"yes",sorts:{archived_at:"desc"},page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:t})=>{this.page=t.current_page,this.total=t.total,this.list=t.data.map(s=>(s.__restorePoptipLoadIng=!1,s.__restorePoptipTitle=this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F"),s.__restorePoptipShow=!1,s)),this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(t=>{this.loadIng--}))},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},recovery(t){this.list=this.list.filter(({id:s})=>s!=t.id),this.loadIng++,this.$store.dispatch("archivedTask",{task_id:t.id,type:"recovery"}).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.getLists(),this.$store.dispatch("openTask",t)}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--,this.getLists()})},delete(t){this.list=this.list.filter(({id:s})=>s!=t.id),this.loadIng++,this.$store.dispatch("removeTask",{task_id:t.id}).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.getLists()}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--,this.getLists()})}}},C={};var ot=d(at,et,st,!1,it,null,null,null);function it(t){for(let s in C)this[s]=C[s]}var rt=function(){return ot.exports}(),nt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-workflow"},[e("div",{staticClass:"workflow-title"},[t._v(" "+t._s(t.$L("\u5DE5\u4F5C\u6D41\u8BBE\u7F6E"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getData}})],1)]),t.list.length>0?e("div",{staticClass:"workflow-content"},[e("Collapse",{attrs:{accordion:""},model:{value:t.openIndex,callback:function(a){t.openIndex=a},expression:"openIndex"}},t._l(t.list,function(a){return e("Panel",{key:a.id,attrs:{name:"index_"+a.id}},[e("div",{staticClass:"workflow-item"},[e("div",{staticClass:"workflow-name"},[t._v(t._s(a.name))]),e("div",{staticClass:"workflow-status"},t._l(a.project_flow_item,function(o){return e("div",{class:o.status},[t._v(t._s(o.name))])}),0),e("div",{staticClass:"workflow-save",on:{click:function(o){o.stopPropagation()}}},[t.contrast(a.project_flow_item,a.project_flow_bak)?[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(o){return t.onSave(a)}}},[t._v(t._s(t.$L("\u4FDD\u5B58")))]),a.id>0?e("Button",{attrs:{disabled:t.loadIng>0,type:"primary",ghost:""},on:{click:function(o){return t.onReduction(a,o)}}},[t._v(t._s(t.$L("\u8FD8\u539F")))]):t._e()]:t._e(),e("Button",{attrs:{disabled:t.loadIng>0,type:"error",ghost:""},on:{click:function(o){return t.onDelete(a)}}},[t._v(t._s(t.$L("\u5220\u9664")))])],2)]),e("div",{staticClass:"taskflow-config",attrs:{slot:"content"},slot:"content"},[e("div",{staticClass:"taskflow-config-table"},[e("div",{staticClass:"taskflow-config-table-left-container"},[e("div",{staticClass:"taskflow-config-table-column-header left-header"},[t._v(t._s(t.$L("\u914D\u7F6E\u9879")))]),e("div",{ref:`overlay_${a.id}`,refInFor:!0,staticClass:"taskflow-config-table-column-body"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("\u8BBE\u7F6E\u72B6\u6001\u4E3A")))]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u5F00\u59CB\u72B6\u6001")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u65B0\u5EFA\u4EFB\u52A1\u9ED8\u8BA4\u72B6\u6001")))])])]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u8FDB\u884C\u4E2D")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u53EF\u8BBE\u7F6E\u591A\u4E2A\u72B6\u6001\u4E3A\u8FDB\u884C\u4E2D")))])])]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u9A8C\u6536/\u6D4B\u8BD5")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u53EA\u80FD\u8BBE\u7F6E\u5355\u4E2A\u72B6\u6001\u4E3A\u9A8C\u6536/\u6D4B\u8BD5")))])])]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u7ED3\u675F\u72B6\u6001")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u8BE5\u72B6\u6001\u4E0B\u4EFB\u52A1\u81EA\u52A8\u6807\u8BB0\u5B8C\u6210")))])])])]),e("div",{staticClass:"taskflow-config-table-block hr"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("\u53EF\u6D41\u8F6C\u5230")))]),t._l(a.project_flow_item,function(o){return e("div",{staticClass:"taskflow-config-table-block-item"},[e("span",{staticClass:"transform-status-name"},[t._v(t._s(o.name))])])})],2)])]),e("div",{staticClass:"taskflow-config-table-right-container"},[e("Draggable",{staticClass:"taskflow-config-table-list-wrapper",attrs:{list:a.project_flow_item,animation:150,disabled:t.$isEEUiApp||t.windowTouch,tag:"div",draggable:".column-border"},on:{sort:function(o){}}},[t._l(a.project_flow_item,function(o){return e("div",{staticClass:"taskflow-config-table-status-column column-border",class:o.status},[e("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[e("div",{staticClass:"status-label-with-menu",class:o.status},[e("div",{staticClass:"name"},[t._v(t._s(t.$L(o.name)))]),e("EDropdown",{staticClass:"more",class:{opacity:o.userids.length>0||o.columnid>0},attrs:{trigger:"click"},on:{command:function(i){return t.onMore(i,o)}}},[e("div",{staticClass:"more-icon"},[e("Badge",{attrs:{dot:o.userids.length>0||o.columnid>0}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1),e("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[o.userids.length>0?e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"users"},t._l(o.userids,function(i,r){return e("UserAvatar",{key:r,attrs:{userid:i,size:28,borderWitdh:1,showName:o.userids.length===1}})}),1)]):t._e(),e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-settings"}}),e("Badge",{attrs:{dot:o.userids.length>0||o.columnid>0}},[t._v(" "+t._s(t.$L("\u72B6\u6001\u8BBE\u7F6E"))+" ")])],1)]),e("EDropdownItem",{attrs:{command:"name"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("\u4FEE\u6539\u540D\u79F0"))+" ")],1)]),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item delete"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("\u5220\u9664"))+" ")],1)])],1)],1)],1)]),e("div",{ref:`overlay_${a.id}`,refInFor:!0,staticClass:"taskflow-config-table-column-body"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),e("RadioGroup",{model:{value:o.status,callback:function(i){t.$set(o,"status",i)},expression:"item.status"}},[e("Radio",{attrs:{label:"start"}},[e("span")]),e("Radio",{attrs:{label:"progress"}},[e("span")]),e("Radio",{attrs:{label:"test"}},[e("span")]),e("Radio",{attrs:{label:"end"}},[e("span")])],1)],1),e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),e("CheckboxGroup",{on:{"on-change":function(i){return t.onTurns(o)}},model:{value:o.turns,callback:function(i){t.$set(o,"turns",i)},expression:"item.turns"}},t._l(a.project_flow_item,function(i){return e("Checkbox",{key:i.id,attrs:{label:i.id,disabled:i.id==o.id}},[e("span")])}),1)],1)])])}),e("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(o){return t.onAdd(a)}}},[t._v(t._s(t.$L("\u6DFB\u52A0\u72B6\u6001")))])],2)],1)])])])}),1)],1):t.loadIng==0?e("div",{staticClass:"workflow-no"},[t._v(" "+t._s(t.$L("\u5F53\u524D\u9879\u76EE\u8FD8\u6CA1\u6709\u521B\u5EFA\u5DE5\u4F5C\u6D41"))+" "),e("Button",{attrs:{type:"primary"},on:{click:t.onCreate}},[t._v(t._s(t.$L("\u521B\u5EFA\u5DE5\u4F5C\u6D41")))])],1):t._e(),e("Modal",{attrs:{styles:{width:"90%",maxWidth:"640px"},title:`${t.$L("\u72B6\u6001\u8BBE\u7F6E")} (${t.settingData.name})`,"mask-closable":!1},model:{value:t.userShow,callback:function(a){t.userShow=a},expression:"userShow"}},[e("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("div",{staticClass:"workflow-setting-box"},[e("h3",[t._v(t._s(t.$L("\u72B6\u6001\u8D1F\u8D23\u4EBA")))]),e("div",{staticClass:"form-box"},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u72B6\u6001\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"project-id":t.projectId,"multiple-max":5,title:t.$L("\u9009\u62E9\u72B6\u6001\u8D1F\u8D23\u4EBA")},model:{value:t.settingData.userids,callback:function(a){t.$set(t.settingData,"userids",a)},expression:"settingData.userids"}})],1),e("FormItem",{attrs:{prop:"usertype",label:t.$L("\u6D41\u8F6C\u6A21\u5F0F")}},[e("RadioGroup",{model:{value:t.settingData.usertype,callback:function(a){t.$set(t.settingData,"usertype",a)},expression:"settingData.usertype"}},[e("Radio",{attrs:{label:"add"}},[t._v(t._s(t.$L("\u6DFB\u52A0\u6A21\u5F0F")))]),e("Radio",{attrs:{label:"replace"}},[t._v(t._s(t.$L("\u6D41\u8F6C\u6A21\u5F0F")))]),e("Radio",{attrs:{label:"merge"}},[t._v(t._s(t.$L("\u5254\u9664\u6A21\u5F0F")))])],1),t.settingData.usertype=="replace"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u6539\u53D8\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u4E3A\u72B6\u6001\u8D1F\u8D23\u4EBA\uFF0C\u539F\u672C\u7684\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u79FB\u81F3\u534F\u52A9\u4EBA\u5458\u3002`)))]):t.settingData.usertype=="merge"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u6539\u53D8\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u4E3A\u72B6\u6001\u8D1F\u8D23\u4EBA\uFF08\u5E76\u4FDD\u7559\u64CD\u4F5C\u72B6\u6001\u7684\u4EBA\u5458\uFF09\uFF0C\u539F\u672C\u7684\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u79FB\u81F3\u534F\u52A9\u4EBA\u5458\u3002`)))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u6DFB\u52A0\u72B6\u6001\u8D1F\u8D23\u4EBA\u81F3\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u3002`)))])],1),e("FormItem",{attrs:{prop:"userlimit",label:t.$L("\u9650\u5236\u8D1F\u8D23\u4EBA")}},[e("iSwitch",{attrs:{"true-value":1,"false-value":0},model:{value:t.settingData.userlimit,callback:function(a){t.$set(t.settingData,"userlimit",a)},expression:"settingData.userlimit"}}),t.settingData.userlimit===1?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\uFF0C[\u4EFB\u52A1\u8D1F\u8D23\u4EBA] \u548C [\u9879\u76EE\u7BA1\u7406\u5458] \u53EF\u4EE5\u4FEE\u6539\u72B6\u6001\u3002`)))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\uFF0C[\u4EFB\u52A1\u8D1F\u8D23\u4EBA] \u548C [\u9879\u76EE\u7BA1\u7406\u5458] \u53EF\u4EE5\u4FEE\u6539\u72B6\u6001\u3002`)))])],1)],1)]),e("div",{staticClass:"workflow-setting-box"},[e("h3",[t._v(t._s(t.$L("\u5173\u8054\u5217\u8868")))]),e("div",{staticClass:"form-box"},[e("FormItem",{attrs:{prop:"usertype",label:t.$L("\u5173\u8054\u5217\u8868")}},[e("Select",{attrs:{placeholder:t.$L("\u9009\u62E9\u5173\u8054\u5217\u8868"),transfer:""},model:{value:t.settingData.columnid,callback:function(a){t.$set(t.settingData,"columnid",a)},expression:"settingData.columnid"}},t._l(t.columnList,function(a,o){return e("Option",{key:o,attrs:{value:a.id}},[t._v(t._s(a.name))])}),1),e("div",{staticClass:"form-tip"},[t._v(" "+t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u81EA\u52A8\u5C06\u4EFB\u52A1\u79FB\u52A8\u81F3\u5173\u8054\u5217\u8868\u3002`))+" "),t.settingData.columnid?e("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){t.settingData.columnid=0}}},[t._v(t._s(t.$L("\u53D6\u6D88\u5173\u8054")))]):t._e()])],1)],1)])]),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.userShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary"},on:{click:t.onUser}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)],1)],1)},lt=[];const ct={name:"ProjectWorkflow",components:{UserSelect:F,Draggable:P},props:{projectId:{type:Number,default:0}},data(){return{loadIng:0,list:[],openIndex:"",userShow:!1,settingData:{}}},mounted(){},computed:{...p(["cacheColumns"]),columnList({projectId:t,cacheColumns:s}){return s.filter(({project_id:e})=>e==t).sort((e,a)=>e.sort!=a.sort?e.sort-a.sort:e.id-a.id).map(e=>({id:e.id,name:e.name}))}},watch:{projectId:{handler(t){t&&this.getData()},immediate:!0}},methods:{getData(){this.loadIng++,this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then(({data:t})=>{this.list=t.map(s=>(s.project_flow_bak=JSON.stringify(s.project_flow_item),s)),this.openIndex=this.list.length===1?"index_"+this.list[0].id:"",this.$nextTick(this.syncScroller)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},syncScroller(){this.list.some(t=>{this.$refs[`overlay_${t.id}`]&&this.$refs[`overlay_${t.id}`].some(s=>{Object.keys(s.attributes).includes("sync-scroller")||(s.setAttribute("sync-scroller",!0),s.addEventListener("scroll",({target:e})=>{let a=e.scrollTop,o=e.scrollLeft;this.$nextTick(()=>{this.$refs[`overlay_${t.id}`].some(i=>{i!=s&&i.scrollTo(o,a)})})}))})})},contrast(t,s){return JSON.stringify(t)!=s},existDiff(){return!!this.list.find(t=>this.contrast(t.project_flow_item,t.project_flow_bak))},onCreate(){let t=-1*$A.randNum(1e3,1e4);this.list.push({id:t,name:"Default",project_flow_item:[{id:-10,name:"\u5F85\u5904\u7406",status:"start",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-11,name:"\u8FDB\u884C\u4E2D",status:"progress",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-12,name:"\u5F85\u6D4B\u8BD5",status:"test",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-13,name:"\u5DF2\u5B8C\u6210",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-14,name:"\u5DF2\u53D6\u6D88",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0}]}),this.openIndex="index_"+t,this.$nextTick(this.syncScroller)},onDelete(t){$A.modalConfirm({title:"\u5220\u9664\u5DE5\u4F5C\u6D41",content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5DE5\u4F5C\u6D41\u5417\uFF1F",loading:!0,onOk:()=>{if(t.id>0)return new Promise((e,a)=>{this.loadIng++,this.$store.dispatch("call",{url:"project/flow/delete",data:{project_id:this.projectId}}).then(({msg:o})=>{e(o);let i=this.list.findIndex(({id:r})=>r==t.id);i>-1&&this.list.splice(i,1)}).catch(({msg:o})=>{a(o)}).finally(o=>{this.loadIng--})});const s=this.list.findIndex(({id:e})=>e==t.id);s>-1&&this.list.splice(s,1)}})},onMore(t,s){switch(t){case"user":this.$set(this.settingData,"id",s.id),this.$set(this.settingData,"name",s.name),this.$set(this.settingData,"userids",s.userids),this.$set(this.settingData,"usertype",s.usertype),this.$set(this.settingData,"userlimit",s.userlimit),this.$set(this.settingData,"columnid",s.columnid),this.userShow=!0;break;case"name":this.onName(s);break;case"remove":this.onRemove(s);break}},onUser(){this.userShow=!1,this.list.some(t=>{let s=t.project_flow_item.find(e=>e.id==this.settingData.id);s&&(this.$set(s,"userids",this.settingData.userids),this.$set(s,"usertype",this.settingData.usertype),this.$set(s,"userlimit",this.settingData.userlimit),this.$set(s,"columnid",this.settingData.columnid))})},onName(t){$A.modalInput({value:t.name,title:"\u4FEE\u6539\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0",onOk:s=>{if(!s)return"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0";this.$set(t,"name",s)}})},onRemove(t){this.list.some(s=>{let e=s.project_flow_item.findIndex(({id:a})=>a==t.id);e>-1&&s.project_flow_item.splice(e,1)})},onTurns(t){this.$set(t,"turns",t.turns.sort())},onAdd(t){$A.modalInput({title:"\u6DFB\u52A0\u72B6\u6001",placeholder:"\u8BF7\u8F93\u5165\u72B6\u6001\u540D\u79F0",onOk:s=>{if(!s)return"\u8BF7\u8F93\u5165\u72B6\u6001\u540D\u79F0";const e=$A.randNum(1e5,999999)*-1,a=t.project_flow_item.map(({id:o})=>o);t.project_flow_item.push({id:e,name:s,status:"end",turns:a,userids:[],usertype:"add",userlimit:0,columnid:0}),t.project_flow_item.some(o=>{o.turns.push(e)})}})},onReduction(t){this.$set(t,"project_flow_item",JSON.parse(t.project_flow_bak))},onSave(t){let s=0;t.project_flow_item.some(e=>{e.sort=s++}),this.loadIng++,this.$store.dispatch("call",{url:"project/flow/save",data:{project_id:this.projectId,flows:t.project_flow_item},method:"post"}).then(({data:e,msg:a})=>{$.messageSuccess(a),e.project_flow_bak=JSON.stringify(e.project_flow_item);let o=this.list.findIndex(({id:i})=>i==t.id);o>-1?this.list.splice(o,1,e):this.list.push(e),this.openIndex="index_"+e.id,this.$nextTick(this.syncScroller)}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--})},saveAll(){this.list.some(t=>{this.contrast(t.project_flow_item,t.project_flow_bak)&&this.onSave(t)})}}},b={};var dt=d(ct,nt,lt,!1,ut,null,null,null);function ut(t){for(let s in b)this[s]=b[s]}var ht=function(){return dt.exports}(),pt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-deleted"},[e("div",{staticClass:"deleted-title"},[t._v(" "+t._s(t.$L("\u5220\u9664\u7684\u4EFB\u52A1"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("ID\u3001\u4EFB\u52A1\u540D..."),clearable:""},model:{value:t.keys.name,callback:function(a){t.$set(t.keys,"name",a)},expression:"keys.name"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},mt=[];const ft={name:"TaskDeleted",props:{projectId:{type:Number,default:0}},data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.id)])},{title:this.$L("\u4EFB\u52A1\u540D\u79F0"),key:"name",minWidth:200,render:(t,{row:s})=>t("AutoTip",s.name)},{title:this.$L("\u521B\u5EFA\u65F6\u95F4"),key:"created_at",width:168},{title:this.$L("\u5220\u9664\u65F6\u95F4"),key:"deleted_at",width:168},{title:this.$L("\u5220\u9664\u4EBA\u5458"),key:"deleted_userid",minWidth:100,render:(t,{row:s})=>s.deleted_userid?t("UserAvatar",{props:{userid:s.deleted_userid,size:24,showName:!0}}):t("span","-")},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=[t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5220\u9664\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(s.row)}}},this.$L("\u8FD8\u539F"))];return t("TableAction",{props:{column:s.column}},e)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){},computed:{...p(["cacheTasks"])},watch:{projectId:{handler(){this.getLists()},immediate:!0},keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){!this.projectId||(this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/task/lists",data:{keys:this.keys,project_id:this.projectId,parent_id:-1,deleted:"yes",sorts:{deleted_at:"desc"},page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:t})=>{this.page=t.current_page,this.total=t.total,this.list=t.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(t=>{this.loadIng--}))},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},recovery(t){this.list=this.list.filter(({id:s})=>s!=t.id),this.loadIng++,this.$store.dispatch("removeTask",{task_id:t.id,type:"recovery"}).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.getLists(),this.$store.dispatch("openTask",t)}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--,this.getLists()})}}},j={};var _t=d(ft,pt,mt,!1,vt,null,null,null);function vt(t){for(let s in j)this[s]=j[s]}var $t=function(){return _t.exports}(),gt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"common-gantt"},[e("div",{staticClass:"gantt-left",style:{width:t.menuWidth+"px"}},[e("div",{staticClass:"gantt-title"},[e("div",{staticClass:"gantt-title-text"},[t._v(t._s(t.$L("\u4EFB\u52A1\u540D\u79F0")))])]),e("ul",{ref:"ganttItem",staticClass:"gantt-item",on:{scroll:t.itemScrollListener,mouseenter:function(a){t.mouseType="item"}}},t._l(t.lists,function(a,o){return e("li",{key:o},[a.overdue?e("div",{staticClass:"item-overdue",on:{click:function(i){return t.clickItem(a)}}},[t._v(t._s(t.$L("\u5DF2\u8D85\u671F")))]):t._e(),e("div",{staticClass:"item-title",class:{complete:a.complete,overdue:a.overdue},on:{click:function(i){return t.clickItem(a)}}},[t._v(t._s(a.label))]),e("Icon",{staticClass:"item-icon",attrs:{type:"ios-locate-outline"},on:{click:function(i){return t.scrollPosition(o)}}})],1)}),0)]),e("div",{ref:"ganttRight",staticClass:"gantt-right"},[e("div",{staticClass:"gantt-chart"},[e("ul",{staticClass:"gantt-month"},t._l(t.monthNum,function(a,o){return e("li",{key:o,style:t.monthStyle(o)},[e("div",{staticClass:"month-format"},[t._v(t._s(t.monthFormat(o)))])])}),0),e("ul",{staticClass:"gantt-date",on:{mousedown:t.dateMouseDown}},t._l(t.dateNum,function(a,o){return e("li",{key:o,style:t.dateStyle(o)},[e("div",{staticClass:"date-format"},[e("div",{staticClass:"format-day"},[t._v(t._s(t.dateFormat(o,"day")))]),t.dateWidth>46?e("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(o,"week")))]):t._e()])])}),0),e("ul",{ref:"ganttTimeline",staticClass:"gantt-timeline",on:{scroll:t.timelineScrollListener,mouseenter:function(a){t.mouseType="timeline"}}},t._l(t.lists,function(a,o){return e("li",{key:o},[e("div",{staticClass:"timeline-item",style:t.itemStyle(a),on:{mousedown:function(i){return t.itemMouseDown(i,a)}}},[e("div",{staticClass:"timeline-title",attrs:{title:a.label}},[t._v(t._s(a.label))]),e("div",{staticClass:"timeline-resizer"})])])}),0)])])])},wt=[];const kt={name:"GanttView",props:{lists:{type:Array},menuWidth:{type:Number,default:300},itemWidth:{type:Number,default:100}},data(){return{mouseType:"",mouseWidth:0,mouseScaleWidth:0,dateWidth:100,ganttWidth:0,mouseItem:null,mouseBak:{},dateMove:null}},mounted(){this.dateWidth=this.itemWidth,this.$refs.ganttRight.addEventListener("mousewheel",this.handleScroll,!1),document.addEventListener("mousemove",this.itemMouseMove),document.addEventListener("mouseup",this.itemMouseUp),window.addEventListener("resize",this.handleResize,!1),this.handleResize()},beforeDestroy(){this.$refs.ganttRight.removeEventListener("mousewheel",this.handleScroll,!1),document.removeEventListener("mousemove",this.itemMouseMove),document.removeEventListener("mouseup",this.itemMouseUp),window.removeEventListener("resize",this.handleResize,!1)},watch:{itemWidth(t){this.dateWidth=t}},computed:{monthNum(){const{ganttWidth:t,dateWidth:s}=this;return Math.floor(t/s/30)+2},monthStyle(){const{mouseWidth:t,dateWidth:s}=this;return function(e){let a=t==0?0:t/s,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),r=new Date(i.getTime()+a*864e5),n=new Date(r.getFullYear(),r.getMonth()+1,0,23,59,59),l=(n-r)/1e3/60/60/24,c=s*l;return e>0&&(n=new Date(r.getFullYear(),r.getMonth()+1+e,0),c=n.getDate()*s),{width:c+"px"}}},monthFormat(){const{mouseWidth:t,dateWidth:s}=this;return function(e){let a=t==0?0:t/s,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),r=new Date(i.getTime()+a*864e5);return e>0&&(r=new Date(r.getFullYear(),r.getMonth()+1+e,0)),$A.formatDate("Y-m",r)}},dateNum(){const{ganttWidth:t,dateWidth:s}=this;return Math.floor(t/s)+2},dateStyle(){const{mouseWidth:t,dateWidth:s}=this;return function(e){const a={};let o=t==0?0:t/s,i=Math.floor(o)+e;o==Math.floor(o)&&i--;let r=t==0?e-1:i,n=new Date(new Date().getTime()+r*864e5);[0,6].indexOf(n.getDay())!==-1&&(a.backgroundColor="#f9fafb");let l=s;return e==0&&(l=Math.abs((t%l-l)%l)),a.width=l+"px",a}},dateFormat(){const{mouseWidth:t,dateWidth:s}=this;return function(e,a){let o=t==0?0:t/s,i=Math.floor(o)+e;o==Math.floor(o)&&i--;let r=t==0?e-1:i,n=new Date(new Date().getTime()+r*864e5);return a=="day"?n.getDate():a=="week"?this.$L(`\u661F\u671F${"\u65E5\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D".charAt(n.getDay())}`):n}},itemStyle(){const{mouseWidth:t,dateWidth:s,ganttWidth:e}=this;return function(a){const{start:o,end:i}=a.time,{style:r,moveX:n,moveW:l}=a;let c=new Date,u=new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0).getTime(),f=(o-u)/1e3/60/60/24,v=(i-u)/1e3/60/60/24,h=s*f+t*-1,m=s*(v-f);typeof n=="number"&&(h+=n),typeof l=="number"&&(m+=l);const _={left:Math.min(Math.max(h,m*-1.2),e*1.2).toFixed(2)+"px",width:m.toFixed(2)+"px"};return h<0&&Math.abs(h)e&&hs.scrollHeight-s.clientHeight&&(e=s.scrollHeight-s.clientHeight),s.scrollTop!=e&&(this.mouseType="timeline",s.scrollTop=e)}t.deltaX!=0&&(this.mouseWidth+=t.deltaX,this.mouseScaleWidth+=t.deltaX*(100/this.dateWidth))},handleResize(){this.ganttWidth=this.$refs.ganttTimeline.clientWidth},dateMouseDown(t){t.preventDefault(),this.mouseItem=null,this.dateMove={clientX:t.clientX}},itemMouseDown(t,s){t.preventDefault();let e="moveX";t.target.className=="timeline-resizer"&&(e="moveW"),typeof s[e]!="number"&&this.$set(s,e,0),this.mouseBak={type:e,clientX:t.clientX,value:s[e]},this.mouseItem=s,this.dateMove=null},itemMouseMove(t){if(this.mouseItem!=null){t.preventDefault();const s=this.mouseBak.value+(t.clientX-this.mouseBak.clientX);if(this.mouseBak.type==="moveW"){const e=864e5/this.dateWidth,{start:a,end:o}=this.mouseItem.time;let i=s*e;if(o+i-a<=0)return}this.$set(this.mouseItem,this.mouseBak.type,s)}else if(this.dateMove!=null){t.preventDefault();let s=(this.dateMove.clientX-t.clientX)*5;this.dateMove.clientX=t.clientX,this.mouseWidth+=s,this.mouseScaleWidth+=s*(100/this.dateWidth)}},itemMouseUp(t){if(this.mouseItem!=null){const{start:s,end:e}=this.mouseItem.time;let a=!1,o=864e5/this.dateWidth;if(typeof this.mouseItem.moveX=="number"&&this.mouseItem.moveX!=0){let i=this.mouseItem.moveX*o;this.$set(this.mouseItem.time,"start",s+i),this.$set(this.mouseItem.time,"end",e+i),this.$set(this.mouseItem,"moveX",0),a=!0}if(typeof this.mouseItem.moveW=="number"&&this.mouseItem.moveW!=0){let i=this.mouseItem.moveW*o;this.$set(this.mouseItem.time,"end",e+i),this.$set(this.mouseItem,"moveW",0),a=!0}a?this.$emit("on-change",this.mouseItem):t.target.className=="timeline-title"&&this.clickItem(this.mouseItem),this.mouseItem=null}else this.dateMove!=null&&(this.dateMove=null)},scrollPosition(t){let s=new Date,e=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0),a=864e5/this.dateWidth,o=(this.lists[t].time.start-e)/a-this.dateWidth-this.mouseWidth;this.mouseWidth+=o,this.mouseScaleWidth+=o*(100/this.dateWidth)},clickItem(t){this.$emit("on-click",t)}}},D={};var yt=d(kt,gt,wt,!1,Ct,null,null,null);function Ct(t){for(let s in D)this[s]=D[s]}var bt=function(){return yt.exports}(),jt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-gstc-gantt"},[e("GanttView",{attrs:{lists:t.lists,menuWidth:t.menuWidth,itemWidth:80},on:{"on-change":t.onChange,"on-click":t.onClick}}),e("Dropdown",{staticClass:"project-gstc-dropdown-filtr",style:t.dropStyle,attrs:{trigger:"click"},on:{"on-click":t.onSwitchColumn}},[e("Icon",{staticClass:"project-gstc-dropdown-icon",class:{filtr:t.filtrProjectId>0},attrs:{type:"md-funnel"}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{class:{"dropdown-active":t.filtrProjectId==0},attrs:{name:0}},[t._v(t._s(t.$L("\u5168\u90E8")))]),t._l(t.projectColumn,function(a,o){return e("DropdownItem",{key:o,class:{"dropdown-active":t.filtrProjectId==a.id},attrs:{name:a.id}},[t._v(" "+t._s(a.name)+" "),a.tasks?e("span",[t._v("("+t._s(t.filtrLength(a.tasks))+")")]):t._e()])})],2)],1),e("div",{staticClass:"project-gstc-edit",class:{info:t.editShowInfo,visible:t.editData&&t.editData.length>0}},[e("div",{staticClass:"project-gstc-edit-info"},[e("Table",{attrs:{size:"small","max-height":"600",columns:t.editColumns,data:t.editData}}),e("div",{staticClass:"project-gstc-edit-btns"},[e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(a){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("\u4FDD\u5B58")))]),e("Icon",{staticClass:"zoom",attrs:{type:"md-arrow-dropright"},on:{click:function(a){t.editShowInfo=!1}}})],1)],1),e("div",{staticClass:"project-gstc-edit-small"},[e("div",{staticClass:"project-gstc-edit-text",on:{click:function(a){t.editShowInfo=!0}}},[t._v(t._s(t.$L("\u672A\u4FDD\u5B58\u8BA1\u5212\u65F6\u95F4"))+": "),t.editData?e("span",[t._v(t._s(t.editData.length))]):t._e()]),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(a){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)])],1)},Dt=[];const Tt={name:"ProjectGantt",components:{GanttView:bt},props:{projectColumn:{default:[]},flowInfo:{default:{}}},data(){return{lists:[],filtrProjectId:0,editColumns:[{title:this.$L("\u4EFB\u52A1\u540D\u79F0"),key:"label",minWidth:150,ellipsis:!0},{title:this.$L("\u539F\u8BA1\u5212\u65F6\u95F4"),minWidth:135,align:"center",render:(t,{row:s})=>s.notime===!0?t("span","-"):t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(s.baktime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(s.baktime.end/1e3)))])},{title:this.$L("\u65B0\u8BA1\u5212\u65F6\u95F4"),minWidth:135,align:"center",render:(t,{row:s})=>t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(s.newTime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(s.newTime.end/1e3)))])}],editData:[],editLoad:0,editShowInfo:!1}},mounted(){this.initData()},computed:{...p(["taskPriority"]),...w(["projectData"]),menuWidth(){return this.windowWidth<1440?180:260},dropStyle(){return this.windowWidth<1440?{left:"142px"}:{}},completedTask(){return this.projectData.cacheParameter.completedTask}},watch:{projectColumn:{handler(){this.initData()},deep:!0},flowInfo:{handler(){this.initData()},deep:!0},completedTask(){this.initData()}},methods:{initData(){this.lists=[],this.projectColumn&&this.projectColumn.some(this.checkAdd)},flowTask(t){return $A.leftExists(this.flowInfo.value,"user:")&&!t.task_user.find(({userid:s,owner:e})=>s===this.flowInfo.userid&&e)?!0:this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value},filtrLength(t){return t.filter(s=>!(s.complete_at&&!this.completedTask||this.flowTask(s))).length},checkAdd(t){this.filtrProjectId>0&&t.id!=this.filtrProjectId||t.tasks&&t.tasks.some(s=>{let e=!s.start_at||!s.end_at,a=this.getTimeObj(s),o=a.start,i=a.end;if(s.complete_at&&!this.completedTask||this.flowTask(s))return!1;let r="#058ce4";this.taskPriority.some(u=>{if(u.priority===s.p_level)return r=u.color,!0});let n={start:o,end:i},l=$A.cloneJSON(n),c=this.editData.find(({id:u})=>u==s.id);c&&(n=$A.cloneJSON(c.newTime)),this.lists.push({id:s.id,label:s.name,complete:s.complete_at,overdue:s.overdue,time:n,notime:e,baktime:l,style:{background:r}})})},onChange(t){const{time:s,baktime:e}=t;if(Math.abs(e.end-s.end)>1e3||Math.abs(e.start-s.start)>1e3){let a=this.editData.find(({id:o})=>o==t.id);a?a.newTime=s:this.editData.push({id:t.id,label:t.label,notime:t.notime,baktime:t.baktime,newTime:s})}},onClick(t){this.$store.dispatch("openTask",t)},editSubmit(t){this.editData&&this.editData.forEach(s=>{let e=this.lists.find(({id:a})=>a==s.id);if(t){this.editLoad++;let a=$A.formatDate("Y-m-d H:i",Math.round(s.newTime.start/1e3)),o=$A.formatDate("Y-m-d H:i",Math.round(s.newTime.end/1e3)),i={task_id:s.id,times:[a,o]};this.$store.dispatch("taskUpdate",i).then(({msg:r})=>{this.editLoad--,this.editLoad===0&&$A.messageSuccess(r),e&&this.$set(e,"baktime",$A.cloneJSON(e.time))}).catch(({msg:r})=>{this.editLoad--,this.editLoad===0&&$A.modalError(r),e&&this.$set(e,"time",$A.cloneJSON(e.baktime))})}else e&&this.$set(e,"time",$A.cloneJSON(e.baktime))}),this.editData=[]},getTimeObj(t){let s=$A.Time(t.start_at)||$A.Time(t.created_at),e=$A.Time(t.end_at)||$A.Time(t.created_at)+86400;return e==s&&(e=Math.round(new Date($A.formatDate("Y-m-d 23:59:59",e)).getTime()/1e3)),e=Math.max(e,s+60),s*=1e3,e*=1e3,{start:s,end:e}},onSwitchColumn(t){this.filtrProjectId=$A.runNum(t),this.initData()}}},T={};var Lt=d(Tt,jt,Dt,!1,It,null,null,null);function It(t){for(let s in T)this[s]=T[s]}var xt=function(){return Lt.exports}(),St=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"markdown-preview-nostyle",domProps:{innerHTML:t._s(t.html)}})},At=[];const Pt={name:"markdown-preview-nostyle",props:{initialValue:{type:String,default:""}},data(){return{html:""}},mounted(){this.translateMarkdown()},methods:{translateMarkdown(){this.html=N(this.initialValue,{sanitize:!1}).replace(/href="/gi,'target="_blank" href="')}},watch:{initialValue(){this.translateMarkdown()}}},L={};var Et=d(Pt,St,At,!1,Mt,null,null,null);function Mt(t){for(let s in L)this[s]=L[s]}var Ft=function(){return Et.exports}(),Wt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-panel",class:[t.tabTypeActive]},[e("PageTitle",{attrs:{title:t.projectData.name}}),e("div",{staticClass:"project-titbox"},[e("div",{staticClass:"project-title"},[e("div",{staticClass:"project-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("\uE676")])]),e("h1",{on:{click:t.showName}},[t._v(t._s(t.projectData.name))]),t.loading?e("div",{staticClass:"project-load"},[e("Loading")],1):t._e()]),e("ul",{staticClass:"project-icons"},[e("li",{staticClass:"project-avatar",class:{"cursor-default":t.projectData.owner_userid!==t.userId},on:{click:function(a){return t.projectDropdown("user")}}},[e("ul",[e("li",[e("UserAvatarTip",{attrs:{userid:t.projectData.owner_userid,size:36,borderWitdh:2,openDelay:0}},[e("p",[t._v(t._s(t.$L("\u9879\u76EE\u8D1F\u8D23\u4EBA")))])]),(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?e("Badge",{attrs:{type:"normal","overflow-count":999,count:t.projectData.project_user.length}}):t._e()],1),t._l(t.projectUser,function(a){return!(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?[a.userid===-1?e("li",{staticClass:"more"},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u5171"+t.projectData.project_user.length+"\u4E2A\u6210\u5458")}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1):e("li",[e("UserAvatarTip",{attrs:{userid:a.userid,size:36,borderWitdh:2,openDelay:0}})],1)]:t._e()})],2)]),e("li",{staticClass:"project-icon",on:{click:function(a){return t.addTaskOpen(0)}}},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u6DFB\u52A0\u4EFB\u52A1")}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"md-add"}})],1)],1),e("li",{class:["project-icon",t.searchText!=""?"active":""]},[e("Tooltip",{attrs:{always:t.searchText!="",theme:"light",rawIndex:10},on:{"on-popper-show":t.searchFocus}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-search"},on:{click:t.searchFocus}}),e("div",{attrs:{slot:"content"},slot:"content"},[e("Input",{ref:"searchInput",staticClass:"search-input",attrs:{placeholder:t.$L("ID\u3001\u540D\u79F0\u3001\u63CF\u8FF0..."),clearable:""},model:{value:t.searchText,callback:function(a){t.searchText=a},expression:"searchText"}})],1)],1)],1),e("li",{class:["project-icon",t.windowLandscape&&t.projectData.cacheParameter.chat?"active":""],on:{click:function(a){return t.toggleParameter("chat")}}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-chatbubbles"}}),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,count:t.msgUnread}})],1),e("li",{staticClass:"project-icon"},[e("EDropdown",{attrs:{trigger:"click",transfer:""},on:{command:t.projectDropdown}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-more"}}),t.projectData.owner_userid===t.userId?e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"setting"}},[t._v(t._s(t.$L("\u9879\u76EE\u8BBE\u7F6E")))]),e("EDropdownItem",{attrs:{command:"workflow"}},[t._v(t._s(t.$L("\u5DE5\u4F5C\u6D41\u8BBE\u7F6E")))]),e("EDropdownItem",{attrs:{command:"user",divided:""}},[t._v(t._s(t.$L("\u6210\u5458\u7BA1\u7406")))]),e("EDropdownItem",{attrs:{command:"invite"}},[t._v(t._s(t.$L("\u9080\u8BF7\u94FE\u63A5")))]),e("EDropdownItem",{attrs:{command:"log",divided:""}},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863\u4EFB\u52A1")))]),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("\u5DF2\u5220\u9664\u4EFB\u52A1")))]),e("EDropdownItem",{attrs:{command:"transfer",divided:""}},[t._v(t._s(t.$L("\u79FB\u4EA4\u9879\u76EE")))]),e("EDropdownItem",{attrs:{command:"archived"}},[t._v(t._s(t.$L("\u5F52\u6863\u9879\u76EE")))]),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"delete"}},[t._v(t._s(t.$L("\u5220\u9664\u9879\u76EE")))])],1):e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"log"}},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863\u4EFB\u52A1")))]),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("\u5DF2\u5220\u9664\u4EFB\u52A1")))]),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"exit",divided:""}},[t._v(t._s(t.$L("\u9000\u51FA\u9879\u76EE")))])],1)],1)],1)])]),e("div",{staticClass:"project-subbox"},[e("div",{staticClass:"project-subtitle",on:{click:t.showDesc}},[e("MarkdownPreviewNostyle",{ref:"descPreview",attrs:{initialValue:t.projectData.desc}})],1),e("div",{staticClass:"project-switch"},[t.completedCount>0?e("div",{staticClass:"project-checkbox"},[e("Checkbox",{attrs:{value:t.projectData.cacheParameter.completedTask},on:{"on-change":t.toggleCompleted}},[t._v(t._s(t.$L("\u663E\u793A\u5DF2\u5B8C\u6210")))])],1):t._e(),t.flowList.length>0?e("div",{staticClass:"project-select"},[e("Cascader",{ref:"flow",attrs:{data:t.flowData,"transfer-class-name":"project-panel-flow-cascader",transfer:""},on:{"on-change":t.flowChange}},[e("span",{class:`project-flow ${t.flowInfo.status||""}`},[t._v(t._s(t.flowTitle))])])],1):t._e(),e("div",{staticClass:"project-switch-button"},[e("div",{staticClass:"slider",style:t.tabTypeStyle}),e("div",{class:{active:t.tabTypeActive==="column"},on:{click:function(a){return t.tabTypeChange("column")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE60C")])]),e("div",{class:{active:t.tabTypeActive==="table"},on:{click:function(a){return t.tabTypeChange("table")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE66A")])]),e("div",{class:{active:t.tabTypeActive==="gantt"},on:{click:function(a){return t.tabTypeChange("gantt")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE797")])])])])]),t.tabTypeActive==="column"?e("div",{staticClass:"project-column"},[e("Draggable",{staticClass:"column-list",attrs:{list:t.columnList,animation:150,disabled:t.sortDisabled||t.$isEEUiApp||t.windowTouch,tag:"ul",draggable:".column-item"},on:{sort:function(a){return t.sortUpdate(!0)}}},[t._l(t.columnList,function(a){return e("li",{staticClass:"column-item"},[e("div",{class:["column-head",a.color?"custom-color":""],style:a.color?{backgroundColor:a.color}:{}},[e("div",{staticClass:"column-head-title"},[e("AutoTip",[t._v(t._s(a.name))]),e("em",[t._v("("+t._s(t.panelTask(a.tasks).length)+")")])],1),e("div",{staticClass:"column-head-icon"},[t.columnLoad[a.id]===!0?e("div",{staticClass:"loading"},[e("Loading")],1):e("EDropdown",{attrs:{trigger:"click",size:"small"},on:{command:function(o){return t.dropColumn(a,o)}}},[e("Icon",{attrs:{type:"ios-more"}}),e("EDropdownMenu",{staticClass:"project-panel-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"title"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("\u4FEE\u6539"))+" ")],1)]),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("\u5220\u9664"))+" ")],1)]),t._l(t.$store.state.columnColorList,function(o,i){return e("EDropdownItem",{key:i,attrs:{divided:i==0,command:o}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",style:{color:o.color||"#ddd"},domProps:{innerHTML:t._s(o.color==a.color?"":"")}}),t._v(t._s(t.$L(o.name))+" ")])])})],2)],1),e("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(o){return t.addTopShow(a.id,!0)}}})],1)]),e("Scrollbar",{staticClass:"column-task"},[t.columnTopShow[a.id]?e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":a.id,"project-id":t.projectId,"add-top":!0,"auto-active":""},on:{"on-close":function(o){return t.addTopShow(a.id,!1)},"on-priority":t.addTaskOpen}})],1):t._e(),e("Draggable",{staticClass:"task-list",attrs:{list:a.tasks,animation:150,disabled:t.sortDisabled||t.$isEEUiApp||t.windowTouch,draggable:".task-draggable",filter:".complete",group:"task"},on:{sort:t.sortUpdate,remove:t.sortUpdate}},[t._l(a.tasks,function(o){return e("div",{class:["task-item task-draggable",o.complete_at?"complete":"",t.taskIsHidden(o)?"hidden":""],style:o.color?{backgroundColor:o.color}:{},on:{click:function(i){return t.openTask(o)}}},[e("div",{class:["task-head",o.desc?"has-desc":""]},[e("div",{staticClass:"task-title"},[o.flow_item_name?e("span",{class:o.flow_item_status,on:{click:function(i){return i.stopPropagation(),t.openMenu(i,o)}}},[t._v(t._s(o.flow_item_name))]):t._e(),e("pre",[t._v(t._s(o.name))])]),e("div",{staticClass:"task-menu",on:{click:function(i){i.stopPropagation()}}},[e("TaskMenu",{ref:`taskMenu_${o.id}`,refInFor:!0,attrs:{task:o,icon:"ios-more"}})],1)]),o.complete_at?t._e():[o.desc?e("div",{staticClass:"task-desc"},[e("pre",{domProps:{innerHTML:t._s(o.desc)}})]):t._e(),o.task_tag.length>0?e("div",{staticClass:"task-tags"},t._l(o.task_tag,function(i,r){return e("Tag",{key:r,attrs:{color:i.color}},[t._v(t._s(i.name))])}),1):t._e(),e("div",{staticClass:"task-users"},[e("ul",[t._l(t.ownerUser(o.task_user),function(i,r){return e("li",{key:r},[e("UserAvatar",{attrs:{userid:i.userid,size:"32",borderWitdh:2,borderColor:o.color}})],1)}),t.ownerUser(o.task_user).length===0?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(i){return i.stopPropagation(),t.openTask(o,!0)}}},[t._v(t._s(t.$L("\u9886\u53D6\u4EFB\u52A1")))])],1):t._e()],2),o.file_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(o.file_num)),e("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),o.msg_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(o.msg_num)),e("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),e("div",{staticClass:"task-progress"},[o.sub_num>0?e("div",{staticClass:"task-sub-num"},[t._v(t._s(o.sub_complete)+"/"+t._s(o.sub_num))]):t._e(),e("Progress",{attrs:{percent:o.percent,"stroke-width":6}}),o.end_at?e("ETooltip",{class:["task-time",o.today?"today":"",o.overdue?"overdue":""],attrs:{disabled:t.$isEEUiApp||t.windowTouch,"open-delay":600,content:o.end_at}},[o.complete_at?t._e():e("div",[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(o.end_at)))])]):t._e()],1),o.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:o.p_color}}):t._e()]],2)}),e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":a.id,"project-id":t.projectId},on:{"on-priority":t.addTaskOpen}})],1)],2)],1)],1)}),e("li",{class:["add-column",t.addColumnShow?"show-input":""]},[e("div",{staticClass:"add-column-text",on:{click:t.addColumnOpen}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("\u6DFB\u52A0\u5217\u8868"))+" ")],1),e("div",{staticClass:"add-column-input"},[e("Input",{ref:"addColumnName",attrs:{placeholder:t.$L("\u5217\u8868\u540D\u79F0\uFF0C\u56DE\u8F66\u521B\u5EFA"),clearable:""},on:{"on-blur":t.addColumnBlur,"on-enter":t.addColumnSubmit,"on-clear":function(a){t.addColumnShow=!1}},model:{value:t.addColumnName,callback:function(a){t.addColumnName=a},expression:"addColumnName"}})],1)])],2)],1):t.tabTypeActive==="table"?e("Scrollbar",{staticClass:"project-table",attrs:{"enable-x":""}},[e("div",{staticClass:"project-table-head"},[e("Row",{staticClass:"task-row"},[e("Col",{attrs:{span:"12"}},[t._v("# "+t._s(t.$L("\u4EFB\u52A1\u540D\u79F0")))]),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("\u5217\u8868")))]),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(a){return t.onSort("level")}}},[t._v(" "+t._s(t.$L("\u4F18\u5148\u7EA7"))+" "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:t.sortField=="level"&&t.sortType=="asc"},attrs:{type:"md-arrow-dropup"}}),e("Icon",{class:{on:t.sortField=="level"&&t.sortType=="desc"},attrs:{type:"md-arrow-dropdown"}})],1)])]),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA")))]),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(a){return t.onSort("end_at")}}},[t._v(" "+t._s(t.$L("\u5230\u671F\u65F6\u95F4"))+" "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:t.sortField=="end_at"&&t.sortType=="asc"},attrs:{type:"md-arrow-dropup"}}),e("Icon",{class:{on:t.sortField=="end_at"&&t.sortType=="desc"},attrs:{type:"md-arrow-dropdown"}})],1)])])],1)],1),e("div",{class:["project-table-body",t.projectData.cacheParameter.showMy?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showMy")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u6211\u7684\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.myList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1),t.projectData.cacheParameter.showMy?e("TaskRow",{attrs:{list:t.transforTasks(t.myList),"open-key":"my","fast-add-task":""},on:{"on-priority":t.addTaskOpen}}):t._e()],1),t.helpList.length?e("div",{class:["project-table-body",t.projectData.cacheParameter.showHelp?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showHelp")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u534F\u52A9\u7684\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.helpList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1),t.projectData.cacheParameter.showHelp?e("TaskRow",{attrs:{list:t.helpList,"open-key":"help"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showUndone?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showUndone")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u672A\u5B8C\u6210\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.unList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1),t.projectData.cacheParameter.showUndone?e("TaskRow",{attrs:{list:t.unList,"open-key":"undone"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showCompleted?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showCompleted")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u5DF2\u5B8C\u6210\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.completedList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.projectData.task_num>0&&t.projectData.cacheParameter.showCompleted?t.$L("\u5B8C\u6210\u65F6\u95F4"):""))])],1),t.projectData.cacheParameter.showCompleted?e("TaskRow",{attrs:{list:t.completedList,"open-key":"completed",showCompleteAt:""},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e()]):t.tabTypeActive==="gantt"?e("div",{staticClass:"project-gantt"},[e("ProjectGantt",{attrs:{projectColumn:t.columnList,flowInfo:t.flowInfo}})],1):t._e(),e("Modal",{attrs:{title:t.$L("\u9879\u76EE\u8BBE\u7F6E"),"mask-closable":!1},model:{value:t.settingShow,callback:function(a){t.settingShow=a},expression:"settingShow"}},[e("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u9879\u76EE\u540D\u79F0")}},[e("Input",{ref:"projectName",attrs:{type:"text",maxlength:32,placeholder:t.$L("\u5FC5\u586B")},model:{value:t.settingData.name,callback:function(a){t.$set(t.settingData,"name",a)},expression:"settingData.name"}})],1),e("FormItem",{attrs:{prop:"desc",label:t.$L("\u9879\u76EE\u4ECB\u7ECD")}},[e("Input",{ref:"projectDesc",attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},maxlength:255,placeholder:`${t.$L("\u9009\u586B")} (${t.$L("\u652F\u6301 Markdown \u683C\u5F0F")})`},model:{value:t.settingData.desc,callback:function(a){t.$set(t.settingData,"desc",a)},expression:"settingData.desc"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.settingShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.settingLoad>0},on:{click:t.onSetting}},[t._v(t._s(t.$L("\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u6210\u5458\u7BA1\u7406"),"mask-closable":!1},model:{value:t.userShow,callback:function(a){t.userShow=a},expression:"userShow"}},[e("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u9879\u76EE\u6210\u5458")}},[e("UserSelect",{attrs:{uncancelable:t.userData.uncancelable,"multiple-max":100,title:t.$L("\u9009\u62E9\u9879\u76EE\u6210\u5458")},model:{value:t.userData.userids,callback:function(a){t.$set(t.userData,"userids",a)},expression:"userData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.userShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),t.userWaitRemove.length>0?e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":t.onUser}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("\u79FB\u9664\u6210\u5458\u8D1F\u8D23\u7684\u4EFB\u52A1\u5C06\u53D8\u6210\u65E0\u8D1F\u8D23\u4EBA\uFF0C")))])]),e("p",[t._v(t._s(t.$L("\u6CE8\u610F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF01")))]),e("ul",{staticClass:"project-panel-wait-remove"},[e("li",[t._v(t._s(t.$L("\u5373\u5C06\u79FB\u9664"))+"\uFF1A")]),t._l(t.userWaitRemove,function(a){return e("li",{key:a},[e("UserAvatar",{attrs:{userid:a,size:20,showName:""}})],1)})],2)]),e("Button",{attrs:{type:"primary",loading:t.userLoad>0}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1):e("Button",{attrs:{type:"primary",loading:t.userLoad>0},on:{click:t.onUser}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u9080\u8BF7\u94FE\u63A5"),"mask-closable":!1},model:{value:t.inviteShow,callback:function(a){t.inviteShow=a},expression:"inviteShow"}},[e("Form",{attrs:{model:t.inviteData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u94FE\u63A5\u5730\u5740")}},[e("Input",{ref:"inviteInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":t.inviteFocus},model:{value:t.inviteData.url,callback:function(a){t.$set(t.inviteData,"url",a)},expression:"inviteData.url"}}),e("div",{staticClass:"form-tip"},[t._v(" "+t._s(t.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u76F4\u63A5\u52A0\u5165\u9879\u76EE\u3002"))+" "),e("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(a){return t.inviteGet(!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u9080\u8BF7\u94FE\u63A5\u5931\u6548\uFF01")))])])]),e("a",{attrs:{href:"javascript:void(0)"}},[t._v(t._s(t.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.inviteShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.inviteLoad>0},on:{click:t.inviteCopy}},[t._v(t._s(t.$L("\u590D\u5236")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u79FB\u4EA4\u9879\u76EE"),"mask-closable":!1},model:{value:t.transferShow,callback:function(a){t.transferShow=a},expression:"transferShow"}},[e("Form",{attrs:{model:t.transferData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("\u65B0\u9879\u76EE\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"multiple-max":1,title:t.$L("\u9009\u62E9\u9879\u76EE\u8D1F\u8D23\u4EBA")},model:{value:t.transferData.owner_userid,callback:function(a){t.$set(t.transferData,"owner_userid",a)},expression:"transferData.owner_userid"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.transferShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.transferLoad>0},on:{click:t.onTransfer}},[t._v(t._s(t.$L("\u79FB\u4EA4")))])],1)],1),e("DrawerOverlay",{attrs:{placement:"right",beforeClose:t.workflowBeforeClose,size:1280},model:{value:t.workflowShow,callback:function(a){t.workflowShow=a},expression:"workflowShow"}},[t.workflowShow?e("ProjectWorkflow",{ref:"workflow",attrs:{"project-id":t.projectId}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:720},model:{value:t.logShow,callback:function(a){t.logShow=a},expression:"logShow"}},[t.logShow?e("ProjectLog",{attrs:{"project-id":t.projectId}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1e3},model:{value:t.archivedTaskShow,callback:function(a){t.archivedTaskShow=a},expression:"archivedTaskShow"}},[t.archivedTaskShow?e("TaskArchived",{attrs:{"project-id":t.projectId}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1e3},model:{value:t.deletedTaskShow,callback:function(a){t.deletedTaskShow=a},expression:"deletedTaskShow"}},[t.deletedTaskShow?e("TaskDeleted",{attrs:{"project-id":t.projectId}}):t._e()],1)],1)},Nt=[];const Ot={name:"ProjectPanel",components:{UserAvatarTip:R,UserSelect:F,MarkdownPreviewNostyle:Ft,TaskMenu:M,ProjectWorkflow:ht,DrawerOverlay:z,ProjectLog:O,TaskArchived:rt,TaskRow:tt,Draggable:P,TaskAddSimple:W,TaskPriority:E,TaskDeleted:$t,ProjectGantt:xt},data(){return{loading:!1,nowTime:$A.Time(),nowInterval:null,columnLoad:{},columnTopShow:{},sortField:"end_at",sortType:"desc",searchText:"",addColumnShow:!1,addColumnName:"",sortData:[],sortDisabled:!1,settingShow:!1,settingData:{},settingLoad:0,userShow:!1,userData:{},userLoad:0,inviteShow:!1,inviteData:{},inviteLoad:0,transferShow:!1,transferData:{},transferLoad:0,workflowShow:!1,logShow:!1,archivedTaskShow:!1,deletedTaskShow:!1,flowInfo:{},flowList:[]}},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3)},destroyed(){clearInterval(this.nowInterval)},computed:{...p(["cacheDialogs","projectId","projectLoad","cacheTasks","cacheColumns","taskCompleteTemps","cacheUserBasic"]),...w(["projectData","transforTasks"]),tabTypeActive(){return this.projectData.cacheParameter.menuType},tabTypeStyle(){const t={};switch(this.tabTypeActive){case"column":t.left="0";break;case"table":t.left="33.33%";break;case"gantt":t.left="66.66%";break;default:t.display="none"}return t},userWaitRemove(){const{userids:t,useridbak:s}=this.userData;if(!t)return[];let e=[];return s.some(a=>{t.includes(a)||e.push(a)}),e},msgUnread(){const{cacheDialogs:t,projectData:s}=this,e=t.find(({id:a})=>a===s.dialog_id);return $A.getDialogNum(e)},panelTask(){const{searchText:t,flowInfo:s}=this;return function(e){return this.projectData.cacheParameter.completedTask||(e=e.filter(({complete_at:a})=>!a)),$A.leftExists(s.value,"user:")?e=e.filter(({task_user:a})=>a.find(({userid:o,owner:i})=>o===s.userid&&i)):s.value>0?e=e.filter(({flow_item_id:a})=>a===s.value):s.value==-1&&(e=e.filter(({start_at:a})=>!a)),t&&(e=e.filter(({id:a,name:o,desc:i})=>a==t||$A.strExists(`${o} ${i}`,t))),e}},projectUser(){const{projectData:t,windowWidth:s}=this;if(!t.project_user)return[];let e=s>1200?8:3,a=t.project_user.filter(({userid:i})=>i!=t.owner_userid);if(a.length<=e)return a;let o=a.slice(0,e-1);return o.push({userid:-1}),o.push(a[a.length-1]),o},allTask(){const{cacheTasks:t,projectId:s}=this;return t.filter(e=>e.archived_at||!e.created_at?!1:e.project_id==s)},columnList(){const{projectId:t,cacheColumns:s,allTask:e}=this,a=s.filter(({project_id:o})=>o==t).sort((o,i)=>o.sort!=i.sort?o.sort-i.sort:o.id-i.id);return a.forEach(o=>{o.tasks=this.transforTasks(e.filter(i=>i.column_id==o.id)).sort((i,r)=>i.complete_at||r.complete_at?$A.Date(i.complete_at)-$A.Date(r.complete_at):i.sort!=r.sort?i.sort-r.sort:i.id-r.id)}),a},myList(){const{allTask:t,taskCompleteTemps:s,sortField:e,sortType:a}=this;let o=t.filter(i=>this.myFilter(i));if(s.length>0){let i=t.filter(r=>s.includes(r.id)&&this.myFilter(r,!1));i.length>0&&(o=$A.cloneJSON(o),o.push(...i))}return o.sort((i,r)=>{if(a=="asc"&&([i,r]=[r,i]),e=="level")return i.p_level-r.p_level;if(e=="end_at")return i.end_at==r.end_at?i.p_level-r.p_level:$A.Date(i.end_at||"2099-12-31 23:59:59")-$A.Date(r.end_at||"2099-12-31 23:59:59")})},helpList(){const{allTask:t,taskCompleteTemps:s,sortField:e,sortType:a}=this;let o=t.filter(i=>this.helpFilter(i));if(s.length>0){let i=t.filter(r=>s.includes(r.id)&&this.helpFilter(r,!1));i.length>0&&(o=$A.cloneJSON(o),o.push(...i))}return o.sort((i,r)=>{if(a=="asc"&&([i,r]=[r,i]),e=="level")return i.p_level-r.p_level;if(e=="end_at")return i.end_at==r.end_at?i.p_level-r.p_level:$A.Date(i.end_at||"2099-12-31 23:59:59")-$A.Date(r.end_at||"2099-12-31 23:59:59")})},unList(){const{allTask:t,searchText:s,sortField:e,sortType:a}=this;return t.filter(i=>i.parent_id>0||this.flowTask(i)||s&&i.id!=s&&!$A.strExists(i.name,s)&&!$A.strExists(i.desc,s)?!1:!i.complete_at).sort((i,r)=>{if(a=="asc"&&([i,r]=[r,i]),e=="level")return i.p_level-r.p_level;if(e=="end_at")return i.end_at==r.end_at?i.p_level-r.p_level:$A.Date(i.end_at||"2099-12-31 23:59:59")-$A.Date(r.end_at||"2099-12-31 23:59:59")})},completedList(){const{allTask:t,searchText:s}=this;return t.filter(a=>a.parent_id>0||this.flowTask(a)||s&&a.id!=s&&!$A.strExists(a.name,s)&&!$A.strExists(a.desc,s)?!1:a.complete_at).sort((a,o)=>{let i=$A.Date(a.complete_at);return $A.Date(o.complete_at)-i})},completedCount(){const{allTask:t}=this;return t.filter(s=>s.parent_id>0?!1:s.complete_at).length},flowTitle(){const{flowInfo:t,flowData:s,allTask:e}=this;if(t.value==-1)return t.label;if(t.value){const a=s.find(o=>o.value===t.value);return a?a.label:t.label}return`${this.$L("\u5168\u90E8")} (${e.length})`},flowData(){const{flowList:t,allTask:s,cacheUserBasic:e}=this,a=[{value:0,label:`${this.$L("\u5168\u90E8")} (${s.length})`,children:[]}];a.push({value:-1,label:`${this.$L("\u672A\u8BA1\u5212")} (${s.filter(({start_at:r})=>!r).length})`,children:[]});const o=t.map(r=>({value:r.id,label:r.name,status:r.status,children:r.project_flow_item.map(n=>{const l=s.filter(({flow_item_id:c})=>c==n.id).length;return{value:n.id,label:`${n.name} (${l})`,status:n.status,class:n.status}})}));o.length===1?a.push(...o[0].children):o.length>0&&a.push(...o);const{project_user:i}=this.projectData;if($A.isArray(i)){const r=i.map((n,l)=>{const c=e.find(({userid:f})=>f===n.userid)||{},u=s.filter(({task_user:f,complete_at:v})=>!this.projectData.cacheParameter.completedTask&&v?!1:f.find(({userid:h,owner:m})=>h===n.userid&&m)).length;return{value:`user:${c.userid}`,label:`${c.nickname} (${u})`,class:`user-${l}`,userid:c.userid||0,length:u}}).filter(({userid:n,length:l})=>n>0&&l>0);r.length>0&&a.push(...r)}return a}},watch:{projectData(){this.sortData=this.getSort()},projectLoad(t){this._loadTimeout&&clearTimeout(this._loadTimeout),t>0?this._loadTimeout=setTimeout(()=>{this.loading=!0},1e3):this.loading=!1},projectId:{handler(t){t>0&&this.getFlowData()},immediate:!0}},methods:{showName(){this.windowLandscape||$A.modalInfo({language:!1,title:this.$L("\u9879\u76EE\u540D\u79F0"),content:this.projectData.name})},showDesc(){this.windowLandscape||$A.modalInfo({language:!1,title:this.$L("\u9879\u76EE\u63CF\u8FF0"),content:this.$refs.descPreview.$el.innerHTML})},searchFocus(){this.$nextTick(()=>{this.$refs.searchInput.focus({cursor:"end"})})},getSort(){const t=[];return this.columnList.forEach(s=>{t.push({id:s.id,task:s.tasks.map(({id:e})=>e)})}),t},sortUpdate(t){const s=this.sortData,e=this.getSort();if(JSON.stringify(s)===JSON.stringify(e))return;this.sortData=e;const a={project_id:this.projectId,sort:this.sortData,only_column:t===!0?1:0};this.sortDisabled=!0,this.$store.dispatch("call",{url:"project/sort",data:a,method:"post"}).then(({msg:o})=>{$A.messageSuccess(o),this.sortDisabled=!1;let i,r=[];a.only_column?(i=-1,a.sort.forEach(n=>{i++,r.push({id:n.id,sort:i})}),this.$store.dispatch("saveColumn",r)):(a.sort.forEach(n=>{i=-1,r.push(...n.task.map(l=>(i++,r.push(...this.allTask.filter(c=>c.parent_id==l).map(({id:c})=>({id:c,sort:i,column_id:n.id}))),{id:l,sort:i,column_id:n.id})))}),this.$store.dispatch("saveTask",r))}).catch(({msg:o})=>{$A.modalError(o),this.sortDisabled=!1,this.$store.dispatch("getTaskForProject",this.projectId).catch(()=>{})})},addTopShow(t,s){this.$set(this.columnTopShow,t,s)},addTaskOpen(t){g.Store.set("addTask",t)},addColumnOpen(){this.addColumnShow=!0,this.$nextTick(()=>{this.$refs.addColumnName.focus()})},addColumnBlur(){this.addColumnName===""&&(this.addColumnShow=!1)},addColumnSubmit(){let t=this.addColumnName.trim();t!==""&&this.$store.dispatch("call",{url:"project/column/add",data:{project_id:this.projectId,name:t}}).then(({data:s,msg:e})=>{$A.messageSuccess(e),this.addColumnName="",this.$store.dispatch("saveColumn",s)}).catch(({msg:s})=>{$A.modalError(s)})},dropColumn(t,s){s==="title"?this.titleColumn(t):s==="remove"?this.removeColumn(t):s.name&&this.updateColumn(t,{color:s.color}).catch(e=>{$A.modalError(e)})},titleColumn(t){$A.modalInput({value:t.name,title:"\u4FEE\u6539\u5217\u8868",placeholder:"\u8F93\u5165\u5217\u8868\u540D\u79F0",onOk:s=>s?this.updateColumn(t,{name:s}):"\u5217\u8868\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"})},updateColumn(t,s){return new Promise((e,a)=>{if(this.columnLoad[t.id]===!0){e();return}this.$set(this.columnLoad,t.id,!0),Object.keys(s).forEach(o=>this.$set(t,o,s[o])),this.$store.dispatch("call",{url:"project/column/update",data:Object.assign(s,{column_id:t.id})}).then(({data:o})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("saveColumn",o),e()}).catch(({msg:o})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("getColumns",this.projectId).catch(()=>{}),a(o)})})},removeColumn(t){$A.modalConfirm({title:"\u5220\u9664\u5217\u8868",content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5217\u8868\u3010"+t.name+"\u3011\u53CA\u5217\u8868\u5185\u7684\u4EFB\u52A1\u5417\uFF1F",loading:!0,onOk:()=>{if(this.columnLoad[t.id]!==!0)return this.$set(this.columnLoad,t.id,!0),new Promise((s,e)=>{this.$store.dispatch("removeColumn",t.id).then(({msg:a})=>{s(a)}).catch(({msg:a})=>{e(a)}).finally(a=>{this.$set(this.columnLoad,t.id,!1)})})}})},onSort(t){this.sortField=t,this.sortType=this.sortType=="desc"?"asc":"desc"},onSetting(){this.settingLoad++,this.$store.dispatch("call",{url:"project/update",data:Object.assign(this.settingData,{project_id:this.projectId})}).then(({data:t,msg:s})=>{$A.messageSuccess(s),this.settingShow=!1,this.$store.dispatch("saveProject",t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.settingLoad--})},onUser(){this.userLoad++,this.$store.dispatch("call",{url:"project/user",data:{project_id:this.projectId,userid:this.userData.userids}}).then(({msg:t})=>{$A.messageSuccess(t),this.userShow=!1,this.$store.dispatch("getProjectOne",this.projectId).catch(()=>{}),this.$store.dispatch("getTaskForProject",this.projectId).catch(()=>{})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.userLoad--})},onTransfer(){this.transferLoad++,this.$store.dispatch("call",{url:"project/transfer",data:{project_id:this.projectId,owner_userid:this.transferData.owner_userid[0]}}).then(({msg:t})=>{$A.messageSuccess(t),this.transferShow=!1,this.$store.dispatch("getProjectOne",this.projectId).catch(()=>{}),this.$store.dispatch("getTaskForProject",this.projectId).catch(()=>{})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.transferLoad--})},onArchived(){$A.modalConfirm({title:"\u5F52\u6863\u9879\u76EE",content:"\u4F60\u786E\u5B9A\u8981\u5F52\u6863\u9879\u76EE\u3010"+this.projectData.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,s)=>{this.$store.dispatch("archivedProject",this.projectId).then(({msg:e})=>{t(e)}).catch(({msg:e})=>{s(e)})})})},onDelete(){$A.modalConfirm({title:"\u5220\u9664\u9879\u76EE",content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u9879\u76EE\u3010"+this.projectData.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,s)=>{this.$store.dispatch("removeProject",this.projectId).then(({msg:e})=>{t(e)}).catch(({msg:e})=>{s(e)})})})},onExit(){$A.modalConfirm({title:"\u9000\u51FA\u9879\u76EE",content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u9879\u76EE\u3010"+this.projectData.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,s)=>{this.$store.dispatch("exitProject",this.projectId).then(({msg:e})=>{t(e)}).catch(({msg:e})=>{s(e)})})})},projectDropdown(t){switch(t){case"setting":this.$set(this.settingData,"name",this.projectData.name),this.$set(this.settingData,"desc",this.projectData.desc),this.settingShow=!0,this.$nextTick(()=>{this.$refs.projectName.focus(),setTimeout(this.$refs.projectDesc.resizeTextarea,0)});break;case"user":if(this.projectData.owner_userid!==this.userId)return;const s=this.projectData.project_user.map(({userid:e})=>e);this.$set(this.userData,"userids",s),this.$set(this.userData,"useridbak",s),this.$set(this.userData,"uncancelable",[this.projectData.owner_userid]),this.userShow=!0;break;case"invite":this.inviteData={},this.inviteShow=!0,this.inviteGet();break;case"workflow":this.workflowShow=!0;break;case"log":this.logShow=!0;break;case"archived_task":this.archivedTaskShow=!0;break;case"deleted_task":this.deletedTaskShow=!0;break;case"transfer":this.$set(this.transferData,"owner_userid",[]),this.transferShow=!0;break;case"archived":this.onArchived();break;case"delete":this.onDelete();break;case"exit":this.onExit();break}},openTask(t,s){this.$store.dispatch("openTask",t),s===!0&&setTimeout(()=>{g.Store.set("receiveTask",!0)},300)},openMenu(t,s){const e=this.$refs[`taskMenu_${s.id}`];e&&e[0].handleClick(t)},taskIsHidden(t){const{id:s,name:e,desc:a,complete_at:o}=t,{searchText:i}=this;return!!(!this.projectData.cacheParameter.completedTask&&o||this.flowTask(t)||i&&s!=i&&!$A.strExists(`${e} ${a}`,i))},ownerUser(t){return t.filter(({owner:s})=>s==1).sort((s,e)=>s.id-e.id)},inviteGet(t){this.inviteLoad++,this.$store.dispatch("call",{url:"project/invite",data:{project_id:this.projectId,refresh:t===!0?"yes":"no"}}).then(({data:s})=>{this.inviteData=s,this.inviteCopy()}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.inviteLoad--})},getFlowData(){this.flowInfo={},this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then(({data:t})=>{var s;this.flowList=t,(s=this.$refs.flow)==null||s.clearSelect()}).catch(()=>{this.flowList=[]})},flowChange(t,s){this.flowInfo=s.pop()||{}},inviteCopy(){!this.inviteData.url||(this.inviteFocus(),this.$copyText(this.inviteData.url).then(t=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(t=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},inviteFocus(){this.$nextTick(t=>{this.$refs.inviteInput.focus({cursor:"all"})})},toggleCompleted(){this.toggleParameter("completedTask")},workflowBeforeClose(){return new Promise(t=>{if(!this.$refs.workflow){t();return}if(!this.$refs.workflow.existDiff()){t();return}$A.modalConfirm({content:"\u8BBE\u7F6E\u5C1A\u672A\u4FDD\u5B58\uFF0C\u662F\u5426\u653E\u5F03\u4FEE\u6539\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{t()}})})},myFilter(t,s=!0){return!this.projectData.cacheParameter.completedTask&&s===!0&&t.complete_at||this.flowTask(t)||this.searchText&&t.id!=this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText)?!1:t.owner==1},helpFilter(t,s=!0){return t.parent_id>0||!this.projectData.cacheParameter.completedTask&&s===!0&&t.complete_at||this.flowTask(t)||this.searchText&&t.id!=this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText)?!1:t.task_user&&t.task_user.find(({userid:e,owner:a})=>e==this.userId&&a==0)},flowTask(t){return $A.leftExists(this.flowInfo.value,"user:")&&!t.task_user.find(({userid:s,owner:e})=>s===this.flowInfo.userid&&e)||this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value?!0:!!(this.flowInfo.value==-1&&t.start_at)},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},tabTypeChange(t){switch(t){case"column":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"column"});break;case"table":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"table"});break;case"gantt":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"gantt"});break}},toggleParameter(t){if(t==="completedTask")this.$store.dispatch("forgetTaskCompleteTemp",!0);else if(t==="chat"&&this.windowPortrait){this.$store.dispatch("openDialog",this.projectData.dialog_id);return}this.$store.dispatch("toggleProjectParameter",t)},onBack(){const{name:t,params:s}=this.$store.state.routeHistoryLast;t===this.$route.name&&/^\d+$/.test(s.projectId)?this.goForward({name:this.$route.name,params:{projectId:"all"}}):this.goBack()}}},I={};var zt=d(Ot,Wt,Nt,!1,Rt,null,null,null);function Rt(t){for(let s in I)this[s]=I[s]}var Ut=function(){return zt.exports}(),Bt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.dialogShow?e("DialogWrapper",{staticClass:"project-dialog",attrs:{"dialog-id":t.projectData.dialog_id}},[e("template",{slot:"head"},[e("div",{staticClass:"dialog-user"},[e("div",{staticClass:"member-head"},[e("div",{staticClass:"member-title"},[t._v(t._s(t.$L("\u9879\u76EE\u6210\u5458"))),e("span",{on:{click:function(a){t.memberShowAll=!t.memberShowAll}}},[t._v("("+t._s(t.projectData.project_user.length)+")")])]),e("div",{staticClass:"member-close",on:{click:t.onClose}},[e("Icon",{attrs:{type:"ios-close"}})],1)]),e("ul",{class:["member-list",t.memberShowAll?"member-all":""]},t._l(t.projectData.project_user,function(a){return e("li",[e("UserAvatar",{attrs:{userid:a.userid,size:36}})],1)}),0)]),e("div",{staticClass:"nav-wrapper"},[e("div",{staticClass:"dialog-title"},[e("h2",[t._v(t._s(t.$L("\u7FA4\u804A")))])])])])],2):t._e()},Vt=[];const Ht={name:"ProjectDialog",components:{DialogWrapper:U},data(){return{loadIng:!1,memberShowAll:!1}},computed:{...w(["projectData"]),dialogShow(){return this.windowLandscape&&this.projectData.dialog_id&&this.projectData.cacheParameter.chat}},methods:{onClose(){this.$store.dispatch("toggleProjectParameter","chat")}}},x={};var Kt=d(Ht,Bt,Vt,!1,Yt,null,null,null);function Yt(t){for(let s in x)this[s]=x[s]}var Xt=function(){return Kt.exports}(),Jt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-list"},[e("PageTitle",{attrs:{title:t.$L("\u9879\u76EE")}}),e("div",{staticClass:"list-search"},[e("div",{staticClass:"search-wrapper"},[e("Input",{attrs:{placeholder:t.$L(t.loadProjects?"\u66F4\u65B0\u4E2D...":"\u641C\u7D22\u9879\u76EE"),clearable:""},model:{value:t.projectKeyValue,callback:function(a){t.projectKeyValue=a},expression:"projectKeyValue"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.loadProjects?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)])],1)]),e("ul",{on:{scroll:function(a){t.operateVisible=!1}}},[t.projectLists.length===0?[t.projectKeyLoading>0?e("li",{staticClass:"loading"},[e("Loading")],1):e("li",{staticClass:"nothing"},[t._v(" "+t._s(t.$L(t.projectKeyValue?`\u6CA1\u6709\u4EFB\u4F55\u4E0E"${t.projectKeyValue}"\u76F8\u5173\u7684\u9879\u76EE`:"\u6CA1\u6709\u4EFB\u4F55\u9879\u76EE"))+" ")])]:t._e(),t._l(t.projectLists,function(a,o){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:o,class:{operate:a.id==t.operateItem.id&&t.operateVisible},attrs:{"data-id":a.id},on:{click:function(i){return t.toggleRoute("project",{projectId:a.id})}}},[e("div",{staticClass:"project-item"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"project-h1"},[e("div",{staticClass:"project-name"},[t._v(t._s(a.name))]),a.top_at?e("div",{staticClass:"icon-top"}):t._e(),a.task_my_num-a.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(a.task_my_num-a.task_my_complete))]):t._e()]),e("div",{staticClass:"project-h2"},[t._v(" "+t._s(a.desc)+" ")])]),a.task_num>0?e("div",{staticClass:"item-right",on:{click:function(i){return i.stopPropagation(),t.modalPercent(a)}}},[e("iCircle",{attrs:{type:"circle","trail-color":"rgba(132, 197, 106, 0.2)","trail-width":7,"stroke-color":a.task_percent===100?"rgba(132, 197, 106, 0)":"#84C56A","stroke-width":7,percent:a.task_percent,size:44}},[a.task_percent===100?e("Icon",{attrs:{type:"ios-checkmark"}}):e("span",{staticClass:"percent-text"},[t._v(t._s(a.task_percent)+"%")])],1)],1):t._e()])])})],2),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLandscape?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(a){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(a){return t.handleTopClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.operateItem.top_at?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876\u8BE5\u9879\u76EE"))+" ")])],1)],1)],1)],1)},Gt=[];const qt={name:"ProjectList",directives:{longpress:B},data(){return{projectKeyValue:"",projectKeyLoading:0,operateStyles:{},operateVisible:!1,operateItem:{}}},computed:{...p(["cacheProjects","loadProjects"]),projectLists(){const{projectKeyValue:t,cacheProjects:s}=this,e=$A.cloneJSON(s).sort((a,o)=>a.top_at||o.top_at?$A.Date(o.top_at)-$A.Date(a.top_at):o.id-a.id);return t?e.filter(a=>$A.strExists(`${a.name} ${a.desc}`,t)):e}},watch:{projectKeyValue(t){t!=""&&(this.projectKeyLoading++,setTimeout(()=>{this.projectKeyValue==t&&this.searchProject(),this.projectKeyLoading--},600))}},methods:{searchProject(){this.projectKeyLoading++,this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue},hideload:!0}).finally(t=>{this.projectKeyLoading--})},toggleRoute(t,s){this.operateVisible||this.goForward({name:"manage-"+t,params:s||{}})},modalPercent(t){if(this.operateVisible)return;let s=`

    ${this.$L("\u603B\u8FDB\u5EA6")}

    `;s+=`

    ${this.$L("\u603B\u6570\u91CF")}: ${t.task_num}

    `,s+=`

    ${this.$L("\u5DF2\u5B8C\u6210")}: ${t.task_complete}

    `,s+=`

    ${this.$L("\u6211\u7684\u4EFB\u52A1")}

    `,s+=`

    ${this.$L("\u603B\u6570\u91CF")}: ${t.task_my_num}

    `,s+=`

    ${this.$L("\u5DF2\u5B8C\u6210")}: ${t.task_my_complete}

    `,$A.modalInfo({language:!1,title:`${t.name} ${this.$L("\u9879\u76EE\u8FDB\u5EA6")}`,content:s})},handleLongpress(t,s){const e=$A.getAttr(s,"data-id"),a=this.projectLists.find(o=>o.id==e);!a||(this.operateVisible=!1,this.operateItem=$A.isJson(a)?a:{},this.$nextTick(()=>{const o=s.getBoundingClientRect(),i=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-i.left}px`,top:`${o.top+this.windowScrollY}px`,height:o.height+"px"},this.operateVisible=!0}))},handleTopClick(){this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then(({data:t})=>{this.$store.dispatch("saveProject",t)}).catch(({msg:t})=>{$A.modalError(t)})}}},S={};var Qt=d(qt,Jt,Gt,!1,Zt,null,null,null);function Zt(t){for(let s in S)this[s]=S[s]}var te=function(){return Qt.exports}(),ee=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"page-project"},[t.projectId>0?[e("ProjectPanel"),e("ProjectDialog")]:t._e(),t.windowPortrait?e("ProjectList",{directives:[{name:"show",rawName:"v-show",value:t.projectId===0,expression:"projectId === 0"}]}):t._e()],2)},se=[];const ae={components:{ProjectList:te,ProjectDialog:Xt,ProjectPanel:Ut},deactivated(){this.$store.dispatch("forgetTaskCompleteTemp",!0)},computed:{...p(["cacheProjects","wsOpenNum"]),projectId(){const{projectId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)}},watch:{projectId:{handler(){this.getProjectData()},immediate:!0},wsOpenNum(t){t<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout(()=>{this.$route.name=="manage-project"&&this.getProjectData()},5e3))}},methods:{getProjectData(){if(this.projectId<=0)return;const t=this.projectId;this.$nextTick(()=>{this.$store.state.projectId=t,this.$store.dispatch("getProjectOne",t).then(()=>{this.$store.dispatch("getColumns",t).catch(()=>{}),this.$store.dispatch("getTaskForProject",t).catch(()=>{})}).catch(({msg:s})=>{t===this.projectId&&$A.modalWarning({content:s,onOk:()=>{const e=this.cacheProjects.find(({id:a})=>a);e?$A.goForward({name:"manage-project",params:{projectId:e.id}}):$A.goForward({name:"manage-dashboard"})}})}),this.$store.dispatch("forgetTaskCompleteTemp",!0)})}}},A={};var oe=d(ae,ee,se,!1,ie,null,null,null);function ie(t){for(let s in A)this[s]=A[s]}var _e=function(){return oe.exports}();export{_e as default}; +import{m as p,n as d,a as g,D as P,b as w,t as N}from"./app.6910ca56.js";import{T as E,P as O}from"./ProjectLog.55720685.js";import{T as M}from"./TaskMenu.0454bb90.js";import{D as z}from"./index.8984a77c.js";import{U as F}from"./UserSelect.1938cd94.js";import{U as R}from"./tip.6872e3c6.js";import{D as U}from"./DialogWrapper.54a1354f.js";import{l as B}from"./longpress.43ca7fd9.js";import"./ImgUpload.8863e78d.js";import"./details.97854344.js";var V=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.rowMode?e("Row",{staticClass:"task-add-row"},[e("Col",{class:["row-add",t.active?"active":""],attrs:{span:"12"}},[e("div",{staticClass:"add-input",on:{mouseenter:function(a){t.mouseEnter=!0},mouseleave:function(a){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"\u63CF\u8FF0\uFF0C\u56DE\u8F66\u521B\u5EFA"),enterkeyhint:"done"},on:{"on-focus":function(a){t.onFocus=!0},"on-blur":function(a){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}}),t.parentId==0?e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,function(a,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.taskPriorityContent(a)}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.addData.p_name==a.name?"":"")},on:{click:function(i){return t.choosePriority(a)}}})]):t._e()],1)}),0),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1):t._e()],1),e("div",{staticClass:"add-btn",on:{click:t.openAdd}},[e("Icon",{staticClass:"add-icon",attrs:{type:"md-add"}}),t._v(t._s(t.$L("\u6DFB\u52A0"+t.typeName))+" ")],1)]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1):e("div",{class:["task-add-simple",t.active?"active":""],on:{mouseenter:function(a){t.mouseEnter=!0},mouseleave:function(a){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"\u63CF\u8FF0\uFF0C\u56DE\u8F66\u521B\u5EFA"),enterkeyhint:"done"},on:{"on-focus":function(a){t.onFocus=!0},"on-blur":function(a){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(a){t.$set(t.addData,"name",a)},expression:"addData.name"}}),e("div",{staticClass:"add-placeholder",on:{click:t.openAdd}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("\u6DFB\u52A0"+t.typeName))+" ")],1),e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,function(a,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.taskPriorityContent(a)}},[e("i",{staticClass:"taskfont",style:{color:a.color},domProps:{innerHTML:t._s(t.addData.p_name==a.name?"":"")},on:{click:function(i){return t.choosePriority(a)}}})]):t._e()],1)}),0),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)},H=[];const K={name:"TaskAddSimple",props:{parentId:{type:Number,default:0},projectId:{type:Number,default:0},columnId:{type:Number,default:0},addTop:{type:Boolean,default:!1},autoActive:{type:Boolean,default:!1},rowMode:{type:Boolean,default:!1}},data(){return{addData:{name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:"",visibility_appoint:1,visibility_appointor:[]},active:!1,onFocus:!1,mouseEnter:!1}},mounted(){this.autoActive&&this.$nextTick(this.openAdd)},computed:{...p(["taskPriority"]),typeName(){return this.parentId>0?"\u5B50\u4EFB\u52A1":"\u4EFB\u52A1"}},watch:{active(t){t||this.$emit("on-close")},mouseEnter(){this.chackClose()},onFocus(){this.chackClose()}},methods:{getData(){return this.parentId>0?{task_id:this.parentId,name:this.addData.name}:(this.addData.project_id=this.projectId||this.$store.state.projectId,this.addData.column_id=this.columnId||"",this.addData.owner=[this.userId],this.addData.top=this.addTop?1:0,$A.cloneJSON(this.addData))},openAdd(){this.active=!0,this.defaultPriority(),this.$nextTick(()=>{this.$refs.input.focus()})},chackClose(){this.mouseEnter||this.onFocus||this.addData.name||(this.active=!1)},onPriority(){this.$emit("on-priority",this.getData()),this.active=!1},onKeydown(t){if(t.keyCode===13){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},onAdd(){if(!this.addData.name){$A.messageWarning("\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0");return}this.loadIng++;let t=this.parentId>0?"taskAddSub":"taskAdd";this.$store.dispatch(t,this.getData()).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.active=!1,this.addData={name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:"",visibility_appoint:1,visibility_appointor:[]}}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--})},taskPriorityContent(t){let s=$A.runNum(t.days);return s<=0?t.name+" ("+this.$L("\u65E0\u65F6\u95F4\u9650\u5236")+")":t.name+" ("+s+this.$L("\u5929")+")"},choosePriority(t){if($A.runNum(t.days)>0){let s=new Date,e=new Date(new Date().setDate(s.getDate()+$A.runNum(t.days)));this.$set(this.addData,"times",$A.date2string([s,e]))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color),this.$nextTick(()=>{this.$refs.input.focus()})},defaultPriority(){this.taskPriority.length!==0&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))}}},k={};var Y=d(K,V,H,!1,X,null,null,null);function X(t){for(let s in k)this[s]=k[s]}var W=function(){return Y.exports}(),J=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-rows"},[t._l(t.list,function(a,o){return e("div",{key:o},[e("Row",{staticClass:"task-row",style:a.color?{backgroundColor:a.color,borderBottomColor:a.color}:{}},[a.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:a.p_color}}):t._e(),e("Col",{class:["row-name",a.complete_at?"complete":""],attrs:{span:"12"}},[a.sub_num>0&&a.sub_top!==!0||a.parent_id===0&&t.fastAddTask?e("Icon",{class:["sub-icon",t.taskOpen[a.id]?"active":""],attrs:{type:"ios-arrow-forward"},on:{click:function(i){return t.getSublist(a)}}}):t._e(),e("TaskMenu",{ref:`taskMenu_${a.id}`,refInFor:!0,attrs:{task:a}}),e("div",{staticClass:"item-title",on:{click:function(i){return t.openTask(a)}}},[a.flow_item_name?e("span",{class:a.flow_item_status,on:{click:function(i){return i.stopPropagation(),t.openMenu(i,a)}}},[t._v(t._s(a.flow_item_name))]):t._e(),a.sub_top===!0?e("span",[t._v(t._s(t.$L("\u5B50\u4EFB\u52A1")))]):t._e(),a.sub_my&&a.sub_my.length>0?e("span",[t._v("+"+t._s(a.sub_my.length))]):t._e(),t._v(" "+t._s(a.name)+" ")]),e("div",{staticClass:"item-icons",on:{click:function(i){return t.openTask(a)}}},[a.desc?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE71A")])]):t._e(),a.file_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE71C")]),e("em",[t._v(t._s(a.file_num))])]):t._e(),a.msg_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("\uE71E")]),e("em",[t._v(t._s(a.msg_num))])]):t._e(),a.sub_num>0?e("div",{staticClass:"item-icon",on:{click:function(i){return i.stopPropagation(),t.getSublist(a)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE71F")]),e("em",[t._v(t._s(a.sub_complete)+"/"+t._s(a.sub_num))])]):t._e()])],1),e("Col",{staticClass:"row-column",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:a.sub_top===!0},on:{command:function(i){return t.dropTask(a,i)}}},[e("div",{staticClass:"task-column"},[t._v(t._s(t.columnName(a.column_id)))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.columnList(a.project_id),function(i){return e("EDropdownItem",{key:i.id,attrs:{command:"column::"+i.id}},[t._v(" "+t._s(i.name)+" ")])}),1)],1)],1),e("Col",{staticClass:"row-priority",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:a.sub_top===!0},on:{command:function(i){return t.dropTask(a,i)}}},[e("TaskPriority",{attrs:{backgroundColor:a.p_color}},[t._v(t._s(a.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(i,r){return e("EDropdownItem",{key:r,attrs:{command:"priority::"+r}},[e("i",{staticClass:"taskfont",style:{color:i.color},domProps:{innerHTML:t._s(i.p_name==i.name?"":"")}}),t._v(" "+t._s(i.name)+" ")])}),1)],1)],1),e("Col",{staticClass:"row-user",attrs:{span:"3"}},[e("ul",{on:{click:function(i){return t.openTask(a)}}},[t._l(t.ownerUser(a.task_user),function(i,r){return r<3?e("li",{key:r},[e("UserAvatar",{attrs:{userid:i.userid,size:"32",borderWitdh:2,borderColor:a.color,showName:t.ownerUser(a.task_user).length===1}})],1):t._e()}),t.ownerUser(a.task_user).length===0?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small"},on:{click:function(i){return i.stopPropagation(),t.openTask(a,!0)}}},[t._v(t._s(t.$L("\u9886\u53D6\u4EFB\u52A1")))])],1):t._e()],2)]),e("Col",{staticClass:"row-time",attrs:{span:"3"}},[!a.complete_at&&a.end_at?e("ETooltip",{class:["task-time",a.today?"today":"",a.overdue?"overdue":""],attrs:{disabled:t.$isEEUiApp||t.windowTouch,"open-delay":600,content:a.end_at}},[e("div",{on:{click:function(i){return t.openTask(a)}}},[t._v(t._s(t.expiresFormat(a.end_at)))])]):t.showCompleteAt&&a.complete_at?e("div",{attrs:{title:a.complete_at}},[t._v(t._s(t.completeAtFormat(a.complete_at)))]):t._e()],1)],1),t.taskOpen[a.id]===!0?e("TaskRow",{attrs:{list:t.subTask(a.id),"parent-id":a.id,"fast-add-task":a.parent_id===0&&t.fastAddTask,"open-key":t.openKey},on:{command:t.dropTask}}):t._e()],1)}),t.fastAddTask||t.parentId>0?e("TaskAddSimple",{attrs:{"parent-id":t.parentId,"row-mode":""},on:{"on-priority":t.onPriority}}):t._e()],2)},G=[];const q={name:"TaskRow",components:{TaskMenu:M,TaskAddSimple:W,TaskPriority:E},props:{list:{type:Array,default:()=>[]},parentId:{type:Number,default:0},fastAddTask:{type:Boolean,default:!1},openKey:{type:String,default:"default"},showCompleteAt:{type:Boolean,default:!1}},data(){return{nowTime:$A.Time(),nowInterval:null,taskLoad:{},taskOpen:{}}},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3)},destroyed(){clearInterval(this.nowInterval)},computed:{...p(["cacheTasks","taskPriority","cacheColumns"]),subTask(){return function(t){return this.cacheTasks.filter(s=>s.archived_at?!1:s.parent_id==t).sort((s,e)=>s.id-e.id)}}},methods:{columnName(t){const s=this.cacheColumns.find(({id:e})=>e==t);return s?s.name:""},dropTask(t,s){const e=this.$refs[`taskMenu_${t.id}`];if(!!e){if($A.leftExists(s,"column::")){e[0].updateTask({column_id:$A.leftDelete(s,"column::")});return}if($A.leftExists(s,"priority::")){let a=this.taskPriority[parseInt($A.leftDelete(s,"priority::"))];a&&e[0].updateTask({p_level:a.priority,p_name:a.name,p_color:a.color})}}},onPriority(t){this.$emit("on-priority",t)},getSublist(t){if(t.sub_top===!0){this.openTask(t);return}if(this.taskOpen[t.id]===!0){this.$set(this.taskOpen,t.id,!1);return}this.taskLoad[t.id]!==!0&&(this.$set(this.taskLoad,t.id,!0),this.$store.dispatch("getTaskForParent",t.id).then(()=>{this.$set(this.taskLoad,t.id,!1),this.$set(this.taskOpen,t.id,!0)}).catch(({msg:s})=>{$A.modalError(s),this.$set(this.taskLoad,t.id,!1)}))},columnList(t){return this.cacheColumns.filter(({project_id:s})=>s==t)},openTask(t,s){this.$store.dispatch("openTask",t),s===!0&&setTimeout(()=>{g.Store.set("receiveTask",!0)},300)},openMenu(t,s){const e=this.$refs[`taskMenu_${s.id}`];e&&e[0].handleClick(t)},ownerUser(t){return t.filter(({owner:s})=>s==1).sort((s,e)=>s.id-e.id)},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},completeAtFormat(t){let s=$A.Date(t,!0);return $A.formatDate("Y")===$A.formatDate("Y",s)?$A.formatDate("m-d H:i",s):$A.formatDate("Y-m-d",s)}}},y={};var Q=d(q,J,G,!1,Z,null,null,null);function Z(t){for(let s in y)this[s]=y[s]}var tt=function(){return Q.exports}(),et=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-archived"},[e("div",{staticClass:"archived-title"},[t._v(" "+t._s(t.$L("\u5F52\u6863\u7684\u4EFB\u52A1"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("ID\u3001\u4EFB\u52A1\u540D..."),clearable:""},model:{value:t.keys.name,callback:function(a){t.$set(t.keys,"name",a)},expression:"keys.name"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},st=[];const at={name:"TaskArchived",props:{projectId:{type:Number,default:0}},data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.id)])},{title:this.$L("\u4EFB\u52A1\u540D\u79F0"),key:"name",minWidth:200,render:(t,{row:s})=>t("AutoTip",{on:{"on-click":()=>{this.$store.dispatch("openTask",s)}}},s.name)},{title:this.$L("\u5B8C\u6210\u65F6\u95F4"),key:"complete_at",width:168,render:(t,{row:s})=>t("div",{style:{color:s.complete_at?"":"#f00"}},s.complete_at||this.$L("\u672A\u5B8C\u6210"))},{title:this.$L("\u5F52\u6863\u65F6\u95F4"),key:"archived_at",width:168},{title:this.$L("\u5F52\u6863\u4EBA\u5458"),key:"archived_userid",minWidth:100,render:(t,{row:s})=>s.archived_userid?t("UserAvatar",{props:{userid:s.archived_userid,size:24,showName:!0}}):t("Tag",this.$L("\u7CFB\u7EDF\u81EA\u52A8"))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{if(this.cacheTasks.find(a=>a.id==s.row.id&&!a.archived_at))return t("div",{style:{color:"#888"}},this.$L("\u5DF2\u8FD8\u539F"));const e=[t("span",{style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{click:()=>{this.$store.dispatch("openTask",s.row)}}},this.$L("\u67E5\u770B")),t("Poptip",{props:{title:s.row.__restorePoptipTitle,confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88"),value:s.row.__restorePoptipShow,width:220},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(s.row)},"on-popper-hide":()=>{s.row.__restorePoptipLoadIng=!1,s.row.__restorePoptipTitle=this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F"),s.row.__restorePoptipShow=!1}}},[t("span",{on:{click:a=>{a.stopPropagation(),s.row.__restorePoptipLoadIng=!0,this.$store.dispatch("call",{url:"project/column/one",data:{column_id:s.row.column_id,deleted:"all"}}).then(({data:o})=>{o.deleted_at&&(s.row.__restorePoptipTitle=this.$L("\u68C0\u6D4B\u5230\u6240\u5C5E\u7684\u4EFB\u52A1\u5217\u8868\u5DF2\u88AB\u5220\u9664\uFF0C\u8BE5\u64CD\u4F5C\u5C06\u4F1A\u8FD8\u539F\u4EFB\u52A1\u5217\u8868\uFF0C\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F")),s.row.__restorePoptipShow=!0}).catch(({msg:o})=>{$A.modalError({content:o})}).finally(o=>{s.row.__restorePoptipLoadIng=!1})}}},[s.row.__restorePoptipLoadIng?t("Loading",{style:{width:"26px",height:"15px"}}):this.$L("\u8FD8\u539F")])]),t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u4EFB\u52A1\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":()=>{this.delete(s.row)}}},this.$L("\u5220\u9664"))];return t("TableAction",{props:{column:s.column}},e)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){},computed:{...p(["cacheTasks"])},watch:{projectId:{handler(){this.getLists()},immediate:!0},keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){!this.projectId||(this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/task/lists",data:{keys:this.keys,project_id:this.projectId,parent_id:-1,archived:"yes",sorts:{archived_at:"desc"},page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:t})=>{this.page=t.current_page,this.total=t.total,this.list=t.data.map(s=>(s.__restorePoptipLoadIng=!1,s.__restorePoptipTitle=this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5F52\u6863\u5417\uFF1F"),s.__restorePoptipShow=!1,s)),this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(t=>{this.loadIng--}))},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},recovery(t){this.list=this.list.filter(({id:s})=>s!=t.id),this.loadIng++,this.$store.dispatch("archivedTask",{task_id:t.id,type:"recovery"}).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.getLists(),this.$store.dispatch("openTask",t)}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--,this.getLists()})},delete(t){this.list=this.list.filter(({id:s})=>s!=t.id),this.loadIng++,this.$store.dispatch("removeTask",{task_id:t.id}).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.getLists()}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--,this.getLists()})}}},C={};var ot=d(at,et,st,!1,it,null,null,null);function it(t){for(let s in C)this[s]=C[s]}var rt=function(){return ot.exports}(),nt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-workflow"},[e("div",{staticClass:"workflow-title"},[t._v(" "+t._s(t.$L("\u5DE5\u4F5C\u6D41\u8BBE\u7F6E"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getData}})],1)]),t.list.length>0?e("div",{staticClass:"workflow-content"},[e("Collapse",{attrs:{accordion:""},model:{value:t.openIndex,callback:function(a){t.openIndex=a},expression:"openIndex"}},t._l(t.list,function(a){return e("Panel",{key:a.id,attrs:{name:"index_"+a.id}},[e("div",{staticClass:"workflow-item"},[e("div",{staticClass:"workflow-name"},[t._v(t._s(a.name))]),e("div",{staticClass:"workflow-status"},t._l(a.project_flow_item,function(o){return e("div",{class:o.status},[t._v(t._s(o.name))])}),0),e("div",{staticClass:"workflow-save",on:{click:function(o){o.stopPropagation()}}},[t.contrast(a.project_flow_item,a.project_flow_bak)?[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(o){return t.onSave(a)}}},[t._v(t._s(t.$L("\u4FDD\u5B58")))]),a.id>0?e("Button",{attrs:{disabled:t.loadIng>0,type:"primary",ghost:""},on:{click:function(o){return t.onReduction(a,o)}}},[t._v(t._s(t.$L("\u8FD8\u539F")))]):t._e()]:t._e(),e("Button",{attrs:{disabled:t.loadIng>0,type:"error",ghost:""},on:{click:function(o){return t.onDelete(a)}}},[t._v(t._s(t.$L("\u5220\u9664")))])],2)]),e("div",{staticClass:"taskflow-config",attrs:{slot:"content"},slot:"content"},[e("div",{staticClass:"taskflow-config-table"},[e("div",{staticClass:"taskflow-config-table-left-container"},[e("div",{staticClass:"taskflow-config-table-column-header left-header"},[t._v(t._s(t.$L("\u914D\u7F6E\u9879")))]),e("div",{ref:`overlay_${a.id}`,refInFor:!0,staticClass:"taskflow-config-table-column-body"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("\u8BBE\u7F6E\u72B6\u6001\u4E3A")))]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u5F00\u59CB\u72B6\u6001")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u65B0\u5EFA\u4EFB\u52A1\u9ED8\u8BA4\u72B6\u6001")))])])]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u8FDB\u884C\u4E2D")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u53EF\u8BBE\u7F6E\u591A\u4E2A\u72B6\u6001\u4E3A\u8FDB\u884C\u4E2D")))])])]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u9A8C\u6536/\u6D4B\u8BD5")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u53EA\u80FD\u8BBE\u7F6E\u5355\u4E2A\u72B6\u6001\u4E3A\u9A8C\u6536/\u6D4B\u8BD5")))])])]),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("\u7ED3\u675F\u72B6\u6001")))]),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("\u8BE5\u72B6\u6001\u4E0B\u4EFB\u52A1\u81EA\u52A8\u6807\u8BB0\u5B8C\u6210")))])])])]),e("div",{staticClass:"taskflow-config-table-block hr"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("\u53EF\u6D41\u8F6C\u5230")))]),t._l(a.project_flow_item,function(o){return e("div",{staticClass:"taskflow-config-table-block-item"},[e("span",{staticClass:"transform-status-name"},[t._v(t._s(o.name))])])})],2)])]),e("div",{staticClass:"taskflow-config-table-right-container"},[e("Draggable",{staticClass:"taskflow-config-table-list-wrapper",attrs:{list:a.project_flow_item,animation:150,disabled:t.$isEEUiApp||t.windowTouch,tag:"div",draggable:".column-border"},on:{sort:function(o){}}},[t._l(a.project_flow_item,function(o){return e("div",{staticClass:"taskflow-config-table-status-column column-border",class:o.status},[e("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[e("div",{staticClass:"status-label-with-menu",class:o.status},[e("div",{staticClass:"name"},[t._v(t._s(t.$L(o.name)))]),e("EDropdown",{staticClass:"more",class:{opacity:o.userids.length>0||o.columnid>0},attrs:{trigger:"click"},on:{command:function(i){return t.onMore(i,o)}}},[e("div",{staticClass:"more-icon"},[e("Badge",{attrs:{dot:o.userids.length>0||o.columnid>0}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1),e("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[o.userids.length>0?e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"users"},t._l(o.userids,function(i,r){return e("UserAvatar",{key:r,attrs:{userid:i,size:28,borderWitdh:1,showName:o.userids.length===1}})}),1)]):t._e(),e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-settings"}}),e("Badge",{attrs:{dot:o.userids.length>0||o.columnid>0}},[t._v(" "+t._s(t.$L("\u72B6\u6001\u8BBE\u7F6E"))+" ")])],1)]),e("EDropdownItem",{attrs:{command:"name"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("\u4FEE\u6539\u540D\u79F0"))+" ")],1)]),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item delete"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("\u5220\u9664"))+" ")],1)])],1)],1)],1)]),e("div",{ref:`overlay_${a.id}`,refInFor:!0,staticClass:"taskflow-config-table-column-body"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),e("RadioGroup",{model:{value:o.status,callback:function(i){t.$set(o,"status",i)},expression:"item.status"}},[e("Radio",{attrs:{label:"start"}},[e("span")]),e("Radio",{attrs:{label:"progress"}},[e("span")]),e("Radio",{attrs:{label:"test"}},[e("span")]),e("Radio",{attrs:{label:"end"}},[e("span")])],1)],1),e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),e("CheckboxGroup",{on:{"on-change":function(i){return t.onTurns(o)}},model:{value:o.turns,callback:function(i){t.$set(o,"turns",i)},expression:"item.turns"}},t._l(a.project_flow_item,function(i){return e("Checkbox",{key:i.id,attrs:{label:i.id,disabled:i.id==o.id}},[e("span")])}),1)],1)])])}),e("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(o){return t.onAdd(a)}}},[t._v(t._s(t.$L("\u6DFB\u52A0\u72B6\u6001")))])],2)],1)])])])}),1)],1):t.loadIng==0?e("div",{staticClass:"workflow-no"},[t._v(" "+t._s(t.$L("\u5F53\u524D\u9879\u76EE\u8FD8\u6CA1\u6709\u521B\u5EFA\u5DE5\u4F5C\u6D41"))+" "),e("Button",{attrs:{type:"primary"},on:{click:t.onCreate}},[t._v(t._s(t.$L("\u521B\u5EFA\u5DE5\u4F5C\u6D41")))])],1):t._e(),e("Modal",{attrs:{styles:{width:"90%",maxWidth:"640px"},title:`${t.$L("\u72B6\u6001\u8BBE\u7F6E")} (${t.settingData.name})`,"mask-closable":!1},model:{value:t.userShow,callback:function(a){t.userShow=a},expression:"userShow"}},[e("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("div",{staticClass:"workflow-setting-box"},[e("h3",[t._v(t._s(t.$L("\u72B6\u6001\u8D1F\u8D23\u4EBA")))]),e("div",{staticClass:"form-box"},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u72B6\u6001\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"project-id":t.projectId,"multiple-max":5,title:t.$L("\u9009\u62E9\u72B6\u6001\u8D1F\u8D23\u4EBA")},model:{value:t.settingData.userids,callback:function(a){t.$set(t.settingData,"userids",a)},expression:"settingData.userids"}})],1),e("FormItem",{attrs:{prop:"usertype",label:t.$L("\u6D41\u8F6C\u6A21\u5F0F")}},[e("RadioGroup",{model:{value:t.settingData.usertype,callback:function(a){t.$set(t.settingData,"usertype",a)},expression:"settingData.usertype"}},[e("Radio",{attrs:{label:"add"}},[t._v(t._s(t.$L("\u6DFB\u52A0\u6A21\u5F0F")))]),e("Radio",{attrs:{label:"replace"}},[t._v(t._s(t.$L("\u6D41\u8F6C\u6A21\u5F0F")))]),e("Radio",{attrs:{label:"merge"}},[t._v(t._s(t.$L("\u5254\u9664\u6A21\u5F0F")))])],1),t.settingData.usertype=="replace"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u6539\u53D8\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u4E3A\u72B6\u6001\u8D1F\u8D23\u4EBA\uFF0C\u539F\u672C\u7684\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u79FB\u81F3\u534F\u52A9\u4EBA\u5458\u3002`)))]):t.settingData.usertype=="merge"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u6539\u53D8\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u4E3A\u72B6\u6001\u8D1F\u8D23\u4EBA\uFF08\u5E76\u4FDD\u7559\u64CD\u4F5C\u72B6\u6001\u7684\u4EBA\u5458\uFF09\uFF0C\u539F\u672C\u7684\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u79FB\u81F3\u534F\u52A9\u4EBA\u5458\u3002`)))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u6DFB\u52A0\u72B6\u6001\u8D1F\u8D23\u4EBA\u81F3\u4EFB\u52A1\u8D1F\u8D23\u4EBA\u3002`)))])],1),e("FormItem",{attrs:{prop:"userlimit",label:t.$L("\u9650\u5236\u8D1F\u8D23\u4EBA")}},[e("iSwitch",{attrs:{"true-value":1,"false-value":0},model:{value:t.settingData.userlimit,callback:function(a){t.$set(t.settingData,"userlimit",a)},expression:"settingData.userlimit"}}),t.settingData.userlimit===1?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\uFF0C[\u4EFB\u52A1\u8D1F\u8D23\u4EBA] \u548C [\u9879\u76EE\u7BA1\u7406\u5458] \u53EF\u4EE5\u4FEE\u6539\u72B6\u6001\u3002`)))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\uFF0C[\u4EFB\u52A1\u8D1F\u8D23\u4EBA] \u548C [\u9879\u76EE\u7BA1\u7406\u5458] \u53EF\u4EE5\u4FEE\u6539\u72B6\u6001\u3002`)))])],1)],1)]),e("div",{staticClass:"workflow-setting-box"},[e("h3",[t._v(t._s(t.$L("\u5173\u8054\u5217\u8868")))]),e("div",{staticClass:"form-box"},[e("FormItem",{attrs:{prop:"usertype",label:t.$L("\u5173\u8054\u5217\u8868")}},[e("Select",{attrs:{placeholder:t.$L("\u9009\u62E9\u5173\u8054\u5217\u8868"),transfer:""},model:{value:t.settingData.columnid,callback:function(a){t.$set(t.settingData,"columnid",a)},expression:"settingData.columnid"}},t._l(t.columnList,function(a,o){return e("Option",{key:o,attrs:{value:a.id}},[t._v(t._s(a.name))])}),1),e("div",{staticClass:"form-tip"},[t._v(" "+t._s(t.$L(`\u6D41\u8F6C\u5230\u3010${t.settingData.name}\u3011\u65F6\u81EA\u52A8\u5C06\u4EFB\u52A1\u79FB\u52A8\u81F3\u5173\u8054\u5217\u8868\u3002`))+" "),t.settingData.columnid?e("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){t.settingData.columnid=0}}},[t._v(t._s(t.$L("\u53D6\u6D88\u5173\u8054")))]):t._e()])],1)],1)])]),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.userShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary"},on:{click:t.onUser}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)],1)],1)},lt=[];const ct={name:"ProjectWorkflow",components:{UserSelect:F,Draggable:P},props:{projectId:{type:Number,default:0}},data(){return{loadIng:0,list:[],openIndex:"",userShow:!1,settingData:{}}},mounted(){},computed:{...p(["cacheColumns"]),columnList({projectId:t,cacheColumns:s}){return s.filter(({project_id:e})=>e==t).sort((e,a)=>e.sort!=a.sort?e.sort-a.sort:e.id-a.id).map(e=>({id:e.id,name:e.name}))}},watch:{projectId:{handler(t){t&&this.getData()},immediate:!0}},methods:{getData(){this.loadIng++,this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then(({data:t})=>{this.list=t.map(s=>(s.project_flow_bak=JSON.stringify(s.project_flow_item),s)),this.openIndex=this.list.length===1?"index_"+this.list[0].id:"",this.$nextTick(this.syncScroller)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--})},syncScroller(){this.list.some(t=>{this.$refs[`overlay_${t.id}`]&&this.$refs[`overlay_${t.id}`].some(s=>{Object.keys(s.attributes).includes("sync-scroller")||(s.setAttribute("sync-scroller",!0),s.addEventListener("scroll",({target:e})=>{let a=e.scrollTop,o=e.scrollLeft;this.$nextTick(()=>{this.$refs[`overlay_${t.id}`].some(i=>{i!=s&&i.scrollTo(o,a)})})}))})})},contrast(t,s){return JSON.stringify(t)!=s},existDiff(){return!!this.list.find(t=>this.contrast(t.project_flow_item,t.project_flow_bak))},onCreate(){let t=-1*$A.randNum(1e3,1e4);this.list.push({id:t,name:"Default",project_flow_item:[{id:-10,name:"\u5F85\u5904\u7406",status:"start",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-11,name:"\u8FDB\u884C\u4E2D",status:"progress",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-12,name:"\u5F85\u6D4B\u8BD5",status:"test",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-13,name:"\u5DF2\u5B8C\u6210",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0},{id:-14,name:"\u5DF2\u53D6\u6D88",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0,columnid:0}]}),this.openIndex="index_"+t,this.$nextTick(this.syncScroller)},onDelete(t){$A.modalConfirm({title:"\u5220\u9664\u5DE5\u4F5C\u6D41",content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5DE5\u4F5C\u6D41\u5417\uFF1F",loading:!0,onOk:()=>{if(t.id>0)return new Promise((e,a)=>{this.loadIng++,this.$store.dispatch("call",{url:"project/flow/delete",data:{project_id:this.projectId}}).then(({msg:o})=>{e(o);let i=this.list.findIndex(({id:r})=>r==t.id);i>-1&&this.list.splice(i,1)}).catch(({msg:o})=>{a(o)}).finally(o=>{this.loadIng--})});const s=this.list.findIndex(({id:e})=>e==t.id);s>-1&&this.list.splice(s,1)}})},onMore(t,s){switch(t){case"user":this.$set(this.settingData,"id",s.id),this.$set(this.settingData,"name",s.name),this.$set(this.settingData,"userids",s.userids),this.$set(this.settingData,"usertype",s.usertype),this.$set(this.settingData,"userlimit",s.userlimit),this.$set(this.settingData,"columnid",s.columnid),this.userShow=!0;break;case"name":this.onName(s);break;case"remove":this.onRemove(s);break}},onUser(){this.userShow=!1,this.list.some(t=>{let s=t.project_flow_item.find(e=>e.id==this.settingData.id);s&&(this.$set(s,"userids",this.settingData.userids),this.$set(s,"usertype",this.settingData.usertype),this.$set(s,"userlimit",this.settingData.userlimit),this.$set(s,"columnid",this.settingData.columnid))})},onName(t){$A.modalInput({value:t.name,title:"\u4FEE\u6539\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0",onOk:s=>{if(!s)return"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0";this.$set(t,"name",s)}})},onRemove(t){this.list.some(s=>{let e=s.project_flow_item.findIndex(({id:a})=>a==t.id);e>-1&&s.project_flow_item.splice(e,1)})},onTurns(t){this.$set(t,"turns",t.turns.sort())},onAdd(t){$A.modalInput({title:"\u6DFB\u52A0\u72B6\u6001",placeholder:"\u8BF7\u8F93\u5165\u72B6\u6001\u540D\u79F0",onOk:s=>{if(!s)return"\u8BF7\u8F93\u5165\u72B6\u6001\u540D\u79F0";const e=$A.randNum(1e5,999999)*-1,a=t.project_flow_item.map(({id:o})=>o);t.project_flow_item.push({id:e,name:s,status:"end",turns:a,userids:[],usertype:"add",userlimit:0,columnid:0}),t.project_flow_item.some(o=>{o.turns.push(e)})}})},onReduction(t){this.$set(t,"project_flow_item",JSON.parse(t.project_flow_bak))},onSave(t){let s=0;t.project_flow_item.some(e=>{e.sort=s++}),this.loadIng++,this.$store.dispatch("call",{url:"project/flow/save",data:{project_id:this.projectId,flows:t.project_flow_item},method:"post"}).then(({data:e,msg:a})=>{$.messageSuccess(a),e.project_flow_bak=JSON.stringify(e.project_flow_item);let o=this.list.findIndex(({id:i})=>i==t.id);o>-1?this.list.splice(o,1,e):this.list.push(e),this.openIndex="index_"+e.id,this.$nextTick(this.syncScroller)}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadIng--})},saveAll(){this.list.some(t=>{this.contrast(t.project_flow_item,t.project_flow_bak)&&this.onSave(t)})}}},b={};var dt=d(ct,nt,lt,!1,ut,null,null,null);function ut(t){for(let s in b)this[s]=b[s]}var ht=function(){return dt.exports}(),pt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-deleted"},[e("div",{staticClass:"deleted-title"},[t._v(" "+t._s(t.$L("\u5220\u9664\u7684\u4EFB\u52A1"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("ID\u3001\u4EFB\u52A1\u540D..."),clearable:""},model:{value:t.keys.name,callback:function(a){t.$set(t.keys,"name",a)},expression:"keys.name"}})],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowPortrait,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},mt=[];const ft={name:"TaskDeleted",props:{projectId:{type:Number,default:0}},data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.id)])},{title:this.$L("\u4EFB\u52A1\u540D\u79F0"),key:"name",minWidth:200,render:(t,{row:s})=>t("AutoTip",s.name)},{title:this.$L("\u521B\u5EFA\u65F6\u95F4"),key:"created_at",width:168},{title:this.$L("\u5220\u9664\u65F6\u95F4"),key:"deleted_at",width:168},{title:this.$L("\u5220\u9664\u4EBA\u5458"),key:"deleted_userid",minWidth:100,render:(t,{row:s})=>s.deleted_userid?t("UserAvatar",{props:{userid:s.deleted_userid,size:24,showName:!0}}):t("span","-")},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=[t("Poptip",{props:{title:this.$L("\u4F60\u786E\u5B9A\u8981\u8FD8\u539F\u5220\u9664\u5417\uFF1F"),confirm:!0,transfer:!0,placement:"left",okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(s.row)}}},this.$L("\u8FD8\u539F"))];return t("TableAction",{props:{column:s.column}},e)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted(){},computed:{...p(["cacheTasks"])},watch:{projectId:{handler(){this.getLists()},immediate:!0},keyIs(t){t||(this.keys={},this.setPage(1))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){!this.projectId||(this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="",this.$store.dispatch("call",{url:"project/task/lists",data:{keys:this.keys,project_id:this.projectId,parent_id:-1,deleted:"yes",sorts:{deleted_at:"desc"},page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:t})=>{this.page=t.current_page,this.total=t.total,this.list=t.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(t=>{this.loadIng--}))},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},recovery(t){this.list=this.list.filter(({id:s})=>s!=t.id),this.loadIng++,this.$store.dispatch("removeTask",{task_id:t.id,type:"recovery"}).then(({msg:s})=>{$A.messageSuccess(s),this.loadIng--,this.getLists(),this.$store.dispatch("openTask",t)}).catch(({msg:s})=>{$A.modalError(s),this.loadIng--,this.getLists()})}}},j={};var _t=d(ft,pt,mt,!1,vt,null,null,null);function vt(t){for(let s in j)this[s]=j[s]}var $t=function(){return _t.exports}(),gt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"common-gantt"},[e("div",{staticClass:"gantt-left",style:{width:t.menuWidth+"px"}},[e("div",{staticClass:"gantt-title"},[e("div",{staticClass:"gantt-title-text"},[t._v(t._s(t.$L("\u4EFB\u52A1\u540D\u79F0")))])]),e("ul",{ref:"ganttItem",staticClass:"gantt-item",on:{scroll:t.itemScrollListener,mouseenter:function(a){t.mouseType="item"}}},t._l(t.lists,function(a,o){return e("li",{key:o},[a.overdue?e("div",{staticClass:"item-overdue",on:{click:function(i){return t.clickItem(a)}}},[t._v(t._s(t.$L("\u5DF2\u8D85\u671F")))]):t._e(),e("div",{staticClass:"item-title",class:{complete:a.complete,overdue:a.overdue},on:{click:function(i){return t.clickItem(a)}}},[t._v(t._s(a.label))]),e("Icon",{staticClass:"item-icon",attrs:{type:"ios-locate-outline"},on:{click:function(i){return t.scrollPosition(o)}}})],1)}),0)]),e("div",{ref:"ganttRight",staticClass:"gantt-right"},[e("div",{staticClass:"gantt-chart"},[e("ul",{staticClass:"gantt-month"},t._l(t.monthNum,function(a,o){return e("li",{key:o,style:t.monthStyle(o)},[e("div",{staticClass:"month-format"},[t._v(t._s(t.monthFormat(o)))])])}),0),e("ul",{staticClass:"gantt-date",on:{mousedown:t.dateMouseDown}},t._l(t.dateNum,function(a,o){return e("li",{key:o,style:t.dateStyle(o)},[e("div",{staticClass:"date-format"},[e("div",{staticClass:"format-day"},[t._v(t._s(t.dateFormat(o,"day")))]),t.dateWidth>46?e("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(o,"week")))]):t._e()])])}),0),e("ul",{ref:"ganttTimeline",staticClass:"gantt-timeline",on:{scroll:t.timelineScrollListener,mouseenter:function(a){t.mouseType="timeline"}}},t._l(t.lists,function(a,o){return e("li",{key:o},[e("div",{staticClass:"timeline-item",style:t.itemStyle(a),on:{mousedown:function(i){return t.itemMouseDown(i,a)}}},[e("div",{staticClass:"timeline-title",attrs:{title:a.label}},[t._v(t._s(a.label))]),e("div",{staticClass:"timeline-resizer"})])])}),0)])])])},wt=[];const kt={name:"GanttView",props:{lists:{type:Array},menuWidth:{type:Number,default:300},itemWidth:{type:Number,default:100}},data(){return{mouseType:"",mouseWidth:0,mouseScaleWidth:0,dateWidth:100,ganttWidth:0,mouseItem:null,mouseBak:{},dateMove:null}},mounted(){this.dateWidth=this.itemWidth,this.$refs.ganttRight.addEventListener("mousewheel",this.handleScroll,!1),document.addEventListener("mousemove",this.itemMouseMove),document.addEventListener("mouseup",this.itemMouseUp),window.addEventListener("resize",this.handleResize,!1),this.handleResize()},beforeDestroy(){this.$refs.ganttRight.removeEventListener("mousewheel",this.handleScroll,!1),document.removeEventListener("mousemove",this.itemMouseMove),document.removeEventListener("mouseup",this.itemMouseUp),window.removeEventListener("resize",this.handleResize,!1)},watch:{itemWidth(t){this.dateWidth=t}},computed:{monthNum(){const{ganttWidth:t,dateWidth:s}=this;return Math.floor(t/s/30)+2},monthStyle(){const{mouseWidth:t,dateWidth:s}=this;return function(e){let a=t==0?0:t/s,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),r=new Date(i.getTime()+a*864e5),n=new Date(r.getFullYear(),r.getMonth()+1,0,23,59,59),l=(n-r)/1e3/60/60/24,c=s*l;return e>0&&(n=new Date(r.getFullYear(),r.getMonth()+1+e,0),c=n.getDate()*s),{width:c+"px"}}},monthFormat(){const{mouseWidth:t,dateWidth:s}=this;return function(e){let a=t==0?0:t/s,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),r=new Date(i.getTime()+a*864e5);return e>0&&(r=new Date(r.getFullYear(),r.getMonth()+1+e,0)),$A.formatDate("Y-m",r)}},dateNum(){const{ganttWidth:t,dateWidth:s}=this;return Math.floor(t/s)+2},dateStyle(){const{mouseWidth:t,dateWidth:s}=this;return function(e){const a={};let o=t==0?0:t/s,i=Math.floor(o)+e;o==Math.floor(o)&&i--;let r=t==0?e-1:i,n=new Date(new Date().getTime()+r*864e5);[0,6].indexOf(n.getDay())!==-1&&(a.backgroundColor="#f9fafb");let l=s;return e==0&&(l=Math.abs((t%l-l)%l)),a.width=l+"px",a}},dateFormat(){const{mouseWidth:t,dateWidth:s}=this;return function(e,a){let o=t==0?0:t/s,i=Math.floor(o)+e;o==Math.floor(o)&&i--;let r=t==0?e-1:i,n=new Date(new Date().getTime()+r*864e5);return a=="day"?n.getDate():a=="week"?this.$L(`\u661F\u671F${"\u65E5\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D".charAt(n.getDay())}`):n}},itemStyle(){const{mouseWidth:t,dateWidth:s,ganttWidth:e}=this;return function(a){const{start:o,end:i}=a.time,{style:r,moveX:n,moveW:l}=a;let c=new Date,u=new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0).getTime(),f=(o-u)/1e3/60/60/24,v=(i-u)/1e3/60/60/24,h=s*f+t*-1,m=s*(v-f);typeof n=="number"&&(h+=n),typeof l=="number"&&(m+=l);const _={left:Math.min(Math.max(h,m*-1.2),e*1.2).toFixed(2)+"px",width:m.toFixed(2)+"px"};return h<0&&Math.abs(h)e&&hs.scrollHeight-s.clientHeight&&(e=s.scrollHeight-s.clientHeight),s.scrollTop!=e&&(this.mouseType="timeline",s.scrollTop=e)}t.deltaX!=0&&(this.mouseWidth+=t.deltaX,this.mouseScaleWidth+=t.deltaX*(100/this.dateWidth))},handleResize(){this.ganttWidth=this.$refs.ganttTimeline.clientWidth},dateMouseDown(t){t.preventDefault(),this.mouseItem=null,this.dateMove={clientX:t.clientX}},itemMouseDown(t,s){t.preventDefault();let e="moveX";t.target.className=="timeline-resizer"&&(e="moveW"),typeof s[e]!="number"&&this.$set(s,e,0),this.mouseBak={type:e,clientX:t.clientX,value:s[e]},this.mouseItem=s,this.dateMove=null},itemMouseMove(t){if(this.mouseItem!=null){t.preventDefault();const s=this.mouseBak.value+(t.clientX-this.mouseBak.clientX);if(this.mouseBak.type==="moveW"){const e=864e5/this.dateWidth,{start:a,end:o}=this.mouseItem.time;let i=s*e;if(o+i-a<=0)return}this.$set(this.mouseItem,this.mouseBak.type,s)}else if(this.dateMove!=null){t.preventDefault();let s=(this.dateMove.clientX-t.clientX)*5;this.dateMove.clientX=t.clientX,this.mouseWidth+=s,this.mouseScaleWidth+=s*(100/this.dateWidth)}},itemMouseUp(t){if(this.mouseItem!=null){const{start:s,end:e}=this.mouseItem.time;let a=!1,o=864e5/this.dateWidth;if(typeof this.mouseItem.moveX=="number"&&this.mouseItem.moveX!=0){let i=this.mouseItem.moveX*o;this.$set(this.mouseItem.time,"start",s+i),this.$set(this.mouseItem.time,"end",e+i),this.$set(this.mouseItem,"moveX",0),a=!0}if(typeof this.mouseItem.moveW=="number"&&this.mouseItem.moveW!=0){let i=this.mouseItem.moveW*o;this.$set(this.mouseItem.time,"end",e+i),this.$set(this.mouseItem,"moveW",0),a=!0}a?this.$emit("on-change",this.mouseItem):t.target.className=="timeline-title"&&this.clickItem(this.mouseItem),this.mouseItem=null}else this.dateMove!=null&&(this.dateMove=null)},scrollPosition(t){let s=new Date,e=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0),a=864e5/this.dateWidth,o=(this.lists[t].time.start-e)/a-this.dateWidth-this.mouseWidth;this.mouseWidth+=o,this.mouseScaleWidth+=o*(100/this.dateWidth)},clickItem(t){this.$emit("on-click",t)}}},D={};var yt=d(kt,gt,wt,!1,Ct,null,null,null);function Ct(t){for(let s in D)this[s]=D[s]}var bt=function(){return yt.exports}(),jt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-gstc-gantt"},[e("GanttView",{attrs:{lists:t.lists,menuWidth:t.menuWidth,itemWidth:80},on:{"on-change":t.onChange,"on-click":t.onClick}}),e("Dropdown",{staticClass:"project-gstc-dropdown-filtr",style:t.dropStyle,attrs:{trigger:"click"},on:{"on-click":t.onSwitchColumn}},[e("Icon",{staticClass:"project-gstc-dropdown-icon",class:{filtr:t.filtrProjectId>0},attrs:{type:"md-funnel"}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{class:{"dropdown-active":t.filtrProjectId==0},attrs:{name:0}},[t._v(t._s(t.$L("\u5168\u90E8")))]),t._l(t.projectColumn,function(a,o){return e("DropdownItem",{key:o,class:{"dropdown-active":t.filtrProjectId==a.id},attrs:{name:a.id}},[t._v(" "+t._s(a.name)+" "),a.tasks?e("span",[t._v("("+t._s(t.filtrLength(a.tasks))+")")]):t._e()])})],2)],1),e("div",{staticClass:"project-gstc-edit",class:{info:t.editShowInfo,visible:t.editData&&t.editData.length>0}},[e("div",{staticClass:"project-gstc-edit-info"},[e("Table",{attrs:{size:"small","max-height":"600",columns:t.editColumns,data:t.editData}}),e("div",{staticClass:"project-gstc-edit-btns"},[e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(a){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("\u4FDD\u5B58")))]),e("Icon",{staticClass:"zoom",attrs:{type:"md-arrow-dropright"},on:{click:function(a){t.editShowInfo=!1}}})],1)],1),e("div",{staticClass:"project-gstc-edit-small"},[e("div",{staticClass:"project-gstc-edit-text",on:{click:function(a){t.editShowInfo=!0}}},[t._v(t._s(t.$L("\u672A\u4FDD\u5B58\u8BA1\u5212\u65F6\u95F4"))+": "),t.editData?e("span",[t._v(t._s(t.editData.length))]):t._e()]),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(a){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(a){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)])],1)},Dt=[];const Tt={name:"ProjectGantt",components:{GanttView:bt},props:{projectColumn:{default:[]},flowInfo:{default:{}}},data(){return{lists:[],filtrProjectId:0,editColumns:[{title:this.$L("\u4EFB\u52A1\u540D\u79F0"),key:"label",minWidth:150,ellipsis:!0},{title:this.$L("\u539F\u8BA1\u5212\u65F6\u95F4"),minWidth:135,align:"center",render:(t,{row:s})=>s.notime===!0?t("span","-"):t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(s.baktime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(s.baktime.end/1e3)))])},{title:this.$L("\u65B0\u8BA1\u5212\u65F6\u95F4"),minWidth:135,align:"center",render:(t,{row:s})=>t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(s.newTime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(s.newTime.end/1e3)))])}],editData:[],editLoad:0,editShowInfo:!1}},mounted(){this.initData()},computed:{...p(["taskPriority"]),...w(["projectData"]),menuWidth(){return this.windowWidth<1440?180:260},dropStyle(){return this.windowWidth<1440?{left:"142px"}:{}},completedTask(){return this.projectData.cacheParameter.completedTask}},watch:{projectColumn:{handler(){this.initData()},deep:!0},flowInfo:{handler(){this.initData()},deep:!0},completedTask(){this.initData()}},methods:{initData(){this.lists=[],this.projectColumn&&this.projectColumn.some(this.checkAdd)},flowTask(t){return $A.leftExists(this.flowInfo.value,"user:")&&!t.task_user.find(({userid:s,owner:e})=>s===this.flowInfo.userid&&e)?!0:this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value},filtrLength(t){return t.filter(s=>!(s.complete_at&&!this.completedTask||this.flowTask(s))).length},checkAdd(t){this.filtrProjectId>0&&t.id!=this.filtrProjectId||t.tasks&&t.tasks.some(s=>{let e=!s.start_at||!s.end_at,a=this.getTimeObj(s),o=a.start,i=a.end;if(s.complete_at&&!this.completedTask||this.flowTask(s))return!1;let r="#058ce4";this.taskPriority.some(u=>{if(u.priority===s.p_level)return r=u.color,!0});let n={start:o,end:i},l=$A.cloneJSON(n),c=this.editData.find(({id:u})=>u==s.id);c&&(n=$A.cloneJSON(c.newTime)),this.lists.push({id:s.id,label:s.name,complete:s.complete_at,overdue:s.overdue,time:n,notime:e,baktime:l,style:{background:r}})})},onChange(t){const{time:s,baktime:e}=t;if(Math.abs(e.end-s.end)>1e3||Math.abs(e.start-s.start)>1e3){let a=this.editData.find(({id:o})=>o==t.id);a?a.newTime=s:this.editData.push({id:t.id,label:t.label,notime:t.notime,baktime:t.baktime,newTime:s})}},onClick(t){this.$store.dispatch("openTask",t)},editSubmit(t){this.editData&&this.editData.forEach(s=>{let e=this.lists.find(({id:a})=>a==s.id);if(t){this.editLoad++;let a=$A.formatDate("Y-m-d H:i",Math.round(s.newTime.start/1e3)),o=$A.formatDate("Y-m-d H:i",Math.round(s.newTime.end/1e3)),i={task_id:s.id,times:[a,o]};this.$store.dispatch("taskUpdate",i).then(({msg:r})=>{this.editLoad--,this.editLoad===0&&$A.messageSuccess(r),e&&this.$set(e,"baktime",$A.cloneJSON(e.time))}).catch(({msg:r})=>{this.editLoad--,this.editLoad===0&&$A.modalError(r),e&&this.$set(e,"time",$A.cloneJSON(e.baktime))})}else e&&this.$set(e,"time",$A.cloneJSON(e.baktime))}),this.editData=[]},getTimeObj(t){let s=$A.Time(t.start_at)||$A.Time(t.created_at),e=$A.Time(t.end_at)||$A.Time(t.created_at)+86400;return e==s&&(e=Math.round(new Date($A.formatDate("Y-m-d 23:59:59",e)).getTime()/1e3)),e=Math.max(e,s+60),s*=1e3,e*=1e3,{start:s,end:e}},onSwitchColumn(t){this.filtrProjectId=$A.runNum(t),this.initData()}}},T={};var Lt=d(Tt,jt,Dt,!1,It,null,null,null);function It(t){for(let s in T)this[s]=T[s]}var xt=function(){return Lt.exports}(),St=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"markdown-preview-nostyle",domProps:{innerHTML:t._s(t.html)}})},At=[];const Pt={name:"markdown-preview-nostyle",props:{initialValue:{type:String,default:""}},data(){return{html:""}},mounted(){this.translateMarkdown()},methods:{translateMarkdown(){this.html=N(this.initialValue,{sanitize:!1}).replace(/href="/gi,'target="_blank" href="')}},watch:{initialValue(){this.translateMarkdown()}}},L={};var Et=d(Pt,St,At,!1,Mt,null,null,null);function Mt(t){for(let s in L)this[s]=L[s]}var Ft=function(){return Et.exports}(),Wt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-panel",class:[t.tabTypeActive]},[e("PageTitle",{attrs:{title:t.projectData.name}}),e("div",{staticClass:"project-titbox"},[e("div",{staticClass:"project-title"},[e("div",{staticClass:"project-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("\uE676")])]),e("h1",{on:{click:t.showName}},[t._v(t._s(t.projectData.name))]),t.loading?e("div",{staticClass:"project-load"},[e("Loading")],1):t._e()]),e("ul",{staticClass:"project-icons"},[e("li",{staticClass:"project-avatar",class:{"cursor-default":t.projectData.owner_userid!==t.userId},on:{click:function(a){return t.projectDropdown("user")}}},[e("ul",[e("li",[e("UserAvatarTip",{attrs:{userid:t.projectData.owner_userid,size:36,borderWitdh:2,openDelay:0}},[e("p",[t._v(t._s(t.$L("\u9879\u76EE\u8D1F\u8D23\u4EBA")))])]),(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?e("Badge",{attrs:{type:"normal","overflow-count":999,count:t.projectData.project_user.length}}):t._e()],1),t._l(t.projectUser,function(a){return!(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?[a.userid===-1?e("li",{staticClass:"more"},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u5171"+t.projectData.project_user.length+"\u4E2A\u6210\u5458")}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1):e("li",[e("UserAvatarTip",{attrs:{userid:a.userid,size:36,borderWitdh:2,openDelay:0}})],1)]:t._e()})],2)]),e("li",{staticClass:"project-icon",on:{click:function(a){return t.addTaskOpen(0)}}},[e("ETooltip",{attrs:{disabled:t.$isEEUiApp||t.windowTouch,content:t.$L("\u6DFB\u52A0\u4EFB\u52A1")}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"md-add"}})],1)],1),e("li",{class:["project-icon",t.searchText!=""?"active":""]},[e("Tooltip",{attrs:{always:t.searchText!="",theme:"light",rawIndex:10},on:{"on-popper-show":t.searchFocus}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-search"},on:{click:t.searchFocus}}),e("div",{attrs:{slot:"content"},slot:"content"},[e("Input",{ref:"searchInput",staticClass:"search-input",attrs:{placeholder:t.$L("ID\u3001\u540D\u79F0\u3001\u63CF\u8FF0..."),clearable:""},model:{value:t.searchText,callback:function(a){t.searchText=a},expression:"searchText"}})],1)],1)],1),e("li",{class:["project-icon",t.windowLandscape&&t.projectData.cacheParameter.chat?"active":""],on:{click:function(a){return t.toggleParameter("chat")}}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-chatbubbles"}}),e("Badge",{staticClass:"menu-badge",attrs:{"overflow-count":999,count:t.msgUnread}})],1),e("li",{staticClass:"project-icon"},[e("EDropdown",{attrs:{trigger:"click",transfer:""},on:{command:t.projectDropdown}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-more"}}),t.projectData.owner_userid===t.userId?e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"setting"}},[t._v(t._s(t.$L("\u9879\u76EE\u8BBE\u7F6E")))]),e("EDropdownItem",{attrs:{command:"workflow"}},[t._v(t._s(t.$L("\u5DE5\u4F5C\u6D41\u8BBE\u7F6E")))]),e("EDropdownItem",{attrs:{command:"user",divided:""}},[t._v(t._s(t.$L("\u6210\u5458\u7BA1\u7406")))]),e("EDropdownItem",{attrs:{command:"invite"}},[t._v(t._s(t.$L("\u9080\u8BF7\u94FE\u63A5")))]),e("EDropdownItem",{attrs:{command:"log",divided:""}},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863\u4EFB\u52A1")))]),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("\u5DF2\u5220\u9664\u4EFB\u52A1")))]),e("EDropdownItem",{attrs:{command:"transfer",divided:""}},[t._v(t._s(t.$L("\u79FB\u4EA4\u9879\u76EE")))]),e("EDropdownItem",{attrs:{command:"archived"}},[t._v(t._s(t.$L("\u5F52\u6863\u9879\u76EE")))]),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"delete"}},[t._v(t._s(t.$L("\u5220\u9664\u9879\u76EE")))])],1):e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"log"}},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863\u4EFB\u52A1")))]),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("\u5DF2\u5220\u9664\u4EFB\u52A1")))]),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"exit",divided:""}},[t._v(t._s(t.$L("\u9000\u51FA\u9879\u76EE")))])],1)],1)],1)])]),e("div",{staticClass:"project-subbox"},[e("div",{staticClass:"project-subtitle",on:{click:t.showDesc}},[e("MarkdownPreviewNostyle",{ref:"descPreview",attrs:{initialValue:t.projectData.desc}})],1),e("div",{staticClass:"project-switch"},[t.completedCount>0?e("div",{staticClass:"project-checkbox"},[e("Checkbox",{attrs:{value:t.projectData.cacheParameter.completedTask},on:{"on-change":t.toggleCompleted}},[t._v(t._s(t.$L("\u663E\u793A\u5DF2\u5B8C\u6210")))])],1):t._e(),t.flowList.length>0?e("div",{staticClass:"project-select"},[e("Cascader",{ref:"flow",attrs:{data:t.flowData,"transfer-class-name":"project-panel-flow-cascader",transfer:""},on:{"on-change":t.flowChange}},[e("span",{class:`project-flow ${t.flowInfo.status||""}`},[t._v(t._s(t.flowTitle))])])],1):t._e(),e("div",{staticClass:"project-switch-button"},[e("div",{staticClass:"slider",style:t.tabTypeStyle}),e("div",{class:{active:t.tabTypeActive==="column"},on:{click:function(a){return t.tabTypeChange("column")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE60C")])]),e("div",{class:{active:t.tabTypeActive==="table"},on:{click:function(a){return t.tabTypeChange("table")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE66A")])]),e("div",{class:{active:t.tabTypeActive==="gantt"},on:{click:function(a){return t.tabTypeChange("gantt")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE797")])])])])]),t.tabTypeActive==="column"?e("div",{staticClass:"project-column"},[e("Draggable",{staticClass:"column-list",attrs:{list:t.columnList,animation:150,disabled:t.sortDisabled||t.$isEEUiApp||t.windowTouch,tag:"ul",draggable:".column-item"},on:{sort:function(a){return t.sortUpdate(!0)}}},[t._l(t.columnList,function(a){return e("li",{staticClass:"column-item"},[e("div",{class:["column-head",a.color?"custom-color":""],style:a.color?{backgroundColor:a.color}:{}},[e("div",{staticClass:"column-head-title"},[e("AutoTip",[t._v(t._s(a.name))]),e("em",[t._v("("+t._s(t.panelTask(a.tasks).length)+")")])],1),e("div",{staticClass:"column-head-icon"},[t.columnLoad[a.id]===!0?e("div",{staticClass:"loading"},[e("Loading")],1):e("EDropdown",{attrs:{trigger:"click",size:"small"},on:{command:function(o){return t.dropColumn(a,o)}}},[e("Icon",{attrs:{type:"ios-more"}}),e("EDropdownMenu",{staticClass:"project-panel-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"title"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("\u4FEE\u6539"))+" ")],1)]),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("\u5220\u9664"))+" ")],1)]),t._l(t.$store.state.columnColorList,function(o,i){return e("EDropdownItem",{key:i,attrs:{divided:i==0,command:o}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",style:{color:o.color||"#ddd"},domProps:{innerHTML:t._s(o.color==a.color?"":"")}}),t._v(t._s(t.$L(o.name))+" ")])])})],2)],1),e("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(o){return t.addTopShow(a.id,!0)}}})],1)]),e("Scrollbar",{staticClass:"column-task"},[t.columnTopShow[a.id]?e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":a.id,"project-id":t.projectId,"add-top":!0,"auto-active":""},on:{"on-close":function(o){return t.addTopShow(a.id,!1)},"on-priority":t.addTaskOpen}})],1):t._e(),e("Draggable",{staticClass:"task-list",attrs:{list:a.tasks,animation:150,disabled:t.sortDisabled||t.$isEEUiApp||t.windowTouch,draggable:".task-draggable",filter:".complete",group:"task"},on:{sort:t.sortUpdate,remove:t.sortUpdate}},[t._l(a.tasks,function(o){return e("div",{class:["task-item task-draggable",o.complete_at?"complete":"",t.taskIsHidden(o)?"hidden":""],style:o.color?{backgroundColor:o.color}:{},on:{click:function(i){return t.openTask(o)}}},[e("div",{class:["task-head",o.desc?"has-desc":""]},[e("div",{staticClass:"task-title"},[o.flow_item_name?e("span",{class:o.flow_item_status,on:{click:function(i){return i.stopPropagation(),t.openMenu(i,o)}}},[t._v(t._s(o.flow_item_name))]):t._e(),e("pre",[t._v(t._s(o.name))])]),e("div",{staticClass:"task-menu",on:{click:function(i){i.stopPropagation()}}},[e("TaskMenu",{ref:`taskMenu_${o.id}`,refInFor:!0,attrs:{task:o,icon:"ios-more"}})],1)]),o.complete_at?t._e():[o.desc?e("div",{staticClass:"task-desc"},[e("pre",{domProps:{innerHTML:t._s(o.desc)}})]):t._e(),o.task_tag.length>0?e("div",{staticClass:"task-tags"},t._l(o.task_tag,function(i,r){return e("Tag",{key:r,attrs:{color:i.color}},[t._v(t._s(i.name))])}),1):t._e(),e("div",{staticClass:"task-users"},[e("ul",[t._l(t.ownerUser(o.task_user),function(i,r){return e("li",{key:r},[e("UserAvatar",{attrs:{userid:i.userid,size:"32",borderWitdh:2,borderColor:o.color}})],1)}),t.ownerUser(o.task_user).length===0?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(i){return i.stopPropagation(),t.openTask(o,!0)}}},[t._v(t._s(t.$L("\u9886\u53D6\u4EFB\u52A1")))])],1):t._e()],2),o.file_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(o.file_num)),e("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),o.msg_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(o.msg_num)),e("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),e("div",{staticClass:"task-progress"},[o.sub_num>0?e("div",{staticClass:"task-sub-num"},[t._v(t._s(o.sub_complete)+"/"+t._s(o.sub_num))]):t._e(),e("Progress",{attrs:{percent:o.percent,"stroke-width":6}}),o.end_at?e("ETooltip",{class:["task-time",o.today?"today":"",o.overdue?"overdue":""],attrs:{disabled:t.$isEEUiApp||t.windowTouch,"open-delay":600,content:o.end_at}},[o.complete_at?t._e():e("div",[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(o.end_at)))])]):t._e()],1),o.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:o.p_color}}):t._e()]],2)}),e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":a.id,"project-id":t.projectId},on:{"on-priority":t.addTaskOpen}})],1)],2)],1)],1)}),e("li",{class:["add-column",t.addColumnShow?"show-input":""]},[e("div",{staticClass:"add-column-text",on:{click:t.addColumnOpen}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("\u6DFB\u52A0\u5217\u8868"))+" ")],1),e("div",{staticClass:"add-column-input"},[e("Input",{ref:"addColumnName",attrs:{placeholder:t.$L("\u5217\u8868\u540D\u79F0\uFF0C\u56DE\u8F66\u521B\u5EFA"),clearable:""},on:{"on-blur":t.addColumnBlur,"on-enter":t.addColumnSubmit,"on-clear":function(a){t.addColumnShow=!1}},model:{value:t.addColumnName,callback:function(a){t.addColumnName=a},expression:"addColumnName"}})],1)])],2)],1):t.tabTypeActive==="table"?e("Scrollbar",{staticClass:"project-table",attrs:{"enable-x":""}},[e("div",{staticClass:"project-table-head"},[e("Row",{staticClass:"task-row"},[e("Col",{attrs:{span:"12"}},[t._v("# "+t._s(t.$L("\u4EFB\u52A1\u540D\u79F0")))]),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("\u5217\u8868")))]),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(a){return t.onSort("level")}}},[t._v(" "+t._s(t.$L("\u4F18\u5148\u7EA7"))+" "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:t.sortField=="level"&&t.sortType=="asc"},attrs:{type:"md-arrow-dropup"}}),e("Icon",{class:{on:t.sortField=="level"&&t.sortType=="desc"},attrs:{type:"md-arrow-dropdown"}})],1)])]),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA")))]),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(a){return t.onSort("end_at")}}},[t._v(" "+t._s(t.$L("\u5230\u671F\u65F6\u95F4"))+" "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:t.sortField=="end_at"&&t.sortType=="asc"},attrs:{type:"md-arrow-dropup"}}),e("Icon",{class:{on:t.sortField=="end_at"&&t.sortType=="desc"},attrs:{type:"md-arrow-dropdown"}})],1)])])],1)],1),e("div",{class:["project-table-body",t.projectData.cacheParameter.showMy?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showMy")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u6211\u7684\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.myList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1),t.projectData.cacheParameter.showMy?e("TaskRow",{attrs:{list:t.transforTasks(t.myList),"open-key":"my","fast-add-task":""},on:{"on-priority":t.addTaskOpen}}):t._e()],1),t.helpList.length?e("div",{class:["project-table-body",t.projectData.cacheParameter.showHelp?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showHelp")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u534F\u52A9\u7684\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.helpList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1),t.projectData.cacheParameter.showHelp?e("TaskRow",{attrs:{list:t.helpList,"open-key":"help"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showUndone?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showUndone")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u672A\u5B8C\u6210\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.unList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}})],1),t.projectData.cacheParameter.showUndone?e("TaskRow",{attrs:{list:t.unList,"open-key":"undone"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showCompleted?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(a){return t.toggleParameter("showCompleted")}}},[t._v("\uE689")]),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("\u5DF2\u5B8C\u6210\u4EFB\u52A1")))]),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.completedList.length)+")")])]),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}}),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.projectData.task_num>0&&t.projectData.cacheParameter.showCompleted?t.$L("\u5B8C\u6210\u65F6\u95F4"):""))])],1),t.projectData.cacheParameter.showCompleted?e("TaskRow",{attrs:{list:t.completedList,"open-key":"completed",showCompleteAt:""},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e()]):t.tabTypeActive==="gantt"?e("div",{staticClass:"project-gantt"},[e("ProjectGantt",{attrs:{projectColumn:t.columnList,flowInfo:t.flowInfo}})],1):t._e(),e("Modal",{attrs:{title:t.$L("\u9879\u76EE\u8BBE\u7F6E"),"mask-closable":!1},model:{value:t.settingShow,callback:function(a){t.settingShow=a},expression:"settingShow"}},[e("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u9879\u76EE\u540D\u79F0")}},[e("Input",{ref:"projectName",attrs:{type:"text",maxlength:32,placeholder:t.$L("\u5FC5\u586B")},model:{value:t.settingData.name,callback:function(a){t.$set(t.settingData,"name",a)},expression:"settingData.name"}})],1),e("FormItem",{attrs:{prop:"desc",label:t.$L("\u9879\u76EE\u4ECB\u7ECD")}},[e("Input",{ref:"projectDesc",attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},maxlength:255,placeholder:`${t.$L("\u9009\u586B")} (${t.$L("\u652F\u6301 Markdown \u683C\u5F0F")})`},model:{value:t.settingData.desc,callback:function(a){t.$set(t.settingData,"desc",a)},expression:"settingData.desc"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.settingShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.settingLoad>0},on:{click:t.onSetting}},[t._v(t._s(t.$L("\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u6210\u5458\u7BA1\u7406"),"mask-closable":!1},model:{value:t.userShow,callback:function(a){t.userShow=a},expression:"userShow"}},[e("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u9879\u76EE\u6210\u5458")}},[e("UserSelect",{attrs:{uncancelable:t.userData.uncancelable,"multiple-max":100,title:t.$L("\u9009\u62E9\u9879\u76EE\u6210\u5458")},model:{value:t.userData.userids,callback:function(a){t.$set(t.userData,"userids",a)},expression:"userData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.userShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),t.userWaitRemove.length>0?e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":t.onUser}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("\u79FB\u9664\u6210\u5458\u8D1F\u8D23\u7684\u4EFB\u52A1\u5C06\u53D8\u6210\u65E0\u8D1F\u8D23\u4EBA\uFF0C")))])]),e("p",[t._v(t._s(t.$L("\u6CE8\u610F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF01")))]),e("ul",{staticClass:"project-panel-wait-remove"},[e("li",[t._v(t._s(t.$L("\u5373\u5C06\u79FB\u9664"))+"\uFF1A")]),t._l(t.userWaitRemove,function(a){return e("li",{key:a},[e("UserAvatar",{attrs:{userid:a,size:20,showName:""}})],1)})],2)]),e("Button",{attrs:{type:"primary",loading:t.userLoad>0}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1):e("Button",{attrs:{type:"primary",loading:t.userLoad>0},on:{click:t.onUser}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u9080\u8BF7\u94FE\u63A5"),"mask-closable":!1},model:{value:t.inviteShow,callback:function(a){t.inviteShow=a},expression:"inviteShow"}},[e("Form",{attrs:{model:t.inviteData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u94FE\u63A5\u5730\u5740")}},[e("Input",{ref:"inviteInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":t.inviteFocus},model:{value:t.inviteData.url,callback:function(a){t.$set(t.inviteData,"url",a)},expression:"inviteData.url"}}),e("div",{staticClass:"form-tip"},[t._v(" "+t._s(t.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u76F4\u63A5\u52A0\u5165\u9879\u76EE\u3002"))+" "),e("Poptip",{attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(a){return t.inviteGet(!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u9080\u8BF7\u94FE\u63A5\u5931\u6548\uFF01")))])])]),e("a",{attrs:{href:"javascript:void(0)"}},[t._v(t._s(t.$L("\u5237\u65B0\u94FE\u63A5")))])])],1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.inviteShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.inviteLoad>0},on:{click:t.inviteCopy}},[t._v(t._s(t.$L("\u590D\u5236")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u79FB\u4EA4\u9879\u76EE"),"mask-closable":!1},model:{value:t.transferShow,callback:function(a){t.transferShow=a},expression:"transferShow"}},[e("Form",{attrs:{model:t.transferData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("\u65B0\u9879\u76EE\u8D1F\u8D23\u4EBA")}},[e("UserSelect",{attrs:{"multiple-max":1,title:t.$L("\u9009\u62E9\u9879\u76EE\u8D1F\u8D23\u4EBA")},model:{value:t.transferData.owner_userid,callback:function(a){t.$set(t.transferData,"owner_userid",a)},expression:"transferData.owner_userid"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.transferShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.transferLoad>0},on:{click:t.onTransfer}},[t._v(t._s(t.$L("\u79FB\u4EA4")))])],1)],1),e("DrawerOverlay",{attrs:{placement:"right",beforeClose:t.workflowBeforeClose,size:1280},model:{value:t.workflowShow,callback:function(a){t.workflowShow=a},expression:"workflowShow"}},[t.workflowShow?e("ProjectWorkflow",{ref:"workflow",attrs:{"project-id":t.projectId}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:720},model:{value:t.logShow,callback:function(a){t.logShow=a},expression:"logShow"}},[t.logShow?e("ProjectLog",{attrs:{"project-id":t.projectId}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1e3},model:{value:t.archivedTaskShow,callback:function(a){t.archivedTaskShow=a},expression:"archivedTaskShow"}},[t.archivedTaskShow?e("TaskArchived",{attrs:{"project-id":t.projectId}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:1e3},model:{value:t.deletedTaskShow,callback:function(a){t.deletedTaskShow=a},expression:"deletedTaskShow"}},[t.deletedTaskShow?e("TaskDeleted",{attrs:{"project-id":t.projectId}}):t._e()],1)],1)},Nt=[];const Ot={name:"ProjectPanel",components:{UserAvatarTip:R,UserSelect:F,MarkdownPreviewNostyle:Ft,TaskMenu:M,ProjectWorkflow:ht,DrawerOverlay:z,ProjectLog:O,TaskArchived:rt,TaskRow:tt,Draggable:P,TaskAddSimple:W,TaskPriority:E,TaskDeleted:$t,ProjectGantt:xt},data(){return{loading:!1,nowTime:$A.Time(),nowInterval:null,columnLoad:{},columnTopShow:{},sortField:"end_at",sortType:"desc",searchText:"",addColumnShow:!1,addColumnName:"",sortData:[],sortDisabled:!1,settingShow:!1,settingData:{},settingLoad:0,userShow:!1,userData:{},userLoad:0,inviteShow:!1,inviteData:{},inviteLoad:0,transferShow:!1,transferData:{},transferLoad:0,workflowShow:!1,logShow:!1,archivedTaskShow:!1,deletedTaskShow:!1,flowInfo:{},flowList:[]}},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3)},destroyed(){clearInterval(this.nowInterval)},computed:{...p(["cacheDialogs","projectId","projectLoad","cacheTasks","cacheColumns","taskCompleteTemps","cacheUserBasic"]),...w(["projectData","transforTasks"]),tabTypeActive(){return this.projectData.cacheParameter.menuType},tabTypeStyle(){const t={};switch(this.tabTypeActive){case"column":t.left="0";break;case"table":t.left="33.33%";break;case"gantt":t.left="66.66%";break;default:t.display="none"}return t},userWaitRemove(){const{userids:t,useridbak:s}=this.userData;if(!t)return[];let e=[];return s.some(a=>{t.includes(a)||e.push(a)}),e},msgUnread(){const{cacheDialogs:t,projectData:s}=this,e=t.find(({id:a})=>a===s.dialog_id);return $A.getDialogNum(e)},panelTask(){const{searchText:t,flowInfo:s}=this;return function(e){return this.projectData.cacheParameter.completedTask||(e=e.filter(({complete_at:a})=>!a)),$A.leftExists(s.value,"user:")?e=e.filter(({task_user:a})=>a.find(({userid:o,owner:i})=>o===s.userid&&i)):s.value>0?e=e.filter(({flow_item_id:a})=>a===s.value):s.value==-1&&(e=e.filter(({start_at:a})=>!a)),t&&(e=e.filter(({id:a,name:o,desc:i})=>a==t||$A.strExists(`${o} ${i}`,t))),e}},projectUser(){const{projectData:t,windowWidth:s}=this;if(!t.project_user)return[];let e=s>1200?8:3,a=t.project_user.filter(({userid:i})=>i!=t.owner_userid);if(a.length<=e)return a;let o=a.slice(0,e-1);return o.push({userid:-1}),o.push(a[a.length-1]),o},allTask(){const{cacheTasks:t,projectId:s}=this;return t.filter(e=>e.archived_at||!e.created_at?!1:e.project_id==s)},columnList(){const{projectId:t,cacheColumns:s,allTask:e}=this,a=s.filter(({project_id:o})=>o==t).sort((o,i)=>o.sort!=i.sort?o.sort-i.sort:o.id-i.id);return a.forEach(o=>{o.tasks=this.transforTasks(e.filter(i=>i.column_id==o.id)).sort((i,r)=>i.complete_at||r.complete_at?$A.Date(i.complete_at)-$A.Date(r.complete_at):i.sort!=r.sort?i.sort-r.sort:i.id-r.id)}),a},myList(){const{allTask:t,taskCompleteTemps:s,sortField:e,sortType:a}=this;let o=t.filter(i=>this.myFilter(i));if(s.length>0){let i=t.filter(r=>s.includes(r.id)&&this.myFilter(r,!1));i.length>0&&(o=$A.cloneJSON(o),o.push(...i))}return o.sort((i,r)=>{if(a=="asc"&&([i,r]=[r,i]),e=="level")return i.p_level-r.p_level;if(e=="end_at")return i.end_at==r.end_at?i.p_level-r.p_level:$A.Date(i.end_at||"2099-12-31 23:59:59")-$A.Date(r.end_at||"2099-12-31 23:59:59")})},helpList(){const{allTask:t,taskCompleteTemps:s,sortField:e,sortType:a}=this;let o=t.filter(i=>this.helpFilter(i));if(s.length>0){let i=t.filter(r=>s.includes(r.id)&&this.helpFilter(r,!1));i.length>0&&(o=$A.cloneJSON(o),o.push(...i))}return o.sort((i,r)=>{if(a=="asc"&&([i,r]=[r,i]),e=="level")return i.p_level-r.p_level;if(e=="end_at")return i.end_at==r.end_at?i.p_level-r.p_level:$A.Date(i.end_at||"2099-12-31 23:59:59")-$A.Date(r.end_at||"2099-12-31 23:59:59")})},unList(){const{allTask:t,searchText:s,sortField:e,sortType:a}=this;return t.filter(i=>i.parent_id>0||this.flowTask(i)||s&&i.id!=s&&!$A.strExists(i.name,s)&&!$A.strExists(i.desc,s)?!1:!i.complete_at).sort((i,r)=>{if(a=="asc"&&([i,r]=[r,i]),e=="level")return i.p_level-r.p_level;if(e=="end_at")return i.end_at==r.end_at?i.p_level-r.p_level:$A.Date(i.end_at||"2099-12-31 23:59:59")-$A.Date(r.end_at||"2099-12-31 23:59:59")})},completedList(){const{allTask:t,searchText:s}=this;return t.filter(a=>a.parent_id>0||this.flowTask(a)||s&&a.id!=s&&!$A.strExists(a.name,s)&&!$A.strExists(a.desc,s)?!1:a.complete_at).sort((a,o)=>{let i=$A.Date(a.complete_at);return $A.Date(o.complete_at)-i})},completedCount(){const{allTask:t}=this;return t.filter(s=>s.parent_id>0?!1:s.complete_at).length},flowTitle(){const{flowInfo:t,flowData:s,allTask:e}=this;if(t.value==-1)return t.label;if(t.value){const a=s.find(o=>o.value===t.value);return a?a.label:t.label}return`${this.$L("\u5168\u90E8")} (${e.length})`},flowData(){const{flowList:t,allTask:s,cacheUserBasic:e}=this,a=[{value:0,label:`${this.$L("\u5168\u90E8")} (${s.length})`,children:[]}];a.push({value:-1,label:`${this.$L("\u672A\u8BA1\u5212")} (${s.filter(({start_at:r})=>!r).length})`,children:[]});const o=t.map(r=>({value:r.id,label:r.name,status:r.status,children:r.project_flow_item.map(n=>{const l=s.filter(({flow_item_id:c})=>c==n.id).length;return{value:n.id,label:`${n.name} (${l})`,status:n.status,class:n.status}})}));o.length===1?a.push(...o[0].children):o.length>0&&a.push(...o);const{project_user:i}=this.projectData;if($A.isArray(i)){const r=i.map((n,l)=>{const c=e.find(({userid:f})=>f===n.userid)||{},u=s.filter(({task_user:f,complete_at:v})=>!this.projectData.cacheParameter.completedTask&&v?!1:f.find(({userid:h,owner:m})=>h===n.userid&&m)).length;return{value:`user:${c.userid}`,label:`${c.nickname} (${u})`,class:`user-${l}`,userid:c.userid||0,length:u}}).filter(({userid:n,length:l})=>n>0&&l>0);r.length>0&&a.push(...r)}return a}},watch:{projectData(){this.sortData=this.getSort()},projectLoad(t){this._loadTimeout&&clearTimeout(this._loadTimeout),t>0?this._loadTimeout=setTimeout(()=>{this.loading=!0},1e3):this.loading=!1},projectId:{handler(t){t>0&&this.getFlowData()},immediate:!0}},methods:{showName(){this.windowLandscape||$A.modalInfo({language:!1,title:this.$L("\u9879\u76EE\u540D\u79F0"),content:this.projectData.name})},showDesc(){this.windowLandscape||$A.modalInfo({language:!1,title:this.$L("\u9879\u76EE\u63CF\u8FF0"),content:this.$refs.descPreview.$el.innerHTML})},searchFocus(){this.$nextTick(()=>{this.$refs.searchInput.focus({cursor:"end"})})},getSort(){const t=[];return this.columnList.forEach(s=>{t.push({id:s.id,task:s.tasks.map(({id:e})=>e)})}),t},sortUpdate(t){const s=this.sortData,e=this.getSort();if(JSON.stringify(s)===JSON.stringify(e))return;this.sortData=e;const a={project_id:this.projectId,sort:this.sortData,only_column:t===!0?1:0};this.sortDisabled=!0,this.$store.dispatch("call",{url:"project/sort",data:a,method:"post"}).then(({msg:o})=>{$A.messageSuccess(o),this.sortDisabled=!1;let i,r=[];a.only_column?(i=-1,a.sort.forEach(n=>{i++,r.push({id:n.id,sort:i})}),this.$store.dispatch("saveColumn",r)):(a.sort.forEach(n=>{i=-1,r.push(...n.task.map(l=>(i++,r.push(...this.allTask.filter(c=>c.parent_id==l).map(({id:c})=>({id:c,sort:i,column_id:n.id}))),{id:l,sort:i,column_id:n.id})))}),this.$store.dispatch("saveTask",r))}).catch(({msg:o})=>{$A.modalError(o),this.sortDisabled=!1,this.$store.dispatch("getTaskForProject",this.projectId).catch(()=>{})})},addTopShow(t,s){this.$set(this.columnTopShow,t,s)},addTaskOpen(t){g.Store.set("addTask",t)},addColumnOpen(){this.addColumnShow=!0,this.$nextTick(()=>{this.$refs.addColumnName.focus()})},addColumnBlur(){this.addColumnName===""&&(this.addColumnShow=!1)},addColumnSubmit(){let t=this.addColumnName.trim();t!==""&&this.$store.dispatch("call",{url:"project/column/add",data:{project_id:this.projectId,name:t}}).then(({data:s,msg:e})=>{$A.messageSuccess(e),this.addColumnName="",this.$store.dispatch("saveColumn",s)}).catch(({msg:s})=>{$A.modalError(s)})},dropColumn(t,s){s==="title"?this.titleColumn(t):s==="remove"?this.removeColumn(t):s.name&&this.updateColumn(t,{color:s.color}).catch(e=>{$A.modalError(e)})},titleColumn(t){$A.modalInput({value:t.name,title:"\u4FEE\u6539\u5217\u8868",placeholder:"\u8F93\u5165\u5217\u8868\u540D\u79F0",onOk:s=>s?this.updateColumn(t,{name:s}):"\u5217\u8868\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"})},updateColumn(t,s){return new Promise((e,a)=>{if(this.columnLoad[t.id]===!0){e();return}this.$set(this.columnLoad,t.id,!0),Object.keys(s).forEach(o=>this.$set(t,o,s[o])),this.$store.dispatch("call",{url:"project/column/update",data:Object.assign(s,{column_id:t.id})}).then(({data:o})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("saveColumn",o),e()}).catch(({msg:o})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("getColumns",this.projectId).catch(()=>{}),a(o)})})},removeColumn(t){$A.modalConfirm({title:"\u5220\u9664\u5217\u8868",content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5217\u8868\u3010"+t.name+"\u3011\u53CA\u5217\u8868\u5185\u7684\u4EFB\u52A1\u5417\uFF1F",loading:!0,onOk:()=>{if(this.columnLoad[t.id]!==!0)return this.$set(this.columnLoad,t.id,!0),new Promise((s,e)=>{this.$store.dispatch("removeColumn",t.id).then(({msg:a})=>{s(a)}).catch(({msg:a})=>{e(a)}).finally(a=>{this.$set(this.columnLoad,t.id,!1)})})}})},onSort(t){this.sortField=t,this.sortType=this.sortType=="desc"?"asc":"desc"},onSetting(){this.settingLoad++,this.$store.dispatch("call",{url:"project/update",data:Object.assign(this.settingData,{project_id:this.projectId})}).then(({data:t,msg:s})=>{$A.messageSuccess(s),this.settingShow=!1,this.$store.dispatch("saveProject",t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.settingLoad--})},onUser(){this.userLoad++,this.$store.dispatch("call",{url:"project/user",data:{project_id:this.projectId,userid:this.userData.userids}}).then(({msg:t})=>{$A.messageSuccess(t),this.userShow=!1,this.$store.dispatch("getProjectOne",this.projectId).catch(()=>{}),this.$store.dispatch("getTaskForProject",this.projectId).catch(()=>{})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.userLoad--})},onTransfer(){this.transferLoad++,this.$store.dispatch("call",{url:"project/transfer",data:{project_id:this.projectId,owner_userid:this.transferData.owner_userid[0]}}).then(({msg:t})=>{$A.messageSuccess(t),this.transferShow=!1,this.$store.dispatch("getProjectOne",this.projectId).catch(()=>{}),this.$store.dispatch("getTaskForProject",this.projectId).catch(()=>{})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.transferLoad--})},onArchived(){$A.modalConfirm({title:"\u5F52\u6863\u9879\u76EE",content:"\u4F60\u786E\u5B9A\u8981\u5F52\u6863\u9879\u76EE\u3010"+this.projectData.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,s)=>{this.$store.dispatch("archivedProject",this.projectId).then(({msg:e})=>{t(e)}).catch(({msg:e})=>{s(e)})})})},onDelete(){$A.modalConfirm({title:"\u5220\u9664\u9879\u76EE",content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u9879\u76EE\u3010"+this.projectData.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,s)=>{this.$store.dispatch("removeProject",this.projectId).then(({msg:e})=>{t(e)}).catch(({msg:e})=>{s(e)})})})},onExit(){$A.modalConfirm({title:"\u9000\u51FA\u9879\u76EE",content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u9879\u76EE\u3010"+this.projectData.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,s)=>{this.$store.dispatch("exitProject",this.projectId).then(({msg:e})=>{t(e)}).catch(({msg:e})=>{s(e)})})})},projectDropdown(t){switch(t){case"setting":this.$set(this.settingData,"name",this.projectData.name),this.$set(this.settingData,"desc",this.projectData.desc),this.settingShow=!0,this.$nextTick(()=>{this.$refs.projectName.focus(),setTimeout(this.$refs.projectDesc.resizeTextarea,0)});break;case"user":if(this.projectData.owner_userid!==this.userId)return;const s=this.projectData.project_user.map(({userid:e})=>e);this.$set(this.userData,"userids",s),this.$set(this.userData,"useridbak",s),this.$set(this.userData,"uncancelable",[this.projectData.owner_userid]),this.userShow=!0;break;case"invite":this.inviteData={},this.inviteShow=!0,this.inviteGet();break;case"workflow":this.workflowShow=!0;break;case"log":this.logShow=!0;break;case"archived_task":this.archivedTaskShow=!0;break;case"deleted_task":this.deletedTaskShow=!0;break;case"transfer":this.$set(this.transferData,"owner_userid",[]),this.transferShow=!0;break;case"archived":this.onArchived();break;case"delete":this.onDelete();break;case"exit":this.onExit();break}},openTask(t,s){this.$store.dispatch("openTask",t),s===!0&&setTimeout(()=>{g.Store.set("receiveTask",!0)},300)},openMenu(t,s){const e=this.$refs[`taskMenu_${s.id}`];e&&e[0].handleClick(t)},taskIsHidden(t){const{id:s,name:e,desc:a,complete_at:o}=t,{searchText:i}=this;return!!(!this.projectData.cacheParameter.completedTask&&o||this.flowTask(t)||i&&s!=i&&!$A.strExists(`${e} ${a}`,i))},ownerUser(t){return t.filter(({owner:s})=>s==1).sort((s,e)=>s.id-e.id)},inviteGet(t){this.inviteLoad++,this.$store.dispatch("call",{url:"project/invite",data:{project_id:this.projectId,refresh:t===!0?"yes":"no"}}).then(({data:s})=>{this.inviteData=s,this.inviteCopy()}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.inviteLoad--})},getFlowData(){this.flowInfo={},this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then(({data:t})=>{var s;this.flowList=t,(s=this.$refs.flow)==null||s.clearSelect()}).catch(()=>{this.flowList=[]})},flowChange(t,s){this.flowInfo=s.pop()||{}},inviteCopy(){!this.inviteData.url||(this.inviteFocus(),this.$copyText(this.inviteData.url).then(t=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(t=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},inviteFocus(){this.$nextTick(t=>{this.$refs.inviteInput.focus({cursor:"all"})})},toggleCompleted(){this.toggleParameter("completedTask")},workflowBeforeClose(){return new Promise(t=>{if(!this.$refs.workflow){t();return}if(!this.$refs.workflow.existDiff()){t();return}$A.modalConfirm({content:"\u8BBE\u7F6E\u5C1A\u672A\u4FDD\u5B58\uFF0C\u662F\u5426\u653E\u5F03\u4FEE\u6539\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{t()}})})},myFilter(t,s=!0){return!this.projectData.cacheParameter.completedTask&&s===!0&&t.complete_at||this.flowTask(t)||this.searchText&&t.id!=this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText)?!1:t.owner==1},helpFilter(t,s=!0){return t.parent_id>0||!this.projectData.cacheParameter.completedTask&&s===!0&&t.complete_at||this.flowTask(t)||this.searchText&&t.id!=this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText)?!1:t.task_user&&t.task_user.find(({userid:e,owner:a})=>e==this.userId&&a==0)},flowTask(t){return $A.leftExists(this.flowInfo.value,"user:")&&!t.task_user.find(({userid:s,owner:e})=>s===this.flowInfo.userid&&e)||this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value?!0:!!(this.flowInfo.value==-1&&t.start_at)},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},tabTypeChange(t){switch(t){case"column":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"column"});break;case"table":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"table"});break;case"gantt":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"gantt"});break}},toggleParameter(t){if(t==="completedTask")this.$store.dispatch("forgetTaskCompleteTemp",!0);else if(t==="chat"&&this.windowPortrait){this.$store.dispatch("openDialog",this.projectData.dialog_id);return}this.$store.dispatch("toggleProjectParameter",t)},onBack(){const{name:t,params:s}=this.$store.state.routeHistoryLast;t===this.$route.name&&/^\d+$/.test(s.projectId)?this.goForward({name:this.$route.name,params:{projectId:"all"}}):this.goBack()}}},I={};var zt=d(Ot,Wt,Nt,!1,Rt,null,null,null);function Rt(t){for(let s in I)this[s]=I[s]}var Ut=function(){return zt.exports}(),Bt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.dialogShow?e("DialogWrapper",{staticClass:"project-dialog",attrs:{"dialog-id":t.projectData.dialog_id}},[e("template",{slot:"head"},[e("div",{staticClass:"dialog-user"},[e("div",{staticClass:"member-head"},[e("div",{staticClass:"member-title"},[t._v(t._s(t.$L("\u9879\u76EE\u6210\u5458"))),e("span",{on:{click:function(a){t.memberShowAll=!t.memberShowAll}}},[t._v("("+t._s(t.projectData.project_user.length)+")")])]),e("div",{staticClass:"member-close",on:{click:t.onClose}},[e("Icon",{attrs:{type:"ios-close"}})],1)]),e("ul",{class:["member-list",t.memberShowAll?"member-all":""]},t._l(t.projectData.project_user,function(a){return e("li",[e("UserAvatar",{attrs:{userid:a.userid,size:36}})],1)}),0)]),e("div",{staticClass:"nav-wrapper"},[e("div",{staticClass:"dialog-title"},[e("h2",[t._v(t._s(t.$L("\u7FA4\u804A")))])])])])],2):t._e()},Vt=[];const Ht={name:"ProjectDialog",components:{DialogWrapper:U},data(){return{loadIng:!1,memberShowAll:!1}},computed:{...w(["projectData"]),dialogShow(){return this.windowLandscape&&this.projectData.dialog_id&&this.projectData.cacheParameter.chat}},methods:{onClose(){this.$store.dispatch("toggleProjectParameter","chat")}}},x={};var Kt=d(Ht,Bt,Vt,!1,Yt,null,null,null);function Yt(t){for(let s in x)this[s]=x[s]}var Xt=function(){return Kt.exports}(),Jt=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"project-list"},[e("PageTitle",{attrs:{title:t.$L("\u9879\u76EE")}}),e("div",{staticClass:"list-search"},[e("div",{staticClass:"search-wrapper"},[e("Input",{attrs:{placeholder:t.$L(t.loadProjects?"\u66F4\u65B0\u4E2D...":"\u641C\u7D22\u9879\u76EE"),clearable:""},model:{value:t.projectKeyValue,callback:function(a){t.projectKeyValue=a},expression:"projectKeyValue"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.loadProjects?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)])],1)]),e("ul",{on:{scroll:function(a){t.operateVisible=!1}}},[t.projectLists.length===0?[t.projectKeyLoading>0?e("li",{staticClass:"loading"},[e("Loading")],1):e("li",{staticClass:"nothing"},[t._v(" "+t._s(t.$L(t.projectKeyValue?`\u6CA1\u6709\u4EFB\u4F55\u4E0E"${t.projectKeyValue}"\u76F8\u5173\u7684\u9879\u76EE`:"\u6CA1\u6709\u4EFB\u4F55\u9879\u76EE"))+" ")])]:t._e(),t._l(t.projectLists,function(a,o){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:o,class:{operate:a.id==t.operateItem.id&&t.operateVisible},attrs:{"data-id":a.id},on:{click:function(i){return t.toggleRoute("project",{projectId:a.id})}}},[e("div",{staticClass:"project-item"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"project-h1"},[e("div",{staticClass:"project-name"},[t._v(t._s(a.name))]),a.top_at?e("div",{staticClass:"icon-top"}):t._e(),a.task_my_num-a.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(a.task_my_num-a.task_my_complete))]):t._e()]),e("div",{staticClass:"project-h2"},[t._v(" "+t._s(a.desc)+" ")])]),a.task_num>0?e("div",{staticClass:"item-right",on:{click:function(i){return i.stopPropagation(),t.modalPercent(a)}}},[e("iCircle",{attrs:{type:"circle","trail-color":"rgba(132, 197, 106, 0.2)","trail-width":7,"stroke-color":a.task_percent===100?"rgba(132, 197, 106, 0)":"#84C56A","stroke-width":7,percent:a.task_percent,size:44}},[a.task_percent===100?e("Icon",{attrs:{type:"ios-checkmark"}}):e("span",{staticClass:"percent-text"},[t._v(t._s(a.task_percent)+"%")])],1)],1):t._e()])])})],2),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLandscape?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(a){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(a){return t.handleTopClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.operateItem.top_at?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876\u8BE5\u9879\u76EE"))+" ")])],1)],1)],1)],1)},Gt=[];const qt={name:"ProjectList",directives:{longpress:B},data(){return{projectKeyValue:"",projectKeyLoading:0,operateStyles:{},operateVisible:!1,operateItem:{}}},computed:{...p(["cacheProjects","loadProjects"]),projectLists(){const{projectKeyValue:t,cacheProjects:s}=this,e=$A.cloneJSON(s).sort((a,o)=>a.top_at||o.top_at?$A.Date(o.top_at)-$A.Date(a.top_at):o.id-a.id);return t?e.filter(a=>$A.strExists(`${a.name} ${a.desc}`,t)):e}},watch:{projectKeyValue(t){t!=""&&(this.projectKeyLoading++,setTimeout(()=>{this.projectKeyValue==t&&this.searchProject(),this.projectKeyLoading--},600))}},methods:{searchProject(){this.projectKeyLoading++,this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue},hideload:!0}).finally(t=>{this.projectKeyLoading--})},toggleRoute(t,s){this.operateVisible||this.goForward({name:"manage-"+t,params:s||{}})},modalPercent(t){if(this.operateVisible)return;let s=`

    ${this.$L("\u603B\u8FDB\u5EA6")}

    `;s+=`

    ${this.$L("\u603B\u6570\u91CF")}: ${t.task_num}

    `,s+=`

    ${this.$L("\u5DF2\u5B8C\u6210")}: ${t.task_complete}

    `,s+=`

    ${this.$L("\u6211\u7684\u4EFB\u52A1")}

    `,s+=`

    ${this.$L("\u603B\u6570\u91CF")}: ${t.task_my_num}

    `,s+=`

    ${this.$L("\u5DF2\u5B8C\u6210")}: ${t.task_my_complete}

    `,$A.modalInfo({language:!1,title:`${t.name} ${this.$L("\u9879\u76EE\u8FDB\u5EA6")}`,content:s})},handleLongpress(t,s){const e=$A.getAttr(s,"data-id"),a=this.projectLists.find(o=>o.id==e);!a||(this.operateVisible=!1,this.operateItem=$A.isJson(a)?a:{},this.$nextTick(()=>{const o=s.getBoundingClientRect(),i=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-i.left}px`,top:`${o.top+this.windowScrollY}px`,height:o.height+"px"},this.operateVisible=!0}))},handleTopClick(){this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then(({data:t})=>{this.$store.dispatch("saveProject",t)}).catch(({msg:t})=>{$A.modalError(t)})}}},S={};var Qt=d(qt,Jt,Gt,!1,Zt,null,null,null);function Zt(t){for(let s in S)this[s]=S[s]}var te=function(){return Qt.exports}(),ee=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"page-project"},[t.projectId>0?[e("ProjectPanel"),e("ProjectDialog")]:t._e(),t.windowPortrait?e("ProjectList",{directives:[{name:"show",rawName:"v-show",value:t.projectId===0,expression:"projectId === 0"}]}):t._e()],2)},se=[];const ae={components:{ProjectList:te,ProjectDialog:Xt,ProjectPanel:Ut},deactivated(){this.$store.dispatch("forgetTaskCompleteTemp",!0)},computed:{...p(["cacheProjects","wsOpenNum"]),projectId(){const{projectId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)}},watch:{projectId:{handler(){this.getProjectData()},immediate:!0},wsOpenNum(t){t<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout(()=>{this.$route.name=="manage-project"&&this.getProjectData()},5e3))}},methods:{getProjectData(){if(this.projectId<=0)return;const t=this.projectId;this.$nextTick(()=>{this.$store.state.projectId=t,this.$store.dispatch("getProjectOne",t).then(()=>{this.$store.dispatch("getColumns",t).catch(()=>{}),this.$store.dispatch("getTaskForProject",t).catch(()=>{})}).catch(({msg:s})=>{t===this.projectId&&$A.modalWarning({content:s,onOk:()=>{const e=this.cacheProjects.find(({id:a})=>a);e?$A.goForward({name:"manage-project",params:{projectId:e.id}}):$A.goForward({name:"manage-dashboard"})}})}),this.$store.dispatch("forgetTaskCompleteTemp",!0)})}}},A={};var oe=d(ae,ee,se,!1,ie,null,null,null);function ie(t){for(let s in A)this[s]=A[s]}var _e=function(){return oe.exports}();export{_e as default}; diff --git a/public/js/build/projectInvite.6d31f4f4.js b/public/js/build/projectInvite.7958ccd4.js similarity index 97% rename from public/js/build/projectInvite.6d31f4f4.js rename to public/js/build/projectInvite.7958ccd4.js index 0e3a56c26..a5baeff34 100644 --- a/public/js/build/projectInvite.6d31f4f4.js +++ b/public/js/build/projectInvite.7958ccd4.js @@ -1 +1 @@ -import{m as a,n as r}from"./app.6c8b31b1.js";var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"page-invite"},[e("PageTitle",{attrs:{title:t.$L("\u52A0\u5165\u9879\u76EE")}}),t.loadIng>0?e("div",{staticClass:"invite-load"},[e("Loading")],1):e("div",{staticClass:"invite-warp"},[t.project.id>0?e("Card",[e("p",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.project.name))]),t.project.desc?e("div",{staticClass:"invite-desc"},[t._v(t._s(t.project.desc))]):e("div",[t._v(t._s(t.$L("\u6682\u65E0\u4ECB\u7ECD")))]),e("div",{staticClass:"invite-footer"},[t.already?e("Button",{attrs:{type:"success",icon:"ios-checkmark-circle-outline"},on:{click:t.goProject}},[t._v(t._s(t.$L("\u5DF2\u52A0\u5165")))]):e("Button",{attrs:{type:"primary",loading:t.joinLoad>0},on:{click:t.joinProject}},[t._v(t._s(t.$L("\u52A0\u5165\u9879\u76EE")))])],1)]):e("Card",[e("p",[t._v(t._s(t.$L("\u9080\u8BF7\u5730\u5740\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\uFF01")))])])],1)],1)},n=[];const c={data(){return{loadIng:0,joinLoad:0,already:!1,project:{}}},computed:{...a(["dialogId","windowPortrait"])},watch:{$route:{handler(t){if(t.name=="manage-project-invite"){if(!$A.Electron&&!$A.isEEUiApp&&navigator.userAgent.indexOf("MicroMessenger")===-1&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))try{/Android/i.test(navigator.userAgent)?window.open("dootask://"+t.fullPath):window.location.href="dootask://"+t.fullPath}catch{}this.windowPortrait&&this.dialogId>0&&this.$store.dispatch("openDialog",0),this.code=t.query?t.query.code:"",this.getData()}},immediate:!0}},methods:{getData(){this.loadIng++,this.$store.dispatch("call",{url:"project/invite/info",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project}).catch(()=>{this.project={}}).finally(t=>{this.loadIng--})},joinProject(){this.joinLoad++,this.$store.dispatch("call",{url:"project/invite/join",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project,this.goProject()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.joinLoad--})},goProject(){this.$nextTick(()=>{$A.goForward({name:"manage-project",params:{projectId:this.project.id}})})}}},o={};var d=r(c,s,n,!1,l,"935768d6",null,null);function l(t){for(let i in o)this[i]=o[i]}var h=function(){return d.exports}();export{h as default}; +import{m as a,n as r}from"./app.6910ca56.js";var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"page-invite"},[e("PageTitle",{attrs:{title:t.$L("\u52A0\u5165\u9879\u76EE")}}),t.loadIng>0?e("div",{staticClass:"invite-load"},[e("Loading")],1):e("div",{staticClass:"invite-warp"},[t.project.id>0?e("Card",[e("p",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.project.name))]),t.project.desc?e("div",{staticClass:"invite-desc"},[t._v(t._s(t.project.desc))]):e("div",[t._v(t._s(t.$L("\u6682\u65E0\u4ECB\u7ECD")))]),e("div",{staticClass:"invite-footer"},[t.already?e("Button",{attrs:{type:"success",icon:"ios-checkmark-circle-outline"},on:{click:t.goProject}},[t._v(t._s(t.$L("\u5DF2\u52A0\u5165")))]):e("Button",{attrs:{type:"primary",loading:t.joinLoad>0},on:{click:t.joinProject}},[t._v(t._s(t.$L("\u52A0\u5165\u9879\u76EE")))])],1)]):e("Card",[e("p",[t._v(t._s(t.$L("\u9080\u8BF7\u5730\u5740\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5220\u9664\uFF01")))])])],1)],1)},n=[];const c={data(){return{loadIng:0,joinLoad:0,already:!1,project:{}}},computed:{...a(["dialogId","windowPortrait"])},watch:{$route:{handler(t){if(t.name=="manage-project-invite"){if(!$A.Electron&&!$A.isEEUiApp&&navigator.userAgent.indexOf("MicroMessenger")===-1&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))try{/Android/i.test(navigator.userAgent)?window.open("dootask://"+t.fullPath):window.location.href="dootask://"+t.fullPath}catch{}this.windowPortrait&&this.dialogId>0&&this.$store.dispatch("openDialog",0),this.code=t.query?t.query.code:"",this.getData()}},immediate:!0}},methods:{getData(){this.loadIng++,this.$store.dispatch("call",{url:"project/invite/info",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project}).catch(()=>{this.project={}}).finally(t=>{this.loadIng--})},joinProject(){this.joinLoad++,this.$store.dispatch("call",{url:"project/invite/join",data:{code:this.code}}).then(({data:t})=>{this.already=t.already,this.project=t.project,this.goProject()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.joinLoad--})},goProject(){this.$nextTick(()=>{$A.goForward({name:"manage-project",params:{projectId:this.project.id}})})}}},o={};var d=r(c,s,n,!1,l,"935768d6",null,null);function l(t){for(let i in o)this[i]=o[i]}var h=function(){return d.exports}();export{h as default}; diff --git a/public/js/build/reportDetail.142aead0.js b/public/js/build/reportDetail.39c2af9e.js similarity index 85% rename from public/js/build/reportDetail.142aead0.js rename to public/js/build/reportDetail.39c2af9e.js index 4fdf3f67b..ec173f167 100644 --- a/public/js/build/reportDetail.142aead0.js +++ b/public/js/build/reportDetail.39c2af9e.js @@ -1 +1 @@ -import{R as i}from"./ReportDetail.556c0891.js";import{n as o}from"./app.6c8b31b1.js";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-report"},[r("PageTitle",{attrs:{title:t.$L("\u62A5\u544A\u8BE6\u60C5")}}),r("ReportDetail",{attrs:{data:t.detailData}})],1)},l=[];const n={components:{ReportDetail:i},data(){return{detailData:{}}},computed:{reportDetailId(){const{reportDetailId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)}},watch:{reportDetailId:{handler(){this.getDetail()},immediate:!0}},methods:{getDetail(){this.reportDetailId<=0||this.$store.dispatch("call",{url:"report/detail",data:{id:this.reportDetailId}}).then(({data:t})=>{this.detailData=t}).catch(({msg:t})=>{$A.messageError(t)})}}},a={};var c=o(n,s,l,!1,d,"76126c11",null,null);function d(t){for(let e in a)this[e]=a[e]}var u=function(){return c.exports}();export{u as default}; +import{R as i}from"./ReportDetail.d9bb9dfa.js";import{n as o}from"./app.6910ca56.js";var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-report"},[r("PageTitle",{attrs:{title:t.$L("\u62A5\u544A\u8BE6\u60C5")}}),r("ReportDetail",{attrs:{data:t.detailData}})],1)},l=[];const n={components:{ReportDetail:i},data(){return{detailData:{}}},computed:{reportDetailId(){const{reportDetailId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)}},watch:{reportDetailId:{handler(){this.getDetail()},immediate:!0}},methods:{getDetail(){this.reportDetailId<=0||this.$store.dispatch("call",{url:"report/detail",data:{id:this.reportDetailId}}).then(({data:t})=>{this.detailData=t}).catch(({msg:t})=>{$A.messageError(t)})}}},a={};var c=o(n,s,l,!1,d,"76126c11",null,null);function d(t){for(let e in a)this[e]=a[e]}var u=function(){return c.exports}();export{u as default}; diff --git a/public/js/build/reportEdit.b7be9cde.js b/public/js/build/reportEdit.e5acde07.js similarity index 86% rename from public/js/build/reportEdit.b7be9cde.js rename to public/js/build/reportEdit.e5acde07.js index 9fefcec10..89cc020ae 100644 --- a/public/js/build/reportEdit.b7be9cde.js +++ b/public/js/build/reportEdit.e5acde07.js @@ -1 +1 @@ -import{R as i}from"./ReportEdit.54eb60eb.js";import{n}from"./app.6c8b31b1.js";import"./UserSelect.d62f565b.js";var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-report"},[r("PageTitle",{attrs:{title:t.title}}),r("ReportEdit",{attrs:{id:t.reportEditId},on:{saveSuccess:t.saveSuccess}})],1)},a=[];const d={components:{ReportEdit:i},data(){return{detail:{}}},computed:{reportEditId(){if(/^\d+$/.test(this.detail.id))return parseInt(this.detail.id);const{reportEditId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},title(){return this.$L(this.reportEditId>0?"\u4FEE\u6539\u62A5\u544A":"\u65B0\u589E\u62A5\u544A")}},methods:{saveSuccess(t){this.detail=t,this.$isSubElectron&&($A.Electron.sendMessage("sendForwardMain",{channel:"reportSaveSuccess",data:t}),window.close())}}},s={};var c=n(d,o,a,!1,l,"807ce0ea",null,null);function l(t){for(let e in s)this[e]=s[e]}var v=function(){return c.exports}();export{v as default}; +import{R as i}from"./ReportEdit.cc7cc71b.js";import{n}from"./app.6910ca56.js";import"./UserSelect.1938cd94.js";var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-report"},[r("PageTitle",{attrs:{title:t.title}}),r("ReportEdit",{attrs:{id:t.reportEditId},on:{saveSuccess:t.saveSuccess}})],1)},a=[];const d={components:{ReportEdit:i},data(){return{detail:{}}},computed:{reportEditId(){if(/^\d+$/.test(this.detail.id))return parseInt(this.detail.id);const{reportEditId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},title(){return this.$L(this.reportEditId>0?"\u4FEE\u6539\u62A5\u544A":"\u65B0\u589E\u62A5\u544A")}},methods:{saveSuccess(t){this.detail=t,this.$isSubElectron&&($A.Electron.sendMessage("sendForwardMain",{channel:"reportSaveSuccess",data:t}),window.close())}}},s={};var c=n(d,o,a,!1,l,"807ce0ea",null,null);function l(t){for(let e in s)this[e]=s[e]}var v=function(){return c.exports}();export{v as default}; diff --git a/public/js/build/swipe.e89ae537.js b/public/js/build/swipe.9a0bfd93.js similarity index 99% rename from public/js/build/swipe.e89ae537.js rename to public/js/build/swipe.9a0bfd93.js index 38bb8701a..ad7ba1108 100644 --- a/public/js/build/swipe.e89ae537.js +++ b/public/js/build/swipe.9a0bfd93.js @@ -1,4 +1,4 @@ -import{n as w,_ as v}from"./app.6c8b31b1.js";/*! +import{n as w,_ as v}from"./app.6910ca56.js";/*! * PhotoSwipe Lightbox 5.3.8 - https://photoswipe.com * (c) 2023 Dmytro Semenov */function d(s,t,e){const i=document.createElement(t);return s&&(i.className=s),e&&e.appendChild(i),i}function S(s,t,e){let i=`translate3d(${s}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function u(s,t,e){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof e=="number"?`${e}px`:e}const a={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function E(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function c(s,t,e=document){let i=[];if(s instanceof Element)i=[s];else if(s instanceof NodeList||Array.isArray(s))i=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(i=Array.from(e.querySelectorAll(n)))}return i}function I(s){return typeof s=="function"&&s.prototype&&s.prototype.goTo}function f(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class A{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class b{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var n,r,l;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])==null||n.push({fn:e,priority:i}),(r=this._filters[t])==null||r.sort((o,h)=>o.priority-h.priority),(l=this.pswp)==null||l.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])==null||i.forEach(n=>{e[0]=n.fn.apply(this,e)}),e[0]}on(t,e){var i,n;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])==null||i.push(e),(n=this.pswp)==null||n.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>e!==n)),(i=this.pswp)==null||i.off(t,e)}dispatch(t,e){var n;if(this.pswp)return this.pswp.dispatch(t,e);const i=new A(t,e);return(n=this._listeners[t])==null||n.forEach(r=>{r.call(this,i)}),i}}class C{constructor(t,e){if(this.element=d("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){!this.element||(this.element.tagName==="IMG"?(u(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=S(0,0,t/250)):u(this.element,t,e))}destroy(){var t;(t=this.element)!=null&&t.parentNode&&this.element.remove(),this.element=null}}class D{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=a.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new C(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=d("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=d("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var i,n;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=(i=this.data.src)!=null?i:"",e.alt=(n=this.data.alt)!=null?n:"",this.state=a.LOADING,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=a.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===a.LOADED||this.state===a.ERROR)&&this.removePlaceholder())}onError(){this.state=a.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===a.LOADING,this)}isError(){return this.state===a.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(!!this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(u(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==a.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){var t,e;if(this.slide){let i=d("pswp__error-msg","div");i.innerText=(e=(t=this.instance.options)==null?void 0:t.errorMsg)!=null?e:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=d("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===a.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||f())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!f()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){!this.isAttached||this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===a.LOADED||this.state===a.ERROR)&&this.removePlaceholder())}}function L(s,t){if(s.getViewportSizeFn){const e=s.getViewportSizeFn(s,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function p(s,t,e,i,n){let r=0;if(t.paddingFn)r=t.paddingFn(e,i,n)[s];else if(t.padding)r=t.padding[s];else{const l="padding"+s[0].toUpperCase()+s.slice(1);t[l]&&(r=t[l])}return Number(r)||0}function x(s,t,e,i){return{x:t.x-p("left",s,t,e,i)-p("right",s,t,e,i),y:t.y-p("top",s,t,e,i)-p("bottom",s,t,e,i)}}const m=4e3;class P{constructor(t,e,i,n){this.pswp=n,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const n={x:t,y:e};this.elementSize=n,this.panAreaSize=i;const r=i.x/n.x,l=i.y/n.y;this.fit=Math.min(1,rl?r:l),this.vFill=Math.min(1,l),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(!!i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>m&&(t=m/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function y(s,t,e){const i=t.createContentFromData(s,e);let n;const{options:r}=t;if(r){n=new P(r,s,-1);let l;t.pswp?l=t.pswp.viewportSize:l=L(r,t);const o=x(r,l,s,e);n.update(i.width,i.height,o)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function z(s,t){const e=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:e}).defaultPrevented)return y(e,t,s)}class O extends b{getNumItems(){var n;let t=0;const e=(n=this.options)==null?void 0:n.dataSource;e&&"length"in e?t=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(t=e.items.length));const i=this.dispatch("numItems",{dataSource:e,numItems:t});return this.applyFilters("numItems",i.numItems,e)}createContentFromData(t,e){return new D(t,this,e)}getItemData(t){var l;const e=(l=this.options)==null?void 0:l.dataSource;let i={};Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),i=e.items[t]);let n=i;n instanceof Element&&(n=this._domElementToItemData(n));const r=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return((e=this.options)==null?void 0:e.children)||((i=this.options)==null?void 0:i.childSelector)?c(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){var n;const e={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const r=t.querySelector("img");r&&(e.msrc=r.currentSrc||r.src,e.alt=(n=r.getAttribute("alt"))!=null?n:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return y(t,this,e)}}class M extends O{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){c(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(E(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,n=c(this.options.children,this.options.childSelector,t.currentTarget).findIndex(r=>r===e||r.contains(e));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){return window.pswp?!1:(this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0)}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const n=[],r=typeof i.pswpModule;if(I(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(r==="string")throw new Error("pswpModule as string is no longer supported");if(r==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=z(t,this));const l=++this._uid;Promise.all(n).then(o=>{if(this.shouldOpen){const h=o[0];this._openPhotoswipe(h,l)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{var r;(r=this._listeners[n])==null||r.forEach(l=>{i.on(n,l)})}),Object.keys(this._filters).forEach(n=>{var r;(r=this._filters[n])==null||r.forEach(l=>{i.addFilter(n,l.fn,l.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)==null||t.destroy(),this.shouldOpen=!1,this._listeners={},c(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}var F=function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div")},R=[];const N={props:{className:{type:String,default:()=>"preview-image-swipe-"+Math.round(Math.random()*1e4)},urlList:{type:Array,default:()=>[]},initialIndex:{type:Number,default:0}},data(){return{lightbox:null}},beforeDestroy(){var s;(s=this.lightbox)==null||s.destroy()},watch:{urlList:{handler(s){var n;let t=!1,e=!1;(n=this.lightbox)==null||n.destroy();const i=s.map(r=>{if($A.isJson(r)){if(r.src&&(r.src=$A.thumbRestore(r.src)),parseInt(r.width)>0&&parseInt(r.height)>0)return r;r=r.src}return e=!0,{html:`
    `}});this.lightbox=new M({dataSource:i,escKey:!1,mainClass:this.className,showHideAnimationType:"none",pswpModule:()=>v(()=>import("./photoswipe.esm.2347f18a.js"),[])}),this.lightbox.on("change",r=>{!e||$A.loadScript("js/pinch-zoom.umd.min.js").then(l=>{document.querySelector(`.${this.className}`).querySelectorAll(".preview-image-swipe").forEach(h=>{h.getAttribute("data-init-pinch-zoom")!=="init"&&(h.setAttribute("data-init-pinch-zoom","init"),h.querySelector("img").addEventListener("pointermove",_=>{t&&_.stopPropagation()}),new PinchZoom.default(h,{draggableUnzoomed:!1,onDragStart:()=>{t=!0},onDragEnd:()=>{t=!1}}))})})}),this.lightbox.on("close",()=>{this.$emit("on-close")}),this.lightbox.on("destroy",()=>{this.$emit("on-destroy")}),this.lightbox.init(),this.lightbox.loadAndOpen(this.initialIndex)},immediate:!0},initialIndex(s){var t;(t=this.lightbox)==null||t.loadAndOpen(s)}}},g={};var T=w(N,F,R,!1,k,null,null,null);function k(s){for(let t in g)this[t]=g[t]}var W=function(){return T.exports}();export{W as default}; diff --git a/public/js/build/system.90a495f1.js b/public/js/build/system.0a762fda.js similarity index 99% rename from public/js/build/system.90a495f1.js rename to public/js/build/system.0a762fda.js index 299490a27..311e3d515 100644 --- a/public/js/build/system.90a495f1.js +++ b/public/js/build/system.0a762fda.js @@ -1 +1 @@ -import{n as i,m as c}from"./app.6c8b31b1.js";var _=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formDatum",attrs:{model:t.formDatum,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u5E10\u53F7\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5141\u8BB8\u6CE8\u518C"),prop:"reg"}},[a("RadioGroup",{model:{value:t.formDatum.reg,callback:function(e){t.$set(t.formDatum,"reg",e)},expression:"formDatum.reg"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5141\u8BB8")))]),a("Radio",{attrs:{label:"invite"}},[t._v(t._s(t.$L("\u9080\u8BF7\u7801")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u7981\u6B62")))])],1),t.formDatum.reg=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5141\u8BB8\uFF1A\u5F00\u653E\u6CE8\u518C\u529F\u80FD\u3002")))]):t.formDatum.reg=="invite"?[a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u9080\u8BF7\u7801\uFF1A\u6CE8\u518C\u65F6\u9700\u586B\u5199\u4E0B\u65B9\u9080\u8BF7\u7801\u3002")))]),a("Input",{staticStyle:{width:"200px","margin-top":"6px"},model:{value:t.formDatum.reg_invite,callback:function(e){t.$set(t.formDatum,"reg_invite",e)},expression:"formDatum.reg_invite"}},[a("span",{attrs:{slot:"prepend"},slot:"prepend"},[t._v(t._s(t.$L("\u9080\u8BF7\u7801")))])])]:t._e()],2),["open","invite"].includes(t.formDatum.reg)?a("FormItem",{attrs:{label:t.$L("\u6CE8\u518C\u8EAB\u4EFD"),prop:"reg_identity"}},[a("RadioGroup",{model:{value:t.formDatum.reg_identity,callback:function(e){t.$set(t.formDatum,"reg_identity",e)},expression:"formDatum.reg_identity"}},[a("Radio",{attrs:{label:"normal"}},[t._v(t._s(t.$L("\u6B63\u5E38\u5E10\u53F7")))]),a("Radio",{attrs:{label:"temp"}},[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7")))])],1),a("div",{staticClass:"form-tip form-list"},[a("p",[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7"))+"\uFF1A")]),a("ol",[a("li",[t._v(t._s(t.$L("\u7981\u6B62\u67E5\u770B\u5171\u4EAB\u6240\u6709\u4EBA\u7684\u6587\u4EF6\u3002")))]),a("li",[t._v(t._s(t.$L("\u7981\u6B62\u53D1\u8D77\u4F1A\u8BDD\u3002")))]),a("li",[t._v(t._s(t.$L("\u7981\u6B62\u521B\u5EFA\u7FA4\u804A\u3002")))]),a("li",[t._v(t._s(t.$L("\u7981\u6B62\u62E8\u6253\u7535\u8BDD\u3002")))])])])],1):t._e(),a("FormItem",{attrs:{label:t.$L("\u767B\u5F55\u9A8C\u8BC1\u7801"),prop:"loginCode"}},[a("RadioGroup",{model:{value:t.formDatum.login_code,callback:function(e){t.$set(t.formDatum,"login_code",e)},expression:"formDatum.login_code"}},[a("Radio",{attrs:{label:"auto"}},[t._v(t._s(t.$L("\u81EA\u52A8")))]),a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.login_code=="auto"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\uFF1A\u5BC6\u7801\u8F93\u5165\u9519\u8BEF\u540E\u5FC5\u987B\u6DFB\u52A0\u9A8C\u8BC1\u7801\u3002")))]):t.formDatum.login_code=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\uFF1A\u6BCF\u6B21\u767B\u5F55\u90FD\u9700\u8981\u56FE\u5F62\u9A8C\u8BC1\u7801\u3002")))]):t.formDatum.login_code=="close"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5173\u95ED\uFF1A\u4E0D\u9700\u8981\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u5BC6\u7801\u7B56\u7565"),prop:"passwordPolicy"}},[a("RadioGroup",{model:{value:t.formDatum.password_policy,callback:function(e){t.$set(t.formDatum,"password_policy",e)},expression:"formDatum.password_policy"}},[a("Radio",{attrs:{label:"simple"}},[t._v(t._s(t.$L("\u7B80\u5355")))]),a("Radio",{attrs:{label:"complex"}},[t._v(t._s(t.$L("\u590D\u6742")))])],1),t.formDatum.password_policy=="simple"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7B80\u5355\uFF1A\u5927\u4E8E\u6216\u7B49\u4E8E6\u4E2A\u5B57\u7B26\u3002")))]):t.formDatum.password_policy=="complex"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u590D\u6742\uFF1A\u5927\u4E8E\u6216\u7B49\u4E8E6\u4E2A\u5B57\u7B26\uFF0C\u5305\u542B\u6570\u5B57\u3001\u5B57\u6BCD\u5927\u5C0F\u5199\u6216\u8005\u7279\u6B8A\u5B57\u7B26\u3002")))]):t._e()],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u9879\u76EE\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u9080\u8BF7\u9879\u76EE"),prop:"projectInvite"}},[a("RadioGroup",{model:{value:t.formDatum.project_invite,callback:function(e){t.$set(t.formDatum,"project_invite",e)},expression:"formDatum.project_invite"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.project_invite=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\uFF1A\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u751F\u6210\u94FE\u63A5\u9080\u8BF7\u6210\u5458\u52A0\u5165\u9879\u76EE\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u81EA\u52A8\u5F52\u6863\u4EFB\u52A1"),prop:"autoArchived"}},[a("RadioGroup",{attrs:{value:t.formDatum.auto_archived},on:{"on-change":t.formArchived}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EFB\u52A1\u5B8C\u6210\u540E\u81EA\u52A8\u5F52\u6863\u3002")))]),t.formDatum.auto_archived=="open"?a("ETooltip",{attrs:{placement:"right",disabled:t.$isEEUiApp||t.windowTouch}},[a("div",{staticClass:"setting-auto-day"},[a("Input",{attrs:{type:"number"},model:{value:t.formDatum.archived_day,callback:function(e){t.$set(t.formDatum,"archived_day",e)},expression:"formDatum.archived_day"}},[a("span",{attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.$L("\u5929")))])])],1),a("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u4EFB\u52A1\u5B8C\u6210 (*) \u5929\u540E\u81EA\u52A8\u5F52\u6863\u3002",t.formDatum.archived_day)))])]):t._e()],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u4EFB\u52A1\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u53EF\u89C1\u6027\u9009\u9879"),prop:"taskVisible"}},[a("RadioGroup",{model:{value:t.formDatum.task_visible,callback:function(e){t.$set(t.formDatum,"task_visible",e)},expression:"formDatum.task_visible"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u4FDD\u6301")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u81EA\u52A8")))])],1),t.formDatum.task_visible=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4FDD\u6301\uFF1A\u4EFB\u52A1\u8BE6\u60C5\u9875\u53EF\u89C1\u6027\u9009\u9879\u4FDD\u6301\u663E\u793A\u3002")))]):t.formDatum.task_visible=="close"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\uFF1A\u9ED8\u8BA4\u503C\u60C5\u51B5\u4E0B\u663E\u793A\u5728\u5408\u5E76\u9879\u76EE\uFF0C\u8BBE\u7F6E\u65F6\u4FDD\u6301\u663E\u793A\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u4EFB\u52A1\u9ED8\u8BA4\u65F6\u95F4"),prop:"taskDefaultTime"}},[a("TimePicker",{attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u65F6\u95F4"),transfer:""},model:{value:t.formDatum.task_default_time,callback:function(e){t.$set(t.formDatum,"task_default_time",e)},expression:"formDatum.task_default_time"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6DFB\u52A0\u4EFB\u52A1\u8BA1\u5212\u65F6\u95F4\u9ED8\u8BA4\u65F6\u5206\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u672A\u9886\u4EFB\u52A1\u63D0\u9192"),prop:"autoArchived"}},[a("RadioGroup",{attrs:{value:t.formDatum.unclaimed_task_reminder},on:{"on-change":t.formTaskReminder}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540E\u6BCF\u5929\u6309\u8BBE\u5B9A\u7684\u63D0\u9192\u65F6\u95F4\u5728\u9879\u76EE\u7FA4\u804A\u4E2D\u53D1\u9001\u672A\u9886\u53D6\u4EFB\u52A1\u901A\u77E5\u3002")))]),t.formDatum.unclaimed_task_reminder=="open"?a("TimePicker",{attrs:{format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u63D0\u9192\u65F6\u95F4"),transfer:""},model:{value:t.formDatum.unclaimed_task_reminder_time,callback:function(e){t.$set(t.formDatum,"unclaimed_task_reminder_time",e)},expression:"formDatum.unclaimed_task_reminder_time"}}):t._e()],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u6D88\u606F\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5168\u5458\u7FA4\u7EC4\u7981\u8A00"),prop:"allGroupMute"}},[a("RadioGroup",{model:{value:t.formDatum.all_group_mute,callback:function(e){t.$set(t.formDatum,"all_group_mute",e)},expression:"formDatum.all_group_mute"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u653E")))]),a("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("\u6210\u5458\u7981\u8A00")))]),a("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("\u5168\u90E8\u7981\u8A00")))])],1),t.formDatum.all_group_mute=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u653E\uFF1A\u6240\u6709\u4EBA\u90FD\u53EF\u4EE5\u53D1\u8A00\u3002")))]):t.formDatum.all_group_mute=="user"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6210\u5458\u7981\u8A00\uFF1A\u4EC5\u7BA1\u7406\u5458\u53EF\u4EE5\u53D1\u8A00\u3002")))]):t.formDatum.all_group_mute=="all"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5168\u90E8\u7981\u8A00\uFF1A\u6240\u6709\u4EBA\u90FD\u7981\u6B62\u53D1\u8A00\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u81EA\u52A8\u8FDB\u5165\u5168\u5458\u7FA4"),prop:"allGroupAutoin"}},[a("RadioGroup",{model:{value:t.formDatum.all_group_autoin,callback:function(e){t.$set(t.formDatum,"all_group_autoin",e)},expression:"formDatum.all_group_autoin"}},[a("Radio",{attrs:{label:"yes"}},[t._v(t._s(t.$L("\u81EA\u52A8")))]),a("Radio",{attrs:{label:"no"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.all_group_autoin=="yes"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\uFF1A\u6CE8\u518C\u6210\u529F\u540E\u81EA\u52A8\u8FDB\u5165\u5168\u5458\u7FA4\u3002")))]):t.formDatum.all_group_autoin=="no"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5173\u95ED\uFF1A\u5176\u4ED6\u6210\u5458\u901A\u8FC7@\u9080\u8BF7\u8FDB\u5165\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u804A\u5929\u8D44\u6599"),prop:"chatInformation"}},[a("RadioGroup",{model:{value:t.formDatum.chat_information,callback:function(e){t.$set(t.formDatum,"chat_information",e)},expression:"formDatum.chat_information"}},[a("Radio",{attrs:{label:"optional"}},[t._v(t._s(t.$L("\u53EF\u9009")))]),a("Radio",{attrs:{label:"required"}},[t._v(t._s(t.$L("\u5FC5\u586B")))])],1),t.formDatum.chat_information=="required"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5FC5\u586B\uFF1A\u53D1\u9001\u804A\u5929\u5185\u5BB9\u524D\u5FC5\u987B\u8BBE\u7F6E\u6635\u79F0\u3001\u7535\u8BDD\u3002")))]):a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5982\u679C\u5FC5\u586B\uFF0C\u53D1\u9001\u804A\u5929\u524D\u5FC5\u987B\u8BBE\u7F6E\u6635\u79F0\u3001\u7535\u8BDD\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u533F\u540D\u6D88\u606F"),prop:"anonMessage"}},[a("RadioGroup",{model:{value:t.formDatum.anon_message,callback:function(e){t.$set(t.formDatum,"anon_message",e)},expression:"formDatum.anon_message"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.anon_message=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5141\u8BB8\u533F\u540D\u53D1\u9001\u6D88\u606F\u7ED9\u5176\u4ED6\u6210\u5458\u3002")))]):a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7981\u6B62\u533F\u540D\u53D1\u9001\u6D88\u606F\u3002")))])],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u5176\u4ED6\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u56FE\u7247\u4F18\u5316"),prop:"image_compress"}},[a("RadioGroup",{model:{value:t.formDatum.image_compress,callback:function(e){t.$set(t.formDatum,"image_compress",e)},expression:"formDatum.image_compress"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6570\u7801\u76F8\u673A4M\u7684\u56FE\u7247\uFF0C\u4F18\u5316\u540E\u4EC5\u6709700KB\u5DE6\u53F3\uFF0C\u800C\u4E14\u8089\u773C\u57FA\u672C\u770B\u4E0D\u51FA\u533A\u522B\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u4FDD\u5B58\u7F51\u7EDC\u56FE\u7247"),prop:"image_save_local"}},[a("RadioGroup",{model:{value:t.formDatum.image_save_local,callback:function(e){t.$set(t.formDatum,"image_save_local",e)},expression:"formDatum.image_save_local"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u662F\u5426\u5C06\u6D88\u606F\u4E2D\u7684\u7F51\u7EDC\u56FE\u7247\u4FDD\u5B58\u5230\u672C\u5730\u670D\u52A1\u5668\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u6587\u4EF6\u4E0A\u4F20\u9650\u5236"),prop:"fileUploadLimit"}},[a("div",{staticStyle:{width:"192px"}},[a("Input",{attrs:{type:"number",number:"",placeholder:t.$L("\u9ED8\u8BA4\u4E0D\u9650\u5236")},scopedSlots:t._u([{key:"append",fn:function(){return[a("span",[t._v("MB")])]},proxy:!0}]),model:{value:t.formDatum.file_upload_limit,callback:function(e){t.$set(t.formDatum,"file_upload_limit",e)},expression:"formDatum.file_upload_limit"}})],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5305\u542B\u6D88\u606F\u53D1\u9001\u7684\u6587\u4EF6")))])])],1)]),t.$A.isDooServer()?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u7279\u6B8A\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u662F\u5426\u542F\u52A8\u9996\u9875"),prop:"startHome"}},[a("RadioGroup",{model:{value:t.formDatum.start_home,callback:function(e){t.$set(t.formDatum,"start_home",e)},expression:"formDatum.start_home"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EC5\u652F\u6301\u7F51\u9875\u7248\u3002")))])],1)],1)]):t._e()]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},d=[];const p={name:"SystemSetting",data(){return{loadIng:0,formDatum:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formDatum=$A.cloneJSON(this.formDatum_bak)},formArchived(t){this.formDatum={...this.formDatum,auto_archived:t}},formTaskReminder(t){this.formDatum={...this.formDatum,unclaimed_task_reminder:t}},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting?type="+(t?"save":"all"),data:this.formDatum}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formDatum=s,this.formDatum_bak=$A.cloneJSON(this.formDatum)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},l={};var f=i(p,_,d,!1,v,null,null,null);function v(t){for(let s in l)this[s]=l[s]}var $=function(){return f.exports}(),b=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formDatum",attrs:{"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("Row",{staticClass:"setting-color color-label-box"},[a("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u540D\u79F0")))]),a("Col",{attrs:{span:"4"}},[a("ETooltip",{attrs:{content:t.$L("\u6570\u503C\u8D8A\u5C0F\u7EA7\u522B\u8D8A\u9AD8"),"max-width":"auto",placement:"top",transfer:""}},[a("div",[a("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}}),t._v(" "+t._s(t.$L("\u7EA7\u522B")))],1)])],1),a("Col",{attrs:{span:"4"}},[a("ETooltip",{attrs:{content:t.$L("\u4EFB\u52A1\u5B8C\u6210\u65F6\u95F4"),"max-width":"auto",placement:"top",transfer:""}},[a("div",[a("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}}),t._v(" "+t._s(t.$L("\u5929\u6570")))],1)])],1),a("Col",{attrs:{span:"4"}},[t._v(t._s(t.$L("\u989C\u8272")))])],1),t._l(t.formDatum,function(e,r){return a("Row",{key:r,staticClass:"setting-color"},[a("Col",{attrs:{span:"12"}},[a("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u540D\u79F0"),clearable:""},on:{"on-clear":function(o){return t.delDatum(r)}},model:{value:e.name,callback:function(o){t.$set(e,"name",o)},expression:"item.name"}})],1),a("Col",{attrs:{span:"4"}},[a("Input",{attrs:{type:"number"},model:{value:e.priority,callback:function(o){t.$set(e,"priority",o)},expression:"item.priority"}})],1),a("Col",{attrs:{span:"4"}},[a("Input",{attrs:{type:"number"},model:{value:e.days,callback:function(o){t.$set(e,"days",o)},expression:"item.days"}})],1),a("Col",{attrs:{span:"4"}},[a("ColorPicker",{attrs:{recommend:"",transfer:""},model:{value:e.color,callback:function(o){t.$set(e,"color",o)},expression:"item.color"}})],1)],1)}),a("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u4F18\u5148\u7EA7")))])],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},D=[];const h={name:"SystemTaskPriority",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",priority:1,days:1,color:"#84C56A"}}},mounted(){this.systemSetting()},computed:{...c(["taskPriority"])},watch:{taskPriority:{handler(t){this.formDatum=$A.cloneJSON(t),this.formDatum.length===0&&this.addDatum()},immediate:!0}},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formDatum=$A.cloneJSON(this.taskPriority)},addDatum(){this.formDatum.push($A.cloneJSON(this.nullDatum))},delDatum(t){this.formDatum.splice(t,1),this.formDatum.length===0&&this.addDatum()},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/priority?type="+(t?"save":"get"),method:"post",data:{list:this.formDatum}}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.state.taskPriority=$A.cloneJSON(s)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},m={};var g=i(h,b,D,!1,L,null,null,null);function L(t){for(let s in m)this[s]=m[s]}var y=function(){return g.exports}(),C=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formDatum",attrs:{"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("Row",{staticClass:"setting-template"},[a("Col",{attrs:{span:"8"}},[t._v(t._s(t.$L("\u540D\u79F0")))]),a("Col",{attrs:{span:"16"}},[t._v(t._s(t.$L("\u9879\u76EE\u6A21\u677F")))])],1),t._l(t.formDatum,function(e,r){return a("Row",{key:r,staticClass:"setting-template"},[a("Col",{attrs:{span:"8"}},[a("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u540D\u79F0"),clearable:""},on:{"on-clear":function(o){return t.delDatum(r)}},model:{value:e.name,callback:function(o){t.$set(e,"name",o)},expression:"item.name"}})],1),a("Col",{attrs:{span:"16"}},[a("TagInput",{model:{value:e.columns,callback:function(o){t.$set(e,"columns",o)},expression:"item.columns"}})],1)],1)}),a("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u6A21\u677F")))])],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},k=[];const x={name:"SystemColumnTemplate",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",columns:""}}},mounted(){this.systemSetting()},computed:{...c(["columnTemplate"])},watch:{columnTemplate:{handler(t){this.formDatum=$A.cloneJSON(t),this.formDatum.length===0&&this.addDatum()},immediate:!0}},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formDatum=$A.cloneJSON(this.columnTemplate)},addDatum(){this.formDatum.push($A.cloneJSON(this.nullDatum))},delDatum(t){this.formDatum.splice(t,1),this.formDatum.length===0&&this.addDatum()},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/column/template?type="+(t?"save":"get"),method:"post",data:{list:this.formDatum}}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.state.columnTemplate=$A.cloneJSON(s).map(a=>($A.isArray(a.columns)&&(a.columns=a.columns.join(",")),a))}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},n={};var R=i(x,C,k,!1,S,null,null,null);function S(t){for(let s in n)this[s]=n[s]}var I=function(){return R.exports}(),F=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-item submit"},[a("Tabs",{model:{value:t.tabAction,callback:function(e){t.tabAction=e},expression:"tabAction"}},[a("TabPane",{attrs:{label:t.$L("\u7CFB\u7EDF\u8BBE\u7F6E"),name:"setting"}},[a("SystemSetting")],1),a("TabPane",{attrs:{label:t.$L("\u4EFB\u52A1\u4F18\u5148\u7EA7"),name:"taskPriority"}},[a("SystemTaskPriority")],1),a("TabPane",{attrs:{label:t.$L("\u9879\u76EE\u6A21\u677F"),name:"columnTemplate"}},[a("SystemColumnTemplate")],1)],1)],1)},A=[];const T={components:{SystemColumnTemplate:I,SystemTaskPriority:y,SystemSetting:$},data(){return{tabAction:"setting"}}},u={};var w=i(T,F,A,!1,G,null,null,null);function G(t){for(let s in u)this[s]=u[s]}var O=function(){return w.exports}();export{O as default}; +import{n as i,m as c}from"./app.6910ca56.js";var _=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formDatum",attrs:{model:t.formDatum,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u5E10\u53F7\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5141\u8BB8\u6CE8\u518C"),prop:"reg"}},[a("RadioGroup",{model:{value:t.formDatum.reg,callback:function(e){t.$set(t.formDatum,"reg",e)},expression:"formDatum.reg"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5141\u8BB8")))]),a("Radio",{attrs:{label:"invite"}},[t._v(t._s(t.$L("\u9080\u8BF7\u7801")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u7981\u6B62")))])],1),t.formDatum.reg=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5141\u8BB8\uFF1A\u5F00\u653E\u6CE8\u518C\u529F\u80FD\u3002")))]):t.formDatum.reg=="invite"?[a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u9080\u8BF7\u7801\uFF1A\u6CE8\u518C\u65F6\u9700\u586B\u5199\u4E0B\u65B9\u9080\u8BF7\u7801\u3002")))]),a("Input",{staticStyle:{width:"200px","margin-top":"6px"},model:{value:t.formDatum.reg_invite,callback:function(e){t.$set(t.formDatum,"reg_invite",e)},expression:"formDatum.reg_invite"}},[a("span",{attrs:{slot:"prepend"},slot:"prepend"},[t._v(t._s(t.$L("\u9080\u8BF7\u7801")))])])]:t._e()],2),["open","invite"].includes(t.formDatum.reg)?a("FormItem",{attrs:{label:t.$L("\u6CE8\u518C\u8EAB\u4EFD"),prop:"reg_identity"}},[a("RadioGroup",{model:{value:t.formDatum.reg_identity,callback:function(e){t.$set(t.formDatum,"reg_identity",e)},expression:"formDatum.reg_identity"}},[a("Radio",{attrs:{label:"normal"}},[t._v(t._s(t.$L("\u6B63\u5E38\u5E10\u53F7")))]),a("Radio",{attrs:{label:"temp"}},[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7")))])],1),a("div",{staticClass:"form-tip form-list"},[a("p",[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7"))+"\uFF1A")]),a("ol",[a("li",[t._v(t._s(t.$L("\u7981\u6B62\u67E5\u770B\u5171\u4EAB\u6240\u6709\u4EBA\u7684\u6587\u4EF6\u3002")))]),a("li",[t._v(t._s(t.$L("\u7981\u6B62\u53D1\u8D77\u4F1A\u8BDD\u3002")))]),a("li",[t._v(t._s(t.$L("\u7981\u6B62\u521B\u5EFA\u7FA4\u804A\u3002")))]),a("li",[t._v(t._s(t.$L("\u7981\u6B62\u62E8\u6253\u7535\u8BDD\u3002")))])])])],1):t._e(),a("FormItem",{attrs:{label:t.$L("\u767B\u5F55\u9A8C\u8BC1\u7801"),prop:"loginCode"}},[a("RadioGroup",{model:{value:t.formDatum.login_code,callback:function(e){t.$set(t.formDatum,"login_code",e)},expression:"formDatum.login_code"}},[a("Radio",{attrs:{label:"auto"}},[t._v(t._s(t.$L("\u81EA\u52A8")))]),a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.login_code=="auto"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\uFF1A\u5BC6\u7801\u8F93\u5165\u9519\u8BEF\u540E\u5FC5\u987B\u6DFB\u52A0\u9A8C\u8BC1\u7801\u3002")))]):t.formDatum.login_code=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\uFF1A\u6BCF\u6B21\u767B\u5F55\u90FD\u9700\u8981\u56FE\u5F62\u9A8C\u8BC1\u7801\u3002")))]):t.formDatum.login_code=="close"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5173\u95ED\uFF1A\u4E0D\u9700\u8981\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u5BC6\u7801\u7B56\u7565"),prop:"passwordPolicy"}},[a("RadioGroup",{model:{value:t.formDatum.password_policy,callback:function(e){t.$set(t.formDatum,"password_policy",e)},expression:"formDatum.password_policy"}},[a("Radio",{attrs:{label:"simple"}},[t._v(t._s(t.$L("\u7B80\u5355")))]),a("Radio",{attrs:{label:"complex"}},[t._v(t._s(t.$L("\u590D\u6742")))])],1),t.formDatum.password_policy=="simple"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7B80\u5355\uFF1A\u5927\u4E8E\u6216\u7B49\u4E8E6\u4E2A\u5B57\u7B26\u3002")))]):t.formDatum.password_policy=="complex"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u590D\u6742\uFF1A\u5927\u4E8E\u6216\u7B49\u4E8E6\u4E2A\u5B57\u7B26\uFF0C\u5305\u542B\u6570\u5B57\u3001\u5B57\u6BCD\u5927\u5C0F\u5199\u6216\u8005\u7279\u6B8A\u5B57\u7B26\u3002")))]):t._e()],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u9879\u76EE\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u9080\u8BF7\u9879\u76EE"),prop:"projectInvite"}},[a("RadioGroup",{model:{value:t.formDatum.project_invite,callback:function(e){t.$set(t.formDatum,"project_invite",e)},expression:"formDatum.project_invite"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.project_invite=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\uFF1A\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u751F\u6210\u94FE\u63A5\u9080\u8BF7\u6210\u5458\u52A0\u5165\u9879\u76EE\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u81EA\u52A8\u5F52\u6863\u4EFB\u52A1"),prop:"autoArchived"}},[a("RadioGroup",{attrs:{value:t.formDatum.auto_archived},on:{"on-change":t.formArchived}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EFB\u52A1\u5B8C\u6210\u540E\u81EA\u52A8\u5F52\u6863\u3002")))]),t.formDatum.auto_archived=="open"?a("ETooltip",{attrs:{placement:"right",disabled:t.$isEEUiApp||t.windowTouch}},[a("div",{staticClass:"setting-auto-day"},[a("Input",{attrs:{type:"number"},model:{value:t.formDatum.archived_day,callback:function(e){t.$set(t.formDatum,"archived_day",e)},expression:"formDatum.archived_day"}},[a("span",{attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.$L("\u5929")))])])],1),a("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("\u4EFB\u52A1\u5B8C\u6210 (*) \u5929\u540E\u81EA\u52A8\u5F52\u6863\u3002",t.formDatum.archived_day)))])]):t._e()],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u4EFB\u52A1\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u53EF\u89C1\u6027\u9009\u9879"),prop:"taskVisible"}},[a("RadioGroup",{model:{value:t.formDatum.task_visible,callback:function(e){t.$set(t.formDatum,"task_visible",e)},expression:"formDatum.task_visible"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u4FDD\u6301")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u81EA\u52A8")))])],1),t.formDatum.task_visible=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4FDD\u6301\uFF1A\u4EFB\u52A1\u8BE6\u60C5\u9875\u53EF\u89C1\u6027\u9009\u9879\u4FDD\u6301\u663E\u793A\u3002")))]):t.formDatum.task_visible=="close"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\uFF1A\u9ED8\u8BA4\u503C\u60C5\u51B5\u4E0B\u663E\u793A\u5728\u5408\u5E76\u9879\u76EE\uFF0C\u8BBE\u7F6E\u65F6\u4FDD\u6301\u663E\u793A\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u4EFB\u52A1\u9ED8\u8BA4\u65F6\u95F4"),prop:"taskDefaultTime"}},[a("TimePicker",{attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u65F6\u95F4"),transfer:""},model:{value:t.formDatum.task_default_time,callback:function(e){t.$set(t.formDatum,"task_default_time",e)},expression:"formDatum.task_default_time"}}),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6DFB\u52A0\u4EFB\u52A1\u8BA1\u5212\u65F6\u95F4\u9ED8\u8BA4\u65F6\u5206\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u672A\u9886\u4EFB\u52A1\u63D0\u9192"),prop:"autoArchived"}},[a("RadioGroup",{attrs:{value:t.formDatum.unclaimed_task_reminder},on:{"on-change":t.formTaskReminder}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u542F\u540E\u6BCF\u5929\u6309\u8BBE\u5B9A\u7684\u63D0\u9192\u65F6\u95F4\u5728\u9879\u76EE\u7FA4\u804A\u4E2D\u53D1\u9001\u672A\u9886\u53D6\u4EFB\u52A1\u901A\u77E5\u3002")))]),t.formDatum.unclaimed_task_reminder=="open"?a("TimePicker",{attrs:{format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u63D0\u9192\u65F6\u95F4"),transfer:""},model:{value:t.formDatum.unclaimed_task_reminder_time,callback:function(e){t.$set(t.formDatum,"unclaimed_task_reminder_time",e)},expression:"formDatum.unclaimed_task_reminder_time"}}):t._e()],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u6D88\u606F\u76F8\u5173")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u5168\u5458\u7FA4\u7EC4\u7981\u8A00"),prop:"allGroupMute"}},[a("RadioGroup",{model:{value:t.formDatum.all_group_mute,callback:function(e){t.$set(t.formDatum,"all_group_mute",e)},expression:"formDatum.all_group_mute"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u653E")))]),a("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("\u6210\u5458\u7981\u8A00")))]),a("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("\u5168\u90E8\u7981\u8A00")))])],1),t.formDatum.all_group_mute=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5F00\u653E\uFF1A\u6240\u6709\u4EBA\u90FD\u53EF\u4EE5\u53D1\u8A00\u3002")))]):t.formDatum.all_group_mute=="user"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6210\u5458\u7981\u8A00\uFF1A\u4EC5\u7BA1\u7406\u5458\u53EF\u4EE5\u53D1\u8A00\u3002")))]):t.formDatum.all_group_mute=="all"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5168\u90E8\u7981\u8A00\uFF1A\u6240\u6709\u4EBA\u90FD\u7981\u6B62\u53D1\u8A00\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u81EA\u52A8\u8FDB\u5165\u5168\u5458\u7FA4"),prop:"allGroupAutoin"}},[a("RadioGroup",{model:{value:t.formDatum.all_group_autoin,callback:function(e){t.$set(t.formDatum,"all_group_autoin",e)},expression:"formDatum.all_group_autoin"}},[a("Radio",{attrs:{label:"yes"}},[t._v(t._s(t.$L("\u81EA\u52A8")))]),a("Radio",{attrs:{label:"no"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.all_group_autoin=="yes"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u81EA\u52A8\uFF1A\u6CE8\u518C\u6210\u529F\u540E\u81EA\u52A8\u8FDB\u5165\u5168\u5458\u7FA4\u3002")))]):t.formDatum.all_group_autoin=="no"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5173\u95ED\uFF1A\u5176\u4ED6\u6210\u5458\u901A\u8FC7@\u9080\u8BF7\u8FDB\u5165\u3002")))]):t._e()],1),a("FormItem",{attrs:{label:t.$L("\u804A\u5929\u8D44\u6599"),prop:"chatInformation"}},[a("RadioGroup",{model:{value:t.formDatum.chat_information,callback:function(e){t.$set(t.formDatum,"chat_information",e)},expression:"formDatum.chat_information"}},[a("Radio",{attrs:{label:"optional"}},[t._v(t._s(t.$L("\u53EF\u9009")))]),a("Radio",{attrs:{label:"required"}},[t._v(t._s(t.$L("\u5FC5\u586B")))])],1),t.formDatum.chat_information=="required"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5FC5\u586B\uFF1A\u53D1\u9001\u804A\u5929\u5185\u5BB9\u524D\u5FC5\u987B\u8BBE\u7F6E\u6635\u79F0\u3001\u7535\u8BDD\u3002")))]):a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5982\u679C\u5FC5\u586B\uFF0C\u53D1\u9001\u804A\u5929\u524D\u5FC5\u987B\u8BBE\u7F6E\u6635\u79F0\u3001\u7535\u8BDD\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u533F\u540D\u6D88\u606F"),prop:"anonMessage"}},[a("RadioGroup",{model:{value:t.formDatum.anon_message,callback:function(e){t.$set(t.formDatum,"anon_message",e)},expression:"formDatum.anon_message"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),t.formDatum.anon_message=="open"?a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5141\u8BB8\u533F\u540D\u53D1\u9001\u6D88\u606F\u7ED9\u5176\u4ED6\u6210\u5458\u3002")))]):a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u7981\u6B62\u533F\u540D\u53D1\u9001\u6D88\u606F\u3002")))])],1)],1)]),a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u5176\u4ED6\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u56FE\u7247\u4F18\u5316"),prop:"image_compress"}},[a("RadioGroup",{model:{value:t.formDatum.image_compress,callback:function(e){t.$set(t.formDatum,"image_compress",e)},expression:"formDatum.image_compress"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6570\u7801\u76F8\u673A4M\u7684\u56FE\u7247\uFF0C\u4F18\u5316\u540E\u4EC5\u6709700KB\u5DE6\u53F3\uFF0C\u800C\u4E14\u8089\u773C\u57FA\u672C\u770B\u4E0D\u51FA\u533A\u522B\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u4FDD\u5B58\u7F51\u7EDC\u56FE\u7247"),prop:"image_save_local"}},[a("RadioGroup",{model:{value:t.formDatum.image_save_local,callback:function(e){t.$set(t.formDatum,"image_save_local",e)},expression:"formDatum.image_save_local"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u662F\u5426\u5C06\u6D88\u606F\u4E2D\u7684\u7F51\u7EDC\u56FE\u7247\u4FDD\u5B58\u5230\u672C\u5730\u670D\u52A1\u5668\u3002")))])],1),a("FormItem",{attrs:{label:t.$L("\u6587\u4EF6\u4E0A\u4F20\u9650\u5236"),prop:"fileUploadLimit"}},[a("div",{staticStyle:{width:"192px"}},[a("Input",{attrs:{type:"number",number:"",placeholder:t.$L("\u9ED8\u8BA4\u4E0D\u9650\u5236")},scopedSlots:t._u([{key:"append",fn:function(){return[a("span",[t._v("MB")])]},proxy:!0}]),model:{value:t.formDatum.file_upload_limit,callback:function(e){t.$set(t.formDatum,"file_upload_limit",e)},expression:"formDatum.file_upload_limit"}})],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u5305\u542B\u6D88\u606F\u53D1\u9001\u7684\u6587\u4EF6")))])])],1)]),t.$A.isDooServer()?a("div",{staticClass:"block-setting-box"},[a("h3",[t._v(t._s(t.$L("\u7279\u6B8A\u8BBE\u7F6E")))]),a("div",{staticClass:"form-box"},[a("FormItem",{attrs:{label:t.$L("\u662F\u5426\u542F\u52A8\u9996\u9875"),prop:"startHome"}},[a("RadioGroup",{model:{value:t.formDatum.start_home,callback:function(e){t.$set(t.formDatum,"start_home",e)},expression:"formDatum.start_home"}},[a("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("\u5F00\u542F")))]),a("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("\u5173\u95ED")))])],1),a("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EC5\u652F\u6301\u7F51\u9875\u7248\u3002")))])],1)],1)]):t._e()]),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},d=[];const p={name:"SystemSetting",data(){return{loadIng:0,formDatum:{}}},mounted(){this.systemSetting()},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formDatum=$A.cloneJSON(this.formDatum_bak)},formArchived(t){this.formDatum={...this.formDatum,auto_archived:t}},formTaskReminder(t){this.formDatum={...this.formDatum,unclaimed_task_reminder:t}},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/setting?type="+(t?"save":"all"),data:this.formDatum}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.formDatum=s,this.formDatum_bak=$A.cloneJSON(this.formDatum)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},l={};var f=i(p,_,d,!1,v,null,null,null);function v(t){for(let s in l)this[s]=l[s]}var $=function(){return f.exports}(),b=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formDatum",attrs:{"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("Row",{staticClass:"setting-color color-label-box"},[a("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u540D\u79F0")))]),a("Col",{attrs:{span:"4"}},[a("ETooltip",{attrs:{content:t.$L("\u6570\u503C\u8D8A\u5C0F\u7EA7\u522B\u8D8A\u9AD8"),"max-width":"auto",placement:"top",transfer:""}},[a("div",[a("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}}),t._v(" "+t._s(t.$L("\u7EA7\u522B")))],1)])],1),a("Col",{attrs:{span:"4"}},[a("ETooltip",{attrs:{content:t.$L("\u4EFB\u52A1\u5B8C\u6210\u65F6\u95F4"),"max-width":"auto",placement:"top",transfer:""}},[a("div",[a("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}}),t._v(" "+t._s(t.$L("\u5929\u6570")))],1)])],1),a("Col",{attrs:{span:"4"}},[t._v(t._s(t.$L("\u989C\u8272")))])],1),t._l(t.formDatum,function(e,r){return a("Row",{key:r,staticClass:"setting-color"},[a("Col",{attrs:{span:"12"}},[a("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u540D\u79F0"),clearable:""},on:{"on-clear":function(o){return t.delDatum(r)}},model:{value:e.name,callback:function(o){t.$set(e,"name",o)},expression:"item.name"}})],1),a("Col",{attrs:{span:"4"}},[a("Input",{attrs:{type:"number"},model:{value:e.priority,callback:function(o){t.$set(e,"priority",o)},expression:"item.priority"}})],1),a("Col",{attrs:{span:"4"}},[a("Input",{attrs:{type:"number"},model:{value:e.days,callback:function(o){t.$set(e,"days",o)},expression:"item.days"}})],1),a("Col",{attrs:{span:"4"}},[a("ColorPicker",{attrs:{recommend:"",transfer:""},model:{value:e.color,callback:function(o){t.$set(e,"color",o)},expression:"item.color"}})],1)],1)}),a("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u4F18\u5148\u7EA7")))])],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},D=[];const h={name:"SystemTaskPriority",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",priority:1,days:1,color:"#84C56A"}}},mounted(){this.systemSetting()},computed:{...c(["taskPriority"])},watch:{taskPriority:{handler(t){this.formDatum=$A.cloneJSON(t),this.formDatum.length===0&&this.addDatum()},immediate:!0}},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formDatum=$A.cloneJSON(this.taskPriority)},addDatum(){this.formDatum.push($A.cloneJSON(this.nullDatum))},delDatum(t){this.formDatum.splice(t,1),this.formDatum.length===0&&this.addDatum()},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/priority?type="+(t?"save":"get"),method:"post",data:{list:this.formDatum}}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.state.taskPriority=$A.cloneJSON(s)}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},m={};var g=i(h,b,D,!1,L,null,null,null);function L(t){for(let s in m)this[s]=m[s]}var y=function(){return g.exports}(),C=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-component-item"},[a("Form",{ref:"formDatum",attrs:{"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("Row",{staticClass:"setting-template"},[a("Col",{attrs:{span:"8"}},[t._v(t._s(t.$L("\u540D\u79F0")))]),a("Col",{attrs:{span:"16"}},[t._v(t._s(t.$L("\u9879\u76EE\u6A21\u677F")))])],1),t._l(t.formDatum,function(e,r){return a("Row",{key:r,staticClass:"setting-template"},[a("Col",{attrs:{span:"8"}},[a("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u540D\u79F0"),clearable:""},on:{"on-clear":function(o){return t.delDatum(r)}},model:{value:e.name,callback:function(o){t.$set(e,"name",o)},expression:"item.name"}})],1),a("Col",{attrs:{span:"16"}},[a("TagInput",{model:{value:e.columns,callback:function(o){t.$set(e,"columns",o)},expression:"item.columns"}})],1)],1)}),a("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u6A21\u677F")))])],2),a("div",{staticClass:"setting-footer"},[a("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),a("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},k=[];const x={name:"SystemColumnTemplate",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",columns:""}}},mounted(){this.systemSetting()},computed:{...c(["columnTemplate"])},watch:{columnTemplate:{handler(t){this.formDatum=$A.cloneJSON(t),this.formDatum.length===0&&this.addDatum()},immediate:!0}},methods:{submitForm(){this.$refs.formDatum.validate(t=>{t&&this.systemSetting(!0)})},resetForm(){this.formDatum=$A.cloneJSON(this.columnTemplate)},addDatum(){this.formDatum.push($A.cloneJSON(this.nullDatum))},delDatum(t){this.formDatum.splice(t,1),this.formDatum.length===0&&this.addDatum()},systemSetting(t){this.loadIng++,this.$store.dispatch("call",{url:"system/column/template?type="+(t?"save":"get"),method:"post",data:{list:this.formDatum}}).then(({data:s})=>{t&&$A.messageSuccess("\u4FEE\u6539\u6210\u529F"),this.$store.state.columnTemplate=$A.cloneJSON(s).map(a=>($A.isArray(a.columns)&&(a.columns=a.columns.join(",")),a))}).catch(({msg:s})=>{t&&$A.modalError(s)}).finally(s=>{this.loadIng--})}}},n={};var R=i(x,C,k,!1,S,null,null,null);function S(t){for(let s in n)this[s]=n[s]}var I=function(){return R.exports}(),F=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"setting-item submit"},[a("Tabs",{model:{value:t.tabAction,callback:function(e){t.tabAction=e},expression:"tabAction"}},[a("TabPane",{attrs:{label:t.$L("\u7CFB\u7EDF\u8BBE\u7F6E"),name:"setting"}},[a("SystemSetting")],1),a("TabPane",{attrs:{label:t.$L("\u4EFB\u52A1\u4F18\u5148\u7EA7"),name:"taskPriority"}},[a("SystemTaskPriority")],1),a("TabPane",{attrs:{label:t.$L("\u9879\u76EE\u6A21\u677F"),name:"columnTemplate"}},[a("SystemColumnTemplate")],1)],1)],1)},A=[];const T={components:{SystemColumnTemplate:I,SystemTaskPriority:y,SystemSetting:$},data(){return{tabAction:"setting"}}},u={};var w=i(T,F,A,!1,G,null,null,null);function G(t){for(let s in u)this[s]=u[s]}var O=function(){return w.exports}();export{O as default}; diff --git a/public/js/build/task.240d6dc5.js b/public/js/build/task.bf95724d.js similarity index 81% rename from public/js/build/task.240d6dc5.js rename to public/js/build/task.bf95724d.js index ff21d4945..cfe8ed19b 100644 --- a/public/js/build/task.240d6dc5.js +++ b/public/js/build/task.bf95724d.js @@ -1 +1 @@ -import{b as n}from"./TaskDetail.3e00ee35.js";import{m as r,n as o}from"./app.6c8b31b1.js";import"./ProjectLog.d63fd8b4.js";import"./DialogWrapper.5fcf71c2.js";import"./longpress.43ca7fd9.js";import"./index.31386d23.js";import"./UserSelect.d62f565b.js";import"./ImgUpload.0e64a5a8.js";import"./details.6749696e.js";import"./tip.517649f6.js";import"./TaskMenu.a0d74239.js";import"./TEditor.5f656e41.js";var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"electron-task"},[s("PageTitle",{attrs:{title:t.taskInfo.name}}),t.loadIng>0?s("Loading"):s("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskInfo.id,"open-task":t.taskInfo,"can-update-blur":t.canUpdateBlur}})],1)},c=[];const d={components:{TaskDetail:n},data(){return{loadIng:0,canUpdateBlur:!0}},mounted(){document.addEventListener("keydown",this.shortcutEvent),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(this.$refs.taskDetail.checkUpdate())return this.canUpdateBlur=!1,$A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u771F\u7684\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")},onCancel:()=>{this.$refs.taskDetail.checkUpdate(!1),this.canUpdateBlur=!0}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.shortcutEvent)},computed:{...r(["cacheTasks"]),taskId(){const{taskId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},taskInfo(){return this.cacheTasks.find(({id:t})=>t===this.taskId)||{}}},watch:{taskId:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){this.taskId<=0||(this.loadIng++,this.$store.dispatch("getTaskOne",{task_id:this.taskId,archived:"all"}).then(()=>{this.$store.dispatch("getTaskContent",this.taskId),this.$store.dispatch("getTaskFiles",this.taskId),this.$store.dispatch("getTaskForParent",this.taskId).catch(()=>{}),this.$store.dispatch("getTaskPriority").catch(()=>{})}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{this.$Electron&&window.close()}})}).finally(t=>{this.loadIng--}))},shortcutEvent(t){(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.preventDefault(),this.$refs.taskDetail.checkUpdate(!0))}}},a={};var l=o(d,i,c,!1,h,"7af6ba13",null,null);function h(t){for(let e in a)this[e]=a[e]}var E=function(){return l.exports}();export{E as default}; +import{b as n}from"./TaskDetail.3379e7b2.js";import{m as r,n as o}from"./app.6910ca56.js";import"./ProjectLog.55720685.js";import"./DialogWrapper.54a1354f.js";import"./longpress.43ca7fd9.js";import"./index.8984a77c.js";import"./UserSelect.1938cd94.js";import"./ImgUpload.8863e78d.js";import"./details.97854344.js";import"./tip.6872e3c6.js";import"./TaskMenu.0454bb90.js";import"./TEditor.8daabc3e.js";var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"electron-task"},[s("PageTitle",{attrs:{title:t.taskInfo.name}}),t.loadIng>0?s("Loading"):s("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskInfo.id,"open-task":t.taskInfo,"can-update-blur":t.canUpdateBlur}})],1)},c=[];const d={components:{TaskDetail:n},data(){return{loadIng:0,canUpdateBlur:!0}},mounted(){document.addEventListener("keydown",this.shortcutEvent),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(this.$refs.taskDetail.checkUpdate())return this.canUpdateBlur=!1,$A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u771F\u7684\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")},onCancel:()=>{this.$refs.taskDetail.checkUpdate(!1),this.canUpdateBlur=!0}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.shortcutEvent)},computed:{...r(["cacheTasks"]),taskId(){const{taskId:t}=this.$route.params;return parseInt(/^\d+$/.test(t)?t:0)},taskInfo(){return this.cacheTasks.find(({id:t})=>t===this.taskId)||{}}},watch:{taskId:{handler(){this.getInfo()},immediate:!0}},methods:{getInfo(){this.taskId<=0||(this.loadIng++,this.$store.dispatch("getTaskOne",{task_id:this.taskId,archived:"all"}).then(()=>{this.$store.dispatch("getTaskContent",this.taskId),this.$store.dispatch("getTaskFiles",this.taskId),this.$store.dispatch("getTaskForParent",this.taskId).catch(()=>{}),this.$store.dispatch("getTaskPriority").catch(()=>{})}).catch(({msg:t})=>{$A.modalError({content:t,onOk:()=>{this.$Electron&&window.close()}})}).finally(t=>{this.loadIng--}))},shortcutEvent(t){(t.metaKey||t.ctrlKey)&&t.keyCode===83&&(t.preventDefault(),this.$refs.taskDetail.checkUpdate(!0))}}},a={};var l=o(d,i,c,!1,h,"7af6ba13",null,null);function h(t){for(let e in a)this[e]=a[e]}var E=function(){return l.exports}();export{E as default}; diff --git a/public/js/build/theme.bbb22618.js b/public/js/build/theme.e86b5680.js similarity index 96% rename from public/js/build/theme.bbb22618.js rename to public/js/build/theme.e86b5680.js index 1c158b929..b2e675b1f 100644 --- a/public/js/build/theme.bbb22618.js +++ b/public/js/build/theme.e86b5680.js @@ -1 +1 @@ -import{m as i,n}from"./app.6c8b31b1.js";var m=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"setting-item submit"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(o){o.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u4E3B\u9898"),prop:"theme"}},[e("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u4E3B\u9898")},model:{value:t.formData.theme,callback:function(o){t.$set(t.formData,"theme",o)},expression:"formData.theme"}},t._l(t.themeList,function(o,s){return e("Option",{key:s,attrs:{value:o.value}},[t._v(t._s(t.$L(o.name)))])}),1)],1)],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const c={data(){return{loadIng:0,formData:{theme:""},ruleData:{}}},mounted(){this.initData()},computed:{...i(["themeMode","themeList","formLabelPosition","formLabelWidth"])},methods:{initData(){this.$set(this.formData,"theme",this.themeMode),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&this.$store.dispatch("setTheme",this.formData.theme).then(a=>{a&&$A.messageSuccess("\u4FDD\u5B58\u6210\u529F")})})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},r={};var f=n(c,m,l,!1,h,null,null,null);function h(t){for(let a in r)this[a]=r[a]}var _=function(){return f.exports}();export{_ as default}; +import{m as i,n}from"./app.6910ca56.js";var m=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"setting-item submit"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,labelPosition:t.formLabelPosition,labelWidth:t.formLabelWidth},nativeOn:{submit:function(o){o.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u9009\u62E9\u4E3B\u9898"),prop:"theme"}},[e("Select",{attrs:{placeholder:t.$L("\u9009\u9879\u4E3B\u9898")},model:{value:t.formData.theme,callback:function(o){t.$set(t.formData,"theme",o)},expression:"formData.theme"}},t._l(t.themeList,function(o,s){return e("Option",{key:s,attrs:{value:o.value}},[t._v(t._s(t.$L(o.name)))])}),1)],1)],1),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("\u63D0\u4EA4")))]),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("\u91CD\u7F6E")))])],1)],1)},l=[];const c={data(){return{loadIng:0,formData:{theme:""},ruleData:{}}},mounted(){this.initData()},computed:{...i(["themeMode","themeList","formLabelPosition","formLabelWidth"])},methods:{initData(){this.$set(this.formData,"theme",this.themeMode),this.formData_bak=$A.cloneJSON(this.formData)},submitForm(){this.$refs.formData.validate(t=>{t&&this.$store.dispatch("setTheme",this.formData.theme).then(a=>{a&&$A.messageSuccess("\u4FDD\u5B58\u6210\u529F")})})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},r={};var f=n(c,m,l,!1,h,null,null,null);function h(t){for(let a in r)this[a]=r[a]}var _=function(){return f.exports}();export{_ as default}; diff --git a/public/js/build/tip.517649f6.js b/public/js/build/tip.6872e3c6.js similarity index 98% rename from public/js/build/tip.517649f6.js rename to public/js/build/tip.6872e3c6.js index 9e041f494..d57b92c14 100644 --- a/public/js/build/tip.517649f6.js +++ b/public/js/build/tip.6872e3c6.js @@ -1 +1 @@ -import{n as l,e as u}from"./app.6c8b31b1.js";var d=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ETooltip",{attrs:{"open-delay":e.openDelay,disabled:e.$isEEUiApp||e.windowTouch||e.tooltipDisabled||e.isBot,placement:e.tooltipPlacement}},[e.user?t("div",{staticClass:"common-avatar-transfer",attrs:{slot:"content"},slot:"content"},[e._t("default"),t("p",[e._v(e._s(e.$L("\u6635\u79F0"))+": "+e._s(e.user.nickname)),e.user.delete_at?t("em",{staticClass:"deleted no-dark-content"},[e._v(e._s(e.$L("\u5DF2\u5220\u9664")))]):e.user.disable_at?t("em",{staticClass:"disabled no-dark-content"},[e._v(e._s(e.$L("\u5DF2\u79BB\u804C")))]):e._e()]),t("p",{staticClass:"department-name",attrs:{title:e.user.department_name||""}},[e._v(e._s(e.$L("\u90E8\u95E8"))+": "+e._s(e.user.department_name||"-"))]),t("p",[e._v(e._s(e.$L("\u804C\u4F4D/\u804C\u79F0"))+": "+e._s(e.user.profession||"-"))]),e.user.delete_at?t("p",[t("strong",[e._v(e._s(e.$L("\u5220\u9664\u65F6\u95F4"))+": "+e._s(e.user.delete_at))])]):e.user.disable_at?t("p",[t("strong",[e._v(e._s(e.$L("\u79BB\u804C\u65F6\u95F4"))+": "+e._s(e.user.disable_at))])]):e._e(),e._t("end"),e.showMenu?t("div",{staticClass:"avatar-icons"},[t("Icon",{attrs:{type:"ios-chatbubbles"},on:{click:e.onOpenDialog}})],1):e._e()],2):e._e(),t("div",[t("UserAvatar",{ref:"avatar",attrs:{userid:e.userid,size:e.size,showIcon:e.showIcon,showName:e.showName,nameText:e.nameText,borderWitdh:e.borderWitdh,borderColor:e.borderColor,clickOpenDialog:e.clickOpenDialog,userResult:e.onUserResult}})],1)])},c=[];const _={name:"UserAvatarTip",mixins:[u],props:{tooltipDisabled:{type:Boolean,default:!1},showIconMenu:{type:Boolean,default:!1},tooltipPlacement:{type:String,default:"bottom"},openDelay:{type:Number,default:600}},data(){return{user:null}},mounted(){this.$listeners["update:online"]&&(this.$watch("userid",()=>{this.updateOnline()}),this.$watch("user.online",()=>{this.updateOnline()}),this.updateOnline())},computed:{showMenu(){return this.$store.state.userId==this.userid||this.user.delete_at||this.user.disable_at?!1:this.showIconMenu},isBot(){return!!(this.user&&this.user.bot)}},methods:{onOpenDialog(){this.$refs.avatar.openDialog()},onUserResult(e){typeof this.userResult=="function"&&this.userResult(e),this.user=e},updateOnline(){if(!!this.user)if(this.user.online||this.$store.state.userId===this.userid)this.$emit("update:online",!0);else{const e=$A.Time(),s=$A.Time(this.user.line_at),t=e-s;let a="\u6700\u540E\u5728\u7EBF\u4E8E\u5F88\u4E45\u4EE5\u524D";if(t<60)a="\u6700\u540E\u5728\u7EBF\u4E8E\u521A\u521A";else if(t<3600)a=`\u6700\u540E\u5728\u7EBF\u4E8E ${Math.floor(t/60)} \u5206\u949F\u524D`;else if(t<3600*6)a=`\u6700\u540E\u5728\u7EBF\u4E8E ${Math.floor(t/3600)} \u5C0F\u65F6\u524D`;else{const r=$A.formatDate("Y-m-d",e),n=$A.formatDate("Y-m-d",s),i=$A.formatDate("H:i",s);r===n?a=`\u6700\u540E\u5728\u7EBF\u4E8E\u4ECA\u5929 ${i}`:$A.formatDate("Y-m-d",e-86400)===n?a=`\u6700\u540E\u5728\u7EBF\u4E8E\u6628\u5929 ${i}`:t<3600*24*365&&(a=`\u6700\u540E\u5728\u7EBF\u4E8E ${n}`)}this.$emit("update:online",this.$L(a))}}}},o={};var p=l(_,d,c,!1,m,null,null,null);function m(e){for(let s in o)this[s]=o[s]}var f=function(){return p.exports}();export{f as U}; +import{n as l,e as u}from"./app.6910ca56.js";var d=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ETooltip",{attrs:{"open-delay":e.openDelay,disabled:e.$isEEUiApp||e.windowTouch||e.tooltipDisabled||e.isBot,placement:e.tooltipPlacement}},[e.user?t("div",{staticClass:"common-avatar-transfer",attrs:{slot:"content"},slot:"content"},[e._t("default"),t("p",[e._v(e._s(e.$L("\u6635\u79F0"))+": "+e._s(e.user.nickname)),e.user.delete_at?t("em",{staticClass:"deleted no-dark-content"},[e._v(e._s(e.$L("\u5DF2\u5220\u9664")))]):e.user.disable_at?t("em",{staticClass:"disabled no-dark-content"},[e._v(e._s(e.$L("\u5DF2\u79BB\u804C")))]):e._e()]),t("p",{staticClass:"department-name",attrs:{title:e.user.department_name||""}},[e._v(e._s(e.$L("\u90E8\u95E8"))+": "+e._s(e.user.department_name||"-"))]),t("p",[e._v(e._s(e.$L("\u804C\u4F4D/\u804C\u79F0"))+": "+e._s(e.user.profession||"-"))]),e.user.delete_at?t("p",[t("strong",[e._v(e._s(e.$L("\u5220\u9664\u65F6\u95F4"))+": "+e._s(e.user.delete_at))])]):e.user.disable_at?t("p",[t("strong",[e._v(e._s(e.$L("\u79BB\u804C\u65F6\u95F4"))+": "+e._s(e.user.disable_at))])]):e._e(),e._t("end"),e.showMenu?t("div",{staticClass:"avatar-icons"},[t("Icon",{attrs:{type:"ios-chatbubbles"},on:{click:e.onOpenDialog}})],1):e._e()],2):e._e(),t("div",[t("UserAvatar",{ref:"avatar",attrs:{userid:e.userid,size:e.size,showIcon:e.showIcon,showName:e.showName,nameText:e.nameText,borderWitdh:e.borderWitdh,borderColor:e.borderColor,clickOpenDialog:e.clickOpenDialog,userResult:e.onUserResult}})],1)])},c=[];const _={name:"UserAvatarTip",mixins:[u],props:{tooltipDisabled:{type:Boolean,default:!1},showIconMenu:{type:Boolean,default:!1},tooltipPlacement:{type:String,default:"bottom"},openDelay:{type:Number,default:600}},data(){return{user:null}},mounted(){this.$listeners["update:online"]&&(this.$watch("userid",()=>{this.updateOnline()}),this.$watch("user.online",()=>{this.updateOnline()}),this.updateOnline())},computed:{showMenu(){return this.$store.state.userId==this.userid||this.user.delete_at||this.user.disable_at?!1:this.showIconMenu},isBot(){return!!(this.user&&this.user.bot)}},methods:{onOpenDialog(){this.$refs.avatar.openDialog()},onUserResult(e){typeof this.userResult=="function"&&this.userResult(e),this.user=e},updateOnline(){if(!!this.user)if(this.user.online||this.$store.state.userId===this.userid)this.$emit("update:online",!0);else{const e=$A.Time(),s=$A.Time(this.user.line_at),t=e-s;let a="\u6700\u540E\u5728\u7EBF\u4E8E\u5F88\u4E45\u4EE5\u524D";if(t<60)a="\u6700\u540E\u5728\u7EBF\u4E8E\u521A\u521A";else if(t<3600)a=`\u6700\u540E\u5728\u7EBF\u4E8E ${Math.floor(t/60)} \u5206\u949F\u524D`;else if(t<3600*6)a=`\u6700\u540E\u5728\u7EBF\u4E8E ${Math.floor(t/3600)} \u5C0F\u65F6\u524D`;else{const r=$A.formatDate("Y-m-d",e),n=$A.formatDate("Y-m-d",s),i=$A.formatDate("H:i",s);r===n?a=`\u6700\u540E\u5728\u7EBF\u4E8E\u4ECA\u5929 ${i}`:$A.formatDate("Y-m-d",e-86400)===n?a=`\u6700\u540E\u5728\u7EBF\u4E8E\u6628\u5929 ${i}`:t<3600*24*365&&(a=`\u6700\u540E\u5728\u7EBF\u4E8E ${n}`)}this.$emit("update:online",this.$L(a))}}}},o={};var p=l(_,d,c,!1,m,null,null,null);function m(e){for(let s in o)this[s]=o[s]}var f=function(){return p.exports}();export{f as U}; diff --git a/public/js/build/token.94f56172.js b/public/js/build/token.71c3e093.js similarity index 91% rename from public/js/build/token.94f56172.js rename to public/js/build/token.71c3e093.js index ab9a56ece..014d24611 100644 --- a/public/js/build/token.94f56172.js +++ b/public/js/build/token.71c3e093.js @@ -1 +1 @@ -import{n}from"./app.6c8b31b1.js";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"token-transfer"},[o("Loading")],1)},s=[];const i={mounted(){this.goNext1()},methods:{goNext1(){const e=$A.urlParameterAll();e.token&&this.$store.dispatch("call",{url:"users/info",header:{token:e.token}}).then(t=>{this.$store.dispatch("saveUserInfo",t.data),this.goNext2()}).catch(t=>{this.goForward({name:"login"},!0)})},goNext2(){let e=decodeURIComponent($A.getObject(this.$route.query,"from"));e?window.location.replace(e):this.goForward({name:"manage-dashboard"},!0)}}},r={};var c=n(i,a,s,!1,l,"5df16c44",null,null);function l(e){for(let t in r)this[t]=r[t]}var d=function(){return c.exports}();export{d as default}; +import{n}from"./app.6910ca56.js";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"token-transfer"},[o("Loading")],1)},s=[];const i={mounted(){this.goNext1()},methods:{goNext1(){const e=$A.urlParameterAll();e.token&&this.$store.dispatch("call",{url:"users/info",header:{token:e.token}}).then(t=>{this.$store.dispatch("saveUserInfo",t.data),this.goNext2()}).catch(t=>{this.goForward({name:"login"},!0)})},goNext2(){let e=decodeURIComponent($A.getObject(this.$route.query,"from"));e?window.location.replace(e):this.goForward({name:"manage-dashboard"},!0)}}},r={};var c=n(i,a,s,!1,l,"5df16c44",null,null);function l(e){for(let t in r)this[t]=r[t]}var d=function(){return c.exports}();export{d as default}; diff --git a/public/js/build/validEmail.91adfa74.js b/public/js/build/validEmail.72ecc0d2.js similarity index 95% rename from public/js/build/validEmail.91adfa74.js rename to public/js/build/validEmail.72ecc0d2.js index ccf7f30a5..e4a106681 100644 --- a/public/js/build/validEmail.91adfa74.js +++ b/public/js/build/validEmail.72ecc0d2.js @@ -1 +1 @@ -import{n as i}from"./app.6c8b31b1.js";var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"valid-wrap"},[e("div",{staticClass:"valid-box"},[e("div",{staticClass:"valid-title"},[t._v(t._s(t.$L("\u9A8C\u8BC1\u90AE\u7BB1")))]),!t.success&&!t.error?e("Spin",{attrs:{size:"large"}}):t._e(),t.success?e("div",{staticClass:"validation-text"},[e("p",[t._v(t._s(t.$L("\u60A8\u7684\u90AE\u7BB1\u5DF2\u901A\u8FC7\u9A8C\u8BC1")))]),e("p",[t._v(t._s(t.$L("\u4ECA\u540E\u60A8\u53EF\u4EE5\u901A\u8FC7\u6B64\u90AE\u7BB1\u91CD\u7F6E\u60A8\u7684\u5E10\u53F7\u5BC6\u7801")))])]):t._e(),t.error?e("div",{staticClass:"validation-text"},[e("div",[t._v(t._s(t.errorText))])]):t._e(),t.success?e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",long:""},on:{click:t.userLogout}},[t._v(t._s(t.$L("\u8FD4\u56DE\u9996\u9875")))])],1):t._e()],1)])},o=[];const c={data(){return{success:!1,error:!1,errorText:this.$L("\u94FE\u63A5\u5DF2\u8FC7\u671F\uFF0C\u5DF2\u91CD\u65B0\u53D1\u9001")}},mounted(){this.verificationEmail()},methods:{verificationEmail(){this.$store.dispatch("call",{url:"users/email/verification",data:{code:this.$route.query.code}}).then(()=>{this.success=!0,this.error=!1}).catch(({data:t,msg:s})=>{t.code===2?this.goForward({name:"index",query:{action:"index"}},!0):(this.success=!1,this.error=!0,this.errorText=this.$L(s))})},userLogout(){this.$store.dispatch("logout",!1)}}},r={};var l=i(c,a,o,!1,n,"763444c4",null,null);function n(t){for(let s in r)this[s]=r[s]}var u=function(){return l.exports}();export{u as default}; +import{n as i}from"./app.6910ca56.js";var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"valid-wrap"},[e("div",{staticClass:"valid-box"},[e("div",{staticClass:"valid-title"},[t._v(t._s(t.$L("\u9A8C\u8BC1\u90AE\u7BB1")))]),!t.success&&!t.error?e("Spin",{attrs:{size:"large"}}):t._e(),t.success?e("div",{staticClass:"validation-text"},[e("p",[t._v(t._s(t.$L("\u60A8\u7684\u90AE\u7BB1\u5DF2\u901A\u8FC7\u9A8C\u8BC1")))]),e("p",[t._v(t._s(t.$L("\u4ECA\u540E\u60A8\u53EF\u4EE5\u901A\u8FC7\u6B64\u90AE\u7BB1\u91CD\u7F6E\u60A8\u7684\u5E10\u53F7\u5BC6\u7801")))])]):t._e(),t.error?e("div",{staticClass:"validation-text"},[e("div",[t._v(t._s(t.errorText))])]):t._e(),t.success?e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary",long:""},on:{click:t.userLogout}},[t._v(t._s(t.$L("\u8FD4\u56DE\u9996\u9875")))])],1):t._e()],1)])},o=[];const c={data(){return{success:!1,error:!1,errorText:this.$L("\u94FE\u63A5\u5DF2\u8FC7\u671F\uFF0C\u5DF2\u91CD\u65B0\u53D1\u9001")}},mounted(){this.verificationEmail()},methods:{verificationEmail(){this.$store.dispatch("call",{url:"users/email/verification",data:{code:this.$route.query.code}}).then(()=>{this.success=!0,this.error=!1}).catch(({data:t,msg:s})=>{t.code===2?this.goForward({name:"index",query:{action:"index"}},!0):(this.success=!1,this.error=!0,this.errorText=this.$L(s))})},userLogout(){this.$store.dispatch("logout",!1)}}},r={};var l=i(c,a,o,!1,n,"763444c4",null,null);function n(t){for(let s in r)this[s]=r[s]}var u=function(){return l.exports}();export{u as default}; diff --git a/public/js/build/view.332e3be1.js b/public/js/build/view.576fab2b.js similarity index 98% rename from public/js/build/view.332e3be1.js rename to public/js/build/view.576fab2b.js index a5b72634c..75f498497 100644 --- a/public/js/build/view.332e3be1.js +++ b/public/js/build/view.576fab2b.js @@ -1 +1 @@ -import{V as c,n as m}from"./app.6c8b31b1.js";typeof/./!="function"&&typeof Int8Array!="object"&&(c.prototype.$isServer||document.childNodes);const v=function(){return!c.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function d(e){let n=!1;return function(...t){n||(n=!0,window.requestAnimationFrame(s=>{e.apply(this,t),n=!1}))}}const h=c.prototype.$isServer,r=function(){return!h&&document.addEventListener?function(e,n,t){e&&n&&t&&e.addEventListener(n,t,!1)}:function(e,n,t){e&&n&&t&&e.attachEvent("on"+n,t)}}(),l=function(){return!h&&document.removeEventListener?function(e,n,t){e&&n&&e.removeEventListener(n,t,!1)}:function(e,n,t){e&&n&&e.detachEvent("on"+n,t)}}();var g=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{ref:"view",staticClass:"common-preview-image"},[t("div",{staticClass:"common-preview-view no-dark-content"},[e.isSingle?e._e():[t("div",{staticClass:"preview-view-prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[t("i",{staticClass:"taskfont"},[e._v("\uE72D")])]),t("div",{staticClass:"preview-view-next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[t("i",{staticClass:"taskfont"},[e._v("\uE733")])])],t("div",{staticClass:"preview-view-actions"},[t("div",{staticClass:"actions-inner"},[t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("zoomOut")}}},[e._v("\uE7A2")]),t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("zoomIn")}}},[e._v("\uE79F")]),t("i",{staticClass:"actions-divider"}),t("i",{staticClass:"taskfont",domProps:{innerHTML:e._s(e.mode.icon)},on:{click:e.toggleMode}}),t("i",{staticClass:"actions-divider"}),t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("anticlocelise")}}},[e._v("\uE7A7")]),t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("clocelise")}}},[e._v("\uE7A6")])])]),t("div",{staticClass:"preview-view-canvas"},e._l(e.urlList,function(s,o){return o===e.index?t("img",{key:o,ref:"img",refInFor:!0,staticClass:"preview-view-img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()}),0)],2)])},p=[];const a={CONTAIN:{name:"contain",icon:""},ORIGINAL:{name:"original",icon:""}},u=v()?"DOMMouseScroll":"mousewheel",_={props:{urlList:{type:Array,default:()=>[]},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!1},onSwitch:{type:Function,default:()=>{}}},data(){return{index:this.initialIndex,loading:!1,mode:a.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},mounted(){this.deviceSupportInstall(),this.$refs.view.focus()},beforeDestroy(){this.deviceSupportUninstall()},computed:{isSingle(){return this.urlList.length<=1},isFirst(){return this.index===0},isLast(){return this.index===this.urlList.length-1},currentImg(){let e=this.urlList[this.index];return $A.isJson(e)&&(e=e.src),$A.thumbRestore(e)},imgStyle(){const{scale:e,deg:n,offsetX:t,offsetY:s,enableTransition:o}=this.transform,i={transform:`scale(${e}) rotate(${n}deg)`,transition:o?"transform .3s":"","margin-left":`${t}px`,"margin-top":`${s}px`};return this.mode===a.CONTAIN&&(i.maxWidth=i.maxHeight="100%"),i}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},initialIndex(e){this.index=e},currentImg(){this.$nextTick(e=>{this.$refs.img[0].complete||(this.loading=!0)})}},methods:{deviceSupportInstall(){this._keyDownHandler=e=>{switch(e.stopPropagation(),e.keyCode){case 32:this.toggleMode();break;case 37:this.prev();break;case 38:this.handleActions("zoomIn");break;case 39:this.next();break;case 40:this.handleActions("zoomOut");break}},this._mouseWheelHandler=d(e=>{(e.wheelDelta?e.wheelDelta:-e.detail)>0?this.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):this.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),r(document,"keydown",this._keyDownHandler),r(document,u,this._mouseWheelHandler)},deviceSupportUninstall(){l(document,"keydown",this._keyDownHandler),l(document,u,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad(e){this.loading=!1},handleImgError(e){this.loading=!1,e.target.alt="\u52A0\u8F7D\u5931\u8D25"},handleMouseDown(e){if(this.loading||e.button!==0)return;const{offsetX:n,offsetY:t}=this.transform,s=e.pageX,o=e.pageY;this._dragHandler=d(i=>{this.transform.offsetX=n+i.pageX-s,this.transform.offsetY=t+i.pageY-o}),r(document,"mousemove",this._dragHandler),r(document,"mouseup",i=>{l(document,"mousemove",this._dragHandler)}),e.preventDefault()},reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode(){if(this.loading)return;const e=Object.keys(a),s=(Object.values(a).indexOf(this.mode)+1)%e.length;this.mode=a[e[s]],this.reset()},prev(){if(this.isFirst&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index-1+e)%e},next(){if(this.isLast&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index+1)%e},handleActions(e,n={}){if(this.loading)return;const{zoomRate:t,rotateDeg:s,enableTransition:o}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...n},{transform:i}=this;switch(e){case"zoomOut":i.scale>.2&&(i.scale=parseFloat((i.scale-t).toFixed(3)));break;case"zoomIn":i.scale=parseFloat((i.scale+t).toFixed(3));break;case"clocelise":i.deg+=s;break;case"anticlocelise":i.deg-=s;break}i.enableTransition=o}}},f={};var w=m(_,g,p,!1,x,"6e965392",null,null);function x(e){for(let n in f)this[n]=f[n]}var y=function(){return w.exports}();export{y as default}; +import{V as c,n as m}from"./app.6910ca56.js";typeof/./!="function"&&typeof Int8Array!="object"&&(c.prototype.$isServer||document.childNodes);const v=function(){return!c.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function d(e){let n=!1;return function(...t){n||(n=!0,window.requestAnimationFrame(s=>{e.apply(this,t),n=!1}))}}const h=c.prototype.$isServer,r=function(){return!h&&document.addEventListener?function(e,n,t){e&&n&&t&&e.addEventListener(n,t,!1)}:function(e,n,t){e&&n&&t&&e.attachEvent("on"+n,t)}}(),l=function(){return!h&&document.removeEventListener?function(e,n,t){e&&n&&e.removeEventListener(n,t,!1)}:function(e,n,t){e&&n&&e.detachEvent("on"+n,t)}}();var g=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{ref:"view",staticClass:"common-preview-image"},[t("div",{staticClass:"common-preview-view no-dark-content"},[e.isSingle?e._e():[t("div",{staticClass:"preview-view-prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[t("i",{staticClass:"taskfont"},[e._v("\uE72D")])]),t("div",{staticClass:"preview-view-next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[t("i",{staticClass:"taskfont"},[e._v("\uE733")])])],t("div",{staticClass:"preview-view-actions"},[t("div",{staticClass:"actions-inner"},[t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("zoomOut")}}},[e._v("\uE7A2")]),t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("zoomIn")}}},[e._v("\uE79F")]),t("i",{staticClass:"actions-divider"}),t("i",{staticClass:"taskfont",domProps:{innerHTML:e._s(e.mode.icon)},on:{click:e.toggleMode}}),t("i",{staticClass:"actions-divider"}),t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("anticlocelise")}}},[e._v("\uE7A7")]),t("i",{staticClass:"taskfont",on:{click:function(s){return e.handleActions("clocelise")}}},[e._v("\uE7A6")])])]),t("div",{staticClass:"preview-view-canvas"},e._l(e.urlList,function(s,o){return o===e.index?t("img",{key:o,ref:"img",refInFor:!0,staticClass:"preview-view-img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()}),0)],2)])},p=[];const a={CONTAIN:{name:"contain",icon:""},ORIGINAL:{name:"original",icon:""}},u=v()?"DOMMouseScroll":"mousewheel",_={props:{urlList:{type:Array,default:()=>[]},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!1},onSwitch:{type:Function,default:()=>{}}},data(){return{index:this.initialIndex,loading:!1,mode:a.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},mounted(){this.deviceSupportInstall(),this.$refs.view.focus()},beforeDestroy(){this.deviceSupportUninstall()},computed:{isSingle(){return this.urlList.length<=1},isFirst(){return this.index===0},isLast(){return this.index===this.urlList.length-1},currentImg(){let e=this.urlList[this.index];return $A.isJson(e)&&(e=e.src),$A.thumbRestore(e)},imgStyle(){const{scale:e,deg:n,offsetX:t,offsetY:s,enableTransition:o}=this.transform,i={transform:`scale(${e}) rotate(${n}deg)`,transition:o?"transform .3s":"","margin-left":`${t}px`,"margin-top":`${s}px`};return this.mode===a.CONTAIN&&(i.maxWidth=i.maxHeight="100%"),i}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},initialIndex(e){this.index=e},currentImg(){this.$nextTick(e=>{this.$refs.img[0].complete||(this.loading=!0)})}},methods:{deviceSupportInstall(){this._keyDownHandler=e=>{switch(e.stopPropagation(),e.keyCode){case 32:this.toggleMode();break;case 37:this.prev();break;case 38:this.handleActions("zoomIn");break;case 39:this.next();break;case 40:this.handleActions("zoomOut");break}},this._mouseWheelHandler=d(e=>{(e.wheelDelta?e.wheelDelta:-e.detail)>0?this.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):this.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),r(document,"keydown",this._keyDownHandler),r(document,u,this._mouseWheelHandler)},deviceSupportUninstall(){l(document,"keydown",this._keyDownHandler),l(document,u,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad(e){this.loading=!1},handleImgError(e){this.loading=!1,e.target.alt="\u52A0\u8F7D\u5931\u8D25"},handleMouseDown(e){if(this.loading||e.button!==0)return;const{offsetX:n,offsetY:t}=this.transform,s=e.pageX,o=e.pageY;this._dragHandler=d(i=>{this.transform.offsetX=n+i.pageX-s,this.transform.offsetY=t+i.pageY-o}),r(document,"mousemove",this._dragHandler),r(document,"mouseup",i=>{l(document,"mousemove",this._dragHandler)}),e.preventDefault()},reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode(){if(this.loading)return;const e=Object.keys(a),s=(Object.values(a).indexOf(this.mode)+1)%e.length;this.mode=a[e[s]],this.reset()},prev(){if(this.isFirst&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index-1+e)%e},next(){if(this.isLast&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index+1)%e},handleActions(e,n={}){if(this.loading)return;const{zoomRate:t,rotateDeg:s,enableTransition:o}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...n},{transform:i}=this;switch(e){case"zoomOut":i.scale>.2&&(i.scale=parseFloat((i.scale-t).toFixed(3)));break;case"zoomIn":i.scale=parseFloat((i.scale+t).toFixed(3));break;case"clocelise":i.deg+=s;break;case"anticlocelise":i.deg-=s;break}i.enableTransition=o}}},f={};var w=m(_,g,p,!1,x,"6e965392",null,null);function x(e){for(let n in f)this[n]=f[n]}var y=function(){return w.exports}();export{y as default}; diff --git a/public/manifest.json b/public/manifest.json index 12d17fac7..a9840644b 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { "resources/assets/js/app.js": { - "file": "js/build/app.6c8b31b1.js", + "file": "js/build/app.6910ca56.js", "src": "resources/assets/js/app.js", "isEntry": true, "dynamicImports": [ @@ -116,7 +116,7 @@ ] }, "resources/assets/js/pages/index.vue": { - "file": "js/build/index.dfa0fc84.js", + "file": "js/build/index.568a7810.js", "src": "resources/assets/js/pages/index.vue", "isDynamicEntry": true, "imports": [ @@ -124,7 +124,7 @@ ] }, "resources/assets/js/pages/pro.vue": { - "file": "js/build/pro.e5312bee.js", + "file": "js/build/pro.011c4bd5.js", "src": "resources/assets/js/pages/pro.vue", "isDynamicEntry": true, "imports": [ @@ -132,72 +132,72 @@ ] }, "resources/assets/js/pages/meeting.vue": { - "file": "js/build/meeting.a29351d2.js", + "file": "js/build/meeting.0c7743f5.js", "src": "resources/assets/js/pages/meeting.vue", "isDynamicEntry": true, "imports": [ - "_MeetingManager.76c2e240.js", + "_MeetingManager.bf6d77cf.js", "resources/assets/js/app.js", - "_UserSelect.d62f565b.js" + "_UserSelect.1938cd94.js" ] }, - "_MeetingManager.76c2e240.js": { - "file": "js/build/MeetingManager.76c2e240.js", + "_MeetingManager.bf6d77cf.js": { + "file": "js/build/MeetingManager.bf6d77cf.js", "imports": [ "resources/assets/js/app.js", - "_UserSelect.d62f565b.js" + "_UserSelect.1938cd94.js" ] }, - "_UserSelect.d62f565b.js": { - "file": "js/build/UserSelect.d62f565b.js", + "_UserSelect.1938cd94.js": { + "file": "js/build/UserSelect.1938cd94.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage.vue": { - "file": "js/build/manage.8b64e6e6.js", + "file": "js/build/manage.d657f726.js", "src": "resources/assets/js/pages/manage.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_CheckinExport.ac86aa08.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_TaskDetail.3e00ee35.js", - "_MeetingManager.76c2e240.js", + "_CheckinExport.566afd3f.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_TaskDetail.3379e7b2.js", + "_MeetingManager.bf6d77cf.js", "_longpress.43ca7fd9.js", - "_DialogWrapper.5fcf71c2.js", - "_ApproveExport.37a8254a.js", - "_MicroApps.56fd4f5e.js", - "_tip.517649f6.js", - "_ReportEdit.54eb60eb.js", - "_ReportDetail.556c0891.js", - "_ProjectLog.d63fd8b4.js", - "_TaskMenu.a0d74239.js", + "_DialogWrapper.54a1354f.js", + "_ApproveExport.7b859f1c.js", + "_MicroApps.10c19f02.js", + "_tip.6872e3c6.js", + "_ReportEdit.cc7cc71b.js", + "_ReportDetail.d9bb9dfa.js", + "_ProjectLog.55720685.js", + "_TaskMenu.0454bb90.js", "resources/assets/js/components/TEditor.vue", - "_ImgUpload.0e64a5a8.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/pages/manage/approve/details.vue" ], "css": [ "js/build/manage.5dc9aad0.css" ] }, - "_CheckinExport.ac86aa08.js": { - "file": "js/build/CheckinExport.ac86aa08.js", + "_CheckinExport.566afd3f.js": { + "file": "js/build/CheckinExport.566afd3f.js", "imports": [ - "_UserSelect.d62f565b.js", - "_tip.517649f6.js", + "_UserSelect.1938cd94.js", + "_tip.6872e3c6.js", "resources/assets/js/app.js", - "_ReportEdit.54eb60eb.js", - "_ReportDetail.556c0891.js", - "_index.31386d23.js" + "_ReportEdit.cc7cc71b.js", + "_ReportDetail.d9bb9dfa.js", + "_index.8984a77c.js" ], "css": [ "js/build/ApproveExport.d0d486d1.css" ] }, - "_index.31386d23.js": { - "file": "js/build/index.31386d23.js", + "_index.8984a77c.js": { + "file": "js/build/index.8984a77c.js", "imports": [ "resources/assets/js/app.js" ] @@ -205,8 +205,8 @@ "_longpress.43ca7fd9.js": { "file": "js/build/longpress.43ca7fd9.js" }, - "_ApproveExport.37a8254a.js": { - "file": "js/build/ApproveExport.37a8254a.js", + "_ApproveExport.7b859f1c.js": { + "file": "js/build/ApproveExport.7b859f1c.js", "imports": [ "resources/assets/js/app.js" ], @@ -214,170 +214,170 @@ "js/build/ApproveExport.d0d486d1.css" ] }, - "_MicroApps.56fd4f5e.js": { - "file": "js/build/MicroApps.56fd4f5e.js", + "_MicroApps.10c19f02.js": { + "file": "js/build/MicroApps.10c19f02.js", "imports": [ "resources/assets/js/app.js", - "_DialogWrapper.5fcf71c2.js", - "_UserSelect.d62f565b.js" + "_DialogWrapper.54a1354f.js", + "_UserSelect.1938cd94.js" ] }, - "_tip.517649f6.js": { - "file": "js/build/tip.517649f6.js", + "_tip.6872e3c6.js": { + "file": "js/build/tip.6872e3c6.js", "imports": [ "resources/assets/js/app.js" ] }, - "_TaskDetail.3e00ee35.js": { - "file": "js/build/TaskDetail.3e00ee35.js", + "_TaskDetail.3379e7b2.js": { + "file": "js/build/TaskDetail.3379e7b2.js", "imports": [ "resources/assets/js/app.js", - "_ProjectLog.d63fd8b4.js", - "_DialogWrapper.5fcf71c2.js", - "_TaskMenu.a0d74239.js", - "_UserSelect.d62f565b.js", + "_ProjectLog.55720685.js", + "_DialogWrapper.54a1354f.js", + "_TaskMenu.0454bb90.js", + "_UserSelect.1938cd94.js", "resources/assets/js/components/TEditor.vue" ], "css": [ "js/build/TaskDetail.6f25b368.css" ] }, - "_ReportEdit.54eb60eb.js": { - "file": "js/build/ReportEdit.54eb60eb.js", + "_ReportEdit.cc7cc71b.js": { + "file": "js/build/ReportEdit.cc7cc71b.js", "imports": [ "resources/assets/js/app.js", - "_UserSelect.d62f565b.js" + "_UserSelect.1938cd94.js" ], "dynamicImports": [ "resources/assets/js/components/TEditor.vue" ] }, - "_ReportDetail.556c0891.js": { - "file": "js/build/ReportDetail.556c0891.js", + "_ReportDetail.d9bb9dfa.js": { + "file": "js/build/ReportDetail.d9bb9dfa.js", "imports": [ "resources/assets/js/app.js" ] }, - "_DialogWrapper.5fcf71c2.js": { - "file": "js/build/DialogWrapper.5fcf71c2.js", + "_DialogWrapper.54a1354f.js": { + "file": "js/build/DialogWrapper.54a1354f.js", "imports": [ "resources/assets/js/app.js", "_longpress.43ca7fd9.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_ImgUpload.0e64a5a8.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/pages/manage/approve/details.vue", - "_tip.517649f6.js" + "_tip.6872e3c6.js" ], "css": [ "js/build/DialogWrapper.c6b17693.css" ] }, "resources/assets/js/components/TEditor.vue": { - "file": "js/build/TEditor.5f656e41.js", + "file": "js/build/TEditor.8daabc3e.js", "src": "resources/assets/js/components/TEditor.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ImgUpload.0e64a5a8.js" + "_ImgUpload.8863e78d.js" ] }, - "_ImgUpload.0e64a5a8.js": { - "file": "js/build/ImgUpload.0e64a5a8.js", + "_ImgUpload.8863e78d.js": { + "file": "js/build/ImgUpload.8863e78d.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage/approve/details.vue": { - "file": "js/build/details.6749696e.js", + "file": "js/build/details.97854344.js", "src": "resources/assets/js/pages/manage/approve/details.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ImgUpload.0e64a5a8.js" + "_ImgUpload.8863e78d.js" ] }, - "_ProjectLog.d63fd8b4.js": { - "file": "js/build/ProjectLog.d63fd8b4.js", + "_ProjectLog.55720685.js": { + "file": "js/build/ProjectLog.55720685.js", "imports": [ "resources/assets/js/app.js" ] }, - "_TaskMenu.a0d74239.js": { - "file": "js/build/TaskMenu.a0d74239.js", + "_TaskMenu.0454bb90.js": { + "file": "js/build/TaskMenu.0454bb90.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage/dashboard.vue": { - "file": "js/build/dashboard.d6d0c216.js", + "file": "js/build/dashboard.3f95cdc5.js", "src": "resources/assets/js/pages/manage/dashboard.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_TaskMenu.a0d74239.js" + "_TaskMenu.0454bb90.js" ] }, "resources/assets/js/pages/manage/calendar.vue": { - "file": "js/build/calendar.b1746b7c.js", + "file": "js/build/calendar.23380bdc.js", "src": "resources/assets/js/pages/manage/calendar.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_TaskMenu.a0d74239.js" + "_TaskMenu.0454bb90.js" ], "css": [ "js/build/calendar.05643a5b.css" ] }, "resources/assets/js/pages/manage/messenger.vue": { - "file": "js/build/messenger.f5205905.js", + "file": "js/build/messenger.306bf130.js", "src": "resources/assets/js/pages/manage/messenger.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_DialogWrapper.5fcf71c2.js", + "_DialogWrapper.54a1354f.js", "_longpress.43ca7fd9.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_ImgUpload.0e64a5a8.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/pages/manage/approve/details.vue", - "_tip.517649f6.js" + "_tip.6872e3c6.js" ] }, "resources/assets/js/pages/manage/approve/index.vue": { - "file": "js/build/index.6bba8944.js", + "file": "js/build/index.e3202dd6.js", "src": "resources/assets/js/pages/manage/approve/index.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", "resources/assets/js/pages/manage/approve/details.vue", - "_index.31386d23.js", - "_ImgUpload.0e64a5a8.js", - "_ApproveExport.37a8254a.js" + "_index.8984a77c.js", + "_ImgUpload.8863e78d.js", + "_ApproveExport.7b859f1c.js" ], "css": [ "js/build/index.bc7e59ad.css" ] }, "resources/assets/js/pages/manage/apps.vue": { - "file": "js/build/apps.e0c18804.js", + "file": "js/build/apps.5dbb9dd1.js", "src": "resources/assets/js/pages/manage/apps.vue", "isDynamicEntry": true, "imports": [ - "_MicroApps.56fd4f5e.js", + "_MicroApps.10c19f02.js", "resources/assets/js/app.js", - "_DialogWrapper.5fcf71c2.js", + "_DialogWrapper.54a1354f.js", "_longpress.43ca7fd9.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_ImgUpload.0e64a5a8.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/pages/manage/approve/details.vue", - "_tip.517649f6.js" + "_tip.6872e3c6.js" ] }, "resources/assets/js/pages/manage/setting/index.vue": { - "file": "js/build/index.76a95eea.js", + "file": "js/build/index.197a221d.js", "src": "resources/assets/js/pages/manage/setting/index.vue", "isDynamicEntry": true, "imports": [ @@ -388,16 +388,16 @@ ] }, "resources/assets/js/pages/manage/setting/personal.vue": { - "file": "js/build/personal.590980db.js", + "file": "js/build/personal.f12e3d14.js", "src": "resources/assets/js/pages/manage/setting/personal.vue", "isDynamicEntry": true, "imports": [ - "_ImgUpload.0e64a5a8.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage/setting/checkin.vue": { - "file": "js/build/checkin.dbddec5e.js", + "file": "js/build/checkin.9caf7776.js", "src": "resources/assets/js/pages/manage/setting/checkin.vue", "isDynamicEntry": true, "imports": [ @@ -408,7 +408,7 @@ ] }, "resources/assets/js/pages/manage/setting/language.vue": { - "file": "js/build/language.24cda9c9.js", + "file": "js/build/language.0e662f9b.js", "src": "resources/assets/js/pages/manage/setting/language.vue", "isDynamicEntry": true, "imports": [ @@ -416,7 +416,7 @@ ] }, "resources/assets/js/pages/manage/setting/theme.vue": { - "file": "js/build/theme.bbb22618.js", + "file": "js/build/theme.e86b5680.js", "src": "resources/assets/js/pages/manage/setting/theme.vue", "isDynamicEntry": true, "imports": [ @@ -424,7 +424,7 @@ ] }, "resources/assets/js/pages/manage/setting/keyboard.vue": { - "file": "js/build/keyboard.2aabed93.js", + "file": "js/build/keyboard.b40eff10.js", "src": "resources/assets/js/pages/manage/setting/keyboard.vue", "isDynamicEntry": true, "imports": [ @@ -435,7 +435,7 @@ ] }, "resources/assets/js/pages/manage/setting/license.vue": { - "file": "js/build/license.efaacf57.js", + "file": "js/build/license.93e62e1f.js", "src": "resources/assets/js/pages/manage/setting/license.vue", "isDynamicEntry": true, "imports": [ @@ -446,7 +446,7 @@ ] }, "resources/assets/js/pages/manage/setting/password.vue": { - "file": "js/build/password.64696635.js", + "file": "js/build/password.cfd6c864.js", "src": "resources/assets/js/pages/manage/setting/password.vue", "isDynamicEntry": true, "imports": [ @@ -454,7 +454,7 @@ ] }, "resources/assets/js/pages/manage/setting/email.vue": { - "file": "js/build/email.615b5786.js", + "file": "js/build/email.a38b55d3.js", "src": "resources/assets/js/pages/manage/setting/email.vue", "isDynamicEntry": true, "imports": [ @@ -462,7 +462,7 @@ ] }, "resources/assets/js/pages/manage/setting/system.vue": { - "file": "js/build/system.90a495f1.js", + "file": "js/build/system.0a762fda.js", "src": "resources/assets/js/pages/manage/setting/system.vue", "isDynamicEntry": true, "imports": [ @@ -470,7 +470,7 @@ ] }, "resources/assets/js/pages/manage/setting/delete.vue": { - "file": "js/build/delete.842d393e.js", + "file": "js/build/delete.399f0038.js", "src": "resources/assets/js/pages/manage/setting/delete.vue", "isDynamicEntry": true, "imports": [ @@ -478,7 +478,7 @@ ] }, "resources/assets/js/pages/manage/projectInvite.vue": { - "file": "js/build/projectInvite.6d31f4f4.js", + "file": "js/build/projectInvite.7958ccd4.js", "src": "resources/assets/js/pages/manage/projectInvite.vue", "isDynamicEntry": true, "imports": [ @@ -489,32 +489,32 @@ ] }, "resources/assets/js/pages/manage/project.vue": { - "file": "js/build/project.ff447f31.js", + "file": "js/build/project.38fc5178.js", "src": "resources/assets/js/pages/manage/project.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ProjectLog.d63fd8b4.js", - "_TaskMenu.a0d74239.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_tip.517649f6.js", - "_DialogWrapper.5fcf71c2.js", + "_ProjectLog.55720685.js", + "_TaskMenu.0454bb90.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_tip.6872e3c6.js", + "_DialogWrapper.54a1354f.js", "_longpress.43ca7fd9.js", - "_ImgUpload.0e64a5a8.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/pages/manage/approve/details.vue" ] }, "resources/assets/js/pages/manage/file.vue": { - "file": "js/build/file.0a3f0003.js", + "file": "js/build/file.3dcec3eb.js", "src": "resources/assets/js/pages/manage/file.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_index.31386d23.js", + "_index.8984a77c.js", "_longpress.43ca7fd9.js", - "_UserSelect.d62f565b.js", - "_tip.517649f6.js" + "_UserSelect.1938cd94.js", + "_tip.6872e3c6.js" ], "dynamicImports": [ "resources/assets/js/pages/manage/components/FilePreview.vue", @@ -522,27 +522,27 @@ ] }, "resources/assets/js/pages/manage/application.vue": { - "file": "js/build/application.822f72e7.js", + "file": "js/build/application.1fcd9820.js", "src": "resources/assets/js/pages/manage/application.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_CheckinExport.ac86aa08.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_CheckinExport.566afd3f.js", "resources/assets/js/pages/manage/setting/checkin.vue", - "_tip.517649f6.js", - "_ReportEdit.54eb60eb.js", - "_ReportDetail.556c0891.js" + "_tip.6872e3c6.js", + "_ReportEdit.cc7cc71b.js", + "_ReportDetail.d9bb9dfa.js" ] }, "resources/assets/js/pages/single/fileMsg.vue": { - "file": "js/build/fileMsg.3e945301.js", + "file": "js/build/fileMsg.f47e5c3e.js", "src": "resources/assets/js/pages/single/fileMsg.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/preview.js", @@ -556,19 +556,19 @@ "js/build/fileMsg.1a0b76dd.css" ] }, - "_IFrame.364b588a.js": { - "file": "js/build/IFrame.364b588a.js", + "_IFrame.1fc38451.js": { + "file": "js/build/IFrame.1fc38451.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/single/fileTask.vue": { - "file": "js/build/fileTask.45d83527.js", + "file": "js/build/fileTask.472d19ff.js", "src": "resources/assets/js/pages/single/fileTask.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/preview.js", @@ -583,26 +583,26 @@ ] }, "resources/assets/js/pages/single/file.vue": { - "file": "js/build/file.6049f56f.js", + "file": "js/build/file.7a934af0.js", "src": "resources/assets/js/pages/single/file.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/pages/manage/components/FileContent.vue", "resources/assets/js/pages/manage/components/FilePreview.vue", "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "css": [ "js/build/file.1cbb23e7.css" ] }, "resources/assets/js/pages/manage/components/FileContent.vue": { - "file": "js/build/FileContent.f5b3c8be.js", + "file": "js/build/FileContent.49414140.js", "src": "resources/assets/js/pages/manage/components/FileContent.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/index.vue", @@ -618,12 +618,12 @@ ] }, "resources/assets/js/pages/manage/components/FilePreview.vue": { - "file": "js/build/FilePreview.22c023a8.js", + "file": "js/build/FilePreview.55c206d9.js", "src": "resources/assets/js/pages/manage/components/FilePreview.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/preview.js", @@ -635,21 +635,21 @@ ] }, "resources/assets/js/pages/single/task.vue": { - "file": "js/build/task.240d6dc5.js", + "file": "js/build/task.bf95724d.js", "src": "resources/assets/js/pages/single/task.vue", "isDynamicEntry": true, "imports": [ - "_TaskDetail.3e00ee35.js", + "_TaskDetail.3379e7b2.js", "resources/assets/js/app.js", - "_ProjectLog.d63fd8b4.js", - "_DialogWrapper.5fcf71c2.js", + "_ProjectLog.55720685.js", + "_DialogWrapper.54a1354f.js", "_longpress.43ca7fd9.js", - "_index.31386d23.js", - "_UserSelect.d62f565b.js", - "_ImgUpload.0e64a5a8.js", + "_index.8984a77c.js", + "_UserSelect.1938cd94.js", + "_ImgUpload.8863e78d.js", "resources/assets/js/pages/manage/approve/details.vue", - "_tip.517649f6.js", - "_TaskMenu.a0d74239.js", + "_tip.6872e3c6.js", + "_TaskMenu.0454bb90.js", "resources/assets/js/components/TEditor.vue" ], "css": [ @@ -657,7 +657,7 @@ ] }, "resources/assets/js/pages/single/validEmail.vue": { - "file": "js/build/validEmail.91adfa74.js", + "file": "js/build/validEmail.72ecc0d2.js", "src": "resources/assets/js/pages/single/validEmail.vue", "isDynamicEntry": true, "imports": [ @@ -668,24 +668,24 @@ ] }, "resources/assets/js/pages/single/reportEdit.vue": { - "file": "js/build/reportEdit.b7be9cde.js", + "file": "js/build/reportEdit.e5acde07.js", "src": "resources/assets/js/pages/single/reportEdit.vue", "isDynamicEntry": true, "imports": [ - "_ReportEdit.54eb60eb.js", + "_ReportEdit.cc7cc71b.js", "resources/assets/js/app.js", - "_UserSelect.d62f565b.js" + "_UserSelect.1938cd94.js" ], "css": [ "js/build/reportEdit.5c397123.css" ] }, "resources/assets/js/pages/single/reportDetail.vue": { - "file": "js/build/reportDetail.142aead0.js", + "file": "js/build/reportDetail.39c2af9e.js", "src": "resources/assets/js/pages/single/reportDetail.vue", "isDynamicEntry": true, "imports": [ - "_ReportDetail.556c0891.js", + "_ReportDetail.d9bb9dfa.js", "resources/assets/js/app.js" ], "css": [ @@ -693,7 +693,7 @@ ] }, "resources/assets/js/pages/token.vue": { - "file": "js/build/token.94f56172.js", + "file": "js/build/token.71c3e093.js", "src": "resources/assets/js/pages/token.vue", "isDynamicEntry": true, "imports": [ @@ -704,7 +704,7 @@ ] }, "resources/assets/js/pages/login.vue": { - "file": "js/build/login.e56fbb44.js", + "file": "js/build/login.d3d06d73.js", "src": "resources/assets/js/pages/login.vue", "isDynamicEntry": true, "imports": [ @@ -712,7 +712,7 @@ ] }, "resources/assets/js/pages/404.vue": { - "file": "js/build/404.b2fd5df8.js", + "file": "js/build/404.f3a5a7cb.js", "src": "resources/assets/js/pages/404.vue", "isDynamicEntry": true, "imports": [ @@ -723,7 +723,7 @@ ] }, "resources/assets/js/components/PreviewImage/components/view.vue": { - "file": "js/build/view.332e3be1.js", + "file": "js/build/view.576fab2b.js", "src": "resources/assets/js/components/PreviewImage/components/view.vue", "isDynamicEntry": true, "imports": [ @@ -734,7 +734,7 @@ ] }, "resources/assets/js/components/PreviewImage/components/swipe.vue": { - "file": "js/build/swipe.e89ae537.js", + "file": "js/build/swipe.9a0bfd93.js", "src": "resources/assets/js/components/PreviewImage/components/swipe.vue", "isDynamicEntry": true, "imports": [ @@ -758,7 +758,7 @@ "isDynamicEntry": true }, "node_modules/openpgp_hi/dist/lightweight/bn.interface.min.mjs": { - "file": "js/build/bn.interface.min.fafac8af.js", + "file": "js/build/bn.interface.min.9376436e.js", "src": "node_modules/openpgp_hi/dist/lightweight/bn.interface.min.mjs", "isDynamicEntry": true, "imports": [ @@ -767,7 +767,7 @@ ] }, "node_modules/openpgp_hi/dist/lightweight/bn.min.mjs": { - "file": "js/build/bn.min.2dc6411e.js", + "file": "js/build/bn.min.03db7fc1.js", "src": "node_modules/openpgp_hi/dist/lightweight/bn.min.mjs", "isDynamicEntry": true, "imports": [ @@ -775,7 +775,7 @@ ] }, "node_modules/openpgp_hi/dist/lightweight/elliptic.min.mjs": { - "file": "js/build/elliptic.min.cb2c4d59.js", + "file": "js/build/elliptic.min.b3d8d4c2.js", "src": "node_modules/openpgp_hi/dist/lightweight/elliptic.min.mjs", "isDynamicEntry": true, "imports": [ @@ -784,7 +784,7 @@ ] }, "resources/assets/js/components/MDEditor/preview.js": { - "file": "js/build/preview.438bb1b4.js", + "file": "js/build/preview.0ba2d7e4.js", "src": "resources/assets/js/components/MDEditor/preview.js", "isDynamicEntry": true, "imports": [ @@ -792,7 +792,7 @@ ] }, "resources/assets/js/components/AceEditor.vue": { - "file": "js/build/AceEditor.2ebeaef8.js", + "file": "js/build/AceEditor.aa9651a2.js", "src": "resources/assets/js/components/AceEditor.vue", "isDynamicEntry": true, "imports": [ @@ -800,35 +800,35 @@ ] }, "resources/assets/js/components/OnlyOffice.vue": { - "file": "js/build/OnlyOffice.3b8ff0fe.js", + "file": "js/build/OnlyOffice.8a3b23b9.js", "src": "resources/assets/js/components/OnlyOffice.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "css": [ "js/build/OnlyOffice.97177ac3.css" ] }, "resources/assets/js/components/Drawio.vue": { - "file": "js/build/Drawio.32180b15.js", + "file": "js/build/Drawio.98aed49e.js", "src": "resources/assets/js/components/Drawio.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.364b588a.js" + "_IFrame.1fc38451.js" ], "css": [ "js/build/Drawio.fc5c6326.css" ] }, "resources/assets/js/components/Minder.vue": { - "file": "js/build/Minder.37c15ccd.js", + "file": "js/build/Minder.c159d06d.js", "src": "resources/assets/js/components/Minder.vue", "isDynamicEntry": true, "imports": [ - "_IFrame.364b588a.js", + "_IFrame.1fc38451.js", "resources/assets/js/app.js" ], "css": [ @@ -836,12 +836,12 @@ ] }, "resources/assets/js/components/MDEditor/index.vue": { - "file": "js/build/index.8d4e26d2.js", + "file": "js/build/index.62cf0925.js", "src": "resources/assets/js/components/MDEditor/index.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ImgUpload.0e64a5a8.js" + "_ImgUpload.8863e78d.js" ], "css": [ "js/build/index.4d847d9e.css"