| 1 |
- (function(){var e={7155:function(e,t,i){i(9434),i(3335),i(3748),i(9713),i(1823),i(1388),i(3261),i(4805),i(3235),i(9664),i(4318),i(5811),i(54),i(4569),function(t,i){e.exports=i()}("undefined"!==typeof self&&self,function(){return function(e){var t={};function i(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(s,n,function(t){return e[t]}.bind(null,n));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({"01f9":function(e,t,i){"use strict";var s=i("2d00"),n=i("5ca1"),a=i("2aba"),o=i("32e9"),r=i("84f2"),c=i("41a0"),l=i("7f20"),d=i("38fd"),u=i("2b4c")("iterator"),h=!([].keys&&"next"in[].keys()),p="@@iterator",m="keys",g="values",f=function(){return this};e.exports=function(e,t,i,v,y,b,C){c(i,t,v);var x,w,k,E=function(e){if(!h&&e in S)return S[e];switch(e){case m:return function(){return new i(this,e)};case g:return function(){return new i(this,e)}}return function(){return new i(this,e)}},_=t+" Iterator",I=y==g,A=!1,S=e.prototype,T=S[u]||S[p]||y&&S[y],M=T||E(y),D=y?I?E("entries"):M:void 0,L="Array"==t&&S.entries||T;if(L&&(k=d(L.call(new e)),k!==Object.prototype&&k.next&&(l(k,_,!0),s||"function"==typeof k[u]||o(k,u,f))),I&&T&&T.name!==g&&(A=!0,M=function(){return T.call(this)}),s&&!C||!h&&!A&&S[u]||o(S,u,M),r[t]=M,r[_]=f,y)if(x={values:I?M:E(g),keys:b?M:E(m),entries:D},C)for(w in x)w in S||a(S,w,x[w]);else n(n.P+n.F*(h||A),t,x);return x}},"02f4":function(e,t,i){var s=i("4588"),n=i("be13");e.exports=function(e){return function(t,i){var a,o,r=String(n(t)),c=s(i),l=r.length;return c<0||c>=l?e?"":void 0:(a=r.charCodeAt(c),a<55296||a>56319||c+1===l||(o=r.charCodeAt(c+1))<56320||o>57343?e?r.charAt(c):a:e?r.slice(c,c+2):o-56320+(a-55296<<10)+65536)}}},"0390":function(e,t,i){"use strict";var s=i("02f4")(!0);e.exports=function(e,t,i){return t+(i?s(e,t).length:1)}},"0a49":function(e,t,i){var s=i("9b43"),n=i("626a"),a=i("4bf8"),o=i("9def"),r=i("cd1c");e.exports=function(e,t){var i=1==e,c=2==e,l=3==e,d=4==e,u=6==e,h=5==e||u,p=t||r;return function(t,r,m){for(var g,f,v=a(t),y=n(v),b=s(r,m,3),C=o(y.length),x=0,w=i?p(t,C):c?p(t,0):void 0;C>x;x++)if((h||x in y)&&(g=y[x],f=b(g,x,v),e))if(i)w[x]=f;else if(f)switch(e){case 3:return!0;case 5:return g;case 6:return x;case 2:w.push(g)}else if(d)return!1;return u?-1:l||d?d:w}}},"0bfb":function(e,t,i){"use strict";var s=i("cb7c");e.exports=function(){var e=s(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,i){var s=i("ce10"),n=i("e11e");e.exports=Object.keys||function(e){return s(e,n)}},1169:function(e,t,i){var s=i("2d95");e.exports=Array.isArray||function(e){return"Array"==s(e)}},"117e":function(e,t,i){},"11e9":function(e,t,i){var s=i("52a7"),n=i("4630"),a=i("6821"),o=i("6a99"),r=i("69a8"),c=i("c69a"),l=Object.getOwnPropertyDescriptor;t.f=i("9e1e")?l:function(e,t){if(e=a(e),t=o(t,!0),c)try{return l(e,t)}catch(i){}if(r(e,t))return n(!s.f.call(e,t),e[t])}},1495:function(e,t,i){var s=i("86cc"),n=i("cb7c"),a=i("0d58");e.exports=i("9e1e")?Object.defineProperties:function(e,t){n(e);var i,o=a(t),r=o.length,c=0;while(r>c)s.f(e,i=o[c++],t[i]);return e}},"1c4c":function(e,t,i){"use strict";var s=i("9b43"),n=i("5ca1"),a=i("4bf8"),o=i("1fa8"),r=i("33a4"),c=i("9def"),l=i("f1ae"),d=i("27ee");n(n.S+n.F*!i("5cc5")(function(e){Array.from(e)}),"Array",{from:function(e){var t,i,n,u,h=a(e),p="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,f=void 0!==g,v=0,y=d(h);if(f&&(g=s(g,m>2?arguments[2]:void 0,2)),void 0==y||p==Array&&r(y))for(t=c(h.length),i=new p(t);t>v;v++)l(i,v,f?g(h[v],v):h[v]);else for(u=y.call(h),i=new p;!(n=u.next()).done;v++)l(i,v,f?o(u,g,[n.value,v],!0):n.value);return i.length=v,i}})},"1fa8":function(e,t,i){var s=i("cb7c");e.exports=function(e,t,i,n){try{return n?t(s(i)[0],i[1]):t(i)}catch(o){var a=e["return"];throw void 0!==a&&s(a.call(e)),o}}},"20d6":function(e,t,i){"use strict";var s=i("5ca1"),n=i("0a49")(6),a="findIndex",o=!0;a in[]&&Array(1)[a](function(){o=!1}),s(s.P+s.F*o,"Array",{findIndex:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(a)},"20e3":function(e,t,i){"use strict";i("ef69")},"214f":function(e,t,i){"use strict";i("b0c5");var s=i("2aba"),n=i("32e9"),a=i("79e5"),o=i("be13"),r=i("2b4c"),c=i("520a"),l=r("species"),d=!a(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),u=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2===i.length&&"a"===i[0]&&"b"===i[1]}();e.exports=function(e,t,i){var h=r(e),p=!a(function(){var t={};return t[h]=function(){return 7},7!=""[e](t)}),m=p?!a(function(){var t=!1,i=/a/;return i.exec=function(){return t=!0,null},"split"===e&&(i.constructor={},i.constructor[l]=function(){return i}),i[h](""),!t}):void 0;if(!p||!m||"replace"===e&&!d||"split"===e&&!u){var g=/./[h],f=i(o,h,""[e],function(e,t,i,s,n){return t.exec===c?p&&!n?{done:!0,value:g.call(t,i,s)}:{done:!0,value:e.call(i,t,s)}:{done:!1}}),v=f[0],y=f[1];s(String.prototype,e,v),n(RegExp.prototype,h,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},"224d":function(e,t,i){},"230e":function(e,t,i){var s=i("d3f4"),n=i("7726").document,a=s(n)&&s(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},"23c6":function(e,t,i){var s=i("2d95"),n=i("2b4c")("toStringTag"),a="Arguments"==s(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(i){}};e.exports=function(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=o(t=Object(e),n))?i:a?s(t):"Object"==(r=s(t))&&"function"==typeof t.callee?"Arguments":r}},"260f":function(e,t,i){"use strict";i("43e9")},2621:function(e,t){t.f=Object.getOwnPropertySymbols},2638:function(e,t,i){"use strict";function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t,i=1;i<arguments.length;i++)for(var s in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},s.apply(this,arguments)}var n=["attrs","props","domProps"],a=["class","style","directives"],o=["on","nativeOn"],r=function(e){return e.reduce(function(e,t){for(var i in t)if(e[i])if(-1!==n.indexOf(i))e[i]=s({},e[i],t[i]);else if(-1!==a.indexOf(i)){var r=e[i]instanceof Array?e[i]:[e[i]],l=t[i]instanceof Array?t[i]:[t[i]];e[i]=[].concat(r,l)}else if(-1!==o.indexOf(i))for(var d in t[i])if(e[i][d]){var u=e[i][d]instanceof Array?e[i][d]:[e[i][d]],h=t[i][d]instanceof Array?t[i][d]:[t[i][d]];e[i][d]=[].concat(u,h)}else e[i][d]=t[i][d];else if("hook"===i)for(var p in t[i])e[i][p]=e[i][p]?c(e[i][p],t[i][p]):t[i][p];else e[i]=t[i];else e[i]=t[i];return e},{})},c=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}};e.exports=r},"26fe":function(e,t,i){"use strict";i("224d")},"27ee":function(e,t,i){var s=i("23c6"),n=i("2b4c")("iterator"),a=i("84f2");e.exports=i("8378").getIteratorMethod=function(e){if(void 0!=e)return e[n]||e["@@iterator"]||a[s(e)]}},"2aba":function(e,t,i){var s=i("7726"),n=i("32e9"),a=i("69a8"),o=i("ca5a")("src"),r=i("fa5b"),c="toString",l=(""+r).split(c);i("8378").inspectSource=function(e){return r.call(e)},(e.exports=function(e,t,i,r){var c="function"==typeof i;c&&(a(i,"name")||n(i,"name",t)),e[t]!==i&&(c&&(a(i,o)||n(i,o,e[t]?""+e[t]:l.join(String(t)))),e===s?e[t]=i:r?e[t]?e[t]=i:n(e,t,i):(delete e[t],n(e,t,i)))})(Function.prototype,c,function(){return"function"==typeof this&&this[o]||r.call(this)})},"2aeb":function(e,t,i){var s=i("cb7c"),n=i("1495"),a=i("e11e"),o=i("613b")("IE_PROTO"),r=function(){},c="prototype",l=function(){var e,t=i("230e")("iframe"),s=a.length,n="<",o=">";t.style.display="none",i("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(n+"script"+o+"document.F=Object"+n+"/script"+o),e.close(),l=e.F;while(s--)delete l[c][a[s]];return l()};e.exports=Object.create||function(e,t){var i;return null!==e?(r[c]=s(e),i=new r,r[c]=null,i[o]=e):i=l(),void 0===t?i:n(i,t)}},"2b4c":function(e,t,i){var s=i("5537")("wks"),n=i("ca5a"),a=i("7726").Symbol,o="function"==typeof a,r=e.exports=function(e){return s[e]||(s[e]=o&&a[e]||(o?a:n)("Symbol."+e))};r.store=s},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},"2f21":function(e,t,i){"use strict";var s=i("79e5");e.exports=function(e,t){return!!e&&s(function(){t?e.call(null,function(){},1):e.call(null)})}},"2fdb":function(e,t,i){"use strict";var s=i("5ca1"),n=i("d2c8"),a="includes";s(s.P+s.F*i("5147")(a),"String",{includes:function(e){return!!~n(this,e,a).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"323d":function(e,t,i){},"32e9":function(e,t,i){var s=i("86cc"),n=i("4630");e.exports=i("9e1e")?function(e,t,i){return s.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},"33a4":function(e,t,i){var s=i("84f2"),n=i("2b4c")("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(s.Array===e||a[n]===e)}},"35f3":function(e,t,i){"use strict";i("dc6d")},3738:function(e,t,i){},3846:function(e,t,i){i("9e1e")&&"g"!=/./g.flags&&i("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:i("0bfb")})},"38fd":function(e,t,i){var s=i("69a8"),n=i("4bf8"),a=i("613b")("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=n(e),s(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},"3b2b":function(e,t,i){var s=i("7726"),n=i("5dbc"),a=i("86cc").f,o=i("9093").f,r=i("aae3"),c=i("0bfb"),l=s.RegExp,d=l,u=l.prototype,h=/a/g,p=/a/g,m=new l(h)!==h;if(i("9e1e")&&(!m||i("79e5")(function(){return p[i("2b4c")("match")]=!1,l(h)!=h||l(p)==p||"/a/i"!=l(h,"i")}))){l=function(e,t){var i=this instanceof l,s=r(e),a=void 0===t;return!i&&s&&e.constructor===l&&a?e:n(m?new d(s&&!a?e.source:e,t):d((s=e instanceof l)?e.source:e,s&&a?c.call(e):t),i?this:u,l)};for(var g=function(e){e in l||a(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},f=o(d),v=0;f.length>v;)g(f[v++]);u.constructor=l,l.prototype=u,i("2aba")(s,"RegExp",l)}i("7a56")("RegExp")},"3d91":function(e,t,i){"use strict";i("622b")},"3dfc":function(e,t,i){"use strict";i("3738")},"41a0":function(e,t,i){"use strict";var s=i("2aeb"),n=i("4630"),a=i("7f20"),o={};i("32e9")(o,i("2b4c")("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=s(o,{next:n(1,i)}),a(e,t+" Iterator")}},"43e9":function(e,t,i){},"456d":function(e,t,i){var s=i("4bf8"),n=i("0d58");i("5eda")("keys",function(){return function(e){return n(s(e))}})},4588:function(e,t){var i=Math.ceil,s=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?s:i)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4bf8":function(e,t,i){var s=i("be13");e.exports=function(e){return Object(s(e))}},"504c":function(e,t,i){var s=i("9e1e"),n=i("0d58"),a=i("6821"),o=i("52a7").f;e.exports=function(e){return function(t){var i,r=a(t),c=n(r),l=c.length,d=0,u=[];while(l>d)i=c[d++],s&&!o.call(r,i)||u.push(e?[i,r[i]]:r[i]);return u}}},5147:function(e,t,i){var s=i("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[s]=!1,!"/./"[e](t)}catch(n){}}return!0}},"520a":function(e,t,i){"use strict";var s=i("0bfb"),n=RegExp.prototype.exec,a=String.prototype.replace,o=n,r="lastIndex",c=function(){var e=/a/,t=/b*/g;return n.call(e,"a"),n.call(t,"a"),0!==e[r]||0!==t[r]}(),l=void 0!==/()??/.exec("")[1],d=c||l;d&&(o=function(e){var t,i,o,d,u=this;return l&&(i=new RegExp("^"+u.source+"$(?!\\s)",s.call(u))),c&&(t=u[r]),o=n.call(u,e),c&&o&&(u[r]=u.global?o.index+o[0].length:t),l&&o&&o.length>1&&a.call(o[0],i,function(){for(d=1;d<arguments.length-2;d++)void 0===arguments[d]&&(o[d]=void 0)}),o}),e.exports=o},"52a7":function(e,t){t.f={}.propertyIsEnumerable},5537:function(e,t,i){var s=i("8378"),n=i("7726"),a="__core-js_shared__",o=n[a]||(n[a]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:s.version,mode:i("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"55dd":function(e,t,i){"use strict";var s=i("5ca1"),n=i("d8e8"),a=i("4bf8"),o=i("79e5"),r=[].sort,c=[1,2,3];s(s.P+s.F*(o(function(){c.sort(void 0)})||!o(function(){c.sort(null)})||!i("2f21")(r)),"Array",{sort:function(e){return void 0===e?r.call(a(this)):r.call(a(this),n(e))}})},"5ca1":function(e,t,i){var s=i("7726"),n=i("8378"),a=i("32e9"),o=i("2aba"),r=i("9b43"),c="prototype",l=function(e,t,i){var d,u,h,p,m=e&l.F,g=e&l.G,f=e&l.S,v=e&l.P,y=e&l.B,b=g?s:f?s[t]||(s[t]={}):(s[t]||{})[c],C=g?n:n[t]||(n[t]={}),x=C[c]||(C[c]={});for(d in g&&(i=t),i)u=!m&&b&&void 0!==b[d],h=(u?b:i)[d],p=y&&u?r(h,s):v&&"function"==typeof h?r(Function.call,h):h,b&&o(b,d,h,e&l.U),C[d]!=h&&a(C,d,p),v&&x[d]!=h&&(x[d]=h)};s.core=n,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},"5cc5":function(e,t,i){var s=i("2b4c")("iterator"),n=!1;try{var a=[7][s]();a["return"]=function(){n=!0},Array.from(a,function(){throw 2})}catch(o){}e.exports=function(e,t){if(!t&&!n)return!1;var i=!1;try{var a=[7],r=a[s]();r.next=function(){return{done:i=!0}},a[s]=function(){return r},e(a)}catch(o){}return i}},"5dbc":function(e,t,i){var s=i("d3f4"),n=i("8b97").set;e.exports=function(e,t,i){var a,o=t.constructor;return o!==i&&"function"==typeof o&&(a=o.prototype)!==i.prototype&&s(a)&&n&&n(e,a),e}},"5df3":function(e,t,i){"use strict";var s=i("02f4")(!0);i("01f9")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,i=this._i;return i>=t.length?{value:void 0,done:!0}:(e=s(t,i),this._i+=e.length,{value:e,done:!1})})},"5eda":function(e,t,i){var s=i("5ca1"),n=i("8378"),a=i("79e5");e.exports=function(e,t){var i=(n.Object||{})[e]||Object[e],o={};o[e]=t(i),s(s.S+s.F*a(function(){i(1)}),"Object",o)}},"5f1b":function(e,t,i){"use strict";var s=i("23c6"),n=RegExp.prototype.exec;e.exports=function(e,t){var i=e.exec;if("function"===typeof i){var a=i.call(e,t);if("object"!==typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==s(e))throw new TypeError("RegExp#exec called on incompatible receiver");return n.call(e,t)}},"5fff":function(e,t,i){},"613b":function(e,t,i){var s=i("5537")("keys"),n=i("ca5a");e.exports=function(e){return s[e]||(s[e]=n(e))}},"61c8":function(e,t,i){},"622b":function(e,t,i){},"626a":function(e,t,i){var s=i("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==s(e)?e.split(""):Object(e)}},"628d":function(e,t,i){"use strict";i("5fff")},6762:function(e,t,i){"use strict";var s=i("5ca1"),n=i("c366")(!0);s(s.P,"Array",{includes:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")("includes")},6821:function(e,t,i){var s=i("626a"),n=i("be13");e.exports=function(e){return s(n(e))}},"69a8":function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},"69bb":function(e,t,i){"use strict";i("ba05")},"6a2b":function(e,t,i){},"6a99":function(e,t,i){var s=i("d3f4");e.exports=function(e,t){if(!s(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!s(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!s(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!s(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},"6b54":function(e,t,i){"use strict";i("3846");var s=i("cb7c"),n=i("0bfb"),a=i("9e1e"),o="toString",r=/./[o],c=function(e){i("2aba")(RegExp.prototype,o,e,!0)};i("79e5")(function(){return"/a/b"!=r.call({source:"a",flags:"b"})})?c(function(){var e=s(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?n.call(e):void 0)}):r.name!=o&&c(function(){return r.call(this)})},"6fb5":function(e,t,i){},"718e":function(e,t,i){"use strict";i("e95c")},7333:function(e,t,i){"use strict";var s=i("9e1e"),n=i("0d58"),a=i("2621"),o=i("52a7"),r=i("4bf8"),c=i("626a"),l=Object.assign;e.exports=!l||i("79e5")(function(){var e={},t={},i=Symbol(),s="abcdefghijklmnopqrst";return e[i]=7,s.split("").forEach(function(e){t[e]=e}),7!=l({},e)[i]||Object.keys(l({},t)).join("")!=s})?function(e,t){var i=r(e),l=arguments.length,d=1,u=a.f,h=o.f;while(l>d){var p,m=c(arguments[d++]),g=u?n(m).concat(u(m)):n(m),f=g.length,v=0;while(f>v)p=g[v++],s&&!h.call(m,p)||(i[p]=m[p])}return i}:l},7514:function(e,t,i){"use strict";var s=i("5ca1"),n=i("0a49")(5),a="find",o=!0;a in[]&&Array(1)[a](function(){o=!1}),s(s.P+s.F*o,"Array",{find:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(a)},7726:function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},"77f1":function(e,t,i){var s=i("4588"),n=Math.max,a=Math.min;e.exports=function(e,t){return e=s(e),e<0?n(e+t,0):a(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"7a56":function(e,t,i){"use strict";var s=i("7726"),n=i("86cc"),a=i("9e1e"),o=i("2b4c")("species");e.exports=function(e){var t=s[e];a&&t&&!t[o]&&n.f(t,o,{configurable:!0,get:function(){return this}})}},"7f20":function(e,t,i){var s=i("86cc").f,n=i("69a8"),a=i("2b4c")("toStringTag");e.exports=function(e,t,i){e&&!n(e=i?e:e.prototype,a)&&s(e,a,{configurable:!0,value:t})}},"7f7f":function(e,t,i){var s=i("86cc").f,n=Function.prototype,a=/^\s*function ([^ (]*)/,o="name";o in n||i("9e1e")&&s(n,o,{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},8378:function(e,t){var i=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i)},"83a1":function(e,t,i){},"84f2":function(e,t){e.exports={}},"85ff":function(e,t,i){"use strict";i("cb50")},8615:function(e,t,i){var s=i("5ca1"),n=i("504c")(!1);s(s.S,"Object",{values:function(e){return n(e)}})},"86cc":function(e,t,i){var s=i("cb7c"),n=i("c69a"),a=i("6a99"),o=Object.defineProperty;t.f=i("9e1e")?Object.defineProperty:function(e,t,i){if(s(e),t=a(t,!0),s(i),n)try{return o(e,t,i)}catch(r){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},"8b97":function(e,t,i){var s=i("d3f4"),n=i("cb7c"),a=function(e,t){if(n(e),!s(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,s){try{s=i("9b43")(Function.call,i("11e9").f(Object.prototype,"__proto__").set,2),s(e,[]),t=!(e instanceof Array)}catch(n){t=!0}return function(e,i){return a(e,i),t?e.__proto__=i:s(e,i),e}}({},!1):void 0),check:a}},"8bcf":function(e,t,i){},"8e6e":function(e,t,i){var s=i("5ca1"),n=i("990b"),a=i("6821"),o=i("11e9"),r=i("f1ae");s(s.S,"Object",{getOwnPropertyDescriptors:function(e){var t,i,s=a(e),c=o.f,l=n(s),d={},u=0;while(l.length>u)i=c(s,t=l[u++]),void 0!==i&&r(d,t,i);return d}})},"8fb6":function(e,t,i){"use strict";i("83a1")},9093:function(e,t,i){var s=i("ce10"),n=i("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},9204:function(e,t){var i=Object.defineProperty,s=(e,t,s)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,n=(e,t,i)=>(s(e,"symbol"!=typeof t?t+"":t,i),i);function a(){const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),i=/(?:SymbianOS)/.test(e)||t,s=/(?:Android)/.test(e),n=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||s&&!/(?:Mobile)/.test(e)||n&&/(?:Tablet)/.test(e),o=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:o,isAndroid:s,isPc:!o&&!s&&!i}}function o(e,t=!1,i="block"){e&&(e.className=e.className.replace(/ chat-view-show| chat-view-hidden/g,""),t?(e.style.display=i,e.className+=" chat-view-show"):(e.className+=" chat-view-hidden",e.style.display="none"))}function r(e,t="block"){return e&&e.style.display===t}function c(e,t,i){e.classList[i?"add":"remove"](t)}(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if("childList"===t.type)for(const e of t.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&i(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const i=t(e);fetch(e.href,i)}})();const l=(e=50)=>new Promise(t=>{setTimeout(t,e)}),d=e=>"false"!==String(e)&&"null"!==String(e)&&"0"!==String(e),u=(e,t,i=!1)=>{let s;return function(...n){const a=this,o=()=>{s=null,i||e.apply(a,n)},r=i&&!s;clearTimeout(s),s=setTimeout(o,t),r&&e.apply(a,n)}},h=(e,t)=>{let i;return function(...s){const n=this;i||(e.apply(n,s),i=!0,setTimeout(function(){i=!1},t))}},p=(e,t,i)=>(e=e.toLowerCase(),t=t.toLowerCase(),i=i.toLowerCase(),i=i.replace(/\s/g,""),!/[\p{P}\p{S}]/u.test(i)&&m(e,t||e,i)),m=(e,t,i)=>{if(!i)return!1;const{chinesePart:s,pinyinPart:n,numberPart:a}=g(i);if(s&&!e.startsWith(s)||a&&!e.includes(a))return!1;const o=t.replace(/\s+/g,"").toLowerCase();return!(n&&!v(n,o))},g=e=>{let t="",i="",s="",n=null;for(const a of e)f(a)?(n="chinese",t+=a):/[a-zA-Z]/.test(a)?(n="pinyin",i+=a.toLowerCase()):/\d/.test(a)?(n="number",s+=a):n=null;return{chinesePart:t,pinyinPart:i,numberPart:s,currentType:n}},f=e=>{const t=e.charCodeAt(0);return t>=19968&&t<=40959||t>=13312&&t<=19903||t>=131072&&t<=173791},v=(e,t)=>{let i=0;for(const s of t){if(i>=e.length)break;s===e[i]&&i++}return i===e.length},y=(e,t,i)=>e.getAttribute("data-set-richType")===t?e:i>0?y(e.parentElement,t,i-1):null,b=(e,t,i)=>e&&e[t]?e[t]:i,C='<svg class="check-empty-svg" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',x='<svg class="empty-svg" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',w='<svg class="icon-search" style="vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M684.8 223.530667a326.272 326.272 0 0 1 24.96 433.621333c2.645333 2.133333 5.290667 4.48 7.850667 7.04L870.4 817.066667c24.789333 24.746667 32.896 56.832 18.133333 71.594666-14.762667 14.805333-46.848 6.656-71.637333-18.090666l-152.789333-152.832a106.282667 106.282667 0 0 1-7.210667-7.936 326.101333 326.101333 0 0 1-433.109333-25.173334c-127.445333-127.445333-127.573333-333.952-0.256-461.269333 127.36-127.36 333.866667-127.232 461.269333 0.213333zM275.328 275.114667a252.885333 252.885333 0 0 0 0.256 357.632 252.885333 252.885333 0 0 0 357.632 0.256 252.885333 252.885333 0 0 0-0.256-357.632 252.885333 252.885333 0 0 0-357.632-0.256z" fill="#9B9B9B"></path></svg>',k='<div class="ant-spin ant-spin-spinning" aria-live="polite" aria-busy="true"><span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span></div>',E='<svg class="match-empty-svg" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',_='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M9.218 17.41 19.83 6.796a.99.99 0 1 1 1.389 1.415c-3.545 3.425-4.251 4.105-11.419 11.074a.997.997 0 0 1-1.375.018c-1.924-1.801-3.709-3.568-5.573-5.43a.999.999 0 0 1 1.414-1.413z"></path></svg>',I='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="m20.23 8.653-7.795 9.685a1.2 1.2 0 0 1-1.87 0L2.771 8.652C2.14 7.867 2.698 6.7 3.706 6.7h15.588c1.008 0 1.567 1.167.935 1.952"></path></svg>';class A{constructor(e){n(this,"target"),n(this,"richText",document.createElement("div")),n(this,"placeholderElm",document.createElement("div")),n(this,"isExternalCallPopup",!1),n(this,"isPointSearchMode",!1),n(this,"checkboxRows",[]),n(this,"customTags",{}),n(this,"selectTags",{}),n(this,"pcElms",{containerDialogElm:null,pointDialogElm:null,pointDialogCheckElm:null,pointDialogMainElm:null,pointDialogUsersElm:[],pointDialogActiveElm:null,pointDialogLoadingElm:null,pointDialogEmptyElm:null,checkDialogElm:null,checkDialogSearchResultElm:null,checkDialogUsersElm:null,checkDialogSearchInputElm:null,checkDialogTagsElm:null,customTagDialogElms:{},customTagDialogTagKey:"",customTagDialogActiveElm:null,selectDialogElms:{},selectDialogKey:"",selectDialogAim:null}),n(this,"h5Elms",{dialogElm:null,dialogMainElm:null,dialogCheckElm:null,dialogShowElm:null,dialogSearchElm:null,dialogEmptyElm:null,dialogLoadingElm:null}),this.target=e,this.createRichText(),this.createPlaceholder(),e.deviceInfo.isPc?this.createPCDialog():this.createH5Dialog()}createRichText(){const{options:e,deviceInfo:t}=this.target,{elm:i}=e;c(i,"chat-area-"+(t.isPc?"pc":"h5"),!0),c(this.richText,"chat-rich-text",!0),this.richText.setAttribute("data-set-richType","richAllBox"),this.richText.setAttribute("contenteditable","true"),i.appendChild(this.richText)}createPlaceholder(){const{options:e}=this.target,{elm:t}=e;c(this.placeholderElm,"chat-placeholder-wrap",!0),o(this.placeholderElm,!0),t.appendChild(this.placeholderElm)}createPCDialog(){const{options:e}=this.target,{needDialog:t,elm:i,asyncMatch:s}=e;if(!t)return;const{pcElms:n}=this;if(n.containerDialogElm=document.createElement("div"),c(this.pcElms.containerDialogElm,"chat-dialog",!0),!i.parentElement)throw new Error('配置项:"elm" 需要存在一个父级元素,请检查后重新配置!');i.nextElementSibling?i.parentElement.insertBefore(n.containerDialogElm,i.nextElementSibling):i.parentElement.appendChild(n.containerDialogElm),s||this.createPCCheckDialog(),this.createPCPointDialog()}createPCCheckDialog(){const{options:e}=this.target,t=this.target.options.dialogLabels.pcPCheckDialog,{pcElms:i}=this;i.checkDialogElm=document.createElement("div"),c(i.checkDialogElm,"checkbox-dialog",!0),o(i.checkDialogElm),i.checkDialogElm.innerHTML=`\n <div class="checkbox-dialog-container">\n <div class="checkbox-dialog-container-header">\n <span>${t.title}</span>\n <span class="checkbox-dialog-container-header-close">⛌</span>\n </div>\n <div class="checkbox-dialog-container-body">\n <div class="checkbox-dialog-left-box">\n <div class="checkbox-dialog-search">\n <input class="checkbox-dialog-search-input" placeholder="${t.searchPlaceholder}" type="text">\n <div class="checkbox-dialog-search-group"></div>\n </div>\n <div class="checkbox-dialog-tags"></div>\n <div class="checkbox-dialog-option">\n <button class="checkbox-dialog-option-btn btn-submit disabled">${t.confirmLabel}</button>\n <button class="checkbox-dialog-option-btn btn-close">${t.cancelLabel}</button>\n </div>\n </div>\n <div class="checkbox-dialog-right-box">\n <div class="checkbox-dialog-right-box-title">${t.userTagTitle}</div>\n <div class="checkbox-dialog-check-group"></div>\n </div>\n </div>\n </div>\n `,i.containerDialogElm.appendChild(i.checkDialogElm),i.checkDialogUsersElm=i.checkDialogElm.querySelector(".checkbox-dialog-check-group"),i.checkDialogSearchResultElm=i.checkDialogElm.querySelector(".checkbox-dialog-search-group"),i.checkDialogSearchInputElm=i.checkDialogElm.querySelector(".checkbox-dialog-search-input"),i.checkDialogTagsElm=i.checkDialogElm.querySelector(".checkbox-dialog-tags");const s=()=>{o(i.checkDialogElm),c(document.body,"disable-scroll")};i.checkDialogElm.querySelector(".checkbox-dialog-container-header-close").onclick=s,i.checkDialogElm.querySelector(".btn-close").onclick=s;const n=i.checkDialogElm.querySelector(".btn-submit");n.onclick=async()=>{if(n.classList.contains("disabled"))return;const t=this.checkboxRows.map(t=>{const i=Object.create(null);return i[e.userProps.id]=t.id,i[e.userProps.name]=t.name,i});await this.target.batchSetTag(t),s()},o(i.checkDialogSearchResultElm),i.checkDialogSearchResultElm.onclick=e=>{e.stopPropagation()},i.checkDialogSearchInputElm.onclick=e=>{e.stopPropagation()};const a=u(e=>{const t=String(e.target.value||"").replace(/'/g,"").trim();if(!t)return void o(i.checkDialogSearchResultElm);const s=this.target.searchUserList(t).map(e=>e.id);Array.from(i.checkDialogSearchResultElm.children,(e,t)=>{if(t===i.checkDialogSearchResultElm.children.length-1)o(e,0===s.length);else{const t=e.getAttribute("data-set-id");o(e,-1!==s.indexOf(t),"flex")}}),o(i.checkDialogSearchResultElm,!0)},200);i.checkDialogSearchInputElm.oninput=a,i.checkDialogSearchInputElm.onfocus=a}createPCPointDialog(){const{pcElms:e,target:t}=this;e.pointDialogElm=document.createElement("div"),c(e.pointDialogElm,"call-user-dialog",!0),o(e.pointDialogElm);const i=document.createElement("div");c(i,"call-user-dialog-header",!0),i.innerHTML=`<span class="call-user-dialog-header-title">${t.options.dialogLabels.pcPointDialog.title}</span>`,e.pointDialogCheckElm=document.createElement("span"),c(e.pointDialogCheckElm,"call-user-dialog-header-check",!0),e.pointDialogCheckElm.innerText=t.options.dialogLabels.pcPointDialog.checkLabel,e.pointDialogCheckElm.onclick=()=>{this.target.showPCCheckDialog(),this.isExternalCallPopup=!1},i.appendChild(e.pointDialogCheckElm),e.pointDialogElm.appendChild(i),e.pointDialogMainElm=document.createElement("div"),c(e.pointDialogMainElm,"call-user-dialog-main",!0),e.pointDialogElm.appendChild(e.pointDialogMainElm),t.options.asyncMatch&&(e.pointDialogLoadingElm=document.createElement("div"),c(e.pointDialogLoadingElm,"call-user-dialog-loading",!0),e.pointDialogLoadingElm.innerHTML=k,e.pointDialogElm.appendChild(e.pointDialogLoadingElm),o(e.pointDialogLoadingElm),e.pointDialogEmptyElm=document.createElement("div"),c(e.pointDialogEmptyElm,"call-user-dialog-empty",!0),e.pointDialogEmptyElm.innerHTML=`\n ${E}\n <span class="empty-label">${t.options.dialogLabels.pcPointDialog.emptyLabel}</span>\n `,e.pointDialogElm.appendChild(e.pointDialogEmptyElm),o(e.pointDialogEmptyElm)),e.containerDialogElm.appendChild(e.pointDialogElm)}createH5Dialog(){const{options:e,chatEvent:t}=this.target,{needDialog:i,dialogLabels:s}=e;if(!i)return;const{h5Elms:n}=this;n.dialogElm=document.createElement("div"),c(n.dialogElm,"call-user-popup",!0),n.dialogElm.innerHTML=`\n <div class="call-user-popup-main">\n <div class="call-user-popup-header">\n <span class="popup-show">${s.h5Dialog.cancelLabel}</span>\n <span class="popup-title">${s.h5Dialog.title}</span>\n <span class="popup-check">${s.h5Dialog.confirmLabel}</span>\n </div>\n <div class="call-user-popup-search">\n ${w}\n <input class="call-user-popup-search-input"\n placeholder="${s.h5Dialog.searchPlaceholder}"\n type="text">\n </div>\n <div class="call-user-popup-body"></div>\n </div>\n `;const a=async()=>{n.dialogElm.className=n.dialogElm.className.replace(/ chat-view-show/g," chat-view-hidden"),n.dialogSearchElm.value="",await l(260),o(n.dialogElm),c(document.body,"disable-scroll"),e.asyncMatch&&this.target.updateUserList([]),this.target.chatInput.restCursorPos(this.target.chatInput.vnode,this.target.chatInput.cursorIndex),this.target.chatInput.viewIntoPoint()};n.dialogElm.onclick=a;const r=n.dialogElm.querySelector(".call-user-popup-main");r.onclick=e=>{e.stopPropagation()},n.dialogShowElm=n.dialogElm.querySelector(".popup-show"),n.dialogShowElm.onclick=a,n.dialogCheckElm=n.dialogElm.querySelector(".popup-check"),n.dialogCheckElm.onclick=async()=>{if(n.dialogCheckElm.classList.contains("disabled"))return;const t=n.dialogElm.querySelectorAll(".user-popup-check-item-check")||[];if(0===t.length)return void await a();if(Array.prototype.some.call(t,e=>"isALL"===e.getAttribute("data-set-id")))return await this.target.onceSetTag({[e.userProps.id]:"isALL",[e.userProps.name]:e.dialogLabels.h5Dialog.callEveryLabel}),void await a();const i=Array.from(t,e=>e.getAttribute("data-set-id")),s=e.userList.filter(t=>-1!==i.indexOf(String(t[e.userProps.id])));await this.target.batchSetTag(s),await a()},n.dialogMainElm=n.dialogElm.querySelector(".call-user-popup-body"),n.dialogEmptyElm=document.createElement("div"),c(n.dialogEmptyElm,"call-user-popup-empty",!0),this.h5Elms.dialogEmptyElm.innerHTML=`\n ${x}\n <span class="empty-label">${e.dialogLabels.h5Dialog.searchEmptyLabel}</span>\n `,o(n.dialogEmptyElm),r.appendChild(n.dialogEmptyElm),e.asyncMatch&&(n.dialogLoadingElm=document.createElement("div"),c(n.dialogLoadingElm,"call-user-popup-loading",!0),n.dialogLoadingElm.innerHTML=k,o(n.dialogLoadingElm),r.appendChild(n.dialogLoadingElm)),n.dialogSearchElm=n.dialogElm.querySelector(".call-user-popup-search-input"),n.dialogSearchElm.oninput=u(i=>{const s=String(i.target.value||"").replace(/'/g,"").trim();if(e.asyncMatch){t.matchKey++;const e=t.matchKey;this.target.updateUserList([]),o(n.dialogLoadingElm,!0),o(n.dialogEmptyElm);const i=t.triggerChatEvent("atMatch",s).find(e=>e&&e instanceof Promise);return void(i&&i.then(i=>{if(e===t.matchKey){if(o(n.dialogLoadingElm),!i||i.length<=0)return void o(n.dialogEmptyElm,!0,"flex");this.target.updateUserList(i)}}))}const a=[];Array.from(this.h5Elms.dialogMainElm.children,e=>{if(!s)return o(e,!0,"flex"),void a.push(e);const t=e.getAttribute("data-set-name")||"",i=e.getAttribute("data-set-pinyin")||"";p(t,i,s)?(o(e,!0,"flex"),a.push(e)):o(e)}),o(this.h5Elms.dialogEmptyElm,!a.length,"flex")},200),o(n.dialogElm),document.body.appendChild(n.dialogElm)}updatePCUser(){const{pcElms:e,target:t}=this;e.pointDialogMainElm.innerHTML="",e.pointDialogActiveElm=void 0;const i=document.createDocumentFragment();if(this.target.options.needCallEvery){const e=document.createElement("div");c(e,"call-user-dialog-item",!0),e.setAttribute("data-set-id","isALL"),this.userSelectStyleAndEvent(e,{id:"isALL",name:t.options.dialogLabels.pcPointDialog.callEveryLabel}),e.innerHTML=`\n <span class="call-user-dialog-item-sculpture">\n <span style="transform: scale(0.75)">@</span>\n </span>\n <span class="call-user-dialog-item-name">${t.options.dialogLabels.pcPointDialog.callEveryLabel}(${t.options.reformList.length})</span>\n `,i.appendChild(e)}if(t.options.reformList.forEach(e=>{const t=document.createElement("div");c(t,"call-user-dialog-item",!0),t.setAttribute("data-set-id",e.id),this.userSelectStyleAndEvent(t,e),this.getUserHtmlTemplate(t,e),i.appendChild(t)}),e.pointDialogMainElm.appendChild(i),e.pointDialogUsersElm=[],Array.from(e.pointDialogMainElm.children||[],(t,i)=>{e.pointDialogUsersElm.push({index:i,elm:t})}),t.options.asyncMatch)return;e.checkDialogUsersElm.innerHTML=`\n <div class="checkbox-dialog-check-item" data-set-value="ALL">\n <input type="checkbox" value>\n <span class="checkbox-dialog-check-item-inner"></span>\n <div class="checkbox-dialog-check-item-label">${t.options.dialogLabels.pcPCheckDialog.checkAllLabel}</div>\n </div>\n `;const s=document.createDocumentFragment();t.options.reformList.forEach(e=>{const t=document.createElement("div");c(t,"checkbox-dialog-check-item",!0),t.setAttribute("data-set-value",e.id),t.innerHTML='\n <input type="checkbox" value>\n <span class="checkbox-dialog-check-item-inner"></span>\n ',this.getUserHtmlTemplate(t,e),s.appendChild(t)}),e.checkDialogUsersElm.appendChild(s),e.checkDialogUsersElm&&e.checkDialogUsersElm.children.length&&Array.from(e.checkDialogUsersElm.children,e=>{e.onclick=()=>{const i=e.getAttribute("data-set-value")||"",s=t.options.reformList.find(e=>e.id===i),n=-1===e.className.indexOf("checkbox-dialog-check-item-check");"ALL"===i?this.checkboxRows=n?t.options.reformList.map(e=>e):[]:n?this.checkboxRows.push(s):this.checkboxRows=this.checkboxRows.filter(e=>e.id!==i),this.updateCheckDialogTags()}});const n=document.createDocumentFragment();t.options.reformList.forEach(e=>{const i=document.createElement("div");c(i,"checkbox-dialog-check-item",!0),i.setAttribute("data-set-id",e.id);const s=document.createElement("div");c(s,"checkbox-dialog-check-item-label",!0),this.getUserHtmlTemplate(s,e),i.appendChild(s),i.onclick=()=>{o(this.pcElms.checkDialogSearchResultElm);const e=i.getAttribute("data-set-id")||"";if(this.pcElms.checkDialogSearchInputElm.value="",this.pcElms.checkDialogSearchInputElm.focus(),this.checkboxRows.some(t=>t.id===e))return;const s=t.options.reformList.find(t=>t.id===e);s&&this.checkboxRows.push(s),this.updateCheckDialogTags()},n.appendChild(i)});const a=document.createElement("div");c(a,"checkbox-dialog-search-empty",!0),a.innerText=t.options.dialogLabels.pcPCheckDialog.searchEmptyLabel,n.appendChild(a),e.checkDialogSearchResultElm.appendChild(n)}updateH5User(){const{h5Elms:e,target:t}=this;e.dialogMainElm.innerHTML="";const i=t.options.reformList&&t.options.reformList.length>0,s=document.createDocumentFragment(),n=document.createElement("span");if(n.innerHTML='\n <input type="checkbox" value>\n <span class="user-popup-check-item-inner"></span>\n ',i){const e=document.createElement("div");t.options.needCallEvery&&(c(e,"call-user-popup-item",!0),e.setAttribute("data-set-id","isALL"),e.innerHTML=`\n <span class="call-user-dialog-item-sculpture">\n <span style="transform: scale(0.75)">@</span>\n </span>\n <span class="call-user-dialog-item-name">${t.options.dialogLabels.h5Dialog.callEveryLabel}(${t.options.reformList.length})</span>\n `,e.appendChild(n.cloneNode(!0)),e.onclick=()=>{const t=!e.classList.contains("user-popup-check-item-check");Array.from(this.h5Elms.dialogMainElm.children,e=>{c(e,"user-popup-check-item-check",t)}),c(this.h5Elms.dialogCheckElm,"disabled",!t)},s.appendChild(e)),t.options.reformList.forEach((t,i)=>{const a=document.createElement("div");c(a,"call-user-popup-item",!0),a.setAttribute("data-set-id",t.id),a.setAttribute("data-set-name",t.name),a.setAttribute("data-set-pinyin",t.pinyin||""),this.getUserHtmlTemplate(a,t),a.appendChild(n.cloneNode(!0)),s.appendChild(a),a.onclick=t=>{const i=!a.classList.contains("user-popup-check-item-check");c(a,"user-popup-check-item-check",i);const s=Array.prototype.every.call(this.h5Elms.dialogMainElm.children,e=>e.classList.contains("user-popup-check-item-check")||"isALL"===e.getAttribute("data-set-id"));c(e,"user-popup-check-item-check",s);const n=Array.prototype.some.call(this.h5Elms.dialogMainElm.children,e=>e.classList.contains("user-popup-check-item-check"));c(this.h5Elms.dialogCheckElm,"disabled",!n)}})}e.dialogMainElm.appendChild(s)}updateCheckDialogTags(){const e=this.checkboxRows.map(e=>e.id),t=[],i=[],s=document.createElement("div");s.className="check-empty",s.innerHTML=`\n ${C}\n <span class="check-empty-label">${this.target.options.dialogLabels.pcPCheckDialog.checkEmptyLabel}</span>\n `,Array.from(this.pcElms.checkDialogTagsElm.children,s=>{const n=s.getAttribute("data-set-value");-1===e.indexOf(n)?i.push(s):t.push(n)}),Array.from(this.pcElms.checkDialogUsersElm.children,(t,i)=>{if(0===i)return void c(t,"checkbox-dialog-check-item-check",e.length===this.target.options.reformList.length);const s=t.getAttribute("data-set-value");c(t,"checkbox-dialog-check-item-check",-1!==e.indexOf(s))}),i.forEach(e=>{this.pcElms.checkDialogTagsElm.removeChild(e)});const n=this.pcElms.checkDialogElm.querySelector(".btn-submit");c(n,"disabled",e.length<=0),e.length||this.pcElms.checkDialogTagsElm.appendChild(s);const a=this.checkboxRows.filter(e=>-1===t.indexOf(e.id));if(!a.length)return;const o=document.createDocumentFragment();a.forEach(e=>{const t=document.createElement("div");t.setAttribute("class","checkbox-dialog-tag-item"),t.setAttribute("data-set-value",e.id),t.innerHTML=`\n <span>${e.name}</span>\n `;const i=document.createElement("span");i.setAttribute("class","checkbox-dialog-tag-item-close"),i.innerHTML="⛌",i.onclick=()=>{const e=t.getAttribute("data-set-value");this.checkboxRows=this.checkboxRows.filter(t=>t.id!==e),this.updateCheckDialogTags()},t.appendChild(i),o.appendChild(t)}),this.pcElms.checkDialogTagsElm.appendChild(o)}userSelectStyleAndEvent(e,t){e.addEventListener("click",async i=>{const{options:s}=this.target;if(i.stopPropagation(),this.updatePointActiveUserElm(e),this.isPointSearchMode||s.asyncMatch)await this.target.matchSetTag(t);else{const e=s.userList.find(e=>String(e[s.userProps.id])===t.id);await this.target.onceSetTag(e)}this.exitPointDialog()})}bindCustomTrigger(){Object.values(this.pcElms.customTagDialogElms).forEach(e=>{this.pcElms.containerDialogElm.removeChild(e)}),this.pcElms.customTagDialogElms={},this.customTags={},this.target.options.customTrigger.forEach(e=>{e.tagList&&e.tagList.length>0&&(this.customTags[e.prefix]=e.tagList.map(e=>({id:String(e.id),name:String(e.name),pinyin:String(e.pinyin||"")})),this.createCustomTagDialog(e))})}createCustomTagDialog(e){const t=document.createElement("div");t.setAttribute("class","call-tag-dialog"),o(t);const i=document.createElement("div");i.setAttribute("class","call-tag-dialog-header"),i.innerHTML=`<span class="call-tag-dialog-header-title">${e.dialogTitle||e.prefix}</span>`,t.appendChild(i);const s=document.createElement("div");s.setAttribute("class","call-tag-dialog-main"),e.tagList.forEach(e=>{const t=document.createElement("div");t.setAttribute("class","call-tag-dialog-item"),t.setAttribute("data-set-id",e.id);const i=document.createElement("span");i.setAttribute("class","call-tag-dialog-item-name"),i.innerHTML=e.name,t.appendChild(i),t.addEventListener("click",async i=>{i.stopPropagation(),this.updateActiveCustomTagElm(t),this.isPointSearchMode?await this.target.matchSetCustomTag(e):await this.target.onceSetCustomTag(e),this.exitCustomTagDialog()}),s.appendChild(t)}),t.appendChild(s),this.pcElms.containerDialogElm.appendChild(t),this.pcElms.customTagDialogElms[e.prefix]=t}getUserHtmlTemplate(e,t){const i=document.createElement("span");if(i.setAttribute("class","call-user-dialog-item-sculpture "+(t.avatar?"is-avatar":"")),t.avatar){const e=new Image;e.alt="",e.src=String(t.avatar),i.appendChild(e)}else i.innerHTML=`<span style="transform: scale(0.75)">${t.name.slice(-2)}</span>`;e.appendChild(i);const s=document.createElement("span");s.setAttribute("class","call-user-dialog-item-name"),s.innerHTML=t.name,e.appendChild(s)}updatePointActiveUserElm(e,t=!1){if(this.pcElms.pointDialogActiveElm&&c(this.pcElms.pointDialogActiveElm,"call-user-dialog-item-active"),this.pcElms.pointDialogActiveElm=e,e&&(c(e,"call-user-dialog-item-active",!0),t)){const t=Array.prototype.filter.call(this.pcElms.pointDialogMainElm.children,e=>-1===e.className.indexOf("user-no-match")),i=e.clientHeight,s=Array.prototype.indexOf.call(t,e),n=Math.ceil(Math.floor(this.pcElms.pointDialogMainElm.clientHeight/i)/2),a=s+1-n;this.pcElms.pointDialogMainElm.scrollTop=a>0?a*i:0}}updateActiveCustomTagElm(e,t=!1){if(this.pcElms.customTagDialogActiveElm&&c(this.pcElms.customTagDialogActiveElm,"call-tag-dialog-item-active"),this.pcElms.customTagDialogActiveElm=e,e&&(c(e,"call-tag-dialog-item-active",!0),t)){const t=this.pcElms.customTagDialogElms[this.pcElms.customTagDialogTagKey].children[1],i=Array.prototype.filter.call(t.children,e=>-1===e.className.indexOf("tag-no-match")),s=e.clientHeight,n=Array.prototype.indexOf.call(i,e),a=Math.ceil(Math.floor(t.clientHeight/s)/2),o=n+1-a;t.scrollTop=o>0?o*s:0}}showPointDialog(e){this.exitSelectDialog(),this.exitCustomTagDialog(),this.exitPointDialog(),this.isPointSearchMode=!!e;let t=null;this.pcElms.pointDialogUsersElm.forEach(i=>{const s=i.elm,n=s.getAttribute("data-set-id"),a=e&&e.every(e=>e.id!==n);!t&&!a&&(t=s),c(s,"user-no-match",a)}),null!==t&&this.updatePointActiveUserElm(t),o(this.pcElms.pointDialogCheckElm,!this.target.options.asyncMatch&&!this.isPointSearchMode),o(this.pcElms.pointDialogElm,!0),this.target.chatEvent.debounceEvents.dialogMoveToRange(this.pcElms.pointDialogElm),this.pcElms.pointDialogMainElm.scrollTop=0}showCustomTagDialog(e,t){this.exitSelectDialog(),this.exitCustomTagDialog(),this.exitPointDialog(),this.isPointSearchMode=!!t,this.pcElms.customTagDialogTagKey=e;const i=this.pcElms.customTagDialogElms[e],s=i.children[1];let n=null;Array.from(s.children,e=>{const i=e.getAttribute("data-set-id"),s=t&&t.every(e=>e.id!==i);!n&&!s&&(n=e),c(e,"tag-no-match",s)}),null!==n&&this.updateActiveCustomTagElm(n),o(i,!0),this.target.chatEvent.debounceEvents.dialogMoveToRange(i),i.children[1].scrollTop=0}exitPointDialog(){this.updatePointActiveUserElm(),this.target.options.asyncMatch&&this.target.updateUserList([]),o(this.pcElms.pointDialogElm)}exitCustomTagDialog(){this.updateActiveCustomTagElm();for(const e in this.pcElms.customTagDialogElms)o(this.pcElms.customTagDialogElms[e])}ruleShowPointDialog(){const{options:e,chatInput:t}=this.target;e.needDialog&&e.reformList.length>0&&t.showAt()&&(this.isExternalCallPopup=!1,this.showPointDialog())}showPlaceholder(){o(this.placeholderElm,this.target.isEmpty())}bindSelectList(){Object.values(this.pcElms.selectDialogElms).forEach(e=>{this.pcElms.containerDialogElm.removeChild(e)}),this.pcElms.selectDialogElms={},this.selectTags={},this.target.options.selectList.forEach(e=>{e.options&&e.options.length>0&&(this.selectTags[e.key]=e.options.map(e=>({id:String(e.id),name:String(e.name),preview:String(e.preview||"")})),this.createSelectDialog(e))})}createSelectDialog(e){const t=document.createElement("div");t.setAttribute("class","chat-select-dialog"),o(t);const i=document.createElement("div");i.setAttribute("class","chat-select-dialog-header"),i.innerHTML=`<span class="chat-select-dialog-header-title">${e.dialogTitle||e.key}</span>`,t.appendChild(i);const s=document.createElement("div");s.setAttribute("class","chat-select-dialog-main"),e.options.forEach(e=>{const t=document.createElement("div");if(t.setAttribute("class","chat-select-dialog-item"),t.setAttribute("data-set-id",e.id),e.preview){const i=document.createElement("img");i.setAttribute("class","chat-select-dialog-preview"),i.src=String(e.preview),t.appendChild(i)}const i=document.createElement("span");i.setAttribute("class","chat-select-dialog-name"),i.textContent=e.name;const n=document.createElement("span");n.setAttribute("class","chat-select-dialog-check"),n.innerHTML=_,o(n),i.appendChild(n),t.appendChild(i),t.onclick=async()=>{await this.target.setSelectTag(e)},s.appendChild(t)}),t.appendChild(s);const n=document.createElement("div");n.setAttribute("class","chat-select-arrow"),t.appendChild(n),this.pcElms.containerDialogElm.appendChild(t),this.pcElms.selectDialogElms[e.key]=t}exitSelectDialog(){for(const e in this.pcElms.selectDialogElms)o(this.pcElms.selectDialogElms[e]);this.pcElms.selectDialogKey="",this.pcElms.selectDialogAim&&(c(this.pcElms.selectDialogAim,"aim"),this.pcElms.selectDialogAim=null)}}class S{constructor(e){n(this,"target"),n(this,"richText"),n(this,"vnode"),n(this,"cursorIndex"),n(this,"cursorLeft"),n(this,"needCallSpace",!1),n(this,"VOID_KEY","\ufeff"),n(this,"ZERO_WIDTH_KEY",""),n(this,"IME_RECORD",{MARK:void 0,GRID:void 0,TAG:void 0,NODE:void 0,INDEX:void 0}),this.target=e,this.richText=e.chatElement.richText,this.textInnerHtmlInit()}textInnerHtmlInit(e=!1,t){if(e||this.getNodeEmpty(this.richText)){this.richText.innerHTML="";const e=this.getGridElm();this.richText.appendChild(e);const i=e.children[0].children[0];t&&(i.textContent=t,i.setAttribute("data-set-empty","false"));const s=i.childNodes[0];this.restCursorPos(s,s.textContent===this.VOID_KEY?1:s.textContent.length)}}onceCall(e){return new Promise(t=>{const i=this.createChatTagElm(e,"@","at-user","user-id");this.replaceRegContent(i),t()})}onceSearchCall(e,t){return new Promise(i=>{const s=this.createChatTagElm(e,"@","at-user","user-id");this.replaceRegContent(s,t),i()})}onceCustomCall(e,t,i){return new Promise(s=>{const n=this.createChatTagElm(e,i,"at-tag","tag-id");n.children[0].setAttribute("data-set-prefix",i),this.replaceRegContent(n,t),s()})}upDataNodeOrIndex(){var e,t,i;const{focusNode:s,focusOffset:n,anchorOffset:a}=window.getSelection(),o=(null==s?void 0:s.parentNode)||void 0;!o||!o.getAttribute||"richInput"!==o.getAttribute("data-set-richType")||(null==(i=null==(t=null==(e=null==s?void 0:s.parentNode)?void 0:e.parentNode)?void 0:t.parentNode)?void 0:i.parentNode)!==this.richText||(this.vnode=s,this.cursorIndex=n,this.cursorLeft=a<n?a:n)}showAt(){if(this.upDataNodeOrIndex(),!this.vnode||this.vnode.nodeType!==Node.TEXT_NODE)return!1;const e=this.vnode.textContent||"",t=/@([^@\s]*)$/,i=e.slice(0,this.cursorIndex),s=t.exec(i);return s&&2===s.length&&"@"===i[i.length-1]}getRangeRect(){let e=0,t=0;const i=window.getSelection();if(i.focusNode.nodeType!==Node.TEXT_NODE)return null;const s=i.getRangeAt(0).getClientRects()[0];return s&&(e=s.x,t=s.y),{x:e,y:t}}createChatTagElm(e,t,i,s){const n=document.createElement("span");return n.className=i,n.setAttribute(`data-${s}`,String(e.id)),n.contentEditable="false",n.textContent=`${t}${e.name}${this.needCallSpace?" ":""}`,this.createNewDom(n)}createNewDom(e){const t=document.createElement("span");return t.className="chat-tag",t.setAttribute("contenteditable","false"),t.setAttribute("data-set-richType","chatTag"),e.className+=" chat-stat",t.appendChild(e),t}restCursorPos(e,t){null==t?t=e.textContent===this.VOID_KEY?1:0:t>e.textContent.length&&(t=e.textContent.length);const i=new Range;i.setStart(e,t),i.setEnd(e,t);const s=window.getSelection();s&&(this.vnode=e,this.cursorIndex=t,this.cursorLeft=t,s.removeAllRanges(),s.addRange(i))}replaceRegContent(e,t=!0){const i=this.vnode.textContent;let s;s="boolean"==typeof t?i.slice(0,t?this.cursorIndex-1:this.cursorIndex):i.slice(0,t-1),0===s.length?(this.vnode.parentElement.setAttribute("data-set-empty",!0),this.vnode.textContent=this.VOID_KEY):this.vnode.textContent=s;let n=i.slice(this.cursorIndex);const a=this.vnode.parentNode.parentNode,o=a.nextSibling;o?a.parentNode.insertBefore(e,o):a.parentNode.appendChild(e);const r=e.previousSibling.childNodes[0],c=r.childNodes[1];c&&r.removeChild(c);const l=this.getGridElm(!0),d=l.childNodes[0];n&&n!==this.VOID_KEY&&(d.setAttribute("data-set-empty","false"),d.innerHTML=n);const u=d.childNodes[1];e.nextSibling?(u&&d.removeChild(u),a.parentNode.insertBefore(l,e.nextSibling)):a.parentNode.appendChild(l),this.restCursorPos(d.childNodes[0])}batchReplaceRegContent(e=[],t=!0){return new Promise(i=>{let s=`<span data-set-richType="richMark"><span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="true">${this.VOID_KEY}</span></span>`;e.forEach(e=>{s+=`<span class="chat-tag" contenteditable="false" data-set-richType="chatTag"><span class="at-user chat-stat" data-user-id="${e.id}" contentEditable="false">@${e.name}${this.needCallSpace?" ":""}</span></span><span data-set-richType="richMark"><span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="true">${this.VOID_KEY}</span></span>`});const n=document.createElement("div");n.innerHTML=s,this.insetRangeGrid(n,t?1:0),i()})}switchRange(e){var t,i;let s,n,{focusNode:a,focusOffset:o}=window.getSelection();if(a.getAttribute&&"richInput"===a.getAttribute("data-set-richType")&&(a=a.childNodes[0]),a.nodeType===Node.TEXT_NODE){const r=a.textContent.length,c=a.parentNode.parentNode;switch(e){case"ArrowLeft":if(o>0&&a.textContent!==this.VOID_KEY){n=o-1,s=a;break}const e=null==(t=null==c?void 0:c.previousSibling)?void 0:t.previousSibling;if(e)s=e.childNodes[0].childNodes[0],n=s.textContent.length;else{const e=c.parentNode.previousSibling;e&&(s=e.lastChild.childNodes[0].childNodes[0],n=s.textContent.length)}break;case"ArrowRight":if(o<r&&a.textContent!==this.VOID_KEY){n=o+1,s=a;break}const l=null==(i=null==c?void 0:c.nextSibling)?void 0:i.nextSibling;if(l)s=l.childNodes[0].childNodes[0],n=s.textContent===this.VOID_KEY?1:0;else{const e=c.parentNode.nextSibling;e&&(s=e.childNodes[0].childNodes[0].childNodes[0],n=s.textContent===this.VOID_KEY?1:0)}break}}(n||0===n)&&this.restCursorPos(s,n)}getGridElm(e=!1){const t=document.createElement("span");if(t.setAttribute("data-set-richType","richMark"),t.innerHTML=`<span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="true">${this.VOID_KEY}<br></span>`,e)return t;const i=document.createElement("p");return i.className="chat-grid-wrap",i.setAttribute("data-set-richType","richBox"),i.appendChild(t),i}updateGrid(){const e=window.getSelection(),t=e.focusNode;if(!t)return;const i=t.parentNode,s=i.getAttribute("data-set-richType");let n,a,o,r;switch(s){case"richAllBox":if(n=t.childNodes[e.focusOffset],!n||"chatTag"===n.getAttribute("data-set-richType")){const e=this.getGridElm(!0),i=e.children[0];n?(i.removeChild(i.childNodes[1]),t.insertBefore(e,n)):t.appendChild(e),this.restCursorPos(i.childNodes[0]);break}if("BR"===n.tagName){const e=this.getGridElm(!0),i=e.children[0];t.insertBefore(e,n),t.removeChild(n),this.restCursorPos(i.childNodes[0],i.childNodes[0].textContent.length)}break;case"richMark":const s=i.parentNode,c=Array.prototype.indexOf.call(s.childNodes,i);if(-1===c)break;if(0===c){const t=e.focusNode;t.setAttribute("data-set-empty","true"),t.innerHTML=`${this.VOID_KEY}<br>`,n=t.childNodes[0],this.restCursorPos(n,n.textContent.length);break}let l,d=i.previousSibling;"chatTag"===d.getAttribute("data-set-richType")?(l=d.previousSibling,s.removeChild(d),s.removeChild(i)):(l=i.previousSibling,s.removeChild(i)),n=l.childNodes[0].childNodes[0],n.textContent===this.VOID_KEY&&n.parentNode.appendChild(document.createElement("br")),this.restCursorPos(n,n.textContent.length);break;case"richInput":if(r=i.parentNode,o=r.parentNode,this.getNodeEmpty(i)){i.setAttribute("data-set-empty","true"),o.childNodes[o.childNodes.length-1]===r&&(i.innerHTML=`${this.VOID_KEY}<br>`),n=i.childNodes[0],this.restCursorPos(n,n.textContent.length);break}if("true"===String(i.getAttribute("data-set-empty"))){i.setAttribute("data-set-empty","false"),n=i.childNodes[0],this.target.chatEvent.isIMEModel?(i.childNodes[1]&&i.removeChild(i.childNodes[1]),n.textContent===this.VOID_KEY&&i.setAttribute("data-set-empty","true")):i.textContent=n.textContent.replace(new RegExp(this.VOID_KEY,"g"),"");const e=i.childNodes[0];this.restCursorPos(e,e.textContent.length)}if(a=i.parentNode.nextSibling,a&&a.nodeType===Node.TEXT_NODE){let e=a.textContent,t=this.getGridElm(!0);t.childNodes[0].textContent=e,t.childNodes[0].setAttribute("data-set-empty","false"),a.parentNode.insertBefore(t,a),a.parentNode.removeChild(a),a=t}a&&"richMark"===a.getAttribute("data-set-richType")&&this.markMerge(i.parentNode,a);break}}getNodeEmpty(e){const t=new RegExp(`^(${this.ZERO_WIDTH_KEY}|<br>|${this.VOID_KEY})+$`);return!e.innerHTML||t.test(e.innerHTML)}setWrap(e=!0){const t=window.getSelection();let{focusNode:i,focusOffset:s}=t;if(i.nodeType!==Node.TEXT_NODE){if(!i.getAttribute||"richInput"!==i.getAttribute("data-set-richType"))return;i=i.childNodes[0]}const n=i.textContent.slice(s),a=i.parentNode.parentNode,o=a.parentNode,r=Array.prototype.indexOf.call(o.childNodes,a),c=Array.prototype.slice.call(o.childNodes,r+1),l=this.getGridElm();let d=l.children[0].children[0].childNodes[0],u=1;(n||c.length>0)&&d.parentNode.removeChild(d.parentNode.childNodes[1]),n&&n!==this.VOID_KEY&&(i.textContent=i.textContent.slice(0,s),d.textContent=(d.textContent+n).replace(new RegExp(this.VOID_KEY,"g"),()=>(u--,"")),d.parentElement.setAttribute("data-set-empty","false")),c.forEach(e=>{o.removeChild(e),l.appendChild(e)});const h=o.lastChild.childNodes[0],p=l.lastChild.childNodes[0];if(h.childNodes.length<=1){const e=h.childNodes[0];(!e.textContent||e.textContent===this.VOID_KEY)&&(h.innerHTML=`${this.VOID_KEY}<br>`,h.setAttribute("data-set-empty","true"))}if("richMark"!==p.parentElement.getAttribute("data-set-richType"))l.appendChild(this.getGridElm(!0));else if(p.childNodes.length<=1){const e=p.childNodes[0];(!e.textContent||e.textContent===this.VOID_KEY)&&(p.innerHTML=`${this.VOID_KEY}<br>`,p.setAttribute("data-set-empty","true"),d=l.children[0].children[0].childNodes[0])}o.nextSibling?this.richText.insertBefore(l,o.nextSibling):this.richText.appendChild(l),e&&(this.restCursorPos(d,d.textContent===this.VOID_KEY?1:u),this.viewIntoPoint())}selectRegionMerge(){const e=window.getSelection();if(e.isCollapsed||e.rangeCount<=0)return;const t=e.getRangeAt(0);if(t.startContainer.nodeType===Node.TEXT_NODE&&t.startContainer===t.endContainer){const e=t.startContainer;if(e.length===t.endOffset-t.startOffset){const t=e.parentNode,i=t.parentNode===t.parentNode.parentNode.lastChild;t.setAttribute("data-set-empty","true"),t.innerHTML="\ufeff"+(i?"<br>":""),this.restCursorPos(t.childNodes[0])}else t.deleteContents()}else if(t.commonAncestorContainer&&"richBox"===t.commonAncestorContainer.getAttribute("data-set-richType")){const e=t.startContainer.nodeType===Node.TEXT_NODE?t.startContainer.parentNode.parentNode:t.startContainer,i=t.endContainer.nodeType===Node.TEXT_NODE?t.endContainer.parentNode.parentNode:t.endContainer;t.deleteContents(),e.getAttribute("data-set-richType")===i.getAttribute("data-set-richType")&&this.markMerge(e,i)}else if(t.commonAncestorContainer===t.startContainer&&t.startContainer===t.endContainer)this.textInnerHtmlInit(!0);else{const e=e=>{if(e.nodeType===Node.TEXT_NODE)return e.parentNode.parentNode.parentNode;switch(e.getAttribute("data-set-richType")){case"richInput":return e.parentNode.parentNode;case"richMark":return e.parentNode;case"richBox":return e;default:return null}},i=e(t.startContainer),s=e(t.endContainer);if(!i||!s)return;t.deleteContents(),this.gridMerge(i,s)}return!0}gridElmMerge(){const e=window.getSelection(),{focusNode:t,focusOffset:i,isCollapsed:s}=e;if(i>1||!s)return!1;const n=(e,t)=>(e.parentNode===this.richText||e===e.parentNode.childNodes[0])&&(-1!==Array.prototype.indexOf.call(this.richText.childNodes,e)?e:!(t>=6)&&n(e.parentNode,t+1)),a=n(t,0);if(!a||a===this.richText.childNodes[0]||1===i&&"false"===a.children[0].children[0].getAttribute("data-set-empty"))return!1;const o=a.previousSibling;return this.gridMerge(o,a),!0}delMarkRule(){const e=window.getSelection(),t=e.focusNode,i=t.textContent,s=t.parentNode,n=s.parentNode,a=n.parentNode;if(!e.isCollapsed||"richInput"!==s.getAttribute("data-set-richType"))return!1;if(i&&1===i.length&&n!==a.childNodes[0]&&(0!==e.focusOffset||i===this.VOID_KEY)){if(i===this.VOID_KEY){const e=n.previousSibling.previousSibling;a.removeChild(n.previousSibling),a.removeChild(n);const t=e.childNodes[0],i=t.childNodes[0];i.textContent===this.VOID_KEY&&e===a.lastChild&&t.appendChild(document.createElement("br")),this.restCursorPos(i,i.textContent.length)}else{s.innerHTML=n===a.lastChild?`${this.VOID_KEY}<br>`:this.VOID_KEY,s.setAttribute("data-set-empty","true");const e=s.childNodes[0];this.restCursorPos(e,1)}return!0}if(0===e.focusOffset){const e=s.parentNode,t=null==e?void 0:e.previousSibling;return!(!t||"chatTag"!==t.getAttribute("data-set-richType"))&&(this.delTag(t),!0)}}delTag(e){const t=e.previousSibling,i=e.nextSibling;e.parentNode.removeChild(e),this.markMerge(t,i)}gridMerge(e,t,i=!0){"richMark"!==e.lastChild.getAttribute("data-set-richType")&&e.appendChild(this.getGridElm(!0)),"richMark"!==t.childNodes[0].getAttribute("data-set-richType")&&t.insertBefore(this.getGridElm(!0),t.childNodes[0]);const s=e.lastChild.childNodes[0],n=s.childNodes[0];let a=n.textContent.length;Array.from(t.childNodes,t=>{e.appendChild(t.cloneNode(!0))}),t.childNodes.length>1&&s.childNodes[1]&&s.removeChild(s.childNodes[1]);const o=s.parentNode.nextSibling;if(o){const t=o.children[0].childNodes[0];t&&t.textContent!==this.VOID_KEY&&(s.childNodes[1]&&s.removeChild(s.childNodes[1]),n.textContent=(n.textContent+t.textContent).replace(new RegExp(this.VOID_KEY,"g"),()=>(a--,"")),n.parentElement.setAttribute("data-set-empty","false")),e.removeChild(o)}""===n.textContent&&(n.textContent=this.VOID_KEY,n.parentNode.setAttribute("data-set-empty","true"),a=1),this.richText.removeChild(t),i&&(this.restCursorPos(n,a),this.viewIntoPoint())}markMerge(e,t){const i=e.children[0].childNodes[0];let s=i.textContent.length;if(t){const e=t.children[0].childNodes[0];e&&e.textContent!==this.VOID_KEY&&(i.textContent=(i.textContent+e.textContent).replace(new RegExp(this.VOID_KEY,"g"),()=>(s--,"")),i.parentElement.setAttribute("data-set-empty","false")),t.parentNode.removeChild(t)}""===i.textContent&&(i.textContent=this.VOID_KEY,i.parentNode.setAttribute("data-set-empty","true"),s=1);const n=e.parentNode;i.textContent===this.VOID_KEY&&e===n.lastChild&&(i.parentNode.appendChild(document.createElement("br")),i.parentNode.setAttribute("data-set-empty","true"),s=1),this.restCursorPos(i,s)}setCallSpace(e){this.needCallSpace=e}getWrapNode(e,t=!1){if(e.nodeType===Node.TEXT_NODE)return e.parentNode.parentNode.parentNode;const i=e.getAttribute("data-set-richType");if(t&&"chatTag"===i)return e.parentNode;switch(i){case"richInput":return e.parentNode.parentNode;case"richMark":return e.parentNode;case"richBox":return e}}getMarkNode(e,t=!1){if(e.nodeType===Node.TEXT_NODE)return e.parentNode.parentNode;const i=e.getAttribute("data-set-richType");if(t&&"chatTag"===i)return e;switch(i){case"richInput":return e.parentNode;case"richMark":return e}}getRichTextNodeIndex(e){const t=this.getMarkNode(e),i=t.parentNode;return t&&i?{gridIndex:Array.prototype.indexOf.call(this.richText.childNodes,i),markIndex:Array.prototype.indexOf.call(i.childNodes,t)}:{gridIndex:null,markIndex:null}}setWrapNodeByMark(e){const t=document.createElement("p");return t.className="chat-grid-wrap",t.setAttribute("data-set-richType","richBox"),Array.from(e,e=>{t.appendChild(e)}),t}setRangeLastText(){const e=this.richText.childNodes[this.richText.childNodes.length-1],t=e.childNodes[e.childNodes.length-1].children[0].childNodes[0];this.restCursorPos(t,t.textContent===this.VOID_KEY?1:t.textContent.length),this.viewIntoPoint()}viewIntoPoint(){const e=window.getSelection();if(e.rangeCount>0){const t=e.getRangeAt(0),i=this.getWrapNode(t.endContainer);if(!i)return;const s=this.richText.parentElement,{scrollHeight:n,clientHeight:a,scrollTop:o}=s;if(n<=a)return;const r=i.getBoundingClientRect().top-s.getBoundingClientRect().top+i.clientHeight+o,c=o,l=a+o;if(r<c||r>l){const e=r-a;s.scrollTo(0,e)}}}insetRangeGrid(e,t=0){const i=this.vnode.textContent,s=i.slice(0,this.cursorIndex-t);0===s.length?(this.vnode.parentElement.setAttribute("data-set-empty",!0),this.vnode.textContent=this.VOID_KEY):this.vnode.textContent=s;let n=i.slice(this.cursorIndex);const a=[],o=document.createDocumentFragment();Array.from(e.children).forEach((e,t)=>{a.push(e),0!==t&&o.appendChild(e)});const r=a[a.length-1].children[0];n&&n.length>0&&n!==this.VOID_KEY?(r.setAttribute("data-set-empty","false"),r.innerHTML=r.textContent+n):r.setAttribute("data-set-empty","true");const c=this.getMarkNode(this.vnode),l=c.parentElement,d=c.children[0],u=a[0].textContent;u&&u.length>0&&u!==this.VOID_KEY&&(d.setAttribute("data-set-empty","false"),d.innerHTML=(d.textContent+u).replace(new RegExp(this.VOID_KEY,"g"),"")),d.childNodes[1]&&d.removeChild(d.childNodes[1]),c.nextElementSibling?(r.childNodes[1]&&r.removeChild(r.childNodes[1]),l.insertBefore(o,c.nextElementSibling)):l.appendChild(o);const h=n&&n!==this.VOID_KEY?n.length:0;if(a.length>1){const e=r.childNodes[0];this.restCursorPos(e,e.textContent===this.VOID_KEY?1:e.textContent.length-h)}else{const e=d.childNodes[0];this.restCursorPos(e,e.textContent===this.VOID_KEY?1:e.textContent.length-h)}}insetRangeGrids(e){const t=document.createDocumentFragment();Array.from(e).forEach(e=>{t.appendChild(e)});const i=this.getWrapNode(this.vnode);this.restCursorPos(this.vnode,this.cursorIndex),this.setWrap(!1);const s=i.nextElementSibling;s&&this.richText.insertBefore(t,s),s&&s.previousElementSibling?(this.gridMerge(i,i.nextElementSibling,!1),this.gridMerge(s.previousElementSibling,s,!0)):this.gridMerge(i,i.nextElementSibling,!0)}getOffsetRange(e,t,i=!1){const s=t.children[0].childNodes[0],n=s.textContent;if(0===e)return{rangeNode:s,rangeIndex:i?n.length:n===this.VOID_KEY?1:0};if(n.length>=e)return{rangeNode:s,rangeIndex:i?n.length-e:e};let a,o;if(i?(a=!(!t.previousElementSibling||!t.previousElementSibling.previousElementSibling),o=!!t.parentElement.previousElementSibling):(a=!(!t.nextElementSibling||!t.nextElementSibling.nextElementSibling),o=!!t.parentElement.nextElementSibling),!a&&!o)return{rangeNode:s,rangeIndex:i?n.length===this.VOID_KEY?1:0:n.length===this.VOID_KEY?1:n.length};const r=e-n.length-1,c=i?a?t.previousElementSibling.previousElementSibling:t.parentElement.previousElementSibling.lastElementChild:a?t.nextElementSibling.nextElementSibling:t.parentElement.nextElementSibling.children[0];return this.getOffsetRange(r,c,i)}setIMERecord(){if(this.target.deviceInfo.isPc)return;const e=this.getMarkNode(this.vnode);if(!e)return this.IME_RECORD.MARK=null,this.IME_RECORD.TAG=null,void(this.IME_RECORD.GRID=null);this.target.chatEvent.isIMEModel&&e.children[0].childNodes[0].textContent===this.VOID_KEY&&(e.children[0].childNodes[0].textContent=this.VOID_KEY+this.VOID_KEY,this.restCursorPos(this.vnode,this.cursorIndex+1)),this.IME_RECORD.NODE=this.vnode,this.IME_RECORD.INDEX=this.cursorIndex,this.IME_RECORD.MARK=e,this.IME_RECORD.TAG=this.IME_RECORD.MARK.previousElementSibling,this.IME_RECORD.GRID=this.IME_RECORD.MARK.parentElement}handleIMEDelete(){const e=(this.richText.children[0]||{childNodes:[]}).childNodes[0];if(e&&e.getAttribute&&"richMark"===e.getAttribute("data-set-richType")){if(this.IME_RECORD.INDEX<=2&&this.IME_RECORD.TAG){const e=this.IME_RECORD.TAG.previousElementSibling;this.IME_RECORD.GRID.removeChild(this.IME_RECORD.TAG),this.markMerge(e,this.IME_RECORD.MARK)}this.upDataNodeOrIndex()}else this.textInnerHtmlInit(!0)}handleIMEWrap(){this.upDataNodeOrIndex()}}const T={device:"auto",needDialog:!0,needDebounce:!0,asyncMatch:!1,userList:[],reformList:[],placeholder:"",maxLength:void 0,copyType:["text"],uploadImage:void 0,needCallEvery:!0,needCallSpace:!1,userProps:{},customTrigger:[],dialogLabels:{pcPointDialog:{},pcPCheckDialog:{},h5Dialog:{}},wrapKeyFun:e=>e.ctrlKey&&["Enter"].includes(e.key),sendKeyFun:e=>!e.ctrlKey&&["Enter"].includes(e.key)},M={id:"id",name:"name",avatar:"avatar",pinyin:"pinyin"},D={title:"群成员",callEveryLabel:"所有人",checkLabel:"多选",emptyLabel:"暂无数据"},L={title:"选择要@的人",searchPlaceholder:"搜素人员名称",searchEmptyLabel:"没有匹配到任何结果",userTagTitle:"研讨成员列表",checkAllLabel:"全选",checkEmptyLabel:"请选择需要@的成员",confirmLabel:"确定",cancelLabel:"取消"},N={title:"选择提醒的人",callEveryLabel:"所有人",searchPlaceholder:"搜素人员名称",searchEmptyLabel:"没有匹配到任何结果",confirmLabel:"确定",cancelLabel:"收起"},U={needUserId:!1,needTagId:!1,needSelectId:!1,wrapClassName:void 0,rowClassName:void 0,imgToText:!1,identifyLink:!1},P=["Backspace","Shift","Tab","CapsLock","Control","Meta","Alt","ContextMenu","Enter","NumpadEnter","Escape","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Home","End","PageUp","PageDown","Insert","Delete","NumLock"],O={"!":"!",$:"¥","(":"(",")":")","[":"【","]":"】","-":"——",";":";",":":":","\\":"、","'":"’",'"':"“","`":"·",",":",","<":"《",".":"。",">":"》","?":"?"};class ${constructor(e){n(this,"target"),n(this,"outerApply",!1),n(this,"isComposition",!1),n(this,"matchKey",0),n(this,"startOpenIndex",0),n(this,"textLength",0),n(this,"isIMEModel",!1),n(this,"undoHistory",[]),n(this,"redoHistory",[]),n(this,"doOverHistory",!0),n(this,"notMergeKey",P),n(this,"tagProps",O),n(this,"chatEventModule",{enterSend:[],operate:[],defaultAction:[],atMatch:[],atCheck:[],tagCheck:[],selectCheck:[]}),n(this,"debounceEvents",{recordHistory:()=>{},dialogMoveToRange:e=>{},selectDialogToAim:()=>{},matchPointDialog:()=>{},movePointActiveUserElm:e=>{},moveCustomActiveTagElm:e=>{}}),this.target=e,this.registerEvent(),this.otherEvent()}registerEvent(){const{chatElement:e,options:t,deviceInfo:i,chatInput:s}=this.target;e.richText.addEventListener("keyup",n=>{if(!t.needDialog)return;if(n.stopPropagation(),i.isPc)return void(50===n.keyCode||"Digit2"===n.code||"@"===n.key?e.ruleShowPointDialog():-1!==Object.keys(e.pcElms.customTagDialogElms).indexOf(n.key)&&e.showCustomTagDialog(n.key));const a="Unidentified"===n.key?"android":"ios";let o=!1;switch(a){case"android":o=229===n.keyCode;break;case"ios":o=50===n.keyCode||"Digit2"===n.code||"@"===n.key;break}o&&(t.reformList.length>0||t.asyncMatch)&&s.showAt()&&(this.target.showH5Dialog(),e.isExternalCallPopup=!1)}),e.richText.addEventListener("keydown",async n=>{if(!i.isPc&&"Unidentified"===n.key&&229===n.keyCode)return this.isIMEModel=!0,void s.setIMERecord();if(!this.isIMEModel){if(r(e.pcElms.pointDialogElm))return void(["ArrowUp","ArrowDown","Enter","NumpadEnter"].includes(n.code)?n.preventDefault():["ArrowLeft","ArrowRight"].includes(n.code)&&e.exitPointDialog());if(e.pcElms.customTagDialogTagKey&&r(e.pcElms.customTagDialogElms[e.pcElms.customTagDialogTagKey]))return void(["ArrowUp","ArrowDown","Enter","NumpadEnter"].includes(n.code)?n.preventDefault():["ArrowLeft","ArrowRight"].includes(n.code)&&e.exitCustomTagDialog());"Backspace"===n.code||"Backspace"===n.key?(s.selectRegionMerge()||s.gridElmMerge()||s.delMarkRule())&&(n.preventDefault(),await this.richTextInput()):t.wrapKeyFun(n)||!i.isPc&&"Enter"===n.key?(n.preventDefault(),s.setWrap(),await this.richTextInput()):t.sendKeyFun(n)?(n.preventDefault(),await l(100),this.triggerChatEvent("enterSend")):["ArrowLeft","ArrowRight"].includes(n.code)?(n.preventDefault(),s.switchRange(n.code)):n.ctrlKey&&"KeyA"===n.code?this.target.isEmpty()&&n.preventDefault():n.ctrlKey&&"KeyZ"===n.code?(n.preventDefault(),this.ruleChatEvent(()=>{this.target.undo()},"defaultAction","UNDO")):n.ctrlKey&&"KeyY"===n.code&&(n.preventDefault(),this.ruleChatEvent(()=>{this.target.redo()},"defaultAction","REDO")),-1===this.notMergeKey.indexOf(n.key)&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&s.selectRegionMerge()}}),e.richText.addEventListener("input",async n=>{if(this.isIMEModel)return await l(50),"deleteContentBackward"===n.inputType?s.handleIMEDelete():"insertParagraph"===n.inputType?s.handleIMEWrap():(s.upDataNodeOrIndex(),this.isComposition||s.updateGrid()),void 0!==t.maxLength&&this.ruleMaxLength(),e.showPlaceholder(),this.triggerChatEvent("operate"),void(this.isIMEModel=!1);await this.richTextInput(),i.isPc&&!this.isComposition&&this.debounceEvents.matchPointDialog()}),e.richText.addEventListener("copy",e=>{e.preventDefault(),this.ruleChatEvent(()=>{this.copyRange(e)},"defaultAction","COPY")}),e.richText.addEventListener("cut",e=>{e.preventDefault(),this.ruleChatEvent(()=>{this.copyRange(e),this.removeRange()},"defaultAction","CUT")}),e.richText.addEventListener("paste",e=>{e.preventDefault();const{options:t,chatInput:i}=this.target;this.ruleChatEvent(()=>{const s=e.clipboardData.getData("text/plain");if("string"==typeof s&&""!==s){if(-1===t.copyType.indexOf("text"))return;let n=document.createElement("div");n.innerHTML=e.clipboardData.getData("application/my-custom-format")||"",i.selectRegionMerge(),n.children[0]&&"richBox"===n.children[0].getAttribute("data-set-richType")?this.insertInsideHtml(n.innerHTML):(n.innerHTML=s,this.target.insertText(n.innerText)),n=null}else{if(-1===t.copyType.indexOf("image"))return;const i=(e.clipboardData||e.originalEvent.clipboardData).items||[];Array.from(i,async e=>{if(-1===e.type.indexOf("image"))return;const i=e.getAsFile();if(t.uploadImage){const e=await t.uploadImage(i);this.target.insertHtml(`<img class="chat-img" src="${e}" alt="" />`)}else{const e=new FileReader;e.onload=e=>{this.target.insertHtml(`<img class="chat-img" src="${e.target.result}" alt="" />`)},e.readAsDataURL(i)}})}},"defaultAction","PASTE")}),e.richText.addEventListener("blur",()=>{s.upDataNodeOrIndex(),s.setIMERecord()}),e.richText.addEventListener("focus",()=>{s.upDataNodeOrIndex(),s.setIMERecord()}),e.richText.addEventListener("click",e=>{s.upDataNodeOrIndex(),s.setIMERecord();const t=y(e.target,"chatTag",3);if(t){const e=t.children[0];if(e.classList.contains("at-select")){const t=e.getAttribute("data-select-key");this.target.showPCSelectDialog(t,e)}}}),e.richText.addEventListener("dragstart",e=>{e.stopPropagation(),e.preventDefault()}),e.richText.addEventListener("dragover",e=>{e.stopPropagation(),e.preventDefault()}),e.richText.addEventListener("drop",e=>{e.stopPropagation(),e.preventDefault()}),e.richText.addEventListener("compositionstart",()=>{this.isComposition=!0}),e.richText.addEventListener("compositionend",()=>{this.isComposition=!1}),window.addEventListener("click",this.winClick.bind(this)),window.addEventListener("keydown",this.winKeydown.bind(this))}otherEvent(){const{options:e,chatInput:t,chatElement:i}=this.target,{needDebounce:s}=e,n=()=>{const{gridIndex:e,markIndex:s}=t.getRichTextNodeIndex(t.vnode);if(null===e||null==s)return;const n={html:i.richText.innerHTML,gridIndex:e,markIndex:s,cursorIndex:t.cursorIndex};this.undoHistory.push(n),this.undoHistory.length>50&&this.undoHistory.shift()};this.debounceEvents.recordHistory=s?u(n,200):n;const a=e=>{let s="0",n="100%";const a=t.getRangeRect();if(!a)return;const o=i.pcElms.containerDialogElm.getBoundingClientRect();let r=a.x-o.x,c=o.y-a.y;const{clientWidth:l,clientHeight:d}=e;a.x>window.innerWidth-l-30&&(r=a.x-l-o.x-16,s="100%"),a.y<d&&(c-=d,n="0"),e.style.transform="translate(0, 0)",e.style.transformOrigin=`${s} ${n}`,e.style.left=r+6+"px",e.style.bottom=`${c}px`,e.style.opacity="1"};this.debounceEvents.dialogMoveToRange=s?u(a,120,!0):a;const r=()=>{if(!e.needDialog)return;const s=t.vnode.textContent||"",n=t.cursorIndex,a=s.slice(0,n);let r=-1,c=-1,l="userTag";-1!==a.lastIndexOf("@")&&(r=a.lastIndexOf("@")),i.pcElms.customTagDialogTagKey&&-1!==a.lastIndexOf(i.pcElms.customTagDialogTagKey)&&(c=a.lastIndexOf(i.pcElms.customTagDialogTagKey));const d=this.tagProps[i.pcElms.customTagDialogTagKey];if(d&&-1!==a.lastIndexOf(d)&&(c=a.lastIndexOf(d)),c>r&&(l="customTag"),"userTag"===l&&e.asyncMatch){if(r<0)return void i.exitPointDialog();this.matchKey++;const e=this.matchKey;this.startOpenIndex=r+1;const t=a.slice(this.startOpenIndex)||"";if(/\s/gi.test(t))return void i.exitPointDialog();this.target.updateUserList([]),o(i.pcElms.pointDialogLoadingElm,!0,"flex"),o(i.pcElms.pointDialogEmptyElm),i.showPointDialog();const s=this.triggerChatEvent("atMatch",t).find(e=>e&&e instanceof Promise);return void(s&&s.then(t=>{if(e===this.matchKey){if(o(i.pcElms.pointDialogLoadingElm),!t||t.length<=0)return void o(i.pcElms.pointDialogEmptyElm,!0,"flex");this.target.updateUserList(t),i.pcElms.pointDialogUsersElm&&i.pcElms.pointDialogUsersElm.length>0&&i.updatePointActiveUserElm(i.pcElms.pointDialogUsersElm[0].elm)}}))}if("userTag"===l&&e.reformList.length<=0||"customTag"===l&&i.customTags[i.pcElms.customTagDialogTagKey].length<=0)return;const u=()=>{"userTag"===l?i.exitPointDialog():i.exitCustomTagDialog()},h=()=>{"userTag"===l?i.showPointDialog():i.showCustomTagDialog(i.pcElms.customTagDialogTagKey)};if(r<0&&c<0)return i.exitPointDialog(),void i.exitCustomTagDialog();this.startOpenIndex="userTag"===l?r+1:c+1;const m=new RegExp(`^([${t.ZERO_WIDTH_KEY}${t.VOID_KEY}])+$`);if(!a||m.test(a)||n<this.startOpenIndex)return void u();const g=a.slice(this.startOpenIndex)||"";if(/\s/gi.test(g))u();else if(g)if("userTag"===l){const e=this.target.searchUserList(g);e.length>0?i.showPointDialog(e):u()}else{const e=i.customTags[i.pcElms.customTagDialogTagKey].filter(e=>p(e.name,e.pinyin||"",g));e.length>0?i.showCustomTagDialog(i.pcElms.customTagDialogTagKey,e):u()}else h()};this.debounceEvents.matchPointDialog=s?u(r,200):r;const l=e=>{if(!i.pcElms.pointDialogActiveElm)return;let t=0;const s=i.pcElms.pointDialogActiveElm.getAttribute("data-set-id");i.pcElms.pointDialogUsersElm.some(e=>{const i=e.elm.getAttribute("data-set-id");return t=e.index,s===i});const n=i.pcElms.pointDialogUsersElm.filter(e=>!e.elm.classList.contains("user-no-match")),a=n.map(e=>e.index);let o;"down"===e?o=t===n[n.length-1].index?n[0]:n[a.indexOf(t)+1]:"up"===e&&(o=t===n[0].index?n[n.length-1]:n[a.indexOf(t)-1]),o&&i.updatePointActiveUserElm(o.elm,!0)};this.debounceEvents.movePointActiveUserElm=h(l,80);const d=e=>{if(!i.pcElms.customTagDialogActiveElm)return;const t=i.customTags[i.pcElms.customTagDialogTagKey].map(e=>e.id),s=i.pcElms.customTagDialogActiveElm.getAttribute("data-set-id"),n=t.indexOf(s),a=Array.from(i.pcElms.customTagDialogElms[i.pcElms.customTagDialogTagKey].children[1].children,(e,t)=>({elm:e,index:t})).filter(e=>!e.elm.classList.contains("tag-no-match")),o=a.map(e=>e.index);let r;"down"===e?r=n===a[a.length-1].index?a[0]:a[o.indexOf(n)+1]:"up"===e&&(r=n===a[0].index?a[a.length-1]:a[o.indexOf(n)-1]),r&&i.updateActiveCustomTagElm(r.elm,!0)};this.debounceEvents.moveCustomActiveTagElm=h(d,80);const m=()=>{const e=i.pcElms.selectDialogAim.getClientRects()[0],t=i.pcElms.selectDialogElms[i.pcElms.selectDialogKey];o(t,!0);const s=t.querySelector(".chat-select-arrow");let n=t.clientHeight+16;if(n>e.y?(n=-(e.height+16),s.style.top="-16px",s.style.bottom="auto",s.style.transform="rotate(0deg)"):(s.style.transform="rotate(180deg)",s.style.bottom="-16px",s.style.top="auto"),window.innerWidth-e.x<t.clientWidth){const i=t.clientWidth-(window.innerWidth-e.x)-10;t.style.left="auto",t.style.right="10px",s.style.left="auto",s.style.right=i-s.clientWidth/2+e.width/2+"px"}else t.style.left=e.x+"px",t.style.right="auto",s.style.left=e.width/2-s.clientWidth/2+"px",s.style.right="auto";t.style.top=e.y+"px",t.style.transform=`translateY(${-n}px)`;const a=t.querySelector(".chat-select-dialog-main"),r=t.querySelectorAll(".chat-select-dialog-item");let l=0,d=!1,u=0;if(i.pcElms.selectDialogAim.classList.contains("at-select")){const e=i.pcElms.selectDialogAim.getAttribute("data-select-id");c(i.pcElms.selectDialogAim,"aim",!0),Array.from(r,t=>{const i=t.lastChild.lastChild,s=e===t.getAttribute("data-set-id");s&&(u=t.clientHeight,d=!0),!s&&!d&&(l+=t.clientHeight),o(i,s,"inline-block")});const t=l-a.clientHeight/2+u/2;a.scrollTop=t>0?t:0}else Array.from(r,e=>{const t=e.lastChild.lastChild;o(t,!1,"inline-block")})};this.debounceEvents.selectDialogToAim=s?u(m,120):m;const g={html:i.richText.innerHTML,gridIndex:0,markIndex:0,cursorIndex:t.cursorIndex};this.undoHistory=[g]}winClick(){if(!this.target||this.outerApply)return;const{chatElement:e}=this.target;r(e.pcElms.pointDialogElm)&&e.exitPointDialog(),e.pcElms.checkDialogSearchResultElm&&o(e.pcElms.checkDialogSearchResultElm),e.pcElms.customTagDialogTagKey&&r(e.pcElms.customTagDialogElms[e.pcElms.customTagDialogTagKey])&&e.exitCustomTagDialog(),e.pcElms.selectDialogKey&&r(e.pcElms.selectDialogElms[e.pcElms.selectDialogKey])&&e.exitSelectDialog()}async winKeydown(e){if(!this.target)return;const{chatElement:t,options:i}=this.target;if(e.ctrlKey&&"KeyZ"===e.code&&e.preventDefault(),!this.isComposition)if(r(t.pcElms.pointDialogElm)){if("ArrowDown"===e.code)return e.preventDefault(),void this.debounceEvents.movePointActiveUserElm("down");if("ArrowUp"===e.code)return e.preventDefault(),void this.debounceEvents.movePointActiveUserElm("up");if(("Enter"===e.code||"NumpadEnter"===e.code)&&t.pcElms.pointDialogActiveElm){e.preventDefault();const s=t.pcElms.pointDialogActiveElm.getAttribute("data-set-id");if(await l(100),t.isPointSearchMode||i.asyncMatch)await this.target.matchSetTag(i.reformList.find(e=>e.id===s));else{const e=i.userList.find(e=>String(e[i.userProps.id])===s);await this.target.onceSetTag(e)}t.exitPointDialog()}}else if(t.pcElms.customTagDialogTagKey&&r(t.pcElms.customTagDialogElms[t.pcElms.customTagDialogTagKey])){if("ArrowDown"===e.code)return e.preventDefault(),void this.debounceEvents.moveCustomActiveTagElm("down");if("ArrowUp"===e.code)return e.preventDefault(),void this.debounceEvents.moveCustomActiveTagElm("up");if(("Enter"===e.code||"NumpadEnter"===e.code)&&t.pcElms.customTagDialogActiveElm){e.preventDefault();const i=t.pcElms.customTagDialogActiveElm.getAttribute("data-set-id");await l(100);const s=t.customTags[t.pcElms.customTagDialogTagKey].find(e=>e.id===i);t.isPointSearchMode?await this.target.matchSetCustomTag(s):await this.target.onceSetCustomTag(s),t.exitCustomTagDialog()}}}async richTextInput(e=!0){const{chatInput:t,deviceInfo:i,chatElement:s,options:n}=this.target;t.upDataNodeOrIndex(),i.isPc&&t.selectRegionMerge(),await l(50),this.isComposition||t.updateGrid();const a=(s.richText.children[0]||{childNodes:[]}).childNodes[0];if(!a||!a.getAttribute||"richMark"!==a.getAttribute("data-set-richType"))return t.textInnerHtmlInit(!0),s.showPlaceholder(),void this.triggerChatEvent("operate");void 0!==n.maxLength&&this.ruleMaxLength(),s.showPlaceholder(),this.triggerChatEvent("operate"),e&&this.doOverHistory&&!this.isComposition&&this.debounceEvents.recordHistory(),t.viewIntoPoint()}ruleMaxLength(){const{options:e,chatElement:t}=this.target;if(this.target.isEmpty()||void 0===e.maxLength)return void(this.textLength=0);let i=0,s=0;const n=[];Array.prototype.some.call(t.richText.children,(t,a)=>{const{nodeInfos:o,nodeTextLength:r}=this.getGirdNodeTextInfo(t);if(i+=r,n.push(o),s=a,i>=e.maxLength)return!0});const a=[];Array.from(t.richText.children,(e,t)=>{t>s&&a.push(e)}),a.forEach(e=>t.richText.removeChild(e)),this.deepDelGirdText(n,i)}getGirdNodeTextInfo(e){const{chatInput:t}=this.target,i=[];let s=0;if(1===e.children.length&&e!==e.parentElement.children[0]){const n=e.children[0],a=(n.textContent||"").replace(new RegExp(t.VOID_KEY,"g"),"");s+=a.length||1,i[0]={node:n,textLength:a.length||1,type:"richMark"}}else Array.from(e.children,(e,n)=>{if("richMark"===e.getAttribute("data-set-richType")){const a=(e.textContent||"").replace(new RegExp(t.VOID_KEY,"g"),"");s+=a.length,i[n]={node:e,textLength:a.length,type:"richMark"}}else{const a=(e.textContent||"").replace(new RegExp(t.VOID_KEY,"g"),"");s+=a.length||1,i[n]={node:e,textLength:a.length||1,type:"chatTag"}}});return{nodeInfos:i,nodeTextLength:s}}deepDelGirdText(e,t){if(t>this.target.options.maxLength){const i=e[e.length-1];e.pop(),this.deepDelNode(i,e,t)}else this.textLength=t}deepDelNode(e,t,i){const s=e[0].node.parentElement;if(i>this.target.options.maxLength){let n=i-this.target.options.maxLength,a=e[e.length-1];if("richMark"===a.type)if(0===a.textLength||n>=a.textLength)s.removeChild(a.node),e.pop(),n-=a.textLength,a=e[e.length-1],s.removeChild(a.node),e.pop(),n-=a.textLength;else{const e=a.node.childNodes[0];e.textContent=e.textContent.slice(0,a.textLength-n),0===e.textContent&&(e.setAttribute("data-set-empty","true"),e.innerHTML=`${this.target.chatInput.VOID_KEY}<br>`),n=0}else s.removeChild(a.node),e.pop(),n-=a.textLength;n>0?e.length>0?this.deepDelNode(e,t,n+this.target.options.maxLength):(this.target.chatElement.richText.appendChild(s),this.deepDelGirdText(t,n+this.target.options.maxLength)):(this.textLength=this.target.options.maxLength+n,this.target.enable())}}copyRange(e){const t=window.getSelection();if(t.isCollapsed||t.rangeCount<=0)return e.clipboardData.setData("application/my-custom-format",""),void e.clipboardData.setData("text/plain","");const{chatElement:i,chatInput:s}=this.target,n=t.toString()||"";let a=document.createElement("div");a.innerHTML=n;const o=a.innerText.replace(/\n\n/g,"\n");a=null,e.clipboardData.setData("text/plain",o);const r=t.anchorNode,c=t.focusNode;if(r===c&&r.nodeType===Node.TEXT_NODE){const i=r.textContent.slice(t.anchorOffset,t.focusOffset);return void e.clipboardData.setData("application/my-custom-format",i)}if(r===i.richText&&c===i.richText)return void e.clipboardData.setData("application/my-custom-format",i.richText.innerHTML);const l=s.getWrapNode(r,!0),d=s.getWrapNode(c,!0),u=s.getMarkNode(r,!0),h=s.getMarkNode(c,!0),p="richMark"===u.getAttribute("data-set-richType"),m="richMark"===h.getAttribute("data-set-richType"),g=Array.prototype.indexOf.call(l.childNodes,u),f=Array.prototype.indexOf.call(d.childNodes,h);if(l===d&&l.parentNode===i.richText){const i=g>f,n=Array.prototype.filter.call(l.childNodes,(e,t)=>i?t<g&&t>f:t>g&&t<f).map(e=>e.cloneNode(!0)),a=p?i?r.textContent.slice(0,t.anchorOffset):r.textContent.slice(t.anchorOffset):"",o=m?i?c.textContent.slice(t.focusOffset):c.textContent.slice(0,t.focusOffset):"",d=s.getGridElm(!0),u=s.getGridElm(!0);a&&(d.childNodes[0].innerHTML=a,d.childNodes[0].setAttribute("data-set-empty","false")),o&&(u.childNodes[0].innerHTML=o,u.childNodes[0].setAttribute("data-set-empty","false")),i?("richMark"!==n[0].getAttribute("data-set-richType")&&n.unshift(u),"richMark"!==n[n.length-1].getAttribute("data-set-richType")&&n.push(d)):("richMark"!==n[0].getAttribute("data-set-richType")&&n.unshift(d),"richMark"!==n[n.length-1].getAttribute("data-set-richType")&&n.push(u));let h=document.createElement("div");const v=s.setWrapNodeByMark(n);return h.appendChild(v),e.clipboardData.setData("application/my-custom-format",h.innerHTML),void(h=null)}if(l.parentNode===i.richText&&d.parentNode===i.richText){const n=Array.prototype.indexOf.call(i.richText.childNodes,l),a=Array.prototype.indexOf.call(i.richText.childNodes,d),o=n>a,u=Array.prototype.filter.call(i.richText.childNodes,(e,t)=>o?t<n&&t>a:t>n&&t<a).map(e=>e.cloneNode(!0)),h=p?o?r.textContent.slice(0,t.anchorOffset):r.textContent.slice(t.anchorOffset):"",v=m?o?c.textContent.slice(t.focusOffset):c.textContent.slice(0,t.focusOffset):"",y=s.getGridElm(!0),b=s.getGridElm(!0);h&&(y.childNodes[0].innerHTML=h,y.childNodes[0].setAttribute("data-set-empty","false")),v&&(b.childNodes[0].innerHTML=v,b.childNodes[0].setAttribute("data-set-empty","false"));const C=Array.prototype.filter.call(l.childNodes,(e,t)=>o?t<g:t>g).map(e=>e.cloneNode(!0)),x=Array.prototype.filter.call(d.childNodes,(e,t)=>o?t>f:t<f).map(e=>e.cloneNode(!0));if(o){C.push(y),x.unshift(b);const e=s.setWrapNodeByMark(C),t=s.setWrapNodeByMark(x);u.push(e),u.unshift(t)}else{C.unshift(y),x.push(b);const e=s.setWrapNodeByMark(C),t=s.setWrapNodeByMark(x);u.unshift(e),u.push(t)}let w=document.createElement("div");return Array.from(u,e=>{w.appendChild(e)}),e.clipboardData.setData("application/my-custom-format",w.innerHTML),void(w=null)}}async removeRange(){const{chatInput:e,chatElement:t}=this.target;window.getSelection().getRangeAt(0).deleteContents(),await l(50),e.updateGrid(),t.showPlaceholder()}async setChatHistory(e){const{chatElement:t,chatInput:i}=this.target;this.doOverHistory=!1;const{html:s,gridIndex:n,markIndex:a,cursorIndex:o}=e;t.richText.innerHTML=s;const r=t.richText.childNodes[n].childNodes[a].childNodes[0].childNodes[0];i.restCursorPos(r,o),await this.richTextInput(),this.doOverHistory=!0}async insertInsideHtml(e){const{chatInput:t}=this.target;let i=document.createElement("div");i.innerHTML=e,i.children.length&&(1===i.children.length?t.insetRangeGrid(i.children[0]):t.insetRangeGrids(i.children),i=null,await this.richTextInput())}triggerChatEvent(e,...t){const i=[];return this.chatEventModule[e].forEach(e=>{e&&i.push(e(...t))}),i}ruleChatEvent(e,t,...i){this.triggerChatEvent(t,...i).some(e=>e&&"PREVENT"===e)||(e&&e.bind(this)(),e=null)}}const R=function(e,t,i){return e.forEach(e=>{if(i in e){const s=t.indexOf(String(e[i]));-1!==s&&(t[s]=e)}}),t.filter(e=>e[i])};class j{constructor(e){switch(n(this,"options"),n(this,"deviceInfo",a()),n(this,"chatElement"),n(this,"chatInput"),n(this,"chatEvent"),this.options=Object.assign({},T,e),this.options.device=this.options.device.toLocaleLowerCase(),this.options.device){case"pc":this.deviceInfo.isPc=!0;break;case"h5":this.deviceInfo.isPc=!1;break}this.options.userProps=Object.assign({},M,e.userProps||{}),this.options.dialogLabels.pcPointDialog=Object.assign({},D,b(e.dialogLabels,"pcPointDialog",{})),this.options.dialogLabels.pcPCheckDialog=Object.assign({},L,b(e.dialogLabels,"pcPCheckDialog",{})),this.options.dialogLabels.h5Dialog=Object.assign({},N,b(e.dialogLabels,"h5Dialog",{})),this.chatElement=new A(this),this.chatInput=new S(this),this.chatEvent=new $(this),this.updateConfig(e);const t=this;Object.defineProperty(this,"richText",{get(){return t.chatElement.richText}}),Object.defineProperty(this,"textLength",{get(){return t.chatEvent.textLength}}),this.addEventListener("operate",()=>{this.chatInput.setIMERecord()}),requestAnimationFrame(()=>{this.chatElement.richText.focus()})}updateConfig(e){void 0!==e.copyType&&(this.options.copyType=e.copyType),e.userProps&&(this.options.userProps=Object.assign({},M,e.userProps)),void 0!==e.uploadImage&&(this.options.uploadImage=e.uploadImage),void 0!==e.placeholder&&(this.chatElement.placeholderElm.textContent=e.placeholder),void 0!==e.maxLength&&(this.options.maxLength=e.maxLength,this.chatEvent.ruleMaxLength()),(this.options.asyncMatch||void 0!==e.needCallEvery||e.userList)&&(this.options.needCallEvery=!this.options.asyncMatch&&d(e.needCallEvery),this.updateUserList(this.options.asyncMatch?[]:e.userList)),void 0!==e.needCallSpace&&this.chatInput.setCallSpace(d(e.needCallSpace)),void 0!==e.wrapKeyFun&&(this.options.wrapKeyFun=e.wrapKeyFun),void 0!==e.sendKeyFun&&(this.options.sendKeyFun=e.sendKeyFun),this.options.needDialog&&e.customTrigger&&this.deviceInfo.isPc&&(this.options.customTrigger=e.customTrigger,this.chatElement.bindCustomTrigger()),this.options.needDialog&&e.selectList&&this.deviceInfo.isPc&&(this.options.selectList=e.selectList,this.chatElement.bindSelectList())}updateUserList(e=void 0){const{options:t,chatElement:i}=this;if(e){t.userList=JSON.parse(JSON.stringify(e));const i={[t.userProps.id]:"isALL",[t.userProps.name]:""};t.userList.unshift(i),t.reformList=e.map((e,i)=>{const s=e[t.userProps.id];if(!s&&0!==s)throw new Error(`配置项userList:下标第${i}项${t.userProps.id}值异常!`);return{id:String(s),name:String(e[t.userProps.name]||""),avatar:String(e[t.userProps.avatar]||""),pinyin:String(e[t.userProps.pinyin]||"")}})}const s=t.userList[0];s&&"isALL"===s[t.userProps.id]&&(s[t.userProps.name]=this.deviceInfo.isPc?t.dialogLabels.pcPointDialog.callEveryLabel:t.dialogLabels.h5Dialog.callEveryLabel),t.needDialog&&(this.deviceInfo.isPc?i.updatePCUser():i.updateH5User())}searchUserList(e){return this.options.reformList.filter(t=>p(t.name,t.pinyin||"",e))}getReduceNode(e){const t=Object.assign({},U,e||{}),i=/(https?|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g,s=this.chatElement.richText.cloneNode(!0).querySelectorAll(".chat-grid-wrap")||[],n=document.createElement("div");return t.wrapClassName&&(n.className=t.wrapClassName),Array.from(s,(e,s)=>{const a=e.querySelectorAll(".chat-stat")||[],o=document.createElement("p");t.rowClassName&&(o.className=t.rowClassName),Array.from(a,e=>{this.chatInput.getNodeEmpty(e)||(e.removeAttribute("data-set-richType"),e.removeAttribute("contenteditable"),e.removeAttribute("data-set-empty"),t.needUserId||e.removeAttribute("data-user-id"),t.needTagId||(e.removeAttribute("data-set-prefix"),e.removeAttribute("data-tag-id")),t.needSelectId||(e.removeAttribute("data-select-id"),e.removeAttribute("data-select-key")),t.imgToText&&e.firstChild&&"IMG"===e.firstChild.tagName&&(e.classList.add("img-to-text"),e.innerHTML=`[${e.firstChild.getAttribute("data-img-text")||"元素data-img-text未定义"}]`),t.identifyLink&&-1!==e.className.indexOf("chat-grid-input")&&(e.innerHTML=e.innerHTML.replace(i,e=>`<a class="chat-grid-link" href="${e}" target="_blank">${e}</a>`)),e.classList.contains("at-select")&&(e.classList.remove("aim"),e.removeChild(e.lastChild)),o.appendChild(e))}),o.innerHTML||(o.innerHTML="<br>"),n.appendChild(o)}),n}getText(e){let t="";const i=this.getReduceNode(e);return Array.from(i.children,(e,i)=>{t=t+(i>0?"\n":"")+e.textContent}),t}getHtml(e){return this.getReduceNode(e).innerHTML}async reverseAnalysis(e,t){if(!e)return;const i=document.createElement("div");i.innerHTML=e;const s=i.children;Array.from(s,e=>{e.className="chat-grid-wrap",e.setAttribute("data-set-richType","richBox");const t=e.children,i={},s=[];Array.from(t,(n,a)=>{if(-1!==n.className.indexOf("chat-grid-input")){const e=n.textContent||"";return n.className="",n.setAttribute("data-set-richType","richMark"),void(n.innerHTML=`<span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="false">${e}</span>`)}if("BR"===n.tagName){const t=this.chatInput.getGridElm(!0);return e.removeChild(n),void e.appendChild(t)}const o=n.cloneNode(!0);o.setAttribute("contenteditable","false");const r=document.createElement("span");r.className="chat-tag",r.setAttribute("contenteditable","false"),r.setAttribute("data-set-richType","chatTag"),r.appendChild(o),i[a]=r,a!==t.length-1?-1===t[a+1].className.indexOf("chat-grid-input")&&s.push(a):s.push(a),0===a&&s.push(-1)});for(const o in i){const s=Number(o),n=i[o].lastChild;n.classList.contains("at-select")&&(n.innerHTML=`${n.textContent}${I}`),s===t.length-1?(e.removeChild(t[s]),e.appendChild(i[o])):(e.insertBefore(i[o],t[s+1]),e.removeChild(t[s]))}const n=[],a=e.children;s.forEach(e=>{e===a.length-1?n.push("isEnd"):n.push(a[e+1])}),n.forEach(t=>{const i=this.chatInput.getGridElm(!0);if("isEnd"===t)e.appendChild(i);else{const s=i.children[0];s.childNodes.length>1&&s.removeChild(s.childNodes[1]),e.insertBefore(i,t)}})}),t?(this.enable(),await this.chatEvent.insertInsideHtml(i.innerHTML)):(this.chatElement.richText.innerHTML=i.innerHTML,this.enable(),await this.chatEvent.richTextInput())}async insertHtml(e){if(!e)return;const t=document.createElement("span");t.innerHTML=e,t.className="chat-set-html";const i=this.chatInput.createNewDom(t);return this.chatInput.replaceRegContent(i,!1),await this.chatEvent.richTextInput(),i}async insertText(e){if(!e)return;const t=new RegExp(`[${this.chatInput.ZERO_WIDTH_KEY}|${this.chatInput.VOID_KEY}]`,"ig"),i=e.replace(t,"");if(!i)return;const s=i.split("\n");let n="";s.forEach(e=>{const t=""!==e;n+=`<p class="chat-grid-wrap" data-set-richtype="richBox"><span data-set-richtype="richMark"><span class="chat-grid-input chat-stat" data-set-richtype="richInput" data-set-empty="${t?"false":"true"}">${t?e:this.chatInput.VOID_KEY+"<br>"}</span></span></p>`}),await this.chatEvent.insertInsideHtml(n)}getCallUserList(){const e=this.chatElement.richText.querySelectorAll(".at-user");if(e&&e.length>0){const t=Array.from(e,e=>e.dataset.userId);return R(this.options.userList,t,this.options.userProps.id)}return[]}getCallUserTagList(){const e=this.chatElement.richText.querySelectorAll(".at-user");if(e&&e.length>0){const t=[];return Array.from(e,e=>{t.some(t=>t[this.options.userProps.id]===e.dataset.userId)||t.push({[this.options.userProps.id]:e.dataset.userId,[this.options.userProps.name]:e.textContent.slice(1)})}),t}return[]}getCustomTagList(){const e=Object.keys(this.chatElement.customTags),t={},i=this.chatElement.richText.querySelectorAll(".at-tag");return e.forEach(e=>{let s=Array.prototype.filter.call(i,t=>t.getAttribute("data-set-prefix")===String(e)).map(e=>e.getAttribute("data-tag-id"));s=s.filter((e,t)=>s.indexOf(e)===t),t[e]=R(this.chatElement.customTags[e],s,"id")}),t}getSelectTagList(){const e=Object.keys(this.chatElement.selectTags),t={},i=this.chatElement.richText.querySelectorAll(".at-select");return e.forEach(e=>{let s=Array.prototype.filter.call(i,t=>t.getAttribute("data-select-key")===String(e)).map(e=>e.getAttribute("data-select-id"));s=s.filter((e,t)=>s.indexOf(e)===t),t[e]=R(this.chatElement.selectTags[e],s,"id")}),t}async clear(e){this.chatInput.textInnerHtmlInit(!0,e);const t={html:this.chatElement.richText.innerHTML,gridIndex:0,markIndex:0,cursorIndex:this.chatInput.cursorIndex};this.chatEvent.undoHistory=[t],this.chatEvent.redoHistory=[],await this.chatEvent.richTextInput(!1)}isEmpty(e=!1){if((this.chatElement.richText.querySelectorAll(".chat-tag")||[]).length>0)return!1;const t=new RegExp(`^(${this.chatInput.ZERO_WIDTH_KEY}|<br>|${this.chatInput.VOID_KEY})+$`),i=this.chatElement.richText.querySelectorAll(".chat-grid-input")||[];return e?Array.prototype.every.call(i,e=>!e.innerHTML||!e.textContent||!e.textContent.trim()||t.test(e.innerHTML)):Array.prototype.every.call(i,e=>!e.innerHTML||!e.textContent||t.test(e.innerHTML))}dispose(){if(this.options.elm.removeChild(this.chatElement.richText),this.options.elm.removeChild(this.chatElement.placeholderElm),this.options.needDialog)if(this.deviceInfo.isPc){const e=this.chatElement.pcElms.containerDialogElm.parentElement;e&&e.removeChild(this.chatElement.pcElms.containerDialogElm)}else document.body.removeChild(this.chatElement.h5Elms.dialogElm)}showPCPointDialog(){this.options.needDialog&&(this.insertText("@"),this.options.asyncMatch&&o(this.chatElement.pcElms.pointDialogEmptyElm,!0,"flex"),this.chatEvent.outerApply=!0,this.chatElement.showPointDialog(),l(50).then(()=>{this.chatEvent.outerApply=!1}))}showPCCheckDialog(){!this.options.needDialog||this.options.asyncMatch||(this.chatEvent.winClick(),this.chatElement.checkboxRows=[],o(this.chatElement.pcElms.checkDialogElm,!0),c(document.body,"disable-scroll",!0),this.chatElement.pcElms.checkDialogTagsElm.scrollTop=0,this.chatElement.pcElms.checkDialogUsersElm.scrollTop=0,this.chatElement.pcElms.checkDialogSearchInputElm.value="",this.chatElement.updateCheckDialogTags(),this.chatElement.isExternalCallPopup=!0)}showPCCustomTagDialog(e){!this.options.needDialog||this.options.asyncMatch||(this.insertText(e),this.chatEvent.outerApply=!0,this.chatElement.showCustomTagDialog(e),l(50).then(()=>{this.chatEvent.outerApply=!1}))}showPCSelectDialog(e,t){this.chatElement.exitCustomTagDialog(),this.chatElement.exitPointDialog(),this.chatEvent.outerApply=!0,t&&(this.chatElement.exitSelectDialog(),this.chatElement.pcElms.selectDialogAim=t),this.chatElement.pcElms.selectDialogKey=e,this.chatEvent.debounceEvents.selectDialogToAim(),l(50).then(()=>{this.chatEvent.outerApply=!1})}showH5Dialog(){this.chatElement.richText&&this.chatElement.richText.blur(),Array.from(this.chatElement.h5Elms.dialogMainElm.children,e=>{e.style.display="",c(e,"user-popup-check-item-check")}),c(this.chatElement.h5Elms.dialogCheckElm,"disabled",!0),o(this.chatElement.h5Elms.dialogElm,!0),c(document.body,"disable-scroll",!0),this.options.asyncMatch&&o(this.chatElement.h5Elms.dialogEmptyElm,!0,"flex"),this.chatElement.h5Elms.dialogMainElm.scrollTop=0,this.chatElement.isExternalCallPopup=!0}disabled(){this.chatElement.richText.setAttribute("contenteditable","false"),c(this.chatElement.richText,"chat-rich-text-disabled",!0)}enable(){this.chatElement.richText.setAttribute("contenteditable","true"),c(this.chatElement.richText,"chat-rich-text-disabled"),this.chatInput.setRangeLastText()}async setUserTag(e){this.chatEvent.triggerChatEvent("atCheck",[e]);const t=this.chatInput.createChatTagElm({id:e[this.options.userProps.id],name:e[this.options.userProps.name]},"@","at-user","user-id");this.chatInput.replaceRegContent(t,!1),await this.chatEvent.richTextInput()}async setCustomTag(e,t){this.chatEvent.triggerChatEvent("tagCheck",e,t),await this.chatInput.onceCustomCall(e,!1,t),await this.chatEvent.richTextInput()}async setSelectTag(e,t){if(this.chatEvent.triggerChatEvent("selectCheck",e,t||this.chatElement.pcElms.selectDialogKey),this.chatElement.pcElms.selectDialogAim&&this.chatElement.pcElms.selectDialogAim.classList.contains("at-select")){const t=this.chatElement.pcElms.selectDialogAim.getAttribute("data-select-id"),i=this.chatElement.pcElms.selectDialogAim.parentElement.nextElementSibling.childNodes[0].childNodes[0];if(this.chatInput.restCursorPos(i),t===e.id)return;this.chatElement.pcElms.selectDialogAim.setAttribute("data-select-id",e.id),this.chatElement.pcElms.selectDialogAim.childNodes[0].textContent=e.name}else{const i=document.createElement("span");i.setAttribute("class","at-select"),i.setAttribute("data-select-key",t||this.chatElement.pcElms.selectDialogKey),i.setAttribute("data-select-id",e.id),i.innerHTML=`${e.name}${I}`;const s=this.chatInput.createNewDom(i);this.chatInput.replaceRegContent(s,!1)}await this.chatEvent.richTextInput()}async matchSetTag(e){this.chatEvent.triggerChatEvent("atCheck",[e]),await this.chatInput.onceSearchCall(e,this.chatEvent.startOpenIndex),await this.chatEvent.richTextInput()}async onceSetTag(e){this.chatEvent.triggerChatEvent("atCheck",[e]),await this.chatInput.onceCall({id:e[this.options.userProps.id],name:e[this.options.userProps.name]}),await this.chatEvent.richTextInput()}async batchSetTag(e){this.chatEvent.triggerChatEvent("atCheck",e);const t=[];for(let i=0;i<=e.length-1;)t.push({id:e[i][this.options.userProps.id],name:e[i][this.options.userProps.name]}),i++;await this.chatInput.batchReplaceRegContent(t,!this.chatElement.isExternalCallPopup),await this.chatEvent.richTextInput()}async onceSetCustomTag(e){this.chatEvent.triggerChatEvent("tagCheck",e,this.chatElement.pcElms.customTagDialogTagKey),await this.chatInput.onceCustomCall(e,!0,this.chatElement.pcElms.customTagDialogTagKey),await this.chatEvent.richTextInput()}async matchSetCustomTag(e){this.chatEvent.triggerChatEvent("tagCheck",e,this.chatElement.pcElms.customTagDialogTagKey),await this.chatInput.onceCustomCall(e,this.chatEvent.startOpenIndex,this.chatElement.pcElms.customTagDialogTagKey),await this.chatEvent.richTextInput()}async undo(){const{chatEvent:e}=this;if(!e.doOverHistory||!e.undoHistory||e.undoHistory.length<=1)return;const t=e.undoHistory[e.undoHistory.length-2],i=e.undoHistory[e.undoHistory.length-1];e.redoHistory.push(i),e.undoHistory.pop(),await e.setChatHistory(t)}async redo(){const{chatEvent:e}=this;if(!e.doOverHistory||!e.redoHistory||e.redoHistory.length<1)return;const t=e.redoHistory[e.redoHistory.length-1];e.redoHistory.pop(),e.undoHistory.push(t),await e.setChatHistory(t)}cursorMove(e){if(0===e)return void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const t=new RegExp(`[${this.chatInput.ZERO_WIDTH_KEY}|${this.chatInput.VOID_KEY}]`,"ig");if(e>0){const i=this.chatInput.vnode.textContent.replace(t,"").slice(this.chatInput.cursorIndex);if(i.length>=e)return this.chatInput.cursorIndex+=e,void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const s=this.chatInput.vnode.parentElement.parentElement,n=s.parentElement;let a=!(!s.nextElementSibling||!s.nextElementSibling.nextElementSibling);const o=!!n.nextElementSibling;if(!a&&!o)return this.chatInput.cursorIndex+=i.length,0===this.chatInput.cursorIndex&&(this.chatInput.cursorIndex=1),void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const r=e-i.length-1,c=a?s.nextElementSibling.nextElementSibling:n.nextElementSibling.children[0],{rangeNode:l,rangeIndex:d}=this.chatInput.getOffsetRange(r,c);this.chatInput.restCursorPos(l,d)}else if(e<0){let i=Math.abs(e);const s=this.chatInput.vnode.textContent.replace(t,"").slice(0,this.chatInput.cursorIndex);if(s.length>=i)return this.chatInput.cursorIndex-=i,void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const n=this.chatInput.vnode.parentElement.parentElement,a=n.parentElement,o=!(!n.previousElementSibling||!n.previousElementSibling.previousElementSibling),r=!!a.previousElementSibling;if(!o&&!r)return void this.chatInput.restCursorPos(this.chatInput.vnode);i=i-s.length-1;const c=o?n.previousElementSibling.previousElementSibling:a.previousElementSibling.lastElementChild,{rangeNode:l,rangeIndex:d}=this.chatInput.getOffsetRange(i,c,!0);this.chatInput.restCursorPos(l,d)}}async cursorDel(e){if(0===e)return void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const t=this.chatInput.vnode,i=this.chatInput.cursorIndex;this.cursorMove(e);const s=this.chatInput.vnode,n=this.chatInput.cursorIndex,a=document.createRange();e<0?(a.setStart(s,n),a.setEnd(t,i)):(a.setStart(t,i),a.setEnd(s,n));const o=window.getSelection();o.removeAllRanges(),o.addRange(a),(this.chatInput.selectRegionMerge()||this.chatInput.gridElmMerge()||this.chatInput.delMarkRule())&&await this.chatEvent.richTextInput()}async delUserTags(e){const t=e||this.options.userList.map(e=>e[this.options.userProps.id]),i=this.chatElement.richText.querySelectorAll(".at-user"),s=[];Array.from(i,e=>{const i=e.getAttribute("data-user-id");t.some(e=>String(e)===i)&&s.push(e.parentElement)});for(let n=0;n<s.length;){const e=s[n];this.chatInput.delTag(e),n++}this.enable(),await this.chatEvent.richTextInput()}async delCustomTags(e,t){const i=this.options.customTrigger.find(t=>t.prefix===e);if(!i||0===i.tagList.length)return;const s=t||i.tagList.map(e=>e.id),n=this.chatElement.richText.querySelectorAll(".at-tag"),a=[];Array.from(n,t=>{const i=t.getAttribute("data-set-prefix"),n=t.getAttribute("data-tag-id");i===e&&s.some(e=>String(e)===n)&&a.push(t.parentElement)});for(let o=0;o<a.length;){const e=a[o];this.chatInput.delTag(e),o++}this.enable(),await this.chatEvent.richTextInput()}async delSelectTags(e,t){const i=this.options.selectList.find(t=>t.key===e);if(!i||0===i.options.length)return;const s=t||i.options.map(e=>e.id),n=this.chatElement.richText.querySelectorAll(".at-select"),a=[];Array.from(n,t=>{const i=t.getAttribute("data-select-key"),n=t.getAttribute("data-select-id");i===e&&s.some(e=>String(e)===n)&&a.push(t.parentElement)});for(let o=0;o<a.length;){const e=a[o];this.chatInput.delTag(e),o++}this.enable(),await this.chatEvent.richTextInput()}addEventListener(e,t){this.chatEvent.chatEventModule[e].push(t)}removeEventListener(e,t){const i=this.chatEvent.chatEventModule[e],s=i.indexOf(t);-1!==s&&i.splice(s,1)}revisePCPointDialogLabel(e){this.options.needDialog&&(this.options.dialogLabels.pcPointDialog=Object.assign({},D,e||{}),this.chatElement.pcElms.pointDialogElm.querySelector(".call-user-dialog-header-title").textContent=this.options.dialogLabels.pcPointDialog.title,this.chatElement.pcElms.pointDialogCheckElm.textContent=this.options.dialogLabels.pcPointDialog.checkLabel,this.chatElement.pcElms.pointDialogEmptyElm&&(this.chatElement.pcElms.pointDialogEmptyElm.children[1].textContent=this.options.dialogLabels.pcPointDialog.emptyLabel),this.options.asyncMatch||this.updateUserList())}revisePCCheckDialogLabel(e){!this.options.needDialog||this.options.asyncMatch||(this.options.dialogLabels.pcPCheckDialog=Object.assign({},L,e||{}),this.chatElement.pcElms.checkDialogElm.querySelector(".checkbox-dialog-container-header").children[0].textContent=this.options.dialogLabels.pcPCheckDialog.title,this.chatElement.pcElms.checkDialogSearchInputElm.setAttribute("placeholder",this.options.dialogLabels.pcPCheckDialog.searchPlaceholder),this.chatElement.pcElms.checkDialogElm.querySelector(".checkbox-dialog-search-empty").textContent=this.options.dialogLabels.pcPCheckDialog.searchEmptyLabel,this.chatElement.pcElms.checkDialogElm.querySelector(".checkbox-dialog-right-box-title").textContent=this.options.dialogLabels.pcPCheckDialog.userTagTitle,this.chatElement.pcElms.checkDialogUsersElm.children[0].children[2].textContent=this.options.dialogLabels.pcPCheckDialog.checkAllLabel,this.chatElement.pcElms.checkDialogElm.querySelector(".btn-submit").textContent=this.options.dialogLabels.pcPCheckDialog.confirmLabel,this.chatElement.pcElms.checkDialogElm.querySelector(".btn-close").textContent=this.options.dialogLabels.pcPCheckDialog.cancelLabel)}reviseH5DialogLabel(e){this.options.needDialog&&(this.options.dialogLabels.h5Dialog=Object.assign({},N,e||{}),this.chatElement.h5Elms.dialogElm.querySelector(".popup-title").textContent=this.options.dialogLabels.h5Dialog.title,this.chatElement.h5Elms.dialogSearchElm.setAttribute("placeholder",this.options.dialogLabels.h5Dialog.searchPlaceholder),this.chatElement.h5Elms.dialogEmptyElm.children[1].textContent=this.options.dialogLabels.h5Dialog.searchEmptyLabel,this.chatElement.h5Elms.dialogCheckElm.textContent=this.options.dialogLabels.h5Dialog.confirmLabel,this.chatElement.h5Elms.dialogShowElm.textContent=this.options.dialogLabels.h5Dialog.cancelLabel,this.options.asyncMatch||this.updateUserList())}}if(!window)throw new Error("非web环境!");window.console&&window.console.log&&console.log(" %c ".concat("ChatArea"," %c v5.3.6 "),"background: #269AFF; color: #FFFFFF; padding: 4px 0; border-radius: 4px 0px 0px 4px; font-style: italic;","background: #FFFFFF; color: #269AFF; padding: 2px 0; border-radius: 0px 4px 4px 0px; font-style: italic; border: 2px solid #269AFF;"),window.ChatArea=j},"93f9":function(e,t,i){"use strict";i("323d")},"96cf":function(e,t,i){var s=function(e){"use strict";var t,i=Object.prototype,s=i.hasOwnProperty,n=Object.defineProperty||function(e,t,i){e[t]=i.value},a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(N){l=function(e,t,i){return e[t]=i}}function d(e,t,i,s){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),r=new M(s||[]);return n(o,"_invoke",{value:I(e,i,r)}),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(N){return{type:"throw",arg:N}}}e.wrap=d;var h="suspendedStart",p="suspendedYield",m="executing",g="completed",f={};function v(){}function y(){}function b(){}var C={};l(C,o,function(){return this});var x=Object.getPrototypeOf,w=x&&x(x(D([])));w&&w!==i&&s.call(w,o)&&(C=w);var k=b.prototype=v.prototype=Object.create(C);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function _(e,t){function i(n,a,o,r){var c=u(e[n],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"===typeof d&&s.call(d,"__await")?t.resolve(d.__await).then(function(e){i("next",e,o,r)},function(e){i("throw",e,o,r)}):t.resolve(d).then(function(e){l.value=e,o(l)},function(e){return i("throw",e,o,r)})}r(c.arg)}var a;function o(e,s){function n(){return new t(function(t,n){i(e,s,t,n)})}return a=a?a.then(n,n):n()}n(this,"_invoke",{value:o})}function I(e,t,i){var s=h;return function(n,a){if(s===m)throw new Error("Generator is already running");if(s===g){if("throw"===n)throw a;return L()}i.method=n,i.arg=a;while(1){var o=i.delegate;if(o){var r=A(o,i);if(r){if(r===f)continue;return r}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(s===h)throw s=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s=m;var c=u(e,t,i);if("normal"===c.type){if(s=i.done?g:p,c.arg===f)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(s=g,i.method="throw",i.arg=c.arg)}}}function A(e,i){var s=i.method,n=e.iterator[s];if(n===t)return i.delegate=null,"throw"===s&&e.iterator["return"]&&(i.method="return",i.arg=t,A(e,i),"throw"===i.method)||"return"!==s&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+s+"' method")),f;var a=u(n,e.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,f;var o=a.arg;return o?o.done?(i[e.resultName]=o.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,f):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function D(e){if(null!=e){var i=e[o];if(i)return i.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function i(){while(++n<e.length)if(s.call(e,n))return i.value=e[n],i.done=!1,i;return i.value=t,i.done=!0,i};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}function L(){return{value:t,done:!0}}return y.prototype=b,n(k,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},E(_.prototype),l(_.prototype,r,function(){return this}),e.AsyncIterator=_,e.async=function(t,i,s,n,a){void 0===a&&(a=Promise);var o=new _(d(t,i,s,n),a);return e.isGeneratorFunction(i)?o:o.next().then(function(e){return e.done?e.value:o.next()})},E(k),l(k,c,"Generator"),l(k,o,function(){return this}),l(k,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),i=[];for(var s in t)i.push(s);return i.reverse(),function e(){while(i.length){var s=i.pop();if(s in t)return e.value=s,e.done=!1,e}return e.done=!0,e}},e.values=D,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var i in this)"t"===i.charAt(0)&&s.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var i=this;function n(s,n){return r.type="throw",r.arg=e,i.next=s,n&&(i.method="next",i.arg=t),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],r=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=s.call(o,"catchLoc"),l=s.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),T(i),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var s=i.completion;if("throw"===s.type){var n=s.arg;T(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,i,s){return this.delegate={iterator:D(e),resultName:i,nextLoc:s},"next"===this.method&&(this.arg=t),f}},e}(e.exports);try{regeneratorRuntime=s}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}},"990b":function(e,t,i){var s=i("9093"),n=i("2621"),a=i("cb7c"),o=i("7726").Reflect;e.exports=o&&o.ownKeys||function(e){var t=s.f(a(e)),i=n.f;return i?t.concat(i(e)):t}},"9b43":function(e,t,i){var s=i("d8e8");e.exports=function(e,t,i){if(s(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,s){return e.call(t,i,s)};case 3:return function(i,s,n){return e.call(t,i,s,n)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,i){var s=i("2b4c")("unscopables"),n=Array.prototype;void 0==n[s]&&i("32e9")(n,s,{}),e.exports=function(e){n[s][e]=!0}},"9def":function(e,t,i){var s=i("4588"),n=Math.min;e.exports=function(e){return e>0?n(s(e),9007199254740991):0}},"9e1e":function(e,t,i){e.exports=!i("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a481:function(e,t,i){"use strict";var s=i("cb7c"),n=i("4bf8"),a=i("9def"),o=i("4588"),r=i("0390"),c=i("5f1b"),l=Math.max,d=Math.min,u=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g,m=function(e){return void 0===e?e:String(e)};i("214f")("replace",2,function(e,t,i,g){return[function(s,n){var a=e(this),o=void 0==s?void 0:s[t];return void 0!==o?o.call(s,a,n):i.call(String(a),s,n)},function(e,t){var n=g(i,e,this,t);if(n.done)return n.value;var u=s(e),h=String(this),p="function"===typeof t;p||(t=String(t));var v=u.global;if(v){var y=u.unicode;u.lastIndex=0}var b=[];while(1){var C=c(u,h);if(null===C)break;if(b.push(C),!v)break;var x=String(C[0]);""===x&&(u.lastIndex=r(h,a(u.lastIndex),y))}for(var w="",k=0,E=0;E<b.length;E++){C=b[E];for(var _=String(C[0]),I=l(d(o(C.index),h.length),0),A=[],S=1;S<C.length;S++)A.push(m(C[S]));var T=C.groups;if(p){var M=[_].concat(A,I,h);void 0!==T&&M.push(T);var D=String(t.apply(void 0,M))}else D=f(_,h,I,A,T,t);I>=k&&(w+=h.slice(k,I)+D,k=I+_.length)}return w+h.slice(k)}];function f(e,t,s,a,o,r){var c=s+e.length,l=a.length,d=p;return void 0!==o&&(o=n(o),d=h),i.call(r,d,function(i,n){var r;switch(n.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,s);case"'":return t.slice(c);case"<":r=o[n.slice(1,-1)];break;default:var d=+n;if(0===d)return i;if(d>l){var h=u(d/10);return 0===h?i:h<=l?void 0===a[h-1]?n.charAt(1):a[h-1]+n.charAt(1):i}r=a[d-1]}return void 0===r?"":r})}})},aa77:function(e,t,i){var s=i("5ca1"),n=i("be13"),a=i("79e5"),o=i("fdef"),r="["+o+"]",c="
",l=RegExp("^"+r+r+"*"),d=RegExp(r+r+"*$"),u=function(e,t,i){var n={},r=a(function(){return!!o[e]()||c[e]()!=c}),l=n[e]=r?t(h):o[e];i&&(n[i]=l),s(s.P+s.F*r,"String",n)},h=u.trim=function(e,t){return e=String(n(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(d,"")),e};e.exports=u},aae3:function(e,t,i){var s=i("d3f4"),n=i("2d95"),a=i("2b4c")("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==n(e))}},ac6a:function(e,t,i){for(var s=i("cadf"),n=i("0d58"),a=i("2aba"),o=i("7726"),r=i("32e9"),c=i("84f2"),l=i("2b4c"),d=l("iterator"),u=l("toStringTag"),h=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=n(p),g=0;g<m.length;g++){var f,v=m[g],y=p[v],b=o[v],C=b&&b.prototype;if(C&&(C[d]||r(C,d,h),C[u]||r(C,u,v),c[v]=h,y))for(f in s)C[f]||a(C,f,s[f],!0)}},b0c5:function(e,t,i){"use strict";var s=i("520a");i("5ca1")({target:"RegExp",proto:!0,forced:s!==/./.exec},{exec:s})},ba05:function(e,t,i){},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,i){var s=i("6821"),n=i("9def"),a=i("77f1");e.exports=function(e){return function(t,i,o){var r,c=s(t),l=n(c.length),d=a(o,l);if(e&&i!=i){while(l>d)if(r=c[d++],r!=r)return!0}else for(;l>d;d++)if((e||d in c)&&c[d]===i)return e||d||0;return!e&&-1}}},c4d7:function(e,t,i){"use strict";i("d519")},c5f6:function(e,t,i){"use strict";var s=i("7726"),n=i("69a8"),a=i("2d95"),o=i("5dbc"),r=i("6a99"),c=i("79e5"),l=i("9093").f,d=i("11e9").f,u=i("86cc").f,h=i("aa77").trim,p="Number",m=s[p],g=m,f=m.prototype,v=a(i("2aeb")(f))==p,y="trim"in String.prototype,b=function(e){var t=r(e,!1);if("string"==typeof t&&t.length>2){t=y?t.trim():h(t,3);var i,s,n,a=t.charCodeAt(0);if(43===a||45===a){if(i=t.charCodeAt(2),88===i||120===i)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:s=2,n=49;break;case 79:case 111:s=8,n=55;break;default:return+t}for(var o,c=t.slice(2),l=0,d=c.length;l<d;l++)if(o=c.charCodeAt(l),o<48||o>n)return NaN;return parseInt(c,s)}}return+t};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(e){var t=arguments.length<1?0:e,i=this;return i instanceof m&&(v?c(function(){f.valueOf.call(i)}):a(i)!=p)?o(new g(b(t)),i,m):b(t)};for(var C,x=i("9e1e")?l(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)n(g,C=x[w])&&!n(m,C)&&u(m,C,d(g,C));m.prototype=f,f.constructor=m,i("2aba")(s,p,m)}},c69a:function(e,t,i){e.exports=!i("9e1e")&&!i("79e5")(function(){return 7!=Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a})},ca5a:function(e,t){var i=0,s=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+s).toString(36))}},cadf:function(e,t,i){"use strict";var s=i("9c6c"),n=i("d53b"),a=i("84f2"),o=i("6821");e.exports=i("01f9")(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,n(1)):n(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),a.Arguments=a.Array,s("keys"),s("values"),s("entries")},cb50:function(e,t,i){},cb7c:function(e,t,i){var s=i("d3f4");e.exports=function(e){if(!s(e))throw TypeError(e+" is not an object!");return e}},cc9a:function(e,t,i){"use strict";i("8bcf")},cd1c:function(e,t,i){var s=i("e853");e.exports=function(e,t){return new(s(e))(t)}},ce10:function(e,t,i){var s=i("69a8"),n=i("6821"),a=i("c366")(!1),o=i("613b")("IE_PROTO");e.exports=function(e,t){var i,r=n(e),c=0,l=[];for(i in r)i!=o&&s(r,i)&&l.push(i);while(t.length>c)s(r,i=t[c++])&&(~a(l,i)||l.push(i));return l}},d2c8:function(e,t,i){var s=i("aae3"),n=i("be13");e.exports=function(e,t,i){if(s(t))throw TypeError("String#"+i+" doesn't accept regex!");return String(n(e))}},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},d519:function(e,t,i){},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d6dd:function(e,t,i){},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},dc6d:function(e,t,i){},dcc3:function(e,t,i){"use strict";i("117e")},e003:function(e,t,i){"use strict";i("61c8")},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e61c:function(e,t,i){"use strict";i("d6dd")},e853:function(e,t,i){var s=i("d3f4"),n=i("1169"),a=i("2b4c")("species");e.exports=function(e){var t;return n(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!n(t.prototype)||(t=void 0),s(t)&&(t=t[a],null===t&&(t=void 0))),void 0===t?Array:t}},e95c:function(e,t,i){},ef69:function(e,t,i){},f1ae:function(e,t,i){"use strict";var s=i("86cc"),n=i("4630");e.exports=function(e,t,i){t in e?s.f(e,t,n(0,i)):e[t]=i}},f559:function(e,t,i){"use strict";var s=i("5ca1"),n=i("9def"),a=i("d2c8"),o="startsWith",r=""[o];s(s.P+s.F*i("5147")(o),"String",{startsWith:function(e){var t=a(this,e,o),i=n(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),s=String(e);return r?r.call(t,s,i):t.slice(i,i+s.length)===s}})},f6fd:function(e,t){(function(e){var t="currentScript",i=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(s){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(s.stack)||[!1])[1];for(e in i)if(i[e].src==t||"interactive"==i[e].readyState)return i[e];return null}}})})(document)},f751:function(e,t,i){var s=i("5ca1");s(s.S+s.F,"Object",{assign:i("7333")})},fa5b:function(e,t,i){e.exports=i("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,i){var s=i("7726").document;e.exports=s&&s.documentElement},fb15:function(e,t,i){"use strict";var s;(i.r(t),"undefined"!==typeof window)&&(i("f6fd"),(s=window.document.currentScript)&&(s=s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(i.p=s[1]));i("7f7f"),i("ac6a"),i("3b2b"),i("cadf"),i("8615"),i("6b54");function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function a(e){return"string"==typeof e}function o(e){return(new Date).getTime()-e<864e5}function r(e){return!e||(!(!Array.isArray(e)||0!=e.length)||!(!n(e)||0!=Object.values(e).length))}function c(e){return e&&"function"===typeof e}i("96cf");function l(e,t,i,s,n,a,o){try{var r=e[a](o),c=r.value}catch(e){return void i(e)}r.done?t(c):Promise.resolve(c).then(s,n)}function d(e){return function(){var t=this,i=arguments;return new Promise(function(s,n){var a=e.apply(t,i);function o(e){l(a,s,n,o,r,"next",e)}function r(e){l(a,s,n,o,r,"throw",e)}o(void 0)})}}i("456d"),i("6762"),i("2fdb");var u,h,p=[],m={hover:function(e){},focus:function(e){var t=this;e.addEventListener("focus",function(e){t.changeVisible()}),e.addEventListener("blur",function(e){t.changeVisible()})},click:function(e){var t=this;e.addEventListener("click",function(e){t.$emit("popoverClick"),e.stopPropagation(),D.hide(),t.changeVisible()})},contextmenu:function(e){var t=this;e.addEventListener("contextmenu",function(e){e.preventDefault(),t.changeVisible()})}},g={name:"LemonPopover",props:{trigger:{type:String,default:"click",validator:function(e){return Object.keys(m).includes(e)}}},data:function(){return{popoverStyle:{},visible:!1}},created:function(){document.addEventListener("click",this._documentClickEvent),p.push(this.close)},mounted:function(){m[this.trigger].call(this,this.$slots.default[0].elm)},render:function(){var e=arguments[0];return e("span",{style:"position:relative"},[e("transition",{attrs:{name:"lemon-slide-top"}},[this.visible&&e("div",{class:"lemon-popover",ref:"popover",style:this.popoverStyle,on:{click:function(e){return e.stopPropagation()}}},[e("div",{class:"lemon-popover__content"},[this.$slots.content]),e("div",{class:"lemon-popover__arrow"})])]),this.$slots.default])},destroyed:function(){document.removeEventListener("click",this._documentClickEvent)},computed:{},watch:{visible:function(){var e=d(regeneratorRuntime.mark(function e(t){var i,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=6;break}return e.next=3,this.$nextTick();case 3:i=this.$slots.default[0].elm,s=this.$refs.popover,this.popoverStyle={top:"-".concat(s.offsetHeight+10,"px"),left:"".concat(i.offsetWidth/2-s.offsetWidth/2,"px")};case 6:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},methods:{_documentClickEvent:function(e){this.$emit("popoverClick"),e.stopPropagation(),this.visible&&this.close()},changeVisible:function(){this.visible?this.close():this.open()},open:function(){this.closeAll(),this.visible=!0},closeAll:function(){p.forEach(function(e){return e()})},close:function(){this.visible=!1}}},f=g;i("35f3");function v(e,t,i,s,n,a,o,r){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),s&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=c):n&&(c=r?function(){n.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:n),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}var y,b=v(f,u,h,!1,null,null,null),C=b.exports,x=function(){y&&(y.style.display="none")},w=function(){y&&(y.style.display="block")};document.addEventListener("click",function(e){x()});var k,E,_,I,A,S,T,M,D={hide:x,bind:function(e,t,i){e.addEventListener(t.modifiers.click?"click":"contextmenu",function(e){if(!r(t.value)&&Array.isArray(t.value)){var s;t.modifiers.click&&e.stopPropagation(),e.preventDefault(),C.methods.closeAll();var n=[];t.modifiers.message?s=i.context:t.modifiers.contact&&(s=i.child),y||(y=document.createElement("div"),y.className="lemon-contextmenu",document.body.appendChild(y)),y.innerHTML=t.value.map(function(e){var t;if(t=c(e.visible)?e.visible(s):void 0===e.visible||e.visible,t){n.push(e);var i=e.icon?'<i class="lemon-contextmenu__icon '.concat(e.icon,'"></i>'):"";return'<div style="color:'.concat(e.color,'" title="').concat(e.text,'" class="lemon-contextmenu__item">').concat(i,"<span>").concat(e.text,"</span></div>")}return""}).join("");var a=y.offsetHeight,o=y.offsetWidth,l=window.innerHeight,d=window.innerWidth,u=e.clientY+a>l?e.pageY-a-5:e.pageY,h=e.clientX+o>d?e.pageX-o-5:e.pageX;y.style.top="".concat(u,"px"),y.style.left="".concat(h,"px"),y.childNodes.forEach(function(e,t){var i=n[t],a=i.click;i.render;e.addEventListener("click",function(e){e.stopPropagation(),c(a)&&a(e,s,x)})}),w()}})}},L={name:"LemonTabs",props:{activeIndex:String},data:function(){return{active:this.activeIndex}},mounted:function(){this.active||(this.active=this.$slots["tab-pane"][0].data.attrs.index)},render:function(){var e=this,t=arguments[0],i=[],s=[];return this.$slots["tab-pane"].map(function(n){var a=n.data.attrs,o=a.tab,r=a.index;i.push(t("div",{class:"lemon-tabs-content__pane",directives:[{name:"show",value:e.active==r}]},[n])),s.push(t("div",{class:["lemon-tabs-nav__item",e.active==r&&"lemon-tabs-nav__item--active"],on:{click:function(){return e._handleNavClick(r)}}},[o]))}),t("div",{class:"lemon-tabs"},[t("div",{class:"lemon-tabs-content"},[i]),t("div",{class:"lemon-tabs-nav"},[s])])},methods:{_handleNavClick:function(e){this.active=e}}},N=L,U=(i("69bb"),v(N,k,E,!1,null,null,null)),P=U.exports,O={name:"LemonButton",props:{color:{type:String,default:"default"},disabled:Boolean},render:function(){var e=arguments[0];return e("button",{class:["lemon-button","lemon-button--color-".concat(this.color)],attrs:{disabled:this.disabled,type:"button"},on:{click:this._handleClick}},[this.$slots.default])},methods:{_handleClick:function(e){this.$emit("click",e)}}},$=O,R=(i("cc9a"),v($,_,I,!1,null,null,null)),j=R.exports,B=(i("c5f6"),{name:"LemonBadge",props:{count:[Number,Boolean],overflowCount:{type:Number,default:99}},render:function(){var e=arguments[0];return e("span",{class:"lemon-badge"},[this.$slots.default,0!==this.count&&void 0!==this.count&&e("span",{class:["lemon-badge__label",this.isDot&&"lemon-badge__label--dot"]},[this.label])])},computed:{isDot:function(){return!0===this.count},label:function(){return this.isDot?"":this.count>this.overflowCount?"".concat(this.overflowCount,"+"):this.count}},methods:{}}),F=B,V=(i("93f9"),v(F,A,S,!1,null,null,null)),z=V.exports,H={name:"LemonAvatar",inject:["IMUI"],props:{src:String,icon:{type:String,default:"lemon-icon-people"},circle:{type:Boolean,default:function(){return!!this.IMUI&&this.IMUI.avatarCricle}},size:{type:Number,default:32}},data:function(){return{imageFinishLoad:!0}},render:function(){var e=this,t=arguments[0];return t("span",{style:this.style,class:["lemon-avatar",{"lemon-avatar--circle":this.circle}],on:{click:function(t){return e.$emit("click",t)}}},[(this.imageFinishLoad||!this.src)&&t("i",{class:this.icon}),t("img",{attrs:{src:this.src},on:{load:this._handleLoad}})])},computed:{style:function(){var e="".concat(this.size,"px");return{width:e,height:e,lineHeight:e,fontSize:"".concat(this.size/2,"px")}}},methods:{_handleLoad:function(){this.imageFinishLoad=!1}}},G=H,K=(i("e003"),v(G,T,M,!1,null,null,null)),q=K.exports,Q=i("2638"),Y=i.n(Q);i("8e6e");function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function W(e,t){if("object"!=J(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=J(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Z(e){var t=W(e,"string");return"symbol"==J(t)?t:t+""}function X(e,t,i){return(t=Z(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i("a481");function ee(e,t,i){return e?e(i):t}function te(e){return e<10?"0".concat(e):e}function ie(e){var t,i=new Date(e),s=new Date,n=function(e){return e.getFullYear()},a=function(e){return"".concat(e.getMonth()+1,"-").concat(e.getDate())},o=n(i),r=n(s);return t=o!==r?"y-m-d h:i":"".concat(o,"-").concat(a(i))==="".concat(r,"-").concat(a(s))?"h:i":"m-d h:i",se(e,t)}function se(e,t){t||(t="y-m-d h:i:s"),e=e?new Date(e):new Date;for(var i=[e.getFullYear().toString(),te((e.getMonth()+1).toString()),te(e.getDate().toString()),te(e.getHours().toString()),te(e.getMinutes().toString()),te(e.getSeconds().toString())],s="ymdhis",n=0;n<i.length;n++)t=t.replace(s.charAt(n),i[n]);return t}function ne(e,t){c(e)?e(function(){t()}):t()}function ae(e){return e.replace(/<(?!img).*?>/gi,"")}function oe(e){if(null==e||""==e)return"0 Bytes";var t=["B","K","M","G","T","P","E","Z","Y"],i=0,s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));var n=s/Math.pow(1024,i);return n=parseFloat(n.toFixed(2)),n+t[i]}function re(){var e=(new Date).getTime();window.performance&&"function"===typeof window.performance.now&&(e+=performance.now());var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)});return t}var ce,le,de={name:"LemonContact",components:{},inject:{IMUI:{from:"IMUI",default:function(){return this}}},data:function(){return{}},props:{contact:Object,simple:Boolean,timeFormat:{type:Function,default:function(e){return se(e,o(e)?"h:i":"y/m/d")}}},render:function(){var e=this,t=arguments[0];return t("div",{class:["lemon-contact",{"lemon-contact--name-center":this.simple}],attrs:{title:this.contact.displayName},on:{click:function(t){return e._handleClick(t,e.contact)}}},[ee(this.$scopedSlots.default,this._renderInner(),this.contact)])},created:function(){},mounted:function(){},computed:{},watch:{},methods:{_renderInner:function(){var e=this.$createElement,t=this.contact;return[e("lemon-badge",{attrs:{count:this.simple?0:t.unread},class:"lemon-contact__avatar"},[e("lemon-avatar",{attrs:{size:40,src:t.avatar}})]),e("div",{class:"lemon-contact__inner"},[e("p",{class:"lemon-contact__label"},[e("span",{class:"lemon-contact__name"},[t.displayName]),!this.simple&&e("span",{class:"lemon-contact__time"},[this.timeFormat(t.lastSendTime)])]),!this.simple&&e("p",{class:"lemon-contact__content"},[a(t.lastContent)?e("span",Y()([{},{domProps:{innerHTML:t.lastContent}}])):t.lastContent])])]},_handleClick:function(e,t){this.$emit("click",t)}}},ue=de,he=(i("8fb6"),v(ue,ce,le,!1,null,null,null)),pe=he.exports;i("5df3"),i("1c4c"),i("9204");const me=window.ChatArea;var ge=me;i("6fb5");function fe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function ve(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(i),!0).forEach(function(t){X(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var ye,be,Ce,xe,we,ke,Ee,_e=JSON.parse(localStorage.getItem("i18n")),Ie=function(e,t){document.execCommand(e,!1,t)},Ae=window.getSelection(),Se=[],Te={name:"LemonEditor",inject:{IMUI:{from:"IMUI",default:function(){return this}}},components:{},props:{tools:{type:Array,default:function(){return[]}},sendText:{type:String,default:_e?_e.sendText:"发 送"},wrapKey:{type:Function,default:function(e){return 13==e.keyCode&&!0===e.ctrlKey}},sendKey:{type:Function,default:function(e){return 13==e.keyCode&&0==e.ctrlKey&&0==e.shiftKey}}},data:function(){return this.clipboardBlob=null,{clipboardUrl:"",submitDisabled:!0,accept:"",chatArea:null,curEmoji:"",i18n:this.IMUI.i18n}},created:function(){var e=this;this.IMUI.$on("change-contact",function(){e.closeClipboardImage()}),this.$nextTick(function(){e.chatArea=new ge({elm:e.$refs.textarea,userList:[],userProps:{id:"id",name:"displayName",avatar:"avatar",pinyin:"name_py"},placeholder:"",needCallSpace:!0,wrapKeyFun:function(t){return e.wrapKey(t)},sendKeyFun:function(t){return e.sendKey(t)}}),e.chatArea.revisePCCheckDialogLabel({title:e.i18n.atTitle,searchPlaceholder:e.i18n.searchPlaceholder,searchEmptyLabel:e.i18n.searchEmptyLabel,userTagTitle:e.i18n.userTagTitle,checkAllLabel:e.i18n.checkAllLabel,confirmLabel:e.i18n.confirmLabel,cancelLabel:e.i18n.cancelLabel}),e.chatArea.revisePCPointDialogLabel({title:e.i18n.groupUserTitle,callEveryLabel:e.i18n.callEveryLabel,checkLabel:e.i18n.checkLabel,emptyLabel:e.i18n.emptyLabel}),e.chatArea.richText.addEventListener("drop",function(t){var i=t.dataTransfer,s=i.files;Array.from(s).forEach(function(t){e.$emit("upload",t)})}),e.chatArea.addEventListener("defaultAction",function(e){switch(e){case"PASTE":return"PREVENT"}}),e.chatArea.richText.addEventListener("paste",function(t){t.preventDefault();var i=t.clipboardData||window.clipboardData,s=i.getData("Text");if(s)/<[^>]*>/g.test(s)?e.chatArea.reverseAnalysis(s,!0):e.chatArea.insertText(s),e.submitDisabled=!1;else{var n=e._getClipboardBlob(i),a=n.blob,o=n.blobUrl;e.clipboardBlob=a,e.clipboardUrl=o}}),e.chatArea.addEventListener("enterSend",function(){0==e.submitDisabled&&e._handleSend()})})},render:function(){var e=this,t=arguments[0],i=[],s=[];return this.proxyTools.forEach(function(n){var a=n.name,o=n.title,r=n.render,c=n.click,l=n.isRight;c=c||new Function;var d,u=["lemon-editor__tool-item",{"lemon-editor__tool-item--right":l}];d="emoji"==a?0==Se.length?"":t("lemon-popover",{class:"lemon-editor__emoji",on:{popoverClick:e.closePointPopup}},[t("template",{slot:"content"},[e._renderEmojiTabs()]),t("div",{class:u,attrs:{title:o}},[r()])]):t("div",{class:u,on:{click:c},attrs:{title:o}},[r()]),l?s.push(d):i.push(d)}),t("lemon-resize",{class:"lemon-editor",attrs:{size:200}},[this.clipboardUrl&&t("div",{class:"lemon-editor__clipboard-image"},[t("img",{attrs:{src:this.clipboardUrl}}),t("div",[t("lemon-button",{style:{marginRight:"10px"},on:{click:this.closeClipboardImage},attrs:{color:"grey"}},[this.i18n.cancelLabel]),t("lemon-button",{on:{click:this.sendClipboardImage}},[this.i18n.sendImage])])]),t("input",{style:"display:none",attrs:{type:"file",multiple:"multiple",accept:this.accept},ref:"fileInput",on:{change:this._handleChangeFile}}),t("div",{class:"lemon-editor__tool"},[t("div",{class:"lemon-editor__tool-left"},[i]),t("div",{class:"lemon-editor__tool-right"},[s])]),t("div",{class:"lemon-editor__inner"},[t("div",{class:"lemon-editor__input",ref:"textarea",on:{click:this._handleClick,input:this._handleInput},attrs:{spellcheck:"false"}})]),t("div",{class:"lemon-editor__footer"},[t("div",{class:"lemon-editor__tip"},[ee(this.IMUI.$scopedSlots["editor-footer"],this.i18n.wrapKey)]),t("div",{class:"lemon-editor__submit"},[t("lemon-button",{attrs:{disabled:!1},on:{click:this._handleSend}},[this.sendText])])])])},computed:{proxyTools:function(){var e=this,t=this.$createElement;if(!this.tools)return[];var i=[{name:"emoji",title:this.i18n.emoji,click:null,render:function(e){return t("i",{class:"lemon-icon-emoji"})}},{name:"uploadFile",title:this.i18n.fileUpload,click:function(){return e.selectFile("*")},render:function(e){return t("i",{class:"lemon-icon-folder"})}},{name:"uploadImage",title:this.i18n.imageUpload,click:function(){return e.selectFile("image/*")},render:function(e){return t("i",{class:"lemon-icon-image"})}}],s=[];if(Array.isArray(this.tools)){var n={emoji:0,uploadFile:1,uploadImage:2},a=Object.keys(n);s=this.tools.map(function(e){return a.includes(e.name)?ve(ve({},i[n[e.name]]),e):e})}else s=i;return s}},methods:{closePointPopup:function(){this.chatArea&&this.chatArea.chatEvent.winClick()},_sendEmoji:function(e){this.curEmoji=e,this.$emit("send",e.src)},closeClipboardImage:function(){this.clipboardUrl="",this.clipboardBlob=null},sendClipboardImage:function(){this.clipboardBlob&&(this.$emit("upload",this.clipboardBlob),this.closeClipboardImage())},saveRangeToLast:function(){ye||(ye=document.createRange()),ye.selectNodeContents(textarea.value),ye.collapse(!1),Ae.removeAllRanges(),Ae.addRange(ye)},inertContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&saveRangeToLast(),this.focusRange(),Ie("insertHTML",e),this.saveRange()},saveRange:function(){ye=Ae.getRangeAt(0)},focusRange:function(){this.$refs.textarea.focus(),ye&&(Ae.removeAllRanges(),Ae.addRange(ye))},_handleClick:function(){this.saveRange()},_handleInput:function(){this._checkSubmitDisabled()},_renderEmojiTabs:function(){var e=this,t=this.$createElement,i=function(i,s){return 1==s?i.map(function(i){return t("img",{attrs:{src:i.src,title:i.title,loading:"lazy"},class:"lemon-editor__emoji-item diy-emoji",on:{click:function(){return e._sendEmoji(i)}}})}):i.map(function(i){return t("img",{attrs:{src:i.src,title:i.title},class:"lemon-editor__emoji-item",on:{click:function(){return e._handleSelectEmoji(i)}}})})};if(Se[0].label){var s=Se.map(function(e,s){return t("div",{slot:"tab-pane",attrs:{index:s,tab:e.label}},[i(e.children,s)])});return t("lemon-tabs",{style:"width: 412px"},[s])}return t("div",{class:"lemon-tabs-content",style:"width:406px"},[i(Se)])},_handleSelectEmoji:function(e){this.chatArea.insertHtml('<img emoji-name="'.concat(e.name,'" src="').concat(e.src,'"></img>')),this._checkSubmitDisabled()},selectFile:function(){var e=d(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.accept=t,e.next=3,this.$nextTick();case 3:this.$refs.fileInput.click();case 4:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),_getClipboardBlob:function(e){for(var t,i,s=0;s<e.items.length;++s)"file"==e.items[s].kind&&-1!==e.items[s].type.indexOf("image/")&&(t=e.items[s].getAsFile(),i=(window.URL||window.webkitURL).createObjectURL(t));return{blob:t,blobUrl:i}},getFormatValue:function(){return this.IMUI.emojiImageToName(this.chatArea.getHtml({needUserId:!0}))},_checkSubmitDisabled:function(){this.submitDisabled=!ae(this.chatArea.getHtml().trim())},_handleSend:function(e){var t=this.getFormatValue();this.$emit("send",t),this.clear(),this._checkSubmitDisabled()},_handleChangeFile:function(e){var t=this,i=this.$refs.fileInput;Array.from(i.files).forEach(function(e){t.$emit("upload",e)}),i.value=""},clear:function(){this.chatArea.clear()},initEmoji:function(e){Se=e,this.$forceUpdate()},setValue:function(e){""==e?this.clear():this.chatArea.reverseAnalysis(this.IMUI.emojiNameToImage(e)),this._checkSubmitDisabled()}}},Me=Te,De=(i("3dfc"),i("26fe"),v(Me,be,Ce,!1,null,null,null)),Le=De.exports,Ne=JSON.parse(localStorage.getItem("i18n")),Ue={name:"LemonMessages",inject:{IMUI:{from:"IMUI",default:function(){return this}}},components:{},props:{hideName:Boolean,hideTime:Boolean,reverseUserId:[String,Number],timeRange:{type:Number,default:1},timeFormat:{type:Function,default:function(e){return ie(e)}},loadingText:{type:[String,Function]},loadendText:{type:[String,Function],default:Ne?Ne.noneMsg:"暂无更多消息"},messages:{type:Array,default:function(){return[]}}},data:function(){return this._lockScroll=!1,{_loading:!1,_loadend:!1,isBottom:!0}},render:function(){var e=this,t=arguments[0];return t("div",{class:"lemon-messages",ref:"wrap",on:{scroll:this._handleScroll}},[t("div",{class:["lemon-messages__load","lemon-messages__load--".concat(this._loadend?"end":"ing")]},[t("span",{class:"lemon-messages__loadend"},[a(this.loadendText)?this.loadendText:this.loadendText()]),t("span",{class:"lemon-messages__loading"},[this.loadingText?a(this.loadingText)?this.loadingText:this.loadingText():t("i",{class:"lemon-icon-loading lemonani-spin"})])]),this.messages.map(function(i,s){var n=[],a="["+e.IMUI.i18n.noMsgType+"]",o="lemon-message-".concat(i.type),r=e.toCamelCase(o);e.$options.components[r]||(i.type="text",i.content=a,o="lemon-message-text");var c,l=e.messages[s-1];return l&&e.msecRange&&i.sendTime-l.sendTime>e.msecRange&&n.push(t("lemon-message-event",Y()([{},{attrs:{message:{id:"__time__",type:"event",content:ie(i.sendTime)}}}]))),c="event"==i.type?{message:i}:{timeFormat:e.timeFormat,message:i,reverse:e.reverseUserId==i.fromUser.id,hideTime:e.hideTime,hideName:e.hideName},n.push(t(o,Y()([{ref:"message",refInFor:!0},{attrs:c}]))),n})])},computed:{msecRange:function(){return 1e3*this.timeRange*60}},watch:{},methods:{loaded:function(){this._loadend=!0,this.$forceUpdate()},toCamelCase:function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})},resetLoadState:function(){var e=this;this._lockScroll=!0,this._loading=!1,this._loadend=!1,setTimeout(function(){e._lockScroll=!1},200)},_handleScroll:function(){var e=d(regeneratorRuntime.mark(function e(t){var i,s,n,a,o,r=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!this._lockScroll){e.next=2;break}return e.abrupt("return");case 2:if(i=t.target,D.hide(),0!=i.scrollTop||0!=this._loading||0!=this._loadend){e.next=10;break}return this._loading=!0,e.next=8,this.$nextTick();case 8:s=i.scrollHeight,this.$emit("reach-top",function(){var e=d(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r.$nextTick();case 2:i.scrollTop=i.scrollHeight-s,r._loading=!1,r._loadend=!!t;case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 10:n=i.scrollTop,a=i.scrollHeight,o=this.$refs.wrap,this.isBottom=n+o.offsetHeight>=a-20,this.$emit("is-bottom",this.isBottom);case 15:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),scrollToBottom:function(){var e=d(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$nextTick();case 2:t=this.$refs.wrap,t&&(t.scrollTop=t.scrollHeight);case 4:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},created:function(){},mounted:function(){}},Pe=Ue,Oe=(i("20e3"),v(Pe,xe,we,!1,null,null,null)),$e=Oe.exports,Re=function(){var e=this,t=e._self._c;return t("div",{ref:"resize",staticClass:"resize"},[t("div",{ref:"resizeHandle",class:"vertical"==e.direction?"resize-v":"resize-h"}),e._t("default")],2)},je=[],Be={name:"LemonResize",props:{direction:{type:String,default:"vertical"},size:{type:Number,default:250},sizeRange:{type:Array,default:function(){return[200,360]}}},data:function(){return{height:200,width:250}},mounted:function(){this.dragControllerDiv(this.$refs.resize,this.$refs.resizeHandle)},methods:{dragControllerDiv:function(e,t){var i=this;"horizontal"===this.direction?(e.style.width=(localStorage.getItem("horizontalSize")||this.size)+"px",t.onmousedown=function(t){var s=e.offsetWidth,n=t.clientX;document.onmousemove=function(a){var o=a.clientX,r=s+(o-n);i.sizeRange[0]<=r&&i.sizeRange[1]>=r&&(e.style.width=r+"px",i.width=r,i.$emit("box-resize",r,t))},document.onmouseup=function(){localStorage.setItem("horizontalSize",i.width),document.onmousemove=null,document.onmouseup=null}}):(e.style.height=(localStorage.getItem("verticalSize")||this.size)+"px",t.onmousedown=function(t){var s=e.offsetHeight,n=t.clientY;document.onmousemove=function(a){var o=a.clientY,r=s-(o-n);i.sizeRange[0]<=r&&i.sizeRange[1]>=r&&(e.style.height=r+"px",i.height=r,i.$emit("box-resize",r,t))},document.onmouseup=function(){localStorage.setItem("verticalSize",i.height),document.onmousemove=null,document.onmouseup=null}})}}},Fe=Be,Ve=(i("c4d7"),v(Fe,Re,je,!1,null,"3dd7fdc8",null)),ze=Ve.exports,He={name:"lemonMessageBasic",inject:{IMUI:{from:"IMUI",default:function(){return this}}},props:{contextmenu:Array,message:{type:Object,default:function(){return{}}},timeFormat:{type:Function,default:function(){return""}},reverse:Boolean,hideName:Boolean,hideTime:Boolean},data:function(){return{}},render:function(){var e=this,t=arguments[0],i=this.message,s=i.fromUser,n=i.status,a=i.sendTime,o=1==this.hideName&&1==this.hideTime;return t("div",{class:["lemon-message","lemon-message--status-".concat(n),{"lemon-message--reverse":this.reverse,"lemon-message--hide-title":o}]},[t("div",{class:"lemon-message__avatar"},[t("lemon-avatar",{attrs:{size:36,shape:"square",src:s.avatar},on:{click:function(t){e._emitClick(t,"avatar")}}})]),t("div",{class:"lemon-message__inner"},[t("div",{class:"lemon-message__title"},[0==this.hideName&&t("span",{on:{click:function(t){e._emitClick(t,"displayName")}}},[s.displayName]),t("span",{class:"lemon-message__tag"},[ee(this.IMUI.$scopedSlots["message-tag"],null,this.message)]),0==this.hideTime&&t("span",{class:"lemon-message__time",on:{click:function(t){e._emitClick(t,"sendTime")}}},[this.timeFormat(a)])]),t("div",{class:"lemon-message__content-flex"},[t("div",{directives:[{name:"lemon-contextmenu",value:this.IMUI.contextmenu,modifiers:{message:!0}}],class:"lemon-message__content",on:{click:function(t){e._emitClick(t,"content")}}},[ee(this.$scopedSlots["content"],null,this.message)]),t("div",{class:"lemon-message__content-after"},[ee(this.IMUI.$scopedSlots["message-after"],null,this.message)]),t("div",{class:"lemon-message__status",on:{click:function(t){e._emitClick(t,"status")}}},[t("i",{class:"lemon-icon-loading lemonani-spin"}),t("i",{class:"lemon-icon-prompt",attrs:{title:"重发消息"},style:{color:"#ff2525",cursor:"pointer"}})])])])])},created:function(){},mounted:function(){},computed:{},watch:{},methods:{_emitClick:function(e,t){this.IMUI.$emit("message-click",e,t,this.message,this.IMUI)}}},Ge=He,Ke=(i("628d"),v(Ge,ke,Ee,!1,null,null,null)),qe=Ke.exports;function Qe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function Ye(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(i),!0).forEach(function(t){X(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Qe(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var Je,We,Ze={name:"lemonMessageText",inheritAttrs:!1,inject:["IMUI"],render:function(){var e=this,t=arguments[0];return t("lemon-message-basic",Y()([{class:"lemon-message-text"},{props:Ye({},this.$attrs)},{scopedSlots:{content:function(i){var s=e.IMUI.emojiNameToImage(i.content);return t("span",Y()([{},{domProps:{innerHTML:s}}]))}}}]))}},Xe=Ze,et=(i("260f"),v(Xe,Je,We,!1,null,null,null)),tt=et.exports;function it(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function st(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?it(Object(i),!0).forEach(function(t){X(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):it(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var nt,at,ot={name:"lemonMessageImage",inheritAttrs:!1,render:function(){var e=arguments[0];return e("lemon-message-basic",Y()([{class:"lemon-message-image"},{props:st({},this.$attrs)},{scopedSlots:{content:function(t){return e("img",{attrs:{src:t.content}})}}}]))}},rt=ot,ct=(i("e61c"),v(rt,nt,at,!1,null,null,null)),lt=ct.exports;function dt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function ut(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(i),!0).forEach(function(t){X(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):dt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var ht,pt,mt,gt,ft={name:"lemonMessageFile",inheritAttrs:!1,render:function(){var e=arguments[0];return e("lemon-message-basic",Y()([{class:"lemon-message-file"},{props:ut({},this.$attrs)},{scopedSlots:{content:function(t){return[e("div",{class:"lemon-message-file__inner"},[e("p",{class:"lemon-message-file__name"},[t.fileName]),e("p",{class:"lemon-message-file__byte"},[oe(t.fileSize)])]),e("div",{class:"lemon-message-file__sfx"},[e("i",{class:"lemon-icon-attah"})])]}}}]))}},vt=ft,yt=(i("85ff"),v(vt,ht,pt,!1,null,null,null)),bt=yt.exports,Ct={name:"lemonMessageEvent",inheritAttrs:!1,inject:["IMUI"],render:function(){var e=this,t=arguments[0],i=this.$attrs.message.content;return t("div",{class:"lemon-message lemon-message-event"},[t("span",{class:"lemon-message-event__content",on:{click:function(t){return e._emitClick(t,"content")}}},[i])])},methods:{_emitClick:function(e,t){this.IMUI.$emit("message-click",e,t,this.$attrs.message,this.IMUI)}}},xt=Ct,wt=(i("dcc3"),v(xt,mt,gt,!1,null,null,null)),kt=wt.exports;function Et(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function _t(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(i),!0).forEach(function(t){X(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Et(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var It,At,St={name:"lemonMessageEmoji",inheritAttrs:!1,render:function(){var e=arguments[0];return e("lemon-message-basic",Y()([{class:"lemon-message-emoji"},{props:_t({},this.$attrs)},{scopedSlots:{content:function(t){return e("img",{attrs:{src:t.content}})}}}]))}},Tt=St,Mt=(i("718e"),v(Tt,It,At,!1,null,null,null)),Dt=Mt.exports;i("20d6");function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}function Nt(e){if(Array.isArray(e))return Lt(e)}function Ut(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pt(e,t){if(e){if("string"==typeof e)return Lt(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Lt(e,t):void 0}}function Ot(){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 $t(e){return Nt(e)||Ut(e)||Pt(e)||Ot()}i("f559"),i("f751"),i("7514"),i("55dd");var Rt="messages",jt="contacts",Bt=[Rt,jt],Ft={sendText:"发 送",sendMsg:"发送消息",sendImage:"发送图片",imageUpload:"图片上传",fileUpload:"文件上传",noneMsg:"暂无更多消息",moreMsg:"查看更多",sendAgain:"重新发送",chat:"聊天",contact:"通讯录",image:"图片",file:"文件",emoji:"表情",emojiDiy:"自定义表情",scoreDiy:"评分",noMsgType:"暂时不支持此消息",eventNotice:"通知",checkAllLabel:"全选",confirmLabel:"确定",cancelLabel:"取消",wrapKey:"使用Ctrl + enter换行",sendKey:"按Enter发送",draft:"草稿",atTitle:"选择要@的人",searchPlaceholder:"搜素人员名称",searchEmptyLabel:"没有匹配到任何结果",userTagTitle:"成员列表",groupUserTitle:"群成员",callEveryLabel:"所有人",checkLabel:"多选",emptyLabel:"暂无数据"},Vt=JSON.parse(localStorage.getItem("i18n"));Vt||(Vt=Ft);var zt={file:function(e){return"["+Vt.file+"]"},image:function(e){return"["+Vt.image+"]"},emoji:function(e){return"["+Vt.emojiDiy+"]"},score:function(e){return"["+(Vt.scoreDiy||"评分")+"]"},text:function(e){return e.content?this.emojiNameToImage(ae(e.content)):""},event:function(e){return"["+Vt.eventNotice+"]"}};function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gt(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Z(s.key),s)}}function Kt(e,t,i){return t&&Gt(e.prototype,t),i&&Gt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}console.log(Vt,1511511551515);var qt=function(){function e(){Ht(this,e),this.table={}}return Kt(e,[{key:"get",value:function(e){return e?this.table[e]:this.table}},{key:"set",value:function(e,t){this.table[e]=t}},{key:"remove",value:function(e){e?delete this.table[e]:this.table={}}},{key:"has",value:function(e){return!!this.table[e]}}])}();function Qt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function Yt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(i),!0).forEach(function(t){X(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Qt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var Jt,Wt,Zt={},Xt={},ei=function(e){return a(e)?e:"".concat(e,"px")},ti=function(e){return e.replace("%","")/100},ii=function(){},si={name:"LemonImui",provide:function(){return{IMUI:this}},props:{width:{type:[String,Number],default:850},height:{type:[String,Number],default:580},theme:{type:String,default:"default"},simple:{type:Boolean,default:!1},loadingText:[String,Function],loadendText:[String,Function],messageTimeFormat:Function,contactTimeFormat:Function,hideDrawer:{type:Boolean,default:!0},hideMenuAvatar:Boolean,hideMenu:Boolean,hideMessageName:Boolean,hideMessageTime:Boolean,sendKey:Function,wrapKey:Function,sendText:String,contextmenu:Array,contactContextmenu:Array,avatarCricle:Boolean,user:{type:Object,default:function(){return{}}},latelyContacts:{type:Function,default:function(e){var t=e.filter(function(e){return!r(e.lastContent)});return t.sort(function(e,t){return t.lastSendTime-e.lastSendTime}),t}}},data:function(){return this.CacheContactContainer=new qt,this.CacheMenuContainer=new qt,this.CacheMessageLoaded=new qt,this.CacheDraft=new qt,{customABC:"66666",drawerVisible:!this.hideDrawer,currentContactId:null,currentContactIdSidebarContact:null,currentMessages:[],activeSidebar:Rt,contacts:[],menus:[],i18n:{},editorTools:[{name:"emoji"},{name:"uploadFile"},{name:"uploadImage"}]}},render:function(){return this._renderWrapper([this._renderMenu(),this._renderSidebarMessage(),this._renderSidebarContact(),this._renderContainer(),this._renderDrawer()])},created:function(){this.initMenus(),this.initI18n()},mounted:function(){var e=d(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$nextTick();case 2:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),computed:{currentContact:function(){var e=this;return this.contacts.find(function(t){return t.id==e.currentContactId})||{}},currentContactSidebarContact:function(){var e=this;return this.contacts.find(function(t){return t.id==e.currentContactIdSidebarContact})||{}},currentMenu:function(){var e=this;return this.menus.find(function(t){return t.name==e.activeSidebar})||{}},currentIsDefSidebar:function(){return Bt.includes(this.activeSidebar)},lastMessages:function(){return this.latelyContacts(this.contacts)}},watch:{activeSidebar:function(){}},methods:{_menuIsContacts:function(){return this.activeSidebar==jt},_menuIsMessages:function(){return this.activeSidebar==Rt},_createMessage:function(e){return Yt(Yt({},{id:re(),type:"text",status:"going",sendTime:(new Date).getTime(),toContactId:this.currentContactId,fromUser:Yt({},this.user)}),e)},appendMessage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="+1",s=Zt[e.toContactId];if("event"!=e.type&&this.user.id!=e.fromUser.id||(i="+0"),void 0===s)this.updateContact({id:e.toContactId,unread:i,lastSendTime:e.sendTime,lastContent:this.lastContentRender(e)});else{var n=s.some(function(t){var i=t.id;return i==e.id});if(n)return;this._addMessage(e,e.toContactId,1);var a={id:e.toContactId,lastContent:this.lastContentRender(e),lastSendTime:e.sendTime};e.toContactId==this.currentContactId?(1==t&&this.messageViewToBottom(),this.CacheDraft.remove(e.toContactId)):a.unread=i,this.updateContact(a)}},_emitSend:function(e,t,i){var s=this;this.$emit("send",e,function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{status:"succeed"};t(),s.updateMessage(Object.assign(e,i))},i)},_handleSend:function(e){var t=this,i=this.$refs.editor.chatArea.getCallUserList(),s=this.$refs.editor.curEmoji.file_id?this.$refs.editor.curEmoji.file_id:0,n=s?"emoji":"text";this.$refs.editor.curEmoji="";var a=i.map(function(e){return e.id}),o=this._createMessage({content:e,at:a,file_id:s,type:n});this.appendMessage(o,!0),this._emitSend(o,function(){t.updateContact({id:o.toContactId,lastContent:t.lastContentRender(o),lastSendTime:o.sendTime}),t.CacheDraft.remove(o.toContactId)})},_handleUpload:function(e){var t,i=this,s=["image/gif","image/jpeg","image/png"];t=s.includes(e.type)?{type:"image",content:URL.createObjectURL(e)}:{type:"file",fileSize:e.size,fileName:e.name,content:""};var n=this._createMessage(t);this.appendMessage(n,!0),this._emitSend(n,function(){i.updateContact({id:n.toContactId,lastContent:i.lastContentRender(n),lastSendTime:n.sendTime})},e)},_emitPullMessages:function(e){var t=this;this._changeContactLock=!0,this.$emit("pull-messages",this.currentContact,function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t._addMessage(i,t.currentContactId,0),t.CacheMessageLoaded.set(t.currentContactId,s),1==s&&t.$refs.messages.loaded(),t.updateCurrentMessages(),t._changeContactLock=!1,e(s)},this)},callIsBottom:function(e){this.$emit("is-bottom",e)},clearCacheContainer:function(e){this.CacheContactContainer.remove(e),this.CacheMenuContainer.remove(e)},_renderWrapper:function(e){var t=this.$createElement;return t("div",{style:{width:ei(this.width),height:ei(this.height)},ref:"wrapper",class:["lemon-wrapper","lemon-wrapper--theme-".concat(this.theme),{"lemon-wrapper--simple":this.simple},this.drawerVisible&&"lemon-wrapper--drawer-show"]},[e])},_renderMenu:function(){var e=this,t=this.$createElement,i=this._renderMenuItem();return t("div",{class:"lemon-menu",directives:[{name:"show",value:!this.hideMenu}]},[t("lemon-avatar",{directives:[{name:"show",value:!this.hideMenuAvatar}],on:{click:function(t){e.$emit("menu-avatar-click",t)}},class:"lemon-menu__avatar",attrs:{src:this.user.avatar}}),i.top,this.$slots.menu,t("div",{class:"lemon-menu__bottom"},[this.$slots["menu-bottom"],i.bottom])])},_renderMenuAvatar:function(){},_renderMenuItem:function(){var e=this,t=this.$createElement,i=[],s=[];return this.menus.forEach(function(n){var a=n.name,o=n.title,r=n.unread,c=n.render,l=n.click,d=t("div",{class:["lemon-menu__item",{"lemon-menu__item--active":e.activeSidebar==a}],on:{click:function(){ne(l,function(){a&&e.changeMenu(a)})}},attrs:{title:o}},[t("lemon-badge",{attrs:{count:r}},[c(n)])]);!0===n.isBottom?s.push(d):i.push(d)}),{top:i,bottom:s}},_renderSidebarMessage:function(){var e=this;return this._renderSidebar([ee(this.$scopedSlots["sidebar-message-top"],null,this),this.lastMessages.map(function(t){return e._renderContact({contact:t,timeFormat:e.contactTimeFormat},function(){return e.changeContact(t.id)},e.$scopedSlots["sidebar-message"])})],Rt,ee(this.$scopedSlots["sidebar-message-fixedtop"],null,this))},_renderContact:function(e,t,i){var s=this,n=this.$createElement,a=e.contact,o=a.click,r=a.renderContainer,c=a.id,l=function(){ne(o,function(){t(),s._customContainerReady(r,s.CacheContactContainer,c)})};return n("lemon-contact",Y()([{class:{"lemon-contact--active":this.activeSidebar==jt?this.currentContactIdSidebarContact==e.contact.id:this.currentContactId==e.contact.id},directives:[{name:"lemon-contextmenu",value:this.contactContextmenu,modifiers:{contact:!0}}]},{props:e},{on:{click:l},scopedSlots:{default:i}}]))},_renderSidebarContact:function(){var e,t=this,i=this.$createElement;return this._renderSidebar([ee(this.$scopedSlots["sidebar-contact-top"],null,this),this.contacts.map(function(s){if(s.index){s.index=s.index.replace(/\[[0-9]*\]/,"");var n=[s.index!==e&&i("p",{class:"lemon-sidebar__label"},[s.index]),t._renderContact({contact:s,simple:!0},function(){t.changeContact(s.id)},t.$scopedSlots["sidebar-contact"])];return e=s.index,n}})],jt,ee(this.$scopedSlots["sidebar-contact-fixedtop"],null,this))},_renderSidebar:function(e,t,i){var s=this.$createElement;return s("lemon-resize",{attrs:{direction:"horizontal"},class:"lemon-sidebar",on:{"box-resize":this.boxResize,scroll:this._handleSidebarScroll},directives:[{name:"show",value:this.activeSidebar==t}]},[s("div",{class:"lemon-sidebar__fixed-top"},[i]),s("div",{class:"lemon-sidebar__scroll"},[e])])},_renderDrawer:function(){var e=this.$createElement;return this._menuIsMessages()&&this.currentContactId?e("div",{class:"lemon-drawer",ref:"drawer"},[ii(this.currentContact),ee(this.$scopedSlots.drawer,"",this.currentContact)]):""},_isContactContainerCache:function(e){return e.startsWith("contact#")},_renderContainer:function(){var e=this,t=this.$createElement,i=[],s="lemon-container",n=this.activeSidebar==jt?this.currentContactSidebarContact:this.currentContact,a=!0;for(var o in this.CacheContactContainer.get()){var c=n.id==o&&this.currentIsDefSidebar;c&&(a=!c),i.push(t("div",{class:s,directives:[{name:"show",value:c}]},[this.CacheContactContainer.get(o)]))}for(var l in this.CacheMenuContainer.get())i.push(t("div",{class:s,directives:[{name:"show",value:this.activeSidebar==l&&!this.currentIsDefSidebar}]},[this.CacheMenuContainer.get(l)]));return i.push(t("div",{class:s,directives:[{name:"show",value:this._menuIsMessages()&&a&&n.id}]},[t("div",{class:"lemon-container__title"},[ee(this.$scopedSlots["message-title"],t("div",{class:"lemon-container__displayname"},[n.displayName]),n)]),t("div",{class:"lemon-vessel"},[t("div",{class:"lemon-vessel__left"},[t("lemon-messages",{ref:"messages",attrs:{"loading-text":this.loadingText,"loadend-text":this.loadendText,"hide-time":this.hideMessageTime,"hide-name":this.hideMessageName,"time-format":this.messageTimeFormat,"reverse-user-id":this.user.id,messages:this.currentMessages},on:{"reach-top":this._emitPullMessages,"is-bottom":this.callIsBottom}}),t("lemon-editor",{ref:"editor",attrs:{tools:this.editorTools,sendText:this.sendText,sendKey:this.sendKey,wrapKey:this.wrapKey},on:{send:this._handleSend,upload:this._handleUpload}})]),t("div",{class:"lemon-vessel__right"},[ee(this.$scopedSlots["message-side"],null,n)])])])),i.push(t("div",{class:s,directives:[{name:"show",value:!n.id&&this.currentIsDefSidebar}]},[this.$slots.cover])),i.push(t("div",{class:s,directives:[{name:"show",value:this._menuIsContacts()&&a&&n.id}]},[ee(this.$scopedSlots["contact-info"],t("div",{class:"lemon-contact-info"},[t("lemon-avatar",{attrs:{src:n.avatar,size:90}}),t("h4",[n.displayName]),t("lemon-button",{on:{click:function(){r(n.lastContent)&&e.updateContact({id:n.id,lastContent:" "}),e.changeContact(n.id,Rt)}}},[this.i18n.sendMsg])]),n)])),i},_handleSidebarScroll:function(){D.hide()},_addContact:function(e,t){var i={0:"unshift",1:"push"}[t];this.contacts[i](e)},_addMessage:function(e,t,i){var s,n={0:"unshift",1:"push"}[i];Array.isArray(e)||(e=[e]),Zt[t]=Zt[t]||[],(s=Zt[t])[n].apply(s,$t(e))},setLastContentRender:function(e,t){zt[e]=t},lastContentRender:function(e){return console.log(e.type,"message.type",e.content),c(zt[e.type])?zt[e.type].call(this,e):"["+this.i18n.noMsgType+"]"},emojiNameToImage:function(e){return e&&"string"===typeof e?e.replace(/\[!(\w+)\]/gi,function(e,t){var i=t;return Xt[i]?'<img emoji-name="'.concat(t,'" src="').concat(Xt[i],'" />'):"[!".concat(t,"]")}):""},emojiImageToName:function(e){return e.replace(/<img emoji-name=\"([^\"]*?)\" [^>]*>/gi,"[!$1]")},updateCurrentMessages:function(){Zt[this.currentContactId]||(Zt[this.currentContactId]=[]),this.currentMessages=Zt[this.currentContactId]},messageViewToBottom:function(){this.$refs.messages.scrollToBottom()},setDraft:function(e,t){if(r(e)||r(t))return!1;var i=this.findContact(e),s=i.lastContent;if(r(i))return!1;this.CacheDraft.has(e)&&(s=this.CacheDraft.get(e).lastContent),this.CacheDraft.set(e,{editorValue:t,lastContent:s}),this.updateContact({id:e,lastContent:'<span style="color:red;">['.concat(this.i18n.draft,"]</span><span>").concat(this.lastContentRender({type:"text",content:t}),"</span>")})},clearDraft:function(e){var t=this.CacheDraft.get(e);if(t){var i=this.findContact(e).lastContent;0===i.indexOf('<span style="color:red;">['+this.i18n.draft+"]</span>")&&this.updateContact({id:e,lastContent:t.lastContent}),this.CacheDraft.remove(e)}},changeContact:function(){var e=d(regeneratorRuntime.mark(function e(t,i){var s,n,a,o=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!i){e.next=4;break}this.changeMenu(i),e.next=6;break;case 4:if(!(this._changeContactLock||this.activeSidebar==Rt&&this.currentContactId==t||this.activeSidebar==jt&&this.currentContactIdSidebarContact==t)){e.next=6;break}return e.abrupt("return",!1);case 6:if(this.currentContactId&&(console.log("🚀 ~ changeContact ~ this.currentContactId:",this.currentContactId),s=this.$refs.editor.chatArea.getHtml({needUserId:!0}),n=this.$refs.editor.chatArea.getText(),n?(this.setDraft(this.currentContactId,s),this.setEditorValue()):this.clearDraft(this.currentContactId)),this.activeSidebar==jt?this.currentContactIdSidebarContact=t:this.currentContactId=t,this.currentContactId){e.next=10;break}return e.abrupt("return",!1);case 10:if(this.$emit("change-contact",this.currentContact,this),!c(this.currentContact.renderContainer)&&this.activeSidebar!=jt){e.next=13;break}return e.abrupt("return");case 13:a=this.CacheDraft.get(t),a&&(this.$refs.editor.chatArea.reverseAnalysis(a.editorValue),this.$refs.editor._checkSubmitDisabled()),this.CacheMessageLoaded.has(t)?this.$refs.messages.loaded():this.$refs.messages.resetLoadState(),Zt[t]?setTimeout(function(){o.updateCurrentMessages(),o.messageViewToBottom()},0):(this.updateCurrentMessages(),this._emitPullMessages(function(e){o.messageViewToBottom()}));case 17:case"end":return e.stop()}},e,this)}));function t(t,i){return e.apply(this,arguments)}return t}(),removeMessage:function(e){var t=this.findMessage(e);if(!t)return!1;var i=Zt[t.toContactId].findIndex(function(t){var i=t.id;return i==e});return Zt[t.toContactId].splice(i,1),!0},updateMessage:function(e){if(!e.id)return!1;var t=this.findMessage(e.id);return!!t&&(t=Object.assign(t,e,{toContactId:t.toContactId}),!0)},forceUpdateMessage:function(e){if(e){var t=this.$refs.messages.$refs.message;if(t){var i=t.find(function(t){return t.$attrs.message.id==e});i&&i.$forceUpdate()}}else this.$refs.messages.$forceUpdate()},_customContainerReady:function(e,t,i){c(e)&&!t.has(i)&&t.set(i,e.call(this))},changeMenu:function(e){this.$emit("change-menu",e),this.activeSidebar=e},initEmoji:function(e){var t=[];this.$refs.editor.initEmoji(e),e[0].label?e.forEach(function(e){var i;(i=t).push.apply(i,$t(e.children))}):t=e,t.forEach(function(e){var t=e.name,i=e.src;return Xt[t]=i})},initI18n:function(e){var t=Ft;if(e)t=Object.assign(Ft,e);else{var i=JSON.parse(localStorage.getItem("i18n"));i&&(t=i)}localStorage.setItem("i18n",JSON.stringify(t)),this.i18n=t},initEditorTools:function(e){this.editorTools=e},initMenus:function(e){var t=this,i=this.$createElement,s=[{name:Rt,title:this.i18n.chat,unread:0,click:null,render:function(e){return i("i",{class:"lemon-icon-message"})},isBottom:!1},{name:jt,title:this.i18n.contact,unread:0,click:null,render:function(e){return i("i",{class:"lemon-icon-addressbook"})},isBottom:!1}],n=[];if(Array.isArray(e)){var a={messages:0,contacts:1},o=Object.keys(a);n=e.map(function(e){return o.includes(e.name)?Yt(Yt(Yt({},s[a[e.name]]),e),{renderContainer:null}):(e.renderContainer&&t._customContainerReady(e.renderContainer,t.CacheMenuContainer,e.name),e)})}else n=s;this.menus=n},initContacts:function(e){this.contacts=e,this.sortContacts()},sortContacts:function(){this.contacts.sort(function(e,t){if(e.index)return e.index.localeCompare(t.index)})},appendContact:function(e){return r(e.id)||r(e.displayName)?(console.error("id | displayName cant be empty"),!1):(this.hasContact(e.id)||this.contacts.push(Object.assign({id:"",displayName:"",avatar:"",index:"",unread:0,lastSendTime:"",lastContent:""},e)),!0)},removeContact:function(e){var t=this.findContactIndexById(e);return-1!==t&&(this.contacts.splice(t,1),this.CacheDraft.remove(e),this.CacheMessageLoaded.remove(e),!0)},updateContact:function(e){var t=e.id;delete e.id;var i=this.findContactIndexById(t);if(-1!==i){var s=e.unread;a(s)&&(0!==s.indexOf("+")&&0!==s.indexOf("-")||(e.unread=parseInt(s)+parseInt(this.contacts[i].unread))),this.$set(this.contacts,i,Yt(Yt({},this.contacts[i]),e))}},findContactIndexById:function(e){return this.contacts.findIndex(function(t){return t.id==e})},hasContact:function(e){return-1!==this.findContactIndexById(e)},findMessage:function(e){for(var t in Zt){var i=Zt[t].find(function(t){var i=t.id;return i==e});if(i)return i}},findContact:function(e){return this.getContacts().find(function(t){var i=t.id;return i==e})},getContacts:function(){return this.contacts},getCurrentContact:function(){return this.currentContact},getCurrentMessages:function(){return this.currentMessages},setEditorValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!a(e))return!1;this.$refs.editor.setValue(this.emojiNameToImage(e))},getEditorValue:function(){return this.$refs.editor.getFormatValue()},clearMessages:function(e){return e?(delete Zt[e],this.CacheMessageLoaded.remove(e),this.CacheDraft.remove(e)):(Zt={},this.CacheMessageLoaded.remove(),this.CacheDraft.remove()),!0},getMessages:function(e){return(e?Zt[e]:Zt)||[]},changeDrawer:function(e){this.drawerVisible=!this.drawerVisible,1==this.drawerVisible&&this.openDrawer(e)},openDrawer:function(e){ii=c(e)?e:e.render||new Function;var t=this.$refs.wrapper.clientWidth,i=this.$refs.wrapper.clientHeight,s=e.width||200,n=e.height||i,o=e.offsetX||0,r=e.offsetY||0,l=e.position||"right";a(s)&&(s=t*ti(s)),a(n)&&(n=i*ti(n)),a(o)&&(o=t*ti(o)),a(r)&&(r=i*ti(r)),this.$refs.drawer.style.width="".concat(s,"px"),this.$refs.drawer.style.height="".concat(n,"px");var d=0,u=0,h="";"right"==l?d=t:"rightInside"==l?(d=t-s,h="-15px 0 16px -14px rgba(0,0,0,0.08)"):"center"==l&&(d=t/2-s/2,u=i/2-n/2,h="0 0 20px rgba(0,0,0,0.08)"),d+=o,u+=r+-1,this.$refs.drawer.style.top="".concat(u,"px"),this.$refs.drawer.style.left="".concat(d,"px"),this.$refs.drawer.style.boxShadow=h,this.drawerVisible=!0},boxResize:function(e,t){this.$emit("sidebar-resize",e,t)},closeDrawer:function(){this.drawerVisible=!1},setAtUserList:function(e,t){this.$refs.editor.chatArea.updateConfig({userList:e,needCallEvery:t})},setUserTag:function(e){this.$refs.editor.chatArea.setUserTag(e),this.$refs.editor._checkSubmitDisabled()},getChatArea:function(){return this.$refs.editor.chatArea}}},ni=si,ai=(i("3d91"),v(ni,Jt,Wt,!1,null,null,null)),oi=ai.exports,ri=(i("6a2b"),"2.1.0"),ci=[oi,pe,$e,Le,q,z,j,C,P,ze,qe,tt,lt,bt,kt,Dt],li=function(e){e.directive("LemonContextmenu",D),ci.forEach(function(t){e.component(t.name,t)})};"undefined"!==typeof window&&window.Vue&&li(window.Vue);var di={version:ri,install:li};t["default"]=di},fdef:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"}})})},663:function(e,t,i){"use strict";var s=i(7616),n=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},a=[],o=i(1858),r=i.n(o),c={name:"App",data(){return{msg:"Welcome to Your Vue.js App"}},created(){let e=r().get("UserInfo"),t=r().get("globalConfig");t&&(t.sysInfo&&(document.title=t.sysInfo.name),console.log(t,28),this.$store.commit("setGlobalConfig",t)),e&&this.$store.commit("SET_USERINFO",e),this.$store.dispatch("getSystemInfo").then(e=>{})},destroyed(){},methods:{},watch:{"$store.state.globalConfig"(e){document.title=e.sysInfo.name}}},l=c,d=i(6367),u=(0,d.A)(l,n,a,!1,null,null,null),h=u.exports,p=i(4935),m=i.n(p),g=i(619),f={"发送":"发送","评价":"评价","请对本次服务进行评分":"请对本次服务进行评分","非常不满意":"非常不满意","不满意":"不满意","一般":"一般","满意":"满意","非常满意":"非常满意","投诉":"投诉","投诉项":"投诉项","投诉原因":"投诉原因","猜你想问":"猜你想问","请输入你想问":"请输入你想问","取消":"取消","确定":"确定","文本":"文本","暂无数据":"暂无数据","图片":"图片","视频":"视频","文件":"文件","请输入关键字搜索聊天":"请输入关键字搜索聊天","全部":"全部","上传时间":"上传时间","大小":"大小","上传者":"上传者","操作":"操作","消息管理器":"消息管理器","个人":"个人","团体":"团体","排队":"排队","查看资料":"查看资料","暂无更多消息":"暂无更多消息","正在努力加载资源":"正在努力加载资源","正在为您转接,请稍后":"正在为您转接,请稍后","页面加载中,请稍候":"页面加载中,请稍候","人工客服":"人工客服"},v={"发送":"Send","评价":"Rate","请对本次服务进行评分":"Please rate this service","非常不满意":"Very dissatisfied","不满意":"Dissatisfied","一般":"Average","满意":"Satisfied","非常满意":"Very satisfied","投诉":"Complaint","投诉项":"Complaint item","投诉原因":"Reason for complaint","猜你想问":"You might want to ask","请输入你想问":"Please enter what you want to ask","取消":"Cancel","确定":"Confirm","文本":"Text","暂无数据":"No data available","图片":"Image","视频":"Video","文件":"File","请输入关键字搜索聊天":"Please enter keywords to search chats","全部":"All","上传时间":"Upload time","大小":"Size","上传者":"Uploader","操作":"Action","消息管理器":"Message manager","个人":"Personal","团体":"Group","排队":"Queue","查看资料":"View profile","暂无更多消息":"No more messages","正在努力加载资源":"Loading resources","正在为您转接,请稍后":"Transferring you, please wait a moment","页面加载中,请稍候":"Page loading, please wait","没有更多了":"No hay más","消息发送速度较快,请稍后再发送":"Sending too fast. Please try again later","您的账号在其他地方登录,已被迫下线":"Your account is logged in elsewhere and forced offline","删除成功":"Deleted successfully","已取消":"Cancelled","提示":"Prompt","删除消息会从所有人的聊天记录中抹掉,是否确定":"Deleting will remove it from everyone's chat history. Confirm?","删除消息":"Delete Message","下载文件":"Download File","下载图片":"Download Image","复制成功":"Copied successfully","复制图片失败":"Failed to copy image","图片复制成功":"Image copied","上传的内容不得大于":"Upload size cannot exceed","请选择":"Please select","人工客服":"Live Agent"},y={"发送":"إرسال","评价":"تقييم","请对本次服务进行评分":"يرجى تقييم هذه الخدمة","非常不满意":"غير راضٍ جداً","不满意":"غير راضٍ","一般":"متوسط","满意":"راضٍ","非常满意":"راضٍ جداً","投诉":"شكوى","投诉项":"عنصر الشكوى","投诉原因":"سبب الشكوى","猜你想问":"قد ترغب في السؤال عن","请输入你想问":"يرجى إدخال سؤالك","取消":"إلغاء","确定":"تأكيد","文本":"نص","暂无数据":"لا توجد بيانات","图片":"صورة","视频":"فيديو","文件":"ملف","请输入关键字搜索聊天":"يرجى إدخال كلمات مفتاحية للبحث في المحادثات","全部":"الكل","上传时间":"وقت الرفع","大小":"الحجم","上传者":"الرافع","操作":"إجراء","消息管理器":"مدير الرسائل","个人":"فردي","团体":"جماعي","排队":"قائمة الانتظار","查看资料":"عرض الملف الشخصي","暂无更多消息":"لا توجد رسائل أخرى","正在努力加载资源":"جاري تحميل الموارد","正在为您转接,请稍后":"جاري تحويلك، يرجى الانتظار","页面加载中,请稍候":"جاري تحميل الصفحة، يرجى الانتظار","没有更多了":"لا يوجد المزيد","消息发送速度较快,请稍后再发送":"الإرسال سريع جدًا. يرجى المحاولة لاحقًا","您的账号在其他地方登录,已被迫下线":"تم تسجيل الدخول من مكان آخر، وتم فصلك","删除成功":"تم الحذف بنجاح","已取消":"تم الإلغاء","提示":"تنبيه","删除消息会从所有人的聊天记录中抹掉,是否确定":"سيؤدي حذف الرسالة لمسحها لدى الجميع، هل أنت متأكد؟","删除消息":"حذف الرسالة","下载文件":"تحميل الملف","下载图片":"تحميل الصورة","复制成功":"تم النسخ بنجاح","复制图片失败":"فشل نسخ الصورة","图片复制成功":"تم نسخ الصورة بنجاح","上传的内容不得大于":"يجب ألا يتجاوز حجم التحميل","请选择":"يرجى الاختيار","人工客服":"خدمة العملاء البشرية"},b={"发送":"Enviar","评价":"Evaluar","请对本次服务进行评分":"Por favor, califique este servicio","非常不满意":"Muy insatisfecho","不满意":"Insatisfecho","一般":"Promedio","满意":"Satisfecho","非常满意":"Muy satisfecho","投诉":"Queja","投诉项":"Elemento de queja","投诉原因":"Motivo de la queja","猜你想问":"Quizás quieras preguntar","请输入你想问":"Por favor, ingrese lo que desea preguntar","取消":"Cancelar","确定":"Confirmar","文本":"Texto","暂无数据":"No hay datos disponibles","图片":"Imagen","视频":"Video","文件":"Archivo","请输入关键字搜索聊天":"Por favor, ingrese palabras clave para buscar chats","全部":"Todos","上传时间":"Hora de carga","大小":"Tamaño","上传者":"Cargador","操作":"Acción","消息管理器":"Gestor de mensajes","个人":"Personal","团体":"Grupo","排队":"Cola","查看资料":"Ver perfil","暂无更多消息":"No hay más mensajes","正在努力加载资源":"Cargando recursos","正在为您转接,请稍后":"Transfiriéndole, espere un momento","页面加载中,请稍候":"Cargando página, espere un momento","没有更多了":"No hay más","消息发送速度较快,请稍后再发送":"Enviando demasiado rápido. Inténtelo más tarde","您的账号在其他地方登录,已被迫下线":"Su cuenta ha iniciado sesión en otro lugar y se ha cerrado","删除成功":"Eliminado con éxito","已取消":"Cancelado","提示":"Aviso","删除消息会从所有人的聊天记录中抹掉,是否确定":"Eliminar borrará el mensaje para todos. ¿Confirmar?","删除消息":"Eliminar mensaje","下载文件":"Descargar archivo","下载图片":"Descargar imagen","复制成功":"Copiado con éxito","复制图片失败":"Error al copiar imagen","图片复制成功":"Imagen copiada con éxito","上传的内容不得大于":"El contenido no debe superar","请选择":"Por favor seleccione","人工客服":"Agente en vivo"},C={"发送":"Envoyer","评价":"Évaluer","请对本次服务进行评分":"Veuillez noter ce service","非常不满意":"Très insatisfait","不满意":"Insatisfait","一般":"Moyen","满意":"Satisfait","非常满意":"Très satisfait","投诉":"Plainte","投诉项":"Élément de plainte","投诉原因":"Motif de plainte","猜你想问":"Vous voudriez peut-être demander","请输入你想问":"Veuillez entrer ce que vous voulez demander","取消":"Annuler","确定":"Confirmer","文本":"Texte","暂无数据":"Aucune donnée disponible","图片":"Image","视频":"Vidéo","文件":"Fichier","请输入关键字搜索聊天":"Veuillez entrer des mots-clés pour rechercher des conversations","全部":"Tous","上传时间":"Heure de téléchargement","大小":"Taille","上传者":"Téléchargeur","操作":"Action","消息管理器":"Gestionnaire de messages","个人":"Personnel","团体":"Groupe","排队":"File d'attente","查看资料":"Voir le profil","暂无更多消息":"Plus de messages","正在努力加载资源":"Chargement des ressources","正在为您转接,请稍后":"Transfert en cours, veuillez patienter un moment","页面加载中,请稍候":"Chargement de la page, veuillez patienter","没有更多了":"C'est tout","请选择":"Veuillez choisir","消息发送速度较快,请稍后再发送":"Envoi trop rapide. Veuillez réessayer plus tard","您的账号在其他地方登录,已被迫下线":"Votre compte est connecté ailleurs, déconnexion forcée","删除成功":"Supprimé avec succès","已取消":"Annulé","提示":"Indication","删除消息会从所有人的聊天记录中抹掉,是否确定":"Supprimer effacera le message pour tous. Confirmer ?","删除消息":"Supprimer le message","下载文件":"Télécharger le fichier","下载图片":"Télécharger l'image","复制成功":"Copié avec succès","复制图片失败":"Échec de copie de l'image","图片复制成功":"Image copiée","上传的内容不得大于":"La taille de l'upload ne doit pas dépasser","人工客服":"Conseiller en ligne"},x={"发送":"Kirim","评价":"Evaluasi","请对本次服务进行评分":"Silakan beri penilaian untuk layanan ini","非常不满意":"Sangat tidak puas","不满意":"Tidak puas","一般":"Biasa","满意":"Puas","非常满意":"Sangat puas","投诉":"Keluhan","投诉项":"Item keluhan","投诉原因":"Alasan keluhan","猜你想问":"Mungkin Anda ingin bertanya","请输入你想问":"Silakan masukkan apa yang ingin Anda tanyakan","取消":"Batal","确定":"Konfirmasi","文本":"Teks","暂无数据":"Tidak ada data tersedia","图片":"Gambar","视频":"Video","文件":"File","请输入关键字搜索聊天":"Silakan masukkan kata kunci untuk mencari percakapan","全部":"Semua","上传时间":"Waktu unggah","大小":"Ukuran","上传者":"Pengunggah","操作":"Aksi","消息管理器":"Manajer pesan","个人":"Pribadi","团体":"Grup","排队":"Antrean","查看资料":"Lihat profil","暂无更多消息":"Tidak ada pesan lainnya","正在努力加载资源":"Memuat sumber daya","正在为您转接,请稍后":"Sedang mengalihkan Anda, harap tunggu sebentar","页面加载中,请稍候":"Halaman sedang dimuat, harap tunggu","没有更多了":"Tidak ada lagi","消息发送速度较快,请稍后再发送":"Mengirim terlalu cepat. Silakan coba lagi nanti","您的账号在其他地方登录,已被迫下线":"Akun Anda masuk di tempat lain, terpaksa offline","删除成功":"Berhasil dihapus","已取消":"Dibatalkan","提示":"Petunjuk","删除消息会从所有人的聊天记录中抹掉,是否确定":"Menghapus pesan akan menghapusnya dari riwayat semua orang. Konfirmasi?","删除消息":"Hapus Pesan","下载文件":"Unduh File","下载图片":"Unduh Gambar","复制成功":"Berhasil disalin","复制图片失败":"Gagal menyalin gambar","图片复制成功":"Gambar berhasil disalin","上传的内容不得大于":"Ukuran unggahan tidak boleh lebih dari","请选择":"Silakan pilih","人工客服":"Layanan Pelanggan"},w={"发送":"Invia","评价":"Valuta","请对本次服务进行评分":"Si prega di valutare questo servizio","非常不满意":"Molto insoddisfatto","不满意":"Insoddisfatto","一般":"Medio","满意":"Soddisfatto","非常满意":"Molto soddisfatto","投诉":"Reclamo","投诉项":"Elemento di reclamo","投诉原因":"Motivo del reclamo","猜你想问":"Potresti voler chiedere","请输入你想问":"Si prega di inserire ciò che vuoi chiedere","取消":"Annulla","确定":"Conferma","文本":"Testo","暂无数据":"Nessun dato disponibile","图片":"Immagine","视频":"Video","文件":"File","请输入关键字搜索聊天":"Si prega di inserire parole chiave per cercare le chat","全部":"Tutti","上传时间":"Ora di caricamento","大小":"Dimensione","上传者":"Caricatore","操作":"Azione","消息管理器":"Gestore messaggi","个人":"Personale","团体":"Gruppo","排队":"Coda","查看资料":"Visualizza profilo","暂无更多消息":"Nessun altro messaggio","正在努力加载资源":"Caricamento risorse","正在为您转接,请稍后":"Ti stiamo trasferendo, attendi un momento","页面加载中,请稍候":"Pagina in caricamento, attendi","没有更多了":"これ以上ありません","消息发送速度较快,请稍后再发送":"Invio troppo veloce. Riprova più tardi","您的账号在其他地方登录,已被迫下线":"Account collegato altrove, disconnessione forzata","删除成功":"Eliminazione completata","已取消":"Annullato","提示":"Suggerimento","删除消息会从所有人的聊天记录中抹掉,是否确定":"L'eliminazione lo rimuoverà per tutti. Confermare?","删除消息":"Elimina messaggio","下载文件":"Scarica file","下载图片":"Scarica immagine","复制成功":"Copiato con successo","复制图片失败":"Errore copia immagine","图片复制成功":"Immagine copiata","上传的内容不得大于":"L'upload non deve superare","请选择":"Seleziona","人工客服":"Operatore umano"},k={"发送":"送信","评价":"評価","请对本次服务进行评分":"今回のサービスを評価してください","非常不满意":"非常に不満","不满意":"不満","一般":"普通","满意":"満足","非常满意":"非常に満足","投诉":"苦情","投诉项":"苦情項目","投诉原因":"苦情の理由","猜你想问":"あなたが聞きたいかもしれないこと","请输入你想问":"聞きたいことを入力してください","取消":"キャンセル","确定":"確認","文本":"テキスト","暂无数据":"データがありません","图片":"画像","视频":"動画","文件":"ファイル","请输入关键字搜索聊天":"キーワードを入力してチャットを検索してください","全部":"すべて","上传时间":"アップロード時刻","大小":"サイズ","上传者":"アップロード者","操作":"操作","消息管理器":"メッセージマネージャー","个人":"個人","团体":"グループ","排队":"待ち行列","查看资料":"プロフィールを見る","暂无更多消息":"これ以上メッセージはありません","正在努力加载资源":"リソースを読み込んでいます","正在为您转接,请稍后":"転送中です、少々お待ちください","页面加载中,请稍候":"ページを読み込んでいます、お待ちください","没有更多了":"これ以上ありません","请选择":"選択してください","消息发送速度较快,请稍后再发送":"送信が速すぎます。後でやり直してください","您的账号在其他地方登录,已被迫下线":"他の場所でログインされたため、ログアウトされました","删除成功":"削除に成功しました","已取消":"キャンセルしました","提示":"ヒント","删除消息会从所有人的聊天记录中抹掉,是否确定":"メッセージを削除すると全員の履歴から消去されます。よろしいですか?","删除消息":"メッセージを削除","下载文件":"ファイルをダウンロード","下载图片":"画像をダウンロード","复制成功":"コピーに成功しました","复制图片失败":"画像のコピーに失敗しました","图片复制成功":"画像をコピーしました","上传的内容不得大于":"アップロードサイズは以下である必要があります","人工客服":"有人チャット"},E={"发送":"보내기","评价":"평가","请对本次服务进行评分":"이 서비스에 대한 평가를 부탁드립니다","非常不满意":"매우 불만족","不满意":"불만족","一般":"보통","满意":"만족","非常满意":"매우 만족","投诉":"불만","投诉项":"불만 항목","投诉原因":"불만 사유","猜你想问":"질문하고 싶은 것","请输入你想问":"질문하고 싶은 내용을 입력하세요","取消":"취소","确定":"확인","文本":"텍스트","暂无数据":"데이터가 없습니다","图片":"이미지","视频":"비디오","文件":"파일","请输入关键字搜索聊天":"키워드를 입력하여 채팅을 검색하세요","全部":"전체","上传时间":"업로드 시간","大小":"크기","上传者":"업로더","操作":"작업","消息管理器":"메시지 관리자","个人":"개인","团体":"그룹","排队":"대기열","查看资料":"프로필 보기","暂无更多消息":"더 이상 메시지가 없습니다","正在努力加载资源":"리소스를 로드하는 중","正在为您转接,请稍后":"전환 중입니다, 잠시 기다려 주세요","页面加载中,请稍候":"페이지 로드 중, 잠시 기다려 주세요","没有更多了":"더 이상 없습니다","消息发送速度较快,请稍后再发送":"메시지 전송이 너무 빠릅니다. 나중에 다시 시도하세요","您的账号在其他地方登录,已被迫下线":"다른 곳에서 로그인되어 로그아웃되었습니다","删除成功":"삭제되었습니다","已取消":"취소됨","提示":"알림","删除消息会从所有人的聊天记录中抹掉,是否确定":"메시지를 삭제하면 모든 대화 내용에서 삭제됩니다. 확인하시겠습니까?","删除消息":"메시지 삭제","下载文件":"파일 다운로드","下载图片":"이미지 다운로드","复制成功":"복사 성공","复制图片失败":"이미지 복사 실패","图片复制成功":"이미지 복사 완료","上传的内容不得大于":"업로드 용량은 다음을 초과할 수 없습니다","请选择":"선택해 주세요","人工客服":"상담원 연결"},_={"发送":"ส่ง","评价":"ประเมิน","请对本次服务进行评分":"โปรดให้คะแนนบริการนี้","非常不满意":"ไม่พึงพอใจมาก","不满意":"ไม่พึงพอใจ","一般":"ปานกลาง","满意":"พึงพอใจ","非常满意":"พึงพอใจมาก","投诉":"ร้องเรียน","投诉项":"รายการร้องเรียน","投诉原因":"สาเหตุการร้องเรียน","猜你想问":"คุณอาจต้องการถาม","请输入你想问":"โปรดป้อนสิ่งที่คุณต้องการถาม","取消":"ยกเลิก","确定":"ยืนยัน","文本":"ข้อความ","暂无数据":"ไม่มีข้อมูล","图片":"รูปภาพ","视频":"วิดีโอ","文件":"ไฟล์","请输入关键字搜索聊天":"โปรดป้อนคำสำคัญเพื่อค้นหาแชท","全部":"ทั้งหมด","上传时间":"เวลาอัปโหลด","大小":"ขนาด","上传者":"ผู้อัปโหลด","操作":"การดำเนินการ","消息管理器":"ผู้จัดการข้อความ","个人":"ส่วนบุคคล","团体":"กลุ่ม","排队":"คิว","查看资料":"ดูโปรไฟล์","暂无更多消息":"ไม่มีข้อความเพิ่มเติม","正在努力加载资源":"กำลังโหลดทรัพยากร","正在为您转接,请稍后":"กำลังส่งต่อคุณ โปรดรอสักครู่","页面加载中,请稍候":"กำลังโหลดหน้า โปรดรอสักครู่","没有更多了":"ไม่มีข้อมูลเพิ่มเติม","消息发送速度较快,请稍后再发送":"ส่งข้อความเร็วเกินไป โปรดลองอีกครั้งในภายหลัง","您的账号在其他地方登录,已被迫下线":"บัญชีเข้าสู่ระบบที่อื่น และถูกบังคับให้ออกจากระบบ","删除成功":"ลบสำเร็จ","已取消":"ยกเลิกแล้ว","提示":"คำแนะนำ","删除消息会从所有人的聊天记录中抹掉,是否确定":"การลบข้อความจะลบจากประวัติของทุกคน ยืนยันหรือไม่?","删除消息":"ลบข้อความ","下载文件":"ดาวน์โหลดไฟล์","下载图片":"ดาวน์โหลดรูปภาพ","复制成功":"คัดลอกสำเร็จ","复制图片失败":"คัดลอกรูปภาพล้มเหลว","图片复制成功":"คัดลอกรูปภาพสำเร็จ","上传的内容不得大于":"ขนาดการอัปโหลดต้องไม่เกิน","请选择":"โปรดเลือก","人工客服":"เจ้าหน้าที่บริการ"},I={"发送":"Gönder","评价":"Değerlendir","请对本次服务进行评分":"Lütfen bu hizmeti değerlendirin","非常不满意":"Çok memnun değilim","不满意":"Memnun değilim","一般":"Orta","满意":"Memnun","非常满意":"Çok memnun","投诉":"Şikayet","投诉项":"Şikayet öğesi","投诉原因":"Şikayet nedeni","猜你想问":"Sormak isteyebileceğiniz","请输入你想问":"Lütfen sormak istediğinizi girin","取消":"İptal","确定":"Onayla","文本":"Metin","暂无数据":"Veri yok","图片":"Resim","视频":"Video","文件":"Dosya","请输入关键字搜索聊天":"Lütfen sohbet aramak için anahtar kelimeler girin","全部":"Tümü","上传时间":"Yükleme zamanı","大小":"Boyut","上传者":"Yükleyen","操作":"İşlem","消息管理器":"Mesaj yöneticisi","个人":"Kişisel","团体":"Grup","排队":"Sıra","查看资料":"Profili görüntüle","暂无更多消息":"Daha fazla mesaj yok","正在努力加载资源":"Kaynaklar yükleniyor","正在为您转接,请稍后":"Sizi aktarıyoruz, lütfen bekleyin","页面加载中,请稍候":"Sayfa yükleniyor, lütfen bekleyin","没有更多了":"Daha fazla yok","消息发送速度较快,请稍后再发送":"Mesaj gönderme hızı çok yüksek, lütfen sonra tekrar deneyin","您的账号在其他地方登录,已被迫下线":"Hesabınız başka bir yerden açıldı, oturumunuz kapatıldı","删除成功":"Başarıyla silindi","已取消":"İptal edildi","提示":"İpucu","删除消息会从所有人的聊天记录中抹掉,是否确定":"Mesajı silmek herkesin geçmişinden silecektir, onaylıyor musunuz?","删除消息":"Mesajı sil","下载文件":"Dosyayı indir","下载图片":"Resmi indir","复制成功":"Başarıyla kopyalandı","复制图片失败":"Resim kopyalanamadı","图片复制成功":"Resim başarıyla kopyalandı","上传的内容不得大于":"Yüklenen içerik şundan büyük olamaz","请选择":"Lütfen seçin","人工客服":"Canlı Destek"},A={"发送":"Gửi","评价":"Đánh giá","请对本次服务进行评分":"Vui lòng đánh giá dịch vụ này","非常不满意":"Rất không hài lòng","不满意":"Không hài lòng","一般":"Trung bình","满意":"Hài lòng","非常满意":"Rất hài lòng","投诉":"Khiếu nại","投诉项":"Mục khiếu nại","投诉原因":"Lý do khiếu nại","猜你想问":"Bạn có thể muốn hỏi","请输入你想问":"Vui lòng nhập những gì bạn muốn hỏi","取消":"Hủy","确定":"Xác nhận","文本":"Văn bản","暂无数据":"Không có dữ liệu","图片":"Hình ảnh","视频":"Video","文件":"Tệp","请输入关键字搜索聊天":"Vui lòng nhập từ khóa để tìm kiếm cuộc trò chuyện","全部":"Tất cả","上传时间":"Thời gian tải lên","大小":"Kích thước","上传者":"Người tải lên","操作":"Hành động","消息管理器":"Trình quản lý tin nhắn","个人":"Cá nhân","团体":"Nhóm","排队":"Hàng đợi","查看资料":"Xem hồ sơ","暂无更多消息":"Không có tin nhắn nào khác","正在努力加载资源":"Đang tải tài nguyên","正在为您转接,请稍后":"Đang chuyển tiếp bạn, vui lòng đợi một chút","页面加载中,请稍候":"Đang tải trang, vui lòng đợi","没有更多了":"Không còn gì nữa","消息发送速度较快,请稍后再发送":"Gửi quá nhanh. Vui lòng thử lại sau","您的账号在其他地方登录,已被迫下线":"Tài khoản đăng nhập nơi khác, đã bị đăng xuất","删除成功":"Xóa thành công","已取消":"Đã hủy","提示":"Gợi ý","删除消息会从所有人的聊天记录中抹掉,是否确定":"Xóa tin nhắn sẽ xóa khỏi lịch sử của mọi người, bạn có chắc chắn không?","删除消息":"Xóa tin nhắn","下载文件":"Tải xuống tệp","下载图片":"Tải xuống hình ảnh","复制成功":"Sao chép thành công","复制图片失败":"Sao chép hình ảnh thất bại","图片复制成功":"Sao chép hình ảnh thành công","上传的内容不得大于":"Dung lượng tải lên không được lớn hơn","请选择":"Vui lòng chọn","人工客服":"Nhân viên hỗ trợ"},S={"发送":"Senden","评价":"Bewertung","请对本次服务进行评分":"Bitte bewerten Sie diesen Service","非常不满意":"Sehr unzufrieden","不满意":"Unzufrieden","一般":"Durchschnittlich","满意":"Zufrieden","非常满意":"Sehr zufrieden","投诉":"Beschwerde","投诉项":"Beschwerdepunkt","投诉原因":"Beschwerdegrund","猜你想问":"Möchten Sie fragen","请输入你想问":"Bitte geben Sie Ihre Frage ein","取消":"Abbrechen","确定":"Bestätigen","文本":"Text","暂无数据":"Keine Daten","图片":"Bild","视频":"Video","文件":"Datei","请输入关键字搜索聊天":"Bitte geben Sie Schlüsselwörter ein, um Chats zu durchsuchen","全部":"Alle","上传时间":"Upload-Zeit","大小":"Größe","上传者":"Uploader","操作":"Aktion","消息管理器":"Nachrichtenmanager","个人":"Persönlich","团体":"Gruppe","排队":"Warteschlange","查看资料":"Profil anzeigen","暂无更多消息":"Keine weiteren Nachrichten","正在努力加载资源":"Ressourcen werden geladen","正在为您转接,请稍后":"Sie werden weitergeleitet, bitte warten Sie einen Moment","页面加载中,请稍候":"Seite wird geladen, bitte warten Sie","没有更多了":"Nichts mehr da","消息发送速度较快,请稍后再发送":"Nachrichten werden zu schnell gesendet. Später versuchen","您的账号在其他地方登录,已被迫下线":"Konto an anderem Ort angemeldet, Abmeldung erzwungen","删除成功":"Erfolgreich gelöscht","已取消":"Abgebrochen","提示":"Hinweis","删除消息会从所有人的聊天记录中抹掉,是否确定":"Nachricht wird für alle gelöscht. Sind Sie sicher?","删除消息":"Nachricht löschen","下载文件":"Datei herunterladen","下载图片":"Bild herunterladen","复制成功":"Erfolgreich kopiert","复制图片失败":"Bild kopieren fehlgeschlagen","图片复制成功":"Bild erfolgreich kopiert","上传的内容不得大于":"Upload darf nicht größer sein als","请选择":"Bitte auswählen","人工客服":"Live-Support"},T={"发送":"發送","评价":"評價","请对本次服务进行评分":"請對本次服務進行評分","非常不满意":"非常不滿意","不满意":"不滿意","一般":"一般","满意":"滿意","非常满意":"非常滿意","投诉":"投訴","投诉项":"投訴項","投诉原因":"投訴原因","猜你想问":"猜你想問","请输入你想问":"請輸入你想問","取消":"取消","确定":"確定","文本":"文本","暂无数据":"暫無數據","图片":"圖片","视频":"視頻","文件":"文件","请输入关键字搜索聊天":"請輸入關鍵字搜索聊天","全部":"全部","上传时间":"上傳時間","大小":"大小","上传者":"上傳者","操作":"操作","消息管理器":"消息管理器","个人":"個人","团体":"團體","排队":"排隊","查看资料":"查看資料","暂无更多消息":"暫無更多消息","正在努力加载资源":"正在努力加載資源","正在为您转接,请稍后":"正在為您轉接,請稍後","页面加载中,请稍候":"頁面加載中,請稍候","没有更多了":"沒有更多了","人工客服":"人工客服"};s["default"].use(g.A);const M=new g.A({locale:"zh",fallbackLocale:"zh",messages:{zh:f,en:v,vi:A,tr:I,th:_,ko:E,it:w,id:x,fr:C,es:b,ar:y,de:S,"zh-hk":T,"ja-jp":k}});var D=M,L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"user-card-box"},[t("el-container",{directives:[{name:"outside",rawName:"v-outside",value:e.closeDialog,expression:"closeDialog"}],staticClass:"container"},[t("el-header",{staticClass:"no-padding header",attrs:{height:"180px"}},[t("i",{staticClass:"close el-icon-error cur-handle",on:{click:e.closeDialog}}),t("div",{staticClass:"img-banner"}),t("div",{staticClass:"user-header"},[t("div",{staticClass:"avatar"},[t("div",{staticClass:"avatar-box"},[t("img",{attrs:{src:e.detail.avatar}})])]),t("div",{staticClass:"username"},[t("i",{staticClass:"iconfont icon-qianming"}),t("span",[e._v(e._s(e.detail.realname||"未设置昵称"))])])])]),t("el-main",{staticClass:"no-padding main"},[t("div",{staticClass:"user-sign"},[t("div",{staticClass:"sign-arrow"}),t("i",{staticClass:"iconfont icon-bianji"}),t("span",[e._v(e._s(e.detail.motto||"这家伙有点懒,什么都没留下!")+" ")])]),t("div",{staticClass:"card-rows no-select"},[t("div",{staticClass:"card-row"},[t("div",{staticClass:"label"},[e._v("账号")]),t("div",[e._v(e._s(e.detail.account))])]),t("div",{staticClass:"card-row"},[t("div",{staticClass:"label"},[e._v(e._s(2==e.globalConfig.sysInfo.runMode?"昵称":"姓名"))]),t("div",[e._v(e._s(e.detail.realname))])]),e.detail.friend&&2==e.globalConfig.sysInfo.runMode?t("div",{staticClass:"card-row"},[t("div",{staticClass:"label"},[e._v("备注")]),t("div",[e._v(e._s(e.detail.friend.nickname||"未设置")+" "),t("i",{staticClass:"el-icon-edit ml-10",attrs:{title:"设置备注"},on:{click:e.setNickname}})])]):e._e(),t("div",{staticClass:"card-row"},[t("div",{staticClass:"label"},[e._v("性别")]),t("div",[e._v(e._s(e._f("sex")(e.detail.sex)))])]),t("div",{staticClass:"card-row"},[t("div",{staticClass:"label"},[e._v("邮箱")]),t("div",[e._v(e._s(e.detail.email||"未设置"))])]),parseInt(e.globalConfig.sysInfo.ipregion)&&e.isFriend?t("div",{staticClass:"card-row"},[t("div",{staticClass:"label"},[e._v("IP")]),e.detail.last_login_ip?t("div",[e._v(e._s(e.detail.last_login_ip||"未知")+" ("+e._s(e.detail.location||"未知")+")")]):t("div",[e._v("未知")])]):e._e()])]),t("el-footer",{staticClass:"footer"},[e.isFriend?t("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",round:""},on:{click:function(t){return e.openChat()}}},[e._v("发消息")]):e._e(),2!=e.globalConfig.sysInfo.runMode||e.detail.friend||e.user_id==e.userInfo.user_id?e._e():t("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",round:""},on:{click:function(t){return e.addFriend()}}},[e._v("加好友")]),e.options.isManage?t("el-button",{staticStyle:{width:"150px"},attrs:{round:""},on:{click:e.editUser}},[e._v("编辑资料")]):e._e()],1)],1)],1)},N=[],U=i(6115),P={name:"UserCard",props:{user_id:{type:[Number,String],default:0},options:{type:Object,default:()=>({isManage:!1})}},computed:{...(0,U.aH)({userInfo:e=>e.userInfo,globalConfig:e=>e.globalConfig}),isFriend(){return this.userInfo.user_id!=this.detail.user_id&&(this.detail.friend||1==this.globalConfig.sysInfo.runMode)}},filters:{sex(e){let t=["女","男","未知"];return t[e]||"未知"}},data(){return{detail:{}}},mounted(){this.getUserDetal()},methods:{closeDialog(){this.$emit("close")},getUserDetal(){this.$api.imApi.getUserInfo({user_id:this.user_id}).then(e=>{0==e.code&&(this.detail=e.data)})},openChat(){this.closeDialog(),this.$store.commit("openChat",this.detail.user_id)},editUser(){this.$emit("editUser",this.detail)},addFriend(){this.closeDialog(),this.$prompt("请填写验证信息,让朋友知道你!","添加好友",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(({value:e})=>{if(!e)return this.$message.error("请输入验证信息"),!1;this.$api.friendApi.addFriend({user_id:this.detail.user_id,remark:e}).then(e=>{0==e.code&&this.$message.success("已发送好友申请")})}).catch(e=>{this.$message({type:"warning",message:e})})},setNickname(){let e=this.detail.friend.friend_id??"";if(!this.detail.friend)return this.$message.error("该用户不是您的好友"),!1;this.closeDialog();let t=this.detail.friend.nickname?this.detail.friend.nickname:this.detail.realname;this.$prompt("请填写备注信息","设置备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:t}).then(({value:t})=>{if(!t)return this.$message.error("请输入备注信息"),!1;this.$api.friendApi.setNickname({friend_id:e,nickname:t}).then(e=>{0==e.code&&(this.$message.success("设置成功"),this.detail.realname=t)})}).catch(()=>{})}}},O=P,$=(0,d.A)(O,L,N,!1,null,"499318c8",null),R=$.exports,j={install(e){function t(t,i){let s=this;const n=new e({router:s.$router,store:s.$store,render(e){return e(R,{on:{close:()=>{n.$destroy(),document.body.removeChild(n.$el)},editUser:e=>{i.editDataCallbak&&i.editDataCallbak(e),n.$destroy(),document.body.removeChild(n.$el)}},props:{user_id:t,options:i}})}}).$mount();document.body.appendChild(n.$el)}e.prototype.$user=t}},B=function(){var e=this,t=e._self._c;return t("div",[t("transition",{attrs:{name:"fade-user"}},[t("div",{staticClass:"previewBox"},[t("el-button",{staticClass:"drawer-close",attrs:{type:"danger",icon:"el-icon-close",circle:""},on:{click:e.closeDrawer}}),t("iframe",{attrs:{src:e.url,frameborder:"0",width:"100%",height:"100%"}})],1)])],1)},F=[],V={name:"preview",props:{url:{type:String,default:""}},data(){return{}},methods:{closeDrawer(){this.$emit("close")}}},z=V,H=(0,d.A)(z,B,F,!1,null,"022a2c23",null),G=H.exports,K={install(e){function t(t,i){let s=this;const n=new e({router:s.$router,store:s.$store,render(e){return e(G,{on:{close:()=>{n.$destroy(),document.body.removeChild(n.$el)}},props:{url:t,options:i}})}}).$mount();document.body.appendChild(n.$el)}e.prototype.$preview=t}},q=i(7155),Q=i.n(q),Y=i(7400),J=function(){var e=this,t=e._self._c;return t("Message",{ref:"Message",attrs:{dialogTableVisible:e.dialogTableVisible},on:{"update:dialogTableVisible":function(t){e.dialogTableVisible=t},"update:dialog-table-visible":function(t){e.dialogTableVisible=t}}})},W=[],Z=i.p+"assets/img/login-background.bfc13145.jpg",X=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogTableVisible,expression:"dialogTableVisible"}],staticClass:"messageBoxStyle"},[t("message",{on:{close:e.closeDialog,newChat:e.contactSync}})],1)},ee=[],te=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{height:"100%",width:"100%"}},[t("div",{staticClass:"chat-box"},[t("lemon-imui",{ref:"IMUI",staticStyle:{"min-height":"600px"},attrs:{avatarCricle:e.setting.avatarCricle,"contact-contextmenu":e.contactContextmenu,contextmenu:e.contextmenu,height:e.curHeight,"hide-message-name":e.setting.hideMessageName,"hide-message-time":e.setting.hideMessageTime,latelyContacts:e.latelyContact,sendKey:e.setSendKey,theme:e.setting.theme,user:e.user,width:e.curWidth,wrapKey:e.wrapKey,hideMenu:""},on:{send:e.handleSend,"is-bottom":e.eventBottom,"menu-avatar-click":e.openSetting,"change-contact":e.handleChangeContact,"pull-messages":e.handlePullMessages,"message-click":e.handleMessageClick},scopedSlots:e._u([{key:"cover",fn:function(){return[t("div",[t("div",{staticClass:"cover"},[t("i",{staticClass:"lemon-icon-message"}),t("p",[t("b",[e._v("暂无会话")])])])])]},proxy:!0},{key:"sidebar-message",fn:function(i){return[t("div",{staticClass:"lemon-contact-item",class:1==i.is_top?"bg-gray":"",on:{click:function(t){return e.customGetMsgList(i)}}},[t("el-badge",{staticClass:"lemon-badge lemon-contact__avatar",attrs:{hidden:i.unread<=0,"is-dot":0==i.is_notice,max:99,value:i.unread}},[t("span",{staticClass:"lemon-avatar",class:{"lemon-avatar--circle":e.setting.avatarCricle},staticStyle:{width:"40px",height:"40px","line-height":"40px","font-size":"20px"}},[t("img",{attrs:{src:i.avatar}})]),i.is_online&&0==i.is_group&&e.globalConfig.chatInfo&&1==e.globalConfig.chatInfo.online?t("span",{staticClass:"online-status",attrs:{title:"在线"}}):e._e()]),t("div",{staticClass:"lemon-contact__inner"},[t("p",{staticClass:"lemon-contact__label"},[t("span",{staticClass:"lemon-contact__name",style:{color:e.titleColorMap[i.timeout_type]}},[e._v(" "+e._s(i.displayName)+" ")]),t("span",{staticClass:"lemon-contact__time",domProps:{textContent:e._s(e.formatTime(i.lastSendTime))}})]),t("p",{staticClass:"lemon-contact__content lemon-last-content"},[t("span",{staticClass:"lastContent"},[i.is_at>0?t("span",{staticClass:"c-red"},[e._v("[有"+e._s(i.is_at)+"人@我] ")]):e._e(),t("span",{domProps:{innerHTML:e._s(i.lastContent)}})]),0===i.service_status?t("el-button",{staticStyle:{position:"relative","z-index":"1"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.kefuHandleChat(i)}}},[e._v(" 接线 ")]):e._e(),1===i.service_status||2===i.service_status||3==e.filterIndex?t("el-button",{staticStyle:{position:"relative","z-index":"1"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.openAdminList(i)}}},[e._v(" 转线 ")]):e._e(),0==i.is_notice?t("span",{staticClass:"el-icon-close-notification f-16"}):e._e()],1)])],1)]}},{key:"message-title",fn:function(i){return[t("div",{staticClass:"message-title-box"},[e.globalConfig&&e.globalConfig.chatInfo?t("div",[0==e.isEdit?t("span",[1==e.is_group?t("span",{staticClass:"displayName",on:{click:function(t){e.isEdit=!0}}},[e._v(" "+e._s(i.displayName)),t("span",{staticClass:"mr-5"},[e._v("("+e._s(e.groupUserCount)+")")]),i.setting&&1==i.setting.nospeak?t("el-tag",{attrs:{size:"mini",type:"warning"}},[e._v("仅群管理员可发言")]):e._e(),i.setting&&2==i.setting.nospeak?t("el-tag",{attrs:{size:"mini",type:"danger"}},[e._v("全员禁言中")]):e._e()],1):e._e(),e.is_group>1?t("span",{staticClass:"displayName"},[2==e.is_group?t("el-tag",{attrs:{size:"mini"}},[e._v("BOT")]):e._e(),e._v(" "+e._s(i.displayName)+" ")],1):e._e(),0==e.is_group?t("div",{staticClass:"displayName"},[e.globalConfig.chatInfo.online?t("OnlineStatus",{attrs:{pulse:i.is_online,type:i.is_online?"success":"info"}}):e._e(),e._v(" "+e._s(i.displayName)+" "),i.remark?t("span",[e._v("("+e._s(i.remark)+")")]):e._e()],1):e._e(),t("div",{staticStyle:{"margin-left":"16px","font-size":"14px",color:"#666"}},[e._v(" ID: "+e._s(i.user_id)+" ("+e._s(i.language_code)+") "),0==i.is_online?t("span",[e._v("离线时间:"+e._s(i.offline_time))]):e._e()]),parseInt(e.globalConfig.sysInfo.ipregion)&&i.last_login_ip?t("span",{staticClass:"c-999 f-12 ml-5"},[e.globalConfig.chatInfo.online&&!i.is_online?t("span",[e._v("(离线)")]):e._e(),e._v(e._s(i.last_login_ip)+" "+e._s(i.location)+" ")]):e._e()]):e._e(),1==e.isEdit?t("input",{directives:[{name:"model",rawName:"v-model",value:e.displayName,expression:"displayName"}],staticClass:"editInput",domProps:{value:e.displayName},on:{blur:function(t){return e.saveGroupName(i)},input:function(t){t.target.composing||(e.displayName=t.target.value)}}}):e._e()]):e._e(),t("div",{staticClass:"message-title-tools"},[t("el-button",{directives:[{name:"show",rawName:"v-show",value:0===e.filterIndex,expression:"filterIndex === 0"}],staticStyle:{"margin-right":"10px"},attrs:{type:"primary"},on:{click:e.endMsg}},[e._v("结束")])],1)])]}},{key:"sidebar-message-fixedtop",fn:function(i){return[e.wsStatus?e._e():t("div",{staticClass:"lz-flex no-internet pd-10 mb-10 lz-space-between lz-align-items-center"},[t("div",{staticClass:"el-icon-info"}),t("div",[e._v("当前网络无法实时接收消息")]),t("div",{staticClass:"el-icon-refresh cur-handle",attrs:{title:"重新链接"},on:{click:e.reconnect}})]),t("div",{staticClass:"page-header"},e._l(e.filterTabs,function(i,s){return t("div",{key:s,staticClass:"filter-tab-dot-box",style:{background:e.filterIndex===s?"#0171f1":"",color:e.filterIndex===s?"#f1f1f1":"#000"},on:{click:function(t){return e.changeFilterTab(s)}}},[0===s&&(e.personalPendingCount>0||e.personalServingCount>0)?t("div",{staticClass:"filter-tab-dot"}):e._e(),1===s&&(e.groupPendingCount>0||e.groupServingCount>0)?t("div",{staticClass:"filter-tab-dot"}):e._e(),2===s&&e.queueTotalCount>0?t("div",{staticClass:"filter-tab-dot"}):e._e(),e._v(" "+e._s(i.label)+" ")])}),0),0===e.filterIndex?t("tab1",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"tab1Ref",attrs:{personalPendingCount:e.personalPendingCount,personalServingCount:e.personalServingCount},on:{changeTab:e.changeTab}}):e._e(),1===e.filterIndex?t("tab2",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"tab2Ref",attrs:{groupPendingCount:e.groupPendingCount,groupServingCount:e.groupServingCount},on:{changeTab:e.changeTab}}):e._e(),t("div",{staticClass:"contact-fixedtop-box"},[t("el-input",{attrs:{placeholder:"搜索联系人","prefix-icon":"el-icon-search"},on:{blur:e.closeSearch,focus:function(t){e.searchResult=!0}},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}}),t("div",{directives:[{name:"show",rawName:"v-show",value:e.searchResult,expression:"searchResult"}],staticClass:"search-list"},[e._l(e.searchList,function(s,n){return e.searchList.length>0?t("div",{key:n,staticClass:"search-list-item"},[t("lemon-contact",{attrs:{contact:s},on:{click:function(t){return e.openChat(s.id,i)}}})],1):e._e()}),0==e.searchList.length?t("div",{staticStyle:{margin:"20px"},attrs:{align:"center"}},[e._v(" 暂无 ")]):e._e()],2)],1),t("div",{staticClass:"contact-bottom"},[e.isSign?t("el-button",{staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{size:"medium",type:"primary"},on:{click:e.signUp}},[e._v("签到")]):e._e(),t("div",[t("span",{staticStyle:{"margin-right":"8px"}},[e._v("在线状态")]),t("el-dropdown",{attrs:{trigger:"click"},on:{command:e.changeOnline}},[t("span",{style:{userSelect:"none",cursor:"pointer",color:e.onlineStateColor}},[e._v(" "+e._s(e.onlineStateText)+" "),t("i",{staticClass:"el-icon-caret-bottom"})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:1}},[t("span",{staticStyle:{color:"#6ec149"}},[e._v("在线")])]),t("el-dropdown-item",{attrs:{command:2}},[t("span",{staticStyle:{color:"#e0a348"}},[e._v("忙碌")])]),t("el-dropdown-item",{attrs:{command:0}},[t("span",{staticStyle:{color:"#909399"}},[e._v("离线")])])],1)],1)],1)],1)]}},{key:"sidebar-message-top",fn:function(i){return[e.chatTopList.length>0?t("div",{staticClass:"chat-top-list"},e._l(e.chatTopList,function(s,n){return t("ChatTop",{key:n,attrs:{avatarCricle:e.setting.avatarCricle,contact:s,currentId:e.currentChat.id},nativeOn:{click:function(t){return e.openChat(s.id,i)}}})}),1):e._e()]}},{key:"sidebar-contact-fixedtop",fn:function(i){return[t("div",{staticStyle:{margin:"15px 10px"}},[e._v(" 联系人 ")])]}},{key:"message-side",fn:function(i){return[1==i.is_group?t("div",{staticClass:"slot-group-list lemon-wrapper",class:"blue"==e.setting.theme?"lemon-wrapper--theme-blue":""},[t("div",{staticClass:"group-side-box lemon-container"},[t("div",{staticClass:"group-notice"},[t("div",{staticClass:"group-side-title"},[t("h4",[e._v("群公告")]),t("div",[i.role<3||0==i.setting.manage?t("span",{staticClass:"el-icon-edit f-18 cur-handle",on:{click:function(t){e.noticeBox=!0}}}):e._e()])]),t("hr"),i.notice?t("div",{staticClass:"group-side-body",on:{click:e.openNotice}},[e._v(" "+e._s(i.notice)+" ")]):e._e(),i.notice?e._e():t("div",{staticClass:"group-side-body"},[e._v(" 暂无公告 ")])]),t("div",{staticClass:"group-user"},[t("div",{staticClass:"group-side-title"},[t("h4",[e._v("群成员")]),t("div",[i.role<3||1==i.setting.invite?t("span",{staticClass:"el-icon-circle-plus-outline f-18 cur-handle",on:{click:e.openAddGroupUser}}):e._e()])]),t("hr"),t("div",{staticClass:"group-user-body",style:[{height:"calc("+e.curHeight+" - 230px)",background:"blue"==e.setting.theme?"#ffffff":"#f4f4f4"}],attrs:{id:"group-user"}},[t("el-scrollbar",{staticStyle:{height:"100%"}},e._l(e.groupUser,function(i,s){return t("lemon-contact",{directives:[{name:"lemon-contextmenu",rawName:"v-lemon-contextmenu.contact",value:e.groupMenu,expression:"groupMenu",modifiers:{contact:!0}}],key:s,staticClass:"user-list",attrs:{contact:i}},[t("div",{staticClass:"user-avatar"},[t("el-avatar",{attrs:{size:20,src:i.userInfo.avatar}})],1),t("div",{staticClass:"user-name"},[i.userInfo.id==e.user.id?t("span",{staticClass:"fc-danger"},[e._v(e._s(i.userInfo.displayName)+"(我)")]):e._e(),i.userInfo.id!=e.user.id?t("span",[e._v(e._s(i.userInfo.displayName))]):e._e(),t("el-tooltip",{staticClass:"item",attrs:{content:"已禁言至:"+e.noSpeakExp(i.no_speak_time),effect:"dark",placement:"top"}},[e.noSpeakExp(i.no_speak_time)?t("span",{staticClass:"c-red ml-5 el-icon el-icon-turn-off-microphone"}):e._e()])],1),t("div",{staticClass:"user-role"},[1==i.role?t("el-tag",{attrs:{size:"mini",type:"danger"}},[e._v("群主")]):e._e(),2==i.role?t("el-tag",{attrs:{size:"mini",type:"warning"}},[e._v("管理员")]):e._e()],1)])}),1)],1)])])]):e._e()]}},{key:"message-after",fn:function(i){return[i.fromUser.id==e.user.id&&0==i.is_group?t("span",{staticStyle:{visibility:"visible"}},[i.is_read||"succeed"!=i.status?e._e():t("span",[e._v(" 未读 ")]),i.is_read&&"succeed"==i.status?t("span",{staticClass:"fc-success"},[e._v(" 已读 ")]):e._e()]):e._e()]}},{key:"editor-footer",fn:function(){return[t("div",{staticClass:"lz-flex lz-space-between lz-align-items-center"},[e.currentChat.is_at?t("div",{staticClass:"at-item cur-handle mr-10",on:{click:function(t){return e.openMsgBox()}}},[e._v("有"+e._s(e.currentChat.is_at)+"人提到你 ")]):e._e(),e.quote?t("div",{staticClass:"message-quote cur-handle mr-10 lz-flex lz-space-between lz-align-items-center"},[t("div",{staticClass:"text-overflow"},[e._v(e._s(e.quote.content))]),t("div",{staticClass:"el-icon-close",on:{click:function(t){return e.closeQuote()}}})]):e._e(),t("div"),t("div",[e._v(e._s(1==e.setting.sendKey?"使用 Ctrl + Enter 换行":"使用 Ctrl + Enter 发送消息"))])])]},proxy:!0}])})],1),t("Group",{attrs:{groupId:e.group_id,isAdd:e.isAdd,title:e.dialogTitle,userIds:e.userIds,visible:e.createChatBox},on:{"update:visible":function(t){e.createChatBox=t},manageGroup:e.manageGroup}}),t("el-dialog",{attrs:{modal:!0,visible:e.noticeBox,"append-to-body":"",title:"发布公告",width:"500px"},on:{"update:visible":function(t){e.noticeBox=t}}},[t("el-input",{attrs:{rows:10,placeholder:"请输入内容",type:"textarea"},model:{value:e.notice,callback:function(t){e.notice=t},expression:"notice"}}),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.noticeBox=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.publishNotice}},[e._v("确 定")])],1)],1),t("addFriend",{attrs:{visible:e.addFriendBox},on:{"update:visible":function(t){e.addFriendBox=t}}}),t("ChooseDialog",{attrs:{allUser:e.allUser,visible:e.forwardBox,title:"转发聊天"},on:{"update:visible":function(t){e.forwardBox=t},selectChat:e.forwardUser}}),t("el-dialog",{attrs:{modal:!0,visible:e.messageBox,"append-to-body":"",title:"消息管理器",width:"800px"},on:{"update:visible":function(t){e.messageBox=t}}},[t("ChatRecord",{key:e.componentKey,attrs:{condition:e.ChatRecordMap,contact:e.currentChat}})],1),t("el-dialog",{attrs:{modal:!0,visible:e.groupSetting,"append-to-body":"",title:"群设置",width:"500px"},on:{"update:visible":function(t){e.groupSetting=t}}},[t("ChatSet",{key:e.componentKey,attrs:{contact:e.contactSetting},on:{changeOwner:e.changeOwner}})],1),t("el-dialog",{attrs:{modal:!0,visible:e.VoiceStatus,"append-to-body":"","custom-class":"no-padding","destroy-on-close":"",title:"语音录制",width:"500px"},on:{"update:visible":function(t){e.VoiceStatus=t}}},[t("voice-recorder",{on:{send:e.sendVoice}})],1),t("el-dialog",{attrs:{visible:e.noSpeakBox,"append-to-body":"","destroy-on-close":"",title:"设置禁言",width:"500px"},on:{"update:visible":function(t){e.noSpeakBox=t}}},[t("el-radio-group",{staticClass:"mb-20",attrs:{size:"small"},on:{change:function(t){e.noSpeakData.noSpeakDay=1}},model:{value:e.noSpeakData.noSpeakTimer,callback:function(t){e.$set(e.noSpeakData,"noSpeakTimer",t)},expression:"noSpeakData.noSpeakTimer"}},[t("el-radio",{attrs:{border:"",label:"1"}},[e._v("10分钟")]),t("el-radio",{attrs:{border:"",label:"2"}},[e._v("1小时")]),t("el-radio",{attrs:{border:"",label:"3"}},[e._v("3小时")]),t("el-radio",{attrs:{border:"",label:"4"}},[e._v("1天")])],1),t("div",[e._v(" 自定义 "),t("el-input-number",{staticClass:"ml-10 mr-10",attrs:{max:365,min:1,label:"自定义"},on:{change:function(t){e.noSpeakData.noSpeakTimer=0}},model:{value:e.noSpeakData.noSpeakDay,callback:function(t){e.$set(e.noSpeakData,"noSpeakDay",t)},expression:"noSpeakData.noSpeakDay"}}),e._v(" 天 ")],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.noSpeakBox=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.setNoSpeak()}}},[e._v("确 定")])],1)],1),t("group-qr",{attrs:{contact:e.currentChat,visible:e.groupQrShow},on:{"update:visible":function(t){e.groupQrShow=t}}}),t("Socket",{ref:"socket"}),t("el-dialog",{attrs:{visible:e.selectAdminShow,top:"5vh",title:"请选择"},on:{"update:visible":function(t){e.selectAdminShow=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:function(t){e.selectAdminShow=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.confirmSelectAdmin}},[e._v("确定")])]},proxy:!0}])},[t("div",{staticStyle:{height:"500px","overflow-y":"auto"}},[t("el-radio-group",{staticClass:"custom-msg-admin-radio-group",attrs:{size:"small"},model:{value:e.selectedAdminId,callback:function(t){e.selectedAdminId=t},expression:"selectedAdminId"}},e._l(e.adminList,function(i){return t("el-radio",{directives:[{name:"show",rawName:"v-show",value:i.user_id!==e.currentContact.cs_uid,expression:"admin.user_id !== currentContact.cs_uid"}],key:i.user_id,staticClass:"admin-radio-item",attrs:{label:i.user_id,border:""}},[t("div",{staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[t("span",{staticClass:"nickname"},[e._v("昵称:"+e._s(i.nickname))]),t("el-tag",{staticClass:"online-tag",attrs:{type:0==i.is_online?"danger":"primary"}},[e._v(" "+e._s(0==i.is_online?"离线":"在线")+" ")])],1)])}),1)],1)]),t("el-dialog",{attrs:{width:"600",title:"常用语",top:"5vh",visible:e.expressionVisible},on:{"update:visible":function(t){e.expressionVisible=t}}},[t("div",[t("div",{staticStyle:{width:"100%"}},[t("el-tabs",{on:{"tab-click":e.language_codeChange},model:{value:e.expressionApiParams.language_code,callback:function(t){e.$set(e.expressionApiParams,"language_code",t)},expression:"expressionApiParams.language_code"}},[t("el-tab-pane",{attrs:{label:"中文简体",name:"zh"}}),t("el-tab-pane",{attrs:{label:"英语",name:"en"}}),t("el-tab-pane",{attrs:{label:"越南语",name:"vi"}}),t("el-tab-pane",{attrs:{label:"土耳其语",name:"tr"}}),t("el-tab-pane",{attrs:{label:"泰语",name:"th"}}),t("el-tab-pane",{attrs:{label:"韩语",name:"ko"}}),t("el-tab-pane",{attrs:{label:"意大利语",name:"it"}}),t("el-tab-pane",{attrs:{label:"印尼语",name:"id"}}),t("el-tab-pane",{attrs:{label:"法语",name:"fr"}}),t("el-tab-pane",{attrs:{label:"西班牙语",name:"es"}}),t("el-tab-pane",{attrs:{label:"阿拉伯语",name:"ar"}}),t("el-tab-pane",{attrs:{label:"德语",name:"de"}}),t("el-tab-pane",{attrs:{label:"繁体中文",name:"zh-hk"}}),t("el-tab-pane",{attrs:{label:"日语",name:"ja-jp"}})],1)],1),t("div",{staticClass:"expression-search-box"},[t("el-input",{staticStyle:{flex:"1"},attrs:{placeholder:"请输入常用语",clearable:""},model:{value:e.expressionApiParams.name,callback:function(t){e.$set(e.expressionApiParams,"name",t)},expression:"expressionApiParams.name"}}),t("el-select",{staticStyle:{flex:"1"},attrs:{placeholder:"请选择常用语分类",clearable:""},on:{change:e.changeSearchExpressionList},model:{value:e.expressionApiParams.category_id,callback:function(t){e.$set(e.expressionApiParams,"category_id",t)},expression:"expressionApiParams.category_id"}},e._l(e.expressionCategoryList,function(e,i){return t("el-option",{key:i,attrs:{label:e.name,value:e.category_id}})}),1),t("el-button",{attrs:{type:"primary"},on:{click:e.changeSearchExpressionList}},[e._v("搜索")]),t("el-button",{staticStyle:{"margin-left":"0"},on:{click:e.resetExpression}},[e._v("重置")])],1)]),t("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.expressionLoad,expression:"expressionLoad"},{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"expression-box"},[e._l(e.expressionList,function(i,s){return t("div",{key:s,staticClass:"expression-box-item",on:{click:function(t){return e.selectExpressionItem(i)}}},[e._v(" "+e._s(i.name)+" "),i.img?t("el-tag",{attrs:{size:"mini",type:"primary"}},[e._v("有图")]):e._e()],1)}),e.expressionList.length?e._e():t("el-empty",{staticStyle:{"margin-top":"20%"},attrs:{description:"暂无数据"}})],2)])],1)},ie=[];i(9434),i(1637),i(3196),i(1752),i(3335),i(9713),i(1388),i(3261),i(9664),i(4318),i(5057),i(9936),i(2186),i(4326),i(880),i(1643),i(5811),i(54),i(4569);const se=window.global_config.baseUrl||"https://kefuapi.sp2509.cc";var ne=[{label:"表情",type:1,name:"emoji",icon:"cuIcon-emoji",children:[{name:"1f600",title:"emoji",src:se+"/static/img/emoji/twitter/1f600.png"},{name:"1f62c",title:"emoji",src:se+"/static/img/emoji/twitter/1f62c.png"},{name:"1f601",title:"emoji",src:se+"/static/img/emoji/twitter/1f601.png"},{name:"1f602",title:"emoji",src:se+"/static/img/emoji/twitter/1f602.png"},{name:"1f923",title:"emoji",src:se+"/static/img/emoji/twitter/1f923.png"},{name:"1f973",title:"emoji",src:se+"/static/img/emoji/twitter/1f973.png"},{name:"1f974",title:"emoji",src:se+"/static/img/emoji/twitter/1f974.png"},{name:"1f979",title:"emoji",src:se+"/static/img/emoji/twitter/1f979.png"},{name:"1f603",title:"emoji",src:se+"/static/img/emoji/twitter/1f603.png"},{name:"1f604",title:"emoji",src:se+"/static/img/emoji/twitter/1f604.png"},{name:"1f605",title:"emoji",src:se+"/static/img/emoji/twitter/1f605.png"},{name:"1f606",title:"emoji",src:se+"/static/img/emoji/twitter/1f606.png"},{name:"1f607",title:"emoji",src:se+"/static/img/emoji/twitter/1f607.png"},{name:"1f608",title:"emoji",src:se+"/static/img/emoji/twitter/1f608.png"},{name:"1f609",title:"emoji",src:se+"/static/img/emoji/twitter/1f609.png"},{name:"1f60a",title:"emoji",src:se+"/static/img/emoji/twitter/1f60a.png"},{name:"1f642",title:"emoji",src:se+"/static/img/emoji/twitter/1f642.png"},{name:"1f643",title:"emoji",src:se+"/static/img/emoji/twitter/1f643.png"},{name:"1263a",title:"emoji",src:se+"/static/img/emoji/twitter/263a.png"},{name:"1f60b",title:"emoji",src:se+"/static/img/emoji/twitter/1f60b.png"},{name:"1f60c",title:"emoji",src:se+"/static/img/emoji/twitter/1f60c.png"},{name:"1f60d",title:"emoji",src:se+"/static/img/emoji/twitter/1f60d.png"},{name:"1f970",title:"emoji",src:se+"/static/img/emoji/twitter/1f970.png"},{name:"1f618",title:"emoji",src:se+"/static/img/emoji/twitter/1f618.png"},{name:"1f617",title:"emoji",src:se+"/static/img/emoji/twitter/1f617.png"},{name:"1f619",title:"emoji",src:se+"/static/img/emoji/twitter/1f619.png"},{name:"1f61a",title:"emoji",src:se+"/static/img/emoji/twitter/1f61a.png"},{name:"1f61c",title:"emoji",src:se+"/static/img/emoji/twitter/1f61c.png"},{name:"1f92a",title:"emoji",src:se+"/static/img/emoji/twitter/1f92a.png"},{name:"1f928",title:"emoji",src:se+"/static/img/emoji/twitter/1f928.png"},{name:"1f9d0",title:"emoji",src:se+"/static/img/emoji/twitter/1f9d0.png"},{name:"1f61d",title:"emoji",src:se+"/static/img/emoji/twitter/1f61d.png"},{name:"1f61b",title:"emoji",src:se+"/static/img/emoji/twitter/1f61b.png"},{name:"1f911",title:"emoji",src:se+"/static/img/emoji/twitter/1f911.png"},{name:"1f913",title:"emoji",src:se+"/static/img/emoji/twitter/1f913.png"},{name:"1f60e",title:"emoji",src:se+"/static/img/emoji/twitter/1f60e.png"},{name:"1f929",title:"emoji",src:se+"/static/img/emoji/twitter/1f929.png"},{name:"1f921",title:"emoji",src:se+"/static/img/emoji/twitter/1f921.png"},{name:"1f920",title:"emoji",src:se+"/static/img/emoji/twitter/1f920.png"},{name:"1f917",title:"emoji",src:se+"/static/img/emoji/twitter/1f917.png"},{name:"1f60f",title:"emoji",src:se+"/static/img/emoji/twitter/1f60f.png"},{name:"1f636",title:"emoji",src:se+"/static/img/emoji/twitter/1f636.png"},{name:"1f610",title:"emoji",src:se+"/static/img/emoji/twitter/1f610.png"},{name:"1f611",title:"emoji",src:se+"/static/img/emoji/twitter/1f611.png"},{name:"1f612",title:"emoji",src:se+"/static/img/emoji/twitter/1f612.png"},{name:"1f644",title:"emoji",src:se+"/static/img/emoji/twitter/1f644.png"},{name:"1f914",title:"emoji",src:se+"/static/img/emoji/twitter/1f914.png"},{name:"1f925",title:"emoji",src:se+"/static/img/emoji/twitter/1f925.png"},{name:"1f927",title:"emoji",src:se+"/static/img/emoji/twitter/1f927.png"},{name:"1f928",title:"emoji",src:se+"/static/img/emoji/twitter/1f928.png"},{name:"1f929",title:"emoji",src:se+"/static/img/emoji/twitter/1f929.png"},{name:"1f92d",title:"emoji",src:se+"/static/img/emoji/twitter/1f92d.png"},{name:"1f92b",title:"emoji",src:se+"/static/img/emoji/twitter/1f92b.png"},{name:"1f92c",title:"emoji",src:se+"/static/img/emoji/twitter/1f92c.png"},{name:"1f92f",title:"emoji",src:se+"/static/img/emoji/twitter/1f92f.png"},{name:"1f633",title:"emoji",src:se+"/static/img/emoji/twitter/1f633.png"},{name:"1f61e",title:"emoji",src:se+"/static/img/emoji/twitter/1f61e.png"},{name:"1f61f",title:"emoji",src:se+"/static/img/emoji/twitter/1f61f.png"},{name:"1f620",title:"emoji",src:se+"/static/img/emoji/twitter/1f620.png"},{name:"1f621",title:"emoji",src:se+"/static/img/emoji/twitter/1f621.png"},{name:"1fae0",title:"emoji",src:se+"/static/img/emoji/twitter/1fae0.png"},{name:"1fae1",title:"emoji",src:se+"/static/img/emoji/twitter/1fae1.png"},{name:"1fae2",title:"emoji",src:se+"/static/img/emoji/twitter/1fae2.png"},{name:"1fae3",title:"emoji",src:se+"/static/img/emoji/twitter/1fae3.png"},{name:"1fae4",title:"emoji",src:se+"/static/img/emoji/twitter/1fae4.png"},{name:"1fae5",title:"emoji",src:se+"/static/img/emoji/twitter/1fae5.png"},{name:"1faf0",title:"emoji",src:se+"/static/img/emoji/twitter/1faf0.png"},{name:"2639",title:"emoji",src:se+"/static/img/emoji/twitter/2639.png"},{name:"263a",title:"emoji",src:se+"/static/img/emoji/twitter/263a.png"}]},{label:"收藏",type:2,icon:"cuIcon-like",children:[]}],ae=i(3937),oe=function(){var e=this;e._self._c;return e._m(0)},re=[function(){var e=this,t=e._self._c;return t("div",[t("audio",{attrs:{id:"chatAudio"}},[t("source",{attrs:{src:i(3598),type:"audio/ogg"}}),t("source",{attrs:{src:i(4565),type:"audio/mpeg"}}),t("source",{attrs:{src:i(8137),type:"audio/wav"}})])])}],ce={name:"socket",props:{isQrLogin:{type:Boolean,default:!1}},data(){return{is_open_socket:!1,websocket:null,pingInterval:30,connectNum:1,manMade:!1,timeout:3e4,heartbeatInterval:null,reconnectTimeOut:null}},methods:{getWsUrl(){let e=window.global_config.ws||"kefuapi.sp2509.cc",t=window.location.protocol,i="wss://";"https:"==t&&(i="wss://");const s=i+e+"/wss";return s},initWebSocket(){const e=this.getWsUrl();this.websocket=new WebSocket(e),this.start(),this.is_open_socket=!0,this.websocket.onmessage=this.websocketOnMessage,this.websocket.onclose=this.websocketClose,s["default"].prototype.$websocket=this.websocket,this.$store.state.wsStatus=!0},websocketOnMessage(e){const t=JSON.parse(e.data);let i=r().get("UserInfo"),s=r().get("authToken");switch(t["type"]){case"ping":this.websocketSend({type:"pong",isQrLogin:this.isQrLogin});break;case"codeLoginQr":this.$store.state.qrLoginUrl=t["qrurl"];break;case"tokenLogin":let e=t["data"];this.$store.commit("SET_AUTH",e),this.$store.commit("SET_USERINFO",e.userInfo),setTimeout(()=>{window.location.reload()},500);break;case"init":if(r().set("client_id",t["client_id"]),this.isQrLogin)return;this.$api.commonApi.bindClientIdAPI({client_id:t["client_id"],user_id:i.user_id}).then(e=>{this.websocketSend({type:"bindUid",user_id:i.user_id,token:s})}).catch(e=>{console.log("连接失败")});break;default:this.$store.commit("catchSocketAction",t);break}},websocketClose(e){if(this.is_open_socket=!1,this.manMade)return;if(clearInterval(this.heartbeatInterval),this.connectNum<10)return this.manMade=!1,this.reconnect(),void(this.connectNum+=1);this.$store.state.wsStatus=!1,this.connectNum=1,this.websocket=null;let t=r().get("UserInfo");this.$api.commonApi.offlineAPI({user_id:t.user_id}).then(t=>{console.log("connection closed ("+e.code+")")})},start(){this.heartbeatInterval=setInterval(()=>{this.websocketSend({type:"ping"})},this.timeout)},websocketSend(e){var t=JSON.stringify(e);this.checkStatus&&this.websocket.send(t)},checkStatus(){return!(!this.websocket||[2,3].includes(this.websocket.readyState))||(console.log("未链接!"),!1)},close(){this.is_open_socket&&(clearInterval(this.heartbeatInterval),this.websocket.close())},reconnect(){console.log("正在重连..."),clearInterval(this.heartbeatInterval),this.is_open_socket||0!=this.manMade||(console.log(5*this.connectNum+"秒后重新连接..."),this.reconnectTimeOut=setTimeout(()=>{this.initWebSocket()},5e3*this.connectNum))},playAudio(){const e=document.getElementById("chatAudio");e.currentTime=0,e.play()}},created(){this.initWebSocket()},beforeDestroy(){this.close(),this.manMade=!0,clearInterval(this.heartbeatInterval),clearTimeout(this.reconnectTimeOut)}},le=ce,de=(0,d.A)(le,oe,re,!1,null,null,null),ue=de.exports,he=i(2391),pe=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"group-item"},[t("div",{staticClass:"group-avatar"},[t("el-avatar",{attrs:{shape:"square",src:e.contact.avatar}})],1),t("div",{staticClass:"group-content"},[t("div",{staticClass:"group-title"},[e._v(e._s(e.contact.displayName)+" "),t("span",[e._v("("+e._s(e.groupInfo.groupUserCount)+")")])]),t("div",{staticClass:"group-user"},[e._v("群主:"+e._s(e.groupInfo.ownerName))])])]),t("div",{staticClass:"setting-item"},[t("div",{staticClass:"setting-title"},[e._v("群管理:")]),t("div",{staticClass:"setting-option"},[t("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:e.groupSetting},model:{value:e.setting.manage,callback:function(t){e.$set(e.setting,"manage",t)},expression:"setting.manage"}})],1),e._m(0)]),t("div",{staticClass:"setting-item"},[t("div",{staticClass:"setting-title"},[e._v("群成员邀请:")]),t("div",{staticClass:"setting-option"},[t("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:e.groupSetting},model:{value:e.setting.invite,callback:function(t){e.$set(e.setting,"invite",t)},expression:"setting.invite"}})],1),e._m(1)]),t("div",{staticClass:"setting-item"},[t("div",{staticClass:"setting-title"},[e._v("群成员隐私:")]),t("div",{staticClass:"setting-option"},[t("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:e.groupSetting},model:{value:e.setting.profile,callback:function(t){e.$set(e.setting,"profile",t)},expression:"setting.profile"}})],1),e._m(2)]),t("div",{staticClass:"setting-item"},[t("div",{staticClass:"setting-title"},[e._v("群历史消息:")]),t("div",{staticClass:"setting-option"},[t("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:e.groupSetting},model:{value:e.setting.history,callback:function(t){e.$set(e.setting,"history",t)},expression:"setting.history"}})],1),e._m(3)]),t("div",{staticClass:"setting-item"},[t("div",{staticClass:"setting-title"},[e._v("群禁言:")]),t("div",{staticClass:"setting-option"},[t("el-radio-group",{attrs:{size:"mini"},on:{change:e.groupSetting},model:{value:e.setting.nospeak,callback:function(t){e.$set(e.setting,"nospeak",t)},expression:"setting.nospeak"}},[t("el-radio-button",{attrs:{label:"0"}},[e._v("关闭")]),t("el-radio-button",{attrs:{label:"1"}},[e._v("仅管理员可发言")]),t("el-radio-button",{attrs:{label:"2"}},[e._v("仅群主可发言")])],1)],1)]),t("div",{staticClass:"setting-item"},[t("div",{staticClass:"setting-title"},[e._v("其他操作:")]),t("div",{staticClass:"setting-option"},[t("el-button",{attrs:{size:"mini"},on:{click:e.changeOwner}},[e._v("转让群主")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:e.clearMessage}},[e._v("清空聊天记录")])],1)])])},me=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"setting-description"},[t("div",{staticClass:"des-title"},[e._v("仅群主和群管理员可以管理")]),t("div",{staticClass:"des-comment"},[e._v("启用后,其他成员不能修改群名称,编辑公告等")])])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"setting-description"},[t("div",{staticClass:"des-title"},[e._v("允许群成员邀请")]),t("div",{staticClass:"des-comment"},[e._v("启用后,其他成员可以邀请其他人加入群聊")])])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"setting-description"},[t("div",{staticClass:"des-title"},[e._v("允许添加群成员为好友")]),t("div",{staticClass:"des-comment"},[e._v("启用后,成员可以互相查看资料并添加为好友或发消息")])])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"setting-description"},[t("div",{staticClass:"des-title"},[e._v("允许成员查看历史消息")]),t("div",{staticClass:"des-comment"},[e._v("启用后,新入群的成员可以查看所有的历史记录")])])}],ge={name:"chatSet",props:{contact:{type:Object,default:{}}},data(){return{setting:{},groupInfo:{}}},methods:{groupSetting(){this.$api.imApi.groupSettingAPI({id:this.contact.id,setting:this.setting})},changeOwner(){this.$emit("changeOwner",this.contact.id)},clearMessage(){this.$confirm("确定情况该群组的所有聊天记录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.clearMessageAPI({id:this.contact.id})}).catch(()=>{this.$message({type:"info",message:"已取消"})})}},created(){this.$api.imApi.getGroupInfoAPI({group_id:this.contact.id}).then(e=>{var t=e.data;this.groupInfo=t,this.setting=t.setting})}},fe=ge,ve=(0,d.A)(fe,pe,me,!1,null,"6abb37da",null),ye=ve.exports,be=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chatTop"},[t("el-tooltip",{attrs:{content:e.contact.displayName,placement:"top-start",effect:"light"}},[t("div",{staticClass:"top-item",class:e.currentId==e.contact.id?"active":""},[t("div",{staticClass:"avatar"},[t("el-avatar",{attrs:{shape:e.avatarCricle?"circle":"square",size:"small",src:e.contact.avatar}})],1),t("div",{staticClass:"username"},[e._v(" "+e._s(e.contact.displayName)+" ")])])])],1)},Ce=[],xe={name:"chatTop",props:{contact:{type:Object,default:{}},currentId:[String,Number],avatarCricle:{type:Boolean,default:!1}},data(){return{}},methods:{},created(){}},we=xe,ke=(0,d.A)(we,be,Ce,!1,null,"069c0360",null),Ee=ke.exports,_e=function(){var e=this,t=e._self._c;return t("div",{staticClass:"lum-dialog-mask animated fadeIn"},[t("el-container",{staticClass:"lum-dialog-box"},[t("el-main",{staticClass:"no-padding mian"},[t("div",{staticClass:"music"},[t("span",{staticClass:"line line1",class:{"line-ani":e.animation}}),t("span",{staticClass:"line line2",class:{"line-ani":e.animation}}),t("span",{staticClass:"line line3",class:{"line-ani":e.animation}}),t("span",{staticClass:"line line4",class:{"line-ani":e.animation}}),t("span",{staticClass:"line line5",class:{"line-ani":e.animation}})]),t("div",{staticStyle:{"margin-top":"35px",color:"#676262","font-weight":"300"}},[0==e.recorderStatus?[t("p",{staticStyle:{"font-size":"13px","margin-top":"5px"}},[t("span",[e._v("语音消息,让聊天更简单方便 ...")])])]:1==e.recorderStatus||2==e.recorderStatus||3==e.recorderStatus?[t("p",[e._v(e._s(e.datetime))]),t("p",{staticStyle:{"font-size":"13px","margin-top":"5px"}},[1==e.recorderStatus?t("span",[e._v("正在录音...")]):2==e.recorderStatus?t("span",[e._v("已暂停录音")]):3==e.recorderStatus?t("span",[e._v("录音时长")]):e._e()])]:4==e.recorderStatus||5==e.recorderStatus||6==e.recorderStatus?[t("p",[e._v(e._s(e.formatPlayTime))]),t("p",{staticStyle:{"font-size":"13px","margin-top":"5px"}},[4==e.recorderStatus?t("span",[e._v("正在播放")]):5==e.recorderStatus?t("span",[e._v("已暂停播放")]):6==e.recorderStatus?t("span",[e._v("播放已结束")]):e._e()])]:e._e()],2)]),t("el-footer",{staticClass:"footer",attrs:{height:"60px"}},[t("el-button",{directives:[{name:"show",rawName:"v-show",value:0==e.recorderStatus,expression:"recorderStatus == 0"}],attrs:{type:"primary",size:"small",round:"",icon:"el-icon-microphone"},on:{click:e.startRecorder}},[e._v("开始录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:1==e.recorderStatus,expression:"recorderStatus == 1"}],attrs:{type:"warning",size:"small",round:"",icon:"el-icon-video-pause"},on:{click:e.pauseRecorder}},[e._v("暂停录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:2==e.recorderStatus,expression:"recorderStatus == 2"}],attrs:{type:"primary",size:"small",round:"",icon:"el-icon-microphone"},on:{click:e.resumeRecorder}},[e._v("继续录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:(2==e.recorderStatus||1==e.recorderStatus)&&e.duration>1,expression:"(recorderStatus == 2 || recorderStatus == 1) && duration>1"}],attrs:{type:"danger",size:"small",round:"",icon:"el-icon-microphone"},on:{click:e.stopRecorder}},[e._v("结束录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:3==e.recorderStatus||6==e.recorderStatus,expression:"recorderStatus == 3 || recorderStatus == 6"}],attrs:{type:"success",size:"small",round:"",icon:"el-icon-video-play"},on:{click:e.playRecorder}},[e._v("播放录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:3==e.recorderStatus||5==e.recorderStatus||6==e.recorderStatus,expression:"\n recorderStatus == 3 || recorderStatus == 5 || recorderStatus == 6\n "}],attrs:{type:"warning",size:"small",round:"",icon:"el-icon-refresh-right"},on:{click:e.startRecorder}},[e._v("重新录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:4==e.recorderStatus,expression:"recorderStatus == 4"}],attrs:{type:"info",size:"small",round:"",icon:"el-icon-video-pause"},on:{click:e.pausePlayRecorder}},[e._v("暂停播放 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:5==e.recorderStatus,expression:"recorderStatus == 5"}],attrs:{type:"success",size:"small",round:"",icon:"el-icon-video-play"},on:{click:e.resumePlayRecorder}},[e._v("继续播放 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:3==e.recorderStatus||5==e.recorderStatus||6==e.recorderStatus,expression:"\n recorderStatus == 3 || recorderStatus == 5 || recorderStatus == 6\n "}],attrs:{type:"primary",size:"small",round:""},on:{click:e.submit}},[e._v("立即发送 ")])],1)],1)],1)},Ie=[],Ae=i(6510),Se=i.n(Ae),Te={name:"voiceRecorder",data(){return{recorder:null,duration:0,playTime:0,animation:!1,recorderStatus:0,playTimeout:null}},computed:{datetime(){let e=parseInt(this.duration/60/60%24),t=parseInt(this.duration/60%60),i=parseInt(this.duration%60);return e<10&&(e=`0${e}`),t<10&&(t=`0${t}`),i<10&&(i=`0${i}`),`${e}:${t}:${i}`},formatPlayTime(){let e=parseInt(this.playTime/60/60%24),t=parseInt(this.playTime/60%60),i=parseInt(this.playTime%60);return e<10&&(e=`0${e}`),t<10&&(t=`0${t}`),i<10&&(i=`0${i}`),`${e}:${t}:${i}`}},destroyed(){this.recorder&&this.destroyRecorder()},methods:{closeBox(){null!=this.recorder?(1==this.recorderStatus?this.stopRecorder():4==this.recorderStatus&&this.pausePlayRecorder(),this.destroyRecorder(()=>{this.$emit("close",!1)})):this.$emit("close",!1)},startRecorder(){let e=this;this.recorder=new(Se()),this.recorder.onprocess=t=>{t=parseInt(t),e.duration=t},this.recorder.start().then(()=>{this.recorderStatus=1,this.animation=!0},e=>{console.log(`${e.name} : ${e.message}`)})},pauseRecorder(){this.recorder.pause(),this.recorderStatus=2,this.animation=!1},resumeRecorder(){this.recorderStatus=1,this.recorder.resume(),this.animation=!0},stopRecorder(){this.recorderStatus=3,this.recorder.stop(),this.animation=!1},playRecorder(){this.recorderStatus=4,this.recorder.play(),this.playTimeouts(),this.animation=!0},pausePlayRecorder(){this.recorderStatus=5,this.recorder.pausePlay(),clearInterval(this.playTimeout),this.animation=!1},resumePlayRecorder(){this.recorderStatus=4,this.recorder.resumePlay(),this.playTimeouts(),this.animation=!0},destroyRecorder(e){this.recorder.destroy().then(()=>{this.recorder=null,e&&e()})},recorderSize(){return this.recorder.fileSize},playTimeouts(){this.playTimeout=setInterval(()=>{let e=parseInt(this.recorder.getPlayTime());this.playTime=e,e==this.duration&&(clearInterval(this.playTimeout),this.animation=!1,this.recorderStatus=6)},100)},submit(){let e=this.recorder.getWAVBlob(),t=new File([e],"在线录音.wav",{type:e.type,lastModified:Date.now()});this.$emit("send",this.duration,t)}}},Me=Te,De=(0,d.A)(Me,_e,Ie,!1,null,"dcd1bb58",null),Le=De.exports,Ne=i(2024),Ue=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"群二维码分享",visible:e.visible,modal:!0,width:"340px","append-to-body":""},on:{close:e.closeDialog}},[t("el-image",{staticStyle:{width:"300px",height:"432px"},attrs:{src:e.image}},[t("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[t("i",{staticClass:"el-icon-picture-outline f-20"}),t("p",{staticClass:"ml-10 f-18"},[e._v("二维码生成中...")])])]),t("div",{staticClass:"mt-20",attrs:{align:"center"}},[t("el-button",{on:{click:e.saveBase64Image}},[e._v("保存到电脑")])],1),t("vue-canvas-poster",{staticStyle:{display:"none"},attrs:{widthPixels:1e3,painting:e.painting},on:{success:e.success,fail:e.fail}})],1)},Pe=[],Oe=i(6084),$e={components:{VueCanvasPoster:Oe.VueCanvasPoster},props:{contact:{type:Object,default:()=>({})},visible:{type:Boolean,default:!1}},data(){return{painting:{width:"500px",height:"720px",background:"#ffffff",views:[]},image:""}},watch:{visible(e){e&&this.getGroupUserInfo()}},methods:{success(e){this.image=e},fail(e){},closeDialog(){this.$emit("update:visible",!1),this.image=""},saveBase64Image(){var e=document.createElement("a");e.href=this.image,e.download=this.contact.displayName+".png",e.click()},getGroupUserInfo(){this.$api.imApi.getGroupInfoAPI({group_id:this.contact.id}).then(e=>{var t=e.data;this.painting.views=[{type:"image",url:t.avatar,css:{top:"40px",left:"200px",borderRadius:"8px",width:"100px",height:"100px"}},{type:"text",text:"群聊:"+t.name,css:{top:"160px",left:"50px",width:"400px",maxLines:1,fontSize:"30px",textAlign:"center",color:"#000000",fontWeight:"bloder"}},{type:"qrcode",content:t.qrUrl,css:{top:"240px",left:"70px",color:"#000",width:"360px",height:"360px"}},{type:"text",text:"该二维码7天内("+t.qrExpire+"前)有效",css:{top:"640px",left:"50px",width:"400px",maxLines:1,fontSize:"20px",textAlign:"center",color:"#999"}}]})}}},Re=$e,je=(0,d.A)(Re,Ue,Pe,!1,null,null,null),Be=je.exports,Fe=i(8282),Ve=function(){var e=this,t=e._self._c;return t("el-container",[t("el-header",{staticClass:"slider-aside"},[t("el-tabs",{staticClass:"tab-diy",attrs:{"tab-position":"bottom"},on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:"所有文件",name:"all"}}),t("el-tab-pane",{attrs:{label:"我发送的",name:"send"}}),t("el-tab-pane",{attrs:{label:"我收到的",name:"receive"}})],1)],1),t("el-main",{staticClass:"no-padding"},[t("fileItems",{ref:"fileItem"})],1)],1)},ze=[],He=i(9849),Ge={name:"files",components:{fileItems:He.A},props:{title:{type:String,default:"创建群聊"}},data(){return{selectUid:[],allUser:[],activeName:"all"}},methods:{handleClick(e){"all"==e.name?this.$refs.fileItem.changeRole(0):"send"==e.name?this.$refs.fileItem.changeRole(1):"receive"==e.name&&this.$refs.fileItem.changeRole(2)}}},Ke=Ge,qe=(0,d.A)(Ke,Ve,ze,!1,null,"37188710",null),Qe=qe.exports,Ye=function(){var e=this,t=e._self._c;return t("el-tabs",{staticStyle:{height:"100%"},attrs:{"tab-position":"left"}},[t("el-tab-pane",{staticClass:"pd-20",attrs:{label:"账号设置"}},[t("div",{staticClass:"user-center"},[t("div",{staticClass:"user-avatar"},[t("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{multiple:!1,action:e.getUrl,"show-file-list":!1,data:{type:1},headers:e.getToken,"on-success":e.handleAvatarSuccess,"auto-upload":!1,"on-change":e.change,"before-upload":e.before,"http-request":e.request}},[t("el-image",{staticClass:"m-20",staticStyle:{width:"160px","border-radius":"8px",overflow:"hidden"},attrs:{src:e.user.avatar}}),t("el-button",{staticClass:"replace-picture-button mab-30",attrs:{size:"mini"}},[e._v("更换头像")])],1),t("el-dialog",{attrs:{title:"头像剪裁","close-on-click-modal":!1,visible:e.cropperDialogVisible,width:"580px","append-to-body":!0,"show-close":!0},on:{"update:visible":function(t){e.cropperDialogVisible=t},closed:function(t){return e.$refs.upload.clearFiles()}},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:function(t){e.cropperDialogVisible=!1,e.$refs.upload.clearFiles()}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.cropperSave}},[e._v("确 定")])]},proxy:!0}])},[t("Cropper",{key:e.componentsKey,ref:"cropper",attrs:{src:e.cropperImg,compress:e.compress,aspectRatio:e.aspectRatio}})],1),t("div",{staticClass:"mt-20"},[t("el-button",{attrs:{type:"warning"},on:{click:function(t){return e.editInfo(1)}}},[e._v("修改密码")])],1)],1),t("div",{staticClass:"user-info"},[t("el-form",{ref:"userinfo",attrs:{model:e.user,"label-width":"100px"}},[t("el-form-item",{attrs:{label:"登陆账号",prop:"account"}},[e._v(" "+e._s(e.user.account)+" "),t("span",{staticClass:"fc-primary ml-10 cur-handle",on:{click:function(t){return e.editInfo(0)}}},[e._v("修改")])]),1==e.$store.state.globalConfig.sysInfo.runMode&&1!=e.$store.state.globalConfig.sysInfo.diyName?t("el-form-item",{attrs:{label:"姓名"}},[e._v(" "+e._s(e.user.realname)+" ")]):t("el-form-item",{attrs:{label:"昵称"}},[t("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入昵称",maxlength:"20"},model:{value:e.user.realname,callback:function(t){e.$set(e.user,"realname",t)},expression:"user.realname"}})],1),t("el-form-item",{attrs:{label:"e-mail"}},[t("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入邮箱地址",maxlength:"120"},model:{value:e.user.email,callback:function(t){e.$set(e.user,"email",t)},expression:"user.email"}})],1),t("el-form-item",{attrs:{label:"性别"}},[t("el-radio-group",{model:{value:e.user.sex,callback:function(t){e.$set(e.user,"sex",t)},expression:"user.sex"}},[t("el-radio",{attrs:{label:2,border:""}},[e._v("未知")]),t("el-radio",{attrs:{label:1,border:""}},[e._v("男")]),t("el-radio",{attrs:{label:0,border:""}},[e._v("女")])],1)],1),t("el-form-item",{attrs:{label:"个性签名"}},[t("el-input",{staticStyle:{width:"400px"},attrs:{type:"textarea",rows:3,maxlength:"100","show-word-limit":""},model:{value:e.user.motto,callback:function(t){e.$set(e.user,"motto",t)},expression:"user.motto"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm()}}},[e._v("保存")])],1)],1)],1)]),t("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialog,modal:!0,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.dialog=t}}},[t("el-form",{attrs:{"label-width":"100px"}},[t("el-form-item",{attrs:{label:"当前账号"}},[e._v(" "+e._s(e.user.account)+" ")]),t("el-alert",{staticClass:"mb-20",attrs:{title:"验证账户的真实性,绑定后请使用新账户来重新登录!",type:"warning"}}),e.user.is_auth?t("el-form-item",{attrs:{label:"验证码"}},[t("el-input",{staticStyle:{width:"260px"},attrs:{placeholder:"请输入验证码",maxlength:"6"},model:{value:e.code,callback:function(t){e.code=t},expression:"code"}},[t("el-button",{attrs:{slot:"append",loading:e.loading},on:{click:function(t){return e.sendCode(!0)}},slot:"append"},[e._v("发送验证码")])],1)],1):e._e(),!e.editPass||e.globalConfig.sysInfo.regauth&&e.user.is_auth?e._e():t("el-form-item",{attrs:{label:"原密码"}},[t("el-input",{attrs:{"show-password":"",placeholder:"请输入原来的密码"},model:{value:e.originalPassword,callback:function(t){e.originalPassword=t},expression:"originalPassword"}})],1),e.editPass?e._e():t("el-form-item",{attrs:{label:"新账号"}},[t("el-input",{attrs:{placeholder:"请输入新的账号"},model:{value:e.account,callback:function(t){e.account=t},expression:"account"}})],1),e.editPass?e._e():t("el-form-item",{attrs:{label:"新账号验证码"}},[t("el-input",{staticStyle:{width:"260px"},attrs:{placeholder:"请输入新账号验证码",maxlength:"6"},model:{value:e.newCode,callback:function(t){e.newCode=t},expression:"newCode"}},[t("el-button",{attrs:{slot:"append",loading:e.loading},on:{click:function(t){return e.sendCode(!1)}},slot:"append"},[e._v("发送验证码")])],1)],1),e.editPass?t("el-form-item",{attrs:{label:"新密码"}},[t("el-input",{attrs:{"show-password":"",placeholder:"请输入密码"},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1):e._e(),e.editPass?t("el-form-item",{attrs:{label:"重复密码"}},[t("el-input",{attrs:{"show-password":"",placeholder:"请输入重复输入密码"},model:{value:e.repass,callback:function(t){e.repass=t},expression:"repass"}})],1):e._e(),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.editPassword()}}},[e._v("保存")])],1)],1)],1),t("div",{staticClass:"mt-40",attrs:{align:"center"}},[t("el-button",{staticStyle:{width:"150px"},attrs:{type:"danger",plain:"",round:""},on:{click:e.logout}},[e._v("退出登录")])],1)],1),t("el-tab-pane",{staticClass:"pd-20",attrs:{label:"通用设置"}},[t("el-form",{ref:"form",attrs:{model:e.setting,"label-width":"100px"}},[t("el-form-item",{attrs:{label:"发送消息:"}},[t("el-radio-group",{model:{value:e.setting.sendKey,callback:function(t){e.$set(e.setting,"sendKey",t)},expression:"setting.sendKey"}},[t("el-radio-button",{attrs:{label:"1"}},[e._v("Enter")]),t("el-radio-button",{attrs:{label:"2"}},[e._v("Ctrl + Enter")])],1)],1),t("el-form-item",{attrs:{label:"系统主题:"}},[t("el-radio-group",{model:{value:e.setting.theme,callback:function(t){e.$set(e.setting,"theme",t)},expression:"setting.theme"}},[t("el-radio-button",{attrs:{label:"default"}}),t("el-radio-button",{attrs:{label:"blue"}})],1)],1)],1),t("div",{staticClass:"setting-switch"},[t("el-switch",{model:{value:e.setting.isVoice,callback:function(t){e.$set(e.setting,"isVoice",t)},expression:"setting.isVoice"}}),e._v(" 开启新消息声音提醒 ")],1),t("div",{staticClass:"setting-switch"},[t("el-switch",{model:{value:e.setting.avatarCricle,callback:function(t){e.$set(e.setting,"avatarCricle",t)},expression:"setting.avatarCricle"}}),e._v(" 开启聊天圆形头像(需要刷新) ")],1),t("div",{staticClass:"setting-switch"},[t("el-switch",{model:{value:e.setting.hideMessageName,callback:function(t){e.$set(e.setting,"hideMessageName",t)},expression:"setting.hideMessageName"}}),e._v(" 是否隐藏聊天窗口内的联系人名字 ")],1),t("div",{staticClass:"setting-switch"},[t("el-switch",{model:{value:e.setting.hideMessageTime,callback:function(t){e.$set(e.setting,"hideMessageTime",t)},expression:"setting.hideMessageTime"}}),e._v(" 是否隐藏聊天窗口内的消息发送时间 ")],1)],1),1==parseInt(e.globalConfig.demon_mode)?t("el-tab-pane",{staticClass:"pd-20",attrs:{label:"关于 IM"}},[t("div",{staticClass:"about-logo"},[t("el-avatar",{attrs:{src:e.$packageData.logo,size:50}}),t("br"),t("br"),t("p",[t("span",{staticClass:"fc-primary"},[e._v(" "+e._s(e.$packageData.name)+" ")]),e._v("for "+e._s(e.$packageData.version)+" ")])],1),t("div",{staticClass:"setting-version"},[t("b",[e._v(" 已经支持功能:")]),e._l(e.$packageData.funcList,function(i){return t("p",{key:i.icon},[t("i",{class:i.icon}),e._v(" "+e._s(i.text))])})],2)]):e._e(),1==parseInt(e.globalConfig.demon_mode)?t("el-tab-pane",{staticClass:"pd-20",attrs:{label:"开源"}},[t("div",{staticClass:"about-logo"},[t("el-avatar",{attrs:{src:e.$packageData.logo,size:50}}),t("br"),t("br"),t("p",[t("span",{staticClass:"fc-primary"},[e._v(" "+e._s(e.$packageData.name)+" ")]),e._v("for "+e._s(e.$packageData.version)+" ")])],1),t("div",{staticClass:"setting-version"},[t("p",[e._v(" 前端地址:"),t("a",{staticClass:"fc-primary",attrs:{href:e.$packageData.frontUrl,target:"_blank"}},[e._v("[链接] im-chat-front")])]),t("p",[e._v(" 后端地址:"),t("a",{staticClass:"fc-primary",attrs:{href:e.$packageData.backstageUrl,target:"_blank"}},[e._v("[链接] im-instant-chat")])])]),t("div",{staticClass:"setting-version",staticStyle:{color:"#a6a6a6"}},[t("p",[e._v("前端技术栈:vue+Lemon-IMUI+element-UI")]),t("p",[e._v("后端技术栈:thinkphp6+workerman")])]),t("div",{staticClass:"setting-version"},[t("p",[e._v(" QQ交流群: "),t("a",{staticClass:"fc-primary",attrs:{href:e.$packageData.qqGroupUrl,target:"_blank"}},[e._v("336921267")])])])]):e._e()],1)},Je=[],We=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sc-cropper"},[t("div",{staticClass:"sc-cropper__img"},[t("img",{ref:"img",attrs:{src:e.src}})]),t("div",{staticClass:"sc-cropper__preview"},[t("h4",[e._v("图像预览")]),t("div",{ref:"preview",staticClass:"sc-cropper__preview__img"})])])},Ze=[],Xe=i(2949),et=i.n(Xe),tt={props:{src:{type:String,default:""},compress:{type:Number,default:1},aspectRatio:{type:Number,default:NaN}},data(){return{crop:null}},watch:{aspectRatio(e){this.crop.setAspectRatio(e)}},mounted(){this.init()},methods:{init(){this.crop=new(et())(this.$refs.img,{viewMode:2,dragMode:"move",responsive:!1,aspectRatio:this.aspectRatio,preview:this.$refs.preview})},setAspectRatio(e){this.crop.setAspectRatio(e)},getCropData(e,t="image/jpeg"){e(this.crop.getCroppedCanvas().toDataURL(t,this.compress))},getCropBlob(e,t="image/jpeg"){this.crop.getCroppedCanvas().toBlob(t=>{e(t)},t,this.compress)},getCropFile(e,t="fileName.jpg",i="image/jpeg"){this.crop.getCroppedCanvas({width:240,height:240}).toBlob(s=>{let n=new File([s],t,{type:i});e(n)},i,this.compress)}}},it=tt,st=(0,d.A)(it,We,Ze,!1,null,"5f07d210",null),nt=st.exports;r().get("UserInfo");var at={name:"manageGroup",props:{},components:{Cropper:nt},data(){return{componentsKey:1,maxSize:5,compress:1,aspectRatio:1,cropperDialogVisible:!1,cropper:!0,cropperImg:"",tempImg:"",dialogVisible:!1,dialog:!1,dialogTitle:"修改密码",editPass:1,originalPassword:"",account:"",password:"",repass:"",code:"",newCode:"",loading:!1}},computed:{...(0,U.aH)({setting:e=>e.setting,user:e=>e.userInfo,globalConfig:e=>e.globalConfig}),getUrl(){return window.BASE_URL+"/common/upload/uploadAvatar"},getToken(){const e=r().get("authToken");return{Authorization:e}}},watch:{setting:{handler(e,t){this.$api.imApi.settingAPI(e);let i=r().get("UserInfo");i.setting=e,r().set("UserInfo",i)},deep:!0},editPass(e){this.dialogTitle=1==e?"修改密码":"修改账号"}},methods:{logout(){this.$confirm("确定退出登录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push("/login")})}).catch(()=>{})},submitForm(){if(""==this.user.realname)return this.$message.error("请输入昵称"),!1;let e={realname:this.user.realname,email:this.user.email,sex:this.user.sex,motto:this.user.motto};this.$api.imApi.updateUserInfo(e).then(e=>{if(0==e.code){this.$message.success("修改成功");let e=JSON.parse(JSON.stringify(this.user));this.$store.commit("SET_USERINFO",e)}})},isImg(e){var t="(.jpg|.png|.gif|.jpeg)$",i=new RegExp(t);i.test(e.toLowerCase())?this.fileIsImg=!0:this.fileIsImg=!1},change(e){if(this.cropper&&"ready"==e.status){if(this.isImg(e.name),!this.fileIsImg)return this.$message.error("选择的文件非图像类文件"),!1;this.componentsKey++,this.cropperDialogVisible=!0,this.cropperImg=URL.createObjectURL(e.raw)}},before(e){e=this.cropper?this.cropperUploadFile:e;const t=e.size/1024/1024<this.maxSize;if(!t)return this.$message.warning(`上传文件大小不能超过 ${this.maxSize}MB!`),!1;this.isImg(e.name),this.tempImg=URL.createObjectURL(e)},request(e){const t=this.$loading({lock:!0,text:"Loading"}),i=new FormData;var s=this.cropper?this.cropperUploadFile:e.file;i.append("file",s),i.append("type",1),this.$api.commonApi.uploadAvatar(i).then(i=>{this.cropperImg="",t.close(),this.handleAvatarSuccess(i),e.onSuccess(i)}).catch(i=>{t.close(),e.onError(i)})},cropperSave(){var e=this.$refs.upload.uploadFiles[0].raw;this.$refs.cropper.getCropFile(e=>{this.cropperUploadFile=e,this.$refs.upload.submit(),this.cropperDialogVisible=!1},e.name,e.type)},handleAvatarSuccess(e,t){let i=this.$store.state.userInfo;this.$set(i,"avatar",e.data),this.$store.commit("SET_USERINFO",i)},editInfo(e){this.dialog=!0,this.editPass=e},editPassword(){if(""==this.code&&this.user.is_auth)return this.$message({message:"请输入验证码",type:"warning"}),!1;if(this.editPass){if(""==this.password||this.password.length<6||this.password.length>16)return this.$message({message:"请输入6-16个字符串的密码",type:"warning"}),!1;if(this.password!=this.repass)return this.$message({message:"两次密码不一致",type:"warning"}),!1;if(!this.originalPassword)return this.$message({message:"请输入原密码",type:"warning"}),!1;let e={password:this.password,code:this.code,originalPassword:this.originalPassword};this.$api.imApi.editPassword(e).then(e=>{0==e.code&&(this.dialog=!1,this.password="",this.repass="",this.$message({message:e.msg,type:"success"}))})}else{if(""==this.account)return this.$message({message:"请输入账号",type:"warning"}),!1;if(""==this.newCode)return this.$message({message:"请输入新账户验证码",type:"warning"}),!1;let e={account:this.account,code:this.code,newCode:this.newCode};this.$api.imApi.editAccount(e).then(e=>{0==e.code&&(this.dialog=!1,this.account="",this.code="",this.newCode="",this.$message({message:e.msg,type:"success"}),this.$store.dispatch("LogOut").then(()=>{this.$router.push("/login")}))})}},sendCode(e){let t=e?this.user.account:this.account,i=this.editPass?3:4;if(""==t)return this.$message({message:"请输入新的账号",type:"warning"}),!1;this.loading=!0,this.$store.dispatch("sendCode",{type:i,account:t}).then(e=>{this.$message.success("发送成功"),this.loading=!1}).catch(()=>{this.loading=!1})}}},ot=at,rt=(0,d.A)(ot,Ye,Je,!1,null,"05277269",null),ct=rt.exports,lt=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"添加好友",visible:e.visible,modal:!0,width:e.width,"append-to-body":""},on:{close:e.closeDialog}},[t("div",{staticClass:"mb-20"},[t("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入账号进行搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleChange.apply(null,arguments)}},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}},[t("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.handleChange},slot:"append"})],1)],1),t("div",{staticClass:"dialog-main"},[t("div",{staticClass:"member-list"},e._l(e.list,function(i){return t("div",{key:i.user_id,staticClass:"member-item",on:{click:function(t){return e.$user(i.user_id)}}},[t("div",{staticClass:"member-avatar"},[t("img",{attrs:{src:i.avatar,alt:"avatar"}})]),t("div",{staticClass:"member-content"},[t("div",{staticClass:"member-header"},[t("span",{staticClass:"member-name"},[e._v(e._s(i.realname))]),t("span",{staticClass:"member-account"},[e._v(e._s(i.account))])]),t("div",{staticClass:"member-actions"},[t("el-button",{attrs:{type:"primary",size:"mini"}},[e._v("查看")])],1)])])}),0),0==e.list.length?t("el-empty"):e._e()],1)])},dt=[],ut={name:"addFriend",props:{visible:{type:Boolean,default:!1},width:{type:String,default:"612px"}},data(){return{keywords:"",list:[]}},mounted(){},methods:{closeDialog(){this.$emit("update:visible",!1),this.selectUid=[]},handleChange(){this.keywords&&this.$api.imApi.searchUser({keywords:this.keywords}).then(e=>{this.list=e.data})}}},ht=ut,pt=(0,d.A)(ht,lt,dt,!1,null,"18f3aea4",null),mt=pt.exports,gt=function(){var e=this,t=e._self._c;return t("span",{staticClass:"sc-state",class:[{"sc-status-processing":e.pulse},"sc-state-bg--"+e.type]})},ft=[],vt={props:{type:{type:String,default:"primary"},pulse:{type:[Boolean,Number],default:!0}}},yt=vt,bt=(0,d.A)(yt,gt,ft,!1,null,"4bbb24c0",null),Ct=bt.exports,xt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tab-main lz-flex lz-justify-content-start lz-align-items-center",style:{height:e.height+"px"}},e._l(e.values,function(i,s){return t("div",{staticClass:"tab-item",class:e.active==s?"active":"",style:{height:e.itemHeight+"px",borderRadius:e.itemHeight+"px",lineHeight:e.itemHeight+"px"},on:{click:function(t){return e.changeItem(i,s)}}},[e._v(" "+e._s(i.name)+" "),i.count>0?t("span",[e._v(e._s(i.count>99?"99+":i.count))]):e._e()])}),0)},wt=[],kt={name:"im-tab",components:{},props:{values:{type:Array,default:function(){return[]}},height:{type:Number,default:40}},data(){return{active:0,itemHeight:24}},created:function(){this.itemHeight=this.height-16},methods:{changeItem(e,t){this.active=t,this.$emit("change",e,t)}}},Et=kt,_t=(0,d.A)(Et,xt,wt,!1,null,"2c9d228c",null),It=_t.exports,At=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.status,expression:"status"}],staticClass:"webrtc-box",style:{top:e.position.y+"px",left:e.position.x+"px",height:e.boxHeight+"px"}},[e._m(0),e._m(1),t("div",{staticClass:"draggable-div",on:{mousedown:e.startDrag}},[e._v("音视频通话")]),t("video",{directives:[{name:"show",rawName:"v-show",value:e.localStream&&e.is_video,expression:"localStream && is_video"}],ref:"localvideo",staticClass:"localvideo",attrs:{autoplay:"",playsinline:"",muted:""},domProps:{muted:!0}}),t("video",{directives:[{name:"show",rawName:"v-show",value:e.remoteStream&&e.is_video,expression:"remoteStream && is_video"}],ref:"remotevideo",staticClass:"remotevideo",attrs:{autoplay:"",playsinline:""}}),t("div",[e.caller?t("div",{staticClass:"call-user"},[2==e.status&&e.is_video?e._e():t("img",{staticClass:"avatar",attrs:{src:e.caller.avatar,alt:""}}),t("div",{staticClass:"text"},[e.is_video||2!=e.status?e._e():t("b",[e._v(e._s(e.caller.displayName))]),2!=e.status?t("span",[e.isReceived?t("span",[e._v(" "+e._s(e.caller.displayName)+" 正在请求与您"+e._s(e.is_video?"视频":"语音")+"通话")]):t("span",[e._v("您正对 "),t("b",[e._v(e._s(e.caller.displayName))]),e._v(" 发起"+e._s(e.is_video?"视频":"语音")+"通话")])]):e._e()]),e.callTime&&2==e.status?t("div",{staticClass:"call-time"},[e._v(" "+e._s(e.setCallTime())+" ")]):e._e()]):e._e(),t("div",{staticClass:"calling-button"},[e.caller&&3==e.status?t("div",{staticClass:"button"},[t("img",{staticClass:"image",attrs:{src:i(1134)},on:{click:function(t){return e.answer()}}}),t("div",{staticClass:"text"},[e._v("接听")])]):e._e(),2==e.status?t("div",{staticClass:"button"},[t("img",{staticClass:"image-icon",attrs:{src:e.voiceStatus?e.voiceIcon:e.voiceOffIcon},on:{click:function(t){return e.switchVoice()}}})]):e._e(),e.caller&&0!=e.status?t("div",{staticClass:"button"},[t("img",{staticClass:"image",attrs:{src:i(2431)},on:{click:function(t){return e.hangup(!0)}}}),t("div",{staticClass:"text"},[e._v("挂断")])]):e._e(),2==e.status?t("div",{staticClass:"button"},[e.is_video?t("img",{staticClass:"image-icon",attrs:{src:e.videoStatus?e.videoIcon:e.videoOffIcon},on:{click:function(t){return e.switchVideo()}}}):t("div",{staticClass:"image-icon"})]):e._e()])])])},St=[function(){var e=this,t=e._self._c;return t("audio",{attrs:{id:"music1"}},[t("source",{attrs:{src:i(4186)}})])},function(){var e=this,t=e._self._c;return t("audio",{attrs:{id:"music2"}},[t("source",{attrs:{src:i(7061)}})])}],Tt={name:"webrtc",props:{contact:{type:Object,default:{}},userInfo:{type:Object,default:{}},config:{type:Object,default:{}},alias:{type:String,default:"raingad"}},data(){return{position:{x:100,y:100},isDragging:!1,dragOffset:{x:0,y:0},boxWidth:310,boxHeight:300,voiceIcon:i(8028),voiceOffIcon:i(7076),videoIcon:i(3597),videoOffIcon:i(285),pc:null,hasCamera:!1,status:0,localVideo:"",remoteVideo:"",remoteStream:null,localStream:null,caller:null,is_video:1,isReceived:!1,videoStatus:!0,voiceStatus:!0,cutdown:40,timer:null,offerParams:{},callTime:0,timerIntervalId:null}},watch:{status(e){2==e?this.is_video?this.boxHeight=620:this.boxHeight=300:1==e&&this.is_video?this.boxHeight=450:this.boxHeight=250},boxHeight(e){window.innerHeight-e<this.position.y&&(this.position.y=window.innerHeight-e-20)}},mounted(){this.localVideo=this.$refs.localvideo,this.remoteVideo=this.$refs.remotevideo,this.checkForCamera(),this.position={x:window.innerWidth-this.boxWidth-10,y:window.innerHeight-this.boxHeight-20}},methods:{startDrag(e){this.isDragging=!0,this.dragOffset={x:e.clientX-this.position.x,y:e.clientY-this.position.y},document.addEventListener("mousemove",this.onDrag),document.addEventListener("mouseup",this.stopDrag)},onDrag(e){if(this.isDragging){let t=e.clientX-this.dragOffset.x,i=e.clientY-this.dragOffset.y;t=Math.max(0,Math.min(t,window.innerWidth-this.boxWidth)),i=Math.max(0,Math.min(i,window.innerHeight-this.boxHeight-20)),this.position={x:t,y:i}}},stopDrag(){this.isDragging=!1,document.removeEventListener("mousemove",this.onDrag),document.removeEventListener("mouseup",this.stopDrag)},initPeer(e){let t=this.config,i={iceServers:[{urls:["stun:stun.xten.com","stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302","stun:stun4.l.google.com:19302"]},{urls:t.stun?[t.stun]:["stun:stun.callwithus.com"],username:t.stunUser??null,credential:t.stunPass??null}]};this.pc=new RTCPeerConnection(i),this.pc.ontrack=e=>{this.localVideo&&(this.remoteStream=e.streams[0],this.remoteVideo.srcObject=e.streams[0])},this.localStream=e,e.getTracks().forEach(t=>{this.pc.addTrack(t,e)}),this.localVideo.srcObject=this.localStream},checkForCamera(){navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices().then(e=>{const t=e.filter(e=>"videoinput"===e.kind);this.hasCamera=t.length>0}).catch(e=>{console.error("设备检测错误: "+e.message)})},initLocalStream(e,t){let i=0;this.hasCamera&&(i=1),this.offerParams=t?{offerToRecieveAudio:1,offerToRecieveVideo:1}:{offerToRecieveAudio:1,offerToRecieveVideo:0};let s=1==i;var n=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;n({video:s,audio:{echoCancellation:!0}},t=>{this.initPeer(t),e?(this.$emit("message",{event:"calling"}),this.status=1,this.timer=setInterval(()=>{this.cutdown--,0==this.cutdown&&this.hangup(!0)},1e3)):(this.$emit("message",{event:"acceptRtc",code:904}),this.startTime())},e=>{let i=1==t?"摄像头":"麦克风";this.$message.error("请连接"+i+"设备,并开启"+i+"权限"),this.caller=null,this.hangup(!1)})},called(e){if(console.log(this.status,this.caller),this.status||this.caller)return!1;this.is_video=e,this.caller=this.contact,this.initLocalStream(!0,e),this.playMusicCall("state")},answer(){this.status=2,this.initLocalStream(!1,this.is_video),this.playMusicCall("close")},startTime(){this.timerIntervalId=setInterval(()=>{this.callTime++},1e3)},setCallTime(){let e=this.callTime;const t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),s=e-3600*t-60*i;return`${t.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`},hangup(e){clearInterval(this.timer),clearInterval(this.timerIntervalId),2!=this.status&&this.playMusicCall("close");let t=902;2==this.status?t=906:3==this.status?t=903:4==this.status&&(t=907),this.status&&(this.status=0,this.closeLocalMedia(),this.remoteStream=null,this.playMusicHandup(),this.isReceived=!1,this.caller=null,this.voiceStatus=!0,this.videoStatus=!0),this.$emit("message",{event:"hangup",code:t,isbtn:e,callTime:this.callTime}),this.callTime=0},closeLocalMedia(){this.localStream&&this.localStream.getTracks()&&this.localStream.getTracks().forEach(e=>{e.stop()}),this.localStream=null},switchVoice(){if(null==this.localStream)return alert("请打开音视频"),!1;const e=this.localStream.getTracks();this.voiceStatus?(e.forEach(e=>{"audio"===e.kind&&(e.enabled=!1)}),this.voiceStatus=!1):(e.forEach(e=>{"audio"===e.kind&&(e.enabled=!0)}),this.voiceStatus=!0)},switchVideo(){if(null==this.localStream)return alert("请打开音视频"),!1;const e=this.localStream.getTracks();this.videoStatus?(e.forEach(e=>{"video"===e.kind&&(e.enabled=!1)}),this.videoStatus=!1):(e.forEach(e=>{"video"===e.kind&&(e.enabled=!0)}),this.videoStatus=!0)},webrtcAction(e){let t=e.extends;switch(t.event){case"calling":this.caller=e.fromUser,this.is_video=parseInt(t.type),this.status=3,this.isReceived=!0,this.playMusicCall("state");break;case"hangup":this.hangup(!1);break;case"busy":this.status=4,this.hangup(!1);break;case"acceptRtc":this.status=2,clearInterval(this.timer),this.startTime(),this.playMusicCall("close"),this.createOffer(),this.onicecandidate();break;case"turndown":break;case"answer":this.pc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:t.sdp}));break;case"iceCandidate":setTimeout(()=>{"object"===typeof t.iceCandidate?this.pc.addIceCandidate(new RTCIceCandidate(t.iceCandidate)):this.pc.addIceCandidate(new RTCIceCandidate(JSON.parse(t.iceCandidate)))},100);break;case"offer":this.pc.setRemoteDescription(new RTCSessionDescription({type:"offer",sdp:t.sdp})),this.createAnswer();break}},createOffer(){this.pc.createOffer(this.offerParams).then(e=>{this.pc.setLocalDescription(e),this.$emit("message",{event:"offer",sdp:e.sdp})})},createAnswer(){this.pc.createAnswer(this.offerParams).then(e=>{this.pc.setLocalDescription(e),this.$emit("message",{event:"answer",sdp:e.sdp}),this.onicecandidate()})},onicecandidate(){this.pc.onicecandidate=e=>{var t=e.candidate;t&&this.$emit("message",{event:"iceCandidate",iceCandidate:JSON.parse(JSON.stringify(t))})}},playMusicCall(e){var t=document.getElementById("music1");if("close"===e)return t.pause();t.loop="state"===e,t.paused?t.play():t.pause()},playMusicHandup(){var e=document.getElementById("music2");e.play()}}},Mt=Tt,Dt=(0,d.A)(Mt,At,St,!1,null,"64d8a1f1",null),Lt=Dt.exports,Nt=function(){var e=this,t=e._self._c;return t("el-container",[t("el-header",{staticClass:"slider-aside"},[t("el-tabs",{staticClass:"tab-diy",attrs:{"tab-position":"bottom"},on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:"我收到的",name:"receive"}}),t("el-tab-pane",{attrs:{label:"我发送的",name:"send"}})],1)],1),t("el-main",{staticClass:"no-padding"},[t("div",{staticClass:"apply-list"},[t("div",{staticClass:"apply-list-main"},[t("el-scrollbar",[t("el-alert",{staticClass:"mt-10 mb-10",attrs:{"show-icon":"",title:"未处理的邀请消息会在每次初始化或者页面刷新时会重新提示!",type:"warning"}}),e._l(e.list,function(i,s){return t("div",{key:s,staticClass:"apply-list-item"},[t("div",{staticClass:"avatar"},[e.params.is_mine?e._e():t("el-avatar",{attrs:{src:i.create_user_info.avatar}}),e.params.is_mine?t("el-avatar",{attrs:{src:i.user_id_info.avatar}}):e._e()],1),t("div",{staticClass:"main"},[e.params.is_mine?e._e():t("div",{on:{click:function(t){return e.$user(i.create_user_info.user_id)}}},[t("span",{staticClass:"fc-primary cur-handle"},[e._v(e._s(i.create_user_info.realname))]),e._v(" 申请添加为好友 "),1==i.status?t("el-tag",{attrs:{type:"success"}},[e._v("已同意")]):e._e()],1),e.params.is_mine?t("div",{on:{click:function(t){return e.$user(i.user_id_info.user_id)}}},[e._v(" 请求添加 "),t("span",{staticClass:"fc-primary cur-handle"},[e._v(e._s(i.user_id_info.realname))]),e._v(" 为好友 "),1==i.status?t("el-tag",{attrs:{type:"success"}},[e._v("已同意")]):e._e()],1):e._e(),t("div",{staticClass:"f-12 c-999"},[e._v(e._s(i.remark))])]),e.params.is_mine?t("div",{staticClass:"option"},[1==i.status?t("span",{staticClass:"fc-primary cur-handle",on:{click:function(t){return e.$store.commit("openChat",i.user_id_info.user_id)}}},[e._v("发消息")]):e._e(),2==i.status?t("el-tag",{attrs:{type:"warning"}},[e._v("待同意")]):e._e(),0==i.status?t("el-tag",{attrs:{type:"danger"}},[e._v("已拒绝")]):e._e()],1):t("div",{staticClass:"option"},[2==i.status?t("el-popconfirm",{attrs:{title:"您确定接受该好友的申请吗?"},on:{confirm:function(t){return e.acceptApply(i.friend_id,!0)}}},[t("el-button",{attrs:{slot:"reference",type:"success",circle:"",plain:"",icon:"el-icon-check"},slot:"reference"})],1):e._e(),2==i.status?t("el-popconfirm",{staticClass:"ml-15",attrs:{title:"您确定拒绝该好友的申请吗?"},on:{confirm:function(t){return e.acceptApply(i.friend_id,!1)}}},[t("el-button",{attrs:{slot:"reference",type:"danger",circle:"",plain:"",icon:"el-icon-close"},slot:"reference"})],1):e._e(),1==i.status?t("span",{staticClass:"fc-primary cur-handle",on:{click:function(t){return e.$store.commit("openChat",i.create_user_info.user_id)}}},[e._v("发消息")]):e._e(),0==i.status?t("el-tag",{attrs:{type:"danger"}},[e._v("已拒绝")]):e._e()],1)])}),0==e.list.length?t("div",[t("el-empty",{attrs:{description:"暂无数据"}})],1):e._e()],2)],1),e.singlePage?e._e():t("div",{staticClass:"apply-list-page",attrs:{align:"center"}},[t("el-pagination",{attrs:{background:"","hide-on-single-page":e.singlePage,"current-page":e.params.page,"page-sizes":[20,50,100,200,300,400,500],"page-size":e.params.limit,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleChange,"current-change":e.getList,"update:currentPage":function(t){return e.$set(e.params,"page",t)},"update:current-page":function(t){return e.$set(e.params,"page",t)},"update:pageSize":function(t){return e.$set(e.params,"limit",t)},"update:page-size":function(t){return e.$set(e.params,"limit",t)}}})],1)])])],1)},Ut=[],Pt={name:"apply",data(){return{singlePage:!0,total:0,list:[],activeName:"receive",params:{page:1,limit:20,is_mine:0}}},mounted(){this.getList()},methods:{handleClick(e){"send"==e.name?this.params.is_mine=1:"receive"==e.name&&(this.params.is_mine=0),this.params.page=1,this.getList()},acceptApply(e,t){let i=t?1:0;this.$api.friendApi.acceptFriend({friend_id:e,status:i}).then(e=>{this.$message.success("操作成功"),this.getList()})},getList(){this.$api.friendApi.getApplyList(this.params).then(e=>{this.list=e.data,this.total=e.count,this.singlePage=this.total<=this.params.limit})},handleChange(e){this.params.limit=e,this.getList()}}},Ot=Pt,$t=(0,d.A)(Ot,Nt,Ut,!1,null,"5aced73a",null),Rt=$t.exports,jt=i.p+"assets/img/invite.108c2fc8.png",Bt=i(4302),Ft=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ServiceSupervision-tab"},[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.changeTab},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:"服务中",name:"0"}}),t("el-tab-pane",{attrs:{name:"1"},scopedSlots:e._u([{key:"label",fn:function(){return[t("span",{staticClass:"tab-label"},[e._v(" 待处理 "),e.personalPendingCount>0?t("span",{staticClass:"badge-dot"}):e._e()])]},proxy:!0}])}),t("el-tab-pane",{attrs:{label:"全部",name:"2"}})],1)],1)},Vt=[],zt={props:{personalPendingCount:{type:Number,default:0}},data(){return{activeTab:"0"}},methods:{changeTab(){this.$emit("changeTab",{},this.activeTab)},changeActive(e){this.activeTab=e}}},Ht=zt,Gt=(0,d.A)(Ht,Ft,Vt,!1,null,"0b22e509",null),Kt=Gt.exports,qt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ServiceSupervision-tab"},[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.changeTab},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:"服务中",name:"0"}}),t("el-tab-pane",{attrs:{name:"1"},scopedSlots:e._u([{key:"label",fn:function(){return[t("span",{staticClass:"tab-label"},[e._v(" 待处理 "),e.groupPendingCount>0?t("span",{staticClass:"badge-dot"}):e._e()])]},proxy:!0}])}),t("el-tab-pane",{attrs:{label:"全部",name:"2"}})],1)],1)},Qt=[],Yt={props:{groupPendingCount:{type:Number,default:0}},data(){return{activeTab:"0"}},methods:{changeTab(){this.$emit("changeTab",{},this.activeTab)}}},Jt=Yt,Wt=(0,d.A)(Jt,qt,Qt,!1,null,"b00c5d84",null),Zt=Wt.exports,Xt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ServiceSupervision-tab"},[t("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.changeTab},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:"服务中",name:"0"}}),t("el-tab-pane",{attrs:{label:"待处理",name:"1"}}),t("el-tab-pane",{attrs:{label:"历史",name:"2"}})],1)],1)},ei=[],ti={data(){return{activeTab:"0"}},methods:{changeTab(){this.$emit("changeTab",{},this.activeTab)}}},ii=ti,si=(0,d.A)(ii,Xt,ei,!1,null,"330b7dc0",null),ni=si.exports,ai=function(){var e=this,t=e._self._c;return t("div",{staticClass:"lemon-contact-item",class:1==e.Contact.is_top?"bg-gray":"",on:{click:function(t){return t.stopPropagation(),e.$emit("fn")}}},[t("el-badge",{staticClass:"lemon-badge lemon-contact__avatar",attrs:{hidden:e.Contact.unread<=0,"is-dot":0==e.Contact.is_notice,max:99,value:e.Contact.unread}},[t("span",{staticClass:"lemon-avatar",class:{"lemon-avatar--circle":e.setting.avatarCricle},staticStyle:{width:"40px",height:"40px","line-height":"40px","font-size":"20px"}},[t("img",{attrs:{src:e.Contact.avatar}})]),e.Contact.is_online&&0==e.Contact.is_group&&e.globalConfig.chatInfo&&1==e.globalConfig.chatInfo.online?t("span",{staticClass:"online-status",attrs:{title:"在线"}}):e._e()]),t("div",{staticClass:"lemon-contact__inner"},[t("p",{staticClass:"lemon-contact__label"},[t("span",{staticClass:"lemon-contact__name",style:{color:e.titleColorMap[e.Contact.timeout_type]}},[e._v(" "+e._s(e.Contact.displayName)+" ")]),t("span",{staticClass:"lemon-contact__time",domProps:{textContent:e._s(e.formatTime(e.Contact.lastSendTime))}})]),t("p",{staticClass:"lemon-contact__content lemon-last-content"},[t("span",{staticClass:"lastContent"},[e.Contact.is_at>0?t("span",{staticClass:"c-red"},[e._v("[有"+e._s(e.Contact.is_at)+"人@我] ")]):e._e(),t("span",{domProps:{innerHTML:e._s(e.Contact.lastContent)}})]),0===e.Contact.service_status?t("el-button",{staticStyle:{position:"relative","z-index":"1"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.$emit("kefuHandleChat",e.Contact)}}},[e._v(" 接线 ")]):e._e(),1===e.Contact.service_status||2===e.Contact.service_status?t("el-button",{staticStyle:{position:"relative","z-index":"1"},attrs:{type:"primary",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.$emit("openAdminList",e.Contact)}}},[e._v(" 转线 ")]):e._e(),0==e.Contact.is_notice?t("span",{staticClass:"el-icon-close-notification f-16"}):e._e()],1)])],1)},oi=[],ri={props:{Contact:{type:Object,default:()=>({})},setting:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})},titleColorMap:{type:Object,default:()=>({})}},computed:{formatTime(){return function(e){return ae.DC(e)}}}},ci=ri,li=(0,d.A)(ci,ai,oi,!1,null,"74901f70",null),di=li.exports;function ui(e,t){if("number"!==typeof e||isNaN(e)||e<0)throw new Error(`sendTime必须是合法的毫秒级时间戳(数字),当前值:${e}`);if("number"!==typeof t||isNaN(t)||t<0)throw new Error(`分钟数必须是≥0的数字,当前值:${t}`);const i=Date.now()-60*t*1e3;return e<i}const hi=()=>(new Date).getTime(),pi=r().get("UserInfo");var mi={name:"app",components:{Socket:ue,ChatRecord:he.A,ChatSet:ye,ChatTop:Ee,VoiceRecorder:Le,webrtc:Lt,Group:Ne.A,groupQr:Be,Files:Qe,addFriend:mt,Setting:ct,ChooseDialog:Fe.A,OnlineStatus:Ct,imTab:It,Apply:Rt,tab1:Kt,tab2:Zt,tab3:ni,contact:di},props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},fullScreen:{type:Boolean,default:!1}},data(){const e=this.$createElement;window.getTeam=()=>{const e=r().get("UserInfo"),t=["admin_notice","system",-1],i=this.contacts.filter(e=>!t.includes(e.id)),s=i.filter(t=>t.cs_uid!==e.user_id&&0!==t.service_status);console.log(s,"团体列表")},window.getPerson=()=>{const e=r().get("UserInfo"),t=["admin_notice","system",-1],i=this.contacts.filter(e=>!t.includes(e.id)),s=i.filter(t=>t.cs_uid===e.user_id&&0!==t.service_status);console.log(s,"个人列表")};var t=this;let i=this.$store.state.globalConfig.chatInfo;return{loading:!1,filterTabs:[{label:"个人",value:0},{label:"团体",value:1},{label:"排队",value:2},{label:"机器人",value:3}],filterIndex:0,isSign:0,onlineStateText:"在线",onlineState:1,onlineStateColor:"#6ec149",isShowMsgWindow:!1,adminList:[],selectAdminShow:!1,currentContact:{},selectedAdminId:0,titleColorMap:{1:"#FF9500",2:"#FF3B30",3:"#FF9500",4:"#FF3B30"},expressionList:[],expressionCategoryList:[],expressionApiParams:{category_id:null,name:"",limit:30,page:1,language_code:"zh"},expressionVisible:!1,noSimpleTips:"群已开启禁言,无法发送消息",isFullscreen:!1,curWidth:this.width,curHeight:this.height,unread:0,atUnread:0,webrtcConfig:i,wsData:null,webrtcLock:!1,caller:"",is_video:1,curFile:null,componentKey:1,searchResult:!1,addFriendBox:!1,createChatBox:!1,forwardBox:!1,noticeBox:!1,messageBox:!1,webrtcBox:!1,groupSetting:!1,VoiceStatus:!1,groupQrShow:!1,ChatRecordMap:{},contactSetting:{},groupUserCount:0,dialogTitle:"创建群聊",isAdd:1,userIds:[],noSpeakData:{noSpeakTimer:0,noSpeakDay:1,user_id:0,id:0},curGroupUser:{},notice:"",searchList:[],keywords:"",displayName:"",oldName:"",isEdit:!1,isBottom:!0,user:{id:pi.user_id,displayName:pi.realname,avatar:pi.avatar,account:pi.account},params:{page:1,limit:10},is_group:0,group_id:"",contacts:[],allUser:[],groupUser:[],currentChat:{},currentMessage:{},lastMessages:[],chatTopList:[],playAudio:null,activeTab:0,tabList:[{name:"所有",count:0},{name:"未读",count:0},{name:"@我",count:0}],quote:"",noSpeakBox:!1,groupMenu:[{text:"发送消息",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;s.changeContact(n.user_id),i()},visible:e=>e.contact.user_id!=this.user.id&&1==this.globalConfig.sysInfo.runMode},{text:"@TA",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;s.setUserTag(n.userInfo),i()},visible:e=>e.contact.user_id!=this.user.id},{text:"设置管理员",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i(),this.$confirm("确定设置该成员为管理员吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.setManagerAPI({id:this.group_id,user_id:n.user_id,role:2}),this.$message({type:"success",message:"设置成功!"})})},visible:e=>3==e.contact.role&&this.currentChat.owner_id==this.user.id},{text:"取消管理员",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i(),this.$confirm("确定取消该成员的管理员权限吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.setManagerAPI({id:this.group_id,user_id:n.user_id,role:3}),this.$message({type:"success",message:"取消成功!"})})},visible:e=>2==e.contact.role&&this.currentChat.owner_id==this.user.id},{text:"设置禁言",click:(e,t,i)=>{this.noSpeakBox=!0;const{IMUI:s,contact:n}=t;this.noSpeakData.user_id=n.user_id,this.noSpeakData.id=this.group_id,i()},visible:e=>e.contact.user_id!=this.user.id&&e.contact.role>1&&this.currentChat.role<=2},{text:"查看资料",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i();let a=this.getContact(n.user_id),o=s.getCurrentContact();1==o.setting.profile||o.role<3||a||n.user_id==this.user.id?this.$user(n.user_id):this.$message.error("已开启隐私,无法查看资料")},visible:e=>e.contact.user_id!=this.user.id},{text:"移出群聊",color:"red",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i(),this.$confirm("确定移除该成员吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.removeUserAPI({id:this.group_id,user_id:n.user_id})})},visible:e=>e.contact.user_id!=this.user.id&&this.currentChat.owner_id!=e.contact.user_id&&this.currentChat.role<=2}],contactContextmenu:[{click(e,i,s){const{IMUI:n,contact:a}=i;t.$user(a.user_id),s()},icon:"el-icon-tickets",text:"查看资料",visible:e=>0==e.contact.is_group},{icon:"el-icon-upload2",text:"置顶聊天",click:(e,i,s)=>{const{IMUI:n,contact:a}=i;t.$api.imApi.setChatTopAPI({id:a.id,is_top:1,is_group:a.is_group}).then(e=>{0==e.code&&n.updateContact({id:a.id,is_top:1})}),s()},visible:e=>0==e.contact.is_top&&e.contact.is_group<2},{icon:"el-icon-download",text:"取消置顶",click:(e,i,s)=>{const{IMUI:n,contact:a}=i;t.$api.imApi.setChatTopAPI({id:a.id,is_top:0,is_group:a.is_group}).then(e=>{0==e.code&&n.updateContact({id:a.id,is_top:0})}),s()},visible:e=>1==e.contact.is_top&&e.contact.is_group<2},{click(e,i,s){const{IMUI:n,contact:a}=i;s(),t.$api.imApi.isNoticeAPI({id:a.id,is_notice:0,is_group:a.is_group}),n.updateContact({id:a.id,is_notice:0})},icon:"el-icon-bell",text:"消息免打扰",visible:e=>1==e.contact.is_notice&&e.contact.is_group<2},{click(e,i,s){const{IMUI:n,contact:a}=i;s(),t.$api.imApi.isNoticeAPI({id:a.id,is_notice:1,is_group:a.is_group}),n.updateContact({id:a.id,is_notice:1})},icon:"el-icon-close-notification",text:"取消免打扰",visible:e=>0==e.contact.is_notice&&e.contact.is_group<2},{click(e,i,s){const{IMUI:n,contact:a}=i;s(),t.$confirm("确定删除该好友吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.$api.friendApi.delFriend({id:a.id}).then(e=>{0==e.code&&(t.$message({type:"success",message:"删除成功!"}),t.removeContact(a.id))})}).catch(()=>{})},icon:"el-icon-delete",color:"red",text:"删除好友",visible:e=>2==t.globalConfig.sysInfo.runMode&&0==e.contact.is_group},{click(e,i,s){const{IMUI:n,contact:a}=i;s(),t.$confirm("确定解散该群聊吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.$api.imApi.removeGrouprAPI({id:a.id})}).catch(()=>{})},icon:"el-icon-delete",color:"red",text:"解散群聊",visible:e=>e.contact.owner_id==t.user.id&&1==e.contact.is_group},{click(e,i,s){const{IMUI:n,contact:a}=i;s(),t.$confirm("确定退出该群聊吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.$api.imApi.removeUserAPI({id:a.id,user_id:t.user.id}).then(e=>{0==e.code&&(t.$message({type:"success",message:"退出成功!"}),t.removeContact(a.id))})}).catch(()=>{})},icon:"el-icon-remove-outline",color:"red",text:"退出群聊",visible:e=>e.contact.owner_id!=t.user.id&&1==e.contact.is_group}],contextmenu:[{click:(t,i,s)=>{const{IMUI:n}=i,a=JSON.parse(JSON.stringify(i.message));this.$api.imApi.undoMessageAPI({id:a.id}).then(t=>{const i={id:a.id,type:"event",content:e("div",[e("span",["你撤回了一条消息"," ",e("span",{directives:[{name:"show",value:"text"==a.type}],style:"color:#409EFF;cursor:pointer",attrs:{content:a.content,data:a.type},on:{click:e=>{n.setEditorValue(e.target.getAttribute("content"))}}},["重新编辑"])])]),toContactId:a.toContactId,sendTime:a.sendTime};n.updateMessage(i);const s=n.getMessages(a.toContactId);a.id==s[s.length-1].id&&n.updateContact({id:a.toContactId,lastContent:"你撤回了一条消息"})}).catch(e=>{this.$message.error("发生错误"+e)}),s()},visible:e=>{const{IMUI:t,message:i}=e;let s=3;if(1==e.message.is_group){let e=t.getCurrentContact();s=e.role}return console.log(this.globalConfig,1171),this.globalConfig.kefu_cancel_message&&Number(this.globalConfig.kefu_cancel_message)>0?e.message.fromUser.id==this.user.id&&!ui(i.sendTime,Number(this.globalConfig.kefu_cancel_message))||s<3:e.message.fromUser.id==this.user.id&&hi()-e.message.sendTime<1e3*this.globalConfig.chatInfo.redoTime||s<3},text:"撤回消息"},{visible:e=>"image"==e.message.type,text:"复制图片",click:async(e,t,i)=>{i();try{const{message:e}=t,i=await fetch(e.download),s=await i.blob(),n=new Blob([s],{type:"image/png"}),a=new ClipboardItem({"image/png":n});await navigator.clipboard.write([a]),this.$message({type:"success",message:"图片复制成功!"})}catch(s){this.$message.error("复制图片失败: "+s)}}},{visible:e=>"text"==e.message.type,text:"复制文字",click:(e,t,i)=>{this.$clipboard(t.message.content),this.$message({type:"success",message:"复制成功!"}),i()}},{visible:e=>"image"==e.message.type,text:"下载图片",click:(e,t,i)=>{const{message:s}=t;i(),s.download&&(window.location=s.download)}},{visible:e=>"file"==e.message.type,text:"下载文件",click:(e,t,i)=>{const{message:s}=t;window.open(s.download),i()}},{text:"删除消息",color:"red",click:(e,t,i)=>{const{IMUI:s,message:n}=t;this.$confirm("删除消息会从所有人的聊天记录中抹掉,是否确定?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.delMessageAPI({id:n.id}).then(e=>{0==e.code&&(this.$message({type:"success",message:"删除成功!"}),s.removeMessage(n.id))})}).catch(()=>{this.$message({type:"info",message:"已取消"})}),i()},visible:e=>e.message.fromUser.id==this.user.id&&e.message.is_group<2&&this.globalConfig.chatInfo.dbDelMsg},{text:"翻译",click:(e,t,i)=>{this.$api.custom.translate({msg_id:t.message.msg_id,language_code:"zh"}).then(e=>{t.IMUI.updateMessage({...t.message,extends:{...t.message.extends,translationResult:e.data.content,isMe:t.message.fromUser.user_id===t.IMUI.user.id?"1":"0"}})}),i()},visible:e=>"text"===e.message.type}]}},computed:{...(0,U.aH)({wsStatus:e=>e.wsStatus,socketAction:e=>e.socketAction,contactId:e=>e.toContactId,contactSync:e=>e.contactSync,setting:e=>e.setting,userInfo:e=>e.userInfo,globalConfig:e=>e.globalConfig}),formatTime(){return function(e){return ae.DC(e)}},personalPendingCount(){const e=r().get("UserInfo"),t=["admin_notice","system",-1],i=this.contacts.filter(e=>!t.includes(e.id)),s=i.filter(t=>t.cs_uid===e.user_id&&0!==t.service_status),n=s.filter(e=>1===e.service_status);return n.length},groupPendingCount(){const e=r().get("UserInfo"),t=["admin_notice","system",-1],i=this.contacts.filter(e=>!t.includes(e.id)),s=i.filter(t=>t.cs_uid!==e.user_id&&0!==t.service_status),n=s.filter(e=>1===e.service_status);return n.length},queueTotalCount(){const e=["admin_notice","system",-1],t=this.contacts.filter(t=>!e.includes(t.id)),i=t.filter(e=>0===e.service_status);return i.length},personalServingCount(){const e=r().get("UserInfo"),t=["admin_notice","system",-1],i=this.contacts.filter(e=>!t.includes(e.id)),s=i.filter(t=>t.cs_uid===e.user_id&&0!==t.service_status),n=s.filter(e=>2===e.service_status);return n.length},groupServingCount(){const e=r().get("UserInfo"),t=["admin_notice","system",-1],i=this.contacts.filter(e=>!t.includes(e.id)),s=i.filter(t=>t.cs_uid!==e.user_id&&0!==t.service_status),n=s.filter(e=>2===e.service_status);return n.length}},watch:{isFullscreen(e){r().set("isFullscreen",e),this.curWidth=e?"100vw":this.width,this.curHeight=e?"100vh":this.height},playAudio(e){if(e&&this.currentMessage){let e=this.currentMessage;var t=this;const{IMUI:i}=this.$refs;this.playAudio.addEventListener("ended",function(){console.log("声音停止"),t.playAudio=null,t.currentMessage=null,i.updateMessage({id:e.id,status:"successd",isPlay:0})},!1)}},contactSync(e){this.$emit("newChat",e);const{IMUI:t}=this.$refs;t.changeContact(this.contactId)},unread(e){this.tabList[1].count=e,this.$store.commit("updateUnread",e)},atUnread(e){this.tabList[2].count=e},keywords(){const{IMUI:e}=this.$refs,t=e.getContacts();this.searchContact(t)},socketAction(e){const t=this.$createElement;let i=e.data;const{IMUI:s}=this.$refs;let n=r().get("client_id");switch(e.type){case"closeChat":const a=s.getCurrentContact();console.log(i.user_id,"会话",a.user_id,"联系人"),console.log(typeof i.user_id,"会话",typeof a.user_id,"联系人"),i.user_id==a.user_id&&s.changeContact(),this.sendMsgToParent({data:i,type:"CloseChatMessages"});break;case"sign":this.isSign=i.is_sign;break;case"timeout":this.sendMsgToParent({data:i,type:"TimeoutMessages"}),this.getSimpleChat();break;case"kefuChat":this.popNotice(i);case"handleChat":this.getSimpleChat();break;case"isOnline":s.updateContact({id:i.id,is_online:i.is_online}),i.is_online||this.webrtcLock!=i.id||(this.webrtcLock=!1);break;case"offline":if(1==parseInt(this.globalConfig.sysInfo.multipleLogin))return;i.id!=this.user.id||i.client_id==n||i.isMobile||(this.$message.error="您的账号在其他地方登录,已被迫下线!",this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})}));break;case"simple":this.popNotice(i);case"group":if(i.fromUser.id!=this.user.id){let e=this.getContact(i.toContactId,i);if(1==i.is_group&&i.toContactId!=this.currentChat.id){let t=0;i.at.includes(this.user.id)&&(t=1),this.$refs.IMUI.updateContact({id:i.toContactId,is_at:e.is_at+t}),this.atUnread+=t}this.setting.isVoice&&1==e.is_notice&&i.toContactId!=this.currentChat.id&&this.popNotice(i)}this.recieveMsg(i);break;case"undoMessage":if(i.from_user==this.user.id&&0==i.isMobile&&hi()-i.sendTime<1e3*this.globalConfig.chatInfo.redoTime)return!1;s.updateMessage(i);const o=s.getMessages(i.toContactId);i.id==o[o.length-1].id&&s.updateContact({id:i.toContactId,lastContent:"对方撤回了一条消息"});break;case"delMessage":s.removeMessage(i.id);break;case"updateMessage":s.updateMessage(i);break;case"setChatTop":s.updateContact({id:i.id,is_top:i.is_top});break;case"setIsNotice":s.updateContact({id:i.id,is_notice:i.is_notice});break;case"editGroupName":s.updateContact({id:i.id,displayName:i.displayName});const c={id:ae.cZ(),type:"event",content:t("div",[t("span",[i.editUserName," 修改了群名为 ",i.displayName])]),toContactId:i.id,sendTime:hi()};s.appendMessage(c,!0);break;case"isRead":console.log("通知发过来的"),this.setLocalMsgIsRead(i);break;case"readAll":let l=s.getMessages(i.toContactId);l.forEach(e=>{if(0==e.is_read){const t={id:e.id,is_read:1,status:"succeed",sendTime:parseInt(e.sendTime)+1,content:e.content};s.updateMessage(t)}});break;case"addGroup":i.owner_id!=this.user.id&&s.appendContact(i),this.$api.commonApi.bindGroupAPI({client_id:n,group_id:i.id});break;case"setManager":case"addGroupUser":case"removeUser":i.group_id==this.group_id&&this.getGroupUserList(i.group_id),"removeUser"==e.type&&i.user_id==this.user.id?this.removeContact(i.group_id):s.updateContact({id:i.group_id,avatar:i.avatar});break;case"setNoSpeak":i.group_id==this.group_id&&this.getGroupUserList(i.group_id);break;case"removeGroup":this.removeContact(i.group_id);break;case"clearMessage":s.clearMessages(i.group_id),this.groupSetting=!1,s.updateContact({id:i.group_id,lastContent:""}),i.group_id==this.currentChat.id&&(s.changeContact(null),setTimeout(()=>{s.changeContact(i.group_id)},100));break;case"updateConfig":this.$store.commit("setGlobalConfig",i);break;case"setNotice":s.updateContact({id:i.group_id,notice:i.notice}),s.appendMessage({id:ae.cZ(),type:"event",content:t("div",[t("span",["管理员 发布了公告: ",i.notice])]),toContactId:i.group_id,sendTime:hi()},!0);break;case"groupSetting":s.updateContact({id:i.group_id,setting:i.setting}),this.currentChat.id==i.group_id&&(this.currentChat.setting=i.setting);break;case"appendContact":s.appendContact(i);break;case"webrtc":if(i.fromUser.id==this.user.id){let e=i.extends,t=r().get("wsData");return[902,903,905,906,907].includes(parseInt(e.code))&&(t.content=i.content,s.updateMessage(t),this.webrtcLock=!1),0==e.isMobile||"calling"==e.event?void("calling"==e.event&&(r().set("wsData",i),this.recieveMsg(i))):void("otherOpt"==e.event&&(t.content=i.content,s.updateMessage(t),this.wsData=null,this.caller="",this.webrtcLock=!1,this.$refs.webrtc.hangup(!1)))}if(this.wsData&&this.wsData.id!=i.id)this.$api.imApi.sendToMsg({toContactId:i.fromUser.user_id,type:i.extends.type,event:"busy",status:i.extends.status,code:907,id:i.id,msg_id:i.msg_id});else{if("calling"==i.extends.event)this.recieveMsg(i),this.wsData=i,r().set("wsData",i),this.caller=i.fromUser;else if("offer"==i.extends.event||"answer"==i.extends.event)this.webrtcLock=i.fromUser.user_id;else if("hangup"==i.extends.event){let e=r().get("wsData");e.content=i.content,s.updateMessage(e),this.webrtcLock=!1}this.wsData&&this.wsData.id==i.id&&this.$refs.webrtc.webrtcAction(JSON.parse(JSON.stringify(i)))}break}}},created(){this.$user=function(){};let e=this.$store.state.userInfo;e&&(this.user={id:e.user_id,displayName:e.realname,avatar:e.avatar,account:e.account}),window.Notification?"granted"==Notification.permission?console.log("允许通知"):"denied"!=Notification.permission&&(console.log("需要通知权限"),Notification.requestPermission(e=>{})):console.error("浏览器不支持Notification"),this.$api.custom.getSign().then(e=>{this.isSign=e.data.is_sign,console.log(e.data.is_sign,e.data.is_sign?"需要签到":"不需要签到")});const t=1==this.globalConfig.translate;this.contextmenu.forEach((e,i)=>{"翻译"!==e.text||t||this.contextmenu.splice(i,1)})},mounted(){this.fullScreen&&(this.isFullscreen=r().get("isFullscreen")),this.searchResult&&document.addEventListener("click",function(e){that.$refs.configforms.contains(e.target)||(that.searchResult=!1)}),this.getSimpleChat()},methods:{setContactBottom(e){const t=document.querySelector(".lemon-sidebar__scroll");t&&(t.style.paddingBottom=e)},fn(){console.log(this.contacts,1534),console.log(this.personalPendingCount,"获取个人待处理总数"),console.log(this.groupPendingCount,"获取团体待处理总数"),console.log(this.queueTotalCount,"排队总数")},changeFilterTab(e){this.$refs.IMUI.changeContact();let t=document.querySelector(".chat-rich-text"),i=document.querySelector(".lemon-editor__inner"),s=document.querySelector(".lemon-editor__footer");e>0?(t.setAttribute("contenteditable","false"),i&&(i.style.display="none"),s&&(s.style.display="none")):(t.setAttribute("contenteditable","true"),i&&(i.style.display=""),s&&(s.style.display="")),this.filterIndex=e,this.activeTab=0,this.initEditorTools()},changeOnline(e){let t=r().get("UserInfo"),i=[()=>{let e=()=>{this.$api.commonApi.setOnlineAPI({user_id:t.user_id,is_online:0}).then(e=>{this.onlineStateText="离线",this.onlineState=0,this.onlineStateColor="#909399"})};this.$api.custom.hasChat().then(t=>{console.log(t.data.chat_num,1876),t.data.chat_num>0?this.$confirm("当前还有未的结束会话,是否离线","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e()}):e()})},()=>{this.$api.commonApi.setOnlineAPI({user_id:t.user_id,is_online:1}).then(e=>{this.onlineStateText="在线",this.onlineState=1,this.onlineStateColor="#6ec149"})},()=>{this.$api.commonApi.setOnlineAPI({user_id:t.user_id,is_online:2}).then(e=>{this.onlineStateText="忙碌",this.onlineState=2,this.onlineStateColor="#e0a348"})}];i[e]()},signUp(){this.$api.custom.SignUp().then(e=>{this.$message.success("签到成功"),this.onlineStateText="在线",this.onlineState=1,this.onlineStateColor="#6ec149",this.isSign=0})},kefuHandleChat(e){this.$api.custom.kefuHandleChat({user_id:e.user_id}).then(()=>{this.filterIndex=0,this.activeTab=0,this.$nextTick(()=>{this.$refs.tab1Ref.changeActive("0")})})},openAdminList(e){this.selectAdminShow=!0,this.currentContact=e,this.getAdminList()},getAdminList(){this.$api.custom.kefuList().then(e=>{this.adminList=e.data.map(e=>({...e,isSelect:!1}))})},handleSelectAdminChange(e){this.selectedAdminId=e?e.user_id:null},confirmSelectAdmin(){this.selectedAdminId?this.$api.custom.kefuTransferChat({user_id:this.currentContact.user_id,cs_uid:this.selectedAdminId}).then(()=>{console.log("切换成功"),this.selectAdminShow=!1,this.filterIndex=0,this.changeFilterTab(0),this.$nextTick(()=>{this.activeTab=0,this.$refs.tab1Ref.changeActive("0"),console.log("切换处理完毕")})}):this.$message.warning("请选择要转线的客服")},endMsg(){this.$confirm("确认是否结束会话","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.custom.kefuFinishedChat({user_id:this.currentChat.user_id}).then(e=>{})})},getExpressionList(){this.searchExpressionList()},searchExpressionList(){this.loading=!0,this.$api.custom.expressionList(this.expressionApiParams).then(e=>{this.expressionList=this.expressionList.concat(e.data.list)}),this.$api.custom.expressionCategoryList({language_code:this.expressionApiParams.language_code}).then(e=>{this.loading=!1,this.expressionCategoryList=e.data.list}).catch(()=>{this.loading=!1})},selectExpressionItem(e){this.expressionVisible=!1;const{IMUI:t}=this.$refs;let i=JSON.parse(localStorage.getItem("UserInfo")).data;this.$api.imApi.sendMessageAPI({id:(0,ae.Ij)(),type:"text",status:"going",sendTime:Date.now(),toContactId:this.currentChat.id,fromUser:{id:i.user_id,displayName:i.displayName,avatar:i.avatar,account:i.account},content:`<p><span class="chat-grid-input chat-stat">${e.name}</span></p>`,file_id:0,is_group:0}).then(e=>{0==e.code&&(t.setEditorValue(""),t.updateMessage(e.data))}).catch(e=>{}),e.img&&this.$api.imApi.sendMessageAPI({id:(0,ae.Ij)(),type:"image",status:"going",sendTime:Date.now(),toContactId:this.currentChat.id,fromUser:{id:i.user_id,displayName:i.displayName,avatar:i.avatar,account:i.account},content:`${e.img}`,file_id:0,is_group:0}).then(e=>{0==e.code&&(t.setEditorValue(""),t.updateMessage(e.data))}).catch(e=>{})},expressionLoad(){this.expressionApiParams.page++,this.searchExpressionList()},resetExpression(){this.expressionApiParams.page=1,this.expressionApiParams.name="",this.expressionApiParams.category_id=null,this.expressionList=[],this.searchExpressionList()},changeSearchExpressionList(){this.expressionApiParams.page=1,this.expressionList=[],this.searchExpressionList()},language_codeChange(e){console.log(e.name),this.expressionApiParams.language_code=e.name,this.resetExpression()},called(e){if(!this.globalConfig.chatInfo.simpleChat)return this.$message.error("当前系统已关闭单聊功能");this.webrtcLock?this.$message.error("其他端正在通话中"):(this.webrtcBox=!0,this.is_video=e,this.caller=this.currentChat)},changeTab(e,t){this.activeTab=t},latelyContact(e){let t=r().get("UserInfo"),i=["admin_notice","system",-1],s=e.filter(e=>!i.includes(e.id)),n=[];if(1===this.filterIndex)n=s.filter(e=>e.cs_uid!=t.user_id&&0!=e.service_status&&1!=e.is_auto);else{if(2==this.filterIndex)return n=s.filter(e=>0==e.service_status&&1!=e.is_auto),n;if(3==this.filterIndex)return n=s.filter(e=>1==e.is_auto&&0==e.role),n;n=s.filter(e=>e.cs_uid==t.user_id&&0!=e.service_status&&1!=e.is_auto)}let a=[];return a=1==this.activeTab?n.filter(e=>1==e.service_status):2==this.activeTab?n.filter(e=>0!=e.service_status):n.filter(e=>2==e.service_status),a.sort((e,t)=>t.lastSendTime-e.lastSendTime),a.sort((e,t)=>t.is_top-e.is_top),1==this.isSign?this.setContactBottom("80px"):this.setContactBottom("40px"),a},initEditorTools(){const e=this.$createElement,t=this.$refs.IMUI;let i=[{name:"uploadImage",title:"发送图片"},{name:"uploadVideo",title:"发送视频",click:()=>{var e=this.$refs.uploadVideo;e.click()},render:()=>e("i",{class:"el-icon el-icon-video-play f-18",style:"vertical-align: middle;font-weight: 600;"},[e("input",{style:"display:none",attrs:{type:"file",accept:"video/*"},ref:"uploadVideo",on:{change:e=>{this.uploadVideo(e)}}})])},{name:"uploadFile",title:"发送文件"},{name:"quickReply",title:"快捷回复",click:()=>{this.expressionVisible=!0,this.expressionApiParams.language_code=this.currentChat.language_code,this.searchExpressionList()},render:()=>e("button",{class:"el-button el-button--primary el-button--small",style:"margin-top: -4px"},["快捷回复"])},{name:"msgBox",title:"消息管理器",click:()=>{this.ChatRecordMap={},this.messageBox=!0,this.componentKey+=1},render:()=>e("i",{class:"el-icon el-icon-time f-18",style:"vertical-align: middle;"}),isRight:!0}];0!==this.filterIndex&&(i=i.slice(-1)),t.initEditorTools(i)},getSimpleChat(e){const t=this.$createElement;console.log("初始化聊天"),this.$nextTick(()=>{const i=this.$refs.IMUI;this.IMUI=i,i.setLastContentRender("voice",e=>"[语音]"),i.setLastContentRender("video",e=>"[视频]"),this.initEditorTools(),i.initEmoji(ne),this.$api.imApi.getContactsAPI().then(s=>{const n=s.data;this.contacts=n;var a={};if(n.forEach((t,s)=>{t.type&&(a.type=t.type,a.content=t.lastContent,n[s]["lastContent"]=i.lastContentRender(a)),t.unread&&!e&&1==t.is_notice&&(this.unread+=t.unread),t.is_at&&(this.atUnread+=t.is_at)}),this.globalConfig.sysInfo&&2==this.globalConfig.sysInfo.runMode){const e={id:"system",displayName:"新邀请",name_py:"xinyaoqing",avatar:jt,is_group:2,index:"[1]系统消息",click(e){e()},renderContainer:()=>t(Rt),lastSendTime:s.page,lastContent:s.page?"新的申请":"",unread:parseInt(s.count),is_notice:1};this.unread+=s.count,n.push({...e})}this.$store.commit("initContacts",n),i.initContacts(n),this.lastMessages=i.lastMessages,this.initMenus(i)})})},shotScreen(){new Bt.A({enableWebRtc:!0,level:999999,completeCallback:this.callback,closeCallback:this.closeShotScreen})},closeShotScreen(){console.log("关闭截图")},callback(e){let t=new Image;t.src=e.base64,t.onload=()=>{let e=this.convertImageToCanvas(t),i=e.toDataURL("image/jpeg"),s=window.atob(i.split(",")[1]),n=new ArrayBuffer(s.length),a=new Uint8Array(n);for(let t=0;t<s.length;t++)a[t]=s.charCodeAt(t);let o=new File([n],"screenShot"+ae.cZ()+".jpg",{type:"image/jpeg"});this.$confirm("<img src="+t.src+' style="width:390px;height:100%;max-height:360px;object-fit:contain">',"发送截图",{dangerouslyUseHTMLString:!0,confirmButtonText:"发送",showCancelButton:!0,callback:(e,t)=>{if("confirm"==e){let e={content:URL.createObjectURL(o),fromUser:this.user,id:ae.cZ(),sendTime:hi(),status:"going",toContactId:this.currentChat.id,type:"image"};this.diySendMessage(e,o)}else t.close()}})}},convertImageToCanvas(e){let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},initMenus(e){const t=this.$createElement;let i=[{name:"messages",unread:this.unread},{name:"contacts"},{name:"files",title:"文件",unread:0,render:e=>t("i",{class:"el-icon-folder"}),renderContainer:()=>t(Qe,{attrs:{title:this.dialogTitle}})},{name:"mobile",title:"客户端下载",unread:0,render:e=>t("i",{class:"el-icon-mobile"}),click:()=>{window.open(window.BASE_URL+"downapp","_blank")},isBottom:!0},{name:"setting",title:"设置",unread:0,render:e=>t("i",{class:"el-icon-setting"}),renderContainer:()=>t(ct),isBottom:!0}];this.fullScreen&&i.push({name:"fullscrren",title:"全屏/窗口",unread:0,click:()=>{this.isFullscreen=!this.isFullscreen},render:e=>t("i",{class:"el-icon-full-screen"})}),e.initMenus(i)},getContact(e,t=null){const{IMUI:i}=this.$refs;let s=i.findContact(e);return!s&&t&&t.contactInfo&&(s=t.contactInfo,i.appendContact(s)),s},wrapKey(e){return 1==this.setting.sendKey?13==e.keyCode&&e.ctrlKey:13==e.keyCode&&!e.ctrlKey&&!e.shiftKey},setSendKey(e){return"Enter"===e.key||13===e.keyCode},handleMessageClick(e,t,i,s){if("status"==t)return s.updateMessage({id:i.id,status:"going"}),i.status="going",void this.diySendMessage(i,this.curFile);if("avatar"!=t){if("voice"==i.type){if(!this.playAudio)return this.currentMessage=i,this.playVoice(i,s);this.playAudio.pause(),this.playAudio=null,s.updateMessage({id:this.currentMessage.id,status:"successd",isPlay:0}),i.id!=this.currentMessage.id&&(this.currentMessage=i,this.playVoice(i,s))}var n=["image","file","video"];if(n.includes(i.type)){if(!i.preview)return this.$message.error("没有配置预览接口");this.$preview(i.preview)}else"webrtc"==i.type&&this.called(parseFloat(i.extends.type))}else{if(1==i.is_group&&0==this.currentChat.setting.profile&&this.currentChat.role>2)return void this.$message.error("已开启隐私,无法查看资料");if(i.fromUser.id==this.user.id)return;this.$user(i.fromUser.id)}},playVoice(e,t){this.playAudio=new Audio(e.content),this.playAudio.play(),t.updateMessage({id:e.id,status:"succeed",isPlay:1})},openChat(e,t){this.keywords="",t.changeContact(e)},handleChangeContact(e,t){this.isShowMsgWindow=!0,t.updateContact({id:e.id,unread:0}),1==e.is_notice&&(this.unread-=e.unread);const{IMUI:i}=this.$refs;this.initMenus(i),this.params.page=1,this.displayName=e.displayName,this.oldName=e.displayName,this.currentChat=e,this.expressionApiParams.language_code=this.currentChat.language_code,1==e.is_group&&(this.group_id!=e.id?this.getGroupUserList(e.id):this.setAtUserList(this.groupUser)),this.is_group=e.is_group,1==this.is_group?(this.group_id=e.id,this.notice=e.notice):i.setAtUserList([],!1);for(var s=[],n=i.getMessages(e.id),a=0;n.length>a;a++)0==n[a].is_read&&n[a].fromUser.id!=this.user.id&&(n[a]["contactInfo"]={},s.push(n[a]));s.length>0&&(this.$api.imApi.setMsgIsReadAPI({is_group:e.is_group,toContactId:e.id,messages:s,fromUser:e.id}),console.log("切换聊天窗口发的"),this.setLocalMsgIsRead(s)),t.closeDrawer()},setAtUserList(e){let t=[],i=!1;e.forEach(e=>{e.user_id!=this.user.id?t.push(e.userInfo):e.role<3&&(i=!0)}),this.$refs.IMUI.setAtUserList(t,i)},uploadVideo(e){if(!this.nospeak())return this.$message.error(this.noSimpleTips),!1;let t,i=e.srcElement.files[0],s=URL.createObjectURL(i),n=new Audio(s);n.addEventListener("loadedmetadata",function(e){t=n.duration});let a={content:s,fromUser:this.user,id:ae.cZ(),sendTime:hi(),status:"going",toContactId:this.currentChat.id,type:"video",extends:{duration:t}};this.diySendMessage(a,i),this.$refs.uploadVideo.value=""},sendVoice(e,t){if(!this.globalConfig.chatInfo.simpleChat&&0==this.is_group||!this.nospeak())return this.$message.error(this.noSimpleTips),!1;let i={content:URL.createObjectURL(t),fromUser:this.user,id:ae.cZ(),sendTime:hi(),status:"going",toContactId:this.currentChat.id,type:"voice",isPlay:0,extends:{duration:e}};this.VoiceStatus=!1,this.diySendMessage(i,t)},removeContact(e){const{IMUI:t}=this.$refs,i=t.getCurrentContact();i.id==e&&t.changeContact(null),t.removeContact(e)},diySendMessage(e,t){const{IMUI:i}=this.$refs;i.appendMessage(e,!0),this.handleSend(e,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{status:"succeed"};i.updateContact({id:e.toContactId,lastContent:i.lastContentRender(e),lastSendTime:e.sendTime}),i.CacheDraft.remove(e.toContactId),i.updateMessage(Object.assign(e,t))},t)},nospeak(){return!(1==this.is_group&&this.currentChat.setting.nospeak>0)||(1==this.currentChat.setting.nospeak&&this.currentChat.role<3||2==this.currentChat.setting.nospeak&&1==this.currentChat.role)},handleSend(e,t,i){const{IMUI:s}=this.$refs;if(e.is_group=this.is_group,this.curFile=i,!this.nospeak())return s.removeMessage(e.id),this.$message.error(this.noSimpleTips),!1;this.quote&&(e.pid=this.quote.msg_id,e.extends=this.quote);let n=new FormData;if(i){if(i.size>1024*this.globalConfig.fileUpload.size*1024)return s.removeMessage(e.id),this.$message.error("上传的内容不等大于"+this.globalConfig.fileUpload.size+"MB!");n.append("file",i),n.append("message",JSON.stringify(e)),this.$api.imApi.sendFileAPI(n).then(e=>{0==e.code?(s.setEditorValue(""),s.updateMessage(e.data),t()):t({status:"failed"})}).catch(e=>{t({status:"failed"})})}else this.closeQuote(),this.$api.imApi.sendMessageAPI(e).then(e=>{0==e.code?(s.setEditorValue(""),s.updateMessage(e.data),t()):t({status:"failed"})}).catch(e=>{t({status:"failed"})})},handlePullMessages(e,t,i){let s=this.params,n=i.getMessages(e.id);return n.length>0?(s.last_id=n[0].msg_id,s.page=1):s.last_id=0,s.toContactId=e.id,s.is_group=e.is_group,this.$api.imApi.getMessageListAPI(s).then(e=>{this.params.page++;let i=!1,s=e.data;s.length<this.params.limit&&(i=!0),t(s,i)}).catch(e=>{t([],!0)}),!0},customGetMsgList(e){0===this.filterIndex&&1==this.activeTab&&setTimeout(()=>{this.activeTab=0,this.$nextTick(()=>{this.$refs.tab1Ref.changeActive("0"),this.$refs.IMUI.updateContact({id:e.id,unread:0})})},500),this.IMUI.clearMessages()},publishNotice(){this.noticeBox=!1,this.$api.imApi.setNoticeAPI({id:this.group_id,notice:this.notice}).then(e=>{0==e.code&&this.$message({type:"success",message:"发布成功!"})})},openMsgBox(){this.ChatRecordMap={is_at:1},this.messageBox=!0,this.componentKey+=1,this.$refs.IMUI.updateContact({id:this.currentChat.id,is_at:0});let e=this.currentChat.is_at;this.atUnread-=e,this.currentChat.is_at=0},openNotice(){var e="<div style='white-space: break-spaces;word-break:break-all'>"+this.notice+"</div>";this.$alert(e,"群公告",{confirmButtonText:"确定",dangerouslyUseHTMLString:!0}).then(()=>{}).catch(()=>{})},openCreateGroup(){this.isAdd=1,this.dialogTitle="创建群聊",this.userIds=[],this.createChatBox=!0},changeOwner(){this.isAdd=2,this.dialogTitle="转让群聊",this.createChatBox=!0},openAddGroupUser(){var e=ae.mD(this.groupUser,"user_id");this.isAdd=0,this.userIds=e,this.dialogTitle="添加群成员",this.createChatBox=!0},manageGroup(e,t,i){this.createChatBox=!1;let s=this.globalConfig.chatInfo.groupUserMax;if(0==t){if(e.length+this.groupUser.length>s&&s>0)return this.$message.error("群成员不能大于"+s+"人!");this.$api.imApi.addGroupUserAPI({user_ids:e,id:this.group_id})}else if(1==t){if(e.length>s&&s>0)return this.$message.error("群成员不能大于"+s+"人!");this.$api.imApi.addGroupAPI({user_ids:e,name:i}).then(e=>{const t=e.data,{IMUI:i}=this.$refs;0==e.code&&(i.appendContact(t),i.changeContact(t.id))})}else this.$api.imApi.changeOwnerAPI({user_id:e[0],id:this.group_id}).then(t=>{const{IMUI:i}=this.$refs;0==t.code&&(this.$message({type:"success",message:t.msg}),this.groupSetting=!1,i.updateContact({id:this.group_id,role:3,owner_id:e[0]}),i.changeContact(null))})},forwardUser(e){if(e.length>5)return this.$message.error("转发的人数不能超过5人!");this.forwardBox=!1;var t=this.currentMessage;this.$api.imApi.forwardMessageAPI({user_ids:e,msg_id:t.msg_id})},getGroupUserList(e){this.$api.imApi.groupUserListAPI({group_id:e}).then(e=>{if(0==e.code){let t=e.data;this.groupUser=t,this.setAtUserList(t),this.groupUserCount=t.length}})},saveGroupName(e){if(this.displayName.length<1)return this.$notify({title:"警告",message:"名称不能为空!",type:"warning"}),this.isEdit=!1,!1;if(this.displayName!=this.oldName){const{IMUI:t}=this.$refs;this.$api.imApi.editGroupNameAPI({id:e.id,displayName:this.displayName}).then(i=>{t.updateContact({id:e.id,displayName:this.displayName})})}this.isEdit=!1},openGroupSetting(e){this.groupSetting=!0,this.contactSetting=e||this.currentChat,this.componentKey++},closeSearch(){var e=this;setTimeout(function(){e.searchResult=!1},300)},searchContact(e){""!=this.keywords&&(this.searchList=ae.l(e,["displayName","name_py"],this.keywords))},setLocalMsgIsRead(e){const{IMUI:t}=this.$refs;console.log(e,"要设为已读的消息列表");for(let i=0;e.length>i;i++){console.log(3040,e[i]);const s={id:e[i]["id"],is_read:1,status:"succeed",sendTime:parseInt(e[i]["sendTime"])+1,content:e[i]["content"]};t.updateMessage(s)}},sendMsgToParent(e){console.log(window.global_config.postMsgUrl,2793),window.parent.postMessage(e,window.global_config.postMsgUrl)},popNotice(e){console.log("我在客服端接受声音",e,3064);const{IMUI:t}=this.$refs;let i=e.fromUser?e.fromUser.displayName||e.fromUser.realname:"",s=t.lastContentRender(e);this.sendMsgToParent({body:i+":"+s,icon:e.fromUser?e.fromUser.avatar:"",type:"ReceiveMessages"})},recieveMsg(e){const{IMUI:t}=this.$refs,i=t.getCurrentContact();if(i.id==e.toContactId&&"system"!=i.id){var s=[];s.push(e),this.$api.imApi.setMsgIsReadAPI({toContactId:i.id,is_group:i.is_group,messages:s,fromUser:e.fromUser.id})}else if(this.user.id!=e.fromUser.id){let i=this.getContact(e.toContactId);1==i.is_notice&&this.unread++,this.initMenus(t)}this.user.id==e.toContactId&&(e.toContactId=e.toUser),"system"==e.toContactId&&t.updateContact({id:e.toContactId,lastContent:t.lastContentRender(e),lastSendTime:e.sendTime,unread:"+1"}),t.appendMessage(e,this.isBottom)},openMessageBox(){this.messageBox=!0,this.componentKey+=1},openSetting(){const{IMUI:e}=this.$refs;e.changeMenu("setting")},setNoSpeak(){this.noSpeakBox=!1,this.$api.imApi.setNoSpeakAPI(this.noSpeakData)},handleCommand(e){"addGroup"==e?this.openCreateGroup():this.addFriendBox=!0},rtcMsg(e){let t="",i="",s="";this.wsData&&(i=this.wsData.msg_id??"",s=this.wsData.id??"");let n=!0;switch(e.event){case"calling":s=ae.cZ();break;case"hangup":907==e.code&&this.$message.error("对方忙线中"),e.isbtn||(n=!1),this.wsData="",this.webrtcLock=!1;break;case"iceCandidate":let i={};i["candidate"]=e["iceCandidate"]["candidate"],i["sdpMLineIndex"]=e["iceCandidate"]["sdpMLineIndex"],i["sdpMid"]=e["iceCandidate"]["sdpMid"],t=JSON.stringify(i);break;case"mediaDevices":n=!1;break}n&&this.$api.imApi.sendToMsg({id:s,msg_id:i,toContactId:this.caller.id,type:this.is_video?1:0,event:e.event,status:e.status??"",code:e.code??"",callTime:e.callTime??"",sdp:e.sdp??"",iceCandidate:t}).then(t=>{0==t.code&&"calling"==e.event&&(this.wsData=t.data,r().set("wsData",t.data),this.recieveMsg(t.data)),"907"==t.data.extends.code&&this.$message.error("对方不在线")})},reconnect(){this.$refs.socket.initWebSocket()},closeSocket(){this.$refs.socket.close()},closeQuote(){this.quote=""},noSpeakExp(e){return 1e3*e>(new Date).getTime()&&ae.p6("m-d H:i",e)},eventBottom(e){this.isBottom=e},logout(){this.$confirm("你确定要退出聊天室吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})})}).catch(()=>{this.$message({type:"info",message:"已取消退出"})})}}},gi=mi,fi=(0,d.A)(gi,te,ie,!1,null,"1884a8c8",null),vi=fi.exports;var yi={name:"app",components:{message:vi},props:{dialogTableVisible:{type:Boolean,default:!1}},data(){return{unread:0,dialogIsShow:!0,params:{keyword:""}}},computed:{formatTime(){return function(e){return timeFormat(e)}}},watch:{dialogTableVisible(e){e&&this.$nextTick(()=>{this.dialogIsShow=e})}},created(){window.addEventListener("message",e=>{const t=e.data;1==t.isCustomerService&&console.log("在客服端666")})},mounted(){},methods:{closeDialog(){this.appList=!1,this.$nextTick(()=>{this.$emit("update:dialogTableVisible",!1)})},contactSync(e){this.dialogIsShow=!0,this.$emit("update:dialogTableVisible",!0)}}},bi=yi,Ci=(0,d.A)(bi,X,ee,!1,null,"5932af9a",null),xi=Ci.exports,wi={name:"Index",components:{Message:xi},data(){return{Background:Z,dialogTableVisible:!0,unread:0,allContacts:[],activeName:"first",techStack:[{icon:"el-icon-cpu",text:"后端:TP6+Mysql+workerman+webRTC中继服务。 <b class='c-success'>[开源]</b>"},{icon:"el-icon-news",text:"前端:vue2+element-ui+lemon-imui。 <b class='c-success'>[开源]</b>"},{icon:"el-icon-mobile",text:"移动端:uniapp for vue3+pinia。支持编译为小程序+h5+APP。<b class='c-red'>[联系作者,捐赠获取]</b>"},{icon:"el-icon-monitor",text:"桌面端:vue2(web端修改版)+electron。<b class='c-red'>[联系作者,捐赠获取]</b>"}],introduce:[{icon:"el-icon-chat-dot-square",text:this.$packageData.name+"是一个<b class='c-red'>开源的即时通信demo(存在一定的BUG),已取得软件著作权,主要用于学习交流,为大家提供即时通讯的开发思路</b>,许多功能需要自行开发,开发的初衷旨在快速建立企业内部通讯系统、内网交流、社交交流。"},{icon:"el-icon-cpu",text:"不建议用于商业用途,如确有需要商用,请联系作者授权,自行开发代码量必须要高于原代码量的30%以上,并注明相关的版权问题。"},{icon:"el-icon-office-building",text:"支持企业模式:类似于企业微信,初始化联系人是加载企业内的所有人员,无须加好友可以直接进行对话、创建群聊等,适用于企业内部通讯。"},{icon:"el-icon-chat-line-round",text:"支持社交模式:类似于微信或QQ,需要添加好友才能进行对话,适用于社交交流。社交模式支持加好友、删除好友、改备注等功能。"},{icon:"el-icon-discover",text:"选择适合自己项目的模式,然后在后台设置即可。社交模式体验需要自行搭建部署哦,可以在项目地址中看到相关的截图。"}]}},computed:{...(0,U.aH)({chatSocket:e=>e.unread,getContacts:e=>e.allContacts})},watch:{chatSocket(e){this.unread=e},getContacts(e){this.allContacts=e}},created(){},methods:{handleClick(e,t){console.log(e.name),this.activeName=e.name},showMessageBox(){this.dialogTableVisible?this.dialogTableVisible=!1:this.dialogTableVisible=!0},scrollTo(){window.scrollTo(0,document.body.scrollHeight)},downApp(){window.open(window.BASE_URL+"downapp")},openWeb(){window.location.href="https://www.shooyu.cn"}}},ki=wi,Ei=(0,d.A)(ki,J,W,!1,null,"61b525de",null),_i=Ei.exports,Ii=function(){var e=this,t=e._self._c;return t("div",{staticClass:"main-container"},[t("div",{staticClass:"msg-box"},[1==e.isCustomerService?t("kefuMsg"):t("userMsg")],1)])},Ai=[],Si=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{height:"100%",width:"100%"}},[t("div",{staticClass:"chat-box"},[t("lemon-imui",{ref:"IMUI",staticStyle:{"min-height":"600px"},attrs:{avatarCricle:e.setting.avatarCricle,"contact-contextmenu":e.contactContextmenu,contextmenu:e.contextmenu,height:e.curHeight,"hide-message-name":e.setting.hideMessageName,"hide-message-time":e.setting.hideMessageTime,latelyContacts:e.latelyContact,sendKey:e.setSendKey,theme:e.setting.theme,sendText:e.$t("发送"),loadendText:e.$t("暂无更多消息"),user:e.user,width:e.curWidth,wrapKey:e.wrapKey,hideMenu:"",simple:e.simple},on:{send:e.handleSend,"is-bottom":e.eventBottom,"menu-avatar-click":e.openSetting,"change-contact":e.handleChangeContact,"pull-messages":e.handlePullMessages,"message-click":e.handleMessageClick},scopedSlots:e._u([{key:"cover",fn:function(){return[t("div",[t("div",{staticClass:"cover"},[t("p",[t("b",[e._v(e._s(e.$t("正在为您转接,请稍后"))+"...")])])])])]},proxy:!0},{key:"sidebar-message",fn:function(i){return[t("div",{staticClass:"lemon-contact-item",class:1==i.is_top?"bg-gray":""},[t("el-badge",{staticClass:"lemon-badge lemon-contact__avatar",attrs:{hidden:i.unread<=0,"is-dot":0==i.is_notice,max:99,value:i.unread}},[t("span",{staticClass:"lemon-avatar",class:{"lemon-avatar--circle":e.setting.avatarCricle},staticStyle:{width:"40px",height:"40px","line-height":"40px","font-size":"20px"}},[t("img",{attrs:{src:i.avatar}})]),i.is_online&&0==i.is_group&&1==e.globalConfig.chatInfo.online?t("span",{staticClass:"online-status",attrs:{title:e.$t("在线")}}):e._e()]),t("div",{staticClass:"lemon-contact__inner"},[t("p",{staticClass:"lemon-contact__label"},[t("span",{staticClass:"lemon-contact__name"},[e._v(" "+e._s(i.displayName)+" ")]),t("span",{staticClass:"lemon-contact__time",domProps:{textContent:e._s(e.formatTime(i.lastSendTime))}})]),t("p",{staticClass:"lemon-contact__content lemon-last-content"},[t("span",{staticClass:"lastContent"},[i.is_at>0?t("span",{staticClass:"c-red"},[e._v("[有"+e._s(i.is_at)+"人@我] ")]):e._e(),t("span",{domProps:{innerHTML:e._s(i.lastContent)}})]),0==i.is_notice?t("span",{staticClass:"el-icon-close-notification f-16"}):e._e()])])],1)]}},{key:"message-title",fn:function(i){return[t("div",{staticClass:"message-title-box"},[t("div",[0==e.isEdit?t("span",[1==e.is_group?t("span",{staticClass:"displayName",on:{click:function(t){e.isEdit=!0}}},[e._v(" "+e._s(i.displayName)),t("span",{staticClass:"mr-5"},[e._v("("+e._s(e.groupUserCount)+")")]),i.setting&&1==i.setting.nospeak?t("el-tag",{attrs:{size:"mini",type:"warning"}},[e._v("仅群管理员可发言")]):e._e(),i.setting&&2==i.setting.nospeak?t("el-tag",{attrs:{size:"mini",type:"danger"}},[e._v("全员禁言中")]):e._e()],1):e._e(),e.is_group>1?t("span",{staticClass:"displayName"},[2==e.is_group?t("el-tag",{attrs:{size:"mini"}},[e._v("BOT")]):e._e(),e._v(" "+e._s(i.displayName)+" ")],1):e._e(),0==e.is_group?t("span",{staticClass:"displayName"},[e._v(" "+e._s(i.displayName)+" ")]):e._e(),parseInt(e.globalConfig.sysInfo.ipregion)&&i.last_login_ip?t("span",{staticClass:"c-999 f-12 ml-5"},[e._v(" "+e._s(i.last_login_ip)+" "+e._s(i.location)+" ")]):e._e()]):e._e(),1==e.isEdit?t("input",{directives:[{name:"model",rawName:"v-model",value:e.displayName,expression:"displayName"}],staticClass:"editInput",domProps:{value:e.displayName},on:{blur:function(t){return e.saveGroupName(i)},input:function(t){t.target.composing||(e.displayName=t.target.value)}}}):e._e()]),t("div",{staticClass:"message-title-tools"})])]}},{key:"sidebar-message-fixedtop",fn:function(i){return[e.wsStatus?e._e():t("div",{staticClass:"lz-flex no-internet pd-10 mb-10 lz-space-between lz-align-items-center"},[t("div",{staticClass:"el-icon-info"}),t("div",[e._v(e._s(e.$t("当前网络无法实时接收消息")))]),t("div",{staticClass:"el-icon-refresh cur-handle",attrs:{title:e.$t("重新链接")},on:{click:e.reconnect}})]),t("div",{staticClass:"page-header"},e._l(e.filterTabs,function(i,s){return t("div",{key:s,style:{background:e.filterIndex===s?"var(--el-color-primary)":"",color:e.filterIndex===s?"#f1f1f1":"#000"},on:{click:function(t){return e.changeFilterTab(s)}}},[e._v(" "+e._s(i.label)+" ")])}),0)]}},{key:"sidebar-message-top",fn:function(i){return[e.chatTopList.length>0?t("div",{staticClass:"chat-top-list"},e._l(e.chatTopList,function(s,n){return t("ChatTop",{key:n,attrs:{avatarCricle:e.setting.avatarCricle,contact:s,currentId:e.currentChat.id},nativeOn:{click:function(t){return e.openChat(s.id,i)}}})}),1):e._e()]}},{key:"sidebar-contact-fixedtop",fn:function(i){return[t("div",{staticStyle:{margin:"15px 10px"}},[e._v(" 联系人 ")])]}},{key:"message-side",fn:function(i){return[1==i.is_group?t("div",{staticClass:"slot-group-list lemon-wrapper",class:"blue"==e.setting.theme?"lemon-wrapper--theme-blue":""},[t("div",{staticClass:"group-side-box lemon-container"},[t("div",{staticClass:"group-notice"},[t("div",{staticClass:"group-side-title"},[t("h4",[e._v("群公告")]),t("div",[i.role<3||0==i.setting.manage?t("span",{staticClass:"el-icon-edit f-18 cur-handle",on:{click:function(t){e.noticeBox=!0}}}):e._e()])]),t("hr"),i.notice?t("div",{staticClass:"group-side-body",on:{click:e.openNotice}},[e._v(" "+e._s(i.notice)+" ")]):e._e(),i.notice?e._e():t("div",{staticClass:"group-side-body"},[e._v(" 暂无公告 ")])]),t("div",{staticClass:"group-user"},[t("div",{staticClass:"group-side-title"},[t("h4",[e._v("群成员")]),t("div",[i.role<3||1==i.setting.invite?t("span",{staticClass:"el-icon-circle-plus-outline f-18 cur-handle",on:{click:e.openAddGroupUser}}):e._e()])]),t("hr"),t("div",{staticClass:"group-user-body",style:[{height:"calc("+e.curHeight+" - 230px)",background:"blue"==e.setting.theme?"#ffffff":"#f4f4f4"}],attrs:{id:"group-user"}},[t("el-scrollbar",{staticStyle:{height:"100%"}},e._l(e.groupUser,function(i,s){return t("lemon-contact",{directives:[{name:"lemon-contextmenu",rawName:"v-lemon-contextmenu.contact",value:e.groupMenu,expression:"groupMenu",modifiers:{contact:!0}}],key:s,staticClass:"user-list",attrs:{contact:i}},[t("div",{staticClass:"user-avatar"},[t("el-avatar",{attrs:{size:20,src:i.userInfo.avatar}})],1),t("div",{staticClass:"user-name"},[i.userInfo.id==e.user.id?t("span",{staticClass:"fc-danger"},[e._v(e._s(i.userInfo.displayName)+"(我)")]):e._e(),i.userInfo.id!=e.user.id?t("span",[e._v(e._s(i.userInfo.displayName))]):e._e(),t("el-tooltip",{staticClass:"item",attrs:{content:"已禁言至:"+e.noSpeakExp(i.no_speak_time),effect:"dark",placement:"top"}},[e.noSpeakExp(i.no_speak_time)?t("span",{staticClass:"c-red ml-5 el-icon el-icon-turn-off-microphone"}):e._e()])],1),t("div",{staticClass:"user-role"},[1==i.role?t("el-tag",{attrs:{size:"mini",type:"danger"}},[e._v("群主")]):e._e(),2==i.role?t("el-tag",{attrs:{size:"mini",type:"warning"}},[e._v("管理员")]):e._e()],1)])}),1)],1)])])]):e._e()]}},{key:"message-after",fn:function(i){return[i.fromUser.id==e.user.id&&0==i.is_group&&1==e.globalConfig.user_show_kefu_read?t("span",{staticStyle:{visibility:"visible"}},[i.is_read||"succeed"!=i.status?e._e():t("span",[e._v(" "+e._s(e.$t("未读"))+" ")]),i.is_read&&"succeed"==i.status?t("span",{staticClass:"fc-success"},[e._v(" "+e._s(e.$t("已读"))+" ")]):e._e()]):e._e()]}},{key:"editor-footer",fn:function(){return[t("div",{staticClass:"lz-flex lz-space-between lz-align-items-center"},[e.currentChat.is_at?t("div",{staticClass:"at-item cur-handle mr-10",on:{click:function(t){return e.openMsgBox()}}},[e._v("有"+e._s(e.currentChat.is_at)+"人提到你 ")]):e._e(),e.quote?t("div",{staticClass:"message-quote cur-handle mr-10 lz-flex lz-space-between lz-align-items-center"},[t("div",{staticClass:"text-overflow"},[e._v(e._s(e.quote.content))]),t("div",{staticClass:"el-icon-close",on:{click:function(t){return e.closeQuote()}}})]):e._e(),t("div")])]},proxy:!0}])})],1),t("Group",{attrs:{groupId:e.group_id,isAdd:e.isAdd,title:e.dialogTitle,userIds:e.userIds,visible:e.createChatBox},on:{"update:visible":function(t){e.createChatBox=t},manageGroup:e.manageGroup}}),t("el-dialog",{attrs:{modal:!0,visible:e.noticeBox,"append-to-body":"",title:"发布公告",width:"500px"},on:{"update:visible":function(t){e.noticeBox=t}}},[t("el-input",{attrs:{rows:10,placeholder:"请输入内容",type:"textarea"},model:{value:e.notice,callback:function(t){e.notice=t},expression:"notice"}}),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.noticeBox=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.publishNotice}},[e._v("确定")])],1)],1),t("addFriend",{attrs:{visible:e.addFriendBox},on:{"update:visible":function(t){e.addFriendBox=t}}}),t("ChooseDialog",{attrs:{allUser:e.allUser,visible:e.forwardBox,title:"转发聊天"},on:{"update:visible":function(t){e.forwardBox=t},selectChat:e.forwardUser}}),t("el-dialog",{attrs:{modal:!0,visible:e.messageBox,"append-to-body":"",title:e.$t("消息管理器"),width:"90%",top:"5vh"},on:{"update:visible":function(t){e.messageBox=t}}},[t("ChatRecord",{key:e.componentKey,attrs:{condition:e.ChatRecordMap,contact:e.currentChat}})],1),t("el-dialog",{attrs:{modal:!0,visible:e.groupSetting,"append-to-body":"",title:"群设置",width:"500px"},on:{"update:visible":function(t){e.groupSetting=t}}},[t("ChatSet",{key:e.componentKey,attrs:{contact:e.contactSetting},on:{changeOwner:e.changeOwner}})],1),t("el-dialog",{attrs:{modal:!0,visible:e.VoiceStatus,"append-to-body":"","custom-class":"no-padding","destroy-on-close":"",title:"语音录制",width:"500px"},on:{"update:visible":function(t){e.VoiceStatus=t}}},[t("voice-recorder",{on:{send:e.sendVoice}})],1),t("el-dialog",{attrs:{visible:e.noSpeakBox,"append-to-body":"","destroy-on-close":"",title:"设置禁言",width:"500px"},on:{"update:visible":function(t){e.noSpeakBox=t}}},[t("el-radio-group",{staticClass:"mb-20",attrs:{size:"small"},on:{change:function(t){e.noSpeakData.noSpeakDay=1}},model:{value:e.noSpeakData.noSpeakTimer,callback:function(t){e.$set(e.noSpeakData,"noSpeakTimer",t)},expression:"noSpeakData.noSpeakTimer"}},[t("el-radio",{attrs:{border:"",label:"1"}},[e._v("10分钟")]),t("el-radio",{attrs:{border:"",label:"2"}},[e._v("1小时")]),t("el-radio",{attrs:{border:"",label:"3"}},[e._v("3小时")]),t("el-radio",{attrs:{border:"",label:"4"}},[e._v("1天")])],1),t("div",[e._v(" 自定义 "),t("el-input-number",{staticClass:"ml-10 mr-10",attrs:{max:365,min:1,label:"自定义"},on:{change:function(t){e.noSpeakData.noSpeakTimer=0}},model:{value:e.noSpeakData.noSpeakDay,callback:function(t){e.$set(e.noSpeakData,"noSpeakDay",t)},expression:"noSpeakData.noSpeakDay"}}),e._v(" 天 ")],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.noSpeakBox=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.setNoSpeak()}}},[e._v("确定")])],1)],1),t("group-qr",{attrs:{contact:e.currentChat,visible:e.groupQrShow},on:{"update:visible":function(t){e.groupQrShow=t}}}),t("Socket",{ref:"socket",on:{getIsSign:e.getIsSign}}),t("webrtc",{key:e.componentKey,ref:"webrtc",attrs:{alias:e.$packageData.name,config:e.webrtcConfig,contact:e.currentChat,userInfo:e.user},on:{message:e.rtcMsg}}),t("el-dialog",{attrs:{visible:e.evaluateShow,title:e.$t("评价"),width:"400px"},on:{"update:visible":function(t){e.evaluateShow=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:()=>{e.evaluateShow=!1,e.evaluateValue=0}}},[e._v(e._s(e.$t("取消")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.confirmEvaluate}},[e._v(e._s(e.$t("确定")))])]},proxy:!0}])},[t("div",{staticStyle:{width:"100%",display:"flex","justify-content":"center"}},[t("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center"}},[t("div",{staticStyle:{"margin-bottom":"20px"}},[e.evaluateValue?e._e():t("span",[e._v(e._s(e.$t("请对本次服务进行评分")))]),e._v(" "+e._s([e.$t("非常不满意"),e.$t("不满意"),e.$t("一般"),e.$t("满意"),e.$t("非常满意")][e.evaluateValue-1])+" ")]),t("el-rate",{staticStyle:{transform:"scale(1.5)"},model:{value:e.evaluateValue,callback:function(t){e.evaluateValue=t},expression:"evaluateValue"}})],1)])]),t("el-dialog",{attrs:{visible:e.complaintShow,title:e.$t("投诉"),width:"300px"},on:{"update:visible":function(t){e.complaintShow=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{staticStyle:{width:"calc(50% - 5px)"},on:{click:()=>{e.complaintShow=!1,e.complaintForm.complaint_item_id=null,e.complaintForm.remark=""}}},[e._v(e._s(e.$t("取消")))]),t("el-button",{staticStyle:{width:"calc(50% - 5px)"},attrs:{type:"primary"},on:{click:e.complaint}},[e._v(e._s(e.$t("确定")))])]},proxy:!0}])},[t("el-form",{attrs:{"label-position":"top"},model:{value:e.complaintForm,callback:function(t){e.complaintForm=t},expression:"complaintForm"}},[t("el-form-item",{attrs:{label:e.$t("投诉项")}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("请选择")},model:{value:e.complaintForm.complaint_item_id,callback:function(t){e.$set(e.complaintForm,"complaint_item_id",t)},expression:"complaintForm.complaint_item_id"}},e._l(e.complaintList,function(e,i){return t("el-option",{key:i,attrs:{label:e.label,value:e.value}})}),1)],1),t("el-form-item",{attrs:{label:e.$t("投诉原因")}},[t("el-input",{attrs:{type:"textarea"},model:{value:e.complaintForm.remark,callback:function(t){e.$set(e.complaintForm,"remark",t)},expression:"complaintForm.remark"}})],1)],1)],1),t("el-dialog",{attrs:{visible:e.youMayAskShow,title:e.$t("猜你想问"),width:"80%",top:"5vh"},on:{"update:visible":function(t){e.youMayAskShow=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:function(t){e.youMayAskShow=!1}}},[e._v("取消")])]},proxy:!0}])},[t("div",{staticClass:"expression-search-box"},[t("el-input",{staticStyle:{flex:"1"},attrs:{placeholder:e.$t("请输入你想问"),clearable:""},on:{input:e.youMayAskInputChange},model:{value:e.youMayAskApiParams.keyword,callback:function(t){e.$set(e.youMayAskApiParams,"keyword",t)},expression:"youMayAskApiParams.keyword"}})],1),t("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.youMayAskLoad,expression:"youMayAskLoad"}],staticClass:"expression-box"},[e._l(e.youMayAskList,function(i,s){return t("div",{key:s,staticClass:"expression-box-item",on:{click:function(t){return e.selectYouMayAskItem(i)}}},[e._v(" "+e._s(i.name)+" ")])}),e.youMayAskList.length?t("div",[e.youMayAskList.length<e.youMayAskCount?t("div",[e._v(e._s(e.$t("加载中"))+" "),t("i",{staticClass:"el-icon-loading"})]):t("div",{staticStyle:{"text-align":"center",padding:"10px 0"}},[e._v(e._s(e.$t("没有更多了")))])]):e._e(),e.youMayAskList.length?e._e():t("el-empty",{staticStyle:{"margin-top":"20%"},attrs:{description:"暂无数据"}})],2)])],1)},Ti=[];const Mi=function(){return document.addEventListener?function(e,t,i){e&&t&&i&&e.addEventListener(t,i,!1)}:function(e,t,i){e&&t&&i&&e.attachEvent("on"+t,i)}}();(function(){document.removeEventListener})();function Di(e){const t=/<span\s+class=["']\s*chat-grid-input chat-stat\s*["']>(.*?)<\/span>/gi;let i,s=!1,n=!0;while(null!==(i=t.exec(e))){s=!0;const e=i[1];if(""!==e.trim()){n=!1;break}}return!!s&&n}const Li=()=>(new Date).getTime(),Ni=r().get("UserInfo");var Ui={name:"app",components:{Socket:ue,ChatRecord:he.A,ChatSet:ye,ChatTop:Ee,VoiceRecorder:Le,webrtc:Lt,Group:Ne.A,groupQr:Be,Files:Qe,addFriend:mt,Setting:ct,ChooseDialog:Fe.A,OnlineStatus:Ct,imTab:It,Apply:Rt,tab1:Kt,tab2:Zt,tab3:ni},props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},fullScreen:{type:Boolean,default:!1}},data(){const e=this.$createElement;var t=this;let i=this.$store.state.globalConfig.chatInfo;return{filterTabs:[{label:t.$t("个人"),value:0},{label:t.$t("团体"),value:1},{label:t.$t("排队"),value:2}],filterIndex:0,isCustomerService:0,ConversationList:[],isSign:0,lastSendTime:0,evaluateShow:!1,evaluateValue:!1,complaintShow:!1,complaintList:[],complaintForm:{complaint_item_id:null,remark:""},youMayAskShow:!1,youMayAskApiParams:{keyword:"",limit:30,page:1},youMayAskList:[],youMayAskCount:0,debounceTimer:null,simple:!0,isBtnDisabled:!1,firstUser:{},noSimpleTips:"群已开启禁言,无法发送消息",isFullscreen:!1,curWidth:this.width,curHeight:this.height,unread:0,atUnread:0,webrtcConfig:i,wsData:null,webrtcLock:!1,caller:"",is_video:1,curFile:null,componentKey:1,searchResult:!1,addFriendBox:!1,createChatBox:!1,forwardBox:!1,noticeBox:!1,messageBox:!1,webrtcBox:!1,groupSetting:!1,VoiceStatus:!1,groupQrShow:!1,ChatRecordMap:{},contactSetting:{},groupUserCount:0,dialogTitle:"创建群聊",isAdd:1,userIds:[],noSpeakData:{noSpeakTimer:0,noSpeakDay:1,user_id:0,id:0},curGroupUser:{},notice:"",searchList:[],keywords:"",displayName:"",oldName:"",isEdit:!1,isBottom:!0,user:{id:Ni.user_id,displayName:Ni.realname,avatar:Ni.avatar,account:Ni.account},params:{page:1,limit:10},is_group:0,group_id:"",contacts:[],allUser:[],groupUser:[],currentChat:{},currentMessage:{},lastMessages:[],chatTopList:[],playAudio:null,activeTab:0,tabList:[{name:"所有",count:0},{name:"未读",count:0},{name:"@我",count:0}],quote:"",noSpeakBox:!1,groupMenu:[{text:"发送消息",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;s.changeContact(n.user_id),i()},visible:e=>e.contact.user_id!=this.user.id&&1==this.globalConfig.sysInfo.runMode},{text:"@TA",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;s.setUserTag(n.userInfo),i()},visible:e=>e.contact.user_id!=this.user.id},{text:"设置管理员",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i(),this.$confirm("确定设置该成员为管理员吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.setManagerAPI({id:this.group_id,user_id:n.user_id,role:2}),this.$message({type:"success",message:"设置成功!"})})},visible:e=>3==e.contact.role&&this.currentChat.owner_id==this.user.id},{text:"取消管理员",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i(),this.$confirm("确定取消该成员的管理员权限吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.setManagerAPI({id:this.group_id,user_id:n.user_id,role:3}),this.$message({type:"success",message:"取消成功!"})})},visible:e=>2==e.contact.role&&this.currentChat.owner_id==this.user.id},{text:"设置禁言",click:(e,t,i)=>{this.noSpeakBox=!0;const{IMUI:s,contact:n}=t;this.noSpeakData.user_id=n.user_id,this.noSpeakData.id=this.group_id,i()},visible:e=>e.contact.user_id!=this.user.id&&e.contact.role>1&&this.currentChat.role<=2},{text:"查看资料",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i();let a=this.getContact(n.user_id),o=s.getCurrentContact();1==o.setting.profile||o.role<3||a||n.user_id==this.user.id?this.$user(n.user_id):this.$message.error("已开启隐私,无法查看资料")},visible:e=>e.contact.user_id!=this.user.id},{text:"移出群聊",color:"red",click:(e,t,i)=>{const{IMUI:s,contact:n}=t;i(),this.$confirm("确定移除该成员吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.removeUserAPI({id:this.group_id,user_id:n.user_id})})},visible:e=>e.contact.user_id!=this.user.id&&this.currentChat.owner_id!=e.contact.user_id&&this.currentChat.role<=2}],contactContextmenu:[{click(e,i,s){const{IMUI:n,contact:a}=i;t.$user(a.user_id),s()},icon:"el-icon-tickets",text:t.$t("查看资料"),visible:e=>0==e.contact.is_group}],contextmenu:[{click:(i,s,n)=>{const{IMUI:a}=s,o=JSON.parse(JSON.stringify(s.message));this.$api.imApi.undoMessageAPI({id:o.id}).then(i=>{const s={id:o.id,type:"event",content:e("div",[e("span",[t.$t("你撤回了一条消息")," ",e("span",{directives:[{name:"show",value:"text"==o.type}],style:"color:#409EFF;cursor:pointer",attrs:{content:o.content,data:o.type},on:{click:e=>{a.setEditorValue(e.target.getAttribute("content"))}}},["重新编辑"])])]),toContactId:o.toContactId,sendTime:o.sendTime};a.updateMessage(s);const n=a.getMessages(o.toContactId);o.id==n[n.length-1].id&&a.updateContact({id:o.toContactId,lastContent:t.$t("你撤回了一条消息")})}).catch(e=>{this.$message.error("发生错误"+e)}),n()},visible:e=>{const{IMUI:t,message:i}=e;let s=3;if(1==e.message.is_group){let e=t.getCurrentContact();s=e.role}return 0!=this.globalConfig.user_cancel_message&&(this.globalConfig.user_cancel_message_time&&Number(this.globalConfig.user_cancel_message_time)>0?e.message.fromUser.id==this.user.id&&!ui(i.sendTime,Number(this.globalConfig.user_cancel_message_time))||s<3:e.message.fromUser.id==this.user.id&&Li()-e.message.sendTime<1e3*this.globalConfig.chatInfo.redoTime||s<3)},text:"撤回消息"},{text:"@TA",click:(e,t,i)=>{const{IMUI:s,message:n}=t;s.setUserTag(n.fromUser),i()},visible:e=>e.message.fromUser.id!=this.user.id&&1==e.message.is_group},{text:"引用",click:(e,t,i)=>{let s=t.message,n=/<[^>]+>/g,a=s.content.replace(n,"");"text"!=s.type&&(a=ae.iq(s.type));let o={msg_id:s.msg_id,content:s.fromUser.displayName+":"+a,user_id:s.fromUser.id,realname:s.fromUser.displayName};if(this.quote=o,this.is_group&&o.user_id!=this.user.id){const{IMUI:e}=this.$refs;e.setUserTag(s.fromUser)}i()}},{visible:e=>"image"==e.message.type,text:"复制图片",click:async(e,t,i)=>{i();try{const{message:e}=t,i=await fetch(e.download),s=await i.blob(),n=new Blob([s],{type:"image/png"}),a=new ClipboardItem({"image/png":n});await navigator.clipboard.write([a]),this.$message({type:"success",message:this.$t("图片复制成功")+"!"})}catch(s){this.$message.error(this.$t("复制图片失败")+":"+s)}}},{visible:e=>"text"==e.message.type,text:"复制文字",click:(e,t,i)=>{this.$clipboard(t.message.content),this.$message({type:"success",message:this.$t("复制成功")+"!"}),i()}},{visible:e=>"image"==e.message.type,text:this.$t("下载图片"),click:(e,t,i)=>{const{message:s}=t;i(),s.download&&(window.location=s.download)}},{visible:e=>"file"==e.message.type,text:this.$t("下载文件"),click:(e,t,i)=>{const{message:s}=t;window.open(s.download),i()}},{text:this.$t("删除消息"),color:"red",click:(e,t,i)=>{const{IMUI:s,message:n}=t;this.$confirm(this.$t("删除消息会从所有人的聊天记录中抹掉,是否确定")+"?",this.$t("提示"),{confirmButtonText:this.$t("确定"),cancelButtonText:this.$t("取消"),type:"warning"}).then(()=>{this.$api.imApi.delMessageAPI({id:n.id}).then(e=>{0==e.code&&(this.$message({type:"success",message:this.$t("删除成功")+"!"}),s.removeMessage(n.id))})}).catch(()=>{this.$message({type:"info",message:this.$t("已取消")})}),i()},visible:e=>e.message.fromUser.id==this.user.id&&e.message.is_group<2&&this.globalConfig.chatInfo.dbDelMsg}]}},computed:{...(0,U.aH)({wsStatus:e=>e.wsStatus,socketAction:e=>e.socketAction,contactId:e=>e.toContactId,contactSync:e=>e.contactSync,setting:e=>e.setting,userInfo:e=>e.userInfo,globalConfig:e=>e.globalConfig}),formatTime(){return function(e){return ae.DC(e)}}},watch:{isFullscreen(e){r().set("isFullscreen",e),this.curWidth=e?"100vw":this.width,this.curHeight=e?"100vh":this.height},playAudio(e){if(e&&this.currentMessage){let e=this.currentMessage;var t=this;const{IMUI:i}=this.$refs;this.playAudio.addEventListener("ended",function(){t.playAudio=null,t.currentMessage=null,i.updateMessage({id:e.id,status:"successd",isPlay:0})},!1)}},contactSync(e){this.$emit("newChat",e);const{IMUI:t}=this.$refs;t.changeContact(this.contactId)},unread(e){this.tabList[1].count=e,this.$store.commit("updateUnread",e)},atUnread(e){this.tabList[2].count=e},keywords(){const{IMUI:e}=this.$refs,t=e.getContacts();this.searchContact(t)},socketAction(e){const t=this.$createElement;let i=e.data;const{IMUI:s}=this.$refs;let n=r().get("client_id");switch(e.type){case"handleChat":this.popNotice(i),this.getSimpleChat();case"isOnline":s.updateContact({id:i.id,is_online:i.is_online,is_busy:i.is_busy}),i.is_online||this.webrtcLock!=i.id||(this.webrtcLock=!1);break;case"offline":if(1==parseInt(this.globalConfig.sysInfo.multipleLogin))return;i.id!=this.user.id||i.client_id==n||i.isMobile||(this.$message.error=`${this.$t("您的账号在其他地方登录,已被迫下线")}!`,this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})}));break;case"simple":case"group":if(i.fromUser.id!=this.user.id){let e=this.getContact(i.toContactId,i);if(1==i.is_group&&i.toContactId!=this.currentChat.id){let t=0;i.at.includes(this.user.id)&&(t=1),this.$refs.IMUI.updateContact({id:i.toContactId,is_at:e.is_at+t}),this.atUnread+=t}this.setting.isVoice&&1==e.is_notice&&i.toContactId!=this.currentChat.id&&this.popNotice(i)}this.recieveMsg(i);break;case"undoMessage":if(i.from_user==this.user.id&&0==i.isMobile&&Li()-i.sendTime<1e3*this.globalConfig.chatInfo.redoTime)return!1;s.updateMessage(i);const a=s.getMessages(i.toContactId);i.id==a[a.length-1].id&&s.updateContact({id:i.toContactId,lastContent:"对方撤回了一条消息"});break;case"delMessage":s.removeMessage(i.id);break;case"updateMessage":s.updateMessage(i);break;case"setChatTop":s.updateContact({id:i.id,is_top:i.is_top});break;case"setIsNotice":s.updateContact({id:i.id,is_notice:i.is_notice});break;case"editGroupName":s.updateContact({id:i.id,displayName:i.displayName});const o={id:ae.cZ(),type:"event",content:t("div",[t("span",[i.editUserName," 修改了群名为 ",i.displayName])]),toContactId:i.id,sendTime:Li()};s.appendMessage(o,!0);break;case"isRead":this.setLocalMsgIsRead(i);break;case"readAll":let c=s.getMessages(i.toContactId);c.forEach(e=>{if(0==e.is_read){const t={id:e.id,is_read:1,status:"succeed",sendTime:parseInt(e.sendTime)+1,content:e.content};s.updateMessage(t)}});break;case"addGroup":i.owner_id!=this.user.id&&s.appendContact(i),this.$api.commonApi.bindGroupAPI({client_id:n,group_id:i.id});break;case"setManager":case"addGroupUser":case"removeUser":i.group_id==this.group_id&&this.getGroupUserList(i.group_id),"removeUser"==e.type&&i.user_id==this.user.id?this.removeContact(i.group_id):s.updateContact({id:i.group_id,avatar:i.avatar});break;case"setNoSpeak":i.group_id==this.group_id&&this.getGroupUserList(i.group_id);break;case"removeGroup":this.removeContact(i.group_id);break;case"clearMessage":s.clearMessages(i.group_id),this.groupSetting=!1,s.updateContact({id:i.group_id,lastContent:""}),i.group_id==this.currentChat.id&&(s.changeContact(null),setTimeout(()=>{s.changeContact(i.group_id)},100));break;case"updateConfig":this.$store.commit("setGlobalConfig",i);break;case"setNotice":s.updateContact({id:i.group_id,notice:i.notice}),s.appendMessage({id:ae.cZ(),type:"event",content:t("div",[t("span",["管理员 发布了公告: ",i.notice])]),toContactId:i.group_id,sendTime:Li()},!0);break;case"groupSetting":s.updateContact({id:i.group_id,setting:i.setting}),this.currentChat.id==i.group_id&&(this.currentChat.setting=i.setting);break;case"appendContact":s.appendContact(i);break;case"webrtc":if(i.fromUser.id==this.user.id){let e=i.extends,t=r().get("wsData");return[902,903,905,906,907].includes(parseInt(e.code))&&(t.content=i.content,s.updateMessage(t),this.webrtcLock=!1),0==e.isMobile||"calling"==e.event?void("calling"==e.event&&(r().set("wsData",i),this.recieveMsg(i))):void("otherOpt"==e.event&&(t.content=i.content,s.updateMessage(t),this.wsData=null,this.caller="",this.webrtcLock=!1,this.$refs.webrtc.hangup(!1)))}if(this.wsData&&this.wsData.id!=i.id)this.$api.imApi.sendToMsg({toContactId:i.fromUser.user_id,type:i.extends.type,event:"busy",status:i.extends.status,code:907,id:i.id,msg_id:i.msg_id});else{if("calling"==i.extends.event)this.recieveMsg(i),this.wsData=i,r().set("wsData",i),this.caller=i.fromUser;else if("offer"==i.extends.event||"answer"==i.extends.event)this.webrtcLock=i.fromUser.user_id;else if("hangup"==i.extends.event){let e=r().get("wsData");e.content=i.content,s.updateMessage(e),this.webrtcLock=!1}this.wsData&&this.wsData.id==i.id&&this.$refs.webrtc.webrtcAction(JSON.parse(JSON.stringify(i)))}break}}},created(){this.$user=function(){};let e=this.$store.state.userInfo;e&&(this.user={id:e.user_id,displayName:e.realname,avatar:e.avatar,account:e.account}),window.Notification?"granted"==Notification.permission?console.log("允许通知"):"denied"!=Notification.permission&&(console.log("需要通知权限"),Notification.requestPermission(e=>{})):console.error("浏览器不支持Notification"),window.addEventListener("message",e=>{const t=e.data;1==t.isCustomerService&&(this.isCustomerService=1)}),window.handleCustomService=()=>{console.log("转人工",16),this.$api.custom.enterpriseImTransferHuman()},window.openLeft=(e=!1)=>{this.simple=e},window.getIMUI=()=>{console.log(this.$refs.IMUI)}},mounted(){this.fullScreen&&(this.isFullscreen=r().get("isFullscreen")),this.searchResult&&document.addEventListener("click",function(e){that.$refs.configforms.contains(e.target)||(that.searchResult=!1)}),this.getSimpleChat()},methods:{debounce(e,t=500){let i=this,s=null;return function(...n){s&&clearTimeout(s),i.isBtnDisabled=!0,s=setTimeout(()=>{e.apply(this,n),i.isBtnDisabled=!1,s=null},t)}},realCustomerServiceHandle(){this.$api.custom.enterpriseImTransferHuman()},handleCustomerServiceClick(){this.debounce(this.realCustomerServiceHandle,500)()},getIsSign(e){this.isSign=e,console.log(e,"是否需要签到6")},changeFilterTab(e){this.filterIndex=e,this.activeTab=0},confirmEvaluate(){},openComplaint(){this.complaintShow=!0,this.$api.custom.complaintList().then(e=>{this.complaintList=e.data.list.map(e=>({...e,label:e.name,value:e.id}))})},complaint(){this.$api.custom.complaint(this.complaintForm).then(e=>{this.complaintShow=!1,this.complaintForm.complaint_item_id=null,this.complaintForm.remark="",this.$message.success(e.msg)})},youMayAskLoad(){this.$api.custom.enterpriseUserGuessask(this.youMayAskApiParams).then(e=>{this.youMayAskCount=e.data.count,this.youMayAskList.length<e.data.count&&(this.youMayAskList=this.youMayAskList.concat(e.data.list))})},selectYouMayAskItem(e){this.youMayAskShow=!1;const{IMUI:t}=this.$refs;let i=JSON.parse(localStorage.getItem("UserInfo")).data;this.$api.custom.enterpriseUserGuessaskClick({id:e.id}).then(e=>{}),this.$api.imApi.sendMessageAPI({id:(0,ae.Ij)(),type:"text",status:"going",sendTime:Date.now(),toContactId:this.currentChat.id,fromUser:{id:i.user_id,displayName:i.displayName,avatar:i.avatar,account:i.account},content:`<p><span class="chat-grid-input chat-stat">${e.name}</span></p>`,file_id:0,is_group:0}).then(e=>{0==e.code&&(t.setEditorValue(""),t.updateMessage(e.data))}).catch(e=>{})},youMayAskInputChange(e){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.youMayAskApiParams.keyword=e,this.$api.custom.enterpriseUserGuessask(this.youMayAskApiParams).then(e=>{this.youMayAskCount=e.data.count,this.youMayAskList=e.data.list})},300)},called(e){return parseInt(this.globalConfig.chatInfo.webrtc)?this.globalConfig.chatInfo.simpleChat?void(this.webrtcLock?this.$message.error("其他端正在通话中"):(this.webrtcBox=!0,this.is_video=e,this.caller=this.currentChat,this.$refs.webrtc.called(e))):this.$message.error("当前系统已关闭单聊功能"):this.$message.error("当前系统未开启音视频通话功能")},changeTab(e,t){this.activeTab=t},latelyContact(e){let t=["admin_notice","system",-1],i=e.filter(e=>!t.includes(e.id));return i.sort((e,t)=>t.lastSendTime-e.lastSendTime),i.sort((e,t)=>t.is_top-e.is_top),this.ConversationList=i,i[0]&&this.$refs.IMUI&&this.$refs.IMUI.changeContact(i[0].id),i},getSimpleChat(e){const t=this.$createElement;this.$nextTick(()=>{const i=this.$refs.IMUI;this.IMUI=i,i.setLastContentRender("voice",e=>"[语音]"),i.setLastContentRender("video",e=>"[视频]"),i.setLastContentRender("webrtc",e=>"[音视频通话]");let s=[{name:"uploadImage",title:"发送图片"},{name:"uploadVideo",title:"发送视频",click:()=>{var e=this.$refs.uploadVideo;e.click()},render:()=>t("i",{class:"el-icon el-icon-video-play f-18",style:"vertical-align: middle;font-weight: 600;"},[t("input",{style:"display:none",attrs:{type:"file",accept:"video/*"},ref:"uploadVideo",on:{change:e=>{this.uploadVideo(e)}}})])},{name:"uploadFile",title:"发送文件"},{name:"msgBox",title:"消息管理器",click:()=>{this.ChatRecordMap={},this.messageBox=!0,this.componentKey+=1},render:()=>t("i",{class:"el-icon el-icon-time f-18",style:"vertical-align: middle;"}),isRight:!0}];i.initEditorTools(s),i.initEmoji(ne),this.$api.imApi.getContactsAPI().then(s=>{const n=[...s.data][0];this.firstUser=[...s.data][0];const a=s.data;this.contacts=a;var o={};if(a.forEach((t,s)=>{t.type&&(o.type=t.type,o.content=t.lastContent,a[s]["lastContent"]=i.lastContentRender(o)),t.unread&&!e&&1==t.is_notice&&(this.unread+=t.unread),t.is_at&&(this.atUnread+=t.is_at)}),2==this.globalConfig.sysInfo.runMode){const e={id:"system",displayName:"新邀请",name_py:"xinyaoqing",avatar:jt,is_group:2,index:"[1]系统消息",click(e){e()},renderContainer:()=>t(Rt),lastSendTime:s.page,lastContent:s.page?"新的申请":"",unread:parseInt(s.count),is_notice:1};this.unread+=s.count,a.push({...e})}if(this.$store.commit("initContacts",a),i.initContacts(a),this.lastMessages=i.lastMessages,this.initMenus(i),n){let e=setTimeout(()=>{i.changeContact(n.user_id),clearTimeout(e)},200)}})})},shotScreen(){new Bt.A({enableWebRtc:!0,level:999999,completeCallback:this.callback,closeCallback:this.closeShotScreen})},closeShotScreen(){console.log("关闭截图")},callback(e){let t=new Image;t.src=e.base64,t.onload=()=>{let e=this.convertImageToCanvas(t),i=e.toDataURL("image/jpeg"),s=window.atob(i.split(",")[1]),n=new ArrayBuffer(s.length),a=new Uint8Array(n);for(let t=0;t<s.length;t++)a[t]=s.charCodeAt(t);let o=new File([n],"screenShot"+ae.cZ()+".jpg",{type:"image/jpeg"});this.$confirm("<img src="+t.src+' style="width:390px;height:100%;max-height:360px;object-fit:contain">',"发送截图",{dangerouslyUseHTMLString:!0,confirmButtonText:"发送",showCancelButton:!0,callback:(e,t)=>{if("confirm"==e){let e={content:URL.createObjectURL(o),fromUser:this.user,id:ae.cZ(),sendTime:Li(),status:"going",toContactId:this.currentChat.id,type:"image"};this.diySendMessage(e,o)}else t.close()}})}},convertImageToCanvas(e){let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},initMenus(e){const t=this.$createElement;let i=[{name:"messages",unread:this.unread},{name:"contacts"},{name:"files",title:"文件",unread:0,render:e=>t("i",{class:"el-icon-folder"}),renderContainer:()=>t(Qe,{attrs:{title:this.dialogTitle}})},{name:"mobile",title:"客户端下载",unread:0,render:e=>t("i",{class:"el-icon-mobile"}),click:()=>{window.open(window.BASE_URL+"downapp","_blank")},isBottom:!0},{name:"setting",title:"设置",unread:0,render:e=>t("i",{class:"el-icon-setting"}),renderContainer:()=>t(ct),isBottom:!0}];this.fullScreen&&i.push({name:"fullscrren",title:"全屏/窗口",unread:0,click:()=>{this.isFullscreen=!this.isFullscreen},render:e=>t("i",{class:"el-icon-full-screen"})}),e.initMenus(i)},getContact(e,t=null){const{IMUI:i}=this.$refs;let s=i.findContact(e);return!s&&t&&t.contactInfo&&(s=t.contactInfo,i.appendContact(s)),s},wrapKey(e){return"Enter"===e.key&&e.ctrlKey||13===e.keyCode&&e.ctrlKey},setSendKey(e){return"Enter"===e.key||13===e.keyCode},handleMessageClick(e,t,i,s){if("status"==t)return s.updateMessage({id:i.id,status:"going"}),i.status="going",void this.diySendMessage(i,this.curFile);if("avatar"!=t){if("voice"==i.type){if(!this.playAudio)return this.currentMessage=i,this.playVoice(i,s);this.playAudio.pause(),this.playAudio=null,s.updateMessage({id:this.currentMessage.id,status:"successd",isPlay:0}),i.id!=this.currentMessage.id&&(this.currentMessage=i,this.playVoice(i,s))}var n=["image","file","video"];if(n.includes(i.type)){if(!i.preview)return this.$message.error("没有配置预览接口");this.$preview(i.preview)}else"webrtc"==i.type&&this.called(parseFloat(i.extends.type))}else{if(1==i.is_group&&0==this.currentChat.setting.profile&&this.currentChat.role>2)return void this.$message.error("已开启隐私,无法查看资料");if(i.fromUser.id==this.user.id)return;this.$user(i.fromUser.id)}},playVoice(e,t){this.playAudio=new Audio(e.content),this.playAudio.play(),t.updateMessage({id:e.id,status:"succeed",isPlay:1})},openChat(e,t){this.keywords="",t.changeContact(e)},handleChangeContact(e,t){t.updateContact({id:e.id,unread:0}),1==e.is_notice&&(this.unread-=e.unread);const{IMUI:i}=this.$refs;this.initMenus(i),this.params.page=1,this.displayName=e.displayName,this.oldName=e.displayName,this.currentChat=e,1==e.is_group&&(this.group_id!=e.id?this.getGroupUserList(e.id):this.setAtUserList(this.groupUser)),this.is_group=e.is_group,1==this.is_group?(this.group_id=e.id,this.notice=e.notice):i.setAtUserList([],!1);for(var s=[],n=i.getMessages(e.id),a=0;n.length>a;a++)0==n[a].is_read&&n[a].fromUser.id!=this.user.id&&(n[a]["contactInfo"]={},s.push(n[a]));s.length>0&&(this.$api.imApi.setMsgIsReadAPI({is_group:e.is_group,toContactId:e.id,messages:s,fromUser:e.id}),this.setLocalMsgIsRead(s)),t.closeDrawer()},setAtUserList(e){let t=[],i=!1;e.forEach(e=>{e.user_id!=this.user.id?t.push(e.userInfo):e.role<3&&(i=!0)}),this.$refs.IMUI.setAtUserList(t,i)},uploadVideo(e){if(!this.nospeak())return this.$message.error(this.noSimpleTips),!1;let t,i=e.srcElement.files[0],s=URL.createObjectURL(i),n=new Audio(s);n.addEventListener("loadedmetadata",function(e){t=n.duration});let a={content:s,fromUser:this.user,id:ae.cZ(),sendTime:Li(),status:"going",toContactId:this.currentChat.id,type:"video",extends:{duration:t}};this.diySendMessage(a,i),this.$refs.uploadVideo.value=""},sendVoice(e,t){if(!this.globalConfig.chatInfo.simpleChat&&0==this.is_group||!this.nospeak())return this.$message.error(this.noSimpleTips),!1;let i={content:URL.createObjectURL(t),fromUser:this.user,id:ae.cZ(),sendTime:Li(),status:"going",toContactId:this.currentChat.id,type:"voice",isPlay:0,extends:{duration:e}};this.VoiceStatus=!1,this.diySendMessage(i,t)},removeContact(e){const{IMUI:t}=this.$refs,i=t.getCurrentContact();i.id==e&&t.changeContact(null),t.removeContact(e)},diySendMessage(e,t){const{IMUI:i}=this.$refs;i.appendMessage(e,!0),this.handleSend(e,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{status:"succeed"};i.updateContact({id:e.toContactId,lastContent:i.lastContentRender(e),lastSendTime:e.sendTime}),i.CacheDraft.remove(e.toContactId),i.updateMessage(Object.assign(e,t))},t)},nospeak(){return!(1==this.is_group&&this.currentChat.setting.nospeak>0)||(1==this.currentChat.setting.nospeak&&this.currentChat.role<3||2==this.currentChat.setting.nospeak&&1==this.currentChat.role)},handleSend(e,t,i){const{IMUI:s}=this.$refs;if(Di(e.content))return s.removeMessage(e.id),!1;let n=0;this.globalConfig.user_send_gap_time&&(n=1e3*Number(this.globalConfig.user_send_gap_time));const a=Date.now();if(a-this.lastSendTime<n){Math.ceil((n-(a-this.lastSendTime))/1e3);return this.$message.warning(this.$t("消息发送速度较快,请稍后再发送")),s.removeMessage(e.id),!1}if(this.lastSendTime=a,e.is_group=this.is_group,this.curFile=i,!this.nospeak())return s.removeMessage(e.id),this.$message.error(this.noSimpleTips),!1;this.quote&&(e.pid=this.quote.msg_id,e.extends=this.quote);let o=new FormData;if(i){if(i.size>1024*this.globalConfig.fileUpload.size*1024)return s.removeMessage(e.id),this.$message.error(this.$t("上传的内容不得大于")+this.globalConfig.fileUpload.size+"MB!");o.append("file",i),o.append("message",JSON.stringify(e)),this.$api.imApi.sendFileAPI(o).then(e=>{0==e.code?(s.setEditorValue(""),s.updateMessage(e.data),t()):t({status:"failed"})}).catch(e=>{t({status:"failed"})})}else this.closeQuote(),this.$api.imApi.sendMessageAPI(e).then(e=>{0==e.code?(s.setEditorValue(""),s.updateMessage(e.data),t()):t({status:"failed"})}).catch(e=>{t({status:"failed"})})},handlePullMessages(e,t,i){const{IMUI:s}=this.$refs;let n=this.params,a=i.getMessages(e.id);return a.length>0?(n.last_id=a[0].msg_id,n.page=1):n.last_id=0,n.toContactId=e.id,n.is_group=e.is_group,this.$api.imApi.getMessageListAPI(n).then(i=>{this.params.page++;let n=!1,a=i.data;a.length<this.params.limit&&(n=!0),t(a,n),e.id===this.$store.state.userInfo.id&&(s.clearMessages(),this.$nextTick(()=>{s.changeContact(this.ConversationList[0].user_id)}))}).catch(e=>{t([],!0)}),!0},publishNotice(){this.noticeBox=!1,this.$api.imApi.setNoticeAPI({id:this.group_id,notice:this.notice}).then(e=>{0==e.code&&this.$message({type:"success",message:"发布成功!"})})},openMsgBox(){this.ChatRecordMap={is_at:1},this.messageBox=!0,this.componentKey+=1,this.$refs.IMUI.updateContact({id:this.currentChat.id,is_at:0});let e=this.currentChat.is_at;this.atUnread-=e,this.currentChat.is_at=0},openNotice(){var e="<div style='white-space: break-spaces;word-break:break-all'>"+this.notice+"</div>";this.$alert(e,"群公告",{confirmButtonText:"确定",dangerouslyUseHTMLString:!0}).then(()=>{}).catch(()=>{})},openCreateGroup(){this.isAdd=1,this.dialogTitle="创建群聊",this.userIds=[],this.createChatBox=!0},changeOwner(){this.isAdd=2,this.dialogTitle="转让群聊",this.createChatBox=!0},openAddGroupUser(){var e=ae.mD(this.groupUser,"user_id");this.isAdd=0,this.userIds=e,this.dialogTitle="添加群成员",this.createChatBox=!0},manageGroup(e,t,i){this.createChatBox=!1;let s=this.globalConfig.chatInfo.groupUserMax;if(0==t){if(e.length+this.groupUser.length>s&&s>0)return this.$message.error("群成员不能大于"+s+"人!");this.$api.imApi.addGroupUserAPI({user_ids:e,id:this.group_id})}else if(1==t){if(e.length>s&&s>0)return this.$message.error("群成员不能大于"+s+"人!");this.$api.imApi.addGroupAPI({user_ids:e,name:i}).then(e=>{const t=e.data,{IMUI:i}=this.$refs;0==e.code&&(i.appendContact(t),i.changeContact(t.id))})}else this.$api.imApi.changeOwnerAPI({user_id:e[0],id:this.group_id}).then(t=>{const{IMUI:i}=this.$refs;0==t.code&&(this.$message({type:"success",message:t.msg}),this.groupSetting=!1,i.updateContact({id:this.group_id,role:3,owner_id:e[0]}),i.changeContact(null))})},forwardUser(e){if(e.length>5)return this.$message.error("转发的人数不能超过5人!");this.forwardBox=!1;var t=this.currentMessage;this.$api.imApi.forwardMessageAPI({user_ids:e,msg_id:t.msg_id})},getGroupUserList(e){this.$api.imApi.groupUserListAPI({group_id:e}).then(e=>{if(0==e.code){let t=e.data;this.groupUser=t,this.setAtUserList(t),this.groupUserCount=t.length}})},saveGroupName(e){if(this.displayName.length<1)return this.$notify({title:"警告",message:"名称不能为空!",type:"warning"}),this.isEdit=!1,!1;if(this.displayName!=this.oldName){const{IMUI:t}=this.$refs;this.$api.imApi.editGroupNameAPI({id:e.id,displayName:this.displayName}).then(i=>{t.updateContact({id:e.id,displayName:this.displayName})})}this.isEdit=!1},openGroupSetting(e){this.groupSetting=!0,this.contactSetting=e||this.currentChat,this.componentKey++},closeSearch(){var e=this;setTimeout(function(){e.searchResult=!1},300)},searchContact(e){""!=this.keywords&&(this.searchList=ae.l(e,["displayName","name_py"],this.keywords))},setLocalMsgIsRead(e){console.log(e,2677);const{IMUI:t}=this.$refs;for(let i=0;e.length>i;i++){const s={id:e[i]["id"],is_read:1,status:"succeed",sendTime:parseInt(e[i]["sendTime"])+1,content:e[i]["content"]};t.updateMessage(s)}},sendMsgToParent(e){window.parent.postMessage(e,"https://kefuweb.sp2509.cc")},popNotice(e){let t=this;const{IMUI:i}=this.$refs;if(console.log(this.isCustomerService,2694),1===this.isCustomerService){let t=e.fromUser.displayName||e.fromUser.realname,s=i.lastContentRender(e);return void this.sendMsgToParent({body:t+":"+s,icon:e.fromUser.avatar,type:"ReceiveMessages"})}if("granted"==Notification.permission){let s=e.fromUser.displayName||e.fromUser.realname,n=i.lastContentRender(e),a=new Notification("收到一条新消息",{body:s+":"+n,icon:e.fromUser.avatar});a.onclick=function(e){t.$nextTick(()=>{setTimeout(()=>{},500)}),window.focus(),a.close()}}else{const e=document.getElementById("chatAudio");e.currentTime=0,e.play()}},recieveMsg(e){const{IMUI:t}=this.$refs,i=t.getCurrentContact();if(i.id==e.toContactId&&"system"!=i.id){var s=[];s.push(e),this.$api.imApi.setMsgIsReadAPI({toContactId:i.id,is_group:i.is_group,messages:s,fromUser:e.fromUser.id})}else if(this.user.id!=e.fromUser.id){let i=this.getContact(e.toContactId);i&&1==i.is_notice&&this.unread++,this.initMenus(t)}this.user.id==e.toContactId&&(e.toContactId=e.toUser),"system"==e.toContactId&&t.updateContact({id:e.toContactId,lastContent:t.lastContentRender(e),lastSendTime:e.sendTime,unread:"+1"}),t.appendMessage(e,this.isBottom)},openMessageBox(){this.messageBox=!0,this.componentKey+=1},openSetting(){const{IMUI:e}=this.$refs;e.changeMenu("setting")},setNoSpeak(){this.noSpeakBox=!1,this.$api.imApi.setNoSpeakAPI(this.noSpeakData)},handleCommand(e){"addGroup"==e?this.openCreateGroup():this.addFriendBox=!0},rtcMsg(e){let t="",i="",s="";this.wsData&&(i=this.wsData.msg_id??"",s=this.wsData.id??"");let n=!0;switch(e.event){case"calling":s=ae.cZ();break;case"hangup":907==e.code&&this.$message.error("对方忙线中"),e.isbtn||(n=!1),this.wsData="",this.webrtcLock=!1;break;case"iceCandidate":let i={};i["candidate"]=e["iceCandidate"]["candidate"],i["sdpMLineIndex"]=e["iceCandidate"]["sdpMLineIndex"],i["sdpMid"]=e["iceCandidate"]["sdpMid"],t=JSON.stringify(i);break;case"mediaDevices":n=!1;break}n&&this.$api.imApi.sendToMsg({id:s,msg_id:i,toContactId:this.caller.id,type:this.is_video?1:0,event:e.event,status:e.status??"",code:e.code??"",callTime:e.callTime??"",sdp:e.sdp??"",iceCandidate:t}).then(t=>{0==t.code&&"calling"==e.event&&(this.wsData=t.data,r().set("wsData",t.data),this.recieveMsg(t.data)),"907"==t.data.extends.code&&this.$message.error("对方不在线")})},reconnect(){this.$refs.socket.initWebSocket()},closeSocket(){this.$refs.socket.close()},closeQuote(){this.quote=""},noSpeakExp(e){return 1e3*e>(new Date).getTime()&&ae.p6("m-d H:i",e)},eventBottom(e){this.isBottom=e},logout(){this.$confirm("你确定要退出聊天室吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})})}).catch(()=>{this.$message({type:"info",message:"已取消退出"})})}}},Pi=Ui,Oi=(0,d.A)(Pi,Si,Ti,!1,null,"491dda1e",null),$i=Oi.exports,Ri={name:"app",components:{kefuMsg:vi,userMsg:$i},data(){return{params:{keyword:""},isCustomerService:0}},created(){window.addEventListener("message",e=>{const t=e.data;1==t.isCustomerService&&(this.isCustomerService=1)})}},ji=Ri,Bi=(0,d.A)(ji,Ii,Ai,!1,null,"261f584e",null),Fi=Bi.exports,Vi=function(){var e=this,t=e._self._c;return t("div",{staticClass:"login-wrapper",style:"background-image:url("+e.Background+")"},[t("div",{staticClass:"form-box"},[e.qrLogin?t("div",[t("div",{staticClass:"qr-close f-18 c-666",on:{click:function(t){e.qrLogin=!1}}},[t("i",{staticClass:"el-icon el-icon-back"}),e._v(" 返回")]),t("div",{staticClass:"mt-20 mb-20",staticStyle:{"text-align":"center","margin-bottom":"15px"}},[t("vue-qr",{ref:"qrCode",attrs:{text:e.qrLoginUrl,width:"250",height:"250"}}),e.globalConfig&&e.globalConfig.sysInfo?t("div",{staticClass:"m-20 f-18"},[e._v("使用手机 "+e._s(e.globalConfig.sysInfo.name)+" 扫码登录")]):e._e()],1)]):[t("div",{staticClass:"qr-open",attrs:{title:"扫码登录"},on:{click:function(t){return e.openQr()}}},[t("svg",{staticClass:"icon",attrs:{t:"1763222030406",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2792",width:"50",height:"50"}},[t("path",{attrs:{d:"M92.16 92.16h276.48v275.626667h-0.853333L460.8 460.8V0H0l92.16 92.16z","p-id":"2793",fill:"#707070"}}),t("path",{attrs:{d:"M294.4 166.4H166.4l128 128zM1024 0H563.2v460.8h460.8V0z m-92.16 367.786667h-276.48V92.16h276.48v275.626667z","p-id":"2794",fill:"#707070"}}),t("path",{attrs:{d:"M729.6 166.4h128v128h-128zM1024 1024v-88.746667h-88.746667L1024 1024zM834.986667 756.053333v-100.266666H942.933333V563.2h-183.893333v96.853333h-98.986667l96 96zM655.36 563.2H563.2l92.16 92.16z","p-id":"2795",fill:"#707070"}}),t("path",{attrs:{d:"M1024 834.133333v-178.346666h-81.066667v100.266666h-107.946666v78.933334l79.786666 79.786666v-80.64z","p-id":"2796",fill:"#707070"}})])]),e.globalConfig.sysInfo?t("div",{staticClass:"form-title"},[t("img",{attrs:{src:e.globalConfig.sysInfo.logo?e.globalConfig.sysInfo.logo:e.$packageData?e.$packageData.logo:"",width:"88",alt:"icon"}}),t("p",{staticClass:"mt-10 f-20"},[e._v(e._s(e.globalConfig.sysInfo.name))])]):e._e(),t("el-form",{ref:"loginForm",staticClass:"login-form pd-10",attrs:{model:e.loginForm,rules:e.loginRules,"label-width":"0px"}},[t("el-form-item",{attrs:{prop:"account"}},[t("el-input",{ref:"account",attrs:{type:"text","auto-complete":"off",placeholder:"请输入账号","prefix-icon":"el-icon-user"},model:{value:e.loginForm.account,callback:function(t){e.$set(e.loginForm,"account",t)},expression:"loginForm.account"}})],1),t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.forget,expression:"!forget"}],attrs:{prop:"password"}},[t("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"请输入密码","prefix-icon":"el-icon-lock"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin.apply(null,arguments)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}})],1),t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.forget,expression:"forget"}],attrs:{prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"6"},model:{value:e.loginForm.code,callback:function(t){e.$set(e.loginForm,"code",t)},expression:"loginForm.code"}},[t("el-button",{attrs:{slot:"append",loading:e.coding},on:{click:function(t){return e.sendCode()}},slot:"append"},[e._v("发送验证码")])],1)],1),t("el-form-item",[t("div",{staticClass:"remenber"},[t("el-checkbox",{model:{value:e.loginForm.rememberMe,callback:function(t){e.$set(e.loginForm,"rememberMe",t)},expression:"loginForm.rememberMe"}},[e._v("记住我")]),t("el-button",{attrs:{type:"text"},on:{click:function(t){e.forget=!e.forget}}},[e._v(e._s(e.forget?"密码登陆":"忘记密码"))])],1)]),t("el-form-item",[t("el-button",{staticStyle:{width:"100%"},attrs:{loading:e.loading,size:"small",type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin.apply(null,arguments)}}},[e.loading?t("span",[e._v("登 录 中...")]):t("span",[e._v("登 录")])])],1),e.globalConfig&&e.globalConfig.sysInfo&&1==e.globalConfig.sysInfo.regtype?t("div",{staticClass:"lz-flex lz-align-items-center lz-justify-content-end mb-10 c-666",attrs:{align:"right"}},[e._v(" 还没有账号,去 "),t("el-link",{attrs:{type:"primary",size:"large"},on:{click:function(t){return e.$router.push("/register")}}},[e._v(" 注册")])],1):e._e(),e.globalConfig&&e.globalConfig.sysInfo?t("div",{staticClass:"lz-flex lz-align-items-start lz-justify-content-center"},[t("div",{staticClass:"c-999"},[e._v(e._s(e.globalConfig.sysInfo.name)+" for "+e._s(e.$packageData.version))]),e._v(" "),t("el-link",{staticClass:"mb-5",attrs:{type:"primary",size:"large"},on:{click:function(t){return e.downapp()}}},[e._v(" 下载客户端")])],1):e._e()],1)]],2),t("Socket",{ref:"socket",attrs:{isQrLogin:!0}})],1)},zi=[],Hi=i(1492),Gi=i.n(Hi),Ki={name:"Login",data(){return{Background:Z,forget:!1,qrLogin:!1,loginForm:{account:"",password:"",code:"",rememberMe:!0},loginRules:{account:[{required:!0,trigger:"blur",message:"用户名不能为空"}],password:[{required:!0,trigger:"blur",message:"密码不能为空"}]},loading:!1,coding:!1,redirect:void 0}},components:{VueQr:Gi(),Socket:ue},computed:{...(0,U.aH)({globalConfig:e=>e.globalConfig,qrLoginUrl:e=>e.qrLoginUrl})},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0},forget(e){e&&(this.loginForm.password="123456")}},mounted(){this.$nextTick(()=>{let e=this.$route.query.token;if(e)return this.dologin({token:e});if(this.globalConfig.demon_mode){const e=Math.floor(19*Math.random()+2);this.loginForm.account=138e8+e,this.loginForm.password="123456",this.$refs.account.focus()}const t=r().get("LoginAccount");t&&(this.loginForm.account=t.account,this.loginForm.password=t.password,this.loginForm.rememberMe=!0,this.$refs.account.focus())})},methods:{openQr(){this.qrLogin=!0,this.$refs.socket.websocket.send(JSON.stringify({type:"pong",isQrLogin:!0}))},handleLogin(){!this.forget||this.loginForm.code?this.$refs.loginForm.validate(e=>{const t={account:this.loginForm.account,password:this.loginForm.password,code:this.loginForm.code};this.loginForm.rememberMe?r().set("LoginAccount",t):r().rm("LoginAccount"),e&&this.dologin(t)}):this.$message.error("请输入验证码")},dologin(e){console.log(e,173),this.loading=!0,this.$store.dispatch("Login",e).then(e=>{this.$router.push("/"),setTimeout(()=>{window.location.reload()},500)}).catch(()=>{this.loading=!1})},sendCode(){if(!this.loginForm.account)return void this.$message.error("请输入账号");this.coding=!0;let e={account:this.loginForm.account,type:1};this.$store.dispatch("sendCode",e).then(e=>{this.$message.success("发送成功"),this.coding=!1}).catch(()=>{this.coding=!1})},downapp(){window.open(window.BASE_URL+"downapp")}}},qi=Ki,Qi=(0,d.A)(qi,Vi,zi,!1,null,null,null),Yi=Qi.exports,Ji=function(){var e=this,t=e._self._c;return t("div",{staticClass:"login-wrapper",style:"background-image:url("+e.Background+")"},[t("div",{staticClass:"form-box"},[t("div",{staticClass:"form-title"},[t("div",{staticClass:"f-14 cur-handle",on:{click:function(t){return e.$router.push("/login")}}},[t("i",{staticClass:"el-icon-back"},[e._v("返回")])]),e._m(0),t("div")]),t("el-form",{ref:"regForm",staticClass:"login-form",attrs:{model:e.regForm,rules:e.loginRules,"label-width":"0px"}},[t("el-form-item",{attrs:{prop:"account"}},[t("el-input",{ref:"account",attrs:{type:"text","auto-complete":"off",placeholder:e.placeholder,"prefix-icon":"el-icon-user"},on:{input:e.handleInput},model:{value:e.regForm.account,callback:function(t){e.$set(e.regForm,"account",t)},expression:"regForm.account"}})],1),t("el-form-item",{attrs:{prop:"realname"}},[t("el-input",{ref:"realname",attrs:{type:"text","auto-complete":"off",placeholder:"请输入用户名/昵称","prefix-icon":"el-icon-user"},model:{value:e.regForm.realname,callback:function(t){e.$set(e.regForm,"realname",t)},expression:"regForm.realname"}})],1),0!=e.globalConfig.sysInfo.regauth?t("el-form-item",{attrs:{prop:"code"}},[t("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"6"},model:{value:e.regForm.code,callback:function(t){e.$set(e.regForm,"code",t)},expression:"regForm.code"}},[t("el-button",{attrs:{slot:"append",loading:e.loading},on:{click:function(t){return e.sendCode(!0)}},slot:"append"},[e._v("发送验证码")])],1)],1):e._e(),t("el-form-item",{attrs:{prop:"password"}},[t("el-input",{attrs:{type:"password","show-password":"","auto-complete":"off",placeholder:"请输入密码","prefix-icon":"el-icon-lock"},model:{value:e.regForm.password,callback:function(t){e.$set(e.regForm,"password",t)},expression:"regForm.password"}})],1),t("el-form-item",{attrs:{prop:"password"}},[t("el-input",{attrs:{type:"password","show-password":"","auto-complete":"off",placeholder:"请再次输入密码","prefix-icon":"el-icon-lock"},model:{value:e.regForm.repass,callback:function(t){e.$set(e.regForm,"repass",t)},expression:"regForm.repass"}})],1),t("el-form-item",[t("el-button",{staticStyle:{width:"100%"},attrs:{loading:e.loading,size:"small",type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleRegist.apply(null,arguments)}}},[e.loading?t("span",[e._v("注 册 中...")]):t("span",[e._v("注册")])])],1),e.globalConfig&&e.globalConfig.sysInfo?t("div",{staticClass:"c-999",attrs:{align:"center"}},[e._v(e._s(e.globalConfig.sysInfo.name)+" for "+e._s(e.$packageData.version))]):e._e()],1)],1)])},Wi=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"mr-40"},[t("b",[e._v("注册用户")])])}],Zi={name:"Register",data(){return{Background:Z,placeholder:"请输入账号:4-32个字符",regForm:{account:"",realname:"",password:"",repass:"",code:""},loginRules:{account:[{min:4,max:32,message:"长度在 4 到 32 个字符",trigger:"blur"}],realname:[{required:!0,message:"请输入用户名/昵称",trigger:"blur"},{min:2,max:16,message:"长度在 2 到 16 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:16,message:"长度在 6 到 16 个字符",trigger:"blur"}]},loading:!1,redirect:void 0}},computed:{...(0,U.aH)({globalConfig:e=>e.globalConfig})},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},mounted(){let e=this.globalConfig.sysInfo.regauth??0,t="请输入账号:4-32个字符";switch(parseInt(e)){case 1:t="请输入正确的手机号";break;case 2:t="请输入正确的邮箱";break;case 3:t="请输入正确的手机号或者邮箱";break;default:t="请输入正确的账号"}let i={required:!0,message:t,trigger:"blur"};this.loginRules.account.push(i);let s={type:"email",message:t,trigger:"blur",validator:this.validateContact},n={type:"phone",message:t,trigger:"blur",validator:this.validateContact};1==e?(this.placeholder="请输入手机号",this.loginRules.account.push(n)):2==e?(this.placeholder="请输入邮箱账号",this.loginRules.account.push(s)):3==e&&(this.placeholder="请输入手机号/邮箱",this.loginRules.account.push(s),this.loginRules.account.push(n))},methods:{handleInput(e){const t=e.replace(/[\u4e00-\u9fa5]/g,"");this.regForm.account=t},validateContact(e,t,i){t?/^1[3456789]\d{9}$/.test(t)||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(t)?i():i(new Error("请输入正确的手机号或邮箱")):i()},handleRegist(){this.$refs.regForm.validate(e=>{if(this.regForm.password!=this.regForm.repass)return this.$message.error("两次密码不一致"),!1;const t={account:this.regForm.account,realname:this.regForm.realname,password:this.regForm.password,code:this.regForm.code,inviteCode:this.$route.query.inviteCode??""};if(!e)return this.$message.error("请检查输入项");this.loading=!0,this.$api.commonApi.register(t).then(e=>{this.loading=!1,0===e.code&&(this.$message.success("注册成功"),this.$router.push("/login"))}).catch(e=>{this.loading=!1})})},sendCode(){if(!this.regForm.account)return void this.$message.error("请输入账号");this.coding=!0;let e={account:this.regForm.account,type:2};this.$store.dispatch("sendCode",e).then(e=>{this.$message.success("发送成功"),this.coding=!1}).catch(()=>{this.coding=!1})}}},Xi=Zi,es=(0,d.A)(Xi,Ji,Wi,!1,null,"9b60d864",null),ts=es.exports,is=function(){var e=this,t=e._self._c;return t("div",{staticClass:"main-container"},[t("el-container",{staticStyle:{height:"100vh",border:"1px solid #eee"}},[t("el-header",{staticStyle:{"text-align":"right","font-size":"12px","border-bottom":"1px solid #e6e6e6"}},[t("el-row",{style:{height:"60px"},attrs:{type:"flex",justify:"space-between",align:"middle"}},[e.globalConfig&&e.globalConfig.sysInfo?t("el-col",{staticClass:"logo",attrs:{span:8}},[t("div",{staticClass:"image"},[t("img",{attrs:{src:e.globalConfig.sysInfo.logo,alt:"logo"}})]),t("div",{staticClass:"f-20 ml-5"},[e._v(e._s(e.globalConfig.sysInfo.name)+" 管理中心")])]):e._e(),t("el-col",{staticClass:"text-right",attrs:{span:16}},[t("div",{staticClass:"user"},[t("span",{staticClass:"message"},[t("router-link",{attrs:{to:"/chat"}},[t("el-button",[e._v(" 进入聊天 ")])],1)],1),t("span",{staticClass:"message",on:{click:function(t){return e.showMessageBox()}}},[t("el-badge",{attrs:{value:e.unread,max:99,hidden:!e.unread}},[t("i",{staticClass:"el-icon-chat-line-round f-24",attrs:{circle:""}})])],1),t("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[t("div",{staticClass:"lz-flex lz-align-items-center cur-handle"},[t("span",{staticClass:"avatar"},[t("img",{attrs:{src:e.$store.state.userInfo.avatar,alt:"avatar"}})]),t("span",{staticClass:"username"},[e._v(e._s(e.$store.state.userInfo.realname))]),t("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"profile"}},[e._v("个人信息")]),t("el-dropdown-item",{attrs:{command:"logout"}},[e._v("退出登录")])],1)],1)],1)])],1)],1),t("el-container",[t("el-aside",{staticClass:"main-aside",style:{width:e.asideWidth}},[t("div",{staticClass:"aside-menu"},[t("el-scrollbar",[t("el-menu",{staticClass:"el-menu-vertical-demo",staticStyle:{border:"none"},attrs:{"default-active":e.active,mode:"vertical","ext-color":"#fff",collapse:e.isCollapse},on:{select:e.handleMenuSelect}},[e._l(e.routes,function(i,s){return[t("el-menu-item",{key:s,attrs:{index:i.path}},[t("i",{class:i.meta.icon}),t("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(i.meta.title))])])]})],2)],1)],1),t("div",{staticClass:"aside-bottom",on:{click:e.handleCollapse}},[t("span",{staticClass:"el-icon-s-fold f-18"})])]),t("el-main",{staticStyle:{"background-color":"#f5f5f5",padding:"0"}},[t("el-scrollbar",[t("transition",{attrs:{name:"fade",mode:"out-in"}},[t("router-view",{key:e.key})],1)],1)],1)],1)],1),t("Message",{ref:"Message",attrs:{dialogTableVisible:e.dialogTableVisible},on:{"update:dialogTableVisible":function(t){e.dialogTableVisible=t},"update:dialog-table-visible":function(t){e.dialogTableVisible=t}}})],1)},ss=[],ns={name:"Index",components:{Message:xi},data(){return{dialogTableVisible:!0,unread:0,allContacts:[],isCollapse:!1,asideWidth:"200px",active:"",routes:[]}},computed:{...(0,U.aH)({chatSocket:e=>e.unread,getContacts:e=>e.allContacts,globalConfig:e=>e.globalConfig}),key(){return this.$route.path}},watch:{chatSocket(e){this.unread=e},getContacts(e){this.allContacts=e},isCollapse(e){this.asideWidth=e?"65px":"200px"}},mounted(){this.isCollapse=r().get("isCollapse")||!1,this.active=this.$route.path;const e=this.$router.options.routes.filter(e=>"manage"==e.name);this.routes=e[0].children,window.addEventListener("resize",this.handleResize)},methods:{handleResize(){window.innerWidth<900?this.isCollapse=!0:this.isCollapse=!1},handleMenuSelect(e){this.active=e,this.$route.path!=e&&this.$router.push(e)},showMessageBox(){this.dialogTableVisible?this.dialogTableVisible=!1:this.dialogTableVisible=!0},handleCommand(e){"profile"==e?this.$user(this.$store.state.userInfo.user_id):this.$confirm("你确定要退出聊天室吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})})}).catch(()=>{this.$message({type:"info",message:"已取消退出"})})},handleCollapse(){this.isCollapse=!this.isCollapse,r().set("isCollapse",this.isCollapse)}}},as=ns,os=(0,d.A)(as,is,ss,!1,null,"83882d56",null),rs=os.exports,cs=[{path:"/manage",name:"manage",component:rs,meta:{title:"管理"},icon:"el-icon-s-tools",children:[{path:"/manage/index",name:"index",component:()=>i.e(59).then(i.bind(i,3059)),meta:{title:"概况",icon:"el-icon-data-line"}},{path:"/manage/setting",name:"setting",component:()=>Promise.all([i.e(412),i.e(724)]).then(i.bind(i,9473)),meta:{title:"设置",icon:"el-icon-setting"}},{path:"/manage/user",name:"manageUser",component:()=>Promise.all([i.e(412),i.e(753)]).then(i.bind(i,4668)),meta:{title:"成员",icon:"el-icon-user"}},{path:"/manage/message",name:"user",component:()=>Promise.all([i.e(412),i.e(375)]).then(i.bind(i,2606)),meta:{title:"消息",icon:"el-icon-chat-dot-round"}},{path:"/manage/group",name:"group",component:()=>i.e(218).then(i.bind(i,8218)),meta:{title:"群聊",icon:"el-icon-chat-dot-square"}},{path:"/manage/files",name:"files",component:()=>i.e(356).then(i.bind(i,5356)),meta:{title:"文件",icon:"el-icon-folder-opened"}}]}],ls=function(){var e=this,t=e._self._c;return t("div",{staticClass:"loading-page"},[t("div",{staticClass:"loading-container"},[t("div",{staticClass:"loading-spinner"}),t("p",{staticClass:"loading-text"},[e._v(e._s(e.$t("页面加载中,请稍候"))+"...")]),t("p",{staticClass:"loading-tip"},[e._v(e._s(e.$t("正在努力加载资源"))+"...")])])])},ds=[],us={created(){console.log(999)}},hs=us,ps=(0,d.A)(hs,ls,ds,!1,null,"9a423410",null),ms=ps.exports,gs=function(){var e=this;e._self._c;return e._m(0)},fs=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"loading-page"},[t("div",{staticClass:"loading-container"},[t("div",{staticClass:"loading-spinner"}),t("p",{staticClass:"loading-text"},[e._v("页面加载中,请稍候...")]),t("p",{staticClass:"loading-tip"},[e._v("正在努力加载资源...")])])])}],vs={created(){const e=this;window.addEventListener("message",t=>{if(console.log(t,27272727),t.origin===window.global_config.postMsgUrl||"https://www.8xbet001.com"===t.origin||"https://app.8xbet001.com"===t.origin){console.log(t,"后台端传过来的");const i=t.data;if(i.accessToken&&i.sessionId&&i.UserInfo){e.$store.commit("SET_AUTH",{authToken:i.accessToken,sessionId:i.sessionId}),e.$store.commit("SET_USERINFO",i.UserInfo);let t=r().get("UserInfo"),s=r().get("globalConfig");s&&(s.sysInfo&&(document.title=s.sysInfo.name),e.$store.commit("setGlobalConfig",s)),t&&e.$store.commit("SET_USERINFO",t),e.$store.dispatch("getSystemInfo").then(t=>{let i=setTimeout(()=>{clearTimeout(i),e.$router.push("/kefuMsg"),window.location.reload()},1e3)})}}})}},ys=vs,bs=(0,d.A)(ys,gs,fs,!1,null,"1efb54a9",null),Cs=bs.exports;s["default"].use(Y.Ay);const xs=[{path:"/",name:"home",component:Fi,meta:{title:"聊天"}},{path:"/userChat",name:"userChat",component:$i,meta:{title:"客户聊天"}},{path:"/kefuMsg",name:"kefuMsg",component:vi,meta:{title:"后台聊天"}},{path:"/chat",name:"chat",component:Fi,meta:{title:"聊天演示页"}},{path:"/demo",name:"demo",component:_i,meta:{title:"演示页"}},{path:"/userMsg",name:"userMsg",component:ms,meta:{title:"用户跳转页面"}},{path:"/adminMsg",name:"adminMsg",component:Cs,meta:{title:"后台跳转页面"}},{path:"/login",name:"login",component:Yi,meta:{title:"登录"}},{path:"/register",name:"register",component:ts,meta:{title:"注册"}},{path:"*",redirect:"/404",hidden:!0},{path:"/404",component:()=>i.e(554).then(i.bind(i,5554)),hidden:!0}],ws=()=>new Y.Ay({mode:"hash",scrollBehavior:()=>({y:0}),routes:[...xs,...cs]}),ks=ws();function Es(){const e=ws();ks.matcher=e.matcher}var _s=ks,Is=i(7745),As=i.n(Is);const Ss={loadingCache:function(){if(r().get("authToken")&&!As().defaults.headers["authToken"]){const e=r().get("UserInfo");e&&bn.commit("SET_USERINFO",e)}bn.commit("SET_APPNAME",r().get("systemName")),bn.commit("SET_APPLOGO",r().get("systemLogo"))},updateAxiosCache:function(){As().defaults.headers["authToken"]=r().get("authToken"),As().defaults.headers["sessionId"]=r().get("sessionId")},updateAxiosHeaders:function(){As().defaults.headers["authToken"]=r().get("authToken"),As().defaults.headers["sessionId"]=r().get("sessionId")},rmAxiosCache:function(){r().rm("authToken"),r().rm("sessionId")}};var Ts=Ss;function Ms(){return new Promise((e,t)=>{Ts.rmAxiosCache(),delete As().defaults.headers["authToken"],delete As().defaults.headers["sessionId"],e(!0)})}function Ds(e,t){return new Promise((i,s)=>{As().defaults.headers["authToken"]=e,As().defaults.headers["sessionId"]=t,i(!0)})}var Ls=i(2398),Ns=i.n(Ls),Us=i(7262);const Ps=(0,Us.s)(500,()=>{Ms().then(()=>{location.reload()}).catch(()=>{location.reload()})}),Os=(0,Us.s)(500,(e,t="error")=>{(0,p.Message)({message:e,duration:1500,type:t})}),$s=(0,Us.s)(1e3,e=>{p.MessageBox.confirm(e,"提示",{confirmButtonText:"确定",showCancelButton:!1,type:"warning"}).then(()=>{Ps()}).catch(()=>{})});As().defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";const Rs="app_current_lang",js={"ja-jp":"jp","zh-hk":"zh-tw"},Bs={jp:"ja-jp","zh-tw":"zh-hk"},Fs=e=>js[e]||e,Vs=e=>Bs[e]||e,zs=e=>{let t=new URLSearchParams(window.location.search),i=t.get(e);if(i)return i;const s=window.location.hash;if(s.includes("?")){const n=s.split("?")[1];t=new URLSearchParams(n),i=t.get(e)}return i||null},Hs=e=>{if(!e)return;const t=Vs(e);D.availableLocales.includes(t)?D.locale=t:D.locale="zh"},Gs=()=>{const e=zs("Lang");if(e){const t=Fs(e);Ks(t),Hs(t)}else{const e=qs();e&&Hs(e)}},Ks=e=>{r().set(Rs,e)},qs=()=>r().get(Rs)||null;Gs();const Qs=window.global_config.baseUrl||"https://kefuapi.sp2509.cc";window.BASE_URL=Qs;const Ys=As().create({baseURL:Qs,timeout:6e4});Ys.interceptors.request.use(e=>{const t=r().get("sessionId"),i=r().get("authToken");t&&i&&(e.headers["sessionId"]=t,e.headers["Authorization"]=i);const s=qs();s&&(e.headers["Lang"]=s,Hs(s));const n=e.headers["Content-Type"]&&-1!==e.headers["Content-Type"].indexOf("application/json");if(n)void 0!==e.data&&null!==e.data||(e.data={});else{const t=e.headers["Content-Type"]&&-1!==e.headers["Content-Type"].indexOf("multipart/form-data");e.data=t?e.data:Ns().stringify(e.data)}return e},e=>Promise.reject(e)),Ys.interceptors.response.use(e=>{const t=e.data;if(200!==e.status||"blob"!==e.config.responseType)return 0!==t.code?(-1===t.code?$s(t.msg):[400,402,403,404,405,502,500].includes(t.code)?Os(t.msg,"warning"):10009===t.code?(0,p.Message)({message:t.msg,duration:1500,type:"warning"}):Os(t.msg),t):t;if(e.headers["content-disposition"]||e.headers["content-type"]&&-1!=e.headers["content-type"].indexOf("application/pdf"))return e;{const t=new Blob([e.data],{type:"application/json"}),i=new FileReader;i.onload=function(){const e=JSON.parse(this.result);e.msg&&Os(e.msg,1==e.code?"success":"error")},i.readAsText(t)}},e=>{if(e.response){const t=e.response;500==t.status?Os("服务器返回错误,请检查!"):t.data&&t.data.msg&&Os(t.data.msg)}return Promise.reject(e)});var Js=Ys;const Ws={loginAPI:e=>Js({url:"common/pub/login",method:"post",data:e}),logoutAPI:()=>Js({url:"common/pub/logout",method:"post"}),bindClientIdAPI:e=>Js({url:"common/pub/bindUid",method:"post",data:e}),offlineAPI:e=>Js({url:"common/pub/offline",method:"post",data:e}),setOnlineAPI:e=>Js({url:"common/pub/setOnline",method:"post",data:e}),bindGroupAPI:e=>Js({url:"common/pub/bindGroup",method:"post",data:e}),sendCode:e=>Js({url:"common/pub/sendCode",method:"post",data:e}),getSystemInfo:e=>Js({url:"common/pub/getSystemInfo",method:"post",data:e}),register:e=>Js({url:"common/pub/register",method:"post",data:e}),uploadAvatar:e=>Js({url:"common/upload/uploadAvatar",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}}),publishNotice:e=>Js({url:"manage/index/publishNotice",method:"post",data:e}),getNoticeList:e=>Js({url:"manage/index/noticeList",method:"post",data:e}),delNotice:e=>Js({url:"manage/index/delNotice",method:"post",data:e}),systemSta:e=>Js({url:"manage/index/index",method:"post",data:e})};var Zs=Ws;const Xs={getTaskList:e=>Js({url:"/manage/Task/getTaskList",method:"post",data:e}),startTask:e=>Js({url:"/manage/Task/startTask",method:"post",data:e}),stopTask:e=>Js({url:"/manage/Task/stopTask",method:"post",data:e}),getTaskLog:e=>Js({url:"/manage/Task/getTaskLog",method:"post",data:e}),clearTaskLog:e=>Js({url:"/manage/Task/clearTaskLog",method:"post",data:e})};var en=Xs;const tn={setConfig:e=>Js({url:"manage/config/setConfig",method:"post",data:e}),getConfig:e=>Js({url:"manage/config/getConfig",method:"post",data:e}),getAllConfig:e=>Js({url:"manage/config/getAllConfig",method:"post",data:e}),getInviteLink:e=>Js({url:"manage/config/getInviteLink",method:"post",data:e}),sendTestEmail:e=>Js({url:"manage/config/sendTestEmail",method:"post",data:e})};var sn=tn;const nn={getUserList:e=>Js({url:"/manage/User/index",method:"post",data:e}),addUser:e=>Js({url:"/manage/User/add",method:"post",data:e}),editUser:e=>Js({url:"/manage/User/edit",method:"post",data:e}),delUser:e=>Js({url:"/manage/User/del",method:"post",data:e}),getUserDetail:e=>Js({url:"/manage/User/detail",method:"post",data:e}),editPassword:e=>Js({url:"/manage/User/editPassword",method:"post",data:e}),setStatus:e=>Js({url:"/manage/User/setStatus",method:"post",data:e}),setRole:e=>Js({url:"/manage/User/setRole",method:"post",data:e})};var an=nn;const on={getGroupList:e=>Js({url:"/manage/Group/index",method:"post",data:e}),addGroupUser:e=>Js({url:"/manage/Group/addGroupUser",method:"post",data:e}),delGroupUser:e=>Js({url:"/manage/Group/delGroupUser",method:"post",data:e}),changeOwner:e=>Js({url:"/manage/Group/changeOwner",method:"post",data:e}),setManager:e=>Js({url:"/manage/Group/setManager",method:"post",data:e}),delGroup:e=>Js({url:"/manage/Group/del",method:"post",data:e})};var rn=on;const cn={getContactsAPI:e=>Js({url:"enterprise/im/getContacts",method:"post",data:e}),sendMessageAPI:e=>Js({url:"enterprise/im/sendMessage",method:"post",data:e}),forwardMessageAPI:e=>Js({url:"enterprise/im/forwardMessage",method:"post",data:e}),sendToMsg:e=>Js({url:"enterprise/im/sendToMsg",method:"post",data:e})};cn.forwardMessageAPI=e=>Js({url:"enterprise/im/forwardMessage",method:"post",data:e}),cn.sendFileAPI=e=>Js({url:"common/upload/uploadFile",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}}),cn.getMessageListAPI=e=>Js({url:"enterprise/im/getMessageList",method:"post",data:e}),cn.setMsgIsReadAPI=e=>Js({url:"enterprise/im/setMsgIsRead",method:"post",data:e}),cn.undoMessageAPI=e=>Js({url:"enterprise/im/undoMessage",method:"post",data:e}),cn.delMessageAPI=e=>Js({url:"enterprise/im/delMessage",method:"post",data:e}),cn.removeMessageAPI=e=>Js({url:"enterprise/im/removeMessage",method:"post",data:e}),cn.settingAPI=e=>Js({url:"enterprise/im/setting",method:"post",data:e}),cn.editGroupNameAPI=e=>Js({url:"enterprise/group/editGroupName",method:"post",data:e}),cn.setNoSpeakAPI=e=>Js({url:"enterprise/group/setNoSpeak",method:"post",data:e}),cn.groupUserListAPI=e=>Js({url:"enterprise/group/groupuserlist",method:"post",data:e}),cn.getAllUserAPI=e=>Js({url:"enterprise/group/getAllUser",method:"post",data:e}),cn.addGroupAPI=e=>Js({url:"enterprise/group/add",method:"post",data:e}),cn.setManagerAPI=e=>Js({url:"enterprise/group/setManager",method:"post",data:e}),cn.removeUserAPI=e=>Js({url:"enterprise/group/removeUser",method:"post",data:e}),cn.addGroupUserAPI=e=>Js({url:"enterprise/group/addGroupUser",method:"post",data:e}),cn.removeGrouprAPI=e=>Js({url:"enterprise/group/removeGroup",method:"post",data:e}),cn.setNoticeAPI=e=>Js({url:"enterprise/group/setNotice",method:"post",data:e}),cn.groupSettingAPI=e=>Js({url:"enterprise/group/groupSetting",method:"post",data:e}),cn.clearMessageAPI=e=>Js({url:"enterprise/group/clearMessage",method:"post",data:e}),cn.getGroupInfoAPI=e=>Js({url:"enterprise/group/groupInfo",method:"post",data:e}),cn.changeOwnerAPI=e=>Js({url:"enterprise/group/changeOwner",method:"post",data:e}),cn.isNoticeAPI=e=>Js({url:"enterprise/im/isNotice",method:"post",data:e}),cn.setChatTopAPI=e=>Js({url:"enterprise/im/setChatTop",method:"post",data:e}),cn.getUserInfo=e=>Js({url:"enterprise/im/getUserInfo",method:"post",data:e}),cn.getFileList=e=>Js({url:"enterprise/files/index",method:"post",data:e}),cn.updateUserInfo=e=>Js({url:"enterprise/im/updateUserInfo",method:"post",data:e}),cn.editAccount=e=>Js({url:"enterprise/im/editAccount",method:"post",data:e}),cn.editPassword=e=>Js({url:"enterprise/im/editpassword",method:"post",data:e}),cn.searchUser=e=>Js({url:"enterprise/im/searchUser",method:"post",data:e}),cn.userList=e=>Js({url:"enterprise/im/userList",method:"post",data:e}),cn.contactInfo=e=>Js({url:"enterprise/im/getContactInfo",method:"post",data:e});var ln=cn;const dn={getApplyList:e=>Js({url:"enterprise/friend/index",method:"post",data:e}),addFriend:e=>Js({url:"enterprise/friend/add",method:"post",data:e}),delFriend:e=>Js({url:"enterprise/friend/del",method:"post",data:e}),acceptFriend:e=>Js({url:"enterprise/friend/update",method:"post",data:e}),setNickname:e=>Js({url:"enterprise/friend/setNickname",method:"post",data:e}),getApplyMsg:e=>Js({url:"enterprise/friend/getApplyMsg",method:"post",data:e})};var un=dn;const hn={getMessageList:e=>Js({url:"manage/message/index",method:"post",data:e}),getContacts:e=>Js({url:"manage/message/getContacts",method:"post",data:e}),dealMsg:e=>Js({url:"manage/message/dealMsg",method:"post",data:e})};var pn=hn,mn={UserLogin:e=>Js({url:"common/user/login",method:"post",data:e}),SignUp:e=>Js({url:"admin/kefu/sign",method:"get",params:e}),expressionList:e=>Js({url:"admin/expression/list",method:"get",params:e}),expressionCategoryList:e=>Js({url:"admin/expressionCategory/list",method:"get",params:e}),enterpriseImTransferHuman:e=>Js({url:"enterprise/im/transferHuman",method:"get",params:e}),kefuHandleChat:e=>Js({url:"admin/kefu/handleChat",method:"get",params:e}),adminList:e=>Js({url:"admin/list",method:"get",params:e}),kefuList:e=>Js({url:"admin/kefu/select",method:"get",params:e}),kefuTransferChat:e=>Js({url:"admin/kefu/transferChat",method:"get",params:e}),kefuFinishedChat:e=>Js({url:"admin/kefu/finishedChat",method:"get",params:e}),complaintList:e=>Js({url:"enterprise/im/complaintList",method:"get",params:e}),complaint:e=>Js({url:"enterprise/im/complaint",method:"post",data:e}),enterpriseUserGuessask:e=>Js({url:"enterprise/im/guessask",method:"get",params:e}),enterpriseUserGuessaskClick:e=>Js({url:"enterprise/im/guessaskClick",method:"get",params:e}),enterpriseQuestionClick:e=>Js({url:"enterprise/im/questionClick",method:"get",params:e}),enterpriseScore:e=>Js({url:"enterprise/im/score",method:"post",data:e}),getSign:e=>Js({url:"admin/admin/getSign",method:"get",params:e}),hasChat:e=>Js({url:"admin/kefu/hasChat",method:"get",params:e}),translate:e=>Js({url:"admin/kefu/translate",method:"get",params:e})},gn={taskApi:en,configApi:sn,userApi:an,groupApi:rn,imApi:ln,commonApi:Zs,friendApi:un,messageApi:pn,custom:mn};s["default"].use(U.Ay);const fn={userInfo:null,allAuth:null,socketAction:"",contactSync:"",toContactId:0,qrLoginUrl:"",unread:0,allContacts:[],globalConfig:[],wsStatus:!0,setting:{sendKey:"1",theme:"default",isVoice:!0,avatarCricle:!1,hideMessageName:!1,hideMessageTime:!1}},vn={SET_USERINFO:(e,t)=>{t?(r().set("UserInfo",t),e.userInfo=t,t.setting&&(e.setting=t.setting)):e.userInfo=null},SET_AUTH:(e,t)=>{const i=t.authToken,s=t.sessionId;r().set("authToken",i),r().set("sessionId",s),Ds(i,s)},catchSocketAction(e,t){e.socketAction=t},updateUnread:(e,t)=>{e.unread=parseInt(t)},initContacts:(e,t)=>{e.allContacts=t},openChat:(e,t)=>{e.toContactId=t,e.contactSync=Math.random().toString(36).substr(-8)},updateSetting(e,t){e.userInfo.setting=t,e.setting=t},setGlobalConfig(e,t){e.globalConfig=t}},yn={Login({commit:e,dispatch:t},i){return new Promise((s,n)=>{Zs.loginAPI(i).then(t=>{const i=t.data||i;e("SET_AUTH",i),e("SET_USERINFO",i.userInfo),s(t)}).catch(e=>{t("LogOut"),n(e)})})},LogOut({commit:e}){return new Promise((e,t)=>{Zs.logoutAPI().then(()=>{r().rm("authToken"),r().rm("sessionId"),r().rm("UserInfo"),Ms(),Es(),e()}).catch(e=>{t(e)})})},getSystemInfo({commit:e}){return new Promise((t,i)=>{Zs.getSystemInfo().then(i=>{if(0==i.code){r().set("globalConfig",i.data),e("setGlobalConfig",i.data);let s=_s.app.$route,n=s.query;console.log(n),n.token&&gn.custom.UserLogin(n).then(e=>{let t=e.data;this.commit("SET_AUTH",{authToken:t.authToken,sessionId:t.sessionId}),this.commit("SET_USERINFO",t.userInfo);let i=setTimeout(()=>{clearTimeout(i),_s.app.$router.replace("/userChat").then(()=>{window.location.reload(),window.history.replaceState(null,"",window.location.href)})},1e3)}),n.from&&n.uid&&n.account&&(n.avatar&&(n.avatar=decodeURIComponent(n.avatar)),gn.custom.UserLogin(n).then(e=>{console.log(n),console.log(e.data);let t=e.data;this.commit("SET_AUTH",{authToken:t.authToken,sessionId:t.sessionId}),this.commit("SET_USERINFO",t.userInfo);let i=setTimeout(()=>{clearTimeout(i),_s.app.$router.replace("/userChat").then(()=>{window.location.reload(),window.history.replaceState(null,"",window.location.href)})},1e3)})),t(i)}}).catch(e=>{i(e)})})},sendCode({commit:e},t){return new Promise((e,i)=>{Zs.sendCode(t).then(t=>{e(t)}).catch(e=>{i(e)})})}};var bn=new U.Ay.Store({state:fn,mutations:vn,actions:yn}),Cn=i(7110),xn=i.n(Cn),wn=i(7311);s["default"].directive("outside",wn.A);var kn,En,_n,In,An,Sn,Tn,Mn,Dn,Ln,Nn,Un,Pn,On,$n,Rn,jn,Bn,Fn=JSON.parse('{"name":"Raingad-IM","version":"6.2.0","description":"一款基于vue2.0的即时聊天工具","frontUrl":"https://gitee.com/raingad/im-chat-front","backstageUrl":"https://gitee.com/raingad/im-instant-chat","mobileUrl":"https://im.raingad.com/h5","author":"Raingad","license":"Apache2.0","qqGroupUrl":"https://qm.qq.com/q/RgHdvLGiMk","private":true,"funcList":[{"icon":"el-icon-chat-line-round","text":"支持单聊和群聊,支持发送表情、图片、语音、视频和文件消息"},{"icon":"el-icon-potato-strips","text":"单聊支持消息已读未读的状态显示,在线状态显示"},{"icon":"el-icon-user","text":"群聊创建、删除和群成员管理、群公告、群禁言、@群成员等"},{"icon":"el-icon-ice-cream-round","text":"支持置顶联系人,消息免打扰;支持设置新消息声音提醒,浏览器通知"},{"icon":"el-icon-video-camera","text":"支持一对一音视频通话(已打通web端和移动端,小程序不支持)"},{"icon":"el-icon-milk-tea","text":"支持文件、图片和绝大部分媒体文件在线预览"},{"icon":"el-icon-mobile-phone","text":"支持移动端(由uniapp开发,可打包H5、APP和小程序),支持简易后台管理"},{"icon":"el-icon-coffee-cup","text":"支持企业模式和社交模式,社交模式支持注册、添加好友功能"}],"scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","lint":"vue-cli-service lint"},"dependencies":{"axios":"^0.21.4","core-js":"^3.8.3","cropperjs":"^1.5.13","element-ui":"^2.15.13","js-audio-recorder":"^1.0.7","js-web-screen-shot":"^1.9.8-rc.3","lockr":"^0.8.5","nprogress":"^0.2.0","qs":"^6.14.0","throttle-debounce":"^5.0.2","v-clipboard":"^2.2.3","vue":"^2.6.14","vue-canvas-poster":"^1.2.1","vue-i18n":"^8.28.2","vue-qr":"^4.0.9","vue-router":"^3.5.1","vuex":"^3.6.2"},"devDependencies":{"@babel/core":"^7.12.16","@vue/cli-plugin-babel":"~5.0.0","@vue/cli-plugin-router":"~5.0.0","@vue/cli-plugin-vuex":"~5.0.0","@vue/cli-service":"~5.0.0","prettier":"^2.4.1","sass":"^1.32.7","sass-loader":"^12.0.0","vue-template-compiler":"^2.6.14"},"rules":{"generator-star-spacing":"off","no-tabs":"off","no-unused-vars":"off","no-console":"off","no-irregular-whitespace":"off","no-debugger":"off"}}'),Vn=i(6876),zn=i.n(Vn),Hn={name:"lemonMessageVoice",inheritAttrs:!1,inject:["IMUI"],render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-voice"},{props:{...this.$attrs}},{attrs:{reverse:this.$attrs.reverse,message:this.$attrs.message,hideName:this.$attrs.hideName,hideTime:this.$attrs.hideTime},scopedSlots:{content:t=>e("div",{class:["voice-card lz-flex lz-justify-content-start lz-align-items-center",{"im-rows-reverse":this.$attrs.reverse}],style:{width:3*t.extends.duration+"px"}},[e("div",{class:["iconfont icon-im-yuyin f-16",{"voice-icon":t.isPlay},{rotate180:this.$attrs.reverse}]})," ",e("div",[t.extends.duration,'"'])])}}]))}},Gn=Hn,Kn=(0,d.A)(Gn,kn,En,!1,null,null,null),qn=Kn.exports,Qn={name:"lemonMessageVideo",inheritAttrs:!1,inject:["IMUI"],render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-video"},{props:{...this.$attrs}},{attrs:{reverse:this.$attrs.reverse,message:this.$attrs.message,hideName:this.$attrs.hideName,hideTime:this.$attrs.hideTime},scopedSlots:{content:t=>e("div",{class:["video-card"],style:{}},[e("el-image",{style:"max-height: 200px",attrs:{src:t.extends.poster,fit:"cover"}},[e("div",{slot:"error",class:"image-slot"},[e("i",{class:"el-icon-picture-outline"})])]),e("div",{class:"video-shadow"},[e("div",{class:"el-icon el-icon-video-play c-white f-28 video-icon"})])])}}]))}},Yn=Qn,Jn=(0,d.A)(Yn,_n,In,!1,null,null,null),Wn=Jn.exports,Zn={name:"lemonMessageWebrtc",inheritAttrs:!1,inject:["IMUI"],render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-webrtc"},{props:{...this.$attrs}},{attrs:{reverse:this.$attrs.reverse,message:this.$attrs.message,hideName:this.$attrs.hideName,hideTime:this.$attrs.hideTime},scopedSlots:{content:t=>e("div",{class:["voice-card lz-flex lz-justify-content-start lz-align-items-center",{"im-rows-reverse":this.$attrs.reverse}],style:""},[e("div",{class:["el-icon f-16",{"el-icon-phone-outline":0==t.extends.type},{"el-icon-video-camera":1==t.extends.type},{rotate180:this.$attrs.reverse}]})," ",e("div",[t.content])])}}]))}},Xn=Zn,ea=(0,d.A)(Xn,An,Sn,!1,null,null,null),ta=ea.exports,ia=i(7603),sa={name:"lemonMessageFile",inheritAttrs:!1,render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-file"},{props:{...this.$attrs}},{scopedSlots:{content:t=>[e("div",{class:"lemon-message-file__inner"},[e("p",{class:"lemon-message-file__name"},[t.fileName]),e("p",{class:"lemon-message-file__byte"},[(0,ia.KU)(t.fileSize)])]),e("div",{class:"lemon-message-file__sfx"},[e("img",{attrs:{src:t.extUrl},style:"width:34px;height:42px"})])]}}]))}},na=sa,aa=(0,d.A)(na,Tn,Mn,!1,null,"8e81f66c",null),oa=aa.exports,ra={name:"lemonMessageText",inheritAttrs:!1,inject:["IMUI"],computed:{...(0,U.aH)({globalConfig:e=>e.globalConfig})},render(){const e=arguments[0];let t=r().get("UserInfo"),i=!1;return i=!(!t||0!==t.role),e("lemon-message-basic",zn()([{class:"lemon-message-text"},{props:{...this.$attrs}},{scopedSlots:{content:t=>{const s=this.IMUI.emojiNameToImage(t.content),n=t.translate_content?this.IMUI.emojiNameToImage(t.translate_content):this.IMUI.emojiNameToImage(t.content),a=t.extends&&t.extends.content,o=t.extends&&t.extends.translationResult,r=(t.extends&&t.extends.translate,t.extends&&t.extends.isMe,1==this.globalConfig.translate);return e("div",{style:"width: 100%"},[e("span",i?zn()([{style:"word-break: break-all;"},{domProps:{innerHTML:t.translate_content?t.translate_content:s}}]):[e("span",zn()([{},{domProps:{innerHTML:n}}])),t.translate_content&&r?e("div",{style:"height: 1px;background: #252438;margin:6px 0"}):"",t.translate_content&&r?e("span",zn()([{style:"font-size: 12px;color: #666;"},{domProps:{innerHTML:`${s}`}}])):""]),r&&o?e("div",{class:"message-quote message-translation-result"},["翻译:",e("span",zn()([{},{domProps:{innerHTML:o}}]))]):"",a?e("div",{class:"message-quote"},[e("span",[t.extends.content])]):""])}}}]))}},ca=ra,la=(0,d.A)(ca,Dn,Ln,!1,null,"7646feeb",null),da=la.exports,ua={name:"lemonMessageList",inheritAttrs:!1,inject:["IMUI"],methods:{handleQuestionClick(e,t){t.stopPropagation();let i=JSON.parse(localStorage.getItem("UserInfo")).data;this.$api.imApi.sendMessageAPI({id:(0,ae.Ij)(),type:"text",status:"going",sendTime:Date.now(),toContactId:this.IMUI.currentContactId,fromUser:{id:i.user_id,displayName:i.displayName,avatar:i.avatar,account:i.account},content:`<p><span class="chat-grid-input chat-stat">${e.question}</span></p>`,file_id:0,is_group:0,question_id:e.id}).then(e=>{0==e.code&&(this.IMUI.setEditorValue(""),this.IMUI.updateMessage(e.data))}).catch(e=>{}),this.$emit("question-click",e)}},render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-list"},{props:{...this.$attrs}},{scopedSlots:{content:t=>{let i={};try{i=JSON.parse(this.IMUI.emojiNameToImage(t.content))}catch(n){console.error("JSON解析失败:",n),i={title:"",list:[]}}const s=i.list?.map(t=>e("div",{key:t.id,class:"question-item",on:{click:e=>this.handleQuestionClick(t,e)}},[t.question]))||[];return e("div",{class:"message-content-wrapper"},[e("span",zn()([{},{domProps:{innerHTML:i.title}}])),e("div",{class:"question-list"},[s])])}}}]))}},ha=ua,pa=(0,d.A)(ha,Nn,Un,!1,null,"2e3e2d3e",null),ma=pa.exports,ga={name:"lemonMessageAnswer",inheritAttrs:!1,inject:["IMUI"],data(){return{canClick:!0,localClickStatus:null}},render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-answer"},{props:{...this.$attrs}},{scopedSlots:{content:t=>{const i=this.IMUI.emojiNameToImage(t.content),s=null!==this.localClickStatus?this.localClickStatus:t.is_click,n=async()=>{this.canClick&&0===s&&(this.canClick=!1,this.localClickStatus=1,this.handleLikeApi(t,1))},a=async()=>{this.canClick&&0===s&&(this.canClick=!1,this.localClickStatus=2,this.handleLikeApi(t,0))};return e("div",{class:"msg-box"},[i,e("span",{attrs:{className:"like-box"}},[1===s&&e("span",{class:"like-item like-selected"},[e("svg",{attrs:{t:"1767518745497",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3824",width:"200",height:"200"},class:"like-icon"},[e("path",{attrs:{d:"M64 483.04V872c0 37.216 30.144 67.36 67.36 67.36H192V416.32l-60.64-0.64A67.36 67.36 0 0 0 64 483.04zM857.28 344.992l-267.808 1.696c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-68.832-155.488-137.568-145.504-60.608 8.8-67.264 61.184-67.264 126.816v59.264c0 76.064-63.84 140.864-137.856 148L256 416.96v522.4h527.552a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824z","p-id":"3825",fill:"#3472ED"}})])]),2===s&&e("span",{class:"like-item like-selected"},[e("svg",{attrs:{t:"1767518745497",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3824",width:"200",height:"200"},class:"like-icon like-icon-reverse",style:"top: 6px"},[e("path",{attrs:{d:"M64 483.04V872c0 37.216 30.144 67.36 67.36 67.36H192V416.32l-60.64-0.64A67.36 67.36 0 0 0 64 483.04zM857.28 344.992l-267.808 1.696c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-68.832-155.488-137.568-145.504-60.608 8.8-67.264 61.184-67.264 126.816v59.264c0 76.064-63.84 140.864-137.856 148L256 416.96v522.4h527.552a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824z","p-id":"3825",fill:"#65718B"}})])]),0===s&&e("span",[" ",e("span",{class:"like-item",on:{click:n}},[e("svg",{attrs:{t:"1767518522432",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3667",width:"200",height:"200"},class:"like-icon"},[e("path",{attrs:{d:"M190.193225 471.411583c14.446014 0 26.139334-11.718903 26.139334-26.13831 0-14.44499-11.69332-26.164916-26.139334-26.164916-0.271176 0-0.490164 0.149403-0.73678 0.149403l-62.496379 0.146333c-1.425466-0.195451-2.90005-0.295735-4.373611-0.295735-19.677155 0-35.621289 16.141632-35.621289 36.114522L86.622358 888.550075c0 19.949354 15.96767 35.597753 35.670407 35.597753 1.916653 0 3.808746 0.292666 5.649674 0l61.022819 0.022513c0.099261 0 0.148379 0.048095 0.24764 0.048095 0.097214 0 0.146333-0.048095 0.24457-0.048095l0.73678 0 0-0.148379c13.413498-0.540306 24.174586-11.422144 24.174586-24.960485 0-13.55983-10.760065-24.441669-24.174586-24.981974l0-0.393973-50.949392 0 1.450025-402.275993L190.193225 471.409536z",fill:"#5D5D5D","p-id":"3668"}}),e("path",{attrs:{d:"M926.52241 433.948343c-19.283182-31.445176-47.339168-44.172035-81.289398-45.546336-1.77032-0.246617-3.536546-0.39295-5.380544-0.39295l-205.447139-0.688685c13.462616-39.059598 22.698978-85.58933 22.698978-129.317251 0-28.349675-3.193739-55.962569-9.041934-82.542948l-0.490164 0.049119c-10.638291-46.578852-51.736315-81.31498-100.966553-81.31498-57.264215 0-95.466282 48.15065-95.466282 106.126063 0 3.241834-0.294712 6.387477 0 9.532097-2.996241 108.386546-91.240027 195.548698-196.23636 207.513194l0 54.881958-0.785899 222.227314 0 229.744521 10.709923 0 500.025271 0.222057 8.746198-0.243547c19.35686 0.049119 30.239721-4.817726 47.803749-16.116049 16.682961-10.761088 29.236881-25.50079 37.490869-42.156122 2.260483-3.341095 4.028757-7.075139 5.106298-11.20111l77.018118-344.324116c1.056052-4.053316 1.348718-8.181333 1.056052-12.160971C943.643346 476.446249 938.781618 453.944769 926.52241 433.948343zM893.82573 486.837924l-82.983993 367.783411-0.099261-0.049119c-2.555196 6.141884-6.879688 11.596106-12.872169 15.427364-4.177136 2.727111-8.773827 4.351098-13.414521 4.964058-1.49812-0.195451-3.046383 0-4.620227 0l-477.028511-0.540306-0.171915-407.408897c89.323375-40.266076 154.841577-79.670527 188.596356-173.661202 0.072655 0.024559 0.124843 0.049119 0.195451 0.072655 2.99931-9.137101 6.313799-20.73423 8.697079-33.164331 5.551436-29.185716 5.258771-58.123792 5.258771-58.123792-4.937452-37.98001 25.940812-52.965306 44.364417-52.965306 25.304316 0.860601 50.263777 33.656541 50.263777 52.326762 0 0 5.600555 27.563776 5.649674 57.190537 0.048095 37.366026-4.6673 56.847729-4.6673 56.847729l-0.466628 0c-5.872754 30.879288-16.214287 60.138682-30.464849 86.964654l0.36839 0.342808c-2.358721 4.815679-3.709485 10.220782-3.709485 15.943111 0 19.922748 19.088754 21.742187 38.765909 21.742187l238.761895 0.270153c0 0 14.666024 0.465604 14.690584 0.465604l0 0.100284c12.132318-0.638543 24.221658 5.207605 31.100322 16.409738 5.504364 9.016351 6.437619 19.6045 3.486404 28.988218L893.82573 486.837924z",fill:"#5D5D5D","p-id":"3669"}}),e("path",{attrs:{d:"M264.827039 924.31872c0.319272 0.024559 0.441045 0.024559 0.295735-0.024559 0.243547-0.048095 0.367367-0.074701-0.295735-0.074701s-0.539282 0.026606-0.271176 0.074701C264.43409 924.343279 264.532327 924.343279 264.827039 924.31872z",fill:"#5D5D5D","p-id":"3670"}})])]),e("span",{class:"like-item",on:{click:a}},[e("svg",{attrs:{t:"1767518522432",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3667",width:"200",height:"200"},class:"like-icon like-icon-reverse",style:"top: 6px"},[e("path",{attrs:{d:"M190.193225 471.411583c14.446014 0 26.139334-11.718903 26.139334-26.13831 0-14.44499-11.69332-26.164916-26.139334-26.164916-0.271176 0-0.490164 0.149403-0.73678 0.149403l-62.496379 0.146333c-1.425466-0.195451-2.90005-0.295735-4.373611-0.295735-19.677155 0-35.621289 16.141632-35.621289 36.114522L86.622358 888.550075c0 19.949354 15.96767 35.597753 35.670407 35.597753 1.916653 0 3.808746 0.292666 5.649674 0l61.022819 0.022513c0.099261 0 0.148379 0.048095 0.24764 0.048095 0.097214 0 0.146333-0.048095 0.24457-0.048095l0.73678 0 0-0.148379c13.413498-0.540306 24.174586-11.422144 24.174586-24.960485 0-13.55983-10.760065-24.441669-24.174586-24.981974l0-0.393973-50.949392 0 1.450025-402.275993L190.193225 471.409536z",fill:"#5D5D5D","p-id":"3668"}}),e("path",{attrs:{d:"M926.52241 433.948343c-19.283182-31.445176-47.339168-44.172035-81.289398-45.546336-1.77032-0.246617-3.536546-0.39295-5.380544-0.39295l-205.447139-0.688685c13.462616-39.059598 22.698978-85.58933 22.698978-129.317251 0-28.349675-3.193739-55.962569-9.041934-82.542948l-0.490164 0.049119c-10.638291-46.578852-51.736315-81.31498-100.966553-81.31498-57.264215 0-95.466282 48.15065-95.466282 106.126063 0 3.241834-0.294712 6.387477 0 9.532097-2.996241 108.386546-91.240027 195.548698-196.23636 207.513194l0 54.881958-0.785899 222.227314 0 229.744521 10.709923 0 500.025271 0.222057 8.746198-0.243547c19.35686 0.049119 30.239721-4.817726 47.803749-16.116049 16.682961-10.761088 29.236881-25.50079 37.490869-42.156122 2.260483-3.341095 4.028757-7.075139 5.106298-11.20111l77.018118-344.324116c1.056052-4.053316 1.348718-8.181333 1.056052-12.160971C943.643346 476.446249 938.781618 453.944769 926.52241 433.948343zM893.82573 486.837924l-82.983993 367.783411-0.099261-0.049119c-2.555196 6.141884-6.879688 11.596106-12.872169 15.427364-4.177136 2.727111-8.773827 4.351098-13.414521 4.964058-1.49812-0.195451-3.046383 0-4.620227 0l-477.028511-0.540306-0.171915-407.408897c89.323375-40.266076 154.841577-79.670527 188.596356-173.661202 0.072655 0.024559 0.124843 0.049119 0.195451 0.072655 2.99931-9.137101 6.313799-20.73423 8.697079-33.164331 5.551436-29.185716 5.258771-58.123792 5.258771-58.123792-4.937452-37.98001 25.940812-52.965306 44.364417-52.965306 25.304316 0.860601 50.263777 33.656541 50.263777 52.326762 0 0 5.600555 27.563776 5.649674 57.190537 0.048095 37.366026-4.6673 56.847729-4.6673 56.847729l-0.466628 0c-5.872754 30.879288-16.214287 60.138682-30.464849 86.964654l0.36839 0.342808c-2.358721 4.815679-3.709485 10.220782-3.709485 15.943111 0 19.922748 19.088754 21.742187 38.765909 21.742187l238.761895 0.270153c0 0 14.666024 0.465604 14.690584 0.465604l0 0.100284c12.132318-0.638543 24.221658 5.207605 31.100322 16.409738 5.504364 9.016351 6.437619 19.6045 3.486404 28.988218L893.82573 486.837924z",fill:"#5D5D5D","p-id":"3669"}}),e("path",{attrs:{d:"M264.827039 924.31872c0.319272 0.024559 0.441045 0.024559 0.295735-0.024559 0.243547-0.048095 0.367367-0.074701-0.295735-0.074701s-0.539282 0.026606-0.271176 0.074701C264.43409 924.343279 264.532327 924.343279 264.827039 924.31872z",fill:"#5D5D5D","p-id":"3670"}})])])])])])}}}]))},methods:{handleLikeApi(e,t){this.$api.custom.enterpriseQuestionClick({msg_id:e.msg_id,is_like:t}).then(()=>{this.$emit("update:clickStatus",t?1:2),this.canClick=!0}).catch(()=>{this.canClick=!0,this.localClickStatus=null})}}},fa=ga,va=(0,d.A)(fa,Pn,On,!1,null,"4e6eb262",null),ya=va.exports,ba={name:"lemonMessageHtml",inheritAttrs:!1,inject:["IMUI"],render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-html"},{props:{...this.$attrs}},{scopedSlots:{content:t=>{const i=this.IMUI.emojiNameToImage(t.content);return e("div",{style:"width: 100%"},[e("span",zn()([{style:"word-break: break-all;"},{domProps:{innerHTML:i}}]))])}}}]))}},Ca=ba,xa=(0,d.A)(Ca,$n,Rn,!1,null,"70b9594e",null),wa=xa.exports,ka={name:"lemonMessageScore",inheritAttrs:!1,inject:["IMUI"],data(){return{evaluateShow:!1,evaluateValue:0,msg:{}}},methods:{confirmEvaluate(e){0!==this.evaluateValue?this.$api.custom.enterpriseScore({score:this.evaluateValue,msg_id:this.msg.msg_id}).then(e=>{this.evaluateShow=!1,this.evaluateValue=0,0==e.code&&this.$message.success(e.msg)}):this.$message?.warning("请先对本次服务进行评分")}},render(){const e=arguments[0];return e("lemon-message-basic",zn()([{class:"lemon-message-score"},{props:{...this.$attrs}},{scopedSlots:{content:t=>{const i=this.IMUI.emojiNameToImage(t.content);return this.msg=t,e("div",{on:{click:()=>{this.evaluateShow=!0}}},[e("span",zn()([{},{domProps:{innerHTML:i}},{style:"cursor: pointer"}])),e("el-dialog",zn()([{},{props:{title:this.$t("评价"),visible:this.evaluateShow,width:"400px",appendToBody:!0,modalAppendToBody:!0,closeOnClickModal:!0,lockScroll:!0,modalZIndex:2e3}},{on:{close:()=>{this.evaluateValue=0,this.evaluateShow=!1}}}]),[e("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},[e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},[e("div",{style:{marginBottom:"20px"}},[0===this.evaluateValue?e("span",[this.$t("请对本次服务进行评分")]):[this.$t("非常不满意"),this.$t("不满意"),this.$t("一般"),this.$t("满意"),this.$t("非常满意")][this.evaluateValue-1]]),e("el-rate",zn()([{style:{transform:"scale(1.5)"}},{props:{value:this.evaluateValue}},{on:{input:e=>{this.evaluateValue=e}}}]))])]),e("template",{slot:"footer"},[e("el-button",{on:{click:()=>{this.evaluateShow=!1,this.evaluateValue=0}}},[this.$t("取消")]),e("el-button",{on:{click:this.confirmEvaluate},attrs:{type:"primary"}},[this.$t("确定")])])])])}}}]))}},Ea=ka,_a=(0,d.A)(Ea,jn,Bn,!1,null,"7eecd2c6",null),Ia=_a.exports;const Aa=[],Sa="@@wkClickoutsideContext";let Ta,Ma=0;function Da(e,t,i){return function(s={},n={}){!(i&&i.context&&s.target&&n.target)||e.contains(s.target)||e.contains(n.target)||e===s.target||i.context.popperElm&&(i.context.popperElm.contains(s.target)||i.context.popperElm.contains(n.target))||(t.expression&&e[Sa].methodName&&i.context[e[Sa].methodName]?i.context[e[Sa].methodName]():e[Sa].bindingFn&&e[Sa].bindingFn())}}!s["default"].prototype.$isServer&&Mi(document,"mousedown",e=>Ta=e),!s["default"].prototype.$isServer&&Mi(document,"mouseup",e=>{Aa.forEach(t=>t[Sa].documentHandler(e,Ta))});var La={bind(e,t,i){Aa.push(e);const s=Ma++;e[Sa]={id:s,documentHandler:Da(e,t,i),methodName:t.expression,bindingFn:t.value}},update(e,t,i){e[Sa].documentHandler=Da(e,t,i),e[Sa].methodName=t.expression,e[Sa].bindingFn=t.value},unbind(e){const t=Aa.length;for(let i=0;i<t;i++)if(Aa[i][Sa].id===e[Sa].id){Aa.splice(i,1);break}delete e[Sa]}};s["default"].use(j),s["default"].use(K),s["default"].use(m(),{size:"small"}),s["default"].use(Q()),s["default"].use(bn),s["default"].use(xn()),s["default"].config.productionTip=!1,s["default"].prototype.$packageData=Fn,s["default"].component(Wn.name,Wn),s["default"].component(qn.name,qn),s["default"].component(ta.name,ta),s["default"].component(oa.name,oa),s["default"].component(da.name,da),s["default"].component(ma.name,ma),s["default"].component(ya.name,ya),s["default"].component(wa.name,wa),s["default"].component(Ia.name,Ia),s["default"].directive("elclickoutside",La),s["default"].prototype.$api=gn,new s["default"]({el:"#app",router:_s,store:bn,i18n:D,components:{App:h},template:"<App/>"})},7603:function(e,t,i){"use strict";function s(e){let t=new Array(" B"," KB"," MB"," GB"," TB"),i=e+"B";for(let s=0;e>=1024&&s<4;s++)e/=1024,i=e.toFixed(2)+t[s+1];return i}function n(e){var t="https://file.lcoce.com/ext/",i=e.split("."),s=i[i.length-1],n=s.toUpperCase(),a=["jpg","jpeg","png","bmp","gif","pdf","mp3","wav","wmv","amr","mp4","3gp","avi","m2v","mkv","mov","webp","ppt","pptx","doc","docx","xls","xlsx","pdf"];return a.includes(n)?t+n+".png":t+"icon/document.svg"}function a(e,t){let i=document.createElement("a"),s=e.split(".").pop(),n=["jpg","jpeg","png","bmp","gif","pdf","mp3","wav","wmv","amr","mp4","3gp","avi","m2v","mkv","mov","webp"];-1!==n.indexOf(s)?i.download=t||"pic":i.download=t||"file",i.href=e,i.click()}i.d(t,{KU:function(){return s},Lm:function(){return n},RG:function(){return a}})},3937:function(e,t,i){"use strict";i.d(t,{DC:function(){return o},Go:function(){return s},Ij:function(){return h},Im:function(){return d},cZ:function(){return c},dj:function(){return u},iq:function(){return l},l:function(){return n},mD:function(){return a},p6:function(){return r}});i(9434),i(1637),i(3196),i(1752),i(3335),i(3261),i(9664),i(4318),i(5057),i(9936),i(2186),i(4326),i(880),i(1643);function s(e){return JSON.parse(JSON.stringify(e))}function n(e,t,i){if("object"!==typeof e)return!1;for(var s=[],n=0;e.length>n;n++)if("object"==typeof t)for(var a=0;t.length>a;a++){var o=t[a],r=e[n][o];if(-1!=r.indexOf(i)){s.push(e[n]);break}}else{r=e[n][t];-1!=r.indexOf(i)&&s.push(e[n])}return s}function a(e,t,i){i="undefined"!==typeof i&&i;for(var s=[],n=0;n<e.length;n++)s.push(e[n][t]);return!0===i?s.join(","):s}function o(e){const t=new Date,i=new Date(e),s=new Date(t.getFullYear(),t.getMonth(),t.getDate());new Date(s-864e5),new Date(s-24*(s.getDay()-1)*60*60*1e3),new Date(t.getFullYear(),0,1);return r(i>=s?"H:i":"Y-m-d H:i:s",e/1e3)}function r(e,t){var i=t?new Date(1e3*t):new Date,s=function(e,t){return(e+="").length<t?new Array(++t-e.length).join("0")+e:e},n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"},o=["","January","February","March","April","May","June","July","August","September","October","November","December"],c={d:function(){return s(c.j(),2)},D:function(){return c.l().substr(0,3)},j:function(){return i.getDate()},l:function(){return n[c.w()]},N:function(){return c.w()+1},S:function(){return a[c.j()]?a[c.j()]:"th"},w:function(){return i.getDay()},z:function(){return(i-new Date(i.getFullYear()+"/1/1"))/864e5|0},W:function(){var e,t=c.z(),s=364+c.L()-t,n=(new Date(i.getFullYear()+"/1/1").getDay()||7)-1;return s<=2&&(i.getDay()||7)-1<=2-s?1:t<=2&&n>=4&&t>=6-n?(e=new Date(i.getFullYear()-1+"/12/31"),r("W",Math.round(e.getTime()/1e3))):1+(n<=3?(t+n)/7:(t-(7-n))/7)|0},F:function(){return o[c.n()]},m:function(){return s(c.n(),2)},M:function(){return c.F().substr(0,3)},n:function(){return i.getMonth()+1},t:function(){var e;return 2===(e=i.getMonth()+1)?28+c.L():1&e&&e<8||!(1&e)&&e>7?31:30},L:function(){var e=c.Y();return 3&e||!(e%100)&&e%400?0:1},Y:function(){return i.getFullYear()},y:function(){return(i.getFullYear()+"").slice(2)},a:function(){return i.getHours()>11?"pm":"am"},A:function(){return c.a().toUpperCase()},B:function(){var e=60*(i.getTimezoneOffset()+60),t=3600*i.getHours()+60*i.getMinutes()+i.getSeconds()+e,s=Math.floor(t/86.4);return s>1e3&&(s-=1e3),s<0&&(s+=1e3),1===String(s).length&&(s="00"+s),2===String(s).length&&(s="0"+s),s},g:function(){return i.getHours()%12||12},G:function(){return i.getHours()},h:function(){return s(c.g(),2)},H:function(){return s(i.getHours(),2)},i:function(){return s(i.getMinutes(),2)},s:function(){return s(i.getSeconds(),2)},O:function(){var e=s(Math.abs(i.getTimezoneOffset()/60*100),4);return e=i.getTimezoneOffset()>0?"-"+e:"+"+e,e},P:function(){var e=c.O();return e.substr(0,3)+":"+e.substr(3,2)},c:function(){return c.Y()+"-"+c.m()+"-"+c.d()+"T"+c.h()+":"+c.i()+":"+c.s()+c.P()},U:function(){return Math.round(i.getTime()/1e3)}};let l="";return e.replace(/[\\]?([a-zA-Z])/g,function(e,t){return l=e!==t?t:c[t]?c[t]():t,l})}function c(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)});return t}function l(e,t){let i="[暂不支持的消息类型]";switch(e){case"text":i="[文本]";break;case"image":i="[图片]";break;case"voice":i="[语音]";break;case"video":i="[视频]";break;case"file":i="[文件]";break;case"location":i="[位置]";break;case"contact":i="[个人名片]";break;case"score":i="[评分]";break;case"webrtc":i=t?"[正在请求与您视频通话]":"[正在请求与您语音通话]";break}return i}function d(e){return null===e||(void 0===e||("[object Array]"===Object.prototype.toString.call(e)?0===e.length:"[object Object]"===Object.prototype.toString.call(e)?0===Object.keys(e).length:"string"===typeof e&&""===e.trim()))}function u(e){return e+="",e.includes(".")||(e+="."),e.replace(/(\d)(?=(\d{3})+\.)/g,function(e,t){return t+","}).replace(/\.$/,"")}function h(){let e="";for(let t=0;t<32;t++){const i=Math.floor(16*Math.random());e+=12===t?"4":16===t?(3&i|8).toString(16):i.toString(16)}return[e.substring(0,8),e.substring(8,12),e.substring(12,16),e.substring(16,20),e.substring(20,32)].join("-")}},2391:function(e,t,i){"use strict";i.d(t,{A:function(){return k}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-main"},[t("el-input",{staticClass:"input-with-select",attrs:{placeholder:e.$t("请输入关键字搜索聊天")},model:{value:e.params.keywords,callback:function(t){e.$set(e.params,"keywords",t)},expression:"params.keywords"}},[t("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.searchMessage},slot:"append"})],1),t("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:e.$t("全部"),name:"all"}},[t("div",{staticClass:"el-tab-body-list"},[t("el-scrollbar",[e.dataList.length?e._l(e.dataList,function(e,i){return t("ChatItem",{key:i,attrs:{data:e}})}):t("div",[t("el-empty",{attrs:{description:e.$t("暂无数据")}})],1)],2)],1)]),t("el-tab-pane",{attrs:{label:e.$t("文本"),name:"text"}},[t("div",{staticClass:"el-tab-body-list"},[e.dataList.length?[t("el-scrollbar",e._l(e.dataList,function(e,i){return t("ChatItem",{key:i,attrs:{data:e}})}),1)]:t("div",[t("el-empty",{attrs:{description:e.$t("暂无数据")}})],1)],2)]),t("el-tab-pane",{attrs:{label:e.$t("图片"),name:"image"}},[t("div",{staticClass:"el-tab-body-list"},[e.dataList.length?[t("el-scrollbar",[t("el-row",e._l(e.dataList,function(i,s){return t("ChatImage",{key:s,attrs:{data:i,previewUrl:e.previewList}})}),1)],1)]:t("div",[t("el-empty",{attrs:{description:e.$t("暂无数据")}})],1)],2)]),t("el-tab-pane",{attrs:{label:e.$t("视频"),name:"video"}},[t("div",{staticClass:"el-tab-body-list"},[e.dataList.length?[t("el-scrollbar",e._l(e.dataList,function(e,i){return t("ChatItem",{key:i,attrs:{data:e}})}),1)]:t("div",[t("el-empty",{attrs:{description:e.$t("暂无数据")}})],1)],2)]),t("el-tab-pane",{attrs:{label:e.$t("文件"),name:"file"}},[t("div",{staticClass:"el-tab-body-list"},[e.dataList.length?[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.dataList,height:"450"}},[t("el-table-column",{attrs:{prop:"fileName",label:e.$t("文件"),width:"300"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("div",{staticClass:"chat-file"},[t("div",[t("el-image",{staticClass:"fileExt",attrs:{fit:"cover",src:e.fileExt(i.row.fileName)}})],1),t("div",{staticClass:"fileName"},[e._v(e._s(i.row.fileName))])])]}}],null,!1,1885044645)}),t("el-table-column",{attrs:{prop:"sendTime",label:e.$t("上传时间"),width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatTime(t.row.sendTime))+" ")]}}],null,!1,349674723)}),t("el-table-column",{attrs:{prop:"fileSize",label:e.$t("大小"),width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.fileSize(t.row.fileSize))+" ")]}}],null,!1,3523241436)}),t("el-table-column",{attrs:{prop:"fromUser.realname",label:e.$t("上传者"),width:"100"}}),t("el-table-column",{attrs:{label:e.$t("操作")},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.downloadFile(i.row)}}},[e._v("下载")])]}}],null,!1,2401469366)})],1)]:t("div",[t("el-empty",{attrs:{description:e.$t("暂无数据")}})],1)],2)])],1),t("el-pagination",{attrs:{background:"","hide-on-single-page":e.singlePage,"page-size":e.params.limit,"current-page":e.params.page,layout:"prev, pager, next",total:e.total},on:{"update:pageSize":function(t){return e.$set(e.params,"limit",t)},"update:page-size":function(t){return e.$set(e.params,"limit",t)},"update:currentPage":function(t){return e.$set(e.params,"page",t)},"update:current-page":function(t){return e.$set(e.params,"page",t)},"current-change":e.handleCurrentChange}})],1)},n=[],a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-list-item"},[t("div",{staticClass:"chat-list-avatar",on:{click:function(t){return e.$user(e.data.fromUser.id)}}},[t("el-avatar",{attrs:{shape:"square",size:"medium",src:e.data.fromUser.avatar}})],1),t("div",{staticClass:"chat-list-body"},[t("div",{staticClass:"chat-list-title"},[e._v(" "+e._s(e.data.fromUser.realname)+" "),t("span",{staticClass:"time"},[e._v(" "+e._s(e.formatTime(e.data.sendTime)))])]),"text"==e.data.type?t("div",{staticClass:"chat-list-text",domProps:{innerHTML:e._s(e.data.content)}}):e._e(),"text"==e.data.type?t("div",{staticClass:"chat-list-tools"},[t("el-tooltip",{attrs:{effect:"dark",content:"复制文本",placement:"top"}},[t("i",{staticClass:"el-icon-document-copy",on:{click:function(t){return e.copyText(e.data.content)}}})])],1):e._e(),"image"==e.data.type?t("div",{staticClass:"chat-list-image"},[t("el-image",{staticStyle:{"max-width":"300px"},attrs:{src:e.data.content,"z-index":3e3,"preview-src-list":[e.data.content],fit:"contain"}})],1):e._e(),"video"==e.data.type?t("div",{staticClass:"chat-list-video"},[t("video",{staticStyle:{"max-width":"300px"},attrs:{src:e.data.content,controls:""}})]):e._e(),"file"==e.data.type?t("div",{staticClass:"chat-list-file"},[t("el-card",{staticStyle:{width:"260px"},attrs:{"body-style":{padding:"10px 10px 0 10px"}}},[t("div",{staticClass:"chat-file-content"},[t("div",{staticClass:"chat-file-ext"},[t("el-image",{staticStyle:{width:"35px"},attrs:{src:e.fileExt(e.data.fileName),fit:"fill"}})],1),t("div",{staticClass:"chat-file-title"},[t("div",{staticClass:"chat-file-name"},[t("span",{staticClass:"fileName"},[e._v(e._s(e.data.fileName)+" ")]),t("span",{staticClass:"fileSize"},[e._v("("+e._s(e.fileSize(e.data.fileSize))+")")])]),t("div",{staticClass:"chat-file-remark"},[e._v(" 文件已成功发送, 文件助手永久保存 ")])])]),t("hr"),t("div",{staticClass:"bottom clearfix",attrs:{align:"right"}},[t("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(t){return e.downloadFile(e.data)}}},[e._v("下载")]),t("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(t){return e.onlinePreview(e.data)}}},[e._v("在线预览")])],1)])],1):e._e()])])},o=[],r=i(3937),c=i(7603),l={name:"chatItem",props:{data:{type:Object,default:{}}},computed:{formatTime(){return function(e){return e=parseInt(e/1e3),(0,r.p6)("Y/m/d H:i:s",e)}},fileSize(){return function(e){return(0,c.KU)(e)}},fileExt(){return function(e){return(0,c.Lm)(e)}}},data(){return{}},methods:{copyText(e){this.$clipboard(e),this.$message({type:"success",message:"复制成功!"})},onlinePreview(e){this.$preview(e.preview)},downloadFile(e){(0,c.RG)(e.content,e.fileName)}},created(){}},d=l,u=i(6367),h=(0,u.A)(d,a,o,!1,null,"294ef229",null),p=h.exports,m=function(){var e=this,t=e._self._c;return t("div",[t("el-col",{staticStyle:{padding:"0 12px 12px 0"},attrs:{span:6}},["image"==e.data.type?t("el-card",{attrs:{"body-style":{padding:"0px"}}},[t("el-image",{staticStyle:{width:"100%",height:"120px"},attrs:{src:e.data.content,"preview-src-list":e.previewUrl,"z-index":9999,fit:"cover"}}),t("div",{staticStyle:{padding:"10px"}},[t("div",{staticClass:"bottom clearfix"},[t("time",{staticClass:"time"},[e._v(e._s(e.data.fromUser.realname)+" 上传于 "+e._s(e.formatTime(e.data.sendTime)))])])])],1):e._e()],1)],1)},g=[],f={name:"chatImage",props:{data:{type:Object,default:{}},previewUrl:{type:Array,default:function(){return[]}}},computed:{formatTime(){return function(e){return e=parseInt(e/1e3),(0,r.p6)("Y/m/d",e)}},fileSize(){return function(e){return(0,c.KU)(e)}},fileExt(){return function(e){return(0,c.Lm)(e)}}},data(){return{currentDate:new Date}},methods:{copyText(e){this.$clipboard(e),this.$message({type:"success",message:"复制成功!"})},downloadFile(e){(0,c.RG)(e.content,e.fileName)}},created(){}},v=f,y=(0,u.A)(v,m,g,!1,null,"94e9276a",null),b=y.exports,C={name:"chatRecord",components:{ChatItem:p,ChatImage:b},props:{contact:{type:Object,default:{}},condition:{type:Object,default:{}},manage:{type:Boolean,default:!1}},computed:{formatTime(){return function(e){return e/=1e3,(0,r.p6)("Y/m/d H:i:s",e)}},fileSize(){return function(e){return(0,c.KU)(e)}},fileExt(){return function(e){return(0,c.Lm)(e)}}},data(){return{activeName:"all",total:0,singlePage:!1,dataList:[],previewList:[],params:{toContactId:this.contact.id,is_group:this.contact.is_group,type:"all",keywords:"",page:1,limit:20}}},methods:{handleClick(e,t){this.params.page=1,this.params.type=e.name,this.getMessage()},searchMessage(){this.getMessage()},getMessage(){this.manage?this.$api.messageApi.getMessageList(this.params).then(e=>{this.realData(e)}):this.$api.imApi.getMessageListAPI(this.params).then(e=>{this.realData(e)})},realData(e){this.dataList=e.data,this.total=e.count,e.count<=this.params.limit?this.singlePage=!0:this.singlePage=!1,"image"==this.params.type&&(this.previewList=(0,r.mD)(e.data,"content",!1))},handleCurrentChange(e){this.params.page=e,this.getMessage()},downloadFile(e){(0,c.RG)(e.content,e.fileName,e.type)}},created(){this.params=Object.assign(this.params,this.condition),this.getMessage()},mounted(){}},x=C,w=(0,u.A)(x,s,n,!1,null,"2168fd33",null),k=w.exports},8282:function(e,t,i){"use strict";i.d(t,{A:function(){return l}});var s=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.title,visible:e.visible,modal:!0,width:e.width,"append-to-body":""},on:{close:e.closeDialog}},[t("el-transfer",{attrs:{filterable:"",titles:e.createChatTitles,"filter-placeholder":"请输入关键词",props:e.contactsProps,data:e.allUser},model:{value:e.selectUid,callback:function(t){e.selectUid=t},expression:"selectUid"}}),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.closeDialog}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.comfirmChat}},[e._v("确 定")])],1)],1)},n=[],a={name:"manageGroup",props:{title:{type:String,default:"选择聊天"},visible:{type:Boolean,default:!1},width:{type:String,default:"612px"},allUser:{type:Array,default:()=>[]}},data(){return{createChatTitles:["用户列表","已选用户"],selectUid:[],contactsProps:{key:"id",label:"realname"}}},mounted(){},methods:{closeDialog(){this.$emit("update:visible",!1),this.selectUid=[]},comfirmChat(){0!==this.selectUid.length?this.$emit("selectChat",this.selectUid):this.$message.error("请选择聊天对象")}}},o=a,r=i(6367),c=(0,r.A)(o,s,n,!1,null,null,null),l=c.exports},9849:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("el-container",{staticStyle:{height:"100%"}},[t("el-header",{staticClass:"file-header"},[t("div",{staticClass:"file-header-title"},[e._v("文件列表")]),t("div",{staticClass:"file-header-search"},[t("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入关键字搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getFileList.apply(null,arguments)}},model:{value:e.params.keywords,callback:function(t){e.$set(e.params,"keywords",t)},expression:"params.keywords"}},[t("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.getFileList},slot:"append"})],1)],1)]),t("el-container",[t("el-aside",{staticClass:"lz-flex group-box",attrs:{width:"150px"}},[t("div",{staticClass:"group-box-list"},e._l(e.fileType,function(i){return t("div",{key:i.id,staticClass:"chat-item",class:e.params.cate==i.id?"active":"",on:{click:function(t){return e.openFolder(i)}}},[e._v(" "+e._s(i.name)+" ")])}),0)]),t("el-main",{staticClass:"lz-flex group-box group-user-box no-padding"},[e.fileList.length?t("div",{staticClass:"group-box-list"},[t("el-scrollbar",[t("div",{staticClass:"file-list"},e._l(e.fileList,function(i,s){return t("el-tooltip",{key:s,staticClass:"item",attrs:{effect:"dark",placement:"right"}},[t("template",{slot:"content"},[t("p",{staticClass:"mb-5"},[e._v("名称:"+e._s(i.name))]),t("p",[e._v("大小:"+e._s(e.getFileSize(i.size)))])]),t("div",{staticClass:"file-item",on:{dblclick:function(t){return e.openFile(i.preview)}}},[t("div",{staticClass:"file-img"},[t("el-image",{staticClass:"img",attrs:{fit:"contain",src:i.extUrl}})],1),t("div",{staticClass:"file-name mt-5",attrs:{align:"center"}},[e._v(e._s(i.name))]),t("div",{staticClass:"file-opt"},[t("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.openFile(i.preview)}}},[e._v("查看")]),t("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.downloadFile(i)}}},[e._v("下载")]),t("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.openDialog(i)}}},[e._v("发送")])],1)])],2)}),1)])],1):t("div",{staticClass:"pd-40"},[t("el-empty")],1),e.singlePage?e._e():t("div",{staticClass:"group-box-page",attrs:{align:"center"}},[t("el-pagination",{attrs:{background:"","hide-on-single-page":e.singlePage,"current-page":e.params.page,"page-sizes":[20,50,100,200,300,400,500],"page-size":e.params.limit,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleChange,"current-change":e.getFileList,"update:currentPage":function(t){return e.$set(e.params,"page",t)},"update:current-page":function(t){return e.$set(e.params,"page",t)},"update:pageSize":function(t){return e.$set(e.params,"limit",t)},"update:page-size":function(t){return e.$set(e.params,"limit",t)}}})],1),t("ChooseDialog",{attrs:{visible:e.visible,title:"发送到聊天",allUser:e.$store.state.allContacts},on:{"update:visible":function(t){e.visible=t},selectChat:e.sendChat}})],1)],1)],1)},n=[],a=(i(9434),i(3335),i(1388),i(9664),i(4318),i(8282)),o=i(7603),r=i(3937),c={components:{ChooseDialog:a.A},props:{isAll:{type:Number,default:0}},computed:{getFileSize(){return function(e){return o.KU(e)}}},data(){return{params:{page:1,limit:20,keywords:"",cate:0,is_all:this.isAll,role:0},visible:!1,singlePage:!0,total:0,curFile:{},fileType:[{id:0,name:"所有文件",icon:""},{id:1,name:"文档",icon:""},{id:2,name:"图片",icon:""},{id:3,name:"音频",icon:""},{id:4,name:"视频",icon:""},{id:5,name:"其他文件",icon:""}],fileList:[]}},mounted(){this.getFileList()},methods:{changeRole(e){this.params.role=e,this.getFileList()},openFolder(e){this.params.cate=e.id,this.getFileList()},getFileList(){this.$api.imApi.getFileList(this.params).then(e=>{0==e.code&&(this.fileList=e.data,this.total=e.count,this.singlePage=e.count<=this.params.limit,this.params.page=e.page)})},handleChange(e){this.params.limit=e,this.getFileList()},openFile(e){e?this.$preview(e):this.$message.error("文件不存在")},downloadFile(e){e.download&&(window.location=e.download)},openDialog(e){this.visible=!0,this.curFile=e},sendChat(e){if(e.length>5)return this.$message.error("转发的人数不能超过5人!");let t=this.$store.state.userInfo;this.forwardBox=!1;let i={type:this.curFile.msg_type,content:this.curFile.src,file_name:this.curFile.name,file_size:this.curFile.size,file_id:this.curFile.file_id,fromUser:{id:t.user_id,displayName:t.realname,avatar:t.avatar,account:t.account}};var s=[];e.forEach(e=>{let t=e.toString(),n=JSON.parse(JSON.stringify(i));n.id=r.cZ(),n.status="successd",n.sendTime=(new Date).getTime(),n.toContactId=t,n.is_group=0,-1!=t.indexOf("group")&&(n.is_group=1),s.push(this.test(n))}),Promise.all(s).then(e=>{}).catch(e=>{console.log("error",e)}),this.$message.success("发送成功!"),this.visible=!1},fn(e){return new Promise((t,i)=>{this.$api.imApi.sendMessageAPI(e).then(e=>{0===e.code?t(e):this.$message.error(e.msg)}).catch(e=>{})})},async test(e){let t=await this.fn(e);return t}}},l=c,d=i(6367),u=(0,d.A)(l,s,n,!1,null,"029f4e7e",null),h=u.exports},2024:function(e,t,i){"use strict";i.d(t,{A:function(){return l}});var s=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.title,visible:e.visible,modal:!0,width:e.width,"append-to-body":""},on:{open:e.openDialog,close:e.closeDialog}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.isAdd,expression:"isAdd"}],staticClass:"mb-20"},[e._v(" 群聊名称:"),t("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入群聊名称"},model:{value:e.groupName,callback:function(t){e.groupName=t},expression:"groupName"}}),e._v(" "),t("span",{staticClass:"ml-10 c-999"},[e._v(" (必填项)")])],1),t("el-transfer",{attrs:{filterable:"",titles:e.createChatTitles,"filter-placeholder":"请输入关键词",props:e.defaultProps,data:e.allUser},model:{value:e.selectUid,callback:function(t){e.selectUid=t},expression:"selectUid"}}),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.closeDialog}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.manageGroup}},[e._v("确 定")])],1)],1)},n=[],a={name:"manageGroup",props:{title:{type:String,default:"创建群聊"},visible:{type:Boolean,default:!1},userIds:{type:Array,default:()=>[]},isAdd:{type:Number,default:0},width:{type:String,default:"612px"},groupId:{type:String,default:""}},data(){return{createChatTitles:["用户列表","已选用户"],selectUid:[],allUser:[],groupName:"",defaultProps:{key:"user_id",label:"realname",pinyin:"name_py"}}},mounted(){},methods:{openDialog(){let e={};this.userIds.length>0&&(e.user_ids=this.userIds),this.groupId&&2==this.isAdd&&(e.group_id=this.groupId),this.getAllUser(e)},closeDialog(){this.$emit("update:visible",!1),this.selectUid=[]},manageGroup(){switch(this.isAdd){case 0:if(this.selectUid.length<1)return void this.$message.error("请选择要添加的成员");break;case 1:if(this.selectUid.length<2)return void this.$message.error("群聊人数不能少于2人");if(""==this.groupName||this.groupName.length<2||this.groupName.length>20)return void this.$message.error("请输入正确的群聊名称");break;case 2:if(1!=this.selectUid.length)return void this.$message.error("只能选择一位成员!");break}this.$emit("manageGroup",this.selectUid,this.isAdd,this.groupName)},getAllUser(e){this.$api.imApi.getAllUserAPI(e).then(e=>{const t=e.data;this.allUser=t})}}},o=a,r=i(6367),c=(0,r.A)(o,s,n,!1,null,null,null),l=c.exports},285:function(e){"use strict";e.exports="data:image/png;base64,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"},3597:function(e){"use strict";e.exports="data:image/png;base64,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"},2431:function(e){"use strict";e.exports="data:image/png;base64,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"},1134:function(e){"use strict";e.exports="data:image/png;base64,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"},7076:function(e){"use strict";e.exports="data:image/png;base64,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"},8028:function(e){"use strict";e.exports="data:image/png;base64,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"},4186:function(e,t,i){"use strict";e.exports=i.p+"assets/media/calling.69742e4c.mp3"},7061:function(e,t,i){"use strict";e.exports=i.p+"assets/media/guaduan.c0b3124b.mp3"},4565:function(e,t,i){"use strict";e.exports=i.p+"assets/media/notify.3d49176d.mp3"},3598:function(e,t,i){"use strict";e.exports=i.p+"assets/media/notify.7668dd76.ogg"},8137:function(e,t,i){"use strict";e.exports=i.p+"assets/media/notify.e6953ff1.wav"},3837:function(){}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var a=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.m=e,function(){i.amdO={}}(),function(){var e=[];i.O=function(t,s,n,a){if(!s){var o=1/0;for(d=0;d<e.length;d++){s=e[d][0],n=e[d][1],a=e[d][2];for(var r=!0,c=0;c<s.length;c++)(!1&a||o>=a)&&Object.keys(i.O).every(function(e){return i.O[e](s[c])})?s.splice(c--,1):(r=!1,a<o&&(o=a));if(r){e.splice(d--,1);var l=n();void 0!==l&&(t=l)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[s,n,a]}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}}(),function(){i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce(function(t,s){return i.f[s](e,t),t},[]))}}(),function(){i.u=function(e){return"assets/js/"+e+"."+{59:"f0b6857a",218:"388ced72",356:"46cf1107",375:"b498299b",412:"ef67bdda",554:"785f58a1",724:"825b4375",753:"1aacc0ec"}[e]+".js"}}(),function(){i.miniCssF=function(e){return"assets/css/"+e+"."+{59:"338eef9a",218:"abaee743",356:"08ec972a",375:"f6ad2033",554:"7f9367b6",724:"0c589bd3",753:"d8d9e482"}[e]+".css"}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="Raingad-IM:";i.l=function(s,n,a,o){if(e[s])e[s].push(n);else{var r,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==s||u.getAttribute("data-webpack")==t+a){r=u;break}}r||(c=!0,r=document.createElement("script"),r.charset="utf-8",i.nc&&r.setAttribute("nonce",i.nc),r.setAttribute("data-webpack",t+a),r.src=s),e[s]=[n];var h=function(t,i){r.onerror=r.onload=null,clearTimeout(p);var n=e[s];if(delete e[s],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach(function(e){return e(i)}),t)return t(i)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=h.bind(null,r.onerror),r.onload=h.bind(null,r.onload),c&&document.head.appendChild(r)}}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){i.p=""}(),function(){if("undefined"!==typeof document){var e=function(e,t,s,n,a){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",i.nc&&(o.nonce=i.nc);var r=function(i){if(o.onerror=o.onload=null,"load"===i.type)n();else{var s=i&&i.type,r=i&&i.target&&i.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+r+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=r,o.parentNode&&o.parentNode.removeChild(o),a(c)}};return o.onerror=o.onload=r,o.href=t,s?s.parentNode.insertBefore(o,s.nextSibling):document.head.appendChild(o),o},t=function(e,t){for(var i=document.getElementsByTagName("link"),s=0;s<i.length;s++){var n=i[s],a=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===e||a===t))return n}var o=document.getElementsByTagName("style");for(s=0;s<o.length;s++){n=o[s],a=n.getAttribute("data-href");if(a===e||a===t)return n}},s=function(s){return new Promise(function(n,a){var o=i.miniCssF(s),r=i.p+o;if(t(o,r))return n();e(s,r,null,n,a)})},n={524:0};i.f.miniCss=function(e,t){var i={59:1,218:1,356:1,375:1,554:1,724:1,753:1};n[e]?t.push(n[e]):0!==n[e]&&i[e]&&t.push(n[e]=s(e).then(function(){n[e]=0},function(t){throw delete n[e],t}))}}}(),function(){var e={524:0};i.f.j=function(t,s){var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)s.push(n[2]);else{var a=new Promise(function(i,s){n=e[t]=[i,s]});s.push(n[2]=a);var o=i.p+i.u(t),r=new Error,c=function(s){if(i.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){var a=s&&("load"===s.type?"missing":s.type),o=s&&s.target&&s.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",r.name="ChunkLoadError",r.type=a,r.request=o,n[1](r)}};i.l(o,c,"chunk-"+t,t)}},i.O.j=function(t){return 0===e[t]};var t=function(t,s){var n,a,o=s[0],r=s[1],c=s[2],l=0;if(o.some(function(t){return 0!==e[t]})){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(c)var d=c(i)}for(t&&t(s);l<o.length;l++)a=o[l],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(d)},s=self["webpackChunkRaingad_IM"]=self["webpackChunkRaingad_IM"]||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))}();var s=i.O(void 0,[504],function(){return i(663)});s=i.O(s)})();
|