2022-05-27 21:51:42 +08:00

2 lines
361 KiB
JavaScript
Vendored

/*! For license information please see 109.js.LICENSE.txt */
(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[109],{79742:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){var e,n,o=l(t),s=o[0],a=o[1],u=new r(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),c=0,f=a>0?s-4:s;for(n=0;n<f;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[c++]=255&e);1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,o=[],s=16383,a=0,l=i-r;a<l;a+=s)o.push(u(t,a,a+s>l?l:a+s));1===r?(e=t[i-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[i-2]<<8)+t[i-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)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 u(t,e,i){for(var r,o,s=[],a=e;a<i;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=r)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},48764:(t,e,n)=>{"use strict";var i=n(79742),r=n(80645),o=n(5826);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,n)}function u(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=d(t,e);return t}(t,e,n,i):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(e,n),r=(t=a(t,i)).write(e,n);r!==i&&(t=t.slice(0,r));return t}(t,e,n):function(t,e){if(l.isBuffer(e)){var n=0|h(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?a(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(c(e),t=a(t,e<0?0:0|h(e)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function d(t,e){var n=e.length<0?0:0|h(e.length);t=a(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function h(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().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 i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(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(i)return z(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,n){var i=!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 j(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function m(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:g(t,e,n,i,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,i,r){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(r){var c=-1;for(o=n;o<a;o++)if(u(t,o)===u(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var f=!0,d=0;d<l;d++)if(u(t,o+d)!==u(e,d)){f=!1;break}if(f)return o}return-1}function b(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function _(t,e,n,i){return F(z(e,t.length-n),t,n,i)}function w(t,e,n,i){return F(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,i)}function O(t,e,n,i){return w(t,e,n,i)}function x(t,e,n,i){return F(U(e),t,n,i)}function k(t,e,n,i){return F(function(t,e){for(var n,i,r,o=[],s=0;s<t.length&&!((e-=2)<0);++s)i=(n=t.charCodeAt(s))>>8,r=n%256,o.push(r),o.push(i);return o}(e,t.length-n),t,n,i)}function E(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r<n;){var o,s,a,l,u=t[r],c=null,f=u>239?4:u>223?3:u>191?2:1;if(r+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(o=t[r+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=t[r+1],s=t[r+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=t[r+1],s=t[r+2],a=t[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),r+=f}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var n="",i=0;for(;i<e;)n+=String.fromCharCode.apply(String,t.slice(i,i+=S));return n}(i)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,n){return u(null,t,e,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,n){return function(t,e,n,i){return c(e),e<=0?a(t,e):void 0!==n?"string"==typeof i?a(t,e).fill(n,i):a(t,e).fill(n):a(t,e)}(null,t,e,n)},l.allocUnsafe=function(t){return f(null,t)},l.allocUnsafeSlow=function(t){return f(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,o=Math.min(n,i);r<o;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return n<i?-1:i<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=l.allocUnsafe(e),r=0;for(n=0;n<t.length;++n){var s=t[n];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):v.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,n,i,r){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===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(i,r),c=t.slice(e,n),f=0;f<a;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},l.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){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 O(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function C(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(127&t[r]);return i}function T(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(t[r]);return i}function j(t,e,n){var i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=e;o<n;++o)r+=B(t[o]);return r}function N(t,e,n){for(var i=t.slice(e,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function L(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,i,r,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<o)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function D(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);r<o;++r)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function I(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);r<o;++r)t[n+r]=e>>>8*(i?r:3-r)&255}function q(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,i,o){return o||q(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function $(t,e,n,i,o){return o||q(t,0,n,8),r.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=l.prototype;else{var r=e-t;n=new l(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+t]}return n},l.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i},l.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var i=this[t+--e],r=1;e>0&&(r*=256);)i+=this[t+--e]*r;return i},l.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||L(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||L(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||L(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var i=e,r=1,o=this[t+--i];i>0&&(r*=256);)o+=this[t+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||L(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||L(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||L(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||L(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||L(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o<n&&(r*=256);)this[e+o]=t/r&255;return e+n},l.prototype.writeUIntBE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[e+r]=255&t;--r>=0&&(o*=256);)this[e+r]=t/o&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(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||P(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(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):I(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(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):I(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);P(this,t,e,n,r-1,-r)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);P(this,t,e,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(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||P(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(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):I(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(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):I(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 $(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return $(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,o=i-n;if(this===t&&n<e&&e<i)for(r=o-1;r>=0;--r)t[r+e]=this[r+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},l.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=l.isBuffer(t)?t:z(new l(t,i).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var R=/[^+\/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var n;e=e||1/0;for(var i=t.length,r=null,o=[],s=0;s<i;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.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;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return i.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 F(t,e,n,i){for(var r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}},80645:(t,e)=>{e.read=function(t,e,n,i,r){var o,s,a=8*r-i-1,l=(1<<a)-1,u=l>>1,c=-7,f=n?r-1:0,d=n?-1:1,h=t[e+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+t[e+f],f+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=256*s+t[e+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,i),o-=u}return(h?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var s,a,l,u=8*o-r-1,c=(1<<u)-1,f=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,p=i?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*l-1)*Math.pow(2,r),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,r),s=0));r>=8;t[n+h]=255&a,h+=p,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;t[n+h]=255&s,h+=p,s/=256,u-=8);t[n+h-p]|=128*v}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},63409:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(1519),r=n.n(i)()((function(t){return t[1]}));r.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 o=r},2557:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(1519),r=n.n(i)()((function(t){return t[1]}));r.push([t.id,".vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex:1;flex:1;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{left:0;position:absolute;top:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.resize-observer[data-v-b329ee4c]{background-color:transparent;border:none;opacity:0}.resize-observer[data-v-b329ee4c],.resize-observer[data-v-b329ee4c] object{display:block;height:100%;left:0;overflow:hidden;pointer-events:none;position:absolute;top:0;width:100%;z-index:-1}",""]);const o=r},76095:function(t,e,n){var i,r=n(48764).Buffer;"undefined"!=typeof self&&self,i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},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 i=n(17),r=n(18),o=n(19),s=n(45),a=n(46),l=n(47),u=n(48),c=n(49),f=n(12),d=n(32),h=n(33),p=n(31),v=n(1),y={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:u.default,Scroll:s.default,Block:l.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:d.default,Style:h.default,Store:p.default}};e.default=y},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=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 r(e,t),e}(Error);e.ParchmentError=o;var s,a={},l={},u={},c={};function f(t,e){var n;if(void 0===e&&(e=s.ANY),"string"==typeof t)n=c[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&s.LEVEL&s.BLOCK?n=c.block:t&s.LEVEL&s.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=l[i[r]])break;n=n||u[t.tagName]}return null==n?null:e&s.LEVEL&n.scope&&e&s.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"}(s=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=f,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var i=e[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");if(c[i.blotName||i.attrName]=i,"string"==typeof i.keyName)a[i.keyName]=i;else if(null!=i.className&&(l[i.className]=i),null!=i.tagName){Array.isArray(i.tagName)?i.tagName=i.tagName.map((function(t){return t.toUpperCase()})):i.tagName=i.tagName.toUpperCase();var r=Array.isArray(i.tagName)?i.tagName:[i.tagName];r.forEach((function(t){null!=u[t]&&null!=i.className||(u[t]=i)}))}return i}},function(t,e,n){var i=n(51),r=n(11),o=n(3),s=n(20),a=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=o(!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(r(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(i){(t(i)?e:n).push(i)})),[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+s.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+s.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=s.iterator(this.ops),r=0;r<e&&i.hasNext();){var o;r<t?o=i.next(t-r):(o=i.next(e-r),n.push(o)),r+=s.length(o)}return new l(n)},l.prototype.compose=function(t){var e=s.iterator(this.ops),n=s.iterator(t.ops),i=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var a=o.retain;"insert"===e.peekType()&&e.peekLength()<=a;)a-=e.peekLength(),i.push(e.next());o.retain-a>0&&n.next(o.retain-a)}for(var u=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),d=n.next(c);if("number"==typeof d.retain){var h={};"number"==typeof f.retain?h.retain=c:h.insert=f.insert;var p=s.attributes.compose(f.attributes,d.attributes,"number"==typeof f.retain);if(p&&(h.attributes=p),u.push(h),!n.hasNext()&&r(u.ops[u.ops.length-1],h)){var v=new l(e.rest());return u.concat(v).chop()}}else"number"==typeof d.delete&&"number"==typeof f.retain&&u.push(d)}return u.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:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new l,u=i(n[0],n[1],e),c=s.iterator(this.ops),f=s.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(f.peekLength(),e),o.push(f.next(n));break;case i.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case i.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),l=f.next(n);r(a.insert,l.insert)?o.retain(n,s.attributes.diff(a.attributes,l.attributes)):o.push(l).delete(n)}e-=n}})),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=s.iterator(this.ops),i=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),a=s.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,a)-a:-1;if(u<0)i.push(n.next());else if(u>0)i.push(n.next(u));else{if(!1===t(i,n.next(1).attributes||{},r))return;r+=1,i=new l}}i.length()>0&&t(i,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=s.iterator(this.ops),i=s.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),a=n.next(o),u=i.next(o);if(a.delete)continue;u.delete?r.push(u):r.retain(o,s.attributes.transform(a.attributes,u.attributes,e))}else r.retain(s.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=s.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(i<t||!e)&&(t+=r),i+=r):t-=Math.min(r,t-i)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},a=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,r=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!o)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){r&&"__proto__"===e.name?r(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,i,r,o,c,f=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof f&&(p=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<h;++d)if(null!=(e=arguments[d]))for(n in e)i=u(f,n),f!==(r=u(e,n))&&(p&&r&&(a(r)||(o=s(r)))?(o?(o=!1,c=i&&s(i)?i:[]):c=i&&a(i)?i:{},l(f,{name:n,newValue:t(p,c,r)})):void 0!==r&&l(f,{name:n,newValue:r}));return f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=f(n(3)),s=f(n(2)),a=f(n(0)),l=f(n(16)),u=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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}function p(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)}var v=function(t){function e(){return d(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),i(e,[{key:"attach",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new s.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=a.default.query(t,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,i){this.format(n,i)}},{key:"insertAt",value:function(t,n,i){if("string"==typeof n&&n.endsWith("\n")){var o=a.default.create(y.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i)}}]),e}(a.default.Embed);v.scope=a.default.Scope.BLOCK_BLOT;var y=function(t){function e(t){d(this,e);var n=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,t),i(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),m(e))}),new s.default).insert("\n",m(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,i,o){n<=0||(a.default.query(i,a.default.Scope.BLOCK)?t+n===this.length()&&this.format(i,o):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),i,o),this.cache={})}},{key:"insertAt",value:function(t,n,i){if(null!=i)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);if(0!==n.length){var o=n.split("\n"),s=o.shift();s.length>0&&(t<this.length()-1||null==this.children.tail?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var a=this;o.reduce((function(t,e){return(a=a.split(t,!0)).insertAt(0,e),e.length}),t+s.length)}}},{key:"insertBefore",value:function(t,n){var i=this.children.head;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),i instanceof l.default&&i.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(a.default.Block);function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:m(t.parent,e))}y.blotName="block",y.tagName="P",y.defaultChild="break",y.allowedChildren=[u.default,a.default.Embed,c.default],e.bubbleFormats=m,e.BlockEmbed=v,e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="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},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();n(50);var s=y(n(2)),a=y(n(14)),l=y(n(8)),u=y(n(9)),c=y(n(0)),f=n(15),d=y(f),h=y(n(3)),p=y(n(10)),v=y(n(34));function y(t){return t&&t.__esModule?t:{default:t}}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var b=(0,p.default)("quill"),_=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(g(this,t),this.options=w(e,i),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=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=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.default(this.scroll),this.selection=new d.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 i=n.selection.lastRange,r=i&&0===i.length?i.index:void 0;O.call(n,(function(){return n.editor.update(null,e,r)}),t)}));var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.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,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach((function(i){n.register(i,t[i],e)}))}else null==this.imports[t]||i||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(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 i=this,o=x(t,e,n),s=r(o,4);return t=s[0],e=s[1],n=s[3],O.call(this,(function(){return i.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,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return O.call(this,(function(){var i=n.getSelection(!0),r=new s.default;if(null==i)return r;if(c.default.query(t,c.default.Scope.BLOCK))r=n.editor.formatLine(i.index,i.length,m({},t,e));else{if(0===i.length)return n.selection.format(t,e),r;r=n.editor.formatText(i.index,i.length,m({},t,e))}return n.setSelection(i,l.default.sources.SILENT),r}),i)}},{key:"formatLine",value:function(t,e,n,i,o){var s,a=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],s=u[2],o=u[3],O.call(this,(function(){return a.editor.formatLine(t,e,s)}),o,t,0)}},{key:"formatText",value:function(t,e,n,i,o){var s,a=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],s=u[2],o=u[3],O.call(this,(function(){return a.editor.formatText(t,e,s)}),o,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 i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.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=x(t,e),i=r(n,2);return t=i[0],e=i[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=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return O.call(this,(function(){return r.editor.insertEmbed(e,n,i)}),o,e)}},{key:"insertText",value:function(t,e,n,i,o){var s,a=this,l=x(t,0,n,i,o),u=r(l,4);return t=u[0],s=u[2],o=u[3],O.call(this,(function(){return a.editor.insertText(t,e,s)}),o,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 i=this,o=x(t,e,n),s=r(o,4);return t=s[0],e=s[1],n=s[3],O.call(this,(function(){return i.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 O.call(this,(function(){t=new s.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),i.compose(r)}),n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,i),s=r(o,4);e=s[0],n=s[1],i=s[3],this.selection.setRange(new f.Range(e,n),i),i!==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 s.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 O.call(this,(function(){return t=new s.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=v.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 i=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:i},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 O(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new s.default;var r=null==n?null:this.getSelection(),o=this.editor.delta,a=t();if(null!=r&&(!0===n&&(n=r.index),null==i?r=k(r,a,e):0!==i&&(r=k(r,n,i,e)),this.setSelection(r,l.default.sources.SILENT)),a.length()>0){var u,c,f=[l.default.events.TEXT_CHANGE,a,o,e];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(f)),e!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return a}function x(t,e,n,r,o){var s={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":i(n))?(s=n,o=r):"string"==typeof n&&(null!=r?s[n]=r:o=n),[t,e,s,o=o||l.default.sources.API]}function k(t,e,n,i){if(null==t)return null;var o=void 0,a=void 0;if(e instanceof s.default){var u=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,i!==l.default.sources.USER)})),c=r(u,2);o=c[0],a=c[1]}else{var d=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&i===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),h=r(d,2);o=h[0],a=h[1]}return new f.Range(o,a-o)}_.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:s.default,parchment:c.default,"core/module":u.default,"core/theme":v.default},e.expandConfig=w,e.overload=x,e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=a(n(7)),s=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 c=function(t){function e(){return l(this,e),u(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),i(e,[{key:"formatAt",value:function(t,n,i,o){if(e.compare(this.statics.blotName,i)<0&&s.default.query(i,s.default.Scope.BLOT)){var a=this.isolate(t,n);o&&a.wrap(i,o)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,o)}},{key:"optimize",value:function(t){if(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),r=e.order.indexOf(n);return i>=0||r>=0?i-r:t===n?0:t<n?-1:1}}]),e}(s.default.Inline);c.allowedChildren=[c,s.default.Embed,o.default],c.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(0);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 a=function(t){function e(){return o(this,e),s(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}(((i=r)&&i.__esModule?i:{default:i}).default.Text);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=s(n(54));function s(t){return t&&t.__esModule?t:{default:t}}var a=(0,s(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var l=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=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));return t.listeners={},t.on("error",a.error),t}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),i(e,[{key:"emit",value:function(){a.log.apply(a,arguments),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(this.listeners[t.type]||[]).forEach((function(e){var i=e.node,r=e.handler;(t.target===i||i.contains(t.target))&&r.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(o.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},e.default=l},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],r="warn";function o(t){if(i.indexOf(t)<=i.indexOf(r)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];(e=console)[t].apply(e,o)}}function s(t){return i.reduce((function(e,n){return e[n]=o.bind(console,n,t),e}),{})}o.level=s.level=function(t){r=t},e.default=s},function(t,e,n){var i=Array.prototype.slice,r=n(52),o=n(53),s=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=i.call(t),e=i.call(e),s(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var f=r(t),d=r(e)}catch(t){return!1}if(f.length!=d.length)return!1;for(f.sort(),d.sort(),u=f.length-1;u>=0;u--)if(f[u]!=d[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!s(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function a(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 i=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.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!=i.query(t,i.Scope.BLOT&(this.scope|i.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=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}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<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=f(n(2)),a=f(n(0)),l=f(n(4)),u=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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}function p(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)}var v=function(t){function e(){return d(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),e}(u.default);v.blotName="code",v.tagName="CODE";var y=function(t){function e(){return d(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,t),r(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new s.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),s=i(r,1)[0];null!=s&&s.deleteAt(s.length()-1,1),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,i,r){if(0!==n&&null!=a.default.query(i,a.default.Scope.BLOCK)&&(i!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var s=this.newlineIndex(t,!0)+1,l=o-s+1,u=this.isolate(s,l),c=u.next;u.format(i,r),c instanceof e&&c.formatAt(0,t-s+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(c.default,t),o=i(r,2),s=o[0],a=o[1];s.insertAt(a,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(a.default.create("text","\n")),o(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){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=a.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof a.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(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);y.blotName="code-block",y.tagName="PRE",y.TAB=" ",e.Code=v,e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="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},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=m(n(2)),a=m(n(20)),l=m(n(0)),u=m(n(13)),c=m(n(24)),f=n(4),d=m(f),h=m(n(16)),p=m(n(21)),v=m(n(11)),y=m(n(3));function m(t){return t&&t.__esModule?t:{default:t}}var g=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return o(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var i=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(i,e.attributes)}return t.push(e)}),new s.default)}(t)).reduce((function(t,s){var u=s.retain||s.delete||s.insert.length||1,c=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var h=s.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),t>=o&&!h.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,h);var p=e.scroll.line(t),v=r(p,2),m=v[0],g=v[1],b=(0,y.default)({},(0,f.bubbleFormats)(m));if(m instanceof d.default){var _=m.descendant(l.default.Leaf,g),w=r(_,1)[0];b=(0,y.default)(b,(0,f.bubbleFormats)(w))}c=a.default.attributes.diff(b,c)||{}}else if("object"===i(s.insert)){var O=Object.keys(s.insert)[0];if(null==O)return t;e.scroll.insertAt(t,O,s.insert[O])}o+=u}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,u,n,c[n])})),t+u}),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 s.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var o=n.scroll.lines(t,Math.max(e,1)),s=e;o.forEach((function(e){var o=e.length();if(e instanceof u.default){var a=t-e.offset(n.scroll),l=e.newlineIndex(a+s)-a+1;e.formatAt(a,l,r,i[r])}else e.format(r,i[r]);s-=o}))}})),this.scroll.optimize(),this.update((new s.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach((function(r){n.scroll.formatAt(t,e,r,i[r])})),this.update((new s.default).retain(t).retain(e,(0,p.default)(i)))}},{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 s.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((function(t){var e=r(t,1)[0];e instanceof d.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var o=[n,i].map((function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e}));return y.default.apply(y.default,o)}},{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 s.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,i=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(i).forEach((function(r){n.scroll.formatAt(t,e.length,r,i[r])})),this.update((new s.default).retain(t).insert(e,(0,p.default)(i)))}},{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===d.default.blotName&&!(t.children.length>1)&&t.children.head instanceof h.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),o=r(i,2),a=o[0],l=o[1],c=0,f=new s.default;null!=a&&(c=a instanceof u.default?a.newlineIndex(l)-l+1:a.length()-l,f=a.delta().slice(l,l+c-1).insert("\n"));var d=this.getContents(t,e+c).diff((new s.default).insert(n).concat(f)),h=(new s.default).retain(t).concat(d);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,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(g)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),o=(0,f.bubbleFormats)(r),a=r.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),d=(new s.default).insert(u),h=(new s.default).insert(r.value()),p=(new s.default).retain(a).concat(d.diff(h,n));t=p.reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new s.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,v.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce((function(n,i){return null==t[i]||(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}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<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(0)),s=u(n(21)),a=u(n(11)),l=u(n(8));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var d=(0,u(n(10)).default)("quill:selection"),h=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){i.mouseDown||setTimeout(i.update.bind(i,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&&i.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{i.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,r=n.startNode,o=n.startOffset,s=n.endNode,a=n.endOffset;i.setNativeRange(r,o,s,a)}})),this.update(l.default.sources.SILENT)}return r(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&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.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 r=void 0,o=this.scroll.leaf(t),s=i(o,2),a=s[0],l=s[1];if(null==a)return null;var u=a.position(l,!0),c=i(u,2);r=c[0],l=c[1];var f=document.createRange();if(e>0){f.setStart(r,l);var d=this.scroll.leaf(t+e),h=i(d,2);if(a=h[0],l=h[1],null==a)return null;var p=a.position(l,!0),v=i(p,2);return r=v[0],l=v[1],f.setEnd(r,l),f.getBoundingClientRect()}var y="left",m=void 0;return r instanceof Text?(l<r.data.length?(f.setStart(r,l),f.setEnd(r,l+1)):(f.setStart(r,l-1),f.setEnd(r,l),y="right"),m=f.getBoundingClientRect()):(m=a.domNode.getBoundingClientRect(),l>0&&(y="right")),{bottom:m.top+m.height,height:m.height,left:m[y],right:m[y],top:m.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 d.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 r=n.map((function(t){var n=i(t,2),r=n[0],s=n[1],a=o.default.find(r,!0),l=a.offset(e.scroll);return 0===s?l:a instanceof o.default.Container?l+a.length():l+a.index(r,s)})),s=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),a=Math.min.apply(Math,[s].concat(c(r)));return new h(a,s-a)}},{key:"normalizeNative",value:function(t){if(!v(this.root,t.startContainer)||!t.collapsed&&!v(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],r=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var s,a=e.scroll.leaf(t),l=i(a,2),u=l[0],c=l[1],f=u.position(c,0!==n),d=i(f,2);s=d[0],c=d[1],r.push(s,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),s=i(o,1)[0],a=s;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));a=i(l,1)[0]}if(null!=s&&null!=a){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||r||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||i!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,i),o.removeAllRanges(),o.addRange(a)}}else o.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),d.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,c(i).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(),r=i(n,2),o=r[0],u=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var f,d=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(e),t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),t!==l.default.sources.SILENT&&(f=this.emitter).emit.apply(f,d)}}}]),t}();function v(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 i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 u=function(t){function e(){return a(this,e),l(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),r(e,[{key:"insertInto",value:function(t,n){0===t.children.length?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default.Embed);u.blotName="break",u.tagName="BR",e.default=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(44),s=n(30),a=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return r(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof a.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var i=this.children.find(n),r=i[0],o=i[1];return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,o]:r instanceof e?r.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=Number.MAX_VALUE);var r=[],o=i;return this.children.forEachAt(n,i,(function(n,i,s){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&r.push(n),n instanceof e&&(r=r.concat(n.descendants(t,i,o))),o-=s})),r},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,i){this.children.forEachAt(t,e,(function(t,e,r){t.formatAt(e,r,n,i)}))},e.prototype.insertAt=function(t,e,n){var i=this.children.find(t),r=i[0],o=i[1];if(r)r.insertAt(o,e,n);else{var s=null==n?a.create("text",e):a.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var i=this.children.find(t,n),r=i[0],o=i[1],s=[[this,t]];return r instanceof e?s.concat(r.path(o,n)):(null!=r&&s.push([r,o]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},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=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,i,r){t=t.split(i,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,i=[],r=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(i.push.apply(i,t.addedNodes),r.push.apply(r,t.removedNodes))})),r.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),i.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var i=u(t);i.next==e&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,e||void 0))}))},e}(s.default);function u(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),s=n(31),a=n(17),l=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new s.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var i=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(i),i},e.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===i.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,i){var r=t.prototype.wrap.call(this,n,i);return r instanceof e&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},e}(a.default);e.default=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),s=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(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=s.Scope.INLINE_BLOT,e}(o.default);e.default=a},function(t,e,n){var i=n(11),r=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=r(!0,{},e);for(var o in n||(i=Object.keys(i).reduce((function(t,e){return null!=i[e]&&(t[e]=i[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i: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,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),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 i=Object.keys(e).reduce((function(n,i){return void 0===t[i]&&(n[i]=e[i]),n}),{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new s(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 s(t){this.ops=t,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},s.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"},s.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(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{i=Promise}catch(t){i=function(){}}function o(s,l,u,c,f){"object"==typeof l&&(u=l.depth,c=l.prototype,f=l.includeNonEnumerable,l=l.circular);var d=[],h=[],p=void 0!==r;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function s(u,v){if(null===u)return null;if(0===v)return u;var y,m;if("object"!=typeof u)return u;if(t(u,e))y=new e;else if(t(u,n))y=new n;else if(t(u,i))y=new i((function(t,e){u.then((function(e){t(s(e,v-1))}),(function(t){e(s(t,v-1))}))}));else if(o.__isArray(u))y=[];else if(o.__isRegExp(u))y=new RegExp(u.source,a(u)),u.lastIndex&&(y.lastIndex=u.lastIndex);else if(o.__isDate(u))y=new Date(u.getTime());else{if(p&&r.isBuffer(u))return y=r.allocUnsafe?r.allocUnsafe(u.length):new r(u.length),u.copy(y),y;t(u,Error)?y=Object.create(u):void 0===c?(m=Object.getPrototypeOf(u),y=Object.create(m)):(y=Object.create(c),m=c)}if(l){var g=d.indexOf(u);if(-1!=g)return h[g];d.push(u),h.push(y)}for(var b in t(u,e)&&u.forEach((function(t,e){var n=s(e,v-1),i=s(t,v-1);y.set(n,i)})),t(u,n)&&u.forEach((function(t){var e=s(t,v-1);y.add(e)})),u){var _;m&&(_=Object.getOwnPropertyDescriptor(m,b)),_&&null==_.set||(y[b]=s(u[b],v-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(b=0;b<w.length;b++){var O=w[b];(!(k=Object.getOwnPropertyDescriptor(u,O))||k.enumerable||f)&&(y[O]=s(u[O],v-1),k.enumerable||Object.defineProperty(y,O,{enumerable:!1}))}}if(f){var x=Object.getOwnPropertyNames(u);for(b=0;b<x.length;b++){var k,E=x[b];(k=Object.getOwnPropertyDescriptor(u,E))&&k.enumerable||(y[E]=s(u[E],v-1),Object.defineProperty(y,E,{enumerable:!1}))}}return y}(s,u)}function s(t){return Object.prototype.toString.call(t)}function a(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return o.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},o.__objToStr=s,o.__isDate=function(t){return"object"==typeof t&&"[object Date]"===s(t)},o.__isArray=function(t){return"object"==typeof t&&"[object Array]"===s(t)},o.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===s(t)},o.__getRegExpFlags=a,o}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}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<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=h(n(0)),a=h(n(8)),l=n(4),u=h(l),c=h(n(16)),f=h(n(13)),d=h(n(25));function h(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof u.default||t instanceof l.BlockEmbed}var v=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 i=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));return i.emitter=n.emitter,Array.isArray(n.whitelist)&&(i.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),i.domNode.addEventListener("DOMNodeInserted",(function(){})),i.optimize(),i.enable(),i}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:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var r=this.line(t),s=i(r,2),a=s[0],u=s[1],d=this.line(t+n),h=i(d,1)[0];if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=h&&a!==h&&u>0){if(a instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(a instanceof f.default){var p=a.newlineIndex(a.length(),!0);if(p>-1&&(a=a.split(p+1))===h)return void this.optimize()}else if(h instanceof f.default){var v=h.newlineIndex(0);v>-1&&h.split(v+1)}var y=h.children.head instanceof c.default?null:h.children.head;a.moveChildren(h,y),a.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,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==s.default.query(n,s.default.Scope.BLOCK)){var r=s.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var a=s.default.create(n,i);this.appendChild(a)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===s.default.Scope.INLINE_BLOT){var i=s.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(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,i){var r=[],o=i;return e.children.forEachAt(n,i,(function(e,n,i){p(e)?r.push(e):e instanceof s.default.Container&&(r=r.concat(t(e,n,o))),o-=i})),r};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&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(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=a.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,t)}}}]),e}(s.default.Scroll);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[u.default,l.BlockEmbed,d.default],e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="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},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=v(n(21)),a=v(n(11)),l=v(n(3)),u=v(n(2)),c=v(n(20)),f=v(n(0)),d=v(n(5)),h=v(n(10)),p=v(n(9));function v(t){return t&&t.__esModule?t:{default:t}}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m=(0,h.default)("quill:keyboard"),g=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=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 i=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 i.bindings={},Object.keys(i.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&i.options.bindings[e]&&i.addBinding(i.options.bindings[e])})),i.addBinding({key:e.keys.ENTER,shiftKey:null},k),i.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0},O)):(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},O)),i.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},x),i.addBinding({key:e.keys.DELETE},{collapsed:!1},x),i.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),i.listen(),i}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),o(e,null,[{key:"match",value:function(t,e){return e=S(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=S(t);if(null==i||null==i.key)return m.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,s=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==s.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=r(u,2),d=c[0],h=c[1],p=t.quill.getLeaf(l.index),v=r(p,2),y=v[0],m=v[1],g=0===l.length?[y,m]:t.quill.getLeaf(l.index+l.length),b=r(g,2),_=b[0],w=b[1],O=y instanceof f.default.Text?y.value().slice(0,m):"",x=_ instanceof f.default.Text?_.value().slice(w):"",k={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:O,suffix:x};s.some((function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==k.format[t]})))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,a.default)(e.format[t],k.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix)||null!=e.suffix&&!e.suffix.test(k.suffix)||!0===e.handler.call(t,l,k))}))&&n.preventDefault()}}}}))}}]),e}(p.default);function _(t,e){var n,i=t===b.keys.LEFT?"prefix":"suffix";return y(n={key:t,shiftKey:e,altKey:null},i,/^$/),y(n,"handler",(function(n){var i=n.index;t===b.keys.RIGHT&&(i+=n.length+1);var o=this.quill.getLeaf(i);return!(r(o,1)[0]instanceof f.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),1))})),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=r(n,1)[0],o={};if(0===e.offset){var s=this.quill.getLine(t.index-1),a=r(s,1)[0];if(null!=a&&a.length()>1){var l=i.formats(),u=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-f,f,o,d.default.sources.USER),this.quill.focus()}}function O(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},o=0,s=this.quill.getLine(t.index),a=r(s,1)[0];if(e.offset>=a.length()-1){var l=this.quill.getLine(t.index+1),u=r(l,1)[0];if(u){var f=a.formats(),h=this.quill.getFormat(t.index,1);i=c.default.attributes.diff(f,h)||{},o=u.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+o-1,n,i,d.default.sources.USER)}}function x(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),r=e[e.length-1].formats();n=c.default.attributes.diff(r,i)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function k(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce((function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",i,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],d.default.sources.USER))}))}function E(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),i=e.index,o=e.length,s=this.quill.scroll.descendant(n,i),a=r(s,2),l=a[0],u=a[1];if(null!=l){var c=this.quill.getIndex(l),h=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+o),v=l.domNode.textContent.slice(h,p).split("\n");u=0,v.forEach((function(e,r){t?(l.insertAt(h+u,n.TAB),u+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+u,n.TAB.length),u-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),u+=e.length+1})),this.quill.update(d.default.sources.USER),this.quill.setSelection(i,o,d.default.sources.SILENT)}}}}function A(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function S(t){if("string"==typeof t||"number"==typeof t)return S({key:t});if("object"===(void 0===t?"undefined":i(t))&&(t=(0,s.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[g]=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:A("bold"),italic:A("italic"),underline:A("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",d.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",d.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",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.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,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.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=r(e,2),i=n[0],o=n[1],s=(0,l.default)({},i.formats(),{list:"checked"}),a=(new u.default).retain(t.index).insert("\n",s).retain(i.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,d.default.sources.USER),this.quill.setSelection(t.index+1,d.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),i=r(n,2),o=i[0],s=i[1],a=(new u.default).retain(t.index).insert("\n",e.format).retain(o.length()-s-1).retain(1,{header:null});this.quill.updateContents(a,d.default.sources.USER),this.quill.setSelection(t.index+1,d.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,i=this.quill.getLine(t.index),o=r(i,2),s=o[0],a=o[1];if(a>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," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-a).delete(n+1).retain(s.length()-2-a).retain(1,{list:l});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.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=r(e,2),i=n[0],o=n[1],s=(new u.default).retain(t.index+i.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,d.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=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=l(n(0)),a=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var u=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 i=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));return i.selection=n,i.textNode=document.createTextNode(e.CONTENTS),i.domNode.appendChild(i.textNode),i._length=0,i}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),o(e,null,[{key:"value",value:function(){}}]),o(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var i=this,o=0;null!=i&&i.statics.scope!==s.default.Scope.BLOCK_BLOT;)o+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=e.CONTENTS.length,i.optimize(),i.formatAt(o,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];r=u[0],o=u[1],l=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(s.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var f=[o,l].map((function(t){return Math.max(0,Math.min(r.data.length,t-1))})),d=i(f,2);return o=d[0],l=d[1],{startNode:r,startOffset:o,endNode:r,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var i=this.restore();i&&(e.range=i)}}},{key:"value",value:function(){return""}}]),e}(s.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s(n(0)),r=n(4),o=s(r);function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 u=function(t){function e(){return a(this,e),l(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}(i.default.Container);u.allowedChildren=[o.default,r.BlockEmbed,u],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 c=function(t){function e(){return l(this,e),u(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),r(e,[{key:"value",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join("")):n}}]),e}(a.default.Attributor.Style),f=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),d=new c("color","color",{scope:a.default.Scope.INLINE});e.ColorAttributor=c,e.ColorClass=f,e.ColorStyle=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(6);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 u=function(t){function e(){return a(this,e),l(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),r(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return c(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);function c(t,e){var n=document.createElement("a");n.href=t;var i=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(i)>-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=u,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="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},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=a(n(23)),s=a(n(107));function a(t){return t&&t.__esModule?t:{default:t}}var l=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case o.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case o.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=s.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var i=t.buildItem(n);e.appendChild(i),!0===n.selected&&t.selectItem(i)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&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":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}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=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=m(n(0)),r=m(n(5)),o=n(4),s=m(o),a=m(n(16)),l=m(n(25)),u=m(n(24)),c=m(n(35)),f=m(n(6)),d=m(n(22)),h=m(n(7)),p=m(n(55)),v=m(n(42)),y=m(n(23));function m(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":s.default,"blots/block/embed":o.BlockEmbed,"blots/break":a.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":d.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":v.default,"modules/keyboard":y.default}),i.default.register(s.default,a.default,u.default,f.default,d.default,h.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this.domNode=t,this.domNode[i.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 i.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 i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var s=i.create(this.statics.scope);o.wrap(s),s.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},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[i.DATA_KEY]&&delete this.domNode[i.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?i.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?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),r=n(32),o=n(33),s=n(1),a=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=i.default.keys(this.domNode),n=r.default.keys(this.domNode),a=o.default.keys(this.domNode);e.concat(n).concat(a).forEach((function(e){var n=s.query(e,s.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)}))},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=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(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){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(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 s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(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[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return i(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();r.DEFAULTS={modules:{}},r.themes={default:r},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=a(n(0)),s=a(n(7));function a(t){return t&&t.__esModule?t:{default:t}}var l="\ufeff",u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=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));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}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),i(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,i=t.data.split(l).join("");if(t===this.leftGuard)if(this.prev instanceof s.default){var r=this.prev.length();this.prev.insertAt(r,i),e={startNode:this.prev.domNode,startOffset:r+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,i),e={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:i.length}));return t.data=l,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var i=n.restore(t.target);i&&(e.range=i)}}))}}]),e}(o.default.Embed);e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new o.default.Attributor.Attribute("align","align",s),l=new o.default.Attributor.Class("align","ql-align",s),u=new o.default.Attributor.Style("align","text-align",s);e.AlignAttribute=a,e.AlignClass=l,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s=n(26),a=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new s.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},a=new o.default.Attributor.Attribute("direction","dir",s),l=new o.default.Attributor.Class("direction","ql-direction",s),u=new o.default.Attributor.Style("direction","direction",s);e.DirectionAttribute=a,e.DirectionClass=l,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 c={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},f=new a.default.Attributor.Class("font","ql-font",c),d=function(t){function e(){return l(this,e),u(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),r(e,[{key:"value",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(a.default.Attributor.Style),h=new d("font","font-family",c);e.FontStyle=h,e.FontClass=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},s=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=s,e.SizeStyle=a},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(0)),o=s(n(5));function s(t){return t&&t.__esModule?t:{default:t}}var a=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 i=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 i.lastRecorded=0,i.ignoreChange=!1,i.clear(),i.quill.on(o.default.events.EDITOR_CHANGE,(function(t,e,n,r){t!==o.default.events.TEXT_CHANGE||i.ignoreChange||(i.options.userOnly&&r!==o.default.sources.USER?i.transform(e):i.record(e,n))})),i.quill.keyboard.addBinding({key:"Z",shortKey:!0},i.undo.bind(i)),i.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},i.redo.bind(i)),/Win/i.test(navigator.platform)&&i.quill.keyboard.addBinding({key:"Y",shortKey:!0},i.redo.bind(i)),i}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),i(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],o.default.sources.USER),this.ignoreChange=!1;var i=l(n[t]);this.quill.setSelection(i)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;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}(s(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!=r.default.query(t,r.default.Scope.BLOCK)})))}(t)&&(n-=1),n}a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=a,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=p(n(3)),s=p(n(2)),a=p(n(8)),l=p(n(23)),u=p(n(34)),c=p(n(59)),f=p(n(60)),d=p(n(28)),h=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(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}function m(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)}var g=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],_=[!1,"serif","monospace"],w=["1","2","3",!1],O=["small",!1,"large","huge"],x=function(t){function e(t,n){v(this,e);var i=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==i.tooltip||i.tooltip.root.contains(n.target)||document.activeElement===i.tooltip.textbox||i.quill.hasFocus()||i.tooltip.hide(),null!=i.pickers&&i.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),i}return m(e,t),i(e,[{key:"addModule",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var i=t.value||"";null!=i&&e[n][i]&&(t.innerHTML=e[n][i])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&E(t,g),new f.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&E(t,b,"background"===n?"#ffffff":"#000000"),new c.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?E(t,_):t.classList.contains("ql-header")?E(t,w):t.classList.contains("ql-size")&&E(t,O)),new d.default(t)})),this.quill.on(a.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(u.default);x.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var i=t.quill.getSelection(!0);t.quill.updateContents((new s.default).retain(i.index).delete(i.length).insert({image:n.target.result}),a.default.sources.USER),t.quill.setSelection(i.index+1,a.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var k=function(t){function e(t,n){v(this,e);var i=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.textbox=i.root.querySelector('input[type="text"]'),i.listen(),i}return m(e,t),i(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){l.default.match(e,"enter")?(t.save(),e.preventDefault()):l.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&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 i=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,a.default.sources.USER)),this.quill.root.scrollTop=i;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 r=this.quill.getSelection(!0);if(null!=r){var o=r.index+r.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(h.default);function E(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)}))}e.BaseTooltip=k,e.default=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&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,i=this.iterator();n=i();){var r=n.length();if(t<r||e&&t===r&&(null==n.next||0!==n.next.length()))return[n,t];t-=r}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var i,r=this.find(t),o=r[0],s=t-r[1],a=this.iterator(o);(i=a())&&s<t+e;){var l=i.length();t>s?n(i,t-s,Math.min(e,s+l-t)):n(i,0,Math.min(l,t+e-s)),s+=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,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),s=n(1),a={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,a),n.attach(),n}return r(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,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==i&&null!=t.domNode.parentNode&&(null==t.domNode[s.DATA_KEY].mutations&&(t.domNode[s.DATA_KEY].mutations=[]),e&&a(t.parent))},l=function(t){null!=t.domNode[s.DATA_KEY]&&null!=t.domNode[s.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=s.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(s.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=s.find(t,!1);a(e,!1),e instanceof o.default&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(l),r=(u=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=s.find(t.target,!0);return null==e?null:null==e.domNode[s.DATA_KEY].mutations?(e.domNode[s.DATA_KEY].mutations=[t],e):(e.domNode[s.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==i&&null!=t.domNode[s.DATA_KEY]&&t.update(t.domNode[s.DATA_KEY].mutations||[],n)})),null!=this.domNode[s.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||s.query(i,s.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var r=this.next;r instanceof e&&r.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}(i,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=s.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var i=s.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,r){null!=s.query(i,s.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=s.query(n,s.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),o=s.create(n,i);r.parent.insertBefore(o,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=s.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(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,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),s=n(1),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(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,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},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=s.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=s.Scope.INLINE_BLOT,e}(o.default);e.default=a},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.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 i=n.indexOf(t,e);return-1!==i&&i===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),i=n.length>>>0,r=arguments[1],o=0;o<i;o++)if(e=n[o],t.call(r,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){var n=-1;function i(t,e,l){if(t==e)return t?[[0,t]]:[];(l<0||t.length<l)&&(l=null);var c=o(t,e),f=t.substring(0,c);c=s(t=t.substring(c),e=e.substring(c));var d=t.substring(t.length-c),h=function(t,e){var a;if(!t)return[[1,e]];if(!e)return[[n,t]];var l=t.length>e.length?t:e,u=t.length>e.length?e:t,c=l.indexOf(u);if(-1!=c)return a=[[1,l.substring(0,c)],[0,u],[1,l.substring(c+u.length)]],t.length>e.length&&(a[0][0]=a[2][0]=n),a;if(1==u.length)return[[n,t],[1,e]];var f=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length<n.length)return null;function r(t,e,n){for(var i,r,a,l,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";-1!=(c=e.indexOf(u,c+1));){var d=o(t.substring(n),e.substring(c)),h=s(t.substring(0,n),e.substring(0,c));f.length<h+d&&(f=e.substring(c-h,c)+e.substring(c,c+d),i=t.substring(0,n-h),r=t.substring(n+d),a=e.substring(0,c-h),l=e.substring(c+d))}return 2*f.length>=t.length?[i,r,a,l,f]:null}var a,l,u,c,f,d=r(n,i,Math.ceil(n.length/4)),h=r(n,i,Math.ceil(n.length/2));if(!d&&!h)return null;a=h?d&&d[4].length>h[4].length?d:h:d,t.length>e.length?(l=a[0],u=a[1],c=a[2],f=a[3]):(c=a[0],f=a[1],l=a[2],u=a[3]);var p=a[4];return[l,u,c,f,p]}(t,e);if(f){var d=f[0],h=f[1],p=f[2],v=f[3],y=f[4],m=i(d,p),g=i(h,v);return m.concat([[0,y]],g)}return function(t,e){for(var i=t.length,o=e.length,s=Math.ceil((i+o)/2),a=s,l=2*s,u=new Array(l),c=new Array(l),f=0;f<l;f++)u[f]=-1,c[f]=-1;u[a+1]=0,c[a+1]=0;for(var d=i-o,h=d%2!=0,p=0,v=0,y=0,m=0,g=0;g<s;g++){for(var b=-g+p;b<=g-v;b+=2){for(var _=a+b,w=(A=b==-g||b!=g&&u[_-1]<u[_+1]?u[_+1]:u[_-1]+1)-b;A<i&&w<o&&t.charAt(A)==e.charAt(w);)A++,w++;if(u[_]=A,A>i)v+=2;else if(w>o)p+=2;else if(h&&(k=a+d-b)>=0&&k<l&&-1!=c[k]&&A>=(x=i-c[k]))return r(t,e,A,w)}for(var O=-g+y;O<=g-m;O+=2){for(var x,k=a+O,E=(x=O==-g||O!=g&&c[k-1]<c[k+1]?c[k+1]:c[k-1]+1)-O;x<i&&E<o&&t.charAt(i-x-1)==e.charAt(o-E-1);)x++,E++;if(c[k]=x,x>i)m+=2;else if(E>o)y+=2;else if(!h){var A;if((_=a+d-O)>=0&&_<l&&-1!=u[_])if(w=a+(A=u[_])-_,A>=(x=i-x))return r(t,e,A,w)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-c),e=e.substring(0,e.length-c));return f&&h.unshift([0,f]),d&&h.push([0,d]),a(h),null!=l&&(h=function(t,e){var i=function(t,e){if(0===e)return[0,t];for(var i=0,r=0;r<t.length;r++){var o=t[r];if(o[0]===n||0===o[0]){var s=i+o[1].length;if(e===s)return[r+1,t];if(e<s){t=t.slice();var a=e-i,l=[o[0],o[1].slice(0,a)],u=[o[0],o[1].slice(a)];return t.splice(r,1,l,u),[r+1,t]}i=s}}throw new Error("cursor_pos is out of bounds!")}(t,e),r=i[1],o=i[0],s=r[o],a=r[o+1];if(null==s)return t;if(0!==s[0])return t;if(null!=a&&s[1]+a[1]===a[1]+s[1])return r.splice(o,2,a,s),u(r,o,2);if(null!=a&&0===a[1].indexOf(s[1])){r.splice(o,2,[a[0],s[1]],[0,s[1]]);var l=a[1].slice(s[1].length);return l.length>0&&r.splice(o+2,0,[a[0],l]),u(r,o,3)}return t}(h,l)),h=function(t){for(var e=!1,i=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319},o=2;o<t.length;o+=1)0===t[o-2][0]&&r(t[o-2][1])&&t[o-1][0]===n&&i(t[o-1][1])&&1===t[o][0]&&i(t[o][1])&&(e=!0,t[o-1][1]=t[o-2][1].slice(-1)+t[o-1][1],t[o][1]=t[o-2][1].slice(-1)+t[o][1],t[o-2][1]=t[o-2][1].slice(0,-1));if(!e)return t;var s=[];for(o=0;o<t.length;o+=1)t[o][1].length>0&&s.push(t[o]);return s}(h)}function r(t,e,n,r){var o=t.substring(0,n),s=e.substring(0,r),a=t.substring(n),l=e.substring(r),u=i(o,s),c=i(a,l);return u.concat(c)}function o(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(o,r)==e.substring(o,r)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function s(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(t.length-r,t.length-o)==e.substring(e.length-r,e.length-o)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function a(t){t.push([0,""]);for(var e,i=0,r=0,l=0,u="",c="";i<t.length;)switch(t[i][0]){case 1:l++,c+=t[i][1],i++;break;case n:r++,u+=t[i][1],i++;break;case 0:r+l>1?(0!==r&&0!==l&&(0!==(e=o(c,u))&&(i-r-l>0&&0==t[i-r-l-1][0]?t[i-r-l-1][1]+=c.substring(0,e):(t.splice(0,0,[0,c.substring(0,e)]),i++),c=c.substring(e),u=u.substring(e)),0!==(e=s(c,u))&&(t[i][1]=c.substring(c.length-e)+t[i][1],c=c.substring(0,c.length-e),u=u.substring(0,u.length-e))),0===r?t.splice(i-l,r+l,[1,c]):0===l?t.splice(i-r,r+l,[n,u]):t.splice(i-r-l,r+l,[n,u],[1,c]),i=i-r-l+(r?1:0)+(l?1:0)+1):0!==i&&0==t[i-1][0]?(t[i-1][1]+=t[i][1],t.splice(i,1)):i++,l=0,r=0,u="",c=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(i=1;i<t.length-1;)0==t[i-1][0]&&0==t[i+1][0]&&(t[i][1].substring(t[i][1].length-t[i-1][1].length)==t[i-1][1]?(t[i][1]=t[i-1][1]+t[i][1].substring(0,t[i][1].length-t[i-1][1].length),t[i+1][1]=t[i-1][1]+t[i+1][1],t.splice(i-1,1),f=!0):t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]&&(t[i-1][1]+=t[i+1][1],t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1],t.splice(i+1,1),f=!0)),i++;f&&a(t)}var l=i;function u(t,e,n){for(var i=e+n-1;i>=0&&i>=e-1;i--)if(i+1<t.length){var r=t[i],o=t[i+1];r[0]===o[1]&&t.splice(i,2,[r[0],r[1]+o[1]])}return t}l.INSERT=1,l.DELETE=n,l.EQUAL=0,t.exports=l},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?i:r).supported=i,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t,e){var n=i?i+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,a=new Array(s);o<s;o++)a[o]=r[o].fn;return a},s.prototype.emit=function(t,e,n,r,o,s){var a=i?i+t:t;if(!this._events[a])return!1;var l,u,c=this._events[a],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,o),!0;case 6:return c.fn.call(c.context,e,n,r,o,s),!0}for(u=1,l=new Array(f-1);u<f;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!l)for(d=1,l=new Array(f-1);d<f;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(t,e,n){var r=new o(e,n||this),s=i?i+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):(this._events[s]=r,this._eventsCount++),this},s.prototype.once=function(t,e,n){var r=new o(e,n||this,!0),s=i?i+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):(this._events[s]=r,this._eventsCount++),this},s.prototype.removeListener=function(t,e,n,o){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return 0==--this._eventsCount?this._events=new r:delete this._events[s],this;var a=this._events[s];if(a.fn)a.fn!==e||o&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new r:delete this._events[s]);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==e||o&&!a[l].once||n&&a[l].context!==n)&&u.push(a[l]);u.length?this._events[s]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[s]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=i,s.EventEmitter=s,void 0!==t&&(t.exports=s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var i="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},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=b(n(3)),a=b(n(2)),l=b(n(0)),u=b(n(5)),c=b(n(10)),f=b(n(9)),d=n(36),h=n(37),p=b(n(13)),v=n(26),y=n(38),m=n(39),g=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,c.default)("quill:clipboard"),O="__ql-matcher",x=[[Node.TEXT_NODE,M],[Node.TEXT_NODE,I],["br",function(t,e){return T(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,q],[Node.ELEMENT_NODE,P],[Node.ELEMENT_NODE,function(t,e){var n={},i=t.style||{};return i.fontStyle&&"italic"===C(t).fontStyle&&(n.italic=!0),i.fontWeight&&(C(t).fontWeight.startsWith("bold")||parseInt(C(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=S(e,n)),parseFloat(i.textIndent||0)>0&&(e=(new a.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!T(e,"\n"))return e;for(var i=-1,r=t.parentNode;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(i+=1),r=r.parentNode;return i<=0?e:e.compose((new a.default).retain(e.length()-1).retain(1,{indent:i}))}],["b",L.bind(L,"bold")],["i",L.bind(L,"italic")],["style",function(){return new a.default}]],k=[d.AlignAttribute,y.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),E=[d.AlignStyle,h.BackgroundStyle,v.ColorStyle,y.DirectionStyle,m.FontStyle,g.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),A=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 i=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 i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],x.concat(i.options.matchers).forEach((function(t){var e=r(t,2),o=e[0],s=e[1];(n.matchVisual||s!==q)&&i.addMatcher(o,s)})),i}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),o(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 +\</g,"><"),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 a.default).insert(n,_({},p.default.blotName,e[p.default.blotName]))}var i=this.prepareMatching(),o=r(i,2),s=o[0],l=o[1],u=N(this.container,s,l);return T(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var i=this.convert(e);this.quill.updateContents((new a.default).retain(t).concat(i),n),this.quill.setSelection(t+i.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new a.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){i=i.concat(e.convert()).delete(n.length),e.quill.updateContents(i,u.default.sources.USER),e.quill.setSelection(i.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=r,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(i){var o=r(i,2),s=o[0],a=o[1];switch(s){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:e.push(a);break;default:[].forEach.call(t.container.querySelectorAll(s),(function(t){t[O]=t[O]||[],t[O].push(a)}))}})),[e,n]}}]),e}(f.default);function S(t,e,n){return"object"===(void 0===e?"undefined":i(e))?Object.keys(e).reduce((function(t,n){return S(t,n,e[n])}),t):t.reduce((function(t,i){return i.attributes&&i.attributes[e]?t.push(i):t.insert(i.insert,(0,s.default)({},_({},e,n),i.attributes))}),new a.default)}function C(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};var e="__ql-computed-style";return t[e]||(t[e]=window.getComputedStyle(t))}function T(t,e){for(var n="",i=t.ops.length-1;i>=0&&n.length<e.length;--i){var r=t.ops[i];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*e.length)===e}function j(t){if(0===t.childNodes.length)return!1;var e=C(t);return["block","list-item"].indexOf(e.display)>-1}function N(t,e,n){return t.nodeType===t.TEXT_NODE?n.reduce((function(e,n){return n(t,e)}),new a.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],(function(i,r){var o=N(r,e,n);return r.nodeType===t.ELEMENT_NODE&&(o=e.reduce((function(t,e){return e(r,t)}),o),o=(r[O]||[]).reduce((function(t,e){return e(r,t)}),o)),i.concat(o)}),new a.default):new a.default}function L(t,e,n){return S(n,t,!0)}function P(t,e){var n=l.default.Attributor.Attribute.keys(t),i=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),o={};return n.concat(i).concat(r).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(n=E[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=S(e,o)),e}function D(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var i={},r=n.value(t);null!=r&&(i[n.blotName]=r,e=(new a.default).insert(i,n.formats(t)))}else"function"==typeof n.formats&&(e=S(e,n.blotName,n.formats(t)));return e}function I(t,e){return T(e,"\n")||(j(t)||e.length()>0&&t.nextSibling&&j(t.nextSibling))&&e.insert("\n"),e}function q(t,e){if(j(t)&&null!=t.nextElementSibling&&!T(e,"\n\n")){var n=t.offsetHeight+parseFloat(C(t).marginTop)+parseFloat(C(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(!C(t.parentNode).whiteSpace.startsWith("pre")){var i=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,i.bind(i,!0)),(null==t.previousSibling&&j(t.parentNode)||null!=t.previousSibling&&j(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&j(t.parentNode)||null!=t.nextSibling&&j(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}A.DEFAULTS={matchers:[],matchVisual:!0},e.default=A,e.matchAttributor=P,e.matchBlot=D,e.matchNewline=I,e.matchSpacing=q,e.matchText=M},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(6);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 u=function(t){function e(){return a(this,e),l(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),r(e,[{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);u.blotName="bold",u.tagName=["STRONG","B"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}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<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=c(n(2)),s=c(n(0)),a=c(n(5)),l=c(n(10)),u=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function f(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 d=(0,l.default)("quill:toolbar"),h=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 r,o=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var s=document.createElement("div");v(s,o.options.container),t.container.parentNode.insertBefore(s,t.container),o.container=s}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(t){o.addHandler(t,o.options.handlers[t])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(t){o.attach(t)})),o.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e){t===a.default.events.SELECTION_CHANGE&&o.update(e)})),o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){var t=o.quill.selection.getRange(),e=i(t,1)[0];o.update(e)})),o):(r=d.error("Container required for toolbar",o.options),f(o,r))}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:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void d.warn("ignoring attaching to disabled format",n,t);if(null==s.default.query(n))return void d.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(function(r){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var u=t.options[t.selectedIndex];l=!u.hasAttribute("selected")&&(u.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),f=i(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(s.default.query(n).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new o.default).retain(f.index).delete(f.length).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}({},n,l)),a.default.sources.USER)}else e.quill.format(n,l,a.default.sources.USER);e.update(f)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var r=i(n,2),o=r[0],s=r[1];if("SELECT"===s.tagName){var a=void 0;if(null==t)a=null;else if(null==e[o])a=s.querySelector("option[selected]");else if(!Array.isArray(e[o])){var l=e[o];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),a=s.querySelector('option[value="'+l+'"]')}null==a?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(null==t)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var u=e[o]===s.getAttribute("value")||null!=e[o]&&e[o].toString()===s.getAttribute("value")||null==e[o]&&!s.getAttribute("value");s.classList.toggle("ql-active",u)}else s.classList.toggle("ql-active",null!=e[o])}))}}]),e}(u.default);function p(t,e,n){var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("ql-"+e),null!=n&&(i.value=n),t.appendChild(i)}function v(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],i=t[e];Array.isArray(i)?function(t,e,n){var i=document.createElement("select");i.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),i.appendChild(e)})),t.appendChild(i)}(n,e,i):p(n,e,i)}})),t.appendChild(n)}))}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=s.default.query(e,s.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,a.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",a.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",t,a.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),i=parseInt(n.indent||0);if("+1"===t||"-1"===t){var r="+1"===t?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",i+r,a.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,a.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",t,a.default.sources.USER)}}},e.default=h,e.addControls=v},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(28),a=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 i=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));return i.label.innerHTML=n,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),i}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:"buildItem",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var i=this.label.querySelector(".ql-color-label"),r=t&&t.getAttribute("data-value")||"";i&&("line"===i.tagName?i.style.stroke=r:i.style.fill=r)}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(28),a=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 i=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));return i.container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}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:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){i.root.style.marginTop=-1*i.quill.root.scrollTop+"px"})),this.hide()}return i(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var i=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),o=0;if(r.right>i.right&&(o=i.right-r.right,this.root.style.left=e+o+"px"),r.left<i.left&&(o=i.left-r.left,this.root.style.left=e+o+"px"),r.bottom>i.bottom){var s=r.bottom-r.top,a=t.bottom-t.top+s;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=h(n(3)),a=h(n(8)),l=n(43),u=h(l),c=h(n(27)),f=n(15),d=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(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}function y(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)}var m=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],g=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var i=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-snow"),i}return y(e,t),o(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),d.default),this.tooltip=new b(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(u.default);g.DEFAULTS=(0,s.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){p(this,e);var i=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.preview=i.root.querySelector("a.ql-preview"),i}return y(e,t),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,a.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(e,n,r){if(null!=e){if(0===e.length&&r===a.default.sources.USER){var o=t.quill.scroll.descendant(c.default,e.index),s=i(o,2),l=s[0],u=s[1];if(null!=l){t.linkRange=new f.Range(e.index-u,l.length());var d=c.default.formats(l.domNode);return t.preview.textContent=d,t.preview.setAttribute("href",d),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(l.BaseTooltip);b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=I(n(29)),r=n(36),o=n(38),s=n(64),a=I(n(65)),l=I(n(66)),u=n(67),c=I(u),f=n(37),d=n(26),h=n(39),p=n(40),v=I(n(56)),y=I(n(68)),m=I(n(27)),g=I(n(69)),b=I(n(70)),_=I(n(71)),w=I(n(72)),O=I(n(73)),x=n(13),k=I(x),E=I(n(74)),A=I(n(75)),S=I(n(57)),C=I(n(41)),T=I(n(28)),j=I(n(59)),N=I(n(60)),L=I(n(61)),P=I(n(108)),D=I(n(62));function I(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":r.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":s.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":a.default,"formats/code-block":k.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":v.default,"formats/code":x.Code,"formats/italic":y.default,"formats/link":m.default,"formats/script":g.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":w.default,"formats/video":O.default,"formats/list/item":u.ListItem,"modules/formula":E.default,"modules/syntax":A.default,"modules/toolbar":S.default,"themes/bubble":P.default,"themes/snow":D.default,"ui/icons":C.default,"ui/picker":T.default,"ui/icon-picker":N.default,"ui/color-picker":j.default,"ui/tooltip":L.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(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 c=function(t){function e(){return l(this,e),u(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),r(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var i=this.value(t)||0;n="+1"===n?i+1:i-1}return 0===n?(this.remove(t),!0):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(a.default.Attributor.Class),f=new c("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(4);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 a=function(t){function e(){return o(this,e),s(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}(((i=r)&&i.__esModule?i:{default:i}).default);a.blotName="blockquote",a.tagName="blockquote",e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(4);function s(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 l=function(t){function e(){return s(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),r(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(((i=o)&&i.__esModule?i:{default:i}).default);l.blotName="header",l.tagName=["H1","H2","H3","H4","H5","H6"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=l(n(0)),s=l(n(4)),a=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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}function f(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)}var d=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),i(e,[{key:"format",value:function(t,n){t!==h.blotName||n?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:r(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(s.default);d.blotName="list-item",d.tagName="LI";var h=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),i=function(e){if(e.target.parentNode===t){var i=n.statics.formats(t),r=o.default.find(e.target);"checked"===i?r.format("list","unchecked"):"unchecked"===i&&r.format("list","checked")}};return t.addEventListener("touchstart",i),t.addEventListener("mousedown",i),n}return f(e,t),i(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",i=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||i.setAttribute("data-checked","checked"===t),i}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),i(e,[{key:"format",value:function(t,e){this.children.length>0&&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 d)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),o=this.split(i);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){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&&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=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(a.default);h.blotName="list",h.scope=o.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[d],e.ListItem=d,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(56);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 a=function(t){function e(){return o(this,e),s(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}(((i=r)&&i.__esModule?i:{default:i}).default);a.blotName="italic",a.tagName=["EM","I"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(6);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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 u=function(t){function e(){return a(this,e),l(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),r(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(((i=s)&&i.__esModule?i:{default:i}).default);u.blotName="script",u.tagName=["SUB","SUP"],e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 a=function(t){function e(){return o(this,e),s(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}(((i=r)&&i.__esModule?i:{default:i}).default);a.blotName="strike",a.tagName="S",e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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 a=function(t){function e(){return o(this,e),s(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}(((i=r)&&i.__esModule?i:{default:i}).default);a.blotName="underline",a.tagName="U",e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(0),a=(i=s)&&i.__esModule?i:{default:i},l=n(27);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f=["alt","height","width"],d=function(t){function e(){return u(this,e),c(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),r(e,[{key:"format",value:function(t,n){f.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(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 f.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}(a.default.Embed);d.blotName="image",d.tagName="IMG",e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},s=n(4),a=n(27),l=(i=a)&&i.__esModule?i:{default:i};function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 f=["height","width"],d=function(t){function e(){return u(this,e),c(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),r(e,[{key:"format",value:function(t,n){f.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(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 f.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}(s.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=l(n(35)),s=l(n(5)),a=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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}function f(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)}var d=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),i(e,null,[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(o.default);d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var h=function(t){function e(){u(this,e);var t=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return f(e,t),i(e,null,[{key:"register",value:function(){s.default.register(d,!0)}}]),e}(a.default);e.FormulaBlot=d,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},o=l(n(0)),s=l(n(5)),a=l(n(9));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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}function f(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)}var d=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,t),i(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(l(n(13)).default);d.className="ql-syntax";var h=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var i=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return i.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){i.highlight(),r=null}),i.options.interval)})),i.highlight(),i}return f(e,t),i(e,null,[{key:"register",value:function(){s.default.register(h,!0),s.default.register(d,!0)}}]),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(s.default.sources.SILENT),null!=e&&this.quill.setSelection(e,s.default.sources.SILENT)}}}]),e}(a.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=h,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=f(n(3)),s=f(n(8)),a=n(43),l=f(a),u=n(15),c=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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}function p(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)}var v=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],y=function(t){function e(t,n){d(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var i=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-bubble"),i}return p(e,t),r(e,[{key:"extendToolbar",value:function(t){this.tooltip=new m(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}(l.default);y.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var m=function(t){function e(t,n){d(this,e);var i=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.on(s.default.events.EDITOR_CHANGE,(function(t,e,n,r){if(t===s.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===s.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var o=i.quill.getLines(e.index,e.length);if(1===o.length)i.position(i.quill.getBounds(e));else{var a=o[o.length-1],l=i.quill.getIndex(a),c=Math.min(a.length()-1,e.index+e.length-l),f=i.quill.getBounds(new u.Range(l,c));i.position(f)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()})),i}return p(e,t),r(e,[{key:"listen",value:function(){var t=this;i(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(s.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=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(a.BaseTooltip);m.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=m,e.default=y},function(t,e,n){t.exports=n(63)}]).default},t.exports=i()},27274:function(t,e){var n,i,r;i=[],void 0===(r="function"==typeof(n=function(){var t=/(auto|scroll)/,e=function(t,n){return null===t.parentNode?n:e(t.parentNode,n.concat([t]))},n=function(t,e){return getComputedStyle(t,null).getPropertyValue(e)},i=function(t){return n(t,"overflow")+n(t,"overflow-y")+n(t,"overflow-x")},r=function(e){return t.test(i(e))};return function(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var n=e(t.parentNode,[]),i=0;i<n.length;i+=1)if(r(n[i]))return n[i];return document.scrollingElement||document.documentElement}}})?n.apply(e,i):n)||(t.exports=r)},37332:(t,e,n)=>{"use strict";n.d(e,{Z:()=>f});const i={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,i=(t.pageY||t.clientY+document.documentElement.scrollTop)-this.mouseY;if("number"==typeof this.tmpSize)e="bottom"==this.placement?this.reverse?this.tmpSize-i:this.tmpSize+i: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:i},offset:this.offset})}},handleUp:function(){this.resizing&&(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}};var r=n(93379),o=n.n(r),s=n(63409),a={insert:"head",singleton:!1};o()(s.Z,a);s.Z.locals;var l=n(51900);const u={name:"DrawerOverlayView",components:{ResizeLine:(0,l.Z)(i,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("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 c={name:"DrawerOverlay",components:{DrawerOverlayView:(0,l.Z)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"body",staticClass:"overlay-body",style:t.bodyStyle},[n("div",{staticClass:"overlay-close"},[n("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.onClose.apply(null,arguments)}}},[n("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[n("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?n("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(" "),n("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},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)}},methods:{onClose:function(){this.$refs.modal.close()}}};const f=(0,l.Z)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{ref:"modal",attrs:{closable:t.escClosable,"mask-closable":t.maskClosable,"footer-hide":!0,"transition-names":["drawer-slide-"+t.placement,""],beforeClose:t.beforeClose,fullscreen:"","class-name":"common-drawer-overlay "+t.placement},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[n("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},57127:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(80641);const r={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},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0}},data:function(){return{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=i.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)}},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},take:30}}).then((function(n){var i=n.data;e.list=i;var r=e.searchHistory.findIndex((function(e){return e.key==t})),o={key:t,data:i,time:$A.Time()};r>-1?e.searchHistory.splice(r,1,o):e.searchHistory.push(o)})).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 o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("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?n("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(e,i){return n("Option",{key:i,attrs:{value:e.userid,"key-value":e.email,label:e.nickname,avatar:e.userimg,disabled:t.isDisabled(e.userid)}},[n("div",{staticClass:"user-input-option"},[n("div",{staticClass:"user-input-avatar"},[n("EAvatar",{staticClass:"avatar",attrs:{src:e.userimg}})],1),t._v(" "),n("div",{staticClass:"user-input-nickname"},[t._v(t._s(e.nickname))]),t._v(" "),n("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(e.userid))])])])}))],2),t._v(" "),t.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},80803:(t,e,n)=>{"use strict";n.d(e,{Z:()=>R});var i=n(20629),r=n(76095),o=n.n(r);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},c.apply(this,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return p(this,n)}}function y(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=y(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},m.apply(this,arguments)}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}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 o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var _=9,w=13,O=27,x=38,k=40;function E(t,e,n){var i=t;return Object.keys(e).forEach((function(t){n.indexOf(t)>-1?i.dataset[t]=e[t]:delete i.dataset[t]})),i}var A=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&&d(t,e)}(n,t);var e=v(n);function n(t,i){var r;return s(this,n),u(h(r=e.call(this,t,i)),"hoverHandler",void 0),u(h(r),"hoverHandler",void 0),r.clickHandler=null,r.hoverHandler=null,r.mounted=!1,r}return l(n,[{key:"attach",value:function(){m(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(){m(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=c({},this.domNode.dataset),n.event=e,n}}],[{key:"create",value:function(t){var e=m(f(n),"create",this).call(this),i=document.createElement("span");return i.className="ql-mention-denotation-char",i.innerHTML=t.denotationChar,e.appendChild(i),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}(o().import("blots/embed"));A.blotName="mention",A.tagName="span",A.className="mention",o().register(A);var S=function(){function t(e,n){var i=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:[w]},c(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();i.onSelectionChange(t)}))})),e.keyboard.addBinding({key:_},this.selectHandler.bind(this)),e.keyboard.bindings[_].unshift(e.keyboard.bindings[_].pop());var r,o=b(this.options.selectKeys);try{for(o.s();!(r=o.n()).done;){var a=r.value;e.keyboard.addBinding({key:a},this.selectHandler.bind(this))}}catch(t){o.e(t)}finally{o.f()}e.keyboard.bindings[w].unshift(e.keyboard.bindings[w].pop()),e.keyboard.addBinding({key:O},this.escapeHandler.bind(this)),e.keyboard.addBinding({key:x},this.upHandler.bind(this)),e.keyboard.addBinding({key:k},this.downHandler.bind(this))}return l(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;e<this.mentionList.childNodes.length;e+=1)this.mentionList.childNodes[e].classList.remove("selected");if(-1!==this.itemIndex&&"true"!==this.mentionList.childNodes[this.itemIndex].dataset.disabled&&(this.mentionList.childNodes[this.itemIndex].classList.add("selected"),this.quill.root.setAttribute("aria-activedescendant",this.mentionList.childNodes[this.itemIndex].id),t)){var n=this.mentionList.childNodes[this.itemIndex].offsetHeight,i=this.mentionList.childNodes[this.itemIndex].offsetTop,r=this.mentionContainer.scrollTop,o=r+this.mentionContainer.offsetHeight;i<r?this.mentionContainer.scrollTop=i:i>o-n&&(this.mentionContainer.scrollTop+=i-o+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='<a href="'.concat(t,'" target=').concat(n||this.options.linkTarget,">").concat(this.mentionList.childNodes[this.itemIndex].dataset.value)),this.mentionList.childNodes[this.itemIndex].dataset}},{key:"onContainerMouseMove",value:function(){this.suspendMouseEnter=!1}},{key:"selectItem",value:function(){var t=this;if(-1!==this.itemIndex){var e=this.getItemData();e.disabled||(this.options.onSelect(e,(function(e){t.insertItem(e)})),this.hideMentionList())}}},{key:"insertItem",value:function(t,e){var n,i=t;null!==i&&(this.options.showDenotationChar||(i.denotationChar=""),e?n=this.cursorPos:(n=this.mentionCharPos,this.quill.deleteText(this.mentionCharPos,this.cursorPos-this.mentionCharPos,o().sources.USER)),this.quill.insertEmbed(n,this.options.blotName,i,o().sources.USER),this.options.spaceAfterInsert?(this.quill.insertText(n+1," ",o().sources.USER),this.quill.setSelection(n+2,o().sources.USER)):this.quill.setSelection(n+1,o().sources.USER),this.hideMentionList())}},{key:"onItemMouseEnter",value:function(t){if(!this.suspendMouseEnter){var e=Number(t.target.dataset.index);Number.isNaN(e)||e===this.itemIndex||(this.itemIndex=e,this.highlightItem(!1))}}},{key:"onDisabledItemMouseEnter",value:function(t){this.suspendMouseEnter||(this.itemIndex=-1,this.highlightItem(!1))}},{key:"onItemClick",value:function(t){0===t.button&&(t.preventDefault(),t.stopImmediatePropagation(),this.itemIndex=t.currentTarget.dataset.index,this.highlightItem(),this.selectItem())}},{key:"onItemMouseDown",value:function(t){t.preventDefault(),t.stopImmediatePropagation()}},{key:"renderLoading",value:function(){if(this.options.renderLoading())if(this.mentionContainer.getElementsByClassName("ql-mention-loading").length>0)this.showMentionList();else{this.mentionList.innerHTML="";var t=document.createElement("div");t.className="ql-mention-loading",t.innerHTML=this.options.renderLoading(),this.mentionContainer.append(t),this.showMentionList()}}},{key:"removeLoading",value:function(){var t=this.mentionContainer.getElementsByClassName("ql-mention-loading");t.length>0&&t[0].remove()}},{key:"renderList",value:function(t,e,n){if(e&&e.length>0){this.removeLoading(),this.values=e,this.mentionList.innerHTML="";for(var i=-1,r=0;r<e.length;r+=1){var o=document.createElement("li");o.id="quill-mention-item-"+r,o.className=this.options.listItemClass?this.options.listItemClass:"",e[r].disabled?(o.className+=" disabled",o.setAttribute("aria-hidden","true")):-1===i&&(i=r),o.dataset.index=r,o.innerHTML=this.options.renderItem(e[r],n),e[r].disabled?o.onmouseenter=this.onDisabledItemMouseEnter.bind(this):(o.onmouseenter=this.onItemMouseEnter.bind(this),o.onmouseup=this.onItemClick.bind(this),o.onmousedown=this.onItemMouseDown.bind(this)),o.dataset.denotationChar=t,this.mentionList.appendChild(E(o,e[r],this.options.dataAttributes))}this.itemIndex=i,this.highlightItem(),this.showMentionList()}else this.hideMentionList()}},{key:"nextItem",value:function(){var t,e=0;do{e++,t=(this.itemIndex+e)%this.values.length;var n="true"===this.mentionList.childNodes[t].dataset.disabled;if(e===this.values.length+1){t=-1;break}}while(n);this.itemIndex=t,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"prevItem",value:function(){var t,e=0;do{e++,t=(this.itemIndex+this.values.length-e)%this.values.length;var n="true"===this.mentionList.childNodes[t].dataset.disabled;if(e===this.values.length+1){t=-1;break}}while(n);this.itemIndex=t,this.suspendMouseEnter=!0,this.highlightItem()}},{key:"containerBottomIsNotVisible",value:function(t,e){return t+this.mentionContainer.offsetHeight+e.top>window.pageYOffset+window.innerHeight}},{key:"containerRightIsNotVisible",value:function(t,e){return!this.options.fixMentionsToQuill&&t+this.mentionContainer.offsetWidth+e.left>window.pageXOffset+document.documentElement.clientWidth}},{key:"setIsOpen",value:function(t){this.isOpen!==t&&(t?this.options.onOpen():this.options.onClose(),this.isOpen=t)}},{key:"setMentionContainerPosition",value:function(){"fixed"===this.options.positioningStrategy?this.setMentionContainerPosition_Fixed():this.setMentionContainerPosition_Normal()}},{key:"setMentionContainerPosition_Normal",value:function(){var t=this,e=this.quill.container.getBoundingClientRect(),n=this.quill.getBounds(this.mentionCharPos),i=this.mentionContainer.offsetHeight,r=this.options.offsetTop,o=this.options.offsetLeft;if(this.options.fixMentionsToQuill){this.mentionContainer.style.right="".concat(0,"px")}else o+=n.left;if(this.containerRightIsNotVisible(o,e)){var s=this.mentionContainer.offsetWidth+this.options.offsetLeft;o=e.width-s}if("top"===this.options.defaultMenuOrientation){if((r=this.options.fixMentionsToQuill?-1*(i+this.options.offsetTop):n.top-(i+this.options.offsetTop))+e.top<=0){var a=this.options.offsetTop;this.options.fixMentionsToQuill?a+=e.height:a+=n.bottom,r=a}}else if(this.options.fixMentionsToQuill?r+=e.height:r+=n.bottom,this.containerBottomIsNotVisible(r,e)){var l=-1*this.options.offsetTop;this.options.fixMentionsToQuill||(l+=n.top),r=l-i}r>=0?this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-bottom")),t.mentionContainer.classList.remove("".concat(e,"-top"))})):this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-top")),t.mentionContainer.classList.remove("".concat(e,"-bottom"))})),this.mentionContainer.style.top="".concat(r,"px"),this.mentionContainer.style.left="".concat(o,"px"),this.mentionContainer.style.visibility="visible"}},{key:"setMentionContainerPosition_Fixed",value:function(){var t=this;this.mentionContainer.style.position="fixed",this.mentionContainer.style.height=null;var e=this.quill.container.getBoundingClientRect(),n=this.quill.getBounds(this.mentionCharPos),i={left:e.left+n.left,top:e.top+n.top,width:0,height:n.height},r=this.options.fixMentionsToQuill?e:i,o=this.options.offsetTop,s=this.options.offsetLeft;if(this.options.fixMentionsToQuill){var a=r.right;this.mentionContainer.style.right="".concat(a,"px")}else(s+=r.left)+this.mentionContainer.offsetWidth>document.documentElement.clientWidth&&(s-=s+this.mentionContainer.offsetWidth-document.documentElement.clientWidth);var l=r.top,u=document.documentElement.clientHeight-(r.top+r.height),c=this.mentionContainer.offsetHeight<=u,f=this.mentionContainer.offsetHeight<=l;"bottom"===("top"===this.options.defaultMenuOrientation&&f?"top":"bottom"===this.options.defaultMenuOrientation&&c||u>l?"bottom":"top")?(o=r.top+r.height,c||(this.mentionContainer.style.height=u-3+"px"),this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-bottom")),t.mentionContainer.classList.remove("".concat(e,"-top"))}))):(o=r.top-this.mentionContainer.offsetHeight,f||(this.mentionContainer.style.height=l-3+"px",o=3),this.options.mentionContainerClass.split(" ").forEach((function(e){t.mentionContainer.classList.add("".concat(e,"-top")),t.mentionContainer.classList.remove("".concat(e,"-bottom"))}))),this.mentionContainer.style.top="".concat(o,"px"),this.mentionContainer.style.left="".concat(s,"px"),this.mentionContainer.style.visibility="visible"}},{key:"getTextBeforeCursor",value:function(){var t=Math.max(0,this.cursorPos-this.options.maxChars);return this.quill.getText(t,this.cursorPos-t)}},{key:"onSomethingChange",value:function(){var t=this,e=this.quill.getSelection();if(null!=e){this.cursorPos=e.index;var n,i=this.getTextBeforeCursor(),r=(n=i,this.options.mentionDenotationChars.reduce((function(t,e){var i=n.lastIndexOf(e);return i>t.mentionCharIndex?{mentionChar:e,mentionCharIndex:i}:{mentionChar:t.mentionChar,mentionCharIndex:t.mentionCharIndex}}),{mentionChar:null,mentionCharIndex:-1})),o=r.mentionChar,s=r.mentionCharIndex;if(function(t,e,n){return t>-1&&!(n&&0!==t&&!e[t-1].match(/\s/g))}(s,i,this.options.isolateCharacter)){var a=this.cursorPos-(i.length-s);this.mentionCharPos=a;var l=i.substring(s+o.length);if(l.length>=this.options.minChars&&function(t,e){return e.test(t)}(l,this.getAllowedCharsRegex(o))){this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.renderLoading();var u={abandoned:!1};this.existingSourceExecutionToken=u,this.options.source(l,(function(e,n){u.abandoned||(t.existingSourceExecutionToken=null,t.renderList(o,e,n))}),o)}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}else this.existingSourceExecutionToken&&(this.existingSourceExecutionToken.abandoned=!0),this.hideMentionList()}}},{key:"getAllowedCharsRegex",value:function(t){return this.options.allowedChars instanceof RegExp?this.options.allowedChars:this.options.allowedChars(t)}},{key:"onTextChange",value:function(t,e,n){"user"===n&&this.onSomethingChange()}},{key:"onSelectionChange",value:function(t){t&&0===t.length?this.onSomethingChange():this.hideMentionList()}},{key:"openMenu",value:function(t){var e=this.quill.getSelection(!0);this.quill.insertText(e.index,t),this.quill.blur(),this.quill.focus()}}]),t}();o().register("modules/mention",S);const C={name:"ChatEmoji",props:{},data:function(){return{type:"emoji",emoticonPath:""}},mounted:function(){},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("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 e.src="".concat(t,"/").concat(e.path,"/").concat(e.icon),e.list=e.list.map((function(n){return n.type="emoticon",n.asset="images/emoticon/".concat(e.path,"/").concat(n.path),n.src="".concat(t,"/").concat(e.path,"/").concat(n.path),n})),e}))}return[]}},methods:{onEmoticon:function(t){this.type="emoticon",this.emoticonPath=t},onSelect:function(t){this.$emit("on-select",t)}}};var T=n(51900);const j=(0,T.Z)(C,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chat-emoji-wrapper"},[n("ul",{staticClass:"chat-emoji-box overlay-y",class:[t.type,"no-dark-content"]},t._l(t.list,(function(e){return n("li",{on:{click:function(n){return t.onSelect(e)}}},["emoticon"===e.type?n("img",{attrs:{src:e.src,title:e.name,alt:e.name}}):n("span",{attrs:{title:e.name},domProps:{innerHTML:t._s(e.html)}})])})),0),t._v(" "),n("ul",{staticClass:"chat-emoji-menu"},[n("li",{class:{active:"emoji"===t.type},on:{click:function(e){t.type="emoji"}}},[n("span",{staticClass:"no-dark-content"},[t._v("😀")])]),t._v(" "),t._l(t.emoticonList,(function(e){return n("li",{class:{active:"emoticon"===t.type&&t.emoticonPath==e.path},on:{click:function(n){return t.onEmoticon(e.path)}}},[n("img",{attrs:{title:e.name,alt:e.name,src:e.src}})])}))],2)])}),[],!1,null,null,null).exports;var N="ontouchend"in document;function L(t){return void 0===t&&(t=document.body),!0===t?document.body:t instanceof window.Node?t:document.querySelector(t)}function P(t){return function(t){if(Array.isArray(t))return D(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){M(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function M(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const $={name:"ChatInput",components:{ChatEmoji:j},directives:{touchmouse:{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(N?"touchstart":"mousedown",t.__touchMouseDown__),document.addEventListener(N?"touchmove":"mousemove",t.__touchMouseMove__),document.addEventListener(N?"touchend":"mouseup",t.__touchMouseUp__)},update:function(){},unbind:function(t){t.removeEventListener(N?"touchstart":"mousedown",t.__touchMouseDown__),document.removeEventListener(N?"touchmove":"mousemove",t.__touchMouseMove__),document.removeEventListener(N?"touchend":"mouseup",t.__touchMouseUp__),delete t.__touchMouseDown__,delete t.__touchMouseMove__,delete t.__touchMouseUp__}},TransferDom:{inserted:function(t,e,n){var i=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className?t.className+" v-transfer-dom":"v-transfer-dom";var r=t.parentNode;if(r){var o=document.createComment(""),s=!1;!1!==i&&(r.replaceChild(o,t),L(i).appendChild(t),s=!0),t.__transferDomData||(t.__transferDomData={parentNode:r,home:o,target:L(i),hasMovedOut:s})}},componentUpdated:function(t,e){var n=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;var i=t.__transferDomData;if(i){var r=i.parentNode,o=i.home,s=i.hasMovedOut;!s&&n?(r.replaceChild(o,t),L(n).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:L(n)})):s&&!1===n?(r.replaceChild(t,o),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:L(n)})):n&&L(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)}}},props:{dialogId:{type:Number,default:0},taskId:{type:Number,default:0},value:{type:[String,Number],default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},enterSend:{type:Boolean,default:function(){return $A.isDesktop}},emojiBottom:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},maxlength:{type:Number},defaultMenuOrientation:{type:String,default:"top"}},data:function(){return{quill:null,rangeIndex:0,_content:"",_options:{},mentionMode:"",userList:null,taskList:null,showMore:!1,showEmoji:!1,observer:null,wrapperWidth:0,editorHeight:0,recordReady:!1,recordRec:null,recordState:"stop",recordBlob:null,recordWave:null,recordDuration:0,touchStart:{},touchLimitX:!1,touchLimitY:!1,isSpecVersion:this.checkIOSVersion()}},mounted:function(){var t=this;this.init(),this.observer=new ResizeObserver((function(e){e.some((function(e){var n=e.target,i=e.contentRect;n===t.$el?t.wrapperWidth=i.width:n===t.$refs.editor&&(t.editorHeight=i.height)}))})),this.observer.observe(this.$el),this.observer.observe(this.$refs.editor)},beforeDestroy:function(){this.quill&&(this.quill=null),this.observer&&(this.observer.disconnect(),this.observer=null)},computed:q(q({},(0,i.rn)(["dialogInputCache","cacheProjects","cacheTasks","cacheUserBasic","userId"])),{},{editorStyle:function(){var t=this.wrapperWidth,e=this.editorHeight;return t>0&&e>0&&(t<280||e>40)?{width:"100%"}:{}},boxClass:function(){var t=[];return"ing"===this.recordState&&t.push("record-ing"),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,i=("00"+t%1e3).substr(-2);return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(e,":").concat(n,"″").concat(i)}}),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.taskList=null,this.$emit("input",this.getInputCache())},taskId:function(){this.userList=null,this.taskList=null},showEmoji:function(t){if(t&&(this.showMore=!1,this.quill)){var e=this.quill.selection.savedRange;this.rangeIndex=e?e.index:0}!t&&this.$refs.emojiTip&&this.$refs.emojiTip.updatePopper()},showMore:function(t){t&&(this.showEmoji=!1),!t&&this.$refs.moreTip&&this.$refs.moreTip.updatePopper()},dialogInputCache:function(){this.$emit("input",this.getInputCache())}},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.enterSend||(t.onSend(),!1)}},enter:{key:13,shiftKey:!1,handler:function(e){return!t.enterSend||(t.onSend(),!1)}}}},mention:{allowedChars:/^\S*$/,mentionDenotationChars:["@","#"],defaultMenuOrientation:this.defaultMenuOrientation,isolateCharacter:!0,renderItem:function(e){return!0===e.disabled?'<div class="mention-item-disabled">'.concat(e.value,"</div>"):0===e.id?'<div class="mention-item-at">@</div><div class="mention-item-name">'.concat(e.value,'</div><div class="mention-item-tip">').concat(t.$L("提示所有成员"),"</div>"):e.avatar?'<div class="mention-item-img'.concat(e.online?" online":"",'"><img src="').concat(e.avatar,'"/><em></em></div><div class="mention-item-name">').concat(e.value,"</div>"):'<div class="mention-item-name" title="'.concat(e.value,'">').concat(e.value,"</div>")},renderLoading:function(){return"Loading..."},source:function(e,n,i){t.getSource(i).then((function(t){var i=[];t.some((function(t){var n=t.list;e&&!t.ignoreSearch&&(n=n.filter((function(t){var n=t.value;return $A.strExists(n,e)}))),(n.length>0||t.ignoreSearch)&&(t.label&&i.push.apply(i,P(t.label)),n.length>0&&i.push.apply(i,P(n)))})),n(i,e)}))}}}},this.options),this.quill=new(o())(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.$emit("on-focus",t.quill),t.hidePopover(),t.isSpecVersion);else for(var n=1;n<=5;n++)setTimeout((function(){$A.scrollToView(t.$refs.editor,!0)}),200*n);else t.$emit("on-blur",t.quill)})),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.replace(/^(<p><br><\/p>)+|(<p><br><\/p>)+$/gi,""),t._content=n,t.$emit("input",t._content),t.$nextTick((function(e){var n=t.quill.getSelection();if(n){var i=t.quill.getText(n.index);/\n\n/.test(i)&&t.quill.deleteText(n.index,1)}}))})),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(function(t,e){return e.ops=e.ops.map((function(t){console.log(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})),$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:16,sampleRate:16e3,onProcess:function(e,n,i,r,o,s){t.recordWave.input(e[e.length-1],n,r),t.recordDuration=i}}),t.recordReady=!0)})),this.$emit("on-ready",this.quill)},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,e=this.dialogInputCache.find((function(e){return e.key==t}));return e?e.cache:""},setInputCache:function(t){var e=this,n=this.dialogId,i=this.dialogInputCache.findIndex((function(t){return t.key==n})),r={key:n,cache:t};i>-1?this.$store.state.dialogInputCache.splice(i,1,r):this.$store.state.dialogInputCache.push(r),this.__setInputCache&&clearTimeout(this.__setInputCache),this.__setInputCache=setTimeout((function(t){$A.setStorage("cacheDialogInput",e.$store.state.dialogInputCache)}),600)},focus:function(){var t=this;this.$nextTick((function(){t.quill&&t.quill.focus()}))},blur:function(){var t=this;this.$nextTick((function(){t.quill&&t.quill.blur()}))},clickSend:function(t,e){if(!this.loading)switch(t){case"down":if(this.touchLimitX=!1,this.touchLimitY=!1,this.touchStart="touchstart"===e.type?e.touches[0]:e,this.startRecord())return;break;case"move":var n="touchmove"===e.type?e.touches[0]:e;this.touchLimitX=(this.touchStart.clientX-n.clientX)/window.innerWidth>.1,this.touchLimitY=(this.touchStart.clientY-n.clientY)/window.innerHeight>.1;break;case"up":if(this.stopRecord(this.touchLimitY))return;if(this.touchLimitY||this.touchLimitX)return;this.onSend()}},onSend:function(){this.rangeIndex=0,this.$emit("on-send")},startRecord:function(){var t=this;return"recorder"===this.sendClass&&(this.recordState="ready",this.recordRec.open((function(e){"ready"===t.recordState?(t.recordState="ing",t.recordBlob=null,t.$nextTick((function(e){t.$refs.recwave.innerHTML="",t.recordWave=window.Recorder.FrequencyHistogramView({elem:t.$refs.recwave,lineCount:90,position:0,minHeight:1,stripeEnable:!1}),t.recordRec.start()}))):t.recordRec.close()}),(function(t){$A.modalError(t||"打开录音失败")})),!0)},stopRecord:function(t){var e=this;return"ing"===this.recordState?(this.recordState="stop",this.recordRec.stop((function(n,i){e.recordRec.close(),!0!==t&&(i<600?$A.messageWarning("说话时间太短"):(e.recordBlob=n,e.uploadRecord(i)))}),(function(t){e.recordRec.close(),$A.modalError("录音失败: "+t)})),!0):(this.recordState="stop",!1)},hidePopover:function(){this.showEmoji=!1,this.showMore=!1},uploadRecord:function(t){var e=this;if(null!==this.recordBlob){var n=new FileReader;n.onloadend=function(){e.$emit("on-send",{type:"record",data:{type:e.recordBlob.type,base64:n.result,duration:t}})},n.readAsDataURL(this.recordBlob)}},onSelectEmoji:function(t){if(this.quill)if("emoji"===t.type){var e=document.createElement("span");e.innerHTML=t.html,this.quill.insertText(this.rangeIndex,e.innerHTML),this.rangeIndex+=e.innerHTML.length,e=null,this.$isDesktop&&(this.showEmoji=!1,this.quill.setSelection(this.rangeIndex))}else"emoticon"===t.type&&(this.$emit("on-send",'<img class="emoticon" data-asset="'.concat(t.asset,'" data-name="').concat(t.name,'" src="').concat(t.src,'"/>')),this.showEmoji=!1)},onToolbar:function(t){switch(this.hidePopover(),t){case"user":this.openMenu("@");break;case"task":this.openMenu("#");break;case"image":case"file":this.$emit("on-more",t)}},onMoreVisibleChange:function(t){this.showMore=t},openMenu:function(t){if(this.quill)if(0===this.value.length||this.value.endsWith("<p><br></p>"))this.quill.getModule("mention").openMenu(t);else{var e=this.value.replace(/<[^>]+>/g,"");0===e.length||e.endsWith(" ")?this.quill.getModule("mention").openMenu(t):this.quill.getModule("mention").openMenu(" ".concat(t))}},getProjectId:function(){var t=this,e=null;if(this.dialogId>0){if(e=this.cacheProjects.find((function(e){return e.dialog_id==t.dialogId})))return e.id;if(e=this.cacheTasks.find((function(e){return e.dialog_id==t.dialogId})))return e.project_id}else if(this.taskId>0&&(e=this.cacheTasks.find((function(e){return e.id==t.taskId}))))return e.project_id;return 0},getSource:function(t){var e=this;return new Promise((function(n){switch(t){case"@":if(e.mentionMode="user-mention",null!==e.userList)return void n(e.userList);var i=function(t){t.length>2?e.userList=[{ignoreSearch:!0,label:null,list:[{id:0,value:e.$L("所有人")}]},{ignoreSearch:!1,label:[{id:0,value:e.$L("会话内成员"),disabled:!0}],list:t}]:e.userList=[{ignoreSearch:!1,label:null,list:t}],n(e.userList)},r=[];if(e.dialogId>0)e.$store.dispatch("call",{url:"dialog/group/user",data:{dialog_id:e.dialogId,getuser:1}}).then((function(t){var e=t.data;e.length>0&&r.push.apply(r,P(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(e.taskId>0){var o=e.cacheTasks.find((function(t){return t.id==e.taskId}));o&&$A.isArray(o.task_user)&&o.task_user.some((function(t){var n=e.cacheUserBasic.find((function(e){return e.userid==t.userid}));n&&r.push({id:n.userid,value:n.nickname,avatar:n.userimg,online:n.online})})),i(r)}break;case"#":if(e.mentionMode="task-mention",null!==e.taskList)return void n(e.taskList);var s=function(t){e.taskList=[],t.length>0&&(t=t.map((function(t){return{id:t.id,value:t.name}})),e.taskList.push({ignoreSearch:!1,label:[{id:0,value:e.$L("项目未完成任务"),disabled:!0}],list:t}));var i=e.$store.getters.transforTasks(e.$store.getters.dashboardTask.all);i.length>0&&(i=i.sort((function(t,e){return $A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59")})),e.taskList.push({ignoreSearch:!1,label:[{id:0,value:e.$L("我的待完成任务"),disabled:!0}],list:i.map((function(t){return{id:t.id,value:t.name}}))})),n(e.taskList)},a=e.getProjectId();if(a>0)return void e.$store.dispatch("getTaskForProject",a).then((function(t){var n=e.cacheTasks.filter((function(t){return!t.archived_at&&(t.project_id==a&&0===t.parent_id&&!t.archived_at&&!t.complete_at)}));n.length>0?s(n):s([])})).catch((function(t){s([])}));s([]);break;default:n([])}}))},checkIOSVersion:function(){var t=(window&&window.navigator&&window.navigator.userAgent).match(/OS ((\d+_?){2,3})\s/i),e=(t?t[1].replace(/_/g,"."):"unknown").split(".");return 11==+e[0]&&+e[1]>=0&&+e[1]<3},handlePaste:function(t){var e=t.clipboardData.files,n=Array.prototype.slice.call(e).filter((function(t){return!$A.leftExists(t.type,"image/")}));n.length>0&&(t.preventDefault(),this.$emit("on-file",n))}}};const R=(0,T.Z)($,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chat-input-box",class:t.boxClass},[n("div",{staticClass:"chat-input-wrapper",on:{click:function(e){return e.stopPropagation(),t.focus.apply(null,arguments)}}},[n("div",{ref:"editor",staticClass:"no-dark-content",style:t.editorStyle,on:{click:function(t){t.stopPropagation()},paste:t.handlePaste}}),t._v(" "),n("ul",{staticClass:"chat-toolbar",on:{click:function(t){t.stopPropagation()}}},[n("li",[t.emojiBottom?n("ETooltip",{ref:"emojiTip",attrs:{disabled:!t.$isDesktop||t.showEmoji,placement:"top",content:t.$L("表情")}},[n("i",{staticClass:"taskfont",on:{click:function(e){t.showEmoji=!t.showEmoji}}},[t._v("")])]):n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-emoji-popover"},model:{value:t.showEmoji,callback:function(e){t.showEmoji=e},expression:"showEmoji"}},[n("ETooltip",{ref:"emojiTip",attrs:{slot:"reference",disabled:!t.$isDesktop||t.showEmoji,placement:"top",content:t.$L("表情")},slot:"reference"},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("ChatEmoji",{on:{"on-select":t.onSelectEmoji}})],1)],1),t._v(" "),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:!t.$isDesktop,content:t.$L("选择会员")}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("user")}}},[t._v("")])])],1),t._v(" "),n("li",[n("ETooltip",{attrs:{placement:"top",disabled:!t.$isDesktop,content:t.$L("选择任务")}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.onToolbar("task")}}},[t._v("")])])],1),t._v(" "),n("li",[n("EPopover",{attrs:{visibleArrow:!1,placement:"top",popperClass:"chat-input-more-popover"},model:{value:t.showMore,callback:function(e){t.showMore=e},expression:"showMore"}},[n("ETooltip",{ref:"moreTip",attrs:{slot:"reference",disabled:!t.$isDesktop||t.showMore,placement:"top",content:t.$L("展开")},slot:"reference"},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("image")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("图片"))+"\n ")]),t._v(" "),n("div",{staticClass:"chat-input-popover-item",on:{click:function(e){return t.onToolbar("file")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("文件"))+"\n ")])],1)],1),t._v(" "),n("li",{directives:[{name:"touchmouse",rawName:"v-touchmouse",value:t.clickSend,expression:"clickSend"}],staticClass:"chat-send",class:t.sendClass},[n("ETooltip",{attrs:{placement:"top",disabled:!t.$isDesktop,content:t.$L("发送")}},[n("div",[n("transition",{attrs:{name:"mobile-send"}},["recorder"===t.sendClass?n("i",{staticClass:"taskfont"},[t._v("")]):t._e()]),t._v(" "),n("transition",{attrs:{name:"mobile-send"}},["recorder"!==t.sendClass?n("i",{staticClass:"taskfont"},[t._v("")]):t._e()])],1)])],1),t._v(" "),t.recordReady?n("li",{staticClass:"chat-record-recwave"},[n("div",{ref:"recwave"})]):t._e()])]),t._v(" "),t.emojiBottom&&t.showEmoji?n("ChatEmoji",{on:{"on-select":t.onSelectEmoji}}):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},["ing"===t.recordState?n("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],staticClass:"chat-input-record-transfer",class:{cancel:t.touchLimitY},attrs:{"data-transfer":!0},on:{click:t.stopRecord}},[n("div",{staticClass:"record-duration"},[t._v(t._s(t.recordFormatDuration))]),t._v(" "),n("div",{staticClass:"record-cancel",on:{click:function(e){return e.stopPropagation(),t.stopRecord(!0)}}},[t._v(t._s(t.$L(t.touchLimitY?"松开取消":"向上滑动取消")))])]):t._e()])],1)}),[],!1,null,null,null).exports},84186:(t,e,n)=>{"use strict";n.d(e,{Z:()=>xt});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,i){return[(t+Math.sin(i)*n).toFixed(2),(e-Math.cos(i)*n).toFixed(2)]},full:function(t,e,n,i){return i<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-i," ").concat(e," A ").concat(i," ").concat(i," 0 1 1 ").concat(t+i," ").concat(e," A ").concat(i," ").concat(i," 1 1 1 ").concat(t-i," ").concat(e," Z")},part:function(t,e,n,i,r,o){var s=r/360*2*Math.PI,a=o/360*2*Math.PI,l=[this.point(t,e,i,s),this.point(t,e,n,s),this.point(t,e,n,a),this.point(t,e,i,a)],u=a-s>Math.PI?"1":"0";return"M ".concat(l[0][0]," ").concat(l[0][1]," L ").concat(l[1][0]," ").concat(l[1][1]," A ").concat(n," ").concat(n," 0 ").concat(u," 1 ").concat(l[2][0]," ").concat(l[2][1]," L ").concat(l[3][0]," ").concat(l[3][1]," A ").concat(i," ").concat(i," 0 ").concat(u," 0 ").concat(l[0][0]," ").concat(l[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,i=t.y,r=void 0===i?0:i,o=t.R,s=void 0===o?0:o,a=t.r,l=void 0===a?0:a,u=t.start,c=t.end,f=[Math.max(s,l),Math.min(s,l)];if(l=f[1],(s=f[0])<=0)return"";if(u!==+u||c!==+c)return this.full(n,r,s,l);if(Math.abs(u-c)<1e-6)return"";if(Math.abs(u-c)%360<1e-6)return this.full(n,r,s,l);var d=[u%360,c%360];return(u=d[0])>(c=d[1])&&(c+=360),this.part(n,r,s,l,u,c)}}},o=r;var s=n(51900);const a=(0,s.Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[n("svg",{attrs:{viewBox:"0 0 28 28"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[n("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),n("g",{attrs:{"fill-rule":"nonzero"}},[n("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports;var l=n(80641);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d={name:"DialogView",components:{WCircle:a},props:{msgData:{type:Object,default:function(){return{}}},dialogType:{type:String,default:""},hidePercentage:{type:Boolean,default:!1}},data:function(){return{popperLoad:0,popperShow:!1,timeShow:!1,recordPlay:!1,allList:[]}},activated:function(){this.msgRead()},beforeDestroy:function(){this.recordPlay&&l.Store.set("audioSubscribe",!1)},computed:c(c({},(0,i.rn)(["userToken","userId","dialogMsgs"])),{},{readList:function(){return this.allList.filter((function(t){return t.read_at}))},unreadList:function(){return this.allList.filter((function(t){return!t.read_at}))},showMenu:function(){return this.msgData.userid==this.userId||"file"===this.msgData.type},contentClass:function(){var t=this.msgData,e=t.type,n=t.msg,i=[];return"text"===e&&(/^<img\s+class="emoticon"[^>]*?>$/.test(n.text)?i.push("an-emoticon"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(n.text)?i.push("three-emoji"):/^\s*<p>\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(n.text)?i.push("two-emoji"):/^\s*<p>\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(n.text)&&i.push("an-emoji")),i},atUserReg:function(){return new RegExp('<span class="mention user" data-id="'.concat(this.userId,'">'),"g")}}),watch:{msgData:{handler:function(){this.msgRead()},immediate:!0}},methods:{msgRead:function(){var t=this;!0!==this.msgData._r&&(this.msgData._r=!0,setTimeout((function(){t.$el.offsetParent?t.$store.dispatch("dialogMsgRead",t.msgData):t.msgData._r=!1}),50))},openReadPercentage:function(){var t=this;this.popperLoad>0||(this.popperShow?this.popperShow=!1:(this.popperLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.allList=n})).catch((function(){t.allList=[]})).finally((function(e){setTimeout((function(){t.popperLoad--,t.popperShow=!0}),100)}))))},textMsg:function(t){if(!t)return"";t=(t=(t=(t=t.trim().replace(/(\n\x20*){3,}/g,"\n\n")).replace(/\{\{RemoteURL\}\}/g,$A.apiUrl("../"))).replace(/<p><\/p>/g,"<p><br/></p>")).replace(this.atUserReg,'<span class="mention me" data-id="'.concat(this.userId,'">')),/https*:\/\//.test(t)&&(t=t.split(/(<[^>]*>)/g).map((function(t){return t&&!/<[^>]*>/.test(t)&&(t=t.replace(/(https*:\/\/)((\w|=|\?|\.|\/|&|-|:|\+|%|;)+)/g,'<a href="$1$2" target="_blank">$1$2</a>')),t})).join(""));var e=t.match(/<img\s+[^>]*?>/g);if(e){var n=new RegExp('width="(\\d+)"'),i=new RegExp('height="(\\d+)"');e.some((function(e){if(n.test(e)&&i.test(e)){var r=parseInt(e.match(n)[1]),o=parseInt(e.match(i)[1]),s=e.indexOf("emoticon")>-1?150:220,a=$A.scaleToScale(r,o,s,s),l=e.replace(n,"width=".concat(a.width)).replace(i,"height=".concat(a.height));t=t.replace(e,l)}}))}return t},recordStyle:function(t){var e=t.duration;return{width:50+Math.min(180,Math.floor(e/150))+"px"}},recordDuration:function(t){var e=Math.floor(t/6e4),n=Math.floor(t/1e3)%60;return e>0?"".concat(e,":").concat(n,"″"):"".concat(Math.max(1,n),"″")},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var i=e,r=n;return(e>220||n>220)&&(e>n?(i=220,r=n*(220/e)):(i=e*(220/n),r=220)),{width:i+"px",height:r+"px"}}return{}},playRecord:function(){var t=this;l.Store.set("audioSubscribe",{src:this.msgData.msg.path,callback:function(e){t.recordPlay=e}})},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id)})).catch((function(t){var e=t.msg;$A.messageError(e,301)})).finally((function(e){t.$Modal.remove()}))}})},viewText:function(t){var e=t.target;switch(e.nodeName){case"IMG":e.classList.contains("browse")?this.viewPicture(e.currentSrc):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[e.currentSrc]);break;case"SPAN":e.classList.contains("mention")&&e.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(e.getAttribute("data-id")))}},viewFile:function(){var t=this.msgData.msg;if(["jpg","jpeg","gif","png"].includes(t.ext))this.viewPicture(t.path);else{var e="/single/file/msg/".concat(this.msgData.id);if(this.$Electron)this.$Electron.sendMessage("windowRouter",{name:"file-msg-".concat(this.msgData.id),path:e,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}});else if(this.$isEEUiApp){requireModuleJs("eeui").openPage({pageType:"web",pageTitle:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),statusBarStyle:!1,url:$A.apiUrl("../token?token=".concat(this.userToken,"&from=").concat(encodeURIComponent($A.apiUrl("..".concat(e)))))},(function(t){}))}else window.open($A.apiUrl("..".concat(e)))}},viewPicture:function(t){var e=this.msgData.dialog_id,n=$A.cloneJSON(this.dialogMsgs.filter((function(t){if(t.dialog_id===e){if("file"===t.type)return["jpg","jpeg","gif","png"].includes(t.msg.ext);if("text"===t.type)return t.msg.text.match(/<img\s+class="browse"[^>]*?>/)}return!1}))).sort((function(t,e){return t.id-e.id})),i=[];n.some((function(t){var e=t.type,n=t.msg;if("file"===e)i.push(n.path);else if("text"===e){var r=$A.apiUrl("../"),o=n.text.match(/<img\s+class="browse"[^>]*?src="(.*?)"[^>]*?>/g);o&&o.some((function(t){i.push(t.match(/<img\s+class="browse"[^>]*?src="(.*?)"[^>]*?>/)[1].replace(/\{\{RemoteURL\}\}/g,r))}))}}));var r=i.findIndex((function(e){return e===t}));r>-1?(this.$store.state.previewImageIndex=r,this.$store.state.previewImageList=i):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t])},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const h=(0,s.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},["group"===t.dialogType?n("div",{staticClass:"dialog-username"},[n("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}})],1):t._e(),t._v(" "),n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content",class:t.contentClass},["text"===t.msgData.type?n("div",{staticClass:"content-text no-dark-content"},[n("pre",{domProps:{innerHTML:t._s(t.textMsg(t.msgData.msg.text))},on:{click:t.viewText}})]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):n("div",{staticClass:"file-box"},[n("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),n("div",{staticClass:"file-info"},[n("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):"record"===t.msgData.type?n("div",{staticClass:"content-record no-dark-content"},[n("div",{staticClass:"dialog-record",class:{playing:t.recordPlay},style:t.recordStyle(t.msgData.msg),on:{click:t.playRecord}},[n("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msgData.msg.duration)))]),t._v(" "),n("div",{staticClass:"record-icon taskfont"})])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[t.timeShow?n("div",{staticClass:"time",on:{click:function(e){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):n("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(e){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.hidePercentage?t._e():[t.msgData.send>1||"group"===t.dialogType?n("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[n("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:"left-end"},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2),t._v(" "),n("ul",{staticClass:"unread overlay-y"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2)]),t._v(" "),n("div",{attrs:{slot:"reference"},slot:"reference"})]),t._v(" "),t.popperLoad>0?n("Loading"):n("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?n("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):n("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]],2):n("div",{staticClass:"dialog-foot"},[n("Loading")],1)])}),[],!1,null,null,null).exports;function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const m={name:"DialogUpload",props:{dialogId:{type:Number,default:0},maxSize:{type:Number,default:204800}},data:function(){return{uploadFormat:["text","md","markdown","drawio","mind","docx","wps","doc","xls","xlsx","ppt","pptx","jpg","jpeg","png","gif","bmp","ico","raw","rar","zip","jar","7-zip","tar","gzip","7z","tif","tiff","dwg","dxf","ofd","pdf","txt","htaccess","htgroups","htpasswd","conf","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","cs","css","dockerfile","go","golang","html","htm","xhtml","vue","we","wpy","java","js","jsm","jsx","json","jsp","less","lua","makefile","gnumakefile","ocamlmakefile","make","mysql","nginx","ini","cfg","prefs","m","mm","pl","pm","p6","pl6","pm6","pgsql","php","inc","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","py","r","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scss","sh","bash","bashrc","sql","sqlserver","swift","ts","typescript","str","vbs","vb","v","vh","sv","svh","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","yaml","yml","asp","properties","gitignore","log","bas","prg","python","ftl","aspx","plist","mp3","wav","mp4","flv","avi","mov","wmv","mkv","3gp","rm","xmind","rp"],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:v(v({},(0,i.rn)(["userToken"])),{},{headers:function(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params:function(){return{dialog_id:this.dialogId}}}),methods:{handleProgress:function(t,e){void 0===e.tempId&&(e.tempId=$A.randomString(8),this.$emit("on-progress",e))},handleSuccess:function(t,e){1===t.ret?(e.data=t.data,this.$emit("on-success",e),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+t.msg}),this.$emit("on-error",e),this.$refs.upload.fileList.pop())},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};const g=(0,s.Z)(m,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var b=n(57127),_=n(37332);function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const k={name:"DialogGroupInfo",components:{UserInput:b.Z},props:{dialogId:{type:Number,default:0}},data:function(){return{searchKey:"",loadIng:0,dialogUser:[],addShow:!1,addData:{},addLoad:0}},computed:O(O({},(0,i.rn)(["cacheDialogs","userId"])),{},{dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},groupType:function(){var t=this.dialogData.group_type;return"project"===t?"项目群组":"task"===t?"任务群组":"user"===t?"个人群组":"未知"},userList:function(){var t=this.dialogUser,e=this.searchKey,n=this.dialogData;return t.filter((function(t){return!(e&&t.nickname&&!$A.strExists(t.nickname,e)&&!$A.strExists(t.email,e))})).sort((function(t,e){return t.userid===n.owner_id||e.userid===n.owner_id?(t.userid===n.owner_id?0:1)-(e.userid===n.owner_id?0:1):$A.Date(t.created_at)-$A.Date(e.created_at)}))}}),watch:{dialogId:{handler:function(){this.getDialogUser()},immediate:!0}},methods:{updateName:function(t,e){var n=this;t?this.$store.dispatch("call",{url:"dialog/group/edit",data:{dialog_id:this.dialogId,chat_name:t}}).then((function(t){var i=t.data;n.$store.dispatch("saveDialog",i),e()})).catch((function(t){var n=t.msg;$A.modalError(n),e()})):e()},getDialogUser:function(){var t=this;this.dialogId<=0||(this.loadIng++,this.$store.dispatch("call",{url:"dialog/group/user",data:{dialog_id:this.dialogId}}).then((function(e){var n=e.data;t.dialogUser=n,t.$store.dispatch("saveDialog",{id:t.dialogId,people:n.length})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))},userResult:function(t){var e=this.dialogUser.findIndex((function(e){return e.userid===t.userid}));e>-1&&this.dialogUser.splice(e,1,Object.assign(t,{id:this.dialogUser[e].id,created_at:this.dialogUser[e].created_at}))},openAdd:function(){this.addData={dialog_id:this.dialogId,userids:[],disabledChoice:this.dialogUser.map((function(t){return t.userid}))},this.addShow=!0},onAdd:function(){var t=this;this.addLoad++,this.$store.dispatch("call",{url:"dialog/group/adduser",data:this.addData}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addShow=!1,t.addData={},t.getDialogUser()})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.addLoad--}))},onExit:function(t){var e=this,n="你确定要退出群组吗?",i=[];$A.isJson(t)&&(n="你确定要将【".concat(t.nickname,"】移出群组吗?"),i=[t.userid]),$A.modalConfirm({content:n,loading:!0,onOk:function(){e.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:e.dialogId,userids:i}}).then((function(t){var n=t.msg;$A.messageSuccess(n),i.length>0?e.getDialogUser():(e.$store.dispatch("forgetDialog",e.dialogId),e.goForward({name:"manage-messenger"}))})).catch((function(t){var e=t.msg;$A.modalError(e,301)})).finally((function(t){e.$Modal.remove()}))}})},onDisband:function(){var t=this;$A.modalConfirm({content:"你确定要解散【".concat(this.dialogData.name,"】群组吗?"),loading:!0,okText:"解散",onOk:function(){t.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:t.dialogId}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$store.dispatch("forgetDialog",t.dialogId),t.goForward({name:"manage-messenger"})})).catch((function(t){var e=t.msg;$A.modalError(e,301)})).finally((function(e){t.$Modal.remove()}))}})}}};const E=(0,s.Z)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-group-info"},[n("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群名")))]),t._v(" "),n("div",{staticClass:"group-info-value"},[n("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),t._v(" "),n("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("群类型")))]),t._v(" "),n("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),t._v(" "),n("div",{staticClass:"group-info-search"},[n("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("搜索"),clearable:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})],1),t._v(" "),n("div",{staticClass:"group-info-user"},[n("ul",[t._l(t.userList,(function(e,i){return n("li",{key:i},[n("UserAvatar",{attrs:{userid:e.userid,size:32,"user-result":t.userResult,showName:"",tooltipDisabled:""}}),t._v(" "),e.userid===t.dialogData.owner_id?n("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("群主")))]):t.dialogData.owner_id==t.userId?n("Icon",{staticClass:"user-exit",attrs:{type:"md-exit"},on:{click:function(n){return t.onExit(e)}}}):t._e()],1)})),t._v(" "),0===t.userList.length?n("li",{staticClass:"no"},[t.loadIng>0?n("Loading"):n("span",[t._v(t._s(t.$L("没有符合条件的数据")))])],1):t._e()],2)]),t._v(" "),t.dialogData.owner_id==t.userId?n("div",{staticClass:"group-info-button"},[n("Button",{attrs:{type:"primary"},on:{click:t.openAdd}},[t._v(t._s(t.$L("添加成员")))]),t._v(" "),n("Button",{attrs:{type:"error",ghost:""},on:{click:t.onDisband}},[t._v(t._s(t.$L("解散群组")))])],1):n("div",{staticClass:"group-info-button"},[n("Button",{attrs:{type:"error",ghost:""},on:{click:t.onExit}},[t._v(t._s(t.$L("退出群组")))])],1),t._v(" "),n("Modal",{attrs:{title:t.$L("添加群成员"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[n("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("新增成员")}},[n("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.addData.userids,callback:function(e){t.$set(t.addData,"userids",e)},expression:"addData.userids"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("确定添加")))])],1)],1)],1)}),[],!1,null,null,null).exports;var A=n(80803);var S=void 0;function C(){C.init||(C.init=!0,S=-1!==function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}())}var T={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!S&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var t=this;C(),this.$nextTick((function(){t._w=t.$el.offsetWidth,t._h=t.$el.offsetHeight}));var e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",S&&this.$el.appendChild(e),e.data="about:blank",S||this.$el.appendChild(e)},beforeDestroy:function(){this.removeResizeHandlers()}};var j={version:"0.4.5",install:function(t){t.component("resize-observer",T),t.component("ResizeObserver",T)}},N=null;"undefined"!=typeof window?N=window.Vue:void 0!==n.g&&(N=n.g.Vue),N&&N.use(j);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)}function P(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function D(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function I(t,e){if(t===e)return!0;if("object"===L(t)){for(var n in t)if(!I(t[n],e[n]))return!1;return!0}return!1}var q=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,i)}var e,n,i;return e=t,n=[{key:"createObserver",value:function(t,e){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){var i;if(this.options="function"==typeof(i=t)?{callback:i}:i,this.callback=function(t,e){n.options.callback(t,e),t&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=(this.options.throttleOptions||{}).leading;this.callback=function(t,e){var n,i,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=function(s){for(var a=arguments.length,l=new Array(a>1?a-1:0),u=1;u<a;u++)l[u-1]=arguments[u];if(r=l,!n||s!==i){var c=o.leading;"function"==typeof c&&(c=c(s,i)),n&&s===i||!c||t.apply(void 0,[s].concat(D(r))),i=s,clearTimeout(n),n=setTimeout((function(){t.apply(void 0,[s].concat(D(r))),n=0}),e)}};return s._clear=function(){clearTimeout(n),n=null},s}(this.callback,this.options.throttle,{leading:function(t){return"both"===r||"visible"===r&&t||"hidden"===r&&!t}})}this.oldResult=void 0,this.observer=new IntersectionObserver((function(t){var e=t[0];if(t.length>1){var i=t.find((function(t){return t.isIntersecting}));i&&(e=i)}if(n.callback){var r=e.isIntersecting&&e.intersectionRatio>=n.threshold;if(r===n.oldResult)return;n.oldResult=r,n.callback(r,e)}}),this.options.intersection),e.context.$nextTick((function(){n.observer&&n.observer.observe(n.el)}))}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&this.options.intersection.threshold||0}}],n&&P(e.prototype,n),i&&P(e,i),t}();function M(t,e,n){var i=e.value;if(i)if("undefined"==typeof IntersectionObserver)console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var r=new q(t,i,n);t._vue_visibilityState=r}}function $(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var R={bind:M,update:function(t,e,n){var i=e.value;if(!I(i,e.oldValue)){var r=t._vue_visibilityState;i?r?r.createObserver(i,n):M(t,{value:i},n):$(t)}},unbind:$};var B={version:"0.4.6",install:function(t){t.directive("observe-visibility",R)}},z=null;"undefined"!=typeof window?z=window.Vue:void 0!==n.g&&(z=n.g.Vue),z&&z.use(B);var U=n(27274),F=n.n(U),H={itemsLimit:1e3};function V(t){return V="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},V(t)}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}function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Y(Object(n),!0).forEach((function(e){K(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function G(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return Z(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(t,e):void 0}}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}var X={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}}};function Q(){return this.items.length&&"object"!==V(this.items[0])}var J=!1;if("undefined"!=typeof window){J=!1;try{var tt=Object.defineProperty({},"passive",{get:function(){J=!0}});window.addEventListener("test",null,tt)}catch(t){}}var et=0;function nt(t,e,n,i,r,o,s,a,l,u){"boolean"!=typeof s&&(l=a,a=s,s=!1);const c="function"==typeof n?n.options:n;let f;if(t&&t.render&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0,r&&(c.functional=!0)),i&&(c._scopeId=i),o?(f=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=f):e&&(f=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),f)if(c.functional){const t=c.render;c.render=function(e,n){return f.call(n),t(e,n)}}else{const t=c.beforeCreate;c.beforeCreate=t?[].concat(t,f):[f]}return n}const it={name:"RecycleScroller",components:{ResizeObserver:T},directives:{ObserveVisibility:R},props:W({},X,{itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1}}),data:function(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes:function(){if(null===this.itemSize){for(var t,e={"-1":{accumulator:0}},n=this.items,i=this.sizeField,r=this.minItemSize,o=1e4,s=0,a=0,l=n.length;a<l;a++)(t=n[a][i]||r)<o&&(o=t),s+=t,e[a]={accumulator:s,size:t};return this.$_computedMinItemSize=o,e}return[]},simpleArray:Q},watch:{items:function(){this.updateVisibleItems(!0)},pageMode:function(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler:function(){this.updateVisibleItems(!1)},deep:!0}},created:function(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1))},mounted:function(){var t=this;this.applyPageMode(),this.$nextTick((function(){t.$_prerender=!1,t.updateVisibleItems(!0),t.ready=!0}))},beforeDestroy:function(){this.removeListeners()},methods:{addView:function(t,e,n,i,r){var o={item:n,position:0},s={id:et++,index:e,used:!0,key:i,type:r};return Object.defineProperty(o,"nr",{configurable:!1,value:s}),t.push(o),o},unuseView:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.$_unusedViews,i=t.nr.type,r=n.get(i);r||(r=[],n.set(i,r)),r.push(t),e||(t.nr.used=!1,t.position=-9999,this.$_views.delete(t.nr.key))},handleResize:function(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll:function(t){var e=this;this.$_scrollDirty||(this.$_scrollDirty=!0,requestAnimationFrame((function(){e.$_scrollDirty=!1,e.updateVisibleItems(!1,!0).continuous||(clearTimeout(e.$_refreshTimout),e.$_refreshTimout=setTimeout(e.handleScroll,100))}))),this.$emit("onScroll",t)},handleVisibilityChange:function(t,e){var n=this;this.ready&&(t||0!==e.boundingClientRect.width||0!==e.boundingClientRect.height?(this.$emit("visible"),requestAnimationFrame((function(){n.updateVisibleItems(!1)}))):this.$emit("hidden"))},updateVisibleItems:function(t){var e,n,i,r,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=this.itemSize,a=this.$_computedMinItemSize,l=this.typeField,u=this.simpleArray?null:this.keyField,c=this.items,f=c.length,d=this.sizes,h=this.$_views,p=this.$_unusedViews,v=this.pool;if(f)if(this.$_prerender)e=0,n=this.prerender,i=null;else{var y=this.getScroll();if(o){var m=y.start-this.$_lastUpdateScrollPosition;if(m<0&&(m=-m),null===s&&m<a||m<s)return{continuous:!0}}this.$_lastUpdateScrollPosition=y.start;var g=this.buffer;if(y.start-=g,y.end+=g,null===s){var b,_=0,w=f-1,O=~~(f/2);do{b=O,d[O].accumulator<y.start?_=O:O<f-1&&d[O+1].accumulator>y.start&&(w=O),O=~~((_+w)/2)}while(O!==b);for(O<0&&(O=0),e=O,i=d[f-1].accumulator,n=O;n<f&&d[n].accumulator<y.end;n++);-1===n?n=c.length-1:++n>f&&(n=f)}else(e=~~(y.start/s))<0&&(e=0),(n=Math.ceil(y.end/s))>f&&(n=f),i=f*s}else e=n=i=0;n-e>H.itemsLimit&&this.itemsLimitError(),this.totalSize=i;var x=e<=this.$_endIndex&&n>=this.$_startIndex;if(this.$_continuous!==x){if(x){h.clear(),p.clear();for(var k=0,E=v.length;k<E;k++)r=v[k],this.unuseView(r)}this.$_continuous=x}else if(x)for(var A=0,S=v.length;A<S;A++)(r=v[A]).nr.used&&(t&&(r.nr.index=c.findIndex((function(t){return u?t[u]===r.item[u]:t===r.item}))),(-1===r.nr.index||r.nr.index<e||r.nr.index>=n)&&this.unuseView(r));for(var C,T,j,N,L=x?null:new Map,P=e;P<n;P++){C=c[P];var D=u?C[u]:C;if(null==D)throw new Error("Key is ".concat(D," on item (keyField is '").concat(u,"')"));r=h.get(D),s||d[P].size?(r?(r.nr.used=!0,r.item=C):(T=C[l],j=p.get(T),x?j&&j.length?((r=j.pop()).item=C,r.nr.used=!0,r.nr.index=P,r.nr.key=D,r.nr.type=T):r=this.addView(v,P,C,D,T):(N=L.get(T)||0,(!j||N>=j.length)&&(r=this.addView(v,P,C,D,T),this.unuseView(r,!0),j=p.get(T)),(r=j[N]).item=C,r.nr.used=!0,r.nr.index=P,r.nr.key=D,r.nr.type=T,L.set(T,N+1),N++),h.set(D,r)),r.position=null===s?d[P-1].accumulator:P*s):r&&this.unuseView(r)}return this.$_startIndex=e,this.$_endIndex=n,this.emitUpdate&&this.$emit("update",e,n),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,300),{continuous:x}},getListenerTarget:function(){var t=F()(this.$el);return!window.document||t!==window.document.documentElement&&t!==window.document.body||(t=window),t},getScroll:function(){var t,e=this.$el,n="vertical"===this.direction;if(this.pageMode){var i=e.getBoundingClientRect(),r=n?i.height:i.width,o=-(n?i.top:i.left),s=n?window.innerHeight:window.innerWidth;o<0&&(s+=o,o=0),o+s>r&&(s=r-o),t={start:o,end:o+s}}else t=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return t},applyPageMode:function(){this.pageMode?this.addListeners():this.removeListeners()},addListeners:function(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,!!J&&{passive:!0}),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners:function(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem:function(t){var e;e=null===this.itemSize?t>0?this.sizes[t-1].accumulator:0:t*this.itemSize,this.scrollToPosition(e)},scrollToPosition:function(t){"vertical"===this.direction?this.$el.scrollTop=t:this.$el.scrollLeft=t},itemsLimitError:function(){var t=this;throw setTimeout((function(){console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",t.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")})),new Error("Rendered items limit reached")},sortViews:function(){this.pool.sort((function(t,e){return t.nr.index-e.nr.index}))}}};var rt=function(){var t,e,n=this,i=n.$createElement,r=n._self._c||i;return r("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:n.handleVisibilityChange,expression:"handleVisibilityChange"}],staticClass:"vue-recycle-scroller",class:(t={ready:n.ready,"page-mode":n.pageMode},t["direction-"+n.direction]=!0,t),on:{"&scroll":function(t){return n.handleScroll(t)}}},[n.$slots.before?r("div",{staticClass:"vue-recycle-scroller__slot"},[n._t("before")],2):n._e(),n._v(" "),r("div",{ref:"wrapper",staticClass:"vue-recycle-scroller__item-wrapper",style:(e={},e["vertical"===n.direction?"minHeight":"minWidth"]=n.totalSize+"px",e)},n._l(n.pool,(function(t){return r("div",{key:t.nr.id,staticClass:"vue-recycle-scroller__item-view",class:{hover:n.hoverKey===t.nr.key},style:n.ready?{transform:"translate"+("vertical"===n.direction?"Y":"X")+"("+t.position+"px)"}:null,on:{mouseenter:function(e){n.hoverKey=t.nr.key},mouseleave:function(t){n.hoverKey=null}}},[n._t("default",null,{item:t.item,index:t.nr.index,active:t.nr.used})],2)})),0),n._v(" "),n.$slots.after?r("div",{staticClass:"vue-recycle-scroller__slot"},[n._t("after")],2):n._e(),n._v(" "),r("ResizeObserver",{on:{notify:n.handleResize}})],1)};rt._withStripped=!0;const ot=nt({render:rt,staticRenderFns:[]},undefined,it,undefined,!1,undefined,!1,void 0,void 0,void 0);var st={name:"DynamicScroller",components:{RecycleScroller:ot},inheritAttrs:!1,provide:function(){return"undefined"!=typeof ResizeObserver&&(this.$_resizeObserver=new ResizeObserver((function(t){var e,n=G(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.target){var r=new CustomEvent("resize",{detail:{contentRect:i.contentRect}});i.target.dispatchEvent(r)}}}catch(t){n.e(t)}finally{n.f()}}))),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},props:W({},X,{minItemSize:{type:[Number,String],required:!0}}),data:function(){return{vscrollData:{active:!0,sizes:{},validSizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Q,itemsWithSize:function(){for(var t=[],e=this.items,n=this.keyField,i=this.simpleArray,r=this.vscrollData.sizes,o=0;o<e.length;o++){var s=e[o],a=i?o:s[n],l=r[a];void 0!==l||this.$_undefinedMap[a]||(l=0),t.push({item:s,id:a,size:l})}return t},listeners:function(){var t={};for(var e in this.$listeners)"resize"!==e&&"visible"!==e&&(t[e]=this.$listeners[e]);return t}},watch:{items:function(){this.forceUpdate(!1)},simpleArray:{handler:function(t){this.vscrollData.simpleArray=t},immediate:!0},direction:function(t){this.forceUpdate(!0)}},created:function(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated:function(){this.vscrollData.active=!0},deactivated:function(){this.vscrollData.active=!1},methods:{onScrollerResize:function(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible:function(){this.$emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(t||this.simpleArray)&&(this.vscrollData.validSizes={}),this.$emit("vscroll:update",{force:!0})},scrollToItem:function(t){var e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this.simpleArray?null!=e?e:this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom:function(){var t=this;if(!this.$_scrollingToBottom){this.$_scrollingToBottom=!0;var e=this.$el;this.$nextTick((function(){e.scrollTop=e.scrollHeight+5e3;requestAnimationFrame((function n(){e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame((function(){e.scrollTop=e.scrollHeight+5e3,0===t.$_undefinedSizes?t.$_scrollingToBottom=!1:requestAnimationFrame(n)}))}))}))}}}};const at=st;var lt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("RecycleScroller",t._g(t._b({ref:"scroller",attrs:{items:t.itemsWithSize,"min-item-size":t.minItemSize,direction:t.direction,"key-field":"id"},on:{resize:t.onScrollerResize,visible:t.onScrollerVisible},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.item,i=e.index,r=e.active;return[t._t("default",null,null,{item:n.item,index:i,active:r,itemWithSize:n})]}}],null,!0)},"RecycleScroller",t.$attrs,!1),t.listeners),[t._v(" "),n("template",{slot:"before"},[t._t("before")],2),t._v(" "),n("template",{slot:"after"},[t._t("after")],2)],2)};lt._withStripped=!0;const ut=nt({render:lt,staticRenderFns:[]},undefined,at,undefined,!1,undefined,!1,void 0,void 0,void 0);const ct=nt({},undefined,{name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},computed:{id:function(){return this.vscrollData.simpleArray?this.index:this.item[this.vscrollData.keyField]},size:function(){return this.vscrollData.validSizes[this.id]&&this.vscrollData.sizes[this.id]||0},finalActive:function(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id:function(){this.size||this.onDataUpdate()},finalActive:function(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created:function(){var t=this;if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){var e=function(e){t.$watch((function(){return t.sizeDependencies[e]}),t.onDataUpdate)};for(var n in this.sizeDependencies)e(n);this.vscrollParent.$on("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$on("vscroll:update-size",this.onVscrollUpdateSize)}},mounted:function(){this.vscrollData.active&&(this.updateSize(),this.observeSize())},beforeDestroy:function(){this.vscrollParent.$off("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$off("vscroll:update-size",this.onVscrollUpdateSize),this.unobserveSize()},methods:{updateSize:function(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData:function(){var t=this;this.watchData?this.$_watchData=this.$watch("data",(function(){t.onDataUpdate()}),{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate:function(t){var e=t.force;!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),this.$_forceNextVScrollUpdate!==this.id&&!e&&this.size||this.updateSize()},onDataUpdate:function(){this.updateSize()},computeSize:function(t){var e=this;this.$nextTick((function(){if(e.id===t){var n=e.$el.offsetWidth,i=e.$el.offsetHeight;e.applySize(n,i)}e.$_pendingSizeUpdate=null}))},applySize:function(t,e){var n=Math.round("vertical"===this.vscrollParent.direction?e:t);n&&this.size!==n&&(this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.$set(this.vscrollData.sizes,this.id,n),this.$set(this.vscrollData.validSizes,this.id,!0),this.emitResize&&this.$emit("resize",this.id))},observeSize:function(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.observe(this.$el.parentNode),this.$el.parentNode.addEventListener("resize",this.onResize))},unobserveSize:function(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.unobserve(this.$el.parentNode),this.$el.parentNode.removeEventListener("resize",this.onResize))},onResize:function(t){var e=t.detail.contentRect,n=e.width,i=e.height;this.applySize(n,i)}},render:function(t){return t(this.tag,this.$slots.default)}},undefined,undefined,undefined,!1,void 0,void 0,void 0);var ft={version:"1.0.10-1",install:function(t,e){var n=Object.assign({},{installComponents:!0,componentsPrefix:""},e);for(var i in n)void 0!==n[i]&&(H[i]=n[i]);n.installComponents&&function(t,e){t.component("".concat(e,"recycle-scroller"),ot),t.component("".concat(e,"RecycleScroller"),ot),t.component("".concat(e,"dynamic-scroller"),ut),t.component("".concat(e,"DynamicScroller"),ut),t.component("".concat(e,"dynamic-scroller-item"),ct),t.component("".concat(e,"DynamicScrollerItem"),ct)}(t,n.componentsPrefix)}},dt=null;"undefined"!=typeof window?dt=window.Vue:void 0!==n.g&&(dt=n.g.Vue),dt&&dt.use(ft);var ht=n(93379),pt=n.n(ht),vt=n(2557),yt={insert:"head",singleton:!1};pt()(vt.Z,yt);vt.Z.locals;function mt(t){return function(t){if(Array.isArray(t))return gt(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 gt(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 gt(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 gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function bt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function _t(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?bt(Object(n),!0).forEach((function(e){wt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function wt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ot={name:"DialogWrapper",components:{DynamicScroller:ut,DynamicScrollerItem:ct,ChatInput:A.Z,DialogGroupInfo:E,DrawerOverlay:_.Z,UserInput:b.Z,DialogUpload:g,DialogView:h},props:{dialogId:{type:Number,default:0}},data:function(){return{msgText:"",msgNew:0,topId:0,allMsgs:[],tempMsgs:[],pasteShow:!1,pasteFile:[],pasteItem:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,dialogDrag:!1,groupInfoShow:!1}},mounted:function(){},beforeDestroy:function(){},computed:_t(_t({},(0,i.rn)(["userId","cacheDialogs","dialogMsgs","wsOpenNum"])),{},{isReady:function(){return this.dialogId>0&&this.dialogData.id>0},dialogData:function(){var t=this;return this.cacheDialogs.find((function(e){return e.id==t.dialogId}))||{}},dialogMsgList:function(){var t=this;return this.isReady?$A.cloneJSON(this.dialogMsgs.filter((function(e){return e.dialog_id==t.dialogId}))).sort((function(t,e){return t.id-e.id})):[]},tempMsgList:function(){var t=this;return this.isReady?$A.cloneJSON(this.tempMsgs.filter((function(e){return e.dialog_id==t.dialogId}))):[]},allMsgList:function(){var t=this.dialogMsgList,e=this.tempMsgList;return e.length>0&&t.push.apply(t,mt(e)),t},peopleNum:function(){return"group"===this.dialogData.type?$A.runNum(this.dialogData.people):0},pasteTitle:function(){var t=this.pasteItem,e=t.find((function(t){return"image"==t.type})),n=t.find((function(t){return"image"!=t.type}));return e&&n?"发送文件/图片":e?"发送图片":"发送文件"},pasteWrapperClass:function(){return this.pasteItem.find((function(t){return"image"!==t.type}))?["multiple"]:[]},msgUnreadOnly:function(){var t=0;return this.cacheDialogs.some((function(e){t+=$A.getDialogUnread(e)})),t<=0?"":(t>99&&(t="99+"),String(t))},isMyDialog:function(){var t=this.dialogData,e=this.userId;return t.dialog_user&&t.dialog_user.userid==e}}),watch:{$route:{handler:function(t){var e=this;if($A.isJson(window.__sendDialogMsg)&&window.__sendDialogMsg.time>$A.Time()){var n=window.__sendDialogMsg,i=n.msgFile,r=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(i)&&i.length>0?e.sendFileMsg(i):r&&e.sendMsg(r)}))}if(t.query&&t.query._){var o=$A.cloneJSON(t.query);delete o._,this.goForward({query:o},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;if(t){this.msgNew=0,this.topId=-1;var n=null;this.allMsgList.length>0&&(n=setTimeout((function(t){e.allMsgs=e.allMsgList,e.onToBottom()}),1));var i=(new Date).getTime();this.$store.dispatch("getDialogMsgs",t).then((function(t){n&&clearTimeout(n),setTimeout(e.onToBottom,Math.max(0,100-((new Date).getTime()-i)))})).catch((function(t){}))}},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId).catch((function(t){}))},allMsgList:function(t,e){var n=this,i=this.scrollInfo().scrollE;this.allMsgs=t,this.$nextTick((function(r){if(i>10&&e.length>0){var o=e[e.length-1].id,s=t.filter((function(t){return t.id&&t.id>o}));n.msgNew+=s.length}else n.onToBottom()}))}},methods:{sendMsg:function(t){var e,n=this;if($A.isJson(t))"record"===t.type&&this.sendRecordMsg(t.data);else if("string"==typeof t&&t?e=t:(e=this.msgText,this.msgText=""),""!=e){e=e.replace(/<\/span> <\/p>$/,"</span></p>"),this.onToBottom(),this.onActive();var i=$A.randomString(16);this.tempMsgs.push({id:i,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:e}}),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:e},method:"post"}).then((function(t){var e=t.data;n.tempMsgs=n.tempMsgs.filter((function(t){return t.id!=i})),n.sendSuccess(e)})).catch((function(t){var e=t.msg;$A.modalError(e),n.tempMsgs=n.tempMsgs.filter((function(t){return t.id!=i}))}))}else this.$refs.input.focus()},sendRecordMsg:function(t){var e=this;this.onToBottom(),this.onActive();var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"loading",userid:this.userId,msg:t}),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(t,{dialog_id:this.dialogId}),method:"post"}).then((function(t){var i=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(i)})).catch((function(t){var i=t.msg;$A.modalError(i),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))}))},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=new FileReader;n.readAsDataURL(t),n.onload=function(n){var i=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:i.result}),e.pasteShow=!0}})))},chatPasteDrag:function(t,e){this.dialogDrag=!1;var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,i=Array.prototype.slice.call(n);i.length>0&&(t.preventDefault(),this.sendFileMsg(i))},chatDragOver:function(t,e){var n=this,i=this.__dialogDrag=$A.randomString(8);if(t){if("move"===e.dataTransfer.effectAllowed)return;this.dialogDrag=!0}else setTimeout((function(){i===n.__dialogDrag&&(n.dialogDrag=t)}),150)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},chatFile:function(t,e){switch(t){case"progress":this.onToBottom(),this.onActive(),this.tempMsgs.push({id:e.tempId,dialog_id:this.dialogData.id,type:"loading",userid:this.userId,msg:{}});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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",this.dialogId),this.$store.dispatch("updateDialogLastMsg",t),this.onActive())},onEventFocus:function(t){this.$emit("on-focus",t)},onEventBlur:function(t){this.$emit("on-blur",t)},onEventMore:function(t){["image","file"].includes(t)&&this.$refs.chatUpload.handleClick()},onActive:function(){this.$emit("on-active")},onToBottom:function(){this.msgNew=0,this.isReady&&this.$refs.scroller.scrollToBottom()},openProject:function(){this.dialogData.group_info&&this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}})},openTask:function(){this.dialogData.group_info&&this.$store.dispatch("openTask",this.dialogData.group_info.id)},loadNextPage:function(){var t=this,e=this.allMsgs[0].id;this.$store.dispatch("getDialogMoreMsgs",this.dialogId).then((function(){t.$nextTick((function(){t.topId=e;var n=t.allMsgs.findIndex((function(t){return t.id==e}));n>-1&&t.$refs.scroller.scrollToItem(n)}))})).catch((function(){}))},openCreateGroup:function(){this.createGroupData={userids:this.dialogData.dialog_user?[this.userId,this.dialogData.dialog_user.userid]:[this.userId],uncancelable:[this.userId]},this.createGroupShow=!0},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,i=e.msg;$A.messageSuccess(i),t.createGroupShow=!1,t.createGroupData={},t.$store.dispatch("saveDialog",n),t.goForward({name:"manage-messenger",params:{dialogId:n.id}})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.createGroupLoad--}))},scrollInfo:function(){if(!this.isReady)return{scale:0,scrollY:0,scrollE:0};var t=this.$refs.scroller.$el,e=t.clientHeight,n=t.scrollTop,i=t.scrollHeight;return this.scrollY=n,{scale:n/(i-e),scrollY:n,scrollE:i-e-n}},onScroll:function(){var t=this;this.__onScroll&&clearTimeout(this.__onScroll),this.__onScroll=setTimeout((function(e){t.scrollInfo().scrollE<=10&&(t.msgNew=0)}),100)}}};const xt=(0,s.Z)(Ot,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isReady?n("div",{staticClass:"dialog-wrapper",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)}}},[t._t("head",(function(){return[n("div",{staticClass:"dialog-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-back",on:{click:t.goBack}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),t.msgUnreadOnly?n("div",{staticClass:"back-num"},[t._v(t._s(t.msgUnreadOnly))]):t._e()]),t._v(" "),n("div",{staticClass:"dialog-block"},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("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)}}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),n("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?n("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e(),t._v(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),t._v(" "),"group"===t.dialogData.type?["project"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openProject}},[t._v("\n "+t._s(t.$L("项目聊天室"))+" "+t._s(t.$L("打开项目管理"))+"\n ")]):"task"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openTask}},[t._v("\n "+t._s(t.$L("任务聊天室"))+" "+t._s(t.$L("查看任务详情"))+"\n ")]):t._e()]:"user"===t.dialogData.type?n("div",{class:["sub-title",!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()],2)]),t._v(" "),"group"===t.dialogData.type?["user"===t.dialogData.group_type?n("ETooltip",{attrs:{placement:"top",disabled:!t.$isDesktop,openDelay:600,content:t.$L("群设置")}},[n("i",{staticClass:"taskfont dialog-create",on:{click:function(e){t.groupInfoShow=!0}}},[t._v("")])]):t._e()]:"user"!==t.dialogData.type||t.isMyDialog?t._e():n("ETooltip",{attrs:{placement:"top",disabled:!t.$isDesktop,content:t.$L("创建群组")}},[n("i",{staticClass:"taskfont dialog-create",on:{click:t.openCreateGroup}},[t._v("")])])],2)]})),t._v(" "),n("DynamicScroller",{ref:"scroller",staticClass:"dialog-scroller overlay-y",attrs:{items:t.allMsgs,"min-item-size":58},on:{onScroll:t.onScroll},scopedSlots:t._u([{key:"before",fn:function(){return[0===t.allMsgs.length?[t.dialogData.loading>0?n("div",{staticClass:"dialog-item loading"},[n("Loading")],1):n("div",{staticClass:"dialog-item nothing"},[t._v(t._s(t.$L("暂无消息")))])]:t.dialogData.hasMorePages?n("div",{staticClass:"dialog-item history",on:{click:t.loadNextPage}},[t._v(t._s(t.$L("加载历史消息")))]):t._e()]},proxy:!0},{key:"default",fn:function(e){var i=e.item,r=e.index,o=e.active;return[n("DynamicScrollerItem",{class:{"dialog-item":!0,self:i.userid==t.userId,"history-tip":t.topId==i.id},attrs:{item:i,active:o,"size-dependencies":[i.msg],"data-index":r,"data-active":o},nativeOn:{click:function(t){}}},[t.topId==i.id?n("em",{staticClass:"history-text"},[t._v(t._s(t.$L("历史消息")))]):t._e(),t._v(" "),n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:i.userid,tooltipDisabled:i.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":i,"dialog-type":t.dialogData.type,"hide-percentage":t.isMyDialog}})],1)]}}],null,!1,3117735373)}),t._v(" "),n("div",{staticClass:"dialog-footer",class:{newmsg:t.msgNew>0&&t.allMsgs.length>0},on:{click:t.onActive}},[n("div",{staticClass:"dialog-newmsg",on:{click:t.onToBottom}},[t._v(t._s(t.$L("有"+t.msgNew+"条新消息")))]),t._v(" "),n("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId},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(" "),n("ChatInput",{ref:"input",attrs:{"dialog-id":t.dialogId,"emoji-bottom":!t.$isDesktop,maxlength:2e4,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventBlur,"on-more":t.onEventMore,"on-file":t.sendFileMsg,"on-send":t.sendMsg},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}})],1),t._v(" "),t.dialogDrag?n("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[n("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e(),t._v(" "),n("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"}},[n("ul",{staticClass:"dialog-wrapper-paste",class:t.pasteWrapperClass},t._l(t.pasteItem,(function(e){return n("li",["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])])})),0)]),t._v(" "),n("Modal",{attrs:{title:t.$L("创建群组"),"mask-closable":!1},model:{value:t.createGroupShow,callback:function(e){t.createGroupShow=e},expression:"createGroupShow"}},[n("Form",{attrs:{model:t.createGroupData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("群成员")}},[n("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(" "),n("FormItem",{attrs:{prop:"chat_name",label:t.$L("群名称")}},[n("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(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.createGroupShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.createGroupLoad>0},on:{click:t.onCreateGroup}},[t._v(t._s(t.$L("创建")))])],1)],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:380},model:{value:t.groupInfoShow,callback:function(e){t.groupInfoShow=e},expression:"groupInfoShow"}},[t.groupInfoShow?n("DialogGroupInfo",{attrs:{dialogId:t.dialogId}}):t._e()],1)],2):t._e()}),[],!1,null,null,null).exports},93109:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var i=n(20629),r=n(84186);const o={name:"ScrollerY",props:{static:{type:Boolean,default:!1},autoBottom:{type:Boolean,default:!1},autoRecovery:{type:Boolean,default:!0},autoRecoveryAnimate:{type:Boolean,default:!1}},data:function(){return{scrollY:0,scrollDiff:0,autoInterval:null}},mounted:function(){this.openInterval(),this.$nextTick(this.initScroll)},activated:function(){this.openInterval(),this.recoveryScroll()},destroyed:function(){this.closeInterval()},deactivated:function(){this.closeInterval()},methods:{initScroll:function(){var t=this;this.autoToBottom();var e="function"==typeof this.$listeners["on-scroll"],n=$A(this.$refs.scrollerView);n.scroll((function(){var i=Math.round(n.innerHeight()),r=n.scrollTop(),o=t.$refs.scrollerView.scrollHeight;if(t.scrollY=r,e){var s="static",a="static";t.scrollDiff-r>50?(t.scrollDiff=r,s="down"):t.scrollDiff-r<-100&&(t.scrollDiff=r,s="up"),t.scrollDiff-r>1?(t.scrollDiff=r,a="down"):t.scrollDiff-r<-1&&(t.scrollDiff=r,a="up"),t.$emit("on-scroll",{scale:r/(o-i),scrollY:r,scrollE:o-i-r,direction:s,directionreal:a})}}))},recoveryScroll:function(){var t=this;this.autoRecovery&&(this.scrollY>0||this.autoBottom)&&this.$nextTick((function(){t.autoBottom?t.autoToBottom():t.scrollTo(t.scrollY,t.autoRecoveryAnimate)}))},openInterval:function(){this.autoToBottom(),this.autoInterval&&clearInterval(this.autoInterval),this.autoInterval=setInterval(this.autoToBottom,300)},closeInterval:function(){clearInterval(this.autoInterval),this.autoInterval=null},scrollTo:function(t,e){!1===e?$A(this.$refs.scrollerView).stop().scrollTop(t):$A(this.$refs.scrollerView).stop().animate({scrollTop:t})},autoToBottom:function(){this.autoBottom&&$A.scrollToView(this.$refs.bottom,{behavior:"instant",inline:"end"})},scrollInfo:function(){var t=$A(this.$refs.scrollerView),e=Math.round(t.innerHeight()),n=t.scrollTop(),i=this.$refs.scrollerView.scrollHeight;return this.scrollY=n,{scale:n/(i-e),scrollY:n,scrollE:i-e-n}},querySelector:function(t){return this.$refs.scrollerView&&this.$refs.scrollerView.querySelector(t)}}};var s=n(51900);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const c={components:{ScrollerY:(0,s.Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"scrollerView",staticClass:"app-scroller-y",class:[t.static?"static":""]},[t._t("default"),t._v(" "),n("div",{ref:"bottom",staticClass:"app-scroller-bottom"})],2)}),[],!1,null,null,null).exports,DialogWrapper:r.Z},data:function(){return{tabActive:"dialog",dialogType:[{type:"",name:"全部"},{type:"project",name:"项目"},{type:"task",name:"任务"},{type:"user",name:"个人"}],dialogActive:"",dialogKey:"",contactsKey:"",contactsLoad:0,contactsData:null,contactsCurrentPage:1,contactsHasMorePages:!1,topOperateStyles:{},topOperateVisible:!1,topOperateItem:{}}},activated:function(){this.updateDialogs(1e3)},deactivated:function(){this.updateDialogs(-1)},computed:l(l({},(0,i.rn)(["userId","cacheDialogs","loadDialogs","windowMax768"])),{},{dialogId:function(){var t=this.$route.params.dialogId;return["dialog","contacts"].includes(t)&&(this.tabActive=t),parseInt(/^\d+$/.test(t)?t:0)},dialogList:function(){var t=this,e=this.dialogActive,n=this.dialogKey;return""==e&&""==n?this.cacheDialogs.filter((function(e){return t.filterDialog(e)})).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):$A.Date(e.last_at)-$A.Date(t.last_at)})):this.cacheDialogs.filter((function(i){if(!t.filterDialog(i))return!1;if(n){var r=$A.strExists(i.name,n),o=i.last_msg&&"text"===i.last_msg.type&&$A.strExists(i.last_msg.msg.text,n);if(!r&&!o)return!1}else if(e)switch(e){case"project":case"task":if(i.group_type!=e)return!1;break;case"user":if("user"!=i.type)return!1;break;default:return!1}return!0})).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):$A.Date(e.last_at)-$A.Date(t.last_at)}))},contactsFilter:function(){var t=this.contactsData,e=this.contactsKey;return null===t?[]:e?t.filter((function(t){return $A.strExists("".concat(t.email,"||").concat(t.nickname),e)})):t},contactsList:function(){var t=[];return this.contactsFilter.some((function(e){var n=e.az?e.az.toUpperCase():"#",i=t.find((function(t){return t.az==n}));i?-1===i.list.findIndex((function(t){return t.userid==e.userid}))&&i.list.push(e):t.push({az:n,list:[e]})})),t},msgUnread:function(){return function(t){var e=0;return this.cacheDialogs.some((function(n){var i=$A.getDialogUnread(n);if(i)switch(t){case"project":case"task":t==n.group_type&&(e+=i);break;case"user":t==n.type&&(e+=i);break;default:e+=i}})),e}},overlayClass:function(){return{"overlay-y":!0,"overlay-none":!0===this.topOperateVisible}}}),watch:{dialogKey:function(t){switch(t){case"vlog.open":case"vlog:open":$A.setStorage("vlog::open","open"),$A.reloadUrl();break;case"vlog.close":case"vlog:close":$A.setStorage("vlog::open","close"),$A.reloadUrl()}},contactsKey:function(t){var e=this;""!=t&&(this.contactsLoad++,setTimeout((function(){e.contactsKey==t&&e.getContactsList(1),e.contactsLoad--}),600))},tabActive:{handler:function(t){"contacts"==t?null===this.contactsData&&this.getContactsList(1):this.updateDialogs(1e3)},immediate:!0},dialogId:{handler:function(t){t>0&&($A.setStorage("messenger::dialogId",t),this.scrollIntoActive())},immediate:!0}},methods:{listScroll:function(t){if("up"===t.directionreal)t.scrollE<10&&"contacts"===this.tabActive&&0==this.contactsLoad&&this.contactsHasMorePages&&this.getContactsList(this.contactsCurrentPage+1);this.topOperateVisible=!1},onActive:function(t){if(this.dialogActive==t){var e=this.dialogList.find((function(t){return $A.getDialogUnread(t)>0}));e&&$A.scrollToView(this.$refs["dialog_".concat(e.id)][0],{behavior:"smooth",scrollMode:"if-needed"})}this.dialogActive=t},openDialog:function(t){t>0?this.goForward({name:"manage-messenger",params:{dialogId:t}}):this.goForward({name:"manage-messenger"})},openContacts:function(t){var e=this;this.$isDesktop&&(this.tabActive="dialog"),this.$store.dispatch("openDialogUserid",t.userid).then((function(t){var n=t.data;e.openDialog(n.id)}))},filterDialog:function(t){if($A.getDialogUnread(t)>0||t.id==this.dialogId||t.top_at)return!0;if(void 0===t.name)return!1;if(!t.last_at)return!1;if("group"==t.type&&["project","task"].includes(t.group_type)&&$A.isJson(t.group_info)){if("task"==t.group_type&&t.group_info.complete_at)if(432e3+Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.complete_at,!0))<$A.Time())return!1;if(t.group_info.deleted_at)if(172800+Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.deleted_at,!0))<$A.Time())return!1;if(t.group_info.archived_at)if(259200+Math.max($A.Date(t.last_at,!0),$A.Date(t.group_info.archived_at,!0))<$A.Time())return!1}return!0},getContactsList:function(t){var e=this;this.contactsLoad++,this.$store.dispatch("call",{url:"users/search",data:{keys:{key:this.contactsKey},sorts:{az:"asc"},page:t,pagesize:50}}).then((function(t){var n=t.data;null===e.contactsData&&(e.contactsData=[]),n.data.some((function(t){-1===e.contactsData.findIndex((function(e){return e.userid==t.userid}))&&e.contactsData.push(t)})),e.contactsCurrentPage=n.current_page,e.contactsHasMorePages=n.current_page<n.last_page})).catch((function(){e.contactsHasMorePages=!1})).finally((function(t){e.contactsLoad--}))},formatLastMsg:function(t){if($A.isJson(t))switch(t.type){case"text":return $A.getMsgTextPreview(t.msg.text);case"record":return"[".concat(this.$L("语音"),"]");case"file":return"img"==t.msg.type?"[".concat(this.$L("图片"),"]"):"[".concat(this.$L("文件"),"] ").concat(t.msg.name);default:return"[".concat(this.$L("未知的消息"),"]")}return""},lastMsgReadDone:function(t){if($A.isJson(t)){var e=t.userid,n=t.percentage;if(e===this.userId)return 100===n?"md-done-all":"md-checkmark"}return null},scrollIntoActive:function(){var t=this;this.$nextTick((function(){if(t.$isDesktop&&t.$refs.list){var e=t.$refs.list.querySelector(".active");if(e)$A.scrollToView(e,{behavior:"instant",scrollMode:"if-needed"});else t.cacheDialogs.find((function(e){return e.id==t.dialogId}))&&t.dialogActive&&(t.dialogActive="",t.$nextTick((function(){var e=t.$refs.list.querySelector(".active");e&&$A.scrollToView(e,{behavior:"instant",scrollMode:"if-needed"})})))}}))},handleRightClick:function(t,e){var n=this;this.handleClickTopOperateOutside(),this.topOperateItem=$A.isJson(e)?e:{},this.$nextTick((function(){var e=n.$refs.dialogWrapper.getBoundingClientRect();n.topOperateStyles={left:"".concat(t.clientX-e.left,"px"),top:"".concat(t.clientY-e.top+100-n.$refs.list.scrollInfo().scrollY,"px")},n.topOperateVisible=!0}))},handleClickTopOperateOutside:function(){this.topOperateVisible=!1},handleTopClick:function(){var t=this;this.$store.dispatch("call",{url:"dialog/top",data:{dialog_id:this.topOperateItem.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveDialog",n),t.$nextTick(t.scrollIntoActive)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},updateRead:function(t){var e=this;this.$store.dispatch("call",{url:"dialog/msg/mark",data:{dialog_id:this.topOperateItem.id,type:t}}).then((function(t){var n=t.data;e.$store.dispatch("saveDialog",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},updateDialogs:function(t){var e=this;this.__updateDialogs&&clearTimeout(this.__updateDialogs),t>-1&&(this.__updateDialogs=setTimeout((function(t){"dialog"===e.tabActive&&e.$store.dispatch("getDialogs",!0).catch((function(){}))}),t))}}};const f=(0,s.Z)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-messenger"},[n("PageTitle",{attrs:{title:t.$L("dialog"===t.tabActive?"消息":"通讯录")}}),t._v(" "),n("div",{staticClass:"messenger-wrapper"},[n("div",{staticClass:"messenger-select"},[n("div",{staticClass:"messenger-search"},[n("div",{staticClass:"search-wrapper"},["dialog"===t.tabActive?n("Input",{attrs:{placeholder:t.$L(t.loadDialogs?"更新中...":"搜索消息"),clearable:""},model:{value:t.dialogKey,callback:function(e){t.dialogKey=e},expression:"dialogKey"}},[n("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.loadDialogs?n("Loading"):n("Icon",{attrs:{type:"ios-search"}})],1)]):n("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("搜索联系人"),clearable:""},model:{value:t.contactsKey,callback:function(e){t.contactsKey=e},expression:"contactsKey"}})],1)]),t._v(" "),"dialog"!==t.tabActive||t.dialogKey?t._e():n("div",{staticClass:"messenger-nav"},t._l(t.dialogType,(function(e,i){return n("p",{key:i,class:{active:t.dialogActive==e.type},on:{click:function(n){return t.onActive(e.type)}}},[n("Badge",{staticClass:"nav-num",attrs:{count:t.msgUnread(e.type)}}),t._v("\n "+t._s(t.$L(e.name))+"\n ")],1)})),0),t._v(" "),n("ScrollerY",{ref:"list",staticClass:"messenger-list",class:t.overlayClass,attrs:{static:""},on:{"on-scroll":t.listScroll}},["dialog"===t.tabActive?n("ul",{ref:"dialogWrapper",staticClass:"dialog"},[0===t.dialogList.length?n("li",{staticClass:"nothing"},[t._v("\n "+t._s(t.$L(t.dialogKey?'没有任何与"'+t.dialogKey+'"相关的会话':"没有任何会话"))+"\n ")]):t._l(t.dialogList,(function(e,i){return n("li",{key:i,ref:"dialog_"+e.id,refInFor:!0,class:{top:e.top_at,active:e.id==t.dialogId,operate:e.id==t.topOperateItem.id&&t.topOperateVisible,completed:t.$A.dialogCompleted(e)},on:{click:function(n){return t.openDialog(e.id)},contextmenu:function(n){return n.preventDefault(),n.stopPropagation(),t.handleRightClick(n,e)}}},["group"==e.type?["project"==e.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==e.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:e.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:e.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}}),t._v(" "),n("div",{staticClass:"dialog-box"},[n("div",{staticClass:"dialog-title"},[t.$A.getDialogMention(e)>0?n("div",{staticClass:"mention"},[t._v("[@"+t._s(t.$A.getDialogMention(e))+"]")]):t._e(),t._v(" "),t._l(t.$A.dialogTags(e),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),n("span",[t._v(t._s(e.name))]),t._v(" "),"user"==e.type&&t.lastMsgReadDone(e.last_msg)&&e.dialog_user.userid!=t.userId?n("Icon",{attrs:{type:t.lastMsgReadDone(e.last_msg)}}):t._e(),t._v(" "),e.last_at?n("em",[t._v(t._s(t.$A.formatTime(e.last_at)))]):t._e()],2),t._v(" "),n("div",{staticClass:"dialog-text no-dark-content"},["group"==e.type&&e.last_msg?[e.last_msg.userid==t.userId?n("div",{staticClass:"last-self"},[t._v(t._s(t.$L("你")))]):n("UserAvatar",{attrs:{userid:e.last_msg.userid,"show-name":!0,"show-icon":!1,"tooltip-disabled":""}})]:t._e(),t._v(" "),n("div",{staticClass:"last-text"},[t._v(t._s(t.formatLastMsg(e.last_msg)))])],2)]),t._v(" "),n("Badge",{staticClass:"dialog-num",attrs:{count:t.$A.getDialogUnread(e)}}),t._v(" "),n("div",{staticClass:"dialog-split"})],2)}))],2):n("ul",{staticClass:"contacts"},[0===t.contactsFilter.length?[t.contactsLoad>0?n("li",{staticClass:"loading"},[n("Loading")],1):n("li",{staticClass:"nothing"},[t._v("\n "+t._s(t.$L(t.contactsKey?'没有任何与"'+t.contactsKey+'"相关的联系人':"没有任何联系人"))+"\n ")])]:[t._l(t.contactsList,(function(e){return n("li",[n("div",{staticClass:"label"},[t._v(t._s(e.az))]),t._v(" "),n("ul",t._l(e.list,(function(e,i){return n("li",{key:i,on:{click:function(n){return t.openContacts(e)}}},[n("div",{staticClass:"avatar"},[n("UserAvatar",{attrs:{userid:e.userid,size:30}})],1),t._v(" "),n("div",{staticClass:"nickname"},[t._v(t._s(e.nickname))])])})),0)])})),t._v(" "),n("li",{staticClass:"loaded"},[t._v(t._s(t.$L("共"+t.contactsFilter.length+"位联系人")))])]],2),t._v(" "),n("div",{staticClass:"top-operate",style:t.topOperateStyles},[n("Dropdown",{attrs:{trigger:"custom",visible:t.topOperateVisible,"transfer-class-name":"page-file-dropdown-menu",transfer:""},on:{"on-clickoutside":t.handleClickTopOperateOutside}},[n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{nativeOn:{click:function(e){return t.handleTopClick.apply(null,arguments)}}},[t._v("\n "+t._s(t.$L(t.topOperateItem.top_at?"取消置顶":"置顶该聊天"))+"\n ")]),t._v(" "),t.$A.getDialogUnread(t.topOperateItem)>0?n("DropdownItem",{nativeOn:{click:function(e){return t.updateRead("read")}}},[t._v("\n "+t._s(t.$L("标记已读"))+"\n ")]):n("DropdownItem",{nativeOn:{click:function(e){return t.updateRead("unread")}}},[t._v("\n "+t._s(t.$L("标记未读"))+"\n ")])],1)],1)],1)]),t._v(" "),n("div",{staticClass:"messenger-menu"},[n("div",{staticClass:"menu-icon"},[n("Icon",{class:{active:"dialog"===t.tabActive},attrs:{type:"ios-chatbubbles"},on:{click:function(e){t.tabActive="dialog"}}}),t._v(" "),n("Badge",{staticClass:"menu-num",attrs:{count:t.msgUnread("all")}})],1),t._v(" "),n("div",{staticClass:"menu-icon"},[n("Icon",{class:{active:"contacts"===t.tabActive},attrs:{type:"md-person"},on:{click:function(e){t.tabActive="contacts"}}})],1)])],1),t._v(" "),n("transition",{attrs:{name:t.windowMax768?"mobile-dialog":""}},[t.dialogId||!t.windowMax768?n("div",{staticClass:"messenger-msg"},[n("div",{staticClass:"msg-dialog-bg"},[n("div",{staticClass:"msg-dialog-bg-icon"},[n("Icon",{attrs:{type:"ios-chatbubbles"}})],1),t._v(" "),n("div",{staticClass:"msg-dialog-bg-text"},[t._v(t._s(t.$L("选择一个会话开始聊天")))])]),t._v(" "),t.dialogId>0?n("DialogWrapper",{attrs:{dialogId:t.dialogId},on:{"on-active":t.scrollIntoActive}}):t._e()],1):t._e()])],1)],1)}),[],!1,null,null,null).exports}}]);