/*! For license information please see 673.js.LICENSE.txt */ (self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[673],{8251:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var o="ontouchend"in document;const i={bind:function(t,e){var n=500,i=e.value;if($A.isJson(e.value)&&(n=e.value.delay||500,i=e.value.callback),"function"!=typeof i)throw"callback must be a function";if(!o)return t.__longpressContextmenu__=function(e){e.preventDefault(),e.stopPropagation(),i(e,t)},void t.addEventListener("contextmenu",t.__longpressContextmenu__);var r=null,a=!1;t.__longpressStart__=function(e){"click"===e.type&&0!==e.button||(a=!1,null===r&&(r=setTimeout((function(){a=!0,i(e.touches[0],t)}),n)))},t.__longpressCancel__=function(t){null!==r&&(clearTimeout(r),r=null)},t.__longpressClick__=function(e){a&&(e.preventDefault(),e.stopPropagation()),t.__longpressCancel__(e)},t.addEventListener("touchstart",t.__longpressStart__),t.addEventListener("click",t.__longpressClick__),t.addEventListener("touchmove",t.__longpressCancel__),t.addEventListener("touchend",t.__longpressCancel__),t.addEventListener("touchcancel",t.__longpressCancel__)},unbind:function(t){if(!o)return t.removeEventListener("contextmenu",t.__longpressContextmenu__),void delete t.__longpressContextmenu__;t.removeEventListener("touchstart",t.__longpressStart__),t.removeEventListener("click",t.__longpressClick__),t.removeEventListener("touchmove",t.__longpressCancel__),t.removeEventListener("touchend",t.__longpressCancel__),t.removeEventListener("touchcancel",t.__longpressCancel__),delete t.__longpressStart__,delete t.__longpressClick__,delete t.__longpressCancel__}}},79742:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),n=e[0],o=e[1];return 3*(n+o)/4-o},e.toByteArray=function(t){var e,n,r=l(t),a=r[0],s=r[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),u=0,d=s>0?a-4:a;for(n=0;n>16&255,c[u++]=e>>8&255,c[u++]=255&e;2===s&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,c[u++]=255&e);1===s&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e);return c},e.fromByteArray=function(t){for(var e,o=t.length,i=o%3,r=[],a=16383,s=0,l=o-i;sl?l:s+a));1===i?(e=t[o-1],r.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[o-2]<<8)+t[o-1],r.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return r.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=r.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,o){for(var i,r,a=[],s=e;s>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},48764:(t,e,n)=>{"use strict";var o=n(79742),i=n(80645),r=n(5826);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(o)return F(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return E(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function v(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function g(t,e,n,o,i){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,o)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,o,i);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,o,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,o,i){var r,a=1,s=t.length,l=e.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var u=-1;for(r=n;rs&&(n=s-l),r=n;r>=0;r--){for(var d=!0,f=0;fi&&(o=i):o=i;var r=e.length;if(r%2!=0)throw new TypeError("Invalid hex string");o>r/2&&(o=r/2);for(var a=0;a>8,i=n%256,r.push(i),r.push(o);return r}(e,t.length-n),t,n,o)}function C(t,e,n){return 0===e&&n===t.length?o.fromByteArray(t):o.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var o=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(r=t[i+1]))&&(l=(31&c)<<6|63&r)>127&&(u=l);break;case 3:r=t[i+1],a=t[i+2],128==(192&r)&&128==(192&a)&&(l=(15&c)<<12|(63&r)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:r=t[i+1],a=t[i+2],s=t[i+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&r)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|1023&u),o.push(u),i+=d}return function(t){var e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);var n="",o=0;for(;o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,o,i){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),e<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&e>=n)return 0;if(o>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var r=(i>>>=0)-(o>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(r,a),c=this.slice(o,i),u=t.slice(e,n),d=0;di)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var r=!1;;)switch(o){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return k(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function T(t,e,n){var o="";n=Math.min(t.length,n);for(var i=e;io)&&(n=o);for(var i="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,o,i,r){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,r=Math.min(t.length-n,2);i>>8*(o?i:1-i)}function $(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,r=Math.min(t.length-n,4);i>>8*(o?i:3-i)&255}function N(t,e,n,o,i,r){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,o,r){return r||N(t,0,n,4),i.write(t,e,n,o,23,4),n+4}function q(t,e,n,o,r){return r||N(t,0,n,8),i.write(t,e,n,o,52,8),n+8}l.prototype.slice=function(t,e){var n,o=this.length;if((t=~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),(e=void 0===e?o:~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),e0&&(i*=256);)o+=this[t+--e]*i;return o},l.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var o=this[t],i=1,r=0;++r=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var o=e,i=1,r=this[t+--o];o>0&&(i*=256);)r+=this[t+--o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,o){(t=+t,e|=0,n|=0,o)||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,r=0;for(this[e]=255&t;++r=0&&(r*=256);)this[e+i]=t/r&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):$(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):$(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var r=0,a=1,s=0;for(this[e]=255&t;++r>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var r=n-1,a=1,s=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===s&&0!==this[e+r+1]&&(s=1),this[e+r]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):$(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):$(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,o){if(n||(n=0),o||0===o||(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===o){(e-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function U(t){return o.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,o){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},80645:(t,e)=>{e.read=function(t,e,n,o,i){var r,a,s=8*i-o-1,l=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,h=t[e+d];for(d+=f,r=h&(1<<-u)-1,h>>=-u,u+=s;u>0;r=256*r+t[e+d],d+=f,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=o;u>0;a=256*a+t[e+d],d+=f,u-=8);if(0===r)r=1-c;else{if(r===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,o),r-=c}return(h?-1:1)*a*Math.pow(2,r-o)},e.write=function(t,e,n,o,i,r){var a,s,l,c=8*r-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:r-1,p=o?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(e*l-1)*Math.pow(2,i),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;t[n+h]=255&a,h+=p,a/=256,c-=8);t[n+h-p]|=128*m}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},92307:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var o=n(1519),i=n.n(o)()((function(t){return t[1]}));i.push([t.id,'.component-resize-line[data-v-5a37a7e8]{cursor:col-resize}@media (max-width:768px){.component-resize-line[data-v-5a37a7e8]{display:none}}.component-resize-line.resizing[data-v-5a37a7e8]:after{bottom:0;content:"";cursor:col-resize;left:0;position:fixed;right:0;top:0;z-index:99999}.component-resize-line.bottom[data-v-5a37a7e8],.component-resize-line.bottom[data-v-5a37a7e8]:after{cursor:row-resize}',""]);const r=i},76095:function(t,e,n){var o,i=n(48764).lW;"undefined"!=typeof self&&self,o=function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),i=n(18),r=n(19),a=n(45),s=n(46),l=n(47),c=n(48),u=n(49),d=n(12),f=n(32),h=n(33),p=n(31),m=n(1),v={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:i.default,Leaf:r.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:u.default,Attributor:{Attribute:d.default,Class:f.default,Style:h.default,Store:p.default}};e.default=v},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=r;var a,s={},l={},c={},u={};function d(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=u[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=u.block:t&a.LEVEL&a.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var o=(t.getAttribute("class")||"").split(/\s+/);for(var i in o)if(n=l[o[i]])break;n=n||c[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=d(t);if(null==n)throw new r("Unable to create "+t+" blot");var o=n,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(e);return new o(i,e)},e.find=function t(n,o){return void 0===o&&(o=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:o?t(n.parentNode,o):null},e.query=d,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var o=e[0];if("string"!=typeof o.blotName&&"string"!=typeof o.attrName)throw new r("Invalid definition");if("abstract"===o.blotName)throw new r("Cannot register abstract class");if(u[o.blotName||o.attrName]=o,"string"==typeof o.keyName)s[o.keyName]=o;else if(null!=o.className&&(l[o.className]=o),null!=o.tagName){Array.isArray(o.tagName)?o.tagName=o.tagName.map((function(t){return t.toUpperCase()})):o.tagName=o.tagName.toUpperCase();var i=Array.isArray(o.tagName)?o.tagName:[o.tagName];i.forEach((function(t){null!=c[t]&&null!=o.className||(c[t]=o)}))}return o}},function(t,e,n){var o=n(51),i=n(11),r=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=r(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(o){(t(o)?e:n).push(o)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],o=a.iterator(this.ops),i=0;i0&&n.next(r.retain-s)}for(var c=new l(o);e.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===e.peekType())c.push(e.next());else{var u=Math.min(e.peekLength(),n.peekLength()),d=e.next(u),f=n.next(u);if("number"==typeof f.retain){var h={};"number"==typeof d.retain?h.retain=u:h.insert=d.insert;var p=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(p&&(h.attributes=p),c.push(h),!n.hasNext()&&i(c.ops[c.ops.length-1],h)){var m=new l(e.rest());return c.concat(m).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&c.push(f)}return c.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),r=new l,c=o(n[0],n[1],e),u=a.iterator(this.ops),d=a.iterator(t.ops);return c.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case o.INSERT:n=Math.min(d.peekLength(),e),r.push(d.next(n));break;case o.DELETE:n=Math.min(e,u.peekLength()),u.next(n),r.delete(n);break;case o.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),e);var s=u.next(n),l=d.next(n);i(s.insert,l.insert)?r.retain(n,a.attributes.diff(s.attributes,l.attributes)):r.push(l).delete(n)}e-=n}})),r.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),o=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var r=n.peek(),s=a.length(r)-n.peekLength(),c="string"==typeof r.insert?r.insert.indexOf(e,s)-s:-1;if(c<0)o.push(n.next());else if(c>0)o.push(n.next(c));else{if(!1===t(o,n.next(1).attributes||{},i))return;i+=1,o=new l}}o.length()>0&&t(o,{},i)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),o=a.iterator(t.ops),i=new l;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===o.peekType())if("insert"===o.peekType())i.push(o.next());else{var r=Math.min(n.peekLength(),o.peekLength()),s=n.next(r),c=o.next(r);if(s.delete)continue;c.delete?i.push(c):i.retain(r,a.attributes.transform(s.attributes,c.attributes,e))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),o=0;n.hasNext()&&o<=t;){var i=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(o0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var o=this.clone();return 0===t?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var r=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},r}}]),e}(s.default.Block);function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,r.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:g(t.parent,e))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[c.default,s.default.Embed,u.default],e.bubbleFormats=g,e.BlockEmbed=m,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(y(this,t),this.options=w(e,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var o=n.selection.lastRange,i=o&&0===o.length?o.index:void 0;k.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var r=this.clipboard.convert("
"+i+"


");this.setContents(r),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return r(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||u.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(o){n.register(o,t[o],e)}))}else null==this.imports[t]||o||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?u.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),r(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var o=this,r=O(t,e,n),a=i(r,4);return t=a[0],e=a[1],n=a[3],k.call(this,(function(){return o.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,(function(){var o=n.getSelection(!0),i=new a.default;if(null==o)return i;if(u.default.query(t,u.default.Scope.BLOCK))i=n.editor.formatLine(o.index,o.length,g({},t,e));else{if(0===o.length)return n.selection.format(t,e),i;i=n.editor.formatText(o.index,o.length,g({},t,e))}return n.setSelection(o,l.default.sources.SILENT),i}),o)}},{key:"formatLine",value:function(t,e,n,o,r){var a,s=this,l=O(t,e,n,o,r),c=i(l,4);return t=c[0],e=c[1],a=c[2],r=c[3],k.call(this,(function(){return s.editor.formatLine(t,e,a)}),r,t,0)}},{key:"formatText",value:function(t,e,n,o,r){var a,s=this,l=O(t,e,n,o,r),c=i(l,4);return t=c[0],e=c[1],a=c[2],r=c[3],k.call(this,(function(){return s.editor.formatText(t,e,a)}),r,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var o=this.container.getBoundingClientRect();return{bottom:n.bottom-o.top,height:n.height,left:n.left-o.left,right:n.right-o.left,top:n.top-o.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=O(t,e),o=i(n,2);return t=o[0],e=o[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=O(t,e),o=i(n,2);return t=o[0],e=o[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,o){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return k.call(this,(function(){return i.editor.insertEmbed(e,n,o)}),r,e)}},{key:"insertText",value:function(t,e,n,o,r){var a,s=this,l=O(t,0,n,o,r),c=i(l,4);return t=c[0],a=c[2],r=c[3],k.call(this,(function(){return s.editor.insertText(t,e,a)}),r,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var o=this,r=O(t,e,n),a=i(r,4);return t=a[0],e=a[1],n=a[3],k.call(this,(function(){return o.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){t=new a.default(t);var n=e.getLength(),o=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),r=i.ops[i.ops.length-1];return null!=r&&"string"==typeof r.insert&&"\n"===r.insert[r.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),o.compose(i)}),n)}},{key:"setSelection",value:function(e,n,o){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var r=O(e,n,o),a=i(r,4);e=a[0],n=a[1],o=a[3],this.selection.setRange(new d.Range(e,n),o),o!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function w(t,e){if((e=(0,h.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==_.DEFAULTS.theme){if(e.theme=_.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=m.default;var n=(0,h.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var o=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=_.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,h.default)(!0,{},_.DEFAULTS,{modules:o},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function k(t,e,n,o){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),r=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==o?i=x(i,s,e):0!==o&&(i=x(i,n,o,e)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var c,u,d=[l.default.events.TEXT_CHANGE,s,r,e];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,d)}return s}function O(t,e,n,i,r){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(r=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(r=i,i=n,n=e,e=0),"object"===(void 0===n?"undefined":o(n))?(a=n,r=i):"string"==typeof n&&(null!=i?a[n]=i:r=n),[t,e,a,r=r||l.default.sources.API]}function x(t,e,n,o){if(null==t)return null;var r=void 0,s=void 0;if(e instanceof a.default){var c=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,o!==l.default.sources.USER)})),u=i(c,2);r=u[0],s=u[1]}else{var f=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),h=i(f,2);r=h[0],s=h[1]}return new d.Range(r,s-r)}_.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},_.events=l.default.events,_.sources=l.default.sources,_.version="1.3.7",_.imports={delta:a.default,parchment:u.default,"core/module":c.default,"core/theme":m.default},e.expandConfig=w,e.overload=O,e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var o=e.order.indexOf(t),i=e.order.indexOf(n);return o>=0||i>=0?o-i:t===n?0:t1?e-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=["error","warn","log","info"],i="warn";function r(t){if(o.indexOf(t)<=o.indexOf(i)){for(var e,n=arguments.length,r=Array(n>1?n-1:0),a=1;a=0;c--)if(d[c]!=f[c])return!1;for(c=d.length-1;c>=0;c--)if(u=d[c],!a(t[u],e[u],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|i:this.scope=o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=o.query(t,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,l=r-a+1,c=this.isolate(a,l),u=c.next;c.format(o,i),u instanceof e&&u.formatAt(0,t-a+n-l,o,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(u.default,t),r=o(i,2),a=r[0],s=r[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=m,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n=r&&!h.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,h);var p=e.scroll.line(t),m=i(p,2),g=m[0],y=m[1],b=(0,v.default)({},(0,d.bubbleFormats)(g));if(g instanceof f.default){var _=g.descendant(l.default.Leaf,y),w=i(_,1)[0];b=(0,v.default)(b,(0,d.bubbleFormats)(w))}u=s.default.attributes.diff(b,u)||{}}else if("object"===o(a.insert)){var k=Object.keys(a.insert)[0];if(null==k)return t;e.scroll.insertAt(t,k,a.insert[k])}r+=c}return Object.keys(u).forEach((function(n){e.scroll.formatAt(t,c,n,u[n])})),t+c}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var r=n.scroll.lines(t,Math.max(e,1)),a=e;r.forEach((function(e){var r=e.length();if(e instanceof c.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,i,o[i])}else e.format(i,o[i]);a-=r}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(o)))}},{key:"formatText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(i){n.scroll.formatAt(t,e,i,o[i])})),this.update((new a.default).retain(t).retain(e,(0,p.default)(o)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===e?this.scroll.path(t).forEach((function(t){var e=i(t,1)[0];e instanceof f.default?n.push(e):e instanceof l.default.Leaf&&o.push(e)})):(n=this.scroll.lines(t,e),o=this.scroll.descendants(l.default.Leaf,t,e));var r=[n,o].map((function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,d.bubbleFormats)(n),e)}return e}));return v.default.apply(v.default,r)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(o).forEach((function(i){n.scroll.formatAt(t,e.length,i,o[i])})),this.update((new a.default).retain(t).insert(e,(0,p.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===f.default.blotName&&!(t.children.length>1)&&t.children.head instanceof h.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),o=this.scroll.line(t+e),r=i(o,2),s=r[0],l=r[1],u=0,d=new a.default;null!=s&&(u=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,d=s.delta().slice(l,l+u-1).insert("\n"));var f=this.getContents(t,e+u).diff((new a.default).insert(n).concat(d)),h=(new a.default).retain(t).concat(f);return this.applyDelta(h)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var i=l.default.find(e[0].target),r=(0,d.bubbleFormats)(i),s=i.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),f=(new a.default).insert(c),h=(new a.default).insert(i.value()),p=(new a.default).retain(s).concat(f.diff(h,n));t=p.reduce((function(t,e){return e.insert?t.insert(e.insert,r):t.push(e)}),new a.default),this.delta=o.compose(t)}else this.delta=this.getDelta(),t&&(0,m.default)(o.compose(t),this.delta)||(t=o.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,o){return null==t[o]||(e[o]===t[o]?n[o]=e[o]:Array.isArray(e[o])?e[o].indexOf(t[o])<0&&(n[o]=e[o].concat([t[o]])):n[o]=[e[o],t[o]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;d(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var o=this;d(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=r.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&o.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var t=o.getNativeRange();null!=t&&t.start.node!==o.cursor.textNode&&o.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,r=n.startOffset,a=n.endNode,s=n.endOffset;o.setNativeRange(i,r,a,s)}})),this.update(l.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!r.default.query(t,r.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=r.default.find(n.start.node,!1);if(null==o)return;if(o instanceof r.default.Leaf){var i=o.split(n.start.offset);o.parent.insertBefore(this.cursor,i)}else o.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,r=this.scroll.leaf(t),a=o(r,2),s=a[0],l=a[1];if(null==s)return null;var c=s.position(l,!0),u=o(c,2);i=u[0],l=u[1];var d=document.createRange();if(e>0){d.setStart(i,l);var f=this.scroll.leaf(t+e),h=o(f,2);if(s=h[0],l=h[1],null==s)return null;var p=s.position(l,!0),m=o(p,2);return i=m[0],l=m[1],d.setEnd(i,l),d.getBoundingClientRect()}var v="left",g=void 0;return i instanceof Text?(l0&&(v="right")),{bottom:g.top+g.height,height:g.height,left:g[v],right:g[v],top:g.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=o(t,2),i=n[0],a=n[1],s=r.default.find(i,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof r.default.Container?l+s.length():l+s.index(i,a)})),a=Math.min(Math.max.apply(Math,u(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(u(i)));return new h(s,a-s)}},{key:"normalizeNative",value:function(t){if(!m(this.root,t.startContainer)||!t.collapsed&&!m(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],r=this.scroll.length();return n.forEach((function(t,n){t=Math.min(r-1,t);var a,s=e.scroll.leaf(t),l=o(s,2),c=l[0],u=l[1],d=c.position(u,0!==n),f=o(d,2);a=f[0],u=f[1],i.push(a,u)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,r=this.scroll.line(Math.min(e.index,i)),a=o(r,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,i));s=o(l,1)[0]}if(null!=a&&null!=s){var c=t.getBoundingClientRect();n.topc.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",t,e,n,o),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var r=document.getSelection();if(null!=r)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||o!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,o),r.removeAllRanges(),r.addRange(s)}}else r.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),f.info("setRange",t),null!=t){var o=this.rangeToNative(t);this.setNativeRange.apply(this,u(o).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),i=o(n,2),r=i[0],c=i[1];if(this.lastRange=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(f)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,f)}}}]),t}();function m(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(r.default);e.default=s},function(t,e,n){var o=n(11),i=n(3),r={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var o=i(!0,{},e);for(var r in n||(o=Object.keys(o).reduce((function(t,e){return null!=o[e]&&(t[e]=o[e]),t}),{})),t)void 0!==t[r]&&void 0===e[r]&&(o[r]=t[r]);return Object.keys(o).length>0?o:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return o(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var o=Object.keys(e).reduce((function(n,o){return void 0===t[o]&&(n[o]=e[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,o=r.length(e);if(t>=o-n?(t=o-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?r.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),o=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(o)}return[]},t.exports=r},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,o;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{o=Promise}catch(t){o=function(){}}function r(a,l,c,u,d){"object"==typeof l&&(c=l.depth,u=l.prototype,d=l.includeNonEnumerable,l=l.circular);var f=[],h=[],p=void 0!==i;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function a(c,m){if(null===c)return null;if(0===m)return c;var v,g;if("object"!=typeof c)return c;if(t(c,e))v=new e;else if(t(c,n))v=new n;else if(t(c,o))v=new o((function(t,e){c.then((function(e){t(a(e,m-1))}),(function(t){e(a(t,m-1))}))}));else if(r.__isArray(c))v=[];else if(r.__isRegExp(c))v=new RegExp(c.source,s(c)),c.lastIndex&&(v.lastIndex=c.lastIndex);else if(r.__isDate(c))v=new Date(c.getTime());else{if(p&&i.isBuffer(c))return v=i.allocUnsafe?i.allocUnsafe(c.length):new i(c.length),c.copy(v),v;t(c,Error)?v=Object.create(c):void 0===u?(g=Object.getPrototypeOf(c),v=Object.create(g)):(v=Object.create(u),g=u)}if(l){var y=f.indexOf(c);if(-1!=y)return h[y];f.push(c),h.push(v)}for(var b in t(c,e)&&c.forEach((function(t,e){var n=a(e,m-1),o=a(t,m-1);v.set(n,o)})),t(c,n)&&c.forEach((function(t){var e=a(t,m-1);v.add(e)})),c){var _;g&&(_=Object.getOwnPropertyDescriptor(g,b)),_&&null==_.set||(v[b]=a(c[b],m-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(c);for(b=0;b0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof d.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===h)return void this.optimize()}else if(h instanceof d.default){var m=h.newlineIndex(0);m>-1&&h.split(m+1)}var v=h.children.head instanceof u.default?null:h.children.head;s.moveChildren(h,v),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,o,i){(null==this.whitelist||this.whitelist[o])&&(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,i),this.optimize())}},{key:"insertAt",value:function(t,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==o||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,o)}else{var s=a.default.create(n,o);this.appendChild(s)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var o=a.default.create(this.statics.defaultChild);o.appendChild(t),t=o}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,o){var i=[],r=o;return e.children.forEachAt(n,o,(function(e,n,o){p(e)?i.push(e):e instanceof a.default.Container&&(i=i.concat(t(e,n,r))),r-=o})),i};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[c.default,l.BlockEmbed,f.default],e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=j(t);if(null==o||null==o.key)return g.warn("Attempted to add invalid keyboard binding",o);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),o=(0,l.default)(o,e,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,a=(t.bindings[r]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var c=t.quill.getLine(l.index),u=i(c,2),f=u[0],h=u[1],p=t.quill.getLeaf(l.index),m=i(p,2),v=m[0],g=m[1],y=0===l.length?[v,g]:t.quill.getLeaf(l.index+l.length),b=i(y,2),_=b[0],w=b[1],k=v instanceof d.default.Text?v.value().slice(0,g):"",O=_ instanceof d.default.Text?_.value().slice(w):"",x={collapsed:0===l.length,empty:0===l.length&&f.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:k,suffix:O};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==x.format[t]})))return!1}else if("object"===o(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,s.default)(e.format[t],x.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix)||null!=e.suffix&&!e.suffix.test(x.suffix)||!0===e.handler.call(t,l,x))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,o=t===b.keys.LEFT?"prefix":"suffix";return v(n={key:t,shiftKey:e,altKey:null},o,/^$/),v(n,"handler",(function(n){var o=n.index;t===b.keys.RIGHT&&(o+=n.length+1);var r=this.quill.getLeaf(o);return!(i(r,1)[0]instanceof d.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),o=i(n,1)[0],r={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var l=o.formats(),c=this.quill.getFormat(t.index-1,1);r=u.default.attributes.diff(l,c)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-d,d,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index-d,d,r,f.default.sources.USER),this.quill.focus()}}function k(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var o={},r=0,a=this.quill.getLine(t.index),s=i(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),c=i(l,1)[0];if(c){var d=s.formats(),h=this.quill.getFormat(t.index,1);o=u.default.attributes.diff(d,h)||{},r=c.length()}}this.quill.deleteText(t.index,n,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index+r-1,n,o,f.default.sources.USER)}}function O(t){var e=this.quill.getLines(t),n={};if(e.length>1){var o=e[0].formats(),i=e[e.length-1].formats();n=u.default.attributes.diff(i,o)||{}}this.quill.deleteText(t,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,f.default.sources.USER),this.quill.setSelection(t.index,f.default.sources.SILENT),this.quill.focus()}function x(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var o=Object.keys(e.format).reduce((function(t,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",o,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==o[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],f.default.sources.USER))}))}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),o=e.index,r=e.length,a=this.quill.scroll.descendant(n,o),s=i(a,2),l=s[0],c=s[1];if(null!=l){var u=this.quill.getIndex(l),h=l.newlineIndex(c,!0)+1,p=l.newlineIndex(u+c+r),m=l.domNode.textContent.slice(h,p).split("\n");c=0,m.forEach((function(e,i){t?(l.insertAt(h+c,n.TAB),c+=n.TAB.length,0===i?o+=n.TAB.length:r+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+c,n.TAB.length),c-=n.TAB.length,0===i?o-=n.TAB.length:r-=n.TAB.length),c+=e.length+1})),this.quill.update(f.default.sources.USER),this.quill.setSelection(o,r,f.default.sources.SILENT)}}}}function S(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],f.default.sources.USER)}}}function j(t){if("string"==typeof t||"number"==typeof t)return j({key:t});if("object"===(void 0===t?"undefined":o(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,f.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new c.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,f.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,f.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),o=n[0],r=n[1],a=(0,l.default)({},o.formats(),{list:"checked"}),s=(new c.default).retain(t.index).insert("\n",a).retain(o.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),o=i(n,2),r=o[0],a=o[1],s=(new c.default).retain(t.index).insert("\n",e.format).retain(r.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,o=this.quill.getLine(t.index),r=i(o,2),a=r[0],s=r[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",f.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(u,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,f.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),o=n[0],r=n[1],a=(new c.default).retain(t.index+o.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n-1}c.blotName="link",c.tagName="A",c.SANITIZED_URL="about:blank",c.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=c,e.sanitize=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=g(n(0)),i=g(n(5)),r=n(4),a=g(r),s=g(n(16)),l=g(n(25)),c=g(n(24)),u=g(n(35)),d=g(n(6)),f=g(n(22)),h=g(n(7)),p=g(n(55)),m=g(n(42)),v=g(n(23));function g(t){return t&&t.__esModule?t:{default:t}}i.default.register({"blots/block":a.default,"blots/block/embed":r.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":v.default}),o.default.register(a.default,s.default,c.default,d.default,f.default,h.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=function(){function t(t){this.domNode=t,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return o.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var r=this.isolate(t,e);if(null!=o.query(n,o.Scope.BLOT)&&i)r.wrap(n,i);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);r.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?o.create("text",e):o.create(e,n),r=this.split(t);this.parent.insertBefore(i,r)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?o.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?o.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),i=n(32),r=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=o.default.keys(this.domNode),n=i.default.keys(this.domNode),s=r.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof o.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var o=e.attributes[n].value(e.domNode);t.format(n,o)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(r(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function r(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;no&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=o;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var o=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,s.default.sources.USER)),this.quill.root.scrollTop=o;break;case"video":e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var r=i.index+i.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),n,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",s.default.sources.USER),this.quill.setSelection(r+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(h.default);function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var o=document.createElement("option");e===n?o.setAttribute("selected","selected"):o.setAttribute("value",e),t.appendChild(o)}))}e.BaseTooltip=x,e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,o=this.iterator();n=o();){var i=n.length();if(ta?n(o,t-a,Math.min(e,a+l-t)):n(o,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,o=this.iterator();n=o();)e=t(e,n);return e},t}();e.default=o},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,o,i){this.update(),t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.insertAt=function(e,n,o){this.update(),t.prototype.insertAt.call(this,e,n,o)},e.prototype.optimize=function(e,n){var o=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof r.default&&t.children.forEach(l),t.optimize(n))},c=e,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof r.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),i=(c=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var o=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==o&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(r.default);e.default=l},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,o){var i=this;n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):(this.children.forEach((function(t){t instanceof r.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,o,i){null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(o,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(r.default);e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var o=a.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,o,i){null!=a.query(o,a.Scope.BLOCK)?this.format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.insertAt=function(e,n,o){if(null==o||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var i=this.split(e),r=a.create(n,o);i.parent.insertBefore(r,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(r.default);e.default=s},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,o,i){0===e&&n===this.length()?this.format(o,i):t.prototype.formatAt.call(this,e,n,o,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=r},function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var r=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,o){null==o?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,o)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(r.default);e.default=s},function(t,e,n){"use strict";var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var o=n.indexOf(t,e);return-1!==o&&o===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),o=n.length>>>0,i=arguments[1],r=0;re.length?t:e,c=t.length>e.length?e:t,u=l.indexOf(c);if(-1!=u)return s=[[1,l.substring(0,u)],[0,c],[1,l.substring(u+c.length)]],t.length>e.length&&(s[0][0]=s[2][0]=n),s;if(1==c.length)return[[n,t],[1,e]];var d=function(t,e){var n=t.length>e.length?t:e,o=t.length>e.length?e:t;if(n.length<4||2*o.length=t.length?[o,i,s,l,d]:null}var s,l,c,u,d,f=i(n,o,Math.ceil(n.length/4)),h=i(n,o,Math.ceil(n.length/2));if(!f&&!h)return null;s=h?f&&f[4].length>h[4].length?f:h:f,t.length>e.length?(l=s[0],c=s[1],u=s[2],d=s[3]):(u=s[0],d=s[1],l=s[2],c=s[3]);var p=s[4];return[l,c,u,d,p]}(t,e);if(d){var f=d[0],h=d[1],p=d[2],m=d[3],v=d[4],g=o(f,p),y=o(h,m);return g.concat([[0,v]],y)}return function(t,e){for(var o=t.length,r=e.length,a=Math.ceil((o+r)/2),s=a,l=2*a,c=new Array(l),u=new Array(l),d=0;do)m+=2;else if(w>r)p+=2;else if(h&&(x=s+f-b)>=0&&x=(O=o-u[x]))return i(t,e,S,w)}for(var k=-y+v;k<=y-g;k+=2){for(var O,x=s+k,C=(O=k==-y||k!=y&&u[x-1]o)g+=2;else if(C>r)v+=2;else if(!h){var S;if((_=s+f-k)>=0&&_=(O=o-O))return i(t,e,S,w)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-u),e=e.substring(0,e.length-u));return d&&h.unshift([0,d]),f&&h.push([0,f]),s(h),null!=l&&(h=function(t,e){var o=function(t,e){if(0===e)return[0,t];for(var o=0,i=0;i0&&i.splice(r+2,0,[s[0],l]),c(i,r,3)}return t}(h,l)),h=function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},i=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},r=2;r0&&a.push(t[r]);return a}(h)}function i(t,e,n,i){var r=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),l=e.substring(i),c=o(r,a),u=o(s,l);return c.concat(u)}function r(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,o=Math.min(t.length,e.length),i=o,r=0;n1?(0!==i&&0!==l&&(0!==(e=r(u,c))&&(o-i-l>0&&0==t[o-i-l-1][0]?t[o-i-l-1][1]+=u.substring(0,e):(t.splice(0,0,[0,u.substring(0,e)]),o++),u=u.substring(e),c=c.substring(e)),0!==(e=a(u,c))&&(t[o][1]=u.substring(u.length-e)+t[o][1],u=u.substring(0,u.length-e),c=c.substring(0,c.length-e))),0===i?t.splice(o-l,i+l,[1,u]):0===l?t.splice(o-i,i+l,[n,c]):t.splice(o-i-l,i+l,[n,c],[1,u]),o=o-i-l+(i?1:0)+(l?1:0)+1):0!==o&&0==t[o-1][0]?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,l=0,i=0,c="",u=""}""===t[t.length-1][1]&&t.pop();var d=!1;for(o=1;o=0&&o>=e-1;o--)if(o+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=j(e,n)),parseFloat(o.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!E(e,"\n"))return e;for(var o=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(o+=1),i=i.parentNode;return o<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:o}))}],["b",I.bind(I,"bold")],["i",I.bind(I,"italic")],["style",function(){return new s.default}]],x=[f.AlignAttribute,v.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),C=[f.AlignStyle,h.BackgroundStyle,m.ColorStyle,v.DirectionStyle,g.FontStyle,y.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),S=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],O.concat(o.options.matchers).forEach((function(t){var e=i(t,2),r=e[0],a=e[1];(n.matchVisual||a!==N)&&o.addMatcher(r,a)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var o=this.prepareMatching(),r=i(o,2),a=r[0],l=r[1],c=A(this.container,a,l);return E(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new s.default).retain(c.length()-1).delete(1))),w.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,c.default.sources.SILENT);else{var o=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(o),n),this.quill.setSelection(t+o.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout((function(){o=o.concat(e.convert()).delete(n.length),e.quill.updateContents(o,c.default.sources.USER),e.quill.setSelection(o.length()-n.length,c.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(o){var r=i(o,2),a=r[0],s=r[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[k]=t[k]||[],t[k].push(s)}))}})),[e,n]}}]),e}(d.default);function j(t,e,n){return"object"===(void 0===e?"undefined":o(e))?Object.keys(e).reduce((function(t,n){return j(t,n,e[n])}),t):t.reduce((function(t,o){return o.attributes&&o.attributes[e]?t.push(o):t.insert(o.insert,(0,a.default)({},_({},e,n),o.attributes))}),new s.default)}function T(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function E(t,e){for(var n="",o=t.ops.length-1;o>=0&&n.length-1}function A(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(o,i){var r=A(i,e,n);return i.nodeType===t.ELEMENT_NODE&&(r=e.reduce((function(t,e){return e(i,t)}),r),r=(i[k]||[]).reduce((function(t,e){return e(i,t)}),r)),o.concat(r)}),new s.default):new s.default}function I(t,e,n){return j(n,t,!0)}function L(t,e){var n=l.default.Attributor.Attribute.keys(t),o=l.default.Attributor.Class.keys(t),i=l.default.Attributor.Style.keys(t),r={};return n.concat(o).concat(i).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(r[n.attrName]=n.value(t),r[n.attrName])||(null==(n=x[e])||n.attrName!==e&&n.keyName!==e||(r[n.attrName]=n.value(t)||void 0),null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(n=C[e],r[n.attrName]=n.value(t)||void 0))})),Object.keys(r).length>0&&(e=j(e,r)),e}function P(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var o={},i=n.value(t);null!=i&&(o[n.blotName]=i,e=(new s.default).insert(o,n.formats(t)))}else"function"==typeof n.formats&&(e=j(e,n.blotName,n.formats(t)));return e}function $(t,e){return E(e,"\n")||(D(t)||e.length()>0&&t.nextSibling&&D(t.nextSibling))&&e.insert("\n"),e}function N(t,e){if(D(t)&&null!=t.nextElementSibling&&!E(e,"\n\n")){var n=t.offsetHeight+parseFloat(T(t).marginTop)+parseFloat(T(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function M(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!T(t.parentNode).whiteSpace.startsWith("pre")){var o=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==t.previousSibling&&D(t.parentNode)||null!=t.previousSibling&&D(t.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==t.nextSibling&&D(t.parentNode)||null!=t.nextSibling&&D(t.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return e.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},e.default=S,e.matchAttributor=L,e.matchBlot=P,e.matchNewline=$,e.matchSpacing=N,e.matchText=M},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;no.right&&(r=o.right-i.right,this.root.style.left=e+r+"px"),i.lefto.bottom){var a=i.bottom-i.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return r}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,i=!1,r=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=$(n(29)),i=n(36),r=n(38),a=n(64),s=$(n(65)),l=$(n(66)),c=n(67),u=$(c),d=n(37),f=n(26),h=n(39),p=n(40),m=$(n(56)),v=$(n(68)),g=$(n(27)),y=$(n(69)),b=$(n(70)),_=$(n(71)),w=$(n(72)),k=$(n(73)),O=n(13),x=$(O),C=$(n(74)),S=$(n(75)),j=$(n(57)),T=$(n(41)),E=$(n(28)),D=$(n(59)),A=$(n(60)),I=$(n(61)),L=$(n(108)),P=$(n(62));function $(t){return t&&t.__esModule?t:{default:t}}o.default.register({"attributors/attribute/direction":r.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":r.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":r.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),o.default.register({"formats/align":i.AlignClass,"formats/direction":r.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":x.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":m.default,"formats/code":O.Code,"formats/italic":v.default,"formats/link":g.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":k.default,"formats/list/item":c.ListItem,"modules/formula":C.default,"modules/syntax":S.default,"modules/toolbar":j.default,"themes/bubble":L.default,"themes/snow":P.default,"ui/icons":T.default,"ui/picker":E.default,"ui/icon-picker":A.default,"ui/color-picker":D.default,"ui/tooltip":I.default},!0),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var o,i=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof f)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var o=null==n?this.length():n.offset(this),r=this.split(o);r.parent.insertBefore(t,r)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=r.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);h.blotName="list",h.scope=r.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[f],e.ListItem=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(56);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return r(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((o=i)&&o.__esModule?o:{default:o}).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);f.blotName="image",f.tagName="IMG",e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return d.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var o=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);f.className="ql-syntax";var h=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),p=function(t){function e(t,n){c(this,e);var o=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){o.highlight(),i=null}),o.options.interval)})),o.highlight(),o}return d(e,t),o(e,null,[{key:"register",value:function(){a.default.register(h,!0),a.default.register(f,!0)}}]),o(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(a.default.sources.SILENT),null!=e&&this.quill.setSelection(e,a.default.sources.SILENT)}}}]),e}(s.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=h,e.default=p},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var o=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(o):void 0},i=function(){function t(t,e){for(var n=0;n0&&i===a.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var r=o.quill.getLines(e.index,e.length);if(1===r.length)o.position(o.quill.getBounds(e));else{var s=r[r.length-1],l=o.quill.getIndex(s),u=Math.min(s.length()-1,e.index+e.length-l),d=o.quill.getBounds(new c.Range(l,u));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return p(e,t),i(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);g.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=g,e.default=v},function(t,e,n){t.exports=n(63)}]).default},t.exports=o()},51474:(t,e,n)=>{"use strict";function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(){return r=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);ebe,Sortable:()=>Bt,Swap:()=>le,default:()=>ke});function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),f=c(/firefox/i),h=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),m=c(/chrome/i)&&c(/android/i),v={capture:!1,passive:!1};function g(t,e,n){t.addEventListener(e,n,!u&&v)}function y(t,e,n){t.removeEventListener(e,n,!u&&v)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||o&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var k,O=/\s+/g;function x(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(O," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(O," ")}}function C(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function S(t,e){var n="";if("string"==typeof t)n=t;else do{var o=C(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function j(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=r:i<=r))return o;if(o===T())break;o=$(o,!1)}return!1}function A(t,e,n){for(var o=0,i=0,r=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=s(n,["evt"]);W.pluginEvent.bind(Bt)(t,e,a({dragEl:G,parentEl:X,ghostEl:Q,rootEl:J,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:ot,dragStarted:vt,putSortable:ct,activeSortable:Bt.active,originalEvent:o,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:st,hideGhostForTarget:Nt,unhideGhostForTarget:Mt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){Z({sortable:e,name:t,originalEvent:o})}},i))};function Z(t){K(a({putSortable:ct,cloneEl:nt,targetEl:G,rootEl:J,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:st},t))}var G,X,Q,J,tt,et,nt,ot,it,rt,at,st,lt,ct,ut,dt,ft,ht,pt,mt,vt,gt,yt,bt,_t,wt=!1,kt=!1,Ot=[],xt=!1,Ct=!1,St=[],jt=!1,Tt=[],Et="undefined"!=typeof document,Dt=p,At=d||u?"cssFloat":"float",It=Et&&!m&&!p&&"draggable"in document.createElement("div"),Lt=function(){if(Et){if(u)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Pt=function(t,e){var n=C(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=A(t,0,e),r=A(t,1,e),a=i&&C(i),s=r&&C(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+E(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+E(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===n[At]||r&&"none"===n[At]&&l+c>o)?"vertical":"horizontal"},$t=function(t){function e(t,n){return function(o,i,r,a){var s=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},i=t.group;i&&"object"==o(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Nt=function(){!Lt&&Q&&C(Q,"display","none")},Mt=function(){!Lt&&Q&&C(Q,"display","")};Et&&document.addEventListener("click",(function(t){if(kt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),kt=!1,!1}),!0);var qt=function(t){if(G){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,Ot.some((function(t){if(!I(t)){var e=E(t),n=t[U].options.emptyInsertThreshold,o=i>=e.left-n&&i<=e.right+n,s=r>=e.top-n&&r<=e.bottom+n;return n&&o&&s?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[U]._onDragOver(n)}}var i,r,a},Rt=function(t){G&&G.parentNode[U]._isOutsideThisEl(t.target)};function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=r({},e),t[U]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in W.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in $t(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?g(t,"pointerdown",this._onTapStart):(g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),Ot.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),r(this,z())}function Ft(t,e,n,o,i,r,a,s){var l,c,f=t[U],h=f.options.onMove;return!window.CustomEvent||u||d?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||E(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(c=h.call(f,l,a)),c}function Ut(t){t.draggable=!1}function zt(){jt=!1}function Ht(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Vt(t){return setTimeout(t,0)}function Wt(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){Tt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Tt.push(o)}}(n),!G&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled||l.isContentEditable||(s=w(s,o.draggable,n,!1))&&s.animated||et===s)){if(it=L(s),at=L(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Z({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Y("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=w(l,o.trim(),n,!1))return Z({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),Y("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!w(l,o.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(n&&!G&&n.parentNode===r){var l=E(n);if(J=r,X=(G=n).parentNode,tt=G.nextSibling,et=n,lt=a.group,Bt.dragged=G,ut={target:G,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=ut.clientX-l.left,mt=ut.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,G.style["will-change"]="all",o=function(){Y("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!f&&i.nativeDraggable&&(G.draggable=!0),i._triggerDragStart(t,e),Z({sortable:i,name:"choose",originalEvent:t}),x(G,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){j(G,t.trim(),Ut)})),g(s,"dragover",qt),g(s,"mousemove",qt),g(s,"touchmove",qt),g(s,"mouseup",i._onDrop),g(s,"touchend",i._onDrop),g(s,"touchcancel",i._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),Y("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(d||u))o();else{if(Bt.eventCanceled)return void this._onDrop();g(s,"mouseup",i._disableDelayedDrag),g(s,"touchend",i._disableDelayedDrag),g(s,"touchcancel",i._disableDelayedDrag),g(s,"mousemove",i._delayedDragTouchMoveHandler),g(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Ut(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,e?"touchmove":"mousemove",this._onTouchMove):(g(G,"dragend",this),g(J,"dragstart",this._onDragStart));try{document.selection?Vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,J&&G){Y("dragStarted",this,{evt:e}),this.nativeDraggable&&g(document,"dragover",Rt);var n=this.options;!t&&x(G,n.dragClass,!1),x(G,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Nt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(G.parentNode[U]._isOutsideThisEl(t),e)do{if(e[U]){if(e[U]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Mt()}},_onTouchMove:function(t){if(ut){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Q&&S(Q,!0),a=Q&&r&&r.a,s=Q&&r&&r.d,l=Dt&&_t&&P(_t),c=(i.clientX-ut.clientX+o.x)/(a||1)+(l?l[0]-St[0]:0)/(a||1),u=(i.clientY-ut.clientY+o.y)/(s||1)+(l?l[1]-St[1]:0)/(s||1);if(!Bt.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}(t,i,this)&&!v.animated){if(v===G)return R(!1);if(v&&r===t.target&&(s=v),s&&(n=E(s)),!1!==Ft(J,r,G,e,s,n,t,!!s))return M(),r.appendChild(G),X=r,B(),R(!0)}else if(s.parentNode===r){n=E(s);var g,y,b,_=G.parentNode!==r,k=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height;return o===a||i===s||o+r/2===a+l/2}(G.animated&&G.toRect||e,s.animated&&s.toRect||n,i),O=i?"top":"left",S=D(s,"top","top")||D(G,"top","top"),j=S?S.scrollTop:void 0;if(gt!==s&&(y=n[O],xt=!1,Ct=!k&&l.invertSwap||_),g=function(t,e,n,o,i,r,a,s){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=!1;if(!a)if(s&&btu+c*r/2:ld-bt)return-yt}else if(l>u+c*(1-i)/2&&ld-c*r/2))return l>u+c/2?1:-1;return 0}(t,s,n,i,k?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ct,gt===s),0!==g){var T=L(G);do{T-=g,b=X.children[T]}while(b&&("none"===C(b,"display")||b===Q))}if(0===g||b===s)return R(!1);gt=s,yt=g;var A=s.nextElementSibling,P=!1,$=Ft(J,r,G,e,s,n,t,P=1===g);if(!1!==$)return 1!==$&&-1!==$||(P=1===$),jt=!0,setTimeout(zt,30),M(),P&&!A?r.appendChild(G):s.parentNode.insertBefore(G,P?A:s),S&&q(S,0,j-S.scrollTop),X=G.parentNode,void 0===y||Ct||(bt=Math.abs(y-E(s)[O])),B(),R(!0)}if(r.contains(G))return R(!1)}return!1}function N(l,c){Y(l,p,a({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:f,fromSortable:h,target:s,completed:R,onMove:function(n,o){return Ft(J,r,G,e,n,E(n),t,o)},changed:B},c))}function M(){N("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function R(e){return N("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==h&&(x(G,ct?ct.options.ghostClass:u.options.ghostClass,!1),x(G,l.ghostClass,!0)),ct!==p&&p!==Bt.active?ct=p:p===Bt.active&&ct&&(ct=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){N("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===G&&!G.animated||s===r&&!s.animated)&&(gt=null),l.dragoverBubble||t.rootEl||s===document||(G.parentNode[U]._isOutsideThisEl(t.target),!e&&qt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function B(){rt=L(G),st=L(G,l.draggable),Z({sortable:p,name:"change",toEl:r,newIndex:rt,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",qt),y(document,"mousemove",qt),y(document,"touchmove",qt)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rt=L(G),st=L(G,n.draggable),Y("drop",this,{evt:t}),X=G&&G.parentNode,rt=L(G),st=L(G,n.draggable),Bt.eventCanceled||(wt=!1,Ct=!1,xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wt(this.cloneId),Wt(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&C(document.body,"user-select",""),C(G,"transform",""),t&&(vt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(J===X||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),G&&(this.nativeDraggable&&y(G,"dragend",this),Ut(G),G.style["will-change"]="",vt&&!wt&&x(G,ct?ct.options.ghostClass:this.options.ghostClass,!1),x(G,this.options.chosenClass,!1),Z({sortable:this,name:"unchoose",toEl:X,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==X?(rt>=0&&(Z({rootEl:X,name:"add",toEl:X,fromEl:J,originalEvent:t}),Z({sortable:this,name:"remove",toEl:X,originalEvent:t}),Z({rootEl:X,name:"sort",toEl:X,fromEl:J,originalEvent:t}),Z({sortable:this,name:"sort",toEl:X,originalEvent:t})),ct&&ct.save()):rt!==it&&rt>=0&&(Z({sortable:this,name:"update",toEl:X,originalEvent:t}),Z({sortable:this,name:"sort",toEl:X,originalEvent:t})),Bt.active&&(null!=rt&&-1!==rt||(rt=it,st=at),Z({sortable:this,name:"end",toEl:X,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),J=G=X=Q=tt=nt=et=ot=ut=dt=vt=rt=st=it=at=gt=yt=ct=lt=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,Tt.forEach((function(t){t.checked=!0})),Tt.length=ft=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o1&&(pe.forEach((function(t){o.addAnimationState({target:t,rect:ge?E(t):i}),F(t),t.fromRect=i,e.removeAnimationState(t)})),ge=!1,function(t,e){pe.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,s=this.options;if(o){if(n&&i._hideClone(),ve=!1,s.animation&&pe.length>1&&(ge||!n&&!i.options.sort&&!a)){var l=E(de,!1,!0,!0);pe.forEach((function(t){t!==de&&(B(t,l),r.appendChild(t))})),ge=!0}if(!n)if(ge||we(),pe.length>1){var c=he;i._showClone(e),i.options.animation&&!he&&c&&me.forEach((function(t){i.addAnimationState({target:t,rect:fe}),t.fromRect=fe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){fe=r({},e);var i=S(de,!0);fe.top-=i.f,fe.left-=i.e}},dragOverAnimationComplete:function(){ge&&(ge=!1,we())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var c=this.options,u=o.children;if(!ye)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),x(de,c.selectedClass,!~pe.indexOf(de)),~pe.indexOf(de))pe.splice(pe.indexOf(de),1),ce=null,K({sortable:i,rootEl:n,name:"deselect",targetEl:de,originalEvt:e});else{if(pe.push(de),K({sortable:i,rootEl:n,name:"select",targetEl:de,originalEvt:e}),e.shiftKey&&ce&&i.el.contains(ce)){var d,f,h=L(ce),p=L(de);if(~h&&~p&&h!==p)for(p>h?(f=h,d=p):(f=p,d=h+1);f1){var m=E(de),v=L(de,":not(."+this.options.selectedClass+")");if(!ve&&c.animation&&(de.thisAnimationDuration=null),l.captureAnimationState(),!ve&&(c.animation&&(de.fromRect=m,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==de){var e=ge?E(t):m;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),we(),pe.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===L(de))){var g=!1;pe.forEach((function(t){t.sortableIndex===L(t)||(g=!0)})),g&&r("update")}pe.forEach((function(t){F(t)})),l.animateAll()}ue=l}(n===o||s&&"clone"!==s.lastPutMode)&&me.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,me.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||ue!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];x(e,this.options.selectedClass,!1),pe.shift(),K({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[U];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(ue&&ue!==e&&(ue.multiDrag._deselectMultiDrag(),ue=e),x(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[U],n=pe.indexOf(t);e&&e.options.multiDrag&&~n&&(x(t,e.options.selectedClass,!1),pe.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return pe.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=ge&&o!==de?-1:ge?L(o,":not(."+t.options.selectedClass+")"):L(o),n.push({multiDragElement:o,index:i})})),{items:l(pe),clones:[].concat(me),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function _e(t,e){me.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function we(){pe.forEach((function(t){t!==de&&t.parentNode&&t.parentNode.removeChild(t)}))}Bt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):this.options.supportPointer?g(document,"pointermove",this._handleFallbackAutoScroll):e.touches?g(document,"touchmove",this._handleFallbackAutoScroll):g(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(k),k=void 0},nulling:function(){Xt=Yt=Kt=te=Qt=Zt=Gt=null,Jt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Xt=t,e||d||u||h){ie(t,this.options,r,e);var a=$(r,!0);!te||Qt&&o===Zt&&i===Gt||(Qt&&ne(),Qt=setInterval((function(){var r=$(document.elementFromPoint(o,i),!0);r!==a&&(a=r,ee()),ie(t,n.options,r,e)}),10),Zt=o,Gt=i)}else{if(!this.options.bubbleScroll||$(r,!0)===T())return void ee();ie(t,this.options,$(r,!1),!1)}}},r(t,{pluginName:"scroll",initializeByDefault:!0})}),Bt.mount(se,ae);const ke=Bt},81034:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const o={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},reverse:{type:Boolean,default:!1},beforeResize:Function},data:function(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted:function(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown:function(t){var e=this;if(this.beforeResize){var n=this.beforeResize();n&&n.then?n.then((function(n){e.handleDown(t)})):this.handleDown(t)}else this.handleDown(t)},handleDown:function(t){this.mouseX=t.pageX||t.clientX+document.documentElement.scrollLeft,this.mouseY=t.pageY||t.clientY+document.documentElement.scrollTop,this.offset={left:t.target.offsetLeft,top:t.target.offsetTop},this.resizing=!0,"number"==typeof this.value&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove:function(t){if(this.resizing){var e,n=(t.pageX||t.clientX+document.documentElement.scrollLeft)-this.mouseX,o=(t.pageY||t.clientY+document.documentElement.scrollTop)-this.mouseY;if("number"==typeof this.tmpSize)e="bottom"==this.placement?this.reverse?this.tmpSize-o:this.tmpSize+o:this.reverse?this.tmpSize-n:this.tmpSize+n,this.min>0&&(e=Math.max(this.min,e)),this.max>0&&(e=Math.min(this.max,e)),this.$emit("input",e);this.$emit("on-change",{event:"move",diff:{x:n,y:o},offset:this.offset})}},handleUp:function(){this.resizing&&(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}};var i=n(93379),r=n.n(i),a=n(92307),s={insert:"head",singleton:!1};r()(a.Z,s);a.Z.locals;var l=n(51900);const c={name:"DrawerOverlayView",components:{ResizeLine:(0,l.Z)(o,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"component-resize-line",class:[t.resizing?"resizing":"",t.placement],on:{mousedown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.stopPropagation(),e.preventDefault(),t.resizeDown.apply(null,arguments))}}})}),[],!1,null,"5a37a7e8",null).exports},props:{placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data:function(){return{dynamicSize:0}},computed:{bodyStyle:function(){var t=this.dynamicSize;return t="".concat(t,t<=100?"%":"px"),"right"==this.placement?{width:t,height:"100%"}:{width:"100%",height:t}}},watch:{size:{handler:function(t){this.dynamicSize=parseInt(t)},immediate:!0}},methods:{onClose:function(){this.$emit("on-close")},beforeResize:function(){var t=this;return new Promise((function(e){t.dynamicSize<=100&&t.updateSize(),e()}))},onChangeResize:function(t){"up"===t.event&&this.updateSize()},updateSize:function(){"bottom"===this.placement?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}};const u={name:"DrawerOverlay",components:{DrawerOverlayView:(0,l.Z)(c,(function(){var t=this,e=t._self._c;return e("div",{ref:"body",staticClass:"overlay-body",style:t.bodyStyle},[e("div",{staticClass:"overlay-close"},[e("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.onClose.apply(null,arguments)}}},[e("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[e("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),t._v(" "),t.resize?e("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:t.placement,min:t.minSize,max:0,reverse:!0,beforeResize:t.beforeResize},on:{"on-change":t.onChangeResize},model:{value:t.dynamicSize,callback:function(e){t.dynamicSize=e},expression:"dynamicSize"}}):t._e(),t._v(" "),e("div",{staticClass:"overlay-content"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data:function(){return{show:this.value}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},computed:{modalClass:function(){return this.className?"common-drawer-overlay ".concat(this.className," ").concat(this.placement):"common-drawer-overlay ".concat(this.placement)}},methods:{onClose:function(){this.$refs.modal.close()}}};const d=(0,l.Z)(u,(function(){var t=this,e=t._self._c;return e("Modal",{ref:"modal",attrs:{closable:t.escClosable,"mask-closable":t.maskClosable,"footer-hide":!0,"transition-names":[t.$A.isAndroid()?"":"drawer-slide-".concat(t.placement),""],beforeClose:t.beforeClose,fullscreen:"","class-name":t.modalClass},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("DrawerOverlayView",{attrs:{placement:t.placement,size:t.size,minSize:t.minSize,resize:t.resize},on:{"on-close":t.onClose}},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},42238:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var o=n(80641);const i={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:function(){return[]}},disabledChoice:{type:Array,default:function(){return[]}},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},maxHiddenSelect:{type:Boolean,default:!1},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0}},data:function(){return{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=o.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t),this.maxHiddenSelect&&t.length>=this.maxHiddenSelect&&this.$refs.select&&this.$refs.select.hideMenu()}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId,dialog_id:e.dialogId},take:50}}).then((function(n){var o=n.data;e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),r={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,r):e.searchHistory.push(r)})).catch((function(t){var n=t.msg;e.list=[],$A.messageWarning(n)})).finally((function(t){n||e.loadIng--})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const r=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("div",{class:["common-user",t.maxHiddenClass]},[e("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[t.multipleMax?e("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择"+t.multipleMax+"个")))]):t._e(),t._v(" "),t._t("option-prepend"),t._v(" "),t._l(t.list,(function(n,o){return e("Option",{key:o,attrs:{value:n.userid,"key-value":n.email,label:n.nickname,avatar:n.userimg,disabled:t.isDisabled(n.userid)}},[e("div",{staticClass:"user-input-option"},[e("div",{staticClass:"user-input-avatar"},[e("EAvatar",{staticClass:"avatar",attrs:{src:n.userimg}})],1),t._v(" "),e("div",{staticClass:"user-input-nickname"},[t._v(t._s(n.nickname))]),t._v(" "),e("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(n.userid))])])])}))],2),t._v(" "),t.loadIng>0?e("div",{staticClass:"common-user-loading"},[e("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},68024:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Y});var o=n(20629),i=n(76095),r=n.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,o=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}var w=9,k=13,O=27,x=38,C=40;function S(t,e,n){var o=t;return Object.keys(e).forEach((function(t){n.indexOf(t)>-1?o.dataset[t]=e[t]:delete o.dataset[t]})),o}var j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(n,t);var e=v(n);function n(t,o){var i;return s(this,n),u(p(i=e.call(this,t,o)),"hoverHandler",void 0),u(p(i),"hoverHandler",void 0),i.clickHandler=null,i.hoverHandler=null,i.mounted=!1,i}return c(n,[{key:"attach",value:function(){y(f(n.prototype),"attach",this).call(this),this.mounted||(this.mounted=!0,this.clickHandler=this.getClickHandler(),this.hoverHandler=this.getHoverHandler(),this.domNode.addEventListener("click",this.clickHandler,!1),this.domNode.addEventListener("mouseenter",this.hoverHandler,!1))}},{key:"detach",value:function(){y(f(n.prototype),"detach",this).call(this),this.mounted=!1,this.clickHandler&&(this.domNode.removeEventListener("click",this.clickHandler),this.clickHandler=null)}},{key:"getClickHandler",value:function(){var t=this;return function(e){var n=t.buildEvent("mention-clicked",e);window.dispatchEvent(n),e.preventDefault()}}},{key:"getHoverHandler",value:function(){var t=this;return function(e){var n=t.buildEvent("mention-hovered",e);window.dispatchEvent(n),e.preventDefault()}}},{key:"buildEvent",value:function(t,e){var n=new Event(t,{bubbles:!0,cancelable:!0});return n.value=d({},this.domNode.dataset),n.event=e,n}}],[{key:"create",value:function(t){var e=y(f(n),"create",this).call(this),o=document.createElement("span");return o.className="ql-mention-denotation-char",o.innerHTML=t.denotationChar,e.appendChild(o),e.innerHTML+=t.value,n.setDataValues(e,t)}},{key:"setDataValues",value:function(t,e){var n=t;return Object.keys(e).forEach((function(t){n.dataset[t]=e[t]})),n}},{key:"value",value:function(t){return t.dataset}}]),n}(r().import("blots/embed"));j.blotName="mention",j.tagName="span",j.className="mention",r().register(j);var T=function(){function t(e,n){var o=this;s(this,t),this.isOpen=!1,this.itemIndex=0,this.mentionCharPos=null,this.cursorPos=null,this.values=[],this.suspendMouseEnter=!1,this.existingSourceExecutionToken=null,this.quill=e,this.options={source:null,renderItem:function(t){return"".concat(t.value)},renderLoading:function(){return null},onSelect:function(t,e){e(t)},mentionDenotationChars:["@"],showDenotationChar:!0,allowedChars:/^[a-zA-Z0-9_]*$/,minChars:0,maxChars:31,offsetTop:2,offsetLeft:0,isolateCharacter:!1,fixMentionsToQuill:!1,positioningStrategy:"normal",defaultMenuOrientation:"bottom",blotName:"mention",dataAttributes:["id","value","denotationChar","link","target","disabled"],linkTarget:"_blank",onOpen:function(){return!0},onBeforeClose:function(){return!0},onClose:function(){return!0},listItemClass:"ql-mention-list-item",mentionContainerClass:"ql-mention-list-container",mentionListClass:"ql-mention-list",spaceAfterInsert:!0,selectKeys:[k]},d(this.options,n,{dataAttributes:Array.isArray(n.dataAttributes)?this.options.dataAttributes.concat(n.dataAttributes):this.options.dataAttributes}),this.mentionContainer=document.createElement("div"),this.mentionContainer.className=this.options.mentionContainerClass?this.options.mentionContainerClass:"",this.mentionContainer.style.cssText="display: none; position: absolute;",this.mentionContainer.onmousemove=this.onContainerMouseMove.bind(this),this.options.fixMentionsToQuill&&(this.mentionContainer.style.width="auto"),this.mentionList=document.createElement("ul"),this.mentionList.id="quill-mention-list",e.root.setAttribute("aria-owns","quill-mention-list"),this.mentionList.className=this.options.mentionListClass?this.options.mentionListClass:"",this.mentionContainer.appendChild(this.mentionList),e.on("text-change",this.onTextChange.bind(this)),e.on("selection-change",this.onSelectionChange.bind(this)),e.container.addEventListener("paste",(function(){setTimeout((function(){var t=e.getSelection();o.onSelectionChange(t)}))})),e.keyboard.addBinding({key:w},this.selectHandler.bind(this)),e.keyboard.bindings[w].unshift(e.keyboard.bindings[w].pop());var i,r=_(this.options.selectKeys);try{for(r.s();!(i=r.n()).done;){var a=i.value;e.keyboard.addBinding({key:a},this.selectHandler.bind(this))}}catch(t){r.e(t)}finally{r.f()}e.keyboard.bindings[k].unshift(e.keyboard.bindings[k].pop()),e.keyboard.addBinding({key:O},this.escapeHandler.bind(this)),e.keyboard.addBinding({key:x},this.upHandler.bind(this)),e.keyboard.addBinding({key:C},this.downHandler.bind(this))}return c(t,[{key:"selectHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.selectItem(),!1)}},{key:"escapeHandler",value:function(){return!this.isOpen||(this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList(),!1)}},{key:"upHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.prevItem(),!1)}},{key:"downHandler",value:function(){return!(this.isOpen&&!this.existingSourceExecutionToken)||(this.nextItem(),!1)}},{key:"showMentionList",value:function(){"fixed"===this.options.positioningStrategy?document.body.appendChild(this.mentionContainer):this.quill.container.appendChild(this.mentionContainer),this.mentionContainer.style.visibility="hidden",this.mentionContainer.style.display="",this.mentionContainer.scrollTop=0,this.setMentionContainerPosition(),this.setIsOpen(!0)}},{key:"hideMentionList",value:function(){this.options.onBeforeClose(),this.mentionContainer.style.display="none",this.mentionContainer.remove(),this.setIsOpen(!1),this.quill.root.removeAttribute("aria-activedescendant")}},{key:"highlightItem",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=0;er-n&&(this.mentionContainer.scrollTop+=o-r+n)}}},{key:"getItemData",value:function(){var t=this.mentionList.childNodes[this.itemIndex].dataset.link,e=void 0!==t,n=this.mentionList.childNodes[this.itemIndex].dataset.target;return e&&(this.mentionList.childNodes[this.itemIndex].dataset.value='-1&&(f=setTimeout((function(){u(),d(),i({statusText:"Request Timeout",status:408})}),n)),window[a]=function(t){clearTimeout(f),u(),d(),o(t)};var h=document.createElement("script");h.addEventListener("error",c),h.src=t+(/\?/.test(t)?"&":"?")+l,document.body.appendChild(h)}))}const I={name:"ChatEmoji",props:{searchKey:{type:String,default:""}},data:function(){return{type:"emoji",emoticonPath:"",emosearchKey:"",emosearchCache:null,emosearchLoad:!1,emosearchTimer:null,emosearchList:[]}},mounted:function(){},watch:{type:function(){this.onEmosearch()},emosearchKey:function(){this.onEmosearch()},searchKey:{handler:function(t){this.emosearchKey=t},immediate:!0}},computed:{list:function(){var t=this;if("emoji"===this.type)return $A.isArray(window.emojiData)?window.emojiData.sort((function(t,e){return t.emoji_order-e.emoji_order})).map((function(t){return{type:"emoji",name:t.name,html:t.code_decimal}})):[];if("emosearch"===this.type)return this.emosearchList;if("emoticon"===this.type){var e=this.emoticonList.find((function(e){return e.path===t.emoticonPath}));if(e)return e.list}return[]},emoticonList:function(){if($A.isArray(window.emoticonData)){var t=$A.apiUrl("../images/emoticon");return window.emoticonData.map((function(e){return Object.assign(e,{src:"".concat(t,"/").concat(e.path,"/").concat(e.icon),list:e.list.map((function(n){return Object.assign(n,{type:"emoticon",asset:"images/emoticon/".concat(e.path,"/").concat(n.path),src:"".concat(t,"/").concat(e.path,"/").concat(n.path)})}))})}))}return[]}},methods:{onEmosearch:function(){var t=this;"emosearch"===this.type&&this.emosearchCache!==this.emosearchKey&&(this.emosearchCache=this.emosearchKey,this.emosearchLoad=!0,this.emosearchTimer&&clearTimeout(this.emosearchTimer),this.emosearchTimer=setTimeout((function(e){A("https://pic.sogou.com/napi/wap/pic",{query:t.emosearchKey+" 表情"}).then((function(e){if(t.emosearchList=[],0===e.status){var n=e.data.items;n.length>0&&(t.emosearchList=n.map((function(t){return{type:"emoticon",asset:"emosearch",name:t.title,src:t.thumbUrl,height:t.thumbHeight,width:t.thumbWidth}})))}0===t.emosearchList.length&&$A.noticeWarning("没有搜索到任何表情")})).catch((function(e){t.emosearchList=[],$A.noticeWarning("搜索结果为空")})).finally((function(e){t.emosearchLoad=!1}))}),300))},onEmoticon:function(t){this.type="emoticon",this.emoticonPath=t},onSelect:function(t){this.$emit("on-select",t)}}};var L=n(51900);const P=(0,L.Z)(I,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-emoji-wrapper"},[e("div",{staticClass:"chat-emoji-box"},["emosearch"===t.type?e("div",{staticClass:"chat-emoji-emosearch"},[e("Input",{attrs:{clearable:"",placeholder:t.$L("搜索表情")},model:{value:t.emosearchKey,callback:function(e){t.emosearchKey=e},expression:"emosearchKey"}},[e("Icon",{class:{"icon-loading":t.emosearchLoad},attrs:{slot:"prefix",type:t.emosearchLoad?"ios-loading":"ios-search"},slot:"prefix"})],1)],1):t._e(),t._v(" "),e("ul",{staticClass:"scrollbar-overlay",class:[t.type,"no-dark-content"]},t._l(t.list,(function(n){return e("li",{on:{click:function(e){return t.onSelect(n)}}},["emoticon"===n.type?e("img",{attrs:{src:n.src,title:n.name,alt:n.name}}):e("span",{attrs:{title:n.name},domProps:{innerHTML:t._s(n.html)}})])})),0)]),t._v(" "),e("ul",{staticClass:"chat-emoji-menu"},[e("li",{class:{active:"emosearch"===t.type},on:{click:function(e){t.type="emosearch"}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("li",{class:{active:"emoji"===t.type},on:{click:function(e){t.type="emoji"}}},[e("span",{staticClass:"no-dark-content"},[t._v("😀")])]),t._v(" "),t._l(t.emoticonList,(function(n){return e("li",{class:{active:"emoticon"===t.type&&t.emoticonPath==n.path},on:{click:function(e){return t.onEmoticon(n.path)}}},[e("img",{attrs:{title:n.name,alt:n.name,src:n.src}})])}))],2)])}),[],!1,null,null,null).exports;var $="ontouchend"in document;const N={bind:function(t,e){var n=!1;t.__touchMouseDown__=function(t){t.preventDefault(),n=!0,e.value("down",t)},t.__touchMouseMove__=function(t){n&&e.value("move",t)},t.__touchMouseUp__=function(t){n&&(n=!1,e.value("up"))},$?(t.addEventListener("touchstart",t.__touchMouseDown__),t.addEventListener("touchmove",t.__touchMouseMove__),t.addEventListener("touchend",t.__touchMouseUp__)):(t.addEventListener("mousedown",t.__touchMouseDown__),document.addEventListener("mousemove",t.__touchMouseMove__),document.addEventListener("mouseup",t.__touchMouseUp__))},update:function(){},unbind:function(t){$?(t.removeEventListener("touchstart",t.__touchMouseDown__),t.removeEventListener("touchmove",t.__touchMouseMove__),t.removeEventListener("touchend",t.__touchMouseUp__)):(t.removeEventListener("mousedown",t.__touchMouseDown__),document.removeEventListener("mousemove",t.__touchMouseMove__),document.removeEventListener("mouseup",t.__touchMouseUp__)),delete t.__touchMouseDown__,delete t.__touchMouseMove__,delete t.__touchMouseUp__}};function M(t){return void 0===t&&(t=document.body),!0===t?document.body:t instanceof window.Node?t:document.querySelector(t)}const q={inserted:function(t,e,n){var o=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className?t.className+" v-transfer-dom":"v-transfer-dom";var i=t.parentNode;if(i){var r=document.createComment(""),a=!1;!1!==o&&(i.replaceChild(r,t),M(o).appendChild(t),a=!0),t.__transferDomData||(t.__transferDomData={parentNode:i,home:r,target:M(o),hasMovedOut:a})}},componentUpdated:function(t,e){var n=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;var o=t.__transferDomData;if(o){var i=o.parentNode,r=o.home,a=o.hasMovedOut;!a&&n?(i.replaceChild(r,t),M(n).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:M(n)})):a&&!1===n?(i.replaceChild(t,r),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:M(n)})):n&&M(n).appendChild(t)}},unbind:function(t){if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className.replace("v-transfer-dom",""),t.__transferDomData&&(!0===t.__transferDomData.hasMovedOut&&t.__transferDomData.parentNode&&t.__transferDomData.parentNode.appendChild(t),t.__transferDomData=null)}};var R=n(28456),B=n(80641);function F(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0&&e>0&&(t<280||e>40)?{width:"100%"}:{}},recordTransferStyle:function(){var t=this.windowScrollY;return t>0?{marginTop:t/2+"px"}:null},boxClass:function(){var t=[];return["ready","ing"].includes(this.recordState)&&("ing"===this.recordState&&this.recordDuration>0?t.push("record-progress"):t.push("record-ready")),this.showMore&&t.push("show-more"),this.showEmoji&&t.push("show-emoji"),this.mentionMode&&t.push(this.mentionMode),t},sendClass:function(){return this.value?"sender":this.recordReady?"recorder":""},recordFormatDuration:function(){var t=this.recordDuration,e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60,o=("00"+t%1e3).substr(-2);return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(e,":").concat(n,"″").concat(o)},dialogData:function(){var t=this;return this.dialogId>0&&this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},replyData:function(){var t=this.replyId;return t>0?this.dialogMsgs.find((function(e){return e.id===t})):null}}),watch:{value:function(t){this.quill&&(t&&t!==this._content?(this._content=t,this.setContent(t)):t||this.quill.setText("")),this.setInputCache(t)},disabled:function(t){this.quill&&this.quill.enable(!t)},dialogId:function(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.$emit("input",this.getInputCache())},taskId:function(){this.userList=null,this.userCache=null,this.taskList=null,this.fileList={},this.$emit("input",this.getInputCache())},showEmoji:function(t){if(t){var e=this.value.replace(/ /g," ");if((e=e.replace(/<[^>]+>/g,""))&&-1===e.indexOf(" ")&&e.length>=1&&e.length<=4?this.emojiQuickKey=e:this.emojiQuickKey="",this.showMore=!1,this.emojiQuickShow=!1,this.quill){var n=this.quill.selection.savedRange;this.rangeIndex=n?n.index:0}}!t&&this.$refs.emojiTip&&this.$refs.emojiTip.updatePopper(),this.$emit("on-emoji-visible-change",t)},showMore:function(t){t&&(this.showEmoji=!1),!t&&this.$refs.moreTip&&this.$refs.moreTip.updatePopper(),this.$emit("on-more-visible-change",t)},isFocus:function(t){var e=this;this.timerScroll&&clearInterval(this.timerScroll),t?(this.$emit("on-focus"),this.hidePopover(),this.isSpecVersion||this.windowSmall&&(this.timerScroll=setInterval((function(){var t;null!==(t=e.quill)&&void 0!==t&&t.hasFocus()?e.windowScrollY>0&&$A.scrollIntoViewIfNeeded(e.$refs.editor):clearInterval(e.timerScroll)}),200))):this.$emit("on-blur")},recordState:function(t){this.$emit("on-record-state",t)},dialogInputCache:function(){this.isFocus||this.$emit("input",this.getInputCache())},wrapperHeight:function(t,e){this.$emit("on-height-change",{newVal:t,oldVal:e})}},methods:{init:function(){var t=this;this._options=Object.assign({theme:"bubble",readOnly:!1,placeholder:this.placeholder,modules:{toolbar:[["bold","strike","italic","underline",{list:"ordered"},{list:"bullet"},"blockquote","code-block"]],keyboard:{bindings:{"short enter":{key:13,shortKey:!0,handler:function(e){return!!t.isEnterSend||(t.onSend(),!1)}},enter:{key:13,shiftKey:!1,handler:function(e){return!t.isEnterSend||(t.onSend(),!1)}},esc:{key:27,shiftKey:!1,handler:function(e){return!t.emojiQuickShow||(t.emojiQuickShow=!1,!1)}}}},mention:{allowedChars:/^\S*$/,mentionDenotationChars:["@","#","~"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,positioningStrategy:"fixed",renderItem:function(t){return!0===t.disabled?'
'.concat(t.value,"
"):0===t.id?'
@
'.concat(t.value,'
').concat(t.tip,"
"):t.avatar?'
').concat(t.value,"
"):'
').concat(t.value,"
")},renderLoading:function(){return"Loading..."},source:function(e,n,o){for(var i="@"==o?"user-mention":"#"==o?"task-mention":"file-mention",r=document.getElementsByClassName("ql-mention-list-container"),a=0;a0&&(t.label&&o.push.apply(o,F(t.label)),o.push.apply(o,F(n)))})),$A.jsonStringify(o.map((function(t){return t.id})))!==s&&(s=$A.jsonStringify(o.map((function(t){return t.id}))),n(o,e))}))}}}},this.options),this.quill=new(r())(this.$refs.editor,this._options),this.quill.enable(!1),this.value?this.setContent(this.value):this.$emit("input",this.getInputCache()),this.disabled||this.quill.enable(!0),this.quill.on("selection-change",(function(e){if(!e){if(t.quill.hasFocus())return void t.quill.setSelection(0);if(document.activeElement&&"ql-clipboard"===document.activeElement.className)return void t.quill.setSelection(t.quill.getLength())}t.isFocus=!!e})),this.quill.on("text-change",(function(e){t.maxlength>0&&t.quill.getLength()>t.maxlength&&t.quill.deleteText(t.maxlength,t.quill.getLength());var n=t.$refs.editor.children[0].innerHTML;n=(n=n.replace(/^(

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

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

<\/p>)+|(

<\/p>)+$/gi,""),t.updateEmojiQuick(n),t._content=n,t.$emit("input",t._content),t.$nextTick((function(e){var n=t.quill.getSelection();if(n){var o=t.quill.getText(n.index);/^\n\n$/.test(o)&&t.quill.deleteText(n.index,1)}}))})),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(function(t,e){return e.ops=e.ops.map((function(t){var e={attributes:{},insert:t.insert};return t.attributes&&["bold","strike","italic","underline","list","blockquote","link"].some((function(n){t.attributes[n]&&(e.attributes[n]=t.attributes[n])})),e})),e})),this.$emit("on-ready",this.quill),this.disabledRecord||$A.loadScriptS(["js/recorder/recorder.mp3.min.js","js/recorder/lib.fft.js","js/recorder/frequency.histogram.view.js"],(function(e){null===e&&"function"==typeof window.Recorder&&(t.recordRec=window.Recorder({type:"mp3",bitRate:32,sampleRate:16e3,onProcess:function(e,n,o,i,r,a){t.recordWave.input(e[e.length-1],n,i),t.recordDuration=o,o>=18e4&&t.stopRecord(!1)}}),window.Recorder.Support()&&(t.recordReady=!0,t.$nextTick((function(e){t.recordWave=window.Recorder.FrequencyHistogramView({elem:t.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1})}))))}))},updateEmojiQuick:function(t){var e=this;this.emojiSearchKey="",this.isFocus&&t?(this.emojiQuickTimer&&clearTimeout(this.emojiQuickTimer),this.emojiQuickTimer=setTimeout((function(n){if((t=(t=t.replace(/ /g," ")).replace(/<[^>]+>/g,""))&&-1===t.indexOf(" ")&&t.length>=1&&t.length<=4&&$A.isArray(window.emoticonData)){e.emojiQuickItems=[];var o=$A.apiUrl("../images/emoticon");if(window.emoticonData.some((function(n){var i=n.list.find((function(e){return $A.strExists(e.name+(e.key?" ".concat(e.key):""),t)}));if(i&&(e.emojiQuickItems.push(Object.assign(i,{type:"emoticon",asset:"images/emoticon/".concat(n.path,"/").concat(i.path),src:"".concat(o,"/").concat(n.path,"/").concat(i.path)})),e.emojiQuickItems.length>=3))return!0})),e.emojiQuickItems.length>0)return void e.$nextTick((function(t){e.emojiQuickShow=!0,e.$refs.emojiQuickRef.updatePopper()}))}e.emojiQuickShow=!1}),100)):this.emojiQuickShow=!1},setText:function(t){this.quill&&this.quill.setText(t)},setContent:function(t){this.quill&&this.quill.setContents(this.quill.clipboard.convert(t))},getInputCache:function(){var t=this.dialogId||"t_".concat(this.taskId),e=this.dialogInputCache.find((function(e){return e.key==t}));return e?e.cache:""},setInputCache:function(t){var e=this,n=this.dialogId||"t_".concat(this.taskId),o=this.dialogInputCache.findIndex((function(t){return t.key==n})),i={key:n,cache:t};o>-1?this.$store.state.dialogInputCache.splice(o,1,i):this.$store.state.dialogInputCache.push(i),this.__setInputCache&&clearTimeout(this.__setInputCache),this.__setInputCache=setTimeout((function(t){$A.setStorage("cacheDialogInput",e.$store.state.dialogInputCache)}),600)},onClickEditor:function(){this.updateEmojiQuick(this.value)},focus:function(){var t=this;this.$nextTick((function(){t.quill&&(t.quill.setSelection(t.quill.getLength()),t.quill.focus())}))},blur:function(){var t=this;this.$nextTick((function(){t.quill&&t.quill.blur()}))},clickSend:function(t,e){if(!this.loading)switch(t){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart="touchstart"===e.type?e.touches[0]:e,this.startRecord())return;break;case"move":var n="touchmove"===e.type?e.touches[0]:e;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.stopRecord(this.touchLimitY))return;if(this.touchLimitY||this.touchLimitX)return;this.onSend()}},onSend:function(){this.rangeIndex=0,this.$emit("on-send")},startRecord:function(){var t=this;return"recorder"===this.sendClass&&(B.Store.set("audioSubscribe",!0),this.recordDuration=0,this.recordState="ready",this.$nextTick((function(e){t.recordRec.open((function(e){"ready"===t.recordState?(t.recordState="ing",t.recordBlob=null,setTimeout((function(e){t.recordRec.start()}),300)):t.recordRec.close()}),(function(e){t.recordState="stop",$A.messageError(e||"打开录音失败")}))})),!0)},stopRecord:function(t){var e=this;switch(this.recordState){case"ing":return this.recordState="stop",this.recordRec.stop((function(n,o){e.recordRec.close(),!0!==t&&(o<600?$A.messageWarning("说话时间太短"):(e.recordBlob=n,e.uploadRecord(o)))}),(function(t){e.recordRec.close(),$A.messageError(t||"录音失败")})),!0;case"ready":return this.recordState="stop",!0;default:return this.recordState="stop",!1}},hidePopover:function(){this.showMore=!1,this.showEmoji=!1,this.emojiQuickShow=!1},onClickCover:function(){var t=this;this.hidePopover(),this.$nextTick((function(e){var n;null===(n=t.quill)||void 0===n||n.focus()}))},uploadRecord:function(t){var e=this;if(null!==this.recordBlob){var n=new FileReader;n.onloadend=function(){e.$emit("on-record",{type:e.recordBlob.type,base64:n.result,duration:t})},n.readAsDataURL(this.recordBlob)}},onEmojiQuick:function(t){"online"===t.type?(this.$emit("input",""),this.$emit("on-send",''))):(this.$emit("input",""),this.$emit("on-send",''))),this.emojiQuickShow=!1,this.focus()},onSelectEmoji:function(t){if(this.quill)if("emoji"===t.type){var e=document.createElement("span");e.innerHTML=t.html,this.quill.insertText(this.rangeIndex,e.innerHTML),this.rangeIndex+=e.innerHTML.length,e=null,this.windowLarge&&(this.showEmoji=!1,this.quill.setSelection(this.rangeIndex))}else"emoticon"===t.type&&(this.$emit("on-send",'')),"emosearch"===t.asset&&this.$emit("input",""),this.windowLarge&&(this.showEmoji=!1))},onCancelReply:function(){this.$emit("on-cancel-reply")},onToolbar:function(t){switch(this.hidePopover(),t){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"meeting":B.Store.set("addMeeting",{type:"create",dialog_id:this.dialogId,userids:[this.userId]});break;case"call":case"image":case"file":this.$emit("on-more",t)}},onMoreVisibleChange:function(t){this.showMore=t},openMenu:function(t){if(this.quill)if(0===this.value.length||this.value.endsWith("


"))this.quill.getModule("mention").openMenu(t);else{var e=this.value.replace(/<[^>]+>/g,"");0===e.length||e.endsWith(" ")?this.quill.getModule("mention").openMenu(t):this.quill.getModule("mention").openMenu(" ".concat(t))}},getProjectId:function(){var t=this,e=null;if(this.dialogId>0){if(e=this.cacheProjects.find((function(e){return e.dialog_id==t.dialogId})))return e.id;if(e=this.cacheTasks.find((function(e){return e.dialog_id==t.dialogId})))return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find((function(e){return e.id==t.taskId}))))return e.project_id;return 0},getMentionSource:function(t,e,n){var o=this;switch(t){case"@":this.mentionMode="user-mention";var i=function(t){o.getMoreUser(e,t.map((function(t){return t.id}))).then((function(e){var i,r;(o.userList=t,o.userCache=[],e.length>0)?(t.length>2&&o.userCache.push({label:null,list:[{id:0,value:o.$L("所有人"),tip:o.$L("仅提示会话内成员")}]}),(i=o.userCache).push.apply(i,[{label:[{id:0,value:o.$L("会话内成员"),disabled:!0}],list:t},{label:[{id:0,value:o.$L("会话以外成员"),disabled:!0}],list:e}])):t.length>2?(r=o.userCache).push.apply(r,[{label:null,list:[{id:0,value:o.$L("所有人"),tip:o.$L("提示所有成员")}]},{label:[{id:0,value:o.$L("会话内成员"),disabled:!0}],list:t}]):o.userCache.push({label:null,list:t});n(o.userCache)}))};if(this.dialogData.people&&$A.arrayLength(this.userList)!==this.dialogData.people&&(this.userList=null,this.userCache=null),null!==this.userCache&&n(this.userCache),null!==this.userList)return void i(this.userList);var r=[];if(this.dialogId>0)this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId,getuser:1}}).then((function(t){var e=t.data;o.cacheDialogs.find((function(t){return t.id==o.dialogId}))&&o.$store.dispatch("saveDialog",{id:o.dialogId,people:e.length}),e.length>0&&r.push.apply(r,F(e.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:t.online}})))),i(r)})).catch((function(t){i(r)}));else if(this.taskId>0){var a=this.cacheTasks.find((function(t){return t.id==o.taskId}));a&&$A.isArray(a.task_user)&&a.task_user.some((function(t){var e=o.cacheUserBasic.find((function(e){return e.userid==t.userid}));e&&r.push({id:e.userid,value:e.nickname,avatar:e.userimg,online:e.online})})),i(r)}break;case"#":if(this.mentionMode="task-mention",null!==this.taskList)return void n(this.taskList);var s=function(t){o.taskList=[],t.length>0&&(t=t.map((function(t){return{id:t.id,value:t.name}})),o.taskList.push({label:[{id:0,value:o.$L("项目未完成任务"),disabled:!0}],list:t}));var e=o.$store.getters.transforTasks(o.$store.getters.dashboardTask.all);e.length>0&&(e=e.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),o.taskList.push({label:[{id:0,value:o.$L("我的待完成任务"),disabled:!0}],list:e.map((function(t){return{id:t.id,value:t.name}}))}));var i=o.$store.getters.assistTask;i.length>0&&(i=i.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),o.taskList.push({label:[{id:0,value:o.$L("我协助的任务"),disabled:!0}],list:i.map((function(t){return{id:t.id,value:t.name}}))})),n(o.taskList)},l=this.getProjectId();if(l>0)return void this.$store.dispatch("getTaskForProject",l).then((function(t){var e=o.cacheTasks.filter((function(t){return!t.archived_at&&(t.project_id==l&&0===t.parent_id&&!t.archived_at&&!t.complete_at)}));e.length>0?s(e):s([])})).catch((function(t){s([])}));s([]);break;case"~":if(this.mentionMode="file-mention",$A.isArray(this.fileList[e]))return void n(this.fileList[e]);this.fileTimer&&clearTimeout(this.fileTimer),this.fileTimer=setTimeout((function(t){o.$store.dispatch("searchFiles",e).then((function(t){var i=t.data;o.fileList[e]=[{label:[{id:0,value:o.$L("文件分享查看"),disabled:!0}],list:i.filter((function(t){return"folder"!==t.type})).map((function(t){return{id:t.id,value:t.ext?"".concat(t.name,".").concat(t.ext):t.name}}))}],n(o.fileList[e])})).catch((function(){n([])}))}),300);break;default:n([])}},getMoreUser:function(t,e){var n=this;return new Promise((function(o){var i=n.dialogData,r=i.owner_id,a="group"===i.type&&[0,n.userId].includes(r);n.taskId>0||a?(n.__getMoreTimer&&clearTimeout(n.__getMoreTimer),n.__getMoreTimer=setTimeout((function(i){n.$store.dispatch("call",{url:"users/search",data:{keys:{key:t},state:1,take:30}}).then((function(t){var n=t.data.filter((function(t){return!e.includes(t.userid)}));o(n.map((function(t){return{id:t.userid,value:t.nickname,avatar:t.userimg,online:!!t.online}})))})).catch((function(t){o([])}))}),null===n.userCache?0:600)):o([])}))},checkIOSVersion:function(){var t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i),e=(t?t[1].replace(/_/g,"."):"unknown").split(".");return 11==+e[0]&&+e[1]>=0&&+e[1]<3},handlePaste:function(t){var e=Array.prototype.slice.call(t.clipboardData.files);e.filter((function(t){return!$A.leftExists(t.type,"image/")})).length>0?(t.preventDefault(),this.$emit("on-file",e)):this.pasteRtf(t)&&t.preventDefault()},pasteRtf:function(t){var e=this;if(t&&t.clipboardData&&t.clipboardData.items&&!(new DOMParser).parseFromString(t.clipboardData.getData("text/html")||"","text/html").querySelector("img")){var n=[],o=null;if(t.clipboardData.types&&-1!=[].indexOf.call(t.clipboardData.types,"text/rtf")||t.clipboardData.getData("text/rtf"))(o=t.clipboardData.items[0].getAsFile())&&n.push(o);else for(var i=0;i0)return n.forEach((function(t){var n=new FileReader;n.onload=function(t){var n=t.target,o=e.quill.getSelection(!0).index;e.quill.insertEmbed(o,"image",n.result),e.quill.setSelection(o+1)},n.readAsDataURL(t)})),!0}return!1}}},K=W;const Y=(0,L.Z)(K,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hidePopover,expression:"hidePopover"}],staticClass:"chat-input-box",class:t.boxClass},[e("div",{staticClass:"chat-input-quick-emoji"},[e("EPopover",{ref:"emojiQuickRef",attrs:{visibleArrow:!1,transition:"",placement:"top-end",popperClass:"chat-quick-emoji-popover"},model:{value:t.emojiQuickShow,callback:function(e){t.emojiQuickShow=e},expression:"emojiQuickShow"}},[e("div",{attrs:{slot:"reference"},slot:"reference"}),t._v(" "),e("ul",{staticClass:"chat-quick-emoji-wrapper"},t._l(t.emojiQuickItems,(function(n){return e("li",{on:{click:function(e){return t.onEmojiQuick(n)}}},[e("img",{attrs:{title:n.name,alt:n.name,src:n.src}})])})),0)])],1),t._v(" "),e("div",{staticClass:"chat-input-wrapper",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[t.replyData?e("div",{staticClass:"chat-reply"},[e("UserAvatar",{attrs:{userid:t.replyData.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),t._v(" "),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.replyData)))]),t._v(" "),e("i",{staticClass:"taskfont",on:{click:function(e){return e.stopPropagation(),t.onCancelReply.apply(null,arguments)}}},[t._v("")])],1):t._e(),t._v(" "),e("div",{ref:"editor",staticClass:"no-dark-content",style:t.editorStyle,on:{click:function(e){return e.stopPropagation(),t.onClickEditor.apply(null,arguments)},paste:t.handlePaste}}),t._v(" "),e("ul",{staticClass:"chat-toolbar",on:{click:function(t){t.stopPropagation()}}},[e("li",[t.emojiBottom?e("ETooltip",{ref:"emojiTip",attrs:{disabled:t.windowSmall||t.showEmoji,placement:"top",content:t.$L("表情")}},[e("i",{staticClass:"taskfont",on:{click:function(e){t.showEmoji=!t.showEmoji}}},[t._v("")])]):e("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:t.showEmoji,callback:function(e){t.showEmoji=e},expression:"showEmoji"}},[e("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:t.windowSmall||t.showEmoji,placement:"top",content:t.$L("表情")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e()],1)],1),t._v(" "),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("选择成员")}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("user")}}},[t._v("")])])],1),t._v(" "),e("li",[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("选择任务")}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("task")}}},[t._v("")])])],1),t._v(" "),e("li",[e("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMore,callback:function(e){t.showMore=e},expression:"showMore"}},[e("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:t.windowSmall||t.showMore,placement:"top",content:t.$L("展开")},slot:"reference"},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),t.recordReady?e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("meeting")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("新会议"))+"\n ")]):t._e(),t._v(" "),"user"===t.dialogData.type&&t.$isEEUiApp?e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("call")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("拨打电话"))+"\n ")]):t._e(),t._v(" "),e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("image")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("发送图片"))+"\n ")]),t._v(" "),e("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("file")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("上传文件"))+"\n ")])],1)],1),t._v(" "),e("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:t.clickSend,expression:"clickSend"}],staticClass:"chat-send",class:t.sendClass},[e("ETooltip",{attrs:{placement:"top",disabled:t.windowSmall,content:t.$L("recorder"===t.sendClass?"长按录音":"发送")}},[t.loading?e("div",[e("div",{staticClass:"chat-load"},[e("Loading")],1)]):e("div",[e("transition",{attrs:{name:"mobile-send"}},["recorder"===t.sendClass?e("i",{staticClass:"taskfont"},[t._v("")]):t._e()]),t._v(" "),e("transition",{attrs:{name:"mobile-send"}},["recorder"!==t.sendClass?e("i",{staticClass:"taskfont"},[t._v("")]):t._e()])],1)])],1),t._v(" "),t.recordReady?e("li",{staticClass:"chat-record-recwave"},[e("div",{ref:"recwave"})]):t._e()]),t._v(" "),e("div",{staticClass:"chat-cover",on:{click:function(e){return e.stopPropagation(),t.onClickCover.apply(null,arguments)}}})]),t._v(" "),t.emojiBottom&&t.showEmoji?e("ChatEmoji",{attrs:{searchKey:t.emojiQuickKey},on:{"on-select":t.onSelectEmoji}}):t._e(),t._v(" "),e("transition",{attrs:{name:"fade"}},[["ready","ing"].includes(t.recordState)?e("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:t.touchLimitY},style:t.recordTransferStyle,attrs:{"data-transfer":!0},on:{click:t.stopRecord}},[t.recordDuration>0?e("div",{staticClass:"record-duration"},[t._v(t._s(t.recordFormatDuration))]):e("div",{staticClass:"record-loading"},[e("Loading")],1),t._v(" "),e("div",{staticClass:"record-cancel",on:{click:function(e){return e.stopPropagation(),t.stopRecord(!0)}}},[t._v(t._s(t.$L(t.touchLimitY?"松开取消":"向上滑动取消")))])]):t._e()])],1)}),[],!1,null,null,null).exports},17451:(t,e,n)=>{"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:()=>q});var i=n(20629);const r={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style:function(){var t=this.size;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args:function(){var t=this.percent,e=Math.min(360,3.6*t);return 360==e?e=0:0==e&&(e=360),{x:14,y:14,r:14,start:360,end:e}}},methods:{isNumeric:function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},point:function(t,e,n,o){return[(t+Math.sin(o)*n).toFixed(2),(e-Math.cos(o)*n).toFixed(2)]},full:function(t,e,n,o){return o<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-o," ").concat(e," A ").concat(o," ").concat(o," 0 1 1 ").concat(t+o," ").concat(e," A ").concat(o," ").concat(o," 1 1 1 ").concat(t-o," ").concat(e," Z")},part:function(t,e,n,o,i,r){var a=i/360*2*Math.PI,s=r/360*2*Math.PI,l=[this.point(t,e,o,a),this.point(t,e,n,a),this.point(t,e,n,s),this.point(t,e,o,s)],c=s-a>Math.PI?"1":"0";return"M ".concat(l[0][0]," ").concat(l[0][1]," L ").concat(l[1][0]," ").concat(l[1][1]," A ").concat(n," ").concat(n," 0 ").concat(c," 1 ").concat(l[2][0]," ").concat(l[2][1]," L ").concat(l[3][0]," ").concat(l[3][1]," A ").concat(o," ").concat(o," 0 ").concat(c," 0 ").concat(l[0][0]," ").concat(l[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,o=t.y,i=void 0===o?0:o,r=t.R,a=void 0===r?0:r,s=t.r,l=void 0===s?0:s,c=t.start,u=t.end,d=[Math.max(a,l),Math.min(a,l)];if(l=d[1],(a=d[0])<=0)return"";if(c!==+c||u!==+u)return this.full(n,i,a,l);if(Math.abs(c-u)<1e-6)return"";if(Math.abs(c-u)%360<1e-6)return this.full(n,i,a,l);var f=[c%360,u%360];return(c=f[0])>(u=f[1])&&(u+=360),this.part(n,i,a,l,c,u)}}};var a=n(51900);const s=(0,a.Z)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[e("svg",{attrs:{viewBox:"0 0 28 28"}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),e("g",{attrs:{"fill-rule":"nonzero"}},[e("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),e("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports;var l=n(80641);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e]*?>$/.test(o.text)||/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(o.text))&&r.push("transparent"),r},contentClass:function(){var t=this.msgData,e=t.type,n=t.msg,o=[];return"text"===e&&(/^]*?>$/.test(n.text)?o.push("an-emoticon"):/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(n.text)?o.push("three-emoji"):/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(n.text)?o.push("two-emoji"):/^\s*

\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(n.text)&&o.push("an-emoji")),o}}),watch:{operateAction:function(t){var e=this;this.operateEnter=!1,t&&setTimeout((function(t){return e.operateEnter=!0}),500)}},methods:{handleLongpress:function(t,e){this.$emit("on-longpress",{event:t,el:e,msgData:this.msgData})},openTodo:function(){var t=this;this.todoLoad>0||(this.todoShow?this.todoShow=!1:(this.todoLoad++,this.$store.dispatch("call",{url:"dialog/msg/todolist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.todoList=n})).catch((function(){t.todoList=[]})).finally((function(e){setTimeout((function(){t.todoLoad--,t.todoShow=!0}),100)}))))},openReadPercentage:function(){var t=this;this.percentageLoad>0||(this.percentageShow?this.percentageShow=!1:(this.percentageLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.percentageList=n})).catch((function(){t.percentageList=[]})).finally((function(e){setTimeout((function(){t.percentageLoad--,t.percentageShow=!0}),100)}))))},recordStyle:function(t){var e=t.duration;return{width:50+Math.min(180,Math.floor(e/150))+"px"}},recordDuration:function(t){var e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60;return e>0?"".concat(e,":").concat(n,"″"):"".concat(Math.max(1,n),"″")},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var o=e,i=n;return(e>220||n>220)&&(e>n?(o=220,i=n*(220/e)):(o=e*(220/n),i=220)),{width:o+"px",height:i+"px"}}return{}},playRecord:function(){this.operateVisible||l.Store.set("audioSubscribe",{id:this.msgData.id,src:this.msgData.msg.path})},openMeeting:function(){this.operateVisible||l.Store.set("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},viewReply:function(){this.$emit("on-view-reply",{msg_id:this.msgData.id,reply_id:this.msgData.reply_id})},viewText:function(t){this.$emit("on-view-text",t)},viewFile:function(){this.$emit("on-view-file",this.msgData)},downFile:function(){this.$emit("on-down-file",this.msgData)},replyList:function(){this.$emit("on-reply-list",{msg_id:this.msgData.id})},onError:function(){this.$emit("on-error",this.msgData)},onEmoji:function(t){this.$emit("on-emoji",{msg_id:this.msgData.id,symbol:t})},onShowEmojiUser:function(t){this.$emit("on-show-emoji-user",t)}}};function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function p(t){for(var e=1;e0?e("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,(function(n,o){return e("li",{key:o,class:{hasme:n.userids.includes(t.userId)},on:{click:function(e){return t.onEmoji(n.symbol)}}},[e("div",{staticClass:"emoji-symbol no-dark-content"},[t._v(t._s(n.symbol))]),t._v(" "),e("div",{staticClass:"emoji-users"},[e("ul",[t._l(n.userids,(function(o,i){return[i<5?e("li",{class:{bold:o==t.userId}},[e("UserAvatar",{attrs:{userid:o,"tooltip-disabled":"","show-name":"","show-icon":!1}})],1):5==i?e("li",{on:{click:function(e){return e.stopPropagation(),t.onShowEmojiUser(n)}}},[t._v("+"+t._s(n.userids.length-5)+"位")]):t._e()]}))],2)])])})),0):t._e()]),t._v(" "),e("div",{staticClass:"dialog-foot"},[!t.hideReply&&t.msgData.reply_num>0?e("div",{staticClass:"reply",on:{click:t.replyList}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.msgData.reply_num)+"条回复\n ")]):t._e(),t._v(" "),t.msgData.tag?e("div",{staticClass:"tag"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),t.msgData.todo?e("div",{staticClass:"todo",on:{click:t.openTodo}},[e("EPopover",{ref:"todo",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.todoShow,callback:function(e){t.todoShow=e},expression:"todoShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoDoneList.length))]),t._v(t._s(t.$L("完成")))]),t._v(" "),t._l(t.todoDoneList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2),t._v(" "),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoUndoneList.length))]),t._v(t._s(t.$L("待办")))]),t._v(" "),t._l(t.todoUndoneList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.todoLoad>0?e("Loading"):e("i",{staticClass:"taskfont"},[t._v("")])],1):t._e(),t._v(" "),t.msgData.modify?e("div",{staticClass:"modify"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),!0===t.msgData.error?e("div",{staticClass:"error",on:{click:t.onError}},[e("Icon",{attrs:{type:"ios-alert"}})],1):t.isLoading?e("Loading"):[t.timeShow?e("div",{staticClass:"time",on:{click:function(e){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):e("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(e){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.hidePercentage?t._e():[t.msgData.send>1||"group"===t.dialogType?e("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[e("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.percentageShow,callback:function(e){t.percentageShow=e},expression:"percentageShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2),t._v(" "),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return e("li",[e("UserAvatar",{attrs:{userid:t.userid,size:26,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.percentageLoad>0?e("Loading"):e("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?e("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):e("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]]],2)])}),[],!1,null,null,null).exports},props:{source:{type:Object,default:function(){return{}}},dialogData:{type:Object,default:function(){return{}}},operateVisible:{type:Boolean,default:!1},operateItem:{type:Object,default:function(){return{}}},simpleView:{type:Boolean,default:!1},isMyDialog:{type:Boolean,default:!1},msgId:{type:Number,default:0}},data:function(){return{subscribe:null}},computed:p(p({},(0,i.rn)(["userId"])),{},{isRightMsg:function(){return this.source.userid==this.userId},isReply:function(){return this.simpleView||this.msgId===this.source.id},hidePercentage:function(){return this.simpleView||this.isMyDialog||this.isReply},hideReply:function(){return this.simpleView||this.msgId>0},classArray:function(){return{"dialog-item":!0,"reply-item":this.isReply,self:this.isRightMsg}}}),watch:{source:{handler:function(){this.msgRead()},immediate:!0},windowActive:function(t){t&&this.msgRead()}},methods:{msgRead:function(){this.windowActive&&this.$store.dispatch("dialogMsgRead",this.source)},formatTodoUser:function(t){if($A.isJson(t)){var e=t.userids;if(e)return e.split(",")}return[]},onViewTag:function(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onViewTodo:function(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onLongpress:function(t){this.dispatch("on-longpress",t)},onViewReply:function(t){this.dispatch("on-view-reply",t)},onViewText:function(t){this.dispatch("on-view-text",t)},onViewFile:function(t){this.dispatch("on-view-file",t)},onDownFile:function(t){this.dispatch("on-down-file",t)},onReplyList:function(t){this.dispatch("on-reply-list",t)},onError:function(t){this.dispatch("on-error",t)},onEmoji:function(t){this.dispatch("on-emoji",t)},onShowEmojiUser:function(t){this.dispatch("on-show-emoji-user",t)},dispatch:function(t,e){if(this.isReply)this.$emit(t,e);else{for(var n=this.$parent,o=n.$options.name;n&&(!o||"virtual-list"!==o);)(n=n.$parent)&&(o=n.$options.name);n&&n.$emit(t,e)}}}};const g=(0,a.Z)(v,(function(){var t=this,e=t._self._c;return e("div",{class:t.classArray},["tag"===t.source.type?e("div",{staticClass:"dialog-tag",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v("\n "+t._s(t.$L("remove"===t.source.msg.action?"取消标注":"标注了"))+'\n "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'"\n ')]):"todo"===t.source.type?e("div",{staticClass:"dialog-todo",on:{click:t.onViewTodo}},[e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v("\n "+t._s(t.$L("remove"===t.source.msg.action?"取消待办":"done"===t.source.msg.action?"完成":"设待办"))+'\n "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'"\n '),t.formatTodoUser(t.source.msg.data).length>0?e("div",{staticClass:"todo-users"},[e("span",[t._v(t._s(t.$L("给")))]),t._v(" "),t._l(t.formatTodoUser(t.source.msg.data),(function(n,o){return[o<3?e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:n,tooltipDisabled:n==t.userId,"show-name":!0,"show-icon":!1}})],1):3==o?e("div",{staticClass:"todo-user"},[t._v("+"+t._s(t.formatTodoUser(t.source.msg.data).length-3))]):t._e()]}))],2):t._e()]):"notice"===t.source.type?e("div",{staticClass:"dialog-notice"},[t._v("\n "+t._s(t.source.msg.notice)+"\n ")]):[e("div",{staticClass:"dialog-avatar"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId||"group"!=t.dialogData.type,"show-icon-menu":"group"==t.dialogData.type,"open-delay":100,size:30}})],1),t._v(" "),e("DialogView",{attrs:{"msg-data":t.source,"dialog-type":t.dialogData.type,"hide-percentage":t.hidePercentage,"hide-reply":t.hideReply,"operate-visible":t.operateVisible,"operate-action":t.operateVisible&&t.source.id===t.operateItem.id,"is-right-msg":t.isRightMsg},on:{"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}})]],2)}),[],!1,null,null,null).exports;const y={name:"DialogUpload",props:{dialogId:{type:Number,default:0},replyId:{type:Number,default:0},maxSize:{type:Number,default:1024e3}},data:function(){return{uploadFormat:["text","md","markdown","drawio","mind","docx","wps","doc","xls","xlsx","ppt","pptx","jpg","jpeg","png","gif","bmp","ico","raw","svg","rar","zip","jar","7-zip","tar","gzip","7z","gz","apk","dmg","tif","tiff","dwg","dxf","ofd","pdf","txt","htaccess","htgroups","htpasswd","conf","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","cs","css","dockerfile","go","golang","html","htm","xhtml","vue","we","wpy","java","js","jsm","jsx","json","jsp","less","lua","makefile","gnumakefile","ocamlmakefile","make","mysql","nginx","ini","cfg","prefs","m","mm","pl","pm","p6","pl6","pm6","pgsql","php","inc","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","py","r","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scss","sh","bash","bashrc","sql","sqlserver","swift","ts","typescript","str","vbs","vb","v","vh","sv","svh","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","yaml","yml","asp","properties","gitignore","log","bas","prg","python","ftl","aspx","plist","mp3","wav","mp4","flv","avi","mov","wmv","mkv","3gp","rm","xmind","rp"],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:{headers:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params:function(){return{dialog_id:this.dialogId,reply_id:this.replyId}}},methods:{handleProgress:function(t,e){void 0===e.tempId&&(e.tempId=$A.randNum(1e9,9999999999),this.$emit("on-progress",e))},handleSuccess:function(t,e){1===t.ret?(e.data=t.data,this.$emit("on-success",e),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+t.msg}),this.$emit("on-error",e),this.$refs.upload.fileList.pop())},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};const b=(0,a.Z)(y,(function(){var t=this;return(0,t._self._c)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var _=n(42238),w=n(81034);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function O(t){for(var e=1;e0?e.getDialogUser():(e.$store.dispatch("forgetDialog",e.dialogId),e.goForward({name:"manage-messenger"}))})).catch((function(t){var e=t.msg;n(e)}))}))}})},openUser:function(t){var e=this;this.openIng||(this.openIng=!0,this.$store.dispatch("showSpinner",600),this.$store.dispatch("openDialogUserid",t).then((function(t){e.$emit("on-close")})).finally((function(t){e.openIng=!1,e.$store.dispatch("hiddenSpinner")})))}}};const S=(0,a.Z)(C,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-group-info"},[e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群名")))]),t._v(" "),e("div",{staticClass:"group-info-value"},[e("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),t._v(" "),e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群类型")))]),t._v(" "),e("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),t._v(" "),e("div",{staticClass:"group-info-search"},[e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("搜索"),clearable:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})],1),t._v(" "),e("div",{staticClass:"group-info-user"},[e("ul",[t._l(t.userList,(function(n,o){return e("li",{key:o,on:{click:function(e){return t.openUser(n.userid)}}},[e("UserAvatar",{attrs:{userid:n.userid,size:32,showName:"",tooltipDisabled:""}}),t._v(" "),n.userid===t.dialogData.owner_id?e("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("群主")))]):t.dialogData.owner_id==t.userId||n.inviter==t.userId?e("div",{staticClass:"user-exit",on:{click:function(e){return e.stopPropagation(),t.onExit(n)}}},[e("Icon",{attrs:{type:"md-exit"}})],1):t._e()],1)})),t._v(" "),0===t.userList.length?e("li",{staticClass:"no"},[t.loadIng>0?e("Loading"):e("span",[t._v(t._s(t.$L("没有符合条件的数据")))])],1):t._e()],2)]),t._v(" "),"all"!==t.dialogData.group_type?e("div",{staticClass:"group-info-button"},[t.dialogData.owner_id==t.userId||0==t.dialogData.owner_id?e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.openAdd}},[t._v(t._s(t.$L("添加成员")))]):t._e()],1):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L("添加群成员"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[e("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("新增成员")}},[e("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,placeholder:t.$L("选择成员")},model:{value:t.addData.userids,callback:function(e){t.$set(t.addData,"userids",e)},expression:"addData.userids"}}),t._v(" "),"department"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入部门")))]):"project"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入项目")))]):"task"===t.dialogData.group_type?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("此操作仅加入群成员并不会加入任务负责人")))]):t._e()],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("确定添加")))])],1)],1)],1)}),[],!1,null,null,null).exports;const j={name:"DialogRespond",props:{respondData:{type:Object,default:function(){return{}}}},data:function(){return{openIng:!1}},methods:{openUser:function(t){var e=this;this.openIng||(this.openIng=!0,this.$store.dispatch("showSpinner",600),this.$store.dispatch("openDialogUserid",t).then((function(t){e.$emit("on-close")})).finally((function(t){e.openIng=!1,e.$store.dispatch("hiddenSpinner")})))}}};const T=(0,a.Z)(j,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dialog-respond"},[e("div",{staticClass:"respond-title"},[e("em",[t._v(t._s(t.respondData.symbol))]),t._v(t._s(t.$L("回应详情"))+" ("+t._s(t.respondData.userids.length)+")")]),t._v(" "),e("div",{staticClass:"respond-user"},[e("ul",t._l(t.respondData.userids,(function(n,o){return e("li",{key:o,on:{click:function(e){return t.openUser(n)}}},[e("UserAvatar",{attrs:{userid:n,size:32,showName:"",tooltipDisabled:""}})],1)})),0)])])}),[],!1,null,null,null).exports;var E=n(68024),D=n(85662);function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function I(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0&&this.dialogData.id>0},dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},dialogList:function(){return this.cacheDialogs.filter((function(t){return!(void 0===t.name||1===t.dialog_delete)})).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):t.todo_num>0||e.todo_num>0?e.todo_num-t.todo_num:$A.Date(e.last_at)-$A.Date(t.last_at)}))},dialogMsgList:function(){var t=this;return this.isReady?this.dialogMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},tempMsgList:function(){var t=this;return this.isReady?this.tempMsgs.filter((function(e){return e.dialog_id==t.dialogId})):[]},allMsgList:function(){var t=this,e=[];if(e.push.apply(e,I(this.dialogMsgList.filter((function(e){return t.msgFilter(e)})))),this.msgId>0){var n=this.dialogMsgs.find((function(e){return e.id==t.msgId}));n&&e.unshift(n)}if(this.tempMsgList.length>0){var o=e.map((function(t){return t.id})),i=this.tempMsgList.filter((function(e){return!o.includes(e.id)&&t.msgFilter(e)}));i.length>0&&e.push.apply(e,I(i))}return e.sort((function(t,e){return t.id-e.id}))},loadMsg:function(){return this.isLoad("msg::".concat(this.dialogId,"-").concat(this.msgId,"-").concat(this.msgType))},prevId:function(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum:function(){return"group"===this.dialogData.type?$A.runNum(this.dialogData.people):0},pasteTitle:function(){var t=this.pasteItem,e=t.find((function(t){return"image"==t.type})),n=t.find((function(t){return"image"!=t.type}));return e&&n?"发送文件/图片":e?"发送图片":"发送文件"},msgTags:function(){var t=[{type:"",label:"消息"}];return this.dialogData.has_tag&&t.push({type:"tag",label:"标注"}),this.dialogData.has_image&&t.push({type:"image",label:"图片"}),this.dialogData.has_file&&t.push({type:"file",label:"文件"}),this.dialogData.has_link&&t.push({type:"link",label:"链接"}),"project"===this.dialogData.group_type&&t.push({type:"project",label:"打开项目"}),"task"===this.dialogData.group_type&&t.push({type:"task",label:"打开任务"}),t},todoList:function(){var t=this;return this.dialogData.todo_num?this.dialogTodos.filter((function(e){return!e.done_at&&e.dialog_id==t.dialogId})).sort((function(t,e){return e.id-t.id})):[]},todoShow:function(){return this.todoList.length>0&&0===this.windowScrollY&&0===this.replyId},wrapperClass:function(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow:function(){return this.msgTags.length>1&&0===this.windowScrollY},scrollerClass:function(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass:function(){return this.pasteItem.find((function(t){return"image"!==t.type}))?["multiple"]:[]},footerClass:function(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},msgUnreadOnly:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e)})),t<=0?"":(t>99&&(t="99+"),String(t))},isMyDialog:function(){var t=this.dialogData,e=this.userId;return t.dialog_user&&t.dialog_user.userid==e},isMute:function(){if("all"===this.dialogData.group_type){if("all"===this.dialogData.all_group_mute)return!0;if("user"===this.dialogData.all_group_mute&&!this.userIsAdmin)return!0}return!1},replyId:function(){return parseInt(this.msgId>0?this.msgId:this.replyActiveId)},replyItem:function(){var t=this;return this.replyId?this.allMsgs.find((function(e){return e.id===t.replyId})):null},todoViewMsg:function(){var t=this;if(this.todoViewMid){var e=this.allMsgs.find((function(e){return e.id==t.todoViewMid}));if(e)return e;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null}}),watch:{dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.msgType="",this.replyActiveId=0,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.$store.dispatch("getDialogMsgs",{dialog_id:t,msg_id:this.msgId,msg_type:this.msgType}).then((function(n){e.openId=t,setTimeout(e.onSearchMsgId,100)})).catch((function(t){})),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:t}),this.autoFocus&&this.inputFocus())},immediate:!0},msgType:function(){this.$store.dispatch("getDialogMsgs",{dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch((function(t){}))},dialogSearchMsgId:function(){this.onSearchMsgId()},dialogMsgTransfer:{handler:function(t){var e=this,n=t.time,o=t.msgFile,i=t.msgRecord,r=t.msgText;n>$A.Time()&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick((function(){$A.isArray(o)&&o.length>0?e.sendFileMsg(o):$A.isJson(i)&&i.duration>0?e.sendRecord(i):r&&e.sendMsg(r)})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",{dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch((function(t){}))},allMsgList:function(t,e){var n=this.scrollInfo().tail;if(this.allMsgs=t,!this.windowActive||n>10&&e.length>0){var o=e[e.length-1]?e[e.length-1].id:0,i=t.filter((function(t){return t.id&&t.id>o}));this.msgNew+=i.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY:function(t){if($A.isIos()){var e=this.scrollInfo().tail;this.navStyle={marginTop:t+"px"},e<=10&&requestAnimationFrame(this.onToBottom)}},windowActive:function(t){if(t&&this.autoFocus){var e=$A.last(this.dialogIns);e&&e.uid===this._uid&&this.inputFocus()}},dialogDrag:function(t){t&&(this.operateVisible=!1)},replyActiveIndex:function(t){var e=this;t>-1&&setTimeout((function(t){return e.replyActiveIndex=-1}),800)}},methods:{sendMsg:function(t){var e,n=this,o=!1;if("string"==typeof t&&t?e=t:(e=this.msgText,o=!0),""!=e){if(e=e.replace(/<\/span> <\/p>$/,"

"),this.replyActiveUpdate){e=e.replace(new RegExp("src=([\"'])".concat($A.apiUrl("../")),"g"),"src=$1{{RemoteURL}}");var i=this.replyId;this.$store.dispatch("setLoad",{key:"msg-".concat(i),delay:600}),this.replyActiveId=0,this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:i,text:e},method:"post",complete:function(t){return n.$store.dispatch("cancelLoad","msg-".concat(i))}}).then((function(t){var e=t.data;n.sendSuccess(e),n.onPositionId(i)})).catch((function(t){var e=t.msg;$A.modalError(e)}))}else{var r=$A.randNum(1e9,9999999999),a=$A.stringLength(e.replace(/]*?>/g,""))>2e3,s={id:r,dialog_id:this.dialogData.id,reply_id:this.replyId,reply_data:this.replyItem,type:a?"loading":"text",userid:this.userId,msg:{text:a?"":e}};this.tempMsgs.push(s),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:s.dialog_id,reply_id:s.reply_id,text:e},method:"post"}).then((function(t){var e=t.data;n.tempMsgs=n.tempMsgs.filter((function(t){return t.id!=r})),n.sendSuccess(e)})).catch((function(t){n.$set(s,"error",!0),n.$set(s,"errorData",{type:"text",content:t.msg,msg:e})}))}o&&requestAnimationFrame((function(t){return n.msgText=""}))}else this.inputFocus()},sendRecord:function(t){var e=this,n=$A.randNum(1e9,9999999999),o={id:n,dialog_id:this.dialogData.id,reply_id:this.replyId,reply_data:this.replyItem,type:"loading",userid:this.userId,msg:t};this.tempMsgs.push(o),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(t,{dialog_id:this.dialogId,reply_id:this.replyId}),method:"post"}).then((function(t){var o=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(o)})).catch((function(n){e.$set(o,"error",!0),e.$set(o,"errorData",{type:"record",content:n.msg,msg:t})}))},sendFileMsg:function(t){var e=this,n=$A.isArray(t)?t:[t];n.length>0&&(this.pasteFile=[],this.pasteItem=[],n.some((function(t){var n={type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:null};if("image"===n.type){var o=new FileReader;o.readAsDataURL(t),o.onload=function(o){var i=o.target;n.result=i.result,e.pasteFile.push(t),e.pasteItem.push(n),e.pasteShow=!0}}else e.pasteFile.push(t),e.pasteItem.push(n),e.pasteShow=!0})))},msgFilter:function(t){if(this.msgType)if("tag"===this.msgType){if(!t.tag)return!1}else if("link"===this.msgType){if(!t.link)return!1}else if(this.msgType!==t.mtype)return!1;return!this.msgId||t.reply_id==this.msgId},onSearchMsgId:function(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(i,r){if(0===t)return $A.modalError("查看失败:参数错误"),void r();if(e.loadMsg||""!==e.msgType){if(e.msgType="",0===o)e.$store.dispatch("showSpinner",600);else if(o>20)return e.$store.dispatch("hiddenSpinner"),$A.modalError("查看失败:请求超时"),void r();return o++,void setTimeout((function(a){e.onPositionId(t,n,o).then(i).catch(r)}),Math.min(800,200*o))}o>0&&e.$store.dispatch("hiddenSpinner");var a=e.allMsgs.findIndex((function(e){return e.id===t})),s=e.prevId>0?0:-1;a>s?setTimeout((function(t){e.onToIndex(a),i()}),200):(n>0&&e.$store.dispatch("setLoad",{key:"msg-".concat(n),delay:600}),e.preventToBottom=!0,e.$store.dispatch("getDialogMsgs",{dialog_id:e.dialogId,msg_id:e.msgId,msg_type:e.msgType,position_id:t,spinner:2e3}).finally((function(o){var r=e.allMsgs.findIndex((function(e){return e.id===t}));r>-1&&(e.onToIndex(r),i()),n>0&&e.$store.dispatch("cancelLoad","msg-".concat(n)),e.preventToBottom=!1})))}))},onViewTodo:function(t){var e=this;if(!this.operateVisible){this.todoViewId=t.id,this.todoViewMid=t.msg_id,this.todoViewShow=!0;var n=this.allMsgs.findIndex((function(t){return t.id===e.todoViewMid}));-1===n&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then((function(t){var n=t.data;e.todoViewData=n}))}},onCloseTodo:function(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo:function(){var t=this;this.todoViewMid&&(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally((function(e){t.todoViewPosLoad=!1})))},onDoneTodo:function(){var t=this;this.todoViewId&&!this.todoViewLoad&&(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then((function(e){var n=e.data;t.$store.dispatch("saveDialogTodo",{id:t.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),t.$store.dispatch("saveDialog",{id:t.dialogId,todo_num:t.todoList.length}),n.add&&t.sendSuccess(n.add),0===t.todoList.length&&t.$store.dispatch("getDialogTodo",t.dialogId),t.onCloseTodo()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.todoViewLoad=!1})))},itemClassAdd:function(t){return t===this.replyActiveIndex?"common-shake":""},inputFocus:function(){var t=this;this.$nextTick((function(e){t.$refs.input&&t.$refs.input.focus()}))},onRecordState:function(t){this.recordState=t},chatPasteDrag:function(t,e){this.dialogDrag=!1;var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,o=Array.prototype.slice.call(n);o.length>0&&(t.preventDefault(),this.sendFileMsg(o))},chatDragOver:function(t,e){var n=this,o=this.__dialogDrag=$A.randomString(8);if(t){if("move"===e.dataTransfer.effectAllowed)return;this.dialogDrag=!0}else setTimeout((function(){o===n.__dialogDrag&&(n.dialogDrag=t)}),150)},onTouchStart:function(t){this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:t.touches[0].clientY,exclud:!this.$refs.scroller.$el.contains(t.target)})},onTouchMove:function(t){if(this.windowSmall&&this.windowScrollY>0){if(this.wrapperStart.exclud)return void t.preventDefault();this.wrapperStart.clientY>t.touches[0].clientY?0===this.wrapperStart.tail&&t.preventDefault():0===this.wrapperStart.offset&&t.preventDefault()}},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},chatFile:function(t,e){switch(t){case"progress":var n={id:e.tempId,dialog_id:this.dialogData.id,reply_id:this.replyId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(n),this.msgType="",this.replyActiveId=0,this.onActive(),this.$nextTick(this.onToBottom);break;case"error":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId}));break;case"success":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId})),this.sendSuccess(e.data)}},sendSuccess:function(t){$A.isArray(t)?t.some(this.sendSuccess):(this.$store.dispatch("saveDialogMsg",t),this.replyActiveUpdate||(this.$store.dispatch("increaseTaskMsgNum",t),this.$store.dispatch("increaseMsgReplyNum",t),this.$store.dispatch("updateDialogLastMsg",t)),this.onCancelReply(),this.onActive())},onEventFocus:function(){this.$emit("on-focus")},onEventBlur:function(){this.$emit("on-blur")},onEventMore:function(t){switch(t){case"call":this.onCallTel();break;case"image":case"file":this.$refs.chatUpload.handleClick()}},onCallTel:function(){var t=this;this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then((function(e){var n=e.data;n.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:n.tel}),n.add&&(t.$store.dispatch("saveDialogMsg",n.add),t.$store.dispatch("updateDialogLastMsg",n.add),t.onActive())})).catch((function(t){var e=t.msg;$A.modalError(e)}))},onEventEmojiVisibleChange:function(t){t&&this.windowSmall&&this.onToBottom()},onHeightChange:function(t){var e=t.newVal-t.oldVal;if(0!==e){var n=this.scrollInfo(),o=n.offset;n.tail>0&&this.onToOffset(o+e)}},onActive:function(){this.$emit("on-active")},onToBottom:function(){this.msgNew=0;var t=this.$refs.scroller;t&&(t.scrollToBottom(),requestAnimationFrame((function(e){return t.scrollToBottom()})))},onToIndex:function(t){var e=this,n=this.$refs.scroller;n&&(n.stopToBottom(),n.scrollToIndex(t,-100),requestAnimationFrame((function(e){return n.scrollToIndex(t,-100)}))),requestAnimationFrame((function(n){return e.replyActiveIndex=t}))},onToOffset:function(t){var e=this.$refs.scroller;e&&(e.stopToBottom(),e.scrollToOffset(t),setTimeout((function(n){return e.scrollToOffset(t)}),10))},scrollInfo:function(){var t=this.$refs.scroller;return t?t.scrollInfo():{offset:0,scale:0,tail:0}},openProject:function(){this.dialogData.group_info&&(this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask:function(){this.dialogData.group_info&&(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",this.dialogData.group_info.id))},onPrevPage:function(){var t=this;0!==this.prevId&&this.$store.dispatch("getDialogMsgs",{dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:function(e){return t.scrollDisabled=!0}}).then((function(e){var n=e.data.list.map((function(t){return t.id}));t.$nextTick((function(){var e=t.$refs.scroller,o=n.reduce((function(t,n){return{size:("object"===A(t)?t.size:e.getSize(t))+e.getSize(n)}})),i=e.getOffset()+o.size;0===t.prevId&&(i-=36),t.onToOffset(i),t.scrollDisabled=!1}))})).catch((function(){}))},onDialogMenu:function(t){switch(t){case"openCreate":var e=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&e.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:e,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup()}},onTransferGroup:function(){var t=this;0!==this.groupTransferData.userid.length?(this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.$store.dispatch("saveDialog",n)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.groupTransferLoad--,t.groupTransferShow=!1}))):$A.messageError("请选择新的群主")},onDisbandGroup:function(){var t=this;$A.modalConfirm({content:"你确定要解散【".concat(this.dialogData.name,"】群组吗?"),loading:!0,okText:"解散",onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:t.dialogId}}).then((function(n){var o=n.msg;e(o),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;n(e)}))}))}})},onExitGroup:function(){var t=this;$A.modalConfirm({content:"你确定要退出群组吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:t.dialogId}}).then((function(n){var o=n.msg;e(o),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;n(e)}))}))}})},onCreateGroup:function(){var t=this;this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.createGroupShow=!1,t.createGroupData={},t.$store.dispatch("saveDialog",n),t.$store.dispatch("openDialog",n.id)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.createGroupLoad--}))},onForward:function(t){var e=this;if("open"===t)this.forwardData={dialogids:[],userids:[],msg_id:this.operateItem.id},this.forwardShow=!0;else if("submit"===t){if(0===$A.arrayLength(this.forwardData.dialogids)&&0===$A.arrayLength(this.forwardData.userids))return void $A.messageWarning("请选择转发对话或成员");this.forwardLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/forward",data:this.forwardData}).then((function(t){var n=t.data,o=t.msg;e.forwardShow=!1,e.$store.dispatch("saveDialogMsg",n.msgs),e.$store.dispatch("updateDialogLastMsg",n.msgs),$A.messageSuccess(o)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.forwardLoad=!1}))}},onScroll:function(t){var e=this;this.operateVisible=!1;var n=this.scrollInfo().tail;this.scrollTail=n,this.scrollTail<=10&&(this.msgNew=0),this.scrollAction=t.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout((function(t){return e.scrollTmp=e.scrollAction}),0)},onRange:function(t){var e=this;if(!this.preventMoreLoad)for(var n="down"===this.scrollDirection?"next_id":"prev_id",o=t.start;o<=t.end;o++){var i=this.allMsgs[o][n];if(i){var r=this.allMsgs[o+("next_id"===n?1:-1)];r&&r.id!=i&&(this.preventMoreLoad=!0,this.$store.dispatch("getDialogMsgs",N({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType},n,i)).finally((function(t){e.preventMoreLoad=!1})))}}},onBack:function(){var t=this;if(!this.beforeBack)return this.handleBack();var e=this.beforeBack();e&&e.then?e.then((function(){t.handleBack()})):this.handleBack()},handleBack:function(){var t=this.$store.state.routeHistoryLast,e=t.name,n=t.params;e===this.$route.name&&/\d+/.test(n.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType:function(t){switch(t){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("正在加载,请稍后再试..."):this.msgType=t}},onLongpress:function(t){var e=this,n=t.event,o=t.el,i=t.msgData;this.operateVisible=this.operateItem.id===i.id,this.operateItem=$A.isJson(i)?i:{},this.operateCopys=[],"IMG"===n.target.nodeName&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"复制图片",value:$A.rightDelete(n.target.currentSrc,"_thumb.jpg")}):"A"===n.target.nodeName&&this.operateCopys.push({type:"link",icon:"",label:"复制链接",value:n.target.href}),"text"===i.type&&("IMG"===n.target.nodeName&&this.operateCopys.push({type:"imagedown",icon:"",label:"下载图片",value:$A.rightDelete(n.target.currentSrc,"_thumb.jpg")}),i.msg.text.replace(/<[^>]+>/g,"").length>0&&this.operateCopys.push({type:"text",icon:"",label:this.operateCopys.length>0?"复制文本":"复制",value:""})),this.$nextTick((function(){var t=o.getBoundingClientRect(),i=e.$el.getBoundingClientRect();e.operateStyles={left:"".concat(n.clientX-i.left,"px"),top:"".concat(t.top+e.windowScrollY,"px"),height:t.height+"px"},e.operateVisible=!0}))},onOperate:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.operateVisible=!1,this.$nextTick((function(o){switch(t){case"reply":e.onReply();break;case"update":e.onUpdate();break;case"copy":e.onCopy(n);break;case"forward":e.onForward("open");break;case"withdraw":e.onWithdraw();break;case"view":e.onViewFile();break;case"down":e.onDownFile();break;case"tag":e.onTag();break;case"newTask":var i=$A.formatMsgBasic(e.operateItem.msg.text);i=i.replace(/]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,''),l.Store.set("addTask",{owner:[e.userId],content:i});break;case"todo":e.onTodo();break;case"pos":e.onPositionId(e.operateItem.id);break;case"emoji":e.onEmoji(n)}}))},onReply:function(){var t=this.scrollInfo().tail;this.replyActiveId=this.operateItem.id,this.replyActiveUpdate=!1,this.inputFocus(),t<=10&&requestAnimationFrame(this.onToBottom)},onUpdate:function(){if(this.onReply(),"text"===this.operateItem.type){this.replyActiveUpdate=!0;var t=this.operateItem.msg.text;t.indexOf("mention")>-1&&(t=(t=t.replace(/
]*)>~([^>]*)<\/a>/g,'~$3')).replace(/([@#])([^>]*)<\/span>/g,'$3$4')),this.msgText=$A.formatMsgBasic(t)}},onCopy:function(t){var e=this;if($A.isJson(t)){var n=t.type,o=t.value;switch(n){case"image":this.$Electron&&this.getBase64Image(o).then((function(t){e.$Electron.sendMessage("copyBase64Image",{base64:t})}));break;case"imagedown":this.$store.dispatch("downUrl",{url:o,token:!1});break;case"link":this.$copyText(o).then((function(t){return $A.messageSuccess("复制成功")})).catch((function(t){return $A.messageError("复制失败")}));break;case"text":var i=$A(this.$refs.scroller.$el).find('[data-id="'.concat(this.operateItem.id,'"]')).find(".dialog-content");if(i.length>0){var r=i[0].innerText.replace(/\n\n/g,"\n");this.$copyText(r).then((function(t){return $A.messageSuccess("复制成功")})).catch((function(t){return $A.messageError("复制失败")}))}else $A.messageWarning("不可复制的内容")}}},onCancelReply:function(){this.replyActiveUpdate&&(this.replyActiveUpdate=!1,this.msgText=""),this.replyActiveId=0},onWithdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.operateItem.id}}).then((function(){e("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.operateItem.id)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onViewReply:function(t){this.operateVisible||this.onPositionId(t.reply_id,t.msg_id)},onViewText:function(t){var e=t.target;if(!this.operateVisible)switch(e.nodeName){case"IMG":e.classList.contains("browse")?this.onViewPicture(e.currentSrc):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=$A.getTextImagesInfo(e.outerHTML));break;case"SPAN":e.classList.contains("mention")&&e.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(e.getAttribute("data-id")))}},onViewFile:function(t){if(!this.operateVisible){$A.isJson(t)||(t=this.operateItem);var e=t.msg;if(["jpg","jpeg","gif","png"].includes(e.ext))this.onViewPicture(e.path);else{var n="/single/file/msg/".concat(t.id);this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-".concat(t.id),path:n,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(e.name," (").concat($A.bytesToSize(e.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:"drawio"===e.ext}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:"".concat(e.name," (").concat($A.bytesToSize(e.size),")"),url:"web.js",params:{titleFixed:!0,url:$A.rightDelete(window.location.href,window.location.hash)+"#".concat(n)}}):window.open($A.apiUrl("..".concat(n)))}}},onViewPicture:function(t){var e=this.allMsgs.filter((function(t){return"file"===t.type?["jpg","jpeg","gif","png"].includes(t.msg.ext):"text"===t.type&&t.msg.text.match(/]*?>/)})),n=[];e.some((function(t){var e=t.type,o=t.msg;"file"===e?n.push({src:o.path,width:o.width,height:o.height}):"text"===e&&n.push.apply(n,I($A.getTextImagesInfo(o.text)))}));var o=n.findIndex((function(e){return e.src===t}));o>-1?(this.$store.state.previewImageIndex=o,this.$store.state.previewImageList=n):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t])},onDownFile:function(t){var e=this;this.operateVisible||($A.isJson(t)||(t=this.operateItem),$A.modalConfirm({title:"下载文件",content:"".concat(t.msg.name," (").concat($A.bytesToSize(t.msg.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.id)))}}))},onReplyList:function(t){this.operateVisible||(this.replyListId=t.msg_id,this.replyListShow=!0)},onError:function(t){var e=this;if(!0===t.error){var n=t.errorData,o=n.type,i=n.content,r=n.msg,a={icon:"error",title:"发送失败",content:i,cancelText:"取消发送",onCancel:function(n){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id}))}};if("text"===o)a.okText="再次编辑",a.onOk=function(){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id})),e.msgText=r,e.inputFocus()};else{if("record"!==o)return;a.okText="重新发送",a.onOk=function(){e.tempMsgs=e.tempMsgs.filter((function(e){return e.id!=t.id})),e.sendRecord(r)}}$A.modalConfirm(a)}},onEmoji:function(t){var e=this;$A.isJson(t)||(t={msg_id:this.operateItem.id,symbol:t}),this.$store.dispatch("setLoad",{key:"msg-".concat(t.msg_id),delay:600}),this.$store.dispatch("call",{url:"dialog/msg/emoji",data:t}).then((function(t){var n=t.data;e.dialogMsgs.findIndex((function(t){return t.id==n.id}))>-1?e.$store.dispatch("saveDialogMsg",n):e.todoViewData.id===n.id&&(e.todoViewData=Object.assign(e.todoViewData,n))})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(n){e.$store.dispatch("cancelLoad","msg-".concat(t.msg_id))}))},onShowEmojiUser:function(t){this.operateVisible||(this.respondData=t,this.respondShow=!0)},onTag:function(){var t=this;if(!this.operateVisible){var e={msg_id:this.operateItem.id};this.$store.dispatch("setLoad",{key:"msg-".concat(e.msg_id),delay:600}),this.$store.dispatch("call",{url:"dialog/msg/tag",data:e}).then((function(e){var n=e.data;t.tagOrTodoSuccess(n)})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(n){t.$store.dispatch("cancelLoad","msg-".concat(e.msg_id))}))}},onTodo:function(t){var e=this;if(!this.operateVisible)if("submit"===t){if("user"===this.todoSettingData.type&&0===$A.arrayLength(this.todoSettingData.userids))return void $A.messageWarning("选择指定成员");this.todoSettingLoad++,this.onTodoSubmit(this.todoSettingData).then((function(t){$A.messageSuccess(t),e.todoSettingShow=!1})).catch($A.messageError).finally((function(t){e.todoSettingLoad--}))}else this.todoSettingData={type:"all",userids:[],msg_id:this.operateItem.id},this.operateItem.todo?$A.modalConfirm({content:"你确定取消待办吗?",cancelText:"取消",okText:"确定",loading:!0,onOk:function(){return e.onTodoSubmit(e.todoSettingData)}}):this.todoSettingShow=!0},onTodoSubmit:function(t){var e=this;return new Promise((function(n,o){e.$store.dispatch("setLoad",{key:"msg-".concat(t.msg_id),delay:600}),e.$store.dispatch("call",{url:"dialog/msg/todo",data:t}).then((function(t){var o=t.data,i=t.msg;n(i),e.tagOrTodoSuccess(o),e.onActive()})).catch((function(t){var e=t.msg;o(e)})).finally((function(n){e.$store.dispatch("cancelLoad","msg-".concat(t.msg_id))}))}))},tagOrTodoSuccess:function(t){this.$store.dispatch("saveDialogMsg",t.update),t.add&&(this.$store.dispatch("saveDialogMsg",t.add),this.$store.dispatch("updateDialogLastMsg",t.add))},getBase64Image:function(t){return new Promise((function(e){var n=document.createElement("CANVAS"),o=n.getContext("2d"),i=new Image;i.crossOrigin="Anonymous",i.onload=function(){n.height=i.height,n.width=i.width,o.drawImage(i,0,0);var r="png";$A.rightExists(t,"jpg")||$A.rightExists(t,"jpeg")?r="jpeg":$A.rightExists(t,"git")&&(r="git"),e(n.toDataURL("image/".concat(r))),n=null},i.src=t}))}}};const q=(0,a.Z)(M,(function(){var t=this,e=t._self._c;return t.isReady?e("div",{staticClass:"dialog-wrapper",class:t.wrapperClass,on:{drop:function(e){return e.preventDefault(),t.chatPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.chatDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.chatDragOver(!1,e)},touchstart:t.onTouchStart,touchmove:t.onTouchMove}},[e("div",{staticClass:"dialog-nav",style:t.navStyle},[t._t("head",(function(){return[e("div",{staticClass:"nav-wrapper",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[e("div",{staticClass:"dialog-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),t.msgUnreadOnly?e("div",{staticClass:"back-num"},[t._v(t._s(t.msgUnreadOnly))]):t._e()]),t._v(" "),e("div",{staticClass:"dialog-block"},[e("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["department"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("")]):"project"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{online:t.dialogData.online_state,userid:t.dialogData.dialog_user.userid,size:42},on:{"update:online":function(e){return t.$set(t.dialogData,"online_state",e)}}},["user"===t.dialogData.type&&!0!==t.dialogData.online_state?e("p",{attrs:{slot:"end"},slot:"end"},[t._v("\n "+t._s(t.$L(t.dialogData.online_state))+"\n ")]):t._e()])],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),e("div",{staticClass:"dialog-title"},[e("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(n){return"success"!=n.color?[e("Tag",{attrs:{color:n.color,fade:!1}},[t._v(t._s(t.$L(n.text)))])]:t._e()})),t._v(" "),e("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?e("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e(),t._v(" "),"all"==t.dialogData.group_type?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("全员")))]):"department"==t.dialogData.group_type?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("部门")))]):t._e()],2),t._v(" "),e("ul",{staticClass:"title-desc"},["user"===t.dialogData.type?e("li",{class:[!0===t.dialogData.online_state?"online":"offline"]},[t._v("\n "+t._s(t.$L(!0===t.dialogData.online_state?"在线":t.dialogData.online_state))+"\n ")]):t._e()]),t._v(" "),t.tagShow?e("ul",{staticClass:"title-tags scrollbar-hidden"},t._l(t.msgTags,(function(n){var i;return e("li",{key:n.type,class:(i={},o(i,n.type||"msg",!0),o(i,"active",t.msgType===n.type),i),on:{click:function(e){return t.onMsgType(n.type)}}},[e("i",{staticClass:"no-dark-content"}),t._v(" "),e("span",[t._v(t._s(t.$L(n.label)))])])})),0):t._e()])]),t._v(" "),e("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:t.onDialogMenu}},[e("i",{staticClass:"taskfont dialog-menu-icon"},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},["user"===t.dialogData.type?e("EDropdownItem",{attrs:{command:"openCreate"}},[e("div",[t._v(t._s(t.$L("创建群组")))])]):[e("EDropdownItem",{attrs:{command:"groupInfo"}},[e("div",[t._v(t._s(t.$L("群组设置")))])]),t._v(" "),t.dialogData.owner_id!=t.userId?e("EDropdownItem",{attrs:{command:"exit"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("退出群组")))])]):"user"===t.dialogData.group_type?[e("EDropdownItem",{attrs:{command:"transfer"}},[e("div",[t._v(t._s(t.$L("转让群主")))])]),t._v(" "),e("EDropdownItem",{attrs:{command:"disband"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("解散群组")))])])]:t._e()]],2)],1)],1)]}))],2),t._v(" "),e("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-overlay",class:t.scrollerClass,attrs:{"data-key":"id","data-sources":t.allMsgs,"data-component":t.msgItem,"item-class-add":t.itemClassAdd,"extra-props":{dialogData:t.dialogData,operateVisible:t.operateVisible,operateItem:t.operateItem,isMyDialog:t.isMyDialog,msgId:t.msgId},"estimate-size":"group"==t.dialogData.type?105:77,keeps:50,disabled:t.scrollDisabled},on:{scroll:t.onScroll,range:t.onRange,totop:t.onPrevPage,"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}},[e("template",{slot:"header"},[0===t.allMsgs.length&&t.loadMsg||t.prevId>0?e("div",{staticClass:"dialog-item loading"},[e("Loading",{attrs:{type:"pure"}})],1):0===t.allMsgs.length?e("div",{staticClass:"dialog-item nothing"},[t._v(t._s(t.$L("暂无消息")))]):t._e()])],2),t._v(" "),e("div",{staticClass:"dialog-footer",class:t.footerClass,on:{click:t.onActive}},[e("div",{staticClass:"dialog-newmsg",on:{click:t.onToBottom}},[t._v(t._s(t.$L("有".concat(t.msgNew,"条新消息"))))]),t._v(" "),e("div",{staticClass:"dialog-goto",on:{click:t.onToBottom}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId,"reply-id":t.replyId},on:{"on-progress":function(e){return t.chatFile("progress",e)},"on-success":function(e){return t.chatFile("success",e)},"on-error":function(e){return t.chatFile("error",e)}}}),t._v(" "),t.todoShow?e("div",{staticClass:"chat-todo"},[e("div",{staticClass:"todo-label"},[t._v(t._s(t.$L("待办"))+":")]),t._v(" "),e("ul",{staticClass:"scrollbar-hidden"},t._l(t.todoList,(function(n){return e("li",{on:{click:function(e){return e.stopPropagation(),t.onViewTodo(n)}}},[e("div",{staticClass:"todo-desc no-dark-content"},[t._v(t._s(t.$A.getMsgSimpleDesc(n.msg_data)))])])})),0)]):t._e(),t._v(" "),t.isMute?e("div",{staticClass:"chat-mute"},[t._v("\n "+t._s(t.$L("禁言发言"))+"\n ")]):e("ChatInput",{ref:"input",attrs:{"dialog-id":t.dialogId,"reply-id":t.replyActiveId,"emoji-bottom":t.windowSmall,maxlength:2e5,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventBlur,"on-more":t.onEventMore,"on-file":t.sendFileMsg,"on-send":t.sendMsg,"on-record":t.sendRecord,"on-record-state":t.onRecordState,"on-emoji-visible-change":t.onEventEmojiVisibleChange,"on-height-change":t.onHeightChange,"on-cancel-reply":t.onCancelReply},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}})],1),t._v(" "),e("div",{staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:t.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(e){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"action"}},[e("ul",{staticClass:"operate-action"},[0===t.msgId?e("li",{on:{click:function(e){return t.onOperate("reply")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("回复")))])]):t._e(),t._v(" "),t.operateItem.userid==t.userId&&"text"===t.operateItem.type?e("li",{on:{click:function(e){return t.onOperate("update")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("编辑")))])]):t._e(),t._v(" "),t._l(t.operateCopys,(function(n){return e("li",{on:{click:function(e){return t.onOperate("copy",n)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(n.icon)}}),t._v(" "),e("span",[t._v(t._s(t.$L(n.label)))])])})),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("forward")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("转发")))])]),t._v(" "),t.operateItem.userid==t.userId?e("li",{on:{click:function(e){return t.onOperate("withdraw")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("撤回")))])]):t._e(),t._v(" "),"file"===t.operateItem.type?[e("li",{on:{click:function(e){return t.onOperate("view")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("查看")))])]),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("down")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("下载")))])])]:t._e(),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("tag")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L(t.operateItem.tag?"取消标注":"标注")))])]),t._v(" "),"text"===t.operateItem.type?e("li",{on:{click:function(e){return t.onOperate("newTask")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("新任务")))])]):t._e(),t._v(" "),e("li",{on:{click:function(e){return t.onOperate("todo")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L(t.operateItem.todo?"取消待办":"设待办")))])]),t._v(" "),""!==t.msgType?e("li",{on:{click:function(e){return t.onOperate("pos")}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("span",[t._v(t._s(t.$L("完整对话")))])]):t._e()],2)]),t._v(" "),e("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[e("ul",{staticClass:"operate-emoji scrollbar-hidden"},t._l(t.operateEmojis,(function(n,o){return e("li",{key:o,staticClass:"no-dark-content",domProps:{innerHTML:t._s(n)},on:{click:function(e){return t.onOperate("emoji",n)}}})})),0)])],1)],1)],1),t._v(" "),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[e("ul",{staticClass:"dialog-wrapper-paste",class:t.pasteWrapperClass},t._l(t.pasteItem,(function(n){return e("li",["image"==n.type?e("img",{attrs:{src:n.result}}):e("div",[t._v(t._s(t.$L("文件"))+": "+t._s(n.name)+" ("+t._s(t.$A.bytesToSize(n.size))+")")])])})),0)]),t._v(" "),e("Modal",{attrs:{title:t.$L("创建群组"),"mask-closable":!1},model:{value:t.createGroupShow,callback:function(e){t.createGroupShow=e},expression:"createGroupShow"}},[e("Form",{attrs:{model:t.createGroupData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("群成员")}},[e("UserInput",{attrs:{uncancelable:t.createGroupData.uncancelable,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.createGroupData.userids,callback:function(e){t.$set(t.createGroupData,"userids",e)},expression:"createGroupData.userids"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"chat_name",label:t.$L("群名称")}},[e("Input",{attrs:{placeholder:t.$L("输入群名称(选填)")},model:{value:t.createGroupData.chat_name,callback:function(e){t.$set(t.createGroupData,"chat_name",e)},expression:"createGroupData.chat_name"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.createGroupShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.createGroupLoad>0},on:{click:t.onCreateGroup}},[t._v(t._s(t.$L("创建")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("转发"),"mask-closable":!1},model:{value:t.forwardShow,callback:function(e){t.forwardShow=e},expression:"forwardShow"}},[e("Form",{ref:"forwardForm",attrs:{model:t.forwardData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"dialogids",label:t.$L("最近聊天")}},[e("Select",{staticClass:"dialog-wrapper-dialogids",attrs:{placeholder:t.$L("选择转发最近聊天"),"multiple-max":20,multiple:"",filterable:"","transfer-class-name":"dialog-wrapper-forward"},model:{value:t.forwardData.dialogids,callback:function(e){t.$set(t.forwardData,"dialogids",e)},expression:"forwardData.dialogids"}},[e("div",{staticClass:"forward-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择20个")))]),t._v(" "),t._l(t.dialogList,(function(n,o){return e("Option",{key:o,attrs:{value:n.id,"key-value":n.name,label:n.name}},[e("div",{staticClass:"forward-option"},[e("div",{staticClass:"forward-avatar"},["group"==n.type?["department"==n.group_type?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("")]):"project"==n.group_type?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==n.group_type?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:n.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{userid:n.dialog_user.userid,size:26}})],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),e("div",{staticClass:"forward-name"},[t._v(t._s(n.name))])])])}))],2)],1),t._v(" "),e("FormItem",{attrs:{prop:"userids",label:t.$L("指定成员")}},[e("UserInput",{attrs:{"multiple-max":20,placeholder:"(".concat(t.$L("或"),") ").concat(t.$L("选择转发指定成员"))},model:{value:t.forwardData.userids,callback:function(e){t.$set(t.forwardData,"userids",e)},expression:"forwardData.userids"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.forwardShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.forwardLoad},on:{click:function(e){return t.onForward("submit")}}},[t._v(t._s(t.$L("转发")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("设置待办"),"mask-closable":!1},model:{value:t.todoSettingShow,callback:function(e){t.todoSettingShow=e},expression:"todoSettingShow"}},[e("Form",{ref:"todoSettingForm",attrs:{model:t.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"type",label:t.$L("当前会话")}},[e("RadioGroup",{model:{value:t.todoSettingData.type,callback:function(e){t.$set(t.todoSettingData,"type",e)},expression:"todoSettingData.type"}},[e("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("所有成员")))]),t._v(" "),e("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("指定成员")))])],1)],1),t._v(" "),"user"===t.todoSettingData.type?e("FormItem",{attrs:{prop:"userids"}},[e("UserInput",{attrs:{"dialog-id":t.dialogId,placeholder:t.$L("选择指定成员")},model:{value:t.todoSettingData.userids,callback:function(e){t.$set(t.todoSettingData,"userids",e)},expression:"todoSettingData.userids"}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.todoSettingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.todoSettingLoad>0},on:{click:function(e){return t.onTodo("submit")}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.groupInfoShow,callback:function(e){t.groupInfoShow=e},expression:"groupInfoShow"}},[t.groupInfoShow?e("DialogGroupInfo",{attrs:{dialogId:t.dialogId},on:{"on-close":function(e){t.groupInfoShow=!1}}}):t._e()],1),t._v(" "),e("Modal",{attrs:{title:t.$L("转让群主身份"),"mask-closable":!1},model:{value:t.groupTransferShow,callback:function(e){t.groupTransferShow=e},expression:"groupTransferShow"}},[e("Form",{attrs:{model:t.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userid",label:t.$L("新的群主")}},[e("UserInput",{attrs:{disabledChoice:t.groupTransferData.disabledChoice,"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择新的群主")},model:{value:t.groupTransferData.userid,callback:function(e){t.$set(t.groupTransferData,"userid",e)},expression:"groupTransferData.userid"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.groupTransferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.groupTransferLoad>0},on:{click:function(e){return t.onDialogMenu("transferConfirm")}}},[t._v(t._s(t.$L("确定转让")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.replyListShow,callback:function(e){t.replyListShow=e},expression:"replyListShow"}},[t.replyListShow?e("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:t.dialogId,msgId:t.replyListId}},[e("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[t._v(t._s(t.$L("回复消息")))])]):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.respondShow,callback:function(e){t.respondShow=e},expression:"respondShow"}},[t.respondShow?e("DialogRespond",{attrs:{"respond-data":t.respondData},on:{"on-close":function(e){t.respondShow=!1}}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.todoViewShow,callback:function(e){t.todoViewShow=e},expression:"todoViewShow"}},[e("div",{staticClass:"dialog-wrapper drawer-list"},[e("div",{staticClass:"dialog-nav"},[e("div",{staticClass:"drawer-title"},[t._v(t._s(t.$L("待办消息")))])]),t._v(" "),e("div",{staticClass:"dialog-scroller scrollbar-overlay"},[t.todoViewMsg?e("DialogItem",{attrs:{source:t.todoViewMsg,simpleView:""},on:{"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-emoji":t.onEmoji}}):t._e(),t._v(" "),e("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:t.todoViewPosLoad},on:{click:t.onPosTodo}},[t._v(t._s(t.$L("回到原文")))])],1),t._v(" "),e("div",{staticClass:"todo-button"},[e("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:t.todoViewLoad,long:""},on:{click:t.onDoneTodo}},[t._v(t._s(t.$L("完成")))])],1)])])],1):t._e()}),[],!1,null,null,null).exports},33441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var o,i,r=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0)}},methods:{logDate:function(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("今天"):t.key},getLists:function(t){var e=this;!0===t&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then((function(n){var o=n.data;!0===t&&(e.lists=[]),o.data.some((function(t){var n=t.time,o=n.ymd+" "+n.week,i=e.lists.find((function(t){return t.key==o}));if(i){var r=i.lists.find((function(e){return e.userid==t.userid}));r?r.lists.push(t):i.lists.push({userid:t.userid,lists:[t]})}else e.lists.push({key:o,ymd:t.ymd,lists:[{userid:t.userid,lists:[t]}]})})),e.hasMorePages=o.current_page ")),r.push(t("span",{class:"change-value"},"".concat(l||"-")))):r.push(t("span",{class:"change-value"},l||"-"))}if(i.userid){var c=$A.isArray(i.userid)?i.userid:[i.userid],u=[];c.some((function(e){/\d+/.test(e)?u.push(t("UserAvatar",{props:{size:18,userid:e}})):u.push(t("span",e))})),u.length>0&&r.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},u)]))}}return t("span",{class:"log-text"},r)},operationList:function(t){var e=t.id,n=t.record,o=[];if(!$A.isJson(n))return o;if(this.taskId>0&&$A.isJson(n.flow)){var i=$A.getMiddle(n.flow.flow_item_name,"|");i&&o.push({id:e,button:"重置",content:"确定重置为【".concat(i,"】吗?")})}return o},onOperation:function(t){var e=this;$A.modalConfirm({content:t.content,loading:!0,onOk:function(){return new Promise((function(n,o){e.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then((function(t){var o=t.data,i=t.msg;n(i),e.$store.dispatch("saveTask",o),e.getLists(!0)})).catch((function(t){var e=t.msg;o(e)}))}))}})},openTask:function(t){this.$store.dispatch("openTask",t)}}};const a=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("div",{class:["project-log",0==t.taskId?"is-drawer":""]},[e("div",{staticClass:"log-title"},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("ul",{staticClass:"logs-activity"},[t._l(t.lists,(function(n){return e("li",[e("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(n)))]),t._v(" "),e("div",{staticClass:"logs-section"},[e("Timeline",t._l(n.lists,(function(n,o){return e("TimelineItem",{key:o},[e("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[n.userid?e("UserAvatar",{attrs:{userid:n.userid,size:18,showName:""}}):e("div",{staticClass:"avatar-wrapper common-avatar"},[e("EAvatar",{attrs:{size:18}},[t._v("A")]),t._v(" "),e("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("系统")))])],1)],1),t._v(" "),t._l(n.lists,(function(n){return[e("div",{staticClass:"log-summary"},[e("ProjectLogDetail",{attrs:{render:t.logDetail,item:n}}),t._v(" "),t.operationList(n).length>0?e("span",{staticClass:"log-operation"},t._l(t.operationList(n),(function(n,o){return e("Button",{key:o,attrs:{size:"small"},on:{click:function(e){return t.onOperation(n)}}},[t._v(t._s(n.button))])})),1):t._e(),t._v(" "),e("span",{staticClass:"log-time"},[t._v(t._s(n.time.ymd)+" "+t._s(n.time.segment)+" "+t._s(n.time.hi))])],1),t._v(" "),n.project_task?e("div",{staticClass:"log-task"},[e("em",{on:{click:function(e){return t.openTask(n.project_task)}}},[t._v(t._s(t.$L("关联任务"))+": "+t._s(n.project_task.name))])]):t._e()]}))],2)})),1)],1)])})),t._v(" "),t.loadIng>0&&t.showLoad?e("li",{staticClass:"logs-loading"},[e("Loading")],1):t.hasMorePages?e("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("加载更多")))]):0==t.totalNum?e("li",{staticClass:"logs-none",on:{click:function(e){return t.getLists(!0)}}},[t._v(t._s(t.$L("没有任何动态")))]):t._e()],2)])}),[],!1,null,null,null).exports},19102:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var o=n(20629);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function r(t){for(var e=1;e{"use strict";n.d(e,{Z:()=>s});function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e{"use strict";n.r(e),n.d(e,{default:()=>lt});var o=n(20629),i=n(9980),r=n.n(i),a=n(58748),s=n(80641),l=n(42238);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e0?"子任务":"任务"}}),watch:{active:function(t){t||this.$emit("on-close")},mouseEnter:function(){this.chackClose()},onFocus:function(){this.chackClose()}},methods:{getData:function(){return this.parentId>0?{task_id:this.parentId,name:this.addData.name}:(this.addData.project_id=this.projectId||this.$store.state.projectId,this.addData.column_id=this.columnId||"",this.addData.owner=[this.userId],this.addData.top=this.addTop?1:0,$A.cloneJSON(this.addData))},openAdd:function(){var t=this;this.active=!0,this.defaultPriority(),this.$nextTick((function(){t.$refs.input.focus()}))},chackClose:function(){this.mouseEnter||this.onFocus||this.addData.name||(this.active=!1)},onPriority:function(){this.$emit("on-priority",this.getData()),this.active=!1},onKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},onAdd:function(){var t=this;if(this.addData.name){this.loadIng++;var e=this.parentId>0?"taskAddSub":"taskAdd";this.$store.dispatch(e,this.getData()).then((function(e){var n=e.msg;$A.messageSuccess(n),t.loadIng--,t.active=!1,t.addData={name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""}})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--}))}else $A.messageWarning("请输入任务描述")},taskPriorityContent:function(t){var e=$A.runNum(t.days);return e<=0?t.name+" ("+this.$L("无时间限制")+")":t.name+" ("+e+this.$L("天")+")"},choosePriority:function(t){var e=this;if($A.runNum(t.days)>0){var n=new Date,o=new Date((new Date).setDate(n.getDate()+$A.runNum(t.days)));this.$set(this.addData,"times",$A.date2string([n,o]))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color),this.$nextTick((function(){e.$refs.input.focus()}))},defaultPriority:function(){0!==this.taskPriority.length&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))}}};var h=n(51900);const p=(0,h.Z)(f,(function(){var t=this,e=t._self._c;return t.rowMode?e("Row",{staticClass:"task-add-row"},[e("Col",{class:["row-add",t.active?"active":""],attrs:{span:"12"}},[e("div",{staticClass:"add-input",on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建"),enterkeyhint:"done"},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),0==t.parentId?e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,(function(n,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.taskPriorityContent(n)}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(t.addData.p_name==n.name?"":"")},on:{click:function(e){return t.choosePriority(n)}}})]):t._e()],1)})),0),t._v(" "),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1):t._e()],1),t._v(" "),e("div",{staticClass:"add-btn",on:{click:t.openAdd}},[e("Icon",{staticClass:"add-icon",attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1)]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1):e("div",{class:["task-add-simple",t.active?"active":""],on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[e("Input",{ref:"input",attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建"),enterkeyhint:"done"},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),e("div",{staticClass:"add-placeholder",on:{click:t.openAdd}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1),t._v(" "),e("div",{staticClass:"priority"},[e("ul",t._l(t.taskPriority,(function(n,o){return e("li",{key:o},[t.active?e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.taskPriorityContent(n)}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(t.addData.p_name==n.name?"":"")},on:{click:function(e){return t.choosePriority(n)}}})]):t._e()],1)})),0),t._v(" "),e("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)}),[],!1,null,null,null).exports;var m=n(19102);function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function g(t){for(var e=1;e0&&!0!==n.sub_top||0===n.parent_id&&t.fastAddTask?e("Icon",{class:["sub-icon",t.taskOpen[n.id]?"active":""],attrs:{type:"ios-arrow-forward"},on:{click:function(e){return t.getSublist(n)}}}):t._e(),t._v(" "),e("TaskMenu",{ref:"taskMenu_".concat(n.id),refInFor:!0,attrs:{task:n}}),t._v(" "),e("div",{staticClass:"item-title",on:{click:function(e){return t.openTask(n)}}},[n.flow_item_name?e("span",{class:n.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(e,n)}}},[t._v(t._s(n.flow_item_name))]):t._e(),t._v(" "),!0===n.sub_top?e("span",[t._v(t._s(t.$L("子任务")))]):t._e(),t._v(" "),n.sub_my&&n.sub_my.length>0?e("span",[t._v("+"+t._s(n.sub_my.length))]):t._e(),t._v(" "),t._v("\n "+t._s(n.name)+"\n ")]),t._v(" "),e("div",{staticClass:"item-icons",on:{click:function(e){return t.openTask(n)}}},[n.desc?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),n.file_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("em",[t._v(t._s(n.file_num))])]):t._e(),t._v(" "),n.msg_num>0?e("div",{staticClass:"item-icon"},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("em",[t._v(t._s(n.msg_num))])]):t._e(),t._v(" "),n.sub_num>0?e("div",{staticClass:"item-icon",on:{click:function(e){return e.stopPropagation(),t.getSublist(n)}}},[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),e("em",[t._v(t._s(n.sub_complete)+"/"+t._s(n.sub_num))])]):t._e()])],1),t._v(" "),e("Col",{staticClass:"row-column",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===n.sub_top},on:{command:function(e){return t.dropTask(n,e)}}},[e("div",{staticClass:"task-column"},[t._v(t._s(t.columnName(n.column_id)))]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.columnList(n.project_id),(function(n){return e("EDropdownItem",{key:n.id,attrs:{command:"column::"+n.id}},[t._v("\n "+t._s(n.name)+"\n ")])})),1)],1)],1),t._v(" "),e("Col",{staticClass:"row-priority",attrs:{span:"3"}},[e("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===n.sub_top},on:{command:function(e){return t.dropTask(n,e)}}},[e("TaskPriority",{attrs:{backgroundColor:n.p_color}},[t._v(t._s(n.p_name))]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,(function(n,o){return e("EDropdownItem",{key:o,attrs:{command:"priority::"+o}},[e("i",{staticClass:"taskfont",style:{color:n.color},domProps:{innerHTML:t._s(n.p_name==n.name?"":"")}}),t._v("\n "+t._s(n.name)+"\n ")])})),1)],1)],1),t._v(" "),e("Col",{staticClass:"row-user",attrs:{span:"3"}},[e("ul",{on:{click:function(e){return t.openTask(n)}}},[t._l(t.ownerUser(n.task_user),(function(o,i){return i<3?e("li",{key:i},[e("UserAvatar",{attrs:{userid:o.userid,size:"32",borderWitdh:2,borderColor:n.color,showName:1===t.ownerUser(n.task_user).length}})],1):t._e()})),t._v(" "),0===t.ownerUser(n.task_user).length?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return e.stopPropagation(),t.openTask(n,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2)]),t._v(" "),e("Col",{staticClass:"row-time",attrs:{span:"3"}},[!n.complete_at&&n.end_at?e("ETooltip",{class:["task-time",n.today?"today":"",n.overdue?"overdue":""],attrs:{disabled:t.windowSmall,"open-delay":600,content:n.end_at}},[e("div",{on:{click:function(e){return t.openTask(n)}}},[t._v(t._s(t.expiresFormat(n.end_at)))])]):t.showCompleteAt&&n.complete_at?e("div",{attrs:{title:n.complete_at}},[t._v(t._s(t.completeAtFormat(n.complete_at)))]):t._e()],1)],1),t._v(" "),!0===t.taskOpen[n.id]?e("TaskRow",{attrs:{list:t.subTask(n.id),"parent-id":n.id,"fast-add-task":0===n.parent_id&&t.fastAddTask,"open-key":t.openKey},on:{command:t.dropTask}}):t._e()],1)})),t._v(" "),t.fastAddTask||t.parentId>0?e("TaskAddSimple",{attrs:{"parent-id":t.parentId,"row-mode":""},on:{"on-priority":t.onPriority}}):t._e()],2)}),[],!1,null,null,null).exports;function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const O={name:"TaskArchived",props:{projectId:{type:Number,default:0}},data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.id)])}},{title:this.$L("任务名称"),key:"name",minWidth:200,render:function(e,n){var o=n.row;return e("AutoTip",{on:{"on-click":function(){t.$store.dispatch("openTask",o)}}},o.name)}},{title:this.$L("完成时间"),key:"complete_at",width:168,render:function(e,n){var o=n.row;return e("div",{style:{color:o.complete_at?"":"#f00"}},o.complete_at||t.$L("未完成"))}},{title:this.$L("归档时间"),key:"archived_at",width:168},{title:this.$L("归档人员"),key:"archived_userid",minWidth:100,render:function(e,n){var o=n.row;return o.archived_userid?e("UserAvatar",{props:{userid:o.archived_userid,size:24,showName:!0}}):e("Tag",t.$L("系统自动"))}},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){if(t.cacheTasks.find((function(t){return t.id==n.row.id&&!t.archived_at})))return e("div",{style:{color:"#888"}},t.$L("已还原"));var o=[e("span",{style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{click:function(){t.$store.dispatch("openTask",n.row)}}},t.$L("查看")),e("Poptip",{props:{title:t.$L("你确定要还原归档吗?"),confirm:!0,transfer:!0,placement:"left"},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":function(){t.recovery(n.row)}}},t.$L("还原")),e("Poptip",{props:{title:t.$L("你确定要删除任务吗?"),confirm:!0,transfer:!0,placement:"left"},style:{marginLeft:"6px",fontSize:"13px",cursor:"pointer",color:"#f00"},on:{"on-ok":function(){t.delete(n.row)}}},t.$L("删除"))];return e("TableAction",{props:{column:n.column}},o)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},computed:function(t){for(var e=1;e0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("任务名"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var C=n(33441),S=n(81034);const j={name:"ProjectWorkflow",components:{UserInput:l.Z,Draggable:r()},props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,list:[],openIndex:"",userShow:!1,userData:{}}},mounted:function(){},watch:{projectId:{handler:function(t){t&&this.getData()},immediate:!0}},methods:{getData:function(){var t=this;this.loadIng++,this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then((function(e){var n=e.data;t.list=n.map((function(t){return t.project_flow_bak=JSON.stringify(t.project_flow_item),t})),t.openIndex=1===t.list.length?"index_"+t.list[0].id:"",t.$nextTick(t.syncScroller)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--}))},syncScroller:function(){var t=this;this.list.some((function(e){t.$refs["overlay_".concat(e.id)]&&t.$refs["overlay_".concat(e.id)].some((function(n){Object.keys(n.attributes).includes("sync-scroller")||(n.setAttribute("sync-scroller",!0),n.addEventListener("scroll",(function(o){var i=o.target,r=i.scrollTop,a=i.scrollLeft;t.$nextTick((function(){t.$refs["overlay_".concat(e.id)].some((function(t){t!=n&&t.scrollTo(a,r)}))}))})))}))}))},contrast:function(t,e){return JSON.stringify(t)!=e},existDiff:function(){var t=this;return!!this.list.find((function(e){return t.contrast(e.project_flow_item,e.project_flow_bak)}))},onCreate:function(){var t=-1*$A.randNum(1e3,1e4);this.list.push({id:t,name:"Default",project_flow_item:[{id:-10,name:"待处理",status:"start",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-11,name:"进行中",status:"progress",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-12,name:"待测试",status:"test",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-13,name:"已完成",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0},{id:-14,name:"已取消",status:"end",turns:[-10,-11,-12,-13,-14],userids:[],usertype:"add",userlimit:0}]}),this.openIndex="index_"+t,this.$nextTick(this.syncScroller)},onDelete:function(t){var e=this;$A.modalConfirm({title:"删除工作流",content:"你确定要删除工作流吗?",loading:!0,onOk:function(){if(t.id>0)return new Promise((function(n,o){e.loadIng++,e.$store.dispatch("call",{url:"project/flow/delete",data:{project_id:e.projectId}}).then((function(o){var i=o.msg;n(i);var r=e.list.findIndex((function(e){return e.id==t.id}));r>-1&&e.list.splice(r,1)})).catch((function(t){var e=t.msg;o(e)})).finally((function(t){e.loadIng--}))}));var n=e.list.findIndex((function(e){return e.id==t.id}));n>-1&&e.list.splice(n,1)}})},onMore:function(t,e){switch(t){case"user":this.$set(this.userData,"id",e.id),this.$set(this.userData,"name",e.name),this.$set(this.userData,"userids",e.userids),this.$set(this.userData,"usertype",e.usertype),this.$set(this.userData,"userlimit",e.userlimit),this.userShow=!0;break;case"name":this.onName(e);break;case"remove":this.onRemove(e)}},onUser:function(){var t=this;this.userShow=!1,this.list.some((function(e){var n=e.project_flow_item.find((function(e){return e.id==t.userData.id}));n&&(t.$set(n,"userids",t.userData.userids),t.$set(n,"usertype",t.userData.usertype),t.$set(n,"userlimit",t.userData.userlimit))}))},onName:function(t){var e=this;$A.modalInput({value:t.name,title:"修改名称",placeholder:"请输入流程名称",onOk:function(n){if(!n)return"请输入流程名称";e.$set(t,"name",n)}})},onRemove:function(t){this.list.some((function(e){var n=e.project_flow_item.findIndex((function(e){return e.id==t.id}));n>-1&&e.project_flow_item.splice(n,1)}))},onTurns:function(t){this.$set(t,"turns",t.turns.sort())},onAdd:function(t){$A.modalInput({title:"添加状态",placeholder:"请输入状态名称",onOk:function(e){if(!e)return"请输入状态名称";var n=-1*$A.randNum(1e5,999999),o=t.project_flow_item.map((function(t){return t.id}));t.project_flow_item.push({id:n,name:e,status:"end",turns:o,userids:[],usertype:"add",userlimit:0}),t.project_flow_item.some((function(t){t.turns.push(n)}))}})},onReduction:function(t){this.$set(t,"project_flow_item",JSON.parse(t.project_flow_bak))},onSave:function(t){var e=this,n=0;t.project_flow_item.some((function(t){t.sort=n++})),this.loadIng++,this.$store.dispatch("call",{url:"project/flow/save",data:{project_id:this.projectId,flows:t.project_flow_item},method:"post"}).then((function(n){var o=n.data,i=n.msg;$.messageSuccess(i),o.project_flow_bak=JSON.stringify(o.project_flow_item);var r=e.list.findIndex((function(e){return e.id==t.id}));r>-1?e.list.splice(r,1,o):e.list.push(o),e.openIndex="index_"+o.id,e.$nextTick(e.syncScroller)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.loadIng--}))},saveAll:function(){var t=this;this.list.some((function(e){t.contrast(e.project_flow_item,e.project_flow_bak)&&t.onSave(e)}))}}};const T=(0,h.Z)(j,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-workflow"},[e("div",{staticClass:"workflow-title"},[t._v("\n "+t._s(t.$L("工作流设置"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getData}})],1)]),t._v(" "),t.list.length>0?e("div",{staticClass:"workflow-content"},[e("Collapse",{attrs:{accordion:""},model:{value:t.openIndex,callback:function(e){t.openIndex=e},expression:"openIndex"}},t._l(t.list,(function(n){return e("Panel",{key:n.id,attrs:{name:"index_"+n.id}},[e("div",{staticClass:"workflow-item"},[e("div",{staticClass:"workflow-name"},[t._v(t._s(n.name))]),t._v(" "),e("div",{staticClass:"workflow-status"},t._l(n.project_flow_item,(function(n){return e("div",{class:n.status},[t._v(t._s(n.name))])})),0),t._v(" "),e("div",{staticClass:"workflow-save",on:{click:function(t){t.stopPropagation()}}},[t.contrast(n.project_flow_item,n.project_flow_bak)?[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(e){return t.onSave(n)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),n.id>0?e("Button",{attrs:{disabled:t.loadIng>0,type:"primary",ghost:""},on:{click:function(e){return t.onReduction(n,e)}}},[t._v(t._s(t.$L("还原")))]):t._e()]:t._e(),t._v(" "),e("Button",{attrs:{disabled:t.loadIng>0,type:"error",ghost:""},on:{click:function(e){return t.onDelete(n)}}},[t._v(t._s(t.$L("删除")))])],2)]),t._v(" "),e("div",{staticClass:"taskflow-config",attrs:{slot:"content"},slot:"content"},[e("div",{staticClass:"taskflow-config-table"},[e("div",{staticClass:"taskflow-config-table-left-container"},[e("div",{staticClass:"taskflow-config-table-column-header left-header"},[t._v(t._s(t.$L("配置项")))]),t._v(" "),e("div",{ref:"overlay_".concat(n.id),refInFor:!0,staticClass:"taskflow-config-table-column-body scrollbar-overlay"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("设置状态为")))]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("开始状态")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("新建任务默认状态")))])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("进行中")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("可设置多个状态为进行中")))])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("验收/测试")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("只能设置单个状态为验收/测试")))])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block-item"},[e("div",[e("div",{staticClass:"title"},[t._v(t._s(t.$L("结束状态")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("该状态下任务自动标记完成")))])])])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-block hr"},[e("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("可流转到")))]),t._v(" "),t._l(n.project_flow_item,(function(n){return e("div",{staticClass:"taskflow-config-table-block-item"},[e("span",{staticClass:"transform-status-name"},[t._v(t._s(n.name))])])}))],2)])]),t._v(" "),e("div",{staticClass:"taskflow-config-table-right-container"},[e("Draggable",{staticClass:"taskflow-config-table-list-wrapper",attrs:{list:n.project_flow_item,animation:150,disabled:t.windowSmall,tag:"div",draggable:".column-border"},on:{sort:function(t){}}},[t._l(n.project_flow_item,(function(o){return e("div",{staticClass:"taskflow-config-table-status-column column-border",class:o.status},[e("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[e("div",{staticClass:"status-label-with-menu",class:o.status},[e("div",{staticClass:"name"},[t._v(t._s(t.$L(o.name)))]),t._v(" "),e("EDropdown",{staticClass:"more",class:{opacity:o.userids.length>0},attrs:{trigger:"click"},on:{command:function(e){return t.onMore(e,o)}}},[e("div",{staticClass:"more-icon"},[o.userids.length>1?e("EAvatar",{attrs:{size:20}},[t._v(t._s(o.userids.length))]):o.userids.length>0?e("UserAvatar",{attrs:{userid:o.userids[0],size:20,tooltipDisabled:""}}):e("Icon",{attrs:{type:"ios-more"}})],1),t._v(" "),e("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[o.userids.length>0?e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"users"},t._l(o.userids,(function(t,n){return e("UserAvatar",{key:n,attrs:{userid:t,size:28,borderWitdh:1,showName:1===o.userids.length,tooltipDisabled:""}})})),1)]):t._e(),t._v(" "),e("EDropdownItem",{attrs:{command:"user"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-person"}}),t._v("\n "+t._s(t.$L("状态负责人"))+"\n ")],1)]),t._v(" "),e("EDropdownItem",{attrs:{command:"name"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改名称"))+"\n ")],1)]),t._v(" "),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item delete"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],1)],1)],1)]),t._v(" "),e("div",{ref:"overlay_".concat(n.id),refInFor:!0,staticClass:"taskflow-config-table-column-body scrollbar-overlay"},[e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),e("RadioGroup",{model:{value:o.status,callback:function(e){t.$set(o,"status",e)},expression:"item.status"}},[e("Radio",{attrs:{label:"start"}},[e("span")]),t._v(" "),e("Radio",{attrs:{label:"progress"}},[e("span")]),t._v(" "),e("Radio",{attrs:{label:"test"}},[e("span")]),t._v(" "),e("Radio",{attrs:{label:"end"}},[e("span")])],1)],1),t._v(" "),e("div",{staticClass:"taskflow-config-table-block"},[e("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),e("CheckboxGroup",{on:{"on-change":function(e){return t.onTurns(o)}},model:{value:o.turns,callback:function(e){t.$set(o,"turns",e)},expression:"item.turns"}},t._l(n.project_flow_item,(function(t){return e("Checkbox",{key:t.id,attrs:{label:t.id,disabled:t.id==o.id}},[e("span")])})),1)],1)])])})),t._v(" "),e("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(e){return t.onAdd(n)}}},[t._v(t._s(t.$L("添加状态")))])],2)],1)])])])})),1)],1):0==t.loadIng?e("div",{staticClass:"workflow-no"},[t._v("\n "+t._s(t.$L("当前项目还没有创建工作流"))+"\n "),e("Button",{attrs:{type:"primary"},on:{click:t.onCreate}},[t._v(t._s(t.$L("创建工作流")))])],1):t._e(),t._v(" "),e("Modal",{attrs:{title:"".concat(t.$L("状态负责人")," (").concat(t.userData.name,")"),"mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[e("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("状态负责人")}},[e("UserInput",{attrs:{"project-id":t.projectId,"multiple-max":5,placeholder:t.$L("选择状态负责人")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"usertype",label:t.$L("流转模式")}},[e("RadioGroup",{model:{value:t.userData.usertype,callback:function(e){t.$set(t.userData,"usertype",e)},expression:"userData.usertype"}},[e("Radio",{attrs:{label:"add"}},[t._v(t._s(t.$L("添加模式")))]),t._v(" "),e("Radio",{attrs:{label:"replace"}},[t._v(t._s(t.$L("流转模式")))]),t._v(" "),e("Radio",{attrs:{label:"merge"}},[t._v(t._s(t.$L("剔除模式")))])],1),t._v(" "),"replace"==t.userData.usertype?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,"】时改变任务负责人为状态负责人,原本的任务负责人移至协助人员。"))))]):"merge"==t.userData.usertype?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,"】时改变任务负责人为状态负责人(并保留操作状态的人员),原本的任务负责人移至协助人员。"))))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,"】时添加状态负责人至任务负责人。"))))])],1),t._v(" "),e("FormItem",{attrs:{prop:"userlimit",label:t.$L("限制负责人")}},[e("iSwitch",{attrs:{"true-value":1,"false-value":0},model:{value:t.userData.userlimit,callback:function(e){t.$set(t.userData,"userlimit",e)},expression:"userData.userlimit"}}),t._v(" "),1===t.userData.userlimit?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,'】时,仅"状态负责人"和"项目管理员"可以修改状态。'))))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到【".concat(t.userData.name,'】时,"任务负责人"和"项目管理员"可以修改状态。'))))])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary"},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1)],1)}),[],!1,null,null,null).exports;function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const A={name:"TaskDeleted",props:{projectId:{type:Number,default:0}},data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"id",width:80,render:function(t,e){var n=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",n.id)])}},{title:this.$L("任务名称"),key:"name",minWidth:200,render:function(t,e){return t("AutoTip",e.row.name)}},{title:this.$L("创建时间"),key:"created_at",width:168},{title:this.$L("删除时间"),key:"deleted_at",width:168},{title:this.$L("删除人员"),key:"deleted_userid",minWidth:100,render:function(t,e){var n=e.row;return n.deleted_userid?t("UserAvatar",{props:{userid:n.deleted_userid,size:24,showName:!0}}):t("span","-")}},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){var o=[e("Poptip",{props:{title:t.$L("你确定要还原删除吗?"),confirm:!0,transfer:!0,placement:"left"},style:{fontSize:"13px",cursor:"pointer",color:"#84C56A"},on:{"on-ok":function(){t.recovery(n.row)}}},t.$L("还原"))];return e("TableAction",{props:{column:n.column}},o)}}],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},computed:function(t){for(var e=1;e0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("任务名"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}const P={name:"GanttView",props:{lists:{type:Array},menuWidth:{type:Number,default:300},itemWidth:{type:Number,default:100}},data:function(){return{mouseType:"",mouseWidth:0,mouseScaleWidth:0,dateWidth:100,ganttWidth:0,mouseItem:null,mouseBak:{},dateMove:null}},mounted:function(){this.dateWidth=this.itemWidth,this.$refs.ganttRight.addEventListener("mousewheel",this.handleScroll,!1),document.addEventListener("mousemove",this.itemMouseMove),document.addEventListener("mouseup",this.itemMouseUp),window.addEventListener("resize",this.handleResize,!1),this.handleResize()},beforeDestroy:function(){this.$refs.ganttRight.removeEventListener("mousewheel",this.handleScroll,!1),document.removeEventListener("mousemove",this.itemMouseMove),document.removeEventListener("mouseup",this.itemMouseUp),window.removeEventListener("resize",this.handleResize,!1)},watch:{itemWidth:function(t){this.dateWidth=t}},computed:{monthNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e/30)+2},monthStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var o=0==t?0:t/e,i=new Date,r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),a=new Date(r.getTime()+864e5*o),s=new Date(a.getFullYear(),a.getMonth()+1,0,23,59,59),l=e*((s-a)/1e3/60/60/24);return n>0&&(l=(s=new Date(a.getFullYear(),a.getMonth()+1+n,0)).getDate()*e),{width:l+"px"}}},monthFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var o=0==t?0:t/e,i=new Date,r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),a=new Date(r.getTime()+864e5*o);return n>0&&(a=new Date(a.getFullYear(),a.getMonth()+1+n,0)),$A.formatDate("Y-m",a)}},dateNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e)+2},dateStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var o={},i=0==t?0:t/e,r=Math.floor(i)+n;i==Math.floor(i)&&r--;var a=0==t?n-1:r,s=new Date((new Date).getTime()+864e5*a);-1!==[0,6].indexOf(s.getDay())&&(o.backgroundColor="#f9fafb");var l=e;return 0==n&&(l=Math.abs((t%l-l)%l)),o.width=l+"px",o}},dateFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n,o){var i=0==t?0:t/e,r=Math.floor(i)+n;i==Math.floor(i)&&r--;var a=0==t?n-1:r,s=new Date((new Date).getTime()+864e5*a);return"day"==o?s.getDate():"week"==o?this.$L("星期".concat("日一二三四五六".charAt(s.getDay()))):s}},itemStyle:function(){var t=this.mouseWidth,e=this.dateWidth,n=this.ganttWidth;return function(o){var i=o.time,r=i.start,a=i.end,s=o.style,l=o.moveX,c=o.moveW,u=new Date,d=new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0).getTime(),f=(r-d)/1e3/60/60/24,h=e*f+-1*t,p=e*((a-d)/1e3/60/60/24-f);"number"==typeof l&&(h+=l),"number"==typeof c&&(p+=c);var m={left:Math.min(Math.max(h,-1.2*p),1.2*n).toFixed(2)+"px",width:p.toFixed(2)+"px"};return h<0&&Math.abs(h)n&&he.scrollHeight-e.clientHeight&&(n=e.scrollHeight-e.clientHeight),e.scrollTop!=n&&(this.mouseType="timeline",e.scrollTop=n)}0!=t.deltaX&&(this.mouseWidth+=t.deltaX,this.mouseScaleWidth+=t.deltaX*(100/this.dateWidth))},handleResize:function(){this.ganttWidth=this.$refs.ganttTimeline.clientWidth},dateMouseDown:function(t){t.preventDefault(),this.mouseItem=null,this.dateMove={clientX:t.clientX}},itemMouseDown:function(t,e){t.preventDefault();var n="moveX";"timeline-resizer"==t.target.className&&(n="moveW"),"number"!=typeof e[n]&&this.$set(e,n,0),this.mouseBak={type:n,clientX:t.clientX,value:e[n]},this.mouseItem=e,this.dateMove=null},itemMouseMove:function(t){if(null!=this.mouseItem){t.preventDefault();var e=this.mouseBak.value+(t.clientX-this.mouseBak.clientX);if("moveW"===this.mouseBak.type){var n=864e5/this.dateWidth,o=this.mouseItem.time,i=o.start;if(o.end+e*n-i<=0)return}this.$set(this.mouseItem,this.mouseBak.type,e)}else if(null!=this.dateMove){t.preventDefault();var r=5*(this.dateMove.clientX-t.clientX);this.dateMove.clientX=t.clientX,this.mouseWidth+=r,this.mouseScaleWidth+=r*(100/this.dateWidth)}},itemMouseUp:function(t){if(null!=this.mouseItem){var e=this.mouseItem.time,n=e.start,o=e.end,i=!1,r=864e5/this.dateWidth;if("number"==typeof this.mouseItem.moveX&&0!=this.mouseItem.moveX){var a=this.mouseItem.moveX*r;this.$set(this.mouseItem.time,"start",n+a),this.$set(this.mouseItem.time,"end",o+a),this.$set(this.mouseItem,"moveX",0),i=!0}if("number"==typeof this.mouseItem.moveW&&0!=this.mouseItem.moveW){var s=this.mouseItem.moveW*r;this.$set(this.mouseItem.time,"end",o+s),this.$set(this.mouseItem,"moveW",0),i=!0}i?this.$emit("on-change",this.mouseItem):"timeline-title"==t.target.className&&this.clickItem(this.mouseItem),this.mouseItem=null}else null!=this.dateMove&&(this.dateMove=null)},scrollPosition:function(t){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),o=864e5/this.dateWidth,i=(this.lists[t].time.start-n)/o-this.dateWidth-this.mouseWidth;this.mouseWidth+=i,this.mouseScaleWidth+=i*(100/this.dateWidth)},clickItem:function(t){this.$emit("on-click",t)}}};function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function M(t){for(var e=1;e46?e("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(o,"week")))]):t._e()])])})),0),t._v(" "),e("ul",{ref:"ganttTimeline",staticClass:"gantt-timeline",on:{scroll:t.timelineScrollListener,mouseenter:function(e){t.mouseType="timeline"}}},t._l(t.lists,(function(n,o){return e("li",{key:o},[e("div",{staticClass:"timeline-item",style:t.itemStyle(n),on:{mousedown:function(e){return t.itemMouseDown(e,n)}}},[e("div",{staticClass:"timeline-title",attrs:{title:n.label}},[t._v(t._s(n.label))]),t._v(" "),e("div",{staticClass:"timeline-resizer"})])])})),0)])])])}),[],!1,null,null,null).exports},props:{projectColumn:{default:[]},flowInfo:{default:{}}},data:function(){return{lists:[],filtrProjectId:0,editColumns:[{title:this.$L("任务名称"),key:"label",minWidth:150,ellipsis:!0},{title:this.$L("原计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return!0===n.notime?t("span","-"):t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.end/1e3)))])}},{title:this.$L("新计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)))])}}],editData:[],editLoad:0,editShowInfo:!1}},mounted:function(){this.initData()},computed:M(M(M({},(0,o.rn)(["taskPriority"])),(0,o.Se)(["projectData"])),{},{menuWidth:function(){return this.windowWidth<1440?180:260},dropStyle:function(){return this.windowWidth<1440?{left:"142px"}:{}},completedTask:function(){return this.projectData.cacheParameter.completedTask}}),watch:{projectColumn:{handler:function(){this.initData()},deep:!0},flowInfo:{handler:function(){this.initData()},deep:!0},completedTask:function(){this.initData()}},methods:{initData:function(){this.lists=[],this.projectColumn&&this.projectColumn.some(this.checkAdd)},filtrLength:function(t){var e=this;return t.filter((function(t){return!(t.complete_at&&!e.completedTask)&&!(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)})).length},checkAdd:function(t){var e=this;this.filtrProjectId>0&&t.id!=this.filtrProjectId||t.tasks&&t.tasks.some((function(t){var n=!t.start_at||!t.end_at,o=e.getTimeObj(t),i=o.start,r=o.end;if(t.complete_at&&!e.completedTask)return!1;if(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)return!1;var a="#058ce4";e.taskPriority.some((function(e){if(e.priority===t.p_level)return a=e.color,!0}));var s={start:i,end:r},l=$A.cloneJSON(s),c=e.editData.find((function(e){return e.id==t.id}));c&&(s=$A.cloneJSON(c.newTime)),e.lists.push({id:t.id,label:t.name,complete:t.complete_at,overdue:t.overdue,time:s,notime:n,baktime:l,style:{background:a}})}))},onChange:function(t){var e=t.time,n=t.baktime;if(Math.abs(n.end-e.end)>1e3||Math.abs(n.start-e.start)>1e3){var o=this.editData.find((function(e){return e.id==t.id}));o?o.newTime=e:this.editData.push({id:t.id,label:t.label,notime:t.notime,baktime:t.baktime,newTime:e})}},onClick:function(t){this.$store.dispatch("openTask",t)},editSubmit:function(t){var e=this;this.editData&&this.editData.forEach((function(n){var o=e.lists.find((function(t){return t.id==n.id}));if(t){e.editLoad++;var i=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3)),r=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)),a={task_id:n.id,times:[i,r]};e.$store.dispatch("taskUpdate",a).then((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.messageSuccess(n),o&&e.$set(o,"baktime",$A.cloneJSON(o.time))})).catch((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.modalError(n),o&&e.$set(o,"time",$A.cloneJSON(o.baktime))}))}else o&&e.$set(o,"time",$A.cloneJSON(o.baktime))})),this.editData=[]},getRawTime:function(t){var e=this.lists.find((function(e){return e.id==t}));return e?this.getTimeObj(e):null},getTimeObj:function(t){var e=$A.Time(t.start_at)||$A.Time(t.created_at),n=$A.Time(t.end_at)||$A.Time(t.created_at)+86400;return n==e&&(n=Math.round(new Date($A.formatDate("Y-m-d 23:59:59",n)).getTime()/1e3)),n=Math.max(n,e+60),{start:e*=1e3,end:n*=1e3}},onSwitchColumn:function(t){this.filtrProjectId=$A.runNum(t),this.initData()}}};const B=(0,h.Z)(R,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-gstc-gantt"},[e("GanttView",{attrs:{lists:t.lists,menuWidth:t.menuWidth,itemWidth:80},on:{"on-change":t.onChange,"on-click":t.onClick}}),t._v(" "),e("Dropdown",{staticClass:"project-gstc-dropdown-filtr",style:t.dropStyle,attrs:{trigger:"click"},on:{"on-click":t.onSwitchColumn}},[e("Icon",{staticClass:"project-gstc-dropdown-icon",class:{filtr:t.filtrProjectId>0},attrs:{type:"md-funnel"}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{class:{"dropdown-active":0==t.filtrProjectId},attrs:{name:0}},[t._v(t._s(t.$L("全部")))]),t._v(" "),t._l(t.projectColumn,(function(n,o){return e("DropdownItem",{key:o,class:{"dropdown-active":t.filtrProjectId==n.id},attrs:{name:n.id}},[t._v("\n "+t._s(n.name)+"\n "),n.tasks?e("span",[t._v("("+t._s(t.filtrLength(n.tasks))+")")]):t._e()])}))],2)],1),t._v(" "),e("div",{staticClass:"project-gstc-edit",class:{info:t.editShowInfo,visible:t.editData&&t.editData.length>0}},[e("div",{staticClass:"project-gstc-edit-info"},[e("Table",{attrs:{size:"small","max-height":"600",columns:t.editColumns,data:t.editData}}),t._v(" "),e("div",{staticClass:"project-gstc-edit-btns"},[e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),e("Icon",{staticClass:"zoom",attrs:{type:"md-arrow-dropright"},on:{click:function(e){t.editShowInfo=!1}}})],1)],1),t._v(" "),e("div",{staticClass:"project-gstc-edit-small"},[e("div",{staticClass:"project-gstc-edit-text",on:{click:function(e){t.editShowInfo=!0}}},[t._v(t._s(t.$L("未保存计划时间"))+": "),t.editData?e("span",[t._v(t._s(t.editData.length))]):t._e()]),t._v(" "),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))])],1)])],1)}),[],!1,null,null,null).exports;function F(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0&&(n=n.filter((function(t){return t.flow_item_id===e.value}))),t&&(n=n.filter((function(e){var n=e.name,o=e.desc;return $A.strExists("".concat(n," ").concat(o),t)}))),n}},projectUser:function(){var t=this.projectData,e=this.windowWidth;if(!t.project_user)return[];var n=e>1200?8:3,o=t.project_user.filter((function(e){return e.userid!=t.owner_userid}));if(o.length<=n)return o;var i=o.slice(0,n-1);return i.push({userid:-1}),i.push(o[o.length-1]),i},allTask:function(){var t=this.cacheTasks,e=this.projectId;return t.filter((function(t){return!t.archived_at&&t.project_id==e}))},columnList:function(){var t=this,e=this.projectId,n=this.cacheColumns,o=this.allTask,i=n.filter((function(t){return t.project_id==e})).sort((function(t,e){return t.sort!=e.sort?t.sort-e.sort:t.id-e.id}));return i.forEach((function(e){e.tasks=t.transforTasks(o.filter((function(t){return t.column_id==e.id}))).sort((function(t,e){return t.complete_at||e.complete_at?$A.Date(t.complete_at)-$A.Date(e.complete_at):t.sort!=e.sort?t.sort-e.sort:t.id-e.id}))})),i},myList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,o=this.sortField,i=this.sortType,r=e.filter((function(e){return t.myFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.myFilter(e,!1)}));if(s.length>0)(a=r=$A.cloneJSON(r)).push.apply(a,F(s))}return r.sort((function(t,e){if("asc"==i){var n=[e,t];t=n[0],e=n[1]}return"level"==o?t.p_level-e.p_level:"end_at"==o?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},helpList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,o=this.sortField,i=this.sortType,r=e.filter((function(e){return t.helpFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.helpFilter(e,!1)}));if(s.length>0)(a=r=$A.cloneJSON(r)).push.apply(a,F(s))}return r.sort((function(t,e){if("asc"==i){var n=[e,t];t=n[0],e=n[1]}return"level"==o?t.p_level-e.p_level:"end_at"==o?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},unList:function(){var t=this.allTask,e=this.searchText,n=this.sortField,o=this.sortType,i=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(i.value>0&&t.flow_item_id!==i.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&!t.complete_at))})).sort((function(t,e){if("asc"==o){var i=[e,t];t=i[0],e=i[1]}return"level"==n?t.p_level-e.p_level:"end_at"==n?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},completedList:function(){var t=this.allTask,e=this.searchText,n=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(n.value>0&&t.flow_item_id!==n.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&t.complete_at))})).sort((function(t,e){var n=$A.Date(t.complete_at);return $A.Date(e.complete_at)-n}))},completedCount:function(){return this.allTask.filter((function(t){return!(t.parent_id>0)&&t.complete_at})).length},flowTitle:function(){var t=this.flowInfo,e=this.flowData,n=this.allTask;if(t.value){var o=e.find((function(e){return e.value===t.value}));return o?o.label:t.label}return"".concat(this.$L("全部")," (").concat(n.length,")")},flowData:function(){var t=this.flowList,e=this.allTask,n=[{value:0,label:"".concat(this.$L("全部")," (").concat(e.length,")"),children:[]}],o=t.map((function(t){return{value:t.id,label:t.name,status:t.status,children:t.project_flow_item.map((function(t){var n=e.filter((function(e){return e.flow_item_id==t.id})).length;return{value:t.id,label:"".concat(t.name," (").concat(n,")"),status:t.status,class:t.status}}))}}));return 1===o.length?n.push.apply(n,F(o[0].children)):o.length>0&&n.push.apply(n,F(o)),n}}),watch:{projectData:function(){this.sortData=this.getSort()},projectLoad:function(t){var e=this;this._loadTimeout&&clearTimeout(this._loadTimeout),t>0?this._loadTimeout=setTimeout((function(){e.loading=!0}),1e3):this.loading=!1},projectId:{handler:function(t){t>0&&this.getFlowData()},immediate:!0}},methods:{showDesc:function(){this.windowLarge||$A.modalInfo({language:!1,title:this.$L("项目描述"),content:this.projectData.desc})},searchFocus:function(){var t=this;this.$nextTick((function(){t.$refs.searchInput.focus({cursor:"end"})}))},getSort:function(){var t=[];return this.columnList.forEach((function(e){t.push({id:e.id,task:e.tasks.map((function(t){return t.id}))})})),t},sortUpdate:function(t){var e=this,n=this.sortData,o=this.getSort();if(JSON.stringify(n)!==JSON.stringify(o)){this.sortData=o;var i={project_id:this.projectId,sort:this.sortData,only_column:!0===t?1:0};this.sortDisabled=!0,this.$store.dispatch("call",{url:"project/sort",data:i}).then((function(t){var n=t.msg;$A.messageSuccess(n),e.sortDisabled=!1;var o,r=[];i.only_column?(o=-1,i.sort.forEach((function(t){o++,r.push({id:t.id,sort:o})})),e.$store.dispatch("saveColumn",r)):(i.sort.forEach((function(t){o=-1,r.push.apply(r,F(t.task.map((function(n){return o++,r.push.apply(r,F(e.allTask.filter((function(t){return t.parent_id==n})).map((function(e){return{id:e.id,sort:o,column_id:t.id}})))),{id:n,sort:o,column_id:t.id}}))))})),e.$store.dispatch("saveTask",r))})).catch((function(t){var n=t.msg;$A.modalError(n),e.sortDisabled=!1,e.$store.dispatch("getTaskForProject",e.projectId).catch((function(){}))}))}},addTopShow:function(t,e){this.$set(this.columnTopShow,t,e),e&&(this.$refs["column_"+t][0].scrollTop=0)},addTaskOpen:function(t){s.Store.set("addTask",t)},addColumnOpen:function(){var t=this;this.addColumnShow=!0,this.$nextTick((function(){t.$refs.addColumnName.focus()}))},addColumnBlur:function(){""===this.addColumnName&&(this.addColumnShow=!1)},addColumnSubmit:function(){var t=this,e=this.addColumnName.trim();""!==e&&this.$store.dispatch("call",{url:"project/column/add",data:{project_id:this.projectId,name:e}}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.addColumnName="",t.$store.dispatch("saveColumn",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},dropColumn:function(t,e){"title"===e?this.titleColumn(t):"remove"===e?this.removeColumn(t):e.name&&this.updateColumn(t,{color:e.color}).catch($A.modalError)},titleColumn:function(t){var e=this;$A.modalInput({value:t.name,title:"修改列表",placeholder:"输入列表名称",onOk:function(n){return n?e.updateColumn(t,{name:n}):"列表名称不能为空"}})},updateColumn:function(t,e){var n=this;return new Promise((function(o,i){!0!==n.columnLoad[t.id]?(n.$set(n.columnLoad,t.id,!0),Object.keys(e).forEach((function(o){return n.$set(t,o,e[o])})),n.$store.dispatch("call",{url:"project/column/update",data:Object.assign(e,{column_id:t.id})}).then((function(e){var i=e.data;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("saveColumn",i),o()})).catch((function(e){var o=e.msg;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("getColumns",n.projectId).catch((function(){})),i(o)}))):o()}))},removeColumn:function(t){var e=this;$A.modalConfirm({title:"删除列表",content:"你确定要删除列表【"+t.name+"】及列表内的任务吗?",loading:!0,onOk:function(){if(!0!==e.columnLoad[t.id])return e.$set(e.columnLoad,t.id,!0),new Promise((function(n,o){e.$store.dispatch("removeColumn",t.id).then((function(t){var e=t.msg;n(e)})).catch((function(t){var e=t.msg;o(e)})).finally((function(n){e.$set(e.columnLoad,t.id,!1)}))}))}})},onSort:function(t){this.sortField=t,this.sortType="desc"==this.sortType?"asc":"desc"},onSetting:function(){var t=this;this.settingLoad++,this.$store.dispatch("call",{url:"project/update",data:Object.assign(this.settingData,{project_id:this.projectId})}).then((function(e){var n=e.data,o=e.msg;$A.messageSuccess(o),t.settingShow=!1,t.$store.dispatch("saveProject",n)})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.settingLoad--}))},onUser:function(){var t=this;this.userLoad++,this.$store.dispatch("call",{url:"project/user",data:{project_id:this.projectId,userid:this.userData.userids}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.userShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.userLoad--}))},onTransfer:function(){var t=this;this.transferLoad++,this.$store.dispatch("call",{url:"project/transfer",data:{project_id:this.projectId,owner_userid:this.transferData.owner_userid[0]}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.transferShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.transferLoad--}))},onArchived:function(){var t=this;$A.modalConfirm({title:"归档项目",content:"你确定要归档项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("archivedProject",t.projectId).then((function(t){var n=t.msg;e(n)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onDelete:function(){var t=this;$A.modalConfirm({title:"删除项目",content:"你确定要删除项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("removeProject",t.projectId).then((function(t){var n=t.msg;e(n)})).catch((function(t){var e=t.msg;n(e)}))}))}})},onExit:function(){var t=this;$A.modalConfirm({title:"退出项目",content:"你确定要退出项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){return new Promise((function(e,n){t.$store.dispatch("exitProject",t.projectId).then((function(t){var n=t.msg;e(n)})).catch((function(t){var e=t.msg;n(e)}))}))}})},projectDropdown:function(t){var e=this;switch(t){case"setting":this.$set(this.settingData,"name",this.projectData.name),this.$set(this.settingData,"desc",this.projectData.desc),this.settingShow=!0,this.$nextTick((function(){e.$refs.projectName.focus(),setTimeout(e.$refs.projectDesc.resizeTextarea,0)}));break;case"user":if(this.projectData.owner_userid!==this.userId)return;var n=this.projectData.project_user.map((function(t){return t.userid}));this.$set(this.userData,"userids",n),this.$set(this.userData,"useridbak",n),this.$set(this.userData,"uncancelable",[this.projectData.owner_userid]),this.userShow=!0;break;case"invite":this.inviteData={},this.inviteShow=!0,this.inviteGet();break;case"workflow":this.workflowShow=!0;break;case"log":this.logShow=!0;break;case"archived_task":this.archivedTaskShow=!0;break;case"deleted_task":this.deletedTaskShow=!0;break;case"transfer":this.$set(this.transferData,"owner_userid",[this.projectData.owner_userid]),this.transferShow=!0;break;case"archived":this.onArchived();break;case"delete":this.onDelete();break;case"exit":this.onExit()}},openTask:function(t,e){this.$store.dispatch("openTask",t),!0===e&&setTimeout((function(){s.Store.set("receiveTask",!0)}),300)},openMenu:function(t,e){var n=this.$refs["taskMenu_".concat(e.id)];n&&n[0].handleClick(t)},taskIsHidden:function(t){var e=t.name,n=t.desc,o=t.complete_at,i=this.searchText,r=this.flowInfo;return!(this.projectData.cacheParameter.completedTask||!o)||(r.value>0&&t.flow_item_id!==r.value||!(!i||$A.strExists("".concat(e," ").concat(n),i)))},ownerUser:function(t){return t.filter((function(t){return 1==t.owner})).sort((function(t,e){return t.id-e.id}))},inviteGet:function(t){var e=this;this.inviteLoad++,this.$store.dispatch("call",{url:"project/invite",data:{project_id:this.projectId,refresh:!0===t?"yes":"no"}}).then((function(t){var n=t.data;e.inviteData=n,e.inviteCopy()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(t){e.inviteLoad--}))},getFlowData:function(){var t=this;this.flowInfo={},this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then((function(e){var n,o=e.data;t.flowList=o,null===(n=t.$refs.flow)||void 0===n||n.clearSelect()})).catch((function(){t.flowList=[]}))},flowChange:function(t,e){this.flowInfo=e.pop()||{}},inviteCopy:function(){this.inviteData.url&&this.$copyText(this.inviteData.url).then((function(t){$A.messageSuccess("复制成功")})).catch((function(t){$A.messageError("复制失败")}))},inviteFocus:function(){this.$refs.inviteInput.focus({cursor:"all"})},toggleCompleted:function(){this.toggleParameter("completedTask")},workflowBeforeClose:function(){var t=this;return new Promise((function(e){t.$refs.workflow.existDiff()?$A.modalConfirm({content:"设置尚未保存,是否放弃修改?",cancelText:"取消",okText:"放弃",onOk:function(){e()}}):e()}))},myFilter:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(!this.projectData.cacheParameter.completedTask&&!0===e&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&t.owner))},helpFilter:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(t.parent_id>0)&&(!(!this.projectData.cacheParameter.completedTask&&!0===n&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&(t.task_user&&t.task_user.find((function(t){var n=t.userid,o=t.owner;return n==e.userId&&0==o}))))))},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},tabTypeChange:function(t){switch(t){case"column":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"column"});break;case"table":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"table"});break;case"gantt":this.toggleParameter({project_id:this.projectId,key:"menuType",value:"gantt"})}},toggleParameter:function(t){if("completedTask"===t)this.$store.dispatch("forgetTaskCompleteTemp",!0);else if("chat"===t&&this.windowSmall)return void this.$store.dispatch("openDialog",this.projectData.dialog_id);this.$store.dispatch("toggleProjectParameter",t)},onBack:function(){var t=this.$store.state.routeHistoryLast,e=t.name,n=t.params;e===this.$route.name&&/\d+/.test(n.projectId)?this.goForward({name:this.$route.name,params:{projectId:"all"}}):this.goBack()}}};const K=(0,h.Z)(W,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"project-panel",class:[t.tabTypeActive]},[e("PageTitle",{attrs:{title:t.projectData.name}}),t._v(" "),e("div",{staticClass:"project-titbox"},[e("div",{staticClass:"project-title"},[e("div",{staticClass:"project-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("h1",[t._v(t._s(t.projectData.name))]),t._v(" "),t.loading?e("div",{staticClass:"project-load"},[e("Loading")],1):t._e()]),t._v(" "),e("ul",{staticClass:"project-icons"},[e("li",{staticClass:"project-avatar",class:{"cursor-default":t.projectData.owner_userid!==t.userId},on:{click:function(e){return t.projectDropdown("user")}}},[e("ul",[e("li",[e("UserAvatar",{attrs:{userid:t.projectData.owner_userid,size:36,borderWitdh:2,openDelay:0}},[e("p",[t._v(t._s(t.$L("项目负责人")))])]),t._v(" "),(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?e("Badge",{attrs:{type:"normal",count:t.projectData.project_user.length}}):t._e()],1),t._v(" "),t._l(t.projectUser,(function(n){return!(t.windowWidth<=980||t.projectData.cacheParameter.chat)&&t.projectUser.length>0?[-1===n.userid?e("li",{staticClass:"more"},[e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.$L("共"+t.projectData.project_user.length+"个成员")}},[e("Icon",{attrs:{type:"ios-more"}})],1)],1):e("li",[e("UserAvatar",{attrs:{userid:n.userid,size:36,borderWitdh:2,openDelay:0}})],1)]:t._e()}))],2)]),t._v(" "),e("li",{staticClass:"project-icon",on:{click:function(e){return t.addTaskOpen(0)}}},[e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.$L("添加任务")}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"md-add"}})],1)],1),t._v(" "),e("li",{class:["project-icon",""!=t.searchText?"active":""]},[e("Tooltip",{attrs:{always:""!=t.searchText,theme:"light",rawIndex:10},on:{"on-popper-show":t.searchFocus}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-search"},on:{click:t.searchFocus}}),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[e("Input",{ref:"searchInput",staticClass:"search-input",attrs:{placeholder:t.$L("名称、描述..."),clearable:""},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1)],1)],1),t._v(" "),e("li",{class:["project-icon",t.windowLarge&&t.projectData.cacheParameter.chat?"active":""],on:{click:function(e){return t.toggleParameter("chat")}}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-chatbubbles"}}),t._v(" "),e("Badge",{staticClass:"menu-badge",attrs:{count:t.msgUnread}})],1),t._v(" "),e("li",{staticClass:"project-icon"},[e("EDropdown",{attrs:{trigger:"click",transfer:""},on:{command:t.projectDropdown}},[e("Icon",{staticClass:"menu-icon",attrs:{type:"ios-more"}}),t._v(" "),t.projectData.owner_userid===t.userId?e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"setting"}},[t._v(t._s(t.$L("项目设置")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"workflow"}},[t._v(t._s(t.$L("工作流设置")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"user",divided:""}},[t._v(t._s(t.$L("成员管理")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"invite"}},[t._v(t._s(t.$L("邀请链接")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"log",divided:""}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"transfer",divided:""}},[t._v(t._s(t.$L("移交项目")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"archived"}},[t._v(t._s(t.$L("归档项目")))]),t._v(" "),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"delete"}},[t._v(t._s(t.$L("删除项目")))])],1):e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"log"}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),e("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),e("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"exit",divided:""}},[t._v(t._s(t.$L("退出项目")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"project-subbox"},[e("div",{staticClass:"project-subtitle",on:{click:t.showDesc}},[t._v(t._s(t.projectData.desc))]),t._v(" "),e("div",{staticClass:"project-switch"},[t.completedCount>0?e("div",{staticClass:"project-checkbox"},[e("Checkbox",{attrs:{value:t.projectData.cacheParameter.completedTask},on:{"on-change":t.toggleCompleted}},[t._v(t._s(t.$L("显示已完成")))])],1):t._e(),t._v(" "),t.flowList.length>0?e("div",{staticClass:"project-select"},[e("Cascader",{ref:"flow",attrs:{data:t.flowData,"transfer-class-name":"project-panel-flow-cascader",transfer:""},on:{"on-change":t.flowChange}},[e("span",{class:"project-flow ".concat(t.flowInfo.status||"")},[t._v(t._s(t.flowTitle))])])],1):t._e(),t._v(" "),e("div",{staticClass:"project-switch-button"},[e("div",{staticClass:"slider",style:t.tabTypeStyle}),t._v(" "),e("div",{class:{active:"column"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("column")}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("div",{class:{active:"table"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("table")}}},[e("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),e("div",{class:{active:"gantt"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("gantt")}}},[e("i",{staticClass:"taskfont"},[t._v("")])])])])]),t._v(" "),"column"===t.tabTypeActive?e("div",{staticClass:"project-column"},[e("Draggable",{staticClass:"column-list",attrs:{list:t.columnList,animation:150,disabled:t.sortDisabled||t.windowSmall,tag:"ul",draggable:".column-item"},on:{sort:function(e){return t.sortUpdate(!0)}}},[t._l(t.columnList,(function(n){return e("li",{staticClass:"column-item"},[e("div",{class:["column-head",n.color?"custom-color":""],style:n.color?{backgroundColor:n.color}:{}},[e("div",{staticClass:"column-head-title"},[e("AutoTip",[t._v(t._s(n.name))]),t._v(" "),e("em",[t._v("("+t._s(t.panelTask(n.tasks).length)+")")])],1),t._v(" "),e("div",{staticClass:"column-head-icon"},[!0===t.columnLoad[n.id]?e("div",{staticClass:"loading"},[e("Loading")],1):e("EDropdown",{attrs:{trigger:"click",size:"small"},on:{command:function(e){return t.dropColumn(n,e)}}},[e("Icon",{attrs:{type:"ios-more"}}),t._v(" "),e("EDropdownMenu",{staticClass:"project-panel-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"title"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改"))+"\n ")],1)]),t._v(" "),e("EDropdownItem",{attrs:{command:"remove"}},[e("div",{staticClass:"item"},[e("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)]),t._v(" "),t._l(t.$store.state.columnColorList,(function(o,i){return e("EDropdownItem",{key:i,attrs:{divided:0==i,command:o}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",style:{color:o.color},domProps:{innerHTML:t._s(o.color==n.color?"":"")}}),t._v(t._s(t.$L(o.name))+"\n ")])])}))],2)],1),t._v(" "),e("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(e){return t.addTopShow(n.id,!0)}}})],1)]),t._v(" "),e("div",{ref:"column_"+n.id,refInFor:!0,staticClass:"column-task scrollbar-overlay"},[t.columnTopShow[n.id]?e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":n.id,"project-id":t.projectId,"add-top":!0,"auto-active":""},on:{"on-close":function(e){return t.addTopShow(n.id,!1)},"on-priority":t.addTaskOpen}})],1):t._e(),t._v(" "),e("Draggable",{staticClass:"task-list",attrs:{list:n.tasks,animation:150,disabled:t.sortDisabled||t.windowSmall,draggable:".task-draggable",filter:".complete",group:"task"},on:{sort:t.sortUpdate,remove:t.sortUpdate}},[t._l(n.tasks,(function(n){return e("div",{class:["task-item task-draggable",n.complete_at?"complete":"",t.taskIsHidden(n)?"hidden":""],style:n.color?{backgroundColor:n.color}:{},on:{click:function(e){return t.openTask(n)}}},[e("div",{class:["task-head",n.desc?"has-desc":""]},[e("div",{staticClass:"task-title"},[n.flow_item_name?e("span",{class:n.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(e,n)}}},[t._v(t._s(n.flow_item_name))]):t._e(),t._v(" "),e("pre",[t._v(t._s(n.name))])]),t._v(" "),e("div",{staticClass:"task-menu",on:{click:function(t){t.stopPropagation()}}},[e("TaskMenu",{ref:"taskMenu_".concat(n.id),refInFor:!0,attrs:{task:n,icon:"ios-more"}})],1)]),t._v(" "),n.desc?e("div",{staticClass:"task-desc"},[e("pre",{domProps:{innerHTML:t._s(n.desc)}})]):t._e(),t._v(" "),n.task_tag.length>0?e("div",{staticClass:"task-tags"},t._l(n.task_tag,(function(n,o){return e("Tag",{key:o,attrs:{color:n.color}},[t._v(t._s(n.name))])})),1):t._e(),t._v(" "),e("div",{staticClass:"task-users"},[e("ul",[t._l(t.ownerUser(n.task_user),(function(t,o){return e("li",{key:o},[e("UserAvatar",{attrs:{userid:t.userid,size:"32",borderWitdh:2,borderColor:n.color}})],1)})),t._v(" "),0===t.ownerUser(n.task_user).length?e("li",{staticClass:"no-owner"},[e("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(e){return e.stopPropagation(),t.openTask(n,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2),t._v(" "),n.file_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(n.file_num)),e("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),t._v(" "),n.msg_num>0?e("div",{staticClass:"task-icon"},[t._v(t._s(n.msg_num)),e("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),t._v(" "),e("div",{staticClass:"task-progress"},[n.sub_num>0?e("div",{staticClass:"task-sub-num"},[t._v(t._s(n.sub_complete)+"/"+t._s(n.sub_num))]):t._e(),t._v(" "),e("Progress",{attrs:{percent:n.percent,"stroke-width":6}}),t._v(" "),n.end_at?e("ETooltip",{class:["task-time",n.today?"today":"",n.overdue?"overdue":""],attrs:{disabled:t.windowSmall,"open-delay":600,content:n.end_at}},[n.complete_at?t._e():e("div",[e("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(n.end_at)))])]):t._e()],1),t._v(" "),n.p_name?e("em",{staticClass:"priority-color",style:{backgroundColor:n.p_color}}):t._e()])})),t._v(" "),e("div",{staticClass:"task-item additem"},[e("TaskAddSimple",{attrs:{"column-id":n.id,"project-id":t.projectId},on:{"on-priority":t.addTaskOpen}})],1)],2)],1)])})),t._v(" "),e("li",{class:["add-column",t.addColumnShow?"show-input":""]},[e("div",{staticClass:"add-column-text",on:{click:t.addColumnOpen}},[e("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加列表"))+"\n ")],1),t._v(" "),e("div",{staticClass:"add-column-input"},[e("Input",{ref:"addColumnName",attrs:{placeholder:t.$L("列表名称,回车创建"),clearable:""},on:{"on-blur":t.addColumnBlur,"on-enter":t.addColumnSubmit,"on-clear":function(e){t.addColumnShow=!1}},model:{value:t.addColumnName,callback:function(e){t.addColumnName=e},expression:"addColumnName"}})],1)])],2)],1):"table"===t.tabTypeActive?e("div",{staticClass:"project-table scrollbar-overlay"},[e("div",{staticClass:"project-table-head"},[e("Row",{staticClass:"task-row"},[e("Col",{attrs:{span:"12"}},[t._v("# "+t._s(t.$L("任务名称")))]),t._v(" "),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("列表")))]),t._v(" "),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(e){return t.onSort("level")}}},[t._v("\n "+t._s(t.$L("优先级"))+"\n "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:"level"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),e("Icon",{class:{on:"level"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])]),t._v(" "),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("负责人")))]),t._v(" "),e("Col",{attrs:{span:"3"}},[e("div",{staticClass:"sort",on:{click:function(e){return t.onSort("end_at")}}},[t._v("\n "+t._s(t.$L("到期时间"))+"\n "),e("div",{staticClass:"task-sort"},[e("Icon",{class:{on:"end_at"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),e("Icon",{class:{on:"end_at"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])])],1)],1),t._v(" "),e("div",{class:["project-table-body",t.projectData.cacheParameter.showMy?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showMy")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("我的任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.myList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectData.cacheParameter.showMy?e("TaskRow",{attrs:{list:t.transforTasks(t.myList),"open-key":"my","fast-add-task":""},on:{"on-priority":t.addTaskOpen}}):t._e()],1),t._v(" "),t.helpList.length?e("div",{class:["project-table-body",t.projectData.cacheParameter.showHelp?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showHelp")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("协助的任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.helpList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectData.cacheParameter.showHelp?e("TaskRow",{attrs:{list:t.helpList,"open-key":"help"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showUndone?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showUndone")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("未完成任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.unList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectData.cacheParameter.showUndone?e("TaskRow",{attrs:{list:t.unList,"open-key":"undone"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?e("div",{class:["project-table-body",t.projectData.cacheParameter.showCompleted?"":"project-table-hide"]},[e("Row",{staticClass:"task-row"},[e("Col",{staticClass:"row-title",attrs:{span:"12"}},[e("i",{staticClass:"taskfont",on:{click:function(e){return t.toggleParameter("showCompleted")}}},[t._v("")]),t._v(" "),e("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("已完成任务")))]),t._v(" "),e("div",{staticClass:"row-num"},[t._v("("+t._s(t.completedList.length)+")")])]),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}}),t._v(" "),e("Col",{attrs:{span:"3"}},[t._v(t._s(t.projectData.task_num>0&&t.projectData.cacheParameter.showCompleted?t.$L("完成时间"):""))])],1),t._v(" "),t.projectData.cacheParameter.showCompleted?e("TaskRow",{attrs:{list:t.completedList,"open-key":"completed",showCompleteAt:""},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e()]):"gantt"===t.tabTypeActive?e("div",{staticClass:"project-gantt"},[e("ProjectGantt",{attrs:{projectColumn:t.columnList,flowInfo:t.flowInfo}})],1):t._e(),t._v(" "),e("Modal",{attrs:{title:t.$L("项目设置"),"mask-closable":!1},model:{value:t.settingShow,callback:function(e){t.settingShow=e},expression:"settingShow"}},[e("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[e("Input",{ref:"projectName",attrs:{type:"text",maxlength:32,placeholder:t.$L("必填")},model:{value:t.settingData.name,callback:function(e){t.$set(t.settingData,"name",e)},expression:"settingData.name"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"desc",label:t.$L("项目介绍")}},[e("Input",{ref:"projectDesc",attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},maxlength:255,placeholder:t.$L("选填")},model:{value:t.settingData.desc,callback:function(e){t.$set(t.settingData,"desc",e)},expression:"settingData.desc"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.settingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.settingLoad>0},on:{click:t.onSetting}},[t._v(t._s(t.$L("修改")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("成员管理"),"mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[e("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("项目成员")}},[e("UserInput",{attrs:{uncancelable:t.userData.uncancelable,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),t.userWaitRemove.length>0?e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":t.onUser}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("移除成员负责的任务将变成无负责人,")))])]),t._v(" "),e("p",[t._v(t._s(t.$L("注意此操作不可逆!")))]),t._v(" "),e("ul",{staticClass:"project-panel-wait-remove"},[e("li",[t._v(t._s(t.$L("即将移除"))+":")]),t._v(" "),t._l(t.userWaitRemove,(function(t){return e("li",{key:t},[e("UserAvatar",{attrs:{userid:t,size:20,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.userLoad>0}},[t._v(t._s(t.$L("保存")))])],1):e("Button",{attrs:{type:"primary",loading:t.userLoad>0},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("邀请链接"),"mask-closable":!1},model:{value:t.inviteShow,callback:function(e){t.inviteShow=e},expression:"inviteShow"}},[e("Form",{attrs:{model:t.inviteData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("链接地址")}},[e("Input",{ref:"inviteInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":t.inviteFocus},model:{value:t.inviteData.url,callback:function(e){t.$set(t.inviteData,"url",e)},expression:"inviteData.url"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("可通过此链接直接加入项目。")))])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.inviteShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.inviteGet(!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[e("strong",[t._v(t._s(t.$L("注意:刷新将导致原来的邀请链接失效!")))])])]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.inviteLoad>0}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("移交项目"),"mask-closable":!1},model:{value:t.transferShow,callback:function(e){t.transferShow=e},expression:"transferShow"}},[e("Form",{attrs:{model:t.transferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("项目负责人")}},[e("UserInput",{attrs:{"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择项目负责人")},model:{value:t.transferData.owner_userid,callback:function(e){t.$set(t.transferData,"owner_userid",e)},expression:"transferData.owner_userid"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.transferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.transferLoad>0},on:{click:t.onTransfer}},[t._v(t._s(t.$L("移交")))])],1)],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",beforeClose:t.workflowBeforeClose,size:1280},model:{value:t.workflowShow,callback:function(e){t.workflowShow=e},expression:"workflowShow"}},[t.workflowShow?e("ProjectWorkflow",{ref:"workflow",attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:768},model:{value:t.logShow,callback:function(e){t.logShow=e},expression:"logShow"}},[t.logShow?e("ProjectLog",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.archivedTaskShow,callback:function(e){t.archivedTaskShow=e},expression:"archivedTaskShow"}},[t.archivedTaskShow?e("TaskArchived",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.deletedTaskShow,callback:function(e){t.deletedTaskShow=e},expression:"deletedTaskShow"}},[t.deletedTaskShow?e("TaskDeleted",{attrs:{"project-id":t.projectId}}):t._e()],1)],1)}),[],!1,null,null,null).exports;function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Z(t){for(var e=1;e

");e+="

".concat(this.$L("总数量"),": ").concat(t.task_num,"

"),e+="

".concat(this.$L("已完成"),": ").concat(t.task_complete,"

"),e+='

'.concat(this.$L("我的任务"),"

"),e+="

".concat(this.$L("总数量"),": ").concat(t.task_my_num,"

"),e+="

".concat(this.$L("已完成"),": ").concat(t.task_my_complete,"

"),$A.modalInfo({language:!1,title:"".concat(t.name," ").concat(this.$L("项目进度")),content:e})}},handleLongpress:function(t,e){var n=this,o=$A.getAttr(e,"data-id"),i=this.projectLists.find((function(t){return t.id==o}));i&&(this.operateVisible=!1,this.operateItem=$A.isJson(i)?i:{},this.$nextTick((function(){var o=e.getBoundingClientRect(),i=n.$el.getBoundingClientRect();n.operateStyles={left:"".concat(t.clientX-i.left,"px"),top:"".concat(o.top+n.windowScrollY,"px"),height:o.height+"px"},n.operateVisible=!0})))},handleTopClick:function(){var t=this;this.$store.dispatch("call",{url:"project/top",data:{project_id:this.operateItem.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveProject",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))}}};function ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function it(t){for(var e=1;e0?e("li",{staticClass:"loading"},[e("Loading")],1):e("li",{staticClass:"nothing"},[t._v("\n "+t._s(t.$L(t.projectKeyValue?'没有任何与"'.concat(t.projectKeyValue,'"相关的项目'):"没有任何项目"))+"\n ")])]:t._e(),t._v(" "),t._l(t.projectLists,(function(n,o){return e("li",{directives:[{name:"longpress",rawName:"v-longpress",value:t.handleLongpress,expression:"handleLongpress"}],key:o,class:{operate:n.id==t.operateItem.id&&t.operateVisible},attrs:{"data-id":n.id},on:{click:function(e){return t.toggleRoute("project",{projectId:n.id})}}},[e("div",{staticClass:"project-item"},[e("div",{staticClass:"item-left"},[e("div",{staticClass:"project-h1"},[e("div",{staticClass:"project-name"},[t._v(t._s(n.name))]),t._v(" "),n.top_at?e("div",{staticClass:"icon-top"}):t._e(),t._v(" "),n.task_my_num-n.task_my_complete>0?e("div",{staticClass:"num"},[t._v(t._s(n.task_my_num-n.task_my_complete))]):t._e()]),t._v(" "),e("div",{staticClass:"project-h2"},[t._v("\n "+t._s(n.desc)+"\n ")])]),t._v(" "),n.task_num>0?e("div",{staticClass:"item-right",on:{click:function(e){return e.stopPropagation(),t.modalPercent(n)}}},[e("iCircle",{attrs:{type:"circle","trail-color":"rgba(132, 197, 106, 0.2)","trail-width":7,"stroke-color":100===n.task_percent?"rgba(132, 197, 106, 0)":"#84C56A","stroke-width":7,percent:n.task_percent,size:44}},[100===n.task_percent?e("Icon",{attrs:{type:"ios-checkmark"}}):e("span",{staticClass:"percent-text"},[t._v(t._s(n.task_percent)+"%")])],1)],1):t._e()])])}))],2),t._v(" "),e("div",{staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:t.windowLarge?"bottom":"top",visible:t.operateVisible,transfer:""},on:{"on-clickoutside":function(e){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),t._v(" "),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{nativeOn:{click:function(e){return t.handleTopClick.apply(null,arguments)}}},[t._v("\n "+t._s(t.$L(t.operateItem.top_at?"取消置顶":"置顶该项目"))+"\n ")])],1)],1)],1)],1)}),[],!1,null,null,null).exports,ProjectDialog:Q,ProjectPanel:K},deactivated:function(){this.$store.dispatch("forgetTaskCompleteTemp",!0)},computed:it(it({},(0,o.rn)(["cacheProjects","wsOpenNum"])),{},{projectId:function(){var t=this.$route.params.projectId;return parseInt(/^\d+$/.test(t)?t:0)}}),watch:{projectId:{handler:function(){this.getProjectData()},immediate:!0},wsOpenNum:function(t){var e=this;t<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout((function(){"manage-project"==e.$route.name&&e.getProjectData()}),5e3))}},methods:{getProjectData:function(){var t=this;if(!(this.projectId<=0)){var e=this.projectId;this.$nextTick((function(){t.$store.state.projectId=e,t.$store.dispatch("getProjectOne",e).then((function(){t.$store.dispatch("getColumns",e).catch((function(){})),t.$store.dispatch("getTaskForProject",e).catch((function(){}))})).catch((function(n){var o=n.msg;e===t.projectId&&$A.modalWarning({content:o,onOk:function(){var e=t.cacheProjects.find((function(t){return t.id}));e?$A.goForward({name:"manage-project",params:{projectId:e.id}}):$A.goForward({name:"manage-dashboard"})}})})),t.$store.dispatch("forgetTaskCompleteTemp",!0)}))}}}},st=at;const lt=(0,h.Z)(st,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-project"},[t.projectId>0?[e("ProjectPanel"),t._v(" "),e("ProjectDialog")]:t._e(),t._v(" "),t.windowSmall?e("ProjectList",{directives:[{name:"show",rawName:"v-show",value:0===t.projectId,expression:"projectId === 0"}]}):t._e()],2)}),[],!1,null,null,null).exports},85662:function(t,e,n){t.exports=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,o=new Array(e);nthis.range.start)){var e=Math.max(t-this.param.buffer,0);this.checkRange(e,this.getEndByStart(e))}}},{key:"handleBehind",value:function(){var t=this.getScrollOvers();tt&&(i=n-1)}return e>0?--e:0}},{key:"getIndexOffset",value:function(t){if(!t)return 0;for(var e=0,n=0,o=0;o1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.dataSources.length-1)this.scrollToBottom();else{var n=this.virtual.getOffset(t);0!==e&&(n=Math.max(0,n+e)),this.scrollToOffset(n)}},scrollToBottom:function(){var t=this,e=this.$refs.shepherd;if(e){var n=e[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(n),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout((function(){t.getOffset()+t.getClientSize()+1o+1||!o||(this.virtual.handleScroll(e),this.emitEvent(e,n,o,t))}},emitEvent:function(t,e,n,o){this.$emit("scroll",o,this.virtual.getRange()),this.virtual.isFront()&&this.dataSources.length&&t-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&t+e+this.bottomThreshold>=n&&this.$emit("tobottom")},getRenderSlots:function(t){for(var e=[],n=this.range,o=n.start,i=n.end,r=this.dataSources,a=this.dataKey,s=this.itemClass,l=this.itemTag,c=this.itemStyle,u=this.isHorizontal,d=this.extraProps,f=this.dataComponent,h=this.itemScopedSlots,p=this.$scopedSlots&&this.$scopedSlots.item,m=o;m<=i;m++){var v=r[m];if(v){var g="function"==typeof a?a(v):v[a];"string"==typeof g||"number"==typeof g?e.push(t(w,{props:{index:m,tag:l,event:O.ITEM,horizontal:u,uniqueKey:g,source:v,extraProps:d,component:f,slotComponent:p,scopedSlots:h},style:c,class:"".concat(s).concat(this.itemClassAdd?" "+this.itemClassAdd(m):"")})):console.warn("Cannot get the data-key '".concat(a,"' from data-sources."))}else console.warn("Cannot get the index '".concat(m,"' from data-sources."))}return e}},render:function(t){var e=this.$slots,n=e.header,o=e.footer,i=this.range,r=i.padFront,a=i.padBehind,s=this.isHorizontal,l=this.pageMode,c=this.rootTag,u=this.wrapTag,d=this.wrapClass,f=this.wrapStyle,h=this.headerTag,p=this.headerClass,m=this.headerStyle,v=this.footerTag,g=this.footerClass,y=this.footerStyle,b=this.disabled,_={padding:s?"0px ".concat(a,"px 0px ").concat(r,"px"):"".concat(r,"px 0px ").concat(a,"px")},w=f?Object.assign({},f,_):_;return t(c,{ref:"root",style:b?{overflow:"hidden"}:null,on:{"&scroll":!l&&this.onScroll}},[n?t(k,{class:p,style:m,props:{tag:h,event:O.SLOT,uniqueKey:x.HEADER}},n):null,t(u,{class:d,attrs:{role:"group"},style:w},this.getRenderSlots(t)),o?t(k,{class:g,style:y,props:{tag:v,event:O.SLOT,uniqueKey:x.FOOTER}},o):null,t("div",{ref:"shepherd",style:{width:s?"0px":"100%",height:s?"100%":"0px"}})])}});return C}(n(70538))},9980:function(t,e,n){var o;"undefined"!=typeof self&&self,o=function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var o=n("2d00"),i=n("5ca1"),r=n("2aba"),a=n("32e9"),s=n("84f2"),l=n("41a0"),c=n("7f20"),u=n("38fd"),d=n("2b4c")("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",p="values",m=function(){return this};t.exports=function(t,e,n,v,g,y,b){l(n,e,v);var _,w,k,O=function(t){if(!f&&t in j)return j[t];switch(t){case h:case p:return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",C=g==p,S=!1,j=t.prototype,T=j[d]||j["@@iterator"]||g&&j[g],E=T||O(g),D=g?C?O("entries"):E:void 0,A="Array"==e&&j.entries||T;if(A&&(k=u(A.call(new t)))!==Object.prototype&&k.next&&(c(k,x,!0),o||"function"==typeof k[d]||a(k,d,m)),C&&T&&T.name!==p&&(S=!0,E=function(){return T.call(this)}),o&&!b||!f&&!S&&j[d]||a(j,d,E),s[e]=E,s[x]=m,g)if(_={values:C?E:O(p),keys:y?E:O(h),entries:D},b)for(w in _)w in j||r(j,w,_[w]);else i(i.P+i.F*(f||S),e,_);return _}},"02f4":function(t,e,n){var o=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var r,a,s=String(i(e)),l=o(n),c=s.length;return l<0||l>=c?t?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):r:t?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},"0390":function(t,e,n){"use strict";var o=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?o(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var o=n("cb7c");t.exports=function(){var t=o(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var o=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return o(t,i)}},1495:function(t,e,n){var o=n("86cc"),i=n("cb7c"),r=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);for(var n,a=r(e),s=a.length,l=0;s>l;)o.f(t,n=a[l++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var o=n("2aba"),i=n("32e9"),r=n("79e5"),a=n("be13"),s=n("2b4c"),l=n("520a"),c=s("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$
")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),h=!r((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=h?!r((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!h||!p||"replace"===t&&!u||"split"===t&&!d){var m=/./[f],v=n(a,f,""[t],(function(t,e,n,o,i){return e.exec===l?h&&!i?{done:!0,value:m.call(e,n,o)}:{done:!0,value:t.call(n,e,o)}:{done:!1}})),g=v[0],y=v[1];o(String.prototype,t,g),i(RegExp.prototype,f,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},"230e":function(t,e,n){var o=n("d3f4"),i=n("7726").document,r=o(i)&&o(i.createElement);t.exports=function(t){return r?i.createElement(t):{}}},"23c6":function(t,e,n){var o=n("2d95"),i=n("2b4c")("toStringTag"),r="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:r?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var o=n("7726"),i=n("32e9"),r=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),l="toString",c=(""+s).split(l);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(r(n,"name")||i(n,"name",e)),t[e]!==n&&(l&&(r(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===o?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},"2aeb":function(t,e,n){var o=n("cb7c"),i=n("1495"),r=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},l=function(){var t,e=n("230e")("iframe"),o=r.length;for(e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("