From f3f65fa99ec20afdd642763d9751c5fa7ff3a170 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sun, 6 Aug 2023 18:07:50 +0800 Subject: [PATCH] build --- docker-compose.yml | 2 +- .../{404.01d2a9d7.js => 404.e2804d03.js} | 2 +- ...itor.46ba32dc.js => AceEditor.6d433f2d.js} | 2 +- ....3b0975d4.js => CheckinExport.0786bc67.js} | 2 +- ....28dee207.js => DialogWrapper.7e5c06a5.js} | 4 +- ...{Drawio.33c85dd8.js => Drawio.a7d96145.js} | 2 +- ...nt.1929b7b3.js => FileContent.35a4ff5e.js} | 2 +- ...ew.a0883610.js => FilePreview.4bfd7284.js} | 2 +- ...{IFrame.f4e1afaf.js => IFrame.dfb0ac0a.js} | 2 +- ...load.cf2be17d.js => ImgUpload.056f7090.js} | 2 +- ...{Minder.89953d4a.js => Minder.755c9889.js} | 2 +- ...ice.512691a7.js => OnlyOffice.72397ebe.js} | 2 +- ...Log.c251a416.js => ProjectLog.9bfebf4b.js} | 2 +- ...l.e316ac3c.js => ReportDetail.f06c9ba5.js} | 2 +- ...dit.d1baae75.js => ReportEdit.3d7c05e9.js} | 2 +- ...Editor.c448a662.js => TEditor.116bbeaa.js} | 2 +- ...ail.17c1ee52.js => TaskDetail.93d4eeab.js} | 2 +- ...kMenu.6d52fdca.js => TaskMenu.61d4b7dc.js} | 2 +- ...ect.c1d7840d.js => UserSelect.4fa9cbd2.js} | 2 +- .../{app.2d4b066a.css => app.262cb6d2.css} | 2 +- .../{app.2ab5f89e.js => app.6fb8fe77.js} | 6 +- ...pprove.774d6c89.js => approve.5d8d6cbe.js} | 2 +- ...ff7d72.js => bn.interface.min.76ed2c0b.js} | 2 +- ...{bn.min.1f47700f.js => bn.min.28405fbe.js} | 2 +- ...endar.f9aa1044.js => calendar.0e6aeaaa.js} | 2 +- ...heckin.110860a6.js => checkin.24f61a0d.js} | 2 +- ...oard.9a6cc68e.js => dashboard.54ebcc20.js} | 2 +- ...{delete.3019f7ef.js => delete.05615594.js} | 2 +- ...etails.ae1c56d6.js => details.eb8631f5.js} | 2 +- ...n.50416e92.js => elliptic.min.02bc75af.js} | 2 +- .../{email.5d3025c7.js => email.c77d464a.js} | 2 +- .../{file.7ad78cf2.js => file.67799f74.js} | 2 +- .../{file.165e488e.js => file.7cac3066.js} | 4 +- ...ileMsg.234716b5.js => fileMsg.0d9b08d0.js} | 2 +- ...eTask.8bcbee2e.js => fileTask.1a203df6.js} | 2 +- .../{index.b2c3f0aa.js => index.01701810.js} | 2 +- .../{index.0045ae13.js => index.3ab6dc68.js} | 2 +- .../{index.1e8d5001.js => index.5f4e12fc.js} | 2 +- .../{index.d02ed9ac.js => index.9b4ad049.js} | 2 +- .../{index.edc265fa.js => index.ab28c92e.js} | 2 +- ...board.fc515293.js => keyboard.b30ae163.js} | 2 +- ...guage.b2ff9329.js => language.3598a0b0.js} | 2 +- ...icense.ef37879d.js => license.66258ff9.js} | 2 +- .../{login.cfa93d8f.js => login.a11ab1ed.js} | 4 +- ...{manage.108fb03a.js => manage.23677939.js} | 2 +- ...nger.47854ab6.js => messenger.9ae12471.js} | 2 +- ...sword.eb90241e.js => password.9f289b79.js} | 2 +- ...sonal.af1cbdf2.js => personal.4dbe89b2.js} | 2 +- public/js/build/preview.35a96748.js | 1 - public/js/build/preview.a2619f71.js | 1 + .../{pro.ff666016.js => pro.ecb61aa7.js} | 2 +- ...roject.6eb71c23.js => project.c7bb6e0e.js} | 2 +- ....ddf03d3f.js => projectInvite.8c66116b.js} | 2 +- ...l.83c422be.js => reportDetail.d1fff3ed.js} | 2 +- ...dit.8d6ae6af.js => reportEdit.ecbe4823.js} | 2 +- .../{swipe.dee9fe2c.js => swipe.6597c65d.js} | 2 +- ...{system.015c49e1.js => system.83ba2279.js} | 2 +- .../{task.cba220aa.js => task.7d74afdc.js} | 2 +- .../{theme.80fdad77.js => theme.05794063.js} | 2 +- .../{token.717fee56.js => token.55f32898.js} | 2 +- ...ail.4f649c64.js => validEmail.e7cab868.js} | 2 +- public/js/build/view.310641c1.css | 1 - public/js/build/view.5e67e6f1.css | 1 + .../{view.9ac5ec3e.js => view.a048db45.js} | 2 +- public/manifest.json | 266 +++++++++--------- .../manage/setting/components/SystemAibot.vue | 4 +- 66 files changed, 202 insertions(+), 202 deletions(-) rename public/js/build/{404.01d2a9d7.js => 404.e2804d03.js} (87%) rename public/js/build/{AceEditor.46ba32dc.js => AceEditor.6d433f2d.js} (98%) rename public/js/build/{CheckinExport.3b0975d4.js => CheckinExport.0786bc67.js} (99%) rename public/js/build/{DialogWrapper.28dee207.js => DialogWrapper.7e5c06a5.js} (98%) rename public/js/build/{Drawio.33c85dd8.js => Drawio.a7d96145.js} (93%) rename public/js/build/{FileContent.1929b7b3.js => FileContent.35a4ff5e.js} (92%) rename public/js/build/{FilePreview.a0883610.js => FilePreview.4bfd7284.js} (76%) rename public/js/build/{IFrame.f4e1afaf.js => IFrame.dfb0ac0a.js} (94%) rename public/js/build/{ImgUpload.cf2be17d.js => ImgUpload.056f7090.js} (99%) rename public/js/build/{Minder.89953d4a.js => Minder.755c9889.js} (97%) rename public/js/build/{OnlyOffice.512691a7.js => OnlyOffice.72397ebe.js} (96%) rename public/js/build/{ProjectLog.c251a416.js => ProjectLog.9bfebf4b.js} (98%) rename public/js/build/{ReportDetail.e316ac3c.js => ReportDetail.f06c9ba5.js} (97%) rename public/js/build/{ReportEdit.d1baae75.js => ReportEdit.3d7c05e9.js} (94%) rename public/js/build/{TEditor.c448a662.js => TEditor.116bbeaa.js} (99%) rename public/js/build/{TaskDetail.17c1ee52.js => TaskDetail.93d4eeab.js} (99%) rename public/js/build/{TaskMenu.6d52fdca.js => TaskMenu.61d4b7dc.js} (96%) rename public/js/build/{UserSelect.c1d7840d.js => UserSelect.4fa9cbd2.js} (99%) rename public/js/build/{app.2d4b066a.css => app.262cb6d2.css} (99%) rename public/js/build/{app.2ab5f89e.js => app.6fb8fe77.js} (99%) rename public/js/build/{approve.774d6c89.js => approve.5d8d6cbe.js} (96%) rename public/js/build/{bn.interface.min.3eff7d72.js => bn.interface.min.76ed2c0b.js} (96%) rename public/js/build/{bn.min.1f47700f.js => bn.min.28405fbe.js} (99%) rename public/js/build/{calendar.f9aa1044.js => calendar.0e6aeaaa.js} (99%) rename public/js/build/{checkin.110860a6.js => checkin.24f61a0d.js} (99%) rename public/js/build/{dashboard.9a6cc68e.js => dashboard.54ebcc20.js} (97%) rename public/js/build/{delete.3019f7ef.js => delete.05615594.js} (99%) rename public/js/build/{details.ae1c56d6.js => details.eb8631f5.js} (99%) rename public/js/build/{elliptic.min.50416e92.js => elliptic.min.02bc75af.js} (99%) rename public/js/build/{email.5d3025c7.js => email.c77d464a.js} (98%) rename public/js/build/{file.7ad78cf2.js => file.67799f74.js} (88%) rename public/js/build/{file.165e488e.js => file.7cac3066.js} (99%) rename public/js/build/{fileMsg.234716b5.js => fileMsg.0d9b08d0.js} (70%) rename public/js/build/{fileTask.8bcbee2e.js => fileTask.1a203df6.js} (69%) rename public/js/build/{index.b2c3f0aa.js => index.01701810.js} (99%) rename public/js/build/{index.0045ae13.js => index.3ab6dc68.js} (94%) rename public/js/build/{index.1e8d5001.js => index.5f4e12fc.js} (98%) rename public/js/build/{index.d02ed9ac.js => index.9b4ad049.js} (99%) rename public/js/build/{index.edc265fa.js => index.ab28c92e.js} (98%) rename public/js/build/{keyboard.fc515293.js => keyboard.b30ae163.js} (97%) rename public/js/build/{language.b2ff9329.js => language.3598a0b0.js} (95%) rename public/js/build/{license.ef37879d.js => license.66258ff9.js} (98%) rename public/js/build/{login.cfa93d8f.js => login.a11ab1ed.js} (98%) rename public/js/build/{manage.108fb03a.js => manage.23677939.js} (99%) rename public/js/build/{messenger.47854ab6.js => messenger.9ae12471.js} (98%) rename public/js/build/{password.eb90241e.js => password.9f289b79.js} (97%) rename public/js/build/{personal.af1cbdf2.js => personal.4dbe89b2.js} (96%) delete mode 100644 public/js/build/preview.35a96748.js create mode 100644 public/js/build/preview.a2619f71.js rename public/js/build/{pro.ff666016.js => pro.ecb61aa7.js} (85%) rename public/js/build/{project.6eb71c23.js => project.c7bb6e0e.js} (99%) rename public/js/build/{projectInvite.ddf03d3f.js => projectInvite.8c66116b.js} (96%) rename public/js/build/{reportDetail.83c422be.js => reportDetail.d1fff3ed.js} (85%) rename public/js/build/{reportEdit.8d6ae6af.js => reportEdit.ecbe4823.js} (86%) rename public/js/build/{swipe.dee9fe2c.js => swipe.6597c65d.js} (99%) rename public/js/build/{system.015c49e1.js => system.83ba2279.js} (92%) rename public/js/build/{task.cba220aa.js => task.7d74afdc.js} (83%) rename public/js/build/{theme.80fdad77.js => theme.05794063.js} (96%) rename public/js/build/{token.717fee56.js => token.55f32898.js} (91%) rename public/js/build/{validEmail.4f649c64.js => validEmail.e7cab868.js} (95%) delete mode 100644 public/js/build/view.310641c1.css create mode 100644 public/js/build/view.5e67e6f1.css rename public/js/build/{view.9ac5ec3e.js => view.a048db45.js} (97%) diff --git a/docker-compose.yml b/docker-compose.yml index d08295b8b..fd7c500cf 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -166,7 +166,7 @@ services: ai: container_name: "dootask-ai-${APP_ID}" - image: "kuaifan/dooai:0.0.1" + image: "kuaifan/dooai:0.0.2" networks: extnetwork: ipv4_address: "${APP_IPPR}.12" diff --git a/public/js/build/404.01d2a9d7.js b/public/js/build/404.e2804d03.js similarity index 87% rename from public/js/build/404.01d2a9d7.js rename to public/js/build/404.e2804d03.js index cbb92489d..59022a75d 100644 --- a/public/js/build/404.01d2a9d7.js +++ b/public/js/build/404.e2804d03.js @@ -1 +1 @@ -import{n}from"./app.2ab5f89e.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.6fb8fe77.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.46ba32dc.js b/public/js/build/AceEditor.6d433f2d.js similarity index 98% rename from public/js/build/AceEditor.46ba32dc.js rename to public/js/build/AceEditor.6d433f2d.js index 2d66a42f1..7c82c3ea5 100644 --- a/public/js/build/AceEditor.46ba32dc.js +++ b/public/js/build/AceEditor.6d433f2d.js @@ -1 +1 @@ -import{m as h,n as l}from"./app.2ab5f89e.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?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("UserAvatar",{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)},m=[];const u={name:"TeamManagement",components:{UserSelect:l},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:c}=s;return a&&e.push(t("Icon",{props:{type:"md-mail"}})),c&&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()}}},r={};var h=d(u,p,m,!1,_,null,null,null);function _(t){for(let s in r)this[s]=r[s]}var b=function(){return h.exports}(),f=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)},v=[];const $={name:"CheckinExport",components:{UserSelect:l},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--}))}}},o={};var k=d($,f,v,!1,g,null,null,null);function g(t){for(let s in o)this[s]=o[s]}var y=function(){return k.exports}();export{y as C,b as T}; +import{U as l}from"./UserSelect.4fa9cbd2.js";import{n as d}from"./app.6fb8fe77.js";var p=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("UserAvatar",{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)},m=[];const u={name:"TeamManagement",components:{UserSelect:l},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:c}=s;return a&&e.push(t("Icon",{props:{type:"md-mail"}})),c&&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()}}},r={};var h=d(u,p,m,!1,_,null,null,null);function _(t){for(let s in r)this[s]=r[s]}var b=function(){return h.exports}(),f=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)},v=[];const $={name:"CheckinExport",components:{UserSelect:l},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--}))}}},o={};var k=d($,f,v,!1,g,null,null,null);function g(t){for(let s in o)this[s]=o[s]}var y=function(){return k.exports}();export{y as C,b as T}; diff --git a/public/js/build/DialogWrapper.28dee207.js b/public/js/build/DialogWrapper.7e5c06a5.js similarity index 98% rename from public/js/build/DialogWrapper.28dee207.js rename to public/js/build/DialogWrapper.7e5c06a5.js index b060967f1..eb073e9fe 100644 --- a/public/js/build/DialogWrapper.28dee207.js +++ b/public/js/build/DialogWrapper.7e5c06a5.js @@ -1,4 +1,4 @@ -import{n as Kt,g as qu,c as Ya,m as Wn,a as Nl,b as _i,d as Yu,e as zu,r as $u,V as Hu,i as Vu}from"./app.2ab5f89e.js";import{l as za}from"./longpress.43ca7fd9.js";import{D as Wu}from"./index.edc265fa.js";import{U as Ol}from"./UserSelect.c1d7840d.js";import{I as Ku}from"./ImgUpload.cf2be17d.js";import Qu from"./details.ae1c56d6.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)}})])])])])},ju=[];const Zu={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)],f=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 ${f} 1 ${d[2][0]} ${d[2][1]} L ${d[3][0]} ${d[3][1]} A ${r} ${r} 0 ${f} 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))}}},vs={};var Ju=Kt(Zu,Xu,ju,!1,ed,null,null,null);function ed(e){for(let t in vs)this[t]=vs[t]}var td=function(){return Ju.exports}();var Ze={};const nd="\xC1",rd="\xE1",id="\u0102",ad="\u0103",od="\u223E",sd="\u223F",ld="\u223E\u0333",cd="\xC2",ud="\xE2",dd="\xB4",_d="\u0410",pd="\u0430",md="\xC6",fd="\xE6",gd="\u2061",hd="\u{1D504}",Ed="\u{1D51E}",Sd="\xC0",bd="\xE0",vd="\u2135",Td="\u2135",yd="\u0391",Cd="\u03B1",Rd="\u0100",Nd="\u0101",Od="\u2A3F",Ad="&",Id="&",Dd="\u2A55",xd="\u2A53",wd="\u2227",Md="\u2A5C",Ld="\u2A58",kd="\u2A5A",Pd="\u2220",Bd="\u29A4",Fd="\u2220",Ud="\u29A8",Gd="\u29A9",qd="\u29AA",Yd="\u29AB",zd="\u29AC",$d="\u29AD",Hd="\u29AE",Vd="\u29AF",Wd="\u2221",Kd="\u221F",Qd="\u22BE",Xd="\u299D",jd="\u2222",Zd="\xC5",Jd="\u237C",e_="\u0104",t_="\u0105",n_="\u{1D538}",r_="\u{1D552}",i_="\u2A6F",a_="\u2248",o_="\u2A70",s_="\u224A",l_="\u224B",c_="'",u_="\u2061",d_="\u2248",__="\u224A",p_="\xC5",m_="\xE5",f_="\u{1D49C}",g_="\u{1D4B6}",h_="\u2254",E_="*",S_="\u2248",b_="\u224D",v_="\xC3",T_="\xE3",y_="\xC4",C_="\xE4",R_="\u2233",N_="\u2A11",O_="\u224C",A_="\u03F6",I_="\u2035",D_="\u223D",x_="\u22CD",w_="\u2216",M_="\u2AE7",L_="\u22BD",k_="\u2305",P_="\u2306",B_="\u2305",F_="\u23B5",U_="\u23B6",G_="\u224C",q_="\u0411",Y_="\u0431",z_="\u201E",$_="\u2235",H_="\u2235",V_="\u2235",W_="\u29B0",K_="\u03F6",Q_="\u212C",X_="\u212C",j_="\u0392",Z_="\u03B2",J_="\u2136",ep="\u226C",tp="\u{1D505}",np="\u{1D51F}",rp="\u22C2",ip="\u25EF",ap="\u22C3",op="\u2A00",sp="\u2A01",lp="\u2A02",cp="\u2A06",up="\u2605",dp="\u25BD",_p="\u25B3",pp="\u2A04",mp="\u22C1",fp="\u22C0",gp="\u290D",hp="\u29EB",Ep="\u25AA",Sp="\u25B4",bp="\u25BE",vp="\u25C2",Tp="\u25B8",yp="\u2423",Cp="\u2592",Rp="\u2591",Np="\u2593",Op="\u2588",Ap="=\u20E5",Ip="\u2261\u20E5",Dp="\u2AED",xp="\u2310",wp="\u{1D539}",Mp="\u{1D553}",Lp="\u22A5",kp="\u22A5",Pp="\u22C8",Bp="\u29C9",Fp="\u2510",Up="\u2555",Gp="\u2556",qp="\u2557",Yp="\u250C",zp="\u2552",$p="\u2553",Hp="\u2554",Vp="\u2500",Wp="\u2550",Kp="\u252C",Qp="\u2564",Xp="\u2565",jp="\u2566",Zp="\u2534",Jp="\u2567",em="\u2568",tm="\u2569",nm="\u229F",rm="\u229E",im="\u22A0",am="\u2518",om="\u255B",sm="\u255C",lm="\u255D",cm="\u2514",um="\u2558",dm="\u2559",_m="\u255A",pm="\u2502",mm="\u2551",fm="\u253C",gm="\u256A",hm="\u256B",Em="\u256C",Sm="\u2524",bm="\u2561",vm="\u2562",Tm="\u2563",ym="\u251C",Cm="\u255E",Rm="\u255F",Nm="\u2560",Om="\u2035",Am="\u02D8",Im="\u02D8",Dm="\xA6",xm="\u{1D4B7}",wm="\u212C",Mm="\u204F",Lm="\u223D",km="\u22CD",Pm="\u29C5",Bm="\\",Fm="\u27C8",Um="\u2022",Gm="\u2022",qm="\u224E",Ym="\u2AAE",zm="\u224F",$m="\u224E",Hm="\u224F",Vm="\u0106",Wm="\u0107",Km="\u2A44",Qm="\u2A49",Xm="\u2A4B",jm="\u2229",Zm="\u22D2",Jm="\u2A47",ef="\u2A40",tf="\u2145",nf="\u2229\uFE00",rf="\u2041",af="\u02C7",of="\u212D",sf="\u2A4D",lf="\u010C",cf="\u010D",uf="\xC7",df="\xE7",_f="\u0108",pf="\u0109",mf="\u2230",ff="\u2A4C",gf="\u2A50",hf="\u010A",Ef="\u010B",Sf="\xB8",bf="\xB8",vf="\u29B2",Tf="\xA2",yf="\xB7",Cf="\xB7",Rf="\u{1D520}",Nf="\u212D",Of="\u0427",Af="\u0447",If="\u2713",Df="\u2713",xf="\u03A7",wf="\u03C7",Mf="\u02C6",Lf="\u2257",kf="\u21BA",Pf="\u21BB",Bf="\u229B",Ff="\u229A",Uf="\u229D",Gf="\u2299",qf="\xAE",Yf="\u24C8",zf="\u2296",$f="\u2295",Hf="\u2297",Vf="\u25CB",Wf="\u29C3",Kf="\u2257",Qf="\u2A10",Xf="\u2AEF",jf="\u29C2",Zf="\u2232",Jf="\u201D",e0="\u2019",t0="\u2663",n0="\u2663",r0=":",i0="\u2237",a0="\u2A74",o0="\u2254",s0="\u2254",l0=",",c0="@",u0="\u2201",d0="\u2218",_0="\u2201",p0="\u2102",m0="\u2245",f0="\u2A6D",g0="\u2261",h0="\u222E",E0="\u222F",S0="\u222E",b0="\u{1D554}",v0="\u2102",T0="\u2210",y0="\u2210",C0="\xA9",R0="\xA9",N0="\u2117",O0="\u2233",A0="\u21B5",I0="\u2717",D0="\u2A2F",x0="\u{1D49E}",w0="\u{1D4B8}",M0="\u2ACF",L0="\u2AD1",k0="\u2AD0",P0="\u2AD2",B0="\u22EF",F0="\u2938",U0="\u2935",G0="\u22DE",q0="\u22DF",Y0="\u21B6",z0="\u293D",$0="\u2A48",H0="\u2A46",V0="\u224D",W0="\u222A",K0="\u22D3",Q0="\u2A4A",X0="\u228D",j0="\u2A45",Z0="\u222A\uFE00",J0="\u21B7",eg="\u293C",tg="\u22DE",ng="\u22DF",rg="\u22CE",ig="\u22CF",ag="\xA4",og="\u21B6",sg="\u21B7",lg="\u22CE",cg="\u22CF",ug="\u2232",dg="\u2231",_g="\u232D",pg="\u2020",mg="\u2021",fg="\u2138",gg="\u2193",hg="\u21A1",Eg="\u21D3",Sg="\u2010",bg="\u2AE4",vg="\u22A3",Tg="\u290F",yg="\u02DD",Cg="\u010E",Rg="\u010F",Ng="\u0414",Og="\u0434",Ag="\u2021",Ig="\u21CA",Dg="\u2145",xg="\u2146",wg="\u2911",Mg="\u2A77",Lg="\xB0",kg="\u2207",Pg="\u0394",Bg="\u03B4",Fg="\u29B1",Ug="\u297F",Gg="\u{1D507}",qg="\u{1D521}",Yg="\u2965",zg="\u21C3",$g="\u21C2",Hg="\xB4",Vg="\u02D9",Wg="\u02DD",Kg="`",Qg="\u02DC",Xg="\u22C4",jg="\u22C4",Zg="\u22C4",Jg="\u2666",eh="\u2666",th="\xA8",nh="\u2146",rh="\u03DD",ih="\u22F2",ah="\xF7",oh="\xF7",sh="\u22C7",lh="\u22C7",ch="\u0402",uh="\u0452",dh="\u231E",_h="\u230D",ph="$",mh="\u{1D53B}",fh="\u{1D555}",gh="\xA8",hh="\u02D9",Eh="\u20DC",Sh="\u2250",bh="\u2251",vh="\u2250",Th="\u2238",yh="\u2214",Ch="\u22A1",Rh="\u2306",Nh="\u222F",Oh="\xA8",Ah="\u21D3",Ih="\u21D0",Dh="\u21D4",xh="\u2AE4",wh="\u27F8",Mh="\u27FA",Lh="\u27F9",kh="\u21D2",Ph="\u22A8",Bh="\u21D1",Fh="\u21D5",Uh="\u2225",Gh="\u2913",qh="\u2193",Yh="\u2193",zh="\u21D3",$h="\u21F5",Hh="\u0311",Vh="\u21CA",Wh="\u21C3",Kh="\u21C2",Qh="\u2950",Xh="\u295E",jh="\u2956",Zh="\u21BD",Jh="\u295F",eE="\u2957",tE="\u21C1",nE="\u21A7",rE="\u22A4",iE="\u2910",aE="\u231F",oE="\u230C",sE="\u{1D49F}",lE="\u{1D4B9}",cE="\u0405",uE="\u0455",dE="\u29F6",_E="\u0110",pE="\u0111",mE="\u22F1",fE="\u25BF",gE="\u25BE",hE="\u21F5",EE="\u296F",SE="\u29A6",bE="\u040F",vE="\u045F",TE="\u27FF",yE="\xC9",CE="\xE9",RE="\u2A6E",NE="\u011A",OE="\u011B",AE="\xCA",IE="\xEA",DE="\u2256",xE="\u2255",wE="\u042D",ME="\u044D",LE="\u2A77",kE="\u0116",PE="\u0117",BE="\u2251",FE="\u2147",UE="\u2252",GE="\u{1D508}",qE="\u{1D522}",YE="\u2A9A",zE="\xC8",$E="\xE8",HE="\u2A96",VE="\u2A98",WE="\u2A99",KE="\u2208",QE="\u23E7",XE="\u2113",jE="\u2A95",ZE="\u2A97",JE="\u0112",eS="\u0113",tS="\u2205",nS="\u2205",rS="\u25FB",iS="\u2205",aS="\u25AB",oS="\u2004",sS="\u2005",lS="\u2003",cS="\u014A",uS="\u014B",dS="\u2002",_S="\u0118",pS="\u0119",mS="\u{1D53C}",fS="\u{1D556}",gS="\u22D5",hS="\u29E3",ES="\u2A71",SS="\u03B5",bS="\u0395",vS="\u03B5",TS="\u03F5",yS="\u2256",CS="\u2255",RS="\u2242",NS="\u2A96",OS="\u2A95",AS="\u2A75",IS="=",DS="\u2242",xS="\u225F",wS="\u21CC",MS="\u2261",LS="\u2A78",kS="\u29E5",PS="\u2971",BS="\u2253",FS="\u212F",US="\u2130",GS="\u2250",qS="\u2A73",YS="\u2242",zS="\u0397",$S="\u03B7",HS="\xD0",VS="\xF0",WS="\xCB",KS="\xEB",QS="\u20AC",XS="!",jS="\u2203",ZS="\u2203",JS="\u2130",eb="\u2147",tb="\u2147",nb="\u2252",rb="\u0424",ib="\u0444",ab="\u2640",ob="\uFB03",sb="\uFB00",lb="\uFB04",cb="\u{1D509}",ub="\u{1D523}",db="\uFB01",_b="\u25FC",pb="\u25AA",mb="fj",fb="\u266D",gb="\uFB02",hb="\u25B1",Eb="\u0192",Sb="\u{1D53D}",bb="\u{1D557}",vb="\u2200",Tb="\u2200",yb="\u22D4",Cb="\u2AD9",Rb="\u2131",Nb="\u2A0D",Ob="\xBD",Ab="\u2153",Ib="\xBC",Db="\u2155",xb="\u2159",wb="\u215B",Mb="\u2154",Lb="\u2156",kb="\xBE",Pb="\u2157",Bb="\u215C",Fb="\u2158",Ub="\u215A",Gb="\u215D",qb="\u215E",Yb="\u2044",zb="\u2322",$b="\u{1D4BB}",Hb="\u2131",Vb="\u01F5",Wb="\u0393",Kb="\u03B3",Qb="\u03DC",Xb="\u03DD",jb="\u2A86",Zb="\u011E",Jb="\u011F",ev="\u0122",tv="\u011C",nv="\u011D",rv="\u0413",iv="\u0433",av="\u0120",ov="\u0121",sv="\u2265",lv="\u2267",cv="\u2A8C",uv="\u22DB",dv="\u2265",_v="\u2267",pv="\u2A7E",mv="\u2AA9",fv="\u2A7E",gv="\u2A80",hv="\u2A82",Ev="\u2A84",Sv="\u22DB\uFE00",bv="\u2A94",vv="\u{1D50A}",Tv="\u{1D524}",yv="\u226B",Cv="\u22D9",Rv="\u22D9",Nv="\u2137",Ov="\u0403",Av="\u0453",Iv="\u2AA5",Dv="\u2277",xv="\u2A92",wv="\u2AA4",Mv="\u2A8A",Lv="\u2A8A",kv="\u2A88",Pv="\u2269",Bv="\u2A88",Fv="\u2269",Uv="\u22E7",Gv="\u{1D53E}",qv="\u{1D558}",Yv="`",zv="\u2265",$v="\u22DB",Hv="\u2267",Vv="\u2AA2",Wv="\u2277",Kv="\u2A7E",Qv="\u2273",Xv="\u{1D4A2}",jv="\u210A",Zv="\u2273",Jv="\u2A8E",eT="\u2A90",tT="\u2AA7",nT="\u2A7A",rT=">",iT=">",aT="\u226B",oT="\u22D7",sT="\u2995",lT="\u2A7C",cT="\u2A86",uT="\u2978",dT="\u22D7",_T="\u22DB",pT="\u2A8C",mT="\u2277",fT="\u2273",gT="\u2269\uFE00",hT="\u2269\uFE00",ET="\u02C7",ST="\u200A",bT="\xBD",vT="\u210B",TT="\u042A",yT="\u044A",CT="\u2948",RT="\u2194",NT="\u21D4",OT="\u21AD",AT="^",IT="\u210F",DT="\u0124",xT="\u0125",wT="\u2665",MT="\u2665",LT="\u2026",kT="\u22B9",PT="\u{1D525}",BT="\u210C",FT="\u210B",UT="\u2925",GT="\u2926",qT="\u21FF",YT="\u223B",zT="\u21A9",$T="\u21AA",HT="\u{1D559}",VT="\u210D",WT="\u2015",KT="\u2500",QT="\u{1D4BD}",XT="\u210B",jT="\u210F",ZT="\u0126",JT="\u0127",ey="\u224E",ty="\u224F",ny="\u2043",ry="\u2010",iy="\xCD",ay="\xED",oy="\u2063",sy="\xCE",ly="\xEE",cy="\u0418",uy="\u0438",dy="\u0130",_y="\u0415",py="\u0435",my="\xA1",fy="\u21D4",gy="\u{1D526}",hy="\u2111",Ey="\xCC",Sy="\xEC",by="\u2148",vy="\u2A0C",Ty="\u222D",yy="\u29DC",Cy="\u2129",Ry="\u0132",Ny="\u0133",Oy="\u012A",Ay="\u012B",Iy="\u2111",Dy="\u2148",xy="\u2110",wy="\u2111",My="\u0131",Ly="\u2111",ky="\u22B7",Py="\u01B5",By="\u21D2",Fy="\u2105",Uy="\u221E",Gy="\u29DD",qy="\u0131",Yy="\u22BA",zy="\u222B",$y="\u222C",Hy="\u2124",Vy="\u222B",Wy="\u22BA",Ky="\u22C2",Qy="\u2A17",Xy="\u2A3C",jy="\u2063",Zy="\u2062",Jy="\u0401",e1="\u0451",t1="\u012E",n1="\u012F",r1="\u{1D540}",i1="\u{1D55A}",a1="\u0399",o1="\u03B9",s1="\u2A3C",l1="\xBF",c1="\u{1D4BE}",u1="\u2110",d1="\u2208",_1="\u22F5",p1="\u22F9",m1="\u22F4",f1="\u22F3",g1="\u2208",h1="\u2062",E1="\u0128",S1="\u0129",b1="\u0406",v1="\u0456",T1="\xCF",y1="\xEF",C1="\u0134",R1="\u0135",N1="\u0419",O1="\u0439",A1="\u{1D50D}",I1="\u{1D527}",D1="\u0237",x1="\u{1D541}",w1="\u{1D55B}",M1="\u{1D4A5}",L1="\u{1D4BF}",k1="\u0408",P1="\u0458",B1="\u0404",F1="\u0454",U1="\u039A",G1="\u03BA",q1="\u03F0",Y1="\u0136",z1="\u0137",$1="\u041A",H1="\u043A",V1="\u{1D50E}",W1="\u{1D528}",K1="\u0138",Q1="\u0425",X1="\u0445",j1="\u040C",Z1="\u045C",J1="\u{1D542}",eC="\u{1D55C}",tC="\u{1D4A6}",nC="\u{1D4C0}",rC="\u21DA",iC="\u0139",aC="\u013A",oC="\u29B4",sC="\u2112",lC="\u039B",cC="\u03BB",uC="\u27E8",dC="\u27EA",_C="\u2991",pC="\u27E8",mC="\u2A85",fC="\u2112",gC="\xAB",hC="\u21E4",EC="\u291F",SC="\u2190",bC="\u219E",vC="\u21D0",TC="\u291D",yC="\u21A9",CC="\u21AB",RC="\u2939",NC="\u2973",OC="\u21A2",AC="\u2919",IC="\u291B",DC="\u2AAB",xC="\u2AAD",wC="\u2AAD\uFE00",MC="\u290C",LC="\u290E",kC="\u2772",PC="{",BC="[",FC="\u298B",UC="\u298F",GC="\u298D",qC="\u013D",YC="\u013E",zC="\u013B",$C="\u013C",HC="\u2308",VC="{",WC="\u041B",KC="\u043B",QC="\u2936",XC="\u201C",jC="\u201E",ZC="\u2967",JC="\u294B",eR="\u21B2",tR="\u2264",nR="\u2266",rR="\u27E8",iR="\u21E4",aR="\u2190",oR="\u2190",sR="\u21D0",lR="\u21C6",cR="\u21A2",uR="\u2308",dR="\u27E6",_R="\u2961",pR="\u2959",mR="\u21C3",fR="\u230A",gR="\u21BD",hR="\u21BC",ER="\u21C7",SR="\u2194",bR="\u2194",vR="\u21D4",TR="\u21C6",yR="\u21CB",CR="\u21AD",RR="\u294E",NR="\u21A4",OR="\u22A3",AR="\u295A",IR="\u22CB",DR="\u29CF",xR="\u22B2",wR="\u22B4",MR="\u2951",LR="\u2960",kR="\u2958",PR="\u21BF",BR="\u2952",FR="\u21BC",UR="\u2A8B",GR="\u22DA",qR="\u2264",YR="\u2266",zR="\u2A7D",$R="\u2AA8",HR="\u2A7D",VR="\u2A7F",WR="\u2A81",KR="\u2A83",QR="\u22DA\uFE00",XR="\u2A93",jR="\u2A85",ZR="\u22D6",JR="\u22DA",eN="\u2A8B",tN="\u22DA",nN="\u2266",rN="\u2276",iN="\u2276",aN="\u2AA1",oN="\u2272",sN="\u2A7D",lN="\u2272",cN="\u297C",uN="\u230A",dN="\u{1D50F}",_N="\u{1D529}",pN="\u2276",mN="\u2A91",fN="\u2962",gN="\u21BD",hN="\u21BC",EN="\u296A",SN="\u2584",bN="\u0409",vN="\u0459",TN="\u21C7",yN="\u226A",CN="\u22D8",RN="\u231E",NN="\u21DA",ON="\u296B",AN="\u25FA",IN="\u013F",DN="\u0140",xN="\u23B0",wN="\u23B0",MN="\u2A89",LN="\u2A89",kN="\u2A87",PN="\u2268",BN="\u2A87",FN="\u2268",UN="\u22E6",GN="\u27EC",qN="\u21FD",YN="\u27E6",zN="\u27F5",$N="\u27F5",HN="\u27F8",VN="\u27F7",WN="\u27F7",KN="\u27FA",QN="\u27FC",XN="\u27F6",jN="\u27F6",ZN="\u27F9",JN="\u21AB",eO="\u21AC",tO="\u2985",nO="\u{1D543}",rO="\u{1D55D}",iO="\u2A2D",aO="\u2A34",oO="\u2217",sO="_",lO="\u2199",cO="\u2198",uO="\u25CA",dO="\u25CA",_O="\u29EB",pO="(",mO="\u2993",fO="\u21C6",gO="\u231F",hO="\u21CB",EO="\u296D",SO="\u200E",bO="\u22BF",vO="\u2039",TO="\u{1D4C1}",yO="\u2112",CO="\u21B0",RO="\u21B0",NO="\u2272",OO="\u2A8D",AO="\u2A8F",IO="[",DO="\u2018",xO="\u201A",wO="\u0141",MO="\u0142",LO="\u2AA6",kO="\u2A79",PO="<",BO="<",FO="\u226A",UO="\u22D6",GO="\u22CB",qO="\u22C9",YO="\u2976",zO="\u2A7B",$O="\u25C3",HO="\u22B4",VO="\u25C2",WO="\u2996",KO="\u294A",QO="\u2966",XO="\u2268\uFE00",jO="\u2268\uFE00",ZO="\xAF",JO="\u2642",eA="\u2720",tA="\u2720",nA="\u21A6",rA="\u21A6",iA="\u21A7",aA="\u21A4",oA="\u21A5",sA="\u25AE",lA="\u2A29",cA="\u041C",uA="\u043C",dA="\u2014",_A="\u223A",pA="\u2221",mA="\u205F",fA="\u2133",gA="\u{1D510}",hA="\u{1D52A}",EA="\u2127",SA="\xB5",bA="*",vA="\u2AF0",TA="\u2223",yA="\xB7",CA="\u229F",RA="\u2212",NA="\u2238",OA="\u2A2A",AA="\u2213",IA="\u2ADB",DA="\u2026",xA="\u2213",wA="\u22A7",MA="\u{1D544}",LA="\u{1D55E}",kA="\u2213",PA="\u{1D4C2}",BA="\u2133",FA="\u223E",UA="\u039C",GA="\u03BC",qA="\u22B8",YA="\u22B8",zA="\u2207",HA="\u0143",VA="\u0144",WA="\u2220\u20D2",KA="\u2249",QA="\u2A70\u0338",XA="\u224B\u0338",jA="\u0149",ZA="\u2249",JA="\u266E",eI="\u2115",tI="\u266E",nI="\xA0",rI="\u224E\u0338",iI="\u224F\u0338",aI="\u2A43",oI="\u0147",sI="\u0148",lI="\u0145",cI="\u0146",uI="\u2247",dI="\u2A6D\u0338",_I="\u2A42",pI="\u041D",mI="\u043D",fI="\u2013",gI="\u2924",hI="\u2197",EI="\u21D7",SI="\u2197",bI="\u2260",vI="\u2250\u0338",TI="\u200B",yI="\u200B",CI="\u200B",RI="\u200B",NI="\u2262",OI="\u2928",AI="\u2242\u0338",II="\u226B",DI="\u226A",xI=` +import{n as Kt,g as qu,c as Ya,m as Wn,a as Nl,b as _i,d as Yu,e as zu,r as $u,V as Hu,i as Vu}from"./app.6fb8fe77.js";import{l as za}from"./longpress.43ca7fd9.js";import{D as Wu}from"./index.ab28c92e.js";import{U as Ol}from"./UserSelect.4fa9cbd2.js";import{I as Ku}from"./ImgUpload.056f7090.js";import Qu from"./details.eb8631f5.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)}})])])])])},ju=[];const Zu={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)],f=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 ${f} 1 ${d[2][0]} ${d[2][1]} L ${d[3][0]} ${d[3][1]} A ${r} ${r} 0 ${f} 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))}}},vs={};var Ju=Kt(Zu,Xu,ju,!1,ed,null,null,null);function ed(e){for(let t in vs)this[t]=vs[t]}var td=function(){return Ju.exports}();var Ze={};const nd="\xC1",rd="\xE1",id="\u0102",ad="\u0103",od="\u223E",sd="\u223F",ld="\u223E\u0333",cd="\xC2",ud="\xE2",dd="\xB4",_d="\u0410",pd="\u0430",md="\xC6",fd="\xE6",gd="\u2061",hd="\u{1D504}",Ed="\u{1D51E}",Sd="\xC0",bd="\xE0",vd="\u2135",Td="\u2135",yd="\u0391",Cd="\u03B1",Rd="\u0100",Nd="\u0101",Od="\u2A3F",Ad="&",Id="&",Dd="\u2A55",xd="\u2A53",wd="\u2227",Md="\u2A5C",Ld="\u2A58",kd="\u2A5A",Pd="\u2220",Bd="\u29A4",Fd="\u2220",Ud="\u29A8",Gd="\u29A9",qd="\u29AA",Yd="\u29AB",zd="\u29AC",$d="\u29AD",Hd="\u29AE",Vd="\u29AF",Wd="\u2221",Kd="\u221F",Qd="\u22BE",Xd="\u299D",jd="\u2222",Zd="\xC5",Jd="\u237C",e_="\u0104",t_="\u0105",n_="\u{1D538}",r_="\u{1D552}",i_="\u2A6F",a_="\u2248",o_="\u2A70",s_="\u224A",l_="\u224B",c_="'",u_="\u2061",d_="\u2248",__="\u224A",p_="\xC5",m_="\xE5",f_="\u{1D49C}",g_="\u{1D4B6}",h_="\u2254",E_="*",S_="\u2248",b_="\u224D",v_="\xC3",T_="\xE3",y_="\xC4",C_="\xE4",R_="\u2233",N_="\u2A11",O_="\u224C",A_="\u03F6",I_="\u2035",D_="\u223D",x_="\u22CD",w_="\u2216",M_="\u2AE7",L_="\u22BD",k_="\u2305",P_="\u2306",B_="\u2305",F_="\u23B5",U_="\u23B6",G_="\u224C",q_="\u0411",Y_="\u0431",z_="\u201E",$_="\u2235",H_="\u2235",V_="\u2235",W_="\u29B0",K_="\u03F6",Q_="\u212C",X_="\u212C",j_="\u0392",Z_="\u03B2",J_="\u2136",ep="\u226C",tp="\u{1D505}",np="\u{1D51F}",rp="\u22C2",ip="\u25EF",ap="\u22C3",op="\u2A00",sp="\u2A01",lp="\u2A02",cp="\u2A06",up="\u2605",dp="\u25BD",_p="\u25B3",pp="\u2A04",mp="\u22C1",fp="\u22C0",gp="\u290D",hp="\u29EB",Ep="\u25AA",Sp="\u25B4",bp="\u25BE",vp="\u25C2",Tp="\u25B8",yp="\u2423",Cp="\u2592",Rp="\u2591",Np="\u2593",Op="\u2588",Ap="=\u20E5",Ip="\u2261\u20E5",Dp="\u2AED",xp="\u2310",wp="\u{1D539}",Mp="\u{1D553}",Lp="\u22A5",kp="\u22A5",Pp="\u22C8",Bp="\u29C9",Fp="\u2510",Up="\u2555",Gp="\u2556",qp="\u2557",Yp="\u250C",zp="\u2552",$p="\u2553",Hp="\u2554",Vp="\u2500",Wp="\u2550",Kp="\u252C",Qp="\u2564",Xp="\u2565",jp="\u2566",Zp="\u2534",Jp="\u2567",em="\u2568",tm="\u2569",nm="\u229F",rm="\u229E",im="\u22A0",am="\u2518",om="\u255B",sm="\u255C",lm="\u255D",cm="\u2514",um="\u2558",dm="\u2559",_m="\u255A",pm="\u2502",mm="\u2551",fm="\u253C",gm="\u256A",hm="\u256B",Em="\u256C",Sm="\u2524",bm="\u2561",vm="\u2562",Tm="\u2563",ym="\u251C",Cm="\u255E",Rm="\u255F",Nm="\u2560",Om="\u2035",Am="\u02D8",Im="\u02D8",Dm="\xA6",xm="\u{1D4B7}",wm="\u212C",Mm="\u204F",Lm="\u223D",km="\u22CD",Pm="\u29C5",Bm="\\",Fm="\u27C8",Um="\u2022",Gm="\u2022",qm="\u224E",Ym="\u2AAE",zm="\u224F",$m="\u224E",Hm="\u224F",Vm="\u0106",Wm="\u0107",Km="\u2A44",Qm="\u2A49",Xm="\u2A4B",jm="\u2229",Zm="\u22D2",Jm="\u2A47",ef="\u2A40",tf="\u2145",nf="\u2229\uFE00",rf="\u2041",af="\u02C7",of="\u212D",sf="\u2A4D",lf="\u010C",cf="\u010D",uf="\xC7",df="\xE7",_f="\u0108",pf="\u0109",mf="\u2230",ff="\u2A4C",gf="\u2A50",hf="\u010A",Ef="\u010B",Sf="\xB8",bf="\xB8",vf="\u29B2",Tf="\xA2",yf="\xB7",Cf="\xB7",Rf="\u{1D520}",Nf="\u212D",Of="\u0427",Af="\u0447",If="\u2713",Df="\u2713",xf="\u03A7",wf="\u03C7",Mf="\u02C6",Lf="\u2257",kf="\u21BA",Pf="\u21BB",Bf="\u229B",Ff="\u229A",Uf="\u229D",Gf="\u2299",qf="\xAE",Yf="\u24C8",zf="\u2296",$f="\u2295",Hf="\u2297",Vf="\u25CB",Wf="\u29C3",Kf="\u2257",Qf="\u2A10",Xf="\u2AEF",jf="\u29C2",Zf="\u2232",Jf="\u201D",e0="\u2019",t0="\u2663",n0="\u2663",r0=":",i0="\u2237",a0="\u2A74",o0="\u2254",s0="\u2254",l0=",",c0="@",u0="\u2201",d0="\u2218",_0="\u2201",p0="\u2102",m0="\u2245",f0="\u2A6D",g0="\u2261",h0="\u222E",E0="\u222F",S0="\u222E",b0="\u{1D554}",v0="\u2102",T0="\u2210",y0="\u2210",C0="\xA9",R0="\xA9",N0="\u2117",O0="\u2233",A0="\u21B5",I0="\u2717",D0="\u2A2F",x0="\u{1D49E}",w0="\u{1D4B8}",M0="\u2ACF",L0="\u2AD1",k0="\u2AD0",P0="\u2AD2",B0="\u22EF",F0="\u2938",U0="\u2935",G0="\u22DE",q0="\u22DF",Y0="\u21B6",z0="\u293D",$0="\u2A48",H0="\u2A46",V0="\u224D",W0="\u222A",K0="\u22D3",Q0="\u2A4A",X0="\u228D",j0="\u2A45",Z0="\u222A\uFE00",J0="\u21B7",eg="\u293C",tg="\u22DE",ng="\u22DF",rg="\u22CE",ig="\u22CF",ag="\xA4",og="\u21B6",sg="\u21B7",lg="\u22CE",cg="\u22CF",ug="\u2232",dg="\u2231",_g="\u232D",pg="\u2020",mg="\u2021",fg="\u2138",gg="\u2193",hg="\u21A1",Eg="\u21D3",Sg="\u2010",bg="\u2AE4",vg="\u22A3",Tg="\u290F",yg="\u02DD",Cg="\u010E",Rg="\u010F",Ng="\u0414",Og="\u0434",Ag="\u2021",Ig="\u21CA",Dg="\u2145",xg="\u2146",wg="\u2911",Mg="\u2A77",Lg="\xB0",kg="\u2207",Pg="\u0394",Bg="\u03B4",Fg="\u29B1",Ug="\u297F",Gg="\u{1D507}",qg="\u{1D521}",Yg="\u2965",zg="\u21C3",$g="\u21C2",Hg="\xB4",Vg="\u02D9",Wg="\u02DD",Kg="`",Qg="\u02DC",Xg="\u22C4",jg="\u22C4",Zg="\u22C4",Jg="\u2666",eh="\u2666",th="\xA8",nh="\u2146",rh="\u03DD",ih="\u22F2",ah="\xF7",oh="\xF7",sh="\u22C7",lh="\u22C7",ch="\u0402",uh="\u0452",dh="\u231E",_h="\u230D",ph="$",mh="\u{1D53B}",fh="\u{1D555}",gh="\xA8",hh="\u02D9",Eh="\u20DC",Sh="\u2250",bh="\u2251",vh="\u2250",Th="\u2238",yh="\u2214",Ch="\u22A1",Rh="\u2306",Nh="\u222F",Oh="\xA8",Ah="\u21D3",Ih="\u21D0",Dh="\u21D4",xh="\u2AE4",wh="\u27F8",Mh="\u27FA",Lh="\u27F9",kh="\u21D2",Ph="\u22A8",Bh="\u21D1",Fh="\u21D5",Uh="\u2225",Gh="\u2913",qh="\u2193",Yh="\u2193",zh="\u21D3",$h="\u21F5",Hh="\u0311",Vh="\u21CA",Wh="\u21C3",Kh="\u21C2",Qh="\u2950",Xh="\u295E",jh="\u2956",Zh="\u21BD",Jh="\u295F",eE="\u2957",tE="\u21C1",nE="\u21A7",rE="\u22A4",iE="\u2910",aE="\u231F",oE="\u230C",sE="\u{1D49F}",lE="\u{1D4B9}",cE="\u0405",uE="\u0455",dE="\u29F6",_E="\u0110",pE="\u0111",mE="\u22F1",fE="\u25BF",gE="\u25BE",hE="\u21F5",EE="\u296F",SE="\u29A6",bE="\u040F",vE="\u045F",TE="\u27FF",yE="\xC9",CE="\xE9",RE="\u2A6E",NE="\u011A",OE="\u011B",AE="\xCA",IE="\xEA",DE="\u2256",xE="\u2255",wE="\u042D",ME="\u044D",LE="\u2A77",kE="\u0116",PE="\u0117",BE="\u2251",FE="\u2147",UE="\u2252",GE="\u{1D508}",qE="\u{1D522}",YE="\u2A9A",zE="\xC8",$E="\xE8",HE="\u2A96",VE="\u2A98",WE="\u2A99",KE="\u2208",QE="\u23E7",XE="\u2113",jE="\u2A95",ZE="\u2A97",JE="\u0112",eS="\u0113",tS="\u2205",nS="\u2205",rS="\u25FB",iS="\u2205",aS="\u25AB",oS="\u2004",sS="\u2005",lS="\u2003",cS="\u014A",uS="\u014B",dS="\u2002",_S="\u0118",pS="\u0119",mS="\u{1D53C}",fS="\u{1D556}",gS="\u22D5",hS="\u29E3",ES="\u2A71",SS="\u03B5",bS="\u0395",vS="\u03B5",TS="\u03F5",yS="\u2256",CS="\u2255",RS="\u2242",NS="\u2A96",OS="\u2A95",AS="\u2A75",IS="=",DS="\u2242",xS="\u225F",wS="\u21CC",MS="\u2261",LS="\u2A78",kS="\u29E5",PS="\u2971",BS="\u2253",FS="\u212F",US="\u2130",GS="\u2250",qS="\u2A73",YS="\u2242",zS="\u0397",$S="\u03B7",HS="\xD0",VS="\xF0",WS="\xCB",KS="\xEB",QS="\u20AC",XS="!",jS="\u2203",ZS="\u2203",JS="\u2130",eb="\u2147",tb="\u2147",nb="\u2252",rb="\u0424",ib="\u0444",ab="\u2640",ob="\uFB03",sb="\uFB00",lb="\uFB04",cb="\u{1D509}",ub="\u{1D523}",db="\uFB01",_b="\u25FC",pb="\u25AA",mb="fj",fb="\u266D",gb="\uFB02",hb="\u25B1",Eb="\u0192",Sb="\u{1D53D}",bb="\u{1D557}",vb="\u2200",Tb="\u2200",yb="\u22D4",Cb="\u2AD9",Rb="\u2131",Nb="\u2A0D",Ob="\xBD",Ab="\u2153",Ib="\xBC",Db="\u2155",xb="\u2159",wb="\u215B",Mb="\u2154",Lb="\u2156",kb="\xBE",Pb="\u2157",Bb="\u215C",Fb="\u2158",Ub="\u215A",Gb="\u215D",qb="\u215E",Yb="\u2044",zb="\u2322",$b="\u{1D4BB}",Hb="\u2131",Vb="\u01F5",Wb="\u0393",Kb="\u03B3",Qb="\u03DC",Xb="\u03DD",jb="\u2A86",Zb="\u011E",Jb="\u011F",ev="\u0122",tv="\u011C",nv="\u011D",rv="\u0413",iv="\u0433",av="\u0120",ov="\u0121",sv="\u2265",lv="\u2267",cv="\u2A8C",uv="\u22DB",dv="\u2265",_v="\u2267",pv="\u2A7E",mv="\u2AA9",fv="\u2A7E",gv="\u2A80",hv="\u2A82",Ev="\u2A84",Sv="\u22DB\uFE00",bv="\u2A94",vv="\u{1D50A}",Tv="\u{1D524}",yv="\u226B",Cv="\u22D9",Rv="\u22D9",Nv="\u2137",Ov="\u0403",Av="\u0453",Iv="\u2AA5",Dv="\u2277",xv="\u2A92",wv="\u2AA4",Mv="\u2A8A",Lv="\u2A8A",kv="\u2A88",Pv="\u2269",Bv="\u2A88",Fv="\u2269",Uv="\u22E7",Gv="\u{1D53E}",qv="\u{1D558}",Yv="`",zv="\u2265",$v="\u22DB",Hv="\u2267",Vv="\u2AA2",Wv="\u2277",Kv="\u2A7E",Qv="\u2273",Xv="\u{1D4A2}",jv="\u210A",Zv="\u2273",Jv="\u2A8E",eT="\u2A90",tT="\u2AA7",nT="\u2A7A",rT=">",iT=">",aT="\u226B",oT="\u22D7",sT="\u2995",lT="\u2A7C",cT="\u2A86",uT="\u2978",dT="\u22D7",_T="\u22DB",pT="\u2A8C",mT="\u2277",fT="\u2273",gT="\u2269\uFE00",hT="\u2269\uFE00",ET="\u02C7",ST="\u200A",bT="\xBD",vT="\u210B",TT="\u042A",yT="\u044A",CT="\u2948",RT="\u2194",NT="\u21D4",OT="\u21AD",AT="^",IT="\u210F",DT="\u0124",xT="\u0125",wT="\u2665",MT="\u2665",LT="\u2026",kT="\u22B9",PT="\u{1D525}",BT="\u210C",FT="\u210B",UT="\u2925",GT="\u2926",qT="\u21FF",YT="\u223B",zT="\u21A9",$T="\u21AA",HT="\u{1D559}",VT="\u210D",WT="\u2015",KT="\u2500",QT="\u{1D4BD}",XT="\u210B",jT="\u210F",ZT="\u0126",JT="\u0127",ey="\u224E",ty="\u224F",ny="\u2043",ry="\u2010",iy="\xCD",ay="\xED",oy="\u2063",sy="\xCE",ly="\xEE",cy="\u0418",uy="\u0438",dy="\u0130",_y="\u0415",py="\u0435",my="\xA1",fy="\u21D4",gy="\u{1D526}",hy="\u2111",Ey="\xCC",Sy="\xEC",by="\u2148",vy="\u2A0C",Ty="\u222D",yy="\u29DC",Cy="\u2129",Ry="\u0132",Ny="\u0133",Oy="\u012A",Ay="\u012B",Iy="\u2111",Dy="\u2148",xy="\u2110",wy="\u2111",My="\u0131",Ly="\u2111",ky="\u22B7",Py="\u01B5",By="\u21D2",Fy="\u2105",Uy="\u221E",Gy="\u29DD",qy="\u0131",Yy="\u22BA",zy="\u222B",$y="\u222C",Hy="\u2124",Vy="\u222B",Wy="\u22BA",Ky="\u22C2",Qy="\u2A17",Xy="\u2A3C",jy="\u2063",Zy="\u2062",Jy="\u0401",e1="\u0451",t1="\u012E",n1="\u012F",r1="\u{1D540}",i1="\u{1D55A}",a1="\u0399",o1="\u03B9",s1="\u2A3C",l1="\xBF",c1="\u{1D4BE}",u1="\u2110",d1="\u2208",_1="\u22F5",p1="\u22F9",m1="\u22F4",f1="\u22F3",g1="\u2208",h1="\u2062",E1="\u0128",S1="\u0129",b1="\u0406",v1="\u0456",T1="\xCF",y1="\xEF",C1="\u0134",R1="\u0135",N1="\u0419",O1="\u0439",A1="\u{1D50D}",I1="\u{1D527}",D1="\u0237",x1="\u{1D541}",w1="\u{1D55B}",M1="\u{1D4A5}",L1="\u{1D4BF}",k1="\u0408",P1="\u0458",B1="\u0404",F1="\u0454",U1="\u039A",G1="\u03BA",q1="\u03F0",Y1="\u0136",z1="\u0137",$1="\u041A",H1="\u043A",V1="\u{1D50E}",W1="\u{1D528}",K1="\u0138",Q1="\u0425",X1="\u0445",j1="\u040C",Z1="\u045C",J1="\u{1D542}",eC="\u{1D55C}",tC="\u{1D4A6}",nC="\u{1D4C0}",rC="\u21DA",iC="\u0139",aC="\u013A",oC="\u29B4",sC="\u2112",lC="\u039B",cC="\u03BB",uC="\u27E8",dC="\u27EA",_C="\u2991",pC="\u27E8",mC="\u2A85",fC="\u2112",gC="\xAB",hC="\u21E4",EC="\u291F",SC="\u2190",bC="\u219E",vC="\u21D0",TC="\u291D",yC="\u21A9",CC="\u21AB",RC="\u2939",NC="\u2973",OC="\u21A2",AC="\u2919",IC="\u291B",DC="\u2AAB",xC="\u2AAD",wC="\u2AAD\uFE00",MC="\u290C",LC="\u290E",kC="\u2772",PC="{",BC="[",FC="\u298B",UC="\u298F",GC="\u298D",qC="\u013D",YC="\u013E",zC="\u013B",$C="\u013C",HC="\u2308",VC="{",WC="\u041B",KC="\u043B",QC="\u2936",XC="\u201C",jC="\u201E",ZC="\u2967",JC="\u294B",eR="\u21B2",tR="\u2264",nR="\u2266",rR="\u27E8",iR="\u21E4",aR="\u2190",oR="\u2190",sR="\u21D0",lR="\u21C6",cR="\u21A2",uR="\u2308",dR="\u27E6",_R="\u2961",pR="\u2959",mR="\u21C3",fR="\u230A",gR="\u21BD",hR="\u21BC",ER="\u21C7",SR="\u2194",bR="\u2194",vR="\u21D4",TR="\u21C6",yR="\u21CB",CR="\u21AD",RR="\u294E",NR="\u21A4",OR="\u22A3",AR="\u295A",IR="\u22CB",DR="\u29CF",xR="\u22B2",wR="\u22B4",MR="\u2951",LR="\u2960",kR="\u2958",PR="\u21BF",BR="\u2952",FR="\u21BC",UR="\u2A8B",GR="\u22DA",qR="\u2264",YR="\u2266",zR="\u2A7D",$R="\u2AA8",HR="\u2A7D",VR="\u2A7F",WR="\u2A81",KR="\u2A83",QR="\u22DA\uFE00",XR="\u2A93",jR="\u2A85",ZR="\u22D6",JR="\u22DA",eN="\u2A8B",tN="\u22DA",nN="\u2266",rN="\u2276",iN="\u2276",aN="\u2AA1",oN="\u2272",sN="\u2A7D",lN="\u2272",cN="\u297C",uN="\u230A",dN="\u{1D50F}",_N="\u{1D529}",pN="\u2276",mN="\u2A91",fN="\u2962",gN="\u21BD",hN="\u21BC",EN="\u296A",SN="\u2584",bN="\u0409",vN="\u0459",TN="\u21C7",yN="\u226A",CN="\u22D8",RN="\u231E",NN="\u21DA",ON="\u296B",AN="\u25FA",IN="\u013F",DN="\u0140",xN="\u23B0",wN="\u23B0",MN="\u2A89",LN="\u2A89",kN="\u2A87",PN="\u2268",BN="\u2A87",FN="\u2268",UN="\u22E6",GN="\u27EC",qN="\u21FD",YN="\u27E6",zN="\u27F5",$N="\u27F5",HN="\u27F8",VN="\u27F7",WN="\u27F7",KN="\u27FA",QN="\u27FC",XN="\u27F6",jN="\u27F6",ZN="\u27F9",JN="\u21AB",eO="\u21AC",tO="\u2985",nO="\u{1D543}",rO="\u{1D55D}",iO="\u2A2D",aO="\u2A34",oO="\u2217",sO="_",lO="\u2199",cO="\u2198",uO="\u25CA",dO="\u25CA",_O="\u29EB",pO="(",mO="\u2993",fO="\u21C6",gO="\u231F",hO="\u21CB",EO="\u296D",SO="\u200E",bO="\u22BF",vO="\u2039",TO="\u{1D4C1}",yO="\u2112",CO="\u21B0",RO="\u21B0",NO="\u2272",OO="\u2A8D",AO="\u2A8F",IO="[",DO="\u2018",xO="\u201A",wO="\u0141",MO="\u0142",LO="\u2AA6",kO="\u2A79",PO="<",BO="<",FO="\u226A",UO="\u22D6",GO="\u22CB",qO="\u22C9",YO="\u2976",zO="\u2A7B",$O="\u25C3",HO="\u22B4",VO="\u25C2",WO="\u2996",KO="\u294A",QO="\u2966",XO="\u2268\uFE00",jO="\u2268\uFE00",ZO="\xAF",JO="\u2642",eA="\u2720",tA="\u2720",nA="\u21A6",rA="\u21A6",iA="\u21A7",aA="\u21A4",oA="\u21A5",sA="\u25AE",lA="\u2A29",cA="\u041C",uA="\u043C",dA="\u2014",_A="\u223A",pA="\u2221",mA="\u205F",fA="\u2133",gA="\u{1D510}",hA="\u{1D52A}",EA="\u2127",SA="\xB5",bA="*",vA="\u2AF0",TA="\u2223",yA="\xB7",CA="\u229F",RA="\u2212",NA="\u2238",OA="\u2A2A",AA="\u2213",IA="\u2ADB",DA="\u2026",xA="\u2213",wA="\u22A7",MA="\u{1D544}",LA="\u{1D55E}",kA="\u2213",PA="\u{1D4C2}",BA="\u2133",FA="\u223E",UA="\u039C",GA="\u03BC",qA="\u22B8",YA="\u22B8",zA="\u2207",HA="\u0143",VA="\u0144",WA="\u2220\u20D2",KA="\u2249",QA="\u2A70\u0338",XA="\u224B\u0338",jA="\u0149",ZA="\u2249",JA="\u266E",eI="\u2115",tI="\u266E",nI="\xA0",rI="\u224E\u0338",iI="\u224F\u0338",aI="\u2A43",oI="\u0147",sI="\u0148",lI="\u0145",cI="\u0146",uI="\u2247",dI="\u2A6D\u0338",_I="\u2A42",pI="\u041D",mI="\u043D",fI="\u2013",gI="\u2924",hI="\u2197",EI="\u21D7",SI="\u2197",bI="\u2260",vI="\u2250\u0338",TI="\u200B",yI="\u200B",CI="\u200B",RI="\u200B",NI="\u2262",OI="\u2928",AI="\u2242\u0338",II="\u226B",DI="\u226A",xI=` `,wI="\u2204",MI="\u2204",LI="\u{1D511}",kI="\u{1D52B}",PI="\u2267\u0338",BI="\u2271",FI="\u2271",UI="\u2267\u0338",GI="\u2A7E\u0338",qI="\u2A7E\u0338",YI="\u22D9\u0338",zI="\u2275",$I="\u226B\u20D2",HI="\u226F",VI="\u226F",WI="\u226B\u0338",KI="\u21AE",QI="\u21CE",XI="\u2AF2",jI="\u220B",ZI="\u22FC",JI="\u22FA",eD="\u220B",tD="\u040A",nD="\u045A",rD="\u219A",iD="\u21CD",aD="\u2025",oD="\u2266\u0338",sD="\u2270",lD="\u219A",cD="\u21CD",uD="\u21AE",dD="\u21CE",_D="\u2270",pD="\u2266\u0338",mD="\u2A7D\u0338",fD="\u2A7D\u0338",gD="\u226E",hD="\u22D8\u0338",ED="\u2274",SD="\u226A\u20D2",bD="\u226E",vD="\u22EA",TD="\u22EC",yD="\u226A\u0338",CD="\u2224",RD="\u2060",ND="\xA0",OD="\u{1D55F}",AD="\u2115",ID="\u2AEC",DD="\xAC",xD="\u2262",wD="\u226D",MD="\u2226",LD="\u2209",kD="\u2260",PD="\u2242\u0338",BD="\u2204",FD="\u226F",UD="\u2271",GD="\u2267\u0338",qD="\u226B\u0338",YD="\u2279",zD="\u2A7E\u0338",$D="\u2275",HD="\u224E\u0338",VD="\u224F\u0338",WD="\u2209",KD="\u22F5\u0338",QD="\u22F9\u0338",XD="\u2209",jD="\u22F7",ZD="\u22F6",JD="\u29CF\u0338",ex="\u22EA",tx="\u22EC",nx="\u226E",rx="\u2270",ix="\u2278",ax="\u226A\u0338",ox="\u2A7D\u0338",sx="\u2274",lx="\u2AA2\u0338",cx="\u2AA1\u0338",ux="\u220C",dx="\u220C",_x="\u22FE",px="\u22FD",mx="\u2280",fx="\u2AAF\u0338",gx="\u22E0",hx="\u220C",Ex="\u29D0\u0338",Sx="\u22EB",bx="\u22ED",vx="\u228F\u0338",Tx="\u22E2",yx="\u2290\u0338",Cx="\u22E3",Rx="\u2282\u20D2",Nx="\u2288",Ox="\u2281",Ax="\u2AB0\u0338",Ix="\u22E1",Dx="\u227F\u0338",xx="\u2283\u20D2",wx="\u2289",Mx="\u2241",Lx="\u2244",kx="\u2247",Px="\u2249",Bx="\u2224",Fx="\u2226",Ux="\u2226",Gx="\u2AFD\u20E5",qx="\u2202\u0338",Yx="\u2A14",zx="\u2280",$x="\u22E0",Hx="\u2280",Vx="\u2AAF\u0338",Wx="\u2AAF\u0338",Kx="\u2933\u0338",Qx="\u219B",Xx="\u21CF",jx="\u219D\u0338",Zx="\u219B",Jx="\u21CF",ew="\u22EB",tw="\u22ED",nw="\u2281",rw="\u22E1",iw="\u2AB0\u0338",aw="\u{1D4A9}",ow="\u{1D4C3}",sw="\u2224",lw="\u2226",cw="\u2241",uw="\u2244",dw="\u2244",_w="\u2224",pw="\u2226",mw="\u22E2",fw="\u22E3",gw="\u2284",hw="\u2AC5\u0338",Ew="\u2288",Sw="\u2282\u20D2",bw="\u2288",vw="\u2AC5\u0338",Tw="\u2281",yw="\u2AB0\u0338",Cw="\u2285",Rw="\u2AC6\u0338",Nw="\u2289",Ow="\u2283\u20D2",Aw="\u2289",Iw="\u2AC6\u0338",Dw="\u2279",xw="\xD1",ww="\xF1",Mw="\u2278",Lw="\u22EA",kw="\u22EC",Pw="\u22EB",Bw="\u22ED",Fw="\u039D",Uw="\u03BD",Gw="#",qw="\u2116",Yw="\u2007",zw="\u224D\u20D2",$w="\u22AC",Hw="\u22AD",Vw="\u22AE",Ww="\u22AF",Kw="\u2265\u20D2",Qw=">\u20D2",Xw="\u2904",jw="\u29DE",Zw="\u2902",Jw="\u2264\u20D2",e2="<\u20D2",t2="\u22B4\u20D2",n2="\u2903",r2="\u22B5\u20D2",i2="\u223C\u20D2",a2="\u2923",o2="\u2196",s2="\u21D6",l2="\u2196",c2="\u2927",u2="\xD3",d2="\xF3",_2="\u229B",p2="\xD4",m2="\xF4",f2="\u229A",g2="\u041E",h2="\u043E",E2="\u229D",S2="\u0150",b2="\u0151",v2="\u2A38",T2="\u2299",y2="\u29BC",C2="\u0152",R2="\u0153",N2="\u29BF",O2="\u{1D512}",A2="\u{1D52C}",I2="\u02DB",D2="\xD2",x2="\xF2",w2="\u29C1",M2="\u29B5",L2="\u03A9",k2="\u222E",P2="\u21BA",B2="\u29BE",F2="\u29BB",U2="\u203E",G2="\u29C0",q2="\u014C",Y2="\u014D",z2="\u03A9",$2="\u03C9",H2="\u039F",V2="\u03BF",W2="\u29B6",K2="\u2296",Q2="\u{1D546}",X2="\u{1D560}",j2="\u29B7",Z2="\u201C",J2="\u2018",eM="\u29B9",tM="\u2295",nM="\u21BB",rM="\u2A54",iM="\u2228",aM="\u2A5D",oM="\u2134",sM="\u2134",lM="\xAA",cM="\xBA",uM="\u22B6",dM="\u2A56",_M="\u2A57",pM="\u2A5B",mM="\u24C8",fM="\u{1D4AA}",gM="\u2134",hM="\xD8",EM="\xF8",SM="\u2298",bM="\xD5",vM="\xF5",TM="\u2A36",yM="\u2A37",CM="\u2297",RM="\xD6",NM="\xF6",OM="\u233D",AM="\u203E",IM="\u23DE",DM="\u23B4",xM="\u23DC",wM="\xB6",MM="\u2225",LM="\u2225",kM="\u2AF3",PM="\u2AFD",BM="\u2202",FM="\u2202",UM="\u041F",GM="\u043F",qM="%",YM=".",zM="\u2030",$M="\u22A5",HM="\u2031",VM="\u{1D513}",WM="\u{1D52D}",KM="\u03A6",QM="\u03C6",XM="\u03D5",jM="\u2133",ZM="\u260E",JM="\u03A0",e4="\u03C0",t4="\u22D4",n4="\u03D6",r4="\u210F",i4="\u210E",a4="\u210F",o4="\u2A23",s4="\u229E",l4="\u2A22",c4="+",u4="\u2214",d4="\u2A25",_4="\u2A72",p4="\xB1",m4="\xB1",f4="\u2A26",g4="\u2A27",h4="\xB1",E4="\u210C",S4="\u2A15",b4="\u{1D561}",v4="\u2119",T4="\xA3",y4="\u2AB7",C4="\u2ABB",R4="\u227A",N4="\u227C",O4="\u2AB7",A4="\u227A",I4="\u227C",D4="\u227A",x4="\u2AAF",w4="\u227C",M4="\u227E",L4="\u2AAF",k4="\u2AB9",P4="\u2AB5",B4="\u22E8",F4="\u2AAF",U4="\u2AB3",G4="\u227E",q4="\u2032",Y4="\u2033",z4="\u2119",$4="\u2AB9",H4="\u2AB5",V4="\u22E8",W4="\u220F",K4="\u220F",Q4="\u232E",X4="\u2312",j4="\u2313",Z4="\u221D",J4="\u221D",eL="\u2237",tL="\u221D",nL="\u227E",rL="\u22B0",iL="\u{1D4AB}",aL="\u{1D4C5}",oL="\u03A8",sL="\u03C8",lL="\u2008",cL="\u{1D514}",uL="\u{1D52E}",dL="\u2A0C",_L="\u{1D562}",pL="\u211A",mL="\u2057",fL="\u{1D4AC}",gL="\u{1D4C6}",hL="\u210D",EL="\u2A16",SL="?",bL="\u225F",vL='"',TL='"',yL="\u21DB",CL="\u223D\u0331",RL="\u0154",NL="\u0155",OL="\u221A",AL="\u29B3",IL="\u27E9",DL="\u27EB",xL="\u2992",wL="\u29A5",ML="\u27E9",LL="\xBB",kL="\u2975",PL="\u21E5",BL="\u2920",FL="\u2933",UL="\u2192",GL="\u21A0",qL="\u21D2",YL="\u291E",zL="\u21AA",$L="\u21AC",HL="\u2945",VL="\u2974",WL="\u2916",KL="\u21A3",QL="\u219D",XL="\u291A",jL="\u291C",ZL="\u2236",JL="\u211A",ek="\u290D",tk="\u290F",nk="\u2910",rk="\u2773",ik="}",ak="]",ok="\u298C",sk="\u298E",lk="\u2990",ck="\u0158",uk="\u0159",dk="\u0156",_k="\u0157",pk="\u2309",mk="}",fk="\u0420",gk="\u0440",hk="\u2937",Ek="\u2969",Sk="\u201D",bk="\u201D",vk="\u21B3",Tk="\u211C",yk="\u211B",Ck="\u211C",Rk="\u211D",Nk="\u211C",Ok="\u25AD",Ak="\xAE",Ik="\xAE",Dk="\u220B",xk="\u21CB",wk="\u296F",Mk="\u297D",Lk="\u230B",kk="\u{1D52F}",Pk="\u211C",Bk="\u2964",Fk="\u21C1",Uk="\u21C0",Gk="\u296C",qk="\u03A1",Yk="\u03C1",zk="\u03F1",$k="\u27E9",Hk="\u21E5",Vk="\u2192",Wk="\u2192",Kk="\u21D2",Qk="\u21C4",Xk="\u21A3",jk="\u2309",Zk="\u27E7",Jk="\u295D",e3="\u2955",t3="\u21C2",n3="\u230B",r3="\u21C1",i3="\u21C0",a3="\u21C4",o3="\u21CC",s3="\u21C9",l3="\u219D",c3="\u21A6",u3="\u22A2",d3="\u295B",_3="\u22CC",p3="\u29D0",m3="\u22B3",f3="\u22B5",g3="\u294F",h3="\u295C",E3="\u2954",S3="\u21BE",b3="\u2953",v3="\u21C0",T3="\u02DA",y3="\u2253",C3="\u21C4",R3="\u21CC",N3="\u200F",O3="\u23B1",A3="\u23B1",I3="\u2AEE",D3="\u27ED",x3="\u21FE",w3="\u27E7",M3="\u2986",L3="\u{1D563}",k3="\u211D",P3="\u2A2E",B3="\u2A35",F3="\u2970",U3=")",G3="\u2994",q3="\u2A12",Y3="\u21C9",z3="\u21DB",$3="\u203A",H3="\u{1D4C7}",V3="\u211B",W3="\u21B1",K3="\u21B1",Q3="]",X3="\u2019",j3="\u2019",Z3="\u22CC",J3="\u22CA",e5="\u25B9",t5="\u22B5",n5="\u25B8",r5="\u29CE",i5="\u29F4",a5="\u2968",o5="\u211E",s5="\u015A",l5="\u015B",c5="\u201A",u5="\u2AB8",d5="\u0160",_5="\u0161",p5="\u2ABC",m5="\u227B",f5="\u227D",g5="\u2AB0",h5="\u2AB4",E5="\u015E",S5="\u015F",b5="\u015C",v5="\u015D",T5="\u2ABA",y5="\u2AB6",C5="\u22E9",R5="\u2A13",N5="\u227F",O5="\u0421",A5="\u0441",I5="\u22A1",D5="\u22C5",x5="\u2A66",w5="\u2925",M5="\u2198",L5="\u21D8",k5="\u2198",P5="\xA7",B5=";",F5="\u2929",U5="\u2216",G5="\u2216",q5="\u2736",Y5="\u{1D516}",z5="\u{1D530}",$5="\u2322",H5="\u266F",V5="\u0429",W5="\u0449",K5="\u0428",Q5="\u0448",X5="\u2193",j5="\u2190",Z5="\u2223",J5="\u2225",eP="\u2192",tP="\u2191",nP="\xAD",rP="\u03A3",iP="\u03C3",aP="\u03C2",oP="\u03C2",sP="\u223C",lP="\u2A6A",cP="\u2243",uP="\u2243",dP="\u2A9E",_P="\u2AA0",pP="\u2A9D",mP="\u2A9F",fP="\u2246",gP="\u2A24",hP="\u2972",EP="\u2190",SP="\u2218",bP="\u2216",vP="\u2A33",TP="\u29E4",yP="\u2223",CP="\u2323",RP="\u2AAA",NP="\u2AAC",OP="\u2AAC\uFE00",AP="\u042C",IP="\u044C",DP="\u233F",xP="\u29C4",wP="/",MP="\u{1D54A}",LP="\u{1D564}",kP="\u2660",PP="\u2660",BP="\u2225",FP="\u2293",UP="\u2293\uFE00",GP="\u2294",qP="\u2294\uFE00",YP="\u221A",zP="\u228F",$P="\u2291",HP="\u228F",VP="\u2291",WP="\u2290",KP="\u2292",QP="\u2290",XP="\u2292",jP="\u25A1",ZP="\u25A1",JP="\u2293",e6="\u228F",t6="\u2291",n6="\u2290",r6="\u2292",i6="\u2294",a6="\u25AA",o6="\u25A1",s6="\u25AA",l6="\u2192",c6="\u{1D4AE}",u6="\u{1D4C8}",d6="\u2216",_6="\u2323",p6="\u22C6",m6="\u22C6",f6="\u2606",g6="\u2605",h6="\u03F5",E6="\u03D5",S6="\xAF",b6="\u2282",v6="\u22D0",T6="\u2ABD",y6="\u2AC5",C6="\u2286",R6="\u2AC3",N6="\u2AC1",O6="\u2ACB",A6="\u228A",I6="\u2ABF",D6="\u2979",x6="\u2282",w6="\u22D0",M6="\u2286",L6="\u2AC5",k6="\u2286",P6="\u228A",B6="\u2ACB",F6="\u2AC7",U6="\u2AD5",G6="\u2AD3",q6="\u2AB8",Y6="\u227B",z6="\u227D",$6="\u227B",H6="\u2AB0",V6="\u227D",W6="\u227F",K6="\u2AB0",Q6="\u2ABA",X6="\u2AB6",j6="\u22E9",Z6="\u227F",J6="\u220B",e7="\u2211",t7="\u2211",n7="\u266A",r7="\xB9",i7="\xB2",a7="\xB3",o7="\u2283",s7="\u22D1",l7="\u2ABE",c7="\u2AD8",u7="\u2AC6",d7="\u2287",_7="\u2AC4",p7="\u2283",m7="\u2287",f7="\u27C9",g7="\u2AD7",h7="\u297B",E7="\u2AC2",S7="\u2ACC",b7="\u228B",v7="\u2AC0",T7="\u2283",y7="\u22D1",C7="\u2287",R7="\u2AC6",N7="\u228B",O7="\u2ACC",A7="\u2AC8",I7="\u2AD4",D7="\u2AD6",x7="\u2926",w7="\u2199",M7="\u21D9",L7="\u2199",k7="\u292A",P7="\xDF",B7=" ",F7="\u2316",U7="\u03A4",G7="\u03C4",q7="\u23B4",Y7="\u0164",z7="\u0165",$7="\u0162",H7="\u0163",V7="\u0422",W7="\u0442",K7="\u20DB",Q7="\u2315",X7="\u{1D517}",j7="\u{1D531}",Z7="\u2234",J7="\u2234",e8="\u2234",t8="\u0398",n8="\u03B8",r8="\u03D1",i8="\u03D1",a8="\u2248",o8="\u223C",s8="\u205F\u200A",l8="\u2009",c8="\u2009",u8="\u2248",d8="\u223C",_8="\xDE",p8="\xFE",m8="\u02DC",f8="\u223C",g8="\u2243",h8="\u2245",E8="\u2248",S8="\u2A31",b8="\u22A0",v8="\xD7",T8="\u2A30",y8="\u222D",C8="\u2928",R8="\u2336",N8="\u2AF1",O8="\u22A4",A8="\u{1D54B}",I8="\u{1D565}",D8="\u2ADA",x8="\u2929",w8="\u2034",M8="\u2122",L8="\u2122",k8="\u25B5",P8="\u25BF",B8="\u25C3",F8="\u22B4",U8="\u225C",G8="\u25B9",q8="\u22B5",Y8="\u25EC",z8="\u225C",$8="\u2A3A",H8="\u20DB",V8="\u2A39",W8="\u29CD",K8="\u2A3B",Q8="\u23E2",X8="\u{1D4AF}",j8="\u{1D4C9}",Z8="\u0426",J8="\u0446",e9="\u040B",t9="\u045B",n9="\u0166",r9="\u0167",i9="\u226C",a9="\u219E",o9="\u21A0",s9="\xDA",l9="\xFA",c9="\u2191",u9="\u219F",d9="\u21D1",_9="\u2949",p9="\u040E",m9="\u045E",f9="\u016C",g9="\u016D",h9="\xDB",E9="\xFB",S9="\u0423",b9="\u0443",v9="\u21C5",T9="\u0170",y9="\u0171",C9="\u296E",R9="\u297E",N9="\u{1D518}",O9="\u{1D532}",A9="\xD9",I9="\xF9",D9="\u2963",x9="\u21BF",w9="\u21BE",M9="\u2580",L9="\u231C",k9="\u231C",P9="\u230F",B9="\u25F8",F9="\u016A",U9="\u016B",G9="\xA8",q9="_",Y9="\u23DF",z9="\u23B5",$9="\u23DD",H9="\u22C3",V9="\u228E",W9="\u0172",K9="\u0173",Q9="\u{1D54C}",X9="\u{1D566}",j9="\u2912",Z9="\u2191",J9="\u2191",eB="\u21D1",tB="\u21C5",nB="\u2195",rB="\u2195",iB="\u21D5",aB="\u296E",oB="\u21BF",sB="\u21BE",lB="\u228E",cB="\u2196",uB="\u2197",dB="\u03C5",_B="\u03D2",pB="\u03D2",mB="\u03A5",fB="\u03C5",gB="\u21A5",hB="\u22A5",EB="\u21C8",SB="\u231D",bB="\u231D",vB="\u230E",TB="\u016E",yB="\u016F",CB="\u25F9",RB="\u{1D4B0}",NB="\u{1D4CA}",OB="\u22F0",AB="\u0168",IB="\u0169",DB="\u25B5",xB="\u25B4",wB="\u21C8",MB="\xDC",LB="\xFC",kB="\u29A7",PB="\u299C",BB="\u03F5",FB="\u03F0",UB="\u2205",GB="\u03D5",qB="\u03D6",YB="\u221D",zB="\u2195",$B="\u21D5",HB="\u03F1",VB="\u03C2",WB="\u228A\uFE00",KB="\u2ACB\uFE00",QB="\u228B\uFE00",XB="\u2ACC\uFE00",jB="\u03D1",ZB="\u22B2",JB="\u22B3",eF="\u2AE8",tF="\u2AEB",nF="\u2AE9",rF="\u0412",iF="\u0432",aF="\u22A2",oF="\u22A8",sF="\u22A9",lF="\u22AB",cF="\u2AE6",uF="\u22BB",dF="\u2228",_F="\u22C1",pF="\u225A",mF="\u22EE",fF="|",gF="\u2016",hF="|",EF="\u2016",SF="\u2223",bF="|",vF="\u2758",TF="\u2240",yF="\u200A",CF="\u{1D519}",RF="\u{1D533}",NF="\u22B2",OF="\u2282\u20D2",AF="\u2283\u20D2",IF="\u{1D54D}",DF="\u{1D567}",xF="\u221D",wF="\u22B3",MF="\u{1D4B1}",LF="\u{1D4CB}",kF="\u2ACB\uFE00",PF="\u228A\uFE00",BF="\u2ACC\uFE00",FF="\u228B\uFE00",UF="\u22AA",GF="\u299A",qF="\u0174",YF="\u0175",zF="\u2A5F",$F="\u2227",HF="\u22C0",VF="\u2259",WF="\u2118",KF="\u{1D51A}",QF="\u{1D534}",XF="\u{1D54E}",jF="\u{1D568}",ZF="\u2118",JF="\u2240",eU="\u2240",tU="\u{1D4B2}",nU="\u{1D4CC}",rU="\u22C2",iU="\u25EF",aU="\u22C3",oU="\u25BD",sU="\u{1D51B}",lU="\u{1D535}",cU="\u27F7",uU="\u27FA",dU="\u039E",_U="\u03BE",pU="\u27F5",mU="\u27F8",fU="\u27FC",gU="\u22FB",hU="\u2A00",EU="\u{1D54F}",SU="\u{1D569}",bU="\u2A01",vU="\u2A02",TU="\u27F6",yU="\u27F9",CU="\u{1D4B3}",RU="\u{1D4CD}",NU="\u2A06",OU="\u2A04",AU="\u25B3",IU="\u22C1",DU="\u22C0",xU="\xDD",wU="\xFD",MU="\u042F",LU="\u044F",kU="\u0176",PU="\u0177",BU="\u042B",FU="\u044B",UU="\xA5",GU="\u{1D51C}",qU="\u{1D536}",YU="\u0407",zU="\u0457",$U="\u{1D550}",HU="\u{1D56A}",VU="\u{1D4B4}",WU="\u{1D4CE}",KU="\u042E",QU="\u044E",XU="\xFF",jU="\u0178",ZU="\u0179",JU="\u017A",eG="\u017D",tG="\u017E",nG="\u0417",rG="\u0437",iG="\u017B",aG="\u017C",oG="\u2128",sG="\u200B",lG="\u0396",cG="\u03B6",uG="\u{1D537}",dG="\u2128",_G="\u0416",pG="\u0436",mG="\u21DD",fG="\u{1D56B}",gG="\u2124",hG="\u{1D4B5}",EG="\u{1D4CF}",SG="\u200D",bG="\u200C";var vG={Aacute:nd,aacute:rd,Abreve:id,abreve:ad,ac:od,acd:sd,acE:ld,Acirc:cd,acirc:ud,acute:dd,Acy:_d,acy:pd,AElig:md,aelig:fd,af:gd,Afr:hd,afr:Ed,Agrave:Sd,agrave:bd,alefsym:vd,aleph:Td,Alpha:yd,alpha:Cd,Amacr:Rd,amacr:Nd,amalg:Od,amp:Ad,AMP:Id,andand:Dd,And:xd,and:wd,andd:Md,andslope:Ld,andv:kd,ang:Pd,ange:Bd,angle:Fd,angmsdaa:Ud,angmsdab:Gd,angmsdac:qd,angmsdad:Yd,angmsdae:zd,angmsdaf:$d,angmsdag:Hd,angmsdah:Vd,angmsd:Wd,angrt:Kd,angrtvb:Qd,angrtvbd:Xd,angsph:jd,angst:Zd,angzarr:Jd,Aogon:e_,aogon:t_,Aopf:n_,aopf:r_,apacir:i_,ap:a_,apE:o_,ape:s_,apid:l_,apos:c_,ApplyFunction:u_,approx:d_,approxeq:__,Aring:p_,aring:m_,Ascr:f_,ascr:g_,Assign:h_,ast:E_,asymp:S_,asympeq:b_,Atilde:v_,atilde:T_,Auml:y_,auml:C_,awconint:R_,awint:N_,backcong:O_,backepsilon:A_,backprime:I_,backsim:D_,backsimeq:x_,Backslash:w_,Barv:M_,barvee:L_,barwed:k_,Barwed:P_,barwedge:B_,bbrk:F_,bbrktbrk:U_,bcong:G_,Bcy:q_,bcy:Y_,bdquo:z_,becaus:$_,because:H_,Because:V_,bemptyv:W_,bepsi:K_,bernou:Q_,Bernoullis:X_,Beta:j_,beta:Z_,beth:J_,between:ep,Bfr:tp,bfr:np,bigcap:rp,bigcirc:ip,bigcup:ap,bigodot:op,bigoplus:sp,bigotimes:lp,bigsqcup:cp,bigstar:up,bigtriangledown:dp,bigtriangleup:_p,biguplus:pp,bigvee:mp,bigwedge:fp,bkarow:gp,blacklozenge:hp,blacksquare:Ep,blacktriangle:Sp,blacktriangledown:bp,blacktriangleleft:vp,blacktriangleright:Tp,blank:yp,blk12:Cp,blk14:Rp,blk34:Np,block:Op,bne:Ap,bnequiv:Ip,bNot:Dp,bnot:xp,Bopf:wp,bopf:Mp,bot:Lp,bottom:kp,bowtie:Pp,boxbox:Bp,boxdl:Fp,boxdL:Up,boxDl:Gp,boxDL:qp,boxdr:Yp,boxdR:zp,boxDr:$p,boxDR:Hp,boxh:Vp,boxH:Wp,boxhd:Kp,boxHd:Qp,boxhD:Xp,boxHD:jp,boxhu:Zp,boxHu:Jp,boxhU:em,boxHU:tm,boxminus:nm,boxplus:rm,boxtimes:im,boxul:am,boxuL:om,boxUl:sm,boxUL:lm,boxur:cm,boxuR:um,boxUr:dm,boxUR:_m,boxv:pm,boxV:mm,boxvh:fm,boxvH:gm,boxVh:hm,boxVH:Em,boxvl:Sm,boxvL:bm,boxVl:vm,boxVL:Tm,boxvr:ym,boxvR:Cm,boxVr:Rm,boxVR:Nm,bprime:Om,breve:Am,Breve:Im,brvbar:Dm,bscr:xm,Bscr:wm,bsemi:Mm,bsim:Lm,bsime:km,bsolb:Pm,bsol:Bm,bsolhsub:Fm,bull:Um,bullet:Gm,bump:qm,bumpE:Ym,bumpe:zm,Bumpeq:$m,bumpeq:Hm,Cacute:Vm,cacute:Wm,capand:Km,capbrcup:Qm,capcap:Xm,cap:jm,Cap:Zm,capcup:Jm,capdot:ef,CapitalDifferentialD:tf,caps:nf,caret:rf,caron:af,Cayleys:of,ccaps:sf,Ccaron:lf,ccaron:cf,Ccedil:uf,ccedil:df,Ccirc:_f,ccirc:pf,Cconint:mf,ccups:ff,ccupssm:gf,Cdot:hf,cdot:Ef,cedil:Sf,Cedilla:bf,cemptyv:vf,cent:Tf,centerdot:yf,CenterDot:Cf,cfr:Rf,Cfr:Nf,CHcy:Of,chcy:Af,check:If,checkmark:Df,Chi:xf,chi:wf,circ:Mf,circeq:Lf,circlearrowleft:kf,circlearrowright:Pf,circledast:Bf,circledcirc:Ff,circleddash:Uf,CircleDot:Gf,circledR:qf,circledS:Yf,CircleMinus:zf,CirclePlus:$f,CircleTimes:Hf,cir:Vf,cirE:Wf,cire:Kf,cirfnint:Qf,cirmid:Xf,cirscir:jf,ClockwiseContourIntegral:Zf,CloseCurlyDoubleQuote:Jf,CloseCurlyQuote:e0,clubs:t0,clubsuit:n0,colon:r0,Colon:i0,Colone:a0,colone:o0,coloneq:s0,comma:l0,commat:c0,comp:u0,compfn:d0,complement:_0,complexes:p0,cong:m0,congdot:f0,Congruent:g0,conint:h0,Conint:E0,ContourIntegral:S0,copf:b0,Copf:v0,coprod:T0,Coproduct:y0,copy:C0,COPY:R0,copysr:N0,CounterClockwiseContourIntegral:O0,crarr:A0,cross:I0,Cross:D0,Cscr:x0,cscr:w0,csub:M0,csube:L0,csup:k0,csupe:P0,ctdot:B0,cudarrl:F0,cudarrr:U0,cuepr:G0,cuesc:q0,cularr:Y0,cularrp:z0,cupbrcap:$0,cupcap:H0,CupCap:V0,cup:W0,Cup:K0,cupcup:Q0,cupdot:X0,cupor:j0,cups:Z0,curarr:J0,curarrm:eg,curlyeqprec:tg,curlyeqsucc:ng,curlyvee:rg,curlywedge:ig,curren:ag,curvearrowleft:og,curvearrowright:sg,cuvee:lg,cuwed:cg,cwconint:ug,cwint:dg,cylcty:_g,dagger:pg,Dagger:mg,daleth:fg,darr:gg,Darr:hg,dArr:Eg,dash:Sg,Dashv:bg,dashv:vg,dbkarow:Tg,dblac:yg,Dcaron:Cg,dcaron:Rg,Dcy:Ng,dcy:Og,ddagger:Ag,ddarr:Ig,DD:Dg,dd:xg,DDotrahd:wg,ddotseq:Mg,deg:Lg,Del:kg,Delta:Pg,delta:Bg,demptyv:Fg,dfisht:Ug,Dfr:Gg,dfr:qg,dHar:Yg,dharl:zg,dharr:$g,DiacriticalAcute:Hg,DiacriticalDot:Vg,DiacriticalDoubleAcute:Wg,DiacriticalGrave:Kg,DiacriticalTilde:Qg,diam:Xg,diamond:jg,Diamond:Zg,diamondsuit:Jg,diams:eh,die:th,DifferentialD:nh,digamma:rh,disin:ih,div:ah,divide:oh,divideontimes:sh,divonx:lh,DJcy:ch,djcy:uh,dlcorn:dh,dlcrop:_h,dollar:ph,Dopf:mh,dopf:fh,Dot:gh,dot:hh,DotDot:Eh,doteq:Sh,doteqdot:bh,DotEqual:vh,dotminus:Th,dotplus:yh,dotsquare:Ch,doublebarwedge:Rh,DoubleContourIntegral:Nh,DoubleDot:Oh,DoubleDownArrow:Ah,DoubleLeftArrow:Ih,DoubleLeftRightArrow:Dh,DoubleLeftTee:xh,DoubleLongLeftArrow:wh,DoubleLongLeftRightArrow:Mh,DoubleLongRightArrow:Lh,DoubleRightArrow:kh,DoubleRightTee:Ph,DoubleUpArrow:Bh,DoubleUpDownArrow:Fh,DoubleVerticalBar:Uh,DownArrowBar:Gh,downarrow:qh,DownArrow:Yh,Downarrow:zh,DownArrowUpArrow:$h,DownBreve:Hh,downdownarrows:Vh,downharpoonleft:Wh,downharpoonright:Kh,DownLeftRightVector:Qh,DownLeftTeeVector:Xh,DownLeftVectorBar:jh,DownLeftVector:Zh,DownRightTeeVector:Jh,DownRightVectorBar:eE,DownRightVector:tE,DownTeeArrow:nE,DownTee:rE,drbkarow:iE,drcorn:aE,drcrop:oE,Dscr:sE,dscr:lE,DScy:cE,dscy:uE,dsol:dE,Dstrok:_E,dstrok:pE,dtdot:mE,dtri:fE,dtrif:gE,duarr:hE,duhar:EE,dwangle:SE,DZcy:bE,dzcy:vE,dzigrarr:TE,Eacute:yE,eacute:CE,easter:RE,Ecaron:NE,ecaron:OE,Ecirc:AE,ecirc:IE,ecir:DE,ecolon:xE,Ecy:wE,ecy:ME,eDDot:LE,Edot:kE,edot:PE,eDot:BE,ee:FE,efDot:UE,Efr:GE,efr:qE,eg:YE,Egrave:zE,egrave:$E,egs:HE,egsdot:VE,el:WE,Element:KE,elinters:QE,ell:XE,els:jE,elsdot:ZE,Emacr:JE,emacr:eS,empty:tS,emptyset:nS,EmptySmallSquare:rS,emptyv:iS,EmptyVerySmallSquare:aS,emsp13:oS,emsp14:sS,emsp:lS,ENG:cS,eng:uS,ensp:dS,Eogon:_S,eogon:pS,Eopf:mS,eopf:fS,epar:gS,eparsl:hS,eplus:ES,epsi:SS,Epsilon:bS,epsilon:vS,epsiv:TS,eqcirc:yS,eqcolon:CS,eqsim:RS,eqslantgtr:NS,eqslantless:OS,Equal:AS,equals:IS,EqualTilde:DS,equest:xS,Equilibrium:wS,equiv:MS,equivDD:LS,eqvparsl:kS,erarr:PS,erDot:BS,escr:FS,Escr:US,esdot:GS,Esim:qS,esim:YS,Eta:zS,eta:$S,ETH:HS,eth:VS,Euml:WS,euml:KS,euro:QS,excl:XS,exist:jS,Exists:ZS,expectation:JS,exponentiale:eb,ExponentialE:tb,fallingdotseq:nb,Fcy:rb,fcy:ib,female:ab,ffilig:ob,fflig:sb,ffllig:lb,Ffr:cb,ffr:ub,filig:db,FilledSmallSquare:_b,FilledVerySmallSquare:pb,fjlig:mb,flat:fb,fllig:gb,fltns:hb,fnof:Eb,Fopf:Sb,fopf:bb,forall:vb,ForAll:Tb,fork:yb,forkv:Cb,Fouriertrf:Rb,fpartint:Nb,frac12:Ob,frac13:Ab,frac14:Ib,frac15:Db,frac16:xb,frac18:wb,frac23:Mb,frac25:Lb,frac34:kb,frac35:Pb,frac38:Bb,frac45:Fb,frac56:Ub,frac58:Gb,frac78:qb,frasl:Yb,frown:zb,fscr:$b,Fscr:Hb,gacute:Vb,Gamma:Wb,gamma:Kb,Gammad:Qb,gammad:Xb,gap:jb,Gbreve:Zb,gbreve:Jb,Gcedil:ev,Gcirc:tv,gcirc:nv,Gcy:rv,gcy:iv,Gdot:av,gdot:ov,ge:sv,gE:lv,gEl:cv,gel:uv,geq:dv,geqq:_v,geqslant:pv,gescc:mv,ges:fv,gesdot:gv,gesdoto:hv,gesdotol:Ev,gesl:Sv,gesles:bv,Gfr:vv,gfr:Tv,gg:yv,Gg:Cv,ggg:Rv,gimel:Nv,GJcy:Ov,gjcy:Av,gla:Iv,gl:Dv,glE:xv,glj:wv,gnap:Mv,gnapprox:Lv,gne:kv,gnE:Pv,gneq:Bv,gneqq:Fv,gnsim:Uv,Gopf:Gv,gopf:qv,grave:Yv,GreaterEqual:zv,GreaterEqualLess:$v,GreaterFullEqual:Hv,GreaterGreater:Vv,GreaterLess:Wv,GreaterSlantEqual:Kv,GreaterTilde:Qv,Gscr:Xv,gscr:jv,gsim:Zv,gsime:Jv,gsiml:eT,gtcc:tT,gtcir:nT,gt:rT,GT:iT,Gt:aT,gtdot:oT,gtlPar:sT,gtquest:lT,gtrapprox:cT,gtrarr:uT,gtrdot:dT,gtreqless:_T,gtreqqless:pT,gtrless:mT,gtrsim:fT,gvertneqq:gT,gvnE:hT,Hacek:ET,hairsp:ST,half:bT,hamilt:vT,HARDcy:TT,hardcy:yT,harrcir:CT,harr:RT,hArr:NT,harrw:OT,Hat:AT,hbar:IT,Hcirc:DT,hcirc:xT,hearts:wT,heartsuit:MT,hellip:LT,hercon:kT,hfr:PT,Hfr:BT,HilbertSpace:FT,hksearow:UT,hkswarow:GT,hoarr:qT,homtht:YT,hookleftarrow:zT,hookrightarrow:$T,hopf:HT,Hopf:VT,horbar:WT,HorizontalLine:KT,hscr:QT,Hscr:XT,hslash:jT,Hstrok:ZT,hstrok:JT,HumpDownHump:ey,HumpEqual:ty,hybull:ny,hyphen:ry,Iacute:iy,iacute:ay,ic:oy,Icirc:sy,icirc:ly,Icy:cy,icy:uy,Idot:dy,IEcy:_y,iecy:py,iexcl:my,iff:fy,ifr:gy,Ifr:hy,Igrave:Ey,igrave:Sy,ii:by,iiiint:vy,iiint:Ty,iinfin:yy,iiota:Cy,IJlig:Ry,ijlig:Ny,Imacr:Oy,imacr:Ay,image:Iy,ImaginaryI:Dy,imagline:xy,imagpart:wy,imath:My,Im:Ly,imof:ky,imped:Py,Implies:By,incare:Fy,in:"\u2208",infin:Uy,infintie:Gy,inodot:qy,intcal:Yy,int:zy,Int:$y,integers:Hy,Integral:Vy,intercal:Wy,Intersection:Ky,intlarhk:Qy,intprod:Xy,InvisibleComma:jy,InvisibleTimes:Zy,IOcy:Jy,iocy:e1,Iogon:t1,iogon:n1,Iopf:r1,iopf:i1,Iota:a1,iota:o1,iprod:s1,iquest:l1,iscr:c1,Iscr:u1,isin:d1,isindot:_1,isinE:p1,isins:m1,isinsv:f1,isinv:g1,it:h1,Itilde:E1,itilde:S1,Iukcy:b1,iukcy:v1,Iuml:T1,iuml:y1,Jcirc:C1,jcirc:R1,Jcy:N1,jcy:O1,Jfr:A1,jfr:I1,jmath:D1,Jopf:x1,jopf:w1,Jscr:M1,jscr:L1,Jsercy:k1,jsercy:P1,Jukcy:B1,jukcy:F1,Kappa:U1,kappa:G1,kappav:q1,Kcedil:Y1,kcedil:z1,Kcy:$1,kcy:H1,Kfr:V1,kfr:W1,kgreen:K1,KHcy:Q1,khcy:X1,KJcy:j1,kjcy:Z1,Kopf:J1,kopf:eC,Kscr:tC,kscr:nC,lAarr:rC,Lacute:iC,lacute:aC,laemptyv:oC,lagran:sC,Lambda:lC,lambda:cC,lang:uC,Lang:dC,langd:_C,langle:pC,lap:mC,Laplacetrf:fC,laquo:gC,larrb:hC,larrbfs:EC,larr:SC,Larr:bC,lArr:vC,larrfs:TC,larrhk:yC,larrlp:CC,larrpl:RC,larrsim:NC,larrtl:OC,latail:AC,lAtail:IC,lat:DC,late:xC,lates:wC,lbarr:MC,lBarr:LC,lbbrk:kC,lbrace:PC,lbrack:BC,lbrke:FC,lbrksld:UC,lbrkslu:GC,Lcaron:qC,lcaron:YC,Lcedil:zC,lcedil:$C,lceil:HC,lcub:VC,Lcy:WC,lcy:KC,ldca:QC,ldquo:XC,ldquor:jC,ldrdhar:ZC,ldrushar:JC,ldsh:eR,le:tR,lE:nR,LeftAngleBracket:rR,LeftArrowBar:iR,leftarrow:aR,LeftArrow:oR,Leftarrow:sR,LeftArrowRightArrow:lR,leftarrowtail:cR,LeftCeiling:uR,LeftDoubleBracket:dR,LeftDownTeeVector:_R,LeftDownVectorBar:pR,LeftDownVector:mR,LeftFloor:fR,leftharpoondown:gR,leftharpoonup:hR,leftleftarrows:ER,leftrightarrow:SR,LeftRightArrow:bR,Leftrightarrow:vR,leftrightarrows:TR,leftrightharpoons:yR,leftrightsquigarrow:CR,LeftRightVector:RR,LeftTeeArrow:NR,LeftTee:OR,LeftTeeVector:AR,leftthreetimes:IR,LeftTriangleBar:DR,LeftTriangle:xR,LeftTriangleEqual:wR,LeftUpDownVector:MR,LeftUpTeeVector:LR,LeftUpVectorBar:kR,LeftUpVector:PR,LeftVectorBar:BR,LeftVector:FR,lEg:UR,leg:GR,leq:qR,leqq:YR,leqslant:zR,lescc:$R,les:HR,lesdot:VR,lesdoto:WR,lesdotor:KR,lesg:QR,lesges:XR,lessapprox:jR,lessdot:ZR,lesseqgtr:JR,lesseqqgtr:eN,LessEqualGreater:tN,LessFullEqual:nN,LessGreater:rN,lessgtr:iN,LessLess:aN,lesssim:oN,LessSlantEqual:sN,LessTilde:lN,lfisht:cN,lfloor:uN,Lfr:dN,lfr:_N,lg:pN,lgE:mN,lHar:fN,lhard:gN,lharu:hN,lharul:EN,lhblk:SN,LJcy:bN,ljcy:vN,llarr:TN,ll:yN,Ll:CN,llcorner:RN,Lleftarrow:NN,llhard:ON,lltri:AN,Lmidot:IN,lmidot:DN,lmoustache:xN,lmoust:wN,lnap:MN,lnapprox:LN,lne:kN,lnE:PN,lneq:BN,lneqq:FN,lnsim:UN,loang:GN,loarr:qN,lobrk:YN,longleftarrow:zN,LongLeftArrow:$N,Longleftarrow:HN,longleftrightarrow:VN,LongLeftRightArrow:WN,Longleftrightarrow:KN,longmapsto:QN,longrightarrow:XN,LongRightArrow:jN,Longrightarrow:ZN,looparrowleft:JN,looparrowright:eO,lopar:tO,Lopf:nO,lopf:rO,loplus:iO,lotimes:aO,lowast:oO,lowbar:sO,LowerLeftArrow:lO,LowerRightArrow:cO,loz:uO,lozenge:dO,lozf:_O,lpar:pO,lparlt:mO,lrarr:fO,lrcorner:gO,lrhar:hO,lrhard:EO,lrm:SO,lrtri:bO,lsaquo:vO,lscr:TO,Lscr:yO,lsh:CO,Lsh:RO,lsim:NO,lsime:OO,lsimg:AO,lsqb:IO,lsquo:DO,lsquor:xO,Lstrok:wO,lstrok:MO,ltcc:LO,ltcir:kO,lt:PO,LT:BO,Lt:FO,ltdot:UO,lthree:GO,ltimes:qO,ltlarr:YO,ltquest:zO,ltri:$O,ltrie:HO,ltrif:VO,ltrPar:WO,lurdshar:KO,luruhar:QO,lvertneqq:XO,lvnE:jO,macr:ZO,male:JO,malt:eA,maltese:tA,Map:"\u2905",map:nA,mapsto:rA,mapstodown:iA,mapstoleft:aA,mapstoup:oA,marker:sA,mcomma:lA,Mcy:cA,mcy:uA,mdash:dA,mDDot:_A,measuredangle:pA,MediumSpace:mA,Mellintrf:fA,Mfr:gA,mfr:hA,mho:EA,micro:SA,midast:bA,midcir:vA,mid:TA,middot:yA,minusb:CA,minus:RA,minusd:NA,minusdu:OA,MinusPlus:AA,mlcp:IA,mldr:DA,mnplus:xA,models:wA,Mopf:MA,mopf:LA,mp:kA,mscr:PA,Mscr:BA,mstpos:FA,Mu:UA,mu:GA,multimap:qA,mumap:YA,nabla:zA,Nacute:HA,nacute:VA,nang:WA,nap:KA,napE:QA,napid:XA,napos:jA,napprox:ZA,natural:JA,naturals:eI,natur:tI,nbsp:nI,nbump:rI,nbumpe:iI,ncap:aI,Ncaron:oI,ncaron:sI,Ncedil:lI,ncedil:cI,ncong:uI,ncongdot:dI,ncup:_I,Ncy:pI,ncy:mI,ndash:fI,nearhk:gI,nearr:hI,neArr:EI,nearrow:SI,ne:bI,nedot:vI,NegativeMediumSpace:TI,NegativeThickSpace:yI,NegativeThinSpace:CI,NegativeVeryThinSpace:RI,nequiv:NI,nesear:OI,nesim:AI,NestedGreaterGreater:II,NestedLessLess:DI,NewLine:xI,nexist:wI,nexists:MI,Nfr:LI,nfr:kI,ngE:PI,nge:BI,ngeq:FI,ngeqq:UI,ngeqslant:GI,nges:qI,nGg:YI,ngsim:zI,nGt:$I,ngt:HI,ngtr:VI,nGtv:WI,nharr:KI,nhArr:QI,nhpar:XI,ni:jI,nis:ZI,nisd:JI,niv:eD,NJcy:tD,njcy:nD,nlarr:rD,nlArr:iD,nldr:aD,nlE:oD,nle:sD,nleftarrow:lD,nLeftarrow:cD,nleftrightarrow:uD,nLeftrightarrow:dD,nleq:_D,nleqq:pD,nleqslant:mD,nles:fD,nless:gD,nLl:hD,nlsim:ED,nLt:SD,nlt:bD,nltri:vD,nltrie:TD,nLtv:yD,nmid:CD,NoBreak:RD,NonBreakingSpace:ND,nopf:OD,Nopf:AD,Not:ID,not:DD,NotCongruent:xD,NotCupCap:wD,NotDoubleVerticalBar:MD,NotElement:LD,NotEqual:kD,NotEqualTilde:PD,NotExists:BD,NotGreater:FD,NotGreaterEqual:UD,NotGreaterFullEqual:GD,NotGreaterGreater:qD,NotGreaterLess:YD,NotGreaterSlantEqual:zD,NotGreaterTilde:$D,NotHumpDownHump:HD,NotHumpEqual:VD,notin:WD,notindot:KD,notinE:QD,notinva:XD,notinvb:jD,notinvc:ZD,NotLeftTriangleBar:JD,NotLeftTriangle:ex,NotLeftTriangleEqual:tx,NotLess:nx,NotLessEqual:rx,NotLessGreater:ix,NotLessLess:ax,NotLessSlantEqual:ox,NotLessTilde:sx,NotNestedGreaterGreater:lx,NotNestedLessLess:cx,notni:ux,notniva:dx,notnivb:_x,notnivc:px,NotPrecedes:mx,NotPrecedesEqual:fx,NotPrecedesSlantEqual:gx,NotReverseElement:hx,NotRightTriangleBar:Ex,NotRightTriangle:Sx,NotRightTriangleEqual:bx,NotSquareSubset:vx,NotSquareSubsetEqual:Tx,NotSquareSuperset:yx,NotSquareSupersetEqual:Cx,NotSubset:Rx,NotSubsetEqual:Nx,NotSucceeds:Ox,NotSucceedsEqual:Ax,NotSucceedsSlantEqual:Ix,NotSucceedsTilde:Dx,NotSuperset:xx,NotSupersetEqual:wx,NotTilde:Mx,NotTildeEqual:Lx,NotTildeFullEqual:kx,NotTildeTilde:Px,NotVerticalBar:Bx,nparallel:Fx,npar:Ux,nparsl:Gx,npart:qx,npolint:Yx,npr:zx,nprcue:$x,nprec:Hx,npreceq:Vx,npre:Wx,nrarrc:Kx,nrarr:Qx,nrArr:Xx,nrarrw:jx,nrightarrow:Zx,nRightarrow:Jx,nrtri:ew,nrtrie:tw,nsc:nw,nsccue:rw,nsce:iw,Nscr:aw,nscr:ow,nshortmid:sw,nshortparallel:lw,nsim:cw,nsime:uw,nsimeq:dw,nsmid:_w,nspar:pw,nsqsube:mw,nsqsupe:fw,nsub:gw,nsubE:hw,nsube:Ew,nsubset:Sw,nsubseteq:bw,nsubseteqq:vw,nsucc:Tw,nsucceq:yw,nsup:Cw,nsupE:Rw,nsupe:Nw,nsupset:Ow,nsupseteq:Aw,nsupseteqq:Iw,ntgl:Dw,Ntilde:xw,ntilde:ww,ntlg:Mw,ntriangleleft:Lw,ntrianglelefteq:kw,ntriangleright:Pw,ntrianglerighteq:Bw,Nu:Fw,nu:Uw,num:Gw,numero:qw,numsp:Yw,nvap:zw,nvdash:$w,nvDash:Hw,nVdash:Vw,nVDash:Ww,nvge:Kw,nvgt:Qw,nvHarr:Xw,nvinfin:jw,nvlArr:Zw,nvle:Jw,nvlt:e2,nvltrie:t2,nvrArr:n2,nvrtrie:r2,nvsim:i2,nwarhk:a2,nwarr:o2,nwArr:s2,nwarrow:l2,nwnear:c2,Oacute:u2,oacute:d2,oast:_2,Ocirc:p2,ocirc:m2,ocir:f2,Ocy:g2,ocy:h2,odash:E2,Odblac:S2,odblac:b2,odiv:v2,odot:T2,odsold:y2,OElig:C2,oelig:R2,ofcir:N2,Ofr:O2,ofr:A2,ogon:I2,Ograve:D2,ograve:x2,ogt:w2,ohbar:M2,ohm:L2,oint:k2,olarr:P2,olcir:B2,olcross:F2,oline:U2,olt:G2,Omacr:q2,omacr:Y2,Omega:z2,omega:$2,Omicron:H2,omicron:V2,omid:W2,ominus:K2,Oopf:Q2,oopf:X2,opar:j2,OpenCurlyDoubleQuote:Z2,OpenCurlyQuote:J2,operp:eM,oplus:tM,orarr:nM,Or:rM,or:iM,ord:aM,order:oM,orderof:sM,ordf:lM,ordm:cM,origof:uM,oror:dM,orslope:_M,orv:pM,oS:mM,Oscr:fM,oscr:gM,Oslash:hM,oslash:EM,osol:SM,Otilde:bM,otilde:vM,otimesas:TM,Otimes:yM,otimes:CM,Ouml:RM,ouml:NM,ovbar:OM,OverBar:AM,OverBrace:IM,OverBracket:DM,OverParenthesis:xM,para:wM,parallel:MM,par:LM,parsim:kM,parsl:PM,part:BM,PartialD:FM,Pcy:UM,pcy:GM,percnt:qM,period:YM,permil:zM,perp:$M,pertenk:HM,Pfr:VM,pfr:WM,Phi:KM,phi:QM,phiv:XM,phmmat:jM,phone:ZM,Pi:JM,pi:e4,pitchfork:t4,piv:n4,planck:r4,planckh:i4,plankv:a4,plusacir:o4,plusb:s4,pluscir:l4,plus:c4,plusdo:u4,plusdu:d4,pluse:_4,PlusMinus:p4,plusmn:m4,plussim:f4,plustwo:g4,pm:h4,Poincareplane:E4,pointint:S4,popf:b4,Popf:v4,pound:T4,prap:y4,Pr:C4,pr:R4,prcue:N4,precapprox:O4,prec:A4,preccurlyeq:I4,Precedes:D4,PrecedesEqual:x4,PrecedesSlantEqual:w4,PrecedesTilde:M4,preceq:L4,precnapprox:k4,precneqq:P4,precnsim:B4,pre:F4,prE:U4,precsim:G4,prime:q4,Prime:Y4,primes:z4,prnap:$4,prnE:H4,prnsim:V4,prod:W4,Product:K4,profalar:Q4,profline:X4,profsurf:j4,prop:Z4,Proportional:J4,Proportion:eL,propto:tL,prsim:nL,prurel:rL,Pscr:iL,pscr:aL,Psi:oL,psi:sL,puncsp:lL,Qfr:cL,qfr:uL,qint:dL,qopf:_L,Qopf:pL,qprime:mL,Qscr:fL,qscr:gL,quaternions:hL,quatint:EL,quest:SL,questeq:bL,quot:vL,QUOT:TL,rAarr:yL,race:CL,Racute:RL,racute:NL,radic:OL,raemptyv:AL,rang:IL,Rang:DL,rangd:xL,range:wL,rangle:ML,raquo:LL,rarrap:kL,rarrb:PL,rarrbfs:BL,rarrc:FL,rarr:UL,Rarr:GL,rArr:qL,rarrfs:YL,rarrhk:zL,rarrlp:$L,rarrpl:HL,rarrsim:VL,Rarrtl:WL,rarrtl:KL,rarrw:QL,ratail:XL,rAtail:jL,ratio:ZL,rationals:JL,rbarr:ek,rBarr:tk,RBarr:nk,rbbrk:rk,rbrace:ik,rbrack:ak,rbrke:ok,rbrksld:sk,rbrkslu:lk,Rcaron:ck,rcaron:uk,Rcedil:dk,rcedil:_k,rceil:pk,rcub:mk,Rcy:fk,rcy:gk,rdca:hk,rdldhar:Ek,rdquo:Sk,rdquor:bk,rdsh:vk,real:Tk,realine:yk,realpart:Ck,reals:Rk,Re:Nk,rect:Ok,reg:Ak,REG:Ik,ReverseElement:Dk,ReverseEquilibrium:xk,ReverseUpEquilibrium:wk,rfisht:Mk,rfloor:Lk,rfr:kk,Rfr:Pk,rHar:Bk,rhard:Fk,rharu:Uk,rharul:Gk,Rho:qk,rho:Yk,rhov:zk,RightAngleBracket:$k,RightArrowBar:Hk,rightarrow:Vk,RightArrow:Wk,Rightarrow:Kk,RightArrowLeftArrow:Qk,rightarrowtail:Xk,RightCeiling:jk,RightDoubleBracket:Zk,RightDownTeeVector:Jk,RightDownVectorBar:e3,RightDownVector:t3,RightFloor:n3,rightharpoondown:r3,rightharpoonup:i3,rightleftarrows:a3,rightleftharpoons:o3,rightrightarrows:s3,rightsquigarrow:l3,RightTeeArrow:c3,RightTee:u3,RightTeeVector:d3,rightthreetimes:_3,RightTriangleBar:p3,RightTriangle:m3,RightTriangleEqual:f3,RightUpDownVector:g3,RightUpTeeVector:h3,RightUpVectorBar:E3,RightUpVector:S3,RightVectorBar:b3,RightVector:v3,ring:T3,risingdotseq:y3,rlarr:C3,rlhar:R3,rlm:N3,rmoustache:O3,rmoust:A3,rnmid:I3,roang:D3,roarr:x3,robrk:w3,ropar:M3,ropf:L3,Ropf:k3,roplus:P3,rotimes:B3,RoundImplies:F3,rpar:U3,rpargt:G3,rppolint:q3,rrarr:Y3,Rrightarrow:z3,rsaquo:$3,rscr:H3,Rscr:V3,rsh:W3,Rsh:K3,rsqb:Q3,rsquo:X3,rsquor:j3,rthree:Z3,rtimes:J3,rtri:e5,rtrie:t5,rtrif:n5,rtriltri:r5,RuleDelayed:i5,ruluhar:a5,rx:o5,Sacute:s5,sacute:l5,sbquo:c5,scap:u5,Scaron:d5,scaron:_5,Sc:p5,sc:m5,sccue:f5,sce:g5,scE:h5,Scedil:E5,scedil:S5,Scirc:b5,scirc:v5,scnap:T5,scnE:y5,scnsim:C5,scpolint:R5,scsim:N5,Scy:O5,scy:A5,sdotb:I5,sdot:D5,sdote:x5,searhk:w5,searr:M5,seArr:L5,searrow:k5,sect:P5,semi:B5,seswar:F5,setminus:U5,setmn:G5,sext:q5,Sfr:Y5,sfr:z5,sfrown:$5,sharp:H5,SHCHcy:V5,shchcy:W5,SHcy:K5,shcy:Q5,ShortDownArrow:X5,ShortLeftArrow:j5,shortmid:Z5,shortparallel:J5,ShortRightArrow:eP,ShortUpArrow:tP,shy:nP,Sigma:rP,sigma:iP,sigmaf:aP,sigmav:oP,sim:sP,simdot:lP,sime:cP,simeq:uP,simg:dP,simgE:_P,siml:pP,simlE:mP,simne:fP,simplus:gP,simrarr:hP,slarr:EP,SmallCircle:SP,smallsetminus:bP,smashp:vP,smeparsl:TP,smid:yP,smile:CP,smt:RP,smte:NP,smtes:OP,SOFTcy:AP,softcy:IP,solbar:DP,solb:xP,sol:wP,Sopf:MP,sopf:LP,spades:kP,spadesuit:PP,spar:BP,sqcap:FP,sqcaps:UP,sqcup:GP,sqcups:qP,Sqrt:YP,sqsub:zP,sqsube:$P,sqsubset:HP,sqsubseteq:VP,sqsup:WP,sqsupe:KP,sqsupset:QP,sqsupseteq:XP,square:jP,Square:ZP,SquareIntersection:JP,SquareSubset:e6,SquareSubsetEqual:t6,SquareSuperset:n6,SquareSupersetEqual:r6,SquareUnion:i6,squarf:a6,squ:o6,squf:s6,srarr:l6,Sscr:c6,sscr:u6,ssetmn:d6,ssmile:_6,sstarf:p6,Star:m6,star:f6,starf:g6,straightepsilon:h6,straightphi:E6,strns:S6,sub:b6,Sub:v6,subdot:T6,subE:y6,sube:C6,subedot:R6,submult:N6,subnE:O6,subne:A6,subplus:I6,subrarr:D6,subset:x6,Subset:w6,subseteq:M6,subseteqq:L6,SubsetEqual:k6,subsetneq:P6,subsetneqq:B6,subsim:F6,subsub:U6,subsup:G6,succapprox:q6,succ:Y6,succcurlyeq:z6,Succeeds:$6,SucceedsEqual:H6,SucceedsSlantEqual:V6,SucceedsTilde:W6,succeq:K6,succnapprox:Q6,succneqq:X6,succnsim:j6,succsim:Z6,SuchThat:J6,sum:e7,Sum:t7,sung:n7,sup1:r7,sup2:i7,sup3:a7,sup:o7,Sup:s7,supdot:l7,supdsub:c7,supE:u7,supe:d7,supedot:_7,Superset:p7,SupersetEqual:m7,suphsol:f7,suphsub:g7,suplarr:h7,supmult:E7,supnE:S7,supne:b7,supplus:v7,supset:T7,Supset:y7,supseteq:C7,supseteqq:R7,supsetneq:N7,supsetneqq:O7,supsim:A7,supsub:I7,supsup:D7,swarhk:x7,swarr:w7,swArr:M7,swarrow:L7,swnwar:k7,szlig:P7,Tab:B7,target:F7,Tau:U7,tau:G7,tbrk:q7,Tcaron:Y7,tcaron:z7,Tcedil:$7,tcedil:H7,Tcy:V7,tcy:W7,tdot:K7,telrec:Q7,Tfr:X7,tfr:j7,there4:Z7,therefore:J7,Therefore:e8,Theta:t8,theta:n8,thetasym:r8,thetav:i8,thickapprox:a8,thicksim:o8,ThickSpace:s8,ThinSpace:l8,thinsp:c8,thkap:u8,thksim:d8,THORN:_8,thorn:p8,tilde:m8,Tilde:f8,TildeEqual:g8,TildeFullEqual:h8,TildeTilde:E8,timesbar:S8,timesb:b8,times:v8,timesd:T8,tint:y8,toea:C8,topbot:R8,topcir:N8,top:O8,Topf:A8,topf:I8,topfork:D8,tosa:x8,tprime:w8,trade:M8,TRADE:L8,triangle:k8,triangledown:P8,triangleleft:B8,trianglelefteq:F8,triangleq:U8,triangleright:G8,trianglerighteq:q8,tridot:Y8,trie:z8,triminus:$8,TripleDot:H8,triplus:V8,trisb:W8,tritime:K8,trpezium:Q8,Tscr:X8,tscr:j8,TScy:Z8,tscy:J8,TSHcy:e9,tshcy:t9,Tstrok:n9,tstrok:r9,twixt:i9,twoheadleftarrow:a9,twoheadrightarrow:o9,Uacute:s9,uacute:l9,uarr:c9,Uarr:u9,uArr:d9,Uarrocir:_9,Ubrcy:p9,ubrcy:m9,Ubreve:f9,ubreve:g9,Ucirc:h9,ucirc:E9,Ucy:S9,ucy:b9,udarr:v9,Udblac:T9,udblac:y9,udhar:C9,ufisht:R9,Ufr:N9,ufr:O9,Ugrave:A9,ugrave:I9,uHar:D9,uharl:x9,uharr:w9,uhblk:M9,ulcorn:L9,ulcorner:k9,ulcrop:P9,ultri:B9,Umacr:F9,umacr:U9,uml:G9,UnderBar:q9,UnderBrace:Y9,UnderBracket:z9,UnderParenthesis:$9,Union:H9,UnionPlus:V9,Uogon:W9,uogon:K9,Uopf:Q9,uopf:X9,UpArrowBar:j9,uparrow:Z9,UpArrow:J9,Uparrow:eB,UpArrowDownArrow:tB,updownarrow:nB,UpDownArrow:rB,Updownarrow:iB,UpEquilibrium:aB,upharpoonleft:oB,upharpoonright:sB,uplus:lB,UpperLeftArrow:cB,UpperRightArrow:uB,upsi:dB,Upsi:_B,upsih:pB,Upsilon:mB,upsilon:fB,UpTeeArrow:gB,UpTee:hB,upuparrows:EB,urcorn:SB,urcorner:bB,urcrop:vB,Uring:TB,uring:yB,urtri:CB,Uscr:RB,uscr:NB,utdot:OB,Utilde:AB,utilde:IB,utri:DB,utrif:xB,uuarr:wB,Uuml:MB,uuml:LB,uwangle:kB,vangrt:PB,varepsilon:BB,varkappa:FB,varnothing:UB,varphi:GB,varpi:qB,varpropto:YB,varr:zB,vArr:$B,varrho:HB,varsigma:VB,varsubsetneq:WB,varsubsetneqq:KB,varsupsetneq:QB,varsupsetneqq:XB,vartheta:jB,vartriangleleft:ZB,vartriangleright:JB,vBar:eF,Vbar:tF,vBarv:nF,Vcy:rF,vcy:iF,vdash:aF,vDash:oF,Vdash:sF,VDash:lF,Vdashl:cF,veebar:uF,vee:dF,Vee:_F,veeeq:pF,vellip:mF,verbar:fF,Verbar:gF,vert:hF,Vert:EF,VerticalBar:SF,VerticalLine:bF,VerticalSeparator:vF,VerticalTilde:TF,VeryThinSpace:yF,Vfr:CF,vfr:RF,vltri:NF,vnsub:OF,vnsup:AF,Vopf:IF,vopf:DF,vprop:xF,vrtri:wF,Vscr:MF,vscr:LF,vsubnE:kF,vsubne:PF,vsupnE:BF,vsupne:FF,Vvdash:UF,vzigzag:GF,Wcirc:qF,wcirc:YF,wedbar:zF,wedge:$F,Wedge:HF,wedgeq:VF,weierp:WF,Wfr:KF,wfr:QF,Wopf:XF,wopf:jF,wp:ZF,wr:JF,wreath:eU,Wscr:tU,wscr:nU,xcap:rU,xcirc:iU,xcup:aU,xdtri:oU,Xfr:sU,xfr:lU,xharr:cU,xhArr:uU,Xi:dU,xi:_U,xlarr:pU,xlArr:mU,xmap:fU,xnis:gU,xodot:hU,Xopf:EU,xopf:SU,xoplus:bU,xotime:vU,xrarr:TU,xrArr:yU,Xscr:CU,xscr:RU,xsqcup:NU,xuplus:OU,xutri:AU,xvee:IU,xwedge:DU,Yacute:xU,yacute:wU,YAcy:MU,yacy:LU,Ycirc:kU,ycirc:PU,Ycy:BU,ycy:FU,yen:UU,Yfr:GU,yfr:qU,YIcy:YU,yicy:zU,Yopf:$U,yopf:HU,Yscr:VU,yscr:WU,YUcy:KU,yucy:QU,yuml:XU,Yuml:jU,Zacute:ZU,zacute:JU,Zcaron:eG,zcaron:tG,Zcy:nG,zcy:rG,Zdot:iG,zdot:aG,zeetrf:oG,ZeroWidthSpace:sG,Zeta:lG,zeta:cG,zfr:uG,Zfr:dG,ZHcy:_G,zhcy:pG,zigrarr:mG,zopf:fG,Zopf:gG,Zscr:hG,zscr:EG,zwj:SG,zwnj:bG},Al=vG,$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]/,Kn={},Ts={};function TG(e){var t,n,r=Ts[e];if(r)return r;for(r=Ts[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 yG=Si,ys={};function CG(e){var t,n,r=ys[e];if(r)return r;for(r=ys[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t=55296&&g<=57343?h+="\uFFFD\uFFFD\uFFFD":h+=String.fromCharCode(g),a+=6;continue}if((u&248)===240&&a+91114111?h+="\uFFFD\uFFFD\uFFFD\uFFFD":(g-=65536,h+=String.fromCharCode(55296+(g>>10),56320+(g&1023))),a+=9;continue}h+="\uFFFD"}return h})}bi.defaultChars=";/?:@&=+$,#";bi.componentChars="";var RG=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 OG=/^([a-z0-9.+-]+:)/i,AG=/:[0-9]*$/,IG=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,DG=["<",">",'"',"`"," ","\r",` `," "],xG=["{","}","|","\\","^","`"].concat(DG),wG=["'"].concat(xG),Cs=["%","/","?",";","#"].concat(wG),Rs=["/","?","#"],MG=255,Ns=/^[+a-z0-9A-Z_-]{0,63}$/,LG=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Os={javascript:!0,"javascript:":!0},As={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function kG(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=IG.exec(c);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}var f=OG.exec(c);if(f&&(f=f[0],a=f.toLowerCase(),this.protocol=f,c=c.substr(f.length)),(t||f||c.match(/^\/\/[^@\/]+@[^@\/]+/))&&(u=c.substr(0,2)==="//",u&&!(f&&Os[f])&&(c=c.substr(2),this.slashes=!0)),!Os[f]&&(u||f&&!As[f])){var g=-1;for(n=0;n127?E+="x":E+=C[v];if(!E.match(Ns)){var S=b.slice(0,n),A=b.slice(n+1),P=C.match(LG);P&&(S.push(P[1]),A.unshift(P[2])),A.length&&(c=A.join(".")+c),this.hostname=S.join(".");break}}}}this.hostname.length>MG&&(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),As[a]&&this.hostname&&!this.pathname&&(this.pathname=""),this};pi.prototype.parseHost=function(e){var t=AG.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 PG=kG;Kn.encode=yG;Kn.decode=RG;Kn.format=NG;Kn.parse=PG;var Qn={},Il=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Dl=/[\0-\x1F\x7F-\x9F]/,BG=/[\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]/,xl=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;Qn.Any=Il;Qn.Cc=Dl;Qn.Cf=BG;Qn.P=$a;Qn.Z=xl;(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(V){if(!!V){if(typeof V!="object")throw new TypeError(V+"must be object");Object.keys(V).forEach(function(X){x[X]=V[X]})}}),x}function u(x,Y,V){return[].concat(x.slice(0,Y),V,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),V=56320+(x&1023);return String.fromCharCode(Y,V)}return String.fromCharCode(x)}var f=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,g=/&([a-z#][a-z0-9]{1,31});/gi,h=new RegExp(f.source+"|"+g.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,m=Al;function y(x,Y){var V=0;return a(m,Y)?m[Y]:Y.charCodeAt(0)===35&&p.test(Y)&&(V=Y[1].toLowerCase()==="x"?parseInt(Y.slice(2),16):parseInt(Y.slice(1),10),c(V))?d(V):x}function b(x){return x.indexOf("\\")<0?x:x.replace(f,"$1")}function C(x){return x.indexOf("\\")<0&&x.indexOf("&")<0?x:x.replace(h,function(Y,V,X){return V||y(Y,X)})}var E=/[&<>"]/,v=/[&<>"]/g,N={"&":"&","<":"<",">":">",'"':"""};function S(x){return N[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=Kn,e.lib.ucmicro=Qn,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={},FG=function(t,n,r){var a,l,u,c,d=-1,f=t.posMax,g=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=Is(t.slice(c,n)),d.lines=u,d.pos=n,d.ok=!0),d},GG=Ze.unescapeAll,qG=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"+Cn(e[t].content)+""};Qt.code_block=function(e,t,n,r,a){var l=e[t];return""+Cn(e[t].content)+` `};Qt.fence=function(e,t,n,r,a){var l=e[t],u=l.info?zG(l.info).trim():"",c="",d="",f,g,h,p,m;return u&&(h=u.split(/(\s+)/g),c=h[0],d=h.slice(2).join("")),n.highlight?f=n.highlight(l.content,c,d)||Cn(l.content):f=Cn(l.content),f.indexOf("w.length)&&(M=w.length);for(var x=0,Y=new Array(M);xthis.range.start)){var Y=Math.max(x-this.param.buffer,0);this.checkRange(Y,this.getEndByStart(Y))}}},{key:"handleBehind",value:function(){var x=this.getScrollOvers();xx&&(le=V-1)}return Y>0?--Y:0}},{key:"getIndexOffset",value:function(x){if(!x)return 0;for(var Y=0,V=0,X=0;X1&&arguments[1]!==void 0?arguments[1]:0;if(M>=this.dataSources.length-1)this.scrollToBottom();else{var Y=this.virtual.getOffset(M);x!==0&&(Y=Math.max(0,Y+x)),this.scrollToOffset(Y)}},scrollToBottom:function(){var M=this,x=this.$refs.shepherd;if(x){var Y=x[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(Y),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout(function(){M.getOffset()+M.getClientSize()+1V+1||!V||(this.virtual.handleScroll(x),this.activeEvent(M.target),this.emitEvent(x,Y,V,M))}},activeEvent:function(M){var x=this;if(!(!(this.itemActiveClass||this.itemInactiveClass)||!M)){var Y=M.getBoundingClientRect(),V=M.querySelectorAll('div[role="listitem"]');V.forEach(function(X,le){var ee=X.getBoundingClientRect();ee.topY.top&&ee.leftY.left?(x.itemActiveClass&&X.classList.add(x.itemActiveClass),x.itemInactiveClass&&X.classList.remove(x.itemInactiveClass)):(x.itemActiveClass&&X.classList.remove(x.itemActiveClass),x.itemInactiveClass&&X.classList.add(x.itemInactiveClass))})}},emitEvent:function(M,x,Y,V){this.$emit("scroll",V,this.virtual.getRange()),this.virtual.isFront()&&!!this.dataSources.length&&M-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&M+x+this.bottomThreshold>=Y&&this.$emit("tobottom")},getRenderSlots:function(M){for(var x=[],Y=this.range,V=Y.start,X=Y.end,le=this.dataSources,ee=this.dataKey,j=this.itemClass,U=this.itemTag,Q=this.itemStyle,Z=this.isHorizontal,ie=this.extraProps,se=this.dataComponent,K=this.itemScopedSlots,re=this.$scopedSlots&&this.$scopedSlots.item,de=V;de<=X;de++){var ce=le[de];if(ce){var he=typeof ee=="function"?ee(ce):ce[ee];typeof he=="string"||typeof he=="number"?x.push(M(F,{props:{index:de,tag:U,event:z.ITEM,horizontal:Z,uniqueKey:he,source:ce,extraProps:ie,component:se,slotComponent:re,scopedSlots:K},style:Q,class:[j,this.itemClassAdd?this.itemClassAdd(de):null]})):console.warn("Cannot get the data-key '".concat(ee,"' from data-sources."))}else console.warn("Cannot get the index '".concat(de,"' from data-sources."))}return x}},render:function(M){var x=this.$slots,Y=x.header,V=x.footer,X=this.range,le=X.padFront,ee=X.padBehind,j=this.isHorizontal,U=this.pageMode,Q=this.rootTag,Z=this.wrapTag,ie=this.wrapClass,se=this.wrapStyle,K=this.headerTag,re=this.headerClass,de=this.headerStyle,ce=this.footerTag,he=this.footerClass,Ae=this.footerStyle,Le=this.disabled,Ge={padding:j?"0px ".concat(ee,"px 0px ").concat(le,"px"):"".concat(le,"px 0px ").concat(ee,"px")},qe=se?Object.assign({},se,Ge):Ge;return M(Q,{ref:"root",style:Le?{overflow:"hidden"}:null,on:{"&scroll":!U&&this.onScroll}},[Y?M(G,{class:re,style:de,props:{tag:K,event:z.SLOT,uniqueKey:k.HEADER}},Y):null,M(Z,{class:ie,attrs:{role:"group"},style:qe},this.getRenderSlots(M)),V?M(G,{class:he,style:Ae,props:{tag:ce,event:z.SLOT,uniqueKey:k.FOOTER}},V):null,M("div",{ref:"shepherd",style:{width:j?"0px":"100%",height:j?"100%":"0px"}})])}});return L})})(Dc);var RJ=Dc.exports;function NJ(){return new Promise(e=>{const t=new Hu({render(a){return a(Vu.exports.Modal,{class:"chat-emoji-one-modal",props:{fullscreen:!0,footerHide:!0},on:{"on-visible-change":l=>{l||setTimeout(u=>{document.body.removeChild(this.$el)},500)}}},[a(Ic,{attrs:{onlyEmoji:!0},on:{"on-select":l=>{this.$children[0].visible=!1,l.type==="emoji"&&e(l.text)}}})])}}),n=t.$mount();document.body.appendChild(n.$el);const r=t.$children[0];r.visible=!0,r.$el.lastChild.addEventListener("click",({target:a})=>{a.classList.contains("ivu-modal-body")&&(r.visible=!1)})})}var OJ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isReady?n("div",{staticClass:"dialog-wrapper",class:e.wrapperClass,on:{drop:function(r){return r.preventDefault(),e.chatPasteDrag(r,"drag")},dragover:function(r){return r.preventDefault(),e.chatDragOver(!0,r)},dragleave:function(r){return r.preventDefault(),e.chatDragOver(!1,r)},touchstart:e.onTouchStart,touchmove:e.onTouchMove}},[n("div",{staticClass:"dialog-nav",style:e.navStyle},[e._t("head",function(){return[n("div",{staticClass:"nav-wrapper",class:{completed:e.$A.dialogCompleted(e.dialogData)}},[n("div",{staticClass:"dialog-back",on:{click:e.onBack}},[n("i",{staticClass:"taskfont"},[e._v("\uE676")]),e.msgUnreadOnly?n("div",{staticClass:"back-num"},[e._v(e._s(e.msgUnreadOnly))]):e._e()]),n("div",{staticClass:"dialog-block"},[n("div",{staticClass:"dialog-avatar",on:{click:e.onViewAvatar}},[e.dialogData.type=="group"?[e.dialogData.avatar?n("EAvatar",{staticClass:"img-avatar",attrs:{src:e.dialogData.avatar,size:42}}):e.dialogData.group_type=="department"?n("i",{staticClass:"taskfont icon-avatar department"},[e._v("\uE75C")]):e.dialogData.group_type=="project"?n("i",{staticClass:"taskfont icon-avatar project"},[e._v("\uE6F9")]):e.dialogData.group_type=="task"?n("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:e.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{online:e.dialogData.online_state,userid:e.dialogData.dialog_user.userid,size:42},on:{"update:online":function(r){return e.$set(e.dialogData,"online_state",r)}}},[e.dialogData.type==="user"&&e.dialogData.online_state!==!0?n("p",{attrs:{slot:"end"},slot:"end"},[e._v(" "+e._s(e.$L(e.dialogData.online_state))+" ")]):e._e()])],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[e._l(e.$A.dialogTags(e.dialogData),function(r){return r.color!="success"?[n("Tag",{attrs:{color:r.color,fade:!1}},[e._v(e._s(e.$L(r.text)))])]:e._e()}),n("h2",[e._v(e._s(e.dialogData.name))]),e.peopleNum>0?n("em",{on:{click:function(r){return e.onDialogMenu("groupInfo")}}},[e._v("("+e._s(e.peopleNum)+")")]):e._e(),e.dialogData.bot?n("Tag",{staticClass:"after",attrs:{fade:!1}},[e._v(e._s(e.$L("\u673A\u5668\u4EBA")))]):e._e(),e.dialogData.group_type=="all"?n("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(r){return e.onDialogMenu("groupInfo")}}},[e._v(e._s(e.$L("\u5168\u5458")))]):e.dialogData.group_type=="department"?n("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(r){return e.onDialogMenu("groupInfo")}}},[e._v(e._s(e.$L("\u90E8\u95E8")))]):e._e(),e.msgLoadIng>0?n("div",{staticClass:"load"},[n("Loading")],1):e._e()],2),n("ul",{staticClass:"title-desc"},[e.dialogData.type==="user"?n("li",{class:[e.dialogData.online_state===!0?"online":"offline"]},[e._v(" "+e._s(e.$L(e.dialogData.online_state===!0?"\u5728\u7EBF":e.dialogData.online_state))+" ")]):e._e()]),e.tagShow?n("ul",{staticClass:"title-tags scrollbar-hidden"},e._l(e.msgTags,function(r){var a;return n("li",{key:r.type,class:(a={},a[r.type||"msg"]=!0,a.active=e.msgType===r.type,a),on:{click:function(l){return e.onMsgType(r.type)}}},[n("i",{staticClass:"no-dark-content"}),n("span",[e._v(e._s(e.$L(r.label)))])])}),0):e._e()])]),n("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:e.onDialogMenu}},[n("i",{staticClass:"taskfont dialog-menu-icon"},[e._v("\uE6E9")]),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"searchMsg"}},[n("div",[e._v(e._s(e.$L("\u641C\u7D22\u6D88\u606F")))])]),e.dialogData.type==="user"?[e.isManageBot?n("EDropdownItem",{attrs:{command:"modifyNormal"}},[n("div",[e._v(e._s(e.$L("\u4FEE\u6539\u8D44\u6599")))])]):e._e(),n("EDropdownItem",{attrs:{command:"openCreate"}},[n("div",[e._v(e._s(e.$L("\u521B\u5EFA\u7FA4\u7EC4")))])])]:[n("EDropdownItem",{attrs:{command:"groupInfo"}},[n("div",[e._v(e._s(e.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))])]),e.dialogData.owner_id!=e.userId?[e.dialogData.group_type==="all"&&e.userIsAdmin?n("EDropdownItem",{attrs:{command:"modifyAdmin"}},[n("div",[e._v(e._s(e.$L("\u4FEE\u6539\u8D44\u6599")))])]):e._e(),n("EDropdownItem",{attrs:{command:"exit"}},[n("div",{staticStyle:{color:"#f00"}},[e._v(e._s(e.$L("\u9000\u51FA\u7FA4\u7EC4")))])])]:e.dialogData.group_type==="user"?[n("EDropdownItem",{attrs:{command:"modifyNormal"}},[n("div",[e._v(e._s(e.$L("\u4FEE\u6539\u8D44\u6599")))])]),n("EDropdownItem",{attrs:{command:"transfer"}},[n("div",[e._v(e._s(e.$L("\u8F6C\u8BA9\u7FA4\u4E3B")))])]),n("EDropdownItem",{attrs:{command:"disband"}},[n("div",{staticStyle:{color:"#f00"}},[e._v(e._s(e.$L("\u89E3\u6563\u7FA4\u7EC4")))])])]:e._e()]],2)],1),e.searchShow?n("div",{staticClass:"dialog-search"},[n("div",{staticClass:"search-location"},[n("i",{staticClass:"taskfont",on:{click:function(r){return e.onSearchSwitch("prev")}}},[e._v("\uE702")]),n("i",{staticClass:"taskfont",on:{click:function(r){return e.onSearchSwitch("next")}}},[e._v("\uE705")])]),n("div",{staticClass:"search-input"},[n("Input",{ref:"searchInput",attrs:{placeholder:e.$L("\u641C\u7D22\u6D88\u606F"),clearable:""},on:{"on-keyup":e.onSearchKeyup},model:{value:e.searchKey,callback:function(r){e.searchKey=r},expression:"searchKey"}},[n("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[e.searchLoad>0?n("Loading"):n("Icon",{attrs:{type:"ios-search"}})],1)]),e.searchLoad===0&&e.searchResult.length>0?n("div",{staticClass:"search-total",attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.searchLocation)+"/"+e._s(e.searchResult.length))]):e._e()],1),n("div",{staticClass:"search-cancel",on:{click:function(r){return e.onSearchKeyup(null)}}},[e._v(e._s(e.$L("\u53D6\u6D88")))])]):e._e()],1)]})],2),e.positionMsg?n("div",{staticClass:"dialog-position",class:{down:e.tagShow}},[n("div",{staticClass:"position-label",on:{click:e.onPositionMark}},[e.positionLoad>0?n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):n("i",{staticClass:"taskfont"},[e._v("\uE624")]),e._v(" "+e._s(e.positionMsg.label)+" ")],1)]):e._e(),n("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-virtual",class:e.scrollerClass,attrs:{"item-inactive-class":"inactive","data-key":"id","data-sources":e.allMsgs,"data-component":e.msgItem,"item-class-add":e.itemClassAdd,"extra-props":{dialogData:e.dialogData,operateVisible:e.operateVisible,operateItem:e.operateItem,isMyDialog:e.isMyDialog,msgId:e.msgId},"estimate-size":e.dialogData.type=="group"?105:77,keeps:50,disabled:e.scrollDisabled},on:{scroll:e.onScroll,range:e.onRange,totop:e.onPrevPage,"on-mention":e.onMention,"on-longpress":e.onLongpress,"on-view-reply":e.onViewReply,"on-view-text":e.onViewText,"on-view-file":e.onViewFile,"on-down-file":e.onDownFile,"on-reply-list":e.onReplyList,"on-error":e.onError,"on-emoji":e.onEmoji,"on-show-emoji-user":e.onShowEmojiUser},scopedSlots:e._u([{key:"header",fn:function(){return[e.allMsgs.length===0&&e.loadIng||e.prevId>0?n("div",{staticClass:"dialog-item loading"},[e.scrollOffset<100?n("div",{staticClass:"dialog-wrapper-loading"}):e._e()]):e.allMsgs.length===0?n("div",{staticClass:"dialog-item nothing"},[e._v(e._s(e.$L("\u6682\u65E0\u6D88\u606F")))]):e._e()]},proxy:!0}],null,!1,3828201241)}),n("div",{ref:"footer",staticClass:"dialog-footer",class:e.footerClass,style:e.footerStyle,on:{click:e.onActive}},[n("div",{staticClass:"dialog-newmsg",on:{click:e.onToBottom}},[e._v(e._s(e.$L(`\u6709${e.msgNew}\u6761\u65B0\u6D88\u606F`)))]),n("div",{staticClass:"dialog-goto",on:{click:e.onToBottom}},[n("i",{staticClass:"taskfont"},[e._v("\uE72B")])]),n("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":e.dialogId},on:{"on-progress":function(r){return e.chatFile("progress",r)},"on-success":function(r){return e.chatFile("success",r)},"on-error":function(r){return e.chatFile("error",r)}}}),e.todoShow?n("div",{staticClass:"chat-bottom-menu"},[n("div",{staticClass:"bottom-menu-label"},[e._v(e._s(e.$L("\u5F85\u529E"))+":")]),n("ul",{staticClass:"scrollbar-hidden"},e._l(e.todoList,function(r){return n("li",{on:{click:function(a){return a.stopPropagation(),e.onViewTodo(r)}}},[n("div",{staticClass:"bottom-menu-desc no-dark-content"},[e._v(e._s(e.$A.getMsgSimpleDesc(r.msg_data)))])])}),0)]):e.quickShow?n("div",{staticClass:"chat-bottom-menu"},[n("ul",{staticClass:"scrollbar-hidden"},e._l(e.quickMsgs,function(r){return n("li",{on:{click:function(a){return a.stopPropagation(),e.sendQuick(r)}}},[n("div",{staticClass:"bottom-menu-desc no-dark-content",style:r.style||null},[e._v(e._s(r.label))])])}),0)]):e._e(),e.isMute?n("div",{staticClass:"chat-mute"},[e._v(" "+e._s(e.$L("\u7981\u8A00\u53D1\u8A00"))+" ")]):n("ChatInput",{ref:"input",attrs:{"dialog-id":e.dialogId,"emoji-bottom":e.windowPortrait,maxlength:2e5,placeholder:e.$L("\u8F93\u5165\u6D88\u606F...")},on:{"on-focus":e.onEventFocus,"on-blur":e.onEventBlur,"on-more":e.onEventMore,"on-file":e.sendFileMsg,"on-send":e.sendMsg,"on-record":e.sendRecord,"on-record-state":e.onRecordState,"on-emoji-visible-change":e.onEventEmojiVisibleChange,"on-height-change":e.onHeightChange},model:{value:e.msgText,callback:function(r){e.msgText=r},expression:"msgText"}})],1),n("div",{directives:[{name:"show",rawName:"v-show",value:e.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:e.operateStyles},[n("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:e.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(r){e.operateVisible=!1}}},[n("div",{style:{userSelect:e.operateVisible?"none":"auto",height:e.operateStyles.height}}),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{name:"action"}},[n("ul",{staticClass:"operate-action"},[e.msgId===0?n("li",{on:{click:function(r){return e.onOperate("reply")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE6EB")]),n("span",[e._v(e._s(e.$L("\u56DE\u590D")))])]):e._e(),e.operateItem.userid==e.userId&&e.operateItem.type==="text"?n("li",{on:{click:function(r){return e.onOperate("update")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE779")]),n("span",[e._v(e._s(e.$L("\u7F16\u8F91")))])]):e._e(),e._l(e.operateCopys,function(r){return n("li",{on:{click:function(a){return e.onOperate("copy",r)}}},[n("i",{staticClass:"taskfont",domProps:{innerHTML:e._s(r.icon)}}),n("span",[e._v(e._s(e.$L(r.label)))])])}),n("li",{on:{click:function(r){return e.onOperate("forward")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE638")]),n("span",[e._v(e._s(e.$L("\u8F6C\u53D1")))])]),e.operateItem.userid==e.userId?n("li",{on:{click:function(r){return e.onOperate("withdraw")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE637")]),n("span",[e._v(e._s(e.$L("\u64A4\u56DE")))])]):e._e(),e.operateItem.type==="file"?[n("li",{on:{click:function(r){return e.onOperate("view")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE77B")]),n("span",[e._v(e._s(e.$L("\u67E5\u770B")))])]),n("li",{on:{click:function(r){return e.onOperate("down")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7A8")]),n("span",[e._v(e._s(e.$L("\u4E0B\u8F7D")))])])]:e._e(),n("li",{on:{click:function(r){return e.onOperate("tag")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE61E")]),n("span",[e._v(e._s(e.$L(e.operateItem.tag?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8")))])]),e.operateItem.type==="text"?n("li",{on:{click:function(r){return e.onOperate("newTask")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7B8")]),n("span",[e._v(e._s(e.$L("\u65B0\u4EFB\u52A1")))])]):e._e(),n("li",{on:{click:function(r){return e.onOperate("todo")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7B7")]),n("span",[e._v(e._s(e.$L(e.operateItem.todo?"\u53D6\u6D88\u5F85\u529E":"\u8BBE\u5F85\u529E")))])]),e.msgType!==""?n("li",{on:{click:function(r){return e.onOperate("pos")}}},[n("i",{staticClass:"taskfont"},[e._v("\uEE15")]),n("span",[e._v(e._s(e.$L("\u5B8C\u6574\u5BF9\u8BDD")))])]):e._e()],2)]),n("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[n("ul",{staticClass:"operate-emoji scrollbar-hidden"},[e._l(e.operateEmojis,function(r,a){return n("li",{key:a,staticClass:"no-dark-content",domProps:{innerHTML:e._s(r)},on:{click:function(l){return e.onOperate("emoji",r)}}})}),n("li"),n("li",{staticClass:"more-emoji",on:{click:function(r){return e.onOperate("emoji","more")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE790")])])],2)])],1)],1)],1),e.dialogDrag?n("div",{staticClass:"drag-over",on:{click:function(r){e.dialogDrag=!1}}},[n("div",{staticClass:"drag-text"},[e._v(e._s(e.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):e._e(),n("Modal",{attrs:{title:e.$L(e.pasteTitle),"cancel-text":e.$L("\u53D6\u6D88"),"ok-text":e.$L("\u53D1\u9001"),"enter-ok":!0,closable:!1,"mask-closable":!1},on:{"on-ok":e.pasteSend},model:{value:e.pasteShow,callback:function(r){e.pasteShow=r},expression:"pasteShow"}},[n("ul",{staticClass:"dialog-wrapper-paste",class:e.pasteWrapperClass},e._l(e.pasteItem,function(r){return n("li",[r.type=="image"?n("img",{attrs:{src:r.result}}):n("div",[e._v(e._s(e.$L("\u6587\u4EF6"))+": "+e._s(r.name)+" ("+e._s(e.$A.bytesToSize(r.size))+")")])])}),0)]),n("Modal",{attrs:{title:e.$L("\u521B\u5EFA\u7FA4\u7EC4"),"mask-closable":!1},model:{value:e.createGroupShow,callback:function(r){e.createGroupShow=r},expression:"createGroupShow"}},[n("Form",{attrs:{model:e.createGroupData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[n("FormItem",{attrs:{prop:"avatar",label:e.$L("\u7FA4\u5934\u50CF")}},[n("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:e.createGroupData.avatar,callback:function(r){e.$set(e.createGroupData,"avatar",r)},expression:"createGroupData.avatar"}})],1),n("FormItem",{attrs:{prop:"userids",label:e.$L("\u7FA4\u6210\u5458")}},[n("UserSelect",{attrs:{uncancelable:e.createGroupData.uncancelable,"multiple-max":100,"show-bot":"",title:e.$L("\u9009\u62E9\u9879\u76EE\u6210\u5458")},model:{value:e.createGroupData.userids,callback:function(r){e.$set(e.createGroupData,"userids",r)},expression:"createGroupData.userids"}})],1),n("FormItem",{attrs:{prop:"chat_name",label:e.$L("\u7FA4\u540D\u79F0")}},[n("Input",{attrs:{placeholder:e.$L("\u8F93\u5165\u7FA4\u540D\u79F0\uFF08\u9009\u586B\uFF09")},model:{value:e.createGroupData.chat_name,callback:function(r){e.$set(e.createGroupData,"chat_name",r)},expression:"createGroupData.chat_name"}})],1)],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.createGroupShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.createGroupLoad>0},on:{click:e.onCreateGroup}},[e._v(e._s(e.$L("\u521B\u5EFA")))])],1)],1),n("Modal",{attrs:{title:e.$L("\u4FEE\u6539\u8D44\u6599"),"mask-closable":!1},model:{value:e.modifyShow,callback:function(r){e.modifyShow=r},expression:"modifyShow"}},[n("Form",{attrs:{model:e.modifyData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[e.modifyData.system_name?n("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[e._v(e._s(e.$L(`\u6B63\u5728\u4FEE\u6539\u7CFB\u7EDF\u673A\u5668\u4EBA\uFF1A${e.modifyData.system_name}`)))]):e._e(),n("FormItem",{attrs:{prop:"avatar",label:e.$L("\u5934\u50CF")}},[n("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:e.modifyData.avatar,callback:function(r){e.$set(e.modifyData,"avatar",r)},expression:"modifyData.avatar"}})],1),typeof e.modifyData.name!="undefined"?n("FormItem",{attrs:{prop:"name",label:e.$L("\u540D\u79F0")}},[n("Input",{attrs:{maxlength:20},model:{value:e.modifyData.name,callback:function(r){e.$set(e.modifyData,"name",r)},expression:"modifyData.name"}})],1):e._e(),e.dialogData.bot==e.userId?[typeof e.modifyData.clear_day!="undefined"?n("FormItem",{attrs:{prop:"clear_day",label:e.$L("\u6D88\u606F\u4FDD\u7559")}},[n("Input",{attrs:{maxlength:3,type:"number"},model:{value:e.modifyData.clear_day,callback:function(r){e.$set(e.modifyData,"clear_day",r)},expression:"modifyData.clear_day"}},[n("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.$L("\u5929")))])])],1):e._e(),typeof e.modifyData.webhook_url!="undefined"?n("FormItem",{attrs:{prop:"webhook_url",label:"Webhook"}},[n("Input",{attrs:{maxlength:255},model:{value:e.modifyData.webhook_url,callback:function(r){e.$set(e.modifyData,"webhook_url",r)},expression:"modifyData.webhook_url"}})],1):e._e()]:e._e()],2),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.modifyShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.modifyLoad>0},on:{click:e.onModify}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)],1),n("UserSelect",{ref:"forwardSelect",attrs:{"multiple-max":50,title:e.$L("\u8F6C\u53D1"),"before-submit":e.onForward,"show-select-all":!1,"show-dialog":"",module:""},model:{value:e.forwardData,callback:function(r){e.forwardData=r},expression:"forwardData"}}),n("Modal",{attrs:{title:e.$L("\u8BBE\u7F6E\u5F85\u529E"),"mask-closable":!1},model:{value:e.todoSettingShow,callback:function(r){e.todoSettingShow=r},expression:"todoSettingShow"}},[n("Form",{ref:"todoSettingForm",attrs:{model:e.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[n("FormItem",{attrs:{prop:"type",label:e.$L("\u5F53\u524D\u4F1A\u8BDD")}},[n("RadioGroup",{model:{value:e.todoSettingData.type,callback:function(r){e.$set(e.todoSettingData,"type",r)},expression:"todoSettingData.type"}},[n("Radio",{attrs:{label:"all"}},[e._v(e._s(e.$L("\u6240\u6709\u6210\u5458")))]),n("Radio",{attrs:{label:"user"}},[e._v(e._s(e.$L("\u6307\u5B9A\u6210\u5458")))]),n("br"),e.todoSettingData.my_id?n("Radio",{attrs:{label:"my"}},[n("div",{staticClass:"dialog-wrapper-todo"},[n("div",[n("UserAvatar",{attrs:{userid:e.todoSettingData.my_id,"show-icon":!1,"show-name":!0}}),n("Tag",[e._v(e._s(e.$L("\u81EA\u5DF1")))])],1)])]):e._e(),e.todoSettingData.you_id?n("Radio",{attrs:{label:"you"}},[n("div",{staticClass:"dialog-wrapper-todo"},[n("div",[n("UserAvatar",{attrs:{userid:e.todoSettingData.you_id,"show-icon":!1,"show-name":!0}})],1)])]):e._e()],1)],1),e.todoSettingData.type==="user"?n("FormItem",{attrs:{prop:"userids",label:e.$L("\u6307\u5B9A\u6210\u5458")}},[n("UserSelect",{attrs:{"dialog-id":e.dialogId,title:e.$L("\u9009\u62E9\u6307\u5B9A\u6210\u5458")},model:{value:e.todoSettingData.userids,callback:function(r){e.$set(e.todoSettingData,"userids",r)},expression:"todoSettingData.userids"}})],1):e._e()],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.todoSettingShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.todoSettingLoad>0},on:{click:function(r){return e.onTodo("submit")}}},[e._v(e._s(e.$L("\u786E\u5B9A")))])],1)],1),n("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:e.groupInfoShow,callback:function(r){e.groupInfoShow=r},expression:"groupInfoShow"}},[e.groupInfoShow?n("DialogGroupInfo",{attrs:{dialogId:e.dialogId},on:{"on-close":function(r){e.groupInfoShow=!1}}}):e._e()],1),n("Modal",{attrs:{title:e.$L("\u8F6C\u8BA9\u7FA4\u4E3B\u8EAB\u4EFD"),"mask-closable":!1},model:{value:e.groupTransferShow,callback:function(r){e.groupTransferShow=r},expression:"groupTransferShow"}},[n("Form",{attrs:{model:e.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[n("FormItem",{attrs:{prop:"userid",label:e.$L("\u65B0\u7684\u7FA4\u4E3B")}},[n("UserSelect",{attrs:{disabledChoice:e.groupTransferData.disabledChoice,"multiple-max":1,title:e.$L("\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B")},model:{value:e.groupTransferData.userid,callback:function(r){e.$set(e.groupTransferData,"userid",r)},expression:"groupTransferData.userid"}})],1)],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.groupTransferShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.groupTransferLoad>0},on:{click:function(r){return e.onDialogMenu("transferConfirm")}}},[e._v(e._s(e.$L("\u786E\u5B9A\u8F6C\u8BA9")))])],1)],1),n("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:e.replyListShow,callback:function(r){e.replyListShow=r},expression:"replyListShow"}},[e.replyListShow?n("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:e.dialogId,msgId:e.replyListId}},[n("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[e._v(e._s(e.$L("\u56DE\u590D\u6D88\u606F")))])]):e._e()],1),n("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:e.respondShow,callback:function(r){e.respondShow=r},expression:"respondShow"}},[e.respondShow?n("DialogRespond",{attrs:{"respond-data":e.respondData},on:{"on-close":function(r){e.respondShow=!1}}}):e._e()],1),n("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:e.todoViewShow,callback:function(r){e.todoViewShow=r},expression:"todoViewShow"}},[n("div",{staticClass:"dialog-wrapper drawer-list"},[n("div",{staticClass:"dialog-nav"},[n("div",{staticClass:"drawer-title"},[e._v(e._s(e.$L("\u5F85\u529E\u6D88\u606F")))])]),n("Scrollbar",{attrs:{"class-name":"dialog-scroller"}},[e.todoViewMsg?n("DialogItem",{attrs:{source:e.todoViewMsg,simpleView:""},on:{"on-view-text":e.onViewText,"on-view-file":e.onViewFile,"on-down-file":e.onDownFile,"on-emoji":e.onEmoji}}):e._e(),n("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:e.todoViewPosLoad},on:{click:e.onPosTodo}},[e._v(e._s(e.$L("\u56DE\u5230\u539F\u6587")))])],1),n("div",{staticClass:"todo-button"},[n("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:e.todoViewLoad,long:""},on:{click:e.onDoneTodo}},[e._v(e._s(e.$L("\u5B8C\u6210")))])],1)],1)]),n("DrawerOverlay",{attrs:{placement:"right",size:600},model:{value:e.approveDetailsShow,callback:function(r){e.approveDetailsShow=r},expression:"approveDetailsShow"}},[e.approveDetailsShow?n("ApproveDetails",{staticStyle:{height:"100%","border-radius":"10px"},attrs:{data:e.approveDetails}}):e._e()],1)],1):e._e()},AJ=[];const IJ={name:"DialogWrapper",components:{UserSelect:Ol,ImgUpload:Ku,DialogRespond:XZ,DialogItem:fl,VirtualList:RJ,ChatInput:CJ,DialogGroupInfo:$Z,DrawerOverlay:Wu,DialogUpload:FZ,ApproveDetails:Qu},props:{dialogId:{type:Number,default:0},msgId:{type:Number,default:0},autoFocus:{type:Boolean,default:!1},isMessenger:{type:Boolean,default:!1},beforeBack:Function},data(){return{msgItem:fl,msgText:"",msgNew:0,msgType:"",loadIng:0,allMsgs:[],tempMsgs:[],tempId:$A.randNum(1e9,9999999999),msgLoadIng:0,msgActiveIndex:-1,pasteShow:!1,pasteFile:[],pasteItem:[],searchShow:!1,searchKey:"",searchLoad:0,searchLocation:1,searchResult:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,modifyShow:!1,modifyData:{},modifyLoad:0,forwardData:[],openId:0,dialogDrag:!1,groupInfoShow:!1,groupTransferShow:!1,groupTransferLoad:0,groupTransferData:{userid:[],disabledChoice:[]},navStyle:{},operateVisible:!1,operatePreventScroll:0,operateCopys:[],operateStyles:{},operateItem:{},recordState:"",wrapperStart:null,scrollOffset:0,scrollTail:0,preventMoreLoad:!1,preventToBottom:!1,replyListShow:!1,replyListId:0,respondShow:!1,respondData:{},todoSettingShow:!1,todoSettingLoad:0,todoSettingData:{type:"all",userids:[]},todoViewLoad:!1,todoViewPosLoad:!1,todoViewShow:!1,todoViewData:{},todoViewMid:0,todoViewId:0,scrollDisabled:!1,scrollDirection:null,scrollAction:0,scrollTmp:0,positionLoad:0,approveDetails:{id:0},approveDetailsShow:!1}},mounted(){this.msgSubscribe=_i.Store.subscribe("dialogMsgChange",this.onMsgChange)},beforeDestroy(){this.$store.dispatch("forgetInDialog",this._uid),this.$store.dispatch("closeDialog",this.dialogId),this.msgSubscribe&&(this.msgSubscribe.unsubscribe(),this.msgSubscribe=null)},computed:{...Wn(["userIsAdmin","taskId","dialogSearchMsgId","dialogMsgs","dialogTodos","dialogMsgTransfer","cacheDialogs","wsOpenNum","touchBackInProgress","dialogIns","cacheUserBasic","fileLinks","cacheEmojis","keyboardType","keyboardHeight","safeAreaBottom"]),...Nl(["isLoad"]),isReady(){return this.dialogId>0&&this.dialogData.id>0},dialogData(){return this.cacheDialogs.find(({id:e})=>e==this.dialogId)||{}},dialogList(){return this.cacheDialogs.filter(e=>!(e.name===void 0||e.dialog_delete===1)).sort((e,t)=>e.top_at||t.top_at?$A.Date(t.top_at)-$A.Date(e.top_at):e.todo_num>0||t.todo_num>0?t.todo_num-e.todo_num:$A.Date(t.last_at)-$A.Date(e.last_at))},dialogMsgList(){return this.isReady?this.dialogMsgs.filter(e=>e.dialog_id==this.dialogId):[]},tempMsgList(){return this.isReady?this.tempMsgs.filter(e=>e.dialog_id==this.dialogId):[]},allMsgList(){const e=[];if(e.push(...this.dialogMsgList.filter(t=>this.msgFilter(t))),this.msgId>0){const t=this.dialogMsgs.find(n=>n.id==this.msgId);t&&e.unshift(t)}if(this.tempMsgList.length>0){const t=e.map(({id:r})=>r),n=this.tempMsgList.filter(r=>!t.includes(r.id)&&this.msgFilter(r));n.length>0&&e.push(...n)}return e.sort((t,n)=>t.id-n.id)},loadMsg(){return this.isLoad(`msg::${this.dialogId}-${this.msgId}-${this.msgType}`)},prevId(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum(){return this.dialogData.type==="group"?$A.runNum(this.dialogData.people):0},pasteTitle(){const{pasteItem:e}=this;let t=e.find(({type:r})=>r=="image"),n=e.find(({type:r})=>r!="image");return t&&n?"\u53D1\u9001\u6587\u4EF6/\u56FE\u7247":t?"\u53D1\u9001\u56FE\u7247":"\u53D1\u9001\u6587\u4EF6"},msgTags(){const e=[{type:"",label:"\u6D88\u606F"}];return this.dialogData.has_tag&&e.push({type:"tag",label:"\u6807\u6CE8"}),this.dialogData.has_image&&e.push({type:"image",label:"\u56FE\u7247"}),this.dialogData.has_file&&e.push({type:"file",label:"\u6587\u4EF6"}),this.dialogData.has_link&&e.push({type:"link",label:"\u94FE\u63A5"}),this.dialogData.group_type==="project"&&e.push({type:"project",label:"\u6253\u5F00\u9879\u76EE"}),this.dialogData.group_type==="task"&&e.push({type:"task",label:"\u6253\u5F00\u4EFB\u52A1"}),e},quickMsgs(){return this.dialogData.quick_msgs||[]},quickShow(){return this.quickMsgs.length>0&&this.windowScrollY===0&&this.quoteId===0},todoList(){return this.dialogData.todo_num?this.dialogTodos.filter(e=>!e.done_at&&e.dialog_id==this.dialogId).sort((e,t)=>t.id-e.id):[]},todoShow(){return this.todoList.length>0&&this.windowScrollY===0&&this.quoteId===0},wrapperClass(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow(){return this.msgTags.length>1&&this.windowScrollY===0&&!this.searchShow},scrollerClass(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass(){return this.pasteItem.find(({type:e})=>e!=="image")?["multiple"]:[]},footerClass(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},footerPaddingBottom({keyboardType:e,keyboardHeight:t,safeAreaBottom:n,windowScrollY:r,isMessenger:a}){return r===0&&a&&e==="show"&&t>0&&t<120?t+n:0},footerStyle({footerPaddingBottom:e}){const t={};return e&&(t.paddingBottom=`${e}px`),t},msgUnreadOnly(){let e=0;return this.cacheDialogs.some(t=>{e+=$A.getDialogNum(t)}),e<=0?"":(e>999&&(e="999+"),String(e))},isMyDialog(){const{dialogData:e,userId:t}=this;return e.dialog_user&&e.dialog_user.userid==t},isManageBot(){const{dialogData:e,userId:t,userIsAdmin:n}=this;return e.bot?e.bot==t?!0:e.dialog_user&&e.dialog_user.userid==e.bot&&n:!1},isMute(){if(this.dialogData.group_type==="all"){if(this.dialogData.all_group_mute==="all")return!0;if(this.dialogData.all_group_mute==="user"&&!this.userIsAdmin)return!0}return!1},quoteId(){return this.msgId>0?this.msgId:this.dialogData.extra_quote_id||0},quoteUpdate(){return this.dialogData.extra_quote_type==="update"},quoteData(){return this.quoteId?this.allMsgs.find(({id:e})=>e===this.quoteId):null},todoViewMsg(){if(this.todoViewMid){const e=this.allMsgs.find(t=>t.id==this.todoViewMid);if(e)return e;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null},positionMsg(){const{unread:e,position_msgs:t}=this.dialogData;if(!t||t.length===0||e===0||this.allMsgs.length===0)return null;const n=t.sort((r,a)=>a.msg_id-r.msg_id)[0];return this.allMsgs.findIndex(({id:r})=>r==n.msg_id)===-1?n.label==="{UNREAD}"?Object.assign(n,{label:this.$L(`\u672A\u8BFB\u6D88\u606F${e}\u6761`)}):n:null},operateEmojis(){const e=this.cacheEmojis.slice(0,3);return Object.values(["\u{1F44C}","\u{1F44D}","\u{1F602}","\u{1F389}","\u2764\uFE0F","\u{1F973}\uFE0F","\u{1F970}","\u{1F625}","\u{1F62D}"]).some(t=>{e.includes(t)||e.push(t)}),e}},watch:{dialogId:{handler(e,t){e&&(this.msgNew=0,this.msgType="",this.searchShow=!1,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.getMsgs({dialog_id:e,msg_id:this.msgId,msg_type:this.msgType}).then(n=>{this.openId=e,setTimeout(this.onSearchMsgId,100)}).catch(n=>{}),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:e}),this.autoFocus&&this.inputFocus()),this.$store.dispatch("closeDialog",t)},immediate:!0},loadMsg:{handler(e){e?this.loadIng++:setTimeout(t=>{this.loadIng--},300)},immediate:!0},msgType(){this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch(e=>{})},searchKey(e){!e||(this.searchLoad++,setTimeout(t=>{this.searchKey===e&&(this.searchLoad++,this.searchResult=[],this.searchLocation=0,this.$store.dispatch("call",{url:"dialog/msg/search",data:{dialog_id:this.dialogId,key:e}}).then(({data:n})=>{this.searchKey===e&&(this.searchResult=n.data,this.searchLocation=this.searchResult.length)}).finally(n=>{this.searchLoad--})),this.searchLoad--},600))},searchLocation(e){if(e===0)return;const t=this.searchResult[e-1];t&&this.onPositionId(t)},dialogSearchMsgId(){this.onSearchMsgId()},dialogMsgTransfer:{handler({time:e,msgFile:t,msgRecord:n,msgText:r,dialogId:a}){e>$A.Time()&&a==this.dialogId&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick(()=>{$A.isArray(t)&&t.length>0?this.sendFileMsg(t):$A.isJson(n)&&n.duration>0?this.sendRecord(n):r&&this.sendMsg(r)}))},immediate:!0},wsOpenNum(e){e<=1||this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch(t=>{})},allMsgList(e,t){const{tail:n}=this.scrollInfo();if($A.isIos()&&e.length!==t.length?(this.$refs.scroller.$el.style.visibility="hidden",this.allMsgs=e,this.$nextTick(r=>{this.$refs.scroller.$el.style.visibility="visible"})):this.allMsgs=e,!this.windowActive||n>55&&t.length>0){const r=t[t.length-1]?t[t.length-1].id:0,a=e.filter(l=>l.id&&l.id>r);this.msgNew+=a.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY(e){if($A.isIos()&&!this.$slots.head){const{tail:t}=this.scrollInfo();this.navStyle={marginTop:e+"px"},t<=55&&requestAnimationFrame(this.onToBottom),this.$refs.input.isFocus&&$A.scrollToView(this.$refs.footer)}},windowActive(e){if(e&&this.autoFocus){const t=$A.last(this.dialogIns);t&&t.uid===this._uid&&this.inputFocus()}},windowHeight(e,t){if(e-1&&setTimeout(t=>this.msgActiveIndex=-1,800)},footerPaddingBottom(e){if(e){const{tail:t}=this.scrollInfo();t<=55&&requestAnimationFrame(this.onToBottom)}}},methods:{sendMsg(e,t){let n,r="text",a="no",l=!1;if(typeof e=="string"&&e?n=e:(n=this.msgText,l=!0),t==="md"?(n=this.$refs.input.getText(),r="md"):t==="silence"&&(a="yes"),n==""){this.inputFocus();return}if(r==="text"&&(n=n.replace(/<\/span> <\/p>$/,"

")),this.quoteUpdate){r==="text"&&(n=n.replace(new RegExp(`src=(["'])${$A.apiUrl("../")}`,"g"),"src=$1{{RemoteURL}}"));const u=this.quoteId;this.$store.dispatch("setLoad",{key:`msg-${u}`,delay:600}),this.cancelQuote(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:u,text:n,text_type:r,silence:a},method:"post",complete:c=>this.$store.dispatch("cancelLoad",`msg-${u}`)}).then(({data:c})=>{this.sendSuccess(c),this.onPositionId(u)}).catch(({msg:c})=>{$A.modalError(c)})}else{const u=$A.stringLength(n.replace(/]*?>/g,""))>5e3,c={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:u?"loading":"text",userid:this.userId,msg:{text:u?"":n,type:r}};this.tempMsgs.push(c),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:c.dialog_id,reply_id:c.reply_id,text:n,text_type:r,silence:a},method:"post"}).then(({data:d})=>{this.tempMsgs=this.tempMsgs.filter(({id:f})=>f!=c.id),this.sendSuccess(d)}).catch(d=>{this.$set(c,"error",!0),this.$set(c,"errorData",{type:"text",content:d.msg,msg:n})})}l&&requestAnimationFrame(u=>this.msgText="")},sendRecord(e){const t={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:"loading",userid:this.userId,msg:e};this.tempMsgs.push(t),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(e,{dialog_id:this.dialogId,reply_id:this.quoteId}),method:"post"}).then(({data:n})=>{this.tempMsgs=this.tempMsgs.filter(({id:r})=>r!=t.id),this.sendSuccess(n)}).catch(n=>{this.$set(t,"error",!0),this.$set(t,"errorData",{type:"record",content:n.msg,msg:e})})},sendFileMsg(e){const t=$A.isArray(e)?e:[e];t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some(n=>{const r={type:$A.getMiddle(n.type,null,"/"),name:n.name,size:n.size,result:null};if(r.type==="image"){const a=new FileReader;a.readAsDataURL(n),a.onload=({target:l})=>{r.result=l.result,this.pasteFile.push(n),this.pasteItem.push(r),this.pasteShow=!0}}else this.pasteFile.push(n),this.pasteItem.push(r),this.pasteShow=!0}))},sendQuick(e){this.sendMsg(`

${e.label}

`)},onMsgChange(e){const t=this.allMsgs.find(({type:n,id:r})=>n=="text"&&r==e.id);if(t){const{tail:n}=this.scrollInfo();e.type==="append"?t.msg.text+=e.text:e.type==="replace"&&(t.msg.text=e.text),this.$nextTick(r=>{const{tail:a}=this.scrollInfo();n<=10&&a!=n&&(this.operatePreventScroll++,this.$refs.scroller.scrollToBottom(),setTimeout(l=>{this.operatePreventScroll--},50))})}},getTempId(){return this.tempId++},getMsgs(e){return new Promise((t,n)=>{setTimeout(r=>this.msgLoadIng++,2e3),this.$store.dispatch("getDialogMsgs",e).then(t).catch(n).finally(r=>{this.msgLoadIng--})})},msgFilter(e){if(this.msgType){if(this.msgType==="tag"){if(!e.tag)return!1}else if(this.msgType==="link"){if(!e.link)return!1}else if(this.msgType!==e.mtype)return!1}return!(this.msgId&&e.reply_id!=this.msgId)},onSearchMsgId(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId(e,t=0,n=0){return new Promise((r,a)=>{if(e===0){$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u53C2\u6570\u9519\u8BEF"),a();return}if(this.loadMsg||this.msgType!==""){if(this.msgType="",n===0)this.$store.dispatch("showSpinner",600);else if(n>20){this.$store.dispatch("hiddenSpinner"),$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u8BF7\u6C42\u8D85\u65F6"),a();return}n++,setTimeout(c=>{this.onPositionId(e,t,n).then(r).catch(a)},Math.min(800,200*n));return}n>0&&this.$store.dispatch("hiddenSpinner");const l=this.allMsgs.findIndex(c=>c.id===e),u=this.prevId>0?0:-1;l>u?setTimeout(c=>{this.onToIndex(l),r()},200):(t>0&&this.$store.dispatch("setLoad",{key:`msg-${t}`,delay:600}),this.preventToBottom=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,position_id:e,spinner:2e3}).finally(c=>{const d=this.allMsgs.findIndex(f=>f.id===e);d>-1&&(this.onToIndex(d),r()),t>0&&this.$store.dispatch("cancelLoad",`msg-${t}`),this.preventToBottom=!1}))})},onViewTodo(e){if(this.operateVisible)return;this.todoViewId=e.id,this.todoViewMid=e.msg_id,this.todoViewShow=!0,this.allMsgs.findIndex(n=>n.id===this.todoViewMid)===-1&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then(({data:n})=>{this.todoViewData=n})},onCloseTodo(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo(){!this.todoViewMid||(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally(e=>{this.todoViewPosLoad=!1}))},onDoneTodo(){!this.todoViewId||this.todoViewLoad||(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then(({data:e})=>{this.$store.dispatch("saveDialogTodo",{id:this.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),this.$store.dispatch("saveDialog",{id:this.dialogId,todo_num:this.todoList.length}),e.add&&this.sendSuccess(e.add),this.todoList.length===0&&this.$store.dispatch("getDialogTodo",this.dialogId),this.onCloseTodo()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.todoViewLoad=!1}))},itemClassAdd(e){return e===this.msgActiveIndex?"common-shake":""},inputFocus(){this.$nextTick(e=>{this.$refs.input&&this.$refs.input.focus()})},onRecordState(e){this.recordState=e},chatPasteDrag(e,t){if(this.dialogDrag=!1,$A.dataHasFolder(t==="drag"?e.dataTransfer:e.clipboardData)){e.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${t==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\u3002`);return}const n=t==="drag"?e.dataTransfer.files:e.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(e.preventDefault(),this.sendFileMsg(r))},chatDragOver(e,t){let n=this.__dialogDrag=$A.randomString(8);if(!e)setTimeout(()=>{n===this.__dialogDrag&&(this.dialogDrag=e)},150);else{if(t.dataTransfer.effectAllowed==="move"||Array.prototype.slice.call(t.dataTransfer.files).length===0)return;this.dialogDrag=!0}},onTouchStart(e){if(this.wrapperStart=null,this.$refs.scroller.$el.contains(e.target))this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:e.touches[0].clientY});else if(this.$refs.input.$refs.editor.contains(e.target)){const t=this.$refs.input.$refs.editor.querySelector(".ql-editor");if(t){const n=t.clientHeight,r=t.scrollTop,a=t.scrollHeight;this.wrapperStart={offset:r,scale:r/(a-n),tail:a-n-r,clientY:e.touches[0].clientY}}}},onTouchMove(e){if(this.footerPaddingBottom>0||this.windowPortrait&&this.windowScrollY>0){if(this.wrapperStart===null){e.preventDefault();return}this.wrapperStart.clientY>e.touches[0].clientY?this.wrapperStart.tail===0&&e.preventDefault():this.wrapperStart.offset===0&&e.preventDefault()}},pasteSend(){this.pasteFile.some(e=>{this.$refs.chatUpload.upload(e)})},chatFile(e,t){switch(e){case"progress":const n={id:t.tempId,dialog_id:this.dialogData.id,reply_id:this.quoteId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(n),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom);break;case"error":this.tempMsgs=this.tempMsgs.filter(({id:r})=>r!=t.tempId);break;case"success":this.tempMsgs=this.tempMsgs.filter(({id:r})=>r!=t.tempId),this.sendSuccess(t.data);break}},sendSuccess(e){if($A.isArray(e)){e.some(this.sendSuccess);return}this.$store.dispatch("saveDialogMsg",e),this.quoteUpdate||(this.$store.dispatch("increaseTaskMsgNum",e),this.$store.dispatch("increaseMsgReplyNum",e),this.$store.dispatch("updateDialogLastMsg",e)),this.cancelQuote(),this.onActive()},setQuote(e,t){var n;(n=this.$refs.input)==null||n.setQuote(e,t)},cancelQuote(){var e;(e=this.$refs.input)==null||e.cancelQuote()},onEventFocus(){this.$emit("on-focus")},onEventBlur(){this.$emit("on-blur")},onEventMore(e){switch(e){case"image":case"file":this.$refs.chatUpload.handleClick();break;case"call":this.onCallTel();break;case"anon":this.onAnon();break}},onCallTel(){this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then(({data:e})=>{e.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:e.tel}),e.add&&(this.$store.dispatch("saveDialogMsg",e.add),this.$store.dispatch("updateDialogLastMsg",e.add),this.onActive())}).catch(({msg:e})=>{$A.modalError(e)})},onAnon(){if(this.dialogData.type!=="user"||this.dialogData.bot){$A.modalWarning("\u533F\u540D\u6D88\u606F\u4EC5\u5141\u8BB8\u53D1\u9001\u7ED9\u4E2A\u4EBA");return}$A.modalInput({title:"\u53D1\u9001\u533F\u540D\u6D88\u606F",placeholder:"\u533F\u540D\u6D88\u606F\u5C06\u901A\u8FC7\u533F\u540D\u6D88\u606F\uFF08\u673A\u5668\u4EBA\uFF09\u53D1\u9001\u7ED9\u5BF9\u65B9\uFF0C\u4E0D\u4F1A\u8BB0\u5F55\u4F60\u7684\u4EFB\u4F55\u8EAB\u4EFD\u4FE1\u606F",inputProps:{type:"textarea",rows:3,autosize:{minRows:3,maxRows:6},maxlength:2e3},okText:"\u533F\u540D\u53D1\u9001",onOk:e=>e?new Promise((t,n)=>{this.$store.dispatch("call",{url:"dialog/msg/sendanon",data:{userid:this.dialogData.dialog_user.userid,text:e},method:"post"}).then(({msg:r})=>{t(r)}).catch(({msg:r})=>{n(r)})}):"\u8BF7\u8F93\u5165\u6D88\u606F\u5185\u5BB9"})},onEventEmojiVisibleChange(e){e&&this.windowPortrait&&this.onToBottom()},onHeightChange({newVal:e,oldVal:t}){const n=e-t;if(n!==0){const{offset:r,tail:a}=this.scrollInfo();a>0&&this.onToOffset(r+n)}},onActive(){this.$emit("on-active")},onToBottom(){this.msgNew=0;const e=this.$refs.scroller;e&&(e.scrollToBottom(),requestAnimationFrame(t=>e.scrollToBottom()))},onToIndex(e){const t=this.$refs.scroller;t&&(t.stopToBottom(),t.scrollToIndex(e,-100),requestAnimationFrame(n=>t.scrollToIndex(e,-100))),requestAnimationFrame(n=>this.msgActiveIndex=e)},onToOffset(e){const t=this.$refs.scroller;t&&(t.stopToBottom(),t.scrollToOffset(e),setTimeout(n=>t.scrollToOffset(e),10))},scrollInfo(){const e=this.$refs.scroller;return e?e.scrollInfo():{offset:0,scale:0,tail:0}},openProject(){!this.dialogData.group_info||(this.windowPortrait&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask(){!this.dialogData.group_info||(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",{id:this.dialogData.group_info.id,deleted_at:this.dialogData.group_info.deleted_at,archived_at:this.dialogData.group_info.archived_at}))},onPrevPage(){this.prevId!==0&&this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:e=>this.scrollDisabled=!0,save_after:e=>this.scrollDisabled=!1}).then(({data:e})=>{const t=e.list.map(n=>n.id);this.$nextTick(()=>{const n=this.$refs.scroller,r=t.reduce((l,u)=>({size:(typeof l=="object"?l.size:n.getSize(l))+n.getSize(u)}));let a=n.getOffset()+r.size;this.prevId===0&&(a-=36),this.onToOffset(a),setTimeout(l=>n.virtual.handleFront(),10)})}).catch(()=>{})},onDialogMenu(e){var t;switch(e){case"searchMsg":this.searchShow=!0,this.$nextTick(r=>{this.$refs.searchInput.focus()});break;case"openCreate":const n=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&n.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:n,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"modifyNormal":this.modifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar,name:this.dialogData.name},this.dialogData.type==="user"&&(this.modifyData=Object.assign(this.modifyData,{userid:this.dialogData.dialog_user.userid,avatar:(t=this.cacheUserBasic.find(r=>r.userid===this.dialogData.dialog_user.userid))==null?void 0:t.userimg,clear_day:0,webhook_url:"",system_name:""}),this.modifyLoad++,this.$store.dispatch("call",{url:"users/bot/info",data:{id:this.dialogData.dialog_user.userid}}).then(({data:r})=>{this.modifyData.clear_day=r.clear_day,this.modifyData.webhook_url=r.webhook_url,this.modifyData.system_name=r.system_name}).finally(()=>{this.modifyLoad--})),this.modifyShow=!0;break;case"modifyAdmin":this.modifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar,admin:1},this.modifyShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup();break}},onTransferGroup(){if(this.groupTransferData.userid.length===0){$A.messageError("\u8BF7\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B");return}this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.$store.dispatch("saveDialog",e)}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.groupTransferLoad--,this.groupTransferShow=!1})},onDisbandGroup(){$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u8981\u89E3\u6563\u3010${this.dialogData.name}\u3011\u7FA4\u7EC4\u5417\uFF1F`,loading:!0,okText:"\u89E3\u6563",onOk:()=>new Promise((e,t)=>{this.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:this.dialogId}}).then(({msg:n})=>{e(n),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:n})=>{t(n)})})})},onExitGroup(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u7FA4\u7EC4\u5417\uFF1F",loading:!0,onOk:()=>new Promise((e,t)=>{this.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:this.dialogId}}).then(({msg:n})=>{e(n),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:n})=>{t(n)})})})},onCreateGroup(){this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.createGroupShow=!1,this.createGroupData={},this.$store.dispatch("saveDialog",e),this.$store.dispatch("openDialog",e.id)}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.createGroupLoad--})},onModify(){this.modifyData.userid?(this.modifyLoad++,this.$store.dispatch("call",{url:"users/bot/edit",data:{id:this.modifyData.userid,avatar:this.modifyData.avatar,name:this.modifyData.name,clear_day:this.modifyData.clear_day,webhook_url:this.modifyData.webhook_url},method:"post"}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.$store.dispatch("saveUserBasic",{userid:this.modifyData.userid,nickname:e.name,userimg:e.avatar}),this.$store.dispatch("saveDialog",{id:this.modifyData.dialog_id,name:e.name}),this.modifyShow=!1,this.modifyData={}}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.modifyLoad--})):(this.modifyLoad++,this.$store.dispatch("call",{url:"dialog/group/edit",data:this.modifyData}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.$store.dispatch("saveDialog",e),this.modifyShow=!1,this.modifyData={}}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.modifyLoad--}))},onForward(){return new Promise((e,t)=>{if(this.forwardData.length===0){$A.messageError("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458"),t();return}const n=this.forwardData.filter(a=>$A.leftExists(a,"d:")).map(a=>a.replace("d:","")),r=this.forwardData.filter(a=>!$A.leftExists(a,"d:"));this.$store.dispatch("call",{url:"dialog/msg/forward",data:{dialogids:n,userids:r,msg_id:this.operateItem.id}}).then(({data:a,msg:l})=>{this.$store.dispatch("saveDialogMsg",a.msgs),this.$store.dispatch("updateDialogLastMsg",a.msgs),$A.messageSuccess(l),e()}).catch(({msg:a})=>{$A.modalError(a),t()})})},onScroll(e){this.operatePreventScroll===0&&(this.operateVisible=!1);const{offset:t,tail:n}=this.scrollInfo();this.scrollOffset=t,this.scrollTail=n,this.scrollTail<=55&&(this.msgNew=0),this.scrollAction=e.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout(r=>this.scrollTmp=this.scrollAction,0)},onRange(e){if(this.preventMoreLoad)return;const t=this.scrollDirection==="down"?"next_id":"prev_id";for(let n=e.start;n<=e.end;n++){const r=this.allMsgs[n][t];if(r){const a=this.allMsgs[n+(t==="next_id"?1:-1)];a&&a.id!=r&&(this.preventMoreLoad=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,[t]:r}).finally(l=>{this.preventMoreLoad=!1}))}}},onBack(){if(!this.beforeBack)return this.handleBack();const e=this.beforeBack();e&&e.then?e.then(()=>{this.handleBack()}):this.handleBack()},handleBack(){const{name:e,params:t}=this.$store.state.routeHistoryLast;e===this.$route.name&&/^\d+$/.test(t.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType(e){switch(e){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5..."):this.msgType=e;break}},onMention(e){const t=this.cacheUserBasic.find(({userid:n})=>n==e.userid);t&&this.$refs.input.addMention({denotationChar:"@",id:t.userid,value:t.nickname})},onLongpress({event:e,el:t,msgData:n}){if(this.operateVisible=this.operateItem.id===n.id,this.operateItem=$A.isJson(n)?n:{},this.operateCopys=[],e.target.nodeName==="IMG"&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"\u590D\u5236\u56FE\u7247",value:$A.thumbRestore(e.target.currentSrc)}):e.target.nodeName==="A"&&(e.target.classList.contains("mention")&&e.target.classList.contains("file")&&this.findOperateFile(this.operateItem.id,e.target.href),this.operateCopys.push({type:"link",icon:"",label:"\u590D\u5236\u94FE\u63A5",value:e.target.href})),n.type==="text"){e.target.nodeName==="IMG"&&this.operateCopys.push({type:"imagedown",icon:"",label:"\u4E0B\u8F7D\u56FE\u7247",value:$A.thumbRestore(e.target.currentSrc)});const r=this.getSelectedTextInElement(t);if(r.length>0&&this.operateCopys.push({type:"selected",icon:"",label:"\u590D\u5236\u9009\u62E9",value:r}),n.msg.text.replace(/<[^>]+>/g,"").length>0){let a=this.operateCopys.length>0?"\u590D\u5236\u6587\u672C":"\u590D\u5236";r.length>0&&(a="\u590D\u5236\u5168\u90E8"),this.operateCopys.push({type:"text",icon:"",label:a,value:""})}}this.$nextTick(()=>{const r=t.getBoundingClientRect(),a=this.$el.getBoundingClientRect();this.operateStyles={left:`${e.clientX-a.left}px`,top:`${r.top+this.windowScrollY}px`,height:r.height+"px"},this.operateVisible=!0})},onOperate(e,t=null){this.operateVisible=!1,this.$nextTick(n=>{switch(e){case"reply":this.onReply();break;case"update":this.onUpdate();break;case"copy":this.onCopy(t);break;case"forward":this.forwardData=[],this.$refs.forwardSelect.onSelection();break;case"withdraw":this.onWithdraw();break;case"view":this.onViewFile();break;case"down":this.onDownFile();break;case"tag":this.onTag();break;case"newTask":let r=$A.formatMsgBasic(this.operateItem.msg.text);r=r.replace(/]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,''),_i.Store.set("addTask",{owner:[this.userId],content:r});break;case"todo":this.onTodo();break;case"pos":this.onPositionId(this.operateItem.id);break;case"emoji":t==="more"?NJ().then(this.onEmoji):this.onEmoji(t);break}})},onReply(e){const{tail:t}=this.scrollInfo();this.setQuote(this.operateItem.id,e),this.inputFocus(),t<=55&&requestAnimationFrame(this.onToBottom)},onUpdate(){const{type:e}=this.operateItem;if(this.onReply(e==="text"?"update":"reply"),e==="text"){let{text:t,type:n}=this.operateItem.msg;this.$refs.input.setPasteMode(!1),n==="md"?this.$refs.input.setText(t):(t.indexOf("mention")>-1&&(t=t.replace(/]*)>~([^>]*)<\/a>/g,'~$3'),t=t.replace(/([@#])([^>]*)<\/span>/g,'$3$4')),t=t.replace(/]*>/gi,r=>r.replace(/(width|height)="\d+"\s*/ig,"")),this.msgText=$A.formatMsgBasic(t)),this.$nextTick(r=>this.$refs.input.setPasteMode(!0))}},onCopy(e){if(!$A.isJson(e))return;const{type:t,value:n}=e;switch(t){case"image":this.$Electron&&this.getBase64Image(n).then(a=>{this.$Electron.sendMessage("copyBase64Image",{base64:a})});break;case"imagedown":this.$store.dispatch("downUrl",{url:n,token:!1});break;case"filepos":this.windowPortrait&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-file",params:n});break;case"link":this.$copyText(n).then(a=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(a=>$A.messageError("\u590D\u5236\u5931\u8D25"));break;case"selected":this.$copyText(n).then(a=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(a=>$A.messageError("\u590D\u5236\u5931\u8D25"));break;case"text":const r=$A(this.$refs.scroller.$el).find(`[data-id="${this.operateItem.id}"]`).find(".dialog-content");if(r.length>0){const a=r[0].innerText.replace(/\n\n/g,` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b={FRONT:"FRONT",BEHIND:"BEHIND"},C={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},E=0,v=function(){function w(M,x){r(this,w),this.init(M,x)}return l(w,[{key:"init",value:function(x,Y){this.param=x,this.callUpdate=Y,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.fixedSizeValue=0,this.calcType=C.INIT,this.offset=0,this.direction="",this.range=Object.create(null),x&&this.checkRange(0,x.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var x=Object.create(null);return x.start=this.range.start,x.end=this.range.end,x.padFront=this.range.padFront,x.padBehind=this.range.padBehind,x}},{key:"isBehind",value:function(){return this.direction===b.BEHIND}},{key:"isFront",value:function(){return this.direction===b.FRONT}},{key:"getOffset",value:function(x){return(x<1?0:this.getIndexOffset(x))+this.param.slotHeaderSize}},{key:"updateParam",value:function(x,Y){var V=this;this.param&&x in this.param&&(x==="uniqueIds"&&this.sizes.forEach(function(X,le){Y.includes(le)||V.sizes.delete(le)}),this.param[x]=Y)}},{key:"saveSize",value:function(x,Y){this.sizes.set(x,Y),this.calcType===C.INIT?(this.fixedSizeValue=Y,this.calcType=C.FIXED):this.calcType===C.FIXED&&this.fixedSizeValue!==Y&&(this.calcType=C.DYNAMIC,delete this.fixedSizeValue),this.calcType!==C.FIXED&&typeof this.firstRangeTotalSize!="undefined"&&(this.sizes.sizethis.range.start)){var Y=Math.max(x-this.param.buffer,0);this.checkRange(Y,this.getEndByStart(Y))}}},{key:"handleBehind",value:function(){var x=this.getScrollOvers();xx&&(le=V-1)}return Y>0?--Y:0}},{key:"getIndexOffset",value:function(x){if(!x)return 0;for(var Y=0,V=0,X=0;X1&&arguments[1]!==void 0?arguments[1]:0;if(M>=this.dataSources.length-1)this.scrollToBottom();else{var Y=this.virtual.getOffset(M);x!==0&&(Y=Math.max(0,Y+x)),this.scrollToOffset(Y)}},scrollToBottom:function(){var M=this,x=this.$refs.shepherd;if(x){var Y=x[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(Y),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout(function(){M.getOffset()+M.getClientSize()+1V+1||!V||(this.virtual.handleScroll(x),this.activeEvent(M.target),this.emitEvent(x,Y,V,M))}},activeEvent:function(M){var x=this;if(!(!(this.itemActiveClass||this.itemInactiveClass)||!M)){var Y=M.getBoundingClientRect(),V=M.querySelectorAll('div[role="listitem"]');V.forEach(function(X,le){var ee=X.getBoundingClientRect();ee.topY.top&&ee.leftY.left?(x.itemActiveClass&&X.classList.add(x.itemActiveClass),x.itemInactiveClass&&X.classList.remove(x.itemInactiveClass)):(x.itemActiveClass&&X.classList.remove(x.itemActiveClass),x.itemInactiveClass&&X.classList.add(x.itemInactiveClass))})}},emitEvent:function(M,x,Y,V){this.$emit("scroll",V,this.virtual.getRange()),this.virtual.isFront()&&!!this.dataSources.length&&M-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&M+x+this.bottomThreshold>=Y&&this.$emit("tobottom")},getRenderSlots:function(M){for(var x=[],Y=this.range,V=Y.start,X=Y.end,le=this.dataSources,ee=this.dataKey,j=this.itemClass,U=this.itemTag,Q=this.itemStyle,Z=this.isHorizontal,ie=this.extraProps,se=this.dataComponent,K=this.itemScopedSlots,re=this.$scopedSlots&&this.$scopedSlots.item,de=V;de<=X;de++){var ce=le[de];if(ce){var he=typeof ee=="function"?ee(ce):ce[ee];typeof he=="string"||typeof he=="number"?x.push(M(F,{props:{index:de,tag:U,event:z.ITEM,horizontal:Z,uniqueKey:he,source:ce,extraProps:ie,component:se,slotComponent:re,scopedSlots:K},style:Q,class:[j,this.itemClassAdd?this.itemClassAdd(de):null]})):console.warn("Cannot get the data-key '".concat(ee,"' from data-sources."))}else console.warn("Cannot get the index '".concat(de,"' from data-sources."))}return x}},render:function(M){var x=this.$slots,Y=x.header,V=x.footer,X=this.range,le=X.padFront,ee=X.padBehind,j=this.isHorizontal,U=this.pageMode,Q=this.rootTag,Z=this.wrapTag,ie=this.wrapClass,se=this.wrapStyle,K=this.headerTag,re=this.headerClass,de=this.headerStyle,ce=this.footerTag,he=this.footerClass,Ae=this.footerStyle,Le=this.disabled,Ge={padding:j?"0px ".concat(ee,"px 0px ").concat(le,"px"):"".concat(le,"px 0px ").concat(ee,"px")},qe=se?Object.assign({},se,Ge):Ge;return M(Q,{ref:"root",style:Le?{overflow:"hidden"}:null,on:{"&scroll":!U&&this.onScroll}},[Y?M(G,{class:re,style:de,props:{tag:K,event:z.SLOT,uniqueKey:k.HEADER}},Y):null,M(Z,{class:ie,attrs:{role:"group"},style:qe},this.getRenderSlots(M)),V?M(G,{class:he,style:Ae,props:{tag:ce,event:z.SLOT,uniqueKey:k.FOOTER}},V):null,M("div",{ref:"shepherd",style:{width:j?"0px":"100%",height:j?"100%":"0px"}})])}});return L})})(Dc);var RJ=Dc.exports;function NJ(){return new Promise(e=>{const t=new Hu({render(a){return a(Vu.exports.Modal,{class:"chat-emoji-one-modal",props:{fullscreen:!0,footerHide:!0},on:{"on-visible-change":l=>{l||setTimeout(u=>{document.body.removeChild(this.$el)},500)}}},[a(Ic,{attrs:{onlyEmoji:!0},on:{"on-select":l=>{this.$children[0].visible=!1,l.type==="emoji"&&e(l.text)}}})])}}),n=t.$mount();document.body.appendChild(n.$el);const r=t.$children[0];r.visible=!0,r.$el.lastChild.addEventListener("click",({target:a})=>{a.classList.contains("ivu-modal-body")&&(r.visible=!1)})})}var OJ=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isReady?n("div",{staticClass:"dialog-wrapper",class:e.wrapperClass,on:{drop:function(r){return r.preventDefault(),e.chatPasteDrag(r,"drag")},dragover:function(r){return r.preventDefault(),e.chatDragOver(!0,r)},dragleave:function(r){return r.preventDefault(),e.chatDragOver(!1,r)},touchstart:e.onTouchStart,touchmove:e.onTouchMove}},[n("div",{staticClass:"dialog-nav",style:e.navStyle},[e._t("head",function(){return[n("div",{staticClass:"nav-wrapper",class:{completed:e.$A.dialogCompleted(e.dialogData)}},[n("div",{staticClass:"dialog-back",on:{click:e.onBack}},[n("i",{staticClass:"taskfont"},[e._v("\uE676")]),e.msgUnreadOnly?n("div",{staticClass:"back-num"},[e._v(e._s(e.msgUnreadOnly))]):e._e()]),n("div",{staticClass:"dialog-block"},[n("div",{staticClass:"dialog-avatar",on:{click:e.onViewAvatar}},[e.dialogData.type=="group"?[e.dialogData.avatar?n("EAvatar",{staticClass:"img-avatar",attrs:{src:e.dialogData.avatar,size:42}}):e.dialogData.group_type=="department"?n("i",{staticClass:"taskfont icon-avatar department"},[e._v("\uE75C")]):e.dialogData.group_type=="project"?n("i",{staticClass:"taskfont icon-avatar project"},[e._v("\uE6F9")]):e.dialogData.group_type=="task"?n("i",{staticClass:"taskfont icon-avatar task"},[e._v("\uE6F4")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:e.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{online:e.dialogData.online_state,userid:e.dialogData.dialog_user.userid,size:42},on:{"update:online":function(r){return e.$set(e.dialogData,"online_state",r)}}},[e.dialogData.type==="user"&&e.dialogData.online_state!==!0?n("p",{attrs:{slot:"end"},slot:"end"},[e._v(" "+e._s(e.$L(e.dialogData.online_state))+" ")]):e._e()])],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[e._l(e.$A.dialogTags(e.dialogData),function(r){return r.color!="success"?[n("Tag",{attrs:{color:r.color,fade:!1}},[e._v(e._s(e.$L(r.text)))])]:e._e()}),n("h2",[e._v(e._s(e.dialogData.name))]),e.peopleNum>0?n("em",{on:{click:function(r){return e.onDialogMenu("groupInfo")}}},[e._v("("+e._s(e.peopleNum)+")")]):e._e(),e.dialogData.bot?n("Tag",{staticClass:"after",attrs:{fade:!1}},[e._v(e._s(e.$L("\u673A\u5668\u4EBA")))]):e._e(),e.dialogData.group_type=="all"?n("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(r){return e.onDialogMenu("groupInfo")}}},[e._v(e._s(e.$L("\u5168\u5458")))]):e.dialogData.group_type=="department"?n("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(r){return e.onDialogMenu("groupInfo")}}},[e._v(e._s(e.$L("\u90E8\u95E8")))]):e._e(),e.msgLoadIng>0?n("div",{staticClass:"load"},[n("Loading")],1):e._e()],2),n("ul",{staticClass:"title-desc"},[e.dialogData.type==="user"?n("li",{class:[e.dialogData.online_state===!0?"online":"offline"]},[e._v(" "+e._s(e.$L(e.dialogData.online_state===!0?"\u5728\u7EBF":e.dialogData.online_state))+" ")]):e._e()]),e.tagShow?n("ul",{staticClass:"title-tags scrollbar-hidden"},e._l(e.msgTags,function(r){var a;return n("li",{key:r.type,class:(a={},a[r.type||"msg"]=!0,a.active=e.msgType===r.type,a),on:{click:function(l){return e.onMsgType(r.type)}}},[n("i",{staticClass:"no-dark-content"}),n("span",[e._v(e._s(e.$L(r.label)))])])}),0):e._e()])]),n("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:e.onDialogMenu}},[n("i",{staticClass:"taskfont dialog-menu-icon"},[e._v("\uE6E9")]),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"searchMsg"}},[n("div",[e._v(e._s(e.$L("\u641C\u7D22\u6D88\u606F")))])]),e.dialogData.type==="user"?[e.isManageBot?n("EDropdownItem",{attrs:{command:"modifyNormal"}},[n("div",[e._v(e._s(e.$L("\u4FEE\u6539\u8D44\u6599")))])]):e._e(),n("EDropdownItem",{attrs:{command:"openCreate"}},[n("div",[e._v(e._s(e.$L("\u521B\u5EFA\u7FA4\u7EC4")))])])]:[n("EDropdownItem",{attrs:{command:"groupInfo"}},[n("div",[e._v(e._s(e.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))])]),e.dialogData.owner_id!=e.userId?[e.dialogData.group_type==="all"&&e.userIsAdmin?n("EDropdownItem",{attrs:{command:"modifyAdmin"}},[n("div",[e._v(e._s(e.$L("\u4FEE\u6539\u8D44\u6599")))])]):e._e(),n("EDropdownItem",{attrs:{command:"exit"}},[n("div",{staticStyle:{color:"#f00"}},[e._v(e._s(e.$L("\u9000\u51FA\u7FA4\u7EC4")))])])]:e.dialogData.group_type==="user"?[n("EDropdownItem",{attrs:{command:"modifyNormal"}},[n("div",[e._v(e._s(e.$L("\u4FEE\u6539\u8D44\u6599")))])]),n("EDropdownItem",{attrs:{command:"transfer"}},[n("div",[e._v(e._s(e.$L("\u8F6C\u8BA9\u7FA4\u4E3B")))])]),n("EDropdownItem",{attrs:{command:"disband"}},[n("div",{staticStyle:{color:"#f00"}},[e._v(e._s(e.$L("\u89E3\u6563\u7FA4\u7EC4")))])])]:e._e()]],2)],1),e.searchShow?n("div",{staticClass:"dialog-search"},[n("div",{staticClass:"search-location"},[n("i",{staticClass:"taskfont",on:{click:function(r){return e.onSearchSwitch("prev")}}},[e._v("\uE702")]),n("i",{staticClass:"taskfont",on:{click:function(r){return e.onSearchSwitch("next")}}},[e._v("\uE705")])]),n("div",{staticClass:"search-input"},[n("Input",{ref:"searchInput",attrs:{placeholder:e.$L("\u641C\u7D22\u6D88\u606F"),clearable:""},on:{"on-keyup":e.onSearchKeyup},model:{value:e.searchKey,callback:function(r){e.searchKey=r},expression:"searchKey"}},[n("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[e.searchLoad>0?n("Loading"):n("Icon",{attrs:{type:"ios-search"}})],1)]),e.searchLoad===0&&e.searchResult.length>0?n("div",{staticClass:"search-total",attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.searchLocation)+"/"+e._s(e.searchResult.length))]):e._e()],1),n("div",{staticClass:"search-cancel",on:{click:function(r){return e.onSearchKeyup(null)}}},[e._v(e._s(e.$L("\u53D6\u6D88")))])]):e._e()],1)]})],2),e.positionMsg?n("div",{staticClass:"dialog-position",class:{down:e.tagShow}},[n("div",{staticClass:"position-label",on:{click:e.onPositionMark}},[e.positionLoad>0?n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):n("i",{staticClass:"taskfont"},[e._v("\uE624")]),e._v(" "+e._s(e.positionMsg.label)+" ")],1)]):e._e(),n("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-virtual",class:e.scrollerClass,attrs:{"item-inactive-class":"inactive","data-key":"id","data-sources":e.allMsgs,"data-component":e.msgItem,"item-class-add":e.itemClassAdd,"extra-props":{dialogData:e.dialogData,operateVisible:e.operateVisible,operateItem:e.operateItem,isMyDialog:e.isMyDialog,msgId:e.msgId},"estimate-size":e.dialogData.type=="group"?105:77,keeps:50,disabled:e.scrollDisabled},on:{scroll:e.onScroll,range:e.onRange,totop:e.onPrevPage,"on-mention":e.onMention,"on-longpress":e.onLongpress,"on-view-reply":e.onViewReply,"on-view-text":e.onViewText,"on-view-file":e.onViewFile,"on-down-file":e.onDownFile,"on-reply-list":e.onReplyList,"on-error":e.onError,"on-emoji":e.onEmoji,"on-show-emoji-user":e.onShowEmojiUser},scopedSlots:e._u([{key:"header",fn:function(){return[e.allMsgs.length===0&&e.loadIng||e.prevId>0?n("div",{staticClass:"dialog-item loading"},[e.scrollOffset<100?n("div",{staticClass:"dialog-wrapper-loading"}):e._e()]):e.allMsgs.length===0?n("div",{staticClass:"dialog-item nothing"},[e._v(e._s(e.$L("\u6682\u65E0\u6D88\u606F")))]):e._e()]},proxy:!0}],null,!1,3828201241)}),n("div",{ref:"footer",staticClass:"dialog-footer",class:e.footerClass,style:e.footerStyle,on:{click:e.onActive}},[n("div",{staticClass:"dialog-newmsg",on:{click:e.onToBottom}},[e._v(e._s(e.$L(`\u6709${e.msgNew}\u6761\u65B0\u6D88\u606F`)))]),n("div",{staticClass:"dialog-goto",on:{click:e.onToBottom}},[n("i",{staticClass:"taskfont"},[e._v("\uE72B")])]),n("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":e.dialogId},on:{"on-progress":function(r){return e.chatFile("progress",r)},"on-success":function(r){return e.chatFile("success",r)},"on-error":function(r){return e.chatFile("error",r)}}}),e.todoShow?n("div",{staticClass:"chat-bottom-menu"},[n("div",{staticClass:"bottom-menu-label"},[e._v(e._s(e.$L("\u5F85\u529E"))+":")]),n("ul",{staticClass:"scrollbar-hidden"},e._l(e.todoList,function(r){return n("li",{on:{click:function(a){return a.stopPropagation(),e.onViewTodo(r)}}},[n("div",{staticClass:"bottom-menu-desc no-dark-content"},[e._v(e._s(e.$A.getMsgSimpleDesc(r.msg_data)))])])}),0)]):e.quickShow?n("div",{staticClass:"chat-bottom-menu"},[n("ul",{staticClass:"scrollbar-hidden"},e._l(e.quickMsgs,function(r){return n("li",{on:{click:function(a){return a.stopPropagation(),e.sendQuick(r)}}},[n("div",{staticClass:"bottom-menu-desc no-dark-content",style:r.style||null},[e._v(e._s(r.label))])])}),0)]):e._e(),e.isMute?n("div",{staticClass:"chat-mute"},[e._v(" "+e._s(e.$L("\u7981\u8A00\u53D1\u8A00"))+" ")]):n("ChatInput",{ref:"input",attrs:{"dialog-id":e.dialogId,"emoji-bottom":e.windowPortrait,maxlength:2e5,placeholder:e.$L("\u8F93\u5165\u6D88\u606F...")},on:{"on-focus":e.onEventFocus,"on-blur":e.onEventBlur,"on-more":e.onEventMore,"on-file":e.sendFileMsg,"on-send":e.sendMsg,"on-record":e.sendRecord,"on-record-state":e.onRecordState,"on-emoji-visible-change":e.onEventEmojiVisibleChange,"on-height-change":e.onHeightChange},model:{value:e.msgText,callback:function(r){e.msgText=r},expression:"msgText"}})],1),n("div",{directives:[{name:"show",rawName:"v-show",value:e.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:e.operateStyles},[n("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:e.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(r){e.operateVisible=!1}}},[n("div",{style:{userSelect:e.operateVisible?"none":"auto",height:e.operateStyles.height}}),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{name:"action"}},[n("ul",{staticClass:"operate-action"},[e.msgId===0?n("li",{on:{click:function(r){return e.onOperate("reply")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE6EB")]),n("span",[e._v(e._s(e.$L("\u56DE\u590D")))])]):e._e(),e.operateItem.userid==e.userId&&e.operateItem.type==="text"?n("li",{on:{click:function(r){return e.onOperate("update")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE779")]),n("span",[e._v(e._s(e.$L("\u7F16\u8F91")))])]):e._e(),e._l(e.operateCopys,function(r){return n("li",{on:{click:function(a){return e.onOperate("copy",r)}}},[n("i",{staticClass:"taskfont",domProps:{innerHTML:e._s(r.icon)}}),n("span",[e._v(e._s(e.$L(r.label)))])])}),n("li",{on:{click:function(r){return e.onOperate("forward")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE638")]),n("span",[e._v(e._s(e.$L("\u8F6C\u53D1")))])]),e.operateItem.userid==e.userId?n("li",{on:{click:function(r){return e.onOperate("withdraw")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE637")]),n("span",[e._v(e._s(e.$L("\u64A4\u56DE")))])]):e._e(),e.operateItem.type==="file"?[n("li",{on:{click:function(r){return e.onOperate("view")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE77B")]),n("span",[e._v(e._s(e.$L("\u67E5\u770B")))])]),n("li",{on:{click:function(r){return e.onOperate("down")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7A8")]),n("span",[e._v(e._s(e.$L("\u4E0B\u8F7D")))])])]:e._e(),n("li",{on:{click:function(r){return e.onOperate("tag")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE61E")]),n("span",[e._v(e._s(e.$L(e.operateItem.tag?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8")))])]),e.operateItem.type==="text"?n("li",{on:{click:function(r){return e.onOperate("newTask")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7B8")]),n("span",[e._v(e._s(e.$L("\u65B0\u4EFB\u52A1")))])]):e._e(),n("li",{on:{click:function(r){return e.onOperate("todo")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE7B7")]),n("span",[e._v(e._s(e.$L(e.operateItem.todo?"\u53D6\u6D88\u5F85\u529E":"\u8BBE\u5F85\u529E")))])]),e.msgType!==""?n("li",{on:{click:function(r){return e.onOperate("pos")}}},[n("i",{staticClass:"taskfont"},[e._v("\uEE15")]),n("span",[e._v(e._s(e.$L("\u5B8C\u6574\u5BF9\u8BDD")))])]):e._e()],2)]),n("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[n("ul",{staticClass:"operate-emoji scrollbar-hidden"},[e._l(e.operateEmojis,function(r,a){return n("li",{key:a,staticClass:"no-dark-content",domProps:{innerHTML:e._s(r)},on:{click:function(l){return e.onOperate("emoji",r)}}})}),n("li"),n("li",{staticClass:"more-emoji",on:{click:function(r){return e.onOperate("emoji","more")}}},[n("i",{staticClass:"taskfont"},[e._v("\uE790")])])],2)])],1)],1)],1),e.dialogDrag?n("div",{staticClass:"drag-over",on:{click:function(r){e.dialogDrag=!1}}},[n("div",{staticClass:"drag-text"},[e._v(e._s(e.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):e._e(),n("Modal",{attrs:{title:e.$L(e.pasteTitle),"cancel-text":e.$L("\u53D6\u6D88"),"ok-text":e.$L("\u53D1\u9001"),"enter-ok":!0,closable:!1,"mask-closable":!1},on:{"on-ok":e.pasteSend},model:{value:e.pasteShow,callback:function(r){e.pasteShow=r},expression:"pasteShow"}},[n("ul",{staticClass:"dialog-wrapper-paste",class:e.pasteWrapperClass},e._l(e.pasteItem,function(r){return n("li",[r.type=="image"?n("img",{attrs:{src:r.result}}):n("div",[e._v(e._s(e.$L("\u6587\u4EF6"))+": "+e._s(r.name)+" ("+e._s(e.$A.bytesToSize(r.size))+")")])])}),0)]),n("Modal",{attrs:{title:e.$L("\u521B\u5EFA\u7FA4\u7EC4"),"mask-closable":!1},model:{value:e.createGroupShow,callback:function(r){e.createGroupShow=r},expression:"createGroupShow"}},[n("Form",{attrs:{model:e.createGroupData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[n("FormItem",{attrs:{prop:"avatar",label:e.$L("\u7FA4\u5934\u50CF")}},[n("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:e.createGroupData.avatar,callback:function(r){e.$set(e.createGroupData,"avatar",r)},expression:"createGroupData.avatar"}})],1),n("FormItem",{attrs:{prop:"userids",label:e.$L("\u7FA4\u6210\u5458")}},[n("UserSelect",{attrs:{uncancelable:e.createGroupData.uncancelable,"multiple-max":100,"show-bot":"",title:e.$L("\u9009\u62E9\u9879\u76EE\u6210\u5458")},model:{value:e.createGroupData.userids,callback:function(r){e.$set(e.createGroupData,"userids",r)},expression:"createGroupData.userids"}})],1),n("FormItem",{attrs:{prop:"chat_name",label:e.$L("\u7FA4\u540D\u79F0")}},[n("Input",{attrs:{placeholder:e.$L("\u8F93\u5165\u7FA4\u540D\u79F0\uFF08\u9009\u586B\uFF09")},model:{value:e.createGroupData.chat_name,callback:function(r){e.$set(e.createGroupData,"chat_name",r)},expression:"createGroupData.chat_name"}})],1)],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.createGroupShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.createGroupLoad>0},on:{click:e.onCreateGroup}},[e._v(e._s(e.$L("\u521B\u5EFA")))])],1)],1),n("Modal",{attrs:{title:e.$L("\u4FEE\u6539\u8D44\u6599"),"mask-closable":!1},model:{value:e.modifyShow,callback:function(r){e.modifyShow=r},expression:"modifyShow"}},[n("Form",{attrs:{model:e.modifyData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[e.modifyData.system_name?n("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[e._v(e._s(e.$L(`\u6B63\u5728\u4FEE\u6539\u7CFB\u7EDF\u673A\u5668\u4EBA\uFF1A${e.modifyData.system_name}`)))]):e._e(),n("FormItem",{attrs:{prop:"avatar",label:e.$L("\u5934\u50CF")}},[n("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:e.modifyData.avatar,callback:function(r){e.$set(e.modifyData,"avatar",r)},expression:"modifyData.avatar"}})],1),typeof e.modifyData.name!="undefined"?n("FormItem",{attrs:{prop:"name",label:e.$L("\u540D\u79F0")}},[n("Input",{attrs:{maxlength:20},model:{value:e.modifyData.name,callback:function(r){e.$set(e.modifyData,"name",r)},expression:"modifyData.name"}})],1):e._e(),e.dialogData.bot==e.userId?[typeof e.modifyData.clear_day!="undefined"?n("FormItem",{attrs:{prop:"clear_day",label:e.$L("\u6D88\u606F\u4FDD\u7559")}},[n("Input",{attrs:{maxlength:3,type:"number"},model:{value:e.modifyData.clear_day,callback:function(r){e.$set(e.modifyData,"clear_day",r)},expression:"modifyData.clear_day"}},[n("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.$L("\u5929")))])])],1):e._e(),typeof e.modifyData.webhook_url!="undefined"?n("FormItem",{attrs:{prop:"webhook_url",label:"Webhook"}},[n("Input",{attrs:{maxlength:255},model:{value:e.modifyData.webhook_url,callback:function(r){e.$set(e.modifyData,"webhook_url",r)},expression:"modifyData.webhook_url"}})],1):e._e()]:e._e()],2),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.modifyShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.modifyLoad>0},on:{click:e.onModify}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)],1),n("UserSelect",{ref:"forwardSelect",attrs:{"multiple-max":50,title:e.$L("\u8F6C\u53D1"),"before-submit":e.onForward,"show-select-all":!1,"show-dialog":"",module:""},model:{value:e.forwardData,callback:function(r){e.forwardData=r},expression:"forwardData"}}),n("Modal",{attrs:{title:e.$L("\u8BBE\u7F6E\u5F85\u529E"),"mask-closable":!1},model:{value:e.todoSettingShow,callback:function(r){e.todoSettingShow=r},expression:"todoSettingShow"}},[n("Form",{ref:"todoSettingForm",attrs:{model:e.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[n("FormItem",{attrs:{prop:"type",label:e.$L("\u5F53\u524D\u4F1A\u8BDD")}},[n("RadioGroup",{model:{value:e.todoSettingData.type,callback:function(r){e.$set(e.todoSettingData,"type",r)},expression:"todoSettingData.type"}},[n("Radio",{attrs:{label:"all"}},[e._v(e._s(e.$L("\u6240\u6709\u6210\u5458")))]),n("Radio",{attrs:{label:"user"}},[e._v(e._s(e.$L("\u6307\u5B9A\u6210\u5458")))]),n("br"),e.todoSettingData.my_id?n("Radio",{attrs:{label:"my"}},[n("div",{staticClass:"dialog-wrapper-todo"},[n("div",[n("UserAvatar",{attrs:{userid:e.todoSettingData.my_id,"show-icon":!1,"show-name":!0}}),n("Tag",[e._v(e._s(e.$L("\u81EA\u5DF1")))])],1)])]):e._e(),e.todoSettingData.you_id?n("Radio",{attrs:{label:"you"}},[n("div",{staticClass:"dialog-wrapper-todo"},[n("div",[n("UserAvatar",{attrs:{userid:e.todoSettingData.you_id,"show-icon":!1,"show-name":!0}})],1)])]):e._e()],1)],1),e.todoSettingData.type==="user"?n("FormItem",{attrs:{prop:"userids",label:e.$L("\u6307\u5B9A\u6210\u5458")}},[n("UserSelect",{attrs:{"dialog-id":e.dialogId,title:e.$L("\u9009\u62E9\u6307\u5B9A\u6210\u5458")},model:{value:e.todoSettingData.userids,callback:function(r){e.$set(e.todoSettingData,"userids",r)},expression:"todoSettingData.userids"}})],1):e._e()],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.todoSettingShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.todoSettingLoad>0},on:{click:function(r){return e.onTodo("submit")}}},[e._v(e._s(e.$L("\u786E\u5B9A")))])],1)],1),n("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:e.groupInfoShow,callback:function(r){e.groupInfoShow=r},expression:"groupInfoShow"}},[e.groupInfoShow?n("DialogGroupInfo",{attrs:{dialogId:e.dialogId},on:{"on-close":function(r){e.groupInfoShow=!1}}}):e._e()],1),n("Modal",{attrs:{title:e.$L("\u8F6C\u8BA9\u7FA4\u4E3B\u8EAB\u4EFD"),"mask-closable":!1},model:{value:e.groupTransferShow,callback:function(r){e.groupTransferShow=r},expression:"groupTransferShow"}},[n("Form",{attrs:{model:e.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(r){r.preventDefault()}}},[n("FormItem",{attrs:{prop:"userid",label:e.$L("\u65B0\u7684\u7FA4\u4E3B")}},[n("UserSelect",{attrs:{disabledChoice:e.groupTransferData.disabledChoice,"multiple-max":1,title:e.$L("\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B")},model:{value:e.groupTransferData.userid,callback:function(r){e.$set(e.groupTransferData,"userid",r)},expression:"groupTransferData.userid"}})],1)],1),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(r){e.groupTransferShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),n("Button",{attrs:{type:"primary",loading:e.groupTransferLoad>0},on:{click:function(r){return e.onDialogMenu("transferConfirm")}}},[e._v(e._s(e.$L("\u786E\u5B9A\u8F6C\u8BA9")))])],1)],1),n("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:e.replyListShow,callback:function(r){e.replyListShow=r},expression:"replyListShow"}},[e.replyListShow?n("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:e.dialogId,msgId:e.replyListId}},[n("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[e._v(e._s(e.$L("\u56DE\u590D\u6D88\u606F")))])]):e._e()],1),n("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:e.respondShow,callback:function(r){e.respondShow=r},expression:"respondShow"}},[e.respondShow?n("DialogRespond",{attrs:{"respond-data":e.respondData},on:{"on-close":function(r){e.respondShow=!1}}}):e._e()],1),n("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:e.todoViewShow,callback:function(r){e.todoViewShow=r},expression:"todoViewShow"}},[n("div",{staticClass:"dialog-wrapper drawer-list"},[n("div",{staticClass:"dialog-nav"},[n("div",{staticClass:"drawer-title"},[e._v(e._s(e.$L("\u5F85\u529E\u6D88\u606F")))])]),n("Scrollbar",{attrs:{"class-name":"dialog-scroller"}},[e.todoViewMsg?n("DialogItem",{attrs:{source:e.todoViewMsg,simpleView:""},on:{"on-view-text":e.onViewText,"on-view-file":e.onViewFile,"on-down-file":e.onDownFile,"on-emoji":e.onEmoji}}):e._e(),n("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:e.todoViewPosLoad},on:{click:e.onPosTodo}},[e._v(e._s(e.$L("\u56DE\u5230\u539F\u6587")))])],1),n("div",{staticClass:"todo-button"},[n("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:e.todoViewLoad,long:""},on:{click:e.onDoneTodo}},[e._v(e._s(e.$L("\u5B8C\u6210")))])],1)],1)]),n("DrawerOverlay",{attrs:{placement:"right",size:600},model:{value:e.approveDetailsShow,callback:function(r){e.approveDetailsShow=r},expression:"approveDetailsShow"}},[e.approveDetailsShow?n("ApproveDetails",{staticStyle:{height:"100%","border-radius":"10px"},attrs:{data:e.approveDetails}}):e._e()],1)],1):e._e()},AJ=[];const IJ={name:"DialogWrapper",components:{UserSelect:Ol,ImgUpload:Ku,DialogRespond:XZ,DialogItem:fl,VirtualList:RJ,ChatInput:CJ,DialogGroupInfo:$Z,DrawerOverlay:Wu,DialogUpload:FZ,ApproveDetails:Qu},props:{dialogId:{type:Number,default:0},msgId:{type:Number,default:0},autoFocus:{type:Boolean,default:!1},isMessenger:{type:Boolean,default:!1},beforeBack:Function},data(){return{msgItem:fl,msgText:"",msgNew:0,msgType:"",loadIng:0,allMsgs:[],tempMsgs:[],tempId:$A.randNum(1e9,9999999999),msgLoadIng:0,msgActiveIndex:-1,pasteShow:!1,pasteFile:[],pasteItem:[],searchShow:!1,searchKey:"",searchLoad:0,searchLocation:1,searchResult:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,modifyShow:!1,modifyData:{},modifyLoad:0,forwardData:[],openId:0,dialogDrag:!1,groupInfoShow:!1,groupTransferShow:!1,groupTransferLoad:0,groupTransferData:{userid:[],disabledChoice:[]},navStyle:{},operateClient:{x:0,y:0},operateVisible:!1,operatePreventScroll:0,operateCopys:[],operateStyles:{},operateItem:{},recordState:"",wrapperStart:null,scrollOffset:0,scrollTail:0,preventMoreLoad:!1,preventToBottom:!1,replyListShow:!1,replyListId:0,respondShow:!1,respondData:{},todoSettingShow:!1,todoSettingLoad:0,todoSettingData:{type:"all",userids:[]},todoViewLoad:!1,todoViewPosLoad:!1,todoViewShow:!1,todoViewData:{},todoViewMid:0,todoViewId:0,scrollDisabled:!1,scrollDirection:null,scrollAction:0,scrollTmp:0,positionLoad:0,approveDetails:{id:0},approveDetailsShow:!1}},mounted(){this.msgSubscribe=_i.Store.subscribe("dialogMsgChange",this.onMsgChange)},beforeDestroy(){this.$store.dispatch("forgetInDialog",this._uid),this.$store.dispatch("closeDialog",this.dialogId),this.msgSubscribe&&(this.msgSubscribe.unsubscribe(),this.msgSubscribe=null)},computed:{...Wn(["userIsAdmin","taskId","dialogSearchMsgId","dialogMsgs","dialogTodos","dialogMsgTransfer","cacheDialogs","wsOpenNum","touchBackInProgress","dialogIns","cacheUserBasic","fileLinks","cacheEmojis","keyboardType","keyboardHeight","safeAreaBottom"]),...Nl(["isLoad"]),isReady(){return this.dialogId>0&&this.dialogData.id>0},dialogData(){return this.cacheDialogs.find(({id:e})=>e==this.dialogId)||{}},dialogList(){return this.cacheDialogs.filter(e=>!(e.name===void 0||e.dialog_delete===1)).sort((e,t)=>e.top_at||t.top_at?$A.Date(t.top_at)-$A.Date(e.top_at):e.todo_num>0||t.todo_num>0?t.todo_num-e.todo_num:$A.Date(t.last_at)-$A.Date(e.last_at))},dialogMsgList(){return this.isReady?this.dialogMsgs.filter(e=>e.dialog_id==this.dialogId):[]},tempMsgList(){return this.isReady?this.tempMsgs.filter(e=>e.dialog_id==this.dialogId):[]},allMsgList(){const e=[];if(e.push(...this.dialogMsgList.filter(t=>this.msgFilter(t))),this.msgId>0){const t=this.dialogMsgs.find(n=>n.id==this.msgId);t&&e.unshift(t)}if(this.tempMsgList.length>0){const t=e.map(({id:r})=>r),n=this.tempMsgList.filter(r=>!t.includes(r.id)&&this.msgFilter(r));n.length>0&&e.push(...n)}return e.sort((t,n)=>t.id-n.id)},loadMsg(){return this.isLoad(`msg::${this.dialogId}-${this.msgId}-${this.msgType}`)},prevId(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum(){return this.dialogData.type==="group"?$A.runNum(this.dialogData.people):0},pasteTitle(){const{pasteItem:e}=this;let t=e.find(({type:r})=>r=="image"),n=e.find(({type:r})=>r!="image");return t&&n?"\u53D1\u9001\u6587\u4EF6/\u56FE\u7247":t?"\u53D1\u9001\u56FE\u7247":"\u53D1\u9001\u6587\u4EF6"},msgTags(){const e=[{type:"",label:"\u6D88\u606F"}];return this.dialogData.has_tag&&e.push({type:"tag",label:"\u6807\u6CE8"}),this.dialogData.has_image&&e.push({type:"image",label:"\u56FE\u7247"}),this.dialogData.has_file&&e.push({type:"file",label:"\u6587\u4EF6"}),this.dialogData.has_link&&e.push({type:"link",label:"\u94FE\u63A5"}),this.dialogData.group_type==="project"&&e.push({type:"project",label:"\u6253\u5F00\u9879\u76EE"}),this.dialogData.group_type==="task"&&e.push({type:"task",label:"\u6253\u5F00\u4EFB\u52A1"}),e},quickMsgs(){return this.dialogData.quick_msgs||[]},quickShow(){return this.quickMsgs.length>0&&this.windowScrollY===0&&this.quoteId===0},todoList(){return this.dialogData.todo_num?this.dialogTodos.filter(e=>!e.done_at&&e.dialog_id==this.dialogId).sort((e,t)=>t.id-e.id):[]},todoShow(){return this.todoList.length>0&&this.windowScrollY===0&&this.quoteId===0},wrapperClass(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow(){return this.msgTags.length>1&&this.windowScrollY===0&&!this.searchShow},scrollerClass(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass(){return this.pasteItem.find(({type:e})=>e!=="image")?["multiple"]:[]},footerClass(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},footerPaddingBottom({keyboardType:e,keyboardHeight:t,safeAreaBottom:n,windowScrollY:r,isMessenger:a}){return r===0&&a&&e==="show"&&t>0&&t<120?t+n:0},footerStyle({footerPaddingBottom:e}){const t={};return e&&(t.paddingBottom=`${e}px`),t},msgUnreadOnly(){let e=0;return this.cacheDialogs.some(t=>{e+=$A.getDialogNum(t)}),e<=0?"":(e>999&&(e="999+"),String(e))},isMyDialog(){const{dialogData:e,userId:t}=this;return e.dialog_user&&e.dialog_user.userid==t},isManageBot(){const{dialogData:e,userId:t,userIsAdmin:n}=this;return e.bot?e.bot==t?!0:e.dialog_user&&e.dialog_user.userid==e.bot&&n:!1},isMute(){if(this.dialogData.group_type==="all"){if(this.dialogData.all_group_mute==="all")return!0;if(this.dialogData.all_group_mute==="user"&&!this.userIsAdmin)return!0}return!1},quoteId(){return this.msgId>0?this.msgId:this.dialogData.extra_quote_id||0},quoteUpdate(){return this.dialogData.extra_quote_type==="update"},quoteData(){return this.quoteId?this.allMsgs.find(({id:e})=>e===this.quoteId):null},todoViewMsg(){if(this.todoViewMid){const e=this.allMsgs.find(t=>t.id==this.todoViewMid);if(e)return e;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null},positionMsg(){const{unread:e,position_msgs:t}=this.dialogData;if(!t||t.length===0||e===0||this.allMsgs.length===0)return null;const n=t.sort((r,a)=>a.msg_id-r.msg_id)[0];return this.allMsgs.findIndex(({id:r})=>r==n.msg_id)===-1?n.label==="{UNREAD}"?Object.assign(n,{label:this.$L(`\u672A\u8BFB\u6D88\u606F${e}\u6761`)}):n:null},operateEmojis(){const e=this.cacheEmojis.slice(0,3);return Object.values(["\u{1F44C}","\u{1F44D}","\u{1F602}","\u{1F389}","\u2764\uFE0F","\u{1F973}\uFE0F","\u{1F970}","\u{1F625}","\u{1F62D}"]).some(t=>{e.includes(t)||e.push(t)}),e}},watch:{dialogId:{handler(e,t){e&&(this.msgNew=0,this.msgType="",this.searchShow=!1,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.getMsgs({dialog_id:e,msg_id:this.msgId,msg_type:this.msgType}).then(n=>{this.openId=e,setTimeout(this.onSearchMsgId,100)}).catch(n=>{}),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:e}),this.autoFocus&&this.inputFocus()),this.$store.dispatch("closeDialog",t)},immediate:!0},loadMsg:{handler(e){e?this.loadIng++:setTimeout(t=>{this.loadIng--},300)},immediate:!0},msgType(){this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch(e=>{})},searchKey(e){!e||(this.searchLoad++,setTimeout(t=>{this.searchKey===e&&(this.searchLoad++,this.searchResult=[],this.searchLocation=0,this.$store.dispatch("call",{url:"dialog/msg/search",data:{dialog_id:this.dialogId,key:e}}).then(({data:n})=>{this.searchKey===e&&(this.searchResult=n.data,this.searchLocation=this.searchResult.length)}).finally(n=>{this.searchLoad--})),this.searchLoad--},600))},searchLocation(e){if(e===0)return;const t=this.searchResult[e-1];t&&this.onPositionId(t)},dialogSearchMsgId(){this.onSearchMsgId()},dialogMsgTransfer:{handler({time:e,msgFile:t,msgRecord:n,msgText:r,dialogId:a}){e>$A.Time()&&a==this.dialogId&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick(()=>{$A.isArray(t)&&t.length>0?this.sendFileMsg(t):$A.isJson(n)&&n.duration>0?this.sendRecord(n):r&&this.sendMsg(r)}))},immediate:!0},wsOpenNum(e){e<=1||this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch(t=>{})},allMsgList(e,t){const{tail:n}=this.scrollInfo();if($A.isIos()&&e.length!==t.length?(this.$refs.scroller.$el.style.visibility="hidden",this.allMsgs=e,this.$nextTick(r=>{this.$refs.scroller.$el.style.visibility="visible"})):this.allMsgs=e,!this.windowActive||n>55&&t.length>0){const r=t[t.length-1]?t[t.length-1].id:0,a=e.filter(l=>l.id&&l.id>r);this.msgNew+=a.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY(e){if($A.isIos()&&!this.$slots.head){const{tail:t}=this.scrollInfo();this.navStyle={marginTop:e+"px"},t<=55&&requestAnimationFrame(this.onToBottom),this.$refs.input.isFocus&&$A.scrollToView(this.$refs.footer)}},windowActive(e){if(e&&this.autoFocus){const t=$A.last(this.dialogIns);t&&t.uid===this._uid&&this.inputFocus()}},windowHeight(e,t){if(e-1&&setTimeout(t=>this.msgActiveIndex=-1,800)},footerPaddingBottom(e){if(e){const{tail:t}=this.scrollInfo();t<=55&&requestAnimationFrame(this.onToBottom)}}},methods:{sendMsg(e,t){let n,r="text",a="no",l=!1;if(typeof e=="string"&&e?n=e:(n=this.msgText,l=!0),t==="md"?(n=this.$refs.input.getText(),r="md"):t==="silence"&&(a="yes"),n==""){this.inputFocus();return}if(r==="text"&&(n=n.replace(/<\/span> <\/p>$/,"

")),this.quoteUpdate){r==="text"&&(n=n.replace(new RegExp(`src=(["'])${$A.apiUrl("../")}`,"g"),"src=$1{{RemoteURL}}"));const u=this.quoteId;this.$store.dispatch("setLoad",{key:`msg-${u}`,delay:600}),this.cancelQuote(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:u,text:n,text_type:r,silence:a},method:"post",complete:c=>this.$store.dispatch("cancelLoad",`msg-${u}`)}).then(({data:c})=>{this.sendSuccess(c),this.onPositionId(u)}).catch(({msg:c})=>{$A.modalError(c)})}else{const u=$A.stringLength(n.replace(/]*?>/g,""))>5e3,c={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:u?"loading":"text",userid:this.userId,msg:{text:u?"":n,type:r}};this.tempMsgs.push(c),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:c.dialog_id,reply_id:c.reply_id,text:n,text_type:r,silence:a},method:"post"}).then(({data:d})=>{this.tempMsgs=this.tempMsgs.filter(({id:f})=>f!=c.id),this.sendSuccess(d)}).catch(d=>{this.$set(c,"error",!0),this.$set(c,"errorData",{type:"text",content:d.msg,msg:n})})}l&&requestAnimationFrame(u=>this.msgText="")},sendRecord(e){const t={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:"loading",userid:this.userId,msg:e};this.tempMsgs.push(t),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(e,{dialog_id:this.dialogId,reply_id:this.quoteId}),method:"post"}).then(({data:n})=>{this.tempMsgs=this.tempMsgs.filter(({id:r})=>r!=t.id),this.sendSuccess(n)}).catch(n=>{this.$set(t,"error",!0),this.$set(t,"errorData",{type:"record",content:n.msg,msg:e})})},sendFileMsg(e){const t=$A.isArray(e)?e:[e];t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some(n=>{const r={type:$A.getMiddle(n.type,null,"/"),name:n.name,size:n.size,result:null};if(r.type==="image"){const a=new FileReader;a.readAsDataURL(n),a.onload=({target:l})=>{r.result=l.result,this.pasteFile.push(n),this.pasteItem.push(r),this.pasteShow=!0}}else this.pasteFile.push(n),this.pasteItem.push(r),this.pasteShow=!0}))},sendQuick(e){this.sendMsg(`

${e.label}

`)},onMsgChange(e){const t=this.allMsgs.find(({type:n,id:r})=>n=="text"&&r==e.id);if(t){const{tail:n}=this.scrollInfo();e.type==="append"?t.msg.text+=e.text:e.type==="replace"&&(t.msg.text=e.text),this.$nextTick(r=>{const{tail:a}=this.scrollInfo();n<=10&&a!=n&&(this.operatePreventScroll++,this.$refs.scroller.scrollToBottom(),setTimeout(l=>{this.operatePreventScroll--},50))})}},getTempId(){return this.tempId++},getMsgs(e){return new Promise((t,n)=>{setTimeout(r=>this.msgLoadIng++,2e3),this.$store.dispatch("getDialogMsgs",e).then(t).catch(n).finally(r=>{this.msgLoadIng--})})},msgFilter(e){if(this.msgType){if(this.msgType==="tag"){if(!e.tag)return!1}else if(this.msgType==="link"){if(!e.link)return!1}else if(this.msgType!==e.mtype)return!1}return!(this.msgId&&e.reply_id!=this.msgId)},onSearchMsgId(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId(e,t=0,n=0){return new Promise((r,a)=>{if(e===0){$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u53C2\u6570\u9519\u8BEF"),a();return}if(this.loadMsg||this.msgType!==""){if(this.msgType="",n===0)this.$store.dispatch("showSpinner",600);else if(n>20){this.$store.dispatch("hiddenSpinner"),$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u8BF7\u6C42\u8D85\u65F6"),a();return}n++,setTimeout(c=>{this.onPositionId(e,t,n).then(r).catch(a)},Math.min(800,200*n));return}n>0&&this.$store.dispatch("hiddenSpinner");const l=this.allMsgs.findIndex(c=>c.id===e),u=this.prevId>0?0:-1;l>u?setTimeout(c=>{this.onToIndex(l),r()},200):(t>0&&this.$store.dispatch("setLoad",{key:`msg-${t}`,delay:600}),this.preventToBottom=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,position_id:e,spinner:2e3}).finally(c=>{const d=this.allMsgs.findIndex(f=>f.id===e);d>-1&&(this.onToIndex(d),r()),t>0&&this.$store.dispatch("cancelLoad",`msg-${t}`),this.preventToBottom=!1}))})},onViewTodo(e){if(this.operateVisible)return;this.todoViewId=e.id,this.todoViewMid=e.msg_id,this.todoViewShow=!0,this.allMsgs.findIndex(n=>n.id===this.todoViewMid)===-1&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then(({data:n})=>{this.todoViewData=n})},onCloseTodo(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo(){!this.todoViewMid||(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally(e=>{this.todoViewPosLoad=!1}))},onDoneTodo(){!this.todoViewId||this.todoViewLoad||(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then(({data:e})=>{this.$store.dispatch("saveDialogTodo",{id:this.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),this.$store.dispatch("saveDialog",{id:this.dialogId,todo_num:this.todoList.length}),e.add&&this.sendSuccess(e.add),this.todoList.length===0&&this.$store.dispatch("getDialogTodo",this.dialogId),this.onCloseTodo()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.todoViewLoad=!1}))},itemClassAdd(e){return e===this.msgActiveIndex?"common-shake":""},inputFocus(){this.$nextTick(e=>{this.$refs.input&&this.$refs.input.focus()})},onRecordState(e){this.recordState=e},chatPasteDrag(e,t){if(this.dialogDrag=!1,$A.dataHasFolder(t==="drag"?e.dataTransfer:e.clipboardData)){e.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${t==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\u3002`);return}const n=t==="drag"?e.dataTransfer.files:e.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(e.preventDefault(),this.sendFileMsg(r))},chatDragOver(e,t){let n=this.__dialogDrag=$A.randomString(8);if(!e)setTimeout(()=>{n===this.__dialogDrag&&(this.dialogDrag=e)},150);else{if(t.dataTransfer.effectAllowed==="move"||Array.prototype.slice.call(t.dataTransfer.files).length===0)return;this.dialogDrag=!0}},onTouchStart(e){if(this.wrapperStart=null,this.$refs.scroller.$el.contains(e.target))this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:e.touches[0].clientY});else if(this.$refs.input.$refs.editor.contains(e.target)){const t=this.$refs.input.$refs.editor.querySelector(".ql-editor");if(t){const n=t.clientHeight,r=t.scrollTop,a=t.scrollHeight;this.wrapperStart={offset:r,scale:r/(a-n),tail:a-n-r,clientY:e.touches[0].clientY}}}},onTouchMove(e){if(this.footerPaddingBottom>0||this.windowPortrait&&this.windowScrollY>0){if(this.wrapperStart===null){e.preventDefault();return}this.wrapperStart.clientY>e.touches[0].clientY?this.wrapperStart.tail===0&&e.preventDefault():this.wrapperStart.offset===0&&e.preventDefault()}},pasteSend(){this.pasteFile.some(e=>{this.$refs.chatUpload.upload(e)})},chatFile(e,t){switch(e){case"progress":const n={id:t.tempId,dialog_id:this.dialogData.id,reply_id:this.quoteId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(n),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom);break;case"error":this.tempMsgs=this.tempMsgs.filter(({id:r})=>r!=t.tempId);break;case"success":this.tempMsgs=this.tempMsgs.filter(({id:r})=>r!=t.tempId),this.sendSuccess(t.data);break}},sendSuccess(e){if($A.isArray(e)){e.some(this.sendSuccess);return}this.$store.dispatch("saveDialogMsg",e),this.quoteUpdate||(this.$store.dispatch("increaseTaskMsgNum",e),this.$store.dispatch("increaseMsgReplyNum",e),this.$store.dispatch("updateDialogLastMsg",e)),this.cancelQuote(),this.onActive()},setQuote(e,t){var n;(n=this.$refs.input)==null||n.setQuote(e,t)},cancelQuote(){var e;(e=this.$refs.input)==null||e.cancelQuote()},onEventFocus(){this.$emit("on-focus")},onEventBlur(){this.$emit("on-blur")},onEventMore(e){switch(e){case"image":case"file":this.$refs.chatUpload.handleClick();break;case"call":this.onCallTel();break;case"anon":this.onAnon();break}},onCallTel(){this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then(({data:e})=>{e.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:e.tel}),e.add&&(this.$store.dispatch("saveDialogMsg",e.add),this.$store.dispatch("updateDialogLastMsg",e.add),this.onActive())}).catch(({msg:e})=>{$A.modalError(e)})},onAnon(){if(this.dialogData.type!=="user"||this.dialogData.bot){$A.modalWarning("\u533F\u540D\u6D88\u606F\u4EC5\u5141\u8BB8\u53D1\u9001\u7ED9\u4E2A\u4EBA");return}$A.modalInput({title:"\u53D1\u9001\u533F\u540D\u6D88\u606F",placeholder:"\u533F\u540D\u6D88\u606F\u5C06\u901A\u8FC7\u533F\u540D\u6D88\u606F\uFF08\u673A\u5668\u4EBA\uFF09\u53D1\u9001\u7ED9\u5BF9\u65B9\uFF0C\u4E0D\u4F1A\u8BB0\u5F55\u4F60\u7684\u4EFB\u4F55\u8EAB\u4EFD\u4FE1\u606F",inputProps:{type:"textarea",rows:3,autosize:{minRows:3,maxRows:6},maxlength:2e3},okText:"\u533F\u540D\u53D1\u9001",onOk:e=>e?new Promise((t,n)=>{this.$store.dispatch("call",{url:"dialog/msg/sendanon",data:{userid:this.dialogData.dialog_user.userid,text:e},method:"post"}).then(({msg:r})=>{t(r)}).catch(({msg:r})=>{n(r)})}):"\u8BF7\u8F93\u5165\u6D88\u606F\u5185\u5BB9"})},onEventEmojiVisibleChange(e){e&&this.windowPortrait&&this.onToBottom()},onHeightChange({newVal:e,oldVal:t}){const n=e-t;if(n!==0){const{offset:r,tail:a}=this.scrollInfo();a>0&&this.onToOffset(r+n)}},onActive(){this.$emit("on-active")},onToBottom(){this.msgNew=0;const e=this.$refs.scroller;e&&(e.scrollToBottom(),requestAnimationFrame(t=>e.scrollToBottom()))},onToIndex(e){const t=this.$refs.scroller;t&&(t.stopToBottom(),t.scrollToIndex(e,-100),requestAnimationFrame(n=>t.scrollToIndex(e,-100))),requestAnimationFrame(n=>this.msgActiveIndex=e)},onToOffset(e){const t=this.$refs.scroller;t&&(t.stopToBottom(),t.scrollToOffset(e),setTimeout(n=>t.scrollToOffset(e),10))},scrollInfo(){const e=this.$refs.scroller;return e?e.scrollInfo():{offset:0,scale:0,tail:0}},openProject(){!this.dialogData.group_info||(this.windowPortrait&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask(){!this.dialogData.group_info||(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",{id:this.dialogData.group_info.id,deleted_at:this.dialogData.group_info.deleted_at,archived_at:this.dialogData.group_info.archived_at}))},onPrevPage(){this.prevId!==0&&this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:e=>this.scrollDisabled=!0,save_after:e=>this.scrollDisabled=!1}).then(({data:e})=>{const t=e.list.map(n=>n.id);this.$nextTick(()=>{const n=this.$refs.scroller,r=t.reduce((l,u)=>({size:(typeof l=="object"?l.size:n.getSize(l))+n.getSize(u)}));let a=n.getOffset()+r.size;this.prevId===0&&(a-=36),this.onToOffset(a),setTimeout(l=>n.virtual.handleFront(),10)})}).catch(()=>{})},onDialogMenu(e){var t;switch(e){case"searchMsg":this.searchShow=!0,this.$nextTick(r=>{this.$refs.searchInput.focus()});break;case"openCreate":const n=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&n.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:n,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"modifyNormal":this.modifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar,name:this.dialogData.name},this.dialogData.type==="user"&&(this.modifyData=Object.assign(this.modifyData,{userid:this.dialogData.dialog_user.userid,avatar:(t=this.cacheUserBasic.find(r=>r.userid===this.dialogData.dialog_user.userid))==null?void 0:t.userimg,clear_day:0,webhook_url:"",system_name:""}),this.modifyLoad++,this.$store.dispatch("call",{url:"users/bot/info",data:{id:this.dialogData.dialog_user.userid}}).then(({data:r})=>{this.modifyData.clear_day=r.clear_day,this.modifyData.webhook_url=r.webhook_url,this.modifyData.system_name=r.system_name}).finally(()=>{this.modifyLoad--})),this.modifyShow=!0;break;case"modifyAdmin":this.modifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar,admin:1},this.modifyShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup();break}},onTransferGroup(){if(this.groupTransferData.userid.length===0){$A.messageError("\u8BF7\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B");return}this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.$store.dispatch("saveDialog",e)}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.groupTransferLoad--,this.groupTransferShow=!1})},onDisbandGroup(){$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u8981\u89E3\u6563\u3010${this.dialogData.name}\u3011\u7FA4\u7EC4\u5417\uFF1F`,loading:!0,okText:"\u89E3\u6563",onOk:()=>new Promise((e,t)=>{this.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:this.dialogId}}).then(({msg:n})=>{e(n),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:n})=>{t(n)})})})},onExitGroup(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u7FA4\u7EC4\u5417\uFF1F",loading:!0,onOk:()=>new Promise((e,t)=>{this.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:this.dialogId}}).then(({msg:n})=>{e(n),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:n})=>{t(n)})})})},onCreateGroup(){this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.createGroupShow=!1,this.createGroupData={},this.$store.dispatch("saveDialog",e),this.$store.dispatch("openDialog",e.id)}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.createGroupLoad--})},onModify(){this.modifyData.userid?(this.modifyLoad++,this.$store.dispatch("call",{url:"users/bot/edit",data:{id:this.modifyData.userid,avatar:this.modifyData.avatar,name:this.modifyData.name,clear_day:this.modifyData.clear_day,webhook_url:this.modifyData.webhook_url},method:"post"}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.$store.dispatch("saveUserBasic",{userid:this.modifyData.userid,nickname:e.name,userimg:e.avatar}),this.$store.dispatch("saveDialog",{id:this.modifyData.dialog_id,name:e.name}),this.modifyShow=!1,this.modifyData={}}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.modifyLoad--})):(this.modifyLoad++,this.$store.dispatch("call",{url:"dialog/group/edit",data:this.modifyData}).then(({data:e,msg:t})=>{$A.messageSuccess(t),this.$store.dispatch("saveDialog",e),this.modifyShow=!1,this.modifyData={}}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.modifyLoad--}))},onForward(){return new Promise((e,t)=>{if(this.forwardData.length===0){$A.messageError("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458"),t();return}const n=this.forwardData.filter(a=>$A.leftExists(a,"d:")).map(a=>a.replace("d:","")),r=this.forwardData.filter(a=>!$A.leftExists(a,"d:"));this.$store.dispatch("call",{url:"dialog/msg/forward",data:{dialogids:n,userids:r,msg_id:this.operateItem.id}}).then(({data:a,msg:l})=>{this.$store.dispatch("saveDialogMsg",a.msgs),this.$store.dispatch("updateDialogLastMsg",a.msgs),$A.messageSuccess(l),e()}).catch(({msg:a})=>{$A.modalError(a),t()})})},onScroll(e){this.operatePreventScroll===0&&(this.operateVisible=!1);const{offset:t,tail:n}=this.scrollInfo();this.scrollOffset=t,this.scrollTail=n,this.scrollTail<=55&&(this.msgNew=0),this.scrollAction=e.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout(r=>this.scrollTmp=this.scrollAction,0)},onRange(e){if(this.preventMoreLoad)return;const t=this.scrollDirection==="down"?"next_id":"prev_id";for(let n=e.start;n<=e.end;n++){const r=this.allMsgs[n][t];if(r){const a=this.allMsgs[n+(t==="next_id"?1:-1)];a&&a.id!=r&&(this.preventMoreLoad=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,[t]:r}).finally(l=>{this.preventMoreLoad=!1}))}}},onBack(){if(!this.beforeBack)return this.handleBack();const e=this.beforeBack();e&&e.then?e.then(()=>{this.handleBack()}):this.handleBack()},handleBack(){const{name:e,params:t}=this.$store.state.routeHistoryLast;e===this.$route.name&&/^\d+$/.test(t.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType(e){switch(e){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5..."):this.msgType=e;break}},onMention(e){const t=this.cacheUserBasic.find(({userid:n})=>n==e.userid);t&&this.$refs.input.addMention({denotationChar:"@",id:t.userid,value:t.nickname})},onLongpress({event:e,el:t,msgData:n}){if(this.operateVisible=this.operateItem.id===n.id,this.operateItem=$A.isJson(n)?n:{},this.operateCopys=[],e.target.nodeName==="IMG"&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"\u590D\u5236\u56FE\u7247",value:$A.thumbRestore(e.target.currentSrc)}):e.target.nodeName==="A"&&(e.target.classList.contains("mention")&&e.target.classList.contains("file")&&this.findOperateFile(this.operateItem.id,e.target.href),this.operateCopys.push({type:"link",icon:"",label:"\u590D\u5236\u94FE\u63A5",value:e.target.href})),n.type==="text"){e.target.nodeName==="IMG"&&this.operateCopys.push({type:"imagedown",icon:"",label:"\u4E0B\u8F7D\u56FE\u7247",value:$A.thumbRestore(e.target.currentSrc)});const r=this.getSelectedTextInElement(t);if(r.length>0&&this.operateCopys.push({type:"selected",icon:"",label:"\u590D\u5236\u9009\u62E9",value:r}),n.msg.text.replace(/<[^>]+>/g,"").length>0){let a=this.operateCopys.length>0?"\u590D\u5236\u6587\u672C":"\u590D\u5236";r.length>0&&(a="\u590D\u5236\u5168\u90E8"),this.operateCopys.push({type:"text",icon:"",label:a,value:""})}}this.$nextTick(()=>{const r=t.getBoundingClientRect(),a=this.$el.getBoundingClientRect();this.operateStyles={left:`${e.clientX-a.left}px`,top:`${r.top+this.windowScrollY}px`,height:r.height+"px"},this.operateClient={x:e.clientX,y:e.clientY},this.operateVisible=!0})},onOperate(e,t=null){this.operateVisible=!1,this.$nextTick(n=>{switch(e){case"reply":this.onReply();break;case"update":this.onUpdate();break;case"copy":this.onCopy(t);break;case"forward":this.forwardData=[],this.$refs.forwardSelect.onSelection();break;case"withdraw":this.onWithdraw();break;case"view":this.onViewFile();break;case"down":this.onDownFile();break;case"tag":this.onTag();break;case"newTask":let r=$A.formatMsgBasic(this.operateItem.msg.text);r=r.replace(/]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,''),_i.Store.set("addTask",{owner:[this.userId],content:r});break;case"todo":this.onTodo();break;case"pos":this.onPositionId(this.operateItem.id);break;case"emoji":t==="more"?NJ().then(this.onEmoji):this.onEmoji(t);break}})},onReply(e){const{tail:t}=this.scrollInfo();this.setQuote(this.operateItem.id,e),this.inputFocus(),t<=55&&requestAnimationFrame(this.onToBottom)},onUpdate(){const{type:e}=this.operateItem;if(this.onReply(e==="text"?"update":"reply"),e==="text"){let{text:t,type:n}=this.operateItem.msg;this.$refs.input.setPasteMode(!1),n==="md"?this.$refs.input.setText(t):(t.indexOf("mention")>-1&&(t=t.replace(/
]*)>~([^>]*)<\/a>/g,'~$3'),t=t.replace(/([@#])([^>]*)<\/span>/g,'$3$4')),t=t.replace(/]*>/gi,r=>r.replace(/(width|height)="\d+"\s*/ig,"")),this.msgText=$A.formatMsgBasic(t)),this.$nextTick(r=>this.$refs.input.setPasteMode(!0))}},onCopy(e){if(!$A.isJson(e))return;const{type:t,value:n}=e;switch(t){case"image":this.$Electron&&this.$Electron.sendMessage("copyImageAt",this.operateClient);break;case"imagedown":this.$store.dispatch("downUrl",{url:n,token:!1});break;case"filepos":this.windowPortrait&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-file",params:n});break;case"link":this.$copyText(n).then(a=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(a=>$A.messageError("\u590D\u5236\u5931\u8D25"));break;case"selected":this.$copyText(n).then(a=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(a=>$A.messageError("\u590D\u5236\u5931\u8D25"));break;case"text":const r=$A(this.$refs.scroller.$el).find(`[data-id="${this.operateItem.id}"]`).find(".dialog-content");if(r.length>0){const a=r[0].innerText.replace(/\n\n/g,` `).replace(/(^\s*)|(\s*$)/g,"");this.$copyText(a).then(l=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(l=>$A.messageError("\u590D\u5236\u5931\u8D25"))}else $A.messageWarning("\u4E0D\u53EF\u590D\u5236\u7684\u5185\u5BB9");break}},onWithdraw(){$A.modalConfirm({content:"\u786E\u5B9A\u64A4\u56DE\u6B64\u4FE1\u606F\u5417\uFF1F",okText:"\u64A4\u56DE",loading:!0,onOk:()=>new Promise((e,t)=>{this.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:this.operateItem.id}}).then(()=>{e("\u6D88\u606F\u5DF2\u64A4\u56DE"),this.$store.dispatch("forgetDialogMsg",this.operateItem.id)}).catch(({msg:n})=>{t(n)})})})},onViewReply(e){this.operateVisible||this.onPositionId(e.reply_id,e.msg_id)},onViewText({target:e},t){if(this.operateVisible)return;let n=e;for(;n;){if(n.classList.contains("open-approve-details")){const r=n.getAttribute("data-id");window.innerWidth<426?this.goForward({name:"manage-approve-details",query:{id:n.getAttribute("data-id")}}):(this.approveDetailsShow=!0,this.$nextTick(()=>{this.approveDetails={id:r}}));break}if(n.classList.contains("dialog-item"))break;n=n.parentElement}switch(e.nodeName){case"IMG":if(e.classList.contains("browse"))this.onViewPicture(e.currentSrc);else{const r=$A.getTextImagesInfo(t.outerHTML),a=r.findIndex(l=>l.src==e.currentSrc);this.$store.dispatch("previewImage",{index:a,list:r})}break;case"SPAN":e.classList.contains("mention")&&e.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(e.getAttribute("data-id")));break}},onViewFile(e){if(this.operateVisible)return;$A.isJson(e)||(e=this.operateItem);const{msg:t}=e;if(["jpg","jpeg","webp","gif","png"].includes(t.ext)){this.onViewPicture(t.path);return}const n=`/single/file/msg/${e.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-msg-${e.id}`,path:n,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)+`#${n}`}}):window.open($A.apiUrl(`..${n}`))},onViewPicture(e){const t=this.allMsgs.filter(a=>a.type==="file"?["jpg","jpeg","webp","gif","png"].includes(a.msg.ext):a.type==="text"?a.msg.text.match(/]*?>/):!1),n=[];t.some(({type:a,msg:l})=>{a==="file"?n.push({src:l.path,width:l.width,height:l.height}):a==="text"&&n.push(...$A.getTextImagesInfo(l.text))});const r=n.findIndex(({src:a})=>a===e);r>-1?this.$store.dispatch("previewImage",{index:r,list:n}):this.$store.dispatch("previewImage",e)},onDownFile(e){this.operateVisible||($A.isJson(e)||(e=this.operateItem),$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${e.msg.name} (${$A.bytesToSize(e.msg.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`dialog/msg/download?msg_id=${e.id}`))}}))},onReplyList(e){this.operateVisible||(this.replyListId=e.msg_id,this.replyListShow=!0)},onError(e){if(e.error!==!0)return;const{type:t,content:n,msg:r}=e.errorData,a={icon:"error",title:"\u53D1\u9001\u5931\u8D25",content:n,cancelText:"\u53D6\u6D88\u53D1\u9001",onCancel:l=>{this.tempMsgs=this.tempMsgs.filter(({id:u})=>u!=e.id)}};if(t==="text")a.okText="\u518D\u6B21\u7F16\u8F91",a.onOk=()=>{this.tempMsgs=this.tempMsgs.filter(({id:l})=>l!=e.id),this.$refs.input.setPasteMode(!1),this.msgText=r,this.inputFocus(),this.$nextTick(l=>this.$refs.input.setPasteMode(!0))};else if(t==="record")a.okText="\u91CD\u65B0\u53D1\u9001",a.onOk=()=>{this.tempMsgs=this.tempMsgs.filter(({id:l})=>l!=e.id),this.sendRecord(r)};else return;$A.modalConfirm(a)},onEmoji(e){$A.isJson(e)||(e={msg_id:this.operateItem.id,symbol:e});const t=this.cacheEmojis.filter(n=>n!==e.symbol);t.unshift(e.symbol),$A.IDBSave("cacheEmojis",this.$store.state.cacheEmojis=t.slice(0,3)),this.$store.dispatch("setLoad",{key:`msg-${e.msg_id}`,delay:600}),this.$store.dispatch("call",{url:"dialog/msg/emoji",data:e}).then(({data:n})=>{this.dialogMsgs.findIndex(a=>a.id==n.id)>-1?this.$store.dispatch("saveDialogMsg",n):this.todoViewData.id===n.id&&(this.todoViewData=Object.assign(this.todoViewData,n))}).catch(({msg:n})=>{$A.messageError(n)}).finally(n=>{this.$store.dispatch("cancelLoad",`msg-${e.msg_id}`)})},onShowEmojiUser(e){this.operateVisible||(this.respondData=e,this.respondShow=!0)},onTag(){if(this.operateVisible)return;const e={msg_id:this.operateItem.id};this.$store.dispatch("setLoad",{key:`msg-${e.msg_id}`,delay:600}),this.$store.dispatch("call",{url:"dialog/msg/tag",data:e}).then(({data:t})=>{this.tagOrTodoSuccess(t)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.$store.dispatch("cancelLoad",`msg-${e.msg_id}`)})},onTodo(e){var t;if(!this.operateVisible)if(e==="submit"){const n=$A.cloneJSON(this.todoSettingData);if(n.type==="my")n.type="user",n.userids=[n.my_id];else if(n.type==="you")n.type="user",n.userids=[n.you_id];else if(n.type==="user"&&$A.arrayLength(n.userids)===0){$A.messageWarning("\u9009\u62E9\u6307\u5B9A\u6210\u5458");return}this.todoSettingLoad++,this.onTodoSubmit(n).then(r=>{$A.messageSuccess(r),this.todoSettingShow=!1}).catch(r=>{$A.messageError(r)}).finally(r=>{this.todoSettingLoad--})}else{const n=(t=this.dialogData.dialog_user)==null?void 0:t.userid;this.todoSettingData={type:"all",userids:[],msg_id:this.operateItem.id,my_id:this.userId,you_id:n!=this.userId&&!this.dialogData.bot?n:0},this.operateItem.todo?$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u53D6\u6D88\u5F85\u529E\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>this.onTodoSubmit(this.todoSettingData)}):this.todoSettingShow=!0}},onTodoSubmit(e){return new Promise((t,n)=>{this.$store.dispatch("setLoad",{key:`msg-${e.msg_id}`,delay:600}),this.$store.dispatch("call",{url:"dialog/msg/todo",data:e}).then(({data:r,msg:a})=>{t(a),this.tagOrTodoSuccess(r),this.onActive()}).catch(({msg:r})=>{n(r)}).finally(r=>{this.$store.dispatch("cancelLoad",`msg-${e.msg_id}`)})})},tagOrTodoSuccess(e){this.$store.dispatch("saveDialogMsg",e.update),e.add&&(this.$store.dispatch("saveDialogMsg",e.add),this.$store.dispatch("updateDialogLastMsg",e.add))},onSearchSwitch(e){if(this.searchResult.length!==0){if(this.searchLocation===1&&this.searchResult.length===1){this.onPositionId(this.searchResult[0]);return}e==="prev"?this.searchLocation<=1?this.searchLocation=this.searchResult.length:this.searchLocation--:this.searchLocation>=this.searchResult.length?this.searchLocation=1:this.searchLocation++}},onSearchKeyup(e){(e===null||e.keyCode===27)&&(this.searchShow=!1,this.searchKey="",this.searchResult=[])},onPositionMark(){if(this.positionLoad>0)return;this.positionLoad++;const{msg_id:e}=this.positionMsg;this.$store.dispatch("dialogMsgMark",{dialog_id:this.dialogId,type:"read",after_msg_id:e}).then(t=>{this.positionLoad++,this.onPositionId(e).finally(n=>{this.positionLoad--})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.positionLoad--})},findOperateFile(e,t){const n=this.fileLinks.find(r=>r.link===t);if(n){this.addFileMenu(e,n);return}this.$store.dispatch("searchFiles",{link:t}).then(({data:r})=>{if(r.length===1){const a={link:t,id:r[0].id,pid:r[0].pid};this.fileLinks.push(a),this.addFileMenu(e,a)}}).catch(r=>{})},addFileMenu(e,t){if(this.operateItem.id!=e||this.operateCopys.findIndex(r=>r.type==="filepos")!==-1)return;const n=Math.max(0,this.operateCopys.findIndex(r=>r.type==="link")-1);this.operateCopys.splice(n,0,{type:"filepos",icon:"",label:"\u663E\u793A\u6587\u4EF6",value:{folderId:t.pid,fileId:null,shakeId:t.id}})},getBase64Image(e){return new Promise(t=>{let n=document.createElement("CANVAS"),r=n.getContext("2d"),a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{n.height=a.height,n.width=a.width,r.drawImage(a,0,0);let l="png";$A.rightExists(e,"jpg")||$A.rightExists(e,"jpeg")?l="jpeg":$A.rightExists(e,"webp")?l="webp":$A.rightExists(e,"git")&&(l="git"),t(n.toDataURL(`image/${l}`)),n=null},a.src=e})},getSelectedTextInElement(e){let t="";if(window.getSelection){let n=window.getSelection();if(n.rangeCount>0){const r=n.getRangeAt(0);e.contains(r.commonAncestorContainer)&&(t=r.toString())}}return t},onViewAvatar(e){let t=null;e.target.tagName==="IMG"?t=e.target.src:t=$A(e.target).find("img").attr("src"),t&&this.$store.dispatch("previewImage",t)}}},Rl={};var DJ=Kt(IJ,OJ,AJ,!1,xJ,null,null,null);function xJ(e){for(let t in Rl)this[t]=Rl[t]}var FJ=function(){return DJ.exports}();export{CJ as C,FJ as D}; diff --git a/public/js/build/Drawio.33c85dd8.js b/public/js/build/Drawio.a7d96145.js similarity index 93% rename from public/js/build/Drawio.33c85dd8.js rename to public/js/build/Drawio.a7d96145.js index e9e869c0f..8e8b51011 100644 --- a/public/js/build/Drawio.33c85dd8.js +++ b/public/js/build/Drawio.a7d96145.js @@ -1 +1 @@ -import{m as o,n as l,l as s}from"./app.2ab5f89e.js";import{I as d}from"./IFrame.f4e1afaf.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.6fb8fe77.js";import{I as d}from"./IFrame.dfb0ac0a.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.1929b7b3.js b/public/js/build/FileContent.35a4ff5e.js similarity index 92% rename from public/js/build/FileContent.1929b7b3.js rename to public/js/build/FileContent.35a4ff5e.js index c065709d0..50560c280 100644 --- a/public/js/build/FileContent.1929b7b3.js +++ b/public/js/build/FileContent.35a4ff5e.js @@ -1 +1 @@ -import{n as r,m as c,_ as n}from"./app.2ab5f89e.js";import{I as d}from"./IFrame.f4e1afaf.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:480,"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:a=>{this.onAction(a,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,"44e1704c",null,null);function v(e){for(let s in o)this[s]=o[s]}var _=function(){return p.exports}(),m=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,a){return a<=10?t("li",{key:a},[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?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),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"?t("MDEditor",{attrs:{height:"100%"},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("TEditor",{attrs:{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=()=>n(()=>import("./index.d02ed9ac.js"),["js/build/index.d02ed9ac.js","js/build/index.4dae4044.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/ImgUpload.cf2be17d.js"]),$=()=>n(()=>import("./TEditor.c448a662.js"),["js/build/TEditor.c448a662.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/ImgUpload.cf2be17d.js"]),w=()=>n(()=>import("./AceEditor.46ba32dc.js"),["js/build/AceEditor.46ba32dc.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),g=()=>n(()=>import("./OnlyOffice.512691a7.js"),["js/build/OnlyOffice.512691a7.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),D=()=>n(()=>import("./Drawio.33c85dd8.js"),["js/build/Drawio.33c85dd8.js","js/build/Drawio.fc5c6326.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),x=()=>n(()=>import("./Minder.89953d4a.js"),["js/build/Minder.89953d4a.js","js/build/Minder.f2273bdb.css","js/build/IFrame.f4e1afaf.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),C={name:"FileContent",components:{IFrame:d,FileHistory:_,AceEditor:w,TEditor:$,MDEditor:k,OnlyOffice:g,Drawio:D,Minder:x},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}},mounted(){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""}},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.$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 S=r(C,m,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var T=function(){return S.exports}();export{T as default}; +import{n as r,m as c,_ as n}from"./app.6fb8fe77.js";import{I as d}from"./IFrame.dfb0ac0a.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:480,"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:a=>{this.onAction(a,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,"44e1704c",null,null);function v(e){for(let s in o)this[s]=o[s]}var _=function(){return p.exports}(),m=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,a){return a<=10?t("li",{key:a},[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?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),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"?t("MDEditor",{attrs:{height:"100%"},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("TEditor",{attrs:{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=()=>n(()=>import("./index.9b4ad049.js"),["js/build/index.9b4ad049.js","js/build/index.4dae4044.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/ImgUpload.056f7090.js"]),$=()=>n(()=>import("./TEditor.116bbeaa.js"),["js/build/TEditor.116bbeaa.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/ImgUpload.056f7090.js"]),w=()=>n(()=>import("./AceEditor.6d433f2d.js"),["js/build/AceEditor.6d433f2d.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),g=()=>n(()=>import("./OnlyOffice.72397ebe.js"),["js/build/OnlyOffice.72397ebe.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),D=()=>n(()=>import("./Drawio.a7d96145.js"),["js/build/Drawio.a7d96145.js","js/build/Drawio.fc5c6326.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),x=()=>n(()=>import("./Minder.755c9889.js"),["js/build/Minder.755c9889.js","js/build/Minder.f2273bdb.css","js/build/IFrame.dfb0ac0a.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),C={name:"FileContent",components:{IFrame:d,FileHistory:_,AceEditor:w,TEditor:$,MDEditor:k,OnlyOffice:g,Drawio:D,Minder:x},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}},mounted(){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""}},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.$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 S=r(C,m,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var T=function(){return S.exports}();export{T as default}; diff --git a/public/js/build/FilePreview.a0883610.js b/public/js/build/FilePreview.4bfd7284.js similarity index 76% rename from public/js/build/FilePreview.a0883610.js rename to public/js/build/FilePreview.4bfd7284.js index e53fcd0fa..9a38c6262 100644 --- a/public/js/build/FilePreview.a0883610.js +++ b/public/js/build/FilePreview.4bfd7284.js @@ -1 +1 @@ -import{n as r,_ as n}from"./app.2ab5f89e.js";import{I as a}from"./IFrame.f4e1afaf.js";var s=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),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click"},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()],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)},l=[];const d=()=>n(()=>import("./preview.35a96748.js"),["js/build/preview.35a96748.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),c=()=>n(()=>import("./TEditor.c448a662.js"),["js/build/TEditor.c448a662.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/ImgUpload.cf2be17d.js"]),_=()=>n(()=>import("./AceEditor.46ba32dc.js"),["js/build/AceEditor.46ba32dc.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),p=()=>n(()=>import("./OnlyOffice.512691a7.js"),["js/build/OnlyOffice.512691a7.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),u=()=>n(()=>import("./Drawio.33c85dd8.js"),["js/build/Drawio.33c85dd8.js","js/build/Drawio.fc5c6326.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),h=()=>n(()=>import("./Minder.89953d4a.js"),["js/build/Minder.89953d4a.js","js/build/Minder.f2273bdb.css","js/build/IFrame.f4e1afaf.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:_,TEditor:c,MDPreview:d,OnlyOffice:p,Drawio:u,Minder:h},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,s,l,!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.6fb8fe77.js";import{I as a}from"./IFrame.dfb0ac0a.js";var s=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),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click"},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()],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)},l=[];const d=()=>n(()=>import("./preview.a2619f71.js"),["js/build/preview.a2619f71.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),c=()=>n(()=>import("./TEditor.116bbeaa.js"),["js/build/TEditor.116bbeaa.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/ImgUpload.056f7090.js"]),_=()=>n(()=>import("./AceEditor.6d433f2d.js"),["js/build/AceEditor.6d433f2d.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),p=()=>n(()=>import("./OnlyOffice.72397ebe.js"),["js/build/OnlyOffice.72397ebe.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),u=()=>n(()=>import("./Drawio.a7d96145.js"),["js/build/Drawio.a7d96145.js","js/build/Drawio.fc5c6326.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),h=()=>n(()=>import("./Minder.755c9889.js"),["js/build/Minder.755c9889.js","js/build/Minder.f2273bdb.css","js/build/IFrame.dfb0ac0a.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:_,TEditor:c,MDPreview:d,OnlyOffice:p,Drawio:u,Minder:h},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,s,l,!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.f4e1afaf.js b/public/js/build/IFrame.dfb0ac0a.js similarity index 94% rename from public/js/build/IFrame.f4e1afaf.js rename to public/js/build/IFrame.dfb0ac0a.js index 6c9d4abc2..209a147bd 100644 --- a/public/js/build/IFrame.f4e1afaf.js +++ b/public/js/build/IFrame.dfb0ac0a.js @@ -1 +1 @@ -import{n}from"./app.2ab5f89e.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.6fb8fe77.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.cf2be17d.js b/public/js/build/ImgUpload.056f7090.js similarity index 99% rename from public/js/build/ImgUpload.cf2be17d.js rename to public/js/build/ImgUpload.056f7090.js index 7124d035d..095646a64 100644 --- a/public/js/build/ImgUpload.cf2be17d.js +++ b/public/js/build/ImgUpload.056f7090.js @@ -1 +1 @@ -import{n as o}from"./app.2ab5f89e.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:{"background-image":"url("+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"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:{...d(["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,a=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,s=`${this.fileType}-${e||i}`;this.historyId>0&&(s+=`-${this.historyId}`);const r={document:{fileType:this.fileType,title:a,key:s,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}&token=${this.userToken}`},events:{onDocumentReady:this.onDocumentReady}};/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(r.document.title=" "),(async y=>{if((this.readOnly||this.historyId>0)&&(r.editorConfig.mode="view",r.editorConfig.callbackUrl=null,!r.editorConfig.user.id)){let o=await $A.IDBInt("officeViewer");o||(o=$A.randNum(1e3,99999),await $A.IDBSet("officeViewer",o)),r.editorConfig.user.id="viewer_"+o,r.editorConfig.user.name="Viewer_"+o}this.$nextTick(()=>{this.docEditor=new DocsAPI.DocEditor(this.id,r)})})()},onDocumentReady(){this.$emit("on-document-ready",this.docEditor)}}},n={};var p=f(m,h,u,!1,_,"38b2d892",null,null);function _(e){for(let t in n)this[t]=n[t]}var $=function(){return p.exports}();export{$ as default}; +import{m as d,n as f,l}from"./app.6fb8fe77.js";import{I as c}from"./IFrame.dfb0ac0a.js";var h=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)},u=[];const m={name:"OnlyOffice",components:{IFrame:c},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:{...d(["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,a=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,s=`${this.fileType}-${e||i}`;this.historyId>0&&(s+=`-${this.historyId}`);const r={document:{fileType:this.fileType,title:a,key:s,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}&token=${this.userToken}`},events:{onDocumentReady:this.onDocumentReady}};/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(r.document.title=" "),(async y=>{if((this.readOnly||this.historyId>0)&&(r.editorConfig.mode="view",r.editorConfig.callbackUrl=null,!r.editorConfig.user.id)){let o=await $A.IDBInt("officeViewer");o||(o=$A.randNum(1e3,99999),await $A.IDBSet("officeViewer",o)),r.editorConfig.user.id="viewer_"+o,r.editorConfig.user.name="Viewer_"+o}this.$nextTick(()=>{this.docEditor=new DocsAPI.DocEditor(this.id,r)})})()},onDocumentReady(){this.$emit("on-document-ready",this.docEditor)}}},n={};var p=f(m,h,u,!1,_,"38b2d892",null,null);function _(e){for(let t in n)this[t]=n[t]}var $=function(){return p.exports}();export{$ as default}; diff --git a/public/js/build/ProjectLog.c251a416.js b/public/js/build/ProjectLog.9bfebf4b.js similarity index 98% rename from public/js/build/ProjectLog.c251a416.js rename to public/js/build/ProjectLog.9bfebf4b.js index b474c3f73..41b7fd9ce 100644 --- a/public/js/build/ProjectLog.c251a416.js +++ b/public/js/build/ProjectLog.9bfebf4b.js @@ -1 +1 @@ -import{m as p,n as c}from"./app.2ab5f89e.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.6fb8fe77.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.e316ac3c.js b/public/js/build/ReportDetail.f06c9ba5.js similarity index 97% rename from public/js/build/ReportDetail.e316ac3c.js rename to public/js/build/ReportDetail.f06c9ba5.js index 0ebba8809..8f7802b3a 100644 --- a/public/js/build/ReportDetail.e316ac3c.js +++ b/public/js/build/ReportDetail.f06c9ba5.js @@ -1 +1 @@ -import{m as i,n as l}from"./app.2ab5f89e.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.6fb8fe77.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.d1baae75.js b/public/js/build/ReportEdit.3d7c05e9.js similarity index 94% rename from public/js/build/ReportEdit.d1baae75.js rename to public/js/build/ReportEdit.3d7c05e9.js index a0cc3b379..996346a4b 100644 --- a/public/js/build/ReportEdit.d1baae75.js +++ b/public/js/build/ReportEdit.3d7c05e9.js @@ -1 +1 @@ -import{n as s,_ as o}from"./app.2ab5f89e.js";import{U as l}from"./UserSelect.c1d7840d.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.c448a662.js"),["js/build/TEditor.c448a662.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/ImgUpload.cf2be17d.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.6fb8fe77.js";import{U as l}from"./UserSelect.4fa9cbd2.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.116bbeaa.js"),["js/build/TEditor.116bbeaa.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/ImgUpload.056f7090.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.c448a662.js b/public/js/build/TEditor.116bbeaa.js similarity index 99% rename from public/js/build/TEditor.c448a662.js rename to public/js/build/TEditor.116bbeaa.js index f82435520..598f8410a 100644 --- a/public/js/build/TEditor.c448a662.js +++ b/public/js/build/TEditor.116bbeaa.js @@ -1,4 +1,4 @@ -import{c as PC,m as a2,l as IC,n as i2}from"./app.2ab5f89e.js";import{I as o2}from"./ImgUpload.cf2be17d.js";var FC={exports:{}};(function(R){(function(){var ye=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},le=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},ce=function(e,t){var n=Array.prototype.slice.call(e);return n.sort(t)},ze=function(e,t){return gt(function(n,r){return e.eq(t(n),t(r))})},gt=function(e){return{eq:e}},yr=gt(function(e,t){return e===t}),Hi=yr,ja=function(e){return gt(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},d0=function(e,t){return Sr(e,t)?c0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return v0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),m0=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)}},p0=[{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(p0),oses:X(h0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",g0=function(){return hv({current:void 0,version:Qa.unknown()})},hv=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)}},gv={unknown:g0,nu:hv,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",b0=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:b0,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)},y0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return s0(r,s)}).orThunk(function(){return f0(r,e)}).fold(gv.unknown,gv.nu),o=l0(a,e).fold(Tv.unknown,Tv.nu),u=a0(o,i,e,n);return{browser:i,os:o,deviceType:u}},C0={detect:y0},w0=function(e){return window.matchMedia(e).matches},S0=fs(function(){return C0.detect(navigator.userAgent,b.from(navigator.userAgentData),w0)}),Wt=function(){return S0()},Av=navigator.userAgent,ms=Wt(),Ct=ms.browser,It=ms.os,mn=ms.deviceType,E0=/WebKit/.test(Av)&&!Ct.isEdge(),k0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,x0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:E0,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:k0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:mn.isDesktop(),windowsPhone:x0,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}},N0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(N0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},T0=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},A0=pe,R0=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})}},B0=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)},$0=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}},F0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Za)},k={fromHtml:I0,fromTag:L0,fromText:$0,fromDom:Za,fromPoint:F0},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},M0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},U0=function(e,t){return M0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},z0=8,Ov=9,Pv=11,ps=1,H0=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},V0=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},q0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},j0=function(e,t){return U0(e.dom,t.dom)},Wn=function(e,t){return Wt().browser.isIE()?j0(e,t):q0(e,t)};typeof window!="undefined"||Function("return this;")();var Ke=function(e){var t=e.dom.nodeName;return t.toLowerCase()},Lv=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return Lv(t)===e}},K0=function(e){return Lv(e)===z0||Ke(e)==="#comment"},Zt=Xi(ps),qt=Xi(H0),G0=Xi(Ov),X0=Xi(Pv),Y0=function(e){return function(t){return Zt(t)&&Ke(t)===e}},$v=function(e){return k.fromDom(e.dom.ownerDocument)},aa=function(e){return G0(e)?e:$v(e)},Q0=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)},Z0=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},J0=function(e){var t=function(n){return me(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)},hs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},ew=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 X0(e)&&Ne(e.dom.host)},Wv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),tw=X(Wv),kr=Wv?function(e){return k.fromDom(e.dom.getRootNode())}:aa,gs=function(e){return Vv(e)?e:ew(aa(e))},nw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},rw=function(e){return k.fromDom(e.dom.host)},aw=function(e){if(tw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Zt(t)&&iw(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},iw=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)})},qv=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)},ow=function(e,t){en(e,t),at(t,e)},uw=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&&uw(e,t),tt(e)},ti=function(e){var t=qt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return nw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ti,rw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},ia=Kv,sw=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},fw=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)?sw(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=Wt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},lw=function(e){var t=e===void 0?window:e;return Wt().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 lw(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))})})},Dw=function(e){return _w(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:qe,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 zC(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:qe,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:ve,bind:u,exists:Re,forall:qe,toOptional:b.none}},Ow=function(e,t){return e.fold(function(){return ai(t)},sa)},fd={value:sa,error:ai,fromOption:Ow},Pw=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},d0=function(e,t){return Sr(e,t)?c0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return v0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),m0=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)}},p0=[{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(p0),oses:X(h0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",g0=function(){return hv({current:void 0,version:Qa.unknown()})},hv=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)}},gv={unknown:g0,nu:hv,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",b0=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:b0,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)},y0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return s0(r,s)}).orThunk(function(){return f0(r,e)}).fold(gv.unknown,gv.nu),o=l0(a,e).fold(Tv.unknown,Tv.nu),u=a0(o,i,e,n);return{browser:i,os:o,deviceType:u}},C0={detect:y0},w0=function(e){return window.matchMedia(e).matches},S0=fs(function(){return C0.detect(navigator.userAgent,b.from(navigator.userAgentData),w0)}),Wt=function(){return S0()},Av=navigator.userAgent,ms=Wt(),Ct=ms.browser,It=ms.os,mn=ms.deviceType,E0=/WebKit/.test(Av)&&!Ct.isEdge(),k0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,x0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:E0,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:k0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:mn.isDesktop(),windowsPhone:x0,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}},N0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(N0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},T0=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},A0=pe,R0=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})}},B0=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)},$0=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}},F0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Za)},k={fromHtml:I0,fromTag:L0,fromText:$0,fromDom:Za,fromPoint:F0},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},M0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},U0=function(e,t){return M0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},z0=8,Ov=9,Pv=11,ps=1,H0=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},V0=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},q0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},j0=function(e,t){return U0(e.dom,t.dom)},Wn=function(e,t){return Wt().browser.isIE()?j0(e,t):q0(e,t)};typeof window!="undefined"||Function("return this;")();var Ke=function(e){var t=e.dom.nodeName;return t.toLowerCase()},Lv=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return Lv(t)===e}},K0=function(e){return Lv(e)===z0||Ke(e)==="#comment"},Zt=Xi(ps),qt=Xi(H0),G0=Xi(Ov),X0=Xi(Pv),Y0=function(e){return function(t){return Zt(t)&&Ke(t)===e}},$v=function(e){return k.fromDom(e.dom.ownerDocument)},aa=function(e){return G0(e)?e:$v(e)},Q0=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)},Z0=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},J0=function(e){var t=function(n){return me(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)},hs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},ew=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 X0(e)&&Ne(e.dom.host)},Wv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),tw=X(Wv),kr=Wv?function(e){return k.fromDom(e.dom.getRootNode())}:aa,gs=function(e){return Vv(e)?e:ew(aa(e))},nw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},rw=function(e){return k.fromDom(e.dom.host)},aw=function(e){if(tw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Zt(t)&&iw(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},iw=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)})},qv=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)},ow=function(e,t){en(e,t),at(t,e)},uw=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&&uw(e,t),tt(e)},ti=function(e){var t=qt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return nw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ti,rw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},ia=Kv,sw=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},fw=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)?sw(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=Wt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},lw=function(e){var t=e===void 0?window:e;return Wt().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 lw(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))})})},Dw=function(e){return _w(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:qe,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 zC(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:qe,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:ve,bind:u,exists:Re,forall:qe,toOptional:b.none}},Ow=function(e,t){return e.fold(function(){return ai(t)},sa)},fd={value:sa,error:ai,fromOption:Ow},Pw=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?g(S.fail.map(ld)):y(S.pass.map(ld))})},m=function(h){var y=_._addCacheSuffix(h);je(r,y).each(function(g){var E=--g.count;E===0&&(delete r[y],f(g.id))})},p=function(h){Y(h,function(y){m(y)})};return{load:c,loadAll:d,unload:m,unloadAll:p,_setReferrerPolicy:u}},Uw=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=Uw(),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}(),zw=["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"],Hw=["td","th"],Vw=["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"],qw=["h1","h2","h3","h4","h5","h6"],jw=["li","dd","dt"],Kw=["ul","ol","dl"],Gw=["pre","script","textarea","style"],Gn=function(e){var t;return function(n){return t=t||XC(e,qe),pe(t,Ke(n))}},Xw=Gn(qw),gn=Gn(zw),Yw=function(e){return Ke(e)==="table"},Bs=function(e){return Zt(e)&&!gn(e)},fa=function(e){return Zt(e)&&Ke(e)==="br"},hd=Gn(Ww),_s=Gn(Kw),oi=Gn(jw),Qw=Gn(Vw),uo=Gn(Hw),so=Gn(Gw),Zw=function(e,t,n){return io(e,t,n).isSome()},Ds="\uFEFF",At="\xA0",Jw=function(e){return e===Ds},eS=function(e){return e.replace(/\uFEFF/g,"")},nt=Ds,fo=Jw,Xn=eS,tS=ae,la=Q,ca=function(e){return la(e)&&(e=e.parentNode),tS(e)&&e.hasAttribute("data-mce-caret")},va=function(e){return la(e)&&fo(e.data)},Lt=function(e){return ca(e)||va(e)},gd=function(e){return e.firstChild!==e.lastChild||!$e(e.firstChild)},nS=function(e,t){var n=e.ownerDocument,r=n.createTextNode(nt),a=e.parentNode;if(t){var i=e.previousSibling;if(la(i)){if(Lt(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(Lt(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},rS=function(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e},aS=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(rS());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},iS=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")?(iS(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,oS=_e,uS=$e,sS=Q,fS=Kt(["script","style","textarea"]),Cd=Kt(["img","input","textarea","hr","iframe","video","audio","object","embed"]),lS=Kt(["table"]),cS=Lt,bn=function(e){return cS(e)?!1:sS(e)?!fS(e.parentNode):Cd(e)||uS(e)||lS(e)||Ls(e)},vS=function(e){return ae(e)&&e.getAttribute("unselectable")==="true"},Ls=function(e){return vS(e)===!1&&oS(e)},dS=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Ls(e))return!1;if(yd(e))return!0}return!0},mS=function(e){return Ls(e)?Qt(dn(e.getElementsByTagName("*")),function(t,n){return t||yd(n)},!1)!==!0:!1},pS=function(e){return Cd(e)||mS(e)},vo=function(e,t){return bn(e)&&dS(e,t)},hS=/^[ \t\r\n]*$/,Nr=function(e){return hS.test(e)},gS=function(e,t){var n=k.fromDom(t),r=k.fromDom(e);return Zw(r,"pre,code",G(Te,n))},bS=function(e,t){return Q(e)&&Nr(e.data)&&gS(e,t)===!1},yS=function(e){return ae(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"))},mo=function(e,t){return bn(e)&&bS(e,t)===!1||yS(e)||CS(e)},CS=Zv("data-mce-bookmark"),wS=Zv("data-mce-bogus"),SS=cw("data-mce-bogus","all"),ES=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(SS(r)){r=a.next(!0);continue}if(wS(r)){r=a.next();continue}}if($e(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),ES(e.dom,t)},kS=function(e){return e.nodeName.toLowerCase()==="span"},wd=function(e,t){return Ne(e)&&(mo(e,t)||Bs(k.fromDom(e)))},xS=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 kS(e)&&e.getAttribute("data-mce-type")==="bookmark"},NS=function(e,t){return Q(e)&&e.data.length>0&&xS(e,t)},TS=function(e){return ae(e)?e.childNodes.length>0:!1},AS=function(e){return Es(e)||Ss(e)},$s=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--)$s(e,a[i],r);if(ae(t)){var o=t.childNodes;o.length===1&&Sd(o[0])&&t.parentNode.insertBefore(o[0],t)}return!AS(t)&&!mo(t,r)&&!TS(t)&&!NS(t,r)&&e.remove(t),t},RS=_.makeMap,po=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ho=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BS=/[<>&\"\']/g,_S=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,DS={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={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},OS={"<":"<",">":">","&":"&",""":'"',"'":"'"},PS=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:ho,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:ho,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=RS(e.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?t?a:Ms:i.numeric?xd:kd},$S=function(e){return e.replace(_S,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))):DS[n]||String.fromCharCode(n)):OS[t]||Fs[t]||PS(t)})},Yn={encodeRaw:kd,encodeAllRaw:IS,encodeNumeric:xd,encodeNamed:Ms,getEncodeFunc:LS,decode:$S},Qn={},FS={},da=_.makeMap,ut=_.each,Us=_.extend,Nd=_.explode,MS=_.inArray,rt=function(e,t){return e=_.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())},US=function(e){var t={},n,r,a,i,o,u,s=function(l,c,v){var d,m,p,h=function(g,E){var S={},C,x;for(C=0,x=g.length;C
");return en(n.element,r),Up(r,function(){return tt(r)})},pN=function(e){return Up(k.fromDom(e),ve)},zp=function(e,t,n,r){gN(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(!cN(e,i)){var o=Cs(t).top;n(t,o,r,a),vN(e,i)}},hN=function(e,t,n,r){var a=k.fromDom(e.getBody()),i=k.fromDom(e.getDoc());Sw(a);var o=mN(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,pN(t),r)},gN=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)}},Wp=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)},qp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;Wp(e,t,a,n,r)},jp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;Wp(e,t,a,n,r);var i=lN(n.element),o=Qv(window);i.topo.bottom&&Xv(n.element,r===!0)},bN=function(e,t,n){return zp(e,qp,t,n)},yN=function(e,t,n){return Vp(e,t,qp,n)},CN=function(e,t,n){return zp(e,jp,t,n)},wN=function(e,t,n){return Vp(e,t,jp,n)},SN=function(e,t,n){var r=e.inline?yN:wN;r(e,t,n)},Ai=function(e,t,n){var r=e.inline?bN:CN;r(e,t,n)},EN=function(){return k.fromDom(document)},kN=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=EN()),b.from(e.dom.activeElement).map(k.fromDom)},xN=function(e){return Zf(kr(e)).filter(function(t){return e.dom.contains(t.dom)})},NN=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},TN={create:NN},Jf=Kn.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),AN=function(e,t,n,r){return e.fold(t,n,r)},RN=function(e){return e.fold(Tt,Tt,Tt)},BN=Jf.before,_N=Jf.on,DN=Jf.after,ON={before:BN,on:_N,after:DN,cata:AN,getStart:RN},Ko=Kn.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),PN=function(e){return Ko.exact(e.start,e.soffset,e.finish,e.foffset)},IN=function(e){return e.match({domRange:function(t){return k.fromDom(t.startContainer)},relative:function(t,n){return ON.getStart(t)},exact:function(t,n,r,a){return t}})},LN=Ko.domRange,$N=Ko.relative,FN=Ko.exact,MN=function(e){var t=IN(e);return Fv(t)},UN=TN.create,Gp={domRange:LN,relative:$N,exact:FN,exactFromRange:PN,getWin:MN,range:UN},zN=Wt().browser,Xp=function(e,t){var n=qt(t)?Vf(t).length:jt(t).length+1;return e>n?n:e<0?0:e},HN=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)&&(Wn(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||zN.isIE()},Zp=function(e){return Gp.range(k.fromDom(e.startContainer),e.startOffset,k.fromDom(e.endContainer),e.endOffset)},VN=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 VN(t.dom).filter(el(e))},qN=function(e,t){return b.from(t).filter(el(e)).map(HN)},jN=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},KN=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 qN(k.fromDom(e.getBody()),n)}).bind(jN)},GN=function(e){tl(e).each(function(t){return e.selection.setRng(t)})},XN=function(e){var t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1},Jp={isEditorUIElement:XN},YN=function(e){return e.type==="nodechange"&&e.selectionChange},QN=function(e,t){var n=function(){t.throttle()};xe.DOM.bind(document,"mouseup",n),e.on("remove",function(){xe.DOM.unbind(document,"mouseup",n)})},ZN=function(e){e.on("focusout",function(){Go(e)})},JN=function(e,t){e.on("mouseup touchend",function(n){t.throttle()})},eT=function(e,t){var n=Wt().browser;n.isIE()?ZN(e):JN(e,t),e.on("keyup NodeChange",function(r){YN(r)||Go(e)})},tT=function(e){var t=cf(function(){Go(e)},0);e.on("init",function(){e.inline&&QN(e,t),eT(e,t)}),e.on("remove",function(){t.cancel()})},Ri,nl=xe.DOM,nT=function(e){return Jp.isEditorUIElement(e)},rT=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=fx(e),r=nl.getParent(t,function(a){return nT(a)||(n?e.dom.is(a,n):!1)});return r!==null},aT=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}},iT=function(e,t){var n=t.editor;tT(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,aT(n))&&r===n&&(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Ri||(Ri=function(r){var a=e.activeEditor;a&&aw(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))},oT=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(nl.unbind(document,"focusin",Ri),Ri=null)},uT=function(e){e.on("AddEditor",G(iT,e)),e.on("RemoveEditor",G(oT,e))},sT=function(e,t){return e.dom.getParent(t,function(n){return e.dom.getContentEditable(n)==="true"})},fT=function(e){return e.collapsed?b.from(or(e.startContainer,e.startOffset)).map(k.fromDom):b.none()},lT=function(e,t){return fT(t).bind(function(n){return Qw(n)?b.some(n):Wn(e,n)===!1?b.some(e):b.none()})},eh=function(e,t){lT(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()},cT=function(e){return Kp(e)||xN(e).isSome()},vT=function(e){return e.iframeElement&&Kp(k.fromDom(e.iframeElement))},dT=function(e){var t=e.getBody();return t&&cT(k.fromDom(t))},mT=function(e){var t=kr(k.fromDom(e.getElement()));return Zf(t).filter(function(n){return!rT(n.dom)&&Xo(e,n.dom)}).isSome()},$r=function(e){return e.inline?dT(e):vT(e)},pT=function(e){return $r(e)||mT(e)},hT=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),e.bookmark!==void 0&&$r(e)===!1&&tl(e).each(function(i){e.selection.setRng(i),r=i});var a=sT(e,t.getNode());if(e.$.contains(n,a)){rl(a),eh(e,r),al(e);return}e.inline||(se.opera||rl(n),e.getWin().focus()),(se.gecko||e.inline)&&(rl(n),eh(e,r)),al(e)},al=function(e){return e.editorManager.setActive(e)},gT=function(e,t){e.removed||(t?al(e):hT(e))},th=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)},nh=function(e,t,n){return th(e,t,!0,n,function(r,a){return Math.min(Hv(r),a)})},rh=function(e,t,n){return th(e,t,!1,n,function(r,a){return a>0?a-1:a})},ah=function(e,t){for(var n=e;e&&Q(e)&&e.length===0;)e=t?e.nextSibling:e.previousSibling;return e||n},bT=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=ah(r.nextSibling,!0):r=r.parentNode,o===0?a=ah(a.previousSibling,!1):a=a.parentNode,r&&r===a))?r:n&&n.nodeType===3?n.parentNode:n},yT=function(e,t,n,r){var a,i=[],o=e.getRoot();if(n=e.getParent(n||nh(o,t,t.collapsed),e.isBlock),r=e.getParent(r||rh(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},CT=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})},wT={"#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}},ST=function(e){if(!Nr(e.value))return!1;var t=e.parent;return!(t&&(t.name!=="span"||t.attr("style"))&&/^[ ]+$/.test(e.value))},ih=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,wT[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}(),_T=_.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),DT=function(e){return e.indexOf("data-")===0||e.indexOf("aria-")===0},OT=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:pe(i,s[2])||(o+=1),u=r.lastIndex+f[0].length;break}}return u},PT=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&&PT(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}},IT=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=OT(),r=n.createElement("form");e.fix_self_closing!==!1&&(e.fix_self_closing=!0);var a=e.comment?e.comment:ve,i=e.cdata?e.cdata:ve,o=e.text?e.text:ve,u=e.start?e.start:ve,s=e.end?e.end:ve,f=e.pi?e.pi:ve,l=e.doctype?e.doctype:ve,c=function(d,m){m===void 0&&(m="html");for(var p=d.html,h,y=0,g,E,S=[],C,x,B,L,ne,q,D,ee,U,W,F,V,K,O,j,fe,ge,he=0,We=Yn.decode,Be=_.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),lt=m==="html"?0:1,xt=function(Se){var Ee,Ue;for(Ee=S.length;Ee--&&S[Ee].name!==Se;);if(Ee>=0){for(Ue=S.length-1;Ue>=Ee;Ue--)Se=S[Ue],Se.valid&&s(Se.name);S.length=Ee}},P=function(Se,Ee){return o(ol(Se,d),Ee)},z=function(Se){Se!==""&&(Se.charAt(0)===">"&&(Se=" "+Se),!e.allow_conditional_comments&&Se.substr(0,3).toLowerCase()==="[if"&&(Se=" "+Se),a(ol(Se,d)))},Z=function(Se){return ol(Se,d)},N=function(Se,Ee){var Ue=Se||"",fn=!Sr(Ue,"--"),ln=sl(p,fn,Ee);return Se=p.substr(Ee,ln-Ee),z(fn?Ue+Se:Se),ln+1},$=function(Se,Ee,Ue,fn,ln){if(Ee=Ee.toLowerCase(),Ue=Z(Ee in Fe?Ee:We(Ue||fn||ln||"")),Le&&!ne&&DT(Ee)===!1){var cn=F[Ee];if(!cn&&V){for(var gr=V.length;gr--&&(cn=V[gr],!cn.pattern.test(Ee)););gr===-1&&(cn=null)}if(!cn||cn.validValues&&!(Ue in cn.validValues))return}var Hc=Ee==="name"||Ee==="id";Hc&&Se in _T&&(Ue in n||Ue in r)||Be[Ee]&&!fr.isDomSafe(Ue,Se,e)||ne&&(Ee in Be||Ee.indexOf("on")===0)||(C.map[Ee]=Ue,C.push({name:Ee,value:Ue}))},I=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(),Ce=e.self_closing_elements||t.getSelfClosingElements(),Fe=t.getBoolAttrs(),Le=e.validate,Hn=e.remove_internals,ct=e.fix_self_closing,pt=t.getSpecialElements(),Me=p+">";h=I.exec(Me);){var Ot=h[0];if(yp.length){P(We(p.substr(h.index))),y=h.index+Ot.length;continue}g=g.toLowerCase(),g.charAt(0)===":"&&(g=g.substr(1)),q=g in te,ct&&Ce[g]&&S.length>0&&S[S.length-1].name===g&&xt(g);var ht=IT(J,h[9]);if(ht!==null){if(ht==="all"){y=ul(t,p,I.lastIndex),I.lastIndex=y;continue}ee=!1}if(!Le||(D=t.getElementRule(g))){if(ee=!0,Le&&(F=D.attributes,V=D.attributePatterns),(W=h[9])?(ne=W.indexOf("data-mce-type")!==-1,ne&&Hn&&(ee=!1),C=[],C.map={},W.replace(J,function(Se,Ee,Ue,fn,ln){return $(g,Ee,Ue,fn,ln),""})):(C=[],C.map={}),Le&&!ne){if(K=D.attributesRequired,O=D.attributesDefault,j=D.attributesForced,fe=D.removeEmptyAttrs,fe&&!C.length&&(ee=!1),j)for(x=j.length;x--;)U=j[x],L=U.name,ge=U.value,ge==="{$uid}"&&(ge="mce_"+he++),C.map[L]=ge,C.push({name:L,value:ge});if(O)for(x=O.length;x--;)U=O[x],L=U.name,L in C.map||(ge=U.value,ge==="{$uid}"&&(ge="mce_"+he++),C.map[L]=ge,C.push({name:L,value:ge}));if(K){for(x=K.length;x--&&!(K[x]in C.map););x===-1&&(ee=!1)}if(U=C.map["data-mce-bogus"]){if(U==="all"){y=ul(t,p,I.lastIndex),I.lastIndex=y;continue}ee=!1}}ee&&u(g,C,q)}else ee=!1;if(E=pt[g]){E.lastIndex=y=h.index+Ot.length,(h=E.exec(p))?(ee&&(B=p.substr(y,h.index-y)),y=h.index+h[0].length):(B=p.substr(y),y=p.length),ee&&(B.length>0&&P(B,!0),s(g)),I.lastIndex=y;continue}q||(!W||W.indexOf("/")!==W.length-1?S.push({name:g,valid:ee}):ee&&s(g))}else if(g=h[1])z(g);else if(g=h[2]){var _n=lt===1||e.preserve_cdata||S.length>0&&t.isValidChild(S[S.length-1].name,"#cdata");if(_n)i(g);else{y=N("",h.index+2),I.lastIndex=y;continue}}else if(g=h[3])l(g);else if((g=h[4])||Ot==="=0;x--)g=S[x],g.valid&&s(g.name)},v=function(d,m){m===void 0&&(m="html"),c(ET(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,"")},uh=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)},$T=uh,FT=function(e,t){var n=ft(e),r=new RegExp("^(<"+n+"[^>]*>( | |\\s|\xA0|
|)<\\/"+n+`>[\r diff --git a/public/js/build/TaskDetail.17c1ee52.js b/public/js/build/TaskDetail.93d4eeab.js similarity index 99% rename from public/js/build/TaskDetail.17c1ee52.js rename to public/js/build/TaskDetail.93d4eeab.js index 667d56c28..5e42e0038 100644 --- a/public/js/build/TaskDetail.17c1ee52.js +++ b/public/js/build/TaskDetail.93d4eeab.js @@ -1 +1 @@ -import{n as l,b as m,m as p}from"./app.2ab5f89e.js";import f from"./TEditor.c448a662.js";import{P as k,T as _}from"./ProjectLog.c251a416.js";import{C as v,D as g}from"./DialogWrapper.28dee207.js";import{T as b}from"./TaskMenu.6d52fdca.js";import{U as D}from"./UserSelect.c1d7840d.js";var w=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")},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,tooltipDisabled:""}}),t._l(a,function(o,n){return e("div",{key:n,staticClass:"list-task clearfix"},[e("div",{staticClass:"list-task-info"},[e("span",[t._v("["+t._s(o.project_name)+"] ")]),e("span",[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 y={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 A=l(y,w,C,!1,L,null,null,null);function L(t){for(let s in c)this[s]=c[s]}var x=function(){return A.exports}(),T=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}})},I=[];const S={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 F=l(S,T,I,!1,E,null,null,null);function E(t){for(let s in h)this[s]=h[s]}var O=function(){return F.exports}(),M=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("div",{staticClass:"desc"},[e("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0..."),"scroll-hide-operate-class-name":"task-modal",inline:""},on:{"on-blur":function(a){return t.updateBlur("content")}}})],1),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.is_all_visible>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.is_all_visible==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.is_all_visible==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.is_all_visible==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.is_all_visible==1?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.taskDetail.is_all_visible==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._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{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"},[e("div",{staticClass:"time",on:{click:t.openTime}},[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")]),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")]),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")]),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...")},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)}}})],1):t._e()},j=[];const P={name:"TaskDetail",components:{UserSelect:D,TaskExistTips:x,ChatInput:v,TaskMenu:b,ProjectLog:k,DialogWrapper:g,TaskUpload:O,TaskPriority:_,TEditor:f},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,taskPlugins:["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"],taskOptions:{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},taskOptionFull:{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 | codesample | preview screenload"},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:{}}},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=m.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...p(["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.is_all_visible<=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.is_all_visible=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_is_all_visible;this.taskDetail.is_all_visible=s>2?1:s||1,this.taskDetail.is_all_visible<3&&this.updateVisible()}},dropVisible(t){switch(t){case 1:case 2:this.taskDetail.is_all_visible=t,this.updateVisible();break;case 3:this.taskDetail.old_is_all_visible=this.taskDetail.is_all_visible,this.taskDetail.is_all_visible=t,this.$nextTick(()=>{this.$refs.visibleUserSelectRef.onSelection()});break}},updateVisible(){this.updateData(["is_all_visible","visibility_appointor"])}}},u={};var z=l(P,M,j,!1,H,null,null,null);function H(t){for(let s in u)this[s]=u[s]}var W=function(){return z.exports}();export{x as T,W as a}; +import{n as l,b as m,m as p}from"./app.6fb8fe77.js";import f from"./TEditor.116bbeaa.js";import{P as k,T as _}from"./ProjectLog.9bfebf4b.js";import{C as v,D as g}from"./DialogWrapper.7e5c06a5.js";import{T as b}from"./TaskMenu.61d4b7dc.js";import{U as D}from"./UserSelect.4fa9cbd2.js";var w=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")},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,tooltipDisabled:""}}),t._l(a,function(o,n){return e("div",{key:n,staticClass:"list-task clearfix"},[e("div",{staticClass:"list-task-info"},[e("span",[t._v("["+t._s(o.project_name)+"] ")]),e("span",[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 y={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 A=l(y,w,C,!1,L,null,null,null);function L(t){for(let s in c)this[s]=c[s]}var x=function(){return A.exports}(),T=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}})},I=[];const S={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 F=l(S,T,I,!1,E,null,null,null);function E(t){for(let s in h)this[s]=h[s]}var O=function(){return F.exports}(),M=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("div",{staticClass:"desc"},[e("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0..."),"scroll-hide-operate-class-name":"task-modal",inline:""},on:{"on-blur":function(a){return t.updateBlur("content")}}})],1),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.is_all_visible>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.is_all_visible==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.is_all_visible==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.is_all_visible==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.is_all_visible==1?e("span",{staticClass:"visibility-text",on:{click:t.showCisibleDropdown}},[t._v(t._s(t.$L("\u9879\u76EE\u4EBA\u5458\u53EF\u89C1")))]):t.taskDetail.is_all_visible==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._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{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"},[e("div",{staticClass:"time",on:{click:t.openTime}},[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")]),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")]),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")]),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...")},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)}}})],1):t._e()},j=[];const P={name:"TaskDetail",components:{UserSelect:D,TaskExistTips:x,ChatInput:v,TaskMenu:b,ProjectLog:k,DialogWrapper:g,TaskUpload:O,TaskPriority:_,TEditor:f},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,taskPlugins:["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"],taskOptions:{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},taskOptionFull:{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 | codesample | preview screenload"},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:{}}},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=m.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...p(["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.is_all_visible<=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.is_all_visible=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_is_all_visible;this.taskDetail.is_all_visible=s>2?1:s||1,this.taskDetail.is_all_visible<3&&this.updateVisible()}},dropVisible(t){switch(t){case 1:case 2:this.taskDetail.is_all_visible=t,this.updateVisible();break;case 3:this.taskDetail.old_is_all_visible=this.taskDetail.is_all_visible,this.taskDetail.is_all_visible=t,this.$nextTick(()=>{this.$refs.visibleUserSelectRef.onSelection()});break}},updateVisible(){this.updateData(["is_all_visible","visibility_appointor"])}}},u={};var z=l(P,M,j,!1,H,null,null,null);function H(t){for(let s in u)this[s]=u[s]}var W=function(){return z.exports}();export{x as T,W as a}; diff --git a/public/js/build/TaskMenu.6d52fdca.js b/public/js/build/TaskMenu.61d4b7dc.js similarity index 96% rename from public/js/build/TaskMenu.6d52fdca.js rename to public/js/build/TaskMenu.61d4b7dc.js index b35c71573..98701108e 100644 --- a/public/js/build/TaskMenu.6d52fdca.js +++ b/public/js/build/TaskMenu.61d4b7dc.js @@ -1 +1 @@ -import{m as i,a as n,n as l}from"./app.2ab5f89e.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,a as n,n as l}from"./app.6fb8fe77.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.c1d7840d.js b/public/js/build/UserSelect.4fa9cbd2.js similarity index 99% rename from public/js/build/UserSelect.c1d7840d.js rename to public/js/build/UserSelect.4fa9cbd2.js index f8718751a..d93f0b5e6 100644 --- a/public/js/build/UserSelect.c1d7840d.js +++ b/public/js/build/UserSelect.4fa9cbd2.js @@ -1 +1 @@ -import{m as r,n}from"./app.2ab5f89e.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,"tooltip-disabled":""}})],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.loadIng>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")]):t("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t("UserAvatar",{attrs:{userid:s.userid,"tooltip-disabled":""}})],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")]):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":"","tooltip-disabled":""}})],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},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)},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.$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.6fb8fe77.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,"tooltip-disabled":""}})],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.loadIng>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")]):t("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t("UserAvatar",{attrs:{userid:s.userid,"tooltip-disabled":""}})],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")]):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":"","tooltip-disabled":""}})],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},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)},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.$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.2d4b066a.css b/public/js/build/app.262cb6d2.css similarity index 99% rename from public/js/build/app.2d4b066a.css rename to public/js/build/app.262cb6d2.css index 5cba05f6e..c73fd3d4e 100644 --- a/public/js/build/app.2d4b066a.css +++ b/public/js/build/app.262cb6d2.css @@ -1,4 +1,4 @@ -@charset "UTF-8";@font-face{font-family:iconfont;src:url(/js/build/iconfont.01196938.eot?t=1576231776697);src:url(/js/build/iconfont.01196938.eot?t=1576231776697#iefix) format("embedded-opentype"),url(data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABBoAAsAAAAAH4gAABAXAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHNAqrGKENATYCJAOBAAtCAAQgBYRtB4I0G3MZM6M2lLTSTfZfJ3BzyOqYZkDBRZ2HprCitPZ3M8J36RIFoV+G+/sYnCYldv0I8xP3uCYjaM7/PYldjAhiEUzzMA2QIPZTSUVTap7SplSDVS1QFajwRBw61IQgv72KhZq8zPfO2kzlgJkk7T4iPTP9Ao/snqj1ZwI+AR+pnFgdsb1FKrikLeIB0AABBLNBwG3sJrh0YieT5piEFlvapTXhESZVxn7z1XMwlGSPvV8g5XsAQOD//62ldqfIqjJ5W5yyMH0RqkLWyJ0JDl3vH2ZCvMHdEpDKq5AV6vZCeyUCDyhMhanQFUJUSF+D5awMrAmEpUSMBqL+u96FgQDAQCUGYXgvHww+aDBOYL4ZcfI48GNh0DlDCfADXM0JaRCbioNPrl47gI3q6xMPkBAfIMGhwC7KNMk4AXqWejiMsp9gM2WP1KcBvJwIoADEAGiA1GkriShQPotRgtEV0vgv/nw0aIhYmpWyISIlSpGpmC1lR7A2toZtsMlp11jXnb47j+64Hg5zn6UsUfjoZBmKutd1v9rr4fphDQRixHGUMDpJirTuWd1zkP6/4AFKBLx5ISGFJwr+FLjwIISKCGIwCCRHgwMJBOCBjwA+fPmRUQPBBeYVAQDRQBvVwFICgxJYGgMBsFIM3sCGYPACNhwDCbARHF8yEhg8gU3EQAFsMgZ/YFMwKIDNwMAF2EwMHsAWAYSQxQCoIEsBEEGOAEAMaQOAgawBIBCyDgA5ZD0ANGQDABzITQBIIE8DIIC8CgAP8hoAfEgXMATAnT6Aj5IPAfCFfASAH6QLGGTwcNgSUAMAjTyBHsAsgPtJgC8GU++pILhNgQSfWmA0EEeRuu4EY14UN4/qGZcT5UhhGA+RzF1SKhUR4hBC68GmUDSfJxZ70tpH5uMJtAFv8k3IHkwQsbghCBGyO1rAEch8KV/ADNGEcnmltkOGKDqMSyXPTB0/f1gqqQ2GOhqiJgftys1wX+tg4SHhrzbqdj3PXQi/2m47jteF30zc/s3hA4btyn6r4/K6TDjNfkX8BZ51Du7ZDf/91en8caT7+06wdx/477cLWrE5JJ5vTUwUGoNjmfpWYWpMj3EjIa2djJquyNcCw/FkoZLVDe/crk7HlF2v3TZYaEO48Z1w1PX2/IHu2BudBRCCYtWvBRVSHgdpaN+n+n7rv7jBDQ41V3FSplXfmsIQFb4MONEnSxwYa4X9U0G67cNIpow0Wh0SzdewKnxLu1VOxbIVnAhqMHornbxVT0WyjfE9pdbQaK7Z+5oiSasw6tdwT1ABCOUhgLAB18k2I80+hAGCwnOPrbkI9MCNCKLYKXcZ/TjoQr+DKJrnBcZTsnHIVYM2IKHdls8KKdCbGp/gempUeVCNKPsiarRXiao7c1VaTpGsEWMZkK0EtaF+zozL/C5XUN1mc6qluTG8qp3ZRtDym7Tu9lABY77EyYCDOGGbSaX751iDcb86IXmrDLwE0OIqWKdHSLsjDVHThTg6e4hoZ0W1836P0nv3Sb9K9d17BS0TY89uRiqBtW8PD2r+uXx1QRH6ltVfNulEDoj+Tjm1OVOZHyxye8FtRMNx4u4SAx8MTWuMkQ4+KV/0Fm8XcxAikH13HgPEKC3sOv3jJfQPSis/NF8bGI8jOIpL/ZXB2cGcB5Z1ZUiOX1iO6uuYrghzg0A0c+naMI6D9DpkvdhphTJ9kdKwGkirDAkBUR5wsCOzDBCmo0JKjNunC1wOIoTbEZD+VCiMAURVWa4nDe1Uln4k54baR4hyhhCcUo33BZUwOqTO9uGIEu3sckJb9ZOAtBpUQIyUJ2wTFL+KLQjgHRCBXRiiowDDHW0vkLDrou0JF3AhCp2uQNv7oSZ/Zq8HJE+5VVSctLt8fbKj7qvd2K24Qljenm39DVKnTb/V54W3JQ4A16ajoC9ROEBhrRiupOO7TmnIt97OMqPbDs+Wd9Bq3vJckauVDIeTrXR126kpctY2WSpk9c2MHRO6XQ9XNLsrPWmuiIwVEqcdeCff1qG2zYzl3PJa3eWNcJmju/52k6wPlzQPrZSiQcZqLufWSkeANGW5t5zLe9SIPBNL1x4h9GWuIMQC46ZamifvFawQbH8TO9I0rWsNNjFoVxBYXmmJLzzjwApSTHhfP6YHrnT8ys8LlM0drRhLRqdJw6g4b54gcvmn+YmBX04ilmmEBR3wyJmoOKTz/7x2u72tOTTFq0y9YyvkJUtybl4LBb35iRHt5/TO+DOA/KGyNL40uZIiKaYvcjlOuvqIwScG1qSjFgfIfbLP6jMG8vOVPAijNL4AiM50bvAUmVSewIpmDqY1Wgcx0sAJqIgdRzrDwEEq9Ju9VwQ9uMGVQNYXahAuP79e5t78jSnVz8fdegMM8RyCb4a6viUlDgoko9Oi2TvWJofjwsQrQLviVhXtZw2YRlAB6J0fh8Wmho2cPr1dBSM3lCjc80GaD03EtTI11wPiQgXYsgRhNYuWASCFtPZOvTBqoNYTaO53H3b2Pdh5VsbHPrh06uYJD41afQ2dV1Ox53dGN6P3433qG3c4d93jvbLy4orHh6+df55b8kmvfHzFxbpnQKQHfUt5p1ImhA00zzRHfBFBLeQs4K1jFm7S5kVGDh0dNpRzCknDOjKzMjPPMVSR8n9r2tpnHEdHqOcoUjLUuUxWntVRyE92lLRftK3NINwmNLSpJfx/lbqsLqlV/p6q99SoaurrHSJ5YM2MGS5Xdr9M5CiwMO5fmMVsaY6LExZNNJvZtleQvnnPbCGYI7YnO58kSaS3nyzqAk6aunXdMQiaQJ1VPXNKS318EJljpwvbcyZxP/Jv0Rr4FOrVA/O4TJenp8KY3yDiW32/CpT5O37iS7orQBHVrJikbKa+wc0qr6jUKoH+W04U/Z3n357tnitXIiN/Q7Fdxj/Ml9kdl+An30RfEVVTAFNdmYZL2bHO9hmKfVZc6tf3L+8P6r/8ImBfnft2F7nL3MMDLo7qH32ueDL2GHUa2aRRJQNKhxQP9ZPJkM8xKUeYiysMlfqBkp/ph/pRy+0jRhoGjTQpq4hZ44bO3F69flKagSubojZwoN20wblhcHB18Kvjzg3O5OP+L1ofcTviOriSK1+8/OKK5PV60MpWzqjxrNn016KlnTs6ly66lb7Gc1H5VCYxhbvP1I/ireJ9J7JVB8mtyhbdKF2L8jvnaeBIyan0U7fDY5/dzB9VUTl8YMkgS7JbT8fei73VnWtfPndj2ewwaomyxJhzU08hxVQZzxpbVENU33jDJqlaRrSqJj73b1RmFWSnihoHU1Kaigw2kCrfQvKZP1fmGnSnqNpStG3+MwkvOlFHaH2N5LNonqTPzClC0rjV69oe+zxuk2/q2SlVKRGdwivDr3Dzfq+V8Hz69UaykNT1+vA8TprylNt/P/DHqs5x6uHq2Z2r/9z0W6NyK5NXfyAjtTChQd7W0NNW9lPPvJ95TH31jq3zhTSytHavdq9QIWKQFL4XuFKmXeAhtqmUIfXmZL/edJN5/RrdFH4tSuZ9R9n+mKud+WZTu1KKTiubkaps4mydXiG1JEXyOlVO0X5Ml/XXwZpCaadNLBW0byIxTWj2HK+/3it87M0vACmTm4KDSdEzLM2vOmLmOKzRu0UszatqHbUZmmB+rbZF49C2uhjVCfXewBMqZ5bT4VTCcdOhgH9lkX9v79pevmM6JoNaQMMIQ7dyq3Obc3vqX45upCDy6GZ6Ig6QXdu6nm4zu6+YP1OZpvzv0pMnhkC7bN+BIGXS8OHruLxgRZz36JKSRB5x+zYIbLuvd5dwO1jXu4upURy4O30Gb6IUC0Nsiij5ypBVMmWUxvY7RBPlgVYWKmyh2oShK6FuFq50tq/yW/XndFgI3qo/vuDzruKSn3DFJK3mERZHrt9KSxVnwOHtZU/GZQ5b2Jh580+7h2x2UMG86mNW6sZZyrra909Ktg0qqJ6Xk38qJy8/91Re7qsjKfk6kZ/zFM2pzvnEaoeVevADZa2pNg0GzvXCfX1xersSyI88TkzTtyh0ZkrRQtcnPt6wYfDgdqPxbppzrA0bHifW04oWyqxrUejT9K2NRrrCguZml9wbQmq8Ipbt59QVdG1Y/9w3wlRmpPl9twpTRNIjA95esJ+z4Ai04c61zLT1XQV1nHhDFHZWtFTogXRTxQzRtz9NkFyLzs4Jcpt8hkLklSit2CNK5Yv3iPV3tOSnbxMrsnu+XPfVLZvS1v7/Jcd7cjzyCrsH7zeXFzWdQq3gW4x6p7Y447os0tkV5/QyqL0jYac3CGhaWPL+FbdW+v1UNdnsTZHB30c2xBy6utz/Q6tU2Lt/LhtWJgr2rFt2FvvztIxn2/dvIgyhg7T1yrkBOiZtGZgJq0S8pdbfOwN++vWKmnF69YmCJU1Nk7Z8+pM9TuLtsds8fq75P44PWfCzq2O9XYHU8d6P/BL9a/wT/eS5zzoJcbqYlJyRkOJdOd8CRj3aLGcwZNgq3yCfJvmvYqIN0l/NTT6xu9/cX3TiWOjg1cd3nwvkBJsCxf8s0EocXp/zRWrfvk+k8cLJy5t9muvr5swGGRmYkrza/kabNJrZ83aYVu3eNZW/CvhooMuPeEn4WRK5kdxES5RK/TZtmU02Xx4lny97/pdilUIpDMXD00iX8hJNuZZE3lKpZpXikimatkqsFcGXSCuWIuFwdW7uyK1D4kODLl38t+n8gn+x3M0Wcb9U2FOkX2cdhXVfPtNzzxCNB1AXqLQZesgNc7j/U+QZFxm29kHKSY0h6KmQYPiI4auhc4ePG14spLhlhu8c8Qt/JT7rQyHFEG0efoOGNz6kBLRwLbka/jP5YHgXeX64HXHwwuHrvtp9dghG+i2fSCj+nE/bqJ+5y+Q8rGwPN2zq51+V9cLh/2m2uu6bRVW4D9IYRzX4IB9MSDyIFHSrG9HfOSyi2ecGFjuAKIMwBzTWItJAAmDCWW6Uyjn7rDytsx7ZKs/QJMFDoEmBjxBE94wxORAiyeSCj1yTQbSikwuhYAUFghYAiNLomAQ8nDFJSPAjo3Q9OxiNnl0mB14e5XExMIr+Y6cUOEMhwjbXv3wR6AKr2qeKhpNzY2Xpzf8JX0kLyXnq7BeSIyd13B1+mz+QIHWkyDd/KsUpJ9ypd8cHRKx64QtM2QU09ef93r1dxc5w1yybF4EusEr7lNNGw8kdvixTX/4TvpKWnNV+TfsLyfHolaOdgwX6EMlqtX1ZNN/8SSHaKbGscKe8Ew3iDaz0+rYuMGUnlLD7sz3ZnLMVu/ZVd2QUNuIa2EerSSBRaAwWhycQSWRKKmoaWjp6BkYmZhZWNnYOTi5unmLY2bHA8rgmyzMTYK6wG3WXt05TxqwX3CLuQ04jdm5u+Z6ItR23THbihWs/ip1flj53yJZiwsQQZ0xj0RTNnG8QzRTLwBL/OSWalIAOk7/KRVYU3ZK5J7QMK40NW4zfPK9LV4myESBZoZjMapY6ZFrWvnG2bXGOcdY3LPo627blR9MAAAAA) format("woff2"),url(/js/build/iconfont.5e0c4d21.woff?t=1576231776697) format("woff"),url(/js/build/iconfont.eb7e69a1.ttf?t=1576231776697) format("truetype"),url(/js/build/iconfont.7bf1e2b0.svg?t=1576231776697#iconfont) format("svg")}.iconfont[data-v-7c98e74e]{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-md[data-v-7c98e74e]:before{content:"\e604"}.icon-redo[data-v-7c98e74e]:before{content:"\e627"}.icon-undo[data-v-7c98e74e]:before{content:"\e633"}.icon-checked[data-v-7c98e74e]:before{content:"\e683"}.icon-checked-false[data-v-7c98e74e]:before{content:"\e684"}.icon-preview[data-v-7c98e74e]:before{content:"\e63a"}.icon-on[data-v-7c98e74e]:before{content:"\e6d8"}.icon-off[data-v-7c98e74e]:before{content:"\e6d9"}.icon-download[data-v-7c98e74e]:before{content:"\e6ae"}.icon-bold[data-v-7c98e74e]:before{content:"\e677"}.icon-group[data-v-7c98e74e]:before{content:"\e647"}.icon-img[data-v-7c98e74e]:before{content:"\e64a"}.icon-under-line[data-v-7c98e74e]:before{content:"\e65a"}.icon-close[data-v-7c98e74e]:before{content:"\e690"}.icon-italic[data-v-7c98e74e]:before{content:"\e628"}.icon-overline[data-v-7c98e74e]:before{content:"\e63b"}.icon-horizontal[data-v-7c98e74e]:before{content:"\e7f0"}.icon-theme[data-v-7c98e74e]:before{content:"\e682"}.icon-quote[data-v-7c98e74e]:before{content:"\e636"}.icon-table[data-v-7c98e74e]:before{content:"\e603"}.icon-clear[data-v-7c98e74e]:before{content:"\e629"}.icon-ul[data-v-7c98e74e]:before{content:"\e624"}.icon-code[data-v-7c98e74e]:before{content:"\e60f"}.icon-link[data-v-7c98e74e]:before{content:"\e7e2"}.icon-fullscreen[data-v-7c98e74e]:before{content:"\e7ec"}.icon-quite[data-v-7c98e74e]:before{content:"\e7ed"}.icon-daoru[data-v-7c98e74e]:before{content:"\e635"}.icon-ol[data-v-7c98e74e]:before{content:"\e6f0"}.icon-upload-img[data-v-7c98e74e]:before{content:"\e679"}.icon-save[data-v-7c98e74e]:before{content:"\e648"}.icon-check-box[data-v-7c98e74e]:before{content:"\ec58"}.markdown[data-v-7c98e74e]{overflow:hidden;position:relative;margin:0;padding:0;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;flex-direction:column;background:#f7f7f7}.markdown.border[data-v-7c98e74e]{border:1px solid #d9d9d9}.markdown *[data-v-7c98e74e]{margin:0;padding:0;box-sizing:border-box}.markdown.fullscreen[data-v-7c98e74e]{position:fixed;z-index:999999;top:0;left:0;right:0;bottom:0;height:100%!important;width:100%;border:none}.markdown.fullscreen .markdown-content[data-v-7c98e74e]{padding:10px 0 0}.markdown .markdown-toolbars[data-v-7c98e74e]{width:100%;display:block;list-style:none;background:#fff;color:#6a6f7b;cursor:pointer;padding-left:4px;border-bottom:1px solid #d9d9d9}.markdown .markdown-toolbars>li[data-v-7c98e74e]{float:left;position:relative;cursor:pointer;margin:0;line-height:normal;min-height:auto}.markdown .markdown-toolbars>li[data-v-7c98e74e]:after{display:block;content:attr(name);position:absolute;z-index:999999999999;top:32px;left:20px;background:#000;color:#fff;white-space:nowrap;font-size:12px;line-height:28px;padding:0 6px;transition:all .3s .1s;transform:scale(0);opacity:0;transform-origin:top;border-radius:2px}.markdown .markdown-toolbars>li[data-v-7c98e74e]:hover:after{transform:scale(1);opacity:1}.markdown .markdown-toolbars>li[data-v-7c98e74e]:last-child:after{right:20%;left:auto}.markdown .markdown-toolbars>li .title[data-v-7c98e74e]{font-size:16px!important}.markdown .markdown-toolbars>li .icon-svg[data-v-7c98e74e]{display:flex;align-items:center;justify-content:center}.markdown .markdown-toolbars>li.right[data-v-7c98e74e]{float:right}.markdown .markdown-toolbars>li.right>ul[data-v-7c98e74e]{list-style:none}.markdown .markdown-toolbars>li.right>ul>li[data-v-7c98e74e]{line-height:normal;float:left}.markdown .markdown-toolbars span[data-v-7c98e74e]{font-size:18px;color:#999;cursor:pointer;display:block;width:30px;height:30px;border-radius:3px;line-height:30px;text-align:center}.markdown .markdown-toolbars span[data-v-7c98e74e]:hover{background:#f7f7f7;color:#1890ff}.markdown .markdown-toolbars .title[data-v-7c98e74e]{padding-left:4px;padding-right:10px}.markdown .markdown-toolbars li:last-child span[data-v-7c98e74e]{font-size:20px!important;margin-right:4px}.markdown .markdown-toolbars .shift-theme[data-v-7c98e74e],.markdown .markdown-toolbars .export-file[data-v-7c98e74e]{height:46px;position:relative;display:flex;justify-content:center;align-items:center}.markdown .markdown-toolbars .shift-theme span[data-v-7c98e74e],.markdown .markdown-toolbars .export-file span[data-v-7c98e74e]{padding:0 8px;transition:all .3s;font-size:18px;display:inline-block;line-height:32px}.markdown .markdown-toolbars .shift-theme span[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file span[data-v-7c98e74e]:hover{color:#0084ff;background:#f7f7f7;border-radius:3px}.markdown .markdown-toolbars .shift-theme ul[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul[data-v-7c98e74e]{transform:scale(0);transition:all .3s;left:-50%;top:40px;width:160px;transform-origin:top center;list-style:none;margin:0;padding:6px 0;box-sizing:border-box;border:1px solid #d9d9d9;background:#fff;border-radius:4px;position:absolute;z-index:9999999;box-shadow:0 2px 8px #0000001a}.markdown .markdown-toolbars .shift-theme ul.active[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul.active[data-v-7c98e74e]{opacity:1;transform:scaleY(1)}.markdown .markdown-toolbars .shift-theme ul li[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li[data-v-7c98e74e]{line-height:30px;padding:0 12px;font-size:13px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;align-items:center;color:#262626}.markdown .markdown-toolbars .shift-theme ul li .iconfont[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li .iconfont[data-v-7c98e74e]{font-size:14px;display:block;height:30px;width:30px;line-height:30px;overflow:hidden}.markdown .markdown-toolbars .shift-theme ul li .iconfont[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file ul li .iconfont[data-v-7c98e74e]:hover{color:#262626}.markdown .markdown-toolbars .shift-theme ul li i[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li i[data-v-7c98e74e]{font-size:13px;display:block;font-style:normal;flex:1;white-space:normal}.markdown .markdown-toolbars .shift-theme ul li[data-v-7c98e74e]:last-child,.markdown .markdown-toolbars .export-file ul li[data-v-7c98e74e]:last-child{border-bottom:0}.markdown .markdown-toolbars .shift-theme ul li:last-child .iconfont[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li:last-child .iconfont[data-v-7c98e74e]{font-size:14px!important;margin:0!important}.markdown .markdown-toolbars .shift-theme ul li[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file ul li[data-v-7c98e74e]:hover{background:#f7f7f7}.markdown .markdown-toolbars .shift-theme ul li.disabled[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li.disabled[data-v-7c98e74e]{cursor:not-allowed;color:#bbbec4}.markdown .markdown-toolbars .shift-theme ul li.disabled[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file ul li.disabled[data-v-7c98e74e]:hover{background:transparent}.markdown .markdown-toolbars .import-file[data-v-7c98e74e]{position:relative}.markdown .markdown-toolbars .import-file input[data-v-7c98e74e]{position:absolute;z-index:9999;left:0;top:0;display:block;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}.markdown .markdown-toolbars .import-file:hover span[data-v-7c98e74e]{background:#f7f7f7;color:#1890ff}.markdown .markdown-toolbars .import-file[data-v-7c98e74e]:hover:after{transform:scale(1);opacity:1}.markdown .close-preview[data-v-7c98e74e]{position:absolute;z-index:999;right:0;top:0;height:40px;width:40px;display:flex;justify-content:center;align-items:center;cursor:pointer;color:#262626}.markdown .close-preview span[data-v-7c98e74e]{font-size:22px}.markdown .close-preview span[data-v-7c98e74e]:hover{color:#262626}.markdown .markdown-content[data-v-7c98e74e]{flex:1;width:100%;display:flex;justify-content:space-between;position:relative;overflow:hidden;padding-bottom:0}.markdown .markdown-content .markdown-editor[data-v-7c98e74e]{flex:1;height:100%;position:relative;margin:0!important;overflow:hidden;overflow-y:scroll;display:flex;justify-content:space-between;background:#2d2d2d}.markdown .markdown-content .markdown-editor[data-v-7c98e74e]::-webkit-scrollbar{display:none}.markdown .markdown-content .markdown-editor .index[data-v-7c98e74e]{background:#272727;min-height:100%;width:36px;line-height:22px;padding:12px 0}.markdown .markdown-content .markdown-editor .index li[data-v-7c98e74e]{background:#272727;color:#ccc;font-size:14px;text-align:center;font-family:Consolas}.markdown .markdown-content .markdown-editor textarea[data-v-7c98e74e]{width:100%;min-height:100%;outline:none;border:0;background:#2d2d2d;line-height:22px;caret-color:#ccc;color:#669acc;font-size:14px;font-family:Consolas;resize:none;padding:12px 8px;overflow:hidden;white-space:nowrap;overflow-x:auto}.markdown .markdown-content .markdown-editor textarea[data-v-7c98e74e]::-moz-selection{background:#999;color:#0084ff}.markdown .markdown-content .markdown-editor textarea[data-v-7c98e74e]::selection{background:#999;color:#0084ff}.markdown .markdown-content .codemirror[data-v-7c98e74e]{flex:1;width:0;height:100%;overflow:auto}.markdown .markdown-content .markdown-preview[data-v-7c98e74e]{flex:1;width:0;height:100%}.markdown ul.toc-anchor[data-v-7c98e74e]{max-width:260px;min-width:150px;background-color:#f6f8fa;border-left:2px solid #dcdfe6;overflow:auto}.markdown ul.toc-anchor li.toc-anchor-item[data-v-7c98e74e]{cursor:pointer;padding:6px 16px;font-size:12px;line-height:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.markdown ul.toc-anchor li.toc-anchor-item span[data-v-7c98e74e]{color:#333;opacity:.8}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-2[data-v-7c98e74e]{padding-left:16px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-3[data-v-7c98e74e]{padding-left:32px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-4[data-v-7c98e74e]{padding-left:48px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-5[data-v-7c98e74e]{padding-left:64px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-action[data-v-7c98e74e]{color:#2b85e4;opacity:1}.markdown ul.toc-anchor li.toc-anchor-item[data-v-7c98e74e]:first-child{padding-top:16px}.markdown ul.toc-anchor li.toc-anchor-item:hover span[data-v-7c98e74e]{opacity:1}.insert-img-model[data-v-7c98e74e]{position:fixed;left:0;top:0;right:0;bottom:0;z-index:99999;background:rgba(0,0,0,.3);padding-top:12%;transition:all .3s;opacity:0;display:none}.insert-img-model .model-container[data-v-7c98e74e]{background:#fff;width:480px;margin:0 auto;border-radius:4px;transition:all .3s;transform:scale(0);transform-origin:center}.insert-img-model .model-container .model-head[data-v-7c98e74e]{line-height:32px;padding:0 12px;background:#f7f7f7;border-radius:4px 4px 0 0;box-shadow:0 1px 2px #d9d9d9;display:flex;justify-content:space-between}.insert-img-model .model-container .model-head span[data-v-7c98e74e]:nth-of-type(2){font-size:14px;padding-left:12px;cursor:pointer}.insert-img-model .model-container .model-head span[data-v-7c98e74e]:nth-of-type(2):hover{color:#ed3f14}.insert-img-model .model-container .model-content[data-v-7c98e74e]{padding:0 12px 20px;min-height:180px}.insert-img-model .model-container .model-content .insert-url[data-v-7c98e74e]{padding:42px 0;display:flex;justify-content:space-between;align-items:center}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]{display:block;border:1px solid #ccc;font-size:14px;padding:4px 8px;line-height:24px;color:#333;background:#fff;border-radius:4px;writing-mode:horizontal-tb;text-rendering:auto;transition:box-shadow 2s;flex:1}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]:focus{border-color:#1890ff}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]::-moz-placeholder{color:#c1c1c1}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]::placeholder{color:#c1c1c1}.insert-img-model .model-container .model-content .insert-url a[data-v-7c98e74e]{display:block;background:#1890ff;color:#fff;line-height:32px;height:32px;font-size:13px;padding:0 12px;border-radius:3px;margin-left:20px;border:1px solid #d9d9d9;transition:all .3s}.insert-img-model .model-container .model-content .insert-url a[data-v-7c98e74e]:hover{background:#0169af}.insert-img-model .model-container .model-content .insert-local[data-v-7c98e74e]{height:120px;border:1px dashed #d9d9d9;border-radius:4px;transition:all .3s;position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer}.insert-img-model .model-container .model-content .insert-local span[data-v-7c98e74e]{font-size:40px;color:#d9d9d9;line-height:50px;transition:all .3s}.insert-img-model .model-container .model-content .insert-local p[data-v-7c98e74e]{font-size:14px;color:#262626;transition:all .3s}.insert-img-model .model-container .model-content .insert-local[data-v-7c98e74e]:hover{border-color:#1890ff}.insert-img-model .model-container .model-content .insert-local:hover span[data-v-7c98e74e],.insert-img-model .model-container .model-content .insert-local:hover p[data-v-7c98e74e]{color:#1890ff}.insert-img-model .model-container .model-content .insert-local input[data-v-7c98e74e]{display:block;position:absolute;width:100%;height:100%;opacity:0}.insert-img-model .model-container .model-foot[data-v-7c98e74e]{display:flex;justify-content:flex-end;align-items:center;padding:10px 12px;display:none}.insert-img-model .model-container .model-foot a[data-v-7c98e74e]{display:block;background:#f7f7f7;color:#262626;line-height:26px;height:26px;font-size:13px;padding:0 12px;border-radius:3px;margin-left:12px;border:1px solid #d9d9d9;transition:all .3s}.insert-img-model .model-container .model-foot a[data-v-7c98e74e]:hover{background:#d9d9d9}.insert-img-model .model-container .model-foot a.ok[data-v-7c98e74e]{background:#1890ff;color:#fff;border-color:#1890ff}.insert-img-model .model-container .model-foot a.ok[data-v-7c98e74e]:hover{background:#0169af}.insert-img-model.active[data-v-7c98e74e]{opacity:1;display:block}.insert-img-model.active .model-container[data-v-7c98e74e]{transform:scale(1)}ul.shift[data-v-7c98e74e]{padding:6px 12px;display:flex;align-items:center}ul.shift span[data-v-7c98e74e]{font-size:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.shift span.iconfont[data-v-7c98e74e]{font-size:14px}ul.shift label[data-v-7c98e74e]{font-size:12px;padding-right:10px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.shift input[type=radio][data-v-7c98e74e],ul.shift label[data-v-7c98e74e]{transition:all .6s ease;box-sizing:border-box}ul.shift input[type=radio]+label[data-v-7c98e74e]:before{content:"\a0";display:inline-block;vertical-align:middle;margin-right:4px;width:8px;height:8px;border-radius:50%;border:1px solid #292d35;padding:2px}ul.shift input[type=radio]:checked+label[data-v-7c98e74e]:before{background-color:#292d35;background-clip:content-box;padding:2px}ul.shift input[type=radio][data-v-7c98e74e]{position:absolute;clip:rect(0,0,0,0)}ul.shift input[type=radio]:checked+label[data-v-7c98e74e]{color:#292d35}[data-v-7c98e74e] .markdown-preview{flex:1;overflow:hidden;overflow-y:scroll;background:#fff;padding:20px 12px!important;font-family:Tahoma For Number,Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}[data-v-7c98e74e] .markdown-preview *{margin:0;padding:0;box-sizing:border-box}[data-v-7c98e74e] .markdown-preview>div{padding:10px 12px!important;background:#fff}[data-v-7c98e74e] .markdown-preview>div::-webkit-scrollbar{display:none}[data-v-7c98e74e] .markdown-preview::-webkit-scrollbar{display:none}[data-v-7c98e74e] .markdown-preview em{font-style:oblique}[data-v-7c98e74e] .markdown-preview ul{list-style:none;padding:0 20px}[data-v-7c98e74e] .markdown-preview ul li{position:relative}[data-v-7c98e74e] .markdown-preview ul li:after{display:block;content:"";width:8px;height:8px;border-radius:50%;position:absolute;z-index:99;top:12px;left:-16px;background:#262626}[data-v-7c98e74e] .markdown-preview ol,[data-v-7c98e74e] .markdown-preview ul{margin:10px 0}[data-v-7c98e74e] .markdown-preview ol li,[data-v-7c98e74e] .markdown-preview ul li{font-size:14px!important;color:#262626;line-height:22px!important;padding:4px 0 4px 6px;min-height:28px}[data-v-7c98e74e] .markdown-preview ol li input[type=checkbox],[data-v-7c98e74e] .markdown-preview ul li input[type=checkbox]{position:relative;cursor:pointer;overflow:visible;position:absolute;left:-14px;top:5px}[data-v-7c98e74e] .markdown-preview ol li input[type=checkbox]:before,[data-v-7c98e74e] .markdown-preview ul li input[type=checkbox]:before{font-family:iconfont!important;color:#999;display:block;width:18px;height:18px;position:absolute;content:"\e684";top:0px;left:-4px;z-index:999999;background-position:center;background:#fff;font-size:18px;text-align:center;line-height:18px}[data-v-7c98e74e] .markdown-preview ol li input[type=checkbox]:checked:before,[data-v-7c98e74e] .markdown-preview ul li input[type=checkbox]:checked:before{content:"\e683"}[data-v-7c98e74e] .markdown-preview ol.toc-anchor,[data-v-7c98e74e] .markdown-preview ul.toc-anchor{margin:0;padding:0}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item{cursor:pointer;padding:4px 0;font-size:13px!important;line-height:16px!important;min-height:auto;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span{color:#2b85e4;opacity:.9}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-2,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-2{padding-left:16px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-3,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-3{padding-left:32px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-4,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-4{padding-left:48px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-5,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-5{padding-left:64px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item:last-child,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item:last-child{padding-bottom:6px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item:hover span,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item:hover span{opacity:1}[data-v-7c98e74e] .markdown-preview ol{list-style-type:decimal;padding-left:20px}[data-v-7c98e74e] .markdown-preview ol li{list-style:decimal}[data-v-7c98e74e] .markdown-preview hr{color:#d9d9d9;height:1px;border:0;border-top:1px solid #d9d9d9;margin:20px 0;padding:0}[data-v-7c98e74e] .markdown-preview del,[data-v-7c98e74e] .markdown-preview em,[data-v-7c98e74e] .markdown-preview strong{display:inline-block}[data-v-7c98e74e] .markdown-preview blockquote{position:relative;background:#f7f7f7;padding:6px 12px;border-left:5px solid #d9d9d9;border-radius:2px;margin:8px 0}[data-v-7c98e74e] .markdown-preview h1,[data-v-7c98e74e] .markdown-preview h2,[data-v-7c98e74e] .markdown-preview h3,[data-v-7c98e74e] .markdown-preview h4,[data-v-7c98e74e] .markdown-preview h5,[data-v-7c98e74e] .markdown-preview h6{color:#262626}[data-v-7c98e74e] .markdown-preview h1{font-size:28px;border-bottom:1px solid #d9d9d9}[data-v-7c98e74e] .markdown-preview h2{font-size:24px}[data-v-7c98e74e] .markdown-preview h3{font-size:18px}[data-v-7c98e74e] .markdown-preview h4{font-size:16px}[data-v-7c98e74e] .markdown-preview h5{font-size:14px}[data-v-7c98e74e] .markdown-preview h6{font-size:12px}[data-v-7c98e74e] .markdown-preview h1,[data-v-7c98e74e] .markdown-preview h2,[data-v-7c98e74e] .markdown-preview h3,[data-v-7c98e74e] .markdown-preview h4,[data-v-7c98e74e] .markdown-preview h5,[data-v-7c98e74e] .markdown-preview h6{padding:8px 0;font-weight:600}[data-v-7c98e74e] .markdown-preview p{font-size:14px!important;color:#262626;margin-bottom:8px;line-height:22px}[data-v-7c98e74e] .markdown-preview img{display:block;max-width:100%;margin:20px 0;cursor:pointer}[data-v-7c98e74e] .markdown-preview table{width:100%;border:1px solid #d9d9d9;border-bottom:0;background:#fff;border-spacing:0;border-collapse:collapse;margin:20px 0}[data-v-7c98e74e] .markdown-preview table tr{transition:background .1s}[data-v-7c98e74e] .markdown-preview table tr td,[data-v-7c98e74e] .markdown-preview table tr th{padding:4px 8px;font-size:14px;line-height:24px;color:#333;border-bottom:1px solid #d9d9d9;cursor:pointer}[data-v-7c98e74e] .markdown-preview table th{background:#f8f8f9;text-align:left;font-weight:700}[data-v-7c98e74e] .markdown-preview table tr:nth-of-type(even) td{background:#fafafa}[data-v-7c98e74e] .markdown-preview table tr:hover td{background:#f5f5f5}[data-v-7c98e74e] .markdown-preview table td,[data-v-7c98e74e] .markdown-preview table th{border:1px solid #d9d9d9;word-break:break-all}[data-v-7c98e74e] .markdown-preview input[type=checkbox]{display:inline-block;border-radius:0;margin-right:8px}[data-v-7c98e74e] .markdown-preview a{text-decoration:none;color:#1890ff;font-size:14px;line-height:22px}[data-v-7c98e74e] .markdown-preview .code-block{position:relative;padding:0!important}[data-v-7c98e74e] .markdown-preview .code-block .copy-code{position:absolute;z-index:999;top:5px;right:10px;font-size:12px;color:#d9d9d9;line-height:20px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .3s;opacity:0}[data-v-7c98e74e] .markdown-preview .code-block .copy-code:hover{color:#1890ff}[data-v-7c98e74e] .markdown-preview .code-block:hover .copy-code{opacity:1}.preview-img[data-v-7c98e74e]{position:fixed;width:100vw;height:100vh;z-index:99999999;left:0;top:0;background:rgba(0,0,0,.5);display:none;opacity:0;transition:opacity .3s .1s;justify-content:center;align-items:center}.preview-img .close[data-v-7c98e74e]{position:absolute;right:0;top:0;color:#fff;padding:10px;font-size:20px;cursor:pointer}.preview-img img[data-v-7c98e74e]{display:block}.preview-img img.vertical[data-v-7c98e74e]{height:80%;width:auto}.preview-img img.horizontal[data-v-7c98e74e]{width:80%;height:auto}.preview-img.active[data-v-7c98e74e]{display:flex;opacity:1}[data-v-7c98e74e] .markdown-theme-light pre{font-size:14px!important;line-height:1.6!important;word-break:break-all;word-wrap:break-word;border:0!important;background:#f7f8fb!important;padding:20px 10px!important;border-radius:4px!important;overflow-y:hidden!important;overflow-x:auto!important;margin:10px 0!important}[data-v-7c98e74e] .markdown-theme-light pre code{font-family:Consolas!important;font-size:13px;line-height:22px!important;color:#444}[data-v-7c98e74e] .markdown-theme-light .hljs{display:block;overflow-x:auto;color:#525252;padding:15px;-webkit-text-size-adjust:none}[data-v-7c98e74e] .markdown-theme-light .hljs-doctype{color:#999}[data-v-7c98e74e] .markdown-theme-light .hljs-tag{color:#3e76f6}[data-v-7c98e74e] .markdown-theme-light .hljs-attribute{color:#e96900}[data-v-7c98e74e] .markdown-theme-light .hljs-value{color:#42b983}[data-v-7c98e74e] .markdown-theme-light .hljs-keyword{color:#e96900}[data-v-7c98e74e] .markdown-theme-light .hljs-string{color:#42b983}[data-v-7c98e74e] .markdown-theme-light .hljs-comment{color:#b3b3b3}[data-v-7c98e74e] .markdown-theme-light .hljs-operator .hljs-comment{color:#525252}[data-v-7c98e74e] .markdown-theme-light .hljs-regexp{color:#af7dff}[data-v-7c98e74e] .markdown-theme-light .hljs-built_in{color:#2db7f5}[data-v-7c98e74e] .markdown-theme-light .css .hljs-class{color:#e96900}[data-v-7c98e74e] .markdown-theme-light .css .hljs-number,[data-v-7c98e74e] .markdown-theme-light .javascript .hljs-number{color:#fc1e70}[data-v-7c98e74e] .markdown-theme-light .css .hljs-attribute{color:#af7dff}[data-v-7c98e74e] .markdown-theme-light .css .hljs-important{color:red}[data-v-7c98e74e] .markdown-theme-light .actionscript .hljs-literal,[data-v-7c98e74e] .markdown-theme-light .javascript .hljs-literal{color:#fc1e70}[data-v-7c98e74e] .markdown-theme-light pre{padding:0;margin:0;background:#f7f7f7!important}[data-v-7c98e74e] .markdown-theme-light code{display:inline-block;background:#f7f7f7;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;margin:0 3px;padding:1px 5px;border-radius:3px;color:#666;border:1px solid #eee}[data-v-7c98e74e] .markdown-theme-light pre code{display:inline;margin:0;padding:0;border:none;background:transparent}[data-v-7c98e74e] .markdown-theme-light pre.bg code{background:#f7f7f7}[data-v-7c98e74e] .markdown-theme-dark pre{display:block;padding:20px 10px!important;border-radius:4px;margin:20px 0!important;background:#1e1e1e;color:#dcdcdc;overflow-y:hidden!important;overflow-x:auto!important;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace!important}[data-v-7c98e74e] .markdown-theme-dark pre *{line-height:1.6!important;font-size:14px;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace!important}[data-v-7c98e74e] .markdown-theme-dark code{padding:0!important;margin:0!important}[data-v-7c98e74e] .markdown-theme-dark .hljs-literal,[data-v-7c98e74e] .markdown-theme-dark .hljs-name,[data-v-7c98e74e] .markdown-theme-dark .hljs-symbol{color:#659bd1}[data-v-7c98e74e] .markdown-theme-dark .hljs-keyword{color:#bc89bd}[data-v-7c98e74e] .markdown-theme-dark .hljs-link{color:#569cd6;text-decoration:underline}[data-v-7c98e74e] .markdown-theme-dark .hljs-built_in,[data-v-7c98e74e] .markdown-theme-dark .hljs-type{color:#4ec9b0}[data-v-7c98e74e] .markdown-theme-dark .hljs-class,[data-v-7c98e74e] .markdown-theme-dark .hljs-number{color:#b8d7a3}[data-v-7c98e74e] .markdown-theme-dark .hljs-meta-string,[data-v-7c98e74e] .markdown-theme-dark .hljs-string{color:#d69d85}[data-v-7c98e74e] .markdown-theme-dark .hljs-regexp,[data-v-7c98e74e] .markdown-theme-dark .hljs-template-tag{color:#9a5334}[data-v-7c98e74e] .markdown-theme-dark .hljs-formula,[data-v-7c98e74e] .markdown-theme-dark .hljs-function,[data-v-7c98e74e] .markdown-theme-dark .hljs-params,[data-v-7c98e74e] .markdown-theme-dark .hljs-subst,[data-v-7c98e74e] .markdown-theme-dark .hljs-title{color:#dcdcdc}[data-v-7c98e74e] .markdown-theme-dark .hljs-comment,[data-v-7c98e74e] .markdown-theme-dark .hljs-quote{color:#57a64a;font-style:italic}[data-v-7c98e74e] .markdown-theme-dark .hljs-doctag{color:#608b4e}[data-v-7c98e74e] .markdown-theme-dark .hljs-meta,[data-v-7c98e74e] .markdown-theme-dark .hljs-meta-keyword,[data-v-7c98e74e] .markdown-theme-dark .hljs-tag{color:#9b9b9b}[data-v-7c98e74e] .markdown-theme-dark .hljs-template-variable,[data-v-7c98e74e] .markdown-theme-dark .hljs-variable{color:#bd63c5}[data-v-7c98e74e] .markdown-theme-dark .hljs-attr,[data-v-7c98e74e] .markdown-theme-dark .hljs-attribute,[data-v-7c98e74e] .markdown-theme-dark .hljs-builtin-name{color:#9cdcfe}[data-v-7c98e74e] .markdown-theme-dark .hljs-section{color:gold}[data-v-7c98e74e] .markdown-theme-dark .hljs-emphasis{font-style:italic}[data-v-7c98e74e] .markdown-theme-dark .hljs-strong{font-weight:700}[data-v-7c98e74e] .markdown-theme-dark .hljs-bullet,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-attr,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-class,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-id,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-pseudo,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-tag{color:#d7ba7d}[data-v-7c98e74e] .markdown-theme-dark .hljs-addition{background-color:#144212;display:inline-block;width:100%}[data-v-7c98e74e] .markdown-theme-dark .hljs-deletion{background-color:#600;display:inline-block;width:100%}[data-v-7c98e74e] .markdown-theme-dark .hljs-comment{font-style:normal}[data-v-7c98e74e] .markdown-theme-oneDark pre{padding:20px 10px!important;display:block;color:#abb2bf;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace;background:#292c34;border-radius:4px;overflow-y:hidden!important;overflow-x:auto!important;margin:10px 0!important}[data-v-7c98e74e] .markdown-theme-oneDark pre *{line-height:1.6!important;font-size:14px;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-comment,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-quote{color:#5c6370;font-style:italic}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-doctag,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-formula,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-keyword{color:#c678dd}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-deletion,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-name,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-section,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-tag,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-subst{color:#e06c75}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-literal{color:#56b6c2}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-addition,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-attribute,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-meta-string,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-regexp,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-string{color:#98c379}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-built_in,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-class .hljs-title{color:#e6c07b}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-attr,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-number,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-attr,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-class,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-pseudo,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-template-variable,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-type,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-variable{color:#d19a66}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-bullet,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-link,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-meta,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-id,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-symbol,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-title{color:#61aeee}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-emphasis{font-style:italic}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-strong{font-weight:700}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-link{text-decoration:underline}[data-v-7c98e74e] .markdown-theme-gitHub pre{padding:20px 10px!important;display:block;overflow-x:auto;color:#333;background:#f7f8fa!important;font-size:13px;line-height:20px;border-radius:4px;margin:10px 0!important;overflow-x:auto!important}[data-v-7c98e74e] .markdown-theme-gitHub pre *{font-family:Consolas!important}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-comment,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-quote{color:#998;font-style:italic}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-selector-tag,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-subst{color:#333;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-keyword{color:#d73a49}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-literal,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-number,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-tag .hljs-attr,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-template-variable,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-variable{color:teal}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-doctag,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-string{color:#d73a49}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-section,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-selector-id,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-title{color:#900;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-subst{font-weight:400}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-class .hljs-title,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-type{color:#458;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-attribute,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-name,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-tag{color:navy;font-weight:400}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-link,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-regexp{color:#009926}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-bullet,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-symbol{color:#990073}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-built_in,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-builtin-name{color:#0086b3}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-meta{color:#999;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-deletion{background:#fdd}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-addition{background:#dfd}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-emphasis{font-style:italic}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-strong{font-weight:700}body .ivu-modal-wrap.common-preview-image-view .ivu-modal{margin:0;padding:0}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content{background:transparent}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-close{display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:#606266;font-size:24px;height:40px;right:40px;top:40px;width:40px}@media (max-width: 640px){body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-close{right:24px;top:24px}}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-close .ivu-icon-ios-close{top:0;right:0;font-size:40px;color:#fff}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-body{padding:0}body .ivu-modal-wrap.common-preview-image-swipe{display:none}.child-view[data-v-fa9693e8]{position:absolute;width:100%;min-height:100%;transition:all .3s cubic-bezier(.55,0,.1,1)}/*! +@charset "UTF-8";@font-face{font-family:iconfont;src:url(/js/build/iconfont.01196938.eot?t=1576231776697);src:url(/js/build/iconfont.01196938.eot?t=1576231776697#iefix) format("embedded-opentype"),url(data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABBoAAsAAAAAH4gAABAXAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHNAqrGKENATYCJAOBAAtCAAQgBYRtB4I0G3MZM6M2lLTSTfZfJ3BzyOqYZkDBRZ2HprCitPZ3M8J36RIFoV+G+/sYnCYldv0I8xP3uCYjaM7/PYldjAhiEUzzMA2QIPZTSUVTap7SplSDVS1QFajwRBw61IQgv72KhZq8zPfO2kzlgJkk7T4iPTP9Ao/snqj1ZwI+AR+pnFgdsb1FKrikLeIB0AABBLNBwG3sJrh0YieT5piEFlvapTXhESZVxn7z1XMwlGSPvV8g5XsAQOD//62ldqfIqjJ5W5yyMH0RqkLWyJ0JDl3vH2ZCvMHdEpDKq5AV6vZCeyUCDyhMhanQFUJUSF+D5awMrAmEpUSMBqL+u96FgQDAQCUGYXgvHww+aDBOYL4ZcfI48GNh0DlDCfADXM0JaRCbioNPrl47gI3q6xMPkBAfIMGhwC7KNMk4AXqWejiMsp9gM2WP1KcBvJwIoADEAGiA1GkriShQPotRgtEV0vgv/nw0aIhYmpWyISIlSpGpmC1lR7A2toZtsMlp11jXnb47j+64Hg5zn6UsUfjoZBmKutd1v9rr4fphDQRixHGUMDpJirTuWd1zkP6/4AFKBLx5ISGFJwr+FLjwIISKCGIwCCRHgwMJBOCBjwA+fPmRUQPBBeYVAQDRQBvVwFICgxJYGgMBsFIM3sCGYPACNhwDCbARHF8yEhg8gU3EQAFsMgZ/YFMwKIDNwMAF2EwMHsAWAYSQxQCoIEsBEEGOAEAMaQOAgawBIBCyDgA5ZD0ANGQDABzITQBIIE8DIIC8CgAP8hoAfEgXMATAnT6Aj5IPAfCFfASAH6QLGGTwcNgSUAMAjTyBHsAsgPtJgC8GU++pILhNgQSfWmA0EEeRuu4EY14UN4/qGZcT5UhhGA+RzF1SKhUR4hBC68GmUDSfJxZ70tpH5uMJtAFv8k3IHkwQsbghCBGyO1rAEch8KV/ADNGEcnmltkOGKDqMSyXPTB0/f1gqqQ2GOhqiJgftys1wX+tg4SHhrzbqdj3PXQi/2m47jteF30zc/s3hA4btyn6r4/K6TDjNfkX8BZ51Du7ZDf/91en8caT7+06wdx/477cLWrE5JJ5vTUwUGoNjmfpWYWpMj3EjIa2djJquyNcCw/FkoZLVDe/crk7HlF2v3TZYaEO48Z1w1PX2/IHu2BudBRCCYtWvBRVSHgdpaN+n+n7rv7jBDQ41V3FSplXfmsIQFb4MONEnSxwYa4X9U0G67cNIpow0Wh0SzdewKnxLu1VOxbIVnAhqMHornbxVT0WyjfE9pdbQaK7Z+5oiSasw6tdwT1ABCOUhgLAB18k2I80+hAGCwnOPrbkI9MCNCKLYKXcZ/TjoQr+DKJrnBcZTsnHIVYM2IKHdls8KKdCbGp/gempUeVCNKPsiarRXiao7c1VaTpGsEWMZkK0EtaF+zozL/C5XUN1mc6qluTG8qp3ZRtDym7Tu9lABY77EyYCDOGGbSaX751iDcb86IXmrDLwE0OIqWKdHSLsjDVHThTg6e4hoZ0W1836P0nv3Sb9K9d17BS0TY89uRiqBtW8PD2r+uXx1QRH6ltVfNulEDoj+Tjm1OVOZHyxye8FtRMNx4u4SAx8MTWuMkQ4+KV/0Fm8XcxAikH13HgPEKC3sOv3jJfQPSis/NF8bGI8jOIpL/ZXB2cGcB5Z1ZUiOX1iO6uuYrghzg0A0c+naMI6D9DpkvdhphTJ9kdKwGkirDAkBUR5wsCOzDBCmo0JKjNunC1wOIoTbEZD+VCiMAURVWa4nDe1Uln4k54baR4hyhhCcUo33BZUwOqTO9uGIEu3sckJb9ZOAtBpUQIyUJ2wTFL+KLQjgHRCBXRiiowDDHW0vkLDrou0JF3AhCp2uQNv7oSZ/Zq8HJE+5VVSctLt8fbKj7qvd2K24Qljenm39DVKnTb/V54W3JQ4A16ajoC9ROEBhrRiupOO7TmnIt97OMqPbDs+Wd9Bq3vJckauVDIeTrXR126kpctY2WSpk9c2MHRO6XQ9XNLsrPWmuiIwVEqcdeCff1qG2zYzl3PJa3eWNcJmju/52k6wPlzQPrZSiQcZqLufWSkeANGW5t5zLe9SIPBNL1x4h9GWuIMQC46ZamifvFawQbH8TO9I0rWsNNjFoVxBYXmmJLzzjwApSTHhfP6YHrnT8ys8LlM0drRhLRqdJw6g4b54gcvmn+YmBX04ilmmEBR3wyJmoOKTz/7x2u72tOTTFq0y9YyvkJUtybl4LBb35iRHt5/TO+DOA/KGyNL40uZIiKaYvcjlOuvqIwScG1qSjFgfIfbLP6jMG8vOVPAijNL4AiM50bvAUmVSewIpmDqY1Wgcx0sAJqIgdRzrDwEEq9Ju9VwQ9uMGVQNYXahAuP79e5t78jSnVz8fdegMM8RyCb4a6viUlDgoko9Oi2TvWJofjwsQrQLviVhXtZw2YRlAB6J0fh8Wmho2cPr1dBSM3lCjc80GaD03EtTI11wPiQgXYsgRhNYuWASCFtPZOvTBqoNYTaO53H3b2Pdh5VsbHPrh06uYJD41afQ2dV1Ox53dGN6P3433qG3c4d93jvbLy4orHh6+df55b8kmvfHzFxbpnQKQHfUt5p1ImhA00zzRHfBFBLeQs4K1jFm7S5kVGDh0dNpRzCknDOjKzMjPPMVSR8n9r2tpnHEdHqOcoUjLUuUxWntVRyE92lLRftK3NINwmNLSpJfx/lbqsLqlV/p6q99SoaurrHSJ5YM2MGS5Xdr9M5CiwMO5fmMVsaY6LExZNNJvZtleQvnnPbCGYI7YnO58kSaS3nyzqAk6aunXdMQiaQJ1VPXNKS318EJljpwvbcyZxP/Jv0Rr4FOrVA/O4TJenp8KY3yDiW32/CpT5O37iS7orQBHVrJikbKa+wc0qr6jUKoH+W04U/Z3n357tnitXIiN/Q7Fdxj/Ml9kdl+An30RfEVVTAFNdmYZL2bHO9hmKfVZc6tf3L+8P6r/8ImBfnft2F7nL3MMDLo7qH32ueDL2GHUa2aRRJQNKhxQP9ZPJkM8xKUeYiysMlfqBkp/ph/pRy+0jRhoGjTQpq4hZ44bO3F69flKagSubojZwoN20wblhcHB18Kvjzg3O5OP+L1ofcTviOriSK1+8/OKK5PV60MpWzqjxrNn016KlnTs6ly66lb7Gc1H5VCYxhbvP1I/ireJ9J7JVB8mtyhbdKF2L8jvnaeBIyan0U7fDY5/dzB9VUTl8YMkgS7JbT8fei73VnWtfPndj2ewwaomyxJhzU08hxVQZzxpbVENU33jDJqlaRrSqJj73b1RmFWSnihoHU1Kaigw2kCrfQvKZP1fmGnSnqNpStG3+MwkvOlFHaH2N5LNonqTPzClC0rjV69oe+zxuk2/q2SlVKRGdwivDr3Dzfq+V8Hz69UaykNT1+vA8TprylNt/P/DHqs5x6uHq2Z2r/9z0W6NyK5NXfyAjtTChQd7W0NNW9lPPvJ95TH31jq3zhTSytHavdq9QIWKQFL4XuFKmXeAhtqmUIfXmZL/edJN5/RrdFH4tSuZ9R9n+mKud+WZTu1KKTiubkaps4mydXiG1JEXyOlVO0X5Ml/XXwZpCaadNLBW0byIxTWj2HK+/3it87M0vACmTm4KDSdEzLM2vOmLmOKzRu0UszatqHbUZmmB+rbZF49C2uhjVCfXewBMqZ5bT4VTCcdOhgH9lkX9v79pevmM6JoNaQMMIQ7dyq3Obc3vqX45upCDy6GZ6Ig6QXdu6nm4zu6+YP1OZpvzv0pMnhkC7bN+BIGXS8OHruLxgRZz36JKSRB5x+zYIbLuvd5dwO1jXu4upURy4O30Gb6IUC0Nsiij5ypBVMmWUxvY7RBPlgVYWKmyh2oShK6FuFq50tq/yW/XndFgI3qo/vuDzruKSn3DFJK3mERZHrt9KSxVnwOHtZU/GZQ5b2Jh580+7h2x2UMG86mNW6sZZyrra909Ktg0qqJ6Xk38qJy8/91Re7qsjKfk6kZ/zFM2pzvnEaoeVevADZa2pNg0GzvXCfX1xersSyI88TkzTtyh0ZkrRQtcnPt6wYfDgdqPxbppzrA0bHifW04oWyqxrUejT9K2NRrrCguZml9wbQmq8Ipbt59QVdG1Y/9w3wlRmpPl9twpTRNIjA95esJ+z4Ai04c61zLT1XQV1nHhDFHZWtFTogXRTxQzRtz9NkFyLzs4Jcpt8hkLklSit2CNK5Yv3iPV3tOSnbxMrsnu+XPfVLZvS1v7/Jcd7cjzyCrsH7zeXFzWdQq3gW4x6p7Y447os0tkV5/QyqL0jYac3CGhaWPL+FbdW+v1UNdnsTZHB30c2xBy6utz/Q6tU2Lt/LhtWJgr2rFt2FvvztIxn2/dvIgyhg7T1yrkBOiZtGZgJq0S8pdbfOwN++vWKmnF69YmCJU1Nk7Z8+pM9TuLtsds8fq75P44PWfCzq2O9XYHU8d6P/BL9a/wT/eS5zzoJcbqYlJyRkOJdOd8CRj3aLGcwZNgq3yCfJvmvYqIN0l/NTT6xu9/cX3TiWOjg1cd3nwvkBJsCxf8s0EocXp/zRWrfvk+k8cLJy5t9muvr5swGGRmYkrza/kabNJrZ83aYVu3eNZW/CvhooMuPeEn4WRK5kdxES5RK/TZtmU02Xx4lny97/pdilUIpDMXD00iX8hJNuZZE3lKpZpXikimatkqsFcGXSCuWIuFwdW7uyK1D4kODLl38t+n8gn+x3M0Wcb9U2FOkX2cdhXVfPtNzzxCNB1AXqLQZesgNc7j/U+QZFxm29kHKSY0h6KmQYPiI4auhc4ePG14spLhlhu8c8Qt/JT7rQyHFEG0efoOGNz6kBLRwLbka/jP5YHgXeX64HXHwwuHrvtp9dghG+i2fSCj+nE/bqJ+5y+Q8rGwPN2zq51+V9cLh/2m2uu6bRVW4D9IYRzX4IB9MSDyIFHSrG9HfOSyi2ecGFjuAKIMwBzTWItJAAmDCWW6Uyjn7rDytsx7ZKs/QJMFDoEmBjxBE94wxORAiyeSCj1yTQbSikwuhYAUFghYAiNLomAQ8nDFJSPAjo3Q9OxiNnl0mB14e5XExMIr+Y6cUOEMhwjbXv3wR6AKr2qeKhpNzY2Xpzf8JX0kLyXnq7BeSIyd13B1+mz+QIHWkyDd/KsUpJ9ypd8cHRKx64QtM2QU09ef93r1dxc5w1yybF4EusEr7lNNGw8kdvixTX/4TvpKWnNV+TfsLyfHolaOdgwX6EMlqtX1ZNN/8SSHaKbGscKe8Ew3iDaz0+rYuMGUnlLD7sz3ZnLMVu/ZVd2QUNuIa2EerSSBRaAwWhycQSWRKKmoaWjp6BkYmZhZWNnYOTi5unmLY2bHA8rgmyzMTYK6wG3WXt05TxqwX3CLuQ04jdm5u+Z6ItR23THbihWs/ip1flj53yJZiwsQQZ0xj0RTNnG8QzRTLwBL/OSWalIAOk7/KRVYU3ZK5J7QMK40NW4zfPK9LV4myESBZoZjMapY6ZFrWvnG2bXGOcdY3LPo627blR9MAAAAA) format("woff2"),url(/js/build/iconfont.5e0c4d21.woff?t=1576231776697) format("woff"),url(/js/build/iconfont.eb7e69a1.ttf?t=1576231776697) format("truetype"),url(/js/build/iconfont.7bf1e2b0.svg?t=1576231776697#iconfont) format("svg")}.iconfont[data-v-7c98e74e]{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-md[data-v-7c98e74e]:before{content:"\e604"}.icon-redo[data-v-7c98e74e]:before{content:"\e627"}.icon-undo[data-v-7c98e74e]:before{content:"\e633"}.icon-checked[data-v-7c98e74e]:before{content:"\e683"}.icon-checked-false[data-v-7c98e74e]:before{content:"\e684"}.icon-preview[data-v-7c98e74e]:before{content:"\e63a"}.icon-on[data-v-7c98e74e]:before{content:"\e6d8"}.icon-off[data-v-7c98e74e]:before{content:"\e6d9"}.icon-download[data-v-7c98e74e]:before{content:"\e6ae"}.icon-bold[data-v-7c98e74e]:before{content:"\e677"}.icon-group[data-v-7c98e74e]:before{content:"\e647"}.icon-img[data-v-7c98e74e]:before{content:"\e64a"}.icon-under-line[data-v-7c98e74e]:before{content:"\e65a"}.icon-close[data-v-7c98e74e]:before{content:"\e690"}.icon-italic[data-v-7c98e74e]:before{content:"\e628"}.icon-overline[data-v-7c98e74e]:before{content:"\e63b"}.icon-horizontal[data-v-7c98e74e]:before{content:"\e7f0"}.icon-theme[data-v-7c98e74e]:before{content:"\e682"}.icon-quote[data-v-7c98e74e]:before{content:"\e636"}.icon-table[data-v-7c98e74e]:before{content:"\e603"}.icon-clear[data-v-7c98e74e]:before{content:"\e629"}.icon-ul[data-v-7c98e74e]:before{content:"\e624"}.icon-code[data-v-7c98e74e]:before{content:"\e60f"}.icon-link[data-v-7c98e74e]:before{content:"\e7e2"}.icon-fullscreen[data-v-7c98e74e]:before{content:"\e7ec"}.icon-quite[data-v-7c98e74e]:before{content:"\e7ed"}.icon-daoru[data-v-7c98e74e]:before{content:"\e635"}.icon-ol[data-v-7c98e74e]:before{content:"\e6f0"}.icon-upload-img[data-v-7c98e74e]:before{content:"\e679"}.icon-save[data-v-7c98e74e]:before{content:"\e648"}.icon-check-box[data-v-7c98e74e]:before{content:"\ec58"}.markdown[data-v-7c98e74e]{overflow:hidden;position:relative;margin:0;padding:0;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;flex-direction:column;background:#f7f7f7}.markdown.border[data-v-7c98e74e]{border:1px solid #d9d9d9}.markdown *[data-v-7c98e74e]{margin:0;padding:0;box-sizing:border-box}.markdown.fullscreen[data-v-7c98e74e]{position:fixed;z-index:999999;top:0;left:0;right:0;bottom:0;height:100%!important;width:100%;border:none}.markdown.fullscreen .markdown-content[data-v-7c98e74e]{padding:10px 0 0}.markdown .markdown-toolbars[data-v-7c98e74e]{width:100%;display:block;list-style:none;background:#fff;color:#6a6f7b;cursor:pointer;padding-left:4px;border-bottom:1px solid #d9d9d9}.markdown .markdown-toolbars>li[data-v-7c98e74e]{float:left;position:relative;cursor:pointer;margin:0;line-height:normal;min-height:auto}.markdown .markdown-toolbars>li[data-v-7c98e74e]:after{display:block;content:attr(name);position:absolute;z-index:999999999999;top:32px;left:20px;background:#000;color:#fff;white-space:nowrap;font-size:12px;line-height:28px;padding:0 6px;transition:all .3s .1s;transform:scale(0);opacity:0;transform-origin:top;border-radius:2px}.markdown .markdown-toolbars>li[data-v-7c98e74e]:hover:after{transform:scale(1);opacity:1}.markdown .markdown-toolbars>li[data-v-7c98e74e]:last-child:after{right:20%;left:auto}.markdown .markdown-toolbars>li .title[data-v-7c98e74e]{font-size:16px!important}.markdown .markdown-toolbars>li .icon-svg[data-v-7c98e74e]{display:flex;align-items:center;justify-content:center}.markdown .markdown-toolbars>li.right[data-v-7c98e74e]{float:right}.markdown .markdown-toolbars>li.right>ul[data-v-7c98e74e]{list-style:none}.markdown .markdown-toolbars>li.right>ul>li[data-v-7c98e74e]{line-height:normal;float:left}.markdown .markdown-toolbars span[data-v-7c98e74e]{font-size:18px;color:#999;cursor:pointer;display:block;width:30px;height:30px;border-radius:3px;line-height:30px;text-align:center}.markdown .markdown-toolbars span[data-v-7c98e74e]:hover{background:#f7f7f7;color:#1890ff}.markdown .markdown-toolbars .title[data-v-7c98e74e]{padding-left:4px;padding-right:10px}.markdown .markdown-toolbars li:last-child span[data-v-7c98e74e]{font-size:20px!important;margin-right:4px}.markdown .markdown-toolbars .shift-theme[data-v-7c98e74e],.markdown .markdown-toolbars .export-file[data-v-7c98e74e]{height:46px;position:relative;display:flex;justify-content:center;align-items:center}.markdown .markdown-toolbars .shift-theme span[data-v-7c98e74e],.markdown .markdown-toolbars .export-file span[data-v-7c98e74e]{padding:0 8px;transition:all .3s;font-size:18px;display:inline-block;line-height:32px}.markdown .markdown-toolbars .shift-theme span[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file span[data-v-7c98e74e]:hover{color:#0084ff;background:#f7f7f7;border-radius:3px}.markdown .markdown-toolbars .shift-theme ul[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul[data-v-7c98e74e]{transform:scale(0);transition:all .3s;left:-50%;top:40px;width:160px;transform-origin:top center;list-style:none;margin:0;padding:6px 0;box-sizing:border-box;border:1px solid #d9d9d9;background:#fff;border-radius:4px;position:absolute;z-index:9999999;box-shadow:0 2px 8px #0000001a}.markdown .markdown-toolbars .shift-theme ul.active[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul.active[data-v-7c98e74e]{opacity:1;transform:scaleY(1)}.markdown .markdown-toolbars .shift-theme ul li[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li[data-v-7c98e74e]{line-height:30px;padding:0 12px;font-size:13px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;align-items:center;color:#262626}.markdown .markdown-toolbars .shift-theme ul li .iconfont[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li .iconfont[data-v-7c98e74e]{font-size:14px;display:block;height:30px;width:30px;line-height:30px;overflow:hidden}.markdown .markdown-toolbars .shift-theme ul li .iconfont[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file ul li .iconfont[data-v-7c98e74e]:hover{color:#262626}.markdown .markdown-toolbars .shift-theme ul li i[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li i[data-v-7c98e74e]{font-size:13px;display:block;font-style:normal;flex:1;white-space:normal}.markdown .markdown-toolbars .shift-theme ul li[data-v-7c98e74e]:last-child,.markdown .markdown-toolbars .export-file ul li[data-v-7c98e74e]:last-child{border-bottom:0}.markdown .markdown-toolbars .shift-theme ul li:last-child .iconfont[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li:last-child .iconfont[data-v-7c98e74e]{font-size:14px!important;margin:0!important}.markdown .markdown-toolbars .shift-theme ul li[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file ul li[data-v-7c98e74e]:hover{background:#f7f7f7}.markdown .markdown-toolbars .shift-theme ul li.disabled[data-v-7c98e74e],.markdown .markdown-toolbars .export-file ul li.disabled[data-v-7c98e74e]{cursor:not-allowed;color:#bbbec4}.markdown .markdown-toolbars .shift-theme ul li.disabled[data-v-7c98e74e]:hover,.markdown .markdown-toolbars .export-file ul li.disabled[data-v-7c98e74e]:hover{background:transparent}.markdown .markdown-toolbars .import-file[data-v-7c98e74e]{position:relative}.markdown .markdown-toolbars .import-file input[data-v-7c98e74e]{position:absolute;z-index:9999;left:0;top:0;display:block;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}.markdown .markdown-toolbars .import-file:hover span[data-v-7c98e74e]{background:#f7f7f7;color:#1890ff}.markdown .markdown-toolbars .import-file[data-v-7c98e74e]:hover:after{transform:scale(1);opacity:1}.markdown .close-preview[data-v-7c98e74e]{position:absolute;z-index:999;right:0;top:0;height:40px;width:40px;display:flex;justify-content:center;align-items:center;cursor:pointer;color:#262626}.markdown .close-preview span[data-v-7c98e74e]{font-size:22px}.markdown .close-preview span[data-v-7c98e74e]:hover{color:#262626}.markdown .markdown-content[data-v-7c98e74e]{flex:1;width:100%;display:flex;justify-content:space-between;position:relative;overflow:hidden;padding-bottom:0}.markdown .markdown-content .markdown-editor[data-v-7c98e74e]{flex:1;height:100%;position:relative;margin:0!important;overflow:hidden;overflow-y:scroll;display:flex;justify-content:space-between;background:#2d2d2d}.markdown .markdown-content .markdown-editor[data-v-7c98e74e]::-webkit-scrollbar{display:none}.markdown .markdown-content .markdown-editor .index[data-v-7c98e74e]{background:#272727;min-height:100%;width:36px;line-height:22px;padding:12px 0}.markdown .markdown-content .markdown-editor .index li[data-v-7c98e74e]{background:#272727;color:#ccc;font-size:14px;text-align:center;font-family:Consolas}.markdown .markdown-content .markdown-editor textarea[data-v-7c98e74e]{width:100%;min-height:100%;outline:none;border:0;background:#2d2d2d;line-height:22px;caret-color:#ccc;color:#669acc;font-size:14px;font-family:Consolas;resize:none;padding:12px 8px;overflow:hidden;white-space:nowrap;overflow-x:auto}.markdown .markdown-content .markdown-editor textarea[data-v-7c98e74e]::-moz-selection{background:#999;color:#0084ff}.markdown .markdown-content .markdown-editor textarea[data-v-7c98e74e]::selection{background:#999;color:#0084ff}.markdown .markdown-content .codemirror[data-v-7c98e74e]{flex:1;width:0;height:100%;overflow:auto}.markdown .markdown-content .markdown-preview[data-v-7c98e74e]{flex:1;width:0;height:100%}.markdown ul.toc-anchor[data-v-7c98e74e]{max-width:260px;min-width:150px;background-color:#f6f8fa;border-left:2px solid #dcdfe6;overflow:auto}.markdown ul.toc-anchor li.toc-anchor-item[data-v-7c98e74e]{cursor:pointer;padding:6px 16px;font-size:12px;line-height:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.markdown ul.toc-anchor li.toc-anchor-item span[data-v-7c98e74e]{color:#333;opacity:.8}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-2[data-v-7c98e74e]{padding-left:16px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-3[data-v-7c98e74e]{padding-left:32px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-4[data-v-7c98e74e]{padding-left:48px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-5[data-v-7c98e74e]{padding-left:64px}.markdown ul.toc-anchor li.toc-anchor-item span.toc-link-action[data-v-7c98e74e]{color:#2b85e4;opacity:1}.markdown ul.toc-anchor li.toc-anchor-item[data-v-7c98e74e]:first-child{padding-top:16px}.markdown ul.toc-anchor li.toc-anchor-item:hover span[data-v-7c98e74e]{opacity:1}.insert-img-model[data-v-7c98e74e]{position:fixed;left:0;top:0;right:0;bottom:0;z-index:99999;background:rgba(0,0,0,.3);padding-top:12%;transition:all .3s;opacity:0;display:none}.insert-img-model .model-container[data-v-7c98e74e]{background:#fff;width:480px;margin:0 auto;border-radius:4px;transition:all .3s;transform:scale(0);transform-origin:center}.insert-img-model .model-container .model-head[data-v-7c98e74e]{line-height:32px;padding:0 12px;background:#f7f7f7;border-radius:4px 4px 0 0;box-shadow:0 1px 2px #d9d9d9;display:flex;justify-content:space-between}.insert-img-model .model-container .model-head span[data-v-7c98e74e]:nth-of-type(2){font-size:14px;padding-left:12px;cursor:pointer}.insert-img-model .model-container .model-head span[data-v-7c98e74e]:nth-of-type(2):hover{color:#ed3f14}.insert-img-model .model-container .model-content[data-v-7c98e74e]{padding:0 12px 20px;min-height:180px}.insert-img-model .model-container .model-content .insert-url[data-v-7c98e74e]{padding:42px 0;display:flex;justify-content:space-between;align-items:center}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]{display:block;border:1px solid #ccc;font-size:14px;padding:4px 8px;line-height:24px;color:#333;background:#fff;border-radius:4px;writing-mode:horizontal-tb;text-rendering:auto;transition:box-shadow 2s;flex:1}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]:focus{border-color:#1890ff}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]::-moz-placeholder{color:#c1c1c1}.insert-img-model .model-container .model-content .insert-url input[data-v-7c98e74e]::placeholder{color:#c1c1c1}.insert-img-model .model-container .model-content .insert-url a[data-v-7c98e74e]{display:block;background:#1890ff;color:#fff;line-height:32px;height:32px;font-size:13px;padding:0 12px;border-radius:3px;margin-left:20px;border:1px solid #d9d9d9;transition:all .3s}.insert-img-model .model-container .model-content .insert-url a[data-v-7c98e74e]:hover{background:#0169af}.insert-img-model .model-container .model-content .insert-local[data-v-7c98e74e]{height:120px;border:1px dashed #d9d9d9;border-radius:4px;transition:all .3s;position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer}.insert-img-model .model-container .model-content .insert-local span[data-v-7c98e74e]{font-size:40px;color:#d9d9d9;line-height:50px;transition:all .3s}.insert-img-model .model-container .model-content .insert-local p[data-v-7c98e74e]{font-size:14px;color:#262626;transition:all .3s}.insert-img-model .model-container .model-content .insert-local[data-v-7c98e74e]:hover{border-color:#1890ff}.insert-img-model .model-container .model-content .insert-local:hover span[data-v-7c98e74e],.insert-img-model .model-container .model-content .insert-local:hover p[data-v-7c98e74e]{color:#1890ff}.insert-img-model .model-container .model-content .insert-local input[data-v-7c98e74e]{display:block;position:absolute;width:100%;height:100%;opacity:0}.insert-img-model .model-container .model-foot[data-v-7c98e74e]{display:flex;justify-content:flex-end;align-items:center;padding:10px 12px;display:none}.insert-img-model .model-container .model-foot a[data-v-7c98e74e]{display:block;background:#f7f7f7;color:#262626;line-height:26px;height:26px;font-size:13px;padding:0 12px;border-radius:3px;margin-left:12px;border:1px solid #d9d9d9;transition:all .3s}.insert-img-model .model-container .model-foot a[data-v-7c98e74e]:hover{background:#d9d9d9}.insert-img-model .model-container .model-foot a.ok[data-v-7c98e74e]{background:#1890ff;color:#fff;border-color:#1890ff}.insert-img-model .model-container .model-foot a.ok[data-v-7c98e74e]:hover{background:#0169af}.insert-img-model.active[data-v-7c98e74e]{opacity:1;display:block}.insert-img-model.active .model-container[data-v-7c98e74e]{transform:scale(1)}ul.shift[data-v-7c98e74e]{padding:6px 12px;display:flex;align-items:center}ul.shift span[data-v-7c98e74e]{font-size:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.shift span.iconfont[data-v-7c98e74e]{font-size:14px}ul.shift label[data-v-7c98e74e]{font-size:12px;padding-right:10px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.shift input[type=radio][data-v-7c98e74e],ul.shift label[data-v-7c98e74e]{transition:all .6s ease;box-sizing:border-box}ul.shift input[type=radio]+label[data-v-7c98e74e]:before{content:"\a0";display:inline-block;vertical-align:middle;margin-right:4px;width:8px;height:8px;border-radius:50%;border:1px solid #292d35;padding:2px}ul.shift input[type=radio]:checked+label[data-v-7c98e74e]:before{background-color:#292d35;background-clip:content-box;padding:2px}ul.shift input[type=radio][data-v-7c98e74e]{position:absolute;clip:rect(0,0,0,0)}ul.shift input[type=radio]:checked+label[data-v-7c98e74e]{color:#292d35}[data-v-7c98e74e] .markdown-preview{flex:1;overflow:hidden;overflow-y:scroll;background:#fff;padding:20px 12px!important;font-family:Tahoma For Number,Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}[data-v-7c98e74e] .markdown-preview *{margin:0;padding:0;box-sizing:border-box}[data-v-7c98e74e] .markdown-preview>div{padding:10px 12px!important;background:#fff}[data-v-7c98e74e] .markdown-preview>div::-webkit-scrollbar{display:none}[data-v-7c98e74e] .markdown-preview::-webkit-scrollbar{display:none}[data-v-7c98e74e] .markdown-preview em{font-style:oblique}[data-v-7c98e74e] .markdown-preview ul{list-style:none;padding:0 20px}[data-v-7c98e74e] .markdown-preview ul li{position:relative}[data-v-7c98e74e] .markdown-preview ul li:after{display:block;content:"";width:8px;height:8px;border-radius:50%;position:absolute;z-index:99;top:12px;left:-16px;background:#262626}[data-v-7c98e74e] .markdown-preview ol,[data-v-7c98e74e] .markdown-preview ul{margin:10px 0}[data-v-7c98e74e] .markdown-preview ol li,[data-v-7c98e74e] .markdown-preview ul li{font-size:14px!important;color:#262626;line-height:22px!important;padding:4px 0 4px 6px;min-height:28px}[data-v-7c98e74e] .markdown-preview ol li input[type=checkbox],[data-v-7c98e74e] .markdown-preview ul li input[type=checkbox]{position:relative;cursor:pointer;overflow:visible;position:absolute;left:-14px;top:5px}[data-v-7c98e74e] .markdown-preview ol li input[type=checkbox]:before,[data-v-7c98e74e] .markdown-preview ul li input[type=checkbox]:before{font-family:iconfont!important;color:#999;display:block;width:18px;height:18px;position:absolute;content:"\e684";top:0px;left:-4px;z-index:999999;background-position:center;background:#fff;font-size:18px;text-align:center;line-height:18px}[data-v-7c98e74e] .markdown-preview ol li input[type=checkbox]:checked:before,[data-v-7c98e74e] .markdown-preview ul li input[type=checkbox]:checked:before{content:"\e683"}[data-v-7c98e74e] .markdown-preview ol.toc-anchor,[data-v-7c98e74e] .markdown-preview ul.toc-anchor{margin:0;padding:0}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item{cursor:pointer;padding:4px 0;font-size:13px!important;line-height:16px!important;min-height:auto;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span{color:#2b85e4;opacity:.9}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-2,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-2{padding-left:16px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-3,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-3{padding-left:32px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-4,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-4{padding-left:48px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item span.toc-link-5,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item span.toc-link-5{padding-left:64px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item:last-child,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item:last-child{padding-bottom:6px}[data-v-7c98e74e] .markdown-preview ol.toc-anchor li.toc-anchor-item:hover span,[data-v-7c98e74e] .markdown-preview ul.toc-anchor li.toc-anchor-item:hover span{opacity:1}[data-v-7c98e74e] .markdown-preview ol{list-style-type:decimal;padding-left:20px}[data-v-7c98e74e] .markdown-preview ol li{list-style:decimal}[data-v-7c98e74e] .markdown-preview hr{color:#d9d9d9;height:1px;border:0;border-top:1px solid #d9d9d9;margin:20px 0;padding:0}[data-v-7c98e74e] .markdown-preview del,[data-v-7c98e74e] .markdown-preview em,[data-v-7c98e74e] .markdown-preview strong{display:inline-block}[data-v-7c98e74e] .markdown-preview blockquote{position:relative;background:#f7f7f7;padding:6px 12px;border-left:5px solid #d9d9d9;border-radius:2px;margin:8px 0}[data-v-7c98e74e] .markdown-preview h1,[data-v-7c98e74e] .markdown-preview h2,[data-v-7c98e74e] .markdown-preview h3,[data-v-7c98e74e] .markdown-preview h4,[data-v-7c98e74e] .markdown-preview h5,[data-v-7c98e74e] .markdown-preview h6{color:#262626}[data-v-7c98e74e] .markdown-preview h1{font-size:28px;border-bottom:1px solid #d9d9d9}[data-v-7c98e74e] .markdown-preview h2{font-size:24px}[data-v-7c98e74e] .markdown-preview h3{font-size:18px}[data-v-7c98e74e] .markdown-preview h4{font-size:16px}[data-v-7c98e74e] .markdown-preview h5{font-size:14px}[data-v-7c98e74e] .markdown-preview h6{font-size:12px}[data-v-7c98e74e] .markdown-preview h1,[data-v-7c98e74e] .markdown-preview h2,[data-v-7c98e74e] .markdown-preview h3,[data-v-7c98e74e] .markdown-preview h4,[data-v-7c98e74e] .markdown-preview h5,[data-v-7c98e74e] .markdown-preview h6{padding:8px 0;font-weight:600}[data-v-7c98e74e] .markdown-preview p{font-size:14px!important;color:#262626;margin-bottom:8px;line-height:22px}[data-v-7c98e74e] .markdown-preview img{display:block;max-width:100%;margin:20px 0;cursor:pointer}[data-v-7c98e74e] .markdown-preview table{width:100%;border:1px solid #d9d9d9;border-bottom:0;background:#fff;border-spacing:0;border-collapse:collapse;margin:20px 0}[data-v-7c98e74e] .markdown-preview table tr{transition:background .1s}[data-v-7c98e74e] .markdown-preview table tr td,[data-v-7c98e74e] .markdown-preview table tr th{padding:4px 8px;font-size:14px;line-height:24px;color:#333;border-bottom:1px solid #d9d9d9;cursor:pointer}[data-v-7c98e74e] .markdown-preview table th{background:#f8f8f9;text-align:left;font-weight:700}[data-v-7c98e74e] .markdown-preview table tr:nth-of-type(even) td{background:#fafafa}[data-v-7c98e74e] .markdown-preview table tr:hover td{background:#f5f5f5}[data-v-7c98e74e] .markdown-preview table td,[data-v-7c98e74e] .markdown-preview table th{border:1px solid #d9d9d9;word-break:break-all}[data-v-7c98e74e] .markdown-preview input[type=checkbox]{display:inline-block;border-radius:0;margin-right:8px}[data-v-7c98e74e] .markdown-preview a{text-decoration:none;color:#1890ff;font-size:14px;line-height:22px}[data-v-7c98e74e] .markdown-preview .code-block{position:relative;padding:0!important}[data-v-7c98e74e] .markdown-preview .code-block .copy-code{position:absolute;z-index:999;top:5px;right:10px;font-size:12px;color:#d9d9d9;line-height:20px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .3s;opacity:0}[data-v-7c98e74e] .markdown-preview .code-block .copy-code:hover{color:#1890ff}[data-v-7c98e74e] .markdown-preview .code-block:hover .copy-code{opacity:1}.preview-img[data-v-7c98e74e]{position:fixed;width:100vw;height:100vh;z-index:99999999;left:0;top:0;background:rgba(0,0,0,.5);display:none;opacity:0;transition:opacity .3s .1s;justify-content:center;align-items:center}.preview-img .close[data-v-7c98e74e]{position:absolute;right:0;top:0;color:#fff;padding:10px;font-size:20px;cursor:pointer}.preview-img img[data-v-7c98e74e]{display:block}.preview-img img.vertical[data-v-7c98e74e]{height:80%;width:auto}.preview-img img.horizontal[data-v-7c98e74e]{width:80%;height:auto}.preview-img.active[data-v-7c98e74e]{display:flex;opacity:1}[data-v-7c98e74e] .markdown-theme-light pre{font-size:14px!important;line-height:1.6!important;word-break:break-all;word-wrap:break-word;border:0!important;background:#f7f8fb!important;padding:20px 10px!important;border-radius:4px!important;overflow-y:hidden!important;overflow-x:auto!important;margin:10px 0!important}[data-v-7c98e74e] .markdown-theme-light pre code{font-family:Consolas!important;font-size:13px;line-height:22px!important;color:#444}[data-v-7c98e74e] .markdown-theme-light .hljs{display:block;overflow-x:auto;color:#525252;padding:15px;-webkit-text-size-adjust:none}[data-v-7c98e74e] .markdown-theme-light .hljs-doctype{color:#999}[data-v-7c98e74e] .markdown-theme-light .hljs-tag{color:#3e76f6}[data-v-7c98e74e] .markdown-theme-light .hljs-attribute{color:#e96900}[data-v-7c98e74e] .markdown-theme-light .hljs-value{color:#42b983}[data-v-7c98e74e] .markdown-theme-light .hljs-keyword{color:#e96900}[data-v-7c98e74e] .markdown-theme-light .hljs-string{color:#42b983}[data-v-7c98e74e] .markdown-theme-light .hljs-comment{color:#b3b3b3}[data-v-7c98e74e] .markdown-theme-light .hljs-operator .hljs-comment{color:#525252}[data-v-7c98e74e] .markdown-theme-light .hljs-regexp{color:#af7dff}[data-v-7c98e74e] .markdown-theme-light .hljs-built_in{color:#2db7f5}[data-v-7c98e74e] .markdown-theme-light .css .hljs-class{color:#e96900}[data-v-7c98e74e] .markdown-theme-light .css .hljs-number,[data-v-7c98e74e] .markdown-theme-light .javascript .hljs-number{color:#fc1e70}[data-v-7c98e74e] .markdown-theme-light .css .hljs-attribute{color:#af7dff}[data-v-7c98e74e] .markdown-theme-light .css .hljs-important{color:red}[data-v-7c98e74e] .markdown-theme-light .actionscript .hljs-literal,[data-v-7c98e74e] .markdown-theme-light .javascript .hljs-literal{color:#fc1e70}[data-v-7c98e74e] .markdown-theme-light pre{padding:0;margin:0;background:#f7f7f7!important}[data-v-7c98e74e] .markdown-theme-light code{display:inline-block;background:#f7f7f7;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;margin:0 3px;padding:1px 5px;border-radius:3px;color:#666;border:1px solid #eee}[data-v-7c98e74e] .markdown-theme-light pre code{display:inline;margin:0;padding:0;border:none;background:transparent}[data-v-7c98e74e] .markdown-theme-light pre.bg code{background:#f7f7f7}[data-v-7c98e74e] .markdown-theme-dark pre{display:block;padding:20px 10px!important;border-radius:4px;margin:20px 0!important;background:#1e1e1e;color:#dcdcdc;overflow-y:hidden!important;overflow-x:auto!important;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace!important}[data-v-7c98e74e] .markdown-theme-dark pre *{line-height:1.6!important;font-size:14px;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace!important}[data-v-7c98e74e] .markdown-theme-dark code{padding:0!important;margin:0!important}[data-v-7c98e74e] .markdown-theme-dark .hljs-literal,[data-v-7c98e74e] .markdown-theme-dark .hljs-name,[data-v-7c98e74e] .markdown-theme-dark .hljs-symbol{color:#659bd1}[data-v-7c98e74e] .markdown-theme-dark .hljs-keyword{color:#bc89bd}[data-v-7c98e74e] .markdown-theme-dark .hljs-link{color:#569cd6;text-decoration:underline}[data-v-7c98e74e] .markdown-theme-dark .hljs-built_in,[data-v-7c98e74e] .markdown-theme-dark .hljs-type{color:#4ec9b0}[data-v-7c98e74e] .markdown-theme-dark .hljs-class,[data-v-7c98e74e] .markdown-theme-dark .hljs-number{color:#b8d7a3}[data-v-7c98e74e] .markdown-theme-dark .hljs-meta-string,[data-v-7c98e74e] .markdown-theme-dark .hljs-string{color:#d69d85}[data-v-7c98e74e] .markdown-theme-dark .hljs-regexp,[data-v-7c98e74e] .markdown-theme-dark .hljs-template-tag{color:#9a5334}[data-v-7c98e74e] .markdown-theme-dark .hljs-formula,[data-v-7c98e74e] .markdown-theme-dark .hljs-function,[data-v-7c98e74e] .markdown-theme-dark .hljs-params,[data-v-7c98e74e] .markdown-theme-dark .hljs-subst,[data-v-7c98e74e] .markdown-theme-dark .hljs-title{color:#dcdcdc}[data-v-7c98e74e] .markdown-theme-dark .hljs-comment,[data-v-7c98e74e] .markdown-theme-dark .hljs-quote{color:#57a64a;font-style:italic}[data-v-7c98e74e] .markdown-theme-dark .hljs-doctag{color:#608b4e}[data-v-7c98e74e] .markdown-theme-dark .hljs-meta,[data-v-7c98e74e] .markdown-theme-dark .hljs-meta-keyword,[data-v-7c98e74e] .markdown-theme-dark .hljs-tag{color:#9b9b9b}[data-v-7c98e74e] .markdown-theme-dark .hljs-template-variable,[data-v-7c98e74e] .markdown-theme-dark .hljs-variable{color:#bd63c5}[data-v-7c98e74e] .markdown-theme-dark .hljs-attr,[data-v-7c98e74e] .markdown-theme-dark .hljs-attribute,[data-v-7c98e74e] .markdown-theme-dark .hljs-builtin-name{color:#9cdcfe}[data-v-7c98e74e] .markdown-theme-dark .hljs-section{color:gold}[data-v-7c98e74e] .markdown-theme-dark .hljs-emphasis{font-style:italic}[data-v-7c98e74e] .markdown-theme-dark .hljs-strong{font-weight:700}[data-v-7c98e74e] .markdown-theme-dark .hljs-bullet,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-attr,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-class,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-id,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-pseudo,[data-v-7c98e74e] .markdown-theme-dark .hljs-selector-tag{color:#d7ba7d}[data-v-7c98e74e] .markdown-theme-dark .hljs-addition{background-color:#144212;display:inline-block;width:100%}[data-v-7c98e74e] .markdown-theme-dark .hljs-deletion{background-color:#600;display:inline-block;width:100%}[data-v-7c98e74e] .markdown-theme-dark .hljs-comment{font-style:normal}[data-v-7c98e74e] .markdown-theme-oneDark pre{padding:20px 10px!important;display:block;color:#abb2bf;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace;background:#292c34;border-radius:4px;overflow-y:hidden!important;overflow-x:auto!important;margin:10px 0!important}[data-v-7c98e74e] .markdown-theme-oneDark pre *{line-height:1.6!important;font-size:14px;font-family:Menlo,Consolas,Courier New,Courier,FreeMono,monospace}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-comment,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-quote{color:#5c6370;font-style:italic}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-doctag,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-formula,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-keyword{color:#c678dd}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-deletion,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-name,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-section,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-tag,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-subst{color:#e06c75}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-literal{color:#56b6c2}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-addition,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-attribute,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-meta-string,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-regexp,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-string{color:#98c379}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-built_in,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-class .hljs-title{color:#e6c07b}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-attr,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-number,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-attr,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-class,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-pseudo,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-template-variable,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-type,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-variable{color:#d19a66}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-bullet,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-link,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-meta,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-selector-id,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-symbol,[data-v-7c98e74e] .markdown-theme-oneDark .hljs-title{color:#61aeee}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-emphasis{font-style:italic}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-strong{font-weight:700}[data-v-7c98e74e] .markdown-theme-oneDark .hljs-link{text-decoration:underline}[data-v-7c98e74e] .markdown-theme-gitHub pre{padding:20px 10px!important;display:block;overflow-x:auto;color:#333;background:#f7f8fa!important;font-size:13px;line-height:20px;border-radius:4px;margin:10px 0!important;overflow-x:auto!important}[data-v-7c98e74e] .markdown-theme-gitHub pre *{font-family:Consolas!important}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-comment,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-quote{color:#998;font-style:italic}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-selector-tag,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-subst{color:#333;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-keyword{color:#d73a49}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-literal,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-number,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-tag .hljs-attr,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-template-variable,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-variable{color:teal}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-doctag,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-string{color:#d73a49}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-section,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-selector-id,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-title{color:#900;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-subst{font-weight:400}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-class .hljs-title,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-type{color:#458;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-attribute,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-name,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-tag{color:navy;font-weight:400}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-link,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-regexp{color:#009926}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-bullet,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-symbol{color:#990073}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-built_in,[data-v-7c98e74e] .markdown-theme-gitHub .hljs-builtin-name{color:#0086b3}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-meta{color:#999;font-weight:700}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-deletion{background:#fdd}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-addition{background:#dfd}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-emphasis{font-style:italic}[data-v-7c98e74e] .markdown-theme-gitHub .hljs-strong{font-weight:700}body .ivu-modal-wrap.common-preview-image-view .ivu-modal{margin:0;padding:0}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content{background:transparent}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-close{display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:#606266;font-size:24px;height:40px;right:40px;top:40px;width:40px}@media (max-width: 640px){body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-close{right:24px;top:24px}}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-close .ivu-icon-ios-close{top:0;right:0;font-size:40px;color:#fff}body .ivu-modal-wrap.common-preview-image-view .ivu-modal .ivu-modal-content .ivu-modal-body{padding:0}body .ivu-modal-wrap.common-preview-image-swipe{display:none}.child-view[data-v-206a3ac6]{position:absolute;width:100%;min-height:100%;transition:all .3s cubic-bezier(.55,0,.1,1)}/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen diff --git a/public/js/build/app.2ab5f89e.js b/public/js/build/app.6fb8fe77.js similarity index 99% rename from public/js/build/app.2ab5f89e.js rename to public/js/build/app.6fb8fe77.js index 8871f5c25..eeac668d6 100644 --- a/public/js/build/app.2ab5f89e.js +++ b/public/js/build/app.6fb8fe77.js @@ -142,7 +142,7 @@ var mL={languageTypes:{zh:"\u7B80\u4F53\u4E2D\u6587","zh-CHT":"\u7E41\u9AD4\u4E2 `};_r.prototype.strong=function(e){return""+e+""};_r.prototype.em=function(e){return""+e+""};_r.prototype.codespan=function(e){return""+e+""};_r.prototype.br=function(){return this.options.xhtml?"
":"
"};_r.prototype.del=function(e){return""+e+""};_r.prototype.link=function(e,t,n){if(e=RD(this.options.sanitize,this.options.baseUrl,e),e===null)return n;var r='
",r};_r.prototype.image=function(e,t,n){if(e=RD(this.options.sanitize,this.options.baseUrl,e),e===null)return n;var r=''+n+'":">",r};_r.prototype.text=function(e){return e};function ws(){}ws.prototype.strong=ws.prototype.em=ws.prototype.codespan=ws.prototype.del=ws.prototype.text=function(e){return e};ws.prototype.link=ws.prototype.image=function(e,t,n){return""+n};ws.prototype.br=function(){return""};function Xa(e){this.tokens=[],this.token=null,this.options=e||er.defaults,this.options.renderer=this.options.renderer||new _r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new u1}Xa.parse=function(e,t){var n=new Xa(t);return n.parse(e)};Xa.prototype.parse=function(e){this.inline=new Li(e.links,this.options),this.inlineText=new Li(e.links,Ja({},this.options,{renderer:new ws})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t};Xa.prototype.next=function(){return this.token=this.tokens.pop(),this.token};Xa.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Xa.prototype.parseText=function(){for(var e=this.token.text;this.peek().type==="text";)e+=` `+this.next().text;return this.inline.output(e)};Xa.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,$D(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,a,s;for(a="",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 Xn(e,t){if(t){if(Xn.escapeTest.test(e))return e.replace(Xn.escapeReplace,function(n){return Xn.replacements[n]})}else if(Xn.escapeTestNoEncode.test(e))return e.replace(Xn.escapeReplaceNoEncode,function(n){return Xn.replacements[n]});return e}Xn.escapeTest=/[&<>"']/;Xn.escapeReplace=/[&<>"']/g;Xn.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"};Xn.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/;Xn.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;function $D(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 zr(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 RD(e,t,n){if(e){try{var r=decodeURIComponent($D(n)).replace(/[^\w:]/g,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!Ej.test(n)&&(n=Sj(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}function Sj(e,t){return jp[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?jp[" "+e]=e+"/":jp[" "+e]=LD(e,"/",!0)),e=jp[" "+e],t.slice(0,2)==="//"?e.replace(/:[\s\S]*/,":")+t:t.charAt(0)==="/"?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}var jp={},Ej=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Zl(){}Zl.exec=Zl;function Ja(e){for(var t=1,n,r;t=0&&c[i]==="\\";)h=!h;return h?"|":" |"}),r=n.split(/ \|/),a=0;if(r.length>t)r.splice(t);else for(;r.lengthAn error occurred:

"+Xn(h.message+"",!0)+"
";throw h}}er.options=er.setOptions=function(e){return Ja(er.defaults,e),er};er.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new _r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}};er.defaults=er.getDefaults();er.Parser=Xa;er.parser=Xa.parse;er.Renderer=_r;er.TextRenderer=ws;er.Lexer=oo;er.lexer=oo.lex;er.InlineLexer=Li;er.inlineLexer=Li.output;er.Slugger=u1;er.parse=er;on.initHighlightingOnLoad();const Dj=new er.Renderer;var Oj=er.setOptions({renderer:Dj,gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,highlight:function(e){return on.highlightAuto(e).value}}),Tj=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:""}})])])},Pj=[];const Aj={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=Oj(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="";S0.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,a=document.createElement("input");a.setAttribute("value",r),document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),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()}}},F5={};var Mj=Ci(Aj,Tj,Pj,!1,Ij,"7c98e74e",null,null);function Ij(e){for(let t in F5)this[t]=F5[t]}var $j=function(){return Mj.exports}(),c1={exports:{}},ND=function(t,n){return function(){for(var a=new Array(arguments.length),s=0;s=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([a]):n[r]=n[r]?n[r]+", "+a:a}}),n},z5=ya,fz=z5.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function a(s){var l=s;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=a(window.location.href),function(l){var c=z5.isString(l)?a(l):l;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function h1(e){this.message=e}h1.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};h1.prototype.__CANCEL__=!0;var rg=h1,Vp=ya,hz=rz,pz=iz,vz=jD,mz=uz,gz=dz,_z=fz,Z_=UD,yz=ag,bz=rg,U5=function(t){return new Promise(function(r,a){var s=t.data,l=t.headers,c=t.responseType,h;function i(){t.cancelToken&&t.cancelToken.unsubscribe(h),t.signal&&t.signal.removeEventListener("abort",h)}Vp.isFormData(s)&&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=mz(t.baseURL,t.url);p.open(t.method.toUpperCase(),vz(m,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function _(){if(!!p){var b="getAllResponseHeaders"in p?gz(p.getAllResponseHeaders()):null,E=!c||c==="text"||c==="json"?p.responseText:p.response,D={data:E,status:p.status,statusText:p.statusText,headers:b,config:t,request:p};hz(function(C){r(C),i()},function(C){a(C),i()},D),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||(a(Z_("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){a(Z_("Network Error",t,null,p)),p=null},p.ontimeout=function(){var E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",D=t.transitional||yz.transitional;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),a(Z_(E,t,D.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},Vp.isStandardBrowserEnv()){var y=(t.withCredentials||_z(m))&&t.xsrfCookieName?pz.read(t.xsrfCookieName):void 0;y&&(l[t.xsrfHeaderName]=y)}"setRequestHeader"in p&&Vp.forEach(l,function(E,D){typeof s=="undefined"&&D.toLowerCase()==="content-type"?delete l[D]:p.setRequestHeader(D,E)}),Vp.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||(a(!b||b&&b.type?new bz("canceled"):b),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(h),t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h))),s||(s=null),p.send(s)})},ri=ya,V5=ez,wz=zD,Cz={"Content-Type":"application/x-www-form-urlencoded"};function W5(e,t){!ri.isUndefined(e)&&ri.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function xz(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=U5),e}function Sz(e,t,n){if(ri.isString(e))try{return(t||JSON.parse)(e),ri.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var ig={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:xz(),transformRequest:[function(t,n){return V5(n,"Accept"),V5(n,"Content-Type"),ri.isFormData(t)||ri.isArrayBuffer(t)||ri.isBuffer(t)||ri.isStream(t)||ri.isFile(t)||ri.isBlob(t)?t:ri.isArrayBufferView(t)?t.buffer:ri.isURLSearchParams(t)?(W5(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ri.isObject(t)||n&&n["Content-Type"]==="application/json"?(W5(n,"application/json"),Sz(t)):t}],transformResponse:[function(t){var n=this.transitional||ig.transitional,r=n&&n.silentJSONParsing,a=n&&n.forcedJSONParsing,s=!r&&this.responseType==="json";if(s||a&&ri.isString(t)&&t.length)try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?wz(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, */*"}}};ri.forEach(["delete","get","head"],function(t){ig.headers[t]={}});ri.forEach(["post","put","patch"],function(t){ig.headers[t]=ri.merge(Cz)});var ag=ig,Ez=ya,kz=ag,Dz=function(t,n,r){var a=this||kz;return Ez.forEach(r,function(l){t=l.call(a,t,n)}),t},VD=function(t){return!!(t&&t.__CANCEL__)},H5=ya,Q_=Dz,Oz=VD,Tz=ag,Pz=rg;function q_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pz("canceled")}var Az=function(t){q_(t),t.headers=t.headers||{},t.data=Q_.call(t,t.data,t.headers,t.transformRequest),t.headers=H5.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),H5.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var n=t.adapter||Tz.adapter;return n(t).then(function(a){return q_(t),a.data=Q_.call(t,a.data,a.headers,t.transformResponse),a},function(a){return Oz(a)||(q_(t),a&&a.response&&(a.response.data=Q_.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},aa=ya,WD=function(t,n){n=n||{};var r={};function a(p,d){return aa.isPlainObject(p)&&aa.isPlainObject(d)?aa.merge(p,d):aa.isPlainObject(d)?aa.merge({},d):aa.isArray(d)?d.slice():d}function s(p){if(aa.isUndefined(n[p])){if(!aa.isUndefined(t[p]))return a(void 0,t[p])}else return a(t[p],n[p])}function l(p){if(!aa.isUndefined(n[p]))return a(void 0,n[p])}function c(p){if(aa.isUndefined(n[p])){if(!aa.isUndefined(t[p]))return a(void 0,t[p])}else return a(void 0,n[p])}function h(p){if(p in n)return a(t[p],n[p]);if(p in t)return a(void 0,t[p])}var i={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 aa.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var v=i[d]||s,m=v(d);aa.isUndefined(m)&&v!==h||(r[d]=m)}),r},HD={version:"0.24.0"},Mz=HD.version,p1={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){p1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var K5={};p1.transitional=function(t,n,r){function a(s,l){return"[Axios v"+Mz+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return function(s,l,c){if(t===!1)throw new Error(a(l," has been removed"+(n?" in "+n:"")));return n&&!K5[l]&&(K5[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,l,c):!0}};function Iz(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),a=r.length;a-- >0;){var s=r[a],l=t[s];if(l){var c=e[s],h=c===void 0||l(c,s,e);if(h!==!0)throw new TypeError("option "+s+" must be "+h);continue}if(n!==!0)throw Error("Unknown option "+s)}}var $z={assertOptions:Iz,validators:p1},KD=ya,Rz=jD,G5=Qj,Y5=Az,sg=WD,GD=$z,Au=GD.validators;function kf(e){this.defaults=e,this.interceptors={request:new G5,response:new G5}}kf.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=sg(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&&GD.assertOptions(n,{silentJSONParsing:Au.transitional(Au.boolean),forcedJSONParsing:Au.transitional(Au.boolean),clarifyTimeoutError:Au.transitional(Au.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(a=a&&v.synchronous,r.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var l;if(!a){var c=[Y5,void 0];for(Array.prototype.unshift.apply(c,r),c=c.concat(s),l=Promise.resolve(t);c.length;)l=l.then(c.shift(),c.shift());return l}for(var h=t;r.length;){var i=r.shift(),p=r.shift();try{h=i(h)}catch(d){p(d);break}}try{l=Y5(h)}catch(d){return Promise.reject(d)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};kf.prototype.getUri=function(t){return t=sg(this.defaults,t),Rz(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};KD.forEach(["delete","get","head","options"],function(t){kf.prototype[t]=function(n,r){return this.request(sg(r||{},{method:t,url:n,data:(r||{}).data}))}});KD.forEach(["post","put","patch"],function(t){kf.prototype[t]=function(n,r,a){return this.request(sg(a||{},{method:t,url:n,data:r}))}});var Lz=kf,Nz=rg;function oc(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var n=this;this.promise.then(function(r){if(!!n._listeners){var a,s=n._listeners.length;for(a=0;a 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)},Qz=[];const qz={name:"RightBottom",components:{MarkdownPreview:$j},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=Zs.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()||(J5.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),a=600;if(r.time&&r.time+a>Math.round(new Date().getTime()/1e3)){this.downloadUrl=r.data.html_url;return}this.loadIng>0||(this.loadIng++,J5.get(`https://api.github.com/repos/${e.owner}/${e.repo}/releases`).then(({status:s,data:l})=>{this.loadIng--,s===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(){Zs.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 a=(s,l)=>{let c=l;for(;s[c]!=="."&&ch?1:-1;n=s+1,r=l+1}for(;n0)return 1;n=s+1}for(;r0)return-1;r=s+1}return 0}}},Z5={};var eU=Ci(qz,Zz,Qz,!1,tU,null,null,null);function tU(e){for(let t in Z5)this[t]=Z5[t]}var nU=function(){return eU.exports}();const rU="modulepreload",Q5={},iU="/",kn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${iU}${r}`,r in Q5)return;Q5[r]=!0;const a=r.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":rU,a||(l.as="script",l.crossOrigin=""),l.href=r,document.head.appendChild(l),a)return new Promise((c,h)=>{l.addEventListener("load",c),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};var aU=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)},sU=[];const oU=()=>kn(()=>import("./view.9ac5ec3e.js"),["js/build/view.9ac5ec3e.js","js/build/view.310641c1.css"]),lU=()=>kn(()=>import("./swipe.dee9fe2c.js"),["js/build/swipe.dee9fe2c.js","js/build/swipe.750bd8d1.css"]),uU={name:"PreviewImage",components:{PreviewImageSwipe:lU,PreviewImageView:oU},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"}}},q5={};var cU=Ci(uU,aU,sU,!1,dU,null,null,null);function dU(e){for(let t in q5)this[t]=q5[t]}var fU=function(){return cU.exports}(),hU=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"}})},pU=[];const vU={name:"PreviewImageState",components:{PreviewImage:fU},computed:{...vo(["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){const t=Math.min(Math.max(this.$store.state.previewImageIndex,0),this.$store.state.previewImageList.length-1),n=e.map(r=>$A.isJson(r)?$A.thumbRestore(r.src):$A.thumbRestore(r));$A.eeuiAppSendMessage({action:"picturePreview",position:t,paths:n})}else this.show=!0}}},eE={};var mU=Ci(vU,hU,pU,!1,gU,null,null,null);function gU(e){for(let t in eE)this[t]=eE[t]}var _U=function(){return mU.exports}(),yU=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)},bU=[];const wU={name:"NetworkException",props:{type:{type:String,default:"modal"}},data(){return{show:!1}},beforeDestroy(){this.show=!1},computed:{...vo(["ajaxNetworkException"])},watch:{ajaxNetworkException:{handler(e){this.show=e},immediate:!0}}},tE={};var CU=Ci(wU,yU,bU,!1,xU,null,null,null);function xU(e){for(let t in tE)this[t]=tE[t]}var SU=function(){return CU.exports}(),EU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return 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:"remove"}},[n("div",{staticClass:"item hover-del"},[n("Icon",{attrs:{type:"md-trash"}}),e._v(e._s(e.$L("\u5220\u9664"))+" ")],1)]),e.colorShow?e._l(e.taskColorList,function(r,a){return n("EDropdownItem",{key:"c_"+a,attrs:{divided:a==0,command:r}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:r.color||"#f9f9f9"},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)},kU=[];const DU={name:"TaskOperation",data(){return{task:{},loadStatus:!1,colorShow:!0,updateBefore:!1,disabled:!1,size:"small",onUpdate:null,element:null,target:null,styles:{}}},beforeDestroy(){this.target&&this.target.removeEventListener("scroll",this.handlerEventListeners)},computed:{...vo(["loads","taskOperation","taskColorList","taskFlows","taskFlowItems"]),...i1(["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 a=this.taskFlowItems.find(({id:h})=>h==this.flow.flow_item_id)||{},s=this.taskFlowItems.find(({id:h})=>h==r)||{},l=a.status!=="end"&&s.status==="end",c=a.status==="end"&&s.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}},updateTask(e){return new Promise((t,n)=>{if(this.loadIng){n();return}Object.keys(e).forEach(a=>this.$set(this.task,a,e[a]));const r=Object.assign(e,{task_id:this.task.id});this.$store.dispatch("taskUpdate",r).then(({data:a,msg:s})=>{$A.messageSuccess(s),t(),this.$store.dispatch("saveTaskBrowse",r.task_id),typeof this.onUpdate=="function"&&this.onUpdate(a)}).catch(({msg:a})=>{$A.modalError(a),this.$store.dispatch("getTaskOne",r.task_id).catch(()=>{}),n()})})},archivedOrRemoveTask(e){let t="removeTask",n="\u5220\u9664",r={task_id:this.task.id},a=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+a,content:"\u4F60\u786E\u5B9A\u8981"+n+a+"\u3010"+this.task.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>{if(!this.loadIng)return new Promise((s,l)=>{this.$store.dispatch(t,r).then(({msg:c})=>{s(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]}}},nE={};var OU=Ci(DU,EU,kU,!1,TU,null,null,null);function TU(e){for(let t in nE)this[t]=nE[t]}var PU=function(){return OU.exports}(),AU=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()})],2)},MU=[];const IU={components:{TaskOperation:PU,NetworkException:SU,PreviewImageState:_U,RightBottom:nU,FloatSpinner:qF},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:{...vo(["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,a)=>{$A(a).text().indexOf("\u641C\u7D22")&&(n=$A(a))}),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=${Fl}`)})),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__"))||{}))},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":this.$store.dispatch("call",{url:"users/basic",data:{userid:[(t+"").substring(6)]}}).then(({data:r})=>{var a,s;$A.eeuiAppSendMessage({action:"updateMeetingInfo",infos:{uuid:t,avatar:(a=r[0])==null?void 0:a.userimg,username:(s=r[0])==null?void 0:s.nickname}})}).catch(({msg:r})=>{$A.modalError(r)});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})},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]})}}}},rE={};var $U=Ci(IU,AU,MU,!1,RU,"fa9693e8",null,null);function RU(e){for(let t in rE)this[t]=rE[t]}var LU=function(){return $U.exports}(),NU=[{name:"index",path:"/",component:()=>kn(()=>import("./index.0045ae13.js"),[])},{name:"pro",path:"/pro",component:()=>kn(()=>import("./pro.ff666016.js"),[])},{name:"manage",path:"/manage",component:()=>kn(()=>import("./manage.108fb03a.js"),["js/build/manage.108fb03a.js","js/build/manage.a77f99dc.css","js/build/CheckinExport.3b0975d4.js","js/build/CheckinExport.68b4950e.css","js/build/UserSelect.c1d7840d.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css","js/build/TEditor.c448a662.js","js/build/ImgUpload.cf2be17d.js","js/build/TaskDetail.17c1ee52.js","js/build/ProjectLog.c251a416.js","js/build/DialogWrapper.28dee207.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/details.ae1c56d6.js","js/build/TaskMenu.6d52fdca.js","js/build/ReportEdit.d1baae75.js","js/build/ReportDetail.e316ac3c.js"]),children:[{name:"manage-dashboard",path:"dashboard",component:()=>kn(()=>import("./dashboard.9a6cc68e.js"),["js/build/dashboard.9a6cc68e.js","js/build/TaskMenu.6d52fdca.js"])},{name:"manage-calendar",path:"calendar",component:()=>kn(()=>import("./calendar.f9aa1044.js"),["js/build/calendar.f9aa1044.js","js/build/calendar.05643a5b.css","js/build/TaskMenu.6d52fdca.js"])},{name:"manage-messenger",path:"messenger/:dialogAction?",component:()=>kn(()=>import("./messenger.47854ab6.js"),["js/build/messenger.47854ab6.js","js/build/DialogWrapper.28dee207.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css","js/build/UserSelect.c1d7840d.js","js/build/ImgUpload.cf2be17d.js","js/build/details.ae1c56d6.js"])},{name:"manage-approve",path:"approve",component:()=>kn(()=>import("./index.b2c3f0aa.js"),["js/build/index.b2c3f0aa.js","js/build/index.9d0cdd21.css","js/build/details.ae1c56d6.js","js/build/ImgUpload.cf2be17d.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css"])},{name:"manage-approve-details",path:"approve/details",component:()=>kn(()=>import("./details.ae1c56d6.js"),["js/build/details.ae1c56d6.js","js/build/ImgUpload.cf2be17d.js"])},{name:"manage-setting",path:"setting",component:()=>kn(()=>import("./index.1e8d5001.js"),[]),children:[{name:"manage-setting-personal",path:"personal",component:()=>kn(()=>import("./personal.af1cbdf2.js"),["js/build/personal.af1cbdf2.js","js/build/ImgUpload.cf2be17d.js"])},{name:"manage-setting-checkin",path:"checkin",component:()=>kn(()=>import("./checkin.110860a6.js"),["js/build/checkin.110860a6.js","js/build/checkin.01811e2e.css"])},{name:"manage-setting-approve",path:"approve",component:()=>kn(()=>import("./approve.774d6c89.js"),["js/build/approve.774d6c89.js","js/build/approve.e5ae6891.css","js/build/index.edc265fa.js","js/build/index.da7adf84.css"])},{name:"manage-setting-language",path:"language",component:()=>kn(()=>import("./language.b2ff9329.js"),[])},{name:"manage-setting-theme",path:"theme",component:()=>kn(()=>import("./theme.80fdad77.js"),[])},{name:"manage-setting-keyboard",path:"keyboard",component:()=>kn(()=>import("./keyboard.fc515293.js"),["js/build/keyboard.fc515293.js","js/build/keyboard.c51dffde.css"])},{name:"manage-setting-license",path:"license",component:()=>kn(()=>import("./license.ef37879d.js"),["js/build/license.ef37879d.js","js/build/license.2d98adda.css"])},{name:"manage-setting-password",path:"password",component:()=>kn(()=>import("./password.eb90241e.js"),[])},{name:"manage-setting-email",path:"email",component:()=>kn(()=>import("./email.5d3025c7.js"),[])},{name:"manage-setting-system",path:"system",component:()=>kn(()=>import("./system.015c49e1.js"),["js/build/system.015c49e1.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css","js/build/CheckinExport.3b0975d4.js","js/build/CheckinExport.68b4950e.css","js/build/UserSelect.c1d7840d.js"])},{name:"manage-setting-delete",path:"delete",component:()=>kn(()=>import("./delete.3019f7ef.js"),[])}]},{name:"manage-project-invite",path:"project/invite",component:()=>kn(()=>import("./projectInvite.ddf03d3f.js"),["js/build/projectInvite.ddf03d3f.js","js/build/projectInvite.c62994fb.css"])},{name:"manage-project",path:"project/:projectId",component:()=>kn(()=>import("./project.6eb71c23.js"),["js/build/project.6eb71c23.js","js/build/ProjectLog.c251a416.js","js/build/TaskMenu.6d52fdca.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css","js/build/UserSelect.c1d7840d.js","js/build/DialogWrapper.28dee207.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/ImgUpload.cf2be17d.js","js/build/details.ae1c56d6.js"])},{name:"manage-file",path:"file/:folderId?/:fileId?",component:()=>kn(()=>import("./file.165e488e.js"),["js/build/file.165e488e.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css","js/build/longpress.43ca7fd9.js","js/build/UserSelect.c1d7840d.js"])}]},{name:"single-file-msg",path:"/single/file/msg/:msgId",component:()=>kn(()=>import("./fileMsg.234716b5.js"),["js/build/fileMsg.234716b5.js","js/build/fileMsg.1a0b76dd.css","js/build/IFrame.f4e1afaf.js"])},{name:"single-file-task",path:"/single/file/task/:fileId",component:()=>kn(()=>import("./fileTask.8bcbee2e.js"),["js/build/fileTask.8bcbee2e.js","js/build/fileTask.93338ba0.css","js/build/IFrame.f4e1afaf.js"])},{name:"single-file",path:"/single/file/:codeOrFileId",component:()=>kn(()=>import("./file.7ad78cf2.js"),["js/build/file.7ad78cf2.js","js/build/file.1cbb23e7.css","js/build/FileContent.1929b7b3.js","js/build/FileContent.5c6a1e1c.css","js/build/IFrame.f4e1afaf.js","js/build/FilePreview.a0883610.js"])},{name:"single-task",path:"/single/task/:taskId",component:()=>kn(()=>import("./task.cba220aa.js"),["js/build/task.cba220aa.js","js/build/task.0d7ca2d3.css","js/build/TaskDetail.17c1ee52.js","js/build/TEditor.c448a662.js","js/build/ImgUpload.cf2be17d.js","js/build/ProjectLog.c251a416.js","js/build/DialogWrapper.28dee207.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/index.edc265fa.js","js/build/index.da7adf84.css","js/build/UserSelect.c1d7840d.js","js/build/details.ae1c56d6.js","js/build/TaskMenu.6d52fdca.js"])},{name:"valid-email",path:"/single/valid/email",component:()=>kn(()=>import("./validEmail.4f649c64.js"),["js/build/validEmail.4f649c64.js","js/build/validEmail.6e361ca9.css"])},{name:"report-edit",path:"/single/report/edit/:reportEditId",component:()=>kn(()=>import("./reportEdit.8d6ae6af.js"),["js/build/reportEdit.8d6ae6af.js","js/build/reportEdit.5c397123.css","js/build/ReportEdit.d1baae75.js","js/build/UserSelect.c1d7840d.js"])},{name:"report-detail",path:"/single/report/detail/:reportDetailId",component:()=>kn(()=>import("./reportDetail.83c422be.js"),["js/build/reportDetail.83c422be.js","js/build/reportDetail.c12bef4b.css","js/build/ReportDetail.e316ac3c.js"])},{name:"token",path:"/token",component:()=>kn(()=>import("./token.717fee56.js"),["js/build/token.717fee56.js","js/build/token.7afc4e00.css"])},{name:"login",path:"/login",component:()=>kn(()=>import("./login.cfa93d8f.js"),[])},{name:"404",path:"*",component:()=>kn(()=>import("./404.01d2a9d7.js"),["js/build/404.01d2a9d7.js","js/build/404.d686a01f.css"])}];/*! +`),function(c){if(s=c.indexOf(":"),r=J_.trim(c.substr(0,s)).toLowerCase(),a=J_.trim(c.substr(s+1)),r){if(n[r]&&cz.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([a]):n[r]=n[r]?n[r]+", "+a:a}}),n},z5=ya,fz=z5.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function a(s){var l=s;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=a(window.location.href),function(l){var c=z5.isString(l)?a(l):l;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function h1(e){this.message=e}h1.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};h1.prototype.__CANCEL__=!0;var rg=h1,Vp=ya,hz=rz,pz=iz,vz=jD,mz=uz,gz=dz,_z=fz,Z_=UD,yz=ag,bz=rg,U5=function(t){return new Promise(function(r,a){var s=t.data,l=t.headers,c=t.responseType,h;function i(){t.cancelToken&&t.cancelToken.unsubscribe(h),t.signal&&t.signal.removeEventListener("abort",h)}Vp.isFormData(s)&&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=mz(t.baseURL,t.url);p.open(t.method.toUpperCase(),vz(m,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function _(){if(!!p){var b="getAllResponseHeaders"in p?gz(p.getAllResponseHeaders()):null,E=!c||c==="text"||c==="json"?p.responseText:p.response,D={data:E,status:p.status,statusText:p.statusText,headers:b,config:t,request:p};hz(function(C){r(C),i()},function(C){a(C),i()},D),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||(a(Z_("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){a(Z_("Network Error",t,null,p)),p=null},p.ontimeout=function(){var E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",D=t.transitional||yz.transitional;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),a(Z_(E,t,D.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},Vp.isStandardBrowserEnv()){var y=(t.withCredentials||_z(m))&&t.xsrfCookieName?pz.read(t.xsrfCookieName):void 0;y&&(l[t.xsrfHeaderName]=y)}"setRequestHeader"in p&&Vp.forEach(l,function(E,D){typeof s=="undefined"&&D.toLowerCase()==="content-type"?delete l[D]:p.setRequestHeader(D,E)}),Vp.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||(a(!b||b&&b.type?new bz("canceled"):b),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(h),t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h))),s||(s=null),p.send(s)})},ri=ya,V5=ez,wz=zD,Cz={"Content-Type":"application/x-www-form-urlencoded"};function W5(e,t){!ri.isUndefined(e)&&ri.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function xz(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=U5),e}function Sz(e,t,n){if(ri.isString(e))try{return(t||JSON.parse)(e),ri.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var ig={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:xz(),transformRequest:[function(t,n){return V5(n,"Accept"),V5(n,"Content-Type"),ri.isFormData(t)||ri.isArrayBuffer(t)||ri.isBuffer(t)||ri.isStream(t)||ri.isFile(t)||ri.isBlob(t)?t:ri.isArrayBufferView(t)?t.buffer:ri.isURLSearchParams(t)?(W5(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ri.isObject(t)||n&&n["Content-Type"]==="application/json"?(W5(n,"application/json"),Sz(t)):t}],transformResponse:[function(t){var n=this.transitional||ig.transitional,r=n&&n.silentJSONParsing,a=n&&n.forcedJSONParsing,s=!r&&this.responseType==="json";if(s||a&&ri.isString(t)&&t.length)try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?wz(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, */*"}}};ri.forEach(["delete","get","head"],function(t){ig.headers[t]={}});ri.forEach(["post","put","patch"],function(t){ig.headers[t]=ri.merge(Cz)});var ag=ig,Ez=ya,kz=ag,Dz=function(t,n,r){var a=this||kz;return Ez.forEach(r,function(l){t=l.call(a,t,n)}),t},VD=function(t){return!!(t&&t.__CANCEL__)},H5=ya,Q_=Dz,Oz=VD,Tz=ag,Pz=rg;function q_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pz("canceled")}var Az=function(t){q_(t),t.headers=t.headers||{},t.data=Q_.call(t,t.data,t.headers,t.transformRequest),t.headers=H5.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),H5.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var n=t.adapter||Tz.adapter;return n(t).then(function(a){return q_(t),a.data=Q_.call(t,a.data,a.headers,t.transformResponse),a},function(a){return Oz(a)||(q_(t),a&&a.response&&(a.response.data=Q_.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},aa=ya,WD=function(t,n){n=n||{};var r={};function a(p,d){return aa.isPlainObject(p)&&aa.isPlainObject(d)?aa.merge(p,d):aa.isPlainObject(d)?aa.merge({},d):aa.isArray(d)?d.slice():d}function s(p){if(aa.isUndefined(n[p])){if(!aa.isUndefined(t[p]))return a(void 0,t[p])}else return a(t[p],n[p])}function l(p){if(!aa.isUndefined(n[p]))return a(void 0,n[p])}function c(p){if(aa.isUndefined(n[p])){if(!aa.isUndefined(t[p]))return a(void 0,t[p])}else return a(void 0,n[p])}function h(p){if(p in n)return a(t[p],n[p]);if(p in t)return a(void 0,t[p])}var i={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 aa.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var v=i[d]||s,m=v(d);aa.isUndefined(m)&&v!==h||(r[d]=m)}),r},HD={version:"0.24.0"},Mz=HD.version,p1={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){p1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var K5={};p1.transitional=function(t,n,r){function a(s,l){return"[Axios v"+Mz+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return function(s,l,c){if(t===!1)throw new Error(a(l," has been removed"+(n?" in "+n:"")));return n&&!K5[l]&&(K5[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,l,c):!0}};function Iz(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),a=r.length;a-- >0;){var s=r[a],l=t[s];if(l){var c=e[s],h=c===void 0||l(c,s,e);if(h!==!0)throw new TypeError("option "+s+" must be "+h);continue}if(n!==!0)throw Error("Unknown option "+s)}}var $z={assertOptions:Iz,validators:p1},KD=ya,Rz=jD,G5=Qj,Y5=Az,sg=WD,GD=$z,Au=GD.validators;function kf(e){this.defaults=e,this.interceptors={request:new G5,response:new G5}}kf.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=sg(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&&GD.assertOptions(n,{silentJSONParsing:Au.transitional(Au.boolean),forcedJSONParsing:Au.transitional(Au.boolean),clarifyTimeoutError:Au.transitional(Au.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(t)===!1||(a=a&&v.synchronous,r.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var l;if(!a){var c=[Y5,void 0];for(Array.prototype.unshift.apply(c,r),c=c.concat(s),l=Promise.resolve(t);c.length;)l=l.then(c.shift(),c.shift());return l}for(var h=t;r.length;){var i=r.shift(),p=r.shift();try{h=i(h)}catch(d){p(d);break}}try{l=Y5(h)}catch(d){return Promise.reject(d)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};kf.prototype.getUri=function(t){return t=sg(this.defaults,t),Rz(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};KD.forEach(["delete","get","head","options"],function(t){kf.prototype[t]=function(n,r){return this.request(sg(r||{},{method:t,url:n,data:(r||{}).data}))}});KD.forEach(["post","put","patch"],function(t){kf.prototype[t]=function(n,r,a){return this.request(sg(a||{},{method:t,url:n,data:r}))}});var Lz=kf,Nz=rg;function oc(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var n=this;this.promise.then(function(r){if(!!n._listeners){var a,s=n._listeners.length;for(a=0;a 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)},Qz=[];const qz={name:"RightBottom",components:{MarkdownPreview:$j},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=Zs.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()||(J5.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),a=600;if(r.time&&r.time+a>Math.round(new Date().getTime()/1e3)){this.downloadUrl=r.data.html_url;return}this.loadIng>0||(this.loadIng++,J5.get(`https://api.github.com/repos/${e.owner}/${e.repo}/releases`).then(({status:s,data:l})=>{this.loadIng--,s===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(){Zs.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 a=(s,l)=>{let c=l;for(;s[c]!=="."&&ch?1:-1;n=s+1,r=l+1}for(;n0)return 1;n=s+1}for(;r0)return-1;r=s+1}return 0}}},Z5={};var eU=Ci(qz,Zz,Qz,!1,tU,null,null,null);function tU(e){for(let t in Z5)this[t]=Z5[t]}var nU=function(){return eU.exports}();const rU="modulepreload",Q5={},iU="/",kn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${iU}${r}`,r in Q5)return;Q5[r]=!0;const a=r.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":rU,a||(l.as="script",l.crossOrigin=""),l.href=r,document.head.appendChild(l),a)return new Promise((c,h)=>{l.addEventListener("load",c),l.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};var aU=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)},sU=[];const oU=()=>kn(()=>import("./view.a048db45.js"),["js/build/view.a048db45.js","js/build/view.5e67e6f1.css"]),lU=()=>kn(()=>import("./swipe.6597c65d.js"),["js/build/swipe.6597c65d.js","js/build/swipe.750bd8d1.css"]),uU={name:"PreviewImage",components:{PreviewImageSwipe:lU,PreviewImageView:oU},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"}}},q5={};var cU=Ci(uU,aU,sU,!1,dU,null,null,null);function dU(e){for(let t in q5)this[t]=q5[t]}var fU=function(){return cU.exports}(),hU=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"}})},pU=[];const vU={name:"PreviewImageState",components:{PreviewImage:fU},computed:{...vo(["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){const t=Math.min(Math.max(this.$store.state.previewImageIndex,0),this.$store.state.previewImageList.length-1),n=e.map(r=>$A.isJson(r)?$A.thumbRestore(r.src):$A.thumbRestore(r));$A.eeuiAppSendMessage({action:"picturePreview",position:t,paths:n})}else this.show=!0}}},eE={};var mU=Ci(vU,hU,pU,!1,gU,null,null,null);function gU(e){for(let t in eE)this[t]=eE[t]}var _U=function(){return mU.exports}(),yU=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)},bU=[];const wU={name:"NetworkException",props:{type:{type:String,default:"modal"}},data(){return{show:!1}},beforeDestroy(){this.show=!1},computed:{...vo(["ajaxNetworkException"])},watch:{ajaxNetworkException:{handler(e){this.show=e},immediate:!0}}},tE={};var CU=Ci(wU,yU,bU,!1,xU,null,null,null);function xU(e){for(let t in tE)this[t]=tE[t]}var SU=function(){return CU.exports}(),EU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return 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:"remove"}},[n("div",{staticClass:"item hover-del"},[n("Icon",{attrs:{type:"md-trash"}}),e._v(e._s(e.$L("\u5220\u9664"))+" ")],1)]),e.colorShow?e._l(e.taskColorList,function(r,a){return n("EDropdownItem",{key:"c_"+a,attrs:{divided:a==0,command:r}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:r.color||"#f9f9f9"},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)},kU=[];const DU={name:"TaskOperation",data(){return{task:{},loadStatus:!1,colorShow:!0,updateBefore:!1,disabled:!1,size:"small",onUpdate:null,element:null,target:null,styles:{}}},beforeDestroy(){this.target&&this.target.removeEventListener("scroll",this.handlerEventListeners)},computed:{...vo(["loads","taskOperation","taskColorList","taskFlows","taskFlowItems"]),...i1(["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 a=this.taskFlowItems.find(({id:h})=>h==this.flow.flow_item_id)||{},s=this.taskFlowItems.find(({id:h})=>h==r)||{},l=a.status!=="end"&&s.status==="end",c=a.status==="end"&&s.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}},updateTask(e){return new Promise((t,n)=>{if(this.loadIng){n();return}Object.keys(e).forEach(a=>this.$set(this.task,a,e[a]));const r=Object.assign(e,{task_id:this.task.id});this.$store.dispatch("taskUpdate",r).then(({data:a,msg:s})=>{$A.messageSuccess(s),t(),this.$store.dispatch("saveTaskBrowse",r.task_id),typeof this.onUpdate=="function"&&this.onUpdate(a)}).catch(({msg:a})=>{$A.modalError(a),this.$store.dispatch("getTaskOne",r.task_id).catch(()=>{}),n()})})},archivedOrRemoveTask(e){let t="removeTask",n="\u5220\u9664",r={task_id:this.task.id},a=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+a,content:"\u4F60\u786E\u5B9A\u8981"+n+a+"\u3010"+this.task.name+"\u3011\u5417\uFF1F",loading:!0,onOk:()=>{if(!this.loadIng)return new Promise((s,l)=>{this.$store.dispatch(t,r).then(({msg:c})=>{s(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]}}},nE={};var OU=Ci(DU,EU,kU,!1,TU,null,null,null);function TU(e){for(let t in nE)this[t]=nE[t]}var PU=function(){return OU.exports}(),AU=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()})],2)},MU=[];const IU={components:{TaskOperation:PU,NetworkException:SU,PreviewImageState:_U,RightBottom:nU,FloatSpinner:qF},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:{...vo(["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,a)=>{$A(a).text().indexOf("\u641C\u7D22")&&(n=$A(a))}),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=${Fl}`)})),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":this.$store.dispatch("call",{url:"users/basic",data:{userid:[(t+"").substring(6)]}}).then(({data:r})=>{var a,s;$A.eeuiAppSendMessage({action:"updateMeetingInfo",infos:{uuid:t,avatar:(a=r[0])==null?void 0:a.userimg,username:(s=r[0])==null?void 0:s.nickname}})}).catch(({msg:r})=>{$A.modalError(r)});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})},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]})}}}},rE={};var $U=Ci(IU,AU,MU,!1,RU,"206a3ac6",null,null);function RU(e){for(let t in rE)this[t]=rE[t]}var LU=function(){return $U.exports}(),NU=[{name:"index",path:"/",component:()=>kn(()=>import("./index.3ab6dc68.js"),[])},{name:"pro",path:"/pro",component:()=>kn(()=>import("./pro.ecb61aa7.js"),[])},{name:"manage",path:"/manage",component:()=>kn(()=>import("./manage.23677939.js"),["js/build/manage.23677939.js","js/build/manage.a77f99dc.css","js/build/CheckinExport.0786bc67.js","js/build/CheckinExport.68b4950e.css","js/build/UserSelect.4fa9cbd2.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css","js/build/TEditor.116bbeaa.js","js/build/ImgUpload.056f7090.js","js/build/TaskDetail.93d4eeab.js","js/build/ProjectLog.9bfebf4b.js","js/build/DialogWrapper.7e5c06a5.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/details.eb8631f5.js","js/build/TaskMenu.61d4b7dc.js","js/build/ReportEdit.3d7c05e9.js","js/build/ReportDetail.f06c9ba5.js"]),children:[{name:"manage-dashboard",path:"dashboard",component:()=>kn(()=>import("./dashboard.54ebcc20.js"),["js/build/dashboard.54ebcc20.js","js/build/TaskMenu.61d4b7dc.js"])},{name:"manage-calendar",path:"calendar",component:()=>kn(()=>import("./calendar.0e6aeaaa.js"),["js/build/calendar.0e6aeaaa.js","js/build/calendar.05643a5b.css","js/build/TaskMenu.61d4b7dc.js"])},{name:"manage-messenger",path:"messenger/:dialogAction?",component:()=>kn(()=>import("./messenger.9ae12471.js"),["js/build/messenger.9ae12471.js","js/build/DialogWrapper.7e5c06a5.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css","js/build/UserSelect.4fa9cbd2.js","js/build/ImgUpload.056f7090.js","js/build/details.eb8631f5.js"])},{name:"manage-approve",path:"approve",component:()=>kn(()=>import("./index.01701810.js"),["js/build/index.01701810.js","js/build/index.9d0cdd21.css","js/build/details.eb8631f5.js","js/build/ImgUpload.056f7090.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css"])},{name:"manage-approve-details",path:"approve/details",component:()=>kn(()=>import("./details.eb8631f5.js"),["js/build/details.eb8631f5.js","js/build/ImgUpload.056f7090.js"])},{name:"manage-setting",path:"setting",component:()=>kn(()=>import("./index.5f4e12fc.js"),[]),children:[{name:"manage-setting-personal",path:"personal",component:()=>kn(()=>import("./personal.4dbe89b2.js"),["js/build/personal.4dbe89b2.js","js/build/ImgUpload.056f7090.js"])},{name:"manage-setting-checkin",path:"checkin",component:()=>kn(()=>import("./checkin.24f61a0d.js"),["js/build/checkin.24f61a0d.js","js/build/checkin.01811e2e.css"])},{name:"manage-setting-approve",path:"approve",component:()=>kn(()=>import("./approve.5d8d6cbe.js"),["js/build/approve.5d8d6cbe.js","js/build/approve.e5ae6891.css","js/build/index.ab28c92e.js","js/build/index.da7adf84.css"])},{name:"manage-setting-language",path:"language",component:()=>kn(()=>import("./language.3598a0b0.js"),[])},{name:"manage-setting-theme",path:"theme",component:()=>kn(()=>import("./theme.05794063.js"),[])},{name:"manage-setting-keyboard",path:"keyboard",component:()=>kn(()=>import("./keyboard.b30ae163.js"),["js/build/keyboard.b30ae163.js","js/build/keyboard.c51dffde.css"])},{name:"manage-setting-license",path:"license",component:()=>kn(()=>import("./license.66258ff9.js"),["js/build/license.66258ff9.js","js/build/license.2d98adda.css"])},{name:"manage-setting-password",path:"password",component:()=>kn(()=>import("./password.9f289b79.js"),[])},{name:"manage-setting-email",path:"email",component:()=>kn(()=>import("./email.c77d464a.js"),[])},{name:"manage-setting-system",path:"system",component:()=>kn(()=>import("./system.83ba2279.js"),["js/build/system.83ba2279.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css","js/build/CheckinExport.0786bc67.js","js/build/CheckinExport.68b4950e.css","js/build/UserSelect.4fa9cbd2.js"])},{name:"manage-setting-delete",path:"delete",component:()=>kn(()=>import("./delete.05615594.js"),[])}]},{name:"manage-project-invite",path:"project/invite",component:()=>kn(()=>import("./projectInvite.8c66116b.js"),["js/build/projectInvite.8c66116b.js","js/build/projectInvite.c62994fb.css"])},{name:"manage-project",path:"project/:projectId",component:()=>kn(()=>import("./project.c7bb6e0e.js"),["js/build/project.c7bb6e0e.js","js/build/ProjectLog.9bfebf4b.js","js/build/TaskMenu.61d4b7dc.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css","js/build/UserSelect.4fa9cbd2.js","js/build/DialogWrapper.7e5c06a5.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/ImgUpload.056f7090.js","js/build/details.eb8631f5.js"])},{name:"manage-file",path:"file/:folderId?/:fileId?",component:()=>kn(()=>import("./file.7cac3066.js"),["js/build/file.7cac3066.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css","js/build/longpress.43ca7fd9.js","js/build/UserSelect.4fa9cbd2.js"])}]},{name:"single-file-msg",path:"/single/file/msg/:msgId",component:()=>kn(()=>import("./fileMsg.0d9b08d0.js"),["js/build/fileMsg.0d9b08d0.js","js/build/fileMsg.1a0b76dd.css","js/build/IFrame.dfb0ac0a.js"])},{name:"single-file-task",path:"/single/file/task/:fileId",component:()=>kn(()=>import("./fileTask.1a203df6.js"),["js/build/fileTask.1a203df6.js","js/build/fileTask.93338ba0.css","js/build/IFrame.dfb0ac0a.js"])},{name:"single-file",path:"/single/file/:codeOrFileId",component:()=>kn(()=>import("./file.67799f74.js"),["js/build/file.67799f74.js","js/build/file.1cbb23e7.css","js/build/FileContent.35a4ff5e.js","js/build/FileContent.5c6a1e1c.css","js/build/IFrame.dfb0ac0a.js","js/build/FilePreview.4bfd7284.js"])},{name:"single-task",path:"/single/task/:taskId",component:()=>kn(()=>import("./task.7d74afdc.js"),["js/build/task.7d74afdc.js","js/build/task.0d7ca2d3.css","js/build/TaskDetail.93d4eeab.js","js/build/TEditor.116bbeaa.js","js/build/ImgUpload.056f7090.js","js/build/ProjectLog.9bfebf4b.js","js/build/DialogWrapper.7e5c06a5.js","js/build/DialogWrapper.5e691503.css","js/build/longpress.43ca7fd9.js","js/build/index.ab28c92e.js","js/build/index.da7adf84.css","js/build/UserSelect.4fa9cbd2.js","js/build/details.eb8631f5.js","js/build/TaskMenu.61d4b7dc.js"])},{name:"valid-email",path:"/single/valid/email",component:()=>kn(()=>import("./validEmail.e7cab868.js"),["js/build/validEmail.e7cab868.js","js/build/validEmail.6e361ca9.css"])},{name:"report-edit",path:"/single/report/edit/:reportEditId",component:()=>kn(()=>import("./reportEdit.ecbe4823.js"),["js/build/reportEdit.ecbe4823.js","js/build/reportEdit.5c397123.css","js/build/ReportEdit.3d7c05e9.js","js/build/UserSelect.4fa9cbd2.js"])},{name:"report-detail",path:"/single/report/detail/:reportDetailId",component:()=>kn(()=>import("./reportDetail.d1fff3ed.js"),["js/build/reportDetail.d1fff3ed.js","js/build/reportDetail.c12bef4b.css","js/build/ReportDetail.f06c9ba5.js"])},{name:"token",path:"/token",component:()=>kn(()=>import("./token.55f32898.js"),["js/build/token.55f32898.js","js/build/token.7afc4e00.css"])},{name:"login",path:"/login",component:()=>kn(()=>import("./login.a11ab1ed.js"),[])},{name:"404",path:"*",component:()=>kn(()=>import("./404.e2804d03.js"),["js/build/404.e2804d03.js","js/build/404.d686a01f.css"])}];/*! * vue-router v3.6.5 * (c) 2022 Evan You * @license MIT @@ -236,7 +236,7 @@ Please report this to https://github.com/markedjs/marked.`,(t||er.defaults).sile `,pe+="@keyframes "+oe+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",j(pe)}}function x(H){H.className+=" "+_+"_animation_active"}function C(H,L,V){if(H.addEventListener)H.addEventListener(L,V);else if(H.attachEvent)H.attachEvent("on"+L,V);else return h.error("[scroll] Don't know how to add event listeners.")}function k(H,L,V){if(H.removeEventListener)H.removeEventListener(L,V);else if(H.detachEvent)H.detachEvent("on"+L,V);else return h.error("[scroll] Don't know how to remove event listeners.")}function w(H){return p(H).container.childNodes[0].childNodes[0].childNodes[0]}function T(H){return p(H).container.childNodes[0].childNodes[0].childNodes[1]}function M(H,L){var V=p(H).listeners;if(!V.push)throw new Error("Cannot add listener to an element that is not detectable.");p(H).listeners.push(L)}function A(H,L,V){V||(V=L,L=H,H=null),H=H||{};function j(){if(H.debug){var q=Array.prototype.slice.call(arguments);if(q.unshift(d.get(L),"Scroll: "),h.log.apply)h.log.apply(null,q);else for(var Pe=0;Pe0?[i._l(i.markList,function(v,m){return d("div",{key:m,class:[i.prefixCls+"-stop"],style:{left:v.position+"%"},on:{click:function(y){return y.target!==y.currentTarget?null:i.sliderClick.apply(null,arguments)}}})}),i._v(" "),d("div",{staticClass:"ivu-slider-marks"},i._l(i.markList,function(v,m){return d("SliderMarker",{key:m,style:{left:v.position+"%"},attrs:{mark:v.mark},nativeOn:{click:function(y){return i.sliderClick.apply(null,arguments)}}})}),1)]:i._e(),i._v(" "),d("div",{class:[i.prefixCls+"-button-wrap"],style:{left:i.minPosition+"%"},on:{touchstart:function(m){return i.onPointerDown(m,"min")},mousedown:function(m){return i.onPointerDown(m,"min")}}},[d("Tooltip",{ref:"minTooltip",attrs:{controlled:i.pointerDown==="min",placement:"top",content:i.tipFormat(i.exportValue[0]),disabled:i.tipDisabled,always:i.showTip==="always"}},[d("div",{class:i.minButtonClasses,attrs:{tabindex:"0"},on:{focus:function(m){return i.handleFocus("min")},blur:function(m){return i.handleBlur("min")},keydown:[function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"left",37,v.key,["Left","ArrowLeft"])||"button"in v&&v.button!==0?null:i.onKeyLeft(v,"min")},function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"down",40,v.key,["Down","ArrowDown"])?null:i.onKeyLeft(v,"min")},function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"right",39,v.key,["Right","ArrowRight"])||"button"in v&&v.button!==2?null:i.onKeyRight(v,"min")},function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"up",38,v.key,["Up","ArrowUp"])?null:i.onKeyRight(v,"min")}]}})])],1),i._v(" "),i.range?d("div",{class:[i.prefixCls+"-button-wrap"],style:{left:i.maxPosition+"%"},on:{touchstart:function(m){return i.onPointerDown(m,"max")},mousedown:function(m){return i.onPointerDown(m,"max")}}},[d("Tooltip",{ref:"maxTooltip",attrs:{controlled:i.pointerDown==="max",placement:"top",content:i.tipFormat(i.exportValue[1]),disabled:i.tipDisabled,always:i.showTip==="always"}},[d("div",{class:i.maxButtonClasses,attrs:{tabindex:"0"},on:{focus:function(m){return i.handleFocus("max")},blur:function(m){return i.handleBlur("max")},keydown:[function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"left",37,v.key,["Left","ArrowLeft"])||"button"in v&&v.button!==0?null:i.onKeyLeft(v,"max")},function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"down",40,v.key,["Down","ArrowDown"])?null:i.onKeyLeft(v,"max")},function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"right",39,v.key,["Right","ArrowRight"])||"button"in v&&v.button!==2?null:i.onKeyRight(v,"max")},function(v){return!v.type.indexOf("key")&&i._k(v.keyCode,"up",38,v.key,["Up","ArrowUp"])?null:i.onKeyRight(v,"max")}]}})])],1):i._e()],2)],1)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(1),c=p(l),h=s(543),i=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||i.default.newInstance({render:_}),d}function m(_){var y="render"in _?_.render:void 0,b=v(y);b.show(_)}i.default.show=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return m(_)},i.default.hide=function(){var _=this;if(!d)return!1;var y=v();y.remove(function(){(0,c.default)(this,_),d=null}.bind(this))},a.default=i.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(14),c=y(l),h=s(1),i=y(h),p=s(17),d=y(p),v=s(91),m=y(v),_=s(33);function y(D){return D&&D.__esModule?D:{default:D}}function b(){return(0,_.transferIncrease)(),(0,_.getTransferIndex)()}var E=b();m.default.newInstance=function(D){(0,i.default)(void 0,void 0);var x=D||{},C=new d.default({data:(0,c.default)({},x,{}),render:function(M){var A="";return this.render?A=M(m.default,{props:{fix:!0,fullscreen:!0}},[this.render(M)]):A=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)}},[A])}}),k=C.$mount();document.body.appendChild(k.$el);var w=C.$children[0];return{show:function(){w.visible=!0,E=b()},remove:function(M){w.visible=!1,setTimeout(function(){w.$parent.$destroy(),document.getElementsByClassName("ivu-spin-fullscreen")[0]!==void 0&&document.body.removeChild(document.getElementsByClassName("ivu-spin-fullscreen")[0]),M()},500)},component:w}}.bind(void 0),a.default=m.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(545),c=p(l),h=s(547),i=p(h);function p(d){return d&&d.__esModule?d:{default:d}}c.default.Step=i.default,a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(232),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(546);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.classes},[i._t("default")],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(233),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(548);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.wrapClasses},[d("div",{class:[i.prefixCls+"-tail"]},[d("i")]),i._v(" "),d("div",{class:[i.prefixCls+"-head"]},[d("div",{class:[i.prefixCls+"-head-inner"]},[!i.icon&&!i.$slots.icon&&i.currentStatus!=="finish"&&i.currentStatus!=="error"?d("span",[i._v(i._s(i.stepNumber))]):i.$slots.icon?d("span",{staticClass:"ivu-steps-icon"},[i._t("icon")],2):d("span",{class:i.iconClasses})])]),i._v(" "),d("div",{class:[i.prefixCls+"-main"]},[d("div",{class:[i.prefixCls+"-title"]},[i._t("title",function(){return[i._v(i._s(i.title))]})],2),i._v(" "),i.content||i.$slots.content?d("div",{class:[i.prefixCls+"-content"]},[i._t("content",function(){return[i._v(i._s(i.content))]})],2):i._e()])])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(550),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(234),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(551);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("span",{class:i.wrapClasses,style:i.wrapStyles,attrs:{tabindex:"0"},on:{click:i.toggle,keydown:function(m){return!m.type.indexOf("key")&&i._k(m.keyCode,"space",32,m.key,[" ","Spacebar"])?null:i.toggle.apply(null,arguments)}}},[d("input",{attrs:{type:"hidden",name:i.name},domProps:{value:i.currentValue}}),i._v(" "),d("span",{class:i.innerClasses},[i.currentValue===i.trueValue?i._t("open"):i._e(),i._v(" "),i.currentValue===i.falseValue?i._t("close"):i._e()],2)])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(553),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(235),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(583);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){r.exports={default:s(555),__esModule:!0}},function(r,a,s){s(79),s(36),s(46),s(556),s(562),s(565),s(567),r.exports=s(5).Set},function(r,a,s){var l=s(557),c=s(236),h="Set";r.exports=s(558)(h,function(i){return function(){return i(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,a,s){var l=s(16).f,c=s(55),h=s(90),i=s(25),p=s(88),d=s(51),v=s(72),m=s(102),_=s(190),y=s(13),b=s(77).fastKey,E=s(236),D=y?"_s":"size",x=function(C,k){var w=b(k),T;if(w!=="F")return C._i[w];for(T=C._f;T;T=T.n)if(T.k==k)return T};r.exports={getConstructor:function(C,k,w,T){var M=C(function(A,R){p(A,M,k,"_i"),A._t=k,A._i=c(null),A._f=void 0,A._l=void 0,A[D]=0,R!=null&&d(R,w,A[T],A)});return h(M.prototype,{clear:function(){for(var R=E(this,k),H=R._i,L=R._f;L;L=L.n)L.r=!0,L.p&&(L.p=L.p.n=void 0),delete H[L.i];R._f=R._l=void 0,R[D]=0},delete:function(A){var R=E(this,k),H=x(R,A);if(H){var L=H.n,V=H.p;delete R._i[H.i],H.r=!0,V&&(V.n=L),L&&(L.p=V),R._f==H&&(R._f=L),R._l==H&&(R._l=V),R[D]--}return!!H},forEach:function(R){E(this,k);for(var H=i(R,arguments.length>1?arguments[1]:void 0,3),L;L=L?L.n:this._f;)for(H(L.v,L.k,this);L&&L.r;)L=L.p},has:function(R){return!!x(E(this,k),R)}}),y&&l(M.prototype,"size",{get:function(){return E(this,k)[D]}}),M},def:function(C,k,w){var T=x(C,k),M,A;return T?T.v=w:(C._l=T={i:A=b(k,!0),k,v:w,p:M=C._l,n:void 0,r:!1},C._f||(C._f=T),M&&(M.n=T),C[D]++,A!=="F"&&(C._i[A]=T)),C},getEntry:x,setStrong:function(C,k,w){v(C,k,function(T,M){this._t=E(T,k),this._k=M,this._l=void 0},function(){for(var T=this,M=T._k,A=T._l;A&&A.r;)A=A.p;return!T._t||!(T._l=A=A?A.n:T._t._f)?(T._t=void 0,m(1)):M=="keys"?m(0,A.k):M=="values"?m(0,A.v):m(0,[A.k,A.v])},w?"entries":"values",!w,!0),_(k)}}},function(r,a,s){var l=s(9),c=s(7),h=s(77),i=s(31),p=s(26),d=s(90),v=s(51),m=s(88),_=s(19),y=s(47),b=s(16).f,E=s(559)(0),D=s(13);r.exports=function(x,C,k,w,T,M){var A=l[x],R=A,H=T?"set":"add",L=R&&R.prototype,V={};return!D||typeof R!="function"||!(M||L.forEach&&!i(function(){new R().entries().next()}))?(R=w.getConstructor(C,x,T,H),d(R.prototype,k),h.NEED=!0):(R=C(function(j,oe){m(j,R,x,"_c"),j._c=new A,oe!=null&&v(oe,T,j[H],j)}),E("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(j){var oe=j=="add"||j=="set";j in L&&!(M&&j=="clear")&&p(R.prototype,j,function(Te,pe){if(m(this,R,j),!oe&&M&&!_(Te))return j=="get"?void 0:!1;var ye=this._c[j](Te===0?0:Te,pe);return oe?this:ye})}),M||b(R.prototype,"size",{get:function(){return this._c.size}})),y(R,x),V[x]=R,c(c.G+c.W+c.F,V),M||w.setStrong(R,x,T),R}},function(r,a,s){var l=s(25),c=s(64),h=s(29),i=s(52),p=s(560);r.exports=function(d,v){var m=d==1,_=d==2,y=d==3,b=d==4,E=d==6,D=d==5||E,x=v||p;return function(C,k,w){for(var T=h(C),M=c(T),A=l(k,w,3),R=i(M.length),H=0,L=m?x(C,R):_?x(C,0):void 0,V,j;R>H;H++)if((D||H in M)&&(V=M[H],j=A(V,H,T),d)){if(m)L[H]=j;else if(j)switch(d){case 3:return!0;case 5:return V;case 6:return H;case 2:L.push(V)}else if(b)return!1}return E?-1:y||b?b:L}}},function(r,a,s){var l=s(561);r.exports=function(c,h){return new(l(c))(h)}},function(r,a,s){var l=s(19),c=s(111),h=s(10)("species");r.exports=function(i){var p;return c(i)&&(p=i.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,a,s){var l=s(7);l(l.P+l.R,"Set",{toJSON:s(563)("Set")})},function(r,a,s){var l=s(56),c=s(564);r.exports=function(h){return function(){if(l(this)!=h)throw TypeError(h+"#toJSON isn't generic");return c(this)}}},function(r,a,s){var l=s(51);r.exports=function(c,h){var i=[];return l(c,!1,i.push,i,h),i}},function(r,a,s){s(566)("Set")},function(r,a,s){var l=s(7);r.exports=function(c){l(l.S,c,{of:function(){for(var i=arguments.length,p=new Array(i);i--;)p[i]=arguments[i];return new this(p)}})}},function(r,a,s){s(568)("Set")},function(r,a,s){var l=s(7),c=s(43),h=s(25),i=s(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),i(v,!1,function(D){y.push(E(D,b++))})):i(v,!1,y.push,y),new this(y))}})}},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(237),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(571);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(1),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.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,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("table",{style:i.styles,attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[d("colgroup",[i._l(i.columns,function(v,m){return d("col",{attrs:{width:i.setCellWidth(v)}})}),i._v(" "),i.$parent.showVerticalScrollBar?d("col",{attrs:{width:i.$parent.scrollBarWidth}}):i._e()],2),i._v(" "),d("thead",i._l(i.headRows,function(v,m){return d("tr",[i._l(v,function(_,y){var b;return d("th",{class:i.alignCls(_),attrs:{colspan:_.colSpan,rowspan:_.rowSpan}},[d("div",{class:i.cellClasses(_)},[_.type==="expand"?[_.renderHeader?d("render-header",{attrs:{render:_.renderHeader,column:_,index:y}}):d("span",[i._v(i._s(_.title||""))])]:_.type==="selection"?[_.hideSelectAll?i._e():d("Checkbox",{attrs:{value:i.isSelectAll,disabled:i.isSelectDisabled},on:{"on-change":i.selectAll}})]:[_.renderHeader?d("render-header",{attrs:{render:_.renderHeader,column:_,index:y}}):d("span",{class:(b={},b[i.prefixCls+"-cell-sort"]=_.sortable,b),on:{click:function(D){_.sortable&&i.handleSortByHead(i.getColumn(m,y)._index)}}},[i._v(i._s(_.title||"#"))]),i._v(" "),_.sortable?d("span",{class:[i.prefixCls+"-sort"]},[d("i",{staticClass:"ivu-icon ivu-icon-md-arrow-dropup",class:{on:i.getColumn(m,y)._sortType==="asc"},on:{click:function(D){i.handleSort(i.getColumn(m,y)._index,"asc")}}}),i._v(" "),d("i",{staticClass:"ivu-icon ivu-icon-md-arrow-dropdown",class:{on:i.getColumn(m,y)._sortType==="desc"},on:{click:function(D){i.handleSort(i.getColumn(m,y)._index,"desc")}}})]):i._e(),i._v(" "),i.isPopperShow(_)?d("Poptip",{attrs:{placement:"bottom","popper-class":"ivu-table-popper",transfer:"",capture:!1},on:{"on-popper-hide":function(D){i.handleFilterHide(i.getColumn(m,y)._index)}},model:{value:i.getColumn(m,y)._filterVisible,callback:function(D){i.$set(i.getColumn(m,y),"_filterVisible",D)},expression:"getColumn(rowIndex, index)._filterVisible"}},[d("span",{class:[i.prefixCls+"-filter"]},[d("i",{staticClass:"ivu-icon ivu-icon-ios-funnel",class:{on:i.getColumn(m,y)._isFiltered}})]),i._v(" "),i.getColumn(m,y)._filterMultiple?d("div",{class:[i.prefixCls+"-filter-list"],attrs:{slot:"content"},slot:"content"},[d("div",{class:[i.prefixCls+"-filter-list-item"]},[d("checkbox-group",{model:{value:i.getColumn(m,y)._filterChecked,callback:function(D){i.$set(i.getColumn(m,y),"_filterChecked",D)},expression:"getColumn(rowIndex, index)._filterChecked"}},i._l(_.filters,function(E,D){return d("checkbox",{key:D,attrs:{label:E.value}},[i._v(i._s(E.label))])}),1)],1),i._v(" "),d("div",{class:[i.prefixCls+"-filter-footer"]},[d("i-button",{attrs:{type:"text",size:"small",disabled:!i.getColumn(m,y)._filterChecked.length},nativeOn:{click:function(D){i.handleFilter(i.getColumn(m,y)._index)}}},[i._v(i._s(i.t("i.table.confirmFilter")))]),i._v(" "),d("i-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(D){i.handleReset(i.getColumn(m,y)._index)}}},[i._v(i._s(i.t("i.table.resetFilter")))])],1)]):d("div",{class:[i.prefixCls+"-filter-list"],attrs:{slot:"content"},slot:"content"},[d("ul",{class:[i.prefixCls+"-filter-list-single"]},[d("li",{class:i.itemAllClasses(i.getColumn(m,y)),on:{click:function(D){i.handleReset(i.getColumn(m,y)._index)}}},[i._v(i._s(i.t("i.table.clearFilter")))]),i._v(" "),i._l(_.filters,function(E){return d("li",{class:i.itemClasses(i.getColumn(m,y),E),on:{click:function(x){i.handleSelect(i.getColumn(m,y)._index,E.value)}}},[i._v(i._s(E.label))])})],2)])]):i._e()]],2),i._v(" "),_.resizable?d("div",{staticClass:"ivu-table-header-resizable",on:{mousedown:function(D){return i.handleMouseDown(_,D)},mousemove:function(D){return i.handleMouseMove(_,D)},mouseout:i.handleMouseOut}}):i._e()])}),i._v(" "),i.$parent.showVerticalScrollBar&&m===0?d("th",{class:i.scrollBarCellClass(),attrs:{rowspan:i.headRows.length}}):i._e()],2)}),0)])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(238),c=s.n(l);for(var h in l)h!=="default"&&function(E){s.d(a,E,function(){return l[E]})}(h);var i=s(0),p,d,v=!1,m=null,_=null,y=null,b=Object(i.a)(c.a,p,d,v,m,_,y);a.default=b.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(239),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(574);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return i.draggable?d("tr",{class:i.rowClasses(i.row._index),attrs:{draggable:i.draggable},on:{dragstart:function(m){return i.onDrag(m,i.row._index)},drop:function(m){return i.onDrop(m,i.row._index)},dragover:function(m){return i.allowDrop(m)}}},[i._t("default")],2):d("tr",{class:i.rowClasses(i.row._index),attrs:{draggable:!1}},[i._t("default")],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(240),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(577);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(1),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.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,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{ref:"cell",class:i.classes},[i.renderType==="index"?[d("span",[i._v(i._s(i.column.indexMethod?i.column.indexMethod(i.row,i.naturalIndex):i.naturalIndex+1))])]:i._e(),i._v(" "),i.renderType==="selection"?[d("Checkbox",{attrs:{value:i.checked,disabled:i.disabled},on:{"on-change":i.toggleSelect},nativeOn:{click:function(m){return m.stopPropagation(),i.handleClick.apply(null,arguments)}}})]:i._e(),i._v(" "),i.showLevel?d("div",{staticClass:"ivu-table-cell-tree-level",style:i.treeLevelStyle}):i._e(),i._v(" "),i.showChildren?d("div",{staticClass:"ivu-table-cell-tree",class:{"ivu-table-cell-tree-loading":i.childrenLoading},on:{click:function(m){return m.preventDefault(),m.stopPropagation(),i.handleToggleTree.apply(null,arguments)}}},[i.childrenLoading?d("Icon",{staticClass:"ivu-load-loop",attrs:{type:"ios-loading"}}):i.childrenExpand?d("Icon",{attrs:{type:"ios-remove"}}):d("Icon",{attrs:{type:"ios-add"}})],1):i.showTreeNode?d("div",{staticClass:"ivu-table-cell-tree ivu-table-cell-tree-empty"}):i._e(),i._v(" "),i.renderType==="html"?[d("span",{domProps:{innerHTML:i._s(i.row[i.column.key])}})]:i._e(),i._v(" "),i.renderType==="normal"?[i.column.tooltip?[d("Tooltip",{staticClass:"ivu-table-cell-tooltip",attrs:{transfer:"",content:i.row[i.column.key],theme:i.column.tooltipTheme?i.column.tooltipTheme:i.tableRoot.tooltipTheme,disabled:!i.showTooltip,"max-width":i.column.tooltipMaxWidth?i.column.tooltipMaxWidth:i.tableRoot.tooltipMaxWidth}},[d("span",{ref:"content",staticClass:"ivu-table-cell-tooltip-content",on:{mouseenter:i.handleTooltipIn}},[i._v(i._s(i.row[i.column.key]))])])]:d("span",[i._v(i._s(i.row[i.column.key]))])]:i._e(),i._v(" "),i.renderType==="expand"&&!i.row._disableExpand?[d("div",{class:i.expandCls,on:{click:i.toggleExpand}},[d("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]:i._e(),i._v(" "),i.renderType==="render"?d("table-expand",{attrs:{row:i.row,column:i.column,index:i.index,render:i.column.render}}):i._e(),i._v(" "),i.renderType==="slot"?d("table-slot",{attrs:{row:i.row,column:i.column,display:i.column.display||"block",index:i.index}}):i._e()],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(242),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(579);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{staticStyle:{overflow:"hidden"}},[d("table",{staticClass:"ivu-table-summary",style:i.styleObject,attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[d("colgroup",i._l(i.columns,function(v,m){return d("col",{attrs:{width:i.setCellWidth(v)}})}),0),i._v(" "),d("tbody",{class:[i.prefixCls+"-tbody"]},[d("tr",{staticClass:"ivu-table-row"},i._l(i.columns,function(v,m){return d("td",{class:i.alignCls(v)},[d("div",{staticClass:"ivu-table-cell",class:i.cellCls(v)},[d("span",[i._v(i._s(i.data[v.key].value))])])])}),0)])])])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(22),c=v(l),h=s(14),i=v(h),p=s(1),d=v(p);a.default=b;function v(E){return E&&E.__esModule?E:{default:E}}var m=`\r `,_=function(E,D,x){var C=x.separator,k=x.quoted;(0,d.default)(void 0,void 0);var w=D.map(function(T){return(0,d.default)(void 0,void 0),k?(T=typeof T=="string"?T.replace(/"/g,'"'):T,'"'+String(T)+'"'):T}.bind(void 0));E.push(w.join(C))}.bind(void 0),y={separator:",",quoted:!1};function b(E,D,x){var C=this,k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;x=(0,i.default)({},y,x);var w=void 0,T=[],M=[];return E?(w=E.map(function(A){return(0,d.default)(this,C),typeof A=="string"?A:(k||M.push(typeof A.title!="undefined"?A.title:A.key),A.key)}.bind(this)),M.length>0&&_(T,M,x)):(w=[],D.forEach(function(A){(0,d.default)(this,C),Array.isArray(A)||(w=w.concat((0,c.default)(A)))}.bind(this)),w.length>0&&(w=w.filter(function(A,R,H){return(0,d.default)(this,C),H.indexOf(A)===R}.bind(this)),k||_(T,w,x))),Array.isArray(D)&&D.forEach(function(A){(0,d.default)(this,C),Array.isArray(A)||(A=w.map(function(R){return(0,d.default)(this,C),typeof A[R]!="undefined"?A[R]:""}.bind(this))),_(T,A,x)}.bind(this)),T.join(m)}},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});function l(h){var i=navigator.userAgent;if(h==="ie"){var p=i.indexOf("compatible")>-1&&i.indexOf("MSIE")>-1;if(p){var d=new RegExp("MSIE (\\d+\\.\\d+);");return d.test(i),parseFloat(RegExp.$1)}else return!1}else return i.indexOf(h)>-1}var c={_isIE11:function(){var i=0,p=/MSIE (\d+\.\d+);/.test(navigator.userAgent),d=!!navigator.userAgent.match(/Trident\/7.0/),v=navigator.userAgent.indexOf("rv:11.0");return p&&(i=Number(RegExp.$1)),navigator.appVersion.indexOf("MSIE 10")!==-1&&(i=10),d&&v!==-1&&(i=11),i===11},_isEdge:function(){return/Edge/.test(navigator.userAgent)},_getDownloadUrl:function(i){var p="\uFEFF";if(window.Blob&&window.URL&&window.URL.createObjectURL){var d=new Blob([p+i],{type:"text/csv"});return URL.createObjectURL(d)}else return"data:attachment/csv;charset=utf-8,"+p+encodeURIComponent(i)},download:function(i,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",i),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,i)}else{var _=document.createElement("a");_.download=i,_.href=this._getDownloadUrl(p),document.body.appendChild(_),_.click(),document.body.removeChild(_)}}};a.default=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.getRandomStr=a.convertToRows=a.getAllColumns=a.convertColumnOrder=void 0;var l=s(1),c=i(l),h=s(3);function i(_){return _&&_.__esModule?_:{default:_}}var p=function(_,y){(0,c.default)(void 0,void 0);var b=[],E=[];return _.forEach(function(D){(0,c.default)(void 0,void 0),D.fixed&&D.fixed===y?b.push(D):E.push(D)}.bind(void 0)),b.concat(E)}.bind(void 0);a.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(D){(0,c.default)(void 0,void 0),D.children?(y&&E.push(D),E.push.apply(E,d(D.children,y))):E.push(D)}.bind(void 0)),E}.bind(void 0);a.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,D=function(w,T){if((0,c.default)(void 0,void 0),T&&(w.level=T.level+1,E0&&arguments[0]!==void 0?arguments[0]:32,b="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",E=b.length,D="",x=0;x=6e4&&E<36e5?D=Math.floor(E/6e4)+(_("i.time.minutes")||"\u5206\u949F")+x:E>=36e5&&E<864e5?D=Math.floor(E/36e5)+(_("i.time.hours")||"\u5C0F\u65F6")+x:E>=864e5&&E<262386e4?D=Math.floor(E/864e5)+(_("i.time.days")||"\u5929")+x:E>=262386e4&&E<=3156786e4&&b?D=d(m):D=d(m,"year"),D}.bind(void 0)},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("span",{class:i.classes,on:{click:i.handleClick}},[i._v(i._s(i.date))])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(597),c=p(l),h=s(599),i=p(h);function p(d){return d&&d.__esModule?d:{default:d}}c.default.Item=i.default,a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(247),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(598);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("ul",{class:i.classes},[i._t("default")],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(248),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(600);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("li",{class:i.itemClasses},[d("div",{class:i.tailClasses}),i._v(" "),d("div",{ref:"dot",class:i.headClasses,style:i.customColor},[i._t("dot")],2),i._v(" "),d("div",{class:i.contentClasses},[i._t("default")],2)])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(602),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(1),c=E(l),h=s(157),i=E(h),p=s(166),d=E(p),v=s(175),m=E(v),_=s(58),y=E(_),b=s(3);function E(D){return D&&D.__esModule?D:{default:D}}a.default={mixins:[i.default,y.default],components:{TimePickerPanel:d.default,RangeTimePickerPanel:m.default},props:{type:{validator:function(x){return(0,b.oneOf)(x,["time","timerange"])},default:"time"}},computed:{panel:function(){var x=this.type==="timerange";return x?"RangeTimePickerPanel":"TimePickerPanel"},ownPickerProps:function(){return{disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions}}},watch:{visible:function(x){var C=this;x&&this.$nextTick(function(){(0,c.default)(this,C);var k=(0,b.findComponentsDownward)(this,"TimeSpinner");k.forEach(function(w){return(0,c.default)(this,C),w.updateScroll()}.bind(this))}.bind(this))}}}},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(93),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(605),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(249),c=s.n(l);for(var h in l)h!=="default"&&function(E){s.d(a,E,function(){return l[E]})}(h);var i=s(0),p,d,v=!1,m=null,_=null,y=null,b=Object(i.a)(c.a,p,d,v,m,_,y);a.default=b.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(250),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(609);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(251),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(608);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.prefixCls},[d("i-input",{attrs:{size:"small",icon:i.icon,placeholder:i.placeholder},on:{"on-click":i.handleClick},model:{value:i.currentQuery,callback:function(m){i.currentQuery=m},expression:"currentQuery"}})],1)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.classes,style:i.listStyle},[d("div",{class:i.prefixCls+"-header"},[d("Checkbox",{attrs:{value:i.checkedAll,disabled:i.checkedAllDisabled},on:{"on-change":i.toggleSelectAll}}),i._v(" "),d("span",{class:i.prefixCls+"-header-title",on:{click:function(m){return i.toggleSelectAll(!i.checkedAll)}}},[i._v(i._s(i.title))]),i._v(" "),d("span",{class:i.prefixCls+"-header-count"},[i._v(i._s(i.count))])],1),i._v(" "),d("div",{class:i.bodyClasses},[i.filterable?d("div",{class:i.prefixCls+"-body-search-wrapper"},[d("Search",{attrs:{"prefix-cls":i.prefixCls+"-search",query:i.query,placeholder:i.filterPlaceholder},on:{"on-query-clear":i.handleQueryClear,"on-query-change":i.handleQueryChange}})],1):i._e(),i._v(" "),d("ul",{class:i.prefixCls+"-content"},[i._l(i.filterData,function(v){return d("li",{class:i.itemClasses(v),on:{click:function(_){return _.preventDefault(),i.select(v)}}},[d("Checkbox",{attrs:{value:i.isCheck(v),disabled:v.disabled}}),i._v(" "),d("span",{domProps:{innerHTML:i._s(i.showLabel(v))}})],1)}),i._v(" "),d("li",{class:i.prefixCls+"-content-not-found"},[i._v(i._s(i.notFoundText))])],2)]),i._v(" "),i.showFooter?d("div",{class:i.prefixCls+"-footer"},[i._t("default")],2):i._e()])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(252),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(611);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.prefixCls+"-operation"},[i.reverseOperation?[d("i-button",{attrs:{type:"primary",size:"small",disabled:!i.leftActive},nativeOn:{click:function(m){return i.moveToRight.apply(null,arguments)}}},[d("span",[i._v(i._s(i.operations[1]))]),i._v(" "),d("Icon",{attrs:{type:"ios-arrow-forward"}})],1),i._v(" "),d("i-button",{attrs:{type:"primary",size:"small",disabled:!i.rightActive},nativeOn:{click:function(m){return i.moveToLeft.apply(null,arguments)}}},[d("Icon",{attrs:{type:"ios-arrow-back"}}),i._v(" "),d("span",[i._v(i._s(i.operations[0]))])],1)]:[d("i-button",{attrs:{type:"primary",size:"small",disabled:!i.rightActive},nativeOn:{click:function(m){return i.moveToLeft.apply(null,arguments)}}},[d("Icon",{attrs:{type:"ios-arrow-back"}}),i._v(" "),d("span",[i._v(i._s(i.operations[0]))])],1),i._v(" "),d("i-button",{attrs:{type:"primary",size:"small",disabled:!i.leftActive},nativeOn:{click:function(m){return i.moveToRight.apply(null,arguments)}}},[d("span",[i._v(i._s(i.operations[1]))]),i._v(" "),d("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(613),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(253),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(617);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(254),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(616);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(1),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.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,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("collapse-transition",{attrs:{appear:i.appear}},[d("ul",{class:i.classes},[d("li",{on:{contextmenu:function(m){return m.stopPropagation(),i.handleContextmenu(i.data,m)},selectstart:function(m){return m.stopPropagation(),i.handlePreventSelect(i.data,m)}}},[d("span",{class:i.arrowClasses,on:{click:i.handleExpand}},[i.showArrow?d("Icon",{attrs:{type:i.arrowType,custom:i.customArrowType,size:i.arrowSize}}):i._e(),i._v(" "),i.showLoading?d("Icon",{staticClass:"ivu-load-loop",attrs:{type:"ios-loading"}}):i._e()],1),i._v(" "),i.showCheckbox?d("Checkbox",{attrs:{value:i.data.checked,indeterminate:i.data.indeterminate,disabled:i.data.disabled||i.data.disableCheckbox},nativeOn:{click:function(m){return m.preventDefault(),i.handleCheck.apply(null,arguments)}}}):i._e(),i._v(" "),d("span",{class:i.titleClasses,on:{click:i.handleClickNode}},[i.data.render?d("Render",{attrs:{render:i.data.render,data:i.data,node:i.node}}):i.isParentRender?d("Render",{attrs:{render:i.parentRender,data:i.data,node:i.node}}):[i._v(i._s(i.data.title))]],2),i._v(" "),i._l(i.children,function(v,m){return i.data.expand?d("Tree-node",{key:m,attrs:{appear:i.appearByClickArrow,data:v,multiple:i.multiple,"show-checkbox":i.showCheckbox,"children-key":i.childrenKey}}):i._e()})],2)])])},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{ref:"treeWrap",class:i.prefixCls},[i._l(i.stateTree,function(v,m){return d("Tree-node",{key:m,attrs:{data:v,visible:"",multiple:i.multiple,"show-checkbox":i.showCheckbox,"children-key":i.childrenKey}})}),i._v(" "),i.stateTree.length?i._e():d("div",{class:[i.prefixCls+"-empty"]},[i._v(i._s(i.localeEmptyText))]),i._v(" "),d("div",{staticClass:"ivu-tree-context-menu",style:i.contextMenuStyles},[d("Dropdown",{attrs:{trigger:"custom",visible:i.contextMenuVisible,transfer:""},on:{"on-clickoutside":i.handleClickContextMenuOutside}},[d("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[i._t("contextMenu")],2)],1)],1)],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(619),c=h(l);function h(i){return i&&i.__esModule?i:{default:i}}a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(255),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(623);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(256),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(621);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("ul",{class:[i.prefixCls+"-list"]},i._l(i.files,function(v){return d("li",{class:i.fileCls(v),on:{click:function(_){return i.handleClick(v)}}},[d("span",{on:{click:function(_){return i.handlePreview(v)}}},[d("Icon",{attrs:{type:i.format(v)}}),i._v(" "+i._s(v.name)+` `)],1),i._v(" "),d("Icon",{directives:[{name:"show",rawName:"v-show",value:v.status==="finished",expression:"file.status === 'finished'"}],class:[i.prefixCls+"-list-remove"],attrs:{type:"ios-close"},nativeOn:{click:function(_){return i.handleRemove(v)}}}),i._v(" "),d("transition",{attrs:{name:"fade"}},[v.showProgress?d("i-progress",{attrs:{"stroke-width":2,percent:i.parsePercentage(v.percentage),status:v.status==="finished"&&v.showProgress?"success":"normal"}}):i._e()],1)],1)}),0)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(1),c=p(l),h=s(22),i=p(h);a.default=m;function p(_){return _&&_.__esModule?_:{default:_}}function d(_,y,b){var E="fail to post "+String(_)+" "+String(b.status)+"'",D=new Error(E);return D.status=b.status,D.method="post",D.url=_,D}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(w){w.total>0&&(w.percent=w.loaded/w.total*100),_.onProgress(w)});var D=new FormData;_.data&&(0,i.default)(_.data).map(function(k){(0,c.default)(this,y),D.append(k,_.data[k])}.bind(this)),D.append(_.filename,_.file),b.onerror=function(w){_.onError(w)},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 x=_.headers||{};for(var C in x)x.hasOwnProperty(C)&&x[C]!==null&&b.setRequestHeader(C,x[C]);b.send(D)}}},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:[i.prefixCls]},[d("div",{class:i.classes,on:{click:i.handleClick,drop:function(m){return m.preventDefault(),i.onDrop.apply(null,arguments)},paste:i.handlePaste,dragover:function(m){m.preventDefault(),i.dragOver=!0},dragleave:function(m){m.preventDefault(),i.dragOver=!1}}},[d("input",{ref:"input",class:[i.prefixCls+"-input"],attrs:{type:"file",multiple:i.multiple,webkitdirectory:i.webkitdirectory,accept:i.accept},on:{change:i.handleChange}}),i._v(" "),i._t("default")],2),i._v(" "),i._t("tip"),i._v(" "),i.showUploadList?d("upload-list",{attrs:{files:i.fileList},on:{"on-file-remove":i.handleRemove,"on-file-preview":i.handlePreview}}):i._e()],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.Col=a.Row=void 0;var l=s(625),c=p(l),h=s(627),i=p(h);function p(d){return d&&d.__esModule?d:{default:d}}a.Row=c.default,a.Col=i.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(257),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(626);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.classes,style:i.styles},[i._t("default")],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(258),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(628);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("div",{class:i.classes,style:i.styles},[i._t("default")],2)},c=[];a.render=l,a.staticRenderFns=c},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.OptionGroup=a.Option=a.Select=void 0;var l=s(74),c=v(l),h=s(81),i=v(h),p=s(630),d=v(p);function v(m){return m&&m.__esModule?m:{default:m}}a.Select=c.default,a.Option=i.default,a.OptionGroup=d.default,a.default=c.default},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=s(259),c=s.n(l);for(var h in l)h!=="default"&&function(b){s.d(a,b,function(){return l[b]})}(h);var i=s(631);s.n(i);var p=s(0),d=!1,v=null,m=null,_=null,y=Object(p.a)(c.a,i.render,i.staticRenderFns,d,v,m,_);a.default=y.exports},function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var l=function(){var i=this,p=i.$createElement,d=i._self._c||p;return d("li",{directives:[{name:"show",rawName:"v-show",value:!i.hidden,expression:"!hidden"}],class:[i.prefixCls+"-wrap"]},[d("div",{class:[i.prefixCls+"-title"]},[i._v(i._s(i.label))]),i._v(" "),d("ul",[d("li",{ref:"options",class:[i.prefixCls]},[i._t("default")],2)])])},c=[];a.render=l,a.staticRenderFns=c}])})})(m8);var Ea=k6(m8.exports);const ey=$A(window).width(),jV=$A(window).height(),ty=$A.screenOrientation();var zV={clientId:"",windowActive:!0,windowScrollY:0,windowTouch:"ontouchend"in document,windowWidth:ey,windowHeight:jV,windowOrientation:ty,windowLandscape:ty==="landscape",windowPortrait:ty==="portrait",formLabelPosition:ey>576?"right":"top",formLabelWidth:ey>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,userOnline:{},userAvatar:{},dialogId:0,dialogSearchMsgId:0,dialogIns:[],dialogMsgs:[],dialogTodos:[],dialogHistory:[],dialogDraftTimer:{},dialogMsgTransfer:{time:0},dialogSseList:[],messengerSearchKey:{dialog:"",contacts:""},fileLists:[],fileLinks:[],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:"#444444"},{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:""},{name:"\u9EC4\u8272",color:"#fffae6"},{name:"\u84DD\u8272",color:"#e5f5ff"},{name:"\u7EFF\u8272",color:"#ecffe5"},{name:"\u7C89\u8272",color:"#ffeaee"},{name:"\u7D2B\u8272",color:"#f6ecff"},{name:"\u7070\u8272",color:"#f3f3f3"}],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}},UV={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:a})=>a==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")),a=(p,d=!0)=>p.archived_at||p.complete_at&&d===!0?!1:p.owner==1;let s=e.cacheTasks.filter(p=>a(p)),l=0;if(e.taskCompleteTemps.length>0){let p=e.cacheTasks.filter(d=>e.taskCompleteTemps.includes(d.id)&&a(d,!1));p.length>0&&(l=p.length,s=$A.cloneJSON(s),s.push(...p))}const c=s.filter(p=>{const d=$A.Date(p.end_at);return t<=d&&d<=n}),h=s.filter(p=>p.end_at&&$A.Date(p.end_at)<=r),i={today:c,today_count:c.length,overdue:h,overdue_count:h.length,all:s,all_count:s.length};return l>0&&(i.today_count-=c.filter(p=>e.taskCompleteTemps.includes(p.id)).length,i.overdue_count-=h.filter(p=>e.taskCompleteTemps.includes(p.id)).length,i.all_count-=l),i},assistTask(e){const t=(r,a=!0)=>r.archived_at||r.complete_at&&a===!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(a=>e.taskCompleteTemps.includes(a.id)&&t(a,!1));r.length>0&&(n=$A.cloneJSON(n),n.push(...r))}return n}};const pa=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Gu=Symbol("doneWritingPromise"),g8=Symbol("doneWritingResolve"),_8=Symbol("doneWritingReject"),hd=Symbol("readingIndex");class Ds extends Array{constructor(){super(),this[Gu]=new Promise((t,n)=>{this[g8]=t,this[_8]=n}),this[Gu].catch(()=>{})}}function Tr(e){return e&&e.getReader&&Array.isArray(e)}function Dd(e){if(!Tr(e)){const t=e.getWriter(),n=t.releaseLock;return t.releaseLock=()=>{t.closed.catch(function(){}),n.call(t)},t}this.stream=e}Ds.prototype.getReader=function(){return this[hd]===void 0&&(this[hd]=0),{read:async()=>(await this[Gu],this[hd]===this.length?{value:void 0,done:!0}:{value:this[this[hd]++],done:!1})}},Ds.prototype.readToEnd=async function(e){await this[Gu];const t=e(this.slice(this[hd]));return this.length=0,t},Ds.prototype.clone=function(){const e=new Ds;return e[Gu]=this[Gu].then(()=>{e.push(...this)}),e},Dd.prototype.write=async function(e){this.stream.push(e)},Dd.prototype.close=async function(){this.stream[g8]()},Dd.prototype.abort=async function(e){return this.stream[_8](e),e},Dd.prototype.releaseLock=function(){};const hg=typeof pa.process=="object"&&typeof pa.process.versions=="object",yE=hg&&void 0;function ea(e){return Tr(e)?"array":pa.ReadableStream&&pa.ReadableStream.prototype.isPrototypeOf(e)?"web":ao&&ao.prototype.isPrototypeOf(e)?"ponyfill":yE&&yE.prototype.isPrototypeOf(e)?"node":!(!e||!e.getReader)&&"web-like"}function pg(e){return Uint8Array.prototype.isPrototypeOf(e)}function y8(e){if(e.length===1)return e[0];let t=0;for(let a=0;a{n||(VV.isBuffer(a)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),r.enqueue(a),t.pause())}),t.on("end",()=>{n||r.close()}),t.on("error",a=>r.error(a))},pull(){t.resume()},cancel(r){n=!0,t.destroy(r)}})};class e extends bE{constructor(n,r){super(r),this._reader=Bs(n)}async _read(n){try{for(;;){const{done:r,value:a}=await this._reader.read();if(r){this.push(null);break}if(!this.push(a)||this._cancelling){this._reading=!1;break}}}catch(r){this.emit("error",r)}}_destroy(n){this._reader.cancel(n)}}x1=function(t,n){return new e(t,n)}}const wE=new WeakSet,ir=Symbol("externalBuffer");function hs(e){if(this.stream=e,e[ir]&&(this[ir]=e[ir].slice()),Tr(e)){const r=e.getReader();return this._read=r.read.bind(r),this._releaseLock=()=>{},void(this._cancel=()=>{})}let t=ea(e);if(t==="node"&&(e=vg(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||wE.has(e)?{value:void 0,done:!0}:(n=!0,{value:e,done:!1}),this._releaseLock=()=>{if(n)try{wE.add(e)}catch{}}}hs.prototype.read=async function(){return this[ir]&&this[ir].length?{done:!1,value:this[ir].shift()}:this._read()},hs.prototype.releaseLock=function(){this[ir]&&(this.stream[ir]=this[ir]),this._releaseLock()},hs.prototype.cancel=function(e){return this._cancel(e)},hs.prototype.readLine=async function(){let e,t=[];for(;!e;){let{done:n,value:r}=await this.read();if(r+="",n)return t.length?Ji(t):void 0;const a=r.indexOf(` -`)+1;a&&(e=Ji(t.concat(r.substr(0,a))),t=[]),a!==r.length&&t.push(r.substr(a))}return this.unshift(...t),e},hs.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const n=t[0];return this.unshift(si(t,1)),n},hs.prototype.readBytes=async function(e){const t=[];let n=0;for(;;){const{done:r,value:a}=await this.read();if(r)return t.length?Ji(t):void 0;if(t.push(a),n+=a.length,n>=e){const s=Ji(t);return this.unshift(si(s,e)),si(s,0,e)}}},hs.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},hs.prototype.unshift=function(...e){this[ir]||(this[ir]=[]),e.length===1&&pg(e[0])&&this[ir].length&&e[0].length&&this[ir][0].byteOffset>=e[0].length?this[ir][0]=new Uint8Array(this[ir][0].buffer,this[ir][0].byteOffset-e[0].length,this[ir][0].byteLength+e[0].length):this[ir].unshift(...e.filter(t=>t&&t.length))},hs.prototype.readToEnd=async function(e=Ji){const t=[];for(;;){const{done:n,value:r}=await this.read();if(n)break;t.push(r)}return e(t)};let $0,b8,{ReadableStream:ao,WritableStream:w8,TransformStream:uc}=pa;async function C8(){if(uc)return;const[e,t]=await Promise.all([kn(()=>import("./ponyfill.es6.min.cf6531cc.js"),[]),kn(()=>import("./web-streams-adapter.min.da4ec8d3.js"),[])]);({ReadableStream:ao,WritableStream:w8,TransformStream:uc}=e);const{createReadableStreamWrapper:n}=t;pa.ReadableStream&&ao!==pa.ReadableStream&&($0=n(ao),b8=n(pa.ReadableStream))}const Kd=hg&&void 0;function Tf(e){let t=ea(e);return t==="node"?vg(e):t==="web"&&$0?$0(e):t?e:new ao({start(n){n.enqueue(e),n.close()}})}function x8(e){if(ea(e))return e;const t=new Ds;return(async()=>{const n=ta(t);await n.write(e),await n.close()})(),t}function Ji(e){return e.some(t=>ea(t)&&!Tr(t))?function(t){t=t.map(Tf);const n=E8(async function(s){await Promise.all(a.map(l=>R0(l,s)))});let r=Promise.resolve();const a=t.map((s,l)=>lo(s,(c,h)=>(r=r.then(()=>Jo(c,n.writable,{preventClose:l!==t.length-1})),r)));return n.readable}(e):e.some(t=>Tr(t))?function(t){const n=new Ds;let r=Promise.resolve();return t.forEach((a,s)=>(r=r.then(()=>Jo(a,n,{preventClose:s!==t.length-1})),r)),n}(e):typeof e[0]=="string"?e.join(""):Kd&&Kd.isBuffer(e[0])?Kd.concat(e):y8(e)}function Bs(e){return new hs(e)}function ta(e){return new Dd(e)}async function Jo(e,t,{preventClose:n=!1,preventAbort:r=!1,preventCancel:a=!1}={}){if(ea(e)&&!Tr(e)){e=Tf(e);try{if(e[ir]){const c=ta(t);for(let h=0;h{t=s}),t=null)},close:n.close.bind(n),abort:n.error.bind(n)})}}function Cr(e,t=()=>{},n=()=>{}){if(Tr(e)){const s=new Ds;return(async()=>{const l=ta(s);try{const c=await Ar(e),h=t(c),i=n();let p;p=h!==void 0&&i!==void 0?Ji([h,i]):h!==void 0?h:i,await l.write(p),await l.close()}catch(c){await l.abort(c)}})(),s}if(ea(e))return S8(e,{async transform(s,l){try{const c=await t(s);c!==void 0&&l.enqueue(c)}catch(c){l.error(c)}},async flush(s){try{const l=await n();l!==void 0&&s.enqueue(l)}catch(l){s.error(l)}}});const r=t(e),a=n();return r!==void 0&&a!==void 0?Ji([r,a]):r!==void 0?r:a}function lo(e,t){if(ea(e)&&!Tr(e)){let r;const a=new uc({start(c){r=c}}),s=Jo(e,a.writable),l=E8(async function(c){r.error(c),await s,await new Promise(setTimeout)});return t(a.readable,l.writable),l.readable}e=x8(e);const n=new Ds;return t(e,n),n}function mg(e,t){let n;const r=lo(e,(a,s)=>{const l=Bs(a);l.remainder=()=>(l.releaseLock(),Jo(a,s),r),n=t(l)});return n}function Ql(e){if(Tr(e))return e.clone();if(ea(e)){const t=function(n){if(Tr(n))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(ea(n)){const r=Tf(n).tee();return r[0][ir]=r[1][ir]=n[ir],r}return[si(n),si(n)]}(e);return k8(e,t[0]),t[1]}return si(e)}function qu(e){return Tr(e)?Ql(e):ea(e)?new ao({start(t){const n=lo(e,async(r,a)=>{const s=Bs(r),l=ta(a);try{for(;;){await l.ready;const{done:c,value:h}=await s.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)}});k8(e,n)}}):si(e)}function k8(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 si(e,t=0,n=1/0){if(Tr(e))throw Error("Not implemented");if(ea(e)){if(t>=0&&n>=0){let r=0;return S8(e,{transform(a,s){r=t&&s.enqueue(si(a,Math.max(t-r,0),n-r)),r+=a.length):s.terminate()}})}if(t<0&&(n<0||n===1/0)){let r=[];return Cr(e,a=>{a.length>=-t?r=[a]:r.push(a)},()=>si(Ji(r),t,n))}if(t===0&&n<0){let r;return Cr(e,a=>{const s=r?Ji([r,a]):a;if(s.length>=-n)return r=si(s,n),si(s,t,n);r=s})}return console.warn(`stream.slice(input, ${t}, ${n}) not implemented efficiently.`),rl(async()=>si(await Ar(e),t,n))}return e[ir]&&(e=Ji(e[ir].concat([e]))),!pg(e)||Kd&&Kd.isBuffer(e)?e.slice(t,n):(n===1/0&&(n=e.length),e.subarray(t,n))}async function Ar(e,t=Ji){return Tr(e)?e.readToEnd(t):ea(e)?Bs(e).readToEnd(t):e}async function R0(e,t){if(ea(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}function rl(e){const t=new Ds;return(async()=>{const n=ta(t);try{await n.write(await e()),await n.close()}catch(r){await n.abort(r)}})(),t}const D8="3.7.5",WV=D8,HV=typeof atob=="function",KV=typeof btoa=="function",Cc=typeof Buffer=="function",CE=typeof TextDecoder=="function"?new TextDecoder:void 0,xE=typeof TextEncoder=="function"?new TextEncoder:void 0,Od=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Hp=(e=>{let t={};return Od.forEach((n,r)=>t[n]=r),t})(),GV=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ii=String.fromCharCode.bind(String),SE=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),O8=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),T8=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),P8=e=>{let t,n,r,a,s="";const l=e.length%3;for(let c=0;c255||(r=e.charCodeAt(c++))>255||(a=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|a,s+=Od[t>>18&63]+Od[t>>12&63]+Od[t>>6&63]+Od[63&t]}return l?s.slice(0,l-3)+"===".substring(l):s},S1=KV?e=>btoa(e):Cc?e=>Buffer.from(e,"binary").toString("base64"):P8,L0=Cc?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;nt?O8(L0(e)):L0(e),YV=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?ii(192|t>>>6)+ii(128|63&t):ii(224|t>>>12&15)+ii(128|t>>>6&63)+ii(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return ii(240|t>>>18&7)+ii(128|t>>>12&63)+ii(128|t>>>6&63)+ii(128|63&t)},XV=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A8=e=>e.replace(XV,YV),EE=Cc?e=>Buffer.from(e,"utf8").toString("base64"):xE?e=>L0(xE.encode(e)):e=>S1(A8(e)),ec=(e,t=!1)=>t?O8(EE(e)):EE(e),kE=e=>ec(e,!0),JV=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ZV=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 ii(55296+(t>>>10))+ii(56320+(1023&t));case 3:return ii((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return ii((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},M8=e=>e.replace(JV,ZV),I8=e=>{if(e=e.replace(/\s+/g,""),!GV.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,a="";for(let s=0;s>16&255):r===64?ii(t>>16&255,t>>8&255):ii(t>>16&255,t>>8&255,255&t);return a},E1=HV?e=>atob(T8(e)):Cc?e=>Buffer.from(e,"base64").toString("binary"):I8,$8=Cc?e=>SE(Buffer.from(e,"base64")):e=>SE(E1(e).split("").map(t=>t.charCodeAt(0))),R8=e=>$8(L8(e)),QV=Cc?e=>Buffer.from(e,"base64").toString("utf8"):CE?e=>CE.decode($8(e)):e=>M8(E1(e)),L8=e=>T8(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),N0=e=>QV(L8(e)),N8=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),DE=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,N8(n));e("fromBase64",function(){return N0(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 R8(this)})},OE=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,N8(n));e("toBase64",function(t){return Mv(this,t)}),e("toBase64URI",function(){return Mv(this,!0)}),e("toBase64URL",function(){return Mv(this,!0)})},TE={version:D8,VERSION:WV,atob:E1,atobPolyfill:I8,btoa:S1,btoaPolyfill:P8,fromBase64:N0,toBase64:ec,encode:ec,encodeURI:kE,encodeURL:kE,utob:A8,btou:M8,decode:N0,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:Mv,toUint8Array:R8,extendString:DE,extendUint8Array:OE,extendBuiltins:()=>{DE(),OE()}};class Mi{constructor(t){if(t===void 0)throw Error("Invalid BigInteger input");if(t instanceof Uint8Array){const n=t,r=Array(n.length);for(let a=0;aBigInt(0);){const l=r&BigInt(1);r>>=BigInt(1);const c=s*a%n.value;s=l?c:s,a=a*a%n.value}return new Mi(s)}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),a=BigInt(1),s=BigInt(0),l=this.value;for(t=t.value;t!==BigInt(0);){const c=l/t;let h=n;n=a-c*n,a=h,h=r,r=s-c*r,s=h,h=t,t=l%t,l=h}return{x:new Mi(a),y:new Mi(s),gcd:new Mi(l)}}gcd(t){let n=this.value;for(t=t.value;t!==BigInt(0);){const r=t;t=n%t,n=r}return new Mi(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 Mi(0),n=new Mi(1),r=new Mi(-1),a=this.isNegative()?r:t;let s=1;const l=this.clone();for(;!l.irightShift(n).equal(a);)s++;return s}byteLength(){const t=new Mi(0),n=new Mi(-1),r=this.isNegative()?n:t,a=new Mi(8);let s=1;const l=this.clone();for(;!l.irightShift(a).equal(r);)s++;return s}toUint8Array(t="be",n){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const a=r.length/2,s=new Uint8Array(n||a),l=n?n-a:0;let c=0;for(;ctypeof BigInt!="undefined",PE=(()=>{try{return!1}catch{}return!1})(),Ae={isString:function(e){return typeof e=="string"||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:pg,isStream:ea,readNumber:function(e){let t=0;for(let n=0;n>8*(t-r-1)&255;return n},readDate:function(e){const t=Ae.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return Ae.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=Ae.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 Ae.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,a=0;for(;a{if(!Ae.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,a=!1){return t.decode(r,{stream:!a})}return Cr(e,n,()=>n(new Uint8Array,!0))},concat:Ji,concatUint8Array:y8,equalsUint8Array:function(e,t){if(!Ae.isUint8Array(e)||!Ae.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 pa!==void 0&&pa.crypto&&pa.crypto.subtle},getBigInteger:async function(){if(qV())return Mi;{const{default:e}=await kn(()=>import("./bn.interface.min.3eff7d72.js"),["js/build/bn.interface.min.3eff7d72.js","js/build/bn.min.1f47700f.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 Ae.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 Cr(e,n=>{let r;t&&(n=Ae.concatUint8Array([new Uint8Array([13]),n])),n[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;const a=[];for(let c=0;r=n.indexOf(10,c)+1,r;c=r)n[r-2]!==13&&a.push(r);if(!a.length)return n;const s=new Uint8Array(n.length+a.length);let l=0;for(let c=0;ct?new Uint8Array([13]):void 0)},nativeEOL:function(e){let t=!1;return Cr(e,n=>{let r;(n=t&&n[0]!==10?Ae.concatUint8Array([new Uint8Array([13]),n]):new Uint8Array(n))[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;let a=0;for(let s=0;s!==n.length;s=r){r=n.indexOf(13,s)+1,r||(r=n.length);const l=r-(n[r]===10?1:0);s&&n.copyWithin(a,s,l),a+=l-s}return n.subarray(0,a)},()=>t?new Uint8Array([13]):void 0)},removeTrailingSpaces:function(e){return e.split(` +`)+1;a&&(e=Ji(t.concat(r.substr(0,a))),t=[]),a!==r.length&&t.push(r.substr(a))}return this.unshift(...t),e},hs.prototype.readByte=async function(){const{done:e,value:t}=await this.read();if(e)return;const n=t[0];return this.unshift(si(t,1)),n},hs.prototype.readBytes=async function(e){const t=[];let n=0;for(;;){const{done:r,value:a}=await this.read();if(r)return t.length?Ji(t):void 0;if(t.push(a),n+=a.length,n>=e){const s=Ji(t);return this.unshift(si(s,e)),si(s,0,e)}}},hs.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},hs.prototype.unshift=function(...e){this[ir]||(this[ir]=[]),e.length===1&&pg(e[0])&&this[ir].length&&e[0].length&&this[ir][0].byteOffset>=e[0].length?this[ir][0]=new Uint8Array(this[ir][0].buffer,this[ir][0].byteOffset-e[0].length,this[ir][0].byteLength+e[0].length):this[ir].unshift(...e.filter(t=>t&&t.length))},hs.prototype.readToEnd=async function(e=Ji){const t=[];for(;;){const{done:n,value:r}=await this.read();if(n)break;t.push(r)}return e(t)};let $0,b8,{ReadableStream:ao,WritableStream:w8,TransformStream:uc}=pa;async function C8(){if(uc)return;const[e,t]=await Promise.all([kn(()=>import("./ponyfill.es6.min.cf6531cc.js"),[]),kn(()=>import("./web-streams-adapter.min.da4ec8d3.js"),[])]);({ReadableStream:ao,WritableStream:w8,TransformStream:uc}=e);const{createReadableStreamWrapper:n}=t;pa.ReadableStream&&ao!==pa.ReadableStream&&($0=n(ao),b8=n(pa.ReadableStream))}const Kd=hg&&void 0;function Tf(e){let t=ea(e);return t==="node"?vg(e):t==="web"&&$0?$0(e):t?e:new ao({start(n){n.enqueue(e),n.close()}})}function x8(e){if(ea(e))return e;const t=new Ds;return(async()=>{const n=ta(t);await n.write(e),await n.close()})(),t}function Ji(e){return e.some(t=>ea(t)&&!Tr(t))?function(t){t=t.map(Tf);const n=E8(async function(s){await Promise.all(a.map(l=>R0(l,s)))});let r=Promise.resolve();const a=t.map((s,l)=>lo(s,(c,h)=>(r=r.then(()=>Jo(c,n.writable,{preventClose:l!==t.length-1})),r)));return n.readable}(e):e.some(t=>Tr(t))?function(t){const n=new Ds;let r=Promise.resolve();return t.forEach((a,s)=>(r=r.then(()=>Jo(a,n,{preventClose:s!==t.length-1})),r)),n}(e):typeof e[0]=="string"?e.join(""):Kd&&Kd.isBuffer(e[0])?Kd.concat(e):y8(e)}function Bs(e){return new hs(e)}function ta(e){return new Dd(e)}async function Jo(e,t,{preventClose:n=!1,preventAbort:r=!1,preventCancel:a=!1}={}){if(ea(e)&&!Tr(e)){e=Tf(e);try{if(e[ir]){const c=ta(t);for(let h=0;h{t=s}),t=null)},close:n.close.bind(n),abort:n.error.bind(n)})}}function Cr(e,t=()=>{},n=()=>{}){if(Tr(e)){const s=new Ds;return(async()=>{const l=ta(s);try{const c=await Ar(e),h=t(c),i=n();let p;p=h!==void 0&&i!==void 0?Ji([h,i]):h!==void 0?h:i,await l.write(p),await l.close()}catch(c){await l.abort(c)}})(),s}if(ea(e))return S8(e,{async transform(s,l){try{const c=await t(s);c!==void 0&&l.enqueue(c)}catch(c){l.error(c)}},async flush(s){try{const l=await n();l!==void 0&&s.enqueue(l)}catch(l){s.error(l)}}});const r=t(e),a=n();return r!==void 0&&a!==void 0?Ji([r,a]):r!==void 0?r:a}function lo(e,t){if(ea(e)&&!Tr(e)){let r;const a=new uc({start(c){r=c}}),s=Jo(e,a.writable),l=E8(async function(c){r.error(c),await s,await new Promise(setTimeout)});return t(a.readable,l.writable),l.readable}e=x8(e);const n=new Ds;return t(e,n),n}function mg(e,t){let n;const r=lo(e,(a,s)=>{const l=Bs(a);l.remainder=()=>(l.releaseLock(),Jo(a,s),r),n=t(l)});return n}function Ql(e){if(Tr(e))return e.clone();if(ea(e)){const t=function(n){if(Tr(n))throw Error("ArrayStream cannot be tee()d, use clone() instead");if(ea(n)){const r=Tf(n).tee();return r[0][ir]=r[1][ir]=n[ir],r}return[si(n),si(n)]}(e);return k8(e,t[0]),t[1]}return si(e)}function qu(e){return Tr(e)?Ql(e):ea(e)?new ao({start(t){const n=lo(e,async(r,a)=>{const s=Bs(r),l=ta(a);try{for(;;){await l.ready;const{done:c,value:h}=await s.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)}});k8(e,n)}}):si(e)}function k8(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 si(e,t=0,n=1/0){if(Tr(e))throw Error("Not implemented");if(ea(e)){if(t>=0&&n>=0){let r=0;return S8(e,{transform(a,s){r=t&&s.enqueue(si(a,Math.max(t-r,0),n-r)),r+=a.length):s.terminate()}})}if(t<0&&(n<0||n===1/0)){let r=[];return Cr(e,a=>{a.length>=-t?r=[a]:r.push(a)},()=>si(Ji(r),t,n))}if(t===0&&n<0){let r;return Cr(e,a=>{const s=r?Ji([r,a]):a;if(s.length>=-n)return r=si(s,n),si(s,t,n);r=s})}return console.warn(`stream.slice(input, ${t}, ${n}) not implemented efficiently.`),rl(async()=>si(await Ar(e),t,n))}return e[ir]&&(e=Ji(e[ir].concat([e]))),!pg(e)||Kd&&Kd.isBuffer(e)?e.slice(t,n):(n===1/0&&(n=e.length),e.subarray(t,n))}async function Ar(e,t=Ji){return Tr(e)?e.readToEnd(t):ea(e)?Bs(e).readToEnd(t):e}async function R0(e,t){if(ea(e)){if(e.cancel)return e.cancel(t);if(e.destroy)return e.destroy(t),await new Promise(setTimeout),t}}function rl(e){const t=new Ds;return(async()=>{const n=ta(t);try{await n.write(await e()),await n.close()}catch(r){await n.abort(r)}})(),t}const D8="3.7.5",WV=D8,HV=typeof atob=="function",KV=typeof btoa=="function",Cc=typeof Buffer=="function",CE=typeof TextDecoder=="function"?new TextDecoder:void 0,xE=typeof TextEncoder=="function"?new TextEncoder:void 0,Od=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Hp=(e=>{let t={};return Od.forEach((n,r)=>t[n]=r),t})(),GV=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ii=String.fromCharCode.bind(String),SE=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),O8=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),T8=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),P8=e=>{let t,n,r,a,s="";const l=e.length%3;for(let c=0;c255||(r=e.charCodeAt(c++))>255||(a=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|a,s+=Od[t>>18&63]+Od[t>>12&63]+Od[t>>6&63]+Od[63&t]}return l?s.slice(0,l-3)+"===".substring(l):s},S1=KV?e=>btoa(e):Cc?e=>Buffer.from(e,"binary").toString("base64"):P8,L0=Cc?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;nt?O8(L0(e)):L0(e),YV=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?ii(192|t>>>6)+ii(128|63&t):ii(224|t>>>12&15)+ii(128|t>>>6&63)+ii(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return ii(240|t>>>18&7)+ii(128|t>>>12&63)+ii(128|t>>>6&63)+ii(128|63&t)},XV=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A8=e=>e.replace(XV,YV),EE=Cc?e=>Buffer.from(e,"utf8").toString("base64"):xE?e=>L0(xE.encode(e)):e=>S1(A8(e)),ec=(e,t=!1)=>t?O8(EE(e)):EE(e),kE=e=>ec(e,!0),JV=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ZV=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 ii(55296+(t>>>10))+ii(56320+(1023&t));case 3:return ii((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return ii((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},M8=e=>e.replace(JV,ZV),I8=e=>{if(e=e.replace(/\s+/g,""),!GV.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,a="";for(let s=0;s>16&255):r===64?ii(t>>16&255,t>>8&255):ii(t>>16&255,t>>8&255,255&t);return a},E1=HV?e=>atob(T8(e)):Cc?e=>Buffer.from(e,"base64").toString("binary"):I8,$8=Cc?e=>SE(Buffer.from(e,"base64")):e=>SE(E1(e).split("").map(t=>t.charCodeAt(0))),R8=e=>$8(L8(e)),QV=Cc?e=>Buffer.from(e,"base64").toString("utf8"):CE?e=>CE.decode($8(e)):e=>M8(E1(e)),L8=e=>T8(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),N0=e=>QV(L8(e)),N8=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),DE=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,N8(n));e("fromBase64",function(){return N0(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 R8(this)})},OE=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,N8(n));e("toBase64",function(t){return Mv(this,t)}),e("toBase64URI",function(){return Mv(this,!0)}),e("toBase64URL",function(){return Mv(this,!0)})},TE={version:D8,VERSION:WV,atob:E1,atobPolyfill:I8,btoa:S1,btoaPolyfill:P8,fromBase64:N0,toBase64:ec,encode:ec,encodeURI:kE,encodeURL:kE,utob:A8,btou:M8,decode:N0,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:Mv,toUint8Array:R8,extendString:DE,extendUint8Array:OE,extendBuiltins:()=>{DE(),OE()}};class Mi{constructor(t){if(t===void 0)throw Error("Invalid BigInteger input");if(t instanceof Uint8Array){const n=t,r=Array(n.length);for(let a=0;aBigInt(0);){const l=r&BigInt(1);r>>=BigInt(1);const c=s*a%n.value;s=l?c:s,a=a*a%n.value}return new Mi(s)}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),a=BigInt(1),s=BigInt(0),l=this.value;for(t=t.value;t!==BigInt(0);){const c=l/t;let h=n;n=a-c*n,a=h,h=r,r=s-c*r,s=h,h=t,t=l%t,l=h}return{x:new Mi(a),y:new Mi(s),gcd:new Mi(l)}}gcd(t){let n=this.value;for(t=t.value;t!==BigInt(0);){const r=t;t=n%t,n=r}return new Mi(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 Mi(0),n=new Mi(1),r=new Mi(-1),a=this.isNegative()?r:t;let s=1;const l=this.clone();for(;!l.irightShift(n).equal(a);)s++;return s}byteLength(){const t=new Mi(0),n=new Mi(-1),r=this.isNegative()?n:t,a=new Mi(8);let s=1;const l=this.clone();for(;!l.irightShift(a).equal(r);)s++;return s}toUint8Array(t="be",n){let r=this.value.toString(16);r.length%2==1&&(r="0"+r);const a=r.length/2,s=new Uint8Array(n||a),l=n?n-a:0;let c=0;for(;ctypeof BigInt!="undefined",PE=(()=>{try{return!1}catch{}return!1})(),Ae={isString:function(e){return typeof e=="string"||e instanceof String},isArray:function(e){return e instanceof Array},isUint8Array:pg,isStream:ea,readNumber:function(e){let t=0;for(let n=0;n>8*(t-r-1)&255;return n},readDate:function(e){const t=Ae.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return Ae.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=Ae.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 Ae.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,a=0;for(;a{if(!Ae.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,a=!1){return t.decode(r,{stream:!a})}return Cr(e,n,()=>n(new Uint8Array,!0))},concat:Ji,concatUint8Array:y8,equalsUint8Array:function(e,t){if(!Ae.isUint8Array(e)||!Ae.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 pa!==void 0&&pa.crypto&&pa.crypto.subtle},getBigInteger:async function(){if(qV())return Mi;{const{default:e}=await kn(()=>import("./bn.interface.min.76ed2c0b.js"),["js/build/bn.interface.min.76ed2c0b.js","js/build/bn.min.28405fbe.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 Ae.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 Cr(e,n=>{let r;t&&(n=Ae.concatUint8Array([new Uint8Array([13]),n])),n[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;const a=[];for(let c=0;r=n.indexOf(10,c)+1,r;c=r)n[r-2]!==13&&a.push(r);if(!a.length)return n;const s=new Uint8Array(n.length+a.length);let l=0;for(let c=0;ct?new Uint8Array([13]):void 0)},nativeEOL:function(e){let t=!1;return Cr(e,n=>{let r;(n=t&&n[0]!==10?Ae.concatUint8Array([new Uint8Array([13]),n]):new Uint8Array(n))[n.length-1]===13?(t=!0,n=n.subarray(0,-1)):t=!1;let a=0;for(let s=0;s!==n.length;s=r){r=n.indexOf(13,s)+1,r||(r=n.length);const l=r-(n[r]===10?1:0);s&&n.copyWithin(a,s,l),a+=l-s}return n.subarray(0,a)},()=>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 a=>{try{t(await a)}catch(s){r=s}})),n(r)})},selectUint8Array:function(e,t,n){const r=Math.max(t.length,n.length),a=new Uint8Array(r);let s=0;for(let l=0;l{t=Ae.concatUint8Array([t,n]);const r=[],a=Math.floor(t.length/45),s=45*a,l=mm(t.subarray(0,s));for(let c=0;ct.length?mm(t)+` @@ -265,7 +265,7 @@ Please report this to https://github.com/markedjs/marked.`,(t||er.defaults).sile `),i.push(yl(a,s)),i.push(Ys(t)),i.push("=",ko(h)),i.push(`-----END PGP PRIVATE KEY BLOCK----- `);break;case ve.armor.signature:i.push(`-----BEGIN PGP SIGNATURE----- `),i.push(yl(a,s)),i.push(Ys(t)),i.push("=",ko(h)),i.push(`-----END PGP SIGNATURE----- -`)}return Ae.concat(i)}class Zo{constructor(){this.bytes=""}read(t){this.bytes=Ae.uint8ArrayToString(t.subarray(0,8))}write(){return Ae.stringToUint8Array(this.bytes)}toHex(){return Ae.uint8ArrayToHex(Ae.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 Zo;return n.read(Ae.hexToUint8Array(t)),n}static wildcard(){const t=new Zo;return t.read(new Uint8Array(8)),t}}var An=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 a,s,l,c,h=!1;function i(){function d(y){var b,E,D;for(E=D=function(x){var C=e[255-t[x]];return x===0&&(C=0),C}(y),b=0;b<4;b++)D^=E=255&(E<<1|E>>>7);return D^=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}(),a=[],s=[],l=[[],[],[],[]],c=[[],[],[],[]];for(var v=0;v<256;v++){var m=d(v);a[v]=m,s[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||i();var m=new Uint32Array(v);m.set(a,512),m.set(s,768);for(var _=0;_<4;_++)m.set(l[_],4096+1024*_>>2),m.set(c[_],8192+1024*_>>2);var y=function(b,E,D){var x=0,C=0,k=0,w=0,T=0,M=0,A=0,R=0,H=0,L=0,V=0,j=0,oe=0,Te=0,pe=0,ye=0,de=0,xe=0,Y=0,se=0,be=0,_e=new b.Uint32Array(D),re=new b.Uint8Array(D);function Q(fe,ce,Ve,Je,_t,Tt,At,It){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,_t=_t|0,Tt=Tt|0,At=At|0,It=It|0;var ht=0,Rt=0,Pt=0,hn=0,an=0,Jt=0,Yt=0,Qt=0;for(ht=Ve|1024,Rt=Ve|2048,Pt=Ve|3072,_t=_t^_e[(fe|0)>>2],Tt=Tt^_e[(fe|4)>>2],At=At^_e[(fe|8)>>2],It=It^_e[(fe|12)>>2],Qt=16;(Qt|0)<=Je<<4;Qt=Qt+16|0)hn=_e[(Ve|_t>>22&1020)>>2]^_e[(ht|Tt>>14&1020)>>2]^_e[(Rt|At>>6&1020)>>2]^_e[(Pt|It<<2&1020)>>2]^_e[(fe|Qt|0)>>2],an=_e[(Ve|Tt>>22&1020)>>2]^_e[(ht|At>>14&1020)>>2]^_e[(Rt|It>>6&1020)>>2]^_e[(Pt|_t<<2&1020)>>2]^_e[(fe|Qt|4)>>2],Jt=_e[(Ve|At>>22&1020)>>2]^_e[(ht|It>>14&1020)>>2]^_e[(Rt|_t>>6&1020)>>2]^_e[(Pt|Tt<<2&1020)>>2]^_e[(fe|Qt|8)>>2],Yt=_e[(Ve|It>>22&1020)>>2]^_e[(ht|_t>>14&1020)>>2]^_e[(Rt|Tt>>6&1020)>>2]^_e[(Pt|At<<2&1020)>>2]^_e[(fe|Qt|12)>>2],_t=hn,Tt=an,At=Jt,It=Yt;x=_e[(ce|_t>>22&1020)>>2]<<24^_e[(ce|Tt>>14&1020)>>2]<<16^_e[(ce|At>>6&1020)>>2]<<8^_e[(ce|It<<2&1020)>>2]^_e[(fe|Qt|0)>>2],C=_e[(ce|Tt>>22&1020)>>2]<<24^_e[(ce|At>>14&1020)>>2]<<16^_e[(ce|It>>6&1020)>>2]<<8^_e[(ce|_t<<2&1020)>>2]^_e[(fe|Qt|4)>>2],k=_e[(ce|At>>22&1020)>>2]<<24^_e[(ce|It>>14&1020)>>2]<<16^_e[(ce|_t>>6&1020)>>2]<<8^_e[(ce|Tt<<2&1020)>>2]^_e[(fe|Qt|8)>>2],w=_e[(ce|It>>22&1020)>>2]<<24^_e[(ce|_t>>14&1020)>>2]<<16^_e[(ce|Tt>>6&1020)>>2]<<8^_e[(ce|At<<2&1020)>>2]^_e[(fe|Qt|12)>>2]}function B(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,fe,ce,Ve,Je)}function I(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var _t=0;Q(1024,3072,8192,be,fe,Je,Ve,ce),_t=C,C=w,w=_t}function Z(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,T^fe,M^ce,A^Ve,R^Je),T=x,M=C,A=k,R=w}function ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var _t=0;Q(1024,3072,8192,be,fe,Je,Ve,ce),_t=C,C=w,w=_t,x=x^T,C=C^M,k=k^A,w=w^R,T=fe,M=ce,A=Ve,R=Je}function he(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,T,M,A,R),T=x=x^fe,M=C=C^ce,A=k=k^Ve,R=w=w^Je}function Ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,T,M,A,R),x=x^fe,C=C^ce,k=k^Ve,w=w^Je,T=fe,M=ce,A=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,be,T,M,A,R),T=x,M=C,A=k,R=w,x=x^fe,C=C^ce,k=k^Ve,w=w^Je}function G(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,H,L,V,j),j=~ye&j|ye&j+1,V=~pe&V|pe&V+((j|0)==0),L=~Te&L|Te&L+((V|0)==0),H=~oe&H|oe&H+((L|0)==0),x=x^fe,C=C^ce,k=k^Ve,w=w^Je}function ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var _t=0,Tt=0,At=0,It=0,ht=0,Rt=0,Pt=0,hn=0,an=0,Jt=0;for(fe=fe^T,ce=ce^M,Ve=Ve^A,Je=Je^R,_t=de|0,Tt=xe|0,At=Y|0,It=se|0;(an|0)<128;an=an+1|0)_t>>>31&&(ht=ht^fe,Rt=Rt^ce,Pt=Pt^Ve,hn=hn^Je),_t=_t<<1|Tt>>>31,Tt=Tt<<1|At>>>31,At=At<<1|It>>>31,It=It<<1,Jt=Je&1,Je=Je>>>1|Ve<<31,Ve=Ve>>>1|ce<<31,ce=ce>>>1|fe<<31,fe=fe>>>1,Jt&&(fe=fe^3774873600);T=ht,M=Rt,A=Pt,R=hn}function q(fe){fe=fe|0,be=fe}function Pe(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,x=fe,C=ce,k=Ve,w=Je}function me(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,T=fe,M=ce,A=Ve,R=Je}function U(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,H=fe,L=ce,V=Ve,j=Je}function ke(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,oe=fe,Te=ce,pe=Ve,ye=Je}function ge(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,j=~ye&j|ye&Je,V=~pe&V|pe&Ve,L=~Te&L|Te&ce,H=~oe&H|oe&fe}function le(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=x>>>24,re[fe|1]=x>>>16&255,re[fe|2]=x>>>8&255,re[fe|3]=x&255,re[fe|4]=C>>>24,re[fe|5]=C>>>16&255,re[fe|6]=C>>>8&255,re[fe|7]=C&255,re[fe|8]=k>>>24,re[fe|9]=k>>>16&255,re[fe|10]=k>>>8&255,re[fe|11]=k&255,re[fe|12]=w>>>24,re[fe|13]=w>>>16&255,re[fe|14]=w>>>8&255,re[fe|15]=w&255,16)}function F(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=T>>>24,re[fe|1]=T>>>16&255,re[fe|2]=T>>>8&255,re[fe|3]=T&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]=A>>>24,re[fe|9]=A>>>16&255,re[fe|10]=A>>>8&255,re[fe|11]=A&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 W(){B(0,0,0,0),de=x,xe=C,Y=k,se=w}function X(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]=x>>>24,re[ce|1]=x>>>16&255,re[ce|2]=x>>>8&255,re[ce|3]=x&255,re[ce|4]=C>>>24,re[ce|5]=C>>>16&255,re[ce|6]=C>>>8&255,re[ce|7]=C&255,re[ce|8]=k>>>24,re[ce|9]=k>>>16&255,re[ce|10]=k>>>8&255,re[ce|11]=k&255,re[ce|12]=w>>>24,re[ce|13]=w>>>16&255,re[ce|14]=w>>>8&255,re[ce|15]=w&255,Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}function ne(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)we[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=[B,I,Z,ee,he,Ee,J,G],we=[Z,ae];return{set_rounds:q,set_state:Pe,set_iv:me,set_nonce:U,set_mask:ke,set_counter:ge,get_state:le,get_iv:F,gcm_init:W,cipher:X,mac:ne}}({Uint8Array,Uint32Array},d,v);return y.set_key=function(b,E,D,x,C,k,w,T,M){var A=m.subarray(0,60),R=m.subarray(256,316);A.set([E,D,x,C,k,w,T,M]);for(var H=b,L=1;H<4*b+28;H++){var V=A[H-1];(H%b==0||b===8&&H%b==4)&&(V=a[V>>>24]<<24^a[V>>>16&255]<<16^a[V>>>8&255]<<8^a[255&V]),H%b==0&&(V=V<<8^V>>>24^L<<24,L=L<<1^(128&L?27:0)),A[H]=A[H-b]^V}for(var j=0;j=H-4?V:c[0][a[V>>>24]]^c[1][a[V>>>16&255]]^c[2][a[V>>>8&255]]^c[3][a[255&V]];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 ME(e){return e instanceof Uint8Array}function k1(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 Il(e,t,n,r,a){const s=e.length-t,l=sa+s.length,0),n=new Uint8Array(t);let r=0;for(let a=0;a>2,s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12),a>16?s.getUint32(16):0,a>16?s.getUint32(20):0,a>24?s.getUint32(24):0,a>24?s.getUint32(28):0),n!==void 0){if(n.length!==16)throw new ro("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(!ME(t))throw new TypeError("data isn't of expected type");let{heap:n,asm:r}=this.acquire_asm(),a=An.ENC[this.mode],s=An.HEAP_DATA,l=this.pos,c=this.len,h=0,i=t.length||0,p=0,d=0,v=new Uint8Array(c+i&-16);for(;i>0;)d=Il(n,l+c,t,h,i),c+=d,h+=d,i-=d,d=r.cipher(a,s+l,c),d&&v.set(n.subarray(l,l+d),p),p+=d,d0;)m=Il(n,l+c,t,h,i),c+=m,h+=m,i-=m,m=r.cipher(a,s+l,c-(i?0:v)),m&&_.set(n.subarray(l,l+m),p),p+=m,m0){if(l%16){if(this.hasOwnProperty("padding"))throw new ro("data length must be a multiple of the block size");l+=16-l%16}if(n.cipher(r,a+s,l),this.hasOwnProperty("padding")&&this.padding){let i=t[s+c-1];if(i<1||i>16||i>c)throw new F0("bad padding");let p=0;for(let d=i;d>1;d--)p|=i^t[s+c-d];if(p)throw new F0("bad padding");c-=i}}const h=new Uint8Array(c);return c>0&&h.set(t.subarray(s,s+c)),this.pos=0,this.len=0,this.release_asm(),h}}class _m{static encrypt(t,n,r=!1){return new _m(n,r).encrypt(t)}static decrypt(t,n,r=!1){return new _m(n,r).decrypt(t)}constructor(t,n=!1,r){this.aes=r||new Mf(t,void 0,n,"ECB")}encrypt(t){return Qo(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return Qo(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}function D1(e){const t=function(n){const r=new _m(n);this.encrypt=function(a){return r.encrypt(a)},this.decrypt=function(a){return r.decrypt(a)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function Gd(e,t,n,r,a,s){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],i=[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,D,x,C,k,w,T,M,A,R,H,L=0,V=t.length;const j=e.length===32?3:9;k=j===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(pe,ye){const de=8-pe.length%8;let xe;if(ye===2&&de<8)xe=32;else if(ye===1)xe=de;else{if(ye||!(de<8)){if(de===8)return pe;throw Error("des: invalid padding")}xe=0}const Y=new Uint8Array(pe.length+de);for(let se=0;se>>4^C),C^=b,x^=b<<4,b=65535&(x>>>16^C),C^=b,x^=b<<16,b=858993459&(C>>>2^x),x^=b,C^=b<<2,b=16711935&(C>>>8^x),x^=b,C^=b<<8,b=1431655765&(x>>>1^C),C^=b,x^=b<<1,x=x<<1|x>>>31,C=C<<1|C>>>31,y=0;y>>4|C<<28)^e[_+1],b=x,x=C,C=b^(c[E>>>24&63]|i[E>>>16&63]|d[E>>>8&63]|m[63&E]|l[D>>>24&63]|h[D>>>16&63]|p[D>>>8&63]|v[63&D]);b=x,x=C,C=b}x=x>>>1|x<<31,C=C>>>1|C<<31,b=1431655765&(x>>>1^C),C^=b,x^=b<<1,b=16711935&(C>>>8^x),x^=b,C^=b<<8,b=858993459&(C>>>2^x),x^=b,C^=b<<2,b=65535&(x>>>16^C),C^=b,x^=b<<16,b=252645135&(x>>>4^C),C^=b,x^=b<<4,r===1&&(n?(w=x,M=C):(x^=T,C^=A)),oe[Te++]=x>>>24,oe[Te++]=x>>>16&255,oe[Te++]=x>>>8&255,oe[Te++]=255&x,oe[Te++]=C>>>24,oe[Te++]=C>>>16&255,oe[Te++]=C>>>8&255,oe[Te++]=255&C}return n||(oe=function(pe,ye){let de,xe=null;if(ye===2)de=32;else if(ye===1)xe=pe[pe.length-1];else{if(ye)throw Error("des: invalid padding");de=0}if(!xe){for(xe=1;pe[pe.length-xe]===de;)xe++;xe--}return pe.subarray(0,pe.length-xe)}(oe,s)),oe}function Yd(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],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[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],i=[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 D,x,C,k=0,w=0;for(let T=0;T>>4^A),A^=C,M^=C<<4,C=65535&(A>>>-16^M),M^=C,A^=C<<-16,C=858993459&(M>>>2^A),A^=C,M^=C<<2,C=65535&(A>>>-16^M),M^=C,A^=C<<-16,C=1431655765&(M>>>1^A),A^=C,M^=C<<1,C=16711935&(A>>>8^M),M^=C,A^=C<<8,C=1431655765&(M>>>1^A),A^=C,M^=C<<1,C=M<<8|A>>>20&240,M=A<<24|A<<8&16711680|A>>>8&65280|A>>>24&240,A=C;for(let R=0;R<16;R++)E[R]?(M=M<<2|M>>>26,A=A<<2|A>>>26):(M=M<<1|M>>>27,A=A<<1|A>>>27),M&=-15,A&=-15,D=t[M>>>28]|n[M>>>24&15]|r[M>>>20&15]|a[M>>>16&15]|s[M>>>12&15]|l[M>>>8&15]|c[M>>>4&15],x=h[A>>>28]|i[A>>>24&15]|p[A>>>20&15]|d[A>>>16&15]|v[A>>>12&15]|m[A>>>8&15]|_[A>>>4&15],C=65535&(x>>>16^D),b[w++]=D^C,b[w++]=x^C<<16}return b}function Td(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 Gd(Yd(this.key[2]),Gd(Yd(this.key[1]),Gd(Yd(this.key[0]),t,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function rW(){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 i=c+l,p=i<>>32-h;return(s[0][p>>>24]^s[1][p>>>16&255])-s[2][p>>>8&255]+s[3][255&p]}function r(l,c,h){const i=c^l,p=i<>>32-h;return s[0][p>>>24]-s[1][p>>>16&255]+s[2][p>>>8&255]^s[3][255&p]}function a(l,c,h){const i=c-l,p=i<>>32-h;return(s[0][p>>>24]+s[1][p>>>16&255]^s[2][p>>>8&255])-s[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 i;for(let m=0;m<4;m++)i=4*m,c[m]=l[i]<<24|l[i+1]<<16|l[i+2]<<8|l[i+3];const p=[6,7,4,5];let d,v=0;for(let m=0;m<2;m++)for(let _=0;_<4;_++){for(i=0;i<4;i++){const y=e[_][i];d=c[y[1]],d^=s[4][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=s[5][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=s[6][c[y[4]>>>2]>>>24-8*(3&y[4])&255],d^=s[7][c[y[5]>>>2]>>>24-8*(3&y[5])&255],d^=s[p[i]][c[y[6]>>>2]>>>24-8*(3&y[6])&255],c[y[0]]=d}for(i=0;i<4;i++){const y=t[_][i];d=s[4][c[y[0]>>>2]>>>24-8*(3&y[0])&255],d^=s[5][c[y[1]>>>2]>>>24-8*(3&y[1])&255],d^=s[6][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=s[7][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=s[4+i][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 s=[,,,,,,,,];s[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],s[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],s[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],s[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],s[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],s[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],s[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],s[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 Pd(e){this.cast5=new rW,this.cast5.setKey(e),this.encrypt=function(t){return this.cast5.encrypt(t)}}Td.keySize=Td.prototype.keySize=24,Td.blockSize=Td.prototype.blockSize=8,Pd.blockSize=Pd.prototype.blockSize=8,Pd.keySize=Pd.prototype.keySize=16;const ka=4294967295;function cs(e,t){return(e<>>32-t)&ka}function Hs(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function So(e,t,n){e.splice(t,4,255&n,n>>>8&255,n>>>16&255,n>>>24&255)}function Sn(e,t){return e>>>8*t&255}function Ad(e){this.tf=function(){let t=null,n=null,r=-1,a=[],s=[[],[],[],[]];function l(p){return s[0][Sn(p,0)]^s[1][Sn(p,1)]^s[2][Sn(p,2)]^s[3][Sn(p,3)]}function c(p){return s[0][Sn(p,3)]^s[1][Sn(p,0)]^s[2][Sn(p,1)]^s[3][Sn(p,2)]}function h(p,d){let v=l(d[0]),m=c(d[1]);d[2]=cs(d[2]^v+m+a[4*p+8]&ka,31),d[3]=cs(d[3],1)^v+2*m+a[4*p+9]&ka,v=l(d[2]),m=c(d[3]),d[0]=cs(d[0]^v+m+a[4*p+10]&ka,31),d[1]=cs(d[1],1)^v+2*m+a[4*p+11]&ka}function i(p,d){let v=l(d[0]),m=c(d[1]);d[2]=cs(d[2],1)^v+m+a[4*p+10]&ka,d[3]=cs(d[3]^v+2*m+a[4*p+11]&ka,31),v=l(d[2]),m=c(d[3]),d[0]=cs(d[0],1)^v+m+a[4*p+8]&ka,d[1]=cs(d[1]^v+2*m+a[4*p+9]&ka,31)}return{name:"twofish",blocksize:16,open:function(p){let d,v,m,_,y;t=p;const b=[],E=[],D=[];let x;const C=[];let k,w,T;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]],A=[[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]],H=[[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]],L=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],V=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],j=[[],[]],oe=[[],[],[],[]];function Te(Y){return Y^Y>>2^[0,90,180,238][3&Y]}function pe(Y){return Y^Y>>1^Y>>2^[0,238,180,90][3&Y]}function ye(Y,se){let be,_e,re;for(be=0;be<8;be++)_e=se>>>24,se=se<<8&ka|Y>>>24,Y=Y<<8&ka,re=_e<<1,128&_e&&(re^=333),se^=_e^re<<16,re^=_e>>>1,1&_e&&(re^=166),se^=re<<24|re<<8;return se}function de(Y,se){const be=se>>4,_e=15&se,re=M[Y][be^_e],Q=A[Y][L[_e]^V[be]];return H[Y][L[Q]^V[re]]<<4|R[Y][re^Q]}function xe(Y,se){let be=Sn(Y,0),_e=Sn(Y,1),re=Sn(Y,2),Q=Sn(Y,3);switch(x){case 4:be=j[1][be]^Sn(se[3],0),_e=j[0][_e]^Sn(se[3],1),re=j[0][re]^Sn(se[3],2),Q=j[1][Q]^Sn(se[3],3);case 3:be=j[1][be]^Sn(se[2],0),_e=j[1][_e]^Sn(se[2],1),re=j[0][re]^Sn(se[2],2),Q=j[0][Q]^Sn(se[2],3);case 2:be=j[0][j[0][be]^Sn(se[1],0)]^Sn(se[0],0),_e=j[0][j[1][_e]^Sn(se[1],1)]^Sn(se[0],1),re=j[1][j[0][re]^Sn(se[1],2)]^Sn(se[0],2),Q=j[1][j[1][Q]^Sn(se[1],3)]^Sn(se[0],3)}return oe[0][be]^oe[1][_e]^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]=Hs(t,d);for(d=0;d<256;d++)j[0][d]=de(0,d),j[1][d]=de(1,d);for(d=0;d<256;d++)k=j[1][d],w=Te(k),T=pe(k),oe[0][d]=k+(w<<8)+(T<<16)+(T<<24),oe[2][d]=w+(T<<8)+(k<<16)+(T<<24),k=j[0][d],w=Te(k),T=pe(k),oe[1][d]=T+(T<<8)+(w<<16)+(k<<24),oe[3][d]=w+(k<<8)+(T<<16)+(w<<24);for(x=D.length/2,d=0;d=0;m--)i(m,v);So(n,r,v[2]^a[0]),So(n,r+4,v[3]^a[1]),So(n,r+8,v[0]^a[2]),So(n,r+12,v[1]^a[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 Fa(){}function Md(e){this.bf=new Fa,this.bf.init(e),this.encrypt=function(t){return this.bf.encryptBlock(t)}}Ad.keySize=Ad.prototype.keySize=32,Ad.blockSize=Ad.prototype.blockSize=16,Fa.prototype.BLOCKSIZE=8,Fa.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]],Fa.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Fa.prototype.NN=16,Fa.prototype._clean=function(e){return e<0&&(e=(2147483647&e)+2147483648),e},Fa.prototype._F=function(e){let t;const n=255&e,r=255&(e>>>=8),a=255&(e>>>=8),s=255&(e>>>=8);return t=this.sboxes[0][s]+this.sboxes[1][a],t^=this.sboxes[2][r],t+=this.sboxes[3][n],t},Fa.prototype._encryptBlock=function(e){let t,n=e[0],r=e[1];for(t=0;t>>24-8*t&255,a[t+r]=n[1]>>>24-8*t&255;return a},Fa.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 a=n;n=r,r=a}n^=this.parray[1],r^=this.parray[0],e[0]=this._clean(r),e[1]=this._clean(n)},Fa.prototype.init=function(e){let t,n=0;for(this.parray=[],t=0;t=e.length&&(n=0);this.parray[t]=this.PARRAY[t]^a}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)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=ye+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=de+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=xe+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Y+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=se+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=be+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=_e+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=re+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Q+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=B+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=I+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Z+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=ee+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=he+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Ee+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ee^re^de^pe,ke=me<<1|me>>>31,U=ke+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=he^Q^xe^ye,ge=me<<1|me>>>31,U=ge+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ee^B^Y^de,le=me<<1|me>>>31,U=le+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ke^I^se^xe,F=me<<1|me>>>31,U=F+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ge^Z^be^Y,W=me<<1|me>>>31,U=W+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=le^ee^_e^se,X=me<<1|me>>>31,U=X+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=F^he^re^be,ne=me<<1|me>>>31,U=ne+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=W^Ee^Q^_e,ue=me<<1|me>>>31,U=ue+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=X^ke^B^re,we=me<<1|me>>>31,U=we+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ne^ge^I^Q,fe=me<<1|me>>>31,U=fe+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ue^le^Z^B,ce=me<<1|me>>>31,U=ce+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=we^F^ee^I,Ve=me<<1|me>>>31,U=Ve+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=fe^W^he^Z,Je=me<<1|me>>>31,U=Je+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ce^X^Ee^ee,_t=me<<1|me>>>31,U=_t+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ve^ne^ke^he,Tt=me<<1|me>>>31,U=Tt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Je^ue^ge^Ee,At=me<<1|me>>>31,U=At+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=_t^we^le^ke,It=me<<1|me>>>31,U=It+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Tt^fe^F^ge,ht=me<<1|me>>>31,U=ht+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=At^ce^W^le,Rt=me<<1|me>>>31,U=Rt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=It^Ve^X^F,Pt=me<<1|me>>>31,U=Pt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ht^Je^ne^W,hn=me<<1|me>>>31,U=hn+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Rt^_t^ue^X,an=me<<1|me>>>31,U=an+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Pt^Tt^we^ne,Jt=me<<1|me>>>31,U=Jt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=hn^At^fe^ue,Yt=me<<1|me>>>31,U=Yt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=an^It^ce^we,Qt=me<<1|me>>>31,U=Qt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Jt^ht^Ve^fe,Xt=me<<1|me>>>31,U=Xt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Yt^Rt^Je^ce,dn=me<<1|me>>>31,U=dn+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Qt^Pt^_t^Ve,tn=me<<1|me>>>31,U=tn+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Xt^hn^Tt^Je,rt=me<<1|me>>>31,U=rt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=dn^an^At^_t,at=me<<1|me>>>31,U=at+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=tn^Jt^It^Tt,xt=me<<1|me>>>31,U=xt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=rt^Yt^ht^At,Vt=me<<1|me>>>31,U=Vt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=at^Qt^Rt^It,Oe=me<<1|me>>>31,U=Oe+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=xt^Xt^Pt^ht,Be=me<<1|me>>>31,U=Be+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Vt^dn^hn^Rt,Fe=me<<1|me>>>31,U=Fe+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Oe^tn^an^Pt,Le=me<<1|me>>>31,U=Le+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Be^rt^Jt^hn,tt=me<<1|me>>>31,U=tt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Fe^at^Yt^an,ot=me<<1|me>>>31,U=ot+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Le^xt^Qt^Jt,pt=me<<1|me>>>31,U=pt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=tt^Vt^Xt^Yt,yt=me<<1|me>>>31,U=yt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ot^Oe^dn^Qt,Dt=me<<1|me>>>31,U=Dt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=pt^Be^tn^Xt,Ut=me<<1|me>>>31,U=Ut+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=yt^Fe^rt^dn,Gt=me<<1|me>>>31,U=Gt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Dt^Le^at^tn,zt=me<<1|me>>>31,U=zt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ut^tt^xt^rt,nn=me<<1|me>>>31,U=nn+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Gt^ot^Vt^at,qt=me<<1|me>>>31,U=qt+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=zt^pt^Oe^xt,sn=me<<1|me>>>31,U=sn+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=nn^yt^Be^Vt,In=me<<1|me>>>31,U=In+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=qt^Dt^Fe^Oe,fr=me<<1|me>>>31,U=fr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=sn^Ut^Le^Be,hr=me<<1|me>>>31,U=hr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=In^Gt^tt^Fe,tr=me<<1|me>>>31,U=tr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=fr^zt^ot^Le,Yn=me<<1|me>>>31,U=Yn+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=hr^nn^pt^tt,Ur=me<<1|me>>>31,U=Ur+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=tr^qt^yt^ot,xr=me<<1|me>>>31,U=xr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Yn^sn^Dt^pt,Bi=me<<1|me>>>31,U=Bi+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ur^In^Ut^yt,Jr=me<<1|me>>>31,U=Jr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=xr^fr^Gt^Dt,xi=me<<1|me>>>31,U=xi+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Bi^hr^zt^Ut,Fi=me<<1|me>>>31,U=Fi+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Jr^tr^nn^Gt,pr=me<<1|me>>>31,U=pr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=xi^Yn^qt^zt,Nr=me<<1|me>>>31,U=Nr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Fi^Ur^sn^nn,Si=me<<1|me>>>31,U=Si+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=pr^xr^In^qt,ji=me<<1|me>>>31,U=ji+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Nr^Bi^fr^sn,Ie=me<<1|me>>>31,U=Ie+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Si^Jr^hr^In,We=me<<1|me>>>31,U=We+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,r=r+J|0,a=a+G|0,s=s+ae|0,l=l+q|0,c=c+Pe|0}function w(pe){pe=pe|0,k(C[pe|0]<<24|C[pe|1]<<16|C[pe|2]<<8|C[pe|3],C[pe|4]<<24|C[pe|5]<<16|C[pe|6]<<8|C[pe|7],C[pe|8]<<24|C[pe|9]<<16|C[pe|10]<<8|C[pe|11],C[pe|12]<<24|C[pe|13]<<16|C[pe|14]<<8|C[pe|15],C[pe|16]<<24|C[pe|17]<<16|C[pe|18]<<8|C[pe|19],C[pe|20]<<24|C[pe|21]<<16|C[pe|22]<<8|C[pe|23],C[pe|24]<<24|C[pe|25]<<16|C[pe|26]<<8|C[pe|27],C[pe|28]<<24|C[pe|29]<<16|C[pe|30]<<8|C[pe|31],C[pe|32]<<24|C[pe|33]<<16|C[pe|34]<<8|C[pe|35],C[pe|36]<<24|C[pe|37]<<16|C[pe|38]<<8|C[pe|39],C[pe|40]<<24|C[pe|41]<<16|C[pe|42]<<8|C[pe|43],C[pe|44]<<24|C[pe|45]<<16|C[pe|46]<<8|C[pe|47],C[pe|48]<<24|C[pe|49]<<16|C[pe|50]<<8|C[pe|51],C[pe|52]<<24|C[pe|53]<<16|C[pe|54]<<8|C[pe|55],C[pe|56]<<24|C[pe|57]<<16|C[pe|58]<<8|C[pe|59],C[pe|60]<<24|C[pe|61]<<16|C[pe|62]<<8|C[pe|63])}function T(pe){pe=pe|0,C[pe|0]=r>>>24,C[pe|1]=r>>>16&255,C[pe|2]=r>>>8&255,C[pe|3]=r&255,C[pe|4]=a>>>24,C[pe|5]=a>>>16&255,C[pe|6]=a>>>8&255,C[pe|7]=a&255,C[pe|8]=s>>>24,C[pe|9]=s>>>16&255,C[pe|10]=s>>>8&255,C[pe|11]=s&255,C[pe|12]=l>>>24,C[pe|13]=l>>>16&255,C[pe|14]=l>>>8&255,C[pe|15]=l&255,C[pe|16]=c>>>24,C[pe|17]=c>>>16&255,C[pe|18]=c>>>8&255,C[pe|19]=c&255}function M(){r=1732584193,a=4023233417,s=2562383102,l=271733878,c=3285377520,h=i=0}function A(pe,ye,de,xe,Y,se,be){pe=pe|0,ye=ye|0,de=de|0,xe=xe|0,Y=Y|0,se=se|0,be=be|0,r=pe,a=ye,s=de,l=xe,c=Y,h=se,i=be}function R(pe,ye){pe=pe|0,ye=ye|0;var de=0;if(pe&63)return-1;for(;(ye|0)>=64;)w(pe),pe=pe+64|0,ye=ye-64|0,de=de+64|0;return h=h+de|0,h>>>0>>0&&(i=i+1|0),de|0}function H(pe,ye,de){pe=pe|0,ye=ye|0,de=de|0;var xe=0,Y=0;if(pe&63||~de&&de&31)return-1;if((ye|0)>=64){if(xe=R(pe,ye)|0,(xe|0)==-1)return-1;pe=pe+xe|0,ye=ye-xe|0}if(xe=xe+ye|0,h=h+ye|0,h>>>0>>0&&(i=i+1|0),C[pe|ye]=128,(ye|0)>=56){for(Y=ye+1|0;(Y|0)<64;Y=Y+1|0)C[pe|Y]=0;w(pe),ye=0,C[pe|0]=0}for(Y=ye+1|0;(Y|0)<59;Y=Y+1|0)C[pe|Y]=0;return C[pe|56]=i>>>21&255,C[pe|57]=i>>>13&255,C[pe|58]=i>>>5&255,C[pe|59]=i<<3&255|h>>>29,C[pe|60]=h>>>21&255,C[pe|61]=h>>>13&255,C[pe|62]=h>>>5&255,C[pe|63]=h<<3&255,w(pe),~de&&T(de),xe|0}function L(){r=p,a=d,s=v,l=m,c=_,h=64,i=0}function V(){r=y,a=b,s=E,l=D,c=x,h=64,i=0}function j(pe,ye,de,xe,Y,se,be,_e,re,Q,B,I,Z,ee,he,Ee){pe=pe|0,ye=ye|0,de=de|0,xe=xe|0,Y=Y|0,se=se|0,be=be|0,_e=_e|0,re=re|0,Q=Q|0,B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,M(),k(pe^1549556828,ye^1549556828,de^1549556828,xe^1549556828,Y^1549556828,se^1549556828,be^1549556828,_e^1549556828,re^1549556828,Q^1549556828,B^1549556828,I^1549556828,Z^1549556828,ee^1549556828,he^1549556828,Ee^1549556828),y=r,b=a,E=s,D=l,x=c,M(),k(pe^909522486,ye^909522486,de^909522486,xe^909522486,Y^909522486,se^909522486,be^909522486,_e^909522486,re^909522486,Q^909522486,B^909522486,I^909522486,Z^909522486,ee^909522486,he^909522486,Ee^909522486),p=r,d=a,v=s,m=l,_=c,h=64,i=0}function oe(pe,ye,de){pe=pe|0,ye=ye|0,de=de|0;var xe=0,Y=0,se=0,be=0,_e=0,re=0;return pe&63||~de&&de&31?-1:(re=H(pe,ye,-1)|0,xe=r,Y=a,se=s,be=l,_e=c,V(),k(xe,Y,se,be,_e,2147483648,0,0,0,0,0,0,0,0,0,672),~de&&T(de),re|0)}function Te(pe,ye,de,xe,Y){pe=pe|0,ye=ye|0,de=de|0,xe=xe|0,Y=Y|0;var se=0,be=0,_e=0,re=0,Q=0,B=0,I=0,Z=0,ee=0,he=0;if(pe&63||~Y&&Y&31)return-1;for(C[pe+ye|0]=de>>>24,C[pe+ye+1|0]=de>>>16&255,C[pe+ye+2|0]=de>>>8&255,C[pe+ye+3|0]=de&255,oe(pe,ye+4|0,-1)|0,se=B=r,be=I=a,_e=Z=s,re=ee=l,Q=he=c,xe=xe-1|0;(xe|0)>0;)L(),k(B,I,Z,ee,he,2147483648,0,0,0,0,0,0,0,0,0,672),B=r,I=a,Z=s,ee=l,he=c,V(),k(B,I,Z,ee,he,2147483648,0,0,0,0,0,0,0,0,0,672),B=r,I=a,Z=s,ee=l,he=c,se=se^r,be=be^a,_e=_e^s,re=re^l,Q=Q^c,xe=xe-1|0;return r=se,a=be,s=_e,l=re,c=Q,~Y&&T(Y),0}return{reset:M,init:A,process:R,finish:H,hmac_reset:L,hmac_init:j,hmac_finish:oe,pbkdf2_generate_block:Te}};class j8{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 B0("state must be reset before processing new data");const{asm:n,heap:r}=this.acquire_asm();let a=this.pos,s=this.len,l=0,c=t.length,h=0;for(;c>0;)h=Il(r,a+s,t,l,c),s+=h,l+=h,c-=h,h=n.process(a,s),a+=h,s-=h,s||(a=0);return this.pos=a,this.len=s,this}finish(){if(this.result!==null)throw new B0("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 RE=[],LE=[];class $l extends j8{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=RE.pop()||k1(),this.asm=LE.pop()||F8({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(RE.push(this.heap),LE.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new $l().process(t).finish().result}}$l.NAME="sha1",$l.heap_pool=[],$l.asm_pool=[],$l.asm_function=F8;const NE=[],BE=[];class gg extends j8{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=NE.pop()||k1(),this.asm=BE.pop()||function(t,n,r){var a=0,s=0,l=0,c=0,h=0,i=0,p=0,d=0,v=0,m=0,_=0,y=0,b=0,E=0,D=0,x=0,C=0,k=0,w=0,T=0,M=0,A=0,R=0,H=0,L=0,V=0,j=new t.Uint8Array(r);function oe(B,I,Z,ee,he,Ee,J,G,ae,q,Pe,me,U,ke,ge,le){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,J=J|0,G=G|0,ae=ae|0,q=q|0,Pe=Pe|0,me=me|0,U=U|0,ke=ke|0,ge=ge|0,le=le|0;var F=0,W=0,X=0,ne=0,ue=0,we=0,fe=0,ce=0;F=a,W=s,X=l,ne=c,ue=h,we=i,fe=p,ce=d,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+1116352408|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+1899447441|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+3049323471|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+3921009573|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+961987163|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1508970993|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+2453635748|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+2870763221|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+3624381080|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+310598401|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+607225278|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+1426881987|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+1925078388|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+2162078206|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+2614888103|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+3248222580|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+B+q|0,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+3835390401|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Pe|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+4022224774|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(ee>>>7^ee>>>18^ee>>>3^ee<<25^ee<<14)+(B>>>17^B>>>19^B>>>10^B<<15^B<<13)+Z+me|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+264347078|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ee=(he>>>7^he>>>18^he>>>3^he<<25^he<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+ee+U|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+604807628|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,he=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+he+ke|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+770255983|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(ee>>>17^ee>>>19^ee>>>10^ee<<15^ee<<13)+Ee+ge|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1249150122|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,J=(G>>>7^G>>>18^G>>>3^G<<25^G<<14)+(he>>>17^he>>>19^he>>>10^he<<15^he<<13)+J+le|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+1555081692|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,G=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+G+B|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+1996064986|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ae=(q>>>7^q>>>18^q>>>3^q<<25^q<<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&(we^fe))+2554220882|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,q=(Pe>>>7^Pe>>>18^Pe>>>3^Pe<<25^Pe<<14)+(G>>>17^G>>>19^G>>>10^G<<15^G<<13)+q+Z|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+2821834349|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Pe=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Pe+ee|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+2952996808|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+me+he|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+3210313671|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,U=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Pe>>>17^Pe>>>19^Pe>>>10^Pe<<15^Pe<<13)+U+Ee|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+3336571891|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,ke=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+ke+J|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+3584528711|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+ge+G|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+113926993|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,le=(B>>>7^B>>>18^B>>>3^B<<25^B<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+le+ae|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+338241895|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+B+q|0,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+666307205|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Pe|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+773529912|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(ee>>>7^ee>>>18^ee>>>3^ee<<25^ee<<14)+(B>>>17^B>>>19^B>>>10^B<<15^B<<13)+Z+me|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+1294757372|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ee=(he>>>7^he>>>18^he>>>3^he<<25^he<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+ee+U|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+1396182291|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,he=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+he+ke|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+1695183700|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(ee>>>17^ee>>>19^ee>>>10^ee<<15^ee<<13)+Ee+ge|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1986661051|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,J=(G>>>7^G>>>18^G>>>3^G<<25^G<<14)+(he>>>17^he>>>19^he>>>10^he<<15^he<<13)+J+le|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+2177026350|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,G=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+G+B|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+2456956037|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ae=(q>>>7^q>>>18^q>>>3^q<<25^q<<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&(we^fe))+2730485921|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,q=(Pe>>>7^Pe>>>18^Pe>>>3^Pe<<25^Pe<<14)+(G>>>17^G>>>19^G>>>10^G<<15^G<<13)+q+Z|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+2820302411|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Pe=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Pe+ee|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+3259730800|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+me+he|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+3345764771|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,U=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Pe>>>17^Pe>>>19^Pe>>>10^Pe<<15^Pe<<13)+U+Ee|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+3516065817|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,ke=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+ke+J|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+3600352804|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+ge+G|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+4094571909|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,le=(B>>>7^B>>>18^B>>>3^B<<25^B<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+le+ae|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+275423344|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+B+q|0,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+430227734|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Pe|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+506948616|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(ee>>>7^ee>>>18^ee>>>3^ee<<25^ee<<14)+(B>>>17^B>>>19^B>>>10^B<<15^B<<13)+Z+me|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+659060556|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ee=(he>>>7^he>>>18^he>>>3^he<<25^he<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+ee+U|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+883997877|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,he=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+he+ke|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+958139571|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(ee>>>17^ee>>>19^ee>>>10^ee<<15^ee<<13)+Ee+ge|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1322822218|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,J=(G>>>7^G>>>18^G>>>3^G<<25^G<<14)+(he>>>17^he>>>19^he>>>10^he<<15^he<<13)+J+le|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+1537002063|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,G=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+G+B|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+1747873779|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ae=(q>>>7^q>>>18^q>>>3^q<<25^q<<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&(we^fe))+1955562222|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,q=(Pe>>>7^Pe>>>18^Pe>>>3^Pe<<25^Pe<<14)+(G>>>17^G>>>19^G>>>10^G<<15^G<<13)+q+Z|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+2024104815|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Pe=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Pe+ee|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+2227730452|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+me+he|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+2361852424|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,U=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Pe>>>17^Pe>>>19^Pe>>>10^Pe<<15^Pe<<13)+U+Ee|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+2428436474|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,ke=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+ke+J|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+2756734187|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+ge+G|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+3204031479|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,le=(B>>>7^B>>>18^B>>>3^B<<25^B<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+le+ae|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+3329325298|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,a=a+F|0,s=s+W|0,l=l+X|0,c=c+ne|0,h=h+ue|0,i=i+we|0,p=p+fe|0,d=d+ce|0}function Te(B){B=B|0,oe(j[B|0]<<24|j[B|1]<<16|j[B|2]<<8|j[B|3],j[B|4]<<24|j[B|5]<<16|j[B|6]<<8|j[B|7],j[B|8]<<24|j[B|9]<<16|j[B|10]<<8|j[B|11],j[B|12]<<24|j[B|13]<<16|j[B|14]<<8|j[B|15],j[B|16]<<24|j[B|17]<<16|j[B|18]<<8|j[B|19],j[B|20]<<24|j[B|21]<<16|j[B|22]<<8|j[B|23],j[B|24]<<24|j[B|25]<<16|j[B|26]<<8|j[B|27],j[B|28]<<24|j[B|29]<<16|j[B|30]<<8|j[B|31],j[B|32]<<24|j[B|33]<<16|j[B|34]<<8|j[B|35],j[B|36]<<24|j[B|37]<<16|j[B|38]<<8|j[B|39],j[B|40]<<24|j[B|41]<<16|j[B|42]<<8|j[B|43],j[B|44]<<24|j[B|45]<<16|j[B|46]<<8|j[B|47],j[B|48]<<24|j[B|49]<<16|j[B|50]<<8|j[B|51],j[B|52]<<24|j[B|53]<<16|j[B|54]<<8|j[B|55],j[B|56]<<24|j[B|57]<<16|j[B|58]<<8|j[B|59],j[B|60]<<24|j[B|61]<<16|j[B|62]<<8|j[B|63])}function pe(B){B=B|0,j[B|0]=a>>>24,j[B|1]=a>>>16&255,j[B|2]=a>>>8&255,j[B|3]=a&255,j[B|4]=s>>>24,j[B|5]=s>>>16&255,j[B|6]=s>>>8&255,j[B|7]=s&255,j[B|8]=l>>>24,j[B|9]=l>>>16&255,j[B|10]=l>>>8&255,j[B|11]=l&255,j[B|12]=c>>>24,j[B|13]=c>>>16&255,j[B|14]=c>>>8&255,j[B|15]=c&255,j[B|16]=h>>>24,j[B|17]=h>>>16&255,j[B|18]=h>>>8&255,j[B|19]=h&255,j[B|20]=i>>>24,j[B|21]=i>>>16&255,j[B|22]=i>>>8&255,j[B|23]=i&255,j[B|24]=p>>>24,j[B|25]=p>>>16&255,j[B|26]=p>>>8&255,j[B|27]=p&255,j[B|28]=d>>>24,j[B|29]=d>>>16&255,j[B|30]=d>>>8&255,j[B|31]=d&255}function ye(){a=1779033703,s=3144134277,l=1013904242,c=2773480762,h=1359893119,i=2600822924,p=528734635,d=1541459225,v=m=0}function de(B,I,Z,ee,he,Ee,J,G,ae,q){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,J=J|0,G=G|0,ae=ae|0,q=q|0,a=B,s=I,l=Z,c=ee,h=he,i=Ee,p=J,d=G,v=ae,m=q}function xe(B,I){B=B|0,I=I|0;var Z=0;if(B&63)return-1;for(;(I|0)>=64;)Te(B),B=B+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 Y(B,I,Z){B=B|0,I=I|0,Z=Z|0;var ee=0,he=0;if(B&63||~Z&&Z&31)return-1;if((I|0)>=64){if(ee=xe(B,I)|0,(ee|0)==-1)return-1;B=B+ee|0,I=I-ee|0}if(ee=ee+I|0,v=v+I|0,v>>>0>>0&&(m=m+1|0),j[B|I]=128,(I|0)>=56){for(he=I+1|0;(he|0)<64;he=he+1|0)j[B|he]=0;Te(B),I=0,j[B|0]=0}for(he=I+1|0;(he|0)<59;he=he+1|0)j[B|he]=0;return j[B|56]=m>>>21&255,j[B|57]=m>>>13&255,j[B|58]=m>>>5&255,j[B|59]=m<<3&255|v>>>29,j[B|60]=v>>>21&255,j[B|61]=v>>>13&255,j[B|62]=v>>>5&255,j[B|63]=v<<3&255,Te(B),~Z&&pe(Z),ee|0}function se(){a=_,s=y,l=b,c=E,h=D,i=x,p=C,d=k,v=64,m=0}function be(){a=w,s=T,l=M,c=A,h=R,i=H,p=L,d=V,v=64,m=0}function _e(B,I,Z,ee,he,Ee,J,G,ae,q,Pe,me,U,ke,ge,le){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,J=J|0,G=G|0,ae=ae|0,q=q|0,Pe=Pe|0,me=me|0,U=U|0,ke=ke|0,ge=ge|0,le=le|0,ye(),oe(B^1549556828,I^1549556828,Z^1549556828,ee^1549556828,he^1549556828,Ee^1549556828,J^1549556828,G^1549556828,ae^1549556828,q^1549556828,Pe^1549556828,me^1549556828,U^1549556828,ke^1549556828,ge^1549556828,le^1549556828),w=a,T=s,M=l,A=c,R=h,H=i,L=p,V=d,ye(),oe(B^909522486,I^909522486,Z^909522486,ee^909522486,he^909522486,Ee^909522486,J^909522486,G^909522486,ae^909522486,q^909522486,Pe^909522486,me^909522486,U^909522486,ke^909522486,ge^909522486,le^909522486),_=a,y=s,b=l,E=c,D=h,x=i,C=p,k=d,v=64,m=0}function re(B,I,Z){B=B|0,I=I|0,Z=Z|0;var ee=0,he=0,Ee=0,J=0,G=0,ae=0,q=0,Pe=0,me=0;return B&63||~Z&&Z&31?-1:(me=Y(B,I,-1)|0,ee=a,he=s,Ee=l,J=c,G=h,ae=i,q=p,Pe=d,be(),oe(ee,he,Ee,J,G,ae,q,Pe,2147483648,0,0,0,0,0,0,768),~Z&&pe(Z),me|0)}function Q(B,I,Z,ee,he){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0;var Ee=0,J=0,G=0,ae=0,q=0,Pe=0,me=0,U=0,ke=0,ge=0,le=0,F=0,W=0,X=0,ne=0,ue=0;if(B&63||~he&&he&31)return-1;for(j[B+I|0]=Z>>>24,j[B+I+1|0]=Z>>>16&255,j[B+I+2|0]=Z>>>8&255,j[B+I+3|0]=Z&255,re(B,I+4|0,-1)|0,Ee=ke=a,J=ge=s,G=le=l,ae=F=c,q=W=h,Pe=X=i,me=ne=p,U=ue=d,ee=ee-1|0;(ee|0)>0;)se(),oe(ke,ge,le,F,W,X,ne,ue,2147483648,0,0,0,0,0,0,768),ke=a,ge=s,le=l,F=c,W=h,X=i,ne=p,ue=d,be(),oe(ke,ge,le,F,W,X,ne,ue,2147483648,0,0,0,0,0,0,768),ke=a,ge=s,le=l,F=c,W=h,X=i,ne=p,ue=d,Ee=Ee^a,J=J^s,G=G^l,ae=ae^c,q=q^h,Pe=Pe^i,me=me^p,U=U^d,ee=ee-1|0;return a=Ee,s=J,l=G,c=ae,h=q,i=Pe,p=me,d=U,~he&&pe(he),0}return{reset:ye,init:de,process:xe,finish:Y,hmac_reset:se,hmac_init:_e,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&&(NE.push(this.heap),BE.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new gg().process(t).finish().result}}gg.NAME="sha256";var _g=z8;function z8(e,t){if(!e)throw Error(t||"Assertion failed")}z8.equal=function(e,t,n){if(e!=t)throw Error(n||"Assertion failed: "+e+" != "+t)};var qq=pa!==void 0?pa:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function O1(e,t){return e(t={exports:{}},t.exports),t.exports}function oW(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var lW=O1(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}}),uW=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&a;s?n.push(s,l):n.push(l)}else for(r=0;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}var dW=function(e,t){for(var n="",r=0;r>>0}return s},hW=function(e,t){for(var n=Array(4*e.length),r=0,a=0;r>>24,n[a+1]=s>>>16&255,n[a+2]=s>>>8&255,n[a+3]=255&s):(n[a+3]=s>>>24,n[a+2]=s>>>16&255,n[a+1]=s>>>8&255,n[a]=255&s)}return n},Nn={inherits:lW,toArray:uW,toHex:cW,htonl:U8,toHex32:dW,zero2:V8,zero8:W8,join32:fW,split32:hW,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,a){return e+t+n+r+a>>>0},sum64:function(e,t,n,r){var a=e[t],s=r+e[t+1]>>>0,l=(s>>0,e[t+1]=s},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,a,s,l,c){var h=0,i=t;return h+=(i=i+r>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,n,r,a,s,l,c){return t+r+s+c>>>0},sum64_5_hi:function(e,t,n,r,a,s,l,c,h,i){var p=0,d=t;return p+=(d=d+r>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,n,r,a,s,l,c,h,i){return t+r+s+c+i>>>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 Iv(){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 pW=Iv;Iv.prototype.update=function(e,t){if(e=Nn.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=Nn.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s>>3},g1_256:function(e){return ds(e,17)^ds(e,19)^e>>>10}},La=Nn.sum32,mW=Nn.sum32_4,gW=Nn.sum32_5,_W=xc.ch32,yW=xc.maj32,bW=xc.s0_256,wW=xc.s1_256,CW=xc.g0_256,xW=xc.g1_256,Y8=T1.BlockHash,SW=[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 gs(){if(!(this instanceof gs))return new gs;Y8.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=SW,this.W=Array(64)}Nn.inherits(gs,Y8);var X8=gs;function qs(){if(!(this instanceof qs))return new qs;X8.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}gs.blockSize=512,gs.outSize=256,gs.hmacStrength=192,gs.padLength=64,gs.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r>>32-a,n)}function di(e,t,n,r,a,s,l){return bg(t&n|~t&r,e,t,a,s,l)}function fi(e,t,n,r,a,s,l){return bg(t&r|n&~r,e,t,a,s,l)}function hi(e,t,n,r,a,s,l){return bg(t^n^r,e,t,a,s,l)}function pi(e,t,n,r,a,s,l){return bg(n^(t|~r),e,t,a,s,l)}function JW(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 UE="0123456789abcdef".split("");function ZW(e){let t="",n=0;for(;n<4;n++)t+=UE[e>>8*n+4&15]+UE[e>>8*n&15];return t}function Lo(e,t){return e+t&4294967295}const ym=Ae.getWebCrypto(),bm=Ae.getNodeCrypto(),QW=bm&&bm.getHashes();function bl(e){if(bm&&QW.includes(e))return async function(t){const n=bm.createHash(e);return Cr(t,r=>{n.update(r)},()=>new Uint8Array(n.digest()))}}function Gp(e,t){return async function(n,r=Bt){if(Tr(n)&&(n=await Ar(n)),!Ae.isStream(n)&&ym&&t&&n.length>=r.minBytesForWebCrypto)return new Uint8Array(await ym.digest(t,n));const a=e();return Cr(n,s=>{a.update(s)},()=>new Uint8Array(a.digest()))}}function VE(e,t){return async function(n,r=Bt){if(Tr(n)&&(n=await Ar(n)),Ae.isStream(n)){const a=new e;return Cr(n,s=>{a.process(s)},()=>a.finish().result)}return ym&&t&&n.length>=r.minBytesForWebCrypto?new Uint8Array(await ym.digest(t,n)):e.bytes(n)}}const wl={md5:bl("md5")||async function(e){const t=function(n){const r=n.length,a=[1732584193,-271733879,-1732584194,271733878];let s;for(s=64;s<=n.length;s+=64)ay(a,JW(n.substring(s-64,s)));n=n.substring(s-64);const l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=0;s>2]|=n.charCodeAt(s)<<(s%4<<3);if(l[s>>2]|=128<<(s%4<<3),s>55)for(ay(a,l),s=0;s<16;s++)l[s]=0;return l[14]=8*r,ay(a,l),a}(Ae.uint8ArrayToString(e));return Ae.hexToUint8Array(function(n){for(let r=0;rnew Uint8Array(b.update(E)))}(e,t,n,r);if(s.substr(0,3)==="aes")return function(d,v,m,_,y){if(Ae.getWebCrypto()&&v.length!==24&&!Ae.isStream(m)&&m.length>=3e3*y.minBytesForWebCrypto)return async function(E,D,x,C){const k="AES-CBC",w=await WE.importKey("raw",D,{name:k},!1,["encrypt"]),{blockSize:T}=Ho(E),M=Ae.concatUint8Array([new Uint8Array(T),x]),A=new Uint8Array(await WE.encrypt({name:k,iv:C},w,M)).subarray(0,x.length);return function(R,H){for(let L=0;Lb.aes.AES_Encrypt_process(E),()=>b.aes.AES_Encrypt_finish())}(e,t,n,r,a);const l=new(Ho(e))(t),c=l.blockSize,h=r.slice();let i=new Uint8Array;const p=d=>{d&&(i=Ae.concatUint8Array([i,d]));const v=new Uint8Array(i.length);let m,_=0;for(;d?i.length>=c:i.length;){const y=l.encrypt(h);for(m=0;mnew Uint8Array(y.update(b)))}(e,t,n,r);if(a.substr(0,3)==="aes")return function(p,d,v,m){if(Ae.isStream(v)){const _=new tc(d,m);return Cr(v,y=>_.aes.AES_Decrypt_process(y),()=>_.aes.AES_Decrypt_finish())}return tc.decrypt(v,d,m)}(0,t,n,r);const s=new(Ho(e))(t),l=s.blockSize;let c=r,h=new Uint8Array;const i=p=>{p&&(h=Ae.concatUint8Array([h,p]));const d=new Uint8Array(h.length);let v,m=0;for(;p?h.length>=l:h.length;){const _=s.encrypt(c);for(c=h,v=0;v48)throw new ro("illegal counter size");let s=Math.pow(2,r)-1;a.set_mask(0,0,s/4294967296|0,0|s)}else r=48,a.set_mask(0,0,65535,4294967295);if(t===void 0)throw Error("nonce is required");{let s=t.length;if(!s||s>16)throw new ro("illegal nonce size");let l=new DataView(new ArrayBuffer(16));new Uint8Array(l.buffer).set(t),a.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 ro("illegal counter value");a.set_counter(0,0,n/4294967296|0,0|n)}}}class xm{static encrypt(t,n,r=!0,a){return new xm(n,a,r).encrypt(t)}static decrypt(t,n,r=!0,a){return new xm(n,a,r).decrypt(t)}constructor(t,n,r=!0,a){this.aes=a||new Mf(t,n,r,"CBC")}encrypt(t){return Qo(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return Qo(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}const HE=Ae.getWebCrypto(),eH=Ae.getNodeCrypto(),Xs=16;function KE(e,t){const n=e.length-Xs;for(let r=0;r>3),17+(m>>3)),8-(7&m)).subarray(1),E=new Uint8Array(Ii),D=new Uint8Array(h.length+Do);let x,C=0;for(x=0;x16)throw new ro("illegal tagSize value");const h=n.length||0,i=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(An.MAC.GCM,An.HEAP_DATA,16),l.get_iv(An.HEAP_DATA),l.set_iv(0,0,0,0),i.set(c.subarray(0,16))):(i.set(n),i[15]=1);const p=new DataView(i.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>oy)throw new ro("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,a,s){return new Rl(n,r,a,s).encrypt(t)}static decrypt(t,n,r,a,s){return new Rl(n,r,a,s).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:a,heap:s}=this.aes.acquire_asm(),l=this.counter,c=this.aes.pos,h=this.aes.len,i=0,p=h+r&-16,d=0;if((l-1<<4)+h+r>oy)throw new RangeError("counter overflow");const v=new Uint8Array(p);for(;r>0;)d=Il(s,c+h,t,n,r),h+=d,n+=d,r-=d,d=a.cipher(An.ENC.CTR,An.HEAP_DATA+c,h),d=a.mac(An.MAC.GCM,An.HEAP_DATA+c,d),d&&v.set(s.subarray(c,c+d),i),l+=d>>>4,i+=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(An.MAC.GCM,An.HEAP_DATA,16),t.get_iv(An.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(An.ENC.CTR,An.HEAP_DATA,16),h.set(n.subarray(0,a),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:a,heap:s}=this.aes.acquire_asm(),l=this.counter,c=this.tagSize,h=this.aes.pos,i=this.aes.len,p=0,d=i+r>c?i+r-c&-16:0,v=i+r-d,m=0;if((l-1<<4)+i+r>oy)throw new RangeError("counter overflow");const _=new Uint8Array(d);for(;r>v;)m=Il(s,h+i,t,n,r-v),i+=m,n+=m,r-=m,m=a.mac(An.MAC.GCM,An.HEAP_DATA+h,m),m=a.cipher(An.DEC.CTR,An.HEAP_DATA+h,m),m&&_.set(s.subarray(h,h+m),p),l+=m>>>4,p+=m,h=0,i=0;return r>0&&(i+=Il(s,0,t,n,r)),this.counter=l,this.aes.pos=h,this.aes.len=i,_}AES_GCM_Decrypt_finish(){let{asm:t,heap:n}=this.aes.acquire_asm(),r=this.tagSize,a=this.adata,s=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(An.MAC.GCM,An.HEAP_DATA,16),t.get_iv(An.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(An.ENC.CTR,An.HEAP_DATA,16);let _=0;for(let y=0;y0;){for(l=Il(r,0,t,a,s),a+=l,s-=l;15&l;)r[l++]=0;n.mac(An.MAC.GCM,An.HEAP_DATA,l)}}}const ly=Ae.getWebCrypto(),JE=Ae.getNodeCrypto(),ZE=Ae.getNodeBuffer(),Uu=16,uy="AES-GCM";async function Yu(e,t){if(e!==ve.symmetric.aes128&&e!==ve.symmetric.aes192&&e!==ve.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Ae.getWebCrypto()&&t.length!==24){const n=await ly.importKey("raw",t,{name:uy},!1,["encrypt","decrypt"]);return{encrypt:async function(r,a,s=new Uint8Array){if(!r.length)return Rl.encrypt(r,t,a,s);const l=await ly.encrypt({name:uy,iv:a,additionalData:s,tagLength:8*Uu},n,r);return new Uint8Array(l)},decrypt:async function(r,a,s=new Uint8Array){if(r.length===Uu)return Rl.decrypt(r,t,a,s);const l=await ly.decrypt({name:uy,iv:a,additionalData:s,tagLength:8*Uu},n,r);return new Uint8Array(l)}}}return Ae.getNodeCrypto()?{encrypt:async function(n,r,a=new Uint8Array){const s=new JE.createCipheriv("aes-"+8*t.length+"-gcm",t,r);s.setAAD(a);const l=ZE.concat([s.update(n),s.final(),s.getAuthTag()]);return new Uint8Array(l)},decrypt:async function(n,r,a=new Uint8Array){const s=new JE.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);s.setAAD(a),s.setAuthTag(n.slice(n.length-Uu,n.length));const l=ZE.concat([s.update(n.slice(0,n.length-Uu)),s.final()]);return new Uint8Array(l)}}:{encrypt:async function(n,r,a){return Rl.encrypt(n,t,r,a)},decrypt:async function(n,r,a){return Rl.decrypt(n,t,r,a)}}}Yu.getNonce=function(e,t){const n=e.slice();for(let r=0;r>>8)-1}(re,Q,B,I,32)}function _(re,Q){var B;for(B=0;B<16;B++)re[B]=0|Q[B]}function y(re){var Q,B,I=1;for(Q=0;Q<16;Q++)B=re[Q]+I+65535,I=Math.floor(B/65536),re[Q]=B-65536*I;re[0]+=I-1+37*(I-1)}function b(re,Q,B){for(var I,Z=~(B-1),ee=0;ee<16;ee++)I=Z&(re[ee]^Q[ee]),re[ee]^=I,Q[ee]^=I}function E(re,Q){var B,I,Z,ee=n(),he=n();for(B=0;B<16;B++)he[B]=Q[B];for(y(he),y(he),y(he),I=0;I<2;I++){for(ee[0]=he[0]-65517,B=1;B<15;B++)ee[B]=he[B]-65535-(ee[B-1]>>16&1),ee[B-1]&=65535;ee[15]=he[15]-32767-(ee[14]>>16&1),Z=ee[15]>>16&1,ee[14]&=65535,b(he,ee,1-Z)}for(B=0;B<16;B++)re[2*B]=255&he[B],re[2*B+1]=he[B]>>8}function D(re,Q){var B=new Uint8Array(32),I=new Uint8Array(32);return E(B,re),E(I,Q),m(B,0,I,0)}function x(re){var Q=new Uint8Array(32);return E(Q,re),1&Q[0]}function C(re,Q){var B;for(B=0;B<16;B++)re[B]=Q[2*B]+(Q[2*B+1]<<8);re[15]&=32767}function k(re,Q,B){for(var I=0;I<16;I++)re[I]=Q[I]+B[I]}function w(re,Q,B){for(var I=0;I<16;I++)re[I]=Q[I]-B[I]}function T(re,Q,B){var I,Z,ee=0,he=0,Ee=0,J=0,G=0,ae=0,q=0,Pe=0,me=0,U=0,ke=0,ge=0,le=0,F=0,W=0,X=0,ne=0,ue=0,we=0,fe=0,ce=0,Ve=0,Je=0,_t=0,Tt=0,At=0,It=0,ht=0,Rt=0,Pt=0,hn=0,an=B[0],Jt=B[1],Yt=B[2],Qt=B[3],Xt=B[4],dn=B[5],tn=B[6],rt=B[7],at=B[8],xt=B[9],Vt=B[10],Oe=B[11],Be=B[12],Fe=B[13],Le=B[14],tt=B[15];ee+=(I=Q[0])*an,he+=I*Jt,Ee+=I*Yt,J+=I*Qt,G+=I*Xt,ae+=I*dn,q+=I*tn,Pe+=I*rt,me+=I*at,U+=I*xt,ke+=I*Vt,ge+=I*Oe,le+=I*Be,F+=I*Fe,W+=I*Le,X+=I*tt,he+=(I=Q[1])*an,Ee+=I*Jt,J+=I*Yt,G+=I*Qt,ae+=I*Xt,q+=I*dn,Pe+=I*tn,me+=I*rt,U+=I*at,ke+=I*xt,ge+=I*Vt,le+=I*Oe,F+=I*Be,W+=I*Fe,X+=I*Le,ne+=I*tt,Ee+=(I=Q[2])*an,J+=I*Jt,G+=I*Yt,ae+=I*Qt,q+=I*Xt,Pe+=I*dn,me+=I*tn,U+=I*rt,ke+=I*at,ge+=I*xt,le+=I*Vt,F+=I*Oe,W+=I*Be,X+=I*Fe,ne+=I*Le,ue+=I*tt,J+=(I=Q[3])*an,G+=I*Jt,ae+=I*Yt,q+=I*Qt,Pe+=I*Xt,me+=I*dn,U+=I*tn,ke+=I*rt,ge+=I*at,le+=I*xt,F+=I*Vt,W+=I*Oe,X+=I*Be,ne+=I*Fe,ue+=I*Le,we+=I*tt,G+=(I=Q[4])*an,ae+=I*Jt,q+=I*Yt,Pe+=I*Qt,me+=I*Xt,U+=I*dn,ke+=I*tn,ge+=I*rt,le+=I*at,F+=I*xt,W+=I*Vt,X+=I*Oe,ne+=I*Be,ue+=I*Fe,we+=I*Le,fe+=I*tt,ae+=(I=Q[5])*an,q+=I*Jt,Pe+=I*Yt,me+=I*Qt,U+=I*Xt,ke+=I*dn,ge+=I*tn,le+=I*rt,F+=I*at,W+=I*xt,X+=I*Vt,ne+=I*Oe,ue+=I*Be,we+=I*Fe,fe+=I*Le,ce+=I*tt,q+=(I=Q[6])*an,Pe+=I*Jt,me+=I*Yt,U+=I*Qt,ke+=I*Xt,ge+=I*dn,le+=I*tn,F+=I*rt,W+=I*at,X+=I*xt,ne+=I*Vt,ue+=I*Oe,we+=I*Be,fe+=I*Fe,ce+=I*Le,Ve+=I*tt,Pe+=(I=Q[7])*an,me+=I*Jt,U+=I*Yt,ke+=I*Qt,ge+=I*Xt,le+=I*dn,F+=I*tn,W+=I*rt,X+=I*at,ne+=I*xt,ue+=I*Vt,we+=I*Oe,fe+=I*Be,ce+=I*Fe,Ve+=I*Le,Je+=I*tt,me+=(I=Q[8])*an,U+=I*Jt,ke+=I*Yt,ge+=I*Qt,le+=I*Xt,F+=I*dn,W+=I*tn,X+=I*rt,ne+=I*at,ue+=I*xt,we+=I*Vt,fe+=I*Oe,ce+=I*Be,Ve+=I*Fe,Je+=I*Le,_t+=I*tt,U+=(I=Q[9])*an,ke+=I*Jt,ge+=I*Yt,le+=I*Qt,F+=I*Xt,W+=I*dn,X+=I*tn,ne+=I*rt,ue+=I*at,we+=I*xt,fe+=I*Vt,ce+=I*Oe,Ve+=I*Be,Je+=I*Fe,_t+=I*Le,Tt+=I*tt,ke+=(I=Q[10])*an,ge+=I*Jt,le+=I*Yt,F+=I*Qt,W+=I*Xt,X+=I*dn,ne+=I*tn,ue+=I*rt,we+=I*at,fe+=I*xt,ce+=I*Vt,Ve+=I*Oe,Je+=I*Be,_t+=I*Fe,Tt+=I*Le,At+=I*tt,ge+=(I=Q[11])*an,le+=I*Jt,F+=I*Yt,W+=I*Qt,X+=I*Xt,ne+=I*dn,ue+=I*tn,we+=I*rt,fe+=I*at,ce+=I*xt,Ve+=I*Vt,Je+=I*Oe,_t+=I*Be,Tt+=I*Fe,At+=I*Le,It+=I*tt,le+=(I=Q[12])*an,F+=I*Jt,W+=I*Yt,X+=I*Qt,ne+=I*Xt,ue+=I*dn,we+=I*tn,fe+=I*rt,ce+=I*at,Ve+=I*xt,Je+=I*Vt,_t+=I*Oe,Tt+=I*Be,At+=I*Fe,It+=I*Le,ht+=I*tt,F+=(I=Q[13])*an,W+=I*Jt,X+=I*Yt,ne+=I*Qt,ue+=I*Xt,we+=I*dn,fe+=I*tn,ce+=I*rt,Ve+=I*at,Je+=I*xt,_t+=I*Vt,Tt+=I*Oe,At+=I*Be,It+=I*Fe,ht+=I*Le,Rt+=I*tt,W+=(I=Q[14])*an,X+=I*Jt,ne+=I*Yt,ue+=I*Qt,we+=I*Xt,fe+=I*dn,ce+=I*tn,Ve+=I*rt,Je+=I*at,_t+=I*xt,Tt+=I*Vt,At+=I*Oe,It+=I*Be,ht+=I*Fe,Rt+=I*Le,Pt+=I*tt,X+=(I=Q[15])*an,he+=38*(ue+=I*Yt),Ee+=38*(we+=I*Qt),J+=38*(fe+=I*Xt),G+=38*(ce+=I*dn),ae+=38*(Ve+=I*tn),q+=38*(Je+=I*rt),Pe+=38*(_t+=I*at),me+=38*(Tt+=I*xt),U+=38*(At+=I*Vt),ke+=38*(It+=I*Oe),ge+=38*(ht+=I*Be),le+=38*(Rt+=I*Fe),F+=38*(Pt+=I*Le),W+=38*(hn+=I*tt),ee=(I=(ee+=38*(ne+=I*Jt))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),he=(I=he+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)),G=(I=G+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=q+Z+65535)-65536*(Z=Math.floor(I/65536)),Pe=(I=Pe+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),U=(I=U+Z+65535)-65536*(Z=Math.floor(I/65536)),ke=(I=ke+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)),F=(I=F+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),X=(I=X+Z+65535)-65536*(Z=Math.floor(I/65536)),ee=(I=(ee+=Z-1+37*(Z-1))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),he=(I=he+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)),G=(I=G+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=q+Z+65535)-65536*(Z=Math.floor(I/65536)),Pe=(I=Pe+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),U=(I=U+Z+65535)-65536*(Z=Math.floor(I/65536)),ke=(I=ke+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)),F=(I=F+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),X=(I=X+Z+65535)-65536*(Z=Math.floor(I/65536)),ee+=Z-1+37*(Z-1),re[0]=ee,re[1]=he,re[2]=Ee,re[3]=J,re[4]=G,re[5]=ae,re[6]=q,re[7]=Pe,re[8]=me,re[9]=U,re[10]=ke,re[11]=ge,re[12]=le,re[13]=F,re[14]=W,re[15]=X}function M(re,Q){T(re,Q,Q)}function A(re,Q){var B,I=n();for(B=0;B<16;B++)I[B]=Q[B];for(B=253;B>=0;B--)M(I,I),B!==2&&B!==4&&T(I,I,Q);for(B=0;B<16;B++)re[B]=I[B]}function R(re,Q,B){var I,Z,ee=new Uint8Array(32),he=new Float64Array(80),Ee=n(),J=n(),G=n(),ae=n(),q=n(),Pe=n();for(Z=0;Z<31;Z++)ee[Z]=Q[Z];for(ee[31]=127&Q[31]|64,ee[0]&=248,C(he,B),Z=0;Z<16;Z++)J[Z]=he[Z],ae[Z]=Ee[Z]=G[Z]=0;for(Ee[0]=ae[0]=1,Z=254;Z>=0;--Z)b(Ee,J,I=ee[Z>>>3]>>>(7&Z)&1),b(G,ae,I),k(q,Ee,G),w(Ee,Ee,G),k(G,J,ae),w(J,J,ae),M(ae,q),M(Pe,Ee),T(Ee,G,Ee),T(G,J,q),k(q,Ee,G),w(Ee,Ee,G),M(J,Ee),w(G,ae,Pe),T(Ee,G,c),k(Ee,Ee,ae),T(G,G,Ee),T(Ee,ae,Pe),T(ae,J,he),M(J,q),b(Ee,J,I),b(G,ae,I);for(Z=0;Z<16;Z++)he[Z+16]=Ee[Z],he[Z+32]=G[Z],he[Z+48]=J[Z],he[Z+64]=ae[Z];var me=he.subarray(32),U=he.subarray(16);return A(me,me),T(U,U,me),E(re,U),0}function H(re,Q){return R(re,Q,a)}function L(re,Q){var B=n(),I=n(),Z=n(),ee=n(),he=n(),Ee=n(),J=n(),G=n(),ae=n();w(B,re[1],re[0]),w(ae,Q[1],Q[0]),T(B,B,ae),k(I,re[0],re[1]),k(ae,Q[0],Q[1]),T(I,I,ae),T(Z,re[3],Q[3]),T(Z,Z,i),T(ee,re[2],Q[2]),k(ee,ee,ee),w(he,I,B),w(Ee,ee,Z),k(J,ee,Z),k(G,I,B),T(re[0],he,Ee),T(re[1],G,J),T(re[2],J,Ee),T(re[3],he,G)}function V(re,Q,B){var I;for(I=0;I<4;I++)b(re[I],Q[I],B)}function j(re,Q){var B=n(),I=n(),Z=n();A(Z,Q[2]),T(B,Q[0],Z),T(I,Q[1],Z),E(re,I),re[31]^=x(B)<<7}function oe(re,Q,B){var I,Z;for(_(re[0],s),_(re[1],l),_(re[2],l),_(re[3],s),Z=255;Z>=0;--Z)V(re,Q,I=B[Z/8|0]>>(7&Z)&1),L(Q,re),L(re,re),V(re,Q,I)}function Te(re,Q){var B=[n(),n(),n(),n()];_(B[0],p),_(B[1],d),_(B[2],l),T(B[3],p,d),oe(re,B,Q)}function pe(re,Q,B){var I,Z,ee=[n(),n(),n(),n()];for(B||r(Q,32),(I=t.hash(Q.subarray(0,32)))[0]&=248,I[31]&=127,I[31]|=64,Te(ee,I),j(re,ee),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 B,I,Z,ee;for(I=63;I>=32;--I){for(B=0,Z=I-32,ee=I-12;Z>4)*ye[Z],B=Q[Z]>>8,Q[Z]&=255;for(Z=0;Z<32;Z++)Q[Z]-=B*ye[Z];for(I=0;I<32;I++)Q[I+1]+=Q[I]>>8,re[I]=255&Q[I]}function xe(re){var Q,B=new Float64Array(64);for(Q=0;Q<64;Q++)B[Q]=re[Q];for(Q=0;Q<64;Q++)re[Q]=0;de(re,B)}function Y(re,Q){var B=n(),I=n(),Z=n(),ee=n(),he=n(),Ee=n(),J=n();return _(re[2],l),C(re[1],Q),M(Z,re[1]),T(ee,Z,h),w(Z,Z,re[2]),k(ee,re[2],ee),M(he,ee),M(Ee,he),T(J,Ee,he),T(B,J,Z),T(B,B,ee),function(G,ae){var q,Pe=n();for(q=0;q<16;q++)Pe[q]=ae[q];for(q=250;q>=0;q--)M(Pe,Pe),q!==1&&T(Pe,Pe,ae);for(q=0;q<16;q++)G[q]=Pe[q]}(B,B),T(B,B,Z),T(B,B,ee),T(B,B,ee),T(re[0],B,ee),M(I,re[0]),T(I,I,ee),D(I,Z)&&T(re[0],re[0],v),M(I,re[0]),T(I,I,ee),D(I,Z)?-1:(x(re[0])===Q[31]>>7&&w(re[0],s,re[0]),T(re[3],re[0],re[1]),0)}var se=64;function be(){for(var re=0;re=0},t.sign.keyPair=function(){var re=new Uint8Array(32),Q=new Uint8Array(64);return pe(re,Q),{publicKey:re,secretKey:Q}},t.sign.keyPair.fromSecretKey=function(re){if(be(re),re.length!==64)throw Error("bad secret key size");for(var Q=new Uint8Array(32),B=0;Be&&(h.imod(s.leftShift(a)).iadd(s),i=h.mod(l).toNumber());while(!await rO(h,t,n));return h}async function rO(e,t,n){return!(t&&!e.dec().gcd(t).isOne())&&!!await async function(r){const a=await Ae.getBigInteger();return uH.every(s=>r.mod(new a(s))!==0)}(e)&&!!await async function(r,a){const s=await Ae.getBigInteger();return a=a||new s(2),a.modExp(r.dec(),r).isOne()}(e)&&!!await async function(r,a,s){const l=await Ae.getBigInteger(),c=r.bitLength();a||(a=Math.max(1,c/48|0));const h=r.dec();let i=0;for(;!h.getBit(i);)i++;const p=r.rightShift(new l(i));for(;a>0;a--){let d,v=(s?s():await co(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(s){const l=new Uint8Array(s);let c=0;for(;c=8&!r;if(t)return Ae.selectUint8Array(l,s,t);if(l)return s;throw Error("Decryption error")}async function U0(e,t,n){let r;if(t.length!==cc.getHashByteLength(e))throw Error("Invalid hash length");const a=new Uint8Array(vs[e].length);for(r=0;rimport("./bn.min.1f47700f.js"),[]),D=new E(_),x=new E(y),C=new E(m),k=C.mod(x.subn(1)),w=C.mod(D.subn(1)),T=gi.createSign(ve.read(ve.hash,i));T.write(p),T.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:k,exponent2:w,coefficient:new E(b)};if(gi.createPrivateKey!==void 0){const R=$u.encode(M,"der");return new Uint8Array(T.sign({key:R,format:"der",type:"pkcs1"}))}const A=$u.encode(M,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(T.sign(A))}(e,t,n,r,a,s,l,c)}return async function(i,p,d,v){const m=await Ae.getBigInteger();p=new m(p);const _=new m(await U0(i,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,a,h)},verify:async function(e,t,n,r,a,s){if(t&&!Ae.isStream(t)){if(Ae.getWebCrypto())try{return await async function(l,c,h,i,p){const d=function(m,_){return{kty:"RSA",n:ua(m,!0),e:ua(_,!0),ext:!0}}(i,p),v=await Iu.importKey("jwk",d,{name:"RSASSA-PKCS1-v1_5",hash:{name:l}},!1,["verify"]);return Iu.verify("RSASSA-PKCS1-v1_5",v,h,c)}(ve.read(ve.webHash,e),t,n,r,a)}catch(l){Ae.printDebugError(l)}else if(Ae.getNodeCrypto())return async function(l,c,h,i,p){const{default:d}=await kn(()=>import("./bn.min.1f47700f.js"),[]),v=gi.createVerify(ve.read(ve.hash,l));v.write(c),v.end();const m={modulus:new d(i),publicExponent:new d(p)};let _;gi.createPrivateKey!==void 0?_={key:Zp.encode(m,"der"),format:"der",type:"pkcs1"}:_=Zp.encode(m,"pem",{label:"RSA PUBLIC KEY"});try{return await v.verify(_,h)}catch{return!1}}(e,t,n,r,a)}return async function(l,c,h,i,p){const d=await Ae.getBigInteger();if(h=new d(h),c=new d(c),i=new d(i),c.gte(h))throw Error("Signature size cannot exceed modulus size");const v=c.modExp(i,h).toUint8Array("be",h.byteLength()),m=await U0(l,p,h.byteLength());return Ae.equalsUint8Array(v,m)}(e,n,r,a,s)},encrypt:async function(e,t,n){return Ae.getNodeCrypto()?async function(r,a,s){const{default:l}=await kn(()=>import("./bn.min.1f47700f.js"),[]),c={modulus:new l(a),publicExponent:new l(s)};let h;return gi.createPrivateKey!==void 0?h={key:Zp.encode(c,"der"),format:"der",type:"pkcs1",padding:gi.constants.RSA_PKCS1_PADDING}:h={key:Zp.encode(c,"pem",{label:"RSA PUBLIC KEY"}),padding:gi.constants.RSA_PKCS1_PADDING},new Uint8Array(gi.publicEncrypt(h,r))}(e,t,n):async function(r,a,s){const l=await Ae.getBigInteger();if(a=new l(a),r=new l(P1(r,a.byteLength())),s=new l(s),r.gte(a))throw Error("Message size cannot exceed modulus size");return r.modExp(s,a).toUint8Array("be",a.byteLength())}(e,t,n)},decrypt:async function(e,t,n,r,a,s,l,c){return Ae.getNodeCrypto()?async function(h,i,p,d,v,m,_,y){const{default:b}=await kn(()=>import("./bn.min.1f47700f.js"),[]),E=new b(v),D=new b(m),x=new b(d),C=x.mod(D.subn(1)),k=x.mod(E.subn(1)),w={version:0,modulus:new b(i),publicExponent:new b(p),privateExponent:new b(d),prime1:new b(m),prime2:new b(v),exponent1:C,exponent2:k,coefficient:new b(_)};let T;gi.createPrivateKey!==void 0?T={key:$u.encode(w,"der"),format:"der",type:"pkcs1",padding:gi.constants.RSA_PKCS1_PADDING}:T={key:$u.encode(w,"pem",{label:"RSA PRIVATE KEY"}),padding:gi.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(gi.privateDecrypt(T,h))}catch{if(y)return y;throw Error("Decryption error")}}(e,t,n,r,a,s,l,c):async function(h,i,p,d,v,m,_,y){const b=await Ae.getBigInteger();if(h=new b(h),i=new b(i),p=new b(p),d=new b(d),v=new b(v),m=new b(m),_=new b(_),h.gte(i))throw Error("Data too large.");const E=d.mod(m.dec()),D=d.mod(v.dec()),x=(await co(new b(2),i)).mod(i),C=x.modInv(i).modExp(p,i);h=h.mul(C).mod(i);const k=h.modExp(D,v),w=h.modExp(E,m);let M=_.mul(w.sub(k)).mod(m).mul(v).add(k);return M=M.mul(x).mod(i),A1(M.toUint8Array("be",i.byteLength()),y)}(e,t,n,r,a,s,l,c)},generate:async function(e,t){if(t=new(await Ae.getBigInteger())(t),Ae.getWebCrypto()){const l={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},c=await Iu.generateKey(l,!0,["sign","verify"]),h=await Iu.exportKey("jwk",c.privateKey);return{n:Qs(h.n),e:t.toUint8Array(),d:Qs(h.d),p:Qs(h.q),q:Qs(h.p),u:Qs(h.qi)}}if(Ae.getNodeCrypto()&&gi.generateKeyPair&&$u){const l={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},c=await new Promise((h,i)=>{gi.generateKeyPair("rsa",l,(p,d,v)=>{p?i(p):h($u.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,a;do r=await qE(e-(e>>1),t,40),n=await qE(e>>1,t,40),a=n.mul(r);while(a.bitLength()!==e);const s=n.dec().imul(r.dec());return r.lt(n)&&([n,r]=[r,n]),{n:a.toUint8Array(),e:t.toUint8Array(),d:t.modInv(s).toUint8Array(),p:n.toUint8Array(),q:r.toUint8Array(),u:n.modInv(r).toUint8Array()}},validateParams:async function(e,t,n,r,a,s){const l=await Ae.getBigInteger();if(e=new l(e),r=new l(r),a=new l(a),!r.mul(a).equal(e))return!1;const c=new l(2);if(s=new l(s),!r.mul(s).mod(a).isOne())return!1;t=new l(t),n=new l(n);const h=new l(Math.floor(e.bitLength()/3)),i=await co(c,c.leftShift(h)),p=i.mul(n).mul(t);return!(!p.mod(r.dec()).equal(i)||!p.mod(a.dec()).equal(i))}}),fH=Object.freeze({__proto__:null,encrypt:async function(e,t,n,r){const a=await Ae.getBigInteger();t=new a(t),n=new a(n),r=new a(r);const s=new a(P1(e,t.byteLength())),l=await co(new a(1),t.dec());return{c1:n.modExp(l,t).toUint8Array(),c2:r.modExp(l,t).imul(s).imod(t).toUint8Array()}},decrypt:async function(e,t,n,r,a){const s=await Ae.getBigInteger();return e=new s(e),t=new s(t),n=new s(n),r=new s(r),A1(e.modExp(r,n).modInv(n).imul(t).imod(n).toUint8Array("be",n.byteLength()),a)},validateParams:async function(e,t,n,r){const a=await Ae.getBigInteger();e=new a(e),t=new a(t),n=new a(n);const s=new a(1);if(t.lte(s)||t.gte(e))return!1;const l=new a(e.bitLength()),c=new a(1023);if(l.lt(c)||!t.modExp(e.dec(),e).isOne())return!1;let h=t;const i=new a(1),p=new a(2).leftShift(new a(17));for(;i.lt(p);){if(h=h.mul(t).imod(e),h.isOne())return!1;i.iinc()}r=new a(r);const d=new a(2),v=await co(d.leftShift(l.dec()),d.leftShift(l)),m=e.dec().imul(v).iadd(r);return!!n.equal(t.modExp(m,e))}});class ys{constructor(t){if(t instanceof ys)this.oid=t.oid;else if(Ae.isArray(t)||Ae.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 Ae.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Ae.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 wg(e,t){return e.keyPair({priv:t})}function Cg(e,t){const n=e.keyPair({pub:t});if(n.validate().result!==!0)throw Error("Invalid elliptic public key");return n}async function Sc(e){if(!Bt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await kn(()=>import("./elliptic.min.50416e92.js"),["js/build/elliptic.min.50416e92.js","js/build/bn.min.1f47700f.js"]);return new t.ec(e)}function aO(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=Ae.readNumber(e.subarray(1,5)),t=5),{len:n,offset:t}}function $f(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Ae.concatUint8Array([new Uint8Array([255]),Ae.writeNumber(e,4)])}function hH(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function sO(e){return new Uint8Array([192|e])}function e4(e,t){return Ae.concatUint8Array([sO(e),$f(t)])}function $v(e){return[ve.packet.literalData,ve.packet.compressedData,ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData].includes(e)}async function pH(e,t){const n=Bs(e);let r,a;try{const s=await n.peekBytes(2);if(!s||s.length<2||(128&s[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,i=-1,p=-1;p=0,(64&l)!=0&&(p=1),p?i=63&l:(i=(63&l)>>2,h=3&l);const d=$v(i);let v,m=null;if(d){if(Ae.isStream(e)==="array"){const y=new Ds;r=ta(y),m=y}else{const y=new uc;r=ta(y.writable),m=y.readable}a=t({tag:i,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 D=c===1/0?E:E.subarray(0,c-y);if(r?await r.write(D):m.push(D),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=Ae.concatUint8Array(m),await t({tag:i,packet:m})),!_||!_.length}catch(s){if(r)return await r.abort(s),!0;throw s}finally{r&&await a,n.releaseLock()}}class jr extends Error{constructor(...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,jr),this.name="UnsupportedError"}}class V0{constructor(t,n){this.tag=t,this.rawContent=n}write(){return this.rawContent}}const cy=Ae.getWebCrypto(),Sm=Ae.getNodeCrypto(),Is={p256:"P-256",p384:"P-384",p521:"P-521"},Ks=Sm?Sm.getCurves():[],Oo=Sm?{secp256k1:Ks.includes("secp256k1")?"secp256k1":void 0,p256:Ks.includes("prime256v1")?"prime256v1":void 0,p384:Ks.includes("secp384r1")?"secp384r1":void 0,p521:Ks.includes("secp521r1")?"secp521r1":void 0,ed25519:Ks.includes("ED25519")?"ED25519":void 0,curve25519:Ks.includes("X25519")?"X25519":void 0,brainpoolP256r1:Ks.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:Ks.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:Ks.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Rv={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:Oo.p256,web:Is.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:Oo.p384,web:Is.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:Oo.p521,web:Is.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:Oo.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:Oo.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:Oo.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:Oo.brainpoolP512r1,payloadSize:64}};class fo{constructor(t,n){try{(Ae.isArray(t)||Ae.isUint8Array(t))&&(t=new ys(t)),t instanceof ys&&(t=t.getName()),this.name=ve.write(ve.curve,t)}catch{throw new jr("Unknown curve")}n=n||Rv[this.name],this.keyType=n.keyType,this.oid=n.oid,this.hash=n.hash,this.cipher=n.cipher,this.node=n.node&&Rv[this.name],this.web=n.web&&Rv[this.name],this.payloadSize=n.payloadSize,this.web&&Ae.getWebCrypto()?this.type="web":this.node&&Ae.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 a=await cy.generateKey({name:"ECDSA",namedCurve:Is[r]},!0,["sign","verify"]),s=await cy.exportKey("jwk",a.privateKey),l=await cy.exportKey("jwk",a.publicKey);return{publicKey:lO(l),privateKey:Qs(s.d)}}(this.name)}catch(r){Ae.printDebugError("Browser did not support generating ec key "+r.message);break}case"node":return async function(r){const a=Sm.createECDH(Oo[r]);return await a.generateKeys(),{publicKey:new Uint8Array(a.getPublicKey()),privateKey:new Uint8Array(a.getPrivateKey())}}(this.name);case"curve25519":{const r=Ms(32);r[0]=127&r[0]|64,r[31]&=248;const a=r.slice().reverse();return t=As.box.keyPair.fromSecretKey(a),{publicKey:Ae.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:r}}case"ed25519":{const r=Ms(32),a=As.sign.keyPair.fromSeed(r);return{publicKey:Ae.concatUint8Array([new Uint8Array([64]),a.publicKey]),privateKey:r}}}return t=await(await Sc(this.name)).genKeyPair({entropy:Ae.uint8ArrayToString(Ms(32))}),{publicKey:new Uint8Array(t.getPublic("array",!1)),privateKey:t.getPrivate().toArrayLike(Uint8Array)}}}async function oO(e,t,n,r){const a={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===ve.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},s=t.getName();if(!a[s])return!1;if(s==="curve25519"){r=r.slice().reverse();const{publicKey:c}=As.box.keyPair.fromSecretKey(r);n=new Uint8Array(n);const h=new Uint8Array([64,...c]);return!!Ae.equalsUint8Array(h,n)}const l=await Sc(s);try{n=Cg(l,n).getPublic()}catch{return!1}return!!wg(l,r).getPublic().eq(n)}function lO(e){const t=Qs(e.x),n=Qs(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 xg(e,t,n){const r=e,a=n.slice(1,r+1),s=n.slice(r+1,2*r+1);return{kty:"EC",crv:t,x:ua(a,!0),y:ua(s,!0),ext:!0}}function uO(e,t,n,r){const a=xg(e,t,n);return a.d=ua(r,!0),a}const Em=Ae.getWebCrypto(),Ec=Ae.getNodeCrypto();async function t4(e,t,n,r,a,s){const l=new fo(e);if(n&&!Ae.isStream(n)){const c={publicKey:r,privateKey:a};switch(l.type){case"web":try{return await async function(h,i,p,d){const v=h.payloadSize,m=uO(h.payloadSize,Is[h.name],d.publicKey,d.privateKey),_=await Em.importKey("jwk",m,{name:"ECDSA",namedCurve:Is[h.name],hash:{name:ve.read(ve.webHash,h.hash)}},!1,["sign"]),y=new Uint8Array(await Em.sign({name:"ECDSA",namedCurve:Is[h.name],hash:{name:ve.read(ve.webHash,i)}},_,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;Ae.printDebugError("Browser did not support signing: "+h.message)}break;case"node":{const h=await async function(i,p,d,v){const m=Ec.createSign(ve.read(ve.hash,p));m.write(d),m.end();const _=vH.encode({version:1,parameters:i.oid,privateKey:Array.from(v.privateKey),publicKey:{unused:0,data:Array.from(v.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return cO.decode(m.sign(_),"der")}(l,t,n,c);return{r:h.r.toArrayLike(Uint8Array),s:h.s.toArrayLike(Uint8Array)}}}}return async function(c,h,i){const p=await Sc(c.name),d=wg(p,i),v=d.sign(h);return{r:v.r.toArrayLike(Uint8Array),s:v.s.toArrayLike(Uint8Array)}}(l,s,a)}async function n4(e,t,n,r,a,s){const l=new fo(e);if(r&&!Ae.isStream(r))switch(l.type){case"web":try{return await async function(c,h,{r:i,s:p},d,v){const m=xg(c.payloadSize,Is[c.name],v),_=await Em.importKey("jwk",m,{name:"ECDSA",namedCurve:Is[c.name],hash:{name:ve.read(ve.webHash,c.hash)}},!1,["verify"]),y=Ae.concatUint8Array([i,p]).buffer;return Em.verify({name:"ECDSA",namedCurve:Is[c.name],hash:{name:ve.read(ve.webHash,h)}},_,y,d)}(l,t,n,r,a)}catch(c){if(l.name!=="p521"&&(c.name==="DataError"||c.name==="OperationError"))throw c;Ae.printDebugError("Browser did not support verifying: "+c.message)}break;case"node":return async function(c,h,{r:i,s:p},d,v){const{default:m}=await kn(()=>import("./bn.min.1f47700f.js"),[]),_=Ec.createVerify(ve.read(ve.hash,h));_.write(d),_.end();const y=gH.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:c.oid},subjectPublicKey:{unused:0,data:Array.from(v)}},"pem",{label:"PUBLIC KEY"}),b=cO.encode({r:new m(i),s:new m(p)},"der");try{return _.verify(y,b)}catch{return!1}}(l,t,n,r,a)}return async function(c,h,i,p){const d=await Sc(c.name);return Cg(d,p).verify(i,h)}(l,n,t===void 0?r:s,a)}const Sg=void 0,cO=Ec?Sg.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,vH=Ec?Sg.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,mH=Ec?Sg.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,gH=Ec?Sg.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(mH),this.key("subjectPublicKey").bitstr())}):void 0;var _H=Object.freeze({__proto__:null,sign:t4,verify:n4,validateParams:async function(e,t,n){const r=new fo(e);if(r.keyType!==ve.publicKey.ecdsa)return!1;switch(r.type){case"web":case"node":{const a=Ms(8),s=ve.hash.sha256,l=await cc.digest(s,a);try{const c=await t4(e,s,a,t,n,l);return await n4(e,s,c,a,t,l)}catch{return!1}}default:return oO(ve.publicKey.ecdsa,e,t,n)}}});As.hash=e=>new Uint8Array(yg().update(e).digest());var yH=Object.freeze({__proto__:null,sign:async function(e,t,n,r,a,s){if(cc.getHashByteLength(t)=0;--p)for(let d=c-1;d>=0;--d)h[1]=c*p+(d+1),i[0]=s[0]^h[0],i[1]=s[1]^h[1],i[2]=l[2*d],i[3]=l[2*d+1],i=km(n.decrypt(Dm(i))),s=i.subarray(0,2),l[2*d]=i[2],l[2*d+1]=i[3];if(s[0]===r[0]&&s[1]===r[1])return Dm(l);throw Error("Key Data Integrity failed")}function km(e){const{length:t}=e,n=function(s){if(Ae.isString(s)){const{length:l}=s,c=new ArrayBuffer(l),h=new Uint8Array(c);for(let i=0;i0){const n=e[t-1];if(n>=1){const r=e.subarray(t-n),a=new Uint8Array(n).fill(n);if(Ae.equalsUint8Array(r,a))return e.subarray(0,t-n)}}throw Error("Invalid padding")}var wH=Object.freeze({__proto__:null,encode:hO,decode:pO});const No=Ae.getWebCrypto(),vO=Ae.getNodeCrypto();function r4(e,t,n,r){return Ae.concatUint8Array([t.write(),new Uint8Array([e]),n.write(),Ae.stringToUint8Array("Anonymous Sender "),r.subarray(0,20)])}async function i4(e,t,n,r,a=!1,s=!1){let l;if(a){for(l=0;l=0&&t[l]===0;l--);t=t.subarray(0,l+1)}return(await cc.digest(e,Ae.concatUint8Array([new Uint8Array([0,0,0,1]),t,r]))).subarray(0,n)}async function CH(e,t){switch(e.type){case"curve25519":{const n=Ms(32),{secretKey:r,sharedKey:a}=await mO(e,t,null,n);let{publicKey:s}=As.box.keyPair.fromSecretKey(r);return s=Ae.concatUint8Array([new Uint8Array([64]),s]),{publicKey:s,sharedKey:a}}case"web":if(e.web&&Ae.getWebCrypto())try{return await async function(n,r){const a=xg(n.payloadSize,n.web.web,r);let s=No.generateKey({name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]),l=No.importKey("jwk",a,{name:"ECDH",namedCurve:n.web.web},!1,[]);[s,l]=await Promise.all([s,l]);let c=No.deriveBits({name:"ECDH",namedCurve:n.web.web,public:l},s.privateKey,n.web.sharedSize),h=No.exportKey("jwk",s.publicKey);[c,h]=await Promise.all([c,h]);const i=new Uint8Array(c);return{publicKey:new Uint8Array(lO(h)),sharedKey:i}}(e,t)}catch(n){Ae.printDebugError(n)}break;case"node":return async function(n,r){const a=vO.createECDH(n.node.node);a.generateKeys();const s=new Uint8Array(a.computeSecret(r));return{publicKey:new Uint8Array(a.getPublicKey()),sharedKey:s}}(e,t)}return async function(n,r){const a=await Sc(n.name),s=await n.genKeyPair();r=Cg(a,r);const l=wg(a,s.privateKey),c=s.publicKey,h=l.derive(r.getPublic()),i=a.curve.p.byteLength(),p=h.toArrayLike(Uint8Array,"be",i);return{publicKey:c,sharedKey:p}}(e,t)}async function mO(e,t,n,r){if(r.length!==e.payloadSize){const a=new Uint8Array(e.payloadSize);a.set(r,e.payloadSize-r.length),r=a}switch(e.type){case"curve25519":{const a=r.slice().reverse();return{secretKey:a,sharedKey:As.scalarMult(a,t.subarray(1))}}case"web":if(e.web&&Ae.getWebCrypto())try{return await async function(a,s,l,c){const h=uO(a.payloadSize,a.web.web,l,c);let i=No.importKey("jwk",h,{name:"ECDH",namedCurve:a.web.web},!0,["deriveKey","deriveBits"]);const p=xg(a.payloadSize,a.web.web,s);let d=No.importKey("jwk",p,{name:"ECDH",namedCurve:a.web.web},!0,[]);[i,d]=await Promise.all([i,d]);let v=No.deriveBits({name:"ECDH",namedCurve:a.web.web,public:d},i,a.web.sharedSize),m=No.exportKey("jwk",i);[v,m]=await Promise.all([v,m]);const _=new Uint8Array(v);return{secretKey:Qs(m.d),sharedKey:_}}(e,t,n,r)}catch(a){Ae.printDebugError(a)}break;case"node":return async function(a,s,l){const c=vO.createECDH(a.node.node);c.setPrivateKey(l);const h=new Uint8Array(c.computeSecret(s));return{secretKey:new Uint8Array(c.getPrivateKey()),sharedKey:h}}(e,t,r)}return async function(a,s,l){const c=await Sc(a.name);s=Cg(c,s),l=wg(c,l);const h=new Uint8Array(l.getPrivate()),i=l.derive(s.getPublic()),p=c.curve.p.byteLength(),d=i.toArrayLike(Uint8Array,"be",p);return{secretKey:h,sharedKey:d}}(e,t,r)}var xH=Object.freeze({__proto__:null,validateParams:async function(e,t,n){return oO(ve.publicKey.ecdh,e,t,n)},encrypt:async function(e,t,n,r,a){const s=hO(n),l=new fo(e),{publicKey:c,sharedKey:h}=await CH(l,r),i=r4(ve.publicKey.ecdh,e,t,a),{keySize:p}=Ho(t.cipher);return{publicKey:c,wrappedKey:dO(await i4(t.hash,h,p,i),s)}},decrypt:async function(e,t,n,r,a,s,l){const c=new fo(e),{sharedKey:h}=await mO(c,n,a,s),i=r4(ve.publicKey.ecdh,e,t,l),{keySize:p}=Ho(t.cipher);let d;for(let v=0;v<3;v++)try{return pO(fO(await i4(t.hash,h,p,i,v===1,v===2),r))}catch(m){d=m}throw d}}),SH=Object.freeze({__proto__:null,Curve:fo,ecdh:xH,ecdsa:_H,eddsa:yH,generate:async function(e){const t=await Ae.getBigInteger();e=new fo(e);const n=await e.genKeyPair(),r=new t(n.publicKey).toUint8Array(),a=new t(n.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:r,secret:a,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return Rv[ve.write(ve.curve,e.toHex())].hash}}),EH=Object.freeze({__proto__:null,sign:async function(e,t,n,r,a,s){const l=await Ae.getBigInteger(),c=new l(1);let h,i,p,d;r=new l(r),a=new l(a),n=new l(n),s=new l(s),n=n.mod(r),s=s.mod(a);const v=new l(t.subarray(0,a.byteLength())).mod(a);for(;;){if(h=await co(c,a),i=n.modExp(h,r).imod(a),i.isZero())continue;const m=s.mul(i).imod(a);if(d=v.add(m).imod(a),p=h.modInv(a).imul(d).imod(a),!p.isZero())break}return{r:i.toUint8Array("be",a.byteLength()),s:p.toUint8Array("be",a.byteLength())}},verify:async function(e,t,n,r,a,s,l,c){const h=await Ae.getBigInteger(),i=new h(0);if(t=new h(t),n=new h(n),s=new h(s),l=new h(l),a=new h(a),c=new h(c),t.lte(i)||t.gte(l)||n.lte(i)||n.gte(l))return Ae.printDebug("invalid DSA Signature"),!1;const p=new h(r.subarray(0,l.byteLength())).imod(l),d=n.modInv(l);if(d.isZero())return Ae.printDebug("invalid DSA Signature"),!1;a=a.mod(s),c=c.mod(s);const v=p.mul(d).imod(l),m=t.mul(d).imod(l),_=a.modExp(v,s),y=c.modExp(m,s);return _.mul(y).imod(s).imod(l).equal(t)},validateParams:async function(e,t,n,r,a){const s=await Ae.getBigInteger();e=new s(e),t=new s(t),n=new s(n),r=new s(r);const l=new s(1);if(n.lte(l)||n.gte(e)||!e.dec().mod(t).isZero()||!n.modExp(t,e).isOne())return!1;const c=new s(t.bitLength()),h=new s(150);if(c.lt(h)||!await rO(t,null,32))return!1;a=new s(a);const i=new s(2),p=await co(i.leftShift(c.dec()),i.leftShift(c)),d=t.mul(p).add(a);return!!r.equal(n.modExp(d,e))}}),cr={rsa:dH,elgamal:fH,elliptic:SH,dsa:EH,nacl:As},kH=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:Ae.readMPI(t.subarray(n))};case ve.publicKey.dsa:case ve.publicKey.ecdsa:{const r=Ae.readMPI(t.subarray(n));return n+=r.length+2,{r,s:Ae.readMPI(t.subarray(n))}}case ve.publicKey.eddsa:{let r=Ae.readMPI(t.subarray(n));n+=r.length+2,r=Ae.leftPad(r,32);let a=Ae.readMPI(t.subarray(n));return a=Ae.leftPad(a,32),{r,s:a}}default:throw new jr("Unknown signature algorithm.")}},verify:async function(e,t,n,r,a,s){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=r,h=Ae.leftPad(n.s,l.length);return cr.rsa.verify(t,a,h,l,c,s)}case ve.publicKey.dsa:{const{g:l,p:c,q:h,y:i}=r,{r:p,s:d}=n;return cr.dsa.verify(t,p,d,s,l,c,h,i)}case ve.publicKey.ecdsa:{const{oid:l,Q:c}=r,h=new cr.elliptic.Curve(l).payloadSize,i=Ae.leftPad(n.r,h),p=Ae.leftPad(n.s,h);return cr.elliptic.ecdsa.verify(l,t,{r:i,s:p},a,c,s)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=r;return cr.elliptic.eddsa.verify(l,t,n,a,c,s)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,n,r,a,s){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:i,q:p,u:d}=r;return{s:await cr.rsa.sign(t,a,l,c,h,i,p,d,s)}}case ve.publicKey.dsa:{const{g:l,p:c,q:h}=n,{x:i}=r;return cr.dsa.sign(t,s,l,c,h,i)}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 cr.elliptic.ecdsa.sign(l,t,a,c,h,s)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=n,{seed:h}=r;return cr.elliptic.eddsa.sign(l,t,a,c,h,s)}default:throw Error("Unknown signature algorithm.")}}});class a4{constructor(t){t=t===void 0?new Uint8Array([]):Ae.isString(t)?Ae.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 Ae.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class s4{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 dy(e){try{e.getName()}catch{throw new jr("Unknown curve OID")}}var DH=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,n,r){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:{const{n:a,e:s}=t;return{c:await cr.rsa.encrypt(n,a,s)}}case ve.publicKey.elgamal:{const{p:a,g:s,y:l}=t;return cr.elgamal.encrypt(n,a,s,l)}case ve.publicKey.ecdh:{const{oid:a,Q:s,kdfParams:l}=t,{publicKey:c,wrappedKey:h}=await cr.elliptic.ecdh.encrypt(a,l,n,s,r);return{V:c,C:new a4(h)}}default:return[]}},publicKeyDecrypt:async function(e,t,n,r,a,s){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:{const{c:l}=r,{n:c,e:h}=t,{d:i,p,q:d,u:v}=n;return cr.rsa.decrypt(l,c,h,i,p,d,v,s)}case ve.publicKey.elgamal:{const{c1:l,c2:c}=r,h=t.p,i=n.x;return cr.elgamal.decrypt(l,c,h,i,s)}case ve.publicKey.ecdh:{const{oid:l,Q:c,kdfParams:h}=t,{d:i}=n,{V:p,C:d}=r;return cr.elliptic.ecdh.decrypt(l,h,p,d.data,c,i,a)}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=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=Ae.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{n:r,e:a}}}case ve.publicKey.dsa:{const r=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=Ae.readMPI(t.subarray(n));n+=a.length+2;const s=Ae.readMPI(t.subarray(n));n+=s.length+2;const l=Ae.readMPI(t.subarray(n));return n+=l.length+2,{read:n,publicParams:{p:r,q:a,g:s,y:l}}}case ve.publicKey.elgamal:{const r=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=Ae.readMPI(t.subarray(n));n+=a.length+2;const s=Ae.readMPI(t.subarray(n));return n+=s.length+2,{read:n,publicParams:{p:r,g:a,y:s}}}case ve.publicKey.ecdsa:{const r=new ys;n+=r.read(t),dy(r);const a=Ae.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{oid:r,Q:a}}}case ve.publicKey.eddsa:{const r=new ys;n+=r.read(t),dy(r);let a=Ae.readMPI(t.subarray(n));return n+=a.length+2,a=Ae.leftPad(a,33),{read:n,publicParams:{oid:r,Q:a}}}case ve.publicKey.ecdh:{const r=new ys;n+=r.read(t),dy(r);const a=Ae.readMPI(t.subarray(n));n+=a.length+2;const s=new s4;return n+=s.read(t.subarray(n)),{read:n,publicParams:{oid:r,Q:a,kdfParams:s}}}default:throw new jr("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 a=Ae.readMPI(t.subarray(r));r+=a.length+2;const s=Ae.readMPI(t.subarray(r));r+=s.length+2;const l=Ae.readMPI(t.subarray(r));r+=l.length+2;const c=Ae.readMPI(t.subarray(r));return r+=c.length+2,{read:r,privateParams:{d:a,p:s,q:l,u:c}}}case ve.publicKey.dsa:case ve.publicKey.elgamal:{const a=Ae.readMPI(t.subarray(r));return r+=a.length+2,{read:r,privateParams:{x:a}}}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const a=new fo(n.oid);let s=Ae.readMPI(t.subarray(r));return r+=s.length+2,s=Ae.leftPad(s,a.payloadSize),{read:r,privateParams:{d:s}}}case ve.publicKey.eddsa:{const a=new fo(n.oid);let s=Ae.readMPI(t.subarray(r));return r+=s.length+2,s=Ae.leftPad(s,a.payloadSize),{read:r,privateParams:{seed:s}}}default:throw new jr("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:return{c:Ae.readMPI(t.subarray(n))};case ve.publicKey.elgamal:{const r=Ae.readMPI(t.subarray(n));return n+=r.length+2,{c1:r,c2:Ae.readMPI(t.subarray(n))}}case ve.publicKey.ecdh:{const r=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=new a4;return a.read(t.subarray(n)),{V:r,C:a}}default:throw new jr("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const n=Object.keys(t).map(r=>{const a=t[r];return Ae.isUint8Array(a)?Ae.uint8ArrayToMPI(a):a.write()});return Ae.concatUint8Array(n)},generateParams:function(e,t,n){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:return cr.rsa.generate(t,65537).then(({n:r,e:a,d:s,p:l,q:c,u:h})=>({privateParams:{d:s,p:l,q:c,u:h},publicParams:{n:r,e:a}}));case ve.publicKey.ecdsa:return cr.elliptic.generate(n).then(({oid:r,Q:a,secret:s})=>({privateParams:{d:s},publicParams:{oid:new ys(r),Q:a}}));case ve.publicKey.eddsa:return cr.elliptic.generate(n).then(({oid:r,Q:a,secret:s})=>({privateParams:{seed:s},publicParams:{oid:new ys(r),Q:a}}));case ve.publicKey.ecdh:return cr.elliptic.generate(n).then(({oid:r,Q:a,secret:s,hash:l,cipher:c})=>({privateParams:{d:s},publicParams:{oid:new ys(r),Q:a,kdfParams:new s4({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:a}=t,{d:s,p:l,q:c,u:h}=n;return cr.rsa.validateParams(r,a,s,l,c,h)}case ve.publicKey.dsa:{const{p:r,q:a,g:s,y:l}=t,{x:c}=n;return cr.dsa.validateParams(r,a,s,l,c)}case ve.publicKey.elgamal:{const{p:r,g:a,y:s}=t,{x:l}=n;return cr.elgamal.validateParams(r,a,s,l)}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const r=cr.elliptic[ve.read(ve.publicKey,e)],{oid:a,Q:s}=t,{d:l}=n;return r.validateParams(a,s,l)}case ve.publicKey.eddsa:{const{oid:r,Q:a}=t,{seed:s}=n;return cr.elliptic.eddsa.validateParams(r,a,s)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=Ho(e),n=await Ms(t),r=new Uint8Array([n[n.length-2],n[n.length-1]]);return Ae.concat([n,r])},generateSessionKey:function(e){const{keySize:t}=Ho(e);return Ms(t)},getAEADMode:function(e){const t=ve.read(ve.aead,e);return nO[t]},getCipher:Ho});const Kt={cipher:If,hash:cc,mode:nO,publicKey:cr,signature:kH,random:lH,pkcs1:cH,pkcs5:wH,aesKW:bH};Object.assign(Kt,DH);var Rf=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function gO(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const _O={arraySet:function(e,t,n,r,a){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),a);else for(let s=0;s=0;)e[t]=0}const MH=0,SO=1,IH=2,I1=29,Lf=256,hf=Lf+1+I1,nc=30,$1=19,c4=2*hf+1,Ll=15,fy=16,$H=7,R1=256,EO=16,kO=17,DO=18,H0=[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],Lv=[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],RH=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d4=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Js=Array(2*(hf+2));kc(Js);const Jd=Array(2*nc);kc(Jd);const pf=Array(512);kc(pf);const vf=Array(256);kc(vf);const L1=Array(I1);kc(L1);const Tm=Array(nc);function hy(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let f4,h4,p4;function py(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function OO(e){return e<256?pf[e]:pf[256+(e>>>7)]}function mf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Gi(e,t,n){e.bi_valid>fy-n?(e.bi_buf|=t<>fy-e.bi_valid,e.bi_valid+=n-fy):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function PO(e,t,n){const r=Array(Ll+1);let a,s,l=0;for(a=1;a<=Ll;a++)r[a]=l=l+n[a-1]<<1;for(s=0;s<=t;s++){const c=e[2*s+1];c!==0&&(e[2*s]=TO(r[c]++,c))}}function AO(e){let t;for(t=0;t8?mf(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 v4(e,t,n,r){const a=2*t,s=2*n;return e[a]>1;l>=1;l--)vy(e,n,l);h=s;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vy(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++,vy(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,D=d.stat_desc.max_length;let x,C,k,w,T,M,A=0;for(w=0;w<=Ll;w++)p.bl_count[w]=0;for(v[2*p.heap[p.heap_max]+1]=0,x=p.heap_max+1;xD&&(w=D,A++),v[2*C+1]=w,C>m||(p.bl_count[w]++,T=0,C>=E&&(T=b[C-E]),M=v[2*C],p.opt_len+=M*(w+T),y&&(p.static_len+=M*(_[2*C+1]+T)));if(A!==0){do{for(w=D-1;p.bl_count[w]===0;)w--;p.bl_count[w]--,p.bl_count[w+1]+=2,p.bl_count[D]--,A-=2}while(A>0);for(w=D;w!==0;w--)for(C=p.bl_count[w];C!==0;)k=p.heap[--x],k>m||(v[2*k+1]!==w&&(p.opt_len+=(w-v[2*k+1])*v[2*k],v[2*k+1]=w),C--)}}(e,t),PO(n,i,e.bl_count)}function g4(e,t,n){let r,a,s=-1,l=t[1],c=0,h=7,i=4;for(l===0&&(h=138,i=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=l,l=t[2*(r+1)+1],++c>=7;a=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function BH(e,t,n,r){let a,s,l=0;e.level>0?(e.strm.data_type===xO&&(e.strm.data_type=function(c){let h,i=4093624447;for(h=0;h<=31;h++,i>>>=1)if(1&i&&c.dyn_ltree[2*h]!==0)return l4;if(c.dyn_ltree[18]!==0||c.dyn_ltree[20]!==0||c.dyn_ltree[26]!==0)return u4;for(h=32;h=3&&c.bl_tree[2*d4[h]+1]===0;h--);return c.opt_len+=3*(h+1)+5+5+4,h}(e),a=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=a&&(a=s)):a=s=n+5,n+4<=a&&t!==-1?IO(e,t,n,r):e.strategy===CO||s===a?(Gi(e,(SO<<1)+(r?1:0),3),m4(e,Js,Jd)):(Gi(e,(IH<<1)+(r?1:0),3),function(c,h,i,p){let d;for(Gi(c,h-257,5),Gi(c,i-1,5),Gi(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*(vf[n]+Lf+1)]++,e.dyn_dtree[2*OO(t)]++),e.last_lit===e.lit_bufsize-1}function gf(e,t,n,r){let a=65535&e|0,s=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do a=a+t[r++]|0,s=s+a|0;while(--l);a%=65521,s%=65521}return a|s<<16|0}const FH=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 Hr(e,t,n,r){const a=FH,s=r+n;e^=-1;for(let l=r;l>>8^a[255&(e^t[l])];return-1^e}var _f={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 jH=9,Fn=3,Bo=258,Ka=Bo+Fn+1,zH=32,Pm=42,K0=69,Nv=73,Bv=91,Fv=103,Nl=113,Rd=666,Kr=1,Zd=2,Bl=3,rc=4,UH=3;function Fo(e,t){return e.msg=_f[t],t}function b4(e){return(e<<1)-(e>4?9:0)}function Io(e){let t=e.length;for(;--t>=0;)e[t]=0}function To(e){const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&($s(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 ai(e,t){BH(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,To(e.strm)}function Vn(e,t){e.pending_buf[e.pending++]=t}function md(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function VH(e,t,n,r){let a=e.avail_in;return a>r&&(a=r),a===0?0:(e.avail_in-=a,$s(t,e.input,e.next_in,a,n),e.state.wrap===1?e.adler=gf(e.adler,t,a,n):e.state.wrap===2&&(e.adler=Hr(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)}function $O(e,t){let n,r,a=e.max_chain_length,s=e.strstart,l=e.prev_length,c=e.nice_match;const h=e.strstart>e.w_size-Ka?e.strstart-(e.w_size-Ka):0,i=e.window,p=e.w_mask,d=e.prev,v=e.strstart+Bo;let m=i[s+l-1],_=i[s+l];e.prev_length>=e.good_match&&(a>>=2),c>e.lookahead&&(c=e.lookahead);do if(n=t,i[n+l]===_&&i[n+l-1]===m&&i[n]===i[s]&&i[++n]===i[s+1]){s+=2,n++;do;while(i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&sl){if(e.match_start=t,l=r,r>=c)break;m=i[s+l-1],_=i[s+l]}}while((t=d[t&p])>h&&--a!=0);return l<=e.lookahead?l:e.lookahead}function ql(e){const t=e.w_size;let n,r,a,s,l;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ka)){$s(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 a=e.head[--n],e.head[n]=a>=t?a-t:0;while(--r);r=t,n=r;do a=e.prev[--n],e.prev[n]=a>=t?a-t:0;while(--r);s+=t}if(e.strm.avail_in===0)break;if(r=VH(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=r,e.lookahead+e.insert>=Fn)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=Fn&&(e.ins_h=(e.ins_h<=Fn)if(r=Ko(e,e.strstart-e.match_start,e.match_length-Fn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Fn){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=Fn&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=Fn-1)),e.prev_length>=Fn&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-Fn,r=Ko(e,e.strstart-1-e.prev_match,e.prev_length-Fn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ql(e),e.lookahead===0&&t===Rs)return Kr;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,ai(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ka&&(ai(e,!1),e.strm.avail_out===0))return Kr}return e.insert=0,t===Yr?(ai(e,!0),e.strm.avail_out===0?Bl:rc):(e.strstart>e.block_start&&(ai(e,!1),e.strm.avail_out),Kr)}),new fs(4,4,8,4,gy),new fs(4,5,16,8,gy),new fs(4,6,32,32,gy),new fs(4,4,16,16,Ru),new fs(8,16,32,32,Ru),new fs(8,16,128,128,Ru),new fs(8,32,128,256,Ru),new fs(32,128,258,1024,Ru),new fs(32,258,258,4096,Ru)];class WH{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=dc,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 Oa(1146),this.dyn_dtree=new Oa(122),this.bl_tree=new Oa(78),Io(this.dyn_ltree),Io(this.dyn_dtree),Io(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Oa(16),this.heap=new Oa(573),Io(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Oa(573),Io(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 HH(e){const t=function(n){let r;return n&&n.state?(n.total_in=n.total_out=0,n.data_type=xO,r=n.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Pm:Nl,n.adler=r.wrap===2?0:1,r.last_flush=Rs,LH(r),Jn):Fo(n,Rr)}(e);return t===Jn&&function(n){n.window_size=2*n.w_size,Io(n.head),n.max_lazy_match=Ld[n.level].max_lazy,n.good_match=Ld[n.level].good_length,n.nice_match=Ld[n.level].nice_length,n.max_chain_length=Ld[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=Fn-1,n.match_available=0,n.ins_h=0}(e.state),t}function KH(e,t){let n,r,a,s;if(!e||!e.state||t>W0||t<0)return e?Fo(e,Rr):Rr;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Rd&&t!==Yr)return Fo(e,e.avail_out===0?Xd:Rr);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Pm)if(r.wrap===2)e.adler=0,Vn(r,31),Vn(r,139),Vn(r,8),r.gzhead?(Vn(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)),Vn(r,255&r.gzhead.time),Vn(r,r.gzhead.time>>8&255),Vn(r,r.gzhead.time>>16&255),Vn(r,r.gzhead.time>>24&255),Vn(r,r.level===9?2:r.strategy>=qp||r.level<2?4:0),Vn(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Vn(r,255&r.gzhead.extra.length),Vn(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Hr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=K0):(Vn(r,0),Vn(r,0),Vn(r,0),Vn(r,0),Vn(r,0),Vn(r,r.level===9?2:r.strategy>=qp||r.level<2?4:0),Vn(r,UH),r.status=Nl);else{let c=dc+(r.w_bits-8<<4)<<8,h=-1;h=r.strategy>=qp||r.level<2?0:r.level<6?1:r.level===6?2:3,c|=h<<6,r.strstart!==0&&(c|=zH),c+=31-c%31,r.status=Nl,md(r,c),r.strstart!==0&&(md(r,e.adler>>>16),md(r,65535&e.adler)),e.adler=1}if(r.status===K0)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),To(e),a=r.pending,r.pending!==r.pending_buf_size));)Vn(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Nv)}else r.status=Nv;if(r.status===Nv)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),To(e),a=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindexa&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),s===0&&(r.gzindex=0,r.status=Bv)}else r.status=Bv;if(r.status===Bv)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),To(e),a=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindexa&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),s===0&&(r.status=Fv)}else r.status=Fv;if(r.status===Fv&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&To(e),r.pending+2<=r.pending_buf_size&&(Vn(r,255&e.adler),Vn(r,e.adler>>8&255),e.adler=0,r.status=Nl)):r.status=Nl),r.pending!==0){if(To(e),e.avail_out===0)return r.last_flush=-1,Jn}else if(e.avail_in===0&&b4(t)<=b4(n)&&t!==Yr)return Fo(e,Xd);if(r.status===Rd&&e.avail_in!==0)return Fo(e,Xd);if(e.avail_in!==0||r.lookahead!==0||t!==Rs&&r.status!==Rd){var l=r.strategy===qp?function(c,h){let i;for(;;){if(c.lookahead===0&&(ql(c),c.lookahead===0)){if(h===Rs)return Kr;break}if(c.match_length=0,i=Ko(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++,i&&(ai(c,!1),c.strm.avail_out===0))return Kr}return c.insert=0,h===Yr?(ai(c,!0),c.strm.avail_out===0?Bl:rc):c.last_lit&&(ai(c,!1),c.strm.avail_out===0)?Kr:Zd}(r,t):r.strategy===AH?function(c,h){let i,p,d,v;const m=c.window;for(;;){if(c.lookahead<=Bo){if(ql(c),c.lookahead<=Bo&&h===Rs)return Kr;if(c.lookahead===0)break}if(c.match_length=0,c.lookahead>=Fn&&c.strstart>0&&(d=c.strstart-1,p=m[d],p===m[++d]&&p===m[++d]&&p===m[++d])){v=c.strstart+Bo;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>=Fn?(i=Ko(c,1,c.match_length-Fn),c.lookahead-=c.match_length,c.strstart+=c.match_length,c.match_length=0):(i=Ko(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++),i&&(ai(c,!1),c.strm.avail_out===0))return Kr}return c.insert=0,h===Yr?(ai(c,!0),c.strm.avail_out===0?Bl:rc):c.last_lit&&(ai(c,!1),c.strm.avail_out===0)?Kr:Zd}(r,t):Ld[r.level].func(r,t);if(l!==Bl&&l!==rc||(r.status=Rd),l===Kr||l===Bl)return e.avail_out===0&&(r.last_flush=-1),Jn;if(l===Zd&&(t===OH?NH(r):t!==W0&&(IO(r,0,0,!1),t===TH&&(Io(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),To(e),e.avail_out===0))return r.last_flush=-1,Jn}return t!==Yr?Jn:r.wrap<=0?io:(r.wrap===2?(Vn(r,255&e.adler),Vn(r,e.adler>>8&255),Vn(r,e.adler>>16&255),Vn(r,e.adler>>24&255),Vn(r,255&e.total_in),Vn(r,e.total_in>>8&255),Vn(r,e.total_in>>16&255),Vn(r,e.total_in>>24&255)):(md(r,e.adler>>>16),md(r,65535&e.adler)),To(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Jn:io)}try{String.fromCharCode.call(null,0)}catch{}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const G0=new Os(256);for(let e=0;e<256;e++)G0[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;function Y0(e){let t,n,r,a,s=0;const l=e.length;for(r=0;r>>6,c[a++]=128|63&t):t<65536?(c[a++]=224|t>>>12,c[a++]=128|t>>>6&63,c[a++]=128|63&t):(c[a++]=240|t>>>18,c[a++]=128|t>>>12&63,c[a++]=128|t>>>6&63,c[a++]=128|63&t);return c}G0[254]=G0[254]=1;class RO{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 X0{constructor(t){this.options={level:o4,method:dc,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 RO,this.strm.avail_out=0;var r,a,s=function(l,c,h,i,p,d){if(!l)return Rr;let v=1;if(c===o4&&(c=6),i<0?(v=0,i=-i):i>15&&(v=2,i-=16),p<1||p>jH||h!==dc||i<8||i>15||c<0||c>9||d<0||d>CO)return Fo(l,Rr);i===8&&(i=9);const m=new WH;return l.state=m,m.strm=l,m.wrap=v,m.gzhead=null,m.w_bits=i,m.w_size=1<=i.w_size&&(v===0&&(Io(i.head),i.strstart=0,i.block_start=0,i.insert=0),b=new Os(i.w_size),$s(b,h,E-i.w_size,i.w_size,0),h=b,E=i.w_size),m=c.avail_in,_=c.next_in,y=c.input,c.avail_in=E,c.next_in=0,c.input=h,ql(i);i.lookahead>=Fn;){p=i.strstart,d=i.lookahead-(Fn-1);do i.ins_h=(i.ins_h<0||r.avail_out===0)&&s!==io);return l===Yr?(s=function(c){let h;return c&&c.state?(h=c.state.status,h!==Pm&&h!==K0&&h!==Nv&&h!==Bv&&h!==Fv&&h!==Nl&&h!==Rd?Fo(c,Rr):(c.state=null,h===Nl?Fo(c,M1):Jn)):Rr}(this.strm),this.onEnd(s),this.ended=!0,s===Jn):l!==ff||(this.onEnd(Jn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Jn&&(this.result=bO(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}const ev=30,GH=12;function YH(e,t){let n,r,a,s,l,c,h,i,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),D=v.dmax,x=v.wsize,C=v.whave,k=v.wnext,w=v.window;a=v.hold,s=v.bits;const T=v.lencode,M=v.distcode,A=(1<>>24,a>>>=c,s-=c,c=l>>>16&255,c===0)y[r++]=65535&l;else{if(!(16&c)){if((64&c)==0){l=T[(65535&l)+(a&(1<>>=c,s-=c),s<15&&(a+=m[n++]<>>24,a>>>=c,s-=c,c=l>>>16&255,!(16&c)){if((64&c)==0){l=M[(65535&l)+(a&(1<D){e.msg="invalid distance too far back",v.mode=ev;break e}if(a>>>=c,s-=c,c=r-b,i>c){if(c=i-c,c>C&&v.sane){e.msg="invalid distance too far back",v.mode=ev;break e}if(p=0,d=w,k===0){if(p+=x-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-i;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,s-=h<<3,a&=(1<=1&&R[E]===0;E--);if(D>E&&(D=E),E===0)return a[s++]=20971520,a[s++]=20971520,c.bits=1,0;for(b=1;b0&&(e===x4||E!==1))return-1;for(H[1]=0,_=1;_w4||e===S4&&w>C4)return 1;for(;;){L=_-C,l[y]m?(V=oe[Te+l[y]],j=M[A+l[y]]):(V=96,j=0),i=1<<_-C,p=1<>C)+p]=L<<24|V<<16|j|0;while(p!==0);for(i=1<<_-1;T&i;)i>>=1;if(i!==0?(T&=i-1,T+=i):T=0,y++,--R[_]==0){if(_===E)break;_=t[n+l[y]]}if(_>D&&(T&pe)!==d){for(C===0&&(C=D),v+=b,x=_-C,k=1<w4||e===S4&&w>C4)return 1;d=T&pe,a[d]=D<<24|x<<16|v-s|0}}return T!==0&&(a[v+T]=_-C<<24|64<<16|0),c.bits=D,0}const qH=0,LO=1,NO=2,BO=1,E4=2,k4=3,D4=4,O4=5,T4=6,P4=7,A4=8,M4=9,I4=10,Am=11,Gs=12,yy=13,$4=14,by=15,R4=16,L4=17,N4=18,B4=19,tv=20,nv=21,F4=22,j4=23,z4=24,U4=25,V4=26,wy=27,W4=28,H4=29,mr=30,eK=852,tK=592;function K4(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}class nK{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 Oa(320),this.work=new Oa(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function rK(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=BO,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Om(eK),r.distcode=r.distdyn=new Om(tK),r.sane=1,r.back=-1,Jn):Rr}(e)):Rr}function iK(e,t){let n,r;return e?(r=new nK,e.state=r,r.window=null,n=function(a,s){let l,c;return a&&a.state?(c=a.state,s<0?(l=0,s=-s):(l=1+(s>>4),s<48&&(s&=15)),s&&(s<8||s>15)?Rr:(c.window!==null&&c.wbits!==s&&(c.window=null),c.wrap=l,c.wbits=s,rK(a))):Rr}(e,t),n!==Jn&&(e.state=null),n):Rr}let Cy,xy,G4=!0;function aK(e){if(G4){let t;for(Cy=new Om(512),xy=new Om(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(Qd(LO,e.lens,0,288,Cy,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Qd(NO,e.lens,0,32,xy,0,e.work,{bits:5}),G4=!1}e.lencode=Cy,e.lenbits=9,e.distcode=xy,e.distbits=5}function FO(e,t,n,r){let a;const s=e.state;return s.window===null&&(s.wsize=1<=s.wsize?($s(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(a=s.wsize-s.wnext,a>r&&(a=r),$s(s.window,t,n-r,a,s.wnext),(r-=a)?($s(s.window,t,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=a,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,n.check=Hr(n.check,H,2,0),i=0,p=0,n.mode=E4;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&i)<<8)+(i>>8))%31){e.msg="incorrect header check",n.mode=mr;break}if((15&i)!==dc){e.msg="unknown compression method",n.mode=mr;break}if(i>>>=4,p-=4,w=8+(15&i),n.wbits===0)n.wbits=w;else if(w>n.wbits){e.msg="invalid window size",n.mode=mr;break}n.dmax=1<>8&1),512&n.flags&&(H[0]=255&i,H[1]=i>>>8&255,n.check=Hr(n.check,H,2,0)),i=0,p=0,n.mode=k4;case k4:for(;p<32;){if(c===0)break e;c--,i+=r[s++]<>>8&255,H[2]=i>>>16&255,H[3]=i>>>24&255,n.check=Hr(n.check,H,4,0)),i=0,p=0,n.mode=D4;case D4:for(;p<16;){if(c===0)break e;c--,i+=r[s++]<>8),512&n.flags&&(H[0]=255&i,H[1]=i>>>8&255,n.check=Hr(n.check,H,2,0)),i=0,p=0,n.mode=O4;case O4:if(1024&n.flags){for(;p<16;){if(c===0)break e;c--,i+=r[s++]<>>8&255,n.check=Hr(n.check,H,2,0)),i=0,p=0}else n.head&&(n.head.extra=null);n.mode=T4;case T4:if(1024&n.flags&&(m=n.length,m>c&&(m=c),m&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),$s(n.head.extra,r,s,m,w)),512&n.flags&&(n.check=Hr(n.check,r,m,s)),c-=m,s+=m,n.length-=m),n.length))break e;n.length=0,n.mode=P4;case P4:if(2048&n.flags){if(c===0)break e;m=0;do w=r[s+m++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w));while(w&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Gs;break;case I4:for(;p<32;){if(c===0)break e;c--,i+=r[s++]<>>=7&p,p-=7&p,n.mode=wy;break}for(;p<3;){if(c===0)break e;c--,i+=r[s++]<>>=1,p-=1,3&i){case 0:n.mode=$4;break;case 1:if(aK(n),n.mode=tv,t===Qp){i>>>=2,p-=2;break e}break;case 2:n.mode=L4;break;case 3:e.msg="invalid block type",n.mode=mr}i>>>=2,p-=2;break;case $4:for(i>>>=7&p,p-=7&p;p<32;){if(c===0)break e;c--,i+=r[s++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=mr;break}if(n.length=65535&i,i=0,p=0,n.mode=by,t===Qp)break e;case by:n.mode=R4;case R4:if(m=n.length,m){if(m>c&&(m=c),m>h&&(m=h),m===0)break e;$s(a,r,s,m,l),c-=m,s+=m,h-=m,l+=m,n.length-=m;break}n.mode=Gs;break;case L4:for(;p<14;){if(c===0)break e;c--,i+=r[s++]<>>=5,p-=5,n.ndist=1+(31&i),i>>>=5,p-=5,n.ncode=4+(15&i),i>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=mr;break}n.have=0,n.mode=N4;case N4:for(;n.have>>=3,p-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},T=Qd(qH,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,T){e.msg="invalid code lengths set",n.mode=mr;break}n.have=0,n.mode=B4;case B4:for(;n.have>>24,E=R>>>16&255,D=65535&R,!(b<=p);){if(c===0)break e;c--,i+=r[s++]<>>=b,p-=b,n.lens[n.have++]=D;else{if(D===16){for(A=b+2;p>>=b,p-=b,n.have===0){e.msg="invalid bit length repeat",n.mode=mr;break}w=n.lens[n.have-1],m=3+(3&i),i>>>=2,p-=2}else if(D===17){for(A=b+3;p>>=b,p-=b,w=0,m=3+(7&i),i>>>=3,p-=3}else{for(A=b+7;p>>=b,p-=b,w=0,m=11+(127&i),i>>>=7,p-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=mr;break}for(;m--;)n.lens[n.have++]=w}}if(n.mode===mr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=mr;break}if(n.lenbits=9,M={bits:n.lenbits},T=Qd(LO,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,T){e.msg="invalid literal/lengths set",n.mode=mr;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},T=Qd(NO,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,T){e.msg="invalid distances set",n.mode=mr;break}if(n.mode=tv,t===Qp)break e;case tv:n.mode=nv;case nv:if(c>=6&&h>=258){e.next_out=l,e.avail_out=h,e.next_in=s,e.avail_in=c,n.hold=i,n.bits=p,YH(e,v),l=e.next_out,a=e.output,h=e.avail_out,s=e.next_in,r=e.input,c=e.avail_in,i=n.hold,p=n.bits,n.mode===Gs&&(n.back=-1);break}for(n.back=0;R=n.lencode[i&(1<>>24,E=R>>>16&255,D=65535&R,!(b<=p);){if(c===0)break e;c--,i+=r[s++]<>x)],b=R>>>24,E=R>>>16&255,D=65535&R,!(x+b<=p);){if(c===0)break e;c--,i+=r[s++]<>>=x,p-=x,n.back+=x}if(i>>>=b,p-=b,n.back+=b,n.length=D,E===0){n.mode=V4;break}if(32&E){n.back=-1,n.mode=Gs;break}if(64&E){e.msg="invalid literal/length code",n.mode=mr;break}n.extra=15&E,n.mode=F4;case F4:if(n.extra){for(A=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=j4;case j4:for(;R=n.distcode[i&(1<>>24,E=R>>>16&255,D=65535&R,!(b<=p);){if(c===0)break e;c--,i+=r[s++]<>x)],b=R>>>24,E=R>>>16&255,D=65535&R,!(x+b<=p);){if(c===0)break e;c--,i+=r[s++]<>>=x,p-=x,n.back+=x}if(i>>>=b,p-=b,n.back+=b,64&E){e.msg="invalid distance code",n.mode=mr;break}n.offset=D,n.extra=15&E,n.mode=z4;case z4:if(n.extra){for(A=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=mr;break}n.mode=U4;case U4: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=mr;break}m>n.wnext?(m-=n.wnext,_=n.wsize-m):_=n.wnext-m,m>n.length&&(m=n.length),y=n.window}else y=a,_=l-n.offset,m=n.length;m>h&&(m=h),h-=m,n.length-=m;do a[l++]=y[_++];while(--m);n.length===0&&(n.mode=nv);break;case V4:if(h===0)break e;a[l++]=n.length,h--,n.mode=nv;break;case wy:if(n.wrap){for(;p<32;){if(c===0)break e;c--,i|=r[s++]<=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 RO,this.strm.avail_out=0;let r=iK(this.strm,n.windowBits);if(r!==Jn||(this.header=new oK,function(a,s){let l;a&&a.state&&(l=a.state,(2&l.wrap)==0||(l.head=s,s.done=!1))}(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=Y0(n.dictionary):n.dictionary instanceof ArrayBuffer&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(r=Y4(this.strm,n.dictionary),r!==Jn))))throw Error(_f[r])}push(t,n){const{strm:r,options:{chunkSize:a,dictionary:s}}=this;let l,c,h=!1;if(this.ended)return!1;c=n===~~n?n:n===!0?Yr:Rs,typeof t=="string"?r.input=function(i){const p=new Os(i.length);for(let d=0,v=p.length;d0||r.avail_out===0)&&l!==io);return l===io&&(c=Yr),c===Yr?(l=function(i){if(!i||!i.state)return Rr;const p=i.state;return p.window&&(p.window=null),i.state=null,Jn}(this.strm),this.onEnd(l),this.ended=!0,l===Jn):c!==ff||(this.onEnd(Jn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Jn&&(this.result=bO(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}var J4=[0,1,3,7,15,31,63,127,255],Nd=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Nd.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Nd.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var n=8-this.bitOffset;if(e>=n)t<<=n,t|=J4[n]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=n;else{t<<=e;var r=n-e;t|=(this.curByte&J4[e]<>r,this.bitOffset+=e,e=0}}return t},Nd.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},Nd.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+r.toString(16)).slice(-2)).join("")}(t)};var lK=Nd,Dl=function(){};Dl.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Dl.prototype.read=function(e,t,n){for(var r=0;r>>0},this.updateCRC=function(t){e=e<<8^Sy[255&(e>>>24^t)]},this.updateCRCRun=function(t,n){for(;n-- >0;)e=e<<8^Sy[255&(e>>>24^t)]}}),Z4=function(e,t){var n,r=e[t];for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},gr={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},Po={};Po[gr.LAST_BLOCK]="Bad file checksum",Po[gr.NOT_BZIP_DATA]="Not bzip data",Po[gr.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Po[gr.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Po[gr.DATA_ERROR]="Data error",Po[gr.OUT_OF_MEMORY]="Out of memory",Po[gr.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var ti=function(e,t){var n=Po[e]||"unknown error";t&&(n+=": "+t);var r=new TypeError(n);throw r.errorCode=e,r},Bd=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Bd.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new uK,!0):(this.writeCount=-1,!1)},Bd.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"||ti(gr.NOT_BZIP_DATA,"bad magic");var r=n[3]-48;(r<1||r>9)&&ti(gr.NOT_BZIP_DATA,"level out of range"),this.reader=new lK(e),this.dbufSize=1e5*r,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Bd.prototype._get_next_block=function(){var e,t,n,r=this.reader,a=r.pi();if(a==="177245385090")return!1;a!=="314159265359"&&ti(gr.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&ti(gr.OBSOLETE_INPUT);var s=r.read(24);s>this.dbufSize&&ti(gr.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 i=16*e;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(c[h++]=i+t)}var p=r.read(3);(p<2||p>6)&&ti(gr.DATA_ERROR);var d=r.read(15);d===0&&ti(gr.DATA_ERROR);var v=new Uint8Array(256);for(e=0;e=p&&ti(gr.DATA_ERROR);m[e]=Z4(v,t)}var _,y=h+2,b=[];for(t=0;t20)&&ti(gr.DATA_ERROR),r.read(1);)r.read(1)?l--:l++;x[e]=l}for(E=D=x[0],e=1;eD?D=x[e]:x[e]=d&&ti(gr.DATA_ERROR),_=b[m[R++]]),e=_.minLen,t=r.read(e);e>_.maxLen&&ti(gr.DATA_ERROR),!(t<=_.limit[e]);e++)t=t<<1|r.read(1);((t-=_.base[e])<0||t>=258)&&ti(gr.DATA_ERROR);var L=_.permute[t];if(L!==0&&L!==1){if(M)for(M=0,A+l>this.dbufSize&&ti(gr.DATA_ERROR),w[T=c[v[0]]]+=l;l--;)H[A++]=T;if(L>h)break;A>=this.dbufSize&&ti(gr.DATA_ERROR),w[T=c[T=Z4(v,e=L-1)]]++,H[A++]=T}else M||(M=1,l=0),l+=L===0?M:2*M,M<<=1}for((s<0||s>=A)&&ti(gr.DATA_ERROR),t=0,e=0;e<256;e++)n=t+w[e],w[e]=t,t=n;for(e=0;e>=8,oe=-1),this.writePos=V,this.writeCurrent=j,this.writeCount=A,this.writeRun=oe,!0},Bd.prototype._read_bunzip=function(e,t){var n,r,a;if(this.writeCount<0)return 0;var s=this.dbuf,l=this.writePos,c=this.writeCurrent,h=this.writeCount;this.outputsize;for(var i=this.writeRun;h;){for(h--,r=c,c=255&(l=s[l]),l>>=8,i++==3?(n=c,a=r,c=-1):(n=1,a=c),this.blockCRC.updateCRCRun(a,n);n--;)this.outputStream.writeByte(a),this.nextoutput++;c!=r&&(i=0)}return this.writeCount=h,this.blockCRC.getCRC()!==this.targetBlockCRC&&ti(gr.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var cK=function(e){if("readByte"in e)return e;var t=new jO;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},dK=function(e){var t=new jO,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 a=new Uint8Array(2*this.buffer.length);a.set(this.buffer),this.buffer=a}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},Q4=function(e,t,n){for(var r=cK(e),a=dK(t),s=new Bd(r,a);!("eof"in r)||!r.eof();)if(s._init_block())s._read_bunzip();else{var l=s.reader.read(32)>>>0;if(l!==s.streamCRC&&ti(gr.DATA_ERROR,"Bad stream CRC (got "+s.streamCRC.toString(16)+" expected "+l.toString(16)+")"),!n||!("eof"in r)||r.eof())break;s._start_bunzip(r,a)}if("getBuffer"in a)return a.getBuffer()};class Dc{static get tag(){return ve.packet.literalData}constructor(t=new Date){this.format=ve.literal.utf8,this.date=Ae.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||Ae.isStream(this.text))&&(this.text=Ae.decodeUTF8(Ae.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=Ae.canonicalizeEOL(Ae.encodeUTF8(this.text))),t?qu(this.data):this.data}setFilename(t){this.filename=t}getFilename(){return this.filename}async read(t){await mg(t,async n=>{const r=await n.readByte(),a=await n.readByte();this.filename=Ae.decodeUTF8(await n.readBytes(a)),this.date=Ae.readDate(await n.readBytes(4));let s=n.remainder();Tr(s)&&(s=await Ar(s)),this.setBytes(s,r)})}writeHeader(){const t=Ae.encodeUTF8(this.filename),n=new Uint8Array([t.length]),r=new Uint8Array([this.format]),a=Ae.writeDate(this.date);return Ae.concatUint8Array([r,n,t,a])}write(){const t=this.writeHeader(),n=this.getBytes();return Ae.concat([t,n])}}const gd=Symbol("verified"),fK=new Set([ve.signatureSubpacket.issuer,ve.signatureSubpacket.issuerFingerprint,ve.signatureSubpacket.embeddedSignature]);class li{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 Zo,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[gd]=null}read(t){let n=0;if(this.version=t[n++],this.version!==4&&this.version!==5)throw new jr(`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?rl(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()),Ae.concat(t)}async sign(t,n,r=new Date,a=!1){t.version===5?this.version=5:this.version=4;const s=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Ae.normalizeDate(r),this.issuerKeyVersion=t.version,this.issuerFingerprint=t.getFingerprintBytes(),this.issuerKeyID=t.getKeyID(),s.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Ae.concat(s);const l=this.toHash(this.signatureType,n,a),c=await this.hash(this.signatureType,n,l,a);this.signedHashValue=si(Ql(c),0,2);const h=async()=>Kt.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,t.publicParams,t.privateParams,l,await Ar(c));Ae.isStream(c)?this.params=h():(this.params=await h(),this[gd]=!0)}writeHashedSubPackets(){const t=ve.signatureSubpacket,n=[];let r;if(this.created===null)throw Error("Missing signature creation time");n.push(ur(t.signatureCreationTime,!0,Ae.writeDate(this.created))),this.signatureExpirationTime!==null&&n.push(ur(t.signatureExpirationTime,!0,Ae.writeNumber(this.signatureExpirationTime,4))),this.exportable!==null&&n.push(ur(t.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),this.trustLevel!==null&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),n.push(ur(t.trustSignature,!0,r))),this.regularExpression!==null&&n.push(ur(t.regularExpression,!0,this.regularExpression)),this.revocable!==null&&n.push(ur(t.revocable,!0,new Uint8Array([this.revocable?1:0]))),this.keyExpirationTime!==null&&n.push(ur(t.keyExpirationTime,!0,Ae.writeNumber(this.keyExpirationTime,4))),this.preferredSymmetricAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredSymmetricAlgorithms)),n.push(ur(t.preferredSymmetricAlgorithms,!1,r))),this.revocationKeyClass!==null&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Ae.concat([r,this.revocationKeyFingerprint]),n.push(ur(t.revocationKey,!1,r))),this.issuerKeyID.isNull()||this.issuerKeyVersion===5||n.push(ur(t.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach(({name:l,value:c,humanReadable:h,critical:i})=>{r=[new Uint8Array([h?128:0,0,0,0])];const p=Ae.encodeUTF8(l);r.push(Ae.writeNumber(p.length,2)),r.push(Ae.writeNumber(c.length,2)),r.push(p),r.push(c),r=Ae.concat(r),n.push(ur(t.notationData,i,r))}),this.preferredHashAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredHashAlgorithms)),n.push(ur(t.preferredHashAlgorithms,!1,r))),this.preferredCompressionAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredCompressionAlgorithms)),n.push(ur(t.preferredCompressionAlgorithms,!1,r))),this.keyServerPreferences!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.keyServerPreferences)),n.push(ur(t.keyServerPreferences,!1,r))),this.preferredKeyServer!==null&&n.push(ur(t.preferredKeyServer,!1,Ae.encodeUTF8(this.preferredKeyServer))),this.isPrimaryUserID!==null&&n.push(ur(t.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),this.policyURI!==null&&n.push(ur(t.policyURI,!1,Ae.encodeUTF8(this.policyURI))),this.keyFlags!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.keyFlags)),n.push(ur(t.keyFlags,!0,r))),this.signersUserID!==null&&n.push(ur(t.signersUserID,!1,Ae.encodeUTF8(this.signersUserID))),this.reasonForRevocationFlag!==null&&(r=Ae.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),n.push(ur(t.reasonForRevocation,!0,r))),this.features!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.features)),n.push(ur(t.features,!1,r))),this.signatureTargetPublicKeyAlgorithm!==null&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Ae.stringToUint8Array(this.signatureTargetHash)),r=Ae.concat(r),n.push(ur(t.signatureTarget,!0,r))),this.embeddedSignature!==null&&n.push(ur(t.embeddedSignature,!0,this.embeddedSignature.write())),this.issuerFingerprint!==null&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Ae.concat(r),n.push(ur(t.issuerFingerprint,this.version===5,r))),this.preferredAEADAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredAEADAlgorithms)),n.push(ur(t.preferredAEADAlgorithms,!1,r)));const a=Ae.concat(n),s=Ae.writeNumber(a.length,2);return Ae.concat([s,a])}writeUnhashedSubPackets(){const t=[];this.unhashedSubpackets.forEach(a=>{t.push($f(a.length)),t.push(a)});const n=Ae.concat(t),r=Ae.writeNumber(n.length,2);return Ae.concat([r,n])}readSubPacket(t,n=!0){let r=0;const a=!!(128&t[r]),s=127&t[r];if(n||(this.unhashedSubpackets.push(t.subarray(r,t.length)),fK.has(s)))switch(r++,s){case ve.signatureSubpacket.signatureCreationTime:this.created=Ae.readDate(t.subarray(r,t.length));break;case ve.signatureSubpacket.signatureExpirationTime:{const l=Ae.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=Ae.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=Ae.readNumber(t.subarray(r,r+2));r+=2;const h=Ae.readNumber(t.subarray(r,r+2));r+=2;const i=Ae.decodeUTF8(t.subarray(r,r+c)),p=t.subarray(r+c,r+c+h);this.rawNotations.push({name:i,humanReadable:l,value:p,critical:a}),l&&(this.notations[i]=Ae.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=Ae.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.primaryUserID:this.isPrimaryUserID=t[r++]!==0;break;case ve.signatureSubpacket.policyURI:this.policyURI=Ae.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=Ae.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=t[r++],this.reasonForRevocationString=Ae.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=Ae.uint8ArrayToString(t.subarray(r,r+l));break}case ve.signatureSubpacket.embeddedSignature:this.embeddedSignature=new li,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 "+s);if(a)throw l;Ae.printDebug(l)}}}readSubPackets(t,n=!0,r){const a=Ae.readNumber(t.subarray(0,2));let s=2;for(;s<2+a;){const l=aO(t.subarray(s,t.length));s+=l.offset,this.readSubPacket(t.subarray(s,s+l.len),n,r),s+=l.len}return s}toSign(t,n){const r=ve.signature;switch(t){case r.binary:return n.text!==null?Ae.encodeUTF8(n.getText(!0)):n.getBytes(!0);case r.text:{const a=n.getBytes(!0);return Ae.canonicalizeEOL(a)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let a,s;if(n.userID)s=180,a=n.userID;else{if(!n.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");s=209,a=n.userAttribute}const l=a.write();return Ae.concat([this.toSign(r.key,n),new Uint8Array([s]),Ae.writeNumber(l.length,4),l])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Ae.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 Cr(Ql(this.signatureData),a=>{r+=a.length},()=>{const a=[];return this.version!==5||this.signatureType!==ve.signature.binary&&this.signatureType!==ve.signature.text||(n?a.push(new Uint8Array(6)):a.push(t.writeHeader())),a.push(new Uint8Array([this.version,255])),this.version===5&&a.push(new Uint8Array(4)),a.push(Ae.writeNumber(r,4)),Ae.concat(a)})}toHash(t,n,r=!1){const a=this.toSign(t,n);return Ae.concat([a,this.signatureData,this.calculateTrailer(n,r)])}async hash(t,n,r,a=!1){return r||(r=this.toHash(t,n,a)),Kt.hash.digest(this.hashAlgorithm,r)}async verify(t,n,r,a=new Date,s=!1,l=Bt){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[gd]&&!c)){let i,p;if(this.hashed?p=await this.hashed:(i=this.toHash(n,r,s),p=await this.hash(n,r,i)),p=await Ar(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[gd]=await Kt.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,t.publicParams,i,p),!this[gd])throw Error("Signature verification failed")}const h=Ae.normalizeDate(a);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:i,critical:p})=>{if(p&&l.knownNotations.indexOf(i)<0)throw Error("Unknown critical notation: "+i)}),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=Ae.normalizeDate(t);return n!==null&&!(this.created<=n&&nli.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 hK(e,t){if(!t[e]){let n;try{n=ve.read(ve.packet,e)}catch{throw new jr("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+n)}return new t[e]}Ga.prototype.hash=li.prototype.hash,Ga.prototype.toHash=li.prototype.toHash,Ga.prototype.toSign=li.prototype.toSign;class Gn extends Array{static async fromBinary(t,n,r=Bt){const a=new Gn;return await a.read(t,n,r),a}async read(t,n,r=Bt){this.stream=lo(t,async(s,l)=>{const c=ta(l);try{for(;;)if(await c.ready,await pH(s,async h=>{try{if(h.tag===ve.packet.marker||h.tag===ve.packet.trust)return;const i=hK(h.tag,n);i.packets=new Gn,i.fromStream=Ae.isStream(h.packet),await i.read(h.packet,r),await c.write(i)}catch(i){const p=!r.ignoreUnsupportedPackets&&i instanceof jr,d=!(r.ignoreMalformedPackets||i instanceof jr);if(p||d||$v(h.tag))await c.abort(i);else{const v=new V0(h.tag,h.packet);await c.write(v)}Ae.printDebugError(i)}}))return await c.ready,void await c.close()}catch(h){await c.abort(h)}});const a=Bs(this.stream);for(;;){const{done:s,value:l}=await a.read();if(s?this.stream=null:this.push(l),s||$v(l.constructor.tag))break}a.releaseLock()}write(){const t=[];for(let n=0;n{if(s.push(h),l+=h.length,l>=c){const i=Math.min(Math.log(l)/Math.LN2|0,30),p=2**i,d=Ae.concat([hH(i)].concat(s));return s=[d.subarray(1+p)],l=s[0].length,d.subarray(0,1+p)}},()=>Ae.concat([$f(l)].concat(s))))}else{if(Ae.isStream(a)){let s=0;t.push(Cr(Ql(a),l=>{s+=l.length},()=>e4(r,s)))}else t.push(e4(r,a.length));t.push(a)}}return Ae.concat(t)}filterByTag(...t){const n=new Gn,r=a=>s=>a===s;for(let a=0;an.constructor.tag===t)}indexOfTag(...t){const n=[],r=this,a=s=>l=>s===l;for(let s=0;s{this.algorithm=await r.readByte(),this.compressed=r.remainder(),await this.decompress(n)})}write(){return this.compressed===null&&this.compress(),Ae.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(t=Bt){const n=ve.read(ve.compression,this.algorithm),r=mK[n];if(!r)throw Error(n+" decompression not supported");this.packets=await Gn.fromBinary(r(this.compressed),pK,t)}compress(){const t=ve.read(ve.compression,this.algorithm),n=vK[t];if(!n)throw Error(t+" compression not supported");this.compressed=n(this.packets.write(),this.deflateLevel)}}const xs=Ae.getNodeZlib();function q4(e){return e}function Mm(e,t,n={}){return function(r){return!Ae.isStream(r)||Tr(r)?rl(()=>Ar(r).then(a=>new Promise((s,l)=>{e(a,n,(c,h)=>{if(c)return l(c);s(h)})}))):vg(x1(r).pipe(t(n)))}}function Im(e,t={}){return function(n){const r=new e(t);return Cr(n,a=>{if(a.length)return r.push(a,ff),r.result},()=>{if(e===X0)return r.push([],Yr),r.result})}}function ek(e){return function(t){return rl(async()=>e(await Ar(t)))}}const vK=xs?{zip:(e,t)=>Mm(xs.deflateRaw,xs.createDeflateRaw,{level:t})(e),zlib:(e,t)=>Mm(xs.deflate,xs.createDeflate,{level:t})(e)}:{zip:(e,t)=>Im(X0,{raw:!0,level:t})(e),zlib:(e,t)=>Im(X0,{level:t})(e)},mK=xs?{uncompressed:q4,zip:Mm(xs.inflateRaw,xs.createInflateRaw),zlib:Mm(xs.inflate,xs.createInflate),bzip2:ek(Q4)}:{uncompressed:q4,zip:Im(X4,{raw:!0}),zlib:Im(X4),bzip2:ek(Q4)},gK=Ae.constructAllowedPackets([Dc,Nf,Ga,li]);class zO{static get tag(){return ve.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(t){await mg(t,async n=>{const r=await n.readByte();if(r!==1)throw new jr(`Version ${r} of the SEIP packet is unsupported.`);this.encrypted=n.remainder()})}write(){return Ae.concat([new Uint8Array([1]),this.encrypted])}async encrypt(t,n,r=Bt){const{blockSize:a}=Kt.getCipher(t);let s=this.packets.write();Tr(s)&&(s=await Ar(s));const l=await Kt.getPrefixRandom(t),c=new Uint8Array([211,20]),h=Ae.concat([l,s,c]),i=await Kt.hash.sha1(qu(h)),p=Ae.concat([h,i]);return this.encrypted=await Kt.mode.cfb.encrypt(t,n,p,new Uint8Array(a),r),!0}async decrypt(t,n,r=Bt){const{blockSize:a}=Kt.getCipher(t);let s=Ql(this.encrypted);Tr(s)&&(s=await Ar(s));const l=await Kt.mode.cfb.decrypt(t,n,s,new Uint8Array(a)),c=si(qu(l),-20),h=si(l,0,-20),i=Promise.all([Ar(await Kt.hash.sha1(qu(h))),Ar(c)]).then(([v,m])=>{if(!Ae.equalsUint8Array(v,m))throw Error("Modification detected.");return new Uint8Array}),p=si(h,a+2);let d=si(p,0,-2);return d=Ji([d,rl(()=>i)]),Ae.isStream(s)&&r.allowUnauthenticatedStream||(d=await Ar(d)),this.packets=await Gn.fromBinary(d,gK,r),!0}}const _K=Ae.constructAllowedPackets([Dc,Nf,Ga,li]);class Eg{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 mg(t,async n=>{const r=await n.readByte();if(r!==1)throw new jr(`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 a=Kt.getAEADMode(this.aeadAlgorithm);this.iv=await n.readBytes(a.ivLength),this.encrypted=n.remainder()})}write(){return Ae.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(t,n,r=Bt){this.packets=await Gn.fromBinary(await this.crypt("decrypt",n,Ql(this.encrypted)),_K,r)}async encrypt(t,n,r=Bt){this.cipherAlgorithm=t;const{ivLength:a}=Kt.getAEADMode(this.aeadAlgorithm);this.iv=Kt.random.getRandomBytes(a),this.chunkSizeByte=r.aeadChunkSizeByte;const s=this.packets.write();this.encrypted=await this.crypt("encrypt",n,s)}async crypt(t,n,r){const a=Kt.getAEADMode(this.aeadAlgorithm),s=await a(this.cipherAlgorithm,n),l=t==="decrypt"?a.tagLength:0,c=t==="encrypt"?a.tagLength:0,h=2**(this.chunkSizeByte+6)+l,i=new ArrayBuffer(21),p=new Uint8Array(i,0,13),d=new Uint8Array(i),v=new DataView(i),m=new Uint8Array(i,5,8);p.set([192|Eg.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let _=0,y=Promise.resolve(),b=0,E=0;const D=this.iv;return lo(r,async(x,C)=>{if(Ae.isStream(x)!=="array"){const T=new uc({},{highWaterMark:Ae.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:M=>M.length});Jo(T.readable,C),C=T.writable}const k=Bs(x),w=ta(C);try{for(;;){let T=await k.readBytes(h+l)||new Uint8Array;const M=T.subarray(T.length-l);let A,R;if(T=T.subarray(0,T.length-l),!_||T.length?(k.unshift(M),A=s[t](T,a.getNonce(D,m),p),E+=T.length-l+c):(v.setInt32(17,b),A=s[t](M,a.getNonce(D,m),d),E+=c,R=!0),b+=T.length-l,y=y.then(()=>A).then(async H=>{await w.ready,await w.write(H),E-=H.length}).catch(H=>w.abort(H)),(R||E>w.desiredSize)&&await y,R){await w.close();break}v.setInt32(9,++_)}}catch(T){await w.abort(T)}})}}class J0{static get tag(){return ve.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new Zo,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(t){if(this.version=t[0],this.version!==3)throw new jr(`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 Ae.concatUint8Array(t)}async encrypt(t){const n=Ae.concatUint8Array([new Uint8Array([ve.write(ve.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,Ae.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?Ae.concatUint8Array([new Uint8Array([n.sessionKeyAlgorithm]),n.sessionKey,Ae.writeChecksum(n.sessionKey)]):null,a=await Kt.publicKeyDecrypt(this.publicKeyAlgorithm,t.publicParams,t.privateParams,this.encrypted,t.getFingerprintBytes(),r),s=a[0],l=a.subarray(1,a.length-2),c=a.subarray(a.length-2),h=Ae.writeChecksum(l),i=h[0]===c[0]&h[1]===c[1];if(n){const p=i&s===n.sessionKeyAlgorithm&l.length===n.sessionKey.length;this.sessionKeyAlgorithm=Ae.selectUint8(p,s,n.sessionKeyAlgorithm),this.sessionKey=Ae.selectUint8Array(p,l,n.sessionKey)}else{if(!(i&&ve.read(ve.symmetric,s)))throw Error("Decryption error");this.sessionKey=l,this.sessionKeyAlgorithm=s}}}class qd{constructor(t=Bt){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(Ae.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,...Ae.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 Ae.concatUint8Array(t)}async produceKey(t,n){t=Ae.encodeUTF8(t);const r=[];let a=0,s=0;for(;a{this.privateParams[t].fill(0),delete this.privateParams[t]}),this.privateParams=null,this.isEncrypted=!0)}}async function tk(e,t,n){const{keySize:r}=Kt.getCipher(n);return e.produceKey(t,r)}var wK=O1(function(e){(function(t){function n(a){function s(){return Qt0&&(at.semantic=" "),at}}function x(rt,at){return function(){var xt,Vt,Oe,Be,Fe;for(Be=l(),xt=i("star"),Oe=0,Fe=at===void 0?0:at;(Vt=rt())!==null;)Oe+=1,d(xt,Vt);return Oe>=Fe?xt:(c(Be),null)}}function C(rt){return rt.charCodeAt(0)>=128}function k(){return p("cr",m("\r")())}function w(){return p("crlf",_(k,A)())}function T(){return p("dquote",m('"')())}function M(){return p("htab",m(" ")())}function A(){return p("lf",m(` +`)}return Ae.concat(i)}class Zo{constructor(){this.bytes=""}read(t){this.bytes=Ae.uint8ArrayToString(t.subarray(0,8))}write(){return Ae.stringToUint8Array(this.bytes)}toHex(){return Ae.uint8ArrayToHex(Ae.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 Zo;return n.read(Ae.hexToUint8Array(t)),n}static wildcard(){const t=new Zo;return t.read(new Uint8Array(8)),t}}var An=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 a,s,l,c,h=!1;function i(){function d(y){var b,E,D;for(E=D=function(x){var C=e[255-t[x]];return x===0&&(C=0),C}(y),b=0;b<4;b++)D^=E=255&(E<<1|E>>>7);return D^=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}(),a=[],s=[],l=[[],[],[],[]],c=[[],[],[],[]];for(var v=0;v<256;v++){var m=d(v);a[v]=m,s[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||i();var m=new Uint32Array(v);m.set(a,512),m.set(s,768);for(var _=0;_<4;_++)m.set(l[_],4096+1024*_>>2),m.set(c[_],8192+1024*_>>2);var y=function(b,E,D){var x=0,C=0,k=0,w=0,T=0,M=0,A=0,R=0,H=0,L=0,V=0,j=0,oe=0,Te=0,pe=0,ye=0,de=0,xe=0,Y=0,se=0,be=0,_e=new b.Uint32Array(D),re=new b.Uint8Array(D);function Q(fe,ce,Ve,Je,_t,Tt,At,It){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,_t=_t|0,Tt=Tt|0,At=At|0,It=It|0;var ht=0,Rt=0,Pt=0,hn=0,an=0,Jt=0,Yt=0,Qt=0;for(ht=Ve|1024,Rt=Ve|2048,Pt=Ve|3072,_t=_t^_e[(fe|0)>>2],Tt=Tt^_e[(fe|4)>>2],At=At^_e[(fe|8)>>2],It=It^_e[(fe|12)>>2],Qt=16;(Qt|0)<=Je<<4;Qt=Qt+16|0)hn=_e[(Ve|_t>>22&1020)>>2]^_e[(ht|Tt>>14&1020)>>2]^_e[(Rt|At>>6&1020)>>2]^_e[(Pt|It<<2&1020)>>2]^_e[(fe|Qt|0)>>2],an=_e[(Ve|Tt>>22&1020)>>2]^_e[(ht|At>>14&1020)>>2]^_e[(Rt|It>>6&1020)>>2]^_e[(Pt|_t<<2&1020)>>2]^_e[(fe|Qt|4)>>2],Jt=_e[(Ve|At>>22&1020)>>2]^_e[(ht|It>>14&1020)>>2]^_e[(Rt|_t>>6&1020)>>2]^_e[(Pt|Tt<<2&1020)>>2]^_e[(fe|Qt|8)>>2],Yt=_e[(Ve|It>>22&1020)>>2]^_e[(ht|_t>>14&1020)>>2]^_e[(Rt|Tt>>6&1020)>>2]^_e[(Pt|At<<2&1020)>>2]^_e[(fe|Qt|12)>>2],_t=hn,Tt=an,At=Jt,It=Yt;x=_e[(ce|_t>>22&1020)>>2]<<24^_e[(ce|Tt>>14&1020)>>2]<<16^_e[(ce|At>>6&1020)>>2]<<8^_e[(ce|It<<2&1020)>>2]^_e[(fe|Qt|0)>>2],C=_e[(ce|Tt>>22&1020)>>2]<<24^_e[(ce|At>>14&1020)>>2]<<16^_e[(ce|It>>6&1020)>>2]<<8^_e[(ce|_t<<2&1020)>>2]^_e[(fe|Qt|4)>>2],k=_e[(ce|At>>22&1020)>>2]<<24^_e[(ce|It>>14&1020)>>2]<<16^_e[(ce|_t>>6&1020)>>2]<<8^_e[(ce|Tt<<2&1020)>>2]^_e[(fe|Qt|8)>>2],w=_e[(ce|It>>22&1020)>>2]<<24^_e[(ce|_t>>14&1020)>>2]<<16^_e[(ce|Tt>>6&1020)>>2]<<8^_e[(ce|At<<2&1020)>>2]^_e[(fe|Qt|12)>>2]}function B(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,fe,ce,Ve,Je)}function I(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var _t=0;Q(1024,3072,8192,be,fe,Je,Ve,ce),_t=C,C=w,w=_t}function Z(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,T^fe,M^ce,A^Ve,R^Je),T=x,M=C,A=k,R=w}function ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var _t=0;Q(1024,3072,8192,be,fe,Je,Ve,ce),_t=C,C=w,w=_t,x=x^T,C=C^M,k=k^A,w=w^R,T=fe,M=ce,A=Ve,R=Je}function he(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,T,M,A,R),T=x=x^fe,M=C=C^ce,A=k=k^Ve,R=w=w^Je}function Ee(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,T,M,A,R),x=x^fe,C=C^ce,k=k^Ve,w=w^Je,T=fe,M=ce,A=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,be,T,M,A,R),T=x,M=C,A=k,R=w,x=x^fe,C=C^ce,k=k^Ve,w=w^Je}function G(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,Q(0,2048,4096,be,H,L,V,j),j=~ye&j|ye&j+1,V=~pe&V|pe&V+((j|0)==0),L=~Te&L|Te&L+((V|0)==0),H=~oe&H|oe&H+((L|0)==0),x=x^fe,C=C^ce,k=k^Ve,w=w^Je}function ae(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0;var _t=0,Tt=0,At=0,It=0,ht=0,Rt=0,Pt=0,hn=0,an=0,Jt=0;for(fe=fe^T,ce=ce^M,Ve=Ve^A,Je=Je^R,_t=de|0,Tt=xe|0,At=Y|0,It=se|0;(an|0)<128;an=an+1|0)_t>>>31&&(ht=ht^fe,Rt=Rt^ce,Pt=Pt^Ve,hn=hn^Je),_t=_t<<1|Tt>>>31,Tt=Tt<<1|At>>>31,At=At<<1|It>>>31,It=It<<1,Jt=Je&1,Je=Je>>>1|Ve<<31,Ve=Ve>>>1|ce<<31,ce=ce>>>1|fe<<31,fe=fe>>>1,Jt&&(fe=fe^3774873600);T=ht,M=Rt,A=Pt,R=hn}function q(fe){fe=fe|0,be=fe}function Pe(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,x=fe,C=ce,k=Ve,w=Je}function me(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,T=fe,M=ce,A=Ve,R=Je}function U(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,H=fe,L=ce,V=Ve,j=Je}function ke(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,oe=fe,Te=ce,pe=Ve,ye=Je}function ge(fe,ce,Ve,Je){fe=fe|0,ce=ce|0,Ve=Ve|0,Je=Je|0,j=~ye&j|ye&Je,V=~pe&V|pe&Ve,L=~Te&L|Te&ce,H=~oe&H|oe&fe}function le(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=x>>>24,re[fe|1]=x>>>16&255,re[fe|2]=x>>>8&255,re[fe|3]=x&255,re[fe|4]=C>>>24,re[fe|5]=C>>>16&255,re[fe|6]=C>>>8&255,re[fe|7]=C&255,re[fe|8]=k>>>24,re[fe|9]=k>>>16&255,re[fe|10]=k>>>8&255,re[fe|11]=k&255,re[fe|12]=w>>>24,re[fe|13]=w>>>16&255,re[fe|14]=w>>>8&255,re[fe|15]=w&255,16)}function F(fe){return fe=fe|0,fe&15?-1:(re[fe|0]=T>>>24,re[fe|1]=T>>>16&255,re[fe|2]=T>>>8&255,re[fe|3]=T&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]=A>>>24,re[fe|9]=A>>>16&255,re[fe|10]=A>>>8&255,re[fe|11]=A&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 W(){B(0,0,0,0),de=x,xe=C,Y=k,se=w}function X(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]=x>>>24,re[ce|1]=x>>>16&255,re[ce|2]=x>>>8&255,re[ce|3]=x&255,re[ce|4]=C>>>24,re[ce|5]=C>>>16&255,re[ce|6]=C>>>8&255,re[ce|7]=C&255,re[ce|8]=k>>>24,re[ce|9]=k>>>16&255,re[ce|10]=k>>>8&255,re[ce|11]=k&255,re[ce|12]=w>>>24,re[ce|13]=w>>>16&255,re[ce|14]=w>>>8&255,re[ce|15]=w&255,Je=Je+16|0,ce=ce+16|0,Ve=Ve-16|0;return Je|0}function ne(fe,ce,Ve){fe=fe|0,ce=ce|0,Ve=Ve|0;var Je=0;if(ce&15)return-1;for(;(Ve|0)>=16;)we[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=[B,I,Z,ee,he,Ee,J,G],we=[Z,ae];return{set_rounds:q,set_state:Pe,set_iv:me,set_nonce:U,set_mask:ke,set_counter:ge,get_state:le,get_iv:F,gcm_init:W,cipher:X,mac:ne}}({Uint8Array,Uint32Array},d,v);return y.set_key=function(b,E,D,x,C,k,w,T,M){var A=m.subarray(0,60),R=m.subarray(256,316);A.set([E,D,x,C,k,w,T,M]);for(var H=b,L=1;H<4*b+28;H++){var V=A[H-1];(H%b==0||b===8&&H%b==4)&&(V=a[V>>>24]<<24^a[V>>>16&255]<<16^a[V>>>8&255]<<8^a[255&V]),H%b==0&&(V=V<<8^V>>>24^L<<24,L=L<<1^(128&L?27:0)),A[H]=A[H-b]^V}for(var j=0;j=H-4?V:c[0][a[V>>>24]]^c[1][a[V>>>16&255]]^c[2][a[V>>>8&255]]^c[3][a[255&V]];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 ME(e){return e instanceof Uint8Array}function k1(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 Il(e,t,n,r,a){const s=e.length-t,l=sa+s.length,0),n=new Uint8Array(t);let r=0;for(let a=0;a>2,s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12),a>16?s.getUint32(16):0,a>16?s.getUint32(20):0,a>24?s.getUint32(24):0,a>24?s.getUint32(28):0),n!==void 0){if(n.length!==16)throw new ro("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(!ME(t))throw new TypeError("data isn't of expected type");let{heap:n,asm:r}=this.acquire_asm(),a=An.ENC[this.mode],s=An.HEAP_DATA,l=this.pos,c=this.len,h=0,i=t.length||0,p=0,d=0,v=new Uint8Array(c+i&-16);for(;i>0;)d=Il(n,l+c,t,h,i),c+=d,h+=d,i-=d,d=r.cipher(a,s+l,c),d&&v.set(n.subarray(l,l+d),p),p+=d,d0;)m=Il(n,l+c,t,h,i),c+=m,h+=m,i-=m,m=r.cipher(a,s+l,c-(i?0:v)),m&&_.set(n.subarray(l,l+m),p),p+=m,m0){if(l%16){if(this.hasOwnProperty("padding"))throw new ro("data length must be a multiple of the block size");l+=16-l%16}if(n.cipher(r,a+s,l),this.hasOwnProperty("padding")&&this.padding){let i=t[s+c-1];if(i<1||i>16||i>c)throw new F0("bad padding");let p=0;for(let d=i;d>1;d--)p|=i^t[s+c-d];if(p)throw new F0("bad padding");c-=i}}const h=new Uint8Array(c);return c>0&&h.set(t.subarray(s,s+c)),this.pos=0,this.len=0,this.release_asm(),h}}class _m{static encrypt(t,n,r=!1){return new _m(n,r).encrypt(t)}static decrypt(t,n,r=!1){return new _m(n,r).decrypt(t)}constructor(t,n=!1,r){this.aes=r||new Mf(t,void 0,n,"ECB")}encrypt(t){return Qo(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return Qo(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}function D1(e){const t=function(n){const r=new _m(n);this.encrypt=function(a){return r.encrypt(a)},this.decrypt=function(a){return r.decrypt(a)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}function Gd(e,t,n,r,a,s){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],i=[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,D,x,C,k,w,T,M,A,R,H,L=0,V=t.length;const j=e.length===32?3:9;k=j===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(pe,ye){const de=8-pe.length%8;let xe;if(ye===2&&de<8)xe=32;else if(ye===1)xe=de;else{if(ye||!(de<8)){if(de===8)return pe;throw Error("des: invalid padding")}xe=0}const Y=new Uint8Array(pe.length+de);for(let se=0;se>>4^C),C^=b,x^=b<<4,b=65535&(x>>>16^C),C^=b,x^=b<<16,b=858993459&(C>>>2^x),x^=b,C^=b<<2,b=16711935&(C>>>8^x),x^=b,C^=b<<8,b=1431655765&(x>>>1^C),C^=b,x^=b<<1,x=x<<1|x>>>31,C=C<<1|C>>>31,y=0;y>>4|C<<28)^e[_+1],b=x,x=C,C=b^(c[E>>>24&63]|i[E>>>16&63]|d[E>>>8&63]|m[63&E]|l[D>>>24&63]|h[D>>>16&63]|p[D>>>8&63]|v[63&D]);b=x,x=C,C=b}x=x>>>1|x<<31,C=C>>>1|C<<31,b=1431655765&(x>>>1^C),C^=b,x^=b<<1,b=16711935&(C>>>8^x),x^=b,C^=b<<8,b=858993459&(C>>>2^x),x^=b,C^=b<<2,b=65535&(x>>>16^C),C^=b,x^=b<<16,b=252645135&(x>>>4^C),C^=b,x^=b<<4,r===1&&(n?(w=x,M=C):(x^=T,C^=A)),oe[Te++]=x>>>24,oe[Te++]=x>>>16&255,oe[Te++]=x>>>8&255,oe[Te++]=255&x,oe[Te++]=C>>>24,oe[Te++]=C>>>16&255,oe[Te++]=C>>>8&255,oe[Te++]=255&C}return n||(oe=function(pe,ye){let de,xe=null;if(ye===2)de=32;else if(ye===1)xe=pe[pe.length-1];else{if(ye)throw Error("des: invalid padding");de=0}if(!xe){for(xe=1;pe[pe.length-xe]===de;)xe++;xe--}return pe.subarray(0,pe.length-xe)}(oe,s)),oe}function Yd(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],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[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],i=[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 D,x,C,k=0,w=0;for(let T=0;T>>4^A),A^=C,M^=C<<4,C=65535&(A>>>-16^M),M^=C,A^=C<<-16,C=858993459&(M>>>2^A),A^=C,M^=C<<2,C=65535&(A>>>-16^M),M^=C,A^=C<<-16,C=1431655765&(M>>>1^A),A^=C,M^=C<<1,C=16711935&(A>>>8^M),M^=C,A^=C<<8,C=1431655765&(M>>>1^A),A^=C,M^=C<<1,C=M<<8|A>>>20&240,M=A<<24|A<<8&16711680|A>>>8&65280|A>>>24&240,A=C;for(let R=0;R<16;R++)E[R]?(M=M<<2|M>>>26,A=A<<2|A>>>26):(M=M<<1|M>>>27,A=A<<1|A>>>27),M&=-15,A&=-15,D=t[M>>>28]|n[M>>>24&15]|r[M>>>20&15]|a[M>>>16&15]|s[M>>>12&15]|l[M>>>8&15]|c[M>>>4&15],x=h[A>>>28]|i[A>>>24&15]|p[A>>>20&15]|d[A>>>16&15]|v[A>>>12&15]|m[A>>>8&15]|_[A>>>4&15],C=65535&(x>>>16^D),b[w++]=D^C,b[w++]=x^C<<16}return b}function Td(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 Gd(Yd(this.key[2]),Gd(Yd(this.key[1]),Gd(Yd(this.key[0]),t,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}function rW(){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 i=c+l,p=i<>>32-h;return(s[0][p>>>24]^s[1][p>>>16&255])-s[2][p>>>8&255]+s[3][255&p]}function r(l,c,h){const i=c^l,p=i<>>32-h;return s[0][p>>>24]-s[1][p>>>16&255]+s[2][p>>>8&255]^s[3][255&p]}function a(l,c,h){const i=c-l,p=i<>>32-h;return(s[0][p>>>24]+s[1][p>>>16&255]^s[2][p>>>8&255])-s[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 i;for(let m=0;m<4;m++)i=4*m,c[m]=l[i]<<24|l[i+1]<<16|l[i+2]<<8|l[i+3];const p=[6,7,4,5];let d,v=0;for(let m=0;m<2;m++)for(let _=0;_<4;_++){for(i=0;i<4;i++){const y=e[_][i];d=c[y[1]],d^=s[4][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=s[5][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=s[6][c[y[4]>>>2]>>>24-8*(3&y[4])&255],d^=s[7][c[y[5]>>>2]>>>24-8*(3&y[5])&255],d^=s[p[i]][c[y[6]>>>2]>>>24-8*(3&y[6])&255],c[y[0]]=d}for(i=0;i<4;i++){const y=t[_][i];d=s[4][c[y[0]>>>2]>>>24-8*(3&y[0])&255],d^=s[5][c[y[1]>>>2]>>>24-8*(3&y[1])&255],d^=s[6][c[y[2]>>>2]>>>24-8*(3&y[2])&255],d^=s[7][c[y[3]>>>2]>>>24-8*(3&y[3])&255],d^=s[4+i][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 s=[,,,,,,,,];s[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],s[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],s[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],s[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],s[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],s[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],s[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],s[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 Pd(e){this.cast5=new rW,this.cast5.setKey(e),this.encrypt=function(t){return this.cast5.encrypt(t)}}Td.keySize=Td.prototype.keySize=24,Td.blockSize=Td.prototype.blockSize=8,Pd.blockSize=Pd.prototype.blockSize=8,Pd.keySize=Pd.prototype.keySize=16;const ka=4294967295;function cs(e,t){return(e<>>32-t)&ka}function Hs(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function So(e,t,n){e.splice(t,4,255&n,n>>>8&255,n>>>16&255,n>>>24&255)}function Sn(e,t){return e>>>8*t&255}function Ad(e){this.tf=function(){let t=null,n=null,r=-1,a=[],s=[[],[],[],[]];function l(p){return s[0][Sn(p,0)]^s[1][Sn(p,1)]^s[2][Sn(p,2)]^s[3][Sn(p,3)]}function c(p){return s[0][Sn(p,3)]^s[1][Sn(p,0)]^s[2][Sn(p,1)]^s[3][Sn(p,2)]}function h(p,d){let v=l(d[0]),m=c(d[1]);d[2]=cs(d[2]^v+m+a[4*p+8]&ka,31),d[3]=cs(d[3],1)^v+2*m+a[4*p+9]&ka,v=l(d[2]),m=c(d[3]),d[0]=cs(d[0]^v+m+a[4*p+10]&ka,31),d[1]=cs(d[1],1)^v+2*m+a[4*p+11]&ka}function i(p,d){let v=l(d[0]),m=c(d[1]);d[2]=cs(d[2],1)^v+m+a[4*p+10]&ka,d[3]=cs(d[3]^v+2*m+a[4*p+11]&ka,31),v=l(d[2]),m=c(d[3]),d[0]=cs(d[0],1)^v+m+a[4*p+8]&ka,d[1]=cs(d[1]^v+2*m+a[4*p+9]&ka,31)}return{name:"twofish",blocksize:16,open:function(p){let d,v,m,_,y;t=p;const b=[],E=[],D=[];let x;const C=[];let k,w,T;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]],A=[[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]],H=[[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]],L=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],V=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],j=[[],[]],oe=[[],[],[],[]];function Te(Y){return Y^Y>>2^[0,90,180,238][3&Y]}function pe(Y){return Y^Y>>1^Y>>2^[0,238,180,90][3&Y]}function ye(Y,se){let be,_e,re;for(be=0;be<8;be++)_e=se>>>24,se=se<<8&ka|Y>>>24,Y=Y<<8&ka,re=_e<<1,128&_e&&(re^=333),se^=_e^re<<16,re^=_e>>>1,1&_e&&(re^=166),se^=re<<24|re<<8;return se}function de(Y,se){const be=se>>4,_e=15&se,re=M[Y][be^_e],Q=A[Y][L[_e]^V[be]];return H[Y][L[Q]^V[re]]<<4|R[Y][re^Q]}function xe(Y,se){let be=Sn(Y,0),_e=Sn(Y,1),re=Sn(Y,2),Q=Sn(Y,3);switch(x){case 4:be=j[1][be]^Sn(se[3],0),_e=j[0][_e]^Sn(se[3],1),re=j[0][re]^Sn(se[3],2),Q=j[1][Q]^Sn(se[3],3);case 3:be=j[1][be]^Sn(se[2],0),_e=j[1][_e]^Sn(se[2],1),re=j[0][re]^Sn(se[2],2),Q=j[0][Q]^Sn(se[2],3);case 2:be=j[0][j[0][be]^Sn(se[1],0)]^Sn(se[0],0),_e=j[0][j[1][_e]^Sn(se[1],1)]^Sn(se[0],1),re=j[1][j[0][re]^Sn(se[1],2)]^Sn(se[0],2),Q=j[1][j[1][Q]^Sn(se[1],3)]^Sn(se[0],3)}return oe[0][be]^oe[1][_e]^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]=Hs(t,d);for(d=0;d<256;d++)j[0][d]=de(0,d),j[1][d]=de(1,d);for(d=0;d<256;d++)k=j[1][d],w=Te(k),T=pe(k),oe[0][d]=k+(w<<8)+(T<<16)+(T<<24),oe[2][d]=w+(T<<8)+(k<<16)+(T<<24),k=j[0][d],w=Te(k),T=pe(k),oe[1][d]=T+(T<<8)+(w<<16)+(k<<24),oe[3][d]=w+(k<<8)+(T<<16)+(w<<24);for(x=D.length/2,d=0;d=0;m--)i(m,v);So(n,r,v[2]^a[0]),So(n,r+4,v[3]^a[1]),So(n,r+8,v[0]^a[2]),So(n,r+12,v[1]^a[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 Fa(){}function Md(e){this.bf=new Fa,this.bf.init(e),this.encrypt=function(t){return this.bf.encryptBlock(t)}}Ad.keySize=Ad.prototype.keySize=32,Ad.blockSize=Ad.prototype.blockSize=16,Fa.prototype.BLOCKSIZE=8,Fa.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]],Fa.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Fa.prototype.NN=16,Fa.prototype._clean=function(e){return e<0&&(e=(2147483647&e)+2147483648),e},Fa.prototype._F=function(e){let t;const n=255&e,r=255&(e>>>=8),a=255&(e>>>=8),s=255&(e>>>=8);return t=this.sboxes[0][s]+this.sboxes[1][a],t^=this.sboxes[2][r],t+=this.sboxes[3][n],t},Fa.prototype._encryptBlock=function(e){let t,n=e[0],r=e[1];for(t=0;t>>24-8*t&255,a[t+r]=n[1]>>>24-8*t&255;return a},Fa.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 a=n;n=r,r=a}n^=this.parray[1],r^=this.parray[0],e[0]=this._clean(r),e[1]=this._clean(n)},Fa.prototype.init=function(e){let t,n=0;for(this.parray=[],t=0;t=e.length&&(n=0);this.parray[t]=this.PARRAY[t]^a}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)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=ye+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=de+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=xe+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Y+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=se+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=be+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=_e+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=re+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Q+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=B+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=I+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Z+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=ee+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=he+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,U=Ee+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ee^re^de^pe,ke=me<<1|me>>>31,U=ke+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=he^Q^xe^ye,ge=me<<1|me>>>31,U=ge+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ee^B^Y^de,le=me<<1|me>>>31,U=le+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ke^I^se^xe,F=me<<1|me>>>31,U=F+(J<<5|J>>>27)+Pe+(G&ae|~G&q)+1518500249|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ge^Z^be^Y,W=me<<1|me>>>31,U=W+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=le^ee^_e^se,X=me<<1|me>>>31,U=X+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=F^he^re^be,ne=me<<1|me>>>31,U=ne+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=W^Ee^Q^_e,ue=me<<1|me>>>31,U=ue+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=X^ke^B^re,we=me<<1|me>>>31,U=we+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ne^ge^I^Q,fe=me<<1|me>>>31,U=fe+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ue^le^Z^B,ce=me<<1|me>>>31,U=ce+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=we^F^ee^I,Ve=me<<1|me>>>31,U=Ve+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=fe^W^he^Z,Je=me<<1|me>>>31,U=Je+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ce^X^Ee^ee,_t=me<<1|me>>>31,U=_t+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ve^ne^ke^he,Tt=me<<1|me>>>31,U=Tt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Je^ue^ge^Ee,At=me<<1|me>>>31,U=At+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=_t^we^le^ke,It=me<<1|me>>>31,U=It+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Tt^fe^F^ge,ht=me<<1|me>>>31,U=ht+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=At^ce^W^le,Rt=me<<1|me>>>31,U=Rt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=It^Ve^X^F,Pt=me<<1|me>>>31,U=Pt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ht^Je^ne^W,hn=me<<1|me>>>31,U=hn+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Rt^_t^ue^X,an=me<<1|me>>>31,U=an+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Pt^Tt^we^ne,Jt=me<<1|me>>>31,U=Jt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=hn^At^fe^ue,Yt=me<<1|me>>>31,U=Yt+(J<<5|J>>>27)+Pe+(G^ae^q)+1859775393|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=an^It^ce^we,Qt=me<<1|me>>>31,U=Qt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Jt^ht^Ve^fe,Xt=me<<1|me>>>31,U=Xt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Yt^Rt^Je^ce,dn=me<<1|me>>>31,U=dn+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Qt^Pt^_t^Ve,tn=me<<1|me>>>31,U=tn+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Xt^hn^Tt^Je,rt=me<<1|me>>>31,U=rt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=dn^an^At^_t,at=me<<1|me>>>31,U=at+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=tn^Jt^It^Tt,xt=me<<1|me>>>31,U=xt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=rt^Yt^ht^At,Vt=me<<1|me>>>31,U=Vt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=at^Qt^Rt^It,Oe=me<<1|me>>>31,U=Oe+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=xt^Xt^Pt^ht,Be=me<<1|me>>>31,U=Be+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Vt^dn^hn^Rt,Fe=me<<1|me>>>31,U=Fe+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Oe^tn^an^Pt,Le=me<<1|me>>>31,U=Le+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Be^rt^Jt^hn,tt=me<<1|me>>>31,U=tt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Fe^at^Yt^an,ot=me<<1|me>>>31,U=ot+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Le^xt^Qt^Jt,pt=me<<1|me>>>31,U=pt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=tt^Vt^Xt^Yt,yt=me<<1|me>>>31,U=yt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=ot^Oe^dn^Qt,Dt=me<<1|me>>>31,U=Dt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=pt^Be^tn^Xt,Ut=me<<1|me>>>31,U=Ut+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=yt^Fe^rt^dn,Gt=me<<1|me>>>31,U=Gt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Dt^Le^at^tn,zt=me<<1|me>>>31,U=zt+(J<<5|J>>>27)+Pe+(G&ae|G&q|ae&q)-1894007588|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ut^tt^xt^rt,nn=me<<1|me>>>31,U=nn+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Gt^ot^Vt^at,qt=me<<1|me>>>31,U=qt+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=zt^pt^Oe^xt,sn=me<<1|me>>>31,U=sn+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=nn^yt^Be^Vt,In=me<<1|me>>>31,U=In+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=qt^Dt^Fe^Oe,fr=me<<1|me>>>31,U=fr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=sn^Ut^Le^Be,hr=me<<1|me>>>31,U=hr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=In^Gt^tt^Fe,tr=me<<1|me>>>31,U=tr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=fr^zt^ot^Le,Yn=me<<1|me>>>31,U=Yn+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=hr^nn^pt^tt,Ur=me<<1|me>>>31,U=Ur+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=tr^qt^yt^ot,xr=me<<1|me>>>31,U=xr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Yn^sn^Dt^pt,Bi=me<<1|me>>>31,U=Bi+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Ur^In^Ut^yt,Jr=me<<1|me>>>31,U=Jr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=xr^fr^Gt^Dt,xi=me<<1|me>>>31,U=xi+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Bi^hr^zt^Ut,Fi=me<<1|me>>>31,U=Fi+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Jr^tr^nn^Gt,pr=me<<1|me>>>31,U=pr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=xi^Yn^qt^zt,Nr=me<<1|me>>>31,U=Nr+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Fi^Ur^sn^nn,Si=me<<1|me>>>31,U=Si+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=pr^xr^In^qt,ji=me<<1|me>>>31,U=ji+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Nr^Bi^fr^sn,Ie=me<<1|me>>>31,U=Ie+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,me=Si^Jr^hr^In,We=me<<1|me>>>31,U=We+(J<<5|J>>>27)+Pe+(G^ae^q)-899497514|0,Pe=q,q=ae,ae=G<<30|G>>>2,G=J,J=U,r=r+J|0,a=a+G|0,s=s+ae|0,l=l+q|0,c=c+Pe|0}function w(pe){pe=pe|0,k(C[pe|0]<<24|C[pe|1]<<16|C[pe|2]<<8|C[pe|3],C[pe|4]<<24|C[pe|5]<<16|C[pe|6]<<8|C[pe|7],C[pe|8]<<24|C[pe|9]<<16|C[pe|10]<<8|C[pe|11],C[pe|12]<<24|C[pe|13]<<16|C[pe|14]<<8|C[pe|15],C[pe|16]<<24|C[pe|17]<<16|C[pe|18]<<8|C[pe|19],C[pe|20]<<24|C[pe|21]<<16|C[pe|22]<<8|C[pe|23],C[pe|24]<<24|C[pe|25]<<16|C[pe|26]<<8|C[pe|27],C[pe|28]<<24|C[pe|29]<<16|C[pe|30]<<8|C[pe|31],C[pe|32]<<24|C[pe|33]<<16|C[pe|34]<<8|C[pe|35],C[pe|36]<<24|C[pe|37]<<16|C[pe|38]<<8|C[pe|39],C[pe|40]<<24|C[pe|41]<<16|C[pe|42]<<8|C[pe|43],C[pe|44]<<24|C[pe|45]<<16|C[pe|46]<<8|C[pe|47],C[pe|48]<<24|C[pe|49]<<16|C[pe|50]<<8|C[pe|51],C[pe|52]<<24|C[pe|53]<<16|C[pe|54]<<8|C[pe|55],C[pe|56]<<24|C[pe|57]<<16|C[pe|58]<<8|C[pe|59],C[pe|60]<<24|C[pe|61]<<16|C[pe|62]<<8|C[pe|63])}function T(pe){pe=pe|0,C[pe|0]=r>>>24,C[pe|1]=r>>>16&255,C[pe|2]=r>>>8&255,C[pe|3]=r&255,C[pe|4]=a>>>24,C[pe|5]=a>>>16&255,C[pe|6]=a>>>8&255,C[pe|7]=a&255,C[pe|8]=s>>>24,C[pe|9]=s>>>16&255,C[pe|10]=s>>>8&255,C[pe|11]=s&255,C[pe|12]=l>>>24,C[pe|13]=l>>>16&255,C[pe|14]=l>>>8&255,C[pe|15]=l&255,C[pe|16]=c>>>24,C[pe|17]=c>>>16&255,C[pe|18]=c>>>8&255,C[pe|19]=c&255}function M(){r=1732584193,a=4023233417,s=2562383102,l=271733878,c=3285377520,h=i=0}function A(pe,ye,de,xe,Y,se,be){pe=pe|0,ye=ye|0,de=de|0,xe=xe|0,Y=Y|0,se=se|0,be=be|0,r=pe,a=ye,s=de,l=xe,c=Y,h=se,i=be}function R(pe,ye){pe=pe|0,ye=ye|0;var de=0;if(pe&63)return-1;for(;(ye|0)>=64;)w(pe),pe=pe+64|0,ye=ye-64|0,de=de+64|0;return h=h+de|0,h>>>0>>0&&(i=i+1|0),de|0}function H(pe,ye,de){pe=pe|0,ye=ye|0,de=de|0;var xe=0,Y=0;if(pe&63||~de&&de&31)return-1;if((ye|0)>=64){if(xe=R(pe,ye)|0,(xe|0)==-1)return-1;pe=pe+xe|0,ye=ye-xe|0}if(xe=xe+ye|0,h=h+ye|0,h>>>0>>0&&(i=i+1|0),C[pe|ye]=128,(ye|0)>=56){for(Y=ye+1|0;(Y|0)<64;Y=Y+1|0)C[pe|Y]=0;w(pe),ye=0,C[pe|0]=0}for(Y=ye+1|0;(Y|0)<59;Y=Y+1|0)C[pe|Y]=0;return C[pe|56]=i>>>21&255,C[pe|57]=i>>>13&255,C[pe|58]=i>>>5&255,C[pe|59]=i<<3&255|h>>>29,C[pe|60]=h>>>21&255,C[pe|61]=h>>>13&255,C[pe|62]=h>>>5&255,C[pe|63]=h<<3&255,w(pe),~de&&T(de),xe|0}function L(){r=p,a=d,s=v,l=m,c=_,h=64,i=0}function V(){r=y,a=b,s=E,l=D,c=x,h=64,i=0}function j(pe,ye,de,xe,Y,se,be,_e,re,Q,B,I,Z,ee,he,Ee){pe=pe|0,ye=ye|0,de=de|0,xe=xe|0,Y=Y|0,se=se|0,be=be|0,_e=_e|0,re=re|0,Q=Q|0,B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,M(),k(pe^1549556828,ye^1549556828,de^1549556828,xe^1549556828,Y^1549556828,se^1549556828,be^1549556828,_e^1549556828,re^1549556828,Q^1549556828,B^1549556828,I^1549556828,Z^1549556828,ee^1549556828,he^1549556828,Ee^1549556828),y=r,b=a,E=s,D=l,x=c,M(),k(pe^909522486,ye^909522486,de^909522486,xe^909522486,Y^909522486,se^909522486,be^909522486,_e^909522486,re^909522486,Q^909522486,B^909522486,I^909522486,Z^909522486,ee^909522486,he^909522486,Ee^909522486),p=r,d=a,v=s,m=l,_=c,h=64,i=0}function oe(pe,ye,de){pe=pe|0,ye=ye|0,de=de|0;var xe=0,Y=0,se=0,be=0,_e=0,re=0;return pe&63||~de&&de&31?-1:(re=H(pe,ye,-1)|0,xe=r,Y=a,se=s,be=l,_e=c,V(),k(xe,Y,se,be,_e,2147483648,0,0,0,0,0,0,0,0,0,672),~de&&T(de),re|0)}function Te(pe,ye,de,xe,Y){pe=pe|0,ye=ye|0,de=de|0,xe=xe|0,Y=Y|0;var se=0,be=0,_e=0,re=0,Q=0,B=0,I=0,Z=0,ee=0,he=0;if(pe&63||~Y&&Y&31)return-1;for(C[pe+ye|0]=de>>>24,C[pe+ye+1|0]=de>>>16&255,C[pe+ye+2|0]=de>>>8&255,C[pe+ye+3|0]=de&255,oe(pe,ye+4|0,-1)|0,se=B=r,be=I=a,_e=Z=s,re=ee=l,Q=he=c,xe=xe-1|0;(xe|0)>0;)L(),k(B,I,Z,ee,he,2147483648,0,0,0,0,0,0,0,0,0,672),B=r,I=a,Z=s,ee=l,he=c,V(),k(B,I,Z,ee,he,2147483648,0,0,0,0,0,0,0,0,0,672),B=r,I=a,Z=s,ee=l,he=c,se=se^r,be=be^a,_e=_e^s,re=re^l,Q=Q^c,xe=xe-1|0;return r=se,a=be,s=_e,l=re,c=Q,~Y&&T(Y),0}return{reset:M,init:A,process:R,finish:H,hmac_reset:L,hmac_init:j,hmac_finish:oe,pbkdf2_generate_block:Te}};class j8{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 B0("state must be reset before processing new data");const{asm:n,heap:r}=this.acquire_asm();let a=this.pos,s=this.len,l=0,c=t.length,h=0;for(;c>0;)h=Il(r,a+s,t,l,c),s+=h,l+=h,c-=h,h=n.process(a,s),a+=h,s-=h,s||(a=0);return this.pos=a,this.len=s,this}finish(){if(this.result!==null)throw new B0("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 RE=[],LE=[];class $l extends j8{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=RE.pop()||k1(),this.asm=LE.pop()||F8({Uint8Array},null,this.heap.buffer),this.reset()),{heap:this.heap,asm:this.asm}}release_asm(){this.heap!==void 0&&this.asm!==void 0&&(RE.push(this.heap),LE.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new $l().process(t).finish().result}}$l.NAME="sha1",$l.heap_pool=[],$l.asm_pool=[],$l.asm_function=F8;const NE=[],BE=[];class gg extends j8{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=NE.pop()||k1(),this.asm=BE.pop()||function(t,n,r){var a=0,s=0,l=0,c=0,h=0,i=0,p=0,d=0,v=0,m=0,_=0,y=0,b=0,E=0,D=0,x=0,C=0,k=0,w=0,T=0,M=0,A=0,R=0,H=0,L=0,V=0,j=new t.Uint8Array(r);function oe(B,I,Z,ee,he,Ee,J,G,ae,q,Pe,me,U,ke,ge,le){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,J=J|0,G=G|0,ae=ae|0,q=q|0,Pe=Pe|0,me=me|0,U=U|0,ke=ke|0,ge=ge|0,le=le|0;var F=0,W=0,X=0,ne=0,ue=0,we=0,fe=0,ce=0;F=a,W=s,X=l,ne=c,ue=h,we=i,fe=p,ce=d,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+1116352408|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+1899447441|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+3049323471|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+3921009573|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+961987163|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1508970993|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+2453635748|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+2870763221|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ce=ae+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+3624381080|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+310598401|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+607225278|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+1426881987|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+1925078388|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+2162078206|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+2614888103|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+3248222580|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+B+q|0,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+3835390401|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Pe|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+4022224774|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(ee>>>7^ee>>>18^ee>>>3^ee<<25^ee<<14)+(B>>>17^B>>>19^B>>>10^B<<15^B<<13)+Z+me|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+264347078|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ee=(he>>>7^he>>>18^he>>>3^he<<25^he<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+ee+U|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+604807628|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,he=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+he+ke|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+770255983|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(ee>>>17^ee>>>19^ee>>>10^ee<<15^ee<<13)+Ee+ge|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1249150122|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,J=(G>>>7^G>>>18^G>>>3^G<<25^G<<14)+(he>>>17^he>>>19^he>>>10^he<<15^he<<13)+J+le|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+1555081692|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,G=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+G+B|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+1996064986|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ae=(q>>>7^q>>>18^q>>>3^q<<25^q<<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&(we^fe))+2554220882|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,q=(Pe>>>7^Pe>>>18^Pe>>>3^Pe<<25^Pe<<14)+(G>>>17^G>>>19^G>>>10^G<<15^G<<13)+q+Z|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+2821834349|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Pe=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Pe+ee|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+2952996808|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+me+he|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+3210313671|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,U=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Pe>>>17^Pe>>>19^Pe>>>10^Pe<<15^Pe<<13)+U+Ee|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+3336571891|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,ke=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+ke+J|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+3584528711|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+ge+G|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+113926993|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,le=(B>>>7^B>>>18^B>>>3^B<<25^B<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+le+ae|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+338241895|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+B+q|0,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+666307205|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Pe|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+773529912|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(ee>>>7^ee>>>18^ee>>>3^ee<<25^ee<<14)+(B>>>17^B>>>19^B>>>10^B<<15^B<<13)+Z+me|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+1294757372|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ee=(he>>>7^he>>>18^he>>>3^he<<25^he<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+ee+U|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+1396182291|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,he=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+he+ke|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+1695183700|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(ee>>>17^ee>>>19^ee>>>10^ee<<15^ee<<13)+Ee+ge|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1986661051|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,J=(G>>>7^G>>>18^G>>>3^G<<25^G<<14)+(he>>>17^he>>>19^he>>>10^he<<15^he<<13)+J+le|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+2177026350|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,G=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+G+B|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+2456956037|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ae=(q>>>7^q>>>18^q>>>3^q<<25^q<<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&(we^fe))+2730485921|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,q=(Pe>>>7^Pe>>>18^Pe>>>3^Pe<<25^Pe<<14)+(G>>>17^G>>>19^G>>>10^G<<15^G<<13)+q+Z|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+2820302411|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Pe=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Pe+ee|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+3259730800|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+me+he|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+3345764771|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,U=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Pe>>>17^Pe>>>19^Pe>>>10^Pe<<15^Pe<<13)+U+Ee|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+3516065817|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,ke=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+ke+J|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+3600352804|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+ge+G|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+4094571909|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,le=(B>>>7^B>>>18^B>>>3^B<<25^B<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+le+ae|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+275423344|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,B=(I>>>7^I>>>18^I>>>3^I<<25^I<<14)+(ge>>>17^ge>>>19^ge>>>10^ge<<15^ge<<13)+B+q|0,ce=B+ce+(ue>>>6^ue>>>11^ue>>>25^ue<<26^ue<<21^ue<<7)+(fe^ue&(we^fe))+430227734|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,I=(Z>>>7^Z>>>18^Z>>>3^Z<<25^Z<<14)+(le>>>17^le>>>19^le>>>10^le<<15^le<<13)+I+Pe|0,fe=I+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+506948616|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Z=(ee>>>7^ee>>>18^ee>>>3^ee<<25^ee<<14)+(B>>>17^B>>>19^B>>>10^B<<15^B<<13)+Z+me|0,we=Z+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+659060556|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,ee=(he>>>7^he>>>18^he>>>3^he<<25^he<<14)+(I>>>17^I>>>19^I>>>10^I<<15^I<<13)+ee+U|0,ue=ee+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+883997877|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,he=(Ee>>>7^Ee>>>18^Ee>>>3^Ee<<25^Ee<<14)+(Z>>>17^Z>>>19^Z>>>10^Z<<15^Z<<13)+he+ke|0,ne=he+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+958139571|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,Ee=(J>>>7^J>>>18^J>>>3^J<<25^J<<14)+(ee>>>17^ee>>>19^ee>>>10^ee<<15^ee<<13)+Ee+ge|0,X=Ee+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+1322822218|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,J=(G>>>7^G>>>18^G>>>3^G<<25^G<<14)+(he>>>17^he>>>19^he>>>10^he<<15^he<<13)+J+le|0,W=J+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+1537002063|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,G=(ae>>>7^ae>>>18^ae>>>3^ae<<25^ae<<14)+(Ee>>>17^Ee>>>19^Ee>>>10^Ee<<15^Ee<<13)+G+B|0,F=G+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+1747873779|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,ae=(q>>>7^q>>>18^q>>>3^q<<25^q<<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&(we^fe))+1955562222|0,ne=ne+ce|0,ce=ce+(F&W^X&(F^W))+(F>>>2^F>>>13^F>>>22^F<<30^F<<19^F<<10)|0,q=(Pe>>>7^Pe>>>18^Pe>>>3^Pe<<25^Pe<<14)+(G>>>17^G>>>19^G>>>10^G<<15^G<<13)+q+Z|0,fe=q+fe+(ne>>>6^ne>>>11^ne>>>25^ne<<26^ne<<21^ne<<7)+(we^ne&(ue^we))+2024104815|0,X=X+fe|0,fe=fe+(ce&F^W&(ce^F))+(ce>>>2^ce>>>13^ce>>>22^ce<<30^ce<<19^ce<<10)|0,Pe=(me>>>7^me>>>18^me>>>3^me<<25^me<<14)+(ae>>>17^ae>>>19^ae>>>10^ae<<15^ae<<13)+Pe+ee|0,we=Pe+we+(X>>>6^X>>>11^X>>>25^X<<26^X<<21^X<<7)+(ue^X&(ne^ue))+2227730452|0,W=W+we|0,we=we+(fe&ce^F&(fe^ce))+(fe>>>2^fe>>>13^fe>>>22^fe<<30^fe<<19^fe<<10)|0,me=(U>>>7^U>>>18^U>>>3^U<<25^U<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+me+he|0,ue=me+ue+(W>>>6^W>>>11^W>>>25^W<<26^W<<21^W<<7)+(ne^W&(X^ne))+2361852424|0,F=F+ue|0,ue=ue+(we&fe^ce&(we^fe))+(we>>>2^we>>>13^we>>>22^we<<30^we<<19^we<<10)|0,U=(ke>>>7^ke>>>18^ke>>>3^ke<<25^ke<<14)+(Pe>>>17^Pe>>>19^Pe>>>10^Pe<<15^Pe<<13)+U+Ee|0,ne=U+ne+(F>>>6^F>>>11^F>>>25^F<<26^F<<21^F<<7)+(X^F&(W^X))+2428436474|0,ce=ce+ne|0,ne=ne+(ue&we^fe&(ue^we))+(ue>>>2^ue>>>13^ue>>>22^ue<<30^ue<<19^ue<<10)|0,ke=(ge>>>7^ge>>>18^ge>>>3^ge<<25^ge<<14)+(me>>>17^me>>>19^me>>>10^me<<15^me<<13)+ke+J|0,X=ke+X+(ce>>>6^ce>>>11^ce>>>25^ce<<26^ce<<21^ce<<7)+(W^ce&(F^W))+2756734187|0,fe=fe+X|0,X=X+(ne&ue^we&(ne^ue))+(ne>>>2^ne>>>13^ne>>>22^ne<<30^ne<<19^ne<<10)|0,ge=(le>>>7^le>>>18^le>>>3^le<<25^le<<14)+(U>>>17^U>>>19^U>>>10^U<<15^U<<13)+ge+G|0,W=ge+W+(fe>>>6^fe>>>11^fe>>>25^fe<<26^fe<<21^fe<<7)+(F^fe&(ce^F))+3204031479|0,we=we+W|0,W=W+(X&ne^ue&(X^ne))+(X>>>2^X>>>13^X>>>22^X<<30^X<<19^X<<10)|0,le=(B>>>7^B>>>18^B>>>3^B<<25^B<<14)+(ke>>>17^ke>>>19^ke>>>10^ke<<15^ke<<13)+le+ae|0,F=le+F+(we>>>6^we>>>11^we>>>25^we<<26^we<<21^we<<7)+(ce^we&(fe^ce))+3329325298|0,ue=ue+F|0,F=F+(W&X^ne&(W^X))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0,a=a+F|0,s=s+W|0,l=l+X|0,c=c+ne|0,h=h+ue|0,i=i+we|0,p=p+fe|0,d=d+ce|0}function Te(B){B=B|0,oe(j[B|0]<<24|j[B|1]<<16|j[B|2]<<8|j[B|3],j[B|4]<<24|j[B|5]<<16|j[B|6]<<8|j[B|7],j[B|8]<<24|j[B|9]<<16|j[B|10]<<8|j[B|11],j[B|12]<<24|j[B|13]<<16|j[B|14]<<8|j[B|15],j[B|16]<<24|j[B|17]<<16|j[B|18]<<8|j[B|19],j[B|20]<<24|j[B|21]<<16|j[B|22]<<8|j[B|23],j[B|24]<<24|j[B|25]<<16|j[B|26]<<8|j[B|27],j[B|28]<<24|j[B|29]<<16|j[B|30]<<8|j[B|31],j[B|32]<<24|j[B|33]<<16|j[B|34]<<8|j[B|35],j[B|36]<<24|j[B|37]<<16|j[B|38]<<8|j[B|39],j[B|40]<<24|j[B|41]<<16|j[B|42]<<8|j[B|43],j[B|44]<<24|j[B|45]<<16|j[B|46]<<8|j[B|47],j[B|48]<<24|j[B|49]<<16|j[B|50]<<8|j[B|51],j[B|52]<<24|j[B|53]<<16|j[B|54]<<8|j[B|55],j[B|56]<<24|j[B|57]<<16|j[B|58]<<8|j[B|59],j[B|60]<<24|j[B|61]<<16|j[B|62]<<8|j[B|63])}function pe(B){B=B|0,j[B|0]=a>>>24,j[B|1]=a>>>16&255,j[B|2]=a>>>8&255,j[B|3]=a&255,j[B|4]=s>>>24,j[B|5]=s>>>16&255,j[B|6]=s>>>8&255,j[B|7]=s&255,j[B|8]=l>>>24,j[B|9]=l>>>16&255,j[B|10]=l>>>8&255,j[B|11]=l&255,j[B|12]=c>>>24,j[B|13]=c>>>16&255,j[B|14]=c>>>8&255,j[B|15]=c&255,j[B|16]=h>>>24,j[B|17]=h>>>16&255,j[B|18]=h>>>8&255,j[B|19]=h&255,j[B|20]=i>>>24,j[B|21]=i>>>16&255,j[B|22]=i>>>8&255,j[B|23]=i&255,j[B|24]=p>>>24,j[B|25]=p>>>16&255,j[B|26]=p>>>8&255,j[B|27]=p&255,j[B|28]=d>>>24,j[B|29]=d>>>16&255,j[B|30]=d>>>8&255,j[B|31]=d&255}function ye(){a=1779033703,s=3144134277,l=1013904242,c=2773480762,h=1359893119,i=2600822924,p=528734635,d=1541459225,v=m=0}function de(B,I,Z,ee,he,Ee,J,G,ae,q){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,J=J|0,G=G|0,ae=ae|0,q=q|0,a=B,s=I,l=Z,c=ee,h=he,i=Ee,p=J,d=G,v=ae,m=q}function xe(B,I){B=B|0,I=I|0;var Z=0;if(B&63)return-1;for(;(I|0)>=64;)Te(B),B=B+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 Y(B,I,Z){B=B|0,I=I|0,Z=Z|0;var ee=0,he=0;if(B&63||~Z&&Z&31)return-1;if((I|0)>=64){if(ee=xe(B,I)|0,(ee|0)==-1)return-1;B=B+ee|0,I=I-ee|0}if(ee=ee+I|0,v=v+I|0,v>>>0>>0&&(m=m+1|0),j[B|I]=128,(I|0)>=56){for(he=I+1|0;(he|0)<64;he=he+1|0)j[B|he]=0;Te(B),I=0,j[B|0]=0}for(he=I+1|0;(he|0)<59;he=he+1|0)j[B|he]=0;return j[B|56]=m>>>21&255,j[B|57]=m>>>13&255,j[B|58]=m>>>5&255,j[B|59]=m<<3&255|v>>>29,j[B|60]=v>>>21&255,j[B|61]=v>>>13&255,j[B|62]=v>>>5&255,j[B|63]=v<<3&255,Te(B),~Z&&pe(Z),ee|0}function se(){a=_,s=y,l=b,c=E,h=D,i=x,p=C,d=k,v=64,m=0}function be(){a=w,s=T,l=M,c=A,h=R,i=H,p=L,d=V,v=64,m=0}function _e(B,I,Z,ee,he,Ee,J,G,ae,q,Pe,me,U,ke,ge,le){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0,Ee=Ee|0,J=J|0,G=G|0,ae=ae|0,q=q|0,Pe=Pe|0,me=me|0,U=U|0,ke=ke|0,ge=ge|0,le=le|0,ye(),oe(B^1549556828,I^1549556828,Z^1549556828,ee^1549556828,he^1549556828,Ee^1549556828,J^1549556828,G^1549556828,ae^1549556828,q^1549556828,Pe^1549556828,me^1549556828,U^1549556828,ke^1549556828,ge^1549556828,le^1549556828),w=a,T=s,M=l,A=c,R=h,H=i,L=p,V=d,ye(),oe(B^909522486,I^909522486,Z^909522486,ee^909522486,he^909522486,Ee^909522486,J^909522486,G^909522486,ae^909522486,q^909522486,Pe^909522486,me^909522486,U^909522486,ke^909522486,ge^909522486,le^909522486),_=a,y=s,b=l,E=c,D=h,x=i,C=p,k=d,v=64,m=0}function re(B,I,Z){B=B|0,I=I|0,Z=Z|0;var ee=0,he=0,Ee=0,J=0,G=0,ae=0,q=0,Pe=0,me=0;return B&63||~Z&&Z&31?-1:(me=Y(B,I,-1)|0,ee=a,he=s,Ee=l,J=c,G=h,ae=i,q=p,Pe=d,be(),oe(ee,he,Ee,J,G,ae,q,Pe,2147483648,0,0,0,0,0,0,768),~Z&&pe(Z),me|0)}function Q(B,I,Z,ee,he){B=B|0,I=I|0,Z=Z|0,ee=ee|0,he=he|0;var Ee=0,J=0,G=0,ae=0,q=0,Pe=0,me=0,U=0,ke=0,ge=0,le=0,F=0,W=0,X=0,ne=0,ue=0;if(B&63||~he&&he&31)return-1;for(j[B+I|0]=Z>>>24,j[B+I+1|0]=Z>>>16&255,j[B+I+2|0]=Z>>>8&255,j[B+I+3|0]=Z&255,re(B,I+4|0,-1)|0,Ee=ke=a,J=ge=s,G=le=l,ae=F=c,q=W=h,Pe=X=i,me=ne=p,U=ue=d,ee=ee-1|0;(ee|0)>0;)se(),oe(ke,ge,le,F,W,X,ne,ue,2147483648,0,0,0,0,0,0,768),ke=a,ge=s,le=l,F=c,W=h,X=i,ne=p,ue=d,be(),oe(ke,ge,le,F,W,X,ne,ue,2147483648,0,0,0,0,0,0,768),ke=a,ge=s,le=l,F=c,W=h,X=i,ne=p,ue=d,Ee=Ee^a,J=J^s,G=G^l,ae=ae^c,q=q^h,Pe=Pe^i,me=me^p,U=U^d,ee=ee-1|0;return a=Ee,s=J,l=G,c=ae,h=q,i=Pe,p=me,d=U,~he&&pe(he),0}return{reset:ye,init:de,process:xe,finish:Y,hmac_reset:se,hmac_init:_e,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&&(NE.push(this.heap),BE.push(this.asm)),this.heap=void 0,this.asm=void 0}static bytes(t){return new gg().process(t).finish().result}}gg.NAME="sha256";var _g=z8;function z8(e,t){if(!e)throw Error(t||"Assertion failed")}z8.equal=function(e,t,n){if(e!=t)throw Error(n||"Assertion failed: "+e+" != "+t)};var qq=pa!==void 0?pa:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function O1(e,t){return e(t={exports:{}},t.exports),t.exports}function oW(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var lW=O1(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}}),uW=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&a;s?n.push(s,l):n.push(l)}else for(r=0;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}var dW=function(e,t){for(var n="",r=0;r>>0}return s},hW=function(e,t){for(var n=Array(4*e.length),r=0,a=0;r>>24,n[a+1]=s>>>16&255,n[a+2]=s>>>8&255,n[a+3]=255&s):(n[a+3]=s>>>24,n[a+2]=s>>>16&255,n[a+1]=s>>>8&255,n[a]=255&s)}return n},Nn={inherits:lW,toArray:uW,toHex:cW,htonl:U8,toHex32:dW,zero2:V8,zero8:W8,join32:fW,split32:hW,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,a){return e+t+n+r+a>>>0},sum64:function(e,t,n,r){var a=e[t],s=r+e[t+1]>>>0,l=(s>>0,e[t+1]=s},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,a,s,l,c){var h=0,i=t;return h+=(i=i+r>>>0)>>0)>>0)>>0},sum64_4_lo:function(e,t,n,r,a,s,l,c){return t+r+s+c>>>0},sum64_5_hi:function(e,t,n,r,a,s,l,c,h,i){var p=0,d=t;return p+=(d=d+r>>>0)>>0)>>0)>>0)>>0},sum64_5_lo:function(e,t,n,r,a,s,l,c,h,i){return t+r+s+c+i>>>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 Iv(){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 pW=Iv;Iv.prototype.update=function(e,t){if(e=Nn.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=Nn.join32(e,0,e.length-n,this.endian);for(var r=0;r>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,s=8;s>>3},g1_256:function(e){return ds(e,17)^ds(e,19)^e>>>10}},La=Nn.sum32,mW=Nn.sum32_4,gW=Nn.sum32_5,_W=xc.ch32,yW=xc.maj32,bW=xc.s0_256,wW=xc.s1_256,CW=xc.g0_256,xW=xc.g1_256,Y8=T1.BlockHash,SW=[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 gs(){if(!(this instanceof gs))return new gs;Y8.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=SW,this.W=Array(64)}Nn.inherits(gs,Y8);var X8=gs;function qs(){if(!(this instanceof qs))return new qs;X8.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}gs.blockSize=512,gs.outSize=256,gs.hmacStrength=192,gs.padLength=64,gs.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r>>32-a,n)}function di(e,t,n,r,a,s,l){return bg(t&n|~t&r,e,t,a,s,l)}function fi(e,t,n,r,a,s,l){return bg(t&r|n&~r,e,t,a,s,l)}function hi(e,t,n,r,a,s,l){return bg(t^n^r,e,t,a,s,l)}function pi(e,t,n,r,a,s,l){return bg(n^(t|~r),e,t,a,s,l)}function JW(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 UE="0123456789abcdef".split("");function ZW(e){let t="",n=0;for(;n<4;n++)t+=UE[e>>8*n+4&15]+UE[e>>8*n&15];return t}function Lo(e,t){return e+t&4294967295}const ym=Ae.getWebCrypto(),bm=Ae.getNodeCrypto(),QW=bm&&bm.getHashes();function bl(e){if(bm&&QW.includes(e))return async function(t){const n=bm.createHash(e);return Cr(t,r=>{n.update(r)},()=>new Uint8Array(n.digest()))}}function Gp(e,t){return async function(n,r=Bt){if(Tr(n)&&(n=await Ar(n)),!Ae.isStream(n)&&ym&&t&&n.length>=r.minBytesForWebCrypto)return new Uint8Array(await ym.digest(t,n));const a=e();return Cr(n,s=>{a.update(s)},()=>new Uint8Array(a.digest()))}}function VE(e,t){return async function(n,r=Bt){if(Tr(n)&&(n=await Ar(n)),Ae.isStream(n)){const a=new e;return Cr(n,s=>{a.process(s)},()=>a.finish().result)}return ym&&t&&n.length>=r.minBytesForWebCrypto?new Uint8Array(await ym.digest(t,n)):e.bytes(n)}}const wl={md5:bl("md5")||async function(e){const t=function(n){const r=n.length,a=[1732584193,-271733879,-1732584194,271733878];let s;for(s=64;s<=n.length;s+=64)ay(a,JW(n.substring(s-64,s)));n=n.substring(s-64);const l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=0;s>2]|=n.charCodeAt(s)<<(s%4<<3);if(l[s>>2]|=128<<(s%4<<3),s>55)for(ay(a,l),s=0;s<16;s++)l[s]=0;return l[14]=8*r,ay(a,l),a}(Ae.uint8ArrayToString(e));return Ae.hexToUint8Array(function(n){for(let r=0;rnew Uint8Array(b.update(E)))}(e,t,n,r);if(s.substr(0,3)==="aes")return function(d,v,m,_,y){if(Ae.getWebCrypto()&&v.length!==24&&!Ae.isStream(m)&&m.length>=3e3*y.minBytesForWebCrypto)return async function(E,D,x,C){const k="AES-CBC",w=await WE.importKey("raw",D,{name:k},!1,["encrypt"]),{blockSize:T}=Ho(E),M=Ae.concatUint8Array([new Uint8Array(T),x]),A=new Uint8Array(await WE.encrypt({name:k,iv:C},w,M)).subarray(0,x.length);return function(R,H){for(let L=0;Lb.aes.AES_Encrypt_process(E),()=>b.aes.AES_Encrypt_finish())}(e,t,n,r,a);const l=new(Ho(e))(t),c=l.blockSize,h=r.slice();let i=new Uint8Array;const p=d=>{d&&(i=Ae.concatUint8Array([i,d]));const v=new Uint8Array(i.length);let m,_=0;for(;d?i.length>=c:i.length;){const y=l.encrypt(h);for(m=0;mnew Uint8Array(y.update(b)))}(e,t,n,r);if(a.substr(0,3)==="aes")return function(p,d,v,m){if(Ae.isStream(v)){const _=new tc(d,m);return Cr(v,y=>_.aes.AES_Decrypt_process(y),()=>_.aes.AES_Decrypt_finish())}return tc.decrypt(v,d,m)}(0,t,n,r);const s=new(Ho(e))(t),l=s.blockSize;let c=r,h=new Uint8Array;const i=p=>{p&&(h=Ae.concatUint8Array([h,p]));const d=new Uint8Array(h.length);let v,m=0;for(;p?h.length>=l:h.length;){const _=s.encrypt(c);for(c=h,v=0;v48)throw new ro("illegal counter size");let s=Math.pow(2,r)-1;a.set_mask(0,0,s/4294967296|0,0|s)}else r=48,a.set_mask(0,0,65535,4294967295);if(t===void 0)throw Error("nonce is required");{let s=t.length;if(!s||s>16)throw new ro("illegal nonce size");let l=new DataView(new ArrayBuffer(16));new Uint8Array(l.buffer).set(t),a.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 ro("illegal counter value");a.set_counter(0,0,n/4294967296|0,0|n)}}}class xm{static encrypt(t,n,r=!0,a){return new xm(n,a,r).encrypt(t)}static decrypt(t,n,r=!0,a){return new xm(n,a,r).decrypt(t)}constructor(t,n,r=!0,a){this.aes=a||new Mf(t,n,r,"CBC")}encrypt(t){return Qo(this.aes.AES_Encrypt_process(t),this.aes.AES_Encrypt_finish())}decrypt(t){return Qo(this.aes.AES_Decrypt_process(t),this.aes.AES_Decrypt_finish())}}const HE=Ae.getWebCrypto(),eH=Ae.getNodeCrypto(),Xs=16;function KE(e,t){const n=e.length-Xs;for(let r=0;r>3),17+(m>>3)),8-(7&m)).subarray(1),E=new Uint8Array(Ii),D=new Uint8Array(h.length+Do);let x,C=0;for(x=0;x16)throw new ro("illegal tagSize value");const h=n.length||0,i=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(An.MAC.GCM,An.HEAP_DATA,16),l.get_iv(An.HEAP_DATA),l.set_iv(0,0,0,0),i.set(c.subarray(0,16))):(i.set(n),i[15]=1);const p=new DataView(i.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>oy)throw new ro("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,a,s){return new Rl(n,r,a,s).encrypt(t)}static decrypt(t,n,r,a,s){return new Rl(n,r,a,s).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:a,heap:s}=this.aes.acquire_asm(),l=this.counter,c=this.aes.pos,h=this.aes.len,i=0,p=h+r&-16,d=0;if((l-1<<4)+h+r>oy)throw new RangeError("counter overflow");const v=new Uint8Array(p);for(;r>0;)d=Il(s,c+h,t,n,r),h+=d,n+=d,r-=d,d=a.cipher(An.ENC.CTR,An.HEAP_DATA+c,h),d=a.mac(An.MAC.GCM,An.HEAP_DATA+c,d),d&&v.set(s.subarray(c,c+d),i),l+=d>>>4,i+=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(An.MAC.GCM,An.HEAP_DATA,16),t.get_iv(An.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(An.ENC.CTR,An.HEAP_DATA,16),h.set(n.subarray(0,a),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:a,heap:s}=this.aes.acquire_asm(),l=this.counter,c=this.tagSize,h=this.aes.pos,i=this.aes.len,p=0,d=i+r>c?i+r-c&-16:0,v=i+r-d,m=0;if((l-1<<4)+i+r>oy)throw new RangeError("counter overflow");const _=new Uint8Array(d);for(;r>v;)m=Il(s,h+i,t,n,r-v),i+=m,n+=m,r-=m,m=a.mac(An.MAC.GCM,An.HEAP_DATA+h,m),m=a.cipher(An.DEC.CTR,An.HEAP_DATA+h,m),m&&_.set(s.subarray(h,h+m),p),l+=m>>>4,p+=m,h=0,i=0;return r>0&&(i+=Il(s,0,t,n,r)),this.counter=l,this.aes.pos=h,this.aes.len=i,_}AES_GCM_Decrypt_finish(){let{asm:t,heap:n}=this.aes.acquire_asm(),r=this.tagSize,a=this.adata,s=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(An.MAC.GCM,An.HEAP_DATA,16),t.get_iv(An.HEAP_DATA),t.set_counter(0,0,0,this.gamma0),t.cipher(An.ENC.CTR,An.HEAP_DATA,16);let _=0;for(let y=0;y0;){for(l=Il(r,0,t,a,s),a+=l,s-=l;15&l;)r[l++]=0;n.mac(An.MAC.GCM,An.HEAP_DATA,l)}}}const ly=Ae.getWebCrypto(),JE=Ae.getNodeCrypto(),ZE=Ae.getNodeBuffer(),Uu=16,uy="AES-GCM";async function Yu(e,t){if(e!==ve.symmetric.aes128&&e!==ve.symmetric.aes192&&e!==ve.symmetric.aes256)throw Error("GCM mode supports only AES cipher");if(Ae.getWebCrypto()&&t.length!==24){const n=await ly.importKey("raw",t,{name:uy},!1,["encrypt","decrypt"]);return{encrypt:async function(r,a,s=new Uint8Array){if(!r.length)return Rl.encrypt(r,t,a,s);const l=await ly.encrypt({name:uy,iv:a,additionalData:s,tagLength:8*Uu},n,r);return new Uint8Array(l)},decrypt:async function(r,a,s=new Uint8Array){if(r.length===Uu)return Rl.decrypt(r,t,a,s);const l=await ly.decrypt({name:uy,iv:a,additionalData:s,tagLength:8*Uu},n,r);return new Uint8Array(l)}}}return Ae.getNodeCrypto()?{encrypt:async function(n,r,a=new Uint8Array){const s=new JE.createCipheriv("aes-"+8*t.length+"-gcm",t,r);s.setAAD(a);const l=ZE.concat([s.update(n),s.final(),s.getAuthTag()]);return new Uint8Array(l)},decrypt:async function(n,r,a=new Uint8Array){const s=new JE.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);s.setAAD(a),s.setAuthTag(n.slice(n.length-Uu,n.length));const l=ZE.concat([s.update(n.slice(0,n.length-Uu)),s.final()]);return new Uint8Array(l)}}:{encrypt:async function(n,r,a){return Rl.encrypt(n,t,r,a)},decrypt:async function(n,r,a){return Rl.decrypt(n,t,r,a)}}}Yu.getNonce=function(e,t){const n=e.slice();for(let r=0;r>>8)-1}(re,Q,B,I,32)}function _(re,Q){var B;for(B=0;B<16;B++)re[B]=0|Q[B]}function y(re){var Q,B,I=1;for(Q=0;Q<16;Q++)B=re[Q]+I+65535,I=Math.floor(B/65536),re[Q]=B-65536*I;re[0]+=I-1+37*(I-1)}function b(re,Q,B){for(var I,Z=~(B-1),ee=0;ee<16;ee++)I=Z&(re[ee]^Q[ee]),re[ee]^=I,Q[ee]^=I}function E(re,Q){var B,I,Z,ee=n(),he=n();for(B=0;B<16;B++)he[B]=Q[B];for(y(he),y(he),y(he),I=0;I<2;I++){for(ee[0]=he[0]-65517,B=1;B<15;B++)ee[B]=he[B]-65535-(ee[B-1]>>16&1),ee[B-1]&=65535;ee[15]=he[15]-32767-(ee[14]>>16&1),Z=ee[15]>>16&1,ee[14]&=65535,b(he,ee,1-Z)}for(B=0;B<16;B++)re[2*B]=255&he[B],re[2*B+1]=he[B]>>8}function D(re,Q){var B=new Uint8Array(32),I=new Uint8Array(32);return E(B,re),E(I,Q),m(B,0,I,0)}function x(re){var Q=new Uint8Array(32);return E(Q,re),1&Q[0]}function C(re,Q){var B;for(B=0;B<16;B++)re[B]=Q[2*B]+(Q[2*B+1]<<8);re[15]&=32767}function k(re,Q,B){for(var I=0;I<16;I++)re[I]=Q[I]+B[I]}function w(re,Q,B){for(var I=0;I<16;I++)re[I]=Q[I]-B[I]}function T(re,Q,B){var I,Z,ee=0,he=0,Ee=0,J=0,G=0,ae=0,q=0,Pe=0,me=0,U=0,ke=0,ge=0,le=0,F=0,W=0,X=0,ne=0,ue=0,we=0,fe=0,ce=0,Ve=0,Je=0,_t=0,Tt=0,At=0,It=0,ht=0,Rt=0,Pt=0,hn=0,an=B[0],Jt=B[1],Yt=B[2],Qt=B[3],Xt=B[4],dn=B[5],tn=B[6],rt=B[7],at=B[8],xt=B[9],Vt=B[10],Oe=B[11],Be=B[12],Fe=B[13],Le=B[14],tt=B[15];ee+=(I=Q[0])*an,he+=I*Jt,Ee+=I*Yt,J+=I*Qt,G+=I*Xt,ae+=I*dn,q+=I*tn,Pe+=I*rt,me+=I*at,U+=I*xt,ke+=I*Vt,ge+=I*Oe,le+=I*Be,F+=I*Fe,W+=I*Le,X+=I*tt,he+=(I=Q[1])*an,Ee+=I*Jt,J+=I*Yt,G+=I*Qt,ae+=I*Xt,q+=I*dn,Pe+=I*tn,me+=I*rt,U+=I*at,ke+=I*xt,ge+=I*Vt,le+=I*Oe,F+=I*Be,W+=I*Fe,X+=I*Le,ne+=I*tt,Ee+=(I=Q[2])*an,J+=I*Jt,G+=I*Yt,ae+=I*Qt,q+=I*Xt,Pe+=I*dn,me+=I*tn,U+=I*rt,ke+=I*at,ge+=I*xt,le+=I*Vt,F+=I*Oe,W+=I*Be,X+=I*Fe,ne+=I*Le,ue+=I*tt,J+=(I=Q[3])*an,G+=I*Jt,ae+=I*Yt,q+=I*Qt,Pe+=I*Xt,me+=I*dn,U+=I*tn,ke+=I*rt,ge+=I*at,le+=I*xt,F+=I*Vt,W+=I*Oe,X+=I*Be,ne+=I*Fe,ue+=I*Le,we+=I*tt,G+=(I=Q[4])*an,ae+=I*Jt,q+=I*Yt,Pe+=I*Qt,me+=I*Xt,U+=I*dn,ke+=I*tn,ge+=I*rt,le+=I*at,F+=I*xt,W+=I*Vt,X+=I*Oe,ne+=I*Be,ue+=I*Fe,we+=I*Le,fe+=I*tt,ae+=(I=Q[5])*an,q+=I*Jt,Pe+=I*Yt,me+=I*Qt,U+=I*Xt,ke+=I*dn,ge+=I*tn,le+=I*rt,F+=I*at,W+=I*xt,X+=I*Vt,ne+=I*Oe,ue+=I*Be,we+=I*Fe,fe+=I*Le,ce+=I*tt,q+=(I=Q[6])*an,Pe+=I*Jt,me+=I*Yt,U+=I*Qt,ke+=I*Xt,ge+=I*dn,le+=I*tn,F+=I*rt,W+=I*at,X+=I*xt,ne+=I*Vt,ue+=I*Oe,we+=I*Be,fe+=I*Fe,ce+=I*Le,Ve+=I*tt,Pe+=(I=Q[7])*an,me+=I*Jt,U+=I*Yt,ke+=I*Qt,ge+=I*Xt,le+=I*dn,F+=I*tn,W+=I*rt,X+=I*at,ne+=I*xt,ue+=I*Vt,we+=I*Oe,fe+=I*Be,ce+=I*Fe,Ve+=I*Le,Je+=I*tt,me+=(I=Q[8])*an,U+=I*Jt,ke+=I*Yt,ge+=I*Qt,le+=I*Xt,F+=I*dn,W+=I*tn,X+=I*rt,ne+=I*at,ue+=I*xt,we+=I*Vt,fe+=I*Oe,ce+=I*Be,Ve+=I*Fe,Je+=I*Le,_t+=I*tt,U+=(I=Q[9])*an,ke+=I*Jt,ge+=I*Yt,le+=I*Qt,F+=I*Xt,W+=I*dn,X+=I*tn,ne+=I*rt,ue+=I*at,we+=I*xt,fe+=I*Vt,ce+=I*Oe,Ve+=I*Be,Je+=I*Fe,_t+=I*Le,Tt+=I*tt,ke+=(I=Q[10])*an,ge+=I*Jt,le+=I*Yt,F+=I*Qt,W+=I*Xt,X+=I*dn,ne+=I*tn,ue+=I*rt,we+=I*at,fe+=I*xt,ce+=I*Vt,Ve+=I*Oe,Je+=I*Be,_t+=I*Fe,Tt+=I*Le,At+=I*tt,ge+=(I=Q[11])*an,le+=I*Jt,F+=I*Yt,W+=I*Qt,X+=I*Xt,ne+=I*dn,ue+=I*tn,we+=I*rt,fe+=I*at,ce+=I*xt,Ve+=I*Vt,Je+=I*Oe,_t+=I*Be,Tt+=I*Fe,At+=I*Le,It+=I*tt,le+=(I=Q[12])*an,F+=I*Jt,W+=I*Yt,X+=I*Qt,ne+=I*Xt,ue+=I*dn,we+=I*tn,fe+=I*rt,ce+=I*at,Ve+=I*xt,Je+=I*Vt,_t+=I*Oe,Tt+=I*Be,At+=I*Fe,It+=I*Le,ht+=I*tt,F+=(I=Q[13])*an,W+=I*Jt,X+=I*Yt,ne+=I*Qt,ue+=I*Xt,we+=I*dn,fe+=I*tn,ce+=I*rt,Ve+=I*at,Je+=I*xt,_t+=I*Vt,Tt+=I*Oe,At+=I*Be,It+=I*Fe,ht+=I*Le,Rt+=I*tt,W+=(I=Q[14])*an,X+=I*Jt,ne+=I*Yt,ue+=I*Qt,we+=I*Xt,fe+=I*dn,ce+=I*tn,Ve+=I*rt,Je+=I*at,_t+=I*xt,Tt+=I*Vt,At+=I*Oe,It+=I*Be,ht+=I*Fe,Rt+=I*Le,Pt+=I*tt,X+=(I=Q[15])*an,he+=38*(ue+=I*Yt),Ee+=38*(we+=I*Qt),J+=38*(fe+=I*Xt),G+=38*(ce+=I*dn),ae+=38*(Ve+=I*tn),q+=38*(Je+=I*rt),Pe+=38*(_t+=I*at),me+=38*(Tt+=I*xt),U+=38*(At+=I*Vt),ke+=38*(It+=I*Oe),ge+=38*(ht+=I*Be),le+=38*(Rt+=I*Fe),F+=38*(Pt+=I*Le),W+=38*(hn+=I*tt),ee=(I=(ee+=38*(ne+=I*Jt))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),he=(I=he+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)),G=(I=G+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=q+Z+65535)-65536*(Z=Math.floor(I/65536)),Pe=(I=Pe+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),U=(I=U+Z+65535)-65536*(Z=Math.floor(I/65536)),ke=(I=ke+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)),F=(I=F+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),X=(I=X+Z+65535)-65536*(Z=Math.floor(I/65536)),ee=(I=(ee+=Z-1+37*(Z-1))+(Z=1)+65535)-65536*(Z=Math.floor(I/65536)),he=(I=he+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)),G=(I=G+Z+65535)-65536*(Z=Math.floor(I/65536)),ae=(I=ae+Z+65535)-65536*(Z=Math.floor(I/65536)),q=(I=q+Z+65535)-65536*(Z=Math.floor(I/65536)),Pe=(I=Pe+Z+65535)-65536*(Z=Math.floor(I/65536)),me=(I=me+Z+65535)-65536*(Z=Math.floor(I/65536)),U=(I=U+Z+65535)-65536*(Z=Math.floor(I/65536)),ke=(I=ke+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)),F=(I=F+Z+65535)-65536*(Z=Math.floor(I/65536)),W=(I=W+Z+65535)-65536*(Z=Math.floor(I/65536)),X=(I=X+Z+65535)-65536*(Z=Math.floor(I/65536)),ee+=Z-1+37*(Z-1),re[0]=ee,re[1]=he,re[2]=Ee,re[3]=J,re[4]=G,re[5]=ae,re[6]=q,re[7]=Pe,re[8]=me,re[9]=U,re[10]=ke,re[11]=ge,re[12]=le,re[13]=F,re[14]=W,re[15]=X}function M(re,Q){T(re,Q,Q)}function A(re,Q){var B,I=n();for(B=0;B<16;B++)I[B]=Q[B];for(B=253;B>=0;B--)M(I,I),B!==2&&B!==4&&T(I,I,Q);for(B=0;B<16;B++)re[B]=I[B]}function R(re,Q,B){var I,Z,ee=new Uint8Array(32),he=new Float64Array(80),Ee=n(),J=n(),G=n(),ae=n(),q=n(),Pe=n();for(Z=0;Z<31;Z++)ee[Z]=Q[Z];for(ee[31]=127&Q[31]|64,ee[0]&=248,C(he,B),Z=0;Z<16;Z++)J[Z]=he[Z],ae[Z]=Ee[Z]=G[Z]=0;for(Ee[0]=ae[0]=1,Z=254;Z>=0;--Z)b(Ee,J,I=ee[Z>>>3]>>>(7&Z)&1),b(G,ae,I),k(q,Ee,G),w(Ee,Ee,G),k(G,J,ae),w(J,J,ae),M(ae,q),M(Pe,Ee),T(Ee,G,Ee),T(G,J,q),k(q,Ee,G),w(Ee,Ee,G),M(J,Ee),w(G,ae,Pe),T(Ee,G,c),k(Ee,Ee,ae),T(G,G,Ee),T(Ee,ae,Pe),T(ae,J,he),M(J,q),b(Ee,J,I),b(G,ae,I);for(Z=0;Z<16;Z++)he[Z+16]=Ee[Z],he[Z+32]=G[Z],he[Z+48]=J[Z],he[Z+64]=ae[Z];var me=he.subarray(32),U=he.subarray(16);return A(me,me),T(U,U,me),E(re,U),0}function H(re,Q){return R(re,Q,a)}function L(re,Q){var B=n(),I=n(),Z=n(),ee=n(),he=n(),Ee=n(),J=n(),G=n(),ae=n();w(B,re[1],re[0]),w(ae,Q[1],Q[0]),T(B,B,ae),k(I,re[0],re[1]),k(ae,Q[0],Q[1]),T(I,I,ae),T(Z,re[3],Q[3]),T(Z,Z,i),T(ee,re[2],Q[2]),k(ee,ee,ee),w(he,I,B),w(Ee,ee,Z),k(J,ee,Z),k(G,I,B),T(re[0],he,Ee),T(re[1],G,J),T(re[2],J,Ee),T(re[3],he,G)}function V(re,Q,B){var I;for(I=0;I<4;I++)b(re[I],Q[I],B)}function j(re,Q){var B=n(),I=n(),Z=n();A(Z,Q[2]),T(B,Q[0],Z),T(I,Q[1],Z),E(re,I),re[31]^=x(B)<<7}function oe(re,Q,B){var I,Z;for(_(re[0],s),_(re[1],l),_(re[2],l),_(re[3],s),Z=255;Z>=0;--Z)V(re,Q,I=B[Z/8|0]>>(7&Z)&1),L(Q,re),L(re,re),V(re,Q,I)}function Te(re,Q){var B=[n(),n(),n(),n()];_(B[0],p),_(B[1],d),_(B[2],l),T(B[3],p,d),oe(re,B,Q)}function pe(re,Q,B){var I,Z,ee=[n(),n(),n(),n()];for(B||r(Q,32),(I=t.hash(Q.subarray(0,32)))[0]&=248,I[31]&=127,I[31]|=64,Te(ee,I),j(re,ee),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 B,I,Z,ee;for(I=63;I>=32;--I){for(B=0,Z=I-32,ee=I-12;Z>4)*ye[Z],B=Q[Z]>>8,Q[Z]&=255;for(Z=0;Z<32;Z++)Q[Z]-=B*ye[Z];for(I=0;I<32;I++)Q[I+1]+=Q[I]>>8,re[I]=255&Q[I]}function xe(re){var Q,B=new Float64Array(64);for(Q=0;Q<64;Q++)B[Q]=re[Q];for(Q=0;Q<64;Q++)re[Q]=0;de(re,B)}function Y(re,Q){var B=n(),I=n(),Z=n(),ee=n(),he=n(),Ee=n(),J=n();return _(re[2],l),C(re[1],Q),M(Z,re[1]),T(ee,Z,h),w(Z,Z,re[2]),k(ee,re[2],ee),M(he,ee),M(Ee,he),T(J,Ee,he),T(B,J,Z),T(B,B,ee),function(G,ae){var q,Pe=n();for(q=0;q<16;q++)Pe[q]=ae[q];for(q=250;q>=0;q--)M(Pe,Pe),q!==1&&T(Pe,Pe,ae);for(q=0;q<16;q++)G[q]=Pe[q]}(B,B),T(B,B,Z),T(B,B,ee),T(B,B,ee),T(re[0],B,ee),M(I,re[0]),T(I,I,ee),D(I,Z)&&T(re[0],re[0],v),M(I,re[0]),T(I,I,ee),D(I,Z)?-1:(x(re[0])===Q[31]>>7&&w(re[0],s,re[0]),T(re[3],re[0],re[1]),0)}var se=64;function be(){for(var re=0;re=0},t.sign.keyPair=function(){var re=new Uint8Array(32),Q=new Uint8Array(64);return pe(re,Q),{publicKey:re,secretKey:Q}},t.sign.keyPair.fromSecretKey=function(re){if(be(re),re.length!==64)throw Error("bad secret key size");for(var Q=new Uint8Array(32),B=0;Be&&(h.imod(s.leftShift(a)).iadd(s),i=h.mod(l).toNumber());while(!await rO(h,t,n));return h}async function rO(e,t,n){return!(t&&!e.dec().gcd(t).isOne())&&!!await async function(r){const a=await Ae.getBigInteger();return uH.every(s=>r.mod(new a(s))!==0)}(e)&&!!await async function(r,a){const s=await Ae.getBigInteger();return a=a||new s(2),a.modExp(r.dec(),r).isOne()}(e)&&!!await async function(r,a,s){const l=await Ae.getBigInteger(),c=r.bitLength();a||(a=Math.max(1,c/48|0));const h=r.dec();let i=0;for(;!h.getBit(i);)i++;const p=r.rightShift(new l(i));for(;a>0;a--){let d,v=(s?s():await co(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(s){const l=new Uint8Array(s);let c=0;for(;c=8&!r;if(t)return Ae.selectUint8Array(l,s,t);if(l)return s;throw Error("Decryption error")}async function U0(e,t,n){let r;if(t.length!==cc.getHashByteLength(e))throw Error("Invalid hash length");const a=new Uint8Array(vs[e].length);for(r=0;rimport("./bn.min.28405fbe.js"),[]),D=new E(_),x=new E(y),C=new E(m),k=C.mod(x.subn(1)),w=C.mod(D.subn(1)),T=gi.createSign(ve.read(ve.hash,i));T.write(p),T.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:k,exponent2:w,coefficient:new E(b)};if(gi.createPrivateKey!==void 0){const R=$u.encode(M,"der");return new Uint8Array(T.sign({key:R,format:"der",type:"pkcs1"}))}const A=$u.encode(M,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(T.sign(A))}(e,t,n,r,a,s,l,c)}return async function(i,p,d,v){const m=await Ae.getBigInteger();p=new m(p);const _=new m(await U0(i,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,a,h)},verify:async function(e,t,n,r,a,s){if(t&&!Ae.isStream(t)){if(Ae.getWebCrypto())try{return await async function(l,c,h,i,p){const d=function(m,_){return{kty:"RSA",n:ua(m,!0),e:ua(_,!0),ext:!0}}(i,p),v=await Iu.importKey("jwk",d,{name:"RSASSA-PKCS1-v1_5",hash:{name:l}},!1,["verify"]);return Iu.verify("RSASSA-PKCS1-v1_5",v,h,c)}(ve.read(ve.webHash,e),t,n,r,a)}catch(l){Ae.printDebugError(l)}else if(Ae.getNodeCrypto())return async function(l,c,h,i,p){const{default:d}=await kn(()=>import("./bn.min.28405fbe.js"),[]),v=gi.createVerify(ve.read(ve.hash,l));v.write(c),v.end();const m={modulus:new d(i),publicExponent:new d(p)};let _;gi.createPrivateKey!==void 0?_={key:Zp.encode(m,"der"),format:"der",type:"pkcs1"}:_=Zp.encode(m,"pem",{label:"RSA PUBLIC KEY"});try{return await v.verify(_,h)}catch{return!1}}(e,t,n,r,a)}return async function(l,c,h,i,p){const d=await Ae.getBigInteger();if(h=new d(h),c=new d(c),i=new d(i),c.gte(h))throw Error("Signature size cannot exceed modulus size");const v=c.modExp(i,h).toUint8Array("be",h.byteLength()),m=await U0(l,p,h.byteLength());return Ae.equalsUint8Array(v,m)}(e,n,r,a,s)},encrypt:async function(e,t,n){return Ae.getNodeCrypto()?async function(r,a,s){const{default:l}=await kn(()=>import("./bn.min.28405fbe.js"),[]),c={modulus:new l(a),publicExponent:new l(s)};let h;return gi.createPrivateKey!==void 0?h={key:Zp.encode(c,"der"),format:"der",type:"pkcs1",padding:gi.constants.RSA_PKCS1_PADDING}:h={key:Zp.encode(c,"pem",{label:"RSA PUBLIC KEY"}),padding:gi.constants.RSA_PKCS1_PADDING},new Uint8Array(gi.publicEncrypt(h,r))}(e,t,n):async function(r,a,s){const l=await Ae.getBigInteger();if(a=new l(a),r=new l(P1(r,a.byteLength())),s=new l(s),r.gte(a))throw Error("Message size cannot exceed modulus size");return r.modExp(s,a).toUint8Array("be",a.byteLength())}(e,t,n)},decrypt:async function(e,t,n,r,a,s,l,c){return Ae.getNodeCrypto()?async function(h,i,p,d,v,m,_,y){const{default:b}=await kn(()=>import("./bn.min.28405fbe.js"),[]),E=new b(v),D=new b(m),x=new b(d),C=x.mod(D.subn(1)),k=x.mod(E.subn(1)),w={version:0,modulus:new b(i),publicExponent:new b(p),privateExponent:new b(d),prime1:new b(m),prime2:new b(v),exponent1:C,exponent2:k,coefficient:new b(_)};let T;gi.createPrivateKey!==void 0?T={key:$u.encode(w,"der"),format:"der",type:"pkcs1",padding:gi.constants.RSA_PKCS1_PADDING}:T={key:$u.encode(w,"pem",{label:"RSA PRIVATE KEY"}),padding:gi.constants.RSA_PKCS1_PADDING};try{return new Uint8Array(gi.privateDecrypt(T,h))}catch{if(y)return y;throw Error("Decryption error")}}(e,t,n,r,a,s,l,c):async function(h,i,p,d,v,m,_,y){const b=await Ae.getBigInteger();if(h=new b(h),i=new b(i),p=new b(p),d=new b(d),v=new b(v),m=new b(m),_=new b(_),h.gte(i))throw Error("Data too large.");const E=d.mod(m.dec()),D=d.mod(v.dec()),x=(await co(new b(2),i)).mod(i),C=x.modInv(i).modExp(p,i);h=h.mul(C).mod(i);const k=h.modExp(D,v),w=h.modExp(E,m);let M=_.mul(w.sub(k)).mod(m).mul(v).add(k);return M=M.mul(x).mod(i),A1(M.toUint8Array("be",i.byteLength()),y)}(e,t,n,r,a,s,l,c)},generate:async function(e,t){if(t=new(await Ae.getBigInteger())(t),Ae.getWebCrypto()){const l={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:t.toUint8Array(),hash:{name:"SHA-1"}},c=await Iu.generateKey(l,!0,["sign","verify"]),h=await Iu.exportKey("jwk",c.privateKey);return{n:Qs(h.n),e:t.toUint8Array(),d:Qs(h.d),p:Qs(h.q),q:Qs(h.p),u:Qs(h.qi)}}if(Ae.getNodeCrypto()&&gi.generateKeyPair&&$u){const l={modulusLength:e,publicExponent:t.toNumber(),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},c=await new Promise((h,i)=>{gi.generateKeyPair("rsa",l,(p,d,v)=>{p?i(p):h($u.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,a;do r=await qE(e-(e>>1),t,40),n=await qE(e>>1,t,40),a=n.mul(r);while(a.bitLength()!==e);const s=n.dec().imul(r.dec());return r.lt(n)&&([n,r]=[r,n]),{n:a.toUint8Array(),e:t.toUint8Array(),d:t.modInv(s).toUint8Array(),p:n.toUint8Array(),q:r.toUint8Array(),u:n.modInv(r).toUint8Array()}},validateParams:async function(e,t,n,r,a,s){const l=await Ae.getBigInteger();if(e=new l(e),r=new l(r),a=new l(a),!r.mul(a).equal(e))return!1;const c=new l(2);if(s=new l(s),!r.mul(s).mod(a).isOne())return!1;t=new l(t),n=new l(n);const h=new l(Math.floor(e.bitLength()/3)),i=await co(c,c.leftShift(h)),p=i.mul(n).mul(t);return!(!p.mod(r.dec()).equal(i)||!p.mod(a.dec()).equal(i))}}),fH=Object.freeze({__proto__:null,encrypt:async function(e,t,n,r){const a=await Ae.getBigInteger();t=new a(t),n=new a(n),r=new a(r);const s=new a(P1(e,t.byteLength())),l=await co(new a(1),t.dec());return{c1:n.modExp(l,t).toUint8Array(),c2:r.modExp(l,t).imul(s).imod(t).toUint8Array()}},decrypt:async function(e,t,n,r,a){const s=await Ae.getBigInteger();return e=new s(e),t=new s(t),n=new s(n),r=new s(r),A1(e.modExp(r,n).modInv(n).imul(t).imod(n).toUint8Array("be",n.byteLength()),a)},validateParams:async function(e,t,n,r){const a=await Ae.getBigInteger();e=new a(e),t=new a(t),n=new a(n);const s=new a(1);if(t.lte(s)||t.gte(e))return!1;const l=new a(e.bitLength()),c=new a(1023);if(l.lt(c)||!t.modExp(e.dec(),e).isOne())return!1;let h=t;const i=new a(1),p=new a(2).leftShift(new a(17));for(;i.lt(p);){if(h=h.mul(t).imod(e),h.isOne())return!1;i.iinc()}r=new a(r);const d=new a(2),v=await co(d.leftShift(l.dec()),d.leftShift(l)),m=e.dec().imul(v).iadd(r);return!!n.equal(t.modExp(m,e))}});class ys{constructor(t){if(t instanceof ys)this.oid=t.oid;else if(Ae.isArray(t)||Ae.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 Ae.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])}toHex(){return Ae.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 wg(e,t){return e.keyPair({priv:t})}function Cg(e,t){const n=e.keyPair({pub:t});if(n.validate().result!==!0)throw Error("Invalid elliptic public key");return n}async function Sc(e){if(!Bt.useIndutnyElliptic)throw Error("This curve is only supported in the full build of OpenPGP.js");const{default:t}=await kn(()=>import("./elliptic.min.02bc75af.js"),["js/build/elliptic.min.02bc75af.js","js/build/bn.min.28405fbe.js"]);return new t.ec(e)}function aO(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=Ae.readNumber(e.subarray(1,5)),t=5),{len:n,offset:t}}function $f(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):Ae.concatUint8Array([new Uint8Array([255]),Ae.writeNumber(e,4)])}function hH(e){if(e<0||e>30)throw Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])}function sO(e){return new Uint8Array([192|e])}function e4(e,t){return Ae.concatUint8Array([sO(e),$f(t)])}function $v(e){return[ve.packet.literalData,ve.packet.compressedData,ve.packet.symmetricallyEncryptedData,ve.packet.symEncryptedIntegrityProtectedData,ve.packet.aeadEncryptedData].includes(e)}async function pH(e,t){const n=Bs(e);let r,a;try{const s=await n.peekBytes(2);if(!s||s.length<2||(128&s[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,i=-1,p=-1;p=0,(64&l)!=0&&(p=1),p?i=63&l:(i=(63&l)>>2,h=3&l);const d=$v(i);let v,m=null;if(d){if(Ae.isStream(e)==="array"){const y=new Ds;r=ta(y),m=y}else{const y=new uc;r=ta(y.writable),m=y.readable}a=t({tag:i,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 D=c===1/0?E:E.subarray(0,c-y);if(r?await r.write(D):m.push(D),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=Ae.concatUint8Array(m),await t({tag:i,packet:m})),!_||!_.length}catch(s){if(r)return await r.abort(s),!0;throw s}finally{r&&await a,n.releaseLock()}}class jr extends Error{constructor(...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,jr),this.name="UnsupportedError"}}class V0{constructor(t,n){this.tag=t,this.rawContent=n}write(){return this.rawContent}}const cy=Ae.getWebCrypto(),Sm=Ae.getNodeCrypto(),Is={p256:"P-256",p384:"P-384",p521:"P-521"},Ks=Sm?Sm.getCurves():[],Oo=Sm?{secp256k1:Ks.includes("secp256k1")?"secp256k1":void 0,p256:Ks.includes("prime256v1")?"prime256v1":void 0,p384:Ks.includes("secp384r1")?"secp384r1":void 0,p521:Ks.includes("secp521r1")?"secp521r1":void 0,ed25519:Ks.includes("ED25519")?"ED25519":void 0,curve25519:Ks.includes("X25519")?"X25519":void 0,brainpoolP256r1:Ks.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:Ks.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:Ks.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},Rv={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:Oo.p256,web:Is.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:Oo.p384,web:Is.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:Oo.p521,web:Is.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:Oo.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:Oo.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:Oo.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:Oo.brainpoolP512r1,payloadSize:64}};class fo{constructor(t,n){try{(Ae.isArray(t)||Ae.isUint8Array(t))&&(t=new ys(t)),t instanceof ys&&(t=t.getName()),this.name=ve.write(ve.curve,t)}catch{throw new jr("Unknown curve")}n=n||Rv[this.name],this.keyType=n.keyType,this.oid=n.oid,this.hash=n.hash,this.cipher=n.cipher,this.node=n.node&&Rv[this.name],this.web=n.web&&Rv[this.name],this.payloadSize=n.payloadSize,this.web&&Ae.getWebCrypto()?this.type="web":this.node&&Ae.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 a=await cy.generateKey({name:"ECDSA",namedCurve:Is[r]},!0,["sign","verify"]),s=await cy.exportKey("jwk",a.privateKey),l=await cy.exportKey("jwk",a.publicKey);return{publicKey:lO(l),privateKey:Qs(s.d)}}(this.name)}catch(r){Ae.printDebugError("Browser did not support generating ec key "+r.message);break}case"node":return async function(r){const a=Sm.createECDH(Oo[r]);return await a.generateKeys(),{publicKey:new Uint8Array(a.getPublicKey()),privateKey:new Uint8Array(a.getPrivateKey())}}(this.name);case"curve25519":{const r=Ms(32);r[0]=127&r[0]|64,r[31]&=248;const a=r.slice().reverse();return t=As.box.keyPair.fromSecretKey(a),{publicKey:Ae.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:r}}case"ed25519":{const r=Ms(32),a=As.sign.keyPair.fromSeed(r);return{publicKey:Ae.concatUint8Array([new Uint8Array([64]),a.publicKey]),privateKey:r}}}return t=await(await Sc(this.name)).genKeyPair({entropy:Ae.uint8ArrayToString(Ms(32))}),{publicKey:new Uint8Array(t.getPublic("array",!1)),privateKey:t.getPrivate().toArrayLike(Uint8Array)}}}async function oO(e,t,n,r){const a={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===ve.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},s=t.getName();if(!a[s])return!1;if(s==="curve25519"){r=r.slice().reverse();const{publicKey:c}=As.box.keyPair.fromSecretKey(r);n=new Uint8Array(n);const h=new Uint8Array([64,...c]);return!!Ae.equalsUint8Array(h,n)}const l=await Sc(s);try{n=Cg(l,n).getPublic()}catch{return!1}return!!wg(l,r).getPublic().eq(n)}function lO(e){const t=Qs(e.x),n=Qs(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 xg(e,t,n){const r=e,a=n.slice(1,r+1),s=n.slice(r+1,2*r+1);return{kty:"EC",crv:t,x:ua(a,!0),y:ua(s,!0),ext:!0}}function uO(e,t,n,r){const a=xg(e,t,n);return a.d=ua(r,!0),a}const Em=Ae.getWebCrypto(),Ec=Ae.getNodeCrypto();async function t4(e,t,n,r,a,s){const l=new fo(e);if(n&&!Ae.isStream(n)){const c={publicKey:r,privateKey:a};switch(l.type){case"web":try{return await async function(h,i,p,d){const v=h.payloadSize,m=uO(h.payloadSize,Is[h.name],d.publicKey,d.privateKey),_=await Em.importKey("jwk",m,{name:"ECDSA",namedCurve:Is[h.name],hash:{name:ve.read(ve.webHash,h.hash)}},!1,["sign"]),y=new Uint8Array(await Em.sign({name:"ECDSA",namedCurve:Is[h.name],hash:{name:ve.read(ve.webHash,i)}},_,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;Ae.printDebugError("Browser did not support signing: "+h.message)}break;case"node":{const h=await async function(i,p,d,v){const m=Ec.createSign(ve.read(ve.hash,p));m.write(d),m.end();const _=vH.encode({version:1,parameters:i.oid,privateKey:Array.from(v.privateKey),publicKey:{unused:0,data:Array.from(v.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return cO.decode(m.sign(_),"der")}(l,t,n,c);return{r:h.r.toArrayLike(Uint8Array),s:h.s.toArrayLike(Uint8Array)}}}}return async function(c,h,i){const p=await Sc(c.name),d=wg(p,i),v=d.sign(h);return{r:v.r.toArrayLike(Uint8Array),s:v.s.toArrayLike(Uint8Array)}}(l,s,a)}async function n4(e,t,n,r,a,s){const l=new fo(e);if(r&&!Ae.isStream(r))switch(l.type){case"web":try{return await async function(c,h,{r:i,s:p},d,v){const m=xg(c.payloadSize,Is[c.name],v),_=await Em.importKey("jwk",m,{name:"ECDSA",namedCurve:Is[c.name],hash:{name:ve.read(ve.webHash,c.hash)}},!1,["verify"]),y=Ae.concatUint8Array([i,p]).buffer;return Em.verify({name:"ECDSA",namedCurve:Is[c.name],hash:{name:ve.read(ve.webHash,h)}},_,y,d)}(l,t,n,r,a)}catch(c){if(l.name!=="p521"&&(c.name==="DataError"||c.name==="OperationError"))throw c;Ae.printDebugError("Browser did not support verifying: "+c.message)}break;case"node":return async function(c,h,{r:i,s:p},d,v){const{default:m}=await kn(()=>import("./bn.min.28405fbe.js"),[]),_=Ec.createVerify(ve.read(ve.hash,h));_.write(d),_.end();const y=gH.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:c.oid},subjectPublicKey:{unused:0,data:Array.from(v)}},"pem",{label:"PUBLIC KEY"}),b=cO.encode({r:new m(i),s:new m(p)},"der");try{return _.verify(y,b)}catch{return!1}}(l,t,n,r,a)}return async function(c,h,i,p){const d=await Sc(c.name);return Cg(d,p).verify(i,h)}(l,n,t===void 0?r:s,a)}const Sg=void 0,cO=Ec?Sg.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,vH=Ec?Sg.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,mH=Ec?Sg.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,gH=Ec?Sg.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(mH),this.key("subjectPublicKey").bitstr())}):void 0;var _H=Object.freeze({__proto__:null,sign:t4,verify:n4,validateParams:async function(e,t,n){const r=new fo(e);if(r.keyType!==ve.publicKey.ecdsa)return!1;switch(r.type){case"web":case"node":{const a=Ms(8),s=ve.hash.sha256,l=await cc.digest(s,a);try{const c=await t4(e,s,a,t,n,l);return await n4(e,s,c,a,t,l)}catch{return!1}}default:return oO(ve.publicKey.ecdsa,e,t,n)}}});As.hash=e=>new Uint8Array(yg().update(e).digest());var yH=Object.freeze({__proto__:null,sign:async function(e,t,n,r,a,s){if(cc.getHashByteLength(t)=0;--p)for(let d=c-1;d>=0;--d)h[1]=c*p+(d+1),i[0]=s[0]^h[0],i[1]=s[1]^h[1],i[2]=l[2*d],i[3]=l[2*d+1],i=km(n.decrypt(Dm(i))),s=i.subarray(0,2),l[2*d]=i[2],l[2*d+1]=i[3];if(s[0]===r[0]&&s[1]===r[1])return Dm(l);throw Error("Key Data Integrity failed")}function km(e){const{length:t}=e,n=function(s){if(Ae.isString(s)){const{length:l}=s,c=new ArrayBuffer(l),h=new Uint8Array(c);for(let i=0;i0){const n=e[t-1];if(n>=1){const r=e.subarray(t-n),a=new Uint8Array(n).fill(n);if(Ae.equalsUint8Array(r,a))return e.subarray(0,t-n)}}throw Error("Invalid padding")}var wH=Object.freeze({__proto__:null,encode:hO,decode:pO});const No=Ae.getWebCrypto(),vO=Ae.getNodeCrypto();function r4(e,t,n,r){return Ae.concatUint8Array([t.write(),new Uint8Array([e]),n.write(),Ae.stringToUint8Array("Anonymous Sender "),r.subarray(0,20)])}async function i4(e,t,n,r,a=!1,s=!1){let l;if(a){for(l=0;l=0&&t[l]===0;l--);t=t.subarray(0,l+1)}return(await cc.digest(e,Ae.concatUint8Array([new Uint8Array([0,0,0,1]),t,r]))).subarray(0,n)}async function CH(e,t){switch(e.type){case"curve25519":{const n=Ms(32),{secretKey:r,sharedKey:a}=await mO(e,t,null,n);let{publicKey:s}=As.box.keyPair.fromSecretKey(r);return s=Ae.concatUint8Array([new Uint8Array([64]),s]),{publicKey:s,sharedKey:a}}case"web":if(e.web&&Ae.getWebCrypto())try{return await async function(n,r){const a=xg(n.payloadSize,n.web.web,r);let s=No.generateKey({name:"ECDH",namedCurve:n.web.web},!0,["deriveKey","deriveBits"]),l=No.importKey("jwk",a,{name:"ECDH",namedCurve:n.web.web},!1,[]);[s,l]=await Promise.all([s,l]);let c=No.deriveBits({name:"ECDH",namedCurve:n.web.web,public:l},s.privateKey,n.web.sharedSize),h=No.exportKey("jwk",s.publicKey);[c,h]=await Promise.all([c,h]);const i=new Uint8Array(c);return{publicKey:new Uint8Array(lO(h)),sharedKey:i}}(e,t)}catch(n){Ae.printDebugError(n)}break;case"node":return async function(n,r){const a=vO.createECDH(n.node.node);a.generateKeys();const s=new Uint8Array(a.computeSecret(r));return{publicKey:new Uint8Array(a.getPublicKey()),sharedKey:s}}(e,t)}return async function(n,r){const a=await Sc(n.name),s=await n.genKeyPair();r=Cg(a,r);const l=wg(a,s.privateKey),c=s.publicKey,h=l.derive(r.getPublic()),i=a.curve.p.byteLength(),p=h.toArrayLike(Uint8Array,"be",i);return{publicKey:c,sharedKey:p}}(e,t)}async function mO(e,t,n,r){if(r.length!==e.payloadSize){const a=new Uint8Array(e.payloadSize);a.set(r,e.payloadSize-r.length),r=a}switch(e.type){case"curve25519":{const a=r.slice().reverse();return{secretKey:a,sharedKey:As.scalarMult(a,t.subarray(1))}}case"web":if(e.web&&Ae.getWebCrypto())try{return await async function(a,s,l,c){const h=uO(a.payloadSize,a.web.web,l,c);let i=No.importKey("jwk",h,{name:"ECDH",namedCurve:a.web.web},!0,["deriveKey","deriveBits"]);const p=xg(a.payloadSize,a.web.web,s);let d=No.importKey("jwk",p,{name:"ECDH",namedCurve:a.web.web},!0,[]);[i,d]=await Promise.all([i,d]);let v=No.deriveBits({name:"ECDH",namedCurve:a.web.web,public:d},i,a.web.sharedSize),m=No.exportKey("jwk",i);[v,m]=await Promise.all([v,m]);const _=new Uint8Array(v);return{secretKey:Qs(m.d),sharedKey:_}}(e,t,n,r)}catch(a){Ae.printDebugError(a)}break;case"node":return async function(a,s,l){const c=vO.createECDH(a.node.node);c.setPrivateKey(l);const h=new Uint8Array(c.computeSecret(s));return{secretKey:new Uint8Array(c.getPrivateKey()),sharedKey:h}}(e,t,r)}return async function(a,s,l){const c=await Sc(a.name);s=Cg(c,s),l=wg(c,l);const h=new Uint8Array(l.getPrivate()),i=l.derive(s.getPublic()),p=c.curve.p.byteLength(),d=i.toArrayLike(Uint8Array,"be",p);return{secretKey:h,sharedKey:d}}(e,t,r)}var xH=Object.freeze({__proto__:null,validateParams:async function(e,t,n){return oO(ve.publicKey.ecdh,e,t,n)},encrypt:async function(e,t,n,r,a){const s=hO(n),l=new fo(e),{publicKey:c,sharedKey:h}=await CH(l,r),i=r4(ve.publicKey.ecdh,e,t,a),{keySize:p}=Ho(t.cipher);return{publicKey:c,wrappedKey:dO(await i4(t.hash,h,p,i),s)}},decrypt:async function(e,t,n,r,a,s,l){const c=new fo(e),{sharedKey:h}=await mO(c,n,a,s),i=r4(ve.publicKey.ecdh,e,t,l),{keySize:p}=Ho(t.cipher);let d;for(let v=0;v<3;v++)try{return pO(fO(await i4(t.hash,h,p,i,v===1,v===2),r))}catch(m){d=m}throw d}}),SH=Object.freeze({__proto__:null,Curve:fo,ecdh:xH,ecdsa:_H,eddsa:yH,generate:async function(e){const t=await Ae.getBigInteger();e=new fo(e);const n=await e.genKeyPair(),r=new t(n.publicKey).toUint8Array(),a=new t(n.privateKey).toUint8Array("be",e.payloadSize);return{oid:e.oid,Q:r,secret:a,hash:e.hash,cipher:e.cipher}},getPreferredHashAlgo:function(e){return Rv[ve.write(ve.curve,e.toHex())].hash}}),EH=Object.freeze({__proto__:null,sign:async function(e,t,n,r,a,s){const l=await Ae.getBigInteger(),c=new l(1);let h,i,p,d;r=new l(r),a=new l(a),n=new l(n),s=new l(s),n=n.mod(r),s=s.mod(a);const v=new l(t.subarray(0,a.byteLength())).mod(a);for(;;){if(h=await co(c,a),i=n.modExp(h,r).imod(a),i.isZero())continue;const m=s.mul(i).imod(a);if(d=v.add(m).imod(a),p=h.modInv(a).imul(d).imod(a),!p.isZero())break}return{r:i.toUint8Array("be",a.byteLength()),s:p.toUint8Array("be",a.byteLength())}},verify:async function(e,t,n,r,a,s,l,c){const h=await Ae.getBigInteger(),i=new h(0);if(t=new h(t),n=new h(n),s=new h(s),l=new h(l),a=new h(a),c=new h(c),t.lte(i)||t.gte(l)||n.lte(i)||n.gte(l))return Ae.printDebug("invalid DSA Signature"),!1;const p=new h(r.subarray(0,l.byteLength())).imod(l),d=n.modInv(l);if(d.isZero())return Ae.printDebug("invalid DSA Signature"),!1;a=a.mod(s),c=c.mod(s);const v=p.mul(d).imod(l),m=t.mul(d).imod(l),_=a.modExp(v,s),y=c.modExp(m,s);return _.mul(y).imod(s).imod(l).equal(t)},validateParams:async function(e,t,n,r,a){const s=await Ae.getBigInteger();e=new s(e),t=new s(t),n=new s(n),r=new s(r);const l=new s(1);if(n.lte(l)||n.gte(e)||!e.dec().mod(t).isZero()||!n.modExp(t,e).isOne())return!1;const c=new s(t.bitLength()),h=new s(150);if(c.lt(h)||!await rO(t,null,32))return!1;a=new s(a);const i=new s(2),p=await co(i.leftShift(c.dec()),i.leftShift(c)),d=t.mul(p).add(a);return!!r.equal(n.modExp(d,e))}}),cr={rsa:dH,elgamal:fH,elliptic:SH,dsa:EH,nacl:As},kH=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:Ae.readMPI(t.subarray(n))};case ve.publicKey.dsa:case ve.publicKey.ecdsa:{const r=Ae.readMPI(t.subarray(n));return n+=r.length+2,{r,s:Ae.readMPI(t.subarray(n))}}case ve.publicKey.eddsa:{let r=Ae.readMPI(t.subarray(n));n+=r.length+2,r=Ae.leftPad(r,32);let a=Ae.readMPI(t.subarray(n));return a=Ae.leftPad(a,32),{r,s:a}}default:throw new jr("Unknown signature algorithm.")}},verify:async function(e,t,n,r,a,s){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaSign:{const{n:l,e:c}=r,h=Ae.leftPad(n.s,l.length);return cr.rsa.verify(t,a,h,l,c,s)}case ve.publicKey.dsa:{const{g:l,p:c,q:h,y:i}=r,{r:p,s:d}=n;return cr.dsa.verify(t,p,d,s,l,c,h,i)}case ve.publicKey.ecdsa:{const{oid:l,Q:c}=r,h=new cr.elliptic.Curve(l).payloadSize,i=Ae.leftPad(n.r,h),p=Ae.leftPad(n.s,h);return cr.elliptic.ecdsa.verify(l,t,{r:i,s:p},a,c,s)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=r;return cr.elliptic.eddsa.verify(l,t,n,a,c,s)}default:throw Error("Unknown signature algorithm.")}},sign:async function(e,t,n,r,a,s){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:i,q:p,u:d}=r;return{s:await cr.rsa.sign(t,a,l,c,h,i,p,d,s)}}case ve.publicKey.dsa:{const{g:l,p:c,q:h}=n,{x:i}=r;return cr.dsa.sign(t,s,l,c,h,i)}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 cr.elliptic.ecdsa.sign(l,t,a,c,h,s)}case ve.publicKey.eddsa:{const{oid:l,Q:c}=n,{seed:h}=r;return cr.elliptic.eddsa.sign(l,t,a,c,h,s)}default:throw Error("Unknown signature algorithm.")}}});class a4{constructor(t){t=t===void 0?new Uint8Array([]):Ae.isString(t)?Ae.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 Ae.concatUint8Array([new Uint8Array([this.data.length]),this.data])}}class s4{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 dy(e){try{e.getName()}catch{throw new jr("Unknown curve OID")}}var DH=Object.freeze({__proto__:null,publicKeyEncrypt:async function(e,t,n,r){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:{const{n:a,e:s}=t;return{c:await cr.rsa.encrypt(n,a,s)}}case ve.publicKey.elgamal:{const{p:a,g:s,y:l}=t;return cr.elgamal.encrypt(n,a,s,l)}case ve.publicKey.ecdh:{const{oid:a,Q:s,kdfParams:l}=t,{publicKey:c,wrappedKey:h}=await cr.elliptic.ecdh.encrypt(a,l,n,s,r);return{V:c,C:new a4(h)}}default:return[]}},publicKeyDecrypt:async function(e,t,n,r,a,s){switch(e){case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaEncrypt:{const{c:l}=r,{n:c,e:h}=t,{d:i,p,q:d,u:v}=n;return cr.rsa.decrypt(l,c,h,i,p,d,v,s)}case ve.publicKey.elgamal:{const{c1:l,c2:c}=r,h=t.p,i=n.x;return cr.elgamal.decrypt(l,c,h,i,s)}case ve.publicKey.ecdh:{const{oid:l,Q:c,kdfParams:h}=t,{d:i}=n,{V:p,C:d}=r;return cr.elliptic.ecdh.decrypt(l,h,p,d.data,c,i,a)}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=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=Ae.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{n:r,e:a}}}case ve.publicKey.dsa:{const r=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=Ae.readMPI(t.subarray(n));n+=a.length+2;const s=Ae.readMPI(t.subarray(n));n+=s.length+2;const l=Ae.readMPI(t.subarray(n));return n+=l.length+2,{read:n,publicParams:{p:r,q:a,g:s,y:l}}}case ve.publicKey.elgamal:{const r=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=Ae.readMPI(t.subarray(n));n+=a.length+2;const s=Ae.readMPI(t.subarray(n));return n+=s.length+2,{read:n,publicParams:{p:r,g:a,y:s}}}case ve.publicKey.ecdsa:{const r=new ys;n+=r.read(t),dy(r);const a=Ae.readMPI(t.subarray(n));return n+=a.length+2,{read:n,publicParams:{oid:r,Q:a}}}case ve.publicKey.eddsa:{const r=new ys;n+=r.read(t),dy(r);let a=Ae.readMPI(t.subarray(n));return n+=a.length+2,a=Ae.leftPad(a,33),{read:n,publicParams:{oid:r,Q:a}}}case ve.publicKey.ecdh:{const r=new ys;n+=r.read(t),dy(r);const a=Ae.readMPI(t.subarray(n));n+=a.length+2;const s=new s4;return n+=s.read(t.subarray(n)),{read:n,publicParams:{oid:r,Q:a,kdfParams:s}}}default:throw new jr("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 a=Ae.readMPI(t.subarray(r));r+=a.length+2;const s=Ae.readMPI(t.subarray(r));r+=s.length+2;const l=Ae.readMPI(t.subarray(r));r+=l.length+2;const c=Ae.readMPI(t.subarray(r));return r+=c.length+2,{read:r,privateParams:{d:a,p:s,q:l,u:c}}}case ve.publicKey.dsa:case ve.publicKey.elgamal:{const a=Ae.readMPI(t.subarray(r));return r+=a.length+2,{read:r,privateParams:{x:a}}}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const a=new fo(n.oid);let s=Ae.readMPI(t.subarray(r));return r+=s.length+2,s=Ae.leftPad(s,a.payloadSize),{read:r,privateParams:{d:s}}}case ve.publicKey.eddsa:{const a=new fo(n.oid);let s=Ae.readMPI(t.subarray(r));return r+=s.length+2,s=Ae.leftPad(s,a.payloadSize),{read:r,privateParams:{seed:s}}}default:throw new jr("Unknown public key encryption algorithm.")}},parseEncSessionKeyParams:function(e,t){let n=0;switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:return{c:Ae.readMPI(t.subarray(n))};case ve.publicKey.elgamal:{const r=Ae.readMPI(t.subarray(n));return n+=r.length+2,{c1:r,c2:Ae.readMPI(t.subarray(n))}}case ve.publicKey.ecdh:{const r=Ae.readMPI(t.subarray(n));n+=r.length+2;const a=new a4;return a.read(t.subarray(n)),{V:r,C:a}}default:throw new jr("Unknown public key encryption algorithm.")}},serializeParams:function(e,t){const n=Object.keys(t).map(r=>{const a=t[r];return Ae.isUint8Array(a)?Ae.uint8ArrayToMPI(a):a.write()});return Ae.concatUint8Array(n)},generateParams:function(e,t,n){switch(e){case ve.publicKey.rsaEncrypt:case ve.publicKey.rsaEncryptSign:case ve.publicKey.rsaSign:return cr.rsa.generate(t,65537).then(({n:r,e:a,d:s,p:l,q:c,u:h})=>({privateParams:{d:s,p:l,q:c,u:h},publicParams:{n:r,e:a}}));case ve.publicKey.ecdsa:return cr.elliptic.generate(n).then(({oid:r,Q:a,secret:s})=>({privateParams:{d:s},publicParams:{oid:new ys(r),Q:a}}));case ve.publicKey.eddsa:return cr.elliptic.generate(n).then(({oid:r,Q:a,secret:s})=>({privateParams:{seed:s},publicParams:{oid:new ys(r),Q:a}}));case ve.publicKey.ecdh:return cr.elliptic.generate(n).then(({oid:r,Q:a,secret:s,hash:l,cipher:c})=>({privateParams:{d:s},publicParams:{oid:new ys(r),Q:a,kdfParams:new s4({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:a}=t,{d:s,p:l,q:c,u:h}=n;return cr.rsa.validateParams(r,a,s,l,c,h)}case ve.publicKey.dsa:{const{p:r,q:a,g:s,y:l}=t,{x:c}=n;return cr.dsa.validateParams(r,a,s,l,c)}case ve.publicKey.elgamal:{const{p:r,g:a,y:s}=t,{x:l}=n;return cr.elgamal.validateParams(r,a,s,l)}case ve.publicKey.ecdsa:case ve.publicKey.ecdh:{const r=cr.elliptic[ve.read(ve.publicKey,e)],{oid:a,Q:s}=t,{d:l}=n;return r.validateParams(a,s,l)}case ve.publicKey.eddsa:{const{oid:r,Q:a}=t,{seed:s}=n;return cr.elliptic.eddsa.validateParams(r,a,s)}default:throw Error("Unknown public key algorithm.")}},getPrefixRandom:async function(e){const{blockSize:t}=Ho(e),n=await Ms(t),r=new Uint8Array([n[n.length-2],n[n.length-1]]);return Ae.concat([n,r])},generateSessionKey:function(e){const{keySize:t}=Ho(e);return Ms(t)},getAEADMode:function(e){const t=ve.read(ve.aead,e);return nO[t]},getCipher:Ho});const Kt={cipher:If,hash:cc,mode:nO,publicKey:cr,signature:kH,random:lH,pkcs1:cH,pkcs5:wH,aesKW:bH};Object.assign(Kt,DH);var Rf=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function gO(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}const _O={arraySet:function(e,t,n,r,a){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),a);else for(let s=0;s=0;)e[t]=0}const MH=0,SO=1,IH=2,I1=29,Lf=256,hf=Lf+1+I1,nc=30,$1=19,c4=2*hf+1,Ll=15,fy=16,$H=7,R1=256,EO=16,kO=17,DO=18,H0=[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],Lv=[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],RH=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d4=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Js=Array(2*(hf+2));kc(Js);const Jd=Array(2*nc);kc(Jd);const pf=Array(512);kc(pf);const vf=Array(256);kc(vf);const L1=Array(I1);kc(L1);const Tm=Array(nc);function hy(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let f4,h4,p4;function py(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function OO(e){return e<256?pf[e]:pf[256+(e>>>7)]}function mf(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Gi(e,t,n){e.bi_valid>fy-n?(e.bi_buf|=t<>fy-e.bi_valid,e.bi_valid+=n-fy):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function PO(e,t,n){const r=Array(Ll+1);let a,s,l=0;for(a=1;a<=Ll;a++)r[a]=l=l+n[a-1]<<1;for(s=0;s<=t;s++){const c=e[2*s+1];c!==0&&(e[2*s]=TO(r[c]++,c))}}function AO(e){let t;for(t=0;t8?mf(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 v4(e,t,n,r){const a=2*t,s=2*n;return e[a]>1;l>=1;l--)vy(e,n,l);h=s;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vy(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++,vy(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,D=d.stat_desc.max_length;let x,C,k,w,T,M,A=0;for(w=0;w<=Ll;w++)p.bl_count[w]=0;for(v[2*p.heap[p.heap_max]+1]=0,x=p.heap_max+1;xD&&(w=D,A++),v[2*C+1]=w,C>m||(p.bl_count[w]++,T=0,C>=E&&(T=b[C-E]),M=v[2*C],p.opt_len+=M*(w+T),y&&(p.static_len+=M*(_[2*C+1]+T)));if(A!==0){do{for(w=D-1;p.bl_count[w]===0;)w--;p.bl_count[w]--,p.bl_count[w+1]+=2,p.bl_count[D]--,A-=2}while(A>0);for(w=D;w!==0;w--)for(C=p.bl_count[w];C!==0;)k=p.heap[--x],k>m||(v[2*k+1]!==w&&(p.opt_len+=(w-v[2*k+1])*v[2*k],v[2*k+1]=w),C--)}}(e,t),PO(n,i,e.bl_count)}function g4(e,t,n){let r,a,s=-1,l=t[1],c=0,h=7,i=4;for(l===0&&(h=138,i=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=l,l=t[2*(r+1)+1],++c>=7;a=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function BH(e,t,n,r){let a,s,l=0;e.level>0?(e.strm.data_type===xO&&(e.strm.data_type=function(c){let h,i=4093624447;for(h=0;h<=31;h++,i>>>=1)if(1&i&&c.dyn_ltree[2*h]!==0)return l4;if(c.dyn_ltree[18]!==0||c.dyn_ltree[20]!==0||c.dyn_ltree[26]!==0)return u4;for(h=32;h=3&&c.bl_tree[2*d4[h]+1]===0;h--);return c.opt_len+=3*(h+1)+5+5+4,h}(e),a=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=a&&(a=s)):a=s=n+5,n+4<=a&&t!==-1?IO(e,t,n,r):e.strategy===CO||s===a?(Gi(e,(SO<<1)+(r?1:0),3),m4(e,Js,Jd)):(Gi(e,(IH<<1)+(r?1:0),3),function(c,h,i,p){let d;for(Gi(c,h-257,5),Gi(c,i-1,5),Gi(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*(vf[n]+Lf+1)]++,e.dyn_dtree[2*OO(t)]++),e.last_lit===e.lit_bufsize-1}function gf(e,t,n,r){let a=65535&e|0,s=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do a=a+t[r++]|0,s=s+a|0;while(--l);a%=65521,s%=65521}return a|s<<16|0}const FH=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 Hr(e,t,n,r){const a=FH,s=r+n;e^=-1;for(let l=r;l>>8^a[255&(e^t[l])];return-1^e}var _f={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 jH=9,Fn=3,Bo=258,Ka=Bo+Fn+1,zH=32,Pm=42,K0=69,Nv=73,Bv=91,Fv=103,Nl=113,Rd=666,Kr=1,Zd=2,Bl=3,rc=4,UH=3;function Fo(e,t){return e.msg=_f[t],t}function b4(e){return(e<<1)-(e>4?9:0)}function Io(e){let t=e.length;for(;--t>=0;)e[t]=0}function To(e){const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&($s(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 ai(e,t){BH(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,To(e.strm)}function Vn(e,t){e.pending_buf[e.pending++]=t}function md(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function VH(e,t,n,r){let a=e.avail_in;return a>r&&(a=r),a===0?0:(e.avail_in-=a,$s(t,e.input,e.next_in,a,n),e.state.wrap===1?e.adler=gf(e.adler,t,a,n):e.state.wrap===2&&(e.adler=Hr(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)}function $O(e,t){let n,r,a=e.max_chain_length,s=e.strstart,l=e.prev_length,c=e.nice_match;const h=e.strstart>e.w_size-Ka?e.strstart-(e.w_size-Ka):0,i=e.window,p=e.w_mask,d=e.prev,v=e.strstart+Bo;let m=i[s+l-1],_=i[s+l];e.prev_length>=e.good_match&&(a>>=2),c>e.lookahead&&(c=e.lookahead);do if(n=t,i[n+l]===_&&i[n+l-1]===m&&i[n]===i[s]&&i[++n]===i[s+1]){s+=2,n++;do;while(i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&i[++s]===i[++n]&&sl){if(e.match_start=t,l=r,r>=c)break;m=i[s+l-1],_=i[s+l]}}while((t=d[t&p])>h&&--a!=0);return l<=e.lookahead?l:e.lookahead}function ql(e){const t=e.w_size;let n,r,a,s,l;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ka)){$s(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 a=e.head[--n],e.head[n]=a>=t?a-t:0;while(--r);r=t,n=r;do a=e.prev[--n],e.prev[n]=a>=t?a-t:0;while(--r);s+=t}if(e.strm.avail_in===0)break;if(r=VH(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=r,e.lookahead+e.insert>=Fn)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=Fn&&(e.ins_h=(e.ins_h<=Fn)if(r=Ko(e,e.strstart-e.match_start,e.match_length-Fn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Fn){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=Fn&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=Fn-1)),e.prev_length>=Fn&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-Fn,r=Ko(e,e.strstart-1-e.prev_match,e.prev_length-Fn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ql(e),e.lookahead===0&&t===Rs)return Kr;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,ai(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ka&&(ai(e,!1),e.strm.avail_out===0))return Kr}return e.insert=0,t===Yr?(ai(e,!0),e.strm.avail_out===0?Bl:rc):(e.strstart>e.block_start&&(ai(e,!1),e.strm.avail_out),Kr)}),new fs(4,4,8,4,gy),new fs(4,5,16,8,gy),new fs(4,6,32,32,gy),new fs(4,4,16,16,Ru),new fs(8,16,32,32,Ru),new fs(8,16,128,128,Ru),new fs(8,32,128,256,Ru),new fs(32,128,258,1024,Ru),new fs(32,258,258,4096,Ru)];class WH{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=dc,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 Oa(1146),this.dyn_dtree=new Oa(122),this.bl_tree=new Oa(78),Io(this.dyn_ltree),Io(this.dyn_dtree),Io(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Oa(16),this.heap=new Oa(573),Io(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Oa(573),Io(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 HH(e){const t=function(n){let r;return n&&n.state?(n.total_in=n.total_out=0,n.data_type=xO,r=n.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Pm:Nl,n.adler=r.wrap===2?0:1,r.last_flush=Rs,LH(r),Jn):Fo(n,Rr)}(e);return t===Jn&&function(n){n.window_size=2*n.w_size,Io(n.head),n.max_lazy_match=Ld[n.level].max_lazy,n.good_match=Ld[n.level].good_length,n.nice_match=Ld[n.level].nice_length,n.max_chain_length=Ld[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=Fn-1,n.match_available=0,n.ins_h=0}(e.state),t}function KH(e,t){let n,r,a,s;if(!e||!e.state||t>W0||t<0)return e?Fo(e,Rr):Rr;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Rd&&t!==Yr)return Fo(e,e.avail_out===0?Xd:Rr);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Pm)if(r.wrap===2)e.adler=0,Vn(r,31),Vn(r,139),Vn(r,8),r.gzhead?(Vn(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)),Vn(r,255&r.gzhead.time),Vn(r,r.gzhead.time>>8&255),Vn(r,r.gzhead.time>>16&255),Vn(r,r.gzhead.time>>24&255),Vn(r,r.level===9?2:r.strategy>=qp||r.level<2?4:0),Vn(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Vn(r,255&r.gzhead.extra.length),Vn(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Hr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=K0):(Vn(r,0),Vn(r,0),Vn(r,0),Vn(r,0),Vn(r,0),Vn(r,r.level===9?2:r.strategy>=qp||r.level<2?4:0),Vn(r,UH),r.status=Nl);else{let c=dc+(r.w_bits-8<<4)<<8,h=-1;h=r.strategy>=qp||r.level<2?0:r.level<6?1:r.level===6?2:3,c|=h<<6,r.strstart!==0&&(c|=zH),c+=31-c%31,r.status=Nl,md(r,c),r.strstart!==0&&(md(r,e.adler>>>16),md(r,65535&e.adler)),e.adler=1}if(r.status===K0)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),To(e),a=r.pending,r.pending!==r.pending_buf_size));)Vn(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Nv)}else r.status=Nv;if(r.status===Nv)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),To(e),a=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindexa&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),s===0&&(r.gzindex=0,r.status=Bv)}else r.status=Bv;if(r.status===Bv)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),To(e),a=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindexa&&(e.adler=Hr(e.adler,r.pending_buf,r.pending-a,a)),s===0&&(r.status=Fv)}else r.status=Fv;if(r.status===Fv&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&To(e),r.pending+2<=r.pending_buf_size&&(Vn(r,255&e.adler),Vn(r,e.adler>>8&255),e.adler=0,r.status=Nl)):r.status=Nl),r.pending!==0){if(To(e),e.avail_out===0)return r.last_flush=-1,Jn}else if(e.avail_in===0&&b4(t)<=b4(n)&&t!==Yr)return Fo(e,Xd);if(r.status===Rd&&e.avail_in!==0)return Fo(e,Xd);if(e.avail_in!==0||r.lookahead!==0||t!==Rs&&r.status!==Rd){var l=r.strategy===qp?function(c,h){let i;for(;;){if(c.lookahead===0&&(ql(c),c.lookahead===0)){if(h===Rs)return Kr;break}if(c.match_length=0,i=Ko(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++,i&&(ai(c,!1),c.strm.avail_out===0))return Kr}return c.insert=0,h===Yr?(ai(c,!0),c.strm.avail_out===0?Bl:rc):c.last_lit&&(ai(c,!1),c.strm.avail_out===0)?Kr:Zd}(r,t):r.strategy===AH?function(c,h){let i,p,d,v;const m=c.window;for(;;){if(c.lookahead<=Bo){if(ql(c),c.lookahead<=Bo&&h===Rs)return Kr;if(c.lookahead===0)break}if(c.match_length=0,c.lookahead>=Fn&&c.strstart>0&&(d=c.strstart-1,p=m[d],p===m[++d]&&p===m[++d]&&p===m[++d])){v=c.strstart+Bo;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>=Fn?(i=Ko(c,1,c.match_length-Fn),c.lookahead-=c.match_length,c.strstart+=c.match_length,c.match_length=0):(i=Ko(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++),i&&(ai(c,!1),c.strm.avail_out===0))return Kr}return c.insert=0,h===Yr?(ai(c,!0),c.strm.avail_out===0?Bl:rc):c.last_lit&&(ai(c,!1),c.strm.avail_out===0)?Kr:Zd}(r,t):Ld[r.level].func(r,t);if(l!==Bl&&l!==rc||(r.status=Rd),l===Kr||l===Bl)return e.avail_out===0&&(r.last_flush=-1),Jn;if(l===Zd&&(t===OH?NH(r):t!==W0&&(IO(r,0,0,!1),t===TH&&(Io(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),To(e),e.avail_out===0))return r.last_flush=-1,Jn}return t!==Yr?Jn:r.wrap<=0?io:(r.wrap===2?(Vn(r,255&e.adler),Vn(r,e.adler>>8&255),Vn(r,e.adler>>16&255),Vn(r,e.adler>>24&255),Vn(r,255&e.total_in),Vn(r,e.total_in>>8&255),Vn(r,e.total_in>>16&255),Vn(r,e.total_in>>24&255)):(md(r,e.adler>>>16),md(r,65535&e.adler)),To(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Jn:io)}try{String.fromCharCode.call(null,0)}catch{}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const G0=new Os(256);for(let e=0;e<256;e++)G0[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;function Y0(e){let t,n,r,a,s=0;const l=e.length;for(r=0;r>>6,c[a++]=128|63&t):t<65536?(c[a++]=224|t>>>12,c[a++]=128|t>>>6&63,c[a++]=128|63&t):(c[a++]=240|t>>>18,c[a++]=128|t>>>12&63,c[a++]=128|t>>>6&63,c[a++]=128|63&t);return c}G0[254]=G0[254]=1;class RO{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 X0{constructor(t){this.options={level:o4,method:dc,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 RO,this.strm.avail_out=0;var r,a,s=function(l,c,h,i,p,d){if(!l)return Rr;let v=1;if(c===o4&&(c=6),i<0?(v=0,i=-i):i>15&&(v=2,i-=16),p<1||p>jH||h!==dc||i<8||i>15||c<0||c>9||d<0||d>CO)return Fo(l,Rr);i===8&&(i=9);const m=new WH;return l.state=m,m.strm=l,m.wrap=v,m.gzhead=null,m.w_bits=i,m.w_size=1<=i.w_size&&(v===0&&(Io(i.head),i.strstart=0,i.block_start=0,i.insert=0),b=new Os(i.w_size),$s(b,h,E-i.w_size,i.w_size,0),h=b,E=i.w_size),m=c.avail_in,_=c.next_in,y=c.input,c.avail_in=E,c.next_in=0,c.input=h,ql(i);i.lookahead>=Fn;){p=i.strstart,d=i.lookahead-(Fn-1);do i.ins_h=(i.ins_h<0||r.avail_out===0)&&s!==io);return l===Yr?(s=function(c){let h;return c&&c.state?(h=c.state.status,h!==Pm&&h!==K0&&h!==Nv&&h!==Bv&&h!==Fv&&h!==Nl&&h!==Rd?Fo(c,Rr):(c.state=null,h===Nl?Fo(c,M1):Jn)):Rr}(this.strm),this.onEnd(s),this.ended=!0,s===Jn):l!==ff||(this.onEnd(Jn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Jn&&(this.result=bO(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}const ev=30,GH=12;function YH(e,t){let n,r,a,s,l,c,h,i,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),D=v.dmax,x=v.wsize,C=v.whave,k=v.wnext,w=v.window;a=v.hold,s=v.bits;const T=v.lencode,M=v.distcode,A=(1<>>24,a>>>=c,s-=c,c=l>>>16&255,c===0)y[r++]=65535&l;else{if(!(16&c)){if((64&c)==0){l=T[(65535&l)+(a&(1<>>=c,s-=c),s<15&&(a+=m[n++]<>>24,a>>>=c,s-=c,c=l>>>16&255,!(16&c)){if((64&c)==0){l=M[(65535&l)+(a&(1<D){e.msg="invalid distance too far back",v.mode=ev;break e}if(a>>>=c,s-=c,c=r-b,i>c){if(c=i-c,c>C&&v.sane){e.msg="invalid distance too far back",v.mode=ev;break e}if(p=0,d=w,k===0){if(p+=x-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-i;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,s-=h<<3,a&=(1<=1&&R[E]===0;E--);if(D>E&&(D=E),E===0)return a[s++]=20971520,a[s++]=20971520,c.bits=1,0;for(b=1;b0&&(e===x4||E!==1))return-1;for(H[1]=0,_=1;_w4||e===S4&&w>C4)return 1;for(;;){L=_-C,l[y]m?(V=oe[Te+l[y]],j=M[A+l[y]]):(V=96,j=0),i=1<<_-C,p=1<>C)+p]=L<<24|V<<16|j|0;while(p!==0);for(i=1<<_-1;T&i;)i>>=1;if(i!==0?(T&=i-1,T+=i):T=0,y++,--R[_]==0){if(_===E)break;_=t[n+l[y]]}if(_>D&&(T&pe)!==d){for(C===0&&(C=D),v+=b,x=_-C,k=1<w4||e===S4&&w>C4)return 1;d=T&pe,a[d]=D<<24|x<<16|v-s|0}}return T!==0&&(a[v+T]=_-C<<24|64<<16|0),c.bits=D,0}const qH=0,LO=1,NO=2,BO=1,E4=2,k4=3,D4=4,O4=5,T4=6,P4=7,A4=8,M4=9,I4=10,Am=11,Gs=12,yy=13,$4=14,by=15,R4=16,L4=17,N4=18,B4=19,tv=20,nv=21,F4=22,j4=23,z4=24,U4=25,V4=26,wy=27,W4=28,H4=29,mr=30,eK=852,tK=592;function K4(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}class nK{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 Oa(320),this.work=new Oa(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}}function rK(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=BO,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Om(eK),r.distcode=r.distdyn=new Om(tK),r.sane=1,r.back=-1,Jn):Rr}(e)):Rr}function iK(e,t){let n,r;return e?(r=new nK,e.state=r,r.window=null,n=function(a,s){let l,c;return a&&a.state?(c=a.state,s<0?(l=0,s=-s):(l=1+(s>>4),s<48&&(s&=15)),s&&(s<8||s>15)?Rr:(c.window!==null&&c.wbits!==s&&(c.window=null),c.wrap=l,c.wbits=s,rK(a))):Rr}(e,t),n!==Jn&&(e.state=null),n):Rr}let Cy,xy,G4=!0;function aK(e){if(G4){let t;for(Cy=new Om(512),xy=new Om(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(Qd(LO,e.lens,0,288,Cy,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Qd(NO,e.lens,0,32,xy,0,e.work,{bits:5}),G4=!1}e.lencode=Cy,e.lenbits=9,e.distcode=xy,e.distbits=5}function FO(e,t,n,r){let a;const s=e.state;return s.window===null&&(s.wsize=1<=s.wsize?($s(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(a=s.wsize-s.wnext,a>r&&(a=r),$s(s.window,t,n-r,a,s.wnext),(r-=a)?($s(s.window,t,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=a,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,n.check=Hr(n.check,H,2,0),i=0,p=0,n.mode=E4;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&i)<<8)+(i>>8))%31){e.msg="incorrect header check",n.mode=mr;break}if((15&i)!==dc){e.msg="unknown compression method",n.mode=mr;break}if(i>>>=4,p-=4,w=8+(15&i),n.wbits===0)n.wbits=w;else if(w>n.wbits){e.msg="invalid window size",n.mode=mr;break}n.dmax=1<>8&1),512&n.flags&&(H[0]=255&i,H[1]=i>>>8&255,n.check=Hr(n.check,H,2,0)),i=0,p=0,n.mode=k4;case k4:for(;p<32;){if(c===0)break e;c--,i+=r[s++]<>>8&255,H[2]=i>>>16&255,H[3]=i>>>24&255,n.check=Hr(n.check,H,4,0)),i=0,p=0,n.mode=D4;case D4:for(;p<16;){if(c===0)break e;c--,i+=r[s++]<>8),512&n.flags&&(H[0]=255&i,H[1]=i>>>8&255,n.check=Hr(n.check,H,2,0)),i=0,p=0,n.mode=O4;case O4:if(1024&n.flags){for(;p<16;){if(c===0)break e;c--,i+=r[s++]<>>8&255,n.check=Hr(n.check,H,2,0)),i=0,p=0}else n.head&&(n.head.extra=null);n.mode=T4;case T4:if(1024&n.flags&&(m=n.length,m>c&&(m=c),m&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),$s(n.head.extra,r,s,m,w)),512&n.flags&&(n.check=Hr(n.check,r,m,s)),c-=m,s+=m,n.length-=m),n.length))break e;n.length=0,n.mode=P4;case P4:if(2048&n.flags){if(c===0)break e;m=0;do w=r[s+m++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w));while(w&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Gs;break;case I4:for(;p<32;){if(c===0)break e;c--,i+=r[s++]<>>=7&p,p-=7&p,n.mode=wy;break}for(;p<3;){if(c===0)break e;c--,i+=r[s++]<>>=1,p-=1,3&i){case 0:n.mode=$4;break;case 1:if(aK(n),n.mode=tv,t===Qp){i>>>=2,p-=2;break e}break;case 2:n.mode=L4;break;case 3:e.msg="invalid block type",n.mode=mr}i>>>=2,p-=2;break;case $4:for(i>>>=7&p,p-=7&p;p<32;){if(c===0)break e;c--,i+=r[s++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=mr;break}if(n.length=65535&i,i=0,p=0,n.mode=by,t===Qp)break e;case by:n.mode=R4;case R4:if(m=n.length,m){if(m>c&&(m=c),m>h&&(m=h),m===0)break e;$s(a,r,s,m,l),c-=m,s+=m,h-=m,l+=m,n.length-=m;break}n.mode=Gs;break;case L4:for(;p<14;){if(c===0)break e;c--,i+=r[s++]<>>=5,p-=5,n.ndist=1+(31&i),i>>>=5,p-=5,n.ncode=4+(15&i),i>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=mr;break}n.have=0,n.mode=N4;case N4:for(;n.have>>=3,p-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},T=Qd(qH,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,T){e.msg="invalid code lengths set",n.mode=mr;break}n.have=0,n.mode=B4;case B4:for(;n.have>>24,E=R>>>16&255,D=65535&R,!(b<=p);){if(c===0)break e;c--,i+=r[s++]<>>=b,p-=b,n.lens[n.have++]=D;else{if(D===16){for(A=b+2;p>>=b,p-=b,n.have===0){e.msg="invalid bit length repeat",n.mode=mr;break}w=n.lens[n.have-1],m=3+(3&i),i>>>=2,p-=2}else if(D===17){for(A=b+3;p>>=b,p-=b,w=0,m=3+(7&i),i>>>=3,p-=3}else{for(A=b+7;p>>=b,p-=b,w=0,m=11+(127&i),i>>>=7,p-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=mr;break}for(;m--;)n.lens[n.have++]=w}}if(n.mode===mr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=mr;break}if(n.lenbits=9,M={bits:n.lenbits},T=Qd(LO,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,T){e.msg="invalid literal/lengths set",n.mode=mr;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},T=Qd(NO,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,T){e.msg="invalid distances set",n.mode=mr;break}if(n.mode=tv,t===Qp)break e;case tv:n.mode=nv;case nv:if(c>=6&&h>=258){e.next_out=l,e.avail_out=h,e.next_in=s,e.avail_in=c,n.hold=i,n.bits=p,YH(e,v),l=e.next_out,a=e.output,h=e.avail_out,s=e.next_in,r=e.input,c=e.avail_in,i=n.hold,p=n.bits,n.mode===Gs&&(n.back=-1);break}for(n.back=0;R=n.lencode[i&(1<>>24,E=R>>>16&255,D=65535&R,!(b<=p);){if(c===0)break e;c--,i+=r[s++]<>x)],b=R>>>24,E=R>>>16&255,D=65535&R,!(x+b<=p);){if(c===0)break e;c--,i+=r[s++]<>>=x,p-=x,n.back+=x}if(i>>>=b,p-=b,n.back+=b,n.length=D,E===0){n.mode=V4;break}if(32&E){n.back=-1,n.mode=Gs;break}if(64&E){e.msg="invalid literal/length code",n.mode=mr;break}n.extra=15&E,n.mode=F4;case F4:if(n.extra){for(A=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=j4;case j4:for(;R=n.distcode[i&(1<>>24,E=R>>>16&255,D=65535&R,!(b<=p);){if(c===0)break e;c--,i+=r[s++]<>x)],b=R>>>24,E=R>>>16&255,D=65535&R,!(x+b<=p);){if(c===0)break e;c--,i+=r[s++]<>>=x,p-=x,n.back+=x}if(i>>>=b,p-=b,n.back+=b,64&E){e.msg="invalid distance code",n.mode=mr;break}n.offset=D,n.extra=15&E,n.mode=z4;case z4:if(n.extra){for(A=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=mr;break}n.mode=U4;case U4: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=mr;break}m>n.wnext?(m-=n.wnext,_=n.wsize-m):_=n.wnext-m,m>n.length&&(m=n.length),y=n.window}else y=a,_=l-n.offset,m=n.length;m>h&&(m=h),h-=m,n.length-=m;do a[l++]=y[_++];while(--m);n.length===0&&(n.mode=nv);break;case V4:if(h===0)break e;a[l++]=n.length,h--,n.mode=nv;break;case wy:if(n.wrap){for(;p<32;){if(c===0)break e;c--,i|=r[s++]<=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 RO,this.strm.avail_out=0;let r=iK(this.strm,n.windowBits);if(r!==Jn||(this.header=new oK,function(a,s){let l;a&&a.state&&(l=a.state,(2&l.wrap)==0||(l.head=s,s.done=!1))}(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=Y0(n.dictionary):n.dictionary instanceof ArrayBuffer&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(r=Y4(this.strm,n.dictionary),r!==Jn))))throw Error(_f[r])}push(t,n){const{strm:r,options:{chunkSize:a,dictionary:s}}=this;let l,c,h=!1;if(this.ended)return!1;c=n===~~n?n:n===!0?Yr:Rs,typeof t=="string"?r.input=function(i){const p=new Os(i.length);for(let d=0,v=p.length;d0||r.avail_out===0)&&l!==io);return l===io&&(c=Yr),c===Yr?(l=function(i){if(!i||!i.state)return Rr;const p=i.state;return p.window&&(p.window=null),i.state=null,Jn}(this.strm),this.onEnd(l),this.ended=!0,l===Jn):c!==ff||(this.onEnd(Jn),r.avail_out=0,!0)}onData(t){this.chunks.push(t)}onEnd(t){t===Jn&&(this.result=bO(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}}var J4=[0,1,3,7,15,31,63,127,255],Nd=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Nd.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},Nd.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var n=8-this.bitOffset;if(e>=n)t<<=n,t|=J4[n]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=n;else{t<<=e;var r=n-e;t|=(this.curByte&J4[e]<>r,this.bitOffset+=e,e=0}}return t},Nd.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},Nd.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e("00"+r.toString(16)).slice(-2)).join("")}(t)};var lK=Nd,Dl=function(){};Dl.prototype.readByte=function(){throw Error("abstract method readByte() not implemented")},Dl.prototype.read=function(e,t,n){for(var r=0;r>>0},this.updateCRC=function(t){e=e<<8^Sy[255&(e>>>24^t)]},this.updateCRCRun=function(t,n){for(;n-- >0;)e=e<<8^Sy[255&(e>>>24^t)]}}),Z4=function(e,t){var n,r=e[t];for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},gr={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},Po={};Po[gr.LAST_BLOCK]="Bad file checksum",Po[gr.NOT_BZIP_DATA]="Not bzip data",Po[gr.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",Po[gr.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",Po[gr.DATA_ERROR]="Data error",Po[gr.OUT_OF_MEMORY]="Out of memory",Po[gr.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var ti=function(e,t){var n=Po[e]||"unknown error";t&&(n+=": "+t);var r=new TypeError(n);throw r.errorCode=e,r},Bd=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};Bd.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new uK,!0):(this.writeCount=-1,!1)},Bd.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"||ti(gr.NOT_BZIP_DATA,"bad magic");var r=n[3]-48;(r<1||r>9)&&ti(gr.NOT_BZIP_DATA,"level out of range"),this.reader=new lK(e),this.dbufSize=1e5*r,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},Bd.prototype._get_next_block=function(){var e,t,n,r=this.reader,a=r.pi();if(a==="177245385090")return!1;a!=="314159265359"&&ti(gr.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&ti(gr.OBSOLETE_INPUT);var s=r.read(24);s>this.dbufSize&&ti(gr.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 i=16*e;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(c[h++]=i+t)}var p=r.read(3);(p<2||p>6)&&ti(gr.DATA_ERROR);var d=r.read(15);d===0&&ti(gr.DATA_ERROR);var v=new Uint8Array(256);for(e=0;e=p&&ti(gr.DATA_ERROR);m[e]=Z4(v,t)}var _,y=h+2,b=[];for(t=0;t20)&&ti(gr.DATA_ERROR),r.read(1);)r.read(1)?l--:l++;x[e]=l}for(E=D=x[0],e=1;eD?D=x[e]:x[e]=d&&ti(gr.DATA_ERROR),_=b[m[R++]]),e=_.minLen,t=r.read(e);e>_.maxLen&&ti(gr.DATA_ERROR),!(t<=_.limit[e]);e++)t=t<<1|r.read(1);((t-=_.base[e])<0||t>=258)&&ti(gr.DATA_ERROR);var L=_.permute[t];if(L!==0&&L!==1){if(M)for(M=0,A+l>this.dbufSize&&ti(gr.DATA_ERROR),w[T=c[v[0]]]+=l;l--;)H[A++]=T;if(L>h)break;A>=this.dbufSize&&ti(gr.DATA_ERROR),w[T=c[T=Z4(v,e=L-1)]]++,H[A++]=T}else M||(M=1,l=0),l+=L===0?M:2*M,M<<=1}for((s<0||s>=A)&&ti(gr.DATA_ERROR),t=0,e=0;e<256;e++)n=t+w[e],w[e]=t,t=n;for(e=0;e>=8,oe=-1),this.writePos=V,this.writeCurrent=j,this.writeCount=A,this.writeRun=oe,!0},Bd.prototype._read_bunzip=function(e,t){var n,r,a;if(this.writeCount<0)return 0;var s=this.dbuf,l=this.writePos,c=this.writeCurrent,h=this.writeCount;this.outputsize;for(var i=this.writeRun;h;){for(h--,r=c,c=255&(l=s[l]),l>>=8,i++==3?(n=c,a=r,c=-1):(n=1,a=c),this.blockCRC.updateCRCRun(a,n);n--;)this.outputStream.writeByte(a),this.nextoutput++;c!=r&&(i=0)}return this.writeCount=h,this.blockCRC.getCRC()!==this.targetBlockCRC&&ti(gr.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var cK=function(e){if("readByte"in e)return e;var t=new jO;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},dK=function(e){var t=new jO,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 a=new Uint8Array(2*this.buffer.length);a.set(this.buffer),this.buffer=a}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},Q4=function(e,t,n){for(var r=cK(e),a=dK(t),s=new Bd(r,a);!("eof"in r)||!r.eof();)if(s._init_block())s._read_bunzip();else{var l=s.reader.read(32)>>>0;if(l!==s.streamCRC&&ti(gr.DATA_ERROR,"Bad stream CRC (got "+s.streamCRC.toString(16)+" expected "+l.toString(16)+")"),!n||!("eof"in r)||r.eof())break;s._start_bunzip(r,a)}if("getBuffer"in a)return a.getBuffer()};class Dc{static get tag(){return ve.packet.literalData}constructor(t=new Date){this.format=ve.literal.utf8,this.date=Ae.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||Ae.isStream(this.text))&&(this.text=Ae.decodeUTF8(Ae.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=Ae.canonicalizeEOL(Ae.encodeUTF8(this.text))),t?qu(this.data):this.data}setFilename(t){this.filename=t}getFilename(){return this.filename}async read(t){await mg(t,async n=>{const r=await n.readByte(),a=await n.readByte();this.filename=Ae.decodeUTF8(await n.readBytes(a)),this.date=Ae.readDate(await n.readBytes(4));let s=n.remainder();Tr(s)&&(s=await Ar(s)),this.setBytes(s,r)})}writeHeader(){const t=Ae.encodeUTF8(this.filename),n=new Uint8Array([t.length]),r=new Uint8Array([this.format]),a=Ae.writeDate(this.date);return Ae.concatUint8Array([r,n,t,a])}write(){const t=this.writeHeader(),n=this.getBytes();return Ae.concat([t,n])}}const gd=Symbol("verified"),fK=new Set([ve.signatureSubpacket.issuer,ve.signatureSubpacket.issuerFingerprint,ve.signatureSubpacket.embeddedSignature]);class li{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 Zo,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[gd]=null}read(t){let n=0;if(this.version=t[n++],this.version!==4&&this.version!==5)throw new jr(`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?rl(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()),Ae.concat(t)}async sign(t,n,r=new Date,a=!1){t.version===5?this.version=5:this.version=4;const s=[new Uint8Array([this.version,this.signatureType,this.publicKeyAlgorithm,this.hashAlgorithm])];this.created=Ae.normalizeDate(r),this.issuerKeyVersion=t.version,this.issuerFingerprint=t.getFingerprintBytes(),this.issuerKeyID=t.getKeyID(),s.push(this.writeHashedSubPackets()),this.unhashedSubpackets=[],this.signatureData=Ae.concat(s);const l=this.toHash(this.signatureType,n,a),c=await this.hash(this.signatureType,n,l,a);this.signedHashValue=si(Ql(c),0,2);const h=async()=>Kt.signature.sign(this.publicKeyAlgorithm,this.hashAlgorithm,t.publicParams,t.privateParams,l,await Ar(c));Ae.isStream(c)?this.params=h():(this.params=await h(),this[gd]=!0)}writeHashedSubPackets(){const t=ve.signatureSubpacket,n=[];let r;if(this.created===null)throw Error("Missing signature creation time");n.push(ur(t.signatureCreationTime,!0,Ae.writeDate(this.created))),this.signatureExpirationTime!==null&&n.push(ur(t.signatureExpirationTime,!0,Ae.writeNumber(this.signatureExpirationTime,4))),this.exportable!==null&&n.push(ur(t.exportableCertification,!0,new Uint8Array([this.exportable?1:0]))),this.trustLevel!==null&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),n.push(ur(t.trustSignature,!0,r))),this.regularExpression!==null&&n.push(ur(t.regularExpression,!0,this.regularExpression)),this.revocable!==null&&n.push(ur(t.revocable,!0,new Uint8Array([this.revocable?1:0]))),this.keyExpirationTime!==null&&n.push(ur(t.keyExpirationTime,!0,Ae.writeNumber(this.keyExpirationTime,4))),this.preferredSymmetricAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredSymmetricAlgorithms)),n.push(ur(t.preferredSymmetricAlgorithms,!1,r))),this.revocationKeyClass!==null&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=Ae.concat([r,this.revocationKeyFingerprint]),n.push(ur(t.revocationKey,!1,r))),this.issuerKeyID.isNull()||this.issuerKeyVersion===5||n.push(ur(t.issuer,!0,this.issuerKeyID.write())),this.rawNotations.forEach(({name:l,value:c,humanReadable:h,critical:i})=>{r=[new Uint8Array([h?128:0,0,0,0])];const p=Ae.encodeUTF8(l);r.push(Ae.writeNumber(p.length,2)),r.push(Ae.writeNumber(c.length,2)),r.push(p),r.push(c),r=Ae.concat(r),n.push(ur(t.notationData,i,r))}),this.preferredHashAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredHashAlgorithms)),n.push(ur(t.preferredHashAlgorithms,!1,r))),this.preferredCompressionAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredCompressionAlgorithms)),n.push(ur(t.preferredCompressionAlgorithms,!1,r))),this.keyServerPreferences!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.keyServerPreferences)),n.push(ur(t.keyServerPreferences,!1,r))),this.preferredKeyServer!==null&&n.push(ur(t.preferredKeyServer,!1,Ae.encodeUTF8(this.preferredKeyServer))),this.isPrimaryUserID!==null&&n.push(ur(t.primaryUserID,!1,new Uint8Array([this.isPrimaryUserID?1:0]))),this.policyURI!==null&&n.push(ur(t.policyURI,!1,Ae.encodeUTF8(this.policyURI))),this.keyFlags!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.keyFlags)),n.push(ur(t.keyFlags,!0,r))),this.signersUserID!==null&&n.push(ur(t.signersUserID,!1,Ae.encodeUTF8(this.signersUserID))),this.reasonForRevocationFlag!==null&&(r=Ae.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),n.push(ur(t.reasonForRevocation,!0,r))),this.features!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.features)),n.push(ur(t.features,!1,r))),this.signatureTargetPublicKeyAlgorithm!==null&&(r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])],r.push(Ae.stringToUint8Array(this.signatureTargetHash)),r=Ae.concat(r),n.push(ur(t.signatureTarget,!0,r))),this.embeddedSignature!==null&&n.push(ur(t.embeddedSignature,!0,this.embeddedSignature.write())),this.issuerFingerprint!==null&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=Ae.concat(r),n.push(ur(t.issuerFingerprint,this.version===5,r))),this.preferredAEADAlgorithms!==null&&(r=Ae.stringToUint8Array(Ae.uint8ArrayToString(this.preferredAEADAlgorithms)),n.push(ur(t.preferredAEADAlgorithms,!1,r)));const a=Ae.concat(n),s=Ae.writeNumber(a.length,2);return Ae.concat([s,a])}writeUnhashedSubPackets(){const t=[];this.unhashedSubpackets.forEach(a=>{t.push($f(a.length)),t.push(a)});const n=Ae.concat(t),r=Ae.writeNumber(n.length,2);return Ae.concat([r,n])}readSubPacket(t,n=!0){let r=0;const a=!!(128&t[r]),s=127&t[r];if(n||(this.unhashedSubpackets.push(t.subarray(r,t.length)),fK.has(s)))switch(r++,s){case ve.signatureSubpacket.signatureCreationTime:this.created=Ae.readDate(t.subarray(r,t.length));break;case ve.signatureSubpacket.signatureExpirationTime:{const l=Ae.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=Ae.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=Ae.readNumber(t.subarray(r,r+2));r+=2;const h=Ae.readNumber(t.subarray(r,r+2));r+=2;const i=Ae.decodeUTF8(t.subarray(r,r+c)),p=t.subarray(r+c,r+c+h);this.rawNotations.push({name:i,humanReadable:l,value:p,critical:a}),l&&(this.notations[i]=Ae.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=Ae.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.primaryUserID:this.isPrimaryUserID=t[r++]!==0;break;case ve.signatureSubpacket.policyURI:this.policyURI=Ae.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=Ae.decodeUTF8(t.subarray(r,t.length));break;case ve.signatureSubpacket.reasonForRevocation:this.reasonForRevocationFlag=t[r++],this.reasonForRevocationString=Ae.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=Ae.uint8ArrayToString(t.subarray(r,r+l));break}case ve.signatureSubpacket.embeddedSignature:this.embeddedSignature=new li,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 "+s);if(a)throw l;Ae.printDebug(l)}}}readSubPackets(t,n=!0,r){const a=Ae.readNumber(t.subarray(0,2));let s=2;for(;s<2+a;){const l=aO(t.subarray(s,t.length));s+=l.offset,this.readSubPacket(t.subarray(s,s+l.len),n,r),s+=l.len}return s}toSign(t,n){const r=ve.signature;switch(t){case r.binary:return n.text!==null?Ae.encodeUTF8(n.getText(!0)):n.getBytes(!0);case r.text:{const a=n.getBytes(!0);return Ae.canonicalizeEOL(a)}case r.standalone:return new Uint8Array(0);case r.certGeneric:case r.certPersona:case r.certCasual:case r.certPositive:case r.certRevocation:{let a,s;if(n.userID)s=180,a=n.userID;else{if(!n.userAttribute)throw Error("Either a userID or userAttribute packet needs to be supplied for certification.");s=209,a=n.userAttribute}const l=a.write();return Ae.concat([this.toSign(r.key,n),new Uint8Array([s]),Ae.writeNumber(l.length,4),l])}case r.subkeyBinding:case r.subkeyRevocation:case r.keyBinding:return Ae.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 Cr(Ql(this.signatureData),a=>{r+=a.length},()=>{const a=[];return this.version!==5||this.signatureType!==ve.signature.binary&&this.signatureType!==ve.signature.text||(n?a.push(new Uint8Array(6)):a.push(t.writeHeader())),a.push(new Uint8Array([this.version,255])),this.version===5&&a.push(new Uint8Array(4)),a.push(Ae.writeNumber(r,4)),Ae.concat(a)})}toHash(t,n,r=!1){const a=this.toSign(t,n);return Ae.concat([a,this.signatureData,this.calculateTrailer(n,r)])}async hash(t,n,r,a=!1){return r||(r=this.toHash(t,n,a)),Kt.hash.digest(this.hashAlgorithm,r)}async verify(t,n,r,a=new Date,s=!1,l=Bt){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[gd]&&!c)){let i,p;if(this.hashed?p=await this.hashed:(i=this.toHash(n,r,s),p=await this.hash(n,r,i)),p=await Ar(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[gd]=await Kt.signature.verify(this.publicKeyAlgorithm,this.hashAlgorithm,this.params,t.publicParams,i,p),!this[gd])throw Error("Signature verification failed")}const h=Ae.normalizeDate(a);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:i,critical:p})=>{if(p&&l.knownNotations.indexOf(i)<0)throw Error("Unknown critical notation: "+i)}),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=Ae.normalizeDate(t);return n!==null&&!(this.created<=n&&nli.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 hK(e,t){if(!t[e]){let n;try{n=ve.read(ve.packet,e)}catch{throw new jr("Unknown packet type with tag: "+e)}throw Error("Packet not allowed in this context: "+n)}return new t[e]}Ga.prototype.hash=li.prototype.hash,Ga.prototype.toHash=li.prototype.toHash,Ga.prototype.toSign=li.prototype.toSign;class Gn extends Array{static async fromBinary(t,n,r=Bt){const a=new Gn;return await a.read(t,n,r),a}async read(t,n,r=Bt){this.stream=lo(t,async(s,l)=>{const c=ta(l);try{for(;;)if(await c.ready,await pH(s,async h=>{try{if(h.tag===ve.packet.marker||h.tag===ve.packet.trust)return;const i=hK(h.tag,n);i.packets=new Gn,i.fromStream=Ae.isStream(h.packet),await i.read(h.packet,r),await c.write(i)}catch(i){const p=!r.ignoreUnsupportedPackets&&i instanceof jr,d=!(r.ignoreMalformedPackets||i instanceof jr);if(p||d||$v(h.tag))await c.abort(i);else{const v=new V0(h.tag,h.packet);await c.write(v)}Ae.printDebugError(i)}}))return await c.ready,void await c.close()}catch(h){await c.abort(h)}});const a=Bs(this.stream);for(;;){const{done:s,value:l}=await a.read();if(s?this.stream=null:this.push(l),s||$v(l.constructor.tag))break}a.releaseLock()}write(){const t=[];for(let n=0;n{if(s.push(h),l+=h.length,l>=c){const i=Math.min(Math.log(l)/Math.LN2|0,30),p=2**i,d=Ae.concat([hH(i)].concat(s));return s=[d.subarray(1+p)],l=s[0].length,d.subarray(0,1+p)}},()=>Ae.concat([$f(l)].concat(s))))}else{if(Ae.isStream(a)){let s=0;t.push(Cr(Ql(a),l=>{s+=l.length},()=>e4(r,s)))}else t.push(e4(r,a.length));t.push(a)}}return Ae.concat(t)}filterByTag(...t){const n=new Gn,r=a=>s=>a===s;for(let a=0;an.constructor.tag===t)}indexOfTag(...t){const n=[],r=this,a=s=>l=>s===l;for(let s=0;s{this.algorithm=await r.readByte(),this.compressed=r.remainder(),await this.decompress(n)})}write(){return this.compressed===null&&this.compress(),Ae.concat([new Uint8Array([this.algorithm]),this.compressed])}async decompress(t=Bt){const n=ve.read(ve.compression,this.algorithm),r=mK[n];if(!r)throw Error(n+" decompression not supported");this.packets=await Gn.fromBinary(r(this.compressed),pK,t)}compress(){const t=ve.read(ve.compression,this.algorithm),n=vK[t];if(!n)throw Error(t+" compression not supported");this.compressed=n(this.packets.write(),this.deflateLevel)}}const xs=Ae.getNodeZlib();function q4(e){return e}function Mm(e,t,n={}){return function(r){return!Ae.isStream(r)||Tr(r)?rl(()=>Ar(r).then(a=>new Promise((s,l)=>{e(a,n,(c,h)=>{if(c)return l(c);s(h)})}))):vg(x1(r).pipe(t(n)))}}function Im(e,t={}){return function(n){const r=new e(t);return Cr(n,a=>{if(a.length)return r.push(a,ff),r.result},()=>{if(e===X0)return r.push([],Yr),r.result})}}function ek(e){return function(t){return rl(async()=>e(await Ar(t)))}}const vK=xs?{zip:(e,t)=>Mm(xs.deflateRaw,xs.createDeflateRaw,{level:t})(e),zlib:(e,t)=>Mm(xs.deflate,xs.createDeflate,{level:t})(e)}:{zip:(e,t)=>Im(X0,{raw:!0,level:t})(e),zlib:(e,t)=>Im(X0,{level:t})(e)},mK=xs?{uncompressed:q4,zip:Mm(xs.inflateRaw,xs.createInflateRaw),zlib:Mm(xs.inflate,xs.createInflate),bzip2:ek(Q4)}:{uncompressed:q4,zip:Im(X4,{raw:!0}),zlib:Im(X4),bzip2:ek(Q4)},gK=Ae.constructAllowedPackets([Dc,Nf,Ga,li]);class zO{static get tag(){return ve.packet.symEncryptedIntegrityProtectedData}constructor(){this.version=1,this.encrypted=null,this.packets=null}async read(t){await mg(t,async n=>{const r=await n.readByte();if(r!==1)throw new jr(`Version ${r} of the SEIP packet is unsupported.`);this.encrypted=n.remainder()})}write(){return Ae.concat([new Uint8Array([1]),this.encrypted])}async encrypt(t,n,r=Bt){const{blockSize:a}=Kt.getCipher(t);let s=this.packets.write();Tr(s)&&(s=await Ar(s));const l=await Kt.getPrefixRandom(t),c=new Uint8Array([211,20]),h=Ae.concat([l,s,c]),i=await Kt.hash.sha1(qu(h)),p=Ae.concat([h,i]);return this.encrypted=await Kt.mode.cfb.encrypt(t,n,p,new Uint8Array(a),r),!0}async decrypt(t,n,r=Bt){const{blockSize:a}=Kt.getCipher(t);let s=Ql(this.encrypted);Tr(s)&&(s=await Ar(s));const l=await Kt.mode.cfb.decrypt(t,n,s,new Uint8Array(a)),c=si(qu(l),-20),h=si(l,0,-20),i=Promise.all([Ar(await Kt.hash.sha1(qu(h))),Ar(c)]).then(([v,m])=>{if(!Ae.equalsUint8Array(v,m))throw Error("Modification detected.");return new Uint8Array}),p=si(h,a+2);let d=si(p,0,-2);return d=Ji([d,rl(()=>i)]),Ae.isStream(s)&&r.allowUnauthenticatedStream||(d=await Ar(d)),this.packets=await Gn.fromBinary(d,gK,r),!0}}const _K=Ae.constructAllowedPackets([Dc,Nf,Ga,li]);class Eg{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 mg(t,async n=>{const r=await n.readByte();if(r!==1)throw new jr(`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 a=Kt.getAEADMode(this.aeadAlgorithm);this.iv=await n.readBytes(a.ivLength),this.encrypted=n.remainder()})}write(){return Ae.concat([new Uint8Array([this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte]),this.iv,this.encrypted])}async decrypt(t,n,r=Bt){this.packets=await Gn.fromBinary(await this.crypt("decrypt",n,Ql(this.encrypted)),_K,r)}async encrypt(t,n,r=Bt){this.cipherAlgorithm=t;const{ivLength:a}=Kt.getAEADMode(this.aeadAlgorithm);this.iv=Kt.random.getRandomBytes(a),this.chunkSizeByte=r.aeadChunkSizeByte;const s=this.packets.write();this.encrypted=await this.crypt("encrypt",n,s)}async crypt(t,n,r){const a=Kt.getAEADMode(this.aeadAlgorithm),s=await a(this.cipherAlgorithm,n),l=t==="decrypt"?a.tagLength:0,c=t==="encrypt"?a.tagLength:0,h=2**(this.chunkSizeByte+6)+l,i=new ArrayBuffer(21),p=new Uint8Array(i,0,13),d=new Uint8Array(i),v=new DataView(i),m=new Uint8Array(i,5,8);p.set([192|Eg.tag,this.version,this.cipherAlgorithm,this.aeadAlgorithm,this.chunkSizeByte],0);let _=0,y=Promise.resolve(),b=0,E=0;const D=this.iv;return lo(r,async(x,C)=>{if(Ae.isStream(x)!=="array"){const T=new uc({},{highWaterMark:Ae.getHardwareConcurrency()*2**(this.chunkSizeByte+6),size:M=>M.length});Jo(T.readable,C),C=T.writable}const k=Bs(x),w=ta(C);try{for(;;){let T=await k.readBytes(h+l)||new Uint8Array;const M=T.subarray(T.length-l);let A,R;if(T=T.subarray(0,T.length-l),!_||T.length?(k.unshift(M),A=s[t](T,a.getNonce(D,m),p),E+=T.length-l+c):(v.setInt32(17,b),A=s[t](M,a.getNonce(D,m),d),E+=c,R=!0),b+=T.length-l,y=y.then(()=>A).then(async H=>{await w.ready,await w.write(H),E-=H.length}).catch(H=>w.abort(H)),(R||E>w.desiredSize)&&await y,R){await w.close();break}v.setInt32(9,++_)}}catch(T){await w.abort(T)}})}}class J0{static get tag(){return ve.packet.publicKeyEncryptedSessionKey}constructor(){this.version=3,this.publicKeyID=new Zo,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted={}}read(t){if(this.version=t[0],this.version!==3)throw new jr(`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 Ae.concatUint8Array(t)}async encrypt(t){const n=Ae.concatUint8Array([new Uint8Array([ve.write(ve.symmetric,this.sessionKeyAlgorithm)]),this.sessionKey,Ae.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?Ae.concatUint8Array([new Uint8Array([n.sessionKeyAlgorithm]),n.sessionKey,Ae.writeChecksum(n.sessionKey)]):null,a=await Kt.publicKeyDecrypt(this.publicKeyAlgorithm,t.publicParams,t.privateParams,this.encrypted,t.getFingerprintBytes(),r),s=a[0],l=a.subarray(1,a.length-2),c=a.subarray(a.length-2),h=Ae.writeChecksum(l),i=h[0]===c[0]&h[1]===c[1];if(n){const p=i&s===n.sessionKeyAlgorithm&l.length===n.sessionKey.length;this.sessionKeyAlgorithm=Ae.selectUint8(p,s,n.sessionKeyAlgorithm),this.sessionKey=Ae.selectUint8Array(p,l,n.sessionKey)}else{if(!(i&&ve.read(ve.symmetric,s)))throw Error("Decryption error");this.sessionKey=l,this.sessionKeyAlgorithm=s}}}class qd{constructor(t=Bt){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(Ae.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,...Ae.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 Ae.concatUint8Array(t)}async produceKey(t,n){t=Ae.encodeUTF8(t);const r=[];let a=0,s=0;for(;a{this.privateParams[t].fill(0),delete this.privateParams[t]}),this.privateParams=null,this.isEncrypted=!0)}}async function tk(e,t,n){const{keySize:r}=Kt.getCipher(n);return e.produceKey(t,r)}var wK=O1(function(e){(function(t){function n(a){function s(){return Qt0&&(at.semantic=" "),at}}function x(rt,at){return function(){var xt,Vt,Oe,Be,Fe;for(Be=l(),xt=i("star"),Oe=0,Fe=at===void 0?0:at;(Vt=rt())!==null;)Oe+=1,d(xt,Vt);return Oe>=Fe?xt:(c(Be),null)}}function C(rt){return rt.charCodeAt(0)>=128}function k(){return p("cr",m("\r")())}function w(){return p("crlf",_(k,A)())}function T(){return p("dquote",m('"')())}function M(){return p("htab",m(" ")())}function A(){return p("lf",m(` `)())}function R(){return p("sp",m(" ")())}function H(){return p("vchar",v(function(rt){var at=rt.charCodeAt(0),xt=33<=at&&at<=126;return a.rfc6532&&(xt=xt||C(rt)),xt}))}function L(){return p("wsp",y(R,M)())}function V(){var rt=p("quoted-pair",y(_(m("\\"),y(H,L)),W)());return rt===null?null:(rt.semantic=rt.semantic[1],rt)}function j(){return p("fws",y(ne,_(b(_(x(L),E(w))),x(L,1)))())}function oe(){return p("ctext",y(function(){return v(function(rt){var at=rt.charCodeAt(0),xt=33<=at&&at<=39||42<=at&&at<=91||93<=at&&at<=126;return a.rfc6532&&(xt=xt||C(rt)),xt})},le)())}function Te(){return p("ccontent",y(oe,V,pe)())}function pe(){return p("comment",_(m("("),x(_(b(j),Te)),b(j),m(")"))())}function ye(){return p("cfws",y(_(x(_(b(j),pe),1),b(j)),j)())}function de(){return p("atext",v(function(rt){var at="a"<=rt&&rt<="z"||"A"<=rt&&rt<="Z"||"0"<=rt&&rt<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(rt)>=0;return a.rfc6532&&(at=at||C(rt)),at}))}function xe(){return p("atom",_(D(b(ye)),x(de,1),D(b(ye)))())}function Y(){var rt,at;return(rt=p("dot-atom-text",x(de,1)()))===null||(at=x(_(m("."),x(de,1)))())!==null&&d(rt,at),rt}function se(){return p("dot-atom",_(E(b(ye)),Y,E(b(ye)))())}function be(){return p("qtext",y(function(){return v(function(rt){var at=rt.charCodeAt(0),xt=at===33||35<=at&&at<=91||93<=at&&at<=126;return a.rfc6532&&(xt=xt||C(rt)),xt})},F)())}function _e(){return p("qcontent",y(be,V)())}function re(){return p("quoted-string",_(E(b(ye)),E(T),x(_(b(D(j)),_e)),b(E(j)),E(T),E(b(ye)))())}function Q(){return p("word",y(xe,re)())}function B(){return p("address",y(I,he)())}function I(){return p("mailbox",y(Z,ke)())}function Z(){return p("name-addr",_(b(Ee),ee)())}function ee(){return p("angle-addr",y(_(E(b(ye)),m("<"),ke,m(">"),E(b(ye))),ue)())}function he(){return p("group",_(Ee,m(":"),b(ae),m(";"),E(b(ye)))())}function Ee(){return p("display-name",((rt=p("phrase",y(X,x(Q,1))()))!==null&&(rt.semantic=function(at){return at.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")}(rt.semantic)),rt));var rt}function J(){return p("mailbox-list",y(_(I,x(_(m(","),I))),ce)())}function G(){return p("address-list",y(_(B,x(_(m(","),B))),Ve)())}function ae(){return p("group-list",y(J,E(ye),Je)())}function q(){return p("local-part",y(_t,se,re)())}function Pe(){return p("dtext",y(function(){return v(function(rt){var at=rt.charCodeAt(0),xt=33<=at&&at<=90||94<=at&&at<=126;return a.rfc6532&&(xt=xt||C(rt)),xt})},At)())}function me(){return p("domain-literal",_(E(b(ye)),m("["),x(_(b(j),Pe)),b(j),m("]"),E(b(ye)))())}function U(){return p("domain",(rt=y(Tt,se,me)(),a.rejectTLD&&rt&&rt.semantic&&rt.semantic.indexOf(".")<0?null:(rt&&(rt.semantic=rt.semantic.replace(/\s+/g,"")),rt)));var rt}function ke(){return p("addr-spec",_(q,m("@"),U)())}function ge(){return a.strict?null:p("obs-NO-WS-CTL",v(function(rt){var at=rt.charCodeAt(0);return 1<=at&&at<=8||at===11||at===12||14<=at&&at<=31||at===127}))}function le(){return a.strict?null:p("obs-ctext",ge())}function F(){return a.strict?null:p("obs-qtext",ge())}function W(){return a.strict?null:p("obs-qp",_(m("\\"),y(m("\0"),ge,A,k))())}function X(){return a.strict?null:a.atInDisplayName?p("obs-phrase",_(Q,x(y(Q,m("."),m("@"),D(ye))))()):p("obs-phrase",_(Q,x(y(Q,m("."),D(ye))))())}function ne(){return a.strict?null:p("obs-FWS",x(_(E(b(w)),L),1)())}function ue(){return a.strict?null:p("obs-angle-addr",_(E(b(ye)),m("<"),we,ke,m(">"),E(b(ye)))())}function we(){return a.strict?null:p("obs-route",_(fe,m(":"))())}function fe(){return a.strict?null:p("obs-domain-list",_(x(y(E(ye),m(","))),m("@"),U,x(_(m(","),E(b(ye)),b(_(m("@"),U)))))())}function ce(){return a.strict?null:p("obs-mbox-list",_(x(_(E(b(ye)),m(","))),I,x(_(m(","),b(_(I,E(ye))))))())}function Ve(){return a.strict?null:p("obs-addr-list",_(x(_(E(b(ye)),m(","))),B,x(_(m(","),b(_(B,E(ye))))))())}function Je(){return a.strict?null:p("obs-group-list",_(x(_(E(b(ye)),m(",")),1),E(b(ye)))())}function _t(){return a.strict?null:p("obs-local-part",_(Q,x(_(m("."),Q)))())}function Tt(){return a.strict?null:p("obs-domain",_(xe,x(_(m("."),xe)))())}function At(){return a.strict?null:p("obs-dtext",y(ge,V)())}function It(rt,at){var xt,Vt,Oe;if(at==null)return null;for(Vt=[at];Vt.length>0;){if((Oe=Vt.pop()).name===rt)return Oe;for(xt=Oe.children.length-1;xt>=0;xt-=1)Vt.push(Oe.children[xt])}return null}function ht(rt,at){var xt,Vt,Oe,Be,Fe;if(at==null)return null;for(Vt=[at],Be=[],Fe={},xt=0;xt0;)if((Oe=Vt.pop()).name in Fe)Be.push(Oe);else for(xt=Oe.children.length-1;xt>=0;xt-=1)Vt.push(Oe.children[xt]);return Be}function Rt(rt){var at,xt,Vt,Oe,Be;if(rt===null)return null;for(at=[],xt=ht(["group","mailbox"],rt),Vt=0;Vt1?null:Fe.addresses&&Fe.addresses[0]}(Be):a.simple?Be&&Be.addresses:Be}function Pt(rt){var at,xt=It("display-name",rt),Vt=[],Oe=ht(["mailbox"],rt);for(at=0;at0;)for((yt=pt.pop()).name===Le&&Dt.push(yt),ot=yt.children.length-1;ot>=0;ot-=1)pt.push(yt.children[ot]);return Dt}("cfws",rt),Oe=ht(["comment"],rt),Be=It("local-part",xt),Fe=It("domain",xt);return{node:rt,parts:{name:at,address:xt,local:Be,domain:Fe,comments:Vt},type:rt.name,name:an(at),address:an(xt),local:an(Be),domain:an(Fe),comments:Jt(Oe),groupName:an(rt.groupName)}}function an(rt){return rt!=null?rt.semantic:null}function Jt(rt){var at="";if(rt)for(var xt=0;xt`),n.userID=r.join(" "),n}read(t,n=Bt){const r=Ae.decodeUTF8(t);if(r.length>n.maxUserIDLength)throw Error("User ID string is too long");try{const{name:a,address:s,comments:l}=wK.parseOneAddress({input:r,atInDisplayName:!0});this.comment=l.replace(/^\(|\)$/g,""),this.name=a,this.email=s}catch{}this.userID=r}write(){return Ae.encodeUTF8(this.userID)}equals(t){return t&&t.userID===this.userID}}class B1 extends kg{static get tag(){return ve.packet.secretSubkey}constructor(t=new Date,n=Bt){super(t,n)}}class UO{constructor(t){this.packets=t||new Gn}write(){return this.packets.write()}armor(t=Bt){return Af(ve.armor.signature,this.write(),void 0,void 0,void 0,t)}getSigningKeyIDs(){return this.packets.map(t=>t.issuerKeyID)}}async function VO(e,t){const n=new B1(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 CK(e,t){const n=new kg(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 ms(e,t,n,r,a=new Date,s){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,a,void 0,s),l=e[h])}catch(i){c=i}if(!l)throw Ae.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,i,p)=>i+" "+p.toLowerCase()),c);return l}function Z0(e,t,n=new Date){const r=Ae.normalizeDate(n);if(r!==null){const a=$m(e,t);return!(e.created<=r&&r0&&(s.keyExpirationTime=n.keyExpirationTime,s.keyNeverExpires=!1),await s.sign(t,a,n.date),s}async function Og(e,t,n=new Date,r={},a){let s=a.preferredHashAlgorithm,l=s;if(e){const c=await e.getPrimaryUser(n,r,a);c.selfCertification.preferredHashAlgorithms&&([l]=c.selfCertification.preferredHashAlgorithms,s=Kt.hash.getHashByteLength(s)<=Kt.hash.getHashByteLength(l)?l:s)}switch(Object.getPrototypeOf(t)){case kg.prototype:case Wa.prototype:case B1.prototype:case Bf.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(s)<=Kt.hash.getHashByteLength(l)?l:s}async function Q0(e,t=[],n=new Date,r=[],a=Bt){const s={symmetric:ve.symmetric.aes128,aead:ve.aead.eax,compression:ve.compression.uncompressed}[e],l={symmetric:a.preferredSymmetricAlgorithm,aead:a.preferredAEADAlgorithm,compression:a.preferredCompressionAlgorithm}[e],c={symmetric:"preferredSymmetricAlgorithms",aead:"preferredAEADAlgorithms",compression:"preferredCompressionAlgorithms"}[e];return(await Promise.all(t.map(async function(h,i){const p=(await h.getPrimaryUser(n,r[i],a)).selfCertification[c];return!!p&&p.indexOf(l)>=0}))).every(Boolean)?l:s}async function eu(e,t,n,r,a,s,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 i=new li;return Object.assign(i,r),i.publicKeyAlgorithm=n.algorithm,i.hashAlgorithm=await Og(t,n,a,s,h),i.rawNotations=l,await i.sign(n,e,a,c),i}async function Vl(e,t,n,r=new Date,a){(e=e[n])&&(t[n].length?await Promise.all(e.map(async function(s){s.isExpired(r)||a&&!await a(s)||t[n].some(function(l){return Ae.equalsUint8Array(l.writeParams(),s.writeParams())})||t[n].push(s)})):t[n]=e)}async function hc(e,t,n,r,a,s,l=new Date,c){s=s||e;const h=[];return await Promise.all(r.map(async function(i){try{a&&!i.issuerKeyID.equals(a.issuerKeyID)||(await i.verify(s,t,n,c.revocationsExpire?l:null,!1,c),h.push(i.issuerKeyID))}catch{}})),a?(a.revoked=!!h.some(i=>i.equals(a.issuerKeyID))||a.revoked||!1,a.revoked):h.length>0}function $m(e,t){let n;return t.keyNeverExpires===!1&&(n=e.created.getTime()+1e3*t.keyExpirationTime),n?new Date(n):1/0}function q0(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=Ae.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 nk(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 rk(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 ik(e,t){return!!t.allowInsecureDecryptionWithSigningKeys||!e.keyFlags||(e.keyFlags[0]&ve.keyFlags.encryptCommunication)!=0||(e.keyFlags[0]&ve.keyFlags.encryptStorage)!=0}function Xu(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 i.length===0?null:(await Promise.all(i.map(async p=>{const d=await p.getSigningKey(h,t.created,void 0,a);if(t.revoked||await s.isRevoked(t,d.keyPacket,r,a))throw Error("User certificate is revoked");try{await t.verify(d.keyPacket,ve.signature.certGeneric,c,r,void 0,a)}catch(v){throw Ae.wrapError("User certificate is invalid",v)}})),!0)}async verifyAllCertifications(t,n=new Date,r){const a=this,s=this.selfCertifications.concat(this.otherCertifications);return Promise.all(s.map(async l=>({keyID:l.issuerKeyID,valid:await a.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,a=this.mainKey.keyPacket,s={userID:this.userID,userAttribute:this.userAttribute,key:a};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(a,ve.signature.certGeneric,s,t,void 0,n)}catch(i){throw Ae.wrapError("Self-certification is invalid",i)}return!0}catch(h){l=h}throw l}async update(t,n,r){const a=this.mainKey.keyPacket,s={userID:this.userID,userAttribute:this.userAttribute,key:a};await Vl(t,this,"selfCertifications",n,async function(l){try{return await l.verify(a,ve.signature.certGeneric,s,n,!1,r),!0}catch{return!1}}),await Vl(t,this,"otherCertifications",n),await Vl(t,this,"revocationSignatures",n,function(l){return hc(a,ve.signature.certRevocation,s,[l],void 0,void 0,n,r)})}async revoke(t,{flag:n=ve.reasonForRevocation.noReason,string:r=""}={},a=new Date,s=Bt){const l={userID:this.userID,userAttribute:this.userAttribute,key:t},c=new ef(l.userID||l.userAttribute,this.mainKey);return c.revocationSignatures.push(await eu(l,null,t,{signatureType:ve.signature.certRevocation,reasonForRevocationFlag:ve.write(ve.reasonForRevocation,n),reasonForRevocationString:r},a,void 0,void 0,!1,s)),await c.update(this),c}}class pc{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 pc(this.keyPacket,this.mainKey);return t.bindingSignatures=[...this.bindingSignatures],t.revocationSignatures=[...this.revocationSignatures],t}async isRevoked(t,n,r=new Date,a=Bt){const s=this.mainKey.keyPacket;return hc(s,ve.signature.subkeyRevocation,{key:s,bind:this.keyPacket},this.revocationSignatures,t,n,r,a)}async verify(t=new Date,n=Bt){const r=this.mainKey.keyPacket,a={key:r,bind:this.keyPacket},s=await ms(this.bindingSignatures,r,ve.signature.subkeyBinding,a,t,n);if(s.revoked||await this.isRevoked(s,null,t,n))throw Error("Subkey is revoked");if(Z0(this.keyPacket,s,t))throw Error("Subkey is expired");return s}async getExpirationTime(t=new Date,n=Bt){const r=this.mainKey.keyPacket,a={key:r,bind:this.keyPacket};let s;try{s=await ms(this.bindingSignatures,r,ve.signature.subkeyBinding,a,t,n)}catch{return null}const l=$m(this.keyPacket,s),c=s.getExpirationTime();return ls.bindingSignatures[h].created&&(s.bindingSignatures[h]=c),!1;try{return await c.verify(a,ve.signature.subkeyBinding,l,n,void 0,r),!0}catch{return!1}}),await Vl(t,this,"revocationSignatures",n,function(c){return hc(a,ve.signature.subkeyRevocation,l,[c],void 0,void 0,n,r)})}async revoke(t,{flag:n=ve.reasonForRevocation.noReason,string:r=""}={},a=new Date,s=Bt){const l={key:t,bind:this.keyPacket},c=new pc(this.keyPacket,this.mainKey);return c.revocationSignatures.push(await eu(l,null,t,{signatureType:ve.signature.subkeyRevocation,reasonForRevocationFlag:ve.write(ve.reasonForRevocation,n),reasonForRevocationString:r},a,void 0,void 0,!1,s)),await c.update(this),c}hasSameFingerprintAs(t){return this.keyPacket.hasSameFingerprintAs(t.keyPacket||t)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach(e=>{pc.prototype[e]=function(){return this.keyPacket[e]()}});const xK=Ae.constructAllowedPackets([li]),ak=new Set([ve.packet.publicKey,ve.packet.privateKey]),sk=new Set([ve.packet.publicKey,ve.packet.privateKey,ve.packet.publicSubkey,ve.packet.privateSubkey]);class HO{packetListToStructure(t,n=new Set){let r,a,s,l;for(const c of t){if(c instanceof V0){sk.has(c.tag)&&!l&&(l=ak.has(c.tag)?ak:sk);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,a=this.getKeyID(),!a)throw Error("Missing Key ID");break;case ve.packet.userID:case ve.packet.userAttribute:r=new ef(c,this),this.users.push(r);break;case ve.packet.publicSubkey:case ve.packet.secretSubkey:r=null,s=new pc(c,this),this.subkeys.push(s);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){Ae.printDebug("Dropping certification signatures without preceding user packet");continue}c.issuerKeyID.equals(a)?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(!s){Ae.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}s.bindingSignatures.push(c);break;case ve.signature.keyRevocation:this.revocationSignatures.push(c);break;case ve.signature.subkeyRevocation:if(!s){Ae.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}s.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 a={};Object.keys(r.keyPacket.privateParams).forEach(s=>{a[s]=new Uint8Array(r.keyPacket.privateParams[s])}),r.keyPacket.privateParams=a}),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={},a=Bt){await this.verifyPrimaryKey(n,r,a);const s=this.keyPacket,l=this.subkeys.slice().sort((h,i)=>i.keyPacket.created-h.keyPacket.created);let c;for(const h of l)if(!t||h.getKeyID().equals(t))try{await h.verify(n,a);const i={key:s,bind:h.keyPacket},p=await ms(h.bindingSignatures,s,ve.signature.subkeyBinding,i,n,a);if(!nk(h.keyPacket,p))continue;if(!p.embeddedSignature)throw Error("Missing embedded signature");return await ms([p.embeddedSignature],h.keyPacket,ve.signature.keyBinding,i,n,a),Xu(h.keyPacket,a),h}catch(i){c=i}try{const h=await this.getPrimaryUser(n,r,a);if((!t||s.getKeyID().equals(t))&&nk(s,h.selfCertification))return Xu(s,a),this}catch(h){c=h}throw Ae.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),c)}async getEncryptionKey(t,n=new Date,r={},a=Bt){await this.verifyPrimaryKey(n,r,a);const s=this.keyPacket,l=this.subkeys.slice().sort((h,i)=>i.keyPacket.created-h.keyPacket.created);let c;for(const h of l)if(!t||h.getKeyID().equals(t))try{await h.verify(n,a);const i={key:s,bind:h.keyPacket},p=await ms(h.bindingSignatures,s,ve.signature.subkeyBinding,i,n,a);if(rk(h.keyPacket,p))return Xu(h.keyPacket,a),h}catch(i){c=i}try{const h=await this.getPrimaryUser(n,r,a);if((!t||s.getKeyID().equals(t))&&rk(s,h.selfCertification))return Xu(s,a),this}catch(h){c=h}throw Ae.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),c)}async isRevoked(t,n,r=new Date,a=Bt){return hc(this.keyPacket,ve.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,t,n,r,a)}async verifyPrimaryKey(t=new Date,n={},r=Bt){const a=this.keyPacket;if(await this.isRevoked(null,null,t,r))throw Error("Primary key is revoked");const{selfCertification:s}=await this.getPrimaryUser(t,n,r);if(Z0(a,s,t))throw Error("Primary key is expired");const l=await ms(this.directSignatures,a,ve.signature.key,{key:a},t,r).catch(()=>{});if(l&&Z0(a,l,t))throw Error("Primary key is expired")}async getExpirationTime(t,n=Bt){let r;try{const{selfCertification:a}=await this.getPrimaryUser(null,t,n),s=$m(this.keyPacket,a),l=a.getExpirationTime(),c=await ms(this.directSignatures,this.keyPacket,ve.signature.key,{key:this.keyPacket},null,n).catch(()=>{});if(c){const h=$m(this.keyPacket,c);r=Math.min(s,l,h)}else r=st.subkeys.some(l=>s.hasSameFingerprintAs(l)))))throw Error("Cannot update public key with private key if subkeys mismatch");return t.update(this,r)}const a=this.clone();return await Vl(t,a,"revocationSignatures",n,s=>hc(a.keyPacket,ve.signature.keyRevocation,a,[s],null,t.keyPacket,n,r)),await Vl(t,a,"directSignatures",n),await Promise.all(t.users.map(async s=>{const l=a.users.filter(c=>s.userID&&s.userID.equals(c.userID)||s.userAttribute&&s.userAttribute.equals(c.userAttribute));if(l.length>0)await Promise.all(l.map(c=>c.update(s,n,r)));else{const c=s.clone();c.mainKey=a,a.users.push(c)}})),await Promise.all(t.subkeys.map(async s=>{const l=a.subkeys.filter(c=>c.hasSameFingerprintAs(s));if(l.length>0)await Promise.all(l.map(c=>c.update(s,n,r)));else{const c=s.clone();c.mainKey=a,a.subkeys.push(c)}})),a}async getRevocationCertificate(t=new Date,n=Bt){const r={key:this.keyPacket},a=await ms(this.revocationSignatures,this.keyPacket,ve.signature.keyRevocation,r,t,n),s=new Gn;return s.push(a),Af(ve.armor.publicKey,s.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(t,n=new Date,r=Bt){const a=await Pf(t,r),s=(await Gn.fromBinary(a.data,xK,r)).findPacket(ve.packet.signature);if(!s||s.signatureType!==ve.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!s.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await s.verify(this.keyPacket,ve.signature.keyRevocation,{key:this.keyPacket},n,void 0,r)}catch(c){throw Ae.wrapError("Could not verify revocation signature",c)}const l=this.clone();return l.revocationSignatures.push(s),l}async signPrimaryUser(t,n,r,a=Bt){const{index:s,user:l}=await this.getPrimaryUser(n,r,a),c=await l.certify(t,n,a),h=this.clone();return h.users[s]=c,h}async signAllUsers(t,n=new Date,r=Bt){const a=this.clone();return a.users=await Promise.all(this.users.map(function(s){return s.certify(t,n,r)})),a}async verifyPrimaryUser(t,n=new Date,r,a=Bt){const s=this.keyPacket,{user:l}=await this.getPrimaryUser(n,r,a);return t?await l.verifyAllCertifications(t,n,a):[{keyID:s.getKeyID(),valid:await l.verify(n,a).catch(()=>!1)}]}async verifyAllUsers(t,n=new Date,r=Bt){const a=this.keyPacket,s=[];return await Promise.all(this.users.map(async l=>{const c=t?await l.verifyAllCertifications(t,n,r):[{keyID:a.getKeyID(),valid:await l.verify(n,r).catch(()=>!1)}];s.push(...c.map(h=>({userID:l.userID.userID,keyID:h.keyID,valid:h.valid})))})),s}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach(e=>{HO.prototype[e]=pc.prototype[e]});class eb extends HO{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=Bt){return Af(ve.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,t)}}class Ff extends eb{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 a=Wa.fromSecretKeyPacket(r);t.push(a);break}case ve.packet.secretSubkey:{const a=Bf.fromSecretSubkeyPacket(r);t.push(a);break}default:t.push(r)}return new eb(t)}armor(t=Bt){return Af(ve.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,t)}async getDecryptionKeys(t,n=new Date,r={},a=Bt){const s=this.keyPacket,l=[];for(let h=0;ht.isDecrypted())}async validate(t=Bt){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(a=>a.keyPacket.isDummy()).every(Boolean))throw Error("Cannot validate an all-gnu-dummy key");return Promise.all(r.map(async a=>a.keyPacket.validate()))}}clearPrivateParams(){this.getKeys().forEach(({keyPacket:t})=>{t.isDecrypted()&&t.clearPrivateParams()})}async revoke({flag:t=ve.reasonForRevocation.noReason,string:n=""}={},r=new Date,a=Bt){if(!this.isPrivate())throw Error("Need private key for revoking");const s={key:this.keyPacket},l=this.clone();return l.revocationSignatures.push(await eu(s,null,this.keyPacket,{signatureType:ve.signature.keyRevocation,reasonForRevocationFlag:ve.write(ve.reasonForRevocation,t),reasonForRevocationString:n},r,void 0,void 0,void 0,a)),l}async addSubkey(t={}){const n={...Bt,...t.config};if(t.passphrase)throw Error("Subkey could not be encrypted here, please encrypt whole key");if(t.rsaBits_!==m)]}const i=Dg.fromObject(l),p={};p.userID=i,p.key=e;const d=new li;return d.signatureType=ve.signature.certGeneric,d.publicKeyAlgorithm=e.algorithm,d.hashAlgorithm=await Og(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:i,signaturePacket:d}})).then(l=>{l.forEach(({userIDPacket:c,signaturePacket:h})=>{a.push(c),a.push(h)})}),await Promise.all(t.map(async function(l,c){const h=n.subkeys[c];return{secretSubkeyPacket:l,subkeySignaturePacket:await WO(l,e,h,r)}})).then(l=>{l.forEach(({secretSubkeyPacket:c,subkeySignaturePacket:h})=>{a.push(c),a.push(h)})});const s={key:e};return a.push(await eu(s,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 Ff(a)}async function kK({armoredKey:e,binaryKey:t,config:n,...r}){if(n={...Bt,...n},!e&&!t)throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!Ae.isString(e))throw Error("readKey: options.armoredKey must be a string");if(t&&!Ae.isUint8Array(t))throw Error("readKey: options.binaryKey must be a Uint8Array");const a=Object.keys(r);if(a.length>0)throw Error("Unknown option: "+a.join(", "));let s;if(e){const{type:l,data:c}=await Pf(e,n);if(l!==ve.armor.publicKey&&l!==ve.armor.privateKey)throw Error("Armored text not of type key");s=c}else s=t;return SK(await Gn.fromBinary(s,KO,n))}async function DK({armoredKey:e,binaryKey:t,config:n,...r}){if(n={...Bt,...n},!e&&!t)throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`");if(e&&!Ae.isString(e))throw Error("readPrivateKey: options.armoredKey must be a string");if(t&&!Ae.isUint8Array(t))throw Error("readPrivateKey: options.binaryKey must be a Uint8Array");const a=Object.keys(r);if(a.length>0)throw Error("Unknown option: "+a.join(", "));let s;if(e){const{type:c,data:h}=await Pf(e,n);if(c!==ve.armor.privateKey)throw Error("Armored text not of type private key");s=h}else s=t;const l=await Gn.fromBinary(s,KO,n);return new Ff(l)}const OK=Ae.constructAllowedPackets([Dc,Nf,Eg,zO,bK,J0,fc,Ga,li]),TK=Ae.constructAllowedPackets([fc]),PK=Ae.constructAllowedPackets([li]);class Da{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,a=new Date,s=Bt){const l=r||await this.decryptSessionKeys(t,n,a,s),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 i=null;const p=Promise.all(l.map(async({algorithm:v,data:m})=>{if(!Ae.isUint8Array(m)||!Ae.isString(v))throw Error("Invalid session key for decryption.");try{const _=ve.write(ve.symmetric,v);await h.decrypt(_,m,s)}catch(_){Ae.printDebugError(_),i=_}}));if(R0(h.encrypted),h.encrypted=null,await p,!h.packets||!h.packets.length)throw i||Error("Decryption failed.");const d=new Da(h.packets);return h.packets=new Gn,d}async decryptSessionKeys(t,n,r=new Date,a=Bt){let s,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,i){let p;p=i?await Gn.fromBinary(c.write(),TK,a):c,await Promise.all(p.map(async function(d){try{await d.decrypt(h),l.push(d)}catch(v){Ae.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(i){let p=[ve.symmetric.aes256,ve.symmetric.aes128,ve.symmetric.tripledes,ve.symmetric.cast5];try{const v=await i.getPrimaryUser(r,void 0,a);v.selfCertification.preferredSymmetricAlgorithms&&(p=p.concat(v.selfCertification.preferredSymmetricAlgorithms))}catch{}const d=(await i.getDecryptionKeys(h.publicKeyID,null,void 0,a)).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(a.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(a.constantTimePKCS1DecryptionSupportedSymmetricAlgorithms).map(async _=>{const y=new J0;y.read(m);const b={sessionKeyAlgorithm:_,sessionKey:Kt.generateSessionKey(_)};try{await y.decrypt(v,b),l.push(y)}catch(E){Ae.printDebugError(E),s=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){Ae.printDebugError(m),s=m}}}))})),R0(h.encrypted),h.encrypted=null}))}}if(l.length>0){if(l.length>1){const c=new Set;l=l.filter(h=>{const i=h.sessionKeyAlgorithm+Ae.uint8ArrayToString(h.sessionKey);return!c.has(i)&&(c.add(i),!0)})}return l.map(c=>({data:c.sessionKey,algorithm:ve.read(ve.symmetric,c.sessionKeyAlgorithm)}))}throw s||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=[],a=Bt){const s=await Q0("symmetric",t,n,r,a),l=ve.read(ve.symmetric,s),c=a.aeadProtect&&await async function(h,i=new Date,p=[],d=Bt){let v=!0;return await Promise.all(h.map(async function(m,_){const y=await m.getPrimaryUser(i,p[_],d);y.selfCertification.features&&y.selfCertification.features[0]&ve.features.aead||(v=!1)})),v}(t,n,r,a)?ve.read(ve.aead,await Q0("aead",t,n,r,a)):void 0;return{data:Kt.generateSessionKey(s),algorithm:l,aeadAlgorithm:c}}async encrypt(t,n,r,a=!1,s=[],l=new Date,c=[],h=Bt){if(r){if(!Ae.isUint8Array(r.data)||!Ae.isString(r.algorithm))throw Error("Invalid session key for encryption.")}else if(t&&t.length)r=await Da.generateSessionKey(t,l,c,h);else{if(!n||!n.length)throw Error("No keys, passwords, or session key provided.");r=await Da.generateSessionKey(void 0,void 0,void 0,h)}const{data:i,algorithm:p,aeadAlgorithm:d}=r,v=await Da.encryptSessionKey(i,p,d,t,n,a,s,l,c,h);let m;d?(m=new Eg,m.aeadAlgorithm=ve.write(ve.aead,d)):m=new zO,m.packets=this.packets;const _=ve.write(ve.symmetric,p);return await m.encrypt(_,i,h),v.packets.push(m),m.packets=new Gn,v}static async encryptSessionKey(t,n,r,a,s,l=!1,c=[],h=new Date,i=[],p=Bt){const d=new Gn,v=ve.write(ve.symmetric,n),m=r&&ve.write(ve.aead,r);if(a){const _=await Promise.all(a.map(async function(y,b){const E=await y.getEncryptionKey(c[b],h,i,p),D=new J0;return D.publicKeyID=l?Zo.wildcard():E.getKeyID(),D.publicKeyAlgorithm=E.keyPacket.algorithm,D.sessionKey=t,D.sessionKeyAlgorithm=v,await D.encrypt(E.keyPacket),delete D.sessionKey,D}));d.push(..._)}if(s){const _=async function(D,x){try{return await D.decrypt(x),1}catch{return 0}},y=(D,x)=>D+x,b=async function(D,x,C,k){const w=new fc(p);return w.sessionKey=D,w.sessionKeyAlgorithm=x,C&&(w.aeadAlgorithm=C),await w.encrypt(k,p),p.passwordCollisionCheck&&(await Promise.all(s.map(T=>_(w,T)))).reduce(y)!==1?b(D,x,k):(delete w.sessionKey,w)},E=await Promise.all(s.map(D=>b(t,v,m,D)));d.push(...E)}return new Da(d)}async sign(t=[],n=null,r=[],a=new Date,s=[],l=[],c=Bt){const h=new Gn,i=this.packets.findPacket(ve.packet.literalData);if(!i)throw Error("No literal data packet to sign.");let p,d;const v=i.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 Ga;_.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,a,s,c),E=new Ga;return E.signatureType=v,E.hashAlgorithm=await Og(m,b.keyPacket,a,s,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(i),h.push(...await ok(i,t,n,r,a,s,l,!1,c)),new Da(h)}compress(t,n=Bt){if(t===ve.compression.uncompressed)return this;const r=new Nf(n);r.algorithm=t,r.packets=this.packets;const a=new Gn;return a.push(r),new Da(a)}async signDetached(t=[],n=null,r=[],a=new Date,s=[],l=[],c=Bt){const h=this.packets.findPacket(ve.packet.literalData);if(!h)throw Error("No literal data packet to sign.");return new UO(await ok(h,t,n,r,a,s,l,!0,c))}async verify(t,n=new Date,r=Bt){const a=this.unwrapCompressed(),s=a.packets.filterByTag(ve.packet.literalData);if(s.length!==1)throw Error("Can only verify message with one literal data packet.");Tr(a.packets.stream)&&a.packets.push(...await Ar(a.packets.stream,h=>h||[]));const l=a.packets.filterByTag(ve.packet.onePassSignature).reverse(),c=a.packets.filterByTag(ve.packet.signature);return l.length&&!c.length&&Ae.isStream(a.packets.stream)&&!Tr(a.packets.stream)?(await Promise.all(l.map(async h=>{h.correspondingSig=new Promise((i,p)=>{h.correspondingSigResolve=i,h.correspondingSigReject=p}),h.signatureData=rl(async()=>(await h.correspondingSig).signatureData),h.hashed=Ar(await h.hash(h.signatureType,s[0],void 0,!1)),h.hashed.catch(()=>{})})),a.packets.stream=lo(a.packets.stream,async(h,i)=>{const p=Bs(h),d=ta(i);try{for(let v=0;v{m.correspondingSigReject(v)}),await d.abort(v)}}),Ey(l,s,t,n,!1,r)):Ey(c,s,t,n,!1,r)}verifyDetached(t,n,r=new Date,a=Bt){const s=this.unwrapCompressed().packets.filterByTag(ve.packet.literalData);if(s.length!==1)throw Error("Can only verify message with one literal data packet.");return Ey(t.packets,s,n,r,!0,a)}unwrapCompressed(){const t=this.packets.filterByTag(ve.packet.compressedData);return t.length?new Da(t[0].packets):this}async appendSignature(t,n=Bt){await this.packets.read(Ae.isUint8Array(t)?t:(await Pf(t)).data,PK,n)}write(){return this.packets.write()}armor(t=Bt){return Af(ve.armor.message,this.write(),null,null,null,t)}}async function ok(e,t,n=null,r=[],a=new Date,s=[],l=[],c=!1,h=Bt){const i=new Gn,p=e.text===null?ve.signature.binary:ve.signature.text;if(await Promise.all(t.map(async(d,v)=>{const m=s[v];if(!d.isPrivate())throw Error("Need private key for signing");const _=await d.getSigningKey(r[v],a,m,h);return eu(e,d,_.keyPacket,{signatureType:p},a,m,l,c,h)})).then(d=>{i.push(...d)}),n){const d=n.packets.filterByTag(ve.packet.signature);i.push(...d)}return i}async function Ey(e,t,n,r=new Date,a=!1,s=Bt){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,i,p=new Date,d=!1,v=Bt){let m,_;for(const E of i){const D=E.getKeys(c.issuerKeyID);if(D.length>0){m=E,_=D[0];break}}const y=c instanceof Ga?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(D){if(!v.allowInsecureVerificationWithReformattedKeys||!D.message.match(/Signature creation time is in the future/))throw D;await m.getSigningKey(_.getKeyID(),p,void 0,v)}return!0})(),signature:(async()=>{const E=await y,D=new Gn;return E&&D.push(E),new UO(D)})()};return b.signature.catch(()=>{}),b.verified.catch(()=>{}),b}(l,t,n,r,a,s)}))}async function AK({armoredMessage:e,binaryMessage:t,config:n,...r}){n={...Bt,...n};let a=e||t;if(!a)throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`");if(e&&!Ae.isString(e)&&!Ae.isStream(e))throw Error("readMessage: options.armoredMessage must be a string or stream");if(t&&!Ae.isUint8Array(t)&&!Ae.isStream(t))throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream");const s=Object.keys(r);if(s.length>0)throw Error("Unknown option: "+s.join(", "));const l=Ae.isStream(a);if(l&&(await C8(),a=Tf(a)),e){const{type:i,data:p}=await Pf(a,n);if(i!==ve.armor.message)throw Error("Armored text not of type message");a=p}const c=await Gn.fromBinary(a,OK,n),h=new Da(c);return h.fromStream=l,h}async function MK({text:e,binary:t,filename:n,date:r=new Date,format:a=e!==void 0?"utf8":"binary",...s}){let l=e!==void 0?e:t;if(l===void 0)throw Error("createMessage: must pass options object containing `text` or `binary`");if(e&&!Ae.isString(e)&&!Ae.isStream(e))throw Error("createMessage: options.text must be a string or stream");if(t&&!Ae.isUint8Array(t)&&!Ae.isStream(t))throw Error("createMessage: options.binary must be a Uint8Array or stream");const c=Object.keys(s);if(c.length>0)throw Error("Unknown option: "+c.join(", "));const h=Ae.isStream(l);h&&(await C8(),l=Tf(l));const i=new Dc(r);e!==void 0?i.setText(l,ve.write(ve.literal,a)):i.setBytes(l,ve.write(ve.literal,a)),n!==void 0&&i.setFilename(n);const p=new Gn;p.push(i);const d=new Da(p);return d.fromStream=h,d}async function IK({userIDs:e=[],passphrase:t,type:n="ecc",rsaBits:r=4096,curve:a="curve25519",keyExpirationTime:s=0,date:l=new Date,subkeys:c=[{}],format:h="armored",config:i,...p}){Tg(i={...Bt,...i}),e=ca(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"&&rq0(y.subkeys[w],y));let E=[CK(y,b)];E=E.concat(y.subkeys.map(k=>VO(k,b)));const D=await Promise.all(E),x=await EK(D[0],D.slice(1),y,b),C=await x.getRevocationCertificate(y.date,b);return x.revocationSignatures=[],{key:x,revocationCertificate:C}}(v,i);return m.getKeys().forEach(({keyPacket:y})=>Xu(y,i)),{privateKey:lk(m,h,i),publicKey:lk(m.toPublic(),h,i),revocationCertificate:_}}catch(m){throw Ae.wrapError("Error generating keypair",m)}}async function $K({privateKey:e,passphrase:t,config:n,...r}){Tg(n={...Bt,...n});const a=Object.keys(r);if(a.length>0)throw Error("Unknown option: "+a.join(", "));if(!e.isPrivate())throw Error("Cannot decrypt a public key");const s=e.clone(!0),l=Ae.isArray(t)?t:[t];try{return await Promise.all(s.getKeys().map(c=>Ae.anyPromise(l.map(h=>c.keyPacket.decrypt(h))))),await s.validate(n),s}catch(c){throw s.clearPrivateParams(),Ae.wrapError("Error decrypting private key",c)}}async function RK({message:e,encryptionKeys:t,signingKeys:n,passwords:r,sessionKey:a,format:s="armored",signature:l=null,wildcard:c=!1,signingKeyIDs:h=[],encryptionKeyIDs:i=[],date:p=new Date,signingUserIDs:d=[],encryptionUserIDs:v=[],signatureNotations:m=[],config:_,...y}){if(Tg(_={...Bt,..._}),GO(e),NK(s),t=ca(t),n=ca(n),r=ca(r),h=ca(h),i=ca(i),d=ca(d),v=ca(v),m=ca(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 Q0("compression",t,p,v,_),_),e=await e.encrypt(t,r,a,c,i,p,v,_),s==="object")return e;const D=s==="armored";return YO(D?e.armor(_):e.write(),E,D?"utf8":"binary")}catch(D){throw Ae.wrapError("Error encrypting message",D)}}async function LK({message:e,decryptionKeys:t,passwords:n,sessionKeys:r,verificationKeys:a,expectSigned:s=!1,format:l="utf8",signature:c=null,date:h=new Date,config:i,...p}){if(Tg(i={...Bt,...i}),GO(e),a=ca(a),t=ca(t),n=ca(n),r=ca(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,i);a||(a=[]);const m={};if(m.signatures=c?await v.verifyDetached(c,a,h,i):await v.verify(a,h,i),m.data=l==="binary"?v.getLiteralData():v.getText(),m.filename=v.getFilename(),FK(m,e),s){if(a.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=Ji([m.data,rl(async()=>{await Ae.anyPromise(m.signatures.map(_=>_.verified))})])}return m.data=await YO(m.data,e.fromStream,l),m}catch(v){throw Ae.wrapError("Error decrypting message",v)}}function GO(e){if(!(e instanceof Da))throw Error("Parameter [message] needs to be of type Message")}function NK(e){if(e!=="armored"&&e!=="binary"&&e!=="object")throw Error("Unsupported format "+e)}const BK=Object.keys(Bt).length;function Tg(e){const t=Object.keys(e);if(t.length!==BK){for(const n of t)if(Bt[n]===void 0)throw Error("Unknown config property: "+n)}}function ca(e){return e&&!Ae.isArray(e)&&(e=[e]),e}async function YO(e,t,n="utf8"){const r=Ae.isStream(e);return r==="array"?Ar(e):t==="node"?(e=x1(e),n!=="binary"&&e.setEncoding(n),e):t==="web"&&r==="ponyfill"?b8(e):e}function FK(e,t){e.data=lo(t.packets.stream,async(n,r)=>{await Jo(e.data,r,{preventClose:!0});const a=ta(r);try{await Ar(n,s=>s),await a.close()}catch(s){await a.abort(s)}})}function lk(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 jK(e,t,n){$A.isJson(t)||(t={});const r=e+"::"+encodeURIComponent(new URLSearchParams($.sortObject(t,["page","pagesize","hideload","timerange"])).toString()),a=n.callAt.find(s=>s.key===r)||{};return typeof a.key=="undefined"&&(a.key=r,a.updated=0,a.deleted=0,n.callAt.push(a),$A.IDBSet("callAt",n.callAt).then(s=>{})),this.get=()=>(t.timerange=t.timerange||`${a.updated}-${a.deleted}`,t),this.save=({total:s,current_page:l,deleted_id:c})=>new Promise(h=>{if(l===1){let i=!1;const p=$A.Time();s>0&&(a.updated=p,i=!0),$A.isArray(c)&&c.length>0?(a.deleted=p,i=!0):c=[],i?$A.IDBSet("callAt",n.callAt).then(d=>h(c)):h(c)}}),this.showLoad=()=>!t.hideload,this}function ky(e,t,n){return new jK(e,t,n)}function zK(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 UK={retry:5,interval:3*1e3};class VK{constructor(t,n=UK){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.timer=setTimeout(()=>{this.subscribe(t,n)},this.options.interval):this.retry--}}_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 WK={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 s=await $A.IDBString("clearCache");s&&(await $A.IDBRemove("clearCache"),await $A.IDBSet("callAt",e.callAt=[]),s==="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/${Fl}.js`]),n(r)})},call({state:e,dispatch:t},n){$A.isJson(n)||(n={url:n});const r={"Content-Type":"application/json",language:Fl,token:e.userToken,fd:$A.getSessionStorageString("userWsFd"),version:window.systemInfo.version||"0.0.1",platform:$A.Platform};if($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 s=window.navigator.userAgent;(/Windows NT 5.1|Windows XP/.test(s)||s.indexOf("Windows NT 6.0")!==-1||s.indexOf("Windows NT 6.1")!==-1||s.indexOf("Windows NT 6.2")!==-1)&&(n.encrypt=!1)}n.url=$A.apiUrl(n.url),n.data=$A.date2string(n.data);const a=$A.cloneJSON(n);return new Promise(async(s,l)=>{if(/^https*:\/\/public\//.test(n.url)){l({ret:-1,data:{},msg:"No server address"});return}const c=[];if(n.encrypt===!0&&(n.data&&e.apiKeyData.type==="pgp"&&(c.push(`encrypt_type=${e.apiKeyData.type};encrypt_id=${e.apiKeyData.id}`),n.method="post",n.data={encrypted:await t("pgpEncryptApi",n.data)}),c.push("client_type=pgp;client_key="+(await t("pgpGetLocalKey")).publicKeyB64)),c.length>0&&(n.header.encrypt=c.join(";")),n.method==="post"&&(n.data=JSON.stringify(n.data)),n.spinner===!0||typeof n.spinner=="number"&&n.spinner>0){const{before:h,complete:i}=n;n.before=()=>{t("showSpinner",typeof n.spinner=="number"?n.spinner:0),typeof h=="function"&&h()},n.complete=()=>{t("hiddenSpinner"),typeof i=="function"&&i()}}if(n.success=async(h,i,p)=>{if(e.ajaxNetworkException=!1,!$A.isJson(h)){console.log(h,i,p),l({ret:-1,data:{},msg:"Return error"});return}n.encrypt===!0&&h.encrypted&&(h=await t("pgpDecryptApi",h.encrypted));const{ret:d,data:v,msg:m}=h;if(d===-1&&(e.userId=0,n.skipAuthError!==!0)){$A.modalError({content:m,onOk:()=>{t("logout")}}),l(h);return}if(d===-2&&n.checkNick!==!1){t("userEditInput","nickname").then(()=>{t("call",a).then(s).catch(l)}).catch(_=>{l({ret:-1,data:v,msg:_||$A.L("\u8BF7\u8BBE\u7F6E\u6635\u79F0\uFF01")})});return}if(d===-3&&n.checkTel!==!1){t("userEditInput","tel").then(()=>{t("call",a).then(s).catch(l)}).catch(_=>{l({ret:-1,data:v,msg:_||$A.L("\u8BF7\u8BBE\u7F6E\u8054\u7CFB\u7535\u8BDD\uFF01")})});return}d===1?s({data:v,msg:m}):(l({ret:d,data:v,msg:m||"Unknown error"}),d===-4001?t("forgetProject",v.project_id):d===-4002?t("forgetTask",v.task_id):d===-4003&&t("forgetDialog",v.dialog_id))},n.error=(h,i)=>{const p=window.navigator.onLine===!1||i===0&&h.readyState===4;if(p&&a.__networkFailureRetry!==!0){setTimeout(d=>{a.__networkFailureRetry=!0,t("call",a).then(s).catch(l)},300);return}n.checkNetwork!==!1&&(e.ajaxNetworkException=p),l(p?{ret:-1001,data:{},msg:"Network exception"}:{ret:-1,data:{},msg:"System error"})},n.websocket===!0){const h=$A.randomString(16),i=setTimeout(()=>{const p=e.ajaxWsListener.find(d=>d.apiWebsocket==h);p&&(p.complete(),p.error("timeout"),p.after()),e.ajaxWsListener=e.ajaxWsListener.filter(d=>d.apiWebsocket!=h)},n.timeout||3e4);e.ajaxWsListener.push({apiWebsocket:h,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"]=h,e.ajaxWsReady===!1&&(e.ajaxWsReady=!0,t("websocketMsgListener",{name:"apiWebsocket",callback:p=>{switch(p.type){case"apiWebsocket":clearTimeout(i);const d=p.apiWebsocket,v=p.apiSuccess,m=p.data,_=e.ajaxWsListener.find(y=>y.apiWebsocket==d);_&&(_.complete(),v?_.success(m):_.error(m),_.after()),e.ajaxWsListener=e.ajaxWsListener.filter(y=>y.apiWebsocket!=d);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(a=>{e("systemSetting").then(n).catch(r)},100);break;default:t.systemConfig.__state="loading",e("call",{url:"system/setting"}).then(({data:a})=>{t.systemConfig=Object.assign(a,{__state:"success"}),n(t.systemConfig)}).catch(a=>{t.systemConfig.__state="error",r()});break}})},needHome({dispatch:e,state:t}){return new Promise((n,r)=>{e("systemSetting").then(a=>{a.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 a={token:e.userToken};$A.isJson(t)&&(n=t.url,a=t.params||{}),n=$A.urlAddParams(n,a)}$A.Electron?$A.Electron.request({action:"openExternal",url:n},()=>{},()=>{}):$A.isEEUiApp?$A.eeuiAppOpenWeb(n):window.open(n)},toggleProjectParameter({state:e},t){$A.execMainDispatch("toggleProjectParameter",t);let n=t,r=null,a=e.projectId;if($A.isJson(t)&&(n=t.key,r=t.value,a=t.project_id),a){let s=e.cacheProjectParameter.findIndex(c=>c.project_id==a);s===-1&&(e.cacheProjectParameter.push($A.projectParameterTemplate(a)),s=e.cacheProjectParameter.findIndex(c=>c.project_id==a));const l=e.cacheProjectParameter[s];$A.isJson(n)||(n={[n]:r||!l[n]}),e.cacheProjectParameter.splice(s,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(s=>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 a=Object.values(e.userAvatar).map(({userid:s})=>s);[...new Set(a)].some(s=>t("getUserBasic",{userid:s}))},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)})})},saveUserInfo({state:e,dispatch:t},n){return new Promise(async r=>{const a=$A.cloneJSON(n);a.userid=$A.runNum(a.userid),a.token=a.userid>0?a.token||e.userToken:"",e.userInfo=a,e.userId=a.userid,e.userToken=a.token,e.userIsAdmin=$A.inArray("admin",a.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}`}),t("getBasicData",null),e.userId>0&&(e.cacheUserBasic=e.cacheUserBasic.filter(({userid:s})=>s!==e.userId),t("saveUserBasic",e.userInfo)),r()})},saveUserOnlineStatus({state:e},t){const{userid:n,online:r}=t;e.userOnline[n]!==r&&(e.userOnline=Object.assign({},e.userOnline,{[n]:r}))},getUserBasic({state:e,dispatch:t},n){if(e.loadUserBasic===!0){n&&e.cacheUserWait.push(n);return}let r=$A.Time(),a=$A.cloneJSON(e.cacheUserWait);n&&n.userid&&a.push(n),e.cacheUserWait=[];let s=[],l=0;a.some(c=>{let h=e.cacheUserBasic.find(({userid:i})=>i==c.userid);if(h&&r-h._time<=30)return setTimeout(()=>{e.cacheUserActive=Object.assign(h,{__:Math.random()}),Zs.Store.set("cacheUserActive",h)},l+=5),!1;s.push(c)}),s.length!==0&&(s.length>30&&(e.cacheUserWait=s.slice(30),s=s.slice(0,30)),e.loadUserBasic=!0,t("call",{url:"users/basic",data:{userid:[...new Set(s.map(({userid:c})=>c))]},skipAuthError:!0}).then(c=>{r=$A.Time(),s.forEach(h=>{let i=c.data.find(({userid:p})=>p==h.userid)||Object.assign(h,{email:""});i._time=r,t("saveUserBasic",i)}),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()}),Zs.Store.set("cacheUserActive",t),$A.IDBSave("cacheUserBasic",e.cacheUserBasic)},userEditInput({dispatch:e},t){return new Promise(function(n,r){let a="";if(t==="nickname")a="\u6635\u79F0";else if(t==="tel")a="\u8054\u7CFB\u7535\u8BDD";else{r("\u53C2\u6570\u9519\u8BEF");return}setTimeout(s=>{$A.modalInput({title:`\u8BBE\u7F6E${a}`,placeholder:`\u8BF7\u8F93\u5165\u60A8\u7684${a}`,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(i=>{c(),n()})}).catch(({msg:i})=>{h(i)})}):`\u8BF7\u8F93\u5165${a}`,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 a=window.localStorage.getItem("__language:type__"),s=window.localStorage.getItem("__keyboard:data__"),l=window.localStorage.getItem("__theme:mode__");window.localStorage.clear(),window.localStorage.setItem("__language:type__",a),window.localStorage.setItem("__keyboard:data__",s),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("saveUserInfo",$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 a=e.fileLists.findIndex(({id:s})=>s==n.id);a>-1?e.fileLists.splice(a,1,Object.assign(r,e.fileLists[a],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(a=>{e.fileLists=e.fileLists.filter(s=>s.id!=a),e.fileLists.some(s=>{s.pid==a&&t("forgetFile",s.id)}),$A.IDBSave("fileLists",e.fileLists,600)})},getFiles({state:e,dispatch:t},n){return new Promise(function(r,a){t("call",{url:"file/lists",data:{pid:n}}).then(s=>{const l=s.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",s.data),r(s)}).catch(s=>{console.warn(s),a(s)})})},searchFiles({state:e,dispatch:t},n){return $A.isJson(n)||(n={key:n}),new Promise(function(r,a){t("call",{url:"file/search",data:n}).then(s=>{t("saveFile",s.data),r(s)}).catch(s=>{console.warn(s),a(s)})})},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:a})=>a==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(a=>{if(a.type=="group"&&a.group_type=="project"&&a.group_info.id==n.id){n.name!==void 0&&(a.name=n.name);for(let s in a.group_info)!a.group_info.hasOwnProperty(s)||n[s]===void 0||(a.group_info[s]=n[s])}}),$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(a=>{const s=e.cacheProjects.findIndex(l=>l.id==a);s>-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(s,1),e.projectTotal=Math.max(0,e.projectTotal-1))}),r.includes(e.projectId)){const a=$A.cloneJSON(e.cacheProjects).sort((s,l)=>s.top_at||l.top_at?$A.Date(l.top_at)-$A.Date(s.top_at):l.id-s.id).find(({id:s})=>s&&s!=n);a?$A.goForward({name:"manage-project",params:{projectId:a.id}}):$A.goForward({name:"manage-dashboard"})}$A.IDBSave("cacheProjects",e.cacheProjects)},getProjects({state:e,dispatch:t,getters:n},r){return new Promise(function(a,s){if(e.userId===0){e.cacheProjects=[],s({msg:"Parameter error"});return}const l=ky("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)),a(c)}).catch(c=>{console.warn(c),s(c)}).finally(c=>{l.showLoad()&&e.loadProjects--})})},getProjectOne({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n)===0){a({msg:"Parameter error"});return}e.projectLoad++,t("call",{url:"project/one",data:{project_id:n}}).then(s=>{setTimeout(()=>{e.projectLoad--},10),t("saveProject",s.data),r(s)}).catch(s=>{console.warn(s),e.projectLoad--,a(s)})})},archivedProject({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n)===0){a({msg:"Parameter error"});return}t("call",{url:"project/archived",data:{project_id:n}}).then(s=>{t("forgetProject",n),r(s)}).catch(s=>{console.warn(s),t("getProjectOne",n).catch(()=>{}),a(s)})})},removeProject({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n)===0){a({msg:"Parameter error"});return}t("call",{url:"project/remove",data:{project_id:n}}).then(s=>{t("forgetProject",n),r(s)}).catch(s=>{console.warn(s),t("getProjectOne",n).catch(()=>{}),a(s)})})},exitProject({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n)===0){a({msg:"Parameter error"});return}t("call",{url:"project/exit",data:{project_id:n}}).then(s=>{t("forgetProject",n),r(s)}).catch(s=>{console.warn(s),t("getProjectOne",n).catch(()=>{}),a(s)})})},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:a})=>a==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],a=[];r.some(s=>{const l=e.cacheColumns.findIndex(c=>c.id==s);l>-1&&(t("forgetTask",e.cacheTasks.filter(c=>c.column_id==n).map(c=>c.id)),a.push(e.cacheColumns[l].project_id),e.cacheColumns.splice(l,1))}),Array.from(new Set(a)).some(s=>t("getProjectOne",s).catch(()=>{})),$A.IDBSave("cacheColumns",e.cacheColumns)},getColumns({state:e,dispatch:t},n){return new Promise(function(r,a){if(e.userId===0){e.cacheColumns=[],a({msg:"Parameter error"});return}e.projectLoad++,t("call",{url:"project/column/lists",data:{project_id:n}}).then(({data:s})=>{e.projectLoad--;const l=s.data.map(({id:c})=>c);if(e.cacheColumns=e.cacheColumns.filter(c=>c.project_id!=n||l.includes(c.id)),t("saveColumn",s.data),r(s.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(s=>{console.warn(s),e.projectLoad--,a(s)})})},removeColumn({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n)===0){a({msg:"Parameter error"});return}t("call",{url:"project/column/remove",data:{column_id:n}}).then(s=>{t("forgetColumn",n),r(s)}).catch(s=>{console.warn(s),a(s)})})},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(s=>s.parent_id==n.id).some(s=>{t("saveTask",Object.assign(s,{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 a=e.cacheTasks.findIndex(({id:s})=>s==n.id);a>-1?e.cacheTasks.splice(a,1,Object.assign({},e.cacheTasks[a],n)):e.cacheTasks.push(n),(r.is_update_maintask===!0||n.parent_id>0&&e.cacheTasks.findIndex(({id:s})=>s==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(s=>{if(s.name===void 0||s.dialog_delete===1)return!1;if(s.type=="group"&&s.group_type=="task"&&s.group_info.id==n.id){n.name!==void 0&&(s.name=n.name);for(let l in s.group_info)!s.group_info.hasOwnProperty(l)||n[l]===void 0||(s.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),a=[],s=[];r.some(l=>{const c=e.cacheTasks.findIndex(h=>h.id==l);c>-1&&(e.cacheTasks[c].parent_id&&a.push(e.cacheTasks[c].parent_id),s.push(e.cacheTasks[c].project_id),e.cacheTasks.splice(c,1)),e.cacheTasks.filter(h=>h.parent_id==l).some(h=>{let i=e.cacheTasks.findIndex(p=>p.id==h.id);i>-1&&(s.push(h.project_id),e.cacheTasks.splice(i,1))})}),Array.from(new Set(a)).some(l=>t("getTaskOne",l).catch(()=>{})),Array.from(new Set(s)).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:a})=>a==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:a})=>a==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 a=ky("tasks",n,e);return new Promise(function(s,l){if(e.userId===0){e.cacheTasks=[],l({msg:"Parameter error"});return}n.project_id&&e.projectLoad++,t("call",{url:"project/task/lists",data:a.get()}).then(({data:c})=>{n.project_id&&e.projectLoad--,r.push(...c.data),a.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(s).catch(l)},onCancel:()=>{t("saveTask",r),s()}}):t("getTasks",n).then(s).catch(l)):(t("saveTask",r),s())}).catch(c=>{console.warn(c),l(c),n.project_id&&e.projectLoad--})})},getTaskOne({state:e,dispatch:t},n){return new Promise(function(r,a){if(/^\d+$/.test(n)&&(n={task_id:n}),$A.runNum(n.task_id)===0){a({msg:"Parameter error"});return}if($A.isArray(e.taskOneLoad[n.task_id])){e.taskOneLoad[n.task_id].push({resolve:r,reject:a});return}e.taskOneLoad[n.task_id]=[],t("call",{url:"project/task/one",data:n}).then(s=>{t("saveTask",s.data),r(s),e.taskOneLoad[n.task_id].some(l=>{l.resolve(s)})}).catch(s=>{console.warn(s),a(s),e.taskOneLoad[n.task_id].some(l=>{l.reject(s)})}).finally(s=>{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(a=>t("getTaskForDashboard",null),r));return}e.loadDashboardTasks!==!0&&(e.loadDashboardTasks=!0,t("getTasks",null).finally(a=>{e.loadDashboardTasks=!1}))},getTaskForProject({state:e,dispatch:t},n){return new Promise(function(r,a){t("getTasks",{project_id:n}).then(r).catch(a)})},getTaskForParent({state:e,dispatch:t},n){return new Promise(function(r,a){t("getTasks",{parent_id:n}).then(r).catch(a)})},removeTask({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n.task_id)===0){a({msg:"Parameter error"});return}t("setLoad",{key:`task-${n.task_id}`,delay:300}),t("call",{url:"project/task/remove",data:n}).then(s=>{e.taskArchiveView=0,t("forgetTask",n.task_id),r(s)}).catch(s=>{console.warn(s),t("getTaskOne",n.task_id).catch(()=>{}),a(s)}).finally(s=>{t("cancelLoad",`task-${n.task_id}`)})})},archivedTask({state:e,dispatch:t},n){return new Promise(function(r,a){if(/^\d+$/.test(n)&&(n={task_id:n}),$A.runNum(n.task_id)===0){a({msg:"Parameter error"});return}t("setLoad",{key:`task-${n.task_id}`,delay:300}),t("call",{url:"project/task/archived",data:n}).then(s=>{t("saveTask",s.data),r(s)}).catch(s=>{console.warn(s),t("getTaskOne",n.task_id).catch(()=>{}),a(s)}).finally(s=>{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:a})=>a==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(a=>{const s=e.taskFiles.findIndex(({id:l})=>l==a.id);s>-1?e.taskFiles.splice(s,1,a):e.taskFiles.push(a)}),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(a=>{const s=e.taskFiles.findIndex(l=>l.id==a);s>-1&&e.taskFiles.splice(s,1)})},openTask({state:e,dispatch:t},n){let r=n;$A.isJson(n)&&(n.parent_id>0?r=n.parent_id:r=n.id),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:a})=>{$A.modalWarning({content:a,onOk:()=>{e.taskId=0}})})},taskAdd({state:e,dispatch:t},n){return new Promise(function(r,a){const s=$A.cloneJSON($A.date2string(n));$A.isArray(s.column_id)&&(s.column_id=s.column_id.find(l=>l)),t("call",{url:"project/task/add",data:s,method:"post"}).then(l=>{l.data.is_visible===1&&t("addTaskSuccess",l.data),r(l)}).catch(l=>{console.warn(l),a(l)})})},taskAddSub({dispatch:e},t){return new Promise(function(n,r){e("call",{url:"project/task/addsub",data:t}).then(a=>{e("addTaskSuccess",a.data),n(a)}).catch(a=>{console.warn(a),r(a)})})},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,a){t("taskBeforeUpdate",n).then(({post:s})=>{t("setLoad",{key:`task-${s.task_id}`,delay:300}),t("call",{url:"project/task/update",data:s,method:"post"}).then(l=>{t("saveTask",l.data),r(l)}).catch(l=>{console.warn(l),t("getTaskOne",s.task_id).catch(()=>{}),a(l)}).finally(l=>{t("cancelLoad",`task-${s.task_id}`)})}).catch(a)})},taskBeforeUpdate({state:e,dispatch:t},n){return new Promise(function(r,a){let s=$A.cloneJSON($A.date2string(n)),l="\u6E29\u99A8\u63D0\u793A",c=null;if(typeof s.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:i})=>i==s.task_id);l=h.parent_id>0?"\u66F4\u65B0\u5B50\u4EFB\u52A1":"\u66F4\u65B0\u4E3B\u4EFB\u52A1",h&&(h.parent_id>0?s.times[0]&&e.cacheTasks.some(i=>{if(i.id!=h.parent_id)return!1;if(!i.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(s.times[0],!0),d=$A.Date(s.times[1],!0),v=$A.Date(i.start_at,!0),m=$A.Date(i.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(i=>{if(i.parent_id!=h.id||!i.end_at)return!1;let p=$A.Date(s.times[0],!0),d=$A.Date(s.times[1],!0),v=$A.Date(h.start_at,!0),m=$A.Date(h.end_at,!0),_=$A.Date(i.start_at,!0),y=$A.Date(i.end_at,!0);if(v==_&&m==y)return!1;if(!s.times[0])return c=`\u5B50\u4EFB\u52A1\uFF08${i.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${i.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:s})},onCancel:()=>{a({msg:!1})}})})},getTaskFlow({state:e,dispatch:t},n){return new Promise(function(r,a){t("call",{url:"project/task/flow",data:{task_id:n}}).then(s=>{let l=e.cacheTasks.find(({id:i})=>i==n),{data:c}=s;c.turns.some(i=>{const p=e.taskFlowItems.findIndex(({id:d})=>d==i.id);p>-1?e.taskFlowItems.splice(p,1,i):e.taskFlowItems.push(i),l&&l.flow_item_id==i.id&&l.flow_item_name!=i.name&&e.cacheTasks.filter(({flow_item_id:d})=>d==i.id).some(d=>{t("saveTask",{id:d.id,flow_item_name:`${i.status}|${i.name}`})})}),delete c.turns;const h=e.taskFlows.findIndex(({task_id:i})=>i==c.task_id);h>-1?e.taskFlows.splice(h,1,c):e.taskFlows.push(c),r(s)}).catch(s=>{console.warn(s),a(s)})})},getTaskPriority({state:e,dispatch:t}){return new Promise(function(n,r){t("call",{url:"system/priority"}).then(a=>{e.taskPriority=a.data,n(a)}).catch(a=>{console.warn(a),r(a)})})},getColumnTemplate({state:e,dispatch:t}){return new Promise(function(n,r){t("call",{url:"system/column/template"}).then(a=>{e.columnTemplate=a.data,n(a)}).catch(a=>{console.warn(a),r(a)})})},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:a})=>a==n.id);if(r>-1){const a=e.cacheDialogs[r],s=n.user_ms,l=a.user_ms||0;s{t("updateDialogLastMsg",r)});else if($A.isJson(n))if(e.cacheDialogs.findIndex(({id:a})=>a==n.dialog_id)>-1){const a={id:n.dialog_id,last_msg:n,last_at:$A.formatDate("Y-m-d H:i:s")};n.mtype=="tag"&&(a.has_tag=!0),n.mtype=="image"&&(a.has_image=!0),n.mtype=="file"&&(a.has_file=!0),n.link&&(a.has_link=!0),t("saveDialog",a)}else t("getDialogOne",n.dialog_id).catch(()=>{})},getDialogs({state:e,dispatch:t,getters:n},r){return new Promise(function(a,s){if(e.userId===0){e.cacheDialogs=[],s({msg:"Parameter error"});return}$A.isJson(r)||(r={}),typeof r.page=="undefined"&&(r.page=1),typeof r.pagesize=="undefined"&&(r.pagesize=20);const l=ky("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(a).catch(s)):a()}).catch(c=>{console.warn(c),s(c)}).finally(c=>{l.showLoad()&&e.loadDialogs--})})},getDialogOne({state:e,dispatch:t},n){return new Promise(function(r,a){if($A.runNum(n)===0){a({msg:"Parameter error"});return}t("call",{url:"dialog/one",data:{dialog_id:n}}).then(s=>{t("saveDialog",s.data),r(s)}).catch(s=>{console.warn(s),a(s)})})},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(a=>a.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 a;$A.isJson(n)&&(a=n.search_msg_id,n=n.dialog_id),requestAnimationFrame(s=>{e.dialogSearchMsgId=/^\d+$/.test(a)?a:0,e.dialogId=/^\d+$/.test(n)?n:0,r()})})},openDialogUserid({state:e,dispatch:t},n){return new Promise(function(r,a){const s=e.cacheDialogs.find(l=>l.type!=="user"||!l.dialog_user?!1:l.dialog_user.userid===n);if(s){t("openDialog",s.id),r(s);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),a(l)}).finally(l=>{t("hiddenSpinner")})})},forgetDialog({state:e,dispatch:t},n){$A.execMainDispatch("forgetDialog",n);const r=$A.isArray(n)?n:[n];r.some(a=>{const s=e.cacheDialogs.findIndex(l=>l.id==a);s>-1&&(t("forgetDialogMsg",e.dialogMsgs.filter(l=>l.dialog_id==n).map(l=>l.id)),e.cacheDialogs.splice(s,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 a=1500,s=30;if(e.dialogHistory=e.dialogHistory.filter(l=>l!=n.dialog_id),e.dialogHistory.push(n.dialog_id),e.dialogMsgs.length>a&&e.dialogHistory.length>s){const l=e.dialogHistory.slice().reverse(),c=[],h=[];l.forEach(i=>{c.lengthp.dialog_id==i)>-1?c.push(i):h.push(i)}),h.length>0&&(e.dialogMsgs=e.dialogMsgs.filter(i=>!h.includes(i.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(a=>a.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 a=50,s=e.dialogMsgs.filter(l=>l.dialog_id==n);if(s.length>a){const l=s.sort((c,h)=>h.id-c.id).splice(a).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(a=>a.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(a=>a.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:s})=>s==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 a=e.cacheDialogs.find(({id:s,last_msg:l})=>s==n.dialog_id&&l&&l.id===n.id);a&&t("saveDialog",{id:n.dialog_id,last_msg:Object.assign({},a.last_msg,n)})}},forgetDialogMsg({state:e,dispatch:t},n){$A.execMainDispatch("forgetDialogMsg",n),($A.isArray(n)?n:[n]).some(a=>{const s=e.dialogMsgs.findIndex(l=>l.id==a);if(s>-1){const l=e.dialogMsgs[s];t("decrementMsgReplyNum",l),t("audioStop",$A.getObject(l,"msg.path")),e.dialogMsgs.splice(s,1),$A.IDBSave("dialogMsgs",e.dialogMsgs,600)}}),t("forgetDialogTodoForMsgId",n)},getDialogMsgs({state:e,dispatch:t,getters:n},r){return new Promise((a,s)=>{let l=d=>{},c=d=>{},h=!1,i=!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"&&(i=r.spinner,delete r.spinner);const p=`msg::${r.dialog_id}-${r.msg_id}-${r.msg_type||""}`;if(n.isLoad(p)){s({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)),t("call",{url:"dialog/msg/list",data:r,spinner:i,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),a(d),c()}).catch(d=>{console.warn(d),s(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=>{const a=Object.values(e.wsReadWaitData);e.wsReadWaitData={},a.length!==0&&t("call",{url:"dialog/msg/read",data:{id:a.join(",")}}).then(({data:s})=>{t("saveDialog",s)}).catch(s=>{a.some(l=>{e.wsReadWaitData[l]=l})})},50)},dialogMsgMark({state:e,dispatch:t},n){return new Promise((r,a)=>{t("call",{url:"dialog/msg/mark",data:n}).then(s=>{t("saveDialog",s.data),r(s)}).catch(s=>{a(s)})})},streamDialogMsg({state:e,dispatch:t},n){if(/^https*:\/\//i.test(n)||(n=$A.apiUrl(`..${n}`)),e.dialogSseList.find(a=>a.streamUrl==n))return;const r=new VK(n);r.subscribe(["append","replace","done"],(a,s)=>{switch(a){case"append":Zs.Store.set("dialogMsgChange",{id:s.lastEventId,type:"append",text:s.data});break;case"replace":Zs.Store.set("dialogMsgChange",{id:s.lastEventId,type:"replace",text:s.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(a=>{t("setLoad",n.key)},n.delay||0);return}const r=e.loads.find(a=>a.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(a=>a.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 a=document.createElement("audio");a.id=e.audioPlayId="__audio_play_element__",a.controls=!1,a.loop=!1,a.volume=1,a.src=e.audioPlaying=n,a.onended=s=>{t("audioStop",a.src)},document.body.appendChild(a),a.play().then(s=>{})},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=${Fl}`;const a=$A.openLog,s=$A.randomString(16);e.wsRandom=s,e.ws=new WebSocket(r),e.ws.onopen=async l=>{a&&console.log("[WS] Open",l,$A.formatDate()),e.wsOpenNum++,t("websocketSend",{type:"encrypt",data:{type:"pgp",key:(await t("pgpGetLocalKey")).publicKeyB64}})},e.ws.onclose=async l=>{a&&console.log("[WS] Close",l,$A.formatDate()),e.ws=null,clearTimeout(e.wsTimeout),e.wsTimeout=setTimeout(()=>{s===e.wsRandom&&t("websocketConnection")},3e3)},e.ws.onerror=async l=>{a&&console.log("[WS] Error",l,$A.formatDate()),e.ws=null,clearTimeout(e.wsTimeout),e.wsTimeout=setTimeout(()=>{s===e.wsRandom&&t("websocketConnection")},3e3)},e.ws.onmessage=async l=>{a&&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:i,msgId:p}=h;switch(i){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":t("saveUserOnlineStatus",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){a&&console.log("[WS] Callerr",v)}}),i){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:E})=>E==y)){const E={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:D})=>{t("saveDialog",Object.assign(E,D))}).catch(()=>{}):t("saveDialog",E)}break;case"add":case"chat":if(!e.dialogMsgs.find(({id:E})=>E==_.id)){if(t("increaseTaskMsgNum",_),t("increaseMsgReplyNum",_),v==="chat"||$A.isSubElectron)return;if(_.userid!==e.userId){const E=e.cacheDialogs.find(({id:D})=>D==y);if(E){const D={id:y,unread:E.unread+1,mention:E.mention,user_at:_.user_at,user_ms:_.user_ms};_.mention&&D.mention++,t("saveDialog",D)}}m||Zs.Store.set("dialogMsgPush",_)}t("saveDialogMsg",_),t("updateDialogLastMsg",_);break;case"update":case"readed":if(e.dialogMsgs.find(({id:E})=>E==_.id))t("saveDialogMsg",_),typeof _.todo!="undefined"&&t("getDialogTodo",y);else if(v==="readed"){let E=0;const D=setInterval(x=>{E>6&&clearInterval(D),e.dialogMsgs.find(({id:C})=>C==_.id)&&(clearInterval(D),t("saveDialogMsg",_)),E++},500)}break;case"groupAdd":case"groupJoin":case"groupRestore":t("getDialogOne",_.id).catch(()=>{});break;case"groupUpdate":e.cacheDialogs.find(({id:E})=>E==_.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":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}})(h);break}break}}},websocketSend({state:e},t){return new Promise((n,r)=>{var h;if(!$A.isJson(t)){r();return}const{type:a,data:s,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:a,msgId:c,data:s})),n()}catch(i){typeof l=="function"&&l(null,!1),r(i)}})},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 IK({type:"ecc",curve:"curve25519",passphrase:e.clientId,userIDs:[{name:"doo",email:"admin@admin.com"}]});n.publicKeyB64=zK(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 a=n.message||n.text,s=n.publicKey||n.key||(await t("pgpGetLocalKey")).publicKey,l=await kK({armoredKey:s}),c=await RK({message:await MK({text:a}),encryptionKeys:l});r(c)})},pgpDecrypt({state:e,dispatch:t},n){return new Promise(async r=>{$A.isJson(n)||(n={encrypted:n});const a=n.encrypted||n.text,s=n.privateKey||n.key||(await t("pgpGetLocalKey")).privateKey,l=await $K({privateKey:await DK({armoredKey:s}),passphrase:n.passphrase||e.clientId}),{data:c}=await LK({message:await AK({armoredMessage:a}),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(a=>{r(a.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/approve.774d6c89.js b/public/js/build/approve.5d8d6cbe.js similarity index 96% rename from public/js/build/approve.774d6c89.js rename to public/js/build/approve.5d8d6cbe.js index aca6718f2..142966f63 100644 --- a/public/js/build/approve.774d6c89.js +++ b/public/js/build/approve.5d8d6cbe.js @@ -1 +1 @@ -import{D as n}from"./index.edc265fa.js";import{n as l,s as p,l as c}from"./app.2ab5f89e.js";var d=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[e("Row",{staticClass:"approve-row",attrs:{gutter:8}},[e("Col",{attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:24},xs:{span:24}}},[e("div",{staticClass:"approve-col-box approve-col-add",on:{click:t.add}},[e("Icon",{attrs:{type:"md-add"}})],1)]),t._l(t.list,function(a,o){return e("Col",{key:o,attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:24},xs:{span:24}}},[e("div",{staticClass:"approve-col-box approve-col-for",on:{click:function(r){return t.edit(a)}}},[e("p",[t._v(t._s(t.$L("\u6D41\u7A0B\u540D\u79F0"))+"\uFF1A"),e("span",{staticStyle:{"font-weight":"500",color:"#135de6"}},[t._v(t._s(t.$L(a.name)))])]),e("Divider",{staticStyle:{margin:"12px 0","margin-bottom":"9px"}}),e("div",{staticClass:"approve-button-box",on:{click:function(r){return r.stopPropagation(),t.edit(a)}}},[e("p",[t._v(t._s(t.$L("\u5DF2\u53D1\u5E03")))]),e("p",{staticStyle:{position:"relative"},on:{click:function(r){return r.stopPropagation(),t.change(a)}}},[e("Icon",{staticClass:"delcon",attrs:{type:"md-trash",size:"16"}})],1)])],1)])})],2),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.approvalSettingShow,callback:function(a){t.approvalSettingShow=a},expression:"approvalSettingShow"}},[e("iframe",{attrs:{src:t.iframeSrc}})])],1)},v=[];const u={name:"approve",components:{DrawerOverlay:n},data(){return{value:!1,loadIng:0,approvalSettingShow:!1,iframeSrc:"",name:"",list:[]}},watch:{approvalSettingShow(t){t&&(this.iframeSrc=$A.apiUrl(`../approve/#/?name=${this.name}&token=${p.userToken}&lang=${c}`))}},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((s,e)=>{this.list.forEach((a,o)=>{a.name==s.name&&(a.issue=!0,a.id=s.id,a.version=s.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((e,a)=>{e.name==this.name&&(e.issue=!0,this.$set(this.list,a,e))}),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:s})=>{t.issue=!1,this.getList(),$A.messageSuccess("\u6210\u529F")}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.loadIng--})}}},i={};var h=l(u,d,v,!1,m,"58db711a",null,null);function m(t){for(let s in i)this[s]=i[s]}var _=function(){return h.exports}();export{_ as default}; +import{D as n}from"./index.ab28c92e.js";import{n as l,s as p,l as c}from"./app.6fb8fe77.js";var d=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"setting-item submit"},[e("Row",{staticClass:"approve-row",attrs:{gutter:8}},[e("Col",{attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:24},xs:{span:24}}},[e("div",{staticClass:"approve-col-box approve-col-add",on:{click:t.add}},[e("Icon",{attrs:{type:"md-add"}})],1)]),t._l(t.list,function(a,o){return e("Col",{key:o,attrs:{xxl:{span:6},xl:{span:8},lg:{span:12},sm:{span:24},xs:{span:24}}},[e("div",{staticClass:"approve-col-box approve-col-for",on:{click:function(r){return t.edit(a)}}},[e("p",[t._v(t._s(t.$L("\u6D41\u7A0B\u540D\u79F0"))+"\uFF1A"),e("span",{staticStyle:{"font-weight":"500",color:"#135de6"}},[t._v(t._s(t.$L(a.name)))])]),e("Divider",{staticStyle:{margin:"12px 0","margin-bottom":"9px"}}),e("div",{staticClass:"approve-button-box",on:{click:function(r){return r.stopPropagation(),t.edit(a)}}},[e("p",[t._v(t._s(t.$L("\u5DF2\u53D1\u5E03")))]),e("p",{staticStyle:{position:"relative"},on:{click:function(r){return r.stopPropagation(),t.change(a)}}},[e("Icon",{staticClass:"delcon",attrs:{type:"md-trash",size:"16"}})],1)])],1)])})],2),e("DrawerOverlay",{attrs:{placement:"right",size:1200},model:{value:t.approvalSettingShow,callback:function(a){t.approvalSettingShow=a},expression:"approvalSettingShow"}},[e("iframe",{attrs:{src:t.iframeSrc}})])],1)},v=[];const u={name:"approve",components:{DrawerOverlay:n},data(){return{value:!1,loadIng:0,approvalSettingShow:!1,iframeSrc:"",name:"",list:[]}},watch:{approvalSettingShow(t){t&&(this.iframeSrc=$A.apiUrl(`../approve/#/?name=${this.name}&token=${p.userToken}&lang=${c}`))}},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((s,e)=>{this.list.forEach((a,o)=>{a.name==s.name&&(a.issue=!0,a.id=s.id,a.version=s.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((e,a)=>{e.name==this.name&&(e.issue=!0,this.$set(this.list,a,e))}),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:s})=>{t.issue=!1,this.getList(),$A.messageSuccess("\u6210\u529F")}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{this.loadIng--})}}},i={};var h=l(u,d,v,!1,m,"58db711a",null,null);function m(t){for(let s in i)this[s]=i[s]}var _=function(){return h.exports}();export{_ as default}; diff --git a/public/js/build/bn.interface.min.3eff7d72.js b/public/js/build/bn.interface.min.76ed2c0b.js similarity index 96% rename from public/js/build/bn.interface.min.3eff7d72.js rename to public/js/build/bn.interface.min.76ed2c0b.js index 10738b2d3..370a7ab63 100644 --- a/public/js/build/bn.interface.min.3eff7d72.js +++ b/public/js/build/bn.interface.min.76ed2c0b.js @@ -1 +1 @@ -import t from"./bn.min.1f47700f.js";import"./app.2ab5f89e.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.28405fbe.js";import"./app.6fb8fe77.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.1f47700f.js b/public/js/build/bn.min.28405fbe.js similarity index 99% rename from public/js/build/bn.min.1f47700f.js rename to public/js/build/bn.min.28405fbe.js index e1fff1c64..8f052a71c 100644 --- a/public/js/build/bn.min.1f47700f.js +++ b/public/js/build/bn.min.28405fbe.js @@ -1 +1 @@ -import{L as ei,O as si}from"./app.2ab5f89e.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.6fb8fe77.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.f9aa1044.js b/public/js/build/calendar.0e6aeaaa.js similarity index 99% rename from public/js/build/calendar.f9aa1044.js rename to public/js/build/calendar.0e6aeaaa.js index b87165ed0..582c97e41 100644 --- a/public/js/build/calendar.f9aa1044.js +++ b/public/js/build/calendar.0e6aeaaa.js @@ -1,4 +1,4 @@ -import{c as vs,d as Ss,n as tr,f as Es,m as Cs,a as Ds,b as Ps}from"./app.2ab5f89e.js";import{T as ks}from"./TaskMenu.6d52fdca.js";var nr={exports:{}},ir={exports:{}};/*! +import{c as vs,d as Ss,n as tr,f as Es,m as Cs,a as Ds,b as Ps}from"./app.6fb8fe77.js";import{T as ks}from"./TaskMenu.61d4b7dc.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.110860a6.js b/public/js/build/checkin.24f61a0d.js similarity index 99% rename from public/js/build/checkin.110860a6.js rename to public/js/build/checkin.24f61a0d.js index a21ccdcf9..b8e6228b9 100644 --- a/public/js/build/checkin.110860a6.js +++ b/public/js/build/checkin.24f61a0d.js @@ -1 +1 @@ -import{n as h}from"./app.2ab5f89e.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={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.6fb8fe77.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={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.9a6cc68e.js b/public/js/build/dashboard.54ebcc20.js similarity index 97% rename from public/js/build/dashboard.9a6cc68e.js rename to public/js/build/dashboard.54ebcc20.js index 5bf430956..9645bfe52 100644 --- a/public/js/build/dashboard.9a6cc68e.js +++ b/public/js/build/dashboard.54ebcc20.js @@ -1 +1 @@ -import{m as l,a as c,n as d}from"./app.2ab5f89e.js";import{T as _}from"./TaskMenu.6d52fdca.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")}}),t("div",{staticClass:"dashboard-wrapper"},[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-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}},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){$A.scrollToView(this.$refs[`type_${s}`][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,a as c,n as d}from"./app.6fb8fe77.js";import{T as _}from"./TaskMenu.61d4b7dc.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")}}),t("div",{staticClass:"dashboard-wrapper"},[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-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}},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){$A.scrollToView(this.$refs[`type_${s}`][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.3019f7ef.js b/public/js/build/delete.05615594.js similarity index 99% rename from public/js/build/delete.3019f7ef.js rename to public/js/build/delete.05615594.js index 5bf102cc8..9b0e5eeb7 100644 --- a/public/js/build/delete.3019f7ef.js +++ b/public/js/build/delete.05615594.js @@ -1 +1 @@ -import{m as a,n as o}from"./app.2ab5f89e.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.6fb8fe77.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.ae1c56d6.js b/public/js/build/details.eb8631f5.js similarity index 99% rename from public/js/build/details.ae1c56d6.js rename to public/js/build/details.eb8631f5.js index 197322742..979e6c955 100644 --- a/public/js/build/details.ae1c56d6.js +++ b/public/js/build/details.eb8631f5.js @@ -1 +1 @@ -import{n as x,I as A}from"./app.2ab5f89e.js";import{I as D}from"./ImgUpload.cf2be17d.js";var b=function(){var a,i,r,n,o,l,p,m,u,h,$,t=this,I=t.$createElement,e=t._self._c||I;return e("div",{staticClass:"approve-details",style:{"z-index":t.modalTransferIndex}},[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("p",[t._v(t._s((r=t.datas.var)===null||r===void 0?void 0:r.start_time))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4")))]),e("p",[t._v(t._s((n=t.datas.var)===null||n===void 0?void 0:n.end_time))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u65F6\u957F"))+"\uFF08"+t._s(t.getTimeDifference((o=t.datas.var)===null||o===void 0?void 0:o.start_time,(l=t.datas.var)===null||l===void 0?void 0:l.end_time).unit)+"\uFF09")]),e("p",[t._v(t._s((p=t.datas.var)!==null&&p!==void 0&&p.start_time?t.getTimeDifference((m=t.datas.var)===null||m===void 0?void 0:m.start_time,(u=t.datas.var)===null||u===void 0?void 0:u.end_time).time:0))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u4E8B\u7531")))]),e("p",[t._v(t._s((h=t.datas.var)===null||h===void 0?void 0:h.description))])]),($=t.datas.var)!==null&&$!==void 0&&$.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,c){return e("div",{on:{click:function(d){return t.onViewPicture(s)}}},[e("ImgView",{key:c,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,c){var d,_,v,f,g,y,C,L,w;return[s.type=="starter"?e("TimelineItem",{key:c,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&&((v=s.node_user_list[0])===null||v===void 0?void 0:v.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},on:{click:t.confirmComment}},[t._v(t._s(t.$L("\u786E\u8BA4")))])],1)],1)],1)},S=[];const B={name:"details",components:{ImgView:A,ImgUpload:D},props:{data:{type:Object,default(){return{}}}},data(){return{modalTransferIndex:window.modalTransferIndex,datas:{},showTimeNum:24,commentShow:!1,loadIng:0,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(r=>{var n;r.type!="starter"&&r.is_finished==!0&&((n=r.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.data.id=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 o=Math.floor(n/60);return i==2?`${o}${this.$L("\u5206\u949F")}`:`${o} ${this.$L("\u5206\u949F\u524D")}`}else if(n<3600*24){const o=Math.floor(n/3600);return i==2?`${o}${this.$L("\u5C0F\u65F6")}`:`${o} ${this.$L("\u5C0F\u65F6\u524D")}`}else{const o=Math.floor(n/3600/24);return i==2?`${o+1}${this.$L("\u5929")}`:`${o+1} ${this.$L("\u5929")}`}},getTimeDifference(a,i){const r=new Date((i+"").replace(/-/g,"/")),n=new Date((a+"").replace(/-/g,"/")),o=(r-n)/1e3;return o<60?{time:o,unit:this.$L("\u79D2")}:o<3600?{time:Math.floor(o/60),unit:this.$L("\u5206\u949F")}:o<3600*24?{time:(r-n)/36e5,unit:this.$L("\u5C0F\u65F6")}:{time:Math.floor(o/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.data.id}}).then(({data:i})=>{var r=!0;i.node_infos=i.node_infos.map(n=>{var o,l;return n._show=r,(((o=n.identitylink)==null?void 0:o.state)==2||((l=n.identitylink)==null?void 0:l.state)==3)&&(r=!1),n}),this.$nextTick(()=>{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",onOk:i=>a!=1&&!i?"\u8BF7\u8F93\u5165\u5BA1\u6279\u610F\u89C1":(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")}).catch(({msg:r})=>{$A.modalError(r)}),!1)})},revocation(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u64A4\u9500\u5417\uFF1F",loading:!0,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:r})=>{$A.messageSuccess(r),a(),this.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo():this.$emit("revocation")}).catch(({msg:r})=>{$A.modalError(r),a()}),!1))})},comment(){this.commentData.content="",this.commentData.pictures=[],this.commentShow=!0},confirmComment(){this.loadIng=1,this.$store.dispatch("call",{method:"post",url:"approve/process/addGlobalComment",data:{proc_inst_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.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo(!0):(this.$emit("approve"),setTimeout(()=>{this.scrollToBottom()},500)),this.commentShow=!1}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng--})},scrollToBottom(){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))}}},k={};var O=x(B,b,S,!1,z,null,null,null);function z(a){for(let i in k)this[i]=k[i]}var N=function(){return O.exports}();export{N as default}; +import{n as x,I as A}from"./app.6fb8fe77.js";import{I as D}from"./ImgUpload.056f7090.js";var b=function(){var a,i,r,n,o,l,p,m,u,h,$,t=this,I=t.$createElement,e=t._self._c||I;return e("div",{staticClass:"approve-details",style:{"z-index":t.modalTransferIndex}},[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("p",[t._v(t._s((r=t.datas.var)===null||r===void 0?void 0:r.start_time))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u7ED3\u675F\u65F6\u95F4")))]),e("p",[t._v(t._s((n=t.datas.var)===null||n===void 0?void 0:n.end_time))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u65F6\u957F"))+"\uFF08"+t._s(t.getTimeDifference((o=t.datas.var)===null||o===void 0?void 0:o.start_time,(l=t.datas.var)===null||l===void 0?void 0:l.end_time).unit)+"\uFF09")]),e("p",[t._v(t._s((p=t.datas.var)!==null&&p!==void 0&&p.start_time?t.getTimeDifference((m=t.datas.var)===null||m===void 0?void 0:m.start_time,(u=t.datas.var)===null||u===void 0?void 0:u.end_time).time:0))])]),e("div",{staticClass:"approve-details-text"},[e("h4",[t._v(t._s(t.$L("\u4E8B\u7531")))]),e("p",[t._v(t._s((h=t.datas.var)===null||h===void 0?void 0:h.description))])]),($=t.datas.var)!==null&&$!==void 0&&$.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,c){return e("div",{on:{click:function(d){return t.onViewPicture(s)}}},[e("ImgView",{key:c,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,c){var d,_,v,f,g,y,C,L,w;return[s.type=="starter"?e("TimelineItem",{key:c,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&&((v=s.node_user_list[0])===null||v===void 0?void 0:v.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},on:{click:t.confirmComment}},[t._v(t._s(t.$L("\u786E\u8BA4")))])],1)],1)],1)},S=[];const B={name:"details",components:{ImgView:A,ImgUpload:D},props:{data:{type:Object,default(){return{}}}},data(){return{modalTransferIndex:window.modalTransferIndex,datas:{},showTimeNum:24,commentShow:!1,loadIng:0,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(r=>{var n;r.type!="starter"&&r.is_finished==!0&&((n=r.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.data.id=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 o=Math.floor(n/60);return i==2?`${o}${this.$L("\u5206\u949F")}`:`${o} ${this.$L("\u5206\u949F\u524D")}`}else if(n<3600*24){const o=Math.floor(n/3600);return i==2?`${o}${this.$L("\u5C0F\u65F6")}`:`${o} ${this.$L("\u5C0F\u65F6\u524D")}`}else{const o=Math.floor(n/3600/24);return i==2?`${o+1}${this.$L("\u5929")}`:`${o+1} ${this.$L("\u5929")}`}},getTimeDifference(a,i){const r=new Date((i+"").replace(/-/g,"/")),n=new Date((a+"").replace(/-/g,"/")),o=(r-n)/1e3;return o<60?{time:o,unit:this.$L("\u79D2")}:o<3600?{time:Math.floor(o/60),unit:this.$L("\u5206\u949F")}:o<3600*24?{time:(r-n)/36e5,unit:this.$L("\u5C0F\u65F6")}:{time:Math.floor(o/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.data.id}}).then(({data:i})=>{var r=!0;i.node_infos=i.node_infos.map(n=>{var o,l;return n._show=r,(((o=n.identitylink)==null?void 0:o.state)==2||((l=n.identitylink)==null?void 0:l.state)==3)&&(r=!1),n}),this.$nextTick(()=>{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",onOk:i=>a!=1&&!i?"\u8BF7\u8F93\u5165\u5BA1\u6279\u610F\u89C1":(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")}).catch(({msg:r})=>{$A.modalError(r)}),!1)})},revocation(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u64A4\u9500\u5417\uFF1F",loading:!0,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:r})=>{$A.messageSuccess(r),a(),this.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo():this.$emit("revocation")}).catch(({msg:r})=>{$A.modalError(r),a()}),!1))})},comment(){this.commentData.content="",this.commentData.pictures=[],this.commentShow=!0},confirmComment(){this.loadIng=1,this.$store.dispatch("call",{method:"post",url:"approve/process/addGlobalComment",data:{proc_inst_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.$route.name=="manage-approve-details"||this.$route.name=="manage-messenger"?this.getInfo(!0):(this.$emit("approve"),setTimeout(()=>{this.scrollToBottom()},500)),this.commentShow=!1}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng--})},scrollToBottom(){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))}}},k={};var O=x(B,b,S,!1,z,null,null,null);function z(a){for(let i in k)this[i]=k[i]}var N=function(){return O.exports}();export{N as default}; diff --git a/public/js/build/elliptic.min.50416e92.js b/public/js/build/elliptic.min.02bc75af.js similarity index 99% rename from public/js/build/elliptic.min.50416e92.js rename to public/js/build/elliptic.min.02bc75af.js index 7fcb052c8..76e9e542a 100644 --- a/public/js/build/elliptic.min.50416e92.js +++ b/public/js/build/elliptic.min.02bc75af.js @@ -1 +1 @@ -import{L as Y,M as ae,p as J,Y as j,q as Ie,y as Me,t as xe,v as Be,u as Ce,Q as _e,R as De}from"./app.2ab5f89e.js";import u from"./bn.min.1f47700f.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],w=ze(d[s],d[h]);i=Math.max(w[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(I,x.BasePoint),D.prototype.jpoint=function(e,f,d){return new I(this,e,f,d)},I.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)},I.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},I.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)},I.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)},I.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}},I.prototype.inspect=function(){return this.isInfinity()?"":""},I.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,we=Ie.BlockHash,Le=[1518500249,1859775393,2400959708,3395469782];function q(){if(!(this instanceof q))return new q;we.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}j.inherits(q,we);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 w=(s.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return t.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),w^=1),new ee({r:p,s:y,recoveryParam:w})}}}}}},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],w=ze(d[s],d[h]);i=Math.max(w[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(I,x.BasePoint),D.prototype.jpoint=function(e,f,d){return new I(this,e,f,d)},I.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)},I.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},I.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)},I.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)},I.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}},I.prototype.inspect=function(){return this.isInfinity()?"":""},I.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,we=Ie.BlockHash,Le=[1518500249,1859775393,2400959708,3395469782];function q(){if(!(this instanceof q))return new q;we.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}j.inherits(q,we);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 w=(s.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return t.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),w^=1),new ee({r:p,s:y,recoveryParam:w})}}}}}},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.6fb8fe77.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.7ad78cf2.js b/public/js/build/file.67799f74.js similarity index 88% rename from public/js/build/file.7ad78cf2.js rename to public/js/build/file.67799f74.js index 1f6ad0bd5..a8b0a2ce6 100644 --- a/public/js/build/file.7ad78cf2.js +++ b/public/js/build/file.67799f74.js @@ -1 +1 @@ -import n from"./FileContent.1929b7b3.js";import l from"./FilePreview.a0883610.js";import{n as s}from"./app.2ab5f89e.js";import"./IFrame.f4e1afaf.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.35a4ff5e.js";import l from"./FilePreview.4bfd7284.js";import{n as s}from"./app.6fb8fe77.js";import"./IFrame.dfb0ac0a.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/file.165e488e.js b/public/js/build/file.7cac3066.js similarity index 99% rename from public/js/build/file.165e488e.js rename to public/js/build/file.7cac3066.js index 3fa8ac350..09f01aab5 100644 --- a/public/js/build/file.165e488e.js +++ b/public/js/build/file.7cac3066.js @@ -1,4 +1,4 @@ -import{c as ft,P as ag,m as ug,n as lg,_ as lu}from"./app.2ab5f89e.js";import{D as fg}from"./index.edc265fa.js";import{l as og}from"./longpress.43ca7fd9.js";import{U as cg}from"./UserSelect.c1d7840d.js";var Ci={exports:{}};/** +import{c as ft,P as ag,m as ug,n as lg,_ as lu}from"./app.6fb8fe77.js";import{D as fg}from"./index.ab28c92e.js";import{l as og}from"./longpress.43ca7fd9.js";import{U as cg}from"./UserSelect.4fa9cbd2.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,L+"return "+w).apply(s,f)});if(F.source=w,gi(F))throw F;return F}function dp(e){return k(e).toLowerCase()}function pp(e){return k(e).toUpperCase()}function gp(e,n,t){if(e=k(e),e&&(t||n===s))return ds(e);if(!e||!(n=ce(n)))return e;var i=Ce(e),a=Ce(n),l=ps(i,a),f=gs(i,a)+1;return sn(i,l,f).join("")}function _p(e,n,t){if(e=k(e),e&&(t||n===s))return e.slice(0,vs(e)+1);if(!e||!(n=ce(n)))return e;var i=Ce(e),a=gs(i,Ce(n))+1;return sn(i,0,a).join("")}function vp(e,n,t){if(e=k(e),e&&(t||n===s))return e.replace(gr,"");if(!e||!(n=ce(n)))return e;var i=Ce(e),a=ps(i,Ce(n));return sn(i,a).join("")}function mp(e,n){var t=fu,i=ou;if(H(n)){var a="separator"in n?n.separator:a;t="length"in n?T(n.length):t,i="omission"in n?ce(n.omission):i}e=k(e);var l=e.length;if(bn(e)){var f=Ce(e);l=f.length}if(t>=l)return e;var o=t-Tn(i);if(o<1)return i;var d=f?sn(f,0,o).join(""):e.slice(0,o);if(a===s)return d+i;if(f&&(o+=d.length-o),_i(a)){if(e.slice(o).search(a)){var v,m=d;for(a.global||(a=Rr(a.source,k(Mi.exec(a))+"g")),a.lastIndex=0;v=a.exec(m);)var w=v.index;d=d.slice(0,w===s?o:w)}}else if(e.indexOf(ce(a),o)!=o){var I=d.lastIndexOf(a);I>-1&&(d=d.slice(0,I))}return d+i}function wp(e){return e=k(e),e&&bu.test(e)?e.replace(Ri,ql):e}var xp=Pn(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),wi=sa("toUpperCase");function ru(e,n,t){return e=k(e),n=t?s:n,n===s?Nl(e)?Jl(e):Rl(e):e.match(n)||[]}var iu=E(function(e,n){try{return fe(e,s,n)}catch(t){return gi(t)?t:new y(t)}}),Ip=He(function(e,n){return ve(n,function(t){t=Pe(t),Ne(e,t,di(e[t],e))}),e});function Ap(e){var n=e==null?0:e.length,t=S();return e=n?z(e,function(i){if(typeof i[1]!="function")throw new me(G);return[t(i[0]),i[1]]}):[],E(function(i){for(var a=-1;++aXe)return[];var t=Oe,i=ee(e,Oe);n=S(n),e-=Oe;for(var a=Tr(i,n);++t0||n<0)?new O(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),n!==s&&(n=T(n),t=n<0?t.dropRight(-n):t.take(n-e)),t)},O.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},O.prototype.toArray=function(){return this.take(Oe)},De(O.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),a=u[i?"take"+(n=="last"?"Right":""):n],l=i||/^find/.test(n);!a||(u.prototype[n]=function(){var f=this.__wrapped__,o=i?[1]:arguments,d=f instanceof O,v=o[0],m=d||b(f),w=function(R){var D=a.apply(u,Ve([R],o));return i&&I?D[0]:D};m&&t&&typeof v=="function"&&v.length!=1&&(d=m=!1);var I=this.__chain__,L=!!this.__actions__.length,$=l&&!I,F=d&&!L;if(!l&&m){f=F?f:new O(this);var C=e.apply(f,o);return C.__actions__.push({func:Xt,args:[w],thisArg:s}),new we(C,I)}return $&&F?e.apply(this,o):(C=this.thru(w),$?i?C.value()[0]:C.value():C)})}),ve(["pop","push","shift","sort","splice","unshift"],function(e){var n=At[e],t=/^(?: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 n.apply(b(l)?l:[],a)}return this[t](function(f){return n.apply(b(f)?f:[],a)})}}),De(O.prototype,function(e,n){var t=u[n];if(t){var i=t.name+"";B.call(On,i)||(On[i]=[]),On[i].push({name:n,func:t})}}),On[Ht(s,un).name]=[{name:"wrapper",func:s}],O.prototype.clone=mf,O.prototype.reverse=wf,O.prototype.value=xf,u.prototype.at=Xc,u.prototype.chain=Qc,u.prototype.commit=Vc,u.prototype.next=jc,u.prototype.plant=nh,u.prototype.reverse=th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=rh,u.prototype.first=u.prototype.head,Jn&&(u.prototype[Jn]=eh),u},Fn=Xl();fn?((fn.exports=Fn)._=Fn,Ir._=Fn):V._=Fn}).call(ft)})(Ci,Ci.exports);var hg=function(){var r=this,p=r.$createElement,s=r._self._c||p;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("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.uploadList.find(function(c){var x=c.status;return x!=="finished"})?s("Loading"):s("Button",{attrs:{shape:"circle",icon:"md-checkmark"}})],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",{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",{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")))]),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",{attrs:{size:"small",type:"info"},on:{click:function(c){return r.handleContextClick("shearSelect")}}},[s("Icon",{attrs:{type:"ios-cut"}}),r._v(" "+r._s(r.$L("\u526A\u5207"))+" ")],1),s("Button",{attrs:{size:"small",type:"error"},on:{click:function(c){return r.deleteFile(r.selectIds)}}},[s("Icon",{attrs:{type:"ios-trash"}}),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.$L("\u53D6\u6D88\u9009\u62E9")))])]: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.$L("\u4EC5\u663E\u793A\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("UserAvatar",{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("UserAvatar",{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._v(r._s(r.$L("\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(P){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(),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:"",tooltipDisabled:""}}),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)},dg=[];const pg=()=>lu(()=>import("./FilePreview.a0883610.js"),["js/build/FilePreview.a0883610.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),gg=()=>lu(()=>import("./FileContent.1929b7b3.js"),["js/build/FileContent.1929b7b3.js","js/build/FileContent.5c6a1e1c.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),mn={sort:null,mode:null,shared:null},_g={components:{UserSelect:cg,PreviewImage:ag,FilePreview:pg,DrawerOverlay:fg,FileContent:gg},directives:{longpress:og},data(){return{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:"",maxSize:1024e3,contextMenuItem:{},contextMenuVisible:!1,contextMenuStyles:{top:0,left:0},shearIds:[],selectIds:[],dialogDrag:!1,pasteShow:!1,pasteFile:[],pasteItem:[]}},async beforeRouteEnter(r,p,s){mn.sort=await $A.IDBJson("cacheFileSort"),mn.mode=await $A.IDBString("fileTableMode"),mn.shared=await $A.IDBBoolean("fileHideShared"),s()},created(){this.tableMode=mn.mode,this.hideShared=mn.shared,this.columns=[{type:"selection",width:50,align:"right"},{title:this.$L("\u6587\u4EF6\u540D"),key:"name",minWidth:300,sortable:!0,render:(r,{row:p})=>{let s=[];if(!/^\d+$/.test(p.id))return s.push(r("Input",{props:{elementId:"input_"+p.id,value:p.newname,autofocus:!0,disabled:!!p._load,parser:this.onParser},style:{width:"auto"},on:{"on-change":x=>{p.newname=x.target.value},"on-blur":()=>{const x=this.fileLists.find(({id:P})=>P==p.id);x&&(x.newname=p.newname,this.onBlur(x))},"on-enter":()=>{const x=this.fileLists.find(({id:P})=>P==p.id);x&&(x.newname=p.newname,this.onEnter(x))}}})),r("div",{class:"file-nbox"},[r("div",{class:`no-dark-before file-name file-icon ${p.type}`},s)]);{s.push(r("QuickEdit",{props:{value:p.name,autoEdit:!!p._edit,clickOutSide:!1,parser:this.onParser},on:{"on-edit-change":q=>{const Fe=this.fileLists.find(({id:Ze})=>Ze==p.id);Fe&&setTimeout(()=>{this.setEdit(Fe.id,q)},100)},"on-update":(q,Fe)=>{const Ze=this.fileLists.find(({id:wn})=>wn==p.id);Ze&&Ze._edit===!0&&(Ze.newname=q,this.onEnter(Ze)),Fe()}}},[r("AutoTip",{props:{placement:"right"}},$A.getFileName(p))]));const x=[];p.share?p.userid!=this.userId?x.push(r("UserAvatar",{props:{userid:p.userid,size:20}})):x.push(r("i",{class:"taskfont",domProps:{innerHTML:""}})):this.isParentShare&&x.push(r("UserAvatar",{props:{userid:p.created_id,size:20}},[p.created_id!=p.userid?r("p",[r("strong",this.$L("\u6210\u5458\u521B\u5EFA\u4E8E")+": "+p.created_at)]):r("p",this.$L("\u6240\u6709\u8005\u521B\u5EFA\u4E8E")+": "+p.created_at)]));const P=this.shearIds.includes(p.id)?" shear":"",G=p.share?" share":"";return r("div",{class:`file-nbox${P}`,attrs:{"data-id":p.id}},[r("div",{class:`no-dark-before file-name file-icon ${p.type}${G}`},s),x])}}},{title:this.$L("\u5927\u5C0F"),key:"size",width:110,resizable:!0,sortable:!0,render:(r,{row:p})=>p.type=="folder"?r("div","-"):r("AutoTip",$A.bytesToSize(p.size))},{title:this.$L("\u7C7B\u578B"),key:"type",width:110,resizable:!0,sortable:!0,render:(r,{row:p})=>{let s=this.types.find(({value:c,name:x})=>c==p.type&&x);return s?r("AutoTip",this.$L(s.name)):r("div",(p.ext||p.type).toUpperCase())}},{title:this.$L("\u6240\u6709\u8005"),key:"userid",width:130,resizable:!0,sortable:!0,render:(r,{row:p})=>r("UserAvatar",{props:{size:18,userid:p.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===mn.sort.key&&(r.sortType=mn.sort.order),r))},mounted(){this.uploadAccept=this.uploadFormat.map(r=>"."+r).join(",")},activated(){this.getFileList()},computed:{...ug(["userIsAdmin","userInfo","fileLists","wsOpenNum"]),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:p})=>p):[];return this.shareInfo.userid&&r.push(this.shareInfo.userid),r},fileList(){const{fileLists:r,searchKey:p,hideShared:s,pid:c,selectIds:x,userId:P}=this;return $A.cloneJSON(Ci.exports.sortBy(r.filter(q=>s&&q.userid!=P&&q.created_id!=P?!1:p?q.name.indexOf(p)!==-1:q.pid==c),q=>(q.type=="folder"?"a":"b")+q.name)).map(q=>(q._checked=x.includes(q.id),q))},hasShareFile(){const{fileLists:r,userId:p}=this;return r.findIndex(s=>s.share&&s.userid!=p)!==-1},shearFirst(){const{fileLists:r,shearIds:p}=this;return p.length===0?null:r.find(s=>s.id==p[0])},navigator(){let{pid:r,fileLists:p}=this,s=[];for(;r>0;){let c=p.find(({id:x,permission:P})=>x==r&&P>-1);c?(s.unshift(c),r=c.pid):r=0}return s},isPreview(){return this.windowPortrait||this.fileInfo.permission===0},isParentShare(){const{navigator:r}=this;return!!r.find(({share:p})=>p)},pasteTitle(){const{pasteItem:r}=this;let p=r.find(({type:c})=>c=="image"),s=r.find(({type:c})=>c!="image");return p&&s?"\u4E0A\u4F20\u6587\u4EF6/\u56FE\u7247":p?"\u4E0A\u4F20\u56FE\u7247":"\u4E0A\u4F20\u6587\u4EF6"},pasteWrapperClass(){return this.pasteItem.find(({type:r})=>r!=="image")?["multiple"]:[]},tableHeight(){return this.windowLandscape?Math.max(300,this.windowHeight-160):Math.max(300,this.windowHeight-200)}},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))}},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 p=$A.randomString(8);this.fileLists.push({_edit:!0,pid:this.pid,id:p,type:r,name:"",userid:this.userId,newname:this.$L("\u672A\u547D\u540D")}),this.autoBlur(p)},handleLongpress(r,p){const s=$A.getAttr(p,"data-id"),c=this.fileList.find(x=>x.id==s);!c||this.handleRightClick(r,c)},handleContextmenu(r){this.windowLandscape&&this.handleRightClick(r)},handleRightClick(r,p,s){this.contextMenuItem=$A.isJson(p)?p:{},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,p=null){r>0?this.goForward({name:"manage-file",params:{folderId:r,fileId:null,shakeId:p}}):(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:p})=>p===this.fid);if(!r){this.fileShow=!1,this.imageShow=!1;return}if(r.image_url){const p=this.fileList.filter(({image_url:s})=>!!s);if(p.length>0){this.imageIndex=p.findIndex(({id:s})=>r.id===s),this.imageList=p.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 p=`/single/file/${r.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${r.id}`,path:p,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)+`#${p}`}}):window.open($A.apiUrl(`..${p}`)),this.browseFile(0)},clickRow(r,p){p.type=="selection"?this.dropFile(r,"select"):this.dropFile(r,"open")},handleContextMenu(r,p){this.handleRightClick(p,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 p=this.fileLists.find(({_highlight:s})=>!!s);p&&this.$set(p,"_highlight",!1),r&&this.contextMenuItem.id&&this.$set(this.contextMenuItem,"_highlight",!0)},dropFile(r,p){switch(p){case"open":case"openCheckMenu":if(p==="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:P})=>{c(P),this.$store.dispatch("forgetFile",r.id)}).catch(({msg:P})=>{x(P)})})});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"delete":this.deleteFile([r.id]);break}},onSendFile(){return new Promise((r,p)=>{if(this.sendData.length===0){$A.messageError("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458"),p();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:P})=>{this.$store.dispatch("saveDialogMsg",x.msgs),this.$store.dispatch("updateDialogLastMsg",x.msgs),$A.messageSuccess(P),r()}).catch(({msg:x})=>{$A.modalError(x),p()})})},linkGet(r){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:r===!0?"yes":"no"}}).then(({data:p})=>{this.linkData=Object.assign(p,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:p})=>{this.linkShow=!1,$A.modalError(p)}).finally(p=>{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:p,share:s})=>s&&this.shearIds.includes(p));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:p})=>{$A.messageSuccess(p),this.shearIds=[],this.$store.dispatch("saveFile",r)}).catch(({msg:r})=>{$A.modalError(r)})}},deleteFile(r){if(r.length===0)return;const p=this.fileLists.find(P=>P.id==r[0])||{};let c=!r.find(P=>this.fileLists.find(G=>G.type!="folder"&&G.id==P))?"\u6587\u4EF6\u5939":"\u6587\u4EF6",x=`\u3010${p.name}\u3011\u7B49${r.length}\u4E2A${c}`;r.length===1&&(x=`\u3010${p.name}\u3011${c}`),$A.modalConfirm({title:"\u5220\u9664"+c,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664"+x+"\u5417\uFF1F",loading:!0,onOk:()=>new Promise((P,G)=>{this.$store.dispatch("call",{url:"file/remove",data:{ids:r}}).then(({msg:q})=>{P(q),this.$store.dispatch("forgetFile",r),this.selectIds=this.selectIds.filter(Fe=>!r.includes(Fe))}).catch(({msg:q})=>{G(q)})})})},autoBlur(r){this.$nextTick(()=>{if(this.$refs["input_"+r])this.$refs["input_"+r][0].focus({cursor:"all"});else if(document.getElementById("input_"+r)){const p=document.getElementById("input_"+r),s=p.value.length;p.focus(),p.setSelectionRange(0,s)}})},onParser(r){return r.replace(/[\\\/:*?\"<>|]/g,"")},onBlur(r){this.fileLists.find(({id:p,_edit:s})=>p==r.id&&!s)||this.onEnter(r)},onKeyup(r,p){r.keyCode===13?this.onEnter(p):r.keyCode===27&&(!/^\d+$/.test(p.id)?(p.newname="",this.$store.dispatch("forgetFile",p.id)):(this.setLoad(p.id,!1),this.setEdit(p.id,!1)))},onEnter(r){const p=!/^\d+$/.test(r.id);if(!r.newname){p?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:p?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),p&&(this.$store.dispatch("forgetFile",r.id),this.shakeFile(s.id))}).catch(({msg:s})=>{$A.modalError(s),this.setLoad(r.id,!1),p&&this.$store.dispatch("forgetFile",r.id)}))},setEdit(r,p){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&(this.$set(s,"_edit",p),p&&this.$set(s,"newname",s.name))},setLoad(r,p){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&this.$set(s,"_load",p)},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(p=>(p._permission=p.permission,p)))}).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:p,msg:s})=>{$A.messageSuccess(s),this.$store.dispatch("saveFile",p),this.$set(this.shareInfo,"userids",[]),this.getShare()}).catch(({ret:p,msg:s})=>{p===-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(p=>{this.shareLoad--})},upShare(r,p=!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:p===!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:P})=>P==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:p}){$A.IDBSave("cacheFileSort",["asc","desc"].includes(p)?{key:r,order:p}:{})},handleTableSelect(r){this.selectIds=r.map(p=>p.id)},clearSelect(){this.selectIds=[]},clearShear(){this.shearIds=[]},shakeFile(r){!r||this.$nextTick(p=>{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,p){let s=p==="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 P=new FileReader;P.readAsDataURL(c),P.onload=({target:G})=>{x.result=G.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,p){if(this.dialogDrag=!1,$A.dataHasFolder(p==="drag"?r.dataTransfer:r.clipboardData)){r.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${p==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\uFF0C\u8BF7\u624B\u52A8\u4E0A\u4F20\u6587\u4EF6\u5939\u3002`);return}this.pasteDragNext(r,p)},fileDragOver(r,p){let s=this.__dialogDrag=$A.randomString(8);if(!r)setTimeout(()=>{s===this.__dialogDrag&&(this.dialogDrag=r)},150);else{if(p.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},pasteSend(){const r=[];this.pasteFile.some(p=>{r.find(s=>s===p.name)||(r.push(p.name),this.$refs.fileUpload.upload(p))})},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(p=>{let s=this.uploadList.findIndex(({uid:c})=>c==p.uid);s>-1?this.uploadList.splice(s,1,p):this.uploadList.unshift(p)})},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,p,s){p._uploadIng===void 0&&(p._uploadIng=!0,this.uploadIng++),this.uploadUpdate(s)},handleSuccess(r,p,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 "+p.name+" \u4E0A\u4F20\u5931\u8D25\uFF0C"+r.msg})},handleError(r,p,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,!0}}},uu={};var vg=lg(_g,hg,dg,!1,mg,null,null,null);function mg(r){for(let p in uu)this[p]=uu[p]}var Lg=function(){return vg.exports}();export{Lg as default}; +}`;var F=iu(function(){return M(l,L+"return "+w).apply(s,f)});if(F.source=w,gi(F))throw F;return F}function dp(e){return k(e).toLowerCase()}function pp(e){return k(e).toUpperCase()}function gp(e,n,t){if(e=k(e),e&&(t||n===s))return ds(e);if(!e||!(n=ce(n)))return e;var i=Ce(e),a=Ce(n),l=ps(i,a),f=gs(i,a)+1;return sn(i,l,f).join("")}function _p(e,n,t){if(e=k(e),e&&(t||n===s))return e.slice(0,vs(e)+1);if(!e||!(n=ce(n)))return e;var i=Ce(e),a=gs(i,Ce(n))+1;return sn(i,0,a).join("")}function vp(e,n,t){if(e=k(e),e&&(t||n===s))return e.replace(gr,"");if(!e||!(n=ce(n)))return e;var i=Ce(e),a=ps(i,Ce(n));return sn(i,a).join("")}function mp(e,n){var t=fu,i=ou;if(H(n)){var a="separator"in n?n.separator:a;t="length"in n?T(n.length):t,i="omission"in n?ce(n.omission):i}e=k(e);var l=e.length;if(bn(e)){var f=Ce(e);l=f.length}if(t>=l)return e;var o=t-Tn(i);if(o<1)return i;var d=f?sn(f,0,o).join(""):e.slice(0,o);if(a===s)return d+i;if(f&&(o+=d.length-o),_i(a)){if(e.slice(o).search(a)){var v,m=d;for(a.global||(a=Rr(a.source,k(Mi.exec(a))+"g")),a.lastIndex=0;v=a.exec(m);)var w=v.index;d=d.slice(0,w===s?o:w)}}else if(e.indexOf(ce(a),o)!=o){var I=d.lastIndexOf(a);I>-1&&(d=d.slice(0,I))}return d+i}function wp(e){return e=k(e),e&&bu.test(e)?e.replace(Ri,ql):e}var xp=Pn(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),wi=sa("toUpperCase");function ru(e,n,t){return e=k(e),n=t?s:n,n===s?Nl(e)?Jl(e):Rl(e):e.match(n)||[]}var iu=E(function(e,n){try{return fe(e,s,n)}catch(t){return gi(t)?t:new y(t)}}),Ip=He(function(e,n){return ve(n,function(t){t=Pe(t),Ne(e,t,di(e[t],e))}),e});function Ap(e){var n=e==null?0:e.length,t=S();return e=n?z(e,function(i){if(typeof i[1]!="function")throw new me(G);return[t(i[0]),i[1]]}):[],E(function(i){for(var a=-1;++aXe)return[];var t=Oe,i=ee(e,Oe);n=S(n),e-=Oe;for(var a=Tr(i,n);++t0||n<0)?new O(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),n!==s&&(n=T(n),t=n<0?t.dropRight(-n):t.take(n-e)),t)},O.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},O.prototype.toArray=function(){return this.take(Oe)},De(O.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),a=u[i?"take"+(n=="last"?"Right":""):n],l=i||/^find/.test(n);!a||(u.prototype[n]=function(){var f=this.__wrapped__,o=i?[1]:arguments,d=f instanceof O,v=o[0],m=d||b(f),w=function(R){var D=a.apply(u,Ve([R],o));return i&&I?D[0]:D};m&&t&&typeof v=="function"&&v.length!=1&&(d=m=!1);var I=this.__chain__,L=!!this.__actions__.length,$=l&&!I,F=d&&!L;if(!l&&m){f=F?f:new O(this);var C=e.apply(f,o);return C.__actions__.push({func:Xt,args:[w],thisArg:s}),new we(C,I)}return $&&F?e.apply(this,o):(C=this.thru(w),$?i?C.value()[0]:C.value():C)})}),ve(["pop","push","shift","sort","splice","unshift"],function(e){var n=At[e],t=/^(?: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 n.apply(b(l)?l:[],a)}return this[t](function(f){return n.apply(b(f)?f:[],a)})}}),De(O.prototype,function(e,n){var t=u[n];if(t){var i=t.name+"";B.call(On,i)||(On[i]=[]),On[i].push({name:n,func:t})}}),On[Ht(s,un).name]=[{name:"wrapper",func:s}],O.prototype.clone=mf,O.prototype.reverse=wf,O.prototype.value=xf,u.prototype.at=Xc,u.prototype.chain=Qc,u.prototype.commit=Vc,u.prototype.next=jc,u.prototype.plant=nh,u.prototype.reverse=th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=rh,u.prototype.first=u.prototype.head,Jn&&(u.prototype[Jn]=eh),u},Fn=Xl();fn?((fn.exports=Fn)._=Fn,Ir._=Fn):V._=Fn}).call(ft)})(Ci,Ci.exports);var hg=function(){var r=this,p=r.$createElement,s=r._self._c||p;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("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.uploadList.find(function(c){var x=c.status;return x!=="finished"})?s("Loading"):s("Button",{attrs:{shape:"circle",icon:"md-checkmark"}})],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",{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",{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")))]),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",{attrs:{size:"small",type:"info"},on:{click:function(c){return r.handleContextClick("shearSelect")}}},[s("Icon",{attrs:{type:"ios-cut"}}),r._v(" "+r._s(r.$L("\u526A\u5207"))+" ")],1),s("Button",{attrs:{size:"small",type:"error"},on:{click:function(c){return r.deleteFile(r.selectIds)}}},[s("Icon",{attrs:{type:"ios-trash"}}),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.$L("\u53D6\u6D88\u9009\u62E9")))])]: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.$L("\u4EC5\u663E\u793A\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("UserAvatar",{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("UserAvatar",{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._v(r._s(r.$L("\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(P){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(),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:"",tooltipDisabled:""}}),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)},dg=[];const pg=()=>lu(()=>import("./FilePreview.4bfd7284.js"),["js/build/FilePreview.4bfd7284.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),gg=()=>lu(()=>import("./FileContent.35a4ff5e.js"),["js/build/FileContent.35a4ff5e.js","js/build/FileContent.5c6a1e1c.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),mn={sort:null,mode:null,shared:null},_g={components:{UserSelect:cg,PreviewImage:ag,FilePreview:pg,DrawerOverlay:fg,FileContent:gg},directives:{longpress:og},data(){return{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:"",maxSize:1024e3,contextMenuItem:{},contextMenuVisible:!1,contextMenuStyles:{top:0,left:0},shearIds:[],selectIds:[],dialogDrag:!1,pasteShow:!1,pasteFile:[],pasteItem:[]}},async beforeRouteEnter(r,p,s){mn.sort=await $A.IDBJson("cacheFileSort"),mn.mode=await $A.IDBString("fileTableMode"),mn.shared=await $A.IDBBoolean("fileHideShared"),s()},created(){this.tableMode=mn.mode,this.hideShared=mn.shared,this.columns=[{type:"selection",width:50,align:"right"},{title:this.$L("\u6587\u4EF6\u540D"),key:"name",minWidth:300,sortable:!0,render:(r,{row:p})=>{let s=[];if(!/^\d+$/.test(p.id))return s.push(r("Input",{props:{elementId:"input_"+p.id,value:p.newname,autofocus:!0,disabled:!!p._load,parser:this.onParser},style:{width:"auto"},on:{"on-change":x=>{p.newname=x.target.value},"on-blur":()=>{const x=this.fileLists.find(({id:P})=>P==p.id);x&&(x.newname=p.newname,this.onBlur(x))},"on-enter":()=>{const x=this.fileLists.find(({id:P})=>P==p.id);x&&(x.newname=p.newname,this.onEnter(x))}}})),r("div",{class:"file-nbox"},[r("div",{class:`no-dark-before file-name file-icon ${p.type}`},s)]);{s.push(r("QuickEdit",{props:{value:p.name,autoEdit:!!p._edit,clickOutSide:!1,parser:this.onParser},on:{"on-edit-change":q=>{const Fe=this.fileLists.find(({id:Ze})=>Ze==p.id);Fe&&setTimeout(()=>{this.setEdit(Fe.id,q)},100)},"on-update":(q,Fe)=>{const Ze=this.fileLists.find(({id:wn})=>wn==p.id);Ze&&Ze._edit===!0&&(Ze.newname=q,this.onEnter(Ze)),Fe()}}},[r("AutoTip",{props:{placement:"right"}},$A.getFileName(p))]));const x=[];p.share?p.userid!=this.userId?x.push(r("UserAvatar",{props:{userid:p.userid,size:20}})):x.push(r("i",{class:"taskfont",domProps:{innerHTML:""}})):this.isParentShare&&x.push(r("UserAvatar",{props:{userid:p.created_id,size:20}},[p.created_id!=p.userid?r("p",[r("strong",this.$L("\u6210\u5458\u521B\u5EFA\u4E8E")+": "+p.created_at)]):r("p",this.$L("\u6240\u6709\u8005\u521B\u5EFA\u4E8E")+": "+p.created_at)]));const P=this.shearIds.includes(p.id)?" shear":"",G=p.share?" share":"";return r("div",{class:`file-nbox${P}`,attrs:{"data-id":p.id}},[r("div",{class:`no-dark-before file-name file-icon ${p.type}${G}`},s),x])}}},{title:this.$L("\u5927\u5C0F"),key:"size",width:110,resizable:!0,sortable:!0,render:(r,{row:p})=>p.type=="folder"?r("div","-"):r("AutoTip",$A.bytesToSize(p.size))},{title:this.$L("\u7C7B\u578B"),key:"type",width:110,resizable:!0,sortable:!0,render:(r,{row:p})=>{let s=this.types.find(({value:c,name:x})=>c==p.type&&x);return s?r("AutoTip",this.$L(s.name)):r("div",(p.ext||p.type).toUpperCase())}},{title:this.$L("\u6240\u6709\u8005"),key:"userid",width:130,resizable:!0,sortable:!0,render:(r,{row:p})=>r("UserAvatar",{props:{size:18,userid:p.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===mn.sort.key&&(r.sortType=mn.sort.order),r))},mounted(){this.uploadAccept=this.uploadFormat.map(r=>"."+r).join(",")},activated(){this.getFileList()},computed:{...ug(["userIsAdmin","userInfo","fileLists","wsOpenNum"]),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:p})=>p):[];return this.shareInfo.userid&&r.push(this.shareInfo.userid),r},fileList(){const{fileLists:r,searchKey:p,hideShared:s,pid:c,selectIds:x,userId:P}=this;return $A.cloneJSON(Ci.exports.sortBy(r.filter(q=>s&&q.userid!=P&&q.created_id!=P?!1:p?q.name.indexOf(p)!==-1:q.pid==c),q=>(q.type=="folder"?"a":"b")+q.name)).map(q=>(q._checked=x.includes(q.id),q))},hasShareFile(){const{fileLists:r,userId:p}=this;return r.findIndex(s=>s.share&&s.userid!=p)!==-1},shearFirst(){const{fileLists:r,shearIds:p}=this;return p.length===0?null:r.find(s=>s.id==p[0])},navigator(){let{pid:r,fileLists:p}=this,s=[];for(;r>0;){let c=p.find(({id:x,permission:P})=>x==r&&P>-1);c?(s.unshift(c),r=c.pid):r=0}return s},isPreview(){return this.windowPortrait||this.fileInfo.permission===0},isParentShare(){const{navigator:r}=this;return!!r.find(({share:p})=>p)},pasteTitle(){const{pasteItem:r}=this;let p=r.find(({type:c})=>c=="image"),s=r.find(({type:c})=>c!="image");return p&&s?"\u4E0A\u4F20\u6587\u4EF6/\u56FE\u7247":p?"\u4E0A\u4F20\u56FE\u7247":"\u4E0A\u4F20\u6587\u4EF6"},pasteWrapperClass(){return this.pasteItem.find(({type:r})=>r!=="image")?["multiple"]:[]},tableHeight(){return this.windowLandscape?Math.max(300,this.windowHeight-160):Math.max(300,this.windowHeight-200)}},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))}},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 p=$A.randomString(8);this.fileLists.push({_edit:!0,pid:this.pid,id:p,type:r,name:"",userid:this.userId,newname:this.$L("\u672A\u547D\u540D")}),this.autoBlur(p)},handleLongpress(r,p){const s=$A.getAttr(p,"data-id"),c=this.fileList.find(x=>x.id==s);!c||this.handleRightClick(r,c)},handleContextmenu(r){this.windowLandscape&&this.handleRightClick(r)},handleRightClick(r,p,s){this.contextMenuItem=$A.isJson(p)?p:{},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,p=null){r>0?this.goForward({name:"manage-file",params:{folderId:r,fileId:null,shakeId:p}}):(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:p})=>p===this.fid);if(!r){this.fileShow=!1,this.imageShow=!1;return}if(r.image_url){const p=this.fileList.filter(({image_url:s})=>!!s);if(p.length>0){this.imageIndex=p.findIndex(({id:s})=>r.id===s),this.imageList=p.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 p=`/single/file/${r.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${r.id}`,path:p,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)+`#${p}`}}):window.open($A.apiUrl(`..${p}`)),this.browseFile(0)},clickRow(r,p){p.type=="selection"?this.dropFile(r,"select"):this.dropFile(r,"open")},handleContextMenu(r,p){this.handleRightClick(p,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 p=this.fileLists.find(({_highlight:s})=>!!s);p&&this.$set(p,"_highlight",!1),r&&this.contextMenuItem.id&&this.$set(this.contextMenuItem,"_highlight",!0)},dropFile(r,p){switch(p){case"open":case"openCheckMenu":if(p==="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:P})=>{c(P),this.$store.dispatch("forgetFile",r.id)}).catch(({msg:P})=>{x(P)})})});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"delete":this.deleteFile([r.id]);break}},onSendFile(){return new Promise((r,p)=>{if(this.sendData.length===0){$A.messageError("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458"),p();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:P})=>{this.$store.dispatch("saveDialogMsg",x.msgs),this.$store.dispatch("updateDialogLastMsg",x.msgs),$A.messageSuccess(P),r()}).catch(({msg:x})=>{$A.modalError(x),p()})})},linkGet(r){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:r===!0?"yes":"no"}}).then(({data:p})=>{this.linkData=Object.assign(p,{id:this.linkData.id,name:this.linkData.name}),this.linkCopy()}).catch(({msg:p})=>{this.linkShow=!1,$A.modalError(p)}).finally(p=>{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:p,share:s})=>s&&this.shearIds.includes(p));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:p})=>{$A.messageSuccess(p),this.shearIds=[],this.$store.dispatch("saveFile",r)}).catch(({msg:r})=>{$A.modalError(r)})}},deleteFile(r){if(r.length===0)return;const p=this.fileLists.find(P=>P.id==r[0])||{};let c=!r.find(P=>this.fileLists.find(G=>G.type!="folder"&&G.id==P))?"\u6587\u4EF6\u5939":"\u6587\u4EF6",x=`\u3010${p.name}\u3011\u7B49${r.length}\u4E2A${c}`;r.length===1&&(x=`\u3010${p.name}\u3011${c}`),$A.modalConfirm({title:"\u5220\u9664"+c,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664"+x+"\u5417\uFF1F",loading:!0,onOk:()=>new Promise((P,G)=>{this.$store.dispatch("call",{url:"file/remove",data:{ids:r}}).then(({msg:q})=>{P(q),this.$store.dispatch("forgetFile",r),this.selectIds=this.selectIds.filter(Fe=>!r.includes(Fe))}).catch(({msg:q})=>{G(q)})})})},autoBlur(r){this.$nextTick(()=>{if(this.$refs["input_"+r])this.$refs["input_"+r][0].focus({cursor:"all"});else if(document.getElementById("input_"+r)){const p=document.getElementById("input_"+r),s=p.value.length;p.focus(),p.setSelectionRange(0,s)}})},onParser(r){return r.replace(/[\\\/:*?\"<>|]/g,"")},onBlur(r){this.fileLists.find(({id:p,_edit:s})=>p==r.id&&!s)||this.onEnter(r)},onKeyup(r,p){r.keyCode===13?this.onEnter(p):r.keyCode===27&&(!/^\d+$/.test(p.id)?(p.newname="",this.$store.dispatch("forgetFile",p.id)):(this.setLoad(p.id,!1),this.setEdit(p.id,!1)))},onEnter(r){const p=!/^\d+$/.test(r.id);if(!r.newname){p?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:p?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),p&&(this.$store.dispatch("forgetFile",r.id),this.shakeFile(s.id))}).catch(({msg:s})=>{$A.modalError(s),this.setLoad(r.id,!1),p&&this.$store.dispatch("forgetFile",r.id)}))},setEdit(r,p){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&(this.$set(s,"_edit",p),p&&this.$set(s,"newname",s.name))},setLoad(r,p){const s=this.$store.state.fileLists.find(({id:c})=>c==r);s&&this.$set(s,"_load",p)},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(p=>(p._permission=p.permission,p)))}).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:p,msg:s})=>{$A.messageSuccess(s),this.$store.dispatch("saveFile",p),this.$set(this.shareInfo,"userids",[]),this.getShare()}).catch(({ret:p,msg:s})=>{p===-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(p=>{this.shareLoad--})},upShare(r,p=!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:p===!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:P})=>P==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:p}){$A.IDBSave("cacheFileSort",["asc","desc"].includes(p)?{key:r,order:p}:{})},handleTableSelect(r){this.selectIds=r.map(p=>p.id)},clearSelect(){this.selectIds=[]},clearShear(){this.shearIds=[]},shakeFile(r){!r||this.$nextTick(p=>{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,p){let s=p==="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 P=new FileReader;P.readAsDataURL(c),P.onload=({target:G})=>{x.result=G.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,p){if(this.dialogDrag=!1,$A.dataHasFolder(p==="drag"?r.dataTransfer:r.clipboardData)){r.preventDefault(),$A.modalWarning(`\u6682\u4E0D\u652F\u6301${p==="drag"?"\u62D6\u62FD":"\u7C98\u8D34"}\u6587\u4EF6\u5939\uFF0C\u8BF7\u624B\u52A8\u4E0A\u4F20\u6587\u4EF6\u5939\u3002`);return}this.pasteDragNext(r,p)},fileDragOver(r,p){let s=this.__dialogDrag=$A.randomString(8);if(!r)setTimeout(()=>{s===this.__dialogDrag&&(this.dialogDrag=r)},150);else{if(p.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},pasteSend(){const r=[];this.pasteFile.some(p=>{r.find(s=>s===p.name)||(r.push(p.name),this.$refs.fileUpload.upload(p))})},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(p=>{let s=this.uploadList.findIndex(({uid:c})=>c==p.uid);s>-1?this.uploadList.splice(s,1,p):this.uploadList.unshift(p)})},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,p,s){p._uploadIng===void 0&&(p._uploadIng=!0,this.uploadIng++),this.uploadUpdate(s)},handleSuccess(r,p,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 "+p.name+" \u4E0A\u4F20\u5931\u8D25\uFF0C"+r.msg})},handleError(r,p,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,!0}}},uu={};var vg=lg(_g,hg,dg,!1,mg,null,null,null);function mg(r){for(let p in uu)this[p]=uu[p]}var Lg=function(){return vg.exports}();export{Lg as default}; diff --git a/public/js/build/fileMsg.234716b5.js b/public/js/build/fileMsg.0d9b08d0.js similarity index 70% rename from public/js/build/fileMsg.234716b5.js rename to public/js/build/fileMsg.0d9b08d0.js index d63e4e471..29a88719c 100644 --- a/public/js/build/fileMsg.234716b5.js +++ b/public/js/build/fileMsg.0d9b08d0.js @@ -1 +1 @@ -import{m as a,n as r,_ as s}from"./app.2ab5f89e.js";import{I as l}from"./IFrame.f4e1afaf.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.35a96748.js"),["js/build/preview.35a96748.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),_=()=>s(()=>import("./TEditor.c448a662.js"),["js/build/TEditor.c448a662.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/ImgUpload.cf2be17d.js"]),u=()=>s(()=>import("./AceEditor.46ba32dc.js"),["js/build/AceEditor.46ba32dc.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),g=()=>s(()=>import("./OnlyOffice.512691a7.js"),["js/build/OnlyOffice.512691a7.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),f=()=>s(()=>import("./Drawio.33c85dd8.js"),["js/build/Drawio.33c85dd8.js","js/build/Drawio.fc5c6326.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),p=()=>s(()=>import("./Minder.89953d4a.js"),["js/build/Minder.89953d4a.js","js/build/Minder.f2273bdb.css","js/build/IFrame.f4e1afaf.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.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.6fb8fe77.js";import{I as l}from"./IFrame.dfb0ac0a.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.a2619f71.js"),["js/build/preview.a2619f71.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),_=()=>s(()=>import("./TEditor.116bbeaa.js"),["js/build/TEditor.116bbeaa.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/ImgUpload.056f7090.js"]),u=()=>s(()=>import("./AceEditor.6d433f2d.js"),["js/build/AceEditor.6d433f2d.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),g=()=>s(()=>import("./OnlyOffice.72397ebe.js"),["js/build/OnlyOffice.72397ebe.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),f=()=>s(()=>import("./Drawio.a7d96145.js"),["js/build/Drawio.a7d96145.js","js/build/Drawio.fc5c6326.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),p=()=>s(()=>import("./Minder.755c9889.js"),["js/build/Minder.755c9889.js","js/build/Minder.f2273bdb.css","js/build/IFrame.dfb0ac0a.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.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.8bcbee2e.js b/public/js/build/fileTask.1a203df6.js similarity index 69% rename from public/js/build/fileTask.8bcbee2e.js rename to public/js/build/fileTask.1a203df6.js index f476158a0..750f0c9c2 100644 --- a/public/js/build/fileTask.8bcbee2e.js +++ b/public/js/build/fileTask.1a203df6.js @@ -1 +1 @@ -import{n as o,_ as n}from"./app.2ab5f89e.js";import{I as r}from"./IFrame.f4e1afaf.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.35a96748.js"),["js/build/preview.35a96748.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),f=()=>n(()=>import("./TEditor.c448a662.js"),["js/build/TEditor.c448a662.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/ImgUpload.cf2be17d.js"]),_=()=>n(()=>import("./AceEditor.46ba32dc.js"),["js/build/AceEditor.46ba32dc.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css"]),u=()=>n(()=>import("./OnlyOffice.512691a7.js"),["js/build/OnlyOffice.512691a7.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),p=()=>n(()=>import("./Drawio.33c85dd8.js"),["js/build/Drawio.33c85dd8.js","js/build/Drawio.fc5c6326.css","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.css","js/build/IFrame.f4e1afaf.js"]),m=()=>n(()=>import("./Minder.89953d4a.js"),["js/build/Minder.89953d4a.js","js/build/Minder.f2273bdb.css","js/build/IFrame.f4e1afaf.js","js/build/app.2ab5f89e.js","js/build/app.2d4b066a.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.6fb8fe77.js";import{I as r}from"./IFrame.dfb0ac0a.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.a2619f71.js"),["js/build/preview.a2619f71.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),f=()=>n(()=>import("./TEditor.116bbeaa.js"),["js/build/TEditor.116bbeaa.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/ImgUpload.056f7090.js"]),_=()=>n(()=>import("./AceEditor.6d433f2d.js"),["js/build/AceEditor.6d433f2d.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css"]),u=()=>n(()=>import("./OnlyOffice.72397ebe.js"),["js/build/OnlyOffice.72397ebe.js","js/build/OnlyOffice.a5dfbde1.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),p=()=>n(()=>import("./Drawio.a7d96145.js"),["js/build/Drawio.a7d96145.js","js/build/Drawio.fc5c6326.css","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.css","js/build/IFrame.dfb0ac0a.js"]),m=()=>n(()=>import("./Minder.755c9889.js"),["js/build/Minder.755c9889.js","js/build/Minder.f2273bdb.css","js/build/IFrame.dfb0ac0a.js","js/build/app.6fb8fe77.js","js/build/app.262cb6d2.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.b2c3f0aa.js b/public/js/build/index.01701810.js similarity index 99% rename from public/js/build/index.b2c3f0aa.js rename to public/js/build/index.01701810.js index 4d949129d..7fe207a1d 100644 --- a/public/js/build/index.b2c3f0aa.js +++ b/public/js/build/index.01701810.js @@ -1 +1 @@ -import{n as c,m as h}from"./app.2ab5f89e.js";import u from"./details.ae1c56d6.js";import{D as v}from"./index.edc265fa.js";import{I as f}from"./ImgUpload.cf2be17d.js";var _=function(){var t,s,a,e,i=this,n=i.$createElement,l=i._self._c||n;return l("div",{staticClass:"approve-list"},[l("h2",[l("span",{staticClass:"list-name"},[i._v(i._s(i.$L(i.data.proc_def_name)))]),i.data.state==0?l("Tag",{attrs:{color:"cyan"}},[i._v(i._s(i.$L("\u5F85\u5BA1\u6279")))]):i._e(),i.data.state==1?l("Tag",{attrs:{color:"cyan"}},[i._v(i._s(i.$L("\u5BA1\u6279\u4E2D")))]):i._e(),i.data.state==2?l("Tag",{attrs:{color:"green"}},[i._v(i._s(i.$L("\u5DF2\u901A\u8FC7")))]):i._e(),i.data.state==3?l("Tag",{attrs:{color:"red"}},[i._v(i._s(i.$L("\u5DF2\u62D2\u7EDD")))]):i._e(),i.data.state==4?l("Tag",{attrs:{color:"red"}},[i._v(i._s(i.$L("\u5DF2\u64A4\u56DE")))]):i._e()],1),(t=i.data.var)!==null&&t!==void 0&&t.type?l("p",[i._v(i._s(i.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"),l("span",[i._v(i._s(i.$L((s=i.data.var)===null||s===void 0?void 0:s.type)))])]):i._e(),l("p",[i._v(i._s(i.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"),l("span",[i._v(i._s((a=i.data.var)===null||a===void 0?void 0:a.start_time))])]),l("p",[i._v(i._s(i.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"),l("span",[i._v(i._s((e=i.data.var)===null||e===void 0?void 0:e.end_time))])]),l("div",{staticClass:"list-member"},[l("span",[l("Avatar",{attrs:{src:i.data.userimg,size:"20"}}),i._v(" "+i._s(i.data.start_user_name)+" ")],1),l("span",[i._v(" "+i._s(i.$L("\u53D1\u8D77\u65F6\u95F4"))+"\uFF1A"+i._s(i.data.start_time)+" ")])])])},m=[];const g={name:"list",props:{data:{type:Object,default(){return{}}}},data(){return{}}},d={};var L=c(g,_,m,!1,y,null,null,null);function y(t){for(let s in d)this[s]=d[s]}var T=function(){return L.exports}(),$=function(){var t=this,s=t.$createElement,a=t._self._c||s;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("h1",[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D\u5FC3")))])]),a("Button",{attrs:{loading:t.addLoadIng,type:"primary"},on:{click:t.addApply}},[t._v(t._s(t.$L("\u6DFB\u52A0\u7533\u8BF7")))])],1),a("Tabs",{staticStyle:{margin:"0 20px",height:"100%"},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),this.loadIng?a("div",{staticClass:"load"},[a("Loading")],1):t._e()],1)]),a("div",[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,i){return a("div",{on:{click:function(n){return n.stopPropagation(),t.clickList(e,i)}}},[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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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)],1)},b=[];const k={components:{list:T,listDetails:u,DrawerOverlay:v,ImgUpload:f},name:"approve",data(){return{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",approvalList:[{value:"all",label:this.$L("\u5168\u90E8\u5BA1\u6279")},{value:"\u8BF7\u5047",label:this.$L("\u8BF7\u5047")},{value:"\u52A0\u73ED\u7533\u8BF7",label:this.$L("\u52A0\u73ED\u7533\u8BF7")}],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:{...h(["wsMsg","userInfo","userIsAdmin"]),departmentList(){let t=(this.userInfo.department_name||"").split(",");return(this.userInfo.department||[]).map((s,a)=>({id:s,name:t[a]}))}},watch:{$route(t){t.name=="manage-approve"&&this.tabsClick()},wsMsg:{handler(t){const{type:s,action:a}=t;switch(s){case"approve":a=="unread"&&this.tabsClick();break}},deep:!0},addShow(t){t||(this.addData.other="")}},mounted(){this.tabsValue="unread",this.tabsClick(),this.getUnreadList(),this.addData.department_id=this.userInfo.department[0]||0,this.addData.startTime=this.addData.endTime=this.getCurrentDate()},methods:{getCurrentDate(){const t=new Date,s=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${s}-${a}-${e}`},tabsClick(t,s=1e3){!t&&this.__tabsClick&&s>0||(this.__tabsClick=setTimeout(()=>{this.__tabsClick=null},s),s==0&&(this.loadIng=!0),this.tabsValue=t||this.tabsValue,t&&(this.approvalType=this.searchState="all"),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(s=>{s._active=!1}),this.doneList.map(s=>{s._active=!1}),this.notifyList.map(s=>{s._active=!1}),this.initiatedList.map(s=>{s._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{var n;let a=0,e=0;this.unreadTotal=s.total,(this.unreadList.length==0||this.unreadList.length==s.rows.length)&&((n=this.unreadList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.unreadList.map(o=>o.id).indexOf(l.id)==-1&&this.unreadList.push(l),l));t!="scroll"&&(this.unreadList=i),this.tabsValue=="unread"&&this.$nextTick(()=>{this.details=this.unreadList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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}}).then(({data:s})=>{var n;let a=0,e=0;this.doneTotal=s.total,(this.doneList.length==0||this.doneList.length==s.total)&&((n=this.doneList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.doneList.map(o=>o.id).indexOf(l.id)==-1&&this.doneList.push(l),l));t!="scroll"&&(this.doneList=i),this.tabsValue=="done"&&this.$nextTick(()=>{this.details=this.doneList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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}}).then(({data:s})=>{var n;let a=0,e=0;this.notifyTotal=s.total,(this.notifyList.length==0||this.notifyList.length==s.rows.length)&&((n=this.notifyList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.notifyList.map(o=>o.id).indexOf(l.id)==-1&&this.notifyList.push(l),l));t!="scroll"&&(this.notifyList=i),this.tabsValue=="notify"&&this.$nextTick(()=>{this.details=this.notifyList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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}}).then(({data:s})=>{var n;let a=0,e=0;this.initiatedTotal=s.total,(this.initiatedList.length==0||this.initiatedList.length==s.rows.length)&&((n=this.initiatedList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.initiatedList.map(o=>o.id).indexOf(l.id)==-1&&this.initiatedList.push(l),l));t!="scroll"&&(this.initiatedList=i),this.tabsValue=="initiated"&&this.$nextTick(()=>{this.details=this.initiatedList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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 s;this.addData.department_id=((s=t[0])==null?void 0:s.department[0])||0,this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:a})=>{this.procdefList=a.rows||[],this.addTitle=this.$L("\u6DFB\u52A0\u7533\u8BF7"),this.addShow=!0}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.addLoadIng=!1})}).catch(({msg:t})=>{this.addLoadIng=!1,$A.modalError(t)})},onInitiate(){this.$refs.initiateRef.validate(t=>{if(t){this.loadIng=!0;var s=JSON.parse(JSON.stringify(this.addData));s.startTime=s.startTime+" "+s.startTimeHour+":"+s.startTimeMinute,s.endTime=s.endTime+" "+s.endTimeHour+":"+s.endTimeMinute,this.addData.other&&(s.other=this.addData.other.map(a=>a.path).join(",")),this.$store.dispatch("call",{url:"approve/process/start",data:{proc_name:s.applyType,department_id:s.department_id,var:JSON.stringify(s)},method:"post"}).then(({data:a,msg:e})=>{$A.messageSuccess(e),this.addShow=!1,this.$refs.initiateRef.resetFields(),this.tabsValue="initiated",this.$nextTick(()=>{this.tabsClick()})}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng=!1})}})}}},p={};var D=c(k,$,b,!1,S,null,null,null);function S(t){for(let s in p)this[s]=p[s]}var P=function(){return D.exports}();export{P as default}; +import{n as c,m as h}from"./app.6fb8fe77.js";import u from"./details.eb8631f5.js";import{D as v}from"./index.ab28c92e.js";import{I as f}from"./ImgUpload.056f7090.js";var _=function(){var t,s,a,e,i=this,n=i.$createElement,l=i._self._c||n;return l("div",{staticClass:"approve-list"},[l("h2",[l("span",{staticClass:"list-name"},[i._v(i._s(i.$L(i.data.proc_def_name)))]),i.data.state==0?l("Tag",{attrs:{color:"cyan"}},[i._v(i._s(i.$L("\u5F85\u5BA1\u6279")))]):i._e(),i.data.state==1?l("Tag",{attrs:{color:"cyan"}},[i._v(i._s(i.$L("\u5BA1\u6279\u4E2D")))]):i._e(),i.data.state==2?l("Tag",{attrs:{color:"green"}},[i._v(i._s(i.$L("\u5DF2\u901A\u8FC7")))]):i._e(),i.data.state==3?l("Tag",{attrs:{color:"red"}},[i._v(i._s(i.$L("\u5DF2\u62D2\u7EDD")))]):i._e(),i.data.state==4?l("Tag",{attrs:{color:"red"}},[i._v(i._s(i.$L("\u5DF2\u64A4\u56DE")))]):i._e()],1),(t=i.data.var)!==null&&t!==void 0&&t.type?l("p",[i._v(i._s(i.$L("\u5047\u671F\u7C7B\u578B"))+"\uFF1A"),l("span",[i._v(i._s(i.$L((s=i.data.var)===null||s===void 0?void 0:s.type)))])]):i._e(),l("p",[i._v(i._s(i.$L("\u5F00\u59CB\u65F6\u95F4"))+"\uFF1A"),l("span",[i._v(i._s((a=i.data.var)===null||a===void 0?void 0:a.start_time))])]),l("p",[i._v(i._s(i.$L("\u7ED3\u675F\u65F6\u95F4"))+"\uFF1A"),l("span",[i._v(i._s((e=i.data.var)===null||e===void 0?void 0:e.end_time))])]),l("div",{staticClass:"list-member"},[l("span",[l("Avatar",{attrs:{src:i.data.userimg,size:"20"}}),i._v(" "+i._s(i.data.start_user_name)+" ")],1),l("span",[i._v(" "+i._s(i.$L("\u53D1\u8D77\u65F6\u95F4"))+"\uFF1A"+i._s(i.data.start_time)+" ")])])])},m=[];const g={name:"list",props:{data:{type:Object,default(){return{}}}},data(){return{}}},d={};var L=c(g,_,m,!1,y,null,null,null);function y(t){for(let s in d)this[s]=d[s]}var T=function(){return L.exports}(),$=function(){var t=this,s=t.$createElement,a=t._self._c||s;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("h1",[t._v(t._s(t.$L("\u5BA1\u6279\u4E2D\u5FC3")))])]),a("Button",{attrs:{loading:t.addLoadIng,type:"primary"},on:{click:t.addApply}},[t._v(t._s(t.$L("\u6DFB\u52A0\u7533\u8BF7")))])],1),a("Tabs",{staticStyle:{margin:"0 20px",height:"100%"},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),this.loadIng?a("div",{staticClass:"load"},[a("Loading")],1):t._e()],1)]),a("div",[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,i){return a("div",{on:{click:function(n){return n.stopPropagation(),t.clickList(e,i)}}},[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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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,i){return a("Option",{key:i,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)],1)},b=[];const k={components:{list:T,listDetails:u,DrawerOverlay:v,ImgUpload:f},name:"approve",data(){return{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",approvalList:[{value:"all",label:this.$L("\u5168\u90E8\u5BA1\u6279")},{value:"\u8BF7\u5047",label:this.$L("\u8BF7\u5047")},{value:"\u52A0\u73ED\u7533\u8BF7",label:this.$L("\u52A0\u73ED\u7533\u8BF7")}],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:{...h(["wsMsg","userInfo","userIsAdmin"]),departmentList(){let t=(this.userInfo.department_name||"").split(",");return(this.userInfo.department||[]).map((s,a)=>({id:s,name:t[a]}))}},watch:{$route(t){t.name=="manage-approve"&&this.tabsClick()},wsMsg:{handler(t){const{type:s,action:a}=t;switch(s){case"approve":a=="unread"&&this.tabsClick();break}},deep:!0},addShow(t){t||(this.addData.other="")}},mounted(){this.tabsValue="unread",this.tabsClick(),this.getUnreadList(),this.addData.department_id=this.userInfo.department[0]||0,this.addData.startTime=this.addData.endTime=this.getCurrentDate()},methods:{getCurrentDate(){const t=new Date,s=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${s}-${a}-${e}`},tabsClick(t,s=1e3){!t&&this.__tabsClick&&s>0||(this.__tabsClick=setTimeout(()=>{this.__tabsClick=null},s),s==0&&(this.loadIng=!0),this.tabsValue=t||this.tabsValue,t&&(this.approvalType=this.searchState="all"),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(s=>{s._active=!1}),this.doneList.map(s=>{s._active=!1}),this.notifyList.map(s=>{s._active=!1}),this.initiatedList.map(s=>{s._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{var n;let a=0,e=0;this.unreadTotal=s.total,(this.unreadList.length==0||this.unreadList.length==s.rows.length)&&((n=this.unreadList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.unreadList.map(o=>o.id).indexOf(l.id)==-1&&this.unreadList.push(l),l));t!="scroll"&&(this.unreadList=i),this.tabsValue=="unread"&&this.$nextTick(()=>{this.details=this.unreadList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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}}).then(({data:s})=>{var n;let a=0,e=0;this.doneTotal=s.total,(this.doneList.length==0||this.doneList.length==s.total)&&((n=this.doneList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.doneList.map(o=>o.id).indexOf(l.id)==-1&&this.doneList.push(l),l));t!="scroll"&&(this.doneList=i),this.tabsValue=="done"&&this.$nextTick(()=>{this.details=this.doneList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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}}).then(({data:s})=>{var n;let a=0,e=0;this.notifyTotal=s.total,(this.notifyList.length==0||this.notifyList.length==s.rows.length)&&((n=this.notifyList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.notifyList.map(o=>o.id).indexOf(l.id)==-1&&this.notifyList.push(l),l));t!="scroll"&&(this.notifyList=i),this.tabsValue=="notify"&&this.$nextTick(()=>{this.details=this.notifyList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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}}).then(({data:s})=>{var n;let a=0,e=0;this.initiatedTotal=s.total,(this.initiatedList.length==0||this.initiatedList.length==s.rows.length)&&((n=this.initiatedList)==null||n.map(l=>{l._active&&(a=l.id)}));let i=s.rows.map((l,r)=>(l._active=a>0?l.id==a:r==0,l._active&&(e=r),t=="scroll"&&this.initiatedList.map(o=>o.id).indexOf(l.id)==-1&&this.initiatedList.push(l),l));t!="scroll"&&(this.initiatedList=i),this.tabsValue=="initiated"&&this.$nextTick(()=>{this.details=this.initiatedList[e]||{}})}).catch(({msg:s})=>{$A.modalError(s)}).finally(s=>{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 s;this.addData.department_id=((s=t[0])==null?void 0:s.department[0])||0,this.$store.dispatch("call",{url:"approve/procdef/all",method:"post"}).then(({data:a})=>{this.procdefList=a.rows||[],this.addTitle=this.$L("\u6DFB\u52A0\u7533\u8BF7"),this.addShow=!0}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.addLoadIng=!1})}).catch(({msg:t})=>{this.addLoadIng=!1,$A.modalError(t)})},onInitiate(){this.$refs.initiateRef.validate(t=>{if(t){this.loadIng=!0;var s=JSON.parse(JSON.stringify(this.addData));s.startTime=s.startTime+" "+s.startTimeHour+":"+s.startTimeMinute,s.endTime=s.endTime+" "+s.endTimeHour+":"+s.endTimeMinute,this.addData.other&&(s.other=this.addData.other.map(a=>a.path).join(",")),this.$store.dispatch("call",{url:"approve/process/start",data:{proc_name:s.applyType,department_id:s.department_id,var:JSON.stringify(s)},method:"post"}).then(({data:a,msg:e})=>{$A.messageSuccess(e),this.addShow=!1,this.$refs.initiateRef.resetFields(),this.tabsValue="initiated",this.$nextTick(()=>{this.tabsClick()})}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{this.loadIng=!1})}})}}},p={};var D=c(k,$,b,!1,S,null,null,null);function S(t){for(let s in p)this[s]=p[s]}var P=function(){return D.exports}();export{P as default}; diff --git a/public/js/build/index.0045ae13.js b/public/js/build/index.3ab6dc68.js similarity index 94% rename from public/js/build/index.0045ae13.js rename to public/js/build/index.3ab6dc68.js index b41d28ab7..6d928b42e 100644 --- a/public/js/build/index.0045ae13.js +++ b/public/js/build/index.3ab6dc68.js @@ -1 +1 @@ -import{n as r,l as i}from"./app.2ab5f89e.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.6fb8fe77.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.1e8d5001.js b/public/js/build/index.5f4e12fc.js similarity index 98% rename from public/js/build/index.1e8d5001.js rename to public/js/build/index.5f4e12fc.js index 48e5d430c..92da95f86 100644 --- a/public/js/build/index.1e8d5001.js +++ b/public/js/build/index.5f4e12fc.js @@ -1 +1 @@ -import{m as o,b as r,h as l,n as c}from"./app.2ab5f89e.js";var u=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))]),e.showMobileBox?e._e():t("div",{staticClass:"setting-more",on:{click:function(a){return e.toggleRoute("index")}}},[t("Icon",{attrs:{type:"md-close"}})],1)])])]),t("div",{staticClass:"setting-box",class:{"show-mobile-box":e.showMobileBox}},[t("div",{staticClass:"setting-menu"},[t("ul",[e._l(e.menu,function(a,n){return t("li",{key:n,class:e.classNameRoute(a.path,a.divided),on:{click:function(v){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)]),t("div",{staticClass:"setting-content"},[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)},d=[];const m={data(){return{version:window.systemInfo.version}},mounted(){},computed:{...o(["userInfo","userIsAdmin","clientNewVersion"]),routeName(){return this.$route.name},showMobileBox(){return this.routeName==="manage-setting"},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:"checkin",name:"\u7B7E\u5230\u8BBE\u7F6E",desc:" (Beta)"},{path:"language",name:"\u8BED\u8A00\u8BBE\u7F6E",divided:!0},{path:"theme",name:"\u4E3B\u9898\u8BBE\u7F6E"}];return this.$Electron&&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:"approve",name:"\u5BA1\u6279\u8BBE\u7F6E",desc:" (Beta)"},{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":r.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(){l.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:"\u7248\u672C\u4FE1\u606F",content:t})}}).catch(e=>{})}}},i={};var h=c(m,u,d,!1,p,null,null,null);function p(e){for(let s in i)this[s]=i[s]}var $=function(){return h.exports}();export{$ as default}; +import{m as o,b as r,h as l,n as c}from"./app.6fb8fe77.js";var u=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))]),e.showMobileBox?e._e():t("div",{staticClass:"setting-more",on:{click:function(a){return e.toggleRoute("index")}}},[t("Icon",{attrs:{type:"md-close"}})],1)])])]),t("div",{staticClass:"setting-box",class:{"show-mobile-box":e.showMobileBox}},[t("div",{staticClass:"setting-menu"},[t("ul",[e._l(e.menu,function(a,n){return t("li",{key:n,class:e.classNameRoute(a.path,a.divided),on:{click:function(v){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)]),t("div",{staticClass:"setting-content"},[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)},d=[];const m={data(){return{version:window.systemInfo.version}},mounted(){},computed:{...o(["userInfo","userIsAdmin","clientNewVersion"]),routeName(){return this.$route.name},showMobileBox(){return this.routeName==="manage-setting"},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:"checkin",name:"\u7B7E\u5230\u8BBE\u7F6E",desc:" (Beta)"},{path:"language",name:"\u8BED\u8A00\u8BBE\u7F6E",divided:!0},{path:"theme",name:"\u4E3B\u9898\u8BBE\u7F6E"}];return this.$Electron&&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:"approve",name:"\u5BA1\u6279\u8BBE\u7F6E",desc:" (Beta)"},{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":r.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(){l.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:"\u7248\u672C\u4FE1\u606F",content:t})}}).catch(e=>{})}}},i={};var h=c(m,u,d,!1,p,null,null,null);function p(e){for(let s in i)this[s]=i[s]}var $=function(){return h.exports}();export{$ as default}; diff --git a/public/js/build/index.d02ed9ac.js b/public/js/build/index.9b4ad049.js similarity index 99% rename from public/js/build/index.d02ed9ac.js rename to public/js/build/index.9b4ad049.js index 835d284b5..6e794d7d5 100644 --- a/public/js/build/index.d02ed9ac.js +++ b/public/js/build/index.9b4ad049.js @@ -1,4 +1,4 @@ -import{x as br,o as Ls,n as gl}from"./app.2ab5f89e.js";import{I as Ts}from"./ImgUpload.cf2be17d.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{x as br,o as Ls,n as gl}from"./app.6fb8fe77.js";import{I as Ts}from"./ImgUpload.056f7090.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.edc265fa.js b/public/js/build/index.ab28c92e.js similarity index 98% rename from public/js/build/index.edc265fa.js rename to public/js/build/index.ab28c92e.js index 48f3c4aac..65591fc1d 100644 --- a/public/js/build/index.edc265fa.js +++ b/public/js/build/index.ab28c92e.js @@ -1 +1 @@ -import{n as s}from"./app.2ab5f89e.js";var l=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-resize-line",class:[e.resizing?"resizing":"",e.placement],on:{mousedown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"left",37,n.key,["Left","ArrowLeft"])||"button"in n&&n.button!==0?null:(n.stopPropagation(),n.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(i=>{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,i=(e.pageY||e.clientY+document.documentElement.scrollTop)-this.mouseY;if(typeof this.tmpSize=="number"){let n;this.placement=="bottom"?n=this.reverse?this.tmpSize-i:this.tmpSize+i:n=this.reverse?this.tmpSize-t:this.tmpSize+t,this.min>0&&(n=Math.max(this.min,n)),this.max>0&&(n=Math.min(this.max,n)),this.$emit("input",n)}this.$emit("on-change",{event:"move",diff:{x:t,y:i},offset:this.offset})},handleUp(){!this.resizing||(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}},o={};var c=s(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,i=e._self._c||t;return i("div",{ref:"body",staticClass:"overlay-body",style:e.bodyStyle},[i("div",{staticClass:"overlay-close"},[i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(n){return n.stopPropagation(),e.onClose.apply(null,arguments)}}},[i("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[i("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?i("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(n){e.dynamicSize=n},expression:"dynamicSize"}}):e._e(),i("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 _=s(v,f,p,!1,z,null,null,null);function z(e){for(let t in r)this[t]=r[t]}var y=function(){return _.exports}(),b=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{ref:"modal",attrs:{closable:e.escClosable,"mask-closable":e.maskClosable,"footer-hide":!0,"transition-names":[e.$A.isAndroid()?"":`drawer-slide-${e.placement}`,""],beforeClose:e.beforeClose,fullscreen:"","class-name":e.modalClass},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[i("DrawerOverlayView",{attrs:{placement:e.placement,size:e.size,minSize:e.minSize,resize:e.resize},on:{"on-close":e.onClose}},[e._t("default")],2)],1)},g=[];const w={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}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)}},computed:{modalClass(){return this.className?`common-drawer-overlay ${this.className} ${this.placement}`:`common-drawer-overlay ${this.placement}`}},methods:{onClose(){this.$refs.modal.close()}}},a={};var S=s(w,b,g,!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 as s}from"./app.6fb8fe77.js";var l=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-resize-line",class:[e.resizing?"resizing":"",e.placement],on:{mousedown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"left",37,n.key,["Left","ArrowLeft"])||"button"in n&&n.button!==0?null:(n.stopPropagation(),n.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(i=>{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,i=(e.pageY||e.clientY+document.documentElement.scrollTop)-this.mouseY;if(typeof this.tmpSize=="number"){let n;this.placement=="bottom"?n=this.reverse?this.tmpSize-i:this.tmpSize+i:n=this.reverse?this.tmpSize-t:this.tmpSize+t,this.min>0&&(n=Math.max(this.min,n)),this.max>0&&(n=Math.min(this.max,n)),this.$emit("input",n)}this.$emit("on-change",{event:"move",diff:{x:t,y:i},offset:this.offset})},handleUp(){!this.resizing||(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}},o={};var c=s(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,i=e._self._c||t;return i("div",{ref:"body",staticClass:"overlay-body",style:e.bodyStyle},[i("div",{staticClass:"overlay-close"},[i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(n){return n.stopPropagation(),e.onClose.apply(null,arguments)}}},[i("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[i("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?i("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(n){e.dynamicSize=n},expression:"dynamicSize"}}):e._e(),i("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 _=s(v,f,p,!1,z,null,null,null);function z(e){for(let t in r)this[t]=r[t]}var y=function(){return _.exports}(),b=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{ref:"modal",attrs:{closable:e.escClosable,"mask-closable":e.maskClosable,"footer-hide":!0,"transition-names":[e.$A.isAndroid()?"":`drawer-slide-${e.placement}`,""],beforeClose:e.beforeClose,fullscreen:"","class-name":e.modalClass},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[i("DrawerOverlayView",{attrs:{placement:e.placement,size:e.size,minSize:e.minSize,resize:e.resize},on:{"on-close":e.onClose}},[e._t("default")],2)],1)},g=[];const w={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}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)}},computed:{modalClass(){return this.className?`common-drawer-overlay ${this.className} ${this.placement}`:`common-drawer-overlay ${this.placement}`}},methods:{onClose(){this.$refs.modal.close()}}},a={};var S=s(w,b,g,!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/keyboard.fc515293.js b/public/js/build/keyboard.b30ae163.js similarity index 97% rename from public/js/build/keyboard.fc515293.js rename to public/js/build/keyboard.b30ae163.js index c3b497938..91b5e146b 100644 --- a/public/js/build/keyboard.fc515293.js +++ b/public/js/build/keyboard.b30ae163.js @@ -1 +1 @@ -import{n as i}from"./app.2ab5f89e.js";var r=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()}}},[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(", ")])])],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("\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 m={data(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"Command":"Ctrl",formData:{screenshot_key:""},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:""},$A.jsonParse(window.localStorage.getItem("__keyboard:data__"))||{}),this.formData_bak=$A.cloneJSON(this.formData)},onKeydown({key:t,keyCode:s}){s!==8&&(t=/^[A-Za-z0-9]?$/.test(t)?t.toUpperCase():"",t&&(this.formData.screenshot_key=t))},submitForm(){this.$refs.formData.validate(t=>{t&&(console.log(this.formData),window.localStorage.setItem("__keyboard:data__",$A.jsonStringify(this.formData)),$A.bindScreenshotKey(this.formData),$A.messageSuccess("\u4FDD\u5B58\u6210\u529F"))})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},o={};var _=i(m,r,n,!1,l,"09a76b9f",null,null);function l(t){for(let s in o)this[s]=o[s]}var u=function(){return _.exports}();export{u as default}; +import{n as i}from"./app.6fb8fe77.js";var r=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()}}},[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(", ")])])],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("\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 m={data(){return{loadIng:0,mateName:/macintosh|mac os x/i.test(navigator.userAgent)?"Command":"Ctrl",formData:{screenshot_key:""},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:""},$A.jsonParse(window.localStorage.getItem("__keyboard:data__"))||{}),this.formData_bak=$A.cloneJSON(this.formData)},onKeydown({key:t,keyCode:s}){s!==8&&(t=/^[A-Za-z0-9]?$/.test(t)?t.toUpperCase():"",t&&(this.formData.screenshot_key=t))},submitForm(){this.$refs.formData.validate(t=>{t&&(console.log(this.formData),window.localStorage.setItem("__keyboard:data__",$A.jsonStringify(this.formData)),$A.bindScreenshotKey(this.formData),$A.messageSuccess("\u4FDD\u5B58\u6210\u529F"))})},resetForm(){this.formData=$A.cloneJSON(this.formData_bak)}}},o={};var _=i(m,r,n,!1,l,"09a76b9f",null,null);function l(t){for(let s in o)this[s]=o[s]}var u=function(){return _.exports}();export{u as default}; diff --git a/public/js/build/language.b2ff9329.js b/public/js/build/language.3598a0b0.js similarity index 95% rename from public/js/build/language.b2ff9329.js rename to public/js/build/language.3598a0b0.js index 6206ff162..12f2b232c 100644 --- a/public/js/build/language.b2ff9329.js +++ b/public/js/build/language.3598a0b0.js @@ -1 +1 @@ -import{j as s,m as l,l as i,k as m,n as u}from"./app.2ab5f89e.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{j as s,m as l,l as i,k as m,n as u}from"./app.6fb8fe77.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.ef37879d.js b/public/js/build/license.66258ff9.js similarity index 98% rename from public/js/build/license.ef37879d.js rename to public/js/build/license.66258ff9.js index e8730d2d7..80011b7b5 100644 --- a/public/js/build/license.ef37879d.js +++ b/public/js/build/license.66258ff9.js @@ -1 +1 @@ -import{m as e,n}from"./app.2ab5f89e.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.6fb8fe77.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.cfa93d8f.js b/public/js/build/login.a11ab1ed.js similarity index 98% rename from public/js/build/login.cfa93d8f.js rename to public/js/build/login.a11ab1ed.js index 7797f3288..3bd47f205 100644 --- a/public/js/build/login.cfa93d8f.js +++ b/public/js/build/login.a11ab1ed.js @@ -1,4 +1,4 @@ -import{j as wr,l as yr,b as Ar,m as xr,k as Cr,n as _r}from"./app.2ab5f89e.js";/*! +import{j as wr,l as yr,b as Ar,m as xr,k as Cr,n as _r}from"./app.6fb8fe77.js";/*! * vue-qrcode v1.0.2 * https://fengyuanchen.github.io/vue-qrcode * @@ -13,4 +13,4 @@ Minimum version required to store current data is: `+Y+`. `);var J=C(N,k,$),er=d.getSymbolSize(N),G=new a(er);return F(G,N),S(G),w(G,N),l(G,k,0),N>=7&&h(G,N),y(G,J),isNaN(M)&&(M=m.getBestMask(G,l.bind(null,G,k))),m.applyMask(M,G),l(G,k,M),{modules:G,version:N,errorCorrectionLevel:k,maskPattern:M,segments:$}}g.create=function(N,k){if(typeof N=="undefined"||N==="")throw new Error("No input text");var M=s.M,$,H;return typeof k!="undefined"&&(M=s.from(k.errorCorrectionLevel,s.M),$=L.from(k.version),H=m.from(k.maskPattern),k.toSJISFunc&&d.setToSJISFunction(k.toSJISFunc)),O(N,$,M,H)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(c,_,g){var p=c("../utils/buffer"),d=c("./polynomial"),s=c("buffer").Buffer;function i(a){this.genPoly=void 0,this.degree=a,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(f){this.degree=f,this.genPoly=d.generateECPolynomial(this.degree)},i.prototype.encode=function(f){if(!this.genPoly)throw new Error("Encoder not initialized");var n=p.alloc(this.degree),m=s.concat([f,n],f.length+this.degree),E=d.mod(m,this.genPoly),T=this.degree-E.length;if(T>0){var L=p.alloc(this.degree);return E.copy(L,T),L}return E},_.exports=i},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(c,_,g){var p="[0-9]+",d="[A-Z $%*+\\-./:]+",s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");var i="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+`)(?:.|[\r ]))+`;g.KANJI=new RegExp(s,"g"),g.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),g.BYTE=new RegExp(i,"g"),g.NUMERIC=new RegExp(p,"g"),g.ALPHANUMERIC=new RegExp(d,"g");var a=new RegExp("^"+s+"$"),f=new RegExp("^"+p+"$"),n=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");g.testKanji=function(E){return a.test(E)},g.testNumeric=function(E){return f.test(E)},g.testAlphanumeric=function(E){return n.test(E)}},{}],20:[function(c,_,g){var p=c("./mode"),d=c("./numeric-data"),s=c("./alphanumeric-data"),i=c("./byte-data"),a=c("./kanji-data"),f=c("./regex"),n=c("./utils"),m=c("dijkstrajs");function E(S){return unescape(encodeURIComponent(S)).length}function T(S,w,h){for(var l=[],y;(y=S.exec(h))!==null;)l.push({data:y[0],index:y.index,mode:w,length:y[0].length});return l}function L(S){var w=T(f.NUMERIC,p.NUMERIC,S),h=T(f.ALPHANUMERIC,p.ALPHANUMERIC,S),l,y;n.isKanjiModeEnabled()?(l=T(f.BYTE,p.BYTE,S),y=T(f.KANJI,p.KANJI,S)):(l=T(f.BYTE_KANJI,p.BYTE,S),y=[]);var C=w.concat(h,l,y);return C.sort(function(P,O){return P.index-O.index}).map(function(P){return{data:P.data,mode:P.mode,length:P.length}})}function b(S,w){switch(w){case p.NUMERIC:return d.getBitsLength(S);case p.ALPHANUMERIC:return s.getBitsLength(S);case p.KANJI:return a.getBitsLength(S);case p.BYTE:return i.getBitsLength(S)}}function U(S){return S.reduce(function(w,h){var l=w.length-1>=0?w[w.length-1]:null;return l&&l.mode===h.mode?(w[w.length-1].data+=h.data,w):(w.push(h),w)},[])}function B(S){for(var w=[],h=0;h40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},g.getSymbolTotalCodewords=function(i){return d[i]},g.getBCHDigit=function(s){for(var i=0;s!==0;)i++,s>>>=1;return i},g.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');p=i},g.isKanjiModeEnabled=function(){return typeof p!="undefined"},g.toSJIS=function(i){return p(i)}},{}],22:[function(c,_,g){g.isValid=function(d){return!isNaN(d)&&d>=1&&d<=40}},{}],23:[function(c,_,g){var p=c("./utils"),d=c("./error-correction-code"),s=c("./error-correction-level"),i=c("./mode"),a=c("./version-check"),f=c("isarray"),n=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,m=p.getBCHDigit(n);function E(U,B,I){for(var F=1;F<=40;F++)if(B<=g.getCapacity(F,I,U))return F}function T(U,B){return i.getCharCountIndicator(U,B)+4}function L(U,B){var I=0;return U.forEach(function(F){var S=T(F.mode,B);I+=S+F.getBitsLength()}),I}function b(U,B){for(var I=1;I<=40;I++){var F=L(U,I);if(F<=g.getCapacity(I,B,i.MIXED))return I}}g.from=function(B,I){return a.isValid(B)?parseInt(B,10):I},g.getCapacity=function(B,I,F){if(!a.isValid(B))throw new Error("Invalid QR Code version");typeof F=="undefined"&&(F=i.BYTE);var S=p.getSymbolTotalCodewords(B),w=d.getTotalCodewordsCount(B,I),h=(S-w)*8;if(F===i.MIXED)return h;var l=h-T(F,B);switch(F){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},g.getBestVersionForData=function(B,I){var F,S=s.from(I,s.M);if(f(B)){if(B.length>1)return b(B,S);if(B.length===0)return 1;F=B[0]}else F=B;return E(F.mode,F.getLength(),S)},g.getEncodedBits=function(B){if(!a.isValid(B)||B<7)throw new Error("Invalid QR Code version");for(var I=B<<12;p.getBCHDigit(I)-m>=0;)I^=n<0&&U>0&&a[b-1]||(m+=T?s("M",U+n,.5+B+n):s("m",E,0),E=0,T=!1),U+1':"",B="',I='viewBox="0 0 '+b+" "+b+'"',F=E.width?'width="'+E.width+'" height="'+E.width+'" ':"",S=''+U+B+` -`;return typeof m=="function"&&m(null,S),S}},{"./utils":27}],27:[function(c,_,g){function p(d){if(typeof d=="number"&&(d=d.toString()),typeof d!="string")throw new Error("Color should be defined as hex string");var s=d.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+d);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(a){return[a,a]}))),s.length===6&&s.push("F","F");var i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+s.slice(0,6).join("")}}g.getOptions=function(s){s||(s={}),s.color||(s.color={});var i=typeof s.margin=="undefined"||s.margin===null||s.margin<0?4:s.margin,a=s.width&&s.width>=21?s.width:void 0,f=s.scale||4;return{width:a,scale:a?4:f,margin:i,color:{dark:p(s.color.dark||"#000000ff"),light:p(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},g.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},g.getImageWidth=function(s,i){var a=g.getScale(s,i);return Math.floor((s+i.margin*2)*a)},g.qrToImageData=function(s,i,a){for(var f=i.modules.size,n=i.modules.data,m=g.getScale(f,a),E=Math.floor((f+a.margin*2)*m),T=a.margin*m,L=[a.color.light,a.color.dark],b=0;b=T&&U>=T&&b=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return w|0}function f(w){return w!==w}function n(w,h){var l;return i.TYPED_ARRAY_SUPPORT?(l=new Uint8Array(h),l.__proto__=i.prototype):(l=w,l===null&&(l=new i(h)),l.length=h),l}function m(w,h){var l=n(w,h<0?0:a(h)|0);if(!i.TYPED_ARRAY_SUPPORT)for(var y=0;y55295&&l<57344){if(!C){if(l>56319){(h-=3)>-1&&P.push(239,191,189);continue}else if(O+1===y){(h-=3)>-1&&P.push(239,191,189);continue}C=l;continue}if(l<56320){(h-=3)>-1&&P.push(239,191,189),C=l;continue}l=(C-55296<<10|l-56320)+65536}else C&&(h-=3)>-1&&P.push(239,191,189);if(C=null,l<128){if((h-=1)<0)break;P.push(l)}else if(l<2048){if((h-=2)<0)break;P.push(l>>6|192,l&63|128)}else if(l<65536){if((h-=3)<0)break;P.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((h-=4)<0)break;P.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return P}function B(w){if(i.isBuffer(w))return w.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(w)||w instanceof ArrayBuffer))return w.byteLength;typeof w!="string"&&(w=""+w);var h=w.length;return h===0?0:U(w).length}function I(w,h,l,y){for(var C=0;C=h.length||C>=w.length);++C)h[C+l]=w[C];return C}function F(w,h,l,y){return I(U(h,w.length-l),w,l,y)}function S(w,h,l,y){if(typeof h=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&h instanceof ArrayBuffer?L(w,h,l,y):typeof h=="string"?E(w,h):b(w,h)}i.prototype.write=function(h,l,y){l===void 0?(y=this.length,l=0):y===void 0&&typeof l=="string"?(y=this.length,l=0):isFinite(l)&&(l=l|0,isFinite(y)?y=y|0:y=void 0);var C=this.length-l;if((y===void 0||y>C)&&(y=C),h.length>0&&(y<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");return F(this,h,l,y)},i.prototype.slice=function(h,l){var y=this.length;h=~~h,l=l===void 0?y:~~l,h<0?(h+=y,h<0&&(h=0)):h>y&&(h=y),l<0?(l+=y,l<0&&(l=0)):l>y&&(l=y),l=h.length&&(l=h.length),l||(l=0),C>0&&C=this.length)throw new RangeError("sourceStart out of bounds");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),h.length-l=0;--O)h[O+l]=this[O+y];else if(P<1e3||!i.TYPED_ARRAY_SUPPORT)for(O=0;O>>0,y=y===void 0?this.length:y>>>0,h||(h=0);var P;if(typeof h=="number")for(P=l;P0)throw new Error("Invalid string. Length must be a multiple of 4");var F=B.indexOf("=");F===-1&&(F=I);var S=F===I?0:4-F%4;return[F,S]}function m(B){var I=n(B),F=I[0],S=I[1];return(F+S)*3/4-S}function E(B,I,F){return(I+F)*3/4-F}function T(B){var I,F=n(B),S=F[0],w=F[1],h=new s(E(B,S,w)),l=0,y=w>0?S-4:S,C;for(C=0;C>16&255,h[l++]=I>>8&255,h[l++]=I&255;return w===2&&(I=d[B.charCodeAt(C)]<<2|d[B.charCodeAt(C+1)]>>4,h[l++]=I&255),w===1&&(I=d[B.charCodeAt(C)]<<10|d[B.charCodeAt(C+1)]<<4|d[B.charCodeAt(C+2)]>>2,h[l++]=I>>8&255,h[l++]=I&255),h}function L(B){return p[B>>18&63]+p[B>>12&63]+p[B>>6&63]+p[B&63]}function b(B,I,F){for(var S,w=[],h=I;hy?y:l+h));return S===1?(I=B[F-1],w.push(p[I>>2]+p[I<<4&63]+"==")):S===2&&(I=(B[F-2]<<8)+B[F-1],w.push(p[I>>10]+p[I>>4&63]+p[I<<2&63]+"=")),w.join("")}},{}],30:[function(c,_,g){var p=c("base64-js"),d=c("ieee754"),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g.Buffer=n,g.SlowBuffer=S,g.INSPECT_MAX_BYTES=50;var i=2147483647;g.kMaxLength=i,n.TYPED_ARRAY_SUPPORT=a(),!n.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),t.foo()===42}catch{return!1}}Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(!!n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(!!n.isBuffer(this))return this.byteOffset}});function f(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,n.prototype),r}function n(t,r,e){if(typeof t=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L(t)}return m(t,r,e)}typeof Symbol!="undefined"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192;function m(t,r,e){if(typeof t=="string")return b(t,r);if(ArrayBuffer.isView(t))return U(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return B(t,r,e);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var o=t.valueOf&&t.valueOf();if(o!=null&&o!==t)return n.from(o,r,e);var v=I(t);if(v)return v;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return n.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}n.from=function(t,r,e){return m(t,r,e)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array);function E(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function T(t,r,e){return E(t),t<=0?f(t):r!==void 0?typeof e=="string"?f(t).fill(r,e):f(t).fill(r):f(t)}n.alloc=function(t,r,e){return T(t,r,e)};function L(t){return E(t),f(t<0?0:F(t)|0)}n.allocUnsafe=function(t){return L(t)},n.allocUnsafeSlow=function(t){return L(t)};function b(t,r){if((typeof r!="string"||r==="")&&(r="utf8"),!n.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=w(t,r)|0,o=f(e),v=o.write(t,r);return v!==e&&(o=o.slice(0,v)),o}function U(t){for(var r=t.length<0?0:F(t.length)|0,e=f(r),o=0;o=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return t|0}function S(t){return+t!=t&&(t=0),n.alloc(+t)}n.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==n.prototype},n.compare=function(r,e){if(Q(r,Uint8Array)&&(r=n.from(r,r.offset,r.byteLength)),Q(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(r)||!n.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===e)return 0;for(var o=r.length,v=e.length,A=0,x=Math.min(o,v);A2&&arguments[2]===!0;if(!o&&e===0)return 0;for(var v=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return tr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return fr(t).length;default:if(v)return o?-1:tr(t).length;r=(""+r).toLowerCase(),v=!0}}n.byteLength=w;function h(t,r,e){var o=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return G(this,r,e);case"utf8":case"utf-8":return H(this,r,e);case"ascii":return J(this,r,e);case"latin1":case"binary":return er(this,r,e);case"base64":return $(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cr(this,r,e);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}n.prototype._isBuffer=!0;function l(t,r,e){var o=t[r];t[r]=t[e],t[e]=o}n.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;ee&&(r+=" ... "),""},s&&(n.prototype[s]=n.prototype.inspect),n.prototype.compare=function(r,e,o,v,A){if(Q(r,Uint8Array)&&(r=n.from(r,r.offset,r.byteLength)),!n.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(e===void 0&&(e=0),o===void 0&&(o=r?r.length:0),v===void 0&&(v=0),A===void 0&&(A=this.length),e<0||o>r.length||v<0||A>this.length)throw new RangeError("out of range index");if(v>=A&&e>=o)return 0;if(v>=A)return-1;if(e>=o)return 1;if(e>>>=0,o>>>=0,v>>>=0,A>>>=0,this===r)return 0;for(var x=A-v,z=o-e,K=Math.min(x,z),q=this.slice(v,A),j=r.slice(e,o),Z=0;Z2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,gr(e)&&(e=v?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(v)return-1;e=t.length-1}else if(e<0)if(v)e=0;else return-1;if(typeof r=="string"&&(r=n.from(r,o)),n.isBuffer(r))return r.length===0?-1:C(t,r,e,o,v);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):C(t,[r],e,o,v);throw new TypeError("val must be string, number or Buffer")}function C(t,r,e,o,v){var A=1,x=t.length,z=r.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(t.length<2||r.length<2)return-1;A=2,x/=2,z/=2,e/=2}function K(vr,mr){return A===1?vr[mr]:vr.readUInt16BE(mr*A)}var q;if(v){var j=-1;for(q=e;qx&&(e=x-z),q=e;q>=0;q--){for(var Z=!0,lr=0;lrv&&(o=v)):o=v;var A=r.length;o>A/2&&(o=A/2);for(var x=0;x>>0,isFinite(o)?(o=o>>>0,v===void 0&&(v="utf8")):(v=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var A=this.length-e;if((o===void 0||o>A)&&(o=A),r.length>0&&(o<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");for(var x=!1;;)switch(v){case"hex":return P(this,r,e,o);case"utf8":case"utf-8":return O(this,r,e,o);case"ascii":return R(this,r,e,o);case"latin1":case"binary":return N(this,r,e,o);case"base64":return k(this,r,e,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,r,e,o);default:if(x)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),x=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(t,r,e){return r===0&&e===t.length?p.fromByteArray(t):p.fromByteArray(t.slice(r,e))}function H(t,r,e){e=Math.min(t.length,e);for(var o=[],v=r;v239?4:A>223?3:A>191?2:1;if(v+z<=e){var K,q,j,Z;switch(z){case 1:A<128&&(x=A);break;case 2:K=t[v+1],(K&192)===128&&(Z=(A&31)<<6|K&63,Z>127&&(x=Z));break;case 3:K=t[v+1],q=t[v+2],(K&192)===128&&(q&192)===128&&(Z=(A&15)<<12|(K&63)<<6|q&63,Z>2047&&(Z<55296||Z>57343)&&(x=Z));break;case 4:K=t[v+1],q=t[v+2],j=t[v+3],(K&192)===128&&(q&192)===128&&(j&192)===128&&(Z=(A&15)<<18|(K&63)<<12|(q&63)<<6|j&63,Z>65535&&Z<1114112&&(x=Z))}}x===null?(x=65533,z=1):x>65535&&(x-=65536,o.push(x>>>10&1023|55296),x=56320|x&1023),o.push(x),v+=z}return Y(o)}var D=4096;function Y(t){var r=t.length;if(r<=D)return String.fromCharCode.apply(String,t);for(var e="",o=0;oo)&&(e=o);for(var v="",A=r;Ao&&(r=o),e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),ee)throw new RangeError("Trying to access beyond buffer length")}n.prototype.readUIntLE=function(r,e,o){r=r>>>0,e=e>>>0,o||W(r,e,this.length);for(var v=this[r],A=1,x=0;++x>>0,e=e>>>0,o||W(r,e,this.length);for(var v=this[r+--e],A=1;e>0&&(A*=256);)v+=this[r+--e]*A;return v},n.prototype.readUInt8=function(r,e){return r=r>>>0,e||W(r,1,this.length),this[r]},n.prototype.readUInt16LE=function(r,e){return r=r>>>0,e||W(r,2,this.length),this[r]|this[r+1]<<8},n.prototype.readUInt16BE=function(r,e){return r=r>>>0,e||W(r,2,this.length),this[r]<<8|this[r+1]},n.prototype.readUInt32LE=function(r,e){return r=r>>>0,e||W(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},n.prototype.readUInt32BE=function(r,e){return r=r>>>0,e||W(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},n.prototype.readIntLE=function(r,e,o){r=r>>>0,e=e>>>0,o||W(r,e,this.length);for(var v=this[r],A=1,x=0;++x=A&&(v-=Math.pow(2,8*e)),v},n.prototype.readIntBE=function(r,e,o){r=r>>>0,e=e>>>0,o||W(r,e,this.length);for(var v=e,A=1,x=this[r+--v];v>0&&(A*=256);)x+=this[r+--v]*A;return A*=128,x>=A&&(x-=Math.pow(2,8*e)),x},n.prototype.readInt8=function(r,e){return r=r>>>0,e||W(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},n.prototype.readInt16LE=function(r,e){r=r>>>0,e||W(r,2,this.length);var o=this[r]|this[r+1]<<8;return o&32768?o|4294901760:o},n.prototype.readInt16BE=function(r,e){r=r>>>0,e||W(r,2,this.length);var o=this[r+1]|this[r]<<8;return o&32768?o|4294901760:o},n.prototype.readInt32LE=function(r,e){return r=r>>>0,e||W(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},n.prototype.readInt32BE=function(r,e){return r=r>>>0,e||W(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},n.prototype.readFloatLE=function(r,e){return r=r>>>0,e||W(r,4,this.length),d.read(this,r,!0,23,4)},n.prototype.readFloatBE=function(r,e){return r=r>>>0,e||W(r,4,this.length),d.read(this,r,!1,23,4)},n.prototype.readDoubleLE=function(r,e){return r=r>>>0,e||W(r,8,this.length),d.read(this,r,!0,52,8)},n.prototype.readDoubleBE=function(r,e){return r=r>>>0,e||W(r,8,this.length),d.read(this,r,!1,52,8)};function X(t,r,e,o,v,A){if(!n.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>v||rt.length)throw new RangeError("Index out of range")}n.prototype.writeUIntLE=function(r,e,o,v){if(r=+r,e=e>>>0,o=o>>>0,!v){var A=Math.pow(2,8*o)-1;X(this,r,e,o,A,0)}var x=1,z=0;for(this[e]=r&255;++z>>0,o=o>>>0,!v){var A=Math.pow(2,8*o)-1;X(this,r,e,o,A,0)}var x=o-1,z=1;for(this[e+x]=r&255;--x>=0&&(z*=256);)this[e+x]=r/z&255;return e+o},n.prototype.writeUInt8=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,1,255,0),this[e]=r&255,e+1},n.prototype.writeUInt16LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,65535,0),this[e]=r&255,this[e+1]=r>>>8,e+2},n.prototype.writeUInt16BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=r&255,e+2},n.prototype.writeUInt32LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255,e+4},n.prototype.writeUInt32BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255,e+4},n.prototype.writeIntLE=function(r,e,o,v){if(r=+r,e=e>>>0,!v){var A=Math.pow(2,8*o-1);X(this,r,e,o,A-1,-A)}var x=0,z=1,K=0;for(this[e]=r&255;++x>0)-K&255;return e+o},n.prototype.writeIntBE=function(r,e,o,v){if(r=+r,e=e>>>0,!v){var A=Math.pow(2,8*o-1);X(this,r,e,o,A-1,-A)}var x=o-1,z=1,K=0;for(this[e+x]=r&255;--x>=0&&(z*=256);)r<0&&K===0&&this[e+x+1]!==0&&(K=1),this[e+x]=(r/z>>0)-K&255;return e+o},n.prototype.writeInt8=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=r&255,e+1},n.prototype.writeInt16LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,32767,-32768),this[e]=r&255,this[e+1]=r>>>8,e+2},n.prototype.writeInt16BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=r&255,e+2},n.prototype.writeInt32LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,2147483647,-2147483648),this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4},n.prototype.writeInt32BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255,e+4};function ir(t,r,e,o,v,A){if(e+o>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function nr(t,r,e,o,v){return r=+r,e=e>>>0,v||ir(t,r,e,4),d.write(t,r,e,o,23,4),e+4}n.prototype.writeFloatLE=function(r,e,o){return nr(this,r,e,!0,o)},n.prototype.writeFloatBE=function(r,e,o){return nr(this,r,e,!1,o)};function or(t,r,e,o,v){return r=+r,e=e>>>0,v||ir(t,r,e,8),d.write(t,r,e,o,52,8),e+8}n.prototype.writeDoubleLE=function(r,e,o){return or(this,r,e,!0,o)},n.prototype.writeDoubleBE=function(r,e,o){return or(this,r,e,!1,o)},n.prototype.copy=function(r,e,o,v){if(!n.isBuffer(r))throw new TypeError("argument should be a Buffer");if(o||(o=0),!v&&v!==0&&(v=this.length),e>=r.length&&(e=r.length),e||(e=0),v>0&&v=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),r.length-e=0;--x)r[x+e]=this[x+o];else Uint8Array.prototype.set.call(r,this.subarray(o,v),e);return A},n.prototype.fill=function(r,e,o,v){if(typeof r=="string"){if(typeof e=="string"?(v=e,e=0,o=this.length):typeof o=="string"&&(v=o,o=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!n.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(r.length===1){var A=r.charCodeAt(0);(v==="utf8"&&A<128||v==="latin1")&&(r=A)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(e<0||this.length>>0,o=o===void 0?this.length:o>>>0,r||(r=0);var x;if(typeof r=="number")for(x=e;x55295&&e<57344){if(!v){if(e>56319){(r-=3)>-1&&A.push(239,191,189);continue}else if(x+1===o){(r-=3)>-1&&A.push(239,191,189);continue}v=e;continue}if(e<56320){(r-=3)>-1&&A.push(239,191,189),v=e;continue}e=(v-55296<<10|e-56320)+65536}else v&&(r-=3)>-1&&A.push(239,191,189);if(v=null,e<128){if((r-=1)<0)break;A.push(e)}else if(e<2048){if((r-=2)<0)break;A.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;A.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;A.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return A}function ur(t){for(var r=[],e=0;e>8,v=e%256,A.push(v),A.push(o);return A}function fr(t){return p.toByteArray(dr(t))}function rr(t,r,e,o){for(var v=0;v=r.length||v>=t.length);++v)r[v+e]=t[v];return v}function Q(t,r){return t instanceof r||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===r.name}function gr(t){return t!==t}var Br=function(){for(var t="0123456789abcdef",r=new Array(256),e=0;e<16;++e)for(var o=e*16,v=0;v<16;++v)r[o+v]=t[e]+t[v];return r}()},{"base64-js":29,ieee754:32}],31:[function(c,_,g){var p={single_source_shortest_paths:function(d,s,i){var a={},f={};f[s]=0;var n=p.PriorityQueue.make();n.push(s,0);for(var m,E,T,L,b,U,B,I,F;!n.empty();){m=n.pop(),E=m.value,L=m.cost,b=d[E]||{};for(T in b)b.hasOwnProperty(T)&&(U=b[T],B=L+U,I=f[T],F=typeof f[T]=="undefined",(F||I>B)&&(f[T]=B,n.push(T,B),a[T]=E))}if(typeof i!="undefined"&&typeof f[i]=="undefined"){var S=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(S)}return a},extract_shortest_path_from_predecessor_list:function(d,s){for(var i=[],a=s;a;)i.push(a),d[a],a=d[a];return i.reverse(),i},find_path:function(d,s,i){var a=p.single_source_shortest_paths(d,s,i);return p.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(d){var s=p.PriorityQueue,i={},a;d=d||{};for(a in s)s.hasOwnProperty(a)&&(i[a]=s[a]);return i.queue=[],i.sorter=d.sorter||s.default_sorter,i},default_sorter:function(d,s){return d.cost-s.cost},push:function(d,s){var i={value:d,cost:s};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof _!="undefined"&&(_.exports=p)},{}],32:[function(c,_,g){g.read=function(p,d,s,i,a){var f,n,m=a*8-i-1,E=(1<>1,L=-7,b=s?a-1:0,U=s?-1:1,B=p[d+b];for(b+=U,f=B&(1<<-L)-1,B>>=-L,L+=m;L>0;f=f*256+p[d+b],b+=U,L-=8);for(n=f&(1<<-L)-1,f>>=-L,L+=i;L>0;n=n*256+p[d+b],b+=U,L-=8);if(f===0)f=1-T;else{if(f===E)return n?NaN:(B?-1:1)*(1/0);n=n+Math.pow(2,i),f=f-T}return(B?-1:1)*n*Math.pow(2,f-i)},g.write=function(p,d,s,i,a,f){var n,m,E,T=f*8-a-1,L=(1<>1,U=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:f-1,I=i?1:-1,F=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(m=isNaN(d)?1:0,n=L):(n=Math.floor(Math.log(d)/Math.LN2),d*(E=Math.pow(2,-n))<1&&(n--,E*=2),n+b>=1?d+=U/E:d+=U*Math.pow(2,1-b),d*E>=2&&(n++,E/=2),n+b>=L?(m=0,n=L):n+b>=1?(m=(d*E-1)*Math.pow(2,a),n=n+b):(m=d*Math.pow(2,b-1)*Math.pow(2,a),n=0));a>=8;p[s+B]=m&255,B+=I,m/=256,a-=8);for(n=n<0;p[s+B]=n&255,B+=I,n/=256,T-=8);p[s+B-I]|=F*128}},{}],33:[function(c,_,g){var p={}.toString;_.exports=Array.isArray||function(d){return p.call(d)=="[object Array]"}},{}]},{},[24])(24)})}),Ir={name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(V){return V(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var V=this,c=this.options,_=this.tag,g=String(this.value);_==="canvas"?pr.toCanvas(this.$el,g,c,function(p){if(p)throw p}):_==="img"?pr.toDataURL(g,c,function(p,d){if(p)throw p;V.$el.src=d}):pr.toString(g,c,function(p,d){if(p)throw p;V.$el.innerHTML=d})}},mounted:function(){this.generate()}},Sr=function(){var u=this,V=u.$createElement,c=u._self._c||V;return c("div",{staticClass:"page-login"},[c("PageTitle",{attrs:{title:u.$L("\u767B\u5F55")}}),c("div",{staticClass:"login-body"},[c("div",{staticClass:"login-logo no-dark-content",class:{"can-click":u.needStartHome},on:{click:u.goHome}}),c("div",{staticClass:"login-box"},[c("div",{staticClass:"login-mode-switch"},[c("div",{staticClass:"login-mode-switch-box"},[c("ETooltip",{attrs:{disabled:u.$isEEUiApp||u.windowTouch,content:u.$L(u.loginMode=="qrcode"?"\u5E10\u53F7\u767B\u5F55":"\u626B\u7801\u767B\u5F55"),placement:"left"}},[c("span",{staticClass:"login-mode-switch-icon",on:{click:u.switchLoginMode}},[u.loginMode=="qrcode"?c("svg",{attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"PcOutlined"}},[c("path",{attrs:{d:"M23 16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v12ZM21 4H3v9h18V4ZM3 15v1h18v-1H3Zm3 6a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1Z",fill:"currentColor"}})]):c("svg",{attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"QrOutlined"}},[c("path",{attrs:{d:"M6.5 7.5a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1Z",fill:"currentColor"}}),c("path",{attrs:{d:"M4.5 2.5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2h-7Zm0 2h7v7h-7v-7ZM11 16a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm0 3.5a1 1 0 1 1 2 0v1a1 1 0 1 1-2 0v-1Zm4-7.5a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm3.5 0a1 1 0 0 1 1-1h1a1 1 0 1 1 0 2h-1a1 1 0 0 1-1-1ZM15 17c0-1.1.9-2 2-2h2.5c1.1 0 2 .9 2 2v2.5c0 1.1-.9 2-2 2H17c-1.1 0-2-.9-2-2V17Zm4.5 0H17v2.5h2.5V17Zm-15-2c-1.1 0-2 .9-2 2v2.5c0 1.1.9 2 2 2H7c1.1 0 2-.9 2-2V17c0-1.1-.9-2-2-2H4.5Zm0 2H7v2.5H4.5V17ZM15 4.5c0-1.1.9-2 2-2h2.5c1.1 0 2 .9 2 2V7c0 1.1-.9 2-2 2H17c-1.1 0-2-.9-2-2V4.5Zm4.5 0H17V7h2.5V4.5Z",fill:"currentColor"}})])])])],1)]),c("div",{staticClass:"login-title"},[u._v(u._s(u.welcomeTitle))]),c("div",{staticClass:"login-subtitle"},[u._v(u._s(u.$L(u.subTitle)))]),c("transition",{attrs:{name:"login-mode"}},[u.loginMode=="qrcode"?c("div",{staticClass:"login-qrcode",on:{click:u.qrcodeRefresh}},[c("VueQrcode",{attrs:{value:u.qrcodeUrl,options:{width:200,margin:2}}})],1):u._e()]),c("transition",{attrs:{name:"login-mode"}},[u.loginMode=="access"?c("div",{staticClass:"login-access"},[u.isSoftware&&u.cacheServerUrl?c("Input",{attrs:{value:u.$A.getDomain(u.cacheServerUrl),prefix:"ios-globe-outline",size:"large",readonly:"",clearable:""},on:{"on-clear":function(_){return u.setServerUrl("")}}}):u._e(),c("Input",{ref:"email",attrs:{prefix:"ios-mail-outline",placeholder:u.$L("\u8F93\u5165\u60A8\u7684\u7535\u5B50\u90AE\u4EF6"),type:"email",size:"large",clearable:""},on:{"on-enter":u.onLogin,"on-blur":u.onBlur},model:{value:u.email,callback:function(_){u.email=_},expression:"email"}}),c("Input",{ref:"password",attrs:{prefix:"ios-lock-outline",placeholder:u.$L("\u8F93\u5165\u60A8\u7684\u5BC6\u7801"),type:"password",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.password,callback:function(_){u.password=_},expression:"password"}}),u.loginType=="reg"?c("Input",{ref:"password2",attrs:{prefix:"ios-lock-outline",placeholder:u.$L("\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"),type:"password",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.password2,callback:function(_){u.password2=_},expression:"password2"}}):u._e(),u.loginType=="reg"&&u.needInvite?c("Input",{ref:"invite",staticClass:"login-code",attrs:{placeholder:u.$L("\u8BF7\u8F93\u5165\u6CE8\u518C\u9080\u8BF7\u7801"),type:"text",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.invite,callback:function(_){u.invite=_},expression:"invite"}},[c("span",{attrs:{slot:"prepend"},slot:"prepend"},[u._v("\xA0"+u._s(u.$L("\u9080\u8BF7\u7801"))+"\xA0")])]):u._e(),u.loginType=="login"&&u.codeNeed?c("Input",{ref:"code",staticClass:"login-code",attrs:{placeholder:u.$L("\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801"),type:"text",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.code,callback:function(_){u.code=_},expression:"code"}},[c("Icon",{staticClass:"login-icon",attrs:{slot:"prepend",type:"ios-checkmark-circle-outline"},slot:"prepend"}),c("div",{staticClass:"login-code-end",attrs:{slot:"append"},on:{click:u.refreshCode},slot:"append"},[u.codeLoad>0?c("div",{staticClass:"code-load"},[c("Loading")],1):u.codeUrl==="error"?c("span",{staticClass:"code-error"},[u._v(u._s(u.$L("\u52A0\u8F7D\u5931\u8D25")))]):c("img",{attrs:{src:u.codeUrl}})])],1):u._e(),c("Button",{attrs:{type:"primary",loading:u.loadIng>0||u.loginJump,size:"large",long:""},on:{click:u.onLogin}},[u._v(u._s(u.$L(u.loginText)))]),u.loginType=="reg"?c("div",{staticClass:"login-switch"},[u._v(u._s(u.$L("\u5DF2\u7ECF\u6709\u5E10\u53F7\uFF1F"))),c("a",{attrs:{href:"javascript:void(0)"},on:{click:function(_){u.loginType="login"}}},[u._v(u._s(u.$L("\u767B\u5F55\u5E10\u53F7")))])]):c("div",{staticClass:"login-switch"},[u._v(u._s(u.$L("\u8FD8\u6CA1\u6709\u5E10\u53F7\uFF1F"))),c("a",{attrs:{href:"javascript:void(0)"},on:{click:function(_){u.loginType="reg"}}},[u._v(u._s(u.$L("\u6CE8\u518C\u5E10\u53F7")))])])],1):u._e()])],1),c("div",{staticClass:"login-bottom"},[c("Dropdown",{attrs:{trigger:"click",placement:"bottom-start"}},[c("div",{staticClass:"login-setting"},[u._v(" "+u._s(u.$L("\u8BBE\u7F6E"))+" "),c("i",{staticClass:"taskfont"},[u._v("\uE689")])]),c("DropdownMenu",{staticClass:"login-setting-menu",attrs:{slot:"list"},slot:"list"},[c("Dropdown",{attrs:{placement:"right-start",transfer:""},on:{"on-click":u.setTheme}},[c("DropdownItem",[c("div",{staticClass:"login-setting-item"},[u._v(" "+u._s(u.$L("\u4E3B\u9898\u76AE\u80A4"))+" "),c("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),c("DropdownMenu",{attrs:{slot:"list"},slot:"list"},u._l(u.themeList,function(_,g){return c("DropdownItem",{key:g,attrs:{name:_.value,selected:u.themeMode===_.value}},[u._v(u._s(u.$L(_.name)))])}),1)],1),c("Dropdown",{attrs:{placement:"right-start",transfer:""},on:{"on-click":u.onLanguage}},[c("DropdownItem",{attrs:{divided:""}},[c("div",{staticClass:"login-setting-item"},[u._v(" "+u._s(u.currentLanguage)+" "),c("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),c("DropdownMenu",{attrs:{slot:"list"},slot:"list"},u._l(u.languageList,function(_,g){return c("DropdownItem",{key:g,attrs:{name:g,selected:u.languageType===g}},[u._v(u._s(_))])}),1)],1)],1)],1),c("div",{staticClass:"login-forgot"},[u._v(u._s(u.$L("\u5FD8\u8BB0\u5BC6\u7801\u4E86\uFF1F"))),c("a",{attrs:{href:"javascript:void(0)"},on:{click:u.forgotPassword}},[u._v(u._s(u.$L("\u91CD\u7F6E\u5BC6\u7801")))])])],1)]),c("Modal",{attrs:{title:u.$L("\u9690\u79C1\u534F\u8BAE"),"mask-closable":!1},model:{value:u.privacyShow,callback:function(_){u.privacyShow=_},expression:"privacyShow"}},[c("div",{staticClass:"privacy-content"},[c("div",[u._v("\u6B22\u8FCE\u4F7F\u7528\u672C\u8F6F\u4EF6\uFF01")]),c("p",[u._v("\u5728\u60A8\u4F7F\u7528\u672C\u8F6F\u4EF6\u524D\uFF0C\u8BF7\u60A8\u8BA4\u771F\u9605\u8BFB\u5E76\u4E86\u89E3\u76F8\u5E94\u7684"),c("a",{attrs:{target:"_blank",href:u.$A.apiUrl("privacy")}},[u._v("\u300A"+u._s(u.$L("\u9690\u79C1\u653F\u7B56"))+"\u300B")]),u._v("\uFF0C\u4EE5\u4E86\u89E3\u6211\u4EEC\u7684\u670D\u52A1\u5185\u5BB9\u548C\u60A8\u76F8\u5173\u4E2A\u4EBA\u4FE1\u606F\u7684\u5904\u7406\u89C4\u5219\u3002\u6211\u4EEC\u5C06\u4E25\u683C\u7684\u6309\u7167\u9690\u79C1\u670D\u52A1\u534F\u8BAE\u4E3A\u60A8\u63D0\u4F9B\u670D\u52A1\uFF0C\u4FDD\u62A4\u60A8\u7684\u4E2A\u4EBA\u4FE1\u606F\u3002")])]),c("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[c("Button",{attrs:{type:"default"},on:{click:function(_){return u.onPrivacy(!1)}}},[u._v(u._s(u.$L("\u4E0D\u540C\u610F")))]),c("Button",{attrs:{type:"primary"},on:{click:function(_){return u.onPrivacy(!0)}}},[u._v(u._s(u.$L("\u540C\u610F")))])],1)])],1)},br=[];const Fr={components:{VueQrcode:Ir},data(){return{loadIng:0,languageList:wr,languageType:yr,qrcodeVal:"",qrcodeTimer:null,qrcodeLoad:!1,codeNeed:!1,codeLoad:0,codeKey:"",codeUrl:"",loginMode:"access",loginType:"login",loginJump:!1,email:"",password:"",password2:"",code:"",invite:"",needStartHome:!1,needInvite:!1,subscribe:null,privacyShow:!1}},async mounted(){this.privacyShow=!!this.$isEEUiApp&&await $A.IDBString("cachePrivacyShow")!=="no",this.email=await $A.IDBString("cacheLoginEmail")||"",this.isSoftware?this.chackServerUrl().catch(u=>{}):this.setServerUrl("").catch(u=>{}),this.qrcodeTimer=setInterval(this.qrcodeStatus,2e3),this.subscribe=Ar.Store.subscribe("useSSOLogin",()=>{this.inputServerUrl()})},beforeDestroy(){clearInterval(this.qrcodeTimer),this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},activated(){this.loginType=this.$route.query.type==="reg"?"reg":"login",this.getDemoAccount(),this.getNeedStartHome(),this.$Electron&&this.$Electron.sendMessage("subWindowDestroyAll")},deactivated(){this.loginJump=!1,this.password="",this.password2="",this.code="",this.invite=""},computed:{...xr(["cacheServerUrl","themeMode","themeList"]),isSoftware(){return this.$Electron||this.$isEEUiApp},currentLanguage(){return wr[yr]||"Language"},welcomeTitle(){if(this.loginMode=="qrcode")return this.$L("\u626B\u7801\u767B\u5F55");const u=window.systemInfo.title||"DooTask";return"Welcome "+u},subTitle(){const u=window.systemInfo.title||"DooTask";return this.loginMode=="qrcode"?this.$L(`\u8BF7\u4F7F\u7528${u}\u79FB\u52A8\u7AEF\u626B\u63CF\u4E8C\u7EF4\u7801\u3002`):this.loginType=="reg"?this.$L("\u8F93\u5165\u60A8\u7684\u4FE1\u606F\u4EE5\u521B\u5EFA\u5E10\u6237\u3002"):this.$L("\u8F93\u5165\u60A8\u7684\u51ED\u8BC1\u4EE5\u8BBF\u95EE\u60A8\u7684\u5E10\u6237\u3002")},loginText(){let u=this.loginType=="login"?"\u767B\u5F55":"\u6CE8\u518C";return this.loginJump&&(u+="\u6210\u529F..."),u},qrcodeUrl(){return $A.apiUrl("../login?qrcode="+this.qrcodeVal)}},watch:{$route({query:u}){u.type=="reg"&&this.$nextTick(()=>{this.loginType="reg"})},loginMode(){this.qrcodeRefresh()},loginType(u){u=="reg"&&this.getNeedInvite()}},methods:{goHome(){this.needStartHome&&this.goForward("index")},setTheme(u){this.$store.dispatch("setTheme",u)},getDemoAccount(){this.isNotServer()||this.$store.dispatch("call",{url:"system/demo"}).then(({data:u})=>{u.account&&(this.email=u.account,this.password=u.password)}).catch(u=>{})},getNeedStartHome(){this.isNotServer()||this.$store.dispatch("needHome").then(u=>{this.needStartHome=!0}).catch(u=>{this.needStartHome=!1})},getNeedInvite(){this.$store.dispatch("call",{url:"users/reg/needinvite"}).then(({data:u})=>{this.needInvite=!!u.need}).catch(u=>{this.needInvite=!1})},switchLoginMode(){this.chackServerUrl(!0).then(()=>{this.loginMode==="qrcode"?this.loginMode="access":this.loginMode="qrcode"})},qrcodeRefresh(){this.loginMode=="qrcode"&&(this.qrcodeVal=$A.randomString(32))},qrcodeStatus(){this.$route.name!=="login"||this.loginMode!="qrcode"||this.qrcodeLoad||(this.qrcodeLoad=!0,this.$store.dispatch("call",{url:"users/login/qrcode?code="+this.qrcodeVal}).then(({data:u})=>{this.$store.dispatch("handleClearCache",u).then(this.goNext)}).catch(u=>{}).finally(u=>{this.qrcodeLoad=!1}))},forgotPassword(){$A.modalWarning("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01")},refreshCode(){this.codeLoad>0||(setTimeout(u=>{this.codeLoad++},600),this.$store.dispatch("call",{url:"users/login/codejson"}).then(({data:u})=>{this.codeKey=u.key,this.codeUrl=u.img}).catch(u=>{this.codeUrl="error"}).finally(u=>{this.codeLoad--}))},inputServerUrl(){if(this.privacyShow)return;let u=$A.rightDelete(this.cacheServerUrl,"/api/");u=$A.leftDelete(u,"http://"),$A.modalInput({title:"\u4F7F\u7528 SSO \u767B\u5F55",value:u,placeholder:"\u8BF7\u8F93\u5165\u670D\u52A1\u5668\u5730\u5740",onOk:V=>V?this.inputServerChack($A.trim(V)):"\u8BF7\u8F93\u5165\u670D\u52A1\u5668\u5730\u5740"})},inputServerChack(u){return new Promise((V,c)=>{let _=u;/\/api\/$/.test(_)||(_=_+($A.rightExists(_,"/")?"api/":"/api/")),/^https*:\/\//i.test(_)||(_=`https://${_}`),this.$store.dispatch("call",{url:`${_}system/setting`,checkNetwork:!1}).then(async()=>{await this.setServerUrl(_),V()}).catch(({ret:g,msg:p})=>{if(g===-1001){if(!/^https*:\/\//i.test(u)){this.inputServerChack(`http://${u}`).then(V).catch(c);return}p="\u670D\u52A1\u5668\u5730\u5740\u65E0\u6548"}c(p)})})},chackServerUrl(u){return new Promise((V,c)=>{this.isNotServer()?(this.inputServerUrl(),u===!0&&this.$nextTick(_=>$A.messageWarning("\u8BF7\u8BBE\u7F6E\u670D\u52A1\u5668")),c()):V()})},async setServerUrl(u){await $A.IDBSet("cachePrivacyShow",u?"no":"yes"),u!=this.cacheServerUrl&&(await $A.IDBSet("cacheServerUrl",u),$A.reloadUrl())},isNotServer(){let u=$A.getDomain(window.systemInfo.apiUrl);return this.isSoftware&&(u==""||u=="public")},onBlur(){if(this.loginType!="login"||!this.email){this.codeNeed=!1;return}this.loadIng++,this.$store.dispatch("call",{url:"users/login/needcode",data:{email:this.email}}).then(()=>{this.refreshCode(),this.codeNeed=!0}).catch(u=>{this.codeNeed=!1}).finally(u=>{this.loadIng--})},onPrivacy(u){u?(this.privacyShow=!1,this.chackServerUrl().catch(V=>{})):$A.eeuiAppGoDesktop()},onLogin(){this.chackServerUrl(!0).then(()=>{if(this.email=$A.trim(this.email),this.password=$A.trim(this.password),this.password2=$A.trim(this.password2),this.code=$A.trim(this.code),this.invite=$A.trim(this.invite),!$A.isEmail(this.email)){$A.messageWarning("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740"),this.$refs.email.focus();return}if(!this.password){$A.messageWarning("\u8BF7\u8F93\u5165\u5BC6\u7801"),this.$refs.password.focus();return}if(this.loginType=="reg"&&this.password!=this.password2){$A.messageWarning("\u786E\u8BA4\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4"),this.$refs.password2.focus();return}this.loadIng++,this.$store.dispatch("call",{url:"users/login",data:{type:this.loginType,email:this.email,password:this.password,code:this.code,code_key:this.codeKey,invite:this.invite}}).then(({data:u})=>{$A.IDBSave("cacheLoginEmail",this.email),this.codeNeed=!1,this.$store.dispatch("handleClearCache",u).then(this.goNext)}).catch(({data:u,msg:V})=>{u.code==="email"?(this.loginType="login",$A.modalWarning(V)):$A.modalError({content:V,onOk:c=>{this.$refs.code.focus()}}),u.code==="need"&&(this.refreshCode(),this.codeNeed=!0)}).finally(u=>{this.loadIng--})})},goNext(){this.loginJump=!0;const u=decodeURIComponent($A.getObject(this.$route.query,"from"));u?$A.IDBSet("clearCache","login").then(V=>{window.location.replace(u)}):this.goForward({name:"manage-dashboard"},!0)},onLanguage(u){Cr(u)}}},Er={};var Lr=_r(Fr,Sr,br,!1,Ur,null,null,null);function Ur(u){for(let V in Er)this[V]=Er[V]}var Rr=function(){return Lr.exports}();export{Rr as default}; +`;return typeof m=="function"&&m(null,S),S}},{"./utils":27}],27:[function(c,_,g){function p(d){if(typeof d=="number"&&(d=d.toString()),typeof d!="string")throw new Error("Color should be defined as hex string");var s=d.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+d);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(a){return[a,a]}))),s.length===6&&s.push("F","F");var i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+s.slice(0,6).join("")}}g.getOptions=function(s){s||(s={}),s.color||(s.color={});var i=typeof s.margin=="undefined"||s.margin===null||s.margin<0?4:s.margin,a=s.width&&s.width>=21?s.width:void 0,f=s.scale||4;return{width:a,scale:a?4:f,margin:i,color:{dark:p(s.color.dark||"#000000ff"),light:p(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},g.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},g.getImageWidth=function(s,i){var a=g.getScale(s,i);return Math.floor((s+i.margin*2)*a)},g.qrToImageData=function(s,i,a){for(var f=i.modules.size,n=i.modules.data,m=g.getScale(f,a),E=Math.floor((f+a.margin*2)*m),T=a.margin*m,L=[a.color.light,a.color.dark],b=0;b=T&&U>=T&&b=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return w|0}function f(w){return w!==w}function n(w,h){var l;return i.TYPED_ARRAY_SUPPORT?(l=new Uint8Array(h),l.__proto__=i.prototype):(l=w,l===null&&(l=new i(h)),l.length=h),l}function m(w,h){var l=n(w,h<0?0:a(h)|0);if(!i.TYPED_ARRAY_SUPPORT)for(var y=0;y55295&&l<57344){if(!C){if(l>56319){(h-=3)>-1&&P.push(239,191,189);continue}else if(O+1===y){(h-=3)>-1&&P.push(239,191,189);continue}C=l;continue}if(l<56320){(h-=3)>-1&&P.push(239,191,189),C=l;continue}l=(C-55296<<10|l-56320)+65536}else C&&(h-=3)>-1&&P.push(239,191,189);if(C=null,l<128){if((h-=1)<0)break;P.push(l)}else if(l<2048){if((h-=2)<0)break;P.push(l>>6|192,l&63|128)}else if(l<65536){if((h-=3)<0)break;P.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((h-=4)<0)break;P.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return P}function B(w){if(i.isBuffer(w))return w.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(w)||w instanceof ArrayBuffer))return w.byteLength;typeof w!="string"&&(w=""+w);var h=w.length;return h===0?0:U(w).length}function I(w,h,l,y){for(var C=0;C=h.length||C>=w.length);++C)h[C+l]=w[C];return C}function F(w,h,l,y){return I(U(h,w.length-l),w,l,y)}function S(w,h,l,y){if(typeof h=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&h instanceof ArrayBuffer?L(w,h,l,y):typeof h=="string"?E(w,h):b(w,h)}i.prototype.write=function(h,l,y){l===void 0?(y=this.length,l=0):y===void 0&&typeof l=="string"?(y=this.length,l=0):isFinite(l)&&(l=l|0,isFinite(y)?y=y|0:y=void 0);var C=this.length-l;if((y===void 0||y>C)&&(y=C),h.length>0&&(y<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");return F(this,h,l,y)},i.prototype.slice=function(h,l){var y=this.length;h=~~h,l=l===void 0?y:~~l,h<0?(h+=y,h<0&&(h=0)):h>y&&(h=y),l<0?(l+=y,l<0&&(l=0)):l>y&&(l=y),l=h.length&&(l=h.length),l||(l=0),C>0&&C=this.length)throw new RangeError("sourceStart out of bounds");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),h.length-l=0;--O)h[O+l]=this[O+y];else if(P<1e3||!i.TYPED_ARRAY_SUPPORT)for(O=0;O>>0,y=y===void 0?this.length:y>>>0,h||(h=0);var P;if(typeof h=="number")for(P=l;P0)throw new Error("Invalid string. Length must be a multiple of 4");var F=B.indexOf("=");F===-1&&(F=I);var S=F===I?0:4-F%4;return[F,S]}function m(B){var I=n(B),F=I[0],S=I[1];return(F+S)*3/4-S}function E(B,I,F){return(I+F)*3/4-F}function T(B){var I,F=n(B),S=F[0],w=F[1],h=new s(E(B,S,w)),l=0,y=w>0?S-4:S,C;for(C=0;C>16&255,h[l++]=I>>8&255,h[l++]=I&255;return w===2&&(I=d[B.charCodeAt(C)]<<2|d[B.charCodeAt(C+1)]>>4,h[l++]=I&255),w===1&&(I=d[B.charCodeAt(C)]<<10|d[B.charCodeAt(C+1)]<<4|d[B.charCodeAt(C+2)]>>2,h[l++]=I>>8&255,h[l++]=I&255),h}function L(B){return p[B>>18&63]+p[B>>12&63]+p[B>>6&63]+p[B&63]}function b(B,I,F){for(var S,w=[],h=I;hy?y:l+h));return S===1?(I=B[F-1],w.push(p[I>>2]+p[I<<4&63]+"==")):S===2&&(I=(B[F-2]<<8)+B[F-1],w.push(p[I>>10]+p[I>>4&63]+p[I<<2&63]+"=")),w.join("")}},{}],30:[function(c,_,g){var p=c("base64-js"),d=c("ieee754"),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g.Buffer=n,g.SlowBuffer=S,g.INSPECT_MAX_BYTES=50;var i=2147483647;g.kMaxLength=i,n.TYPED_ARRAY_SUPPORT=a(),!n.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),t.foo()===42}catch{return!1}}Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(!!n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(!!n.isBuffer(this))return this.byteOffset}});function f(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,n.prototype),r}function n(t,r,e){if(typeof t=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L(t)}return m(t,r,e)}typeof Symbol!="undefined"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192;function m(t,r,e){if(typeof t=="string")return b(t,r);if(ArrayBuffer.isView(t))return U(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return B(t,r,e);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var o=t.valueOf&&t.valueOf();if(o!=null&&o!==t)return n.from(o,r,e);var v=I(t);if(v)return v;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return n.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}n.from=function(t,r,e){return m(t,r,e)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array);function E(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function T(t,r,e){return E(t),t<=0?f(t):r!==void 0?typeof e=="string"?f(t).fill(r,e):f(t).fill(r):f(t)}n.alloc=function(t,r,e){return T(t,r,e)};function L(t){return E(t),f(t<0?0:F(t)|0)}n.allocUnsafe=function(t){return L(t)},n.allocUnsafeSlow=function(t){return L(t)};function b(t,r){if((typeof r!="string"||r==="")&&(r="utf8"),!n.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=w(t,r)|0,o=f(e),v=o.write(t,r);return v!==e&&(o=o.slice(0,v)),o}function U(t){for(var r=t.length<0?0:F(t.length)|0,e=f(r),o=0;o=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return t|0}function S(t){return+t!=t&&(t=0),n.alloc(+t)}n.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==n.prototype},n.compare=function(r,e){if(Q(r,Uint8Array)&&(r=n.from(r,r.offset,r.byteLength)),Q(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(r)||!n.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===e)return 0;for(var o=r.length,v=e.length,A=0,x=Math.min(o,v);A2&&arguments[2]===!0;if(!o&&e===0)return 0;for(var v=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return tr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return fr(t).length;default:if(v)return o?-1:tr(t).length;r=(""+r).toLowerCase(),v=!0}}n.byteLength=w;function h(t,r,e){var o=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return G(this,r,e);case"utf8":case"utf-8":return H(this,r,e);case"ascii":return J(this,r,e);case"latin1":case"binary":return er(this,r,e);case"base64":return $(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cr(this,r,e);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}n.prototype._isBuffer=!0;function l(t,r,e){var o=t[r];t[r]=t[e],t[e]=o}n.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;ee&&(r+=" ... "),""},s&&(n.prototype[s]=n.prototype.inspect),n.prototype.compare=function(r,e,o,v,A){if(Q(r,Uint8Array)&&(r=n.from(r,r.offset,r.byteLength)),!n.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(e===void 0&&(e=0),o===void 0&&(o=r?r.length:0),v===void 0&&(v=0),A===void 0&&(A=this.length),e<0||o>r.length||v<0||A>this.length)throw new RangeError("out of range index");if(v>=A&&e>=o)return 0;if(v>=A)return-1;if(e>=o)return 1;if(e>>>=0,o>>>=0,v>>>=0,A>>>=0,this===r)return 0;for(var x=A-v,z=o-e,K=Math.min(x,z),q=this.slice(v,A),j=r.slice(e,o),Z=0;Z2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,gr(e)&&(e=v?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(v)return-1;e=t.length-1}else if(e<0)if(v)e=0;else return-1;if(typeof r=="string"&&(r=n.from(r,o)),n.isBuffer(r))return r.length===0?-1:C(t,r,e,o,v);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):C(t,[r],e,o,v);throw new TypeError("val must be string, number or Buffer")}function C(t,r,e,o,v){var A=1,x=t.length,z=r.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(t.length<2||r.length<2)return-1;A=2,x/=2,z/=2,e/=2}function K(vr,mr){return A===1?vr[mr]:vr.readUInt16BE(mr*A)}var q;if(v){var j=-1;for(q=e;qx&&(e=x-z),q=e;q>=0;q--){for(var Z=!0,lr=0;lrv&&(o=v)):o=v;var A=r.length;o>A/2&&(o=A/2);for(var x=0;x>>0,isFinite(o)?(o=o>>>0,v===void 0&&(v="utf8")):(v=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var A=this.length-e;if((o===void 0||o>A)&&(o=A),r.length>0&&(o<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");for(var x=!1;;)switch(v){case"hex":return P(this,r,e,o);case"utf8":case"utf-8":return O(this,r,e,o);case"ascii":return R(this,r,e,o);case"latin1":case"binary":return N(this,r,e,o);case"base64":return k(this,r,e,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,r,e,o);default:if(x)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),x=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(t,r,e){return r===0&&e===t.length?p.fromByteArray(t):p.fromByteArray(t.slice(r,e))}function H(t,r,e){e=Math.min(t.length,e);for(var o=[],v=r;v239?4:A>223?3:A>191?2:1;if(v+z<=e){var K,q,j,Z;switch(z){case 1:A<128&&(x=A);break;case 2:K=t[v+1],(K&192)===128&&(Z=(A&31)<<6|K&63,Z>127&&(x=Z));break;case 3:K=t[v+1],q=t[v+2],(K&192)===128&&(q&192)===128&&(Z=(A&15)<<12|(K&63)<<6|q&63,Z>2047&&(Z<55296||Z>57343)&&(x=Z));break;case 4:K=t[v+1],q=t[v+2],j=t[v+3],(K&192)===128&&(q&192)===128&&(j&192)===128&&(Z=(A&15)<<18|(K&63)<<12|(q&63)<<6|j&63,Z>65535&&Z<1114112&&(x=Z))}}x===null?(x=65533,z=1):x>65535&&(x-=65536,o.push(x>>>10&1023|55296),x=56320|x&1023),o.push(x),v+=z}return Y(o)}var D=4096;function Y(t){var r=t.length;if(r<=D)return String.fromCharCode.apply(String,t);for(var e="",o=0;oo)&&(e=o);for(var v="",A=r;Ao&&(r=o),e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),ee)throw new RangeError("Trying to access beyond buffer length")}n.prototype.readUIntLE=function(r,e,o){r=r>>>0,e=e>>>0,o||W(r,e,this.length);for(var v=this[r],A=1,x=0;++x>>0,e=e>>>0,o||W(r,e,this.length);for(var v=this[r+--e],A=1;e>0&&(A*=256);)v+=this[r+--e]*A;return v},n.prototype.readUInt8=function(r,e){return r=r>>>0,e||W(r,1,this.length),this[r]},n.prototype.readUInt16LE=function(r,e){return r=r>>>0,e||W(r,2,this.length),this[r]|this[r+1]<<8},n.prototype.readUInt16BE=function(r,e){return r=r>>>0,e||W(r,2,this.length),this[r]<<8|this[r+1]},n.prototype.readUInt32LE=function(r,e){return r=r>>>0,e||W(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},n.prototype.readUInt32BE=function(r,e){return r=r>>>0,e||W(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},n.prototype.readIntLE=function(r,e,o){r=r>>>0,e=e>>>0,o||W(r,e,this.length);for(var v=this[r],A=1,x=0;++x=A&&(v-=Math.pow(2,8*e)),v},n.prototype.readIntBE=function(r,e,o){r=r>>>0,e=e>>>0,o||W(r,e,this.length);for(var v=e,A=1,x=this[r+--v];v>0&&(A*=256);)x+=this[r+--v]*A;return A*=128,x>=A&&(x-=Math.pow(2,8*e)),x},n.prototype.readInt8=function(r,e){return r=r>>>0,e||W(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},n.prototype.readInt16LE=function(r,e){r=r>>>0,e||W(r,2,this.length);var o=this[r]|this[r+1]<<8;return o&32768?o|4294901760:o},n.prototype.readInt16BE=function(r,e){r=r>>>0,e||W(r,2,this.length);var o=this[r+1]|this[r]<<8;return o&32768?o|4294901760:o},n.prototype.readInt32LE=function(r,e){return r=r>>>0,e||W(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},n.prototype.readInt32BE=function(r,e){return r=r>>>0,e||W(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},n.prototype.readFloatLE=function(r,e){return r=r>>>0,e||W(r,4,this.length),d.read(this,r,!0,23,4)},n.prototype.readFloatBE=function(r,e){return r=r>>>0,e||W(r,4,this.length),d.read(this,r,!1,23,4)},n.prototype.readDoubleLE=function(r,e){return r=r>>>0,e||W(r,8,this.length),d.read(this,r,!0,52,8)},n.prototype.readDoubleBE=function(r,e){return r=r>>>0,e||W(r,8,this.length),d.read(this,r,!1,52,8)};function X(t,r,e,o,v,A){if(!n.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>v||rt.length)throw new RangeError("Index out of range")}n.prototype.writeUIntLE=function(r,e,o,v){if(r=+r,e=e>>>0,o=o>>>0,!v){var A=Math.pow(2,8*o)-1;X(this,r,e,o,A,0)}var x=1,z=0;for(this[e]=r&255;++z>>0,o=o>>>0,!v){var A=Math.pow(2,8*o)-1;X(this,r,e,o,A,0)}var x=o-1,z=1;for(this[e+x]=r&255;--x>=0&&(z*=256);)this[e+x]=r/z&255;return e+o},n.prototype.writeUInt8=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,1,255,0),this[e]=r&255,e+1},n.prototype.writeUInt16LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,65535,0),this[e]=r&255,this[e+1]=r>>>8,e+2},n.prototype.writeUInt16BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=r&255,e+2},n.prototype.writeUInt32LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255,e+4},n.prototype.writeUInt32BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255,e+4},n.prototype.writeIntLE=function(r,e,o,v){if(r=+r,e=e>>>0,!v){var A=Math.pow(2,8*o-1);X(this,r,e,o,A-1,-A)}var x=0,z=1,K=0;for(this[e]=r&255;++x>0)-K&255;return e+o},n.prototype.writeIntBE=function(r,e,o,v){if(r=+r,e=e>>>0,!v){var A=Math.pow(2,8*o-1);X(this,r,e,o,A-1,-A)}var x=o-1,z=1,K=0;for(this[e+x]=r&255;--x>=0&&(z*=256);)r<0&&K===0&&this[e+x+1]!==0&&(K=1),this[e+x]=(r/z>>0)-K&255;return e+o},n.prototype.writeInt8=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=r&255,e+1},n.prototype.writeInt16LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,32767,-32768),this[e]=r&255,this[e+1]=r>>>8,e+2},n.prototype.writeInt16BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=r&255,e+2},n.prototype.writeInt32LE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,2147483647,-2147483648),this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4},n.prototype.writeInt32BE=function(r,e,o){return r=+r,e=e>>>0,o||X(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255,e+4};function ir(t,r,e,o,v,A){if(e+o>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function nr(t,r,e,o,v){return r=+r,e=e>>>0,v||ir(t,r,e,4),d.write(t,r,e,o,23,4),e+4}n.prototype.writeFloatLE=function(r,e,o){return nr(this,r,e,!0,o)},n.prototype.writeFloatBE=function(r,e,o){return nr(this,r,e,!1,o)};function or(t,r,e,o,v){return r=+r,e=e>>>0,v||ir(t,r,e,8),d.write(t,r,e,o,52,8),e+8}n.prototype.writeDoubleLE=function(r,e,o){return or(this,r,e,!0,o)},n.prototype.writeDoubleBE=function(r,e,o){return or(this,r,e,!1,o)},n.prototype.copy=function(r,e,o,v){if(!n.isBuffer(r))throw new TypeError("argument should be a Buffer");if(o||(o=0),!v&&v!==0&&(v=this.length),e>=r.length&&(e=r.length),e||(e=0),v>0&&v=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),r.length-e=0;--x)r[x+e]=this[x+o];else Uint8Array.prototype.set.call(r,this.subarray(o,v),e);return A},n.prototype.fill=function(r,e,o,v){if(typeof r=="string"){if(typeof e=="string"?(v=e,e=0,o=this.length):typeof o=="string"&&(v=o,o=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!n.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(r.length===1){var A=r.charCodeAt(0);(v==="utf8"&&A<128||v==="latin1")&&(r=A)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(e<0||this.length>>0,o=o===void 0?this.length:o>>>0,r||(r=0);var x;if(typeof r=="number")for(x=e;x55295&&e<57344){if(!v){if(e>56319){(r-=3)>-1&&A.push(239,191,189);continue}else if(x+1===o){(r-=3)>-1&&A.push(239,191,189);continue}v=e;continue}if(e<56320){(r-=3)>-1&&A.push(239,191,189),v=e;continue}e=(v-55296<<10|e-56320)+65536}else v&&(r-=3)>-1&&A.push(239,191,189);if(v=null,e<128){if((r-=1)<0)break;A.push(e)}else if(e<2048){if((r-=2)<0)break;A.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;A.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;A.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return A}function ur(t){for(var r=[],e=0;e>8,v=e%256,A.push(v),A.push(o);return A}function fr(t){return p.toByteArray(dr(t))}function rr(t,r,e,o){for(var v=0;v=r.length||v>=t.length);++v)r[v+e]=t[v];return v}function Q(t,r){return t instanceof r||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===r.name}function gr(t){return t!==t}var Br=function(){for(var t="0123456789abcdef",r=new Array(256),e=0;e<16;++e)for(var o=e*16,v=0;v<16;++v)r[o+v]=t[e]+t[v];return r}()},{"base64-js":29,ieee754:32}],31:[function(c,_,g){var p={single_source_shortest_paths:function(d,s,i){var a={},f={};f[s]=0;var n=p.PriorityQueue.make();n.push(s,0);for(var m,E,T,L,b,U,B,I,F;!n.empty();){m=n.pop(),E=m.value,L=m.cost,b=d[E]||{};for(T in b)b.hasOwnProperty(T)&&(U=b[T],B=L+U,I=f[T],F=typeof f[T]=="undefined",(F||I>B)&&(f[T]=B,n.push(T,B),a[T]=E))}if(typeof i!="undefined"&&typeof f[i]=="undefined"){var S=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(S)}return a},extract_shortest_path_from_predecessor_list:function(d,s){for(var i=[],a=s;a;)i.push(a),d[a],a=d[a];return i.reverse(),i},find_path:function(d,s,i){var a=p.single_source_shortest_paths(d,s,i);return p.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(d){var s=p.PriorityQueue,i={},a;d=d||{};for(a in s)s.hasOwnProperty(a)&&(i[a]=s[a]);return i.queue=[],i.sorter=d.sorter||s.default_sorter,i},default_sorter:function(d,s){return d.cost-s.cost},push:function(d,s){var i={value:d,cost:s};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof _!="undefined"&&(_.exports=p)},{}],32:[function(c,_,g){g.read=function(p,d,s,i,a){var f,n,m=a*8-i-1,E=(1<>1,L=-7,b=s?a-1:0,U=s?-1:1,B=p[d+b];for(b+=U,f=B&(1<<-L)-1,B>>=-L,L+=m;L>0;f=f*256+p[d+b],b+=U,L-=8);for(n=f&(1<<-L)-1,f>>=-L,L+=i;L>0;n=n*256+p[d+b],b+=U,L-=8);if(f===0)f=1-T;else{if(f===E)return n?NaN:(B?-1:1)*(1/0);n=n+Math.pow(2,i),f=f-T}return(B?-1:1)*n*Math.pow(2,f-i)},g.write=function(p,d,s,i,a,f){var n,m,E,T=f*8-a-1,L=(1<>1,U=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:f-1,I=i?1:-1,F=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(m=isNaN(d)?1:0,n=L):(n=Math.floor(Math.log(d)/Math.LN2),d*(E=Math.pow(2,-n))<1&&(n--,E*=2),n+b>=1?d+=U/E:d+=U*Math.pow(2,1-b),d*E>=2&&(n++,E/=2),n+b>=L?(m=0,n=L):n+b>=1?(m=(d*E-1)*Math.pow(2,a),n=n+b):(m=d*Math.pow(2,b-1)*Math.pow(2,a),n=0));a>=8;p[s+B]=m&255,B+=I,m/=256,a-=8);for(n=n<0;p[s+B]=n&255,B+=I,n/=256,T-=8);p[s+B-I]|=F*128}},{}],33:[function(c,_,g){var p={}.toString;_.exports=Array.isArray||function(d){return p.call(d)=="[object Array]"}},{}]},{},[24])(24)})}),Ir={name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(V){return V(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var V=this,c=this.options,_=this.tag,g=String(this.value);_==="canvas"?pr.toCanvas(this.$el,g,c,function(p){if(p)throw p}):_==="img"?pr.toDataURL(g,c,function(p,d){if(p)throw p;V.$el.src=d}):pr.toString(g,c,function(p,d){if(p)throw p;V.$el.innerHTML=d})}},mounted:function(){this.generate()}},Sr=function(){var u=this,V=u.$createElement,c=u._self._c||V;return c("div",{staticClass:"page-login"},[c("PageTitle",{attrs:{title:u.$L("\u767B\u5F55")}}),c("div",{staticClass:"login-body"},[c("div",{staticClass:"login-logo no-dark-content",class:{"can-click":u.needStartHome},on:{click:u.goHome}}),c("div",{staticClass:"login-box"},[c("div",{staticClass:"login-mode-switch"},[c("div",{staticClass:"login-mode-switch-box"},[c("ETooltip",{attrs:{disabled:u.$isEEUiApp||u.windowTouch,content:u.$L(u.loginMode=="qrcode"?"\u5E10\u53F7\u767B\u5F55":"\u626B\u7801\u767B\u5F55"),placement:"left"}},[c("span",{staticClass:"login-mode-switch-icon",on:{click:u.switchLoginMode}},[u.loginMode=="qrcode"?c("svg",{attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"PcOutlined"}},[c("path",{attrs:{d:"M23 16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v12ZM21 4H3v9h18V4ZM3 15v1h18v-1H3Zm3 6a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1Z",fill:"currentColor"}})]):c("svg",{attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"QrOutlined"}},[c("path",{attrs:{d:"M6.5 7.5a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1Z",fill:"currentColor"}}),c("path",{attrs:{d:"M4.5 2.5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2h-7Zm0 2h7v7h-7v-7ZM11 16a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm0 3.5a1 1 0 1 1 2 0v1a1 1 0 1 1-2 0v-1Zm4-7.5a1 1 0 1 1 2 0 1 1 0 0 1-2 0Zm3.5 0a1 1 0 0 1 1-1h1a1 1 0 1 1 0 2h-1a1 1 0 0 1-1-1ZM15 17c0-1.1.9-2 2-2h2.5c1.1 0 2 .9 2 2v2.5c0 1.1-.9 2-2 2H17c-1.1 0-2-.9-2-2V17Zm4.5 0H17v2.5h2.5V17Zm-15-2c-1.1 0-2 .9-2 2v2.5c0 1.1.9 2 2 2H7c1.1 0 2-.9 2-2V17c0-1.1-.9-2-2-2H4.5Zm0 2H7v2.5H4.5V17ZM15 4.5c0-1.1.9-2 2-2h2.5c1.1 0 2 .9 2 2V7c0 1.1-.9 2-2 2H17c-1.1 0-2-.9-2-2V4.5Zm4.5 0H17V7h2.5V4.5Z",fill:"currentColor"}})])])])],1)]),c("div",{staticClass:"login-title"},[u._v(u._s(u.welcomeTitle))]),c("div",{staticClass:"login-subtitle"},[u._v(u._s(u.$L(u.subTitle)))]),c("transition",{attrs:{name:"login-mode"}},[u.loginMode=="qrcode"?c("div",{staticClass:"login-qrcode",on:{click:u.qrcodeRefresh}},[c("VueQrcode",{attrs:{value:u.qrcodeUrl,options:{width:200,margin:2}}})],1):u._e()]),c("transition",{attrs:{name:"login-mode"}},[u.loginMode=="access"?c("div",{staticClass:"login-access"},[u.isSoftware&&u.cacheServerUrl?c("Input",{attrs:{value:u.$A.getDomain(u.cacheServerUrl),prefix:"ios-globe-outline",size:"large",readonly:"",clearable:""},on:{"on-clear":function(_){return u.setServerUrl("")}}}):u._e(),c("Input",{ref:"email",attrs:{prefix:"ios-mail-outline",placeholder:u.$L("\u8F93\u5165\u60A8\u7684\u7535\u5B50\u90AE\u4EF6"),type:"email",size:"large",clearable:""},on:{"on-enter":u.onLogin,"on-blur":u.onBlur},model:{value:u.email,callback:function(_){u.email=_},expression:"email"}}),c("Input",{ref:"password",attrs:{prefix:"ios-lock-outline",placeholder:u.$L("\u8F93\u5165\u60A8\u7684\u5BC6\u7801"),type:"password",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.password,callback:function(_){u.password=_},expression:"password"}}),u.loginType=="reg"?c("Input",{ref:"password2",attrs:{prefix:"ios-lock-outline",placeholder:u.$L("\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"),type:"password",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.password2,callback:function(_){u.password2=_},expression:"password2"}}):u._e(),u.loginType=="reg"&&u.needInvite?c("Input",{ref:"invite",staticClass:"login-code",attrs:{placeholder:u.$L("\u8BF7\u8F93\u5165\u6CE8\u518C\u9080\u8BF7\u7801"),type:"text",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.invite,callback:function(_){u.invite=_},expression:"invite"}},[c("span",{attrs:{slot:"prepend"},slot:"prepend"},[u._v("\xA0"+u._s(u.$L("\u9080\u8BF7\u7801"))+"\xA0")])]):u._e(),u.loginType=="login"&&u.codeNeed?c("Input",{ref:"code",staticClass:"login-code",attrs:{placeholder:u.$L("\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801"),type:"text",size:"large",clearable:""},on:{"on-enter":u.onLogin},model:{value:u.code,callback:function(_){u.code=_},expression:"code"}},[c("Icon",{staticClass:"login-icon",attrs:{slot:"prepend",type:"ios-checkmark-circle-outline"},slot:"prepend"}),c("div",{staticClass:"login-code-end",attrs:{slot:"append"},on:{click:u.refreshCode},slot:"append"},[u.codeLoad>0?c("div",{staticClass:"code-load"},[c("Loading")],1):u.codeUrl==="error"?c("span",{staticClass:"code-error"},[u._v(u._s(u.$L("\u52A0\u8F7D\u5931\u8D25")))]):c("img",{attrs:{src:u.codeUrl}})])],1):u._e(),c("Button",{attrs:{type:"primary",loading:u.loadIng>0||u.loginJump,size:"large",long:""},on:{click:u.onLogin}},[u._v(u._s(u.$L(u.loginText)))]),u.loginType=="reg"?c("div",{staticClass:"login-switch"},[u._v(u._s(u.$L("\u5DF2\u7ECF\u6709\u5E10\u53F7\uFF1F"))),c("a",{attrs:{href:"javascript:void(0)"},on:{click:function(_){u.loginType="login"}}},[u._v(u._s(u.$L("\u767B\u5F55\u5E10\u53F7")))])]):c("div",{staticClass:"login-switch"},[u._v(u._s(u.$L("\u8FD8\u6CA1\u6709\u5E10\u53F7\uFF1F"))),c("a",{attrs:{href:"javascript:void(0)"},on:{click:function(_){u.loginType="reg"}}},[u._v(u._s(u.$L("\u6CE8\u518C\u5E10\u53F7")))])])],1):u._e()])],1),c("div",{staticClass:"login-bottom"},[c("Dropdown",{attrs:{trigger:"click",placement:"bottom-start"}},[c("div",{staticClass:"login-setting"},[u._v(" "+u._s(u.$L("\u8BBE\u7F6E"))+" "),c("i",{staticClass:"taskfont"},[u._v("\uE689")])]),c("DropdownMenu",{staticClass:"login-setting-menu",attrs:{slot:"list"},slot:"list"},[c("Dropdown",{attrs:{placement:"right-start",transfer:""},on:{"on-click":u.setTheme}},[c("DropdownItem",[c("div",{staticClass:"login-setting-item"},[u._v(" "+u._s(u.$L("\u4E3B\u9898\u76AE\u80A4"))+" "),c("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),c("DropdownMenu",{attrs:{slot:"list"},slot:"list"},u._l(u.themeList,function(_,g){return c("DropdownItem",{key:g,attrs:{name:_.value,selected:u.themeMode===_.value}},[u._v(u._s(u.$L(_.name)))])}),1)],1),c("Dropdown",{attrs:{placement:"right-start",transfer:""},on:{"on-click":u.onLanguage}},[c("DropdownItem",{attrs:{divided:""}},[c("div",{staticClass:"login-setting-item"},[u._v(" "+u._s(u.currentLanguage)+" "),c("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),c("DropdownMenu",{attrs:{slot:"list"},slot:"list"},u._l(u.languageList,function(_,g){return c("DropdownItem",{key:g,attrs:{name:g,selected:u.languageType===g}},[u._v(u._s(_))])}),1)],1)],1)],1),c("div",{staticClass:"login-forgot"},[u._v(u._s(u.$L("\u5FD8\u8BB0\u5BC6\u7801\u4E86\uFF1F"))),c("a",{attrs:{href:"javascript:void(0)"},on:{click:u.forgotPassword}},[u._v(u._s(u.$L("\u91CD\u7F6E\u5BC6\u7801")))])])],1)]),c("Modal",{attrs:{title:u.$L("\u9690\u79C1\u534F\u8BAE"),"mask-closable":!1},model:{value:u.privacyShow,callback:function(_){u.privacyShow=_},expression:"privacyShow"}},[c("div",{staticClass:"privacy-content"},[c("div",[u._v("\u6B22\u8FCE\u4F7F\u7528\u672C\u8F6F\u4EF6\uFF01")]),c("p",[u._v("\u5728\u60A8\u4F7F\u7528\u672C\u8F6F\u4EF6\u524D\uFF0C\u8BF7\u60A8\u8BA4\u771F\u9605\u8BFB\u5E76\u4E86\u89E3\u76F8\u5E94\u7684"),c("a",{attrs:{target:"_blank",href:u.$A.apiUrl("privacy")}},[u._v("\u300A"+u._s(u.$L("\u9690\u79C1\u653F\u7B56"))+"\u300B")]),u._v("\uFF0C\u4EE5\u4E86\u89E3\u6211\u4EEC\u7684\u670D\u52A1\u5185\u5BB9\u548C\u60A8\u76F8\u5173\u4E2A\u4EBA\u4FE1\u606F\u7684\u5904\u7406\u89C4\u5219\u3002\u6211\u4EEC\u5C06\u4E25\u683C\u7684\u6309\u7167\u9690\u79C1\u670D\u52A1\u534F\u8BAE\u4E3A\u60A8\u63D0\u4F9B\u670D\u52A1\uFF0C\u4FDD\u62A4\u60A8\u7684\u4E2A\u4EBA\u4FE1\u606F\u3002")])]),c("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[c("Button",{attrs:{type:"default"},on:{click:function(_){return u.onPrivacy(!1)}}},[u._v(u._s(u.$L("\u4E0D\u540C\u610F")))]),c("Button",{attrs:{type:"primary"},on:{click:function(_){return u.onPrivacy(!0)}}},[u._v(u._s(u.$L("\u540C\u610F")))])],1)])],1)},br=[];const Fr={components:{VueQrcode:Ir},data(){return{loadIng:0,languageList:wr,languageType:yr,qrcodeVal:"",qrcodeTimer:null,qrcodeLoad:!1,codeNeed:!1,codeLoad:0,codeKey:"",codeUrl:"",loginMode:"access",loginType:"login",loginJump:!1,email:"",password:"",password2:"",code:"",invite:"",needStartHome:!1,needInvite:!1,subscribe:null,privacyShow:!1}},async mounted(){this.privacyShow=!!this.$isEEUiApp&&await $A.IDBString("cachePrivacyShow")!=="no",this.email=await $A.IDBString("cacheLoginEmail")||"",this.isSoftware?this.chackServerUrl().catch(u=>{}):this.setServerUrl("").catch(u=>{}),this.qrcodeTimer=setInterval(this.qrcodeStatus,2e3),this.subscribe=Ar.Store.subscribe("useSSOLogin",()=>{this.inputServerUrl()})},beforeDestroy(){clearInterval(this.qrcodeTimer),this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},activated(){this.loginType=this.$route.query.type==="reg"?"reg":"login",this.getDemoAccount(),this.getNeedStartHome(),this.$Electron&&this.$Electron.sendMessage("subWindowDestroyAll")},deactivated(){this.loginJump=!1,this.password="",this.password2="",this.code="",this.invite=""},computed:{...xr(["cacheServerUrl","themeMode","themeList"]),isSoftware(){return this.$Electron||this.$isEEUiApp},currentLanguage(){return wr[yr]||"Language"},welcomeTitle(){if(this.loginMode=="qrcode")return this.$L("\u626B\u7801\u767B\u5F55");const u=window.systemInfo.title||"DooTask";return"Welcome "+u},subTitle(){const u=window.systemInfo.title||"DooTask";return this.loginMode=="qrcode"?this.$L(`\u8BF7\u4F7F\u7528${u}\u79FB\u52A8\u7AEF\u626B\u63CF\u4E8C\u7EF4\u7801\u3002`):this.loginType=="reg"?this.$L("\u8F93\u5165\u60A8\u7684\u4FE1\u606F\u4EE5\u521B\u5EFA\u5E10\u6237\u3002"):this.$L("\u8F93\u5165\u60A8\u7684\u51ED\u8BC1\u4EE5\u8BBF\u95EE\u60A8\u7684\u5E10\u6237\u3002")},loginText(){let u=this.loginType=="login"?"\u767B\u5F55":"\u6CE8\u518C";return this.loginJump&&(u+="\u6210\u529F..."),u},qrcodeUrl(){return $A.apiUrl("../login?qrcode="+this.qrcodeVal)}},watch:{$route({query:u}){u.type=="reg"&&this.$nextTick(()=>{this.loginType="reg"})},loginMode(){this.qrcodeRefresh()},loginType(u){u=="reg"&&this.getNeedInvite()}},methods:{goHome(){this.needStartHome&&this.goForward("index")},setTheme(u){this.$store.dispatch("setTheme",u)},getDemoAccount(){this.isNotServer()||this.$store.dispatch("call",{url:"system/demo"}).then(({data:u})=>{u.account&&(this.email=u.account,this.password=u.password)}).catch(u=>{})},getNeedStartHome(){this.isNotServer()||this.$store.dispatch("needHome").then(u=>{this.needStartHome=!0}).catch(u=>{this.needStartHome=!1})},getNeedInvite(){this.$store.dispatch("call",{url:"users/reg/needinvite"}).then(({data:u})=>{this.needInvite=!!u.need}).catch(u=>{this.needInvite=!1})},switchLoginMode(){this.chackServerUrl(!0).then(()=>{this.loginMode==="qrcode"?this.loginMode="access":this.loginMode="qrcode"})},qrcodeRefresh(){this.loginMode=="qrcode"&&(this.qrcodeVal=$A.randomString(32))},qrcodeStatus(){this.$route.name!=="login"||this.loginMode!="qrcode"||this.qrcodeLoad||(this.qrcodeLoad=!0,this.$store.dispatch("call",{url:"users/login/qrcode?code="+this.qrcodeVal}).then(({data:u})=>{this.$store.dispatch("handleClearCache",u).then(this.goNext)}).catch(u=>{}).finally(u=>{this.qrcodeLoad=!1}))},forgotPassword(){$A.modalWarning("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01")},refreshCode(){this.codeLoad>0||(setTimeout(u=>{this.codeLoad++},600),this.$store.dispatch("call",{url:"users/login/codejson"}).then(({data:u})=>{this.codeKey=u.key,this.codeUrl=u.img}).catch(u=>{this.codeUrl="error"}).finally(u=>{this.codeLoad--}))},inputServerUrl(){if(this.privacyShow)return;let u=$A.rightDelete(this.cacheServerUrl,"/api/");u=$A.leftDelete(u,"http://"),$A.modalInput({title:"\u4F7F\u7528 SSO \u767B\u5F55",value:u,placeholder:"\u8BF7\u8F93\u5165\u670D\u52A1\u5668\u5730\u5740",onOk:V=>V?this.inputServerChack($A.trim(V)):"\u8BF7\u8F93\u5165\u670D\u52A1\u5668\u5730\u5740"})},inputServerChack(u){return new Promise((V,c)=>{let _=u;/\/api\/$/.test(_)||(_=_+($A.rightExists(_,"/")?"api/":"/api/")),/^https*:\/\//i.test(_)||(_=`https://${_}`),this.$store.dispatch("call",{url:`${_}system/setting`,checkNetwork:!1}).then(async()=>{await this.setServerUrl(_),V()}).catch(({ret:g,msg:p})=>{if(g===-1001){if(!/^https*:\/\//i.test(u)){this.inputServerChack(`http://${u}`).then(V).catch(c);return}p="\u670D\u52A1\u5668\u5730\u5740\u65E0\u6548"}c(p)})})},chackServerUrl(u){return new Promise((V,c)=>{this.isNotServer()?(this.inputServerUrl(),u===!0&&this.$nextTick(_=>$A.messageWarning("\u8BF7\u8BBE\u7F6E\u670D\u52A1\u5668")),c()):V()})},async setServerUrl(u){await $A.IDBSet("cachePrivacyShow",u?"no":"yes"),u!=this.cacheServerUrl&&(await $A.IDBSet("cacheServerUrl",u),$A.reloadUrl())},isNotServer(){let u=$A.getDomain(window.systemInfo.apiUrl);return this.isSoftware&&(u==""||u=="public")},onBlur(){if(this.loginType!="login"||!this.email){this.codeNeed=!1;return}this.loadIng++,this.$store.dispatch("call",{url:"users/login/needcode",data:{email:this.email}}).then(()=>{this.refreshCode(),this.codeNeed=!0}).catch(u=>{this.codeNeed=!1}).finally(u=>{this.loadIng--})},onPrivacy(u){u?(this.privacyShow=!1,this.chackServerUrl().catch(V=>{})):$A.eeuiAppGoDesktop()},onLogin(){this.chackServerUrl(!0).then(()=>{if(this.email=$A.trim(this.email),this.password=$A.trim(this.password),this.password2=$A.trim(this.password2),this.code=$A.trim(this.code),this.invite=$A.trim(this.invite),!$A.isEmail(this.email)){$A.messageWarning("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740"),this.$refs.email.focus();return}if(!this.password){$A.messageWarning("\u8BF7\u8F93\u5165\u5BC6\u7801"),this.$refs.password.focus();return}if(this.loginType=="reg"&&this.password!=this.password2){$A.messageWarning("\u786E\u8BA4\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4"),this.$refs.password2.focus();return}this.loadIng++,this.$store.dispatch("call",{url:"users/login",data:{type:this.loginType,email:this.email,password:this.password,code:this.code,code_key:this.codeKey,invite:this.invite}}).then(({data:u})=>{$A.IDBSave("cacheLoginEmail",this.email),this.codeNeed=!1,this.loadIng++,this.$store.dispatch("handleClearCache",u).then(this.goNext).finally(V=>{this.loadIng--})}).catch(({data:u,msg:V})=>{u.code==="email"?(this.loginType="login",$A.modalWarning(V)):$A.modalError({content:V,onOk:c=>{this.$refs.code.focus()}}),u.code==="need"&&(this.refreshCode(),this.codeNeed=!0)}).finally(u=>{this.loadIng--})})},goNext(){this.loginJump=!0;const u=decodeURIComponent($A.getObject(this.$route.query,"from"));u?$A.IDBSet("clearCache","login").then(V=>{window.location.replace(u)}):this.goForward({name:"manage-dashboard"},!0)},onLanguage(u){Cr(u)}}},Er={};var Lr=_r(Fr,Sr,br,!1,Ur,null,null,null);function Ur(u){for(let V in Er)this[V]=Er[V]}var Rr=function(){return Lr.exports}();export{Rr as default}; diff --git a/public/js/build/manage.108fb03a.js b/public/js/build/manage.23677939.js similarity index 99% rename from public/js/build/manage.108fb03a.js rename to public/js/build/manage.23677939.js index 5b3701f12..3575f4d03 100644 --- a/public/js/build/manage.108fb03a.js +++ b/public/js/build/manage.23677939.js @@ -1 +1 @@ -import{n as r,N as O,m as d,a as g,b as c}from"./app.2ab5f89e.js";import{C as z,T as F}from"./CheckinExport.3b0975d4.js";import{D as B}from"./index.edc265fa.js";import W from"./TEditor.c448a662.js";import{U as v}from"./UserSelect.c1d7840d.js";import{T as H,a as V}from"./TaskDetail.17c1ee52.js";import{R as K}from"./ReportEdit.d1baae75.js";import{R as Y}from"./ReportDetail.e316ac3c.js";import{l as J}from"./longpress.43ca7fd9.js";import{D as q}from"./DialogWrapper.28dee207.js";import"./ImgUpload.cf2be17d.js";import"./ProjectLog.c251a416.js";import"./TaskMenu.6d52fdca.js";import"./details.ae1c56d6.js";var G=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)])},X=[];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 Z=r(Q,G,X,!1,tt,null,null,null);function tt(t){for(let a in b)this[a]=b[a]}var et=function(){return Z.exports}(),at=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)])},st=[];const it={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()}}},y={};var ot=r(it,at,st,!1,rt,null,null,null);function rt(t){for(let a in y)this[a]=y[a]}var nt=function(){return ot.exports}(),lt=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("transition",{attrs:{name:"mobile-fade"}},[t.isMore?e("div",{staticClass:"more-mask",on:{click:function(s){return t.toggleRoute("more")}}}):t._e()]),e("transition",{attrs:{name:"mobile-slide"}},[t.isMore?e("div",{staticClass:"more-box"},[e("div",{staticClass:"tabbar-more-title"},[t._v(t._s(t.$L("\u66F4\u591A")))]),t._l(t.navMore,function(s){return e("ul",t._l(s,function(i){return e("li",{class:{active:t.activeName===i.name},on:{click:function(o){return t.toggleRoute(i.name)}}},[e("div",{staticClass:"more-item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(i.icon)}}),e("div",{staticClass:"tabbar-title"},[t._v(t._s(t.$L(i.label)))]),i.name==="workReport"?e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)])}),0)})],2):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==="more"?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}})]:t._e()],2)}),0),e("Modal",{attrs:{title:t.$L("\u626B\u7801\u767B\u5F55"),"mask-closable":!1},model:{value:t.scanLoginShow,callback:function(s){t.scanLoginShow=s},expression:"scanLoginShow"}},[e("div",{staticClass:"mobile-scan-login-box"},[e("div",{staticClass:"mobile-scan-login-title"},[t._v(t._s(t.$L("\u4F60\u597D\uFF0C\u626B\u7801\u786E\u8BA4\u767B\u5F55")))]),e("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")])]),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.scanLoginShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u767B\u5F55")))]),e("Button",{attrs:{type:"primary",loading:t.scanLoginLoad},on:{click:t.scanLoginSubmit}},[t._v(t._s(t.$L("\u786E\u8BA4\u767B\u5F55")))])],1)])],1)},ct=[];const dt={name:"MobileTabbar",components:{NetworkException:O},data(){return{isMore:!1,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:"more",label:"\u66F4\u591A"}],navMore:[[{icon:"",name:"calendar",label:"\u65E5\u5386"},{icon:"",name:"file",label:"\u6587\u4EF6"},{icon:"",name:"setting",label:"\u8BBE\u7F6E"}],[{icon:"",name:"addProject",label:"\u521B\u5EFA\u9879\u76EE"},{icon:"",name:"addTask",label:"\u6DFB\u52A0\u4EFB\u52A1"},{icon:"",name:"createMeeting",label:"\u65B0\u4F1A\u8BAE"},{icon:"",name:"joinMeeting",label:"\u52A0\u5165\u4F1A\u8BAE"}],[{icon:"",name:"workReport",label:"\u5DE5\u4F5C\u62A5\u544A"},{icon:"",name:"approve",label:"\u5BA1\u6279\u4E2D\u5FC3"}]],scanLoginShow:!1,scanLoginLoad:!1,scanLoginCode:""}},created(){$A.isEEUiApp&&this.navMore[0].splice(2,0,{icon:"",name:"scan",label:"\u626B\u4E00\u626B"}),this.userIsAdmin&&this.navMore[2].splice(0,0,{icon:"",name:"allUser",label:"\u56E2\u961F\u7BA1\u7406"})},mounted(){},beforeDestroy(){},computed:{...d(["userIsAdmin","cacheDialogs","reportUnreadNumber"]),...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 this.isMore||["manage-calendar","manage-file","manage-setting"].includes(this.routeName)?"more":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),t!="more"&&(this.isMore=!1);let a;switch(t){case"more":this.isMore=!this.isMore;return;case"scan":$A.eeuiAppScan(this.scanResult);return;case"addTask":case"addProject":case"allUser":case"workReport":return;case"createMeeting":c.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":c.Store.set("addMeeting",{type:"join"});break;case"project":a={name:"manage-project",params:{projectId:"all"}};break;case"dialog":a={name:"manage-messenger",params:{dialogAction:"dialog"}},this.routeName==="manage-messenger"&&c.Store.set("clickAgainDialog",!0);break;case"contacts":a={name:"manage-messenger",params:{dialogAction:"contacts"}};break;default:a={name:"manage-"+t};break}this.goForward(a)},scanResult(t){const a=(t+"").match(/^https*:\/\/(.*?)\/login\?qrcode=(.*?)$/);if(a){this.scanLoginCode=a[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}))}}},w={};var ht=r(dt,lt,ct,!1,ut,null,null,null);function ut(t){for(let a in w)this[a]=w[a]}var pt=function(){return ht.exports}(),mt=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("div",{staticClass:"desc"},[e("TEditor",{attrs:{plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,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..."),inline:""},model:{value:t.addData.content,callback:function(s){t.$set(t.addData,"content",s)},expression:"addData.content"}})],1),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)]),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)},ft=[];const gt={name:"TaskAdd",components:{UserSelect:v,TEditor:W,TaskExistTips:H},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:"",taskPlugins:["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"],taskOptions:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:!1},taskOptionFull:{menubar:"file edit view",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:"uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload"},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:{...d(["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 vt=r(gt,mt,ft,!1,_t,null,null,null);function _t(t){for(let a in D)this[a]=D[a]}var $t=function(){return vt.exports}(),kt=function(){var t=this,a=t.$createElement,e=t._self._c||a;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(s){t.$set(t.keys,"type",s)},expression:"keys.type"}},t._l(t.reportTypeList,function(s){return e("Option",{key:s.value,attrs:{value:s.value}},[t._v(t._s(s.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(s){t.$set(t.keys,"created_at",s)},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(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:"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)])},bt=[];const yt={name:"ReportMy",data(){return{loadIng:0,columns:[{title:this.$L("\u540D\u79F0"),key:"title",minWidth:180,render:(t,{row:a})=>t("AutoTip",a.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:a})=>{if(a.receives.length===0)return t("div","-");const e=[];return a.receives.length<=2?a.receives.some(s=>{e.push(t("UserAvatar",{props:{size:22,userid:s}}))}):(e.push(t("UserAvatar",{props:{size:22,userid:a.receives[0]}})),e.push(t("div",{class:"more-avatar"},`+${a.receives.length-1}`))),t("div",{class:"report-table-avatar"},e)}},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,minWidth:100,render:(t,{column:a,row:e})=>e.id?t("TableAction",{props:{column:a,menu:[{icon:"md-create",action:"edit"},{icon:"md-eye",action:"view"}]},on:{action:s=>{s==="edit"?this.$emit("on-edit",e.id):s==="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)}}},L={};var wt=r(yt,kt,bt,!1,Dt,null,null,null);function Dt(t){for(let a in L)this[a]=L[a]}var Lt=function(){return wt.exports}(),xt=function(){var t=this,a=t.$createElement,e=t._self._c||a;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(s){t.$set(t.keys,"key",s)},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(s){t.$set(t.keys,"type",s)},expression:"keys.type"}},t._l(t.reportTypeList,function(s){return e("Option",{key:s.value,attrs:{value:s.value}},[t._v(t._s(s.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(s){t.$set(t.keys,"created_at",s)},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(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.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(s){t.groupSelect=!0}},model:{value:t.selectAction,callback:function(s){t.selectAction=s},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)])},Tt=[];const Ct={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:a})=>{let e=[];const s=a.receives_user.find(({userid:i})=>i==this.userId);return s&&s.pivot.read==0?e.push(t("Tag",{props:{color:"orange"},style:{flexShrink:0}},this.$L("\u672A\u8BFB")),t("AutoTip",a.title)):e.push(t("AutoTip",a.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:a,row:e})=>e.id?t("TableAction",{props:{column:a,menu:[{icon:"md-eye",action:"view"}]},on:{action:s=>{if(s==="view"){this.$emit("on-view",e);const i=e.receives_user.find(({userid:o})=>o==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:a})=>a)},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,a){const e=a==="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((s,i)=>{this.$store.dispatch("call",{url:"report/mark",data:{id:t,action:a}}).then(({msg:o})=>{s(o),this.getLists(),this.$emit("on-read")}).catch(({msg:o})=>{i(o)})})})}}},x={};var St=r(Ct,xt,Tt,!1,It,null,null,null);function It(t){for(let a in x)this[a]=x[a]}var At=function(){return St.exports}(),Mt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"report"},[e("Tabs",{model:{value:t.reportTabs,callback:function(s){t.reportTabs=s},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(s){t.showDetailDrawer=s},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(s){t.showEditDrawer=s},expression:"showEditDrawer"}},[t.showEditDrawer?e("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)},jt=[];const Pt={name:"Report",components:{DrawerOverlay:B,ReportEdit:K,ReportMy:Lt,ReportReceive:At,ReportDetail:Y},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:a})=>{$A.messageSuccess(a),this.saveSuccess(t)})},computed:{...d(["reportUnreadNumber"])},watch:{reportTabs(t){this.$emit("input",t)}},methods:{tabRebder(t){return a=>t>0?a("div",[a("span",{class:"navbar-item-content"},this.$L("\u6536\u5230\u7684\u6C47\u62A5")),a("Badge",{class:"manage-box-report",props:{count:t}})]):a("div",[a("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 a={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:a})}else this.showDetailDrawer=!0},onRead(){this.$emit("on-read",0)},onEditReport(t){if(this.$Electron){let a={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:a})}else this.reportId=t,this.showEditDrawer=!0},saveSuccess(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}},T={};var Ut=r(Pt,Mt,jt,!1,Et,null,null,null);function Et(t){for(let a in T)this[a]=T[a]}var Rt=function(){return Ut.exports}(),Bt=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()])},Nt=[];const Ot={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:{...d(["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}return!1},onBack(){if(!this.$Modal.removeLast()){if(this.fileFolderId>0){const t=this.fileLists.find(({id:a,permission:e})=>a==this.fileFolderId&&e>-1);if(t){const a=this.fileLists.find(({id:e,permission:s})=>e==t.pid&&s>-1);if(a){this.goForward({name:"manage-file",params:{folderId:a.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()})}}},C={};var zt=r(Ot,Bt,Nt,!1,Ft,null,null,null);function Ft(t){for(let a in C)this[a]=C[a]}var Wt=function(){return zt.exports}(),Ht=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()},Vt=[];const Kt={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())}}},S={};var Yt=r(Kt,Ht,Vt,!1,Jt,null,null,null);function Jt(t){for(let a in S)this[a]=S[a]}var qt=function(){return Yt.exports}(),Gt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return t.userid?e("div",{staticClass:"meeting-player"},[e("div",{staticClass:"player",style:t.playerStyle,attrs:{id:t.id}}),e("UserAvatar",{attrs:{userid:t.userid,size:36,borderWitdh:2}}),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):t._e()},Xt=[];const Qt={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}},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:{...d(["cacheUserBasic"]),userid(){return this.player.uid?parseInt((this.player.uid+"").substring(6)):0},playerStyle(){const t=this.cacheUserBasic.find(({userid:a})=>a==this.userid);return t?{backgroundImage:`url("${t.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(a=>{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)}})}}},I={};var Zt=r(Qt,Gt,Xt,!1,te,null,null,null);function te(t){for(let a in I)this[a]=I[a]}var ee=function(){return Zt.exports}(),ae=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{ref:"floatDrag",style:t.dragStyle,on:{mousedown:function(s){return s.stopPropagation(),s.preventDefault(),t.mouseDown.apply(null,arguments)}}},[t._t("default")],2)},se=[];const ie={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=a=>{let e=a.clientX-this.record.x,s=a.clientY-this.record.y;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),s<0?s=0:s>window.innerHeight-this.floatDrag.offsetHeight&&(s=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=s},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 a=event.targetTouches[0],e=a.clientX-this.floatDrag.offsetWidth/2,s=a.clientY-this.floatDrag.offsetHeight/2;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),s<0?s=0:s>window.innerHeight-this.floatDrag.offsetHeight&&(s=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=s}},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)}}},A={};var oe=r(ie,ae,se,!1,re,null,null,null);function re(t){for(let a in A)this[a]=A[a]}var ne=function(){return oe.exports}(),le=function(){var t=this,a=t.$createElement,e=t._self._c||a;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},model:{value:t.addShow,callback:function(s){t.addShow=s},expression:"addShow"}},[e("Form",{ref:"addForm",attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(s){s.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(s){t.$set(t.addData,"name",s)},expression:"addData.name"}})],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(s){t.$set(t.addData,"meetingid",s)},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(s){t.$set(t.addData,"name",s)},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(s){t.$set(t.addData,"userids",s)},expression:"addData.userids"}})],1)],e("FormItem",{attrs:{prop:"tracks"}},[e("CheckboxGroup",{model:{value:t.addData.tracks,callback:function(s){t.$set(t.addData,"tracks",s)},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"},[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.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(s){t.meetingShow=s},expression:"meetingShow"}},[e("ul",[t.localUser.uid?e("li",[e("MeetingPlayer",{attrs:{player:t.localUser,isLocal:""}})],1):t._e(),t._l(t.remoteUsers,function(s){return e("li",[e("MeetingPlayer",{attrs:{player:s}})],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"},on:{click:function(s){return t.onInvitation("open")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE646")])]),e("Button",{attrs:{type:"primary"},on:{click:function(s){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(s){return t.onInvitation("open")}}},[t._v(t._s(t.$L("\u9080\u8BF7")))]),e("Button",{attrs:{type:"primary"},on:{click:function(s){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(s){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(s){t.invitationShow=s},expression:"invitationShow"}},[e("Form",{ref:"invitationForm",attrs:{model:t.invitationData,"label-width":"auto"},nativeOn:{submit:function(s){s.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(s){t.$set(t.invitationData,"userids",s)},expression:"invitationData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.invitationShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.invitationLoad},on:{click:function(s){return t.onInvitation("submit")}}},[t._v(t._s(t.$L("\u53D1\u9001\u9080\u8BF7")))])],1)],1)],1)},ce=[];const de={name:"MeetingManager",components:{UserSelect:v,DragBallComponent:ne,MeetingPlayer:ee},data(){return{loadIng:0,subscribe:null,addShow:!1,addData:{userids:[],tracks:["audio"]},invitationShow:!1,invitationLoad:!1,invitationData:{userids:[]},meetingShow:!1,meetingMini:!1,audioLoad:!1,videoLoad:!1,agoraClient:null,remoteUsers:[],localUser:{uid:null,audioTrack:null,videoTrack:null}}},computed:{...d(["meetingWindow"])},mounted(){this.subscribe=c.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"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:a})=>{this.$set(this.addData,"userids",a.map(e=>e.userid))}).finally(a=>{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:a})=>{this.$set(this.addData,"name",a.name),this.$set(this.addData,"meetingid",a.meetingid),this.$store.dispatch("saveDialogMsg",a.msgs),this.$store.dispatch("updateDialogLastMsg",a.msgs),delete a.name,delete a.msgs,$A.isEEUiApp?$A.eeuiAppSendMessage({action:"startMeeting",meetingParams:{name:this.addData.name,token:a.token,channel:a.channel,uuid:a.uid,appid:a.appid,avatar:a.userimg,username:a.nickname,video:this.addData.tracks.includes("video"),audio:this.addData.tracks.includes("audio"),meetingid:a.meetingid,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(a)}).catch(e=>{$A.modalError("\u4F1A\u8BAE\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")}).finally(e=>{this.loadIng--})}).catch(({msg:a})=>{this.loadIng--,$A.modalError(a)}))})},onAudio(){this.localUser.audioTrack?this.closeAudio():this.openAudio()},onVideo(){this.localUser.videoTrack?this.closeVideo():this.openVideo()},onInvitation(t){t==="open"?(this.invitationData={userids:[],meetingid:this.addData.meetingid},this.invitationShow=!0):t==="submit"&&(this.invitationLoad=!0,this.$store.dispatch("call",{url:"users/meeting/invitation",data:this.invitationData}).then(({data:a,msg:e})=>{this.invitationShow=!1,this.$store.dispatch("saveDialogMsg",a.msgs),this.$store.dispatch("updateDialogLastMsg",a.msgs),$A.messageSuccess(e)}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{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 a=>{await this.leave(),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 s=await AgoraRTC.getMicrophones();s[0]&&this.localUser.audioTrack.setDevice(s[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 s=await AgoraRTC.getCameras();s[0]&&this.localUser.videoTrack.setDevice(s[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 a=[];try{this.localUser.uid=await this.agoraClient.join(t.appid,t.channel,t.token,t.uid),this.addData.tracks.includes("audio")&&a.push(this.localUser.audioTrack=await AgoraRTC.createMicrophoneAudioTrack()),this.addData.tracks.includes("video")&&a.push(this.localUser.videoTrack=await AgoraRTC.createCameraVideoTrack()),a.length>0&&await this.agoraClient.publish(a),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 a,e;(a=this.localUser[t])==null||a.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 a=this.remoteUsers.findIndex(e=>e.uid==t.uid);a>-1?this.remoteUsers.splice(a,1,t):this.remoteUsers.push(t)},async handleUserLeft(t){const a=this.remoteUsers.findIndex(e=>e.uid==t.uid);a>-1&&this.remoteUsers.splice(a,1)},async handleUserPublished(t,a){this.remoteUsers.find(s=>s.uid==t.uid)&&await this.agoraClient.subscribe(t,a)},async handleUserUnpublished(t,a){this.remoteUsers.find(s=>s.uid==t.uid)&&await this.agoraClient.unsubscribe(t,a)}}},M={};var he=r(de,le,ce,!1,ue,null,null,null);function ue(t){for(let a in M)this[a]=M[a]}var pe=function(){return he.exports}(),me=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)},fe=[];const ge={name:"DialogModal",components:{DialogWrapper:q},data(){return{timer:null}},computed:{...d(["dialogId"]),visible(){return this.dialogId>0&&this.windowPortrait}},methods:{onBeforeClose(){return new Promise(t=>{this.$store.dispatch("openDialog",0)})}}},j={};var ve=r(ge,me,fe,!1,_e,null,null,null);function _e(t){for(let a in j)this[a]=j[a]}var $e=function(){return ve.exports}(),ke=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)},be=[];const ye={name:"TaskModal",components:{TaskDetail:V},computed:{...d(["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}}},P={};var we=r(ye,ke,be,!1,De,null,null,null);function De(t){for(let a in P)this[a]=P[a]}var Le=function(){return we.exports}(),xe=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)},Te=[];const Ce={name:"TaskExport",components:{UserSelect:v},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--}))}}},U={};var Se=r(Ce,xe,Te,!1,Ie,null,null,null);function Ie(t){for(let a in U)this[a]=U[a]}var Ae=function(){return Se.exports}(),Me=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E"),"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("\u5BA1\u6279\u7C7B\u578B")}},[e("Select",{on:{"on-open-change":t.getProcName},model:{value:t.formData.proc_def_name,callback:function(s){t.$set(t.formData,"proc_def_name",s)},expression:"formData.proc_def_name"}},t._l(t.procList,function(s,i){return e("Option",{key:i,attrs:{value:s.name}},[t._v(t._s(s.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(s){t.$set(t.formData,"date",s)},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(s){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(s){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(s){t.$set(t.formData,"is_finished",s)},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(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)},je=[];const Pe={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--}))}}},E={};var Ue=r(Pe,Me,je,!1,Ee,null,null,null);function Ee(t){for(let a in E)this[a]=E[a]}var Re=function(){return Ue.exports}();const Be=(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,Ne=(t,a,e)=>t.findIndex(s=>s[a]===e);var l={checkData:Be,searchArrObj:Ne};class Oe{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(!l.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&&l.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(){!l.checkData("number",this.timeout)||(this.options.timeOut&&l.checkData("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(a){const e=this.notification.timestamp;setTimeout(()=>{const s=l.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=l.searchArrObj(this.notificationAll,"timestamp",a);s!==-1&&this.notificationAll.splice(s,1)})}autoClose(){const a=this.notification.timestamp;setTimeout(()=>{const e=l.searchArrObj(this.notificationAll,"timestamp",a);e!==-1&&this.notificationAll.splice(e,1)},6e3)}notificationEvent(a){if(!!this.checkStatus("support"))if(l.checkData("Object",a)){for(const e in a)if(!l.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&&l.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&&l.checkData("String",a)?this.title=a:console.warn("replaceTitle: title(\u901A\u77E5\u6807\u9898)\u4E3A\u5FC5\u586B\u5B57\u7B26\u4E32")}replaceOptions(a){a&&l.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 ze=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,tooltipDisabled:""}})],1),e("span",[t._v(t._s(t.userInfo.nickname))]),t.reportUnreadNumber+t.approveUnreadNumber>0?e("Badge",{staticClass:"manage-box-top-report",attrs:{"overflow-count":999,count:t.reportUnreadNumber+t.approveUnreadNumber}}):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(h){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))+" "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):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:"workReport"}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L("\u5DE5\u4F5C\u62A5\u544A"))+" "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)]),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("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"})],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"})],1)},Fe=[];const We={components:{TaskExport:Ae,CheckinExport:z,ApproveExport:Re,TaskModal:Le,DialogModal:$e,MeetingManager:pe,MobileNotification:qt,MobileBack:Wt,MobileTabbar:pt,TaskAdd:$t,Report:Rt,DrawerOverlay:B,ProjectManagement:nt,TeamManagement:F,ProjectArchived:et},directives:{longpress:J},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=c.Store.subscribe("addTask",this.onAddTask),this.dialogMsgSubscribe=c.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:{...d(["userInfo","userIsAdmin","cacheUserBasic","cacheTasks","cacheDialogs","cacheProjects","projectTotal","wsOpenNum","columnTemplate","wsMsg","clientNewVersion","cacheTaskBrowse","dialogIns","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>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},{path:"approve",name:"\u5BA1\u6279\u4E2D\u5FC3"}):e.push({path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E",divided:!0},{path:"approve",name:"\u5BA1\u6279\u4E2D\u5FC3"},{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-calendar","manage-messenger","manage-file","manage-setting"].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":c.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"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){return{active:this.routeName===`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":c.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":c.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:h}=t;if(h==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 _=n=>{if(s==="group"){let p=this.cacheUserBasic.find(f=>f.userid==h);p?m(`${n} (${p.nickname})`):this.$store.dispatch("call",{url:"users/basic",data:{userid:[h]},skipAuthError:!0}).then(({data:f})=>{p=f.find(N=>N.userid==h),p&&m(`${n} (${p.nickname})`)}).catch(f=>{m(n)})}else m(n)},m=n=>{this.__notificationId===a&&(this.$isEEUiApp?this.$refs.mobileNotification.open({userid:h,title:n,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:n,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(n),this.notificationManage.userAgreed()))},$=this.cacheDialogs.find(n=>n.id==e);$?_($.name):this.$store.dispatch("getDialogOne",e).then(({data:n})=>_(n.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 Oe(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)})}}},R={};var He=r(We,ze,Fe,!1,Ve,null,null,null);function Ve(t){for(let a in R)this[a]=R[a]}var ra=function(){return He.exports}();export{ra as default}; +import{n as r,N as O,m as d,a as g,b as c}from"./app.6fb8fe77.js";import{C as z,T as F}from"./CheckinExport.0786bc67.js";import{D as B}from"./index.ab28c92e.js";import W from"./TEditor.116bbeaa.js";import{U as v}from"./UserSelect.4fa9cbd2.js";import{T as H,a as V}from"./TaskDetail.93d4eeab.js";import{R as K}from"./ReportEdit.3d7c05e9.js";import{R as Y}from"./ReportDetail.f06c9ba5.js";import{l as J}from"./longpress.43ca7fd9.js";import{D as q}from"./DialogWrapper.7e5c06a5.js";import"./ImgUpload.056f7090.js";import"./ProjectLog.9bfebf4b.js";import"./TaskMenu.61d4b7dc.js";import"./details.eb8631f5.js";var G=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)])},X=[];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 Z=r(Q,G,X,!1,tt,null,null,null);function tt(t){for(let a in b)this[a]=b[a]}var et=function(){return Z.exports}(),at=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)])},st=[];const it={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()}}},y={};var ot=r(it,at,st,!1,rt,null,null,null);function rt(t){for(let a in y)this[a]=y[a]}var nt=function(){return ot.exports}(),lt=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("transition",{attrs:{name:"mobile-fade"}},[t.isMore?e("div",{staticClass:"more-mask",on:{click:function(s){return t.toggleRoute("more")}}}):t._e()]),e("transition",{attrs:{name:"mobile-slide"}},[t.isMore?e("div",{staticClass:"more-box"},[e("div",{staticClass:"tabbar-more-title"},[t._v(t._s(t.$L("\u66F4\u591A")))]),t._l(t.navMore,function(s){return e("ul",t._l(s,function(i){return e("li",{class:{active:t.activeName===i.name},on:{click:function(o){return t.toggleRoute(i.name)}}},[e("div",{staticClass:"more-item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(i.icon)}}),e("div",{staticClass:"tabbar-title"},[t._v(t._s(t.$L(i.label)))]),i.name==="workReport"?e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)])}),0)})],2):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==="more"?[e("Badge",{staticClass:"tabbar-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}})]:t._e()],2)}),0),e("Modal",{attrs:{title:t.$L("\u626B\u7801\u767B\u5F55"),"mask-closable":!1},model:{value:t.scanLoginShow,callback:function(s){t.scanLoginShow=s},expression:"scanLoginShow"}},[e("div",{staticClass:"mobile-scan-login-box"},[e("div",{staticClass:"mobile-scan-login-title"},[t._v(t._s(t.$L("\u4F60\u597D\uFF0C\u626B\u7801\u786E\u8BA4\u767B\u5F55")))]),e("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")])]),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.scanLoginShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u767B\u5F55")))]),e("Button",{attrs:{type:"primary",loading:t.scanLoginLoad},on:{click:t.scanLoginSubmit}},[t._v(t._s(t.$L("\u786E\u8BA4\u767B\u5F55")))])],1)])],1)},ct=[];const dt={name:"MobileTabbar",components:{NetworkException:O},data(){return{isMore:!1,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:"more",label:"\u66F4\u591A"}],navMore:[[{icon:"",name:"calendar",label:"\u65E5\u5386"},{icon:"",name:"file",label:"\u6587\u4EF6"},{icon:"",name:"setting",label:"\u8BBE\u7F6E"}],[{icon:"",name:"addProject",label:"\u521B\u5EFA\u9879\u76EE"},{icon:"",name:"addTask",label:"\u6DFB\u52A0\u4EFB\u52A1"},{icon:"",name:"createMeeting",label:"\u65B0\u4F1A\u8BAE"},{icon:"",name:"joinMeeting",label:"\u52A0\u5165\u4F1A\u8BAE"}],[{icon:"",name:"workReport",label:"\u5DE5\u4F5C\u62A5\u544A"},{icon:"",name:"approve",label:"\u5BA1\u6279\u4E2D\u5FC3"}]],scanLoginShow:!1,scanLoginLoad:!1,scanLoginCode:""}},created(){$A.isEEUiApp&&this.navMore[0].splice(2,0,{icon:"",name:"scan",label:"\u626B\u4E00\u626B"}),this.userIsAdmin&&this.navMore[2].splice(0,0,{icon:"",name:"allUser",label:"\u56E2\u961F\u7BA1\u7406"})},mounted(){},beforeDestroy(){},computed:{...d(["userIsAdmin","cacheDialogs","reportUnreadNumber"]),...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 this.isMore||["manage-calendar","manage-file","manage-setting"].includes(this.routeName)?"more":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),t!="more"&&(this.isMore=!1);let a;switch(t){case"more":this.isMore=!this.isMore;return;case"scan":$A.eeuiAppScan(this.scanResult);return;case"addTask":case"addProject":case"allUser":case"workReport":return;case"createMeeting":c.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":c.Store.set("addMeeting",{type:"join"});break;case"project":a={name:"manage-project",params:{projectId:"all"}};break;case"dialog":a={name:"manage-messenger",params:{dialogAction:"dialog"}},this.routeName==="manage-messenger"&&c.Store.set("clickAgainDialog",!0);break;case"contacts":a={name:"manage-messenger",params:{dialogAction:"contacts"}};break;default:a={name:"manage-"+t};break}this.goForward(a)},scanResult(t){const a=(t+"").match(/^https*:\/\/(.*?)\/login\?qrcode=(.*?)$/);if(a){this.scanLoginCode=a[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}))}}},w={};var ht=r(dt,lt,ct,!1,ut,null,null,null);function ut(t){for(let a in w)this[a]=w[a]}var pt=function(){return ht.exports}(),mt=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("div",{staticClass:"desc"},[e("TEditor",{attrs:{plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,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..."),inline:""},model:{value:t.addData.content,callback:function(s){t.$set(t.addData,"content",s)},expression:"addData.content"}})],1),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)]),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)},ft=[];const gt={name:"TaskAdd",components:{UserSelect:v,TEditor:W,TaskExistTips:H},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:"",taskPlugins:["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"],taskOptions:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:!1},taskOptionFull:{menubar:"file edit view",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:"uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload"},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:{...d(["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 vt=r(gt,mt,ft,!1,_t,null,null,null);function _t(t){for(let a in D)this[a]=D[a]}var $t=function(){return vt.exports}(),kt=function(){var t=this,a=t.$createElement,e=t._self._c||a;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(s){t.$set(t.keys,"type",s)},expression:"keys.type"}},t._l(t.reportTypeList,function(s){return e("Option",{key:s.value,attrs:{value:s.value}},[t._v(t._s(s.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(s){t.$set(t.keys,"created_at",s)},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(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:"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)])},bt=[];const yt={name:"ReportMy",data(){return{loadIng:0,columns:[{title:this.$L("\u540D\u79F0"),key:"title",minWidth:180,render:(t,{row:a})=>t("AutoTip",a.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:a})=>{if(a.receives.length===0)return t("div","-");const e=[];return a.receives.length<=2?a.receives.some(s=>{e.push(t("UserAvatar",{props:{size:22,userid:s}}))}):(e.push(t("UserAvatar",{props:{size:22,userid:a.receives[0]}})),e.push(t("div",{class:"more-avatar"},`+${a.receives.length-1}`))),t("div",{class:"report-table-avatar"},e)}},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,minWidth:100,render:(t,{column:a,row:e})=>e.id?t("TableAction",{props:{column:a,menu:[{icon:"md-create",action:"edit"},{icon:"md-eye",action:"view"}]},on:{action:s=>{s==="edit"?this.$emit("on-edit",e.id):s==="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)}}},L={};var wt=r(yt,kt,bt,!1,Dt,null,null,null);function Dt(t){for(let a in L)this[a]=L[a]}var Lt=function(){return wt.exports}(),xt=function(){var t=this,a=t.$createElement,e=t._self._c||a;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(s){t.$set(t.keys,"key",s)},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(s){t.$set(t.keys,"type",s)},expression:"keys.type"}},t._l(t.reportTypeList,function(s){return e("Option",{key:s.value,attrs:{value:s.value}},[t._v(t._s(s.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(s){t.$set(t.keys,"created_at",s)},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(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.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(s){t.groupSelect=!0}},model:{value:t.selectAction,callback:function(s){t.selectAction=s},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)])},Tt=[];const Ct={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:a})=>{let e=[];const s=a.receives_user.find(({userid:i})=>i==this.userId);return s&&s.pivot.read==0?e.push(t("Tag",{props:{color:"orange"},style:{flexShrink:0}},this.$L("\u672A\u8BFB")),t("AutoTip",a.title)):e.push(t("AutoTip",a.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:a,row:e})=>e.id?t("TableAction",{props:{column:a,menu:[{icon:"md-eye",action:"view"}]},on:{action:s=>{if(s==="view"){this.$emit("on-view",e);const i=e.receives_user.find(({userid:o})=>o==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:a})=>a)},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,a){const e=a==="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((s,i)=>{this.$store.dispatch("call",{url:"report/mark",data:{id:t,action:a}}).then(({msg:o})=>{s(o),this.getLists(),this.$emit("on-read")}).catch(({msg:o})=>{i(o)})})})}}},x={};var St=r(Ct,xt,Tt,!1,It,null,null,null);function It(t){for(let a in x)this[a]=x[a]}var At=function(){return St.exports}(),Mt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"report"},[e("Tabs",{model:{value:t.reportTabs,callback:function(s){t.reportTabs=s},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(s){t.showDetailDrawer=s},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(s){t.showEditDrawer=s},expression:"showEditDrawer"}},[t.showEditDrawer?e("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)},jt=[];const Pt={name:"Report",components:{DrawerOverlay:B,ReportEdit:K,ReportMy:Lt,ReportReceive:At,ReportDetail:Y},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:a})=>{$A.messageSuccess(a),this.saveSuccess(t)})},computed:{...d(["reportUnreadNumber"])},watch:{reportTabs(t){this.$emit("input",t)}},methods:{tabRebder(t){return a=>t>0?a("div",[a("span",{class:"navbar-item-content"},this.$L("\u6536\u5230\u7684\u6C47\u62A5")),a("Badge",{class:"manage-box-report",props:{count:t}})]):a("div",[a("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 a={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:a})}else this.showDetailDrawer=!0},onRead(){this.$emit("on-read",0)},onEditReport(t){if(this.$Electron){let a={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:a})}else this.reportId=t,this.showEditDrawer=!0},saveSuccess(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}},T={};var Ut=r(Pt,Mt,jt,!1,Et,null,null,null);function Et(t){for(let a in T)this[a]=T[a]}var Rt=function(){return Ut.exports}(),Bt=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()])},Nt=[];const Ot={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:{...d(["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}return!1},onBack(){if(!this.$Modal.removeLast()){if(this.fileFolderId>0){const t=this.fileLists.find(({id:a,permission:e})=>a==this.fileFolderId&&e>-1);if(t){const a=this.fileLists.find(({id:e,permission:s})=>e==t.pid&&s>-1);if(a){this.goForward({name:"manage-file",params:{folderId:a.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()})}}},C={};var zt=r(Ot,Bt,Nt,!1,Ft,null,null,null);function Ft(t){for(let a in C)this[a]=C[a]}var Wt=function(){return zt.exports}(),Ht=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()},Vt=[];const Kt={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())}}},S={};var Yt=r(Kt,Ht,Vt,!1,Jt,null,null,null);function Jt(t){for(let a in S)this[a]=S[a]}var qt=function(){return Yt.exports}(),Gt=function(){var t=this,a=t.$createElement,e=t._self._c||a;return t.userid?e("div",{staticClass:"meeting-player"},[e("div",{staticClass:"player",style:t.playerStyle,attrs:{id:t.id}}),e("UserAvatar",{attrs:{userid:t.userid,size:36,borderWitdh:2}}),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):t._e()},Xt=[];const Qt={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}},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:{...d(["cacheUserBasic"]),userid(){return this.player.uid?parseInt((this.player.uid+"").substring(6)):0},playerStyle(){const t=this.cacheUserBasic.find(({userid:a})=>a==this.userid);return t?{backgroundImage:`url("${t.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(a=>{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)}})}}},I={};var Zt=r(Qt,Gt,Xt,!1,te,null,null,null);function te(t){for(let a in I)this[a]=I[a]}var ee=function(){return Zt.exports}(),ae=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{ref:"floatDrag",style:t.dragStyle,on:{mousedown:function(s){return s.stopPropagation(),s.preventDefault(),t.mouseDown.apply(null,arguments)}}},[t._t("default")],2)},se=[];const ie={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=a=>{let e=a.clientX-this.record.x,s=a.clientY-this.record.y;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),s<0?s=0:s>window.innerHeight-this.floatDrag.offsetHeight&&(s=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=s},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 a=event.targetTouches[0],e=a.clientX-this.floatDrag.offsetWidth/2,s=a.clientY-this.floatDrag.offsetHeight/2;e<0?e=0:e>window.innerWidth-this.floatDrag.offsetWidth&&(e=window.innerWidth-this.floatDrag.offsetWidth),s<0?s=0:s>window.innerHeight-this.floatDrag.offsetHeight&&(s=window.innerHeight-this.floatDrag.offsetHeight),this.left=e,this.top=s}},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)}}},A={};var oe=r(ie,ae,se,!1,re,null,null,null);function re(t){for(let a in A)this[a]=A[a]}var ne=function(){return oe.exports}(),le=function(){var t=this,a=t.$createElement,e=t._self._c||a;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},model:{value:t.addShow,callback:function(s){t.addShow=s},expression:"addShow"}},[e("Form",{ref:"addForm",attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(s){s.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(s){t.$set(t.addData,"name",s)},expression:"addData.name"}})],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(s){t.$set(t.addData,"meetingid",s)},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(s){t.$set(t.addData,"name",s)},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(s){t.$set(t.addData,"userids",s)},expression:"addData.userids"}})],1)],e("FormItem",{attrs:{prop:"tracks"}},[e("CheckboxGroup",{model:{value:t.addData.tracks,callback:function(s){t.$set(t.addData,"tracks",s)},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"},[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.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(s){t.meetingShow=s},expression:"meetingShow"}},[e("ul",[t.localUser.uid?e("li",[e("MeetingPlayer",{attrs:{player:t.localUser,isLocal:""}})],1):t._e(),t._l(t.remoteUsers,function(s){return e("li",[e("MeetingPlayer",{attrs:{player:s}})],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"},on:{click:function(s){return t.onInvitation("open")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE646")])]),e("Button",{attrs:{type:"primary"},on:{click:function(s){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(s){return t.onInvitation("open")}}},[t._v(t._s(t.$L("\u9080\u8BF7")))]),e("Button",{attrs:{type:"primary"},on:{click:function(s){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(s){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(s){t.invitationShow=s},expression:"invitationShow"}},[e("Form",{ref:"invitationForm",attrs:{model:t.invitationData,"label-width":"auto"},nativeOn:{submit:function(s){s.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(s){t.$set(t.invitationData,"userids",s)},expression:"invitationData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(s){t.invitationShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.invitationLoad},on:{click:function(s){return t.onInvitation("submit")}}},[t._v(t._s(t.$L("\u53D1\u9001\u9080\u8BF7")))])],1)],1)],1)},ce=[];const de={name:"MeetingManager",components:{UserSelect:v,DragBallComponent:ne,MeetingPlayer:ee},data(){return{loadIng:0,subscribe:null,addShow:!1,addData:{userids:[],tracks:["audio"]},invitationShow:!1,invitationLoad:!1,invitationData:{userids:[]},meetingShow:!1,meetingMini:!1,audioLoad:!1,videoLoad:!1,agoraClient:null,remoteUsers:[],localUser:{uid:null,audioTrack:null,videoTrack:null}}},computed:{...d(["meetingWindow"])},mounted(){this.subscribe=c.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"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:a})=>{this.$set(this.addData,"userids",a.map(e=>e.userid))}).finally(a=>{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:a})=>{this.$set(this.addData,"name",a.name),this.$set(this.addData,"meetingid",a.meetingid),this.$store.dispatch("saveDialogMsg",a.msgs),this.$store.dispatch("updateDialogLastMsg",a.msgs),delete a.name,delete a.msgs,$A.isEEUiApp?$A.eeuiAppSendMessage({action:"startMeeting",meetingParams:{name:this.addData.name,token:a.token,channel:a.channel,uuid:a.uid,appid:a.appid,avatar:a.userimg,username:a.nickname,video:this.addData.tracks.includes("video"),audio:this.addData.tracks.includes("audio"),meetingid:a.meetingid,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(a)}).catch(e=>{$A.modalError("\u4F1A\u8BAE\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")}).finally(e=>{this.loadIng--})}).catch(({msg:a})=>{this.loadIng--,$A.modalError(a)}))})},onAudio(){this.localUser.audioTrack?this.closeAudio():this.openAudio()},onVideo(){this.localUser.videoTrack?this.closeVideo():this.openVideo()},onInvitation(t){t==="open"?(this.invitationData={userids:[],meetingid:this.addData.meetingid},this.invitationShow=!0):t==="submit"&&(this.invitationLoad=!0,this.$store.dispatch("call",{url:"users/meeting/invitation",data:this.invitationData}).then(({data:a,msg:e})=>{this.invitationShow=!1,this.$store.dispatch("saveDialogMsg",a.msgs),this.$store.dispatch("updateDialogLastMsg",a.msgs),$A.messageSuccess(e)}).catch(({msg:a})=>{$A.modalError(a)}).finally(a=>{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 a=>{await this.leave(),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 s=await AgoraRTC.getMicrophones();s[0]&&this.localUser.audioTrack.setDevice(s[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 s=await AgoraRTC.getCameras();s[0]&&this.localUser.videoTrack.setDevice(s[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 a=[];try{this.localUser.uid=await this.agoraClient.join(t.appid,t.channel,t.token,t.uid),this.addData.tracks.includes("audio")&&a.push(this.localUser.audioTrack=await AgoraRTC.createMicrophoneAudioTrack()),this.addData.tracks.includes("video")&&a.push(this.localUser.videoTrack=await AgoraRTC.createCameraVideoTrack()),a.length>0&&await this.agoraClient.publish(a),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 a,e;(a=this.localUser[t])==null||a.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 a=this.remoteUsers.findIndex(e=>e.uid==t.uid);a>-1?this.remoteUsers.splice(a,1,t):this.remoteUsers.push(t)},async handleUserLeft(t){const a=this.remoteUsers.findIndex(e=>e.uid==t.uid);a>-1&&this.remoteUsers.splice(a,1)},async handleUserPublished(t,a){this.remoteUsers.find(s=>s.uid==t.uid)&&await this.agoraClient.subscribe(t,a)},async handleUserUnpublished(t,a){this.remoteUsers.find(s=>s.uid==t.uid)&&await this.agoraClient.unsubscribe(t,a)}}},M={};var he=r(de,le,ce,!1,ue,null,null,null);function ue(t){for(let a in M)this[a]=M[a]}var pe=function(){return he.exports}(),me=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)},fe=[];const ge={name:"DialogModal",components:{DialogWrapper:q},data(){return{timer:null}},computed:{...d(["dialogId"]),visible(){return this.dialogId>0&&this.windowPortrait}},methods:{onBeforeClose(){return new Promise(t=>{this.$store.dispatch("openDialog",0)})}}},j={};var ve=r(ge,me,fe,!1,_e,null,null,null);function _e(t){for(let a in j)this[a]=j[a]}var $e=function(){return ve.exports}(),ke=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)},be=[];const ye={name:"TaskModal",components:{TaskDetail:V},computed:{...d(["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}}},P={};var we=r(ye,ke,be,!1,De,null,null,null);function De(t){for(let a in P)this[a]=P[a]}var Le=function(){return we.exports}(),xe=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)},Te=[];const Ce={name:"TaskExport",components:{UserSelect:v},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--}))}}},U={};var Se=r(Ce,xe,Te,!1,Ie,null,null,null);function Ie(t){for(let a in U)this[a]=U[a]}var Ae=function(){return Se.exports}(),Me=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u5BA1\u6279\u6570\u636E"),"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("\u5BA1\u6279\u7C7B\u578B")}},[e("Select",{on:{"on-open-change":t.getProcName},model:{value:t.formData.proc_def_name,callback:function(s){t.$set(t.formData,"proc_def_name",s)},expression:"formData.proc_def_name"}},t._l(t.procList,function(s,i){return e("Option",{key:i,attrs:{value:s.name}},[t._v(t._s(s.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(s){t.$set(t.formData,"date",s)},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(s){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(s){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(s){t.$set(t.formData,"is_finished",s)},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(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)},je=[];const Pe={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--}))}}},E={};var Ue=r(Pe,Me,je,!1,Ee,null,null,null);function Ee(t){for(let a in E)this[a]=E[a]}var Re=function(){return Ue.exports}();const Be=(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,Ne=(t,a,e)=>t.findIndex(s=>s[a]===e);var l={checkData:Be,searchArrObj:Ne};class Oe{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(!l.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&&l.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(){!l.checkData("number",this.timeout)||(this.options.timeOut&&l.checkData("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(a){const e=this.notification.timestamp;setTimeout(()=>{const s=l.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=l.searchArrObj(this.notificationAll,"timestamp",a);s!==-1&&this.notificationAll.splice(s,1)})}autoClose(){const a=this.notification.timestamp;setTimeout(()=>{const e=l.searchArrObj(this.notificationAll,"timestamp",a);e!==-1&&this.notificationAll.splice(e,1)},6e3)}notificationEvent(a){if(!!this.checkStatus("support"))if(l.checkData("Object",a)){for(const e in a)if(!l.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&&l.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&&l.checkData("String",a)?this.title=a:console.warn("replaceTitle: title(\u901A\u77E5\u6807\u9898)\u4E3A\u5FC5\u586B\u5B57\u7B26\u4E32")}replaceOptions(a){a&&l.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 ze=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,tooltipDisabled:""}})],1),e("span",[t._v(t._s(t.userInfo.nickname))]),t.reportUnreadNumber+t.approveUnreadNumber>0?e("Badge",{staticClass:"manage-box-top-report",attrs:{"overflow-count":999,count:t.reportUnreadNumber+t.approveUnreadNumber}}):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(h){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))+" "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):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:"workReport"}},[e("div",{staticClass:"manage-menu-flex"},[t._v(" "+t._s(t.$L("\u5DE5\u4F5C\u62A5\u544A"))+" "),t.reportUnreadNumber>0?e("Badge",{staticClass:"manage-menu-report-badge",attrs:{"overflow-count":999,count:t.reportUnreadNumber}}):t._e()],1)]),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("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"})],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"})],1)},Fe=[];const We={components:{TaskExport:Ae,CheckinExport:z,ApproveExport:Re,TaskModal:Le,DialogModal:$e,MeetingManager:pe,MobileNotification:qt,MobileBack:Wt,MobileTabbar:pt,TaskAdd:$t,Report:Rt,DrawerOverlay:B,ProjectManagement:nt,TeamManagement:F,ProjectArchived:et},directives:{longpress:J},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=c.Store.subscribe("addTask",this.onAddTask),this.dialogMsgSubscribe=c.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:{...d(["userInfo","userIsAdmin","cacheUserBasic","cacheTasks","cacheDialogs","cacheProjects","projectTotal","wsOpenNum","columnTemplate","wsMsg","clientNewVersion","cacheTaskBrowse","dialogIns","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>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},{path:"approve",name:"\u5BA1\u6279\u4E2D\u5FC3"}):e.push({path:"personal",name:"\u4E2A\u4EBA\u8BBE\u7F6E",divided:!0},{path:"approve",name:"\u5BA1\u6279\u4E2D\u5FC3"},{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-calendar","manage-messenger","manage-file","manage-setting"].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":c.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"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){return{active:this.routeName===`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":c.Store.set("addMeeting",{type:"create",userids:[this.userId]});break;case"joinMeeting":c.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:h}=t;if(h==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 _=n=>{if(s==="group"){let p=this.cacheUserBasic.find(f=>f.userid==h);p?m(`${n} (${p.nickname})`):this.$store.dispatch("call",{url:"users/basic",data:{userid:[h]},skipAuthError:!0}).then(({data:f})=>{p=f.find(N=>N.userid==h),p&&m(`${n} (${p.nickname})`)}).catch(f=>{m(n)})}else m(n)},m=n=>{this.__notificationId===a&&(this.$isEEUiApp?this.$refs.mobileNotification.open({userid:h,title:n,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:n,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(n),this.notificationManage.userAgreed()))},$=this.cacheDialogs.find(n=>n.id==e);$?_($.name):this.$store.dispatch("getDialogOne",e).then(({data:n})=>_(n.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 Oe(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)})}}},R={};var He=r(We,ze,Fe,!1,Ve,null,null,null);function Ve(t){for(let a in R)this[a]=R[a]}var ra=function(){return He.exports}();export{ra as default}; diff --git a/public/js/build/messenger.47854ab6.js b/public/js/build/messenger.9ae12471.js similarity index 98% rename from public/js/build/messenger.47854ab6.js rename to public/js/build/messenger.9ae12471.js index e9cc55e68..869fd8b6f 100644 --- a/public/js/build/messenger.47854ab6.js +++ b/public/js/build/messenger.9ae12471.js @@ -1 +1 @@ -import{b as u,m as h,n as p}from"./app.2ab5f89e.js";import{D as g}from"./DialogWrapper.28dee207.js";import{l as f}from"./longpress.43ca7fd9.js";import"./index.edc265fa.js";import"./UserSelect.c1d7840d.js";import"./ImgUpload.cf2be17d.js";import"./details.ae1c56d6.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",{attrs:{placeholder:t.$L(t.loadDialogs?"\u66F4\u65B0\u4E2D...":"\u641C\u7D22\u6D88\u606F"),clearable:""},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),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")]):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,"tooltip-disabled":""}})]: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",{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"))+" ")]),e("DropdownItem",{nativeOn:{click:function(s){return t.handleReadClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.$A.getDialogUnread(t.operateItem,!0)>0?"\u6807\u8BB0\u5DF2\u8BFB":"\u6807\u8BB0\u672A\u8BFB"))+" ")]),e("DropdownItem",{attrs:{disabled:t.silenceDisabled(t.operateItem)},nativeOn:{click:function(s){return t.handleSilenceClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.operateItem.silence?"\u5141\u8BB8\u6D88\u606F\u901A\u77E5":"\u6D88\u606F\u514D\u6253\u6270"))+" ")])],1)],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 l={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:l.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){l.menuHistory=await $A.IDBArray("dialogMenuHistory"),e()},mounted(){const t=$A.runNum(this.$route.query.dialog_id);t>0&&this.openDialog(t),this.clickAgainSubscribe=u.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"]),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}){["dialog","contacts"].includes(t.dialogAction)&&(this.tabActive=t.dialogAction)},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(){this.$refs.navMenu.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},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("dialogMsgMark",{dialog_id:this.operateItem.id,type:$A.getDialogUnread(this.operateItem,!0)>0?"read":"unread"}).catch(({msg:t})=>{$A.modalError(t)})},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)})},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"}}},d={};var $=p(v,m,_,!1,y,null,null,null);function y(t){for(let a in d)this[a]=d[a]}var S=function(){return $.exports}();export{S as default}; +import{b as u,m as h,n as p}from"./app.6fb8fe77.js";import{D as g}from"./DialogWrapper.7e5c06a5.js";import{l as f}from"./longpress.43ca7fd9.js";import"./index.ab28c92e.js";import"./UserSelect.4fa9cbd2.js";import"./ImgUpload.056f7090.js";import"./details.eb8631f5.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",{attrs:{placeholder:t.$L(t.loadDialogs?"\u66F4\u65B0\u4E2D...":"\u641C\u7D22\u6D88\u606F"),clearable:""},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),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")]):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,"tooltip-disabled":""}})]: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",{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"))+" ")]),e("DropdownItem",{nativeOn:{click:function(s){return t.handleReadClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.$A.getDialogUnread(t.operateItem,!0)>0?"\u6807\u8BB0\u5DF2\u8BFB":"\u6807\u8BB0\u672A\u8BFB"))+" ")]),e("DropdownItem",{attrs:{disabled:t.silenceDisabled(t.operateItem)},nativeOn:{click:function(s){return t.handleSilenceClick.apply(null,arguments)}}},[t._v(" "+t._s(t.$L(t.operateItem.silence?"\u5141\u8BB8\u6D88\u606F\u901A\u77E5":"\u6D88\u606F\u514D\u6253\u6270"))+" ")])],1)],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 l={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:l.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){l.menuHistory=await $A.IDBArray("dialogMenuHistory"),e()},mounted(){const t=$A.runNum(this.$route.query.dialog_id);t>0&&this.openDialog(t),this.clickAgainSubscribe=u.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"]),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}){["dialog","contacts"].includes(t.dialogAction)&&(this.tabActive=t.dialogAction)},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(){this.$refs.navMenu.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},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("dialogMsgMark",{dialog_id:this.operateItem.id,type:$A.getDialogUnread(this.operateItem,!0)>0?"read":"unread"}).catch(({msg:t})=>{$A.modalError(t)})},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)})},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"}}},d={};var $=p(v,m,_,!1,y,null,null,null);function y(t){for(let a in d)this[a]=d[a]}var S=function(){return $.exports}();export{S as default}; diff --git a/public/js/build/password.eb90241e.js b/public/js/build/password.9f289b79.js similarity index 97% rename from public/js/build/password.eb90241e.js rename to public/js/build/password.9f289b79.js index 957232418..46b7afee2 100644 --- a/public/js/build/password.eb90241e.js +++ b/public/js/build/password.9f289b79.js @@ -1 +1 @@ -import{m as o,n as i}from"./app.2ab5f89e.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.6fb8fe77.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.af1cbdf2.js b/public/js/build/personal.4dbe89b2.js similarity index 96% rename from public/js/build/personal.af1cbdf2.js rename to public/js/build/personal.4dbe89b2.js index 64b251839..b3ad24d7b 100644 --- a/public/js/build/personal.af1cbdf2.js +++ b/public/js/build/personal.4dbe89b2.js @@ -1 +1 @@ -import{I as i}from"./ImgUpload.cf2be17d.js";import{m as o,n}from"./app.2ab5f89e.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.056f7090.js";import{m as o,n}from"./app.6fb8fe77.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.35a96748.js b/public/js/build/preview.35a96748.js deleted file mode 100644 index f31323a49..000000000 --- a/public/js/build/preview.35a96748.js +++ /dev/null @@ -1 +0,0 @@ -import"./app.2ab5f89e.js";import{w as f}from"./app.2ab5f89e.js";export{f as default}; diff --git a/public/js/build/preview.a2619f71.js b/public/js/build/preview.a2619f71.js new file mode 100644 index 000000000..6357ad28c --- /dev/null +++ b/public/js/build/preview.a2619f71.js @@ -0,0 +1 @@ +import"./app.6fb8fe77.js";import{w as f}from"./app.6fb8fe77.js";export{f as default}; diff --git a/public/js/build/pro.ff666016.js b/public/js/build/pro.ecb61aa7.js similarity index 85% rename from public/js/build/pro.ff666016.js rename to public/js/build/pro.ecb61aa7.js index 79733c8e6..981bd9508 100644 --- a/public/js/build/pro.ff666016.js +++ b/public/js/build/pro.ecb61aa7.js @@ -1 +1 @@ -import{n as i,l as t}from"./app.2ab5f89e.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.6fb8fe77.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.6eb71c23.js b/public/js/build/project.c7bb6e0e.js similarity index 99% rename from public/js/build/project.6eb71c23.js rename to public/js/build/project.c7bb6e0e.js index 0653ea0cb..0b7f19732 100644 --- a/public/js/build/project.6eb71c23.js +++ b/public/js/build/project.c7bb6e0e.js @@ -1 +1 @@ -import{m as p,n as u,b as g,D as P,a as w,o as N}from"./app.2ab5f89e.js";import{T as E,P as O}from"./ProjectLog.c251a416.js";import{T as M}from"./TaskMenu.6d52fdca.js";import{D as z}from"./index.edc265fa.js";import{U as F}from"./UserSelect.c1d7840d.js";import{D as R}from"./DialogWrapper.28dee207.js";import{l as B}from"./longpress.43ca7fd9.js";import"./ImgUpload.cf2be17d.js";import"./details.ae1c56d6.js";var U=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,i){return e("li",{key:i},[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(o){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,i){return e("li",{key:i},[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(o){return t.choosePriority(a)}}})]):t._e()],1)}),0),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)},V=[];const H={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 K=u(H,U,V,!1,Y,null,null,null);function Y(t){for(let s in k)this[s]=k[s]}var W=function(){return K.exports}(),X=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-rows"},[t._l(t.list,function(a,i){return e("div",{key:i},[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(o){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(o){return t.openTask(a)}}},[a.flow_item_name?e("span",{class:a.flow_item_status,on:{click:function(o){return o.stopPropagation(),t.openMenu(o,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(o){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(o){return o.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(o){return t.dropTask(a,o)}}},[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(o){return e("EDropdownItem",{key:o.id,attrs:{command:"column::"+o.id}},[t._v(" "+t._s(o.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(o){return t.dropTask(a,o)}}},[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(o,r){return e("EDropdownItem",{key:r,attrs:{command:"priority::"+r}},[e("i",{staticClass:"taskfont",style:{color:o.color},domProps:{innerHTML:t._s(o.p_name==o.name?"":"")}}),t._v(" "+t._s(o.name)+" ")])}),1)],1)],1),e("Col",{staticClass:"row-user",attrs:{span:"3"}},[e("ul",{on:{click:function(o){return t.openTask(a)}}},[t._l(t.ownerUser(a.task_user),function(o,r){return r<3?e("li",{key:r},[e("UserAvatar",{attrs:{userid:o.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(o){return o.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(o){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)},J=[];const G={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=u(G,X,J,!1,Q,null,null,null);function Q(t){for(let s in y)this[s]=y[s]}var Z=function(){return q.exports}(),tt=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)])},et=[];const st={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: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:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(s.row)}}},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,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 at=u(st,tt,et,!1,it,null,null,null);function it(t){for(let s in C)this[s]=C[s]}var ot=function(){return at.exports}(),rt=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(i){return e("div",{class:i.status},[t._v(t._s(i.name))])}),0),e("div",{staticClass:"workflow-save",on:{click:function(i){i.stopPropagation()}}},[t.contrast(a.project_flow_item,a.project_flow_bak)?[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(i){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(i){return t.onReduction(a,i)}}},[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(i){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(i){return e("div",{staticClass:"taskflow-config-table-block-item"},[e("span",{staticClass:"transform-status-name"},[t._v(t._s(i.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(i){}}},[t._l(a.project_flow_item,function(i){return e("div",{staticClass:"taskflow-config-table-status-column column-border",class:i.status},[e("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[e("div",{staticClass:"status-label-with-menu",class:i.status},[e("div",{staticClass:"name"},[t._v(t._s(t.$L(i.name)))]),e("EDropdown",{staticClass:"more",class:{opacity:i.userids.length>0||i.columnid>0},attrs:{trigger:"click"},on:{command:function(o){return t.onMore(o,i)}}},[e("div",{staticClass:"more-icon"},[e("Badge",{attrs:{dot:i.userids.length>0||i.columnid>0}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1),e("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[i.userids.length>0?e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"users"},t._l(i.userids,function(o,r){return e("UserAvatar",{key:r,attrs:{userid:o,size:28,borderWitdh:1,showName:i.userids.length===1,tooltipDisabled:""}})}),1)]):t._e(),e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-settings"}}),e("Badge",{attrs:{dot:i.userids.length>0||i.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:i.status,callback:function(o){t.$set(i,"status",o)},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(o){return t.onTurns(i)}},model:{value:i.turns,callback:function(o){t.$set(i,"turns",o)},expression:"item.turns"}},t._l(a.project_flow_item,function(o){return e("Checkbox",{key:o.id,attrs:{label:o.id,disabled:o.id==i.id}},[e("span")])}),1)],1)])])}),e("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(i){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,i){return e("Option",{key:i,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)},nt=[];const lt={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,i=e.scrollLeft;this.$nextTick(()=>{this.$refs[`overlay_${t.id}`].some(o=>{o!=s&&o.scrollTo(i,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:i})=>{e(i);let o=this.list.findIndex(({id:r})=>r==t.id);o>-1&&this.list.splice(o,1)}).catch(({msg:i})=>{a(i)}).finally(i=>{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:i})=>i);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(i=>{i.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 i=this.list.findIndex(({id:o})=>o==t.id);i>-1?this.list.splice(i,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 ct=u(lt,rt,nt,!1,dt,null,null,null);function dt(t){for(let s in b)this[s]=b[s]}var ut=function(){return ct.exports}(),ht=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)])},pt=[];const mt={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 ft=u(mt,ht,pt,!1,_t,null,null,null);function _t(t){for(let s in j)this[s]=j[s]}var vt=function(){return ft.exports}(),$t=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,i){return e("li",{key:i},[a.overdue?e("div",{staticClass:"item-overdue",on:{click:function(o){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(o){return t.clickItem(a)}}},[t._v(t._s(a.label))]),e("Icon",{staticClass:"item-icon",attrs:{type:"ios-locate-outline"},on:{click:function(o){return t.scrollPosition(i)}}})],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,i){return e("li",{key:i,style:t.monthStyle(i)},[e("div",{staticClass:"month-format"},[t._v(t._s(t.monthFormat(i)))])])}),0),e("ul",{staticClass:"gantt-date",on:{mousedown:t.dateMouseDown}},t._l(t.dateNum,function(a,i){return e("li",{key:i,style:t.dateStyle(i)},[e("div",{staticClass:"date-format"},[e("div",{staticClass:"format-day"},[t._v(t._s(t.dateFormat(i,"day")))]),t.dateWidth>46?e("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(i,"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,i){return e("li",{key:i},[e("div",{staticClass:"timeline-item",style:t.itemStyle(a),on:{mousedown:function(o){return t.itemMouseDown(o,a)}}},[e("div",{staticClass:"timeline-title",attrs:{title:a.label}},[t._v(t._s(a.label))]),e("div",{staticClass:"timeline-resizer"})])])}),0)])])])},gt=[];const wt={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,i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),r=new Date(o.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,i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),r=new Date(o.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 i=t==0?0:t/s,o=Math.floor(i)+e;i==Math.floor(i)&&o--;let r=t==0?e-1:o,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 i=t==0?0:t/s,o=Math.floor(i)+e;i==Math.floor(i)&&o--;let r=t==0?e-1:o,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:i,end:o}=a.time,{style:r,moveX:n,moveW:l}=a;let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0).getTime(),f=(i-d)/1e3/60/60/24,v=(o-d)/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:i}=this.mouseItem.time;let o=s*e;if(i+o-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,i=864e5/this.dateWidth;if(typeof this.mouseItem.moveX=="number"&&this.mouseItem.moveX!=0){let o=this.mouseItem.moveX*i;this.$set(this.mouseItem.time,"start",s+o),this.$set(this.mouseItem.time,"end",e+o),this.$set(this.mouseItem,"moveX",0),a=!0}if(typeof this.mouseItem.moveW=="number"&&this.mouseItem.moveW!=0){let o=this.mouseItem.moveW*i;this.$set(this.mouseItem.time,"end",e+o),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,i=(this.lists[t].time.start-e)/a-this.dateWidth-this.mouseWidth;this.mouseWidth+=i,this.mouseScaleWidth+=i*(100/this.dateWidth)},clickItem(t){this.$emit("on-click",t)}}},D={};var kt=u(wt,$t,gt,!1,yt,null,null,null);function yt(t){for(let s in D)this[s]=D[s]}var Ct=function(){return kt.exports}(),bt=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,i){return e("DropdownItem",{key:i,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)},jt=[];const Dt={name:"ProjectGantt",components:{GanttView:Ct},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),i=a.start,o=a.end;if(s.complete_at&&!this.completedTask||this.flowTask(s))return!1;let r="#058ce4";this.taskPriority.some(d=>{if(d.priority===s.p_level)return r=d.color,!0});let n={start:i,end:o},l=$A.cloneJSON(n),c=this.editData.find(({id:d})=>d==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:i})=>i==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)),i=$A.formatDate("Y-m-d H:i",Math.round(s.newTime.end/1e3)),o={task_id:s.id,times:[a,i]};this.$store.dispatch("taskUpdate",o).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 Tt=u(Dt,bt,jt,!1,Lt,null,null,null);function Lt(t){for(let s in T)this[s]=T[s]}var It=function(){return Tt.exports}(),xt=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)}})},St=[];const At={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 Pt=u(At,xt,St,!1,Et,null,null,null);function Et(t){for(let s in L)this[s]=L[s]}var Mt=function(){return Pt.exports}(),Ft=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("UserAvatar",{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("UserAvatar",{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(i){return t.dropColumn(a,i)}}},[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(i,o){return e("EDropdownItem",{key:o,attrs:{divided:o==0,command:i}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",style:{color:i.color},domProps:{innerHTML:t._s(i.color==a.color?"":"")}}),t._v(t._s(t.$L(i.name))+" ")])])})],2)],1),e("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(i){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(i){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(i){return e("div",{class:["task-item task-draggable",i.complete_at?"complete":"",t.taskIsHidden(i)?"hidden":""],style:i.color?{backgroundColor:i.color}:{},on:{click:function(o){return t.openTask(i)}}},[e("div",{class:["task-head",i.desc?"has-desc":""]},[e("div",{staticClass:"task-title"},[i.flow_item_name?e("span",{class:i.flow_item_status,on:{click:function(o){return o.stopPropagation(),t.openMenu(o,i)}}},[t._v(t._s(i.flow_item_name))]):t._e(),e("pre",[t._v(t._s(i.name))])]),e("div",{staticClass:"task-menu",on:{click:function(o){o.stopPropagation()}}},[e("TaskMenu",{ref:`taskMenu_${i.id}`,refInFor:!0,attrs:{task:i,icon:"ios-more"}})],1)]),i.desc?e("div",{staticClass:"task-desc"},[e("pre",{domProps:{innerHTML:t._s(i.desc)}})]):t._e(),i.task_tag.length>0?e("div",{staticClass:"task-tags"},t._l(i.task_tag,function(o,r){return e("Tag",{key:r,attrs:{color:o.color}},[t._v(t._s(o.name))])}),1):t._e(),e("div",{staticClass:"task-users"},[e("ul",[t._l(t.ownerUser(i.task_user),function(o,r){return e("li",{key:r},[e("UserAvatar",{attrs:{userid:o.userid,size:"32",borderWitdh:2,borderColor:i.color}})],1)}),t.ownerUser(i.task_user).length===0?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(o){return o.stopPropagation(),t.openTask(i,!0)}}},[t._v(t._s(t.$L("\u9886\u53D6\u4EFB\u52A1")))])],1):t._e()],2),i.file_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(i.file_num)),e("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),i.msg_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(i.msg_num)),e("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),e("div",{staticClass:"task-progress"},[i.sub_num>0?e("div",{staticClass:"task-sub-num"},[t._v(t._s(i.sub_complete)+"/"+t._s(i.sub_num))]):t._e(),e("Progress",{attrs:{percent:i.percent,"stroke-width":6}}),i.end_at?e("ETooltip",{class:["task-time",i.today?"today":"",i.overdue?"overdue":""],attrs:{disabled:t.$isEEUiApp||t.windowTouch,"open-delay":600,content:i.end_at}},[i.complete_at?t._e():e("div",[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(i.end_at)))])]):t._e()],1),i.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:i.p_color}}):t._e()])}),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:"",tooltipDisabled:""}})],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)},Wt=[];const Nt={name:"ProjectPanel",components:{UserSelect:F,MarkdownPreviewNostyle:Mt,TaskMenu:M,ProjectWorkflow:ut,DrawerOverlay:z,ProjectLog:O,TaskArchived:ot,TaskRow:Z,Draggable:P,TaskAddSimple:W,TaskPriority:E,TaskDeleted:vt,ProjectGantt:It},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:i,owner:o})=>i===s.userid&&o)):s.value>0&&(e=e.filter(({flow_item_id:a})=>a===s.value)),t&&(e=e.filter(({id:a,name:i,desc:o})=>a==t||$A.strExists(`${i} ${o}`,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:o})=>o!=t.owner_userid);if(a.length<=e)return a;let i=a.slice(0,e-1);return i.push({userid:-1}),i.push(a[a.length-1]),i},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:i})=>i==t).sort((i,o)=>i.sort!=o.sort?i.sort-o.sort:i.id-o.id);return a.forEach(i=>{i.tasks=this.transforTasks(e.filter(o=>o.column_id==i.id)).sort((o,r)=>o.complete_at||r.complete_at?$A.Date(o.complete_at)-$A.Date(r.complete_at):o.sort!=r.sort?o.sort-r.sort:o.id-r.id)}),a},myList(){const{allTask:t,taskCompleteTemps:s,sortField:e,sortType:a}=this;let i=t.filter(o=>this.myFilter(o));if(s.length>0){let o=t.filter(r=>s.includes(r.id)&&this.myFilter(r,!1));o.length>0&&(i=$A.cloneJSON(i),i.push(...o))}return i.sort((o,r)=>{if(a=="asc"&&([o,r]=[r,o]),e=="level")return o.p_level-r.p_level;if(e=="end_at")return o.end_at==r.end_at?o.p_level-r.p_level:$A.Date(o.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 i=t.filter(o=>this.helpFilter(o));if(s.length>0){let o=t.filter(r=>s.includes(r.id)&&this.helpFilter(r,!1));o.length>0&&(i=$A.cloneJSON(i),i.push(...o))}return i.sort((o,r)=>{if(a=="asc"&&([o,r]=[r,o]),e=="level")return o.p_level-r.p_level;if(e=="end_at")return o.end_at==r.end_at?o.p_level-r.p_level:$A.Date(o.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(o=>o.parent_id>0||this.flowTask(o)||s&&o.id!=s&&!$A.strExists(o.name,s)&&!$A.strExists(o.desc,s)?!1:!o.complete_at).sort((o,r)=>{if(a=="asc"&&([o,r]=[r,o]),e=="level")return o.p_level-r.p_level;if(e=="end_at")return o.end_at==r.end_at?o.p_level-r.p_level:$A.Date(o.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,i)=>{let o=$A.Date(a.complete_at);return $A.Date(i.complete_at)-o})},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){const a=s.find(i=>i.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:[]}],i=t.map(n=>({value:n.id,label:n.name,status:n.status,children:n.project_flow_item.map(l=>{const c=s.filter(({flow_item_id:d})=>d==l.id).length;return{value:l.id,label:`${l.name} (${c})`,status:l.status,class:l.status}})}));i.length===1?a.push(...i[0].children):i.length>0&&a.push(...i);const{project_user:o}=this.projectData,r=o.map((n,l)=>{const c=e.find(({userid:f})=>f===n.userid)||{},d=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} (${d})`,class:`user-${l}`,userid:c.userid||0,length:d}}).filter(({userid:n,length:l})=>n>0&&l>0);return r.length>0&&a.push(...r),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}).then(({msg:i})=>{$A.messageSuccess(i),this.sortDisabled=!1;let o,r=[];a.only_column?(o=-1,a.sort.forEach(n=>{o++,r.push({id:n.id,sort:o})}),this.$store.dispatch("saveColumn",r)):(a.sort.forEach(n=>{o=-1,r.push(...n.task.map(l=>(o++,r.push(...this.allTask.filter(c=>c.parent_id==l).map(({id:c})=>({id:c,sort:o,column_id:n.id}))),{id:l,sort:o,column_id:n.id})))}),this.$store.dispatch("saveTask",r))}).catch(({msg:i})=>{$A.modalError(i),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(i=>this.$set(t,i,s[i])),this.$store.dispatch("call",{url:"project/column/update",data:Object.assign(s,{column_id:t.id})}).then(({data:i})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("saveColumn",i),e()}).catch(({msg:i})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("getColumns",this.projectId).catch(()=>{}),a(i)})})},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:i}=t,{searchText:o}=this;return!!(!this.projectData.cacheParameter.completedTask&&i||this.flowTask(t)||o&&s!=o&&!$A.strExists(`${e} ${a}`,o))},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)?!0:this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value},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 Ot=u(Nt,Ft,Wt,!1,zt,null,null,null);function zt(t){for(let s in I)this[s]=I[s]}var Rt=function(){return Ot.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()},Ut=[];const Vt={name:"ProjectDialog",components:{DialogWrapper:R},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 Ht=u(Vt,Bt,Ut,!1,Kt,null,null,null);function Kt(t){for(let s in x)this[s]=x[s]}var Yt=function(){return Ht.exports}(),Xt=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,i){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:i,class:{operate:a.id==t.operateItem.id&&t.operateVisible},attrs:{"data-id":a.id},on:{click:function(o){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(o){return o.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)},Jt=[];const Gt={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,i)=>a.top_at||i.top_at?$A.Date(i.top_at)-$A.Date(a.top_at):i.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(i=>i.id==e);!a||(this.operateVisible=!1,this.operateItem=$A.isJson(a)?a:{},this.$nextTick(()=>{const i=s.getBoundingClientRect(),o=this.$el.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)}).catch(({msg:t})=>{$A.modalError(t)})}}},S={};var qt=u(Gt,Xt,Jt,!1,Qt,null,null,null);function Qt(t){for(let s in S)this[s]=S[s]}var Zt=function(){return qt.exports}(),te=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)},ee=[];const se={components:{ProjectList:Zt,ProjectDialog:Yt,ProjectPanel:Rt},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 ae=u(se,te,ee,!1,ie,null,null,null);function ie(t){for(let s in A)this[s]=A[s]}var me=function(){return ae.exports}();export{me as default}; +import{m as p,n as u,b as g,D as P,a as w,o as N}from"./app.6fb8fe77.js";import{T as E,P as O}from"./ProjectLog.9bfebf4b.js";import{T as M}from"./TaskMenu.61d4b7dc.js";import{D as z}from"./index.ab28c92e.js";import{U as F}from"./UserSelect.4fa9cbd2.js";import{D as R}from"./DialogWrapper.7e5c06a5.js";import{l as B}from"./longpress.43ca7fd9.js";import"./ImgUpload.056f7090.js";import"./details.eb8631f5.js";var U=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,i){return e("li",{key:i},[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(o){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,i){return e("li",{key:i},[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(o){return t.choosePriority(a)}}})]):t._e()],1)}),0),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)},V=[];const H={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 K=u(H,U,V,!1,Y,null,null,null);function Y(t){for(let s in k)this[s]=k[s]}var W=function(){return K.exports}(),X=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-rows"},[t._l(t.list,function(a,i){return e("div",{key:i},[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(o){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(o){return t.openTask(a)}}},[a.flow_item_name?e("span",{class:a.flow_item_status,on:{click:function(o){return o.stopPropagation(),t.openMenu(o,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(o){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(o){return o.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(o){return t.dropTask(a,o)}}},[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(o){return e("EDropdownItem",{key:o.id,attrs:{command:"column::"+o.id}},[t._v(" "+t._s(o.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(o){return t.dropTask(a,o)}}},[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(o,r){return e("EDropdownItem",{key:r,attrs:{command:"priority::"+r}},[e("i",{staticClass:"taskfont",style:{color:o.color},domProps:{innerHTML:t._s(o.p_name==o.name?"":"")}}),t._v(" "+t._s(o.name)+" ")])}),1)],1)],1),e("Col",{staticClass:"row-user",attrs:{span:"3"}},[e("ul",{on:{click:function(o){return t.openTask(a)}}},[t._l(t.ownerUser(a.task_user),function(o,r){return r<3?e("li",{key:r},[e("UserAvatar",{attrs:{userid:o.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(o){return o.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(o){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)},J=[];const G={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=u(G,X,J,!1,Q,null,null,null);function Q(t){for(let s in y)this[s]=y[s]}var Z=function(){return q.exports}(),tt=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)])},et=[];const st={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: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:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":()=>{this.recovery(s.row)}}},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,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 at=u(st,tt,et,!1,it,null,null,null);function it(t){for(let s in C)this[s]=C[s]}var ot=function(){return at.exports}(),rt=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(i){return e("div",{class:i.status},[t._v(t._s(i.name))])}),0),e("div",{staticClass:"workflow-save",on:{click:function(i){i.stopPropagation()}}},[t.contrast(a.project_flow_item,a.project_flow_bak)?[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(i){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(i){return t.onReduction(a,i)}}},[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(i){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(i){return e("div",{staticClass:"taskflow-config-table-block-item"},[e("span",{staticClass:"transform-status-name"},[t._v(t._s(i.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(i){}}},[t._l(a.project_flow_item,function(i){return e("div",{staticClass:"taskflow-config-table-status-column column-border",class:i.status},[e("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[e("div",{staticClass:"status-label-with-menu",class:i.status},[e("div",{staticClass:"name"},[t._v(t._s(t.$L(i.name)))]),e("EDropdown",{staticClass:"more",class:{opacity:i.userids.length>0||i.columnid>0},attrs:{trigger:"click"},on:{command:function(o){return t.onMore(o,i)}}},[e("div",{staticClass:"more-icon"},[e("Badge",{attrs:{dot:i.userids.length>0||i.columnid>0}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1),e("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[i.userids.length>0?e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"users"},t._l(i.userids,function(o,r){return e("UserAvatar",{key:r,attrs:{userid:o,size:28,borderWitdh:1,showName:i.userids.length===1,tooltipDisabled:""}})}),1)]):t._e(),e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-settings"}}),e("Badge",{attrs:{dot:i.userids.length>0||i.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:i.status,callback:function(o){t.$set(i,"status",o)},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(o){return t.onTurns(i)}},model:{value:i.turns,callback:function(o){t.$set(i,"turns",o)},expression:"item.turns"}},t._l(a.project_flow_item,function(o){return e("Checkbox",{key:o.id,attrs:{label:o.id,disabled:o.id==i.id}},[e("span")])}),1)],1)])])}),e("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(i){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,i){return e("Option",{key:i,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)},nt=[];const lt={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,i=e.scrollLeft;this.$nextTick(()=>{this.$refs[`overlay_${t.id}`].some(o=>{o!=s&&o.scrollTo(i,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:i})=>{e(i);let o=this.list.findIndex(({id:r})=>r==t.id);o>-1&&this.list.splice(o,1)}).catch(({msg:i})=>{a(i)}).finally(i=>{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:i})=>i);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(i=>{i.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 i=this.list.findIndex(({id:o})=>o==t.id);i>-1?this.list.splice(i,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 ct=u(lt,rt,nt,!1,dt,null,null,null);function dt(t){for(let s in b)this[s]=b[s]}var ut=function(){return ct.exports}(),ht=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)])},pt=[];const mt={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 ft=u(mt,ht,pt,!1,_t,null,null,null);function _t(t){for(let s in j)this[s]=j[s]}var vt=function(){return ft.exports}(),$t=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,i){return e("li",{key:i},[a.overdue?e("div",{staticClass:"item-overdue",on:{click:function(o){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(o){return t.clickItem(a)}}},[t._v(t._s(a.label))]),e("Icon",{staticClass:"item-icon",attrs:{type:"ios-locate-outline"},on:{click:function(o){return t.scrollPosition(i)}}})],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,i){return e("li",{key:i,style:t.monthStyle(i)},[e("div",{staticClass:"month-format"},[t._v(t._s(t.monthFormat(i)))])])}),0),e("ul",{staticClass:"gantt-date",on:{mousedown:t.dateMouseDown}},t._l(t.dateNum,function(a,i){return e("li",{key:i,style:t.dateStyle(i)},[e("div",{staticClass:"date-format"},[e("div",{staticClass:"format-day"},[t._v(t._s(t.dateFormat(i,"day")))]),t.dateWidth>46?e("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(i,"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,i){return e("li",{key:i},[e("div",{staticClass:"timeline-item",style:t.itemStyle(a),on:{mousedown:function(o){return t.itemMouseDown(o,a)}}},[e("div",{staticClass:"timeline-title",attrs:{title:a.label}},[t._v(t._s(a.label))]),e("div",{staticClass:"timeline-resizer"})])])}),0)])])])},gt=[];const wt={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,i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),r=new Date(o.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,i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),r=new Date(o.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 i=t==0?0:t/s,o=Math.floor(i)+e;i==Math.floor(i)&&o--;let r=t==0?e-1:o,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 i=t==0?0:t/s,o=Math.floor(i)+e;i==Math.floor(i)&&o--;let r=t==0?e-1:o,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:i,end:o}=a.time,{style:r,moveX:n,moveW:l}=a;let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0).getTime(),f=(i-d)/1e3/60/60/24,v=(o-d)/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:i}=this.mouseItem.time;let o=s*e;if(i+o-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,i=864e5/this.dateWidth;if(typeof this.mouseItem.moveX=="number"&&this.mouseItem.moveX!=0){let o=this.mouseItem.moveX*i;this.$set(this.mouseItem.time,"start",s+o),this.$set(this.mouseItem.time,"end",e+o),this.$set(this.mouseItem,"moveX",0),a=!0}if(typeof this.mouseItem.moveW=="number"&&this.mouseItem.moveW!=0){let o=this.mouseItem.moveW*i;this.$set(this.mouseItem.time,"end",e+o),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,i=(this.lists[t].time.start-e)/a-this.dateWidth-this.mouseWidth;this.mouseWidth+=i,this.mouseScaleWidth+=i*(100/this.dateWidth)},clickItem(t){this.$emit("on-click",t)}}},D={};var kt=u(wt,$t,gt,!1,yt,null,null,null);function yt(t){for(let s in D)this[s]=D[s]}var Ct=function(){return kt.exports}(),bt=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,i){return e("DropdownItem",{key:i,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)},jt=[];const Dt={name:"ProjectGantt",components:{GanttView:Ct},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),i=a.start,o=a.end;if(s.complete_at&&!this.completedTask||this.flowTask(s))return!1;let r="#058ce4";this.taskPriority.some(d=>{if(d.priority===s.p_level)return r=d.color,!0});let n={start:i,end:o},l=$A.cloneJSON(n),c=this.editData.find(({id:d})=>d==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:i})=>i==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)),i=$A.formatDate("Y-m-d H:i",Math.round(s.newTime.end/1e3)),o={task_id:s.id,times:[a,i]};this.$store.dispatch("taskUpdate",o).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 Tt=u(Dt,bt,jt,!1,Lt,null,null,null);function Lt(t){for(let s in T)this[s]=T[s]}var It=function(){return Tt.exports}(),xt=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)}})},St=[];const At={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 Pt=u(At,xt,St,!1,Et,null,null,null);function Et(t){for(let s in L)this[s]=L[s]}var Mt=function(){return Pt.exports}(),Ft=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("UserAvatar",{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("UserAvatar",{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(i){return t.dropColumn(a,i)}}},[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(i,o){return e("EDropdownItem",{key:o,attrs:{divided:o==0,command:i}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",style:{color:i.color},domProps:{innerHTML:t._s(i.color==a.color?"":"")}}),t._v(t._s(t.$L(i.name))+" ")])])})],2)],1),e("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(i){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(i){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(i){return e("div",{class:["task-item task-draggable",i.complete_at?"complete":"",t.taskIsHidden(i)?"hidden":""],style:i.color?{backgroundColor:i.color}:{},on:{click:function(o){return t.openTask(i)}}},[e("div",{class:["task-head",i.desc?"has-desc":""]},[e("div",{staticClass:"task-title"},[i.flow_item_name?e("span",{class:i.flow_item_status,on:{click:function(o){return o.stopPropagation(),t.openMenu(o,i)}}},[t._v(t._s(i.flow_item_name))]):t._e(),e("pre",[t._v(t._s(i.name))])]),e("div",{staticClass:"task-menu",on:{click:function(o){o.stopPropagation()}}},[e("TaskMenu",{ref:`taskMenu_${i.id}`,refInFor:!0,attrs:{task:i,icon:"ios-more"}})],1)]),i.desc?e("div",{staticClass:"task-desc"},[e("pre",{domProps:{innerHTML:t._s(i.desc)}})]):t._e(),i.task_tag.length>0?e("div",{staticClass:"task-tags"},t._l(i.task_tag,function(o,r){return e("Tag",{key:r,attrs:{color:o.color}},[t._v(t._s(o.name))])}),1):t._e(),e("div",{staticClass:"task-users"},[e("ul",[t._l(t.ownerUser(i.task_user),function(o,r){return e("li",{key:r},[e("UserAvatar",{attrs:{userid:o.userid,size:"32",borderWitdh:2,borderColor:i.color}})],1)}),t.ownerUser(i.task_user).length===0?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(o){return o.stopPropagation(),t.openTask(i,!0)}}},[t._v(t._s(t.$L("\u9886\u53D6\u4EFB\u52A1")))])],1):t._e()],2),i.file_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(i.file_num)),e("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),i.msg_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(i.msg_num)),e("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),e("div",{staticClass:"task-progress"},[i.sub_num>0?e("div",{staticClass:"task-sub-num"},[t._v(t._s(i.sub_complete)+"/"+t._s(i.sub_num))]):t._e(),e("Progress",{attrs:{percent:i.percent,"stroke-width":6}}),i.end_at?e("ETooltip",{class:["task-time",i.today?"today":"",i.overdue?"overdue":""],attrs:{disabled:t.$isEEUiApp||t.windowTouch,"open-delay":600,content:i.end_at}},[i.complete_at?t._e():e("div",[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(i.end_at)))])]):t._e()],1),i.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:i.p_color}}):t._e()])}),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:"",tooltipDisabled:""}})],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)},Wt=[];const Nt={name:"ProjectPanel",components:{UserSelect:F,MarkdownPreviewNostyle:Mt,TaskMenu:M,ProjectWorkflow:ut,DrawerOverlay:z,ProjectLog:O,TaskArchived:ot,TaskRow:Z,Draggable:P,TaskAddSimple:W,TaskPriority:E,TaskDeleted:vt,ProjectGantt:It},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:i,owner:o})=>i===s.userid&&o)):s.value>0&&(e=e.filter(({flow_item_id:a})=>a===s.value)),t&&(e=e.filter(({id:a,name:i,desc:o})=>a==t||$A.strExists(`${i} ${o}`,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:o})=>o!=t.owner_userid);if(a.length<=e)return a;let i=a.slice(0,e-1);return i.push({userid:-1}),i.push(a[a.length-1]),i},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:i})=>i==t).sort((i,o)=>i.sort!=o.sort?i.sort-o.sort:i.id-o.id);return a.forEach(i=>{i.tasks=this.transforTasks(e.filter(o=>o.column_id==i.id)).sort((o,r)=>o.complete_at||r.complete_at?$A.Date(o.complete_at)-$A.Date(r.complete_at):o.sort!=r.sort?o.sort-r.sort:o.id-r.id)}),a},myList(){const{allTask:t,taskCompleteTemps:s,sortField:e,sortType:a}=this;let i=t.filter(o=>this.myFilter(o));if(s.length>0){let o=t.filter(r=>s.includes(r.id)&&this.myFilter(r,!1));o.length>0&&(i=$A.cloneJSON(i),i.push(...o))}return i.sort((o,r)=>{if(a=="asc"&&([o,r]=[r,o]),e=="level")return o.p_level-r.p_level;if(e=="end_at")return o.end_at==r.end_at?o.p_level-r.p_level:$A.Date(o.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 i=t.filter(o=>this.helpFilter(o));if(s.length>0){let o=t.filter(r=>s.includes(r.id)&&this.helpFilter(r,!1));o.length>0&&(i=$A.cloneJSON(i),i.push(...o))}return i.sort((o,r)=>{if(a=="asc"&&([o,r]=[r,o]),e=="level")return o.p_level-r.p_level;if(e=="end_at")return o.end_at==r.end_at?o.p_level-r.p_level:$A.Date(o.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(o=>o.parent_id>0||this.flowTask(o)||s&&o.id!=s&&!$A.strExists(o.name,s)&&!$A.strExists(o.desc,s)?!1:!o.complete_at).sort((o,r)=>{if(a=="asc"&&([o,r]=[r,o]),e=="level")return o.p_level-r.p_level;if(e=="end_at")return o.end_at==r.end_at?o.p_level-r.p_level:$A.Date(o.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,i)=>{let o=$A.Date(a.complete_at);return $A.Date(i.complete_at)-o})},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){const a=s.find(i=>i.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:[]}],i=t.map(n=>({value:n.id,label:n.name,status:n.status,children:n.project_flow_item.map(l=>{const c=s.filter(({flow_item_id:d})=>d==l.id).length;return{value:l.id,label:`${l.name} (${c})`,status:l.status,class:l.status}})}));i.length===1?a.push(...i[0].children):i.length>0&&a.push(...i);const{project_user:o}=this.projectData,r=o.map((n,l)=>{const c=e.find(({userid:f})=>f===n.userid)||{},d=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} (${d})`,class:`user-${l}`,userid:c.userid||0,length:d}}).filter(({userid:n,length:l})=>n>0&&l>0);return r.length>0&&a.push(...r),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}).then(({msg:i})=>{$A.messageSuccess(i),this.sortDisabled=!1;let o,r=[];a.only_column?(o=-1,a.sort.forEach(n=>{o++,r.push({id:n.id,sort:o})}),this.$store.dispatch("saveColumn",r)):(a.sort.forEach(n=>{o=-1,r.push(...n.task.map(l=>(o++,r.push(...this.allTask.filter(c=>c.parent_id==l).map(({id:c})=>({id:c,sort:o,column_id:n.id}))),{id:l,sort:o,column_id:n.id})))}),this.$store.dispatch("saveTask",r))}).catch(({msg:i})=>{$A.modalError(i),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(i=>this.$set(t,i,s[i])),this.$store.dispatch("call",{url:"project/column/update",data:Object.assign(s,{column_id:t.id})}).then(({data:i})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("saveColumn",i),e()}).catch(({msg:i})=>{this.$set(this.columnLoad,t.id,!1),this.$store.dispatch("getColumns",this.projectId).catch(()=>{}),a(i)})})},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:i}=t,{searchText:o}=this;return!!(!this.projectData.cacheParameter.completedTask&&i||this.flowTask(t)||o&&s!=o&&!$A.strExists(`${e} ${a}`,o))},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)?!0:this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value},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 Ot=u(Nt,Ft,Wt,!1,zt,null,null,null);function zt(t){for(let s in I)this[s]=I[s]}var Rt=function(){return Ot.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()},Ut=[];const Vt={name:"ProjectDialog",components:{DialogWrapper:R},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 Ht=u(Vt,Bt,Ut,!1,Kt,null,null,null);function Kt(t){for(let s in x)this[s]=x[s]}var Yt=function(){return Ht.exports}(),Xt=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,i){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:i,class:{operate:a.id==t.operateItem.id&&t.operateVisible},attrs:{"data-id":a.id},on:{click:function(o){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(o){return o.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)},Jt=[];const Gt={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,i)=>a.top_at||i.top_at?$A.Date(i.top_at)-$A.Date(a.top_at):i.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(i=>i.id==e);!a||(this.operateVisible=!1,this.operateItem=$A.isJson(a)?a:{},this.$nextTick(()=>{const i=s.getBoundingClientRect(),o=this.$el.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)}).catch(({msg:t})=>{$A.modalError(t)})}}},S={};var qt=u(Gt,Xt,Jt,!1,Qt,null,null,null);function Qt(t){for(let s in S)this[s]=S[s]}var Zt=function(){return qt.exports}(),te=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)},ee=[];const se={components:{ProjectList:Zt,ProjectDialog:Yt,ProjectPanel:Rt},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 ae=u(se,te,ee,!1,ie,null,null,null);function ie(t){for(let s in A)this[s]=A[s]}var me=function(){return ae.exports}();export{me as default}; diff --git a/public/js/build/projectInvite.ddf03d3f.js b/public/js/build/projectInvite.8c66116b.js similarity index 96% rename from public/js/build/projectInvite.ddf03d3f.js rename to public/js/build/projectInvite.8c66116b.js index 3ccf5277d..3d63e14e3 100644 --- a/public/js/build/projectInvite.ddf03d3f.js +++ b/public/js/build/projectInvite.8c66116b.js @@ -1 +1 @@ -import{n as a}from"./app.2ab5f89e.js";var r=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)},s=[];const c={data(){return{loadIng:0,joinLoad:0,already:!1,project:{}}},watch:{$route:{handler(t){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 n=a(c,r,s,!1,l,"2305dec0",null,null);function l(t){for(let i in o)this[i]=o[i]}var _=function(){return n.exports}();export{_ as default}; +import{n as a}from"./app.6fb8fe77.js";var r=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)},s=[];const c={data(){return{loadIng:0,joinLoad:0,already:!1,project:{}}},watch:{$route:{handler(t){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 n=a(c,r,s,!1,l,"2305dec0",null,null);function l(t){for(let i in o)this[i]=o[i]}var _=function(){return n.exports}();export{_ as default}; diff --git a/public/js/build/reportDetail.83c422be.js b/public/js/build/reportDetail.d1fff3ed.js similarity index 85% rename from public/js/build/reportDetail.83c422be.js rename to public/js/build/reportDetail.d1fff3ed.js index d087cb55c..9cb6e8378 100644 --- a/public/js/build/reportDetail.83c422be.js +++ b/public/js/build/reportDetail.d1fff3ed.js @@ -1 +1 @@ -import{R as i}from"./ReportDetail.e316ac3c.js";import{n as o}from"./app.2ab5f89e.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.f06c9ba5.js";import{n as o}from"./app.6fb8fe77.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.8d6ae6af.js b/public/js/build/reportEdit.ecbe4823.js similarity index 86% rename from public/js/build/reportEdit.8d6ae6af.js rename to public/js/build/reportEdit.ecbe4823.js index d4bf5d2a5..00f220d05 100644 --- a/public/js/build/reportEdit.8d6ae6af.js +++ b/public/js/build/reportEdit.ecbe4823.js @@ -1 +1 @@ -import{R as i}from"./ReportEdit.d1baae75.js";import{n}from"./app.2ab5f89e.js";import"./UserSelect.c1d7840d.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.3d7c05e9.js";import{n}from"./app.6fb8fe77.js";import"./UserSelect.4fa9cbd2.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.dee9fe2c.js b/public/js/build/swipe.6597c65d.js similarity index 99% rename from public/js/build/swipe.dee9fe2c.js rename to public/js/build/swipe.6597c65d.js index 503cee34b..26c7c60bf 100644 --- a/public/js/build/swipe.dee9fe2c.js +++ b/public/js/build/swipe.6597c65d.js @@ -1,4 +1,4 @@ -import{n as w,_ as v}from"./app.2ab5f89e.js";/*! +import{n as w,_ as v}from"./app.6fb8fe77.js";/*! * PhotoSwipe Lightbox 5.3.7 - 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||window.navigator.onLine===!1)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.f2ba98d2.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.015c49e1.js b/public/js/build/system.83ba2279.js similarity index 92% rename from public/js/build/system.015c49e1.js rename to public/js/build/system.83ba2279.js index ca804c7b6..8e2eb185b 100644 --- a/public/js/build/system.015c49e1.js +++ b/public/js/build/system.83ba2279.js @@ -1 +1 @@ -import{n as r,m as $}from"./app.2ab5f89e.js";import{D as h}from"./index.edc265fa.js";import{C as b,T as D}from"./CheckinExport.3b0975d4.js";import"./UserSelect.c1d7840d.js";var g=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)],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),t.$A.isDooServer()?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):t._e()],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)},y=[];const L={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}},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--})}}},i={};var k=r(L,g,y,!1,x,null,null,null);function x(t){for(let s in i)this[s]=i[s]}var I=function(){return k.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-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,l){return a("Row",{key:l,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(l)}},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)},S=[];const F={name:"SystemTaskPriority",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",priority:1,days:1,color:"#84C56A"}}},mounted(){this.systemSetting()},computed:{...$(["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--})}}},n={};var A=r(F,C,S,!1,R,null,null,null);function R(t){for(let s in n)this[s]=n[s]}var w=function(){return A.exports}(),E=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,l){return a("Row",{key:l,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(l)}},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)},O=[];const P={name:"SystemColumnTemplate",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",columns:""}}},mounted(){this.systemSetting()},computed:{...$(["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--})}}},m={};var N=r(P,E,O,!1,T,null,null,null);function T(t){for(let s in m)this[s]=m[s]}var B=function(){return N.exports}(),G=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",{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)},M=[];const J={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"})}}},c={};var j=r(J,G,M,!1,q,null,null,null);function q(t){for(let s in c)this[s]=c[s]}var K=function(){return j.exports}(),H=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)},U=[];const W={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 V=r(W,H,U,!1,X,null,null,null);function X(t){for(let s in _)this[s]=_[s]}var z=function(){return V.exports}(),Q=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)},Y=[];const Z={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--})}}},u={};var tt=r(Z,Q,Y,!1,at,null,null,null);function at(t){for(let s in u)this[s]=u[s]}var et=function(){return tt.exports}(),st=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",{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)},ot=[];const rt={name:"SystemCheckin",components:{CheckinExport:b,TeamManagement:D,DrawerOverlay:h},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"})})}}},p={};var lt=r(rt,st,ot,!1,it,null,null,null);function it(t){for(let s in p)this[s]=p[s]}var nt=function(){return lt.exports}(),mt=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)},ct=[];const _t={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 ut=r(_t,mt,ct,!1,pt,null,null,null);function pt(t){for(let s in d)this[s]=d[s]}var dt=function(){return ut.exports}(),ft=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("ChatGTP")]),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("\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)]),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)]),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:"\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:"ERNIE-Bot-turbo"}},[t._v("ERNIE-Bot-turbo")]),a("Option",{attrs:{value:"ERNIE-Bot"}},[t._v("ERNIE-Bot")])],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)]),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?spm=a2c4g.2399481.0.0.648f47feHXVgVP",target:"_blank"}},[t._v("https://help.aliyun.com/document_detail/611472.html?spm=a2c4g.2399481.0.0.648f47feHXVgVP")])])],1),a("FormItem",{attrs:{label:"\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?spm=a2c4g.2399480.0.0.6a086e16ihOhbr#90ebe270f8rte",target:"_blank"}},[t._v("https://help.aliyun.com/document_detail/2399481.html?spm=a2c4g.2399480.0.0.6a086e16ihOhbr#90ebe270f8rte")])])],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)},vt=[];const $t={name:"SystemAibot",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--})}}},f={};var ht=r($t,ft,vt,!1,bt,null,null,null);function bt(t){for(let s in f)this[s]=f[s]}var Dt=function(){return ht.exports}(),gt=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),a("TabPane",{attrs:{label:t.$L("AI\u673A\u5668\u4EBA"),name:"aibot"}},[a("SystemAibot")],1),a("TabPane",{attrs:{label:t.$L("\u4F1A\u8BAE\u529F\u80FD"),name:"meeting"}},[a("SystemMeeting")],1),a("TabPane",{attrs:{label:t.$L("\u7B7E\u5230\u529F\u80FD"),name:"checkin"}},[a("SystemCheckin")],1),a("TabPane",{attrs:{label:t.$L("\u90AE\u4EF6\u8BBE\u7F6E"),name:"emailSetting"}},[a("SystemEmailSetting")],1),a("TabPane",{attrs:{label:t.$L("\u8BA4\u8BC1\u8BBE\u7F6E"),name:"thirdAccess"}},[a("SystemThirdAccess")],1),t.$A.isDooServer()?a("TabPane",{attrs:{label:t.$L("APP\u63A8\u9001"),name:"appPush"}},[a("SystemAppPush")],1):t._e()],1)],1)},yt=[];const Lt={components:{SystemAibot:Dt,SystemThirdAccess:dt,SystemCheckin:nt,SystemMeeting:et,SystemAppPush:z,SystemColumnTemplate:B,SystemTaskPriority:w,SystemSetting:I,SystemEmailSetting:K},data(){return{tabAction:"setting"}}},v={};var kt=r(Lt,gt,yt,!1,xt,null,null,null);function xt(t){for(let s in v)this[s]=v[s]}var At=function(){return kt.exports}();export{At as default}; +import{n as r,m as $}from"./app.6fb8fe77.js";import{D as h}from"./index.ab28c92e.js";import{C as b,T as D}from"./CheckinExport.0786bc67.js";import"./UserSelect.4fa9cbd2.js";var g=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)],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),t.$A.isDooServer()?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):t._e()],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)},y=[];const L={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}},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--})}}},i={};var k=r(L,g,y,!1,x,null,null,null);function x(t){for(let s in i)this[s]=i[s]}var I=function(){return k.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-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,l){return a("Row",{key:l,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(l)}},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)},S=[];const F={name:"SystemTaskPriority",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",priority:1,days:1,color:"#84C56A"}}},mounted(){this.systemSetting()},computed:{...$(["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--})}}},n={};var A=r(F,C,S,!1,R,null,null,null);function R(t){for(let s in n)this[s]=n[s]}var w=function(){return A.exports}(),E=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,l){return a("Row",{key:l,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(l)}},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)},O=[];const P={name:"SystemColumnTemplate",data(){return{loadIng:0,formDatum:[],nullDatum:{name:"",columns:""}}},mounted(){this.systemSetting()},computed:{...$(["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--})}}},m={};var N=r(P,E,O,!1,T,null,null,null);function T(t){for(let s in m)this[s]=m[s]}var B=function(){return N.exports}(),G=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",{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)},M=[];const J={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"})}}},c={};var j=r(J,G,M,!1,q,null,null,null);function q(t){for(let s in c)this[s]=c[s]}var K=function(){return j.exports}(),U=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)},H=[];const W={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 z=r(W,U,H,!1,X,null,null,null);function X(t){for(let s in _)this[s]=_[s]}var Q=function(){return z.exports}(),V=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)},Y=[];const Z={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--})}}},u={};var tt=r(Z,V,Y,!1,at,null,null,null);function at(t){for(let s in u)this[s]=u[s]}var et=function(){return tt.exports}(),st=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",{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)},ot=[];const rt={name:"SystemCheckin",components:{CheckinExport:b,TeamManagement:D,DrawerOverlay:h},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"})})}}},p={};var lt=r(rt,st,ot,!1,it,null,null,null);function it(t){for(let s in p)this[s]=p[s]}var nt=function(){return lt.exports}(),mt=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)},ct=[];const _t={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 ut=r(_t,mt,ct,!1,pt,null,null,null);function pt(t){for(let s in d)this[s]=d[s]}var dt=function(){return ut.exports}(),ft=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("ChatGTP")]),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("\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)]),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)]),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:"\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:"ERNIE-Bot-turbo"}},[t._v("ERNIE-Bot-turbo")]),a("Option",{attrs:{value:"ERNIE-Bot"}},[t._v("ERNIE-Bot")])],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)]),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:"\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)])]),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)},vt=[];const $t={name:"SystemAibot",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--})}}},f={};var ht=r($t,ft,vt,!1,bt,null,null,null);function bt(t){for(let s in f)this[s]=f[s]}var Dt=function(){return ht.exports}(),gt=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),a("TabPane",{attrs:{label:t.$L("AI\u673A\u5668\u4EBA"),name:"aibot"}},[a("SystemAibot")],1),a("TabPane",{attrs:{label:t.$L("\u4F1A\u8BAE\u529F\u80FD"),name:"meeting"}},[a("SystemMeeting")],1),a("TabPane",{attrs:{label:t.$L("\u7B7E\u5230\u529F\u80FD"),name:"checkin"}},[a("SystemCheckin")],1),a("TabPane",{attrs:{label:t.$L("\u90AE\u4EF6\u8BBE\u7F6E"),name:"emailSetting"}},[a("SystemEmailSetting")],1),a("TabPane",{attrs:{label:t.$L("\u8BA4\u8BC1\u8BBE\u7F6E"),name:"thirdAccess"}},[a("SystemThirdAccess")],1),t.$A.isDooServer()?a("TabPane",{attrs:{label:t.$L("APP\u63A8\u9001"),name:"appPush"}},[a("SystemAppPush")],1):t._e()],1)],1)},yt=[];const Lt={components:{SystemAibot:Dt,SystemThirdAccess:dt,SystemCheckin:nt,SystemMeeting:et,SystemAppPush:Q,SystemColumnTemplate:B,SystemTaskPriority:w,SystemSetting:I,SystemEmailSetting:K},data(){return{tabAction:"setting"}}},v={};var kt=r(Lt,gt,yt,!1,xt,null,null,null);function xt(t){for(let s in v)this[s]=v[s]}var At=function(){return kt.exports}();export{At as default}; diff --git a/public/js/build/task.cba220aa.js b/public/js/build/task.7d74afdc.js similarity index 83% rename from public/js/build/task.cba220aa.js rename to public/js/build/task.7d74afdc.js index 14c90e9c9..ff52e23a9 100644 --- a/public/js/build/task.cba220aa.js +++ b/public/js/build/task.7d74afdc.js @@ -1 +1 @@ -import{a as n}from"./TaskDetail.17c1ee52.js";import{m as r,n as o}from"./app.2ab5f89e.js";import"./TEditor.c448a662.js";import"./ImgUpload.cf2be17d.js";import"./ProjectLog.c251a416.js";import"./DialogWrapper.28dee207.js";import"./longpress.43ca7fd9.js";import"./index.edc265fa.js";import"./UserSelect.c1d7840d.js";import"./details.ae1c56d6.js";import"./TaskMenu.6d52fdca.js";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"electron-task"},[a("PageTitle",{attrs:{title:t.taskInfo.name}}),t.loadIng>0?a("Loading"):a("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))}}},s={};var l=o(d,i,c,!1,h,"7af6ba13",null,null);function h(t){for(let e in s)this[e]=s[e]}var T=function(){return l.exports}();export{T as default}; +import{a as n}from"./TaskDetail.93d4eeab.js";import{m as r,n as o}from"./app.6fb8fe77.js";import"./TEditor.116bbeaa.js";import"./ImgUpload.056f7090.js";import"./ProjectLog.9bfebf4b.js";import"./DialogWrapper.7e5c06a5.js";import"./longpress.43ca7fd9.js";import"./index.ab28c92e.js";import"./UserSelect.4fa9cbd2.js";import"./details.eb8631f5.js";import"./TaskMenu.61d4b7dc.js";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"electron-task"},[a("PageTitle",{attrs:{title:t.taskInfo.name}}),t.loadIng>0?a("Loading"):a("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))}}},s={};var l=o(d,i,c,!1,h,"7af6ba13",null,null);function h(t){for(let e in s)this[e]=s[e]}var T=function(){return l.exports}();export{T as default}; diff --git a/public/js/build/theme.80fdad77.js b/public/js/build/theme.05794063.js similarity index 96% rename from public/js/build/theme.80fdad77.js rename to public/js/build/theme.05794063.js index aa4b63671..b9463bce3 100644 --- a/public/js/build/theme.80fdad77.js +++ b/public/js/build/theme.05794063.js @@ -1 +1 @@ -import{m as i,n}from"./app.2ab5f89e.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.6fb8fe77.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/token.717fee56.js b/public/js/build/token.55f32898.js similarity index 91% rename from public/js/build/token.717fee56.js rename to public/js/build/token.55f32898.js index 4581b6b19..cc2145294 100644 --- a/public/js/build/token.717fee56.js +++ b/public/js/build/token.55f32898.js @@ -1 +1 @@ -import{n}from"./app.2ab5f89e.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.6fb8fe77.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.4f649c64.js b/public/js/build/validEmail.e7cab868.js similarity index 95% rename from public/js/build/validEmail.4f649c64.js rename to public/js/build/validEmail.e7cab868.js index cab4464fd..de95f6eff 100644 --- a/public/js/build/validEmail.4f649c64.js +++ b/public/js/build/validEmail.e7cab868.js @@ -1 +1 @@ -import{n as i}from"./app.2ab5f89e.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.6fb8fe77.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.310641c1.css b/public/js/build/view.310641c1.css deleted file mode 100644 index c7415400e..000000000 --- a/public/js/build/view.310641c1.css +++ /dev/null @@ -1 +0,0 @@ -.common-preview-image[data-v-21371c33]{position:fixed;bottom:0;left:0;right:0;top:0;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.common-preview-image .common-preview-view[data-v-21371c33]{position:absolute;bottom:0;left:0;right:0;top:0;background:rgba(0,0,0,.8)}.common-preview-image .common-preview-view .preview-view-prev[data-v-21371c33],.common-preview-image .common-preview-view .preview-view-next[data-v-21371c33]{display:flex;align-items:center;justify-content:center;border-radius:50%;opacity:.8;cursor:pointer;background-color:#606266;border-color:#fff;height:44px;width:44px;overflow:hidden;position:absolute;top:50%;z-index:2;transform:translateY(-50%)}@media (max-width: 640px){.common-preview-image .common-preview-view .preview-view-prev[data-v-21371c33],.common-preview-image .common-preview-view .preview-view-next[data-v-21371c33]{display:none}}.common-preview-image .common-preview-view .preview-view-prev.is-disabled[data-v-21371c33],.common-preview-image .common-preview-view .preview-view-next.is-disabled[data-v-21371c33]{cursor:no-drop}.common-preview-image .common-preview-view .preview-view-prev.is-disabled>i[data-v-21371c33],.common-preview-image .common-preview-view .preview-view-next.is-disabled>i[data-v-21371c33]{opacity:.8}.common-preview-image .common-preview-view .preview-view-prev>i[data-v-21371c33],.common-preview-image .common-preview-view .preview-view-next>i[data-v-21371c33]{color:#fff;font-size:24px}.common-preview-image .common-preview-view .preview-view-prev[data-v-21371c33]{left:40px}.common-preview-image .common-preview-view .preview-view-next[data-v-21371c33]{right:40px}.common-preview-image .common-preview-view .preview-view-actions[data-v-21371c33]{display:flex;align-items:center;justify-content:center;opacity:.8;background-color:#606266;border-color:#fff;border-radius:22px;bottom:30px;height:44px;position:absolute;left:50%;z-index:2;padding:0 23px;transform:translate(-50%);width:282px}.common-preview-image .common-preview-view .preview-view-actions .actions-inner[data-v-21371c33]{align-items:center;color:#fff;cursor:default;display:flex;height:100%;justify-content:space-around;text-align:justify;width:100%}.common-preview-image .common-preview-view .preview-view-actions .actions-inner>i[data-v-21371c33]{cursor:pointer;font-size:23px}.common-preview-image .common-preview-view .preview-view-canvas[data-v-21371c33]{align-items:center;display:flex;height:100%;justify-content:center;width:100%} diff --git a/public/js/build/view.5e67e6f1.css b/public/js/build/view.5e67e6f1.css new file mode 100644 index 000000000..c3400537b --- /dev/null +++ b/public/js/build/view.5e67e6f1.css @@ -0,0 +1 @@ +.common-preview-image[data-v-6e965392]{position:fixed;bottom:0;left:0;right:0;top:0;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.common-preview-image .common-preview-view[data-v-6e965392]{position:absolute;bottom:0;left:0;right:0;top:0;background:rgba(0,0,0,.8)}.common-preview-image .common-preview-view .preview-view-prev[data-v-6e965392],.common-preview-image .common-preview-view .preview-view-next[data-v-6e965392]{display:flex;align-items:center;justify-content:center;border-radius:50%;opacity:.8;cursor:pointer;background-color:#606266;border-color:#fff;height:44px;width:44px;overflow:hidden;position:absolute;top:50%;z-index:2;transform:translateY(-50%)}@media (max-width: 640px){.common-preview-image .common-preview-view .preview-view-prev[data-v-6e965392],.common-preview-image .common-preview-view .preview-view-next[data-v-6e965392]{display:none}}.common-preview-image .common-preview-view .preview-view-prev.is-disabled[data-v-6e965392],.common-preview-image .common-preview-view .preview-view-next.is-disabled[data-v-6e965392]{cursor:no-drop}.common-preview-image .common-preview-view .preview-view-prev.is-disabled>i[data-v-6e965392],.common-preview-image .common-preview-view .preview-view-next.is-disabled>i[data-v-6e965392]{opacity:.8}.common-preview-image .common-preview-view .preview-view-prev>i[data-v-6e965392],.common-preview-image .common-preview-view .preview-view-next>i[data-v-6e965392]{color:#fff;font-size:24px}.common-preview-image .common-preview-view .preview-view-prev[data-v-6e965392]{left:40px}.common-preview-image .common-preview-view .preview-view-next[data-v-6e965392]{right:40px}.common-preview-image .common-preview-view .preview-view-actions[data-v-6e965392]{display:flex;align-items:center;justify-content:center;opacity:.8;background-color:#606266;border-color:#fff;border-radius:22px;bottom:30px;height:44px;position:absolute;left:50%;z-index:2;padding:0 23px;transform:translate(-50%);width:282px}.common-preview-image .common-preview-view .preview-view-actions .actions-inner[data-v-6e965392]{align-items:center;color:#fff;cursor:default;display:flex;height:100%;justify-content:space-around;text-align:justify;width:100%}.common-preview-image .common-preview-view .preview-view-actions .actions-inner>i[data-v-6e965392]{cursor:pointer;font-size:23px}.common-preview-image .common-preview-view .preview-view-canvas[data-v-6e965392]{align-items:center;display:flex;height:100%;justify-content:center;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none} diff --git a/public/js/build/view.9ac5ec3e.js b/public/js/build/view.a048db45.js similarity index 97% rename from public/js/build/view.9ac5ec3e.js rename to public/js/build/view.a048db45.js index 3aff4d490..c2b3c478f 100644 --- a/public/js/build/view.9ac5ec3e.js +++ b/public/js/build/view.a048db45.js @@ -1 +1 @@ -import{V as c,n as m}from"./app.2ab5f89e.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,"21371c33",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.6fb8fe77.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 315119439..ee80b7173 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { "resources/assets/js/app.js": { - "file": "js/build/app.2ab5f89e.js", + "file": "js/build/app.6fb8fe77.js", "src": "resources/assets/js/app.js", "isEntry": true, "dynamicImports": [ @@ -46,7 +46,7 @@ "node_modules/openpgp_hi/dist/lightweight/elliptic.min.mjs" ], "css": [ - "js/build/app.2d4b066a.css" + "js/build/app.262cb6d2.css" ], "assets": [ "js/build/iconfont.01196938.eot", @@ -113,7 +113,7 @@ ] }, "resources/assets/js/pages/index.vue": { - "file": "js/build/index.0045ae13.js", + "file": "js/build/index.3ab6dc68.js", "src": "resources/assets/js/pages/index.vue", "isDynamicEntry": true, "imports": [ @@ -121,7 +121,7 @@ ] }, "resources/assets/js/pages/pro.vue": { - "file": "js/build/pro.ff666016.js", + "file": "js/build/pro.ecb61aa7.js", "src": "resources/assets/js/pages/pro.vue", "isDynamicEntry": true, "imports": [ @@ -129,41 +129,41 @@ ] }, "resources/assets/js/pages/manage.vue": { - "file": "js/build/manage.108fb03a.js", + "file": "js/build/manage.23677939.js", "src": "resources/assets/js/pages/manage.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_CheckinExport.3b0975d4.js", - "_index.edc265fa.js", + "_CheckinExport.0786bc67.js", + "_index.ab28c92e.js", "resources/assets/js/components/TEditor.vue", - "_UserSelect.c1d7840d.js", - "_TaskDetail.17c1ee52.js", - "_ReportEdit.d1baae75.js", - "_ReportDetail.e316ac3c.js", + "_UserSelect.4fa9cbd2.js", + "_TaskDetail.93d4eeab.js", + "_ReportEdit.3d7c05e9.js", + "_ReportDetail.f06c9ba5.js", "_longpress.43ca7fd9.js", - "_DialogWrapper.28dee207.js", - "_ImgUpload.cf2be17d.js", - "_ProjectLog.c251a416.js", - "_TaskMenu.6d52fdca.js", + "_DialogWrapper.7e5c06a5.js", + "_ImgUpload.056f7090.js", + "_ProjectLog.9bfebf4b.js", + "_TaskMenu.61d4b7dc.js", "resources/assets/js/pages/manage/approve/details.vue" ], "css": [ "js/build/manage.a77f99dc.css" ] }, - "_CheckinExport.3b0975d4.js": { - "file": "js/build/CheckinExport.3b0975d4.js", + "_CheckinExport.0786bc67.js": { + "file": "js/build/CheckinExport.0786bc67.js", "imports": [ - "_UserSelect.c1d7840d.js", + "_UserSelect.4fa9cbd2.js", "resources/assets/js/app.js" ], "css": [ "js/build/CheckinExport.68b4950e.css" ] }, - "_index.edc265fa.js": { - "file": "js/build/index.edc265fa.js", + "_index.ab28c92e.js": { + "file": "js/build/index.ab28c92e.js", "imports": [ "resources/assets/js/app.js" ], @@ -174,140 +174,140 @@ "_longpress.43ca7fd9.js": { "file": "js/build/longpress.43ca7fd9.js" }, - "_UserSelect.c1d7840d.js": { - "file": "js/build/UserSelect.c1d7840d.js", + "_UserSelect.4fa9cbd2.js": { + "file": "js/build/UserSelect.4fa9cbd2.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/components/TEditor.vue": { - "file": "js/build/TEditor.c448a662.js", + "file": "js/build/TEditor.116bbeaa.js", "src": "resources/assets/js/components/TEditor.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ImgUpload.cf2be17d.js" + "_ImgUpload.056f7090.js" ] }, - "_TaskDetail.17c1ee52.js": { - "file": "js/build/TaskDetail.17c1ee52.js", + "_TaskDetail.93d4eeab.js": { + "file": "js/build/TaskDetail.93d4eeab.js", "imports": [ "resources/assets/js/app.js", "resources/assets/js/components/TEditor.vue", - "_ProjectLog.c251a416.js", - "_DialogWrapper.28dee207.js", - "_TaskMenu.6d52fdca.js", - "_UserSelect.c1d7840d.js" + "_ProjectLog.9bfebf4b.js", + "_DialogWrapper.7e5c06a5.js", + "_TaskMenu.61d4b7dc.js", + "_UserSelect.4fa9cbd2.js" ] }, - "_ReportEdit.d1baae75.js": { - "file": "js/build/ReportEdit.d1baae75.js", + "_ReportEdit.3d7c05e9.js": { + "file": "js/build/ReportEdit.3d7c05e9.js", "imports": [ "resources/assets/js/app.js", - "_UserSelect.c1d7840d.js" + "_UserSelect.4fa9cbd2.js" ], "dynamicImports": [ "resources/assets/js/components/TEditor.vue" ] }, - "_ReportDetail.e316ac3c.js": { - "file": "js/build/ReportDetail.e316ac3c.js", + "_ReportDetail.f06c9ba5.js": { + "file": "js/build/ReportDetail.f06c9ba5.js", "imports": [ "resources/assets/js/app.js" ] }, - "_DialogWrapper.28dee207.js": { - "file": "js/build/DialogWrapper.28dee207.js", + "_DialogWrapper.7e5c06a5.js": { + "file": "js/build/DialogWrapper.7e5c06a5.js", "imports": [ "resources/assets/js/app.js", "_longpress.43ca7fd9.js", - "_index.edc265fa.js", - "_UserSelect.c1d7840d.js", - "_ImgUpload.cf2be17d.js", + "_index.ab28c92e.js", + "_UserSelect.4fa9cbd2.js", + "_ImgUpload.056f7090.js", "resources/assets/js/pages/manage/approve/details.vue" ], "css": [ "js/build/DialogWrapper.5e691503.css" ] }, - "_ImgUpload.cf2be17d.js": { - "file": "js/build/ImgUpload.cf2be17d.js", + "_ImgUpload.056f7090.js": { + "file": "js/build/ImgUpload.056f7090.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage/approve/details.vue": { - "file": "js/build/details.ae1c56d6.js", + "file": "js/build/details.eb8631f5.js", "src": "resources/assets/js/pages/manage/approve/details.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ImgUpload.cf2be17d.js" + "_ImgUpload.056f7090.js" ] }, - "_ProjectLog.c251a416.js": { - "file": "js/build/ProjectLog.c251a416.js", + "_ProjectLog.9bfebf4b.js": { + "file": "js/build/ProjectLog.9bfebf4b.js", "imports": [ "resources/assets/js/app.js" ] }, - "_TaskMenu.6d52fdca.js": { - "file": "js/build/TaskMenu.6d52fdca.js", + "_TaskMenu.61d4b7dc.js": { + "file": "js/build/TaskMenu.61d4b7dc.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage/dashboard.vue": { - "file": "js/build/dashboard.9a6cc68e.js", + "file": "js/build/dashboard.54ebcc20.js", "src": "resources/assets/js/pages/manage/dashboard.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_TaskMenu.6d52fdca.js" + "_TaskMenu.61d4b7dc.js" ] }, "resources/assets/js/pages/manage/calendar.vue": { - "file": "js/build/calendar.f9aa1044.js", + "file": "js/build/calendar.0e6aeaaa.js", "src": "resources/assets/js/pages/manage/calendar.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_TaskMenu.6d52fdca.js" + "_TaskMenu.61d4b7dc.js" ], "css": [ "js/build/calendar.05643a5b.css" ] }, "resources/assets/js/pages/manage/messenger.vue": { - "file": "js/build/messenger.47854ab6.js", + "file": "js/build/messenger.9ae12471.js", "src": "resources/assets/js/pages/manage/messenger.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_DialogWrapper.28dee207.js", + "_DialogWrapper.7e5c06a5.js", "_longpress.43ca7fd9.js", - "_index.edc265fa.js", - "_UserSelect.c1d7840d.js", - "_ImgUpload.cf2be17d.js", + "_index.ab28c92e.js", + "_UserSelect.4fa9cbd2.js", + "_ImgUpload.056f7090.js", "resources/assets/js/pages/manage/approve/details.vue" ] }, "resources/assets/js/pages/manage/approve/index.vue": { - "file": "js/build/index.b2c3f0aa.js", + "file": "js/build/index.01701810.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.edc265fa.js", - "_ImgUpload.cf2be17d.js" + "_index.ab28c92e.js", + "_ImgUpload.056f7090.js" ], "css": [ "js/build/index.9d0cdd21.css" ] }, "resources/assets/js/pages/manage/setting/index.vue": { - "file": "js/build/index.1e8d5001.js", + "file": "js/build/index.5f4e12fc.js", "src": "resources/assets/js/pages/manage/setting/index.vue", "isDynamicEntry": true, "imports": [ @@ -315,16 +315,16 @@ ] }, "resources/assets/js/pages/manage/setting/personal.vue": { - "file": "js/build/personal.af1cbdf2.js", + "file": "js/build/personal.4dbe89b2.js", "src": "resources/assets/js/pages/manage/setting/personal.vue", "isDynamicEntry": true, "imports": [ - "_ImgUpload.cf2be17d.js", + "_ImgUpload.056f7090.js", "resources/assets/js/app.js" ] }, "resources/assets/js/pages/manage/setting/checkin.vue": { - "file": "js/build/checkin.110860a6.js", + "file": "js/build/checkin.24f61a0d.js", "src": "resources/assets/js/pages/manage/setting/checkin.vue", "isDynamicEntry": true, "imports": [ @@ -335,11 +335,11 @@ ] }, "resources/assets/js/pages/manage/setting/approve.vue": { - "file": "js/build/approve.774d6c89.js", + "file": "js/build/approve.5d8d6cbe.js", "src": "resources/assets/js/pages/manage/setting/approve.vue", "isDynamicEntry": true, "imports": [ - "_index.edc265fa.js", + "_index.ab28c92e.js", "resources/assets/js/app.js" ], "css": [ @@ -347,7 +347,7 @@ ] }, "resources/assets/js/pages/manage/setting/language.vue": { - "file": "js/build/language.b2ff9329.js", + "file": "js/build/language.3598a0b0.js", "src": "resources/assets/js/pages/manage/setting/language.vue", "isDynamicEntry": true, "imports": [ @@ -355,7 +355,7 @@ ] }, "resources/assets/js/pages/manage/setting/theme.vue": { - "file": "js/build/theme.80fdad77.js", + "file": "js/build/theme.05794063.js", "src": "resources/assets/js/pages/manage/setting/theme.vue", "isDynamicEntry": true, "imports": [ @@ -363,7 +363,7 @@ ] }, "resources/assets/js/pages/manage/setting/keyboard.vue": { - "file": "js/build/keyboard.fc515293.js", + "file": "js/build/keyboard.b30ae163.js", "src": "resources/assets/js/pages/manage/setting/keyboard.vue", "isDynamicEntry": true, "imports": [ @@ -374,7 +374,7 @@ ] }, "resources/assets/js/pages/manage/setting/license.vue": { - "file": "js/build/license.ef37879d.js", + "file": "js/build/license.66258ff9.js", "src": "resources/assets/js/pages/manage/setting/license.vue", "isDynamicEntry": true, "imports": [ @@ -385,7 +385,7 @@ ] }, "resources/assets/js/pages/manage/setting/password.vue": { - "file": "js/build/password.eb90241e.js", + "file": "js/build/password.9f289b79.js", "src": "resources/assets/js/pages/manage/setting/password.vue", "isDynamicEntry": true, "imports": [ @@ -393,7 +393,7 @@ ] }, "resources/assets/js/pages/manage/setting/email.vue": { - "file": "js/build/email.5d3025c7.js", + "file": "js/build/email.c77d464a.js", "src": "resources/assets/js/pages/manage/setting/email.vue", "isDynamicEntry": true, "imports": [ @@ -401,18 +401,18 @@ ] }, "resources/assets/js/pages/manage/setting/system.vue": { - "file": "js/build/system.015c49e1.js", + "file": "js/build/system.83ba2279.js", "src": "resources/assets/js/pages/manage/setting/system.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_index.edc265fa.js", - "_CheckinExport.3b0975d4.js", - "_UserSelect.c1d7840d.js" + "_index.ab28c92e.js", + "_CheckinExport.0786bc67.js", + "_UserSelect.4fa9cbd2.js" ] }, "resources/assets/js/pages/manage/setting/delete.vue": { - "file": "js/build/delete.3019f7ef.js", + "file": "js/build/delete.05615594.js", "src": "resources/assets/js/pages/manage/setting/delete.vue", "isDynamicEntry": true, "imports": [ @@ -420,7 +420,7 @@ ] }, "resources/assets/js/pages/manage/projectInvite.vue": { - "file": "js/build/projectInvite.ddf03d3f.js", + "file": "js/build/projectInvite.8c66116b.js", "src": "resources/assets/js/pages/manage/projectInvite.vue", "isDynamicEntry": true, "imports": [ @@ -431,30 +431,30 @@ ] }, "resources/assets/js/pages/manage/project.vue": { - "file": "js/build/project.6eb71c23.js", + "file": "js/build/project.c7bb6e0e.js", "src": "resources/assets/js/pages/manage/project.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ProjectLog.c251a416.js", - "_TaskMenu.6d52fdca.js", - "_index.edc265fa.js", - "_UserSelect.c1d7840d.js", - "_DialogWrapper.28dee207.js", + "_ProjectLog.9bfebf4b.js", + "_TaskMenu.61d4b7dc.js", + "_index.ab28c92e.js", + "_UserSelect.4fa9cbd2.js", + "_DialogWrapper.7e5c06a5.js", "_longpress.43ca7fd9.js", - "_ImgUpload.cf2be17d.js", + "_ImgUpload.056f7090.js", "resources/assets/js/pages/manage/approve/details.vue" ] }, "resources/assets/js/pages/manage/file.vue": { - "file": "js/build/file.165e488e.js", + "file": "js/build/file.7cac3066.js", "src": "resources/assets/js/pages/manage/file.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_index.edc265fa.js", + "_index.ab28c92e.js", "_longpress.43ca7fd9.js", - "_UserSelect.c1d7840d.js" + "_UserSelect.4fa9cbd2.js" ], "dynamicImports": [ "resources/assets/js/pages/manage/components/FilePreview.vue", @@ -462,12 +462,12 @@ ] }, "resources/assets/js/pages/single/fileMsg.vue": { - "file": "js/build/fileMsg.234716b5.js", + "file": "js/build/fileMsg.0d9b08d0.js", "src": "resources/assets/js/pages/single/fileMsg.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/preview.js", @@ -481,19 +481,19 @@ "js/build/fileMsg.1a0b76dd.css" ] }, - "_IFrame.f4e1afaf.js": { - "file": "js/build/IFrame.f4e1afaf.js", + "_IFrame.dfb0ac0a.js": { + "file": "js/build/IFrame.dfb0ac0a.js", "imports": [ "resources/assets/js/app.js" ] }, "resources/assets/js/pages/single/fileTask.vue": { - "file": "js/build/fileTask.8bcbee2e.js", + "file": "js/build/fileTask.1a203df6.js", "src": "resources/assets/js/pages/single/fileTask.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/preview.js", @@ -508,26 +508,26 @@ ] }, "resources/assets/js/pages/single/file.vue": { - "file": "js/build/file.7ad78cf2.js", + "file": "js/build/file.67799f74.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.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "css": [ "js/build/file.1cbb23e7.css" ] }, "resources/assets/js/pages/manage/components/FileContent.vue": { - "file": "js/build/FileContent.1929b7b3.js", + "file": "js/build/FileContent.35a4ff5e.js", "src": "resources/assets/js/pages/manage/components/FileContent.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/index.vue", @@ -542,12 +542,12 @@ ] }, "resources/assets/js/pages/manage/components/FilePreview.vue": { - "file": "js/build/FilePreview.a0883610.js", + "file": "js/build/FilePreview.4bfd7284.js", "src": "resources/assets/js/pages/manage/components/FilePreview.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "dynamicImports": [ "resources/assets/js/components/MDEditor/preview.js", @@ -559,28 +559,28 @@ ] }, "resources/assets/js/pages/single/task.vue": { - "file": "js/build/task.cba220aa.js", + "file": "js/build/task.7d74afdc.js", "src": "resources/assets/js/pages/single/task.vue", "isDynamicEntry": true, "imports": [ - "_TaskDetail.17c1ee52.js", + "_TaskDetail.93d4eeab.js", "resources/assets/js/app.js", "resources/assets/js/components/TEditor.vue", - "_ImgUpload.cf2be17d.js", - "_ProjectLog.c251a416.js", - "_DialogWrapper.28dee207.js", + "_ImgUpload.056f7090.js", + "_ProjectLog.9bfebf4b.js", + "_DialogWrapper.7e5c06a5.js", "_longpress.43ca7fd9.js", - "_index.edc265fa.js", - "_UserSelect.c1d7840d.js", + "_index.ab28c92e.js", + "_UserSelect.4fa9cbd2.js", "resources/assets/js/pages/manage/approve/details.vue", - "_TaskMenu.6d52fdca.js" + "_TaskMenu.61d4b7dc.js" ], "css": [ "js/build/task.0d7ca2d3.css" ] }, "resources/assets/js/pages/single/validEmail.vue": { - "file": "js/build/validEmail.4f649c64.js", + "file": "js/build/validEmail.e7cab868.js", "src": "resources/assets/js/pages/single/validEmail.vue", "isDynamicEntry": true, "imports": [ @@ -591,24 +591,24 @@ ] }, "resources/assets/js/pages/single/reportEdit.vue": { - "file": "js/build/reportEdit.8d6ae6af.js", + "file": "js/build/reportEdit.ecbe4823.js", "src": "resources/assets/js/pages/single/reportEdit.vue", "isDynamicEntry": true, "imports": [ - "_ReportEdit.d1baae75.js", + "_ReportEdit.3d7c05e9.js", "resources/assets/js/app.js", - "_UserSelect.c1d7840d.js" + "_UserSelect.4fa9cbd2.js" ], "css": [ "js/build/reportEdit.5c397123.css" ] }, "resources/assets/js/pages/single/reportDetail.vue": { - "file": "js/build/reportDetail.83c422be.js", + "file": "js/build/reportDetail.d1fff3ed.js", "src": "resources/assets/js/pages/single/reportDetail.vue", "isDynamicEntry": true, "imports": [ - "_ReportDetail.e316ac3c.js", + "_ReportDetail.f06c9ba5.js", "resources/assets/js/app.js" ], "css": [ @@ -616,7 +616,7 @@ ] }, "resources/assets/js/pages/token.vue": { - "file": "js/build/token.717fee56.js", + "file": "js/build/token.55f32898.js", "src": "resources/assets/js/pages/token.vue", "isDynamicEntry": true, "imports": [ @@ -627,7 +627,7 @@ ] }, "resources/assets/js/pages/login.vue": { - "file": "js/build/login.cfa93d8f.js", + "file": "js/build/login.a11ab1ed.js", "src": "resources/assets/js/pages/login.vue", "isDynamicEntry": true, "imports": [ @@ -635,7 +635,7 @@ ] }, "resources/assets/js/pages/404.vue": { - "file": "js/build/404.01d2a9d7.js", + "file": "js/build/404.e2804d03.js", "src": "resources/assets/js/pages/404.vue", "isDynamicEntry": true, "imports": [ @@ -646,18 +646,18 @@ ] }, "resources/assets/js/components/PreviewImage/components/view.vue": { - "file": "js/build/view.9ac5ec3e.js", + "file": "js/build/view.a048db45.js", "src": "resources/assets/js/components/PreviewImage/components/view.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js" ], "css": [ - "js/build/view.310641c1.css" + "js/build/view.5e67e6f1.css" ] }, "resources/assets/js/components/PreviewImage/components/swipe.vue": { - "file": "js/build/swipe.dee9fe2c.js", + "file": "js/build/swipe.6597c65d.js", "src": "resources/assets/js/components/PreviewImage/components/swipe.vue", "isDynamicEntry": true, "imports": [ @@ -681,7 +681,7 @@ "isDynamicEntry": true }, "node_modules/openpgp_hi/dist/lightweight/bn.interface.min.mjs": { - "file": "js/build/bn.interface.min.3eff7d72.js", + "file": "js/build/bn.interface.min.76ed2c0b.js", "src": "node_modules/openpgp_hi/dist/lightweight/bn.interface.min.mjs", "isDynamicEntry": true, "imports": [ @@ -690,7 +690,7 @@ ] }, "node_modules/openpgp_hi/dist/lightweight/bn.min.mjs": { - "file": "js/build/bn.min.1f47700f.js", + "file": "js/build/bn.min.28405fbe.js", "src": "node_modules/openpgp_hi/dist/lightweight/bn.min.mjs", "isDynamicEntry": true, "imports": [ @@ -698,7 +698,7 @@ ] }, "node_modules/openpgp_hi/dist/lightweight/elliptic.min.mjs": { - "file": "js/build/elliptic.min.50416e92.js", + "file": "js/build/elliptic.min.02bc75af.js", "src": "node_modules/openpgp_hi/dist/lightweight/elliptic.min.mjs", "isDynamicEntry": true, "imports": [ @@ -707,7 +707,7 @@ ] }, "resources/assets/js/components/MDEditor/preview.js": { - "file": "js/build/preview.35a96748.js", + "file": "js/build/preview.a2619f71.js", "src": "resources/assets/js/components/MDEditor/preview.js", "isDynamicEntry": true, "imports": [ @@ -715,7 +715,7 @@ ] }, "resources/assets/js/components/AceEditor.vue": { - "file": "js/build/AceEditor.46ba32dc.js", + "file": "js/build/AceEditor.6d433f2d.js", "src": "resources/assets/js/components/AceEditor.vue", "isDynamicEntry": true, "imports": [ @@ -723,35 +723,35 @@ ] }, "resources/assets/js/components/OnlyOffice.vue": { - "file": "js/build/OnlyOffice.512691a7.js", + "file": "js/build/OnlyOffice.72397ebe.js", "src": "resources/assets/js/components/OnlyOffice.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "css": [ "js/build/OnlyOffice.a5dfbde1.css" ] }, "resources/assets/js/components/Drawio.vue": { - "file": "js/build/Drawio.33c85dd8.js", + "file": "js/build/Drawio.a7d96145.js", "src": "resources/assets/js/components/Drawio.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_IFrame.f4e1afaf.js" + "_IFrame.dfb0ac0a.js" ], "css": [ "js/build/Drawio.fc5c6326.css" ] }, "resources/assets/js/components/Minder.vue": { - "file": "js/build/Minder.89953d4a.js", + "file": "js/build/Minder.755c9889.js", "src": "resources/assets/js/components/Minder.vue", "isDynamicEntry": true, "imports": [ - "_IFrame.f4e1afaf.js", + "_IFrame.dfb0ac0a.js", "resources/assets/js/app.js" ], "css": [ @@ -759,12 +759,12 @@ ] }, "resources/assets/js/components/MDEditor/index.vue": { - "file": "js/build/index.d02ed9ac.js", + "file": "js/build/index.9b4ad049.js", "src": "resources/assets/js/components/MDEditor/index.vue", "isDynamicEntry": true, "imports": [ "resources/assets/js/app.js", - "_ImgUpload.cf2be17d.js" + "_ImgUpload.056f7090.js" ], "css": [ "js/build/index.4dae4044.css" diff --git a/resources/assets/js/pages/manage/setting/components/SystemAibot.vue b/resources/assets/js/pages/manage/setting/components/SystemAibot.vue index b4ceb5132..47e86b482 100644 --- a/resources/assets/js/pages/manage/setting/components/SystemAibot.vue +++ b/resources/assets/js/pages/manage/setting/components/SystemAibot.vue @@ -52,14 +52,14 @@