0||t.ignoreSearch)&&(t.label&&i.push.apply(i,M(t.label)),n.length>0&&i.push.apply(i,M(n)))})),n(i,e)}))}}}},this.options),this.quill=new(r())(this.$refs.editor,this._options),this.quill.enable(!1),this.value?this.setContent(this.value):this.$emit("input",this.getInputCache()),this.disabled||this.quill.enable(!0),this.quill.on("selection-change",(function(e){if(!e){if(t.quill.hasFocus())return void t.quill.setSelection(0);if(document.activeElement&&"ql-clipboard"===document.activeElement.className)return void t.quill.setSelection(t.quill.getLength())}t.isFocus=!!e})),this.quill.on("text-change",(function(e){t.maxlength>0&&t.quill.getLength()>t.maxlength&&t.quill.deleteText(t.maxlength,t.quill.getLength());var n=t.$refs.editor.children[0].innerHTML;n=(n=n.replace(/^(\s*<\/p>)+|(
\s*<\/p>)+$/gi,"")).replace(/^(
<\/p>)+|(
<\/p>)+$/gi,""),t._content=n,t.$emit("input",t._content),t.$nextTick((function(e){var n=t.quill.getSelection();if(n){var i=t.quill.getText(n.index);/\n\n/.test(i)&&t.quill.deleteText(n.index,1)}}))})),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(function(t,e){return e.ops=e.ops.map((function(t){var e={attributes:{},insert:t.insert};return t.attributes&&["bold","strike","italic","underline","list","blockquote","link"].some((function(n){t.attributes[n]&&(e.attributes[n]=t.attributes[n])})),e})),e})),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"],(function(e){null===e&&"function"==typeof window.Recorder&&(t.recordRec=window.Recorder({type:"mp3",bitRate:32,sampleRate:16e3,onProcess:function(e,n,i,o,r,s){t.recordWave.input(e[e.length-1],n,o),t.recordDuration=i,i>=18e4&&t.stopRecord(!1)}}),window.Recorder.Support()&&(t.recordReady=!0,t.$nextTick((function(e){t.recordWave=window.Recorder.FrequencyHistogramView({elem:t.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1})}))))}))},setText:function(t){this.quill&&this.quill.setText(t)},setContent:function(t){this.quill&&this.quill.setContents(this.quill.clipboard.convert(t))},getInputCache:function(){var t=this.dialogId||this.taskId,e=this.dialogInputCache.find((function(e){return e.key==t}));return e?e.cache:""},setInputCache:function(t){var e=this,n=this.dialogId||this.taskId,i=this.dialogInputCache.findIndex((function(t){return t.key==n})),o={key:n,cache:t};i>-1?this.$store.state.dialogInputCache.splice(i,1,o):this.$store.state.dialogInputCache.push(o),this.__setInputCache&&clearTimeout(this.__setInputCache),this.__setInputCache=setTimeout((function(t){$A.setStorage("cacheDialogInput",e.$store.state.dialogInputCache)}),600)},focus:function(){var t=this;this.$nextTick((function(){t.quill&&(t.quill.setSelection(t.quill.getLength()),t.quill.focus())}))},blur:function(){var t=this;this.$nextTick((function(){t.quill&&t.quill.blur()}))},clickSend:function(t,e){if(!this.loading)switch(t){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart="touchstart"===e.type?e.touches[0]:e,this.startRecord())return;break;case"move":var n="touchmove"===e.type?e.touches[0]:e;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.stopRecord(this.touchLimitY))return;if(this.touchLimitY||this.touchLimitX)return;this.onSend()}},onSend:function(){this.rangeIndex=0,this.$emit("on-send")},startRecord:function(){var t=this;return"recorder"===this.sendClass&&(this.recordDuration=0,this.recordState="ready",this.$nextTick((function(e){t.recordRec.open((function(e){"ready"===t.recordState?(t.recordState="ing",t.recordBlob=null,setTimeout((function(e){t.recordRec.start()}),300)):t.recordRec.close()}),(function(e){t.recordState="stop",$A.messageError(e||"打开录音失败")}))})),!0)},stopRecord:function(t){var e=this;switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((function(n,i){e.recordRec.close(),!0!==t&&(i<600?$A.messageWarning("说话时间太短"):(e.recordBlob=n,e.uploadRecord(i)))}),(function(t){e.recordRec.close(),$A.messageError(t||"录音失败")})),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover:function(){this.showEmoji=!1,this.showMore=!1},onClickCover:function(){var t=this;this.hidePopover(),this.$nextTick((function(e){var n;null===(n=t.quill)||void 0===n||n.focus()}))},uploadRecord:function(t){var e=this;if(null!==this.recordBlob){var n=new FileReader;n.onloadend=function(){e.$emit("on-record",{type:e.recordBlob.type,base64:n.result,duration:t})},n.readAsDataURL(this.recordBlob)}},onSelectEmoji:function(t){if(this.quill)if("emoji"===t.type){var e=document.createElement("span");e.innerHTML=t.html,this.quill.insertText(this.rangeIndex,e.innerHTML),this.rangeIndex+=e.innerHTML.length,e=null,this.windowLarge&&(this.showEmoji=!1,this.quill.setSelection(this.rangeIndex))}else"emoticon"===t.type&&(this.$emit("on-send",'
')),this.showEmoji=!1)},onToolbar:function(t){switch(this.hidePopover(),t){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":$.Store.set("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"image":case"file":this.$emit("on-more",t)}},onMoreVisibleChange:function(t){this.showMore=t},openMenu:function(t){if(this.quill)if(0===this.value.length||this.value.endsWith("
"))this.quill.getModule("mention").openMenu(t);else{var e=this.value.replace(/<[^>]+>/g,"");0===e.length||e.endsWith(" ")?this.quill.getModule("mention").openMenu(t):this.quill.getModule("mention").openMenu(" ".concat(t))}},getProjectId:function(){var t=this,e=null;if(this.dialogId>0){if(e=this.cacheProjects.find((function(e){return e.dialog_id==t.dialogId})))return e.id;if(e=this.cacheTasks.find((function(e){return e.dialog_id==t.dialogId})))return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find((function(e){return e.id==t.taskId}))))return e.project_id;return 0},getSource:function(t){var e=this;return new Promise((function(n){switch(t){case"@":if(e.mentionMode="user-mention",null!==e.userList)return void n(e.userList);var i=function(t){t.length>2?e.userList=[{ignoreSearch:!0,label:null,list:[{id:0,value:e.$L("所有人")}]},{ignoreSearch:!1,label:[{id:0,value:e.$L("会话内成员"),disabled:!0}],list:t}]:e.userList=[{ignoreSearch:!1,label:null,list:t}],n(e.userList)},o=[];if(e.dialogId>0)e.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:e.dialogId,getuser:1}}).then((function(t){var e=t.data;e.length>0&&o.push.apply(o,M(e.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:t.online}})))),i(o)})).catch((function(t){i(o)}));else if(e.taskId>0){var r=e.cacheTasks.find((function(t){return t.id==e.taskId}));r&&$A.isArray(r.task_user)&&r.task_user.some((function(t){var n=e.cacheUserBasic.find((function(e){return e.userid==t.userid}));n&&o.push({id:n.userid,value:n.nickname,avatar:n.userimg,online:n.online})})),i(o)}break;case"#":if(e.mentionMode="task-mention",null!==e.taskList)return void n(e.taskList);var s=function(t){e.taskList=[],t.length>0&&(t=t.map((function(t){return{id:t.id,value:t.name}})),e.taskList.push({ignoreSearch:!1,label:[{id:0,value:e.$L("项目未完成任务"),disabled:!0}],list:t}));var i=e.$store.getters.transforTasks(e.$store.getters.dashboardTask.all);i.length>0&&(i=i.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),e.taskList.push({ignoreSearch:!1,label:[{id:0,value:e.$L("我的待完成任务"),disabled:!0}],list:i.map((function(t){return{id:t.id,value:t.name}}))})),n(e.taskList)},a=e.getProjectId();if(a>0)return void e.$store.dispatch("getTaskForProject",a).then((function(t){var n=e.cacheTasks.filter((function(t){return!t.archived_at&&(t.project_id==a&&0===t.parent_id&&!t.archived_at&&!t.complete_at)}));n.length>0?s(n):s([])})).catch((function(t){s([])}));s([]);break;default:n([])}}))},checkIOSVersion:function(){var t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i),e=(t?t[1].replace(/_/g,"."):"unknown").split(".");return 11==+e[0]&&+e[1]>=0&&+e[1]<3},handlePaste:function(t){var e=t.clipboardData.files,n=Array.prototype.slice.call(e).filter((function(t){return!$A.leftExists(t.type,"image/")}));n.length>0&&(t.preventDefault(),this.$emit("on-file",n))}}};const H=(0,j.Z)(F,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:t.boxClass},[n("div",{staticClass:"chat-input-wrapper",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[n("div",{ref:"editor",staticClass:"no-dark-content",style:t.editorStyle,on:{click:function(t){t.stopPropagation()},paste:t.handlePaste}}),t._v(" "),n("ul",{staticClass:"chat-toolbar",on:{click:function(t){t.stopPropagation()}}},[n("li",[t.emojiBottom?n("ETooltip",{ref:"emojiTip",attrs:{disabled:t.windowSmall||t.showEmoji,placement:"top",content:t.$L("表情")}},[n("i",{staticClass:"taskfont",on:{click:function(e){t.showEmoji=!t.showEmoji}}},[t._v("")])]):n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:t.showEmoji,callback:function(e){t.showEmoji=e},expression:"showEmoji"}},[n("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:t.windowSmall||t.showEmoji,placement:"top",content:t.$L("表情")},slot:"reference"},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("ChatEmoji",{on:{"on-select":t.onSelectEmoji}})],1)],1),t._v(" "),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("选择会员")}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("user")}}},[t._v("")])])],1),t._v(" "),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("选择任务")}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("task")}}},[t._v("")])])],1),t._v(" "),n("li",[n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMore,callback:function(e){t.showMore=e},expression:"showMore"}},[n("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:t.windowSmall||t.showMore,placement:"top",content:t.$L("展开")},slot:"reference"},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.recordReady?n("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("meeting")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("新会议"))+"\n ")]):t._e(),t._v(" "),n("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("image")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("发送图片"))+"\n ")]),t._v(" "),n("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("file")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("上传文件"))+"\n ")])],1)],1),t._v(" "),n("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:t.clickSend,expression:"clickSend"}],staticClass:"chat-send",class:t.sendClass},[n("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("发送")}},[t.loading?n("div",[n("div",{staticClass:"chat-load"},[n("Loading")],1)]):n("div",[n("transition",{attrs:{name:"mobile-send"}},["recorder"===t.sendClass?n("i",{staticClass:"taskfont"},[t._v("")]):t._e()]),t._v(" "),n("transition",{attrs:{name:"mobile-send"}},["recorder"!==t.sendClass?n("i",{staticClass:"taskfont"},[t._v("")]):t._e()])],1)])],1),t._v(" "),t.recordReady?n("li",{staticClass:"chat-record-recwave"},[n("div",{ref:"recwave"})]):t._e()]),t._v(" "),n("div",{staticClass:"chat-cover",on:{click:function(e){return e.stopPropagation(),t.onClickCover.apply(null,arguments)}}})]),t._v(" "),t.emojiBottom&&t.showEmoji?n("ChatEmoji",{on:{"on-select":t.onSelectEmoji}}):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},[["ready","ing"].includes(t.recordState)?n("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:t.touchLimitY},style:t.recordTransferStyle,attrs:{"data-transfer":!0},on:{click:t.stopRecord}},[t.recordDuration>0?n("div",{staticClass:"record-duration"},[t._v(t._s(t.recordFormatDuration))]):n("div",{staticClass:"record-loading"},[n("Loading")],1),t._v(" "),n("div",{staticClass:"record-cancel",on:{click:function(e){return e.stopPropagation(),t.stopRecord(!0)}}},[t._v(t._s(t.$L(t.touchLimitY?"松开取消":"向上滑动取消")))])]):t._e()])],1)}),[],!1,null,null,null).exports},30206:(t,e,n)=>{"use strict";n.d(e,{Z:()=>xt});var i=n(20629);const o={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style:function(){var t=this.size;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args:function(){var t=this.percent,e=Math.min(360,3.6*t);return 360==e?e=0:0==e&&(e=360),{x:14,y:14,r:14,start:360,end:e}}},methods:{isNumeric:function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},point:function(t,e,n,i){return[(t+Math.sin(i)*n).toFixed(2),(e-Math.cos(i)*n).toFixed(2)]},full:function(t,e,n,i){return i<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-i," ").concat(e," A ").concat(i," ").concat(i," 0 1 1 ").concat(t+i," ").concat(e," A ").concat(i," ").concat(i," 1 1 1 ").concat(t-i," ").concat(e," Z")},part:function(t,e,n,i,o,r){var s=o/360*2*Math.PI,a=r/360*2*Math.PI,l=[this.point(t,e,i,s),this.point(t,e,n,s),this.point(t,e,n,a),this.point(t,e,i,a)],u=a-s>Math.PI?"1":"0";return"M ".concat(l[0][0]," ").concat(l[0][1]," L ").concat(l[1][0]," ").concat(l[1][1]," A ").concat(n," ").concat(n," 0 ").concat(u," 1 ").concat(l[2][0]," ").concat(l[2][1]," L ").concat(l[3][0]," ").concat(l[3][1]," A ").concat(i," ").concat(i," 0 ").concat(u," 0 ").concat(l[0][0]," ").concat(l[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,i=t.y,o=void 0===i?0:i,r=t.R,s=void 0===r?0:r,a=t.r,l=void 0===a?0:a,u=t.start,c=t.end,f=[Math.max(s,l),Math.min(s,l)];if(l=f[1],(s=f[0])<=0)return"";if(u!==+u||c!==+c)return this.full(n,o,s,l);if(Math.abs(u-c)<1e-6)return"";if(Math.abs(u-c)%360<1e-6)return this.full(n,o,s,l);var d=[u%360,c%360];return(u=d[0])>(c=d[1])&&(c+=360),this.part(n,o,s,l,u,c)}}},r=o;var s=n(51900);const a=(0,s.Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.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"}}),t._v(" "),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"}}),t._v(" "),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports;var l=n(80641),u=n(5317),c=n(87131);function f(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n]*?>$/.test(n.text)||/^\s*\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(n.text))&&o.push("transparent"),o},contentClass:function(){var t=this.msgData,e=t.type,n=t.msg,i=[];return"text"===e&&(/^
]*?>$/.test(n.text)?i.push("an-emoticon"):/^\s*
\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(n.text)?i.push("three-emoji"):/^\s*
\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(n.text)?i.push("two-emoji"):/^\s*
\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(n.text)&&i.push("an-emoji")),i}}),watch:{msgData:{handler:function(){this.msgRead()},immediate:!0},operateAction:function(t){var e=this;this.operateEnter=!1,t&&setTimeout((function(t){e.operateEnter=!0}),500)}},methods:{handleLongpress:function(t,e){this.$emit("on-longpress",{event:t,el:e,msgData:this.msgData})},msgRead:function(){!0!==this.msgData._r&&(this.msgData._r=!0,this.$store.dispatch("dialogMsgRead",this.msgData))},openReadPercentage:function(){var t=this;this.popperLoad>0||(this.popperShow?this.popperShow=!1:(this.popperLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.allList=n})).catch((function(){t.allList=[]})).finally((function(e){setTimeout((function(){t.popperLoad--,t.popperShow=!0}),100)}))))},textMsg:function(t){return(0,c.textMsgFormat)(t,this.userId)},recordStyle:function(t){var e=t.duration;return{width:50+Math.min(180,Math.floor(e/150))+"px"}},recordDuration:function(t){var e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60;return e>0?"".concat(e,":").concat(n,"″"):"".concat(Math.max(1,n),"″")},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var i=e,o=n;return(e>220||n>220)&&(e>n?(i=220,o=n*(220/e)):(i=e*(220/n),o=220)),{width:i+"px",height:o+"px"}}return{}},playRecord:function(){this.operateVisible||l.Store.set("audioSubscribe",{id:this.msgData.id,src:this.msgData.msg.path})},openMeeting:function(){this.operateVisible||l.Store.set("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id)})).catch((function(t){var e=t.msg;$A.messageError(e,301)})).finally((function(e){t.$Modal.remove()}))}})},viewText:function(t){var e=t.target;if(!this.operateVisible)switch(e.nodeName){case"IMG":e.classList.contains("browse")?this.viewPicture(e.currentSrc):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=this.getTextImageInfos(e.outerHTML));break;case"SPAN":e.classList.contains("mention")&&e.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(e.getAttribute("data-id")))}},viewFile:function(){if(!this.operateVisible){var t=this.msgData.msg;if(["jpg","jpeg","gif","png"].includes(t.ext))this.viewPicture(t.path);else{var e="/single/file/msg/".concat(this.msgData.id);this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-".concat(this.msgData.id),path:e,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"web",pageTitle:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),statusBarStyle:!1,url:$A.apiUrl("../token?token=".concat(this.userToken,"&from=").concat(encodeURIComponent($A.apiUrl("..".concat(e)))))}):window.open($A.apiUrl("..".concat(e)))}}},viewPicture:function(t){var e=this,n=this.msgData.dialog_id,i=$A.cloneJSON(this.dialogMsgs.filter((function(t){if(t.dialog_id===n){if("file"===t.type)return["jpg","jpeg","gif","png"].includes(t.msg.ext);if("text"===t.type)return t.msg.text.match(/
]*?>/)}return!1}))).sort((function(t,e){return t.id-e.id})),o=[];i.some((function(t){var n=t.type,i=t.msg;"file"===n?o.push({src:i.path,width:i.width,height:i.height}):"text"===n&&o.push.apply(o,f(e.getTextImageInfos(i.text)))}));var r=o.findIndex((function(e){return e.src===t}));r>-1?(this.$store.state.previewImageIndex=r,this.$store.state.previewImageList=o):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t])},getTextImageInfos:function(t){var e=$A.apiUrl("../"),n=t.match(new RegExp("
]*?>","g")),i=[];if(n){var o=new RegExp("src=([\"'])([^'\"]*)\\1"),r=new RegExp('(original-)?width="(\\d+)"'),s=new RegExp('(original-)?height="(\\d+)"');n.some((function(t){var n=t.match(o),a=t.match(r),l=t.match(s);n&&i.push({src:n[2].replace(/\{\{RemoteURL\}\}/g,e),width:a?a[2]:-1,height:l?l[2]:-1})}))}return i},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})},setEmoji:function(t){var e=this;setTimeout((function(t){e.emojiLoad++}),600),this.$store.dispatch("call",{url:"dialog/msg/emoji",data:{msg_id:this.msgData.id,emoji:t}}).then((function(t){var n=t.data;e.$store.dispatch("saveDialogMsg",n)})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(t){e.emojiLoad--}))}}};const g=(0,s.Z)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-view",class:t.viewClass,attrs:{"data-id":t.msgData.id}},["group"===t.dialogType?n("div",{staticClass:"dialog-username"},[n("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}})],1):t._e(),t._v(" "),n("div",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.handleLongpress,delay:300},expression:"{\n callback: handleLongpress,\n delay: 300,\n }"}],staticClass:"dialog-head",class:t.headClass},[n("div",{staticClass:"dialog-content",class:t.contentClass},["text"===t.msgData.type?n("div",{staticClass:"content-text no-dark-content"},[n("pre",{domProps:{innerHTML:t._s(t.textMsg(t.msgData.msg.text))},on:{click:t.viewText}})]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):n("div",{staticClass:"file-box"},[n("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),n("div",{staticClass:"file-info"},[n("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):"record"===t.msgData.type?n("div",{staticClass:"content-record no-dark-content"},[n("div",{staticClass:"dialog-record",class:{playing:t.audioPlaying===t.msgData.msg.path},style:t.recordStyle(t.msgData.msg),on:{click:t.playRecord}},[n("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msgData.msg.duration)))]),t._v(" "),n("div",{staticClass:"record-icon taskfont"})])]):"meeting"===t.msgData.type?n("div",{staticClass:"content-meeting no-dark-content"},[n("ul",{staticClass:"dialog-meeting"},[n("li",[n("em",[t._v(t._s(t.$L("会议主题")))]),t._v("\n "+t._s(t.msgData.msg.name)+"\n ")]),t._v(" "),n("li",[n("em",[t._v(t._s(t.$L("会议创建人")))]),t._v(" "),n("UserAvatar",{attrs:{userid:t.msgData.msg.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":""}})],1),t._v(" "),n("li",[n("em",[t._v(t._s(t.$L("频道ID")))]),t._v("\n "+t._s(t.msgData.msg.meetingid.replace(/^(.{3})(.{3})(.*)$/,"$1 $2 $3"))+"\n ")]),t._v(" "),n("li",{staticClass:"meeting-operation",on:{click:t.openMeeting}},[t._v("\n "+t._s(t.$L("点击加入会议"))+"\n "),n("i",{staticClass:"taskfont"},[t._v("")])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.$A.arrayLength(t.msgData.emoji)>0?n("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,(function(e,i){return n("li",{key:i,class:{hasme:e.userids.includes(t.userId)},on:{click:function(n){return t.setEmoji(e.symbol)}}},[n("div",{staticClass:"emoji-symbol no-dark-content"},[t._v(t._s(e.symbol))]),t._v(" "),n("div",{staticClass:"emoji-num"},[t._v(t._s(e.userids.length))])])})),0):t._e()]),t._v(" "),t.emojiLoad>0||!t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("Loading")],1):n("div",{staticClass:"dialog-foot"},[t.timeShow?n("div",{staticClass:"time",on:{click:function(e){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):n("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(e){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.hidePercentage?t._e():[t.msgData.send>1||"group"===t.dialogType?n("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[n("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:"left-end"},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"read-poptip-content"},[n("ul",{staticClass:"read scrollbar-overlay"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2),t._v(" "),n("ul",{staticClass:"unread scrollbar-overlay"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2)]),t._v(" "),n("div",{attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.popperLoad>0?n("Loading"):n("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?n("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):n("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]],2)])}),[],!1,null,null,null).exports;const y={name:"DialogUpload",props:{dialogId:{type:Number,default:0},maxSize:{type:Number,default:204800}},data:function(){return{uploadFormat:["text","md","markdown","drawio","mind","docx","wps","doc","xls","xlsx","ppt","pptx","jpg","jpeg","png","gif","bmp","ico","raw","rar","zip","jar","7-zip","tar","gzip","7z","tif","tiff","dwg","dxf","ofd","pdf","txt","htaccess","htgroups","htpasswd","conf","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","cs","css","dockerfile","go","golang","html","htm","xhtml","vue","we","wpy","java","js","jsm","jsx","json","jsp","less","lua","makefile","gnumakefile","ocamlmakefile","make","mysql","nginx","ini","cfg","prefs","m","mm","pl","pm","p6","pl6","pm6","pgsql","php","inc","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","py","r","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scss","sh","bash","bashrc","sql","sqlserver","swift","ts","typescript","str","vbs","vb","v","vh","sv","svh","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","yaml","yml","asp","properties","gitignore","log","bas","prg","python","ftl","aspx","plist","mp3","wav","mp4","flv","avi","mov","wmv","mkv","3gp","rm","xmind","rp"],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:{headers:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params:function(){return{dialog_id:this.dialogId}}},methods:{handleProgress:function(t,e){void 0===e.tempId&&(e.tempId=$A.randomString(8),this.$emit("on-progress",e))},handleSuccess:function(t,e){1===t.ret?(e.data=t.data,this.$emit("on-success",e),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+t.msg}),this.$emit("on-error",e),this.$refs.upload.fileList.pop())},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};const b=(0,s.Z)(y,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var _=n(57127),w=n(37332);function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function k(t){for(var e=1;e-1&&this.dialogUser.splice(e,1,Object.assign(t,{id:this.dialogUser[e].id,created_at:this.dialogUser[e].created_at}))},openAdd:function(){this.addData={dialog_id:this.dialogId,userids:[],disabledChoice:this.dialogUser.map((function(t){return t.userid}))},this.addShow=!0},onAdd:function(){var t=this;this.addLoad++,this.$store.dispatch("call",{url:"dialog/group/adduser",data:this.addData}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addShow=!1,t.addData={},t.getDialogUser()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.addLoad--}))},onExit:function(t){var e=this,n="你确定要退出群组吗?",i=[];$A.isJson(t)&&(n="你确定要将【".concat(t.nickname,"】移出群组吗?"),i=[t.userid]),$A.modalConfirm({content:n,loading:!0,onOk:function(){e.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:e.dialogId,userids:i}}).then((function(t){var n=t.msg;$A.messageSuccess(n),i.length>0?e.getDialogUser():(e.$store.dispatch("forgetDialog",e.dialogId),e.goForward({name:"manage-messenger"}))})).catch((function(t){var e=t.msg;$A.modalError(e,301)})).finally((function(t){e.$Modal.remove()}))}})},onDisband:function(){var t=this;$A.modalConfirm({content:"你确定要解散【".concat(this.dialogData.name,"】群组吗?"),loading:!0,okText:"解散",onOk:function(){t.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:t.dialogId}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;$A.modalError(e,301)})).finally((function(e){t.$Modal.remove()}))}})}}};const A=(0,s.Z)(E,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-group-info"},[n("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群名")))]),t._v(" "),n("div",{staticClass:"group-info-value"},[n("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),t._v(" "),n("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群类型")))]),t._v(" "),n("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),t._v(" "),n("div",{staticClass:"group-info-search"},[n("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("搜索"),clearable:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})],1),t._v(" "),n("div",{staticClass:"group-info-user"},[n("ul",[t._l(t.userList,(function(e,i){return n("li",{key:i},[n("UserAvatar",{attrs:{userid:e.userid,size:32,"user-result":t.userResult,showName:"",tooltipDisabled:""}}),t._v(" "),e.userid===t.dialogData.owner_id?n("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("群主")))]):t.dialogData.owner_id==t.userId?n("Icon",{staticClass:"user-exit",attrs:{type:"md-exit"},on:{click:function(n){return t.onExit(e)}}}):t._e()],1)})),t._v(" "),0===t.userList.length?n("li",{staticClass:"no"},[t.loadIng>0?n("Loading"):n("span",[t._v(t._s(t.$L("没有符合条件的数据")))])],1):t._e()],2)]),t._v(" "),t.dialogData.owner_id==t.userId?n("div",{staticClass:"group-info-button"},[n("Button",{attrs:{type:"primary"},on:{click:t.openAdd}},[t._v(t._s(t.$L("添加成员")))]),t._v(" "),n("Button",{attrs:{type:"error",ghost:""},on:{click:t.onDisband}},[t._v(t._s(t.$L("解散群组")))])],1):n("div",{staticClass:"group-info-button"},[n("Button",{attrs:{type:"error",ghost:""},on:{click:t.onExit}},[t._v(t._s(t.$L("退出群组")))])],1),t._v(" "),n("Modal",{attrs:{title:t.$L("添加群成员"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[n("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("新增成员")}},[n("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.addData.userids,callback:function(e){t.$set(t.addData,"userids",e)},expression:"addData.userids"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("确定添加")))])],1)],1)],1)}),[],!1,null,null,null).exports;var S=n(50307);var C=void 0;function T(){T.init||(T.init=!0,C=-1!==function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}())}var j={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!C&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var t=this;T(),this.$nextTick((function(){t._w=t.$el.offsetWidth,t._h=t.$el.offsetHeight}));var e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",C&&this.$el.appendChild(e),e.data="about:blank",C||this.$el.appendChild(e)},beforeDestroy:function(){this.removeResizeHandlers()}};var L={version:"0.4.5",install:function(t){t.component("resize-observer",j),t.component("ResizeObserver",j)}},N=null;"undefined"!=typeof window?N=window.Vue:void 0!==n.g&&(N=n.g.Vue),N&&N.use(L);function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function D(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},s=function(s){for(var a=arguments.length,l=new Array(a>1?a-1:0),u=1;u1){var i=t.find((function(t){return t.isIntersecting}));i&&(e=i)}if(n.callback){var o=e.isIntersecting&&e.intersectionRatio>=n.threshold;if(o===n.oldResult)return;n.oldResult=o,n.callback(o,e)}}),this.options.intersection),e.context.$nextTick((function(){n.observer&&n.observer.observe(n.el)}))}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&this.options.intersection.threshold||0}}],n&&D(e.prototype,n),i&&D(e,i),t}();function M(t,e,n){var i=e.value;if(i)if("undefined"==typeof IntersectionObserver)console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new $(t,i,n);t._vue_visibilityState=o}}function R(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var B={bind:M,update:function(t,e,n){var i=e.value;if(!q(i,e.oldValue)){var o=t._vue_visibilityState;i?o?o.createObserver(i,n):M(t,{value:i},n):R(t)}},unbind:R};var z={version:"0.4.6",install:function(t){t.directive("observe-visibility",B)}},U=null;"undefined"!=typeof window?U=window.Vue:void 0!==n.g&&(U=n.g.Vue),U&&U.use(z);var F=n(27274),H=n.n(F),V={itemsLimit:1e3};function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function Y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Z(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,r=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return r=t.done,t},e:function(t){s=!0,o=t},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw o}}}}var Q={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}}};function J(){return this.items.length&&"object"!==K(this.items[0])}var tt=!1;if("undefined"!=typeof window){tt=!1;try{var et=Object.defineProperty({},"passive",{get:function(){tt=!0}});window.addEventListener("test",null,et)}catch(t){}}var nt=0;function it(t,e,n,i,o,r,s,a,l,u){"boolean"!=typeof s&&(l=a,a=s,s=!1);const c="function"==typeof n?n.options:n;let f;if(t&&t.render&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0,o&&(c.functional=!0)),i&&(c._scopeId=i),r?(f=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=f):e&&(f=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),f)if(c.functional){const t=c.render;c.render=function(e,n){return f.call(n),t(e,n)}}else{const t=c.beforeCreate;c.beforeCreate=t?[].concat(t,f):[f]}return n}const ot={name:"RecycleScroller",components:{ResizeObserver:j},directives:{ObserveVisibility:B},props:Z({},Q,{itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}}),data:function(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes:function(){if(null===this.itemSize){for(var t,e={"-1":{accumulator:0}},n=this.items,i=this.sizeField,o=this.minItemSize,r=1e4,s=0,a=0,l=n.length;a1&&void 0!==arguments[1]&&arguments[1],n=this.$_unusedViews,i=t.nr.type,o=n.get(i);o||(o=[],n.set(i,o)),o.push(t),e||(t.nr.used=!1,t.position=-9999,this.$_views.delete(t.nr.key))},handleResize:function(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll:function(t){var e=this;this.disabled||(this.$_scrollDirty||(this.$_scrollDirty=!0,requestAnimationFrame((function(){e.$_scrollDirty=!1,e.updateVisibleItems(!1,!0).continuous||(clearTimeout(e.$_refreshTimout),e.$_refreshTimout=setTimeout(e.handleScroll,100))}))),this.$emit("onScroll",t))},handleVisibilityChange:function(t,e){var n=this;this.ready&&(t||0!==e.boundingClientRect.width||0!==e.boundingClientRect.height?(this.$emit("visible"),requestAnimationFrame((function(){n.updateVisibleItems(!1)}))):this.$emit("hidden"))},updateVisibleItems:function(t){var e,n,i,o,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=this.itemSize,a=this.$_computedMinItemSize,l=this.typeField,u=this.simpleArray?null:this.keyField,c=this.items,f=c.length,d=this.sizes,h=this.$_views,p=this.$_unusedViews,v=this.pool;if(f)if(this.$_prerender)e=0,n=this.prerender,i=null;else{var m=this.getScroll();if(r){var g=m.start-this.$_lastUpdateScrollPosition;if(g<0&&(g=-g),null===s&&gm.start&&(w=O),O=~~((_+w)/2)}while(O!==b);for(O<0&&(O=0),e=O,i=d[f-1].accumulator,n=O;nf&&(n=f)}else(e=~~(m.start/s))<0&&(e=0),(n=Math.ceil(m.end/s))>f&&(n=f),i=f*s}else e=n=i=0;n-e>V.itemsLimit&&this.itemsLimitError(),this.totalSize=i;var k=e<=this.$_endIndex&&n>=this.$_startIndex;if(this.$_continuous!==k){if(k){h.clear(),p.clear();for(var x=0,E=v.length;x=n)&&this.unuseView(o));for(var C,T,j,L,N=k?null:new Map,P=e;P=j.length)&&(o=this.addView(v,P,C,D,T),this.unuseView(o,!0),j=p.get(T)),(o=j[L]).item=C,o.nr.used=!0,o.nr.index=P,o.nr.key=D,o.nr.type=T,N.set(T,L+1),L++),h.set(D,o)),o.position=null===s?d[P-1].accumulator:P*s):o&&this.unuseView(o)}return this.$_startIndex=e,this.$_endIndex=n,this.emitUpdate&&this.$emit("update",e,n),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,300),{continuous:k}},getListenerTarget:function(){var t=H()(this.$el);return!window.document||t!==window.document.documentElement&&t!==window.document.body||(t=window),t},getScroll:function(){var t,e=this.$el,n="vertical"===this.direction;if(this.pageMode){var i=e.getBoundingClientRect(),o=n?i.height:i.width,r=-(n?i.top:i.left),s=n?window.innerHeight:window.innerWidth;r<0&&(s+=r,r=0),r+s>o&&(s=o-r),t={start:r,end:r+s}}else t=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return t},applyPageMode:function(){this.pageMode?this.addListeners():this.removeListeners()},addListeners:function(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,!!tt&&{passive:!0}),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners:function(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem:function(t){var e;e=null===this.itemSize?t>0?this.sizes[t-1].accumulator:0:t*this.itemSize,this.scrollToPosition(e)},scrollToPosition:function(t){"vertical"===this.direction?this.$el.scrollTop=t:this.$el.scrollLeft=t},itemsLimitError:function(){var t=this;throw setTimeout((function(){console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",t.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")})),new Error("Rendered items limit reached")},sortViews:function(){this.pool.sort((function(t,e){return t.nr.index-e.nr.index}))}}};var rt=function(){var t,e,n=this,i=n.$createElement,o=n._self._c||i;return o("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:n.handleVisibilityChange,expression:"handleVisibilityChange"}],staticClass:"vue-recycle-scroller",class:(t={ready:n.ready,"page-mode":n.pageMode},t["direction-"+n.direction]=!0,t),style:n.scrollerStyle,on:{"&scroll":function(t){return n.handleScroll(t)}}},[n.$slots.before?o("div",{staticClass:"vue-recycle-scroller__slot"},[n._t("before")],2):n._e(),n._v(" "),o("div",{ref:"wrapper",staticClass:"vue-recycle-scroller__item-wrapper",style:(e={},e["vertical"===n.direction?"minHeight":"minWidth"]=n.totalSize+"px",e)},n._l(n.pool,(function(t){return o("div",{key:t.nr.id,staticClass:"vue-recycle-scroller__item-view",class:{hover:n.hoverKey===t.nr.key,visible:-9999!==t.position},style:n.ready?{transform:"translate"+("vertical"===n.direction?"Y":"X")+"("+t.position+"px)"}:null,on:{mouseenter:function(e){n.hoverKey=t.nr.key},mouseleave:function(t){n.hoverKey=null}}},[n._t("default",null,{item:t.item,index:t.nr.index,active:t.nr.used})],2)})),0),n._v(" "),n.$slots.after?o("div",{staticClass:"vue-recycle-scroller__slot"},[n._t("after")],2):n._e(),n._v(" "),o("ResizeObserver",{on:{notify:n.handleResize}})],1)};rt._withStripped=!0;const st=it({render:rt,staticRenderFns:[]},undefined,ot,undefined,!1,undefined,!1,void 0,void 0,void 0);var at={name:"DynamicScroller",components:{RecycleScroller:st},inheritAttrs:!1,provide:function(){return"undefined"!=typeof ResizeObserver&&(this.$_resizeObserver=new ResizeObserver((function(t){var e,n=X(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.target){var o=new CustomEvent("resize",{detail:{contentRect:i.contentRect}});i.target.dispatchEvent(o)}}}catch(t){n.e(t)}finally{n.f()}}))),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},props:Z({},Q,{minItemSize:{type:[Number,String],required:!0}}),data:function(){return{vscrollData:{active:!0,sizes:{},validSizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:J,itemsWithSize:function(){for(var t=[],e=this.items,n=this.keyField,i=this.simpleArray,o=this.vscrollData.sizes,r=0;r0&&void 0!==arguments[0])||arguments[0];(t||this.simpleArray)&&(this.vscrollData.validSizes={}),this.$emit("vscroll:update",{force:!0})},scrollToItem:function(t){var e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this.simpleArray?null!=e?e:this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom:function(){var t=this;if(!this.$_scrollingToBottom){this.$_scrollingToBottom=!0;var e=this.$el;this.$nextTick((function(){e.scrollTop=e.scrollHeight+5e3;requestAnimationFrame((function n(){e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame((function(){e.scrollTop=e.scrollHeight+5e3,0===t.$_undefinedSizes?t.$_scrollingToBottom=!1:requestAnimationFrame(n)}))}))}))}}}};const lt=at;var ut=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("RecycleScroller",t._g(t._b({ref:"scroller",attrs:{items:t.itemsWithSize,"min-item-size":t.minItemSize,direction:t.direction,"key-field":"id"},on:{resize:t.onScrollerResize,visible:t.onScrollerVisible},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.item,i=e.index,o=e.active;return[t._t("default",null,null,{item:n.item,index:i,active:o,itemWithSize:n})]}}],null,!0)},"RecycleScroller",t.$attrs,!1),t.listeners),[t._v(" "),n("template",{slot:"before"},[t._t("before")],2),t._v(" "),n("template",{slot:"after"},[t._t("after")],2)],2)};ut._withStripped=!0;const ct=it({render:ut,staticRenderFns:[]},undefined,lt,undefined,!1,undefined,!1,void 0,void 0,void 0);const ft=it({},undefined,{name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},computed:{id:function(){return this.vscrollData.simpleArray?this.index:this.item[this.vscrollData.keyField]},size:function(){return this.vscrollData.validSizes[this.id]&&this.vscrollData.sizes[this.id]||0},finalActive:function(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id:function(){this.size||this.onDataUpdate()},finalActive:function(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created:function(){var t=this;if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){var e=function(e){t.$watch((function(){return t.sizeDependencies[e]}),t.onDataUpdate)};for(var n in this.sizeDependencies)e(n);this.vscrollParent.$on("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$on("vscroll:update-size",this.onVscrollUpdateSize)}},mounted:function(){this.vscrollData.active&&(this.updateSize(),this.observeSize())},beforeDestroy:function(){this.vscrollParent.$off("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$off("vscroll:update-size",this.onVscrollUpdateSize),this.unobserveSize()},methods:{updateSize:function(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData:function(){var t=this;this.watchData?this.$_watchData=this.$watch("data",(function(){t.onDataUpdate()}),{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate:function(t){var e=t.force;!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),this.$_forceNextVScrollUpdate!==this.id&&!e&&this.size||this.updateSize()},onDataUpdate:function(){this.updateSize()},computeSize:function(t){var e=this;this.$nextTick((function(){if(e.id===t){var n=e.$el.offsetWidth,i=e.$el.offsetHeight;e.applySize(n,i)}e.$_pendingSizeUpdate=null}))},applySize:function(t,e){var n=Math.round("vertical"===this.vscrollParent.direction?e:t);n&&this.size!==n&&(this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.$set(this.vscrollData.sizes,this.id,n),this.$set(this.vscrollData.validSizes,this.id,!0),this.emitResize&&this.$emit("resize",this.id))},observeSize:function(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.observe(this.$el.parentNode),this.$el.parentNode.addEventListener("resize",this.onResize))},unobserveSize:function(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.unobserve(this.$el.parentNode),this.$el.parentNode.removeEventListener("resize",this.onResize))},onResize:function(t){var e=t.detail.contentRect,n=e.width,i=e.height;this.applySize(n,i)}},render:function(t){return t(this.tag,this.$slots.default)}},undefined,undefined,undefined,!1,void 0,void 0,void 0);var dt={version:"1.0.10-3",install:function(t,e){var n=Object.assign({},{installComponents:!0,componentsPrefix:""},e);for(var i in n)void 0!==n[i]&&(V[i]=n[i]);n.installComponents&&function(t,e){t.component("".concat(e,"recycle-scroller"),st),t.component("".concat(e,"RecycleScroller"),st),t.component("".concat(e,"dynamic-scroller"),ct),t.component("".concat(e,"DynamicScroller"),ct),t.component("".concat(e,"dynamic-scroller-item"),ft),t.component("".concat(e,"DynamicScrollerItem"),ft)}(t,n.componentsPrefix)}},ht=null;"undefined"!=typeof window?ht=window.Vue:void 0!==n.g&&(ht=n.g.Vue),ht&&ht.use(dt);var pt=n(93379),vt=n.n(pt),mt=n(2557),gt={insert:"head",singleton:!1};vt()(mt.Z,gt);mt.Z.locals;function yt(t){return function(t){if(Array.isArray(t))return bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&this.dialogData.id>0},dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},dialogMsgList:function(){var t=this;return this.isReady?this.dialogMsgs.filter((function(e){return e.dialog_id==t.dialogId})).sort((function(t,e){return t.id-e.id})):[]},tempMsgList:function(){var t=this;return this.isReady?this.tempMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},allMsgList:function(){var t=this.dialogMsgList,e=this.tempMsgList;if(e.length>0){var n=[];return n.push.apply(n,yt(t)),n.push.apply(n,yt(e)),n}return t},peopleNum:function(){return"group"===this.dialogData.type?$A.runNum(this.dialogData.people):0},pasteTitle:function(){var t=this.pasteItem,e=t.find((function(t){return"image"==t.type})),n=t.find((function(t){return"image"!=t.type}));return e&&n?"发送文件/图片":e?"发送图片":"发送文件"},wrapperClass:function(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},pasteWrapperClass:function(){return this.pasteItem.find((function(t){return"image"!==t.type}))?["multiple"]:[]},msgUnreadOnly:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e)})),t<=0?"":(t>99&&(t="99+"),String(t))},isMyDialog:function(){var t=this.dialogData,e=this.userId;return t.dialog_user&&t.dialog_user.userid==e}}),watch:{dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.$store.dispatch("getDialogMsgs",t).catch((function(t){})),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:t}),this.autoFocus&&this.$nextTick((function(t){e.$refs.input.focus()})))},immediate:!0},dialogMsgTransfer:{handler:function(t){var e=this,n=t.time,i=t.msgFile,o=t.msgRecord,r=t.msgText;n>$A.Time()&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick((function(){$A.isArray(i)&&i.length>0?e.sendFileMsg(i):$A.isJson(o)&&o.duration>0?e.sendRecord(o):r&&e.sendMsg(r)})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId).catch((function(t){}))},allMsgList:function(t,e){var n=this,i=this.scrollInfo().scrollE;if(0===e.length&&(this.scrollerShow=!1),this.allMsgs=t,i>10&&e.length>0){var o=e[e.length-1].id,r=t.filter((function(t){return t.id&&t.id>o}));this.msgNew+=r.length}else requestAnimationFrame(this.onToBottom);this.allMsgTimer&&clearTimeout(this.allMsgTimer),this.scrollerShow||(this.allMsgTimer=setTimeout((function(t){n.scrollerShow=!0}),100))},windowScrollY:function(t){if($A.isIos()){var e=this.scrollInfo().scrollE;this.navStyle={marginTop:t+"px"},e<=10&&requestAnimationFrame(this.onToBottom)}},dialogDrag:function(t){t&&(this.operateVisible=!1)}},methods:{sendMsg:function(t){var e,n=this;if("string"==typeof t&&t?e=t:(e=this.msgText,this.msgText=""),""!=e){e=e.replace(/<\/span> <\/p>$/,"