!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Quill=t()}}(function(){var t;return function e(t,n,r){function i(s,l){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!l&&u)return u(s,!0);if(o)return o(s,!0);var a=new Error("Cannot find module '"+s+"'");throw a.code="MODULE_NOT_FOUND",a}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s=200?Xn(e):null,a=e.length;u&&(s=g,l=!1,e=u);t:for(;++ir;)t=t[e[r++]];return r&&r==i?t:he}}function U(t,e,n,r,i,o){return t===e?!0:null==t||null==e||!Xt(t)&&!a(e)?t!==t&&e!==e:j(t,e,U,n,r,i,o)}function j(t,e,n,r,i,o,s){var l=cr(t),u=cr(e),a=qe,c=qe;l||(a=_n.call(t),a==Ne?a=De:a!=De&&(l=Jt(t))),u||(c=_n.call(e),c==Ne?c=De:c!=De&&(u=Jt(e)));var h=a==De,f=c==De,p=a==c;if(p&&!l&&!h)return dt(t,e,a);if(!i){var d=h&&yn.call(t,"__wrapped__"),g=f&&yn.call(e,"__wrapped__");if(d||g)return n(d?t.value():t,g?e.value():e,r,i,o,s)}if(!p)return!1;o||(o=[]),s||(s=[]);for(var v=o.length;v--;)if(o[v]==t)return s[v]==e;o.push(t),s.push(e);var m=(l?pt:gt)(t,e,n,r,i,o,s);return o.pop(),s.pop(),m}function B(t,e,n){var r=e.length,i=r,o=!n;if(null==t)return!i;for(t=jt(t);r--;){var s=e[r];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++re&&(e=-e>i?0:i+e),n=n===he||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r=i){for(;i>r;){var o=r+i>>>1,s=t[o];(n?e>=s:e>s)&&null!==s?r=o+1:i=o}return i}return X(t,e,se,n)}function X(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,s=e!==e,l=null===e,u=e===he;o>i;){var a=xn((i+o)/2),c=n(t[a]),h=c!==he,f=c===c;if(s)var p=f||r;else p=l?f&&h&&(r||null!=c):u?f&&(r||h):null==c?!1:r?e>=c:e>c;p?i=a+1:o=a}return Dn(o,jn)}function $(t,e,n){if("function"!=typeof t)return se;if(e===he)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,s){return t.call(e,n,r,i,o,s)}}return function(){return t.apply(e,arguments)}}function Z(t){return An.call(t,0)}function Q(t,e,n){for(var r=n.length,i=-1,o=On(t.length-r,0),s=-1,l=e.length,u=Array(o+l);++s2?n[i-2]:he,s=i>2?n[2]:he,l=i>1?n[i-1]:he;for("function"==typeof o?(o=$(o,l,5),i-=2):(o="function"==typeof l?l:he,i-=o?1:0),s&&qt(n[0],n[1],s)&&(o=3>i?he:o,i=1);++r-1?n[s]:he}return I(n,r,t)}}function lt(t,e){return function(n,r,i){return"function"==typeof r&&i===he&&cr(n)?t(n,r):e(n,$(r,i,3))}}function ut(t){var e=Pt(function(n,r){var i=c(r,e.placeholder);return ft(n,t,null,r,i)});return e}function at(t,e){return function(n,r,i,o){var s=arguments.length<3;return"function"==typeof r&&o===he&&cr(n)?t(n,r,i,s):z(n,vt(r,o,4),i,s,e)}}function ct(t,e,n,r,i,o,s,l,u,a){function h(){for(var _=arguments.length,E=_,T=Array(_);E--;)T[E]=arguments[E];if(r&&(T=Q(T,r,i)),o&&(T=J(T,o,s)),g||y){var A=h.placeholder,x=c(T,A);if(_-=x.length,a>_){var L=l?m(l):null,N=On(a-_,0),q=g?x:null,S=g?null:x,w=g?T:null,C=g?null:T;e|=g?ye:be,e&=~(g?be:ye),v||(e&=~(pe|de));var k=[t,e,n,w,q,C,S,L,u,N],I=ct.apply(he,k);return wt(t)&&Qn(I,k),I.placeholder=A,I}}var O=p?n:this,D=d?O[t]:t;return l&&(T=Mt(T,l)),f&&uu))return!1;for(;++l-1&&t%1==0&&e>t}function qt(t,e,n){if(!Xt(n))return!1;var r=typeof e;if("number"==r?Lt(n)&&Nt(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function St(t,e){var n=typeof t;if("string"==n&&$e.test(t)||"number"==n)return!0;if(cr(t))return!1;var r=!Xe.test(t);return r||null!=e&&t in jt(e)}function wt(t){var e=mt(t);if(!(e in p.prototype))return!1;var n=h[e];if(t===n)return!0;var r=$n(n);return!!r&&t===r[0]}function Ct(t){return"number"==typeof t&&t>-1&&t%1==0&&Hn>=t}function kt(t){return t===t&&!Xt(t)}function It(t,e){var n=t[1],r=e[1],i=n|r,o=_e>i,s=r==_e&&n==ve||r==_e&&n==Ee&&t[7].length<=e[8]||r==(_e|Ee)&&n==ve;if(!o&&!s)return t;r&pe&&(t[2]=e[2],i|=n&pe?0:ge);var l=e[3];if(l){var u=t[3];t[3]=u?Q(u,l,e[4]):m(l),t[4]=u?c(t[3],Le):m(e[4])}return l=e[5],l&&(u=t[5],t[5]=u?J(u,l,e[6]):m(l),t[6]=u?c(t[5],Le):m(e[6])),l=e[7],l&&(t[7]=m(l)),r&_e&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Ot(t,e){t=jt(t);for(var n=-1,r=e.length,i={};++nn?On(r+n,0):n;else if(n){var i=W(t,e),s=t[i];return(e===e?e===s:s!==s)?i:-1}return o(t,e,n||0)}function Ht(t){var e=t?t.length:0;return e?t[e-1]:he}function Kt(t,e,n){var r=cr(t)?b:k;return n&&qt(t,e,n)&&(e=null),("function"!=typeof e||n!==he)&&(e=vt(e,n,3)),r(t,e)}function Gt(t,e,n){var r=cr(t)?_:F;return e=vt(e,n,3),r(t,e)}function Pt(t,e){if("function"!=typeof t)throw new TypeError(xe);return e=On(e===he?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=On(n.length-e,0),o=Array(i);++r-1}function Wt(t,e,n,r){n="function"==typeof n?$(n,r,3):he;var i=n?n(t,e):he;return i===he?U(t,e,n):!!i}function Xt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function $t(t){return null==t?!1:_n.call(t)==ke?En.test(mn.call(t)):a(t)&&nn.test(t)}function Zt(t){return"number"==typeof t||a(t)&&_n.call(t)==Oe}function Qt(t){return"string"==typeof t||a(t)&&_n.call(t)==Ue}function Jt(t){return a(t)&&Ct(t.length)&&!!on[_n.call(t)]}function te(t){if(null==t)return[];Xt(t)||(t=Object(t));var e=t.length;e=e&&Ct(e)&&(cr(t)||Vt(t))&&e||0;for(var n=t.constructor,r=-1,i="function"==typeof n&&n.prototype===t,o=Array(e),s=e>0;++r>>1,Fn=wn?wn.BYTES_PER_ELEMENT:0,Hn=9007199254740991,Kn=Sn&&new Sn,Gn={},Pn=h.support={};!function(t){var e=function(){this.x=t},n=[];e.prototype={valueOf:t,y:t};for(var r in new e)n.push(r);try{Pn.dom=11===vn.createDocumentFragment().nodeType}catch(i){Pn.dom=!1}}(1,0);var zn=function(){function t(){}return function(e){if(Xt(e)){t.prototype=e;var n=new t;t.prototype=null}return n||{}}}(),Vn=nt(M),Yn=rt(),Wn=Kn?function(t,e){return Kn.set(t,e),t}:se;An||(Z=Tn&&qn?function(t){var e=t.byteLength,n=wn?xn(e/Fn):0,r=n*Fn,i=new Tn(e);if(n){var o=new wn(i,0,n);o.set(new wn(t,0,n))}return e!=r&&(o=new qn(i,r),o.set(new qn(t,r))),i}:oe(null));var Xn=Cn&&Nn?function(t){return new d(t)}:oe(null),$n=Kn?function(t){return Kn.get(t)}:ue,Zn=G("length"),Qn=function(){var t=0,e=0;return function(n,r){var i=sr(),o=Ae-(i-e);if(e=i,o>0){if(++t>=Te)return n}else t=0;return Wn(n,r)}}(),Jn=Pt(function(t,e){return Lt(t)?C(t,O(e,!1,!0)):[]}),tr=Pt(function(t){for(var e=t.length,n=e,r=Array(h),i=yt(),s=i==o,l=[];n--;){var u=t[n]=Lt(u=t[n])?u:[];r[n]=s&&u.length>=120?Xn(n&&u):null}var a=t[0],c=-1,h=a?a.length:0,f=r[0];t:for(;++ci;i++)t&&t.push(n._listeners[i]);return[n]}if("*"===d||"**"===d||n[d]){if("*"===d){for(l in n)"_listeners"!==l&&n.hasOwnProperty(l)&&(f=f.concat(s(t,e,n[l],r+1)));return f}if("**"===d){h=r+1===p||r+2===p&&"*"===g,h&&n._listeners&&(f=f.concat(s(t,e,n,p)));for(l in n)"_listeners"!==l&&n.hasOwnProperty(l)&&("*"===l||"**"===l?(n[l]._listeners&&!h&&(f=f.concat(s(t,e,n[l],p))),f=f.concat(s(t,e,n[l],r))):f=f.concat(l===g?s(t,e,n[l],r+2):s(t,e,n[l],r)));return f}f=f.concat(s(t,e,n[d],r+1))}if(u=n["*"],u&&s(t,e,u,r+1),a=n["**"])if(p>r){a._listeners&&s(t,e,a,p);for(l in a)"_listeners"!==l&&a.hasOwnProperty(l)&&(l===g?s(t,e,a[l],r+2):l===d?s(t,e,a[l],r+1):(c={},c[l]=a[l],s(t,e,{"**":c},r+1)))}else a._listeners?s(t,e,a,p):a["*"]&&a["*"]._listeners&&s(t,e,a["*"],p);return f}function l(t,e){t="string"==typeof t?t.split(this.delimiter):t.slice();for(var n=0,r=t.length;r>n+1;n++)if("**"===t[n]&&"**"===t[n+1])return;for(var i=this.listenerTree,o=t.shift();o;){if(i[o]||(i[o]={}),i=i[o],0===t.length){if(i._listeners){if("function"==typeof i._listeners)i._listeners=[i._listeners,e];else if(u(i._listeners)&&(i._listeners.push(e),!i._listeners.warned)){var s=a;"undefined"!=typeof this._events.maxListeners&&(s=this._events.maxListeners),s>0&&i._listeners.length>s&&(i._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",i._listeners.length),console.trace())}}else i._listeners=e;return!0}o=t.shift()}return!0}var u=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=10;o.prototype.delimiter=".",o.prototype.setMaxListeners=function(t){this._events||n.call(this),this._events.maxListeners=t,this._conf||(this._conf={}),this._conf.maxListeners=t},o.prototype.event="",o.prototype.once=function(t,e){return this.many(t,1,e),this},o.prototype.many=function(t,e,n){function r(){0===--e&&i.off(t,r),n.apply(this,arguments)}var i=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");return r._origin=n,this.on(t,r),i},o.prototype.emit=function(){this._events||n.call(this);var t=arguments[0];if("newListener"===t&&!this.newListener&&!this._events.newListener)return!1;if(this._all){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;i++)r[i-1]=arguments[i];for(i=0,e=this._all.length;e>i;i++)this.event=t,this._all[i].apply(this,r)}if("error"===t&&!(this._all||this._events.error||this.wildcard&&this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var o;if(this.wildcard){o=[];var l="string"==typeof t?t.split(this.delimiter):t.slice();s.call(this,o,l,this.listenerTree,0)}else o=this._events[t];if("function"==typeof o){if(this.event=t,1===arguments.length)o.call(this);else if(arguments.length>1)switch(arguments.length){case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:for(var e=arguments.length,r=new Array(e-1),i=1;e>i;i++)r[i-1]=arguments[i];o.apply(this,r)}return!0}if(o){for(var e=arguments.length,r=new Array(e-1),i=1;e>i;i++)r[i-1]=arguments[i];for(var u=o.slice(),i=0,e=u.length;e>i;i++)this.event=t,u[i].apply(this,r);return u.length>0||!!this._all}return!!this._all},o.prototype.on=function(t,e){if("function"==typeof t)return this.onAny(t),this;if("function"!=typeof e)throw new Error("on only accepts instances of Function");if(this._events||n.call(this),this.emit("newListener",t,e),this.wildcard)return l.call(this,t,e),this;if(this._events[t]){if("function"==typeof this._events[t])this._events[t]=[this._events[t],e];else if(u(this._events[t])&&(this._events[t].push(e),!this._events[t].warned)){var r=a;"undefined"!=typeof this._events.maxListeners&&(r=this._events.maxListeners),r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),console.trace())}}else this._events[t]=e;return this},o.prototype.onAny=function(t){if("function"!=typeof t)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(t),this},o.prototype.addListener=o.prototype.on,o.prototype.off=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var i="string"==typeof t?t.split(this.delimiter):t.slice();r=s.call(this,null,i,this.listenerTree,0)}else{if(!this._events[t])return this;n=this._events[t],r.push({_listeners:n})}for(var o=0;oc;c++)if(n[c]===e||n[c].listener&&n[c].listener===e||n[c]._origin&&n[c]._origin===e){a=c;break}if(0>a)continue;return this.wildcard?l._listeners.splice(a,1):this._events[t].splice(a,1),0===n.length&&(this.wildcard?delete l._listeners:delete this._events[t]),this}(n===e||n.listener&&n.listener===e||n._origin&&n._origin===e)&&(this.wildcard?delete l._listeners:delete this._events[t])}return this},o.prototype.offAny=function(t){var e,n=0,r=0;if(t&&this._all&&this._all.length>0){for(e=this._all,n=0,r=e.length;r>n;n++)if(t===e[n])return e.splice(n,1),this}else this._all=[];return this},o.prototype.removeListener=o.prototype.off,o.prototype.removeAllListeners=function(t){if(0===arguments.length)return!this._events||n.call(this),this;if(this.wildcard)for(var e="string"==typeof t?t.split(this.delimiter):t.slice(),r=s.call(this,null,e,this.listenerTree,0),i=0;i0&&(n.attributes=e),this.push(n))},l.prototype["delete"]=function(t){return 0>=t?this:this.push({"delete":t})},l.prototype.retain=function(t,e){if(0>=t)return this;var n={retain:t};return i.object(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.clone(t),i.object(n)){if(i.number(t["delete"])&&i.number(n["delete"]))return this.ops[e-1]={"delete":n["delete"]+t["delete"]},this;if(i.number(n["delete"])&&null!=t.insert&&(e-=1,n=this.ops[e-1],!i.object(n)))return this.ops.unshift(t),this;if(i.equal(t.attributes,n.attributes)){if(i.string(t.insert)&&i.string(n.insert))return this.ops[e-1]={insert:n.insert+t.insert},i.object(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this;if(i.number(t.retain)&&i.number(n.retain))return this.ops[e-1]={retain:n.retain+t.retain},i.object(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.length=function(){return this.ops.reduce(function(t,e){return t+o.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,i.number(e)||(e=1/0);for(var n=new l,r=o.iterator(this.ops),s=0;e>s&&r.hasNext();){var u;t>s?u=r.next(t-s):(u=r.next(e-s),n.push(u)),s+=o.length(u)}return n},l.prototype.compose=function(t){for(var e=o.iterator(this.ops),n=o.iterator(t.ops),r=new l;e.hasNext()||n.hasNext();)if("insert"===n.peekType())r.push(n.next());else if("delete"===e.peekType())r.push(e.next());else{var s=Math.min(e.peekLength(),n.peekLength()),u=e.next(s),a=n.next(s);if(i.number(a.retain)){var c={};i.number(u.retain)?c.retain=s:c.insert=u.insert;var h=o.attributes.compose(u.attributes,a.attributes,i.number(u.retain));h&&(c.attributes=h),r.push(c)}else i.number(a["delete"])&&i.number(u.retain)&&r.push(a)}return r.chop()},l.prototype.concat=function(t){var e=this.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){var e=new l;if(this.ops===t.ops)return e;var n=[this.ops,t.ops].map(function(e){return e.map(function(n){if(null!=n.insert)return i.string(n.insert)?n.insert:s;var r=e===t.ops?"on":"with";throw new Error("diff() called "+r+" non-document")}).join("")}),u=r(n[0],n[1]),a=o.iterator(this.ops),c=o.iterator(t.ops);return u.forEach(function(t){for(var n=t[1].length;n>0;){var s=0;switch(t[0]){case r.INSERT:s=Math.min(c.peekLength(),n),e.push(c.next(s));break;case r.DELETE:s=Math.min(n,a.peekLength()),a.next(s),e["delete"](s);break;case r.EQUAL:s=Math.min(a.peekLength(),c.peekLength(),n);var l=a.next(s),u=c.next(s);i.equal(l.insert,u.insert)?e.retain(s,o.attributes.diff(l.attributes,u.attributes)):e.push(u)["delete"](s); }n-=s}}),e.chop()},l.prototype.transform=function(t,e){if(e=!!e,i.number(t))return this.transformPosition(t,e);for(var n=o.iterator(this.ops),r=o.iterator(t.ops),s=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())s.push(r.next());else{var u=Math.min(n.peekLength(),r.peekLength()),a=n.next(u),c=r.next(u);if(a["delete"])continue;c["delete"]?s.push(c):s.retain(u,o.attributes.transform(a.attributes,c.attributes,e))}else s.retain(o.length(n.next()));return s.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=o.iterator(this.ops),r=0;n.hasNext()&&t>=r;){var i=n.peekLength(),s=n.peekType();n.next(),"delete"!==s?("insert"===s&&(t>r||!e)&&(t+=i),r+=i):t-=Math.min(i,t-r)}return t},e.exports=l},{"./is":4,"./op":5,"fast-diff":6}],4:[function(t,e,n){e.exports={equal:function(t,e){if(t===e)return!0;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(!this.object(t)||!this.object(e))return!1;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},array:function(t){return Array.isArray(t)},number:function(t){return"number"==typeof t?!0:"object"==typeof t&&"[object Number]"===Object.prototype.toString.call(t)?!0:!1},object:function(t){return t?"function"==typeof t||"object"==typeof t:!1},string:function(t){return"string"==typeof t?!0:"object"==typeof t&&"[object String]"===Object.prototype.toString.call(t)?!0:!1}}},{}],5:[function(t,e,n){function r(t){this.ops=t,this.index=0,this.offset=0}var i=t("./is"),o={attributes:{clone:function(t,e){return i.object(t)?Object.keys(t).reduce(function(n,r){return void 0===t[r]||null===t[r]&&!e||(n[r]=t[r]),n},{}):{}},compose:function(t,e,n){i.object(t)||(t={}),i.object(e)||(e={});var r=this.clone(e,n);for(var o in t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){i.object(t)||(t={}),i.object(e)||(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return 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(!i.object(t))return e;if(!i.object(e))return void 0;if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}},clone:function(t){var e=this.attributes.clone(t);return i.object(e.attributes)&&(e.attributes=this.attributes.clone(e.attributes,!0)),e},iterator:function(t){return new r(t)},length:function(t){return i.number(t["delete"])?t["delete"]:i.number(t.retain)?t.retain:i.string(t.insert)?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,i.number(e["delete"]))return{"delete":t};var s={};return e.attributes&&(s.attributes=e.attributes),i.number(e.retain)?s.retain=t:s.insert=i.string(e.insert)?e.insert.substr(n,t):e.insert,s}return{retain:1/0}},r.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?i.number(this.ops[this.index]["delete"])?"delete":i.number(this.ops[this.index].retain)?"retain":"insert":"retain"},e.exports=o},{"./is":4}],6:[function(t,e,n){function r(t,e){if(t==e)return t?[[p,t]]:[];var n=l(t,e),r=t.substring(0,n);t=t.substring(n),e=e.substring(n),n=u(t,e);var o=t.substring(t.length-n);t=t.substring(0,t.length-n),e=e.substring(0,e.length-n);var s=i(t,e);return r&&s.unshift([p,r]),o&&s.push([p,o]),c(s),s}function i(t,e){var n;if(!t)return[[f,e]];if(!e)return[[h,t]];var i=t.length>e.length?t:e,s=t.length>e.length?e:t,l=i.indexOf(s);if(-1!=l)return n=[[f,i.substring(0,l)],[p,s],[f,i.substring(l+s.length)]],t.length>e.length&&(n[0][0]=n[2][0]=h),n;if(1==s.length)return[[h,t],[f,e]];var u=a(t,e);if(u){var c=u[0],d=u[1],g=u[2],v=u[3],m=u[4],y=r(c,g),b=r(d,v);return y.concat([[p,m]],b)}return o(t,e)}function o(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),o=i,l=2*i,u=new Array(l),a=new Array(l),c=0;l>c;c++)u[c]=-1,a[c]=-1;u[o+1]=0,a[o+1]=0;for(var p=n-r,d=p%2!=0,g=0,v=0,m=0,y=0,b=0;i>b;b++){for(var _=-b+g;b-v>=_;_+=2){var E,T=o+_;E=_==-b||_!=b&&u[T-1]E&&r>A&&t.charAt(E)==e.charAt(A);)E++,A++;if(u[T]=E,E>n)v+=2;else if(A>r)g+=2;else if(d){var x=o+p-_;if(x>=0&&l>x&&-1!=a[x]){var L=n-a[x];if(E>=L)return s(t,e,E,A)}}}for(var N=-b+m;b-y>=N;N+=2){var L,x=o+N;L=N==-b||N!=b&&a[x-1]L&&r>q&&t.charAt(n-L-1)==e.charAt(r-q-1);)L++,q++;if(a[x]=L,L>n)y+=2;else if(q>r)m+=2;else if(!d){var T=o+p-N;if(T>=0&&l>T&&-1!=u[T]){var E=u[T],A=o+E-T;if(L=n-L,E>=L)return s(t,e,E,A)}}}}return[[h,t],[f,e]]}function s(t,e,n,i){var o=t.substring(0,n),s=e.substring(0,i),l=t.substring(n),u=e.substring(i),a=r(o,s),c=r(l,u);return a.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;i>n;)t.substring(o,i)==e.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function u(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;i>n;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function a(t,e){function n(t,e,n){for(var r,i,o,s,a=t.substring(n,n+Math.floor(t.length/4)),c=-1,h="";-1!=(c=e.indexOf(a,c+1));){var f=l(t.substring(n),e.substring(c)),p=u(t.substring(0,n),e.substring(0,c));h.length=t.length?[r,i,o,s,h]:null}var r=t.length>e.length?t:e,i=t.length>e.length?e:t;if(r.length<4||2*i.lengtha[4].length?s:a:s;var c,h,f,p;t.length>e.length?(c=o[0],h=o[1],f=o[2],p=o[3]):(f=o[0],p=o[1],c=o[2],h=o[3]);var d=o[4];return[c,h,f,p,d]}function c(t){t.push([p,""]);for(var e,n=0,r=0,i=0,o="",s="";n1?(0!==r&&0!==i&&(e=l(s,o),0!==e&&(n-r-i>0&&t[n-r-i-1][0]==p?t[n-r-i-1][1]+=s.substring(0,e):(t.splice(0,0,[p,s.substring(0,e)]),n++),s=s.substring(e),o=o.substring(e)),e=u(s,o),0!==e&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),o=o.substring(0,o.length-e))),0===r?t.splice(n-i,r+i,[f,s]):0===i?t.splice(n-r,r+i,[h,o]):t.splice(n-r-i,r+i,[h,o],[f,s]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&t[n-1][0]==p?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(n=1;n0))return[void 0,t];if(n=this.toDelta().length(),t===n)return[this.lines.last,this.lines.last.length];if(t>n)return[void 0,t-n];for(e=this.lines.first;null!=e;){if(t\s+\ <")},t.prototype.insertLineBefore=function(t,e){var n;return n=new s(this,t),null!=e?(c(t.parentNode).isElement()||this.root.insertBefore(t,e.node),this.lines.insertAfter(e.prev,n)):(c(t.parentNode).isElement()||this.root.appendChild(t),this.lines.append(n)),n},t.prototype.mergeLines=function(t,e){return e.length>1&&(1===t.length&&c(t.leaves.last.node).remove(),a.each(c(e.node).childNodes(),function(e){return e.tagName!==c.DEFAULT_BREAK_TAG?t.node.appendChild(e):void 0})),this.removeLine(e),t.rebuild()},t.prototype.optimizeLines=function(){return a.each(this.lines.toArray(),function(t,e){return t.optimize(),!0})},t.prototype.rebuild=function(){var t,e,n;for(e=this.lines.toArray(),t=this.root.firstChild,null!=t&&null!=c.LIST_TAGS[t.tagName]&&(t=t.firstChild),a.each(e,function(e){return function(n,r){for(var i,o;n.node!==t;){if(n.node.parentNode!==e.root&&(null!=(o=n.node.parentNode)?o.parentNode:void 0)!==e.root)return e.removeLine(n);t=e.normalizer.normalizeLine(t),i=e.insertLineBefore(t,n),t=c(t).nextLineNode(e.root)}return n.outerHTML!==t.outerHTML&&(n.node=e.normalizer.normalizeLine(n.node),n.rebuild()),t=c(t).nextLineNode(e.root)}}(this)),n=[];null!=t;)t=this.normalizer.normalizeLine(t),this.appendLine(t),n.push(t=c(t).nextLineNode(this.root));return n},t.prototype.removeLine=function(t){return null!=t.node.parentNode&&(c.LIST_TAGS[t.node.parentNode.tagName]&&1===t.node.parentNode.childNodes.length?c(t.node.parentNode).remove():c(t.node).remove()),this.lines.remove(t)},t.prototype.setHTML=function(t){return t=u.stripComments(t),t=u.stripWhitespace(t),this.root.innerHTML=t,this.lines=new l,this.rebuild()},t.prototype.splitLine=function(t,e){var n,r,i,o;return e=Math.min(e,t.length-1),o=c(t.node).split(e,!0),n=o[0],r=o[1],t.node=n,t.rebuild(),i=this.insertLineBefore(r,t.next),i.formats=a.clone(t.formats),i.resetContent(),i},t.prototype.toDelta=function(){var t,e;return e=this.lines.toArray(),t=new r,a.each(e,function(e){return a.each(e.delta.ops,function(e){return t.push(e)})}),t},t}(),e.exports=i},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],9:[function(t,e,n){var r,i,o,s,l,u,a;u=t("lodash"),r=t("rich-text/lib/delta"),a=t("../lib/dom"),i=t("./document"),s=t("./line"),l=t("./selection"),o=function(){function t(t,e,n){this.root=t,this.quill=e,this.options=null!=n?n:{},this.root.setAttribute("id",this.options.id),this.doc=new i(this.root,this.options),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.selection=new l(this.doc,this.quill),this.timer=setInterval(u.bind(this.checkUpdate,this),this.options.pollInterval),this.savedRange=null,this.quill.on("selection-change",function(t){return function(e){return t.savedRange=e}}(this)),this.options.readOnly||this.enable()}return t.sources={API:"api",SILENT:"silent",USER:"user"},t.prototype.destroy=function(){return clearInterval(this.timer)},t.prototype.disable=function(){return this.enable(!1)},t.prototype.enable=function(t){return null==t&&(t=!0),this.root.setAttribute("contenteditable",t)},t.prototype.applyDelta=function(e,n){var r;return r=this._update(),r&&(e=r.transform(e,!0),r=e.transform(r,!1)),e.ops.length>0&&(e=this._trackDelta(function(t){return function(){var n;return n=0,u.each(e.ops,function(e){return u.isString(e.insert)?(t._insertAt(n,e.insert,e.attributes),n+=e.insert.length):u.isNumber(e.insert)?(t._insertEmbed(n,e.attributes),n+=1):u.isNumber(e["delete"])?t._deleteAt(n,e["delete"]):u.isNumber(e.retain)?(u.each(e.attributes,function(r,i){return t._formatAt(n,e.retain,i,r)}),n+=e.retain):void 0}),t.selection.shiftAfter(0,0,u.bind(t.doc.optimizeLines,t.doc))}}(this)),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.innerHTML=this.root.innerHTML,e&&n!==t.sources.SILENT&&this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,e,n)),r&&r.ops.length>0&&n!==t.sources.SILENT?this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,r,t.sources.USER):void 0},t.prototype.checkUpdate=function(e){var n;return null==e&&(e="user"),null==this.root.parentNode?clearInterval(this.timer):(n=this._update(),n&&(this.delta=this.delta.compose(n),this.length=this.delta.length(),this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,n,e)),n&&(e=t.sources.SILENT),this.selection.update(e))},t.prototype.focus=function(){return null!=this.selection.range?this.selection.setRange(this.selection.range):this.root.focus()},t.prototype.getBounds=function(t){var e,n,r,i,o,s,l;return this.checkUpdate(),s=this.doc.findLeafAt(t,!0),r=s[0],i=s[1],null==r?null:(n=this.root.parentNode.getBoundingClientRect(),l="left",0===r.length?e=r.node.parentNode.getBoundingClientRect():a.VOID_TAGS[r.node.tagName]?(e=r.node.getBoundingClientRect(),1===i&&(l="right")):(o=document.createRange(),i=e?void 0:this.selection.shiftAfter(t,-1*e,function(n){return function(){var r,i,o,s,l,u,a;for(a=n.doc.findLineAt(t),o=a[0],u=a[1],r=o,s=o.length-u<=e&&u>0;null!=r&&e>0;)l=r.next,i=Math.min(r.length-u,e),0===u&&e>=r.length?n.doc.removeLine(r):r.deleteText(u,i),e-=i,r=l,u=0;return s&&o.next?n.doc.mergeLines(o,o.next):void 0}}(this))},t.prototype._formatAt=function(t,e,n,r){return this.selection.shiftAfter(t,0,function(i){return function(){var o,s,l,u,a;for(u=i.doc.findLineAt(t),s=u[0],l=u[1],a=[];null!=s&&e>0;)o=Math.min(e,s.length-l-1),s.formatText(l,o,n,r),e-=o,e>0&&s.format(n,r),e-=1,l=0,a.push(s=s.next);return a}}(this))},t.prototype._insertEmbed=function(t,e){return this.selection.shiftAfter(t,1,function(n){return function(){var r,i,o;return o=n.doc.findLineAt(t),r=o[0],i=o[1],r.insertEmbed(i,e)}}(this))},t.prototype._insertAt=function(t,e,n){return null==n&&(n={}),this.selection.shiftAfter(t,e.length,function(r){return function(){var i,o,s,l;return e=e.replace(/\r\n?/g,"\n"),o=e.split("\n"),l=r.doc.findLineAt(t),i=l[0],s=l[1],u.each(o,function(t,e){var l;return null==i||i.length<=s?(e0)&&(i=r.doc.appendLine(document.createElement(a.DEFAULT_BLOCK_TAG)),s=0,i.insertText(s,t,n),i.format(n),l=null):(i.insertText(s,t,n),e0?t:!1)},t}(),e.exports=o},{"../lib/dom":17,"./document":8,"./line":12,"./selection":14,lodash:1,"rich-text/lib/delta":3}],10:[function(t,e,n){var r,i,o;i=t("lodash"),o=t("../lib/dom"),r=function(){function t(t){this.config=t}return t.types={LINE:"line",EMBED:"embed"},t.FORMATS={bold:{tag:"B",prepare:"bold"},italic:{tag:"I",prepare:"italic"},underline:{tag:"U",prepare:"underline"},strike:{tag:"S",prepare:"strikeThrough"},color:{style:"color","default":"rgb(0, 0, 0)",prepare:"foreColor"},background:{style:"backgroundColor","default":"rgb(255, 255, 255)",prepare:"backColor"},font:{style:"fontFamily","default":"'Helvetica', 'Arial', sans-serif",prepare:"fontName"},size:{style:"fontSize","default":"13px",prepare:function(t){return document.execCommand("fontSize",!1,o.convertFontSize(t))}},link:{tag:"A",add:function(t,e){return t.setAttribute("href",e),t},remove:function(t){return t.removeAttribute("href"),t},value:function(t){return t.getAttribute("href")}},image:{type:t.types.EMBED,tag:"IMG",attribute:"src"},align:{type:t.types.LINE,style:"textAlign","default":"left"},bullet:{type:t.types.LINE,exclude:"list",parentTag:"UL",tag:"LI"},list:{type:t.types.LINE,exclude:"bullet",parentTag:"OL",tag:"LI"}},t.prototype.add=function(e,n){var r,s,l,u,a;return n?this.value(e)===n?e:(i.isString(this.config.parentTag)&&(l=e.parentNode,l.tagName!==this.config.parentTag&&(l=document.createElement(this.config.parentTag),o(e).wrap(l)),e.parentNode.tagName===(null!=(u=e.parentNode.previousSibling)?u.tagName:void 0)&&o(e.parentNode.previousSibling).merge(e.parentNode),e.parentNode.tagName===(null!=(a=e.parentNode.nextSibling)?a.tagName:void 0)&&o(e.parentNode).merge(e.parentNode.nextSibling)),i.isString(this.config.tag)&&e.tagName!==this.config.tag&&(r=document.createElement(this.config.tag),null!=o.VOID_TAGS[r.tagName]?(null!=e.parentNode&&o(e).replace(r),e=r):this.isType(t.types.LINE)?e=o(e).switchTag(this.config.tag).get():(o(e).wrap(r),e=r)),(i.isString(this.config.style)||i.isString(this.config.attribute)||i.isString(this.config["class"]))&&(i.isString(this.config["class"])&&(e=this.remove(e)),o(e).isTextNode()&&(s=document.createElement(o.DEFAULT_INLINE_TAG),o(e).wrap(s),e=s),i.isString(this.config.style)&&n!==this.config["default"]&&(e.style[this.config.style]=n),i.isString(this.config.attribute)&&e.setAttribute(this.config.attribute,n),i.isString(this.config["class"])&&o(e).addClass(this.config["class"]+n)),i.isFunction(this.config.add)&&(e=this.config.add(e,n)),e):this.remove(e)},t.prototype.isType=function(t){return t===this.config.type},t.prototype.match=function(t){var e,n,r,s,l;if(!o(t).isElement())return!1;if(i.isString(this.config.parentTag)&&(null!=(s=t.parentNode)?s.tagName:void 0)!==this.config.parentTag)return!1;if(i.isString(this.config.tag)&&t.tagName!==this.config.tag)return!1;if(i.isString(this.config.style)&&(!t.style[this.config.style]||t.style[this.config.style]===this.config["default"]))return!1;if(i.isString(this.config.attribute)&&!t.hasAttribute(this.config.attribute))return!1;if(i.isString(this.config["class"])){for(l=o(t).classes(),n=0,r=l.length;r>n;n++)if(e=l[n],0===e.indexOf(this.config["class"]))return!0;return!1}return!0},t.prototype.prepare=function(t){return i.isString(this.config.prepare)?document.execCommand(this.config.prepare,!1,t):i.isFunction(this.config.prepare)?this.config.prepare(t):void 0},t.prototype.remove=function(e){var n,r,s,l;if(!this.match(e))return e;if(i.isString(this.config.style)&&(e.style[this.config.style]="",e.getAttribute("style")||e.removeAttribute("style")),i.isString(this.config.attribute)&&e.removeAttribute(this.config.attribute),i.isString(this.config["class"]))for(l=o(e).classes(),r=0,s=l.length;s>r;r++)n=l[r],0===n.indexOf(this.config["class"])&&o(e).removeClass(n);if(i.isString(this.config.tag))if(this.isType(t.types.LINE))i.isString(this.config.parentTag)&&(null!=e.previousSibling&&o(e).splitBefore(e.parentNode.parentNode),null!=e.nextSibling&&o(e.nextSibling).splitBefore(e.parentNode.parentNode)),e=o(e).switchTag(o.DEFAULT_BLOCK_TAG).get();else{if(this.isType(t.types.EMBED))return void o(e).remove();e=o(e).switchTag(o.DEFAULT_INLINE_TAG).get()}return i.isString(this.config.parentTag)&&o(e.parentNode).unwrap(),i.isFunction(this.config.remove)&&(e=this.config.remove(e)),e.tagName!==o.DEFAULT_INLINE_TAG||e.hasAttributes()||(e=o(e).unwrap()),e},t.prototype.value=function(t){var e,n,r,s;if(!this.match(t))return void 0;if(this.config.value)return this.config.value(t);if(i.isString(this.config.attribute))return t.getAttribute(this.config.attribute)||void 0;if(i.isString(this.config.style))return t.style[this.config.style]||void 0;if(i.isString(this.config["class"])){for(s=o(t).classes(),n=0,r=s.length;r>n;n++)if(e=s[n],0===e.indexOf(this.config["class"]))return e.slice(this.config["class"].length)}else if(i.isString(this.config.tag))return!0;return void 0},t}(),e.exports=r},{"../lib/dom":17,lodash:1}],11:[function(t,e,n){var r,i,o,s,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;s=t("lodash"),l=t("../lib/dom"),r=t("./format"),o=t("../lib/linked-list"),i=function(t){function e(t,n){this.node=t,this.formats=s.clone(n),this.text=l(this.node).text(),this.length=this.text.length,l(this.node).data(e.DATA_KEY,this)}return u(e,t),e.DATA_KEY="leaf",e.isLeafNode=function(t){return l(t).isTextNode()||null==t.firstChild},e.prototype.deleteText=function(t,n){var r;if(n>0)return this.text=this.text.slice(0,t)+this.text.slice(t+n),this.length=this.text.length,null!=l.EMBED_TAGS[this.node.tagName]?(r=document.createTextNode(this.text),l(r).data(e.DATA_KEY,this),this.node=l(this.node).replace(r).get()):l(this.node).text(this.text)},e.prototype.insertText=function(t,n){var r;return this.text=this.text.slice(0,t)+n+this.text.slice(t),l(this.node).isTextNode()?l(this.node).text(this.text):(r=document.createTextNode(n),l(r).data(e.DATA_KEY,this),this.node.tagName===l.DEFAULT_BREAK_TAG?this.node=l(this.node).replace(r).get():(this.node.appendChild(r),this.node=r)),this.length=this.text.length},e}(o.Node),e.exports=i},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,lodash:1}],12:[function(t,e,n){var r,i,o,s,l,u,a,c,h=function(t,e){function n(){this.constructor=t}for(var r in e)f.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;a=t("lodash"),r=t("rich-text/lib/delta"),c=t("../lib/dom"),i=t("./format"),o=t("./leaf"),s=t("./line"),l=t("../lib/linked-list"),u=t("./normalizer"),s=function(t){function e(t,n){this.doc=t,this.node=n,this.formats={},this.rebuild(),e.__super__.constructor.call(this,this.node)}return h(e,t),e.DATA_KEY="line",e.prototype.buildLeaves=function(t,e){return a.each(c(t).childNodes(),function(t){return function(n){var r;return n=t.doc.normalizer.normalizeNode(n),r=a.clone(e),a.each(t.doc.formats,function(t,e){return!t.isType(i.types.LINE)&&t.match(n)?r[e]=t.value(n):void 0}),o.isLeafNode(n)?t.leaves.append(new o(n,r)):t.buildLeaves(n,r)}}(this))},e.prototype.deleteText=function(t,e){var n,r,i;if(e>0){for(i=this.findLeafAt(t),r=i[0],t=i[1];null!=r&&e>0;)n=Math.min(e,r.length-t),r.deleteText(t,n),e-=n,r=r.next,t=0;return this.rebuild()}},e.prototype.findLeaf=function(t){return null!=t?c(t).data(o.DATA_KEY):void 0},e.prototype.findLeafAt=function(t,e){var n;if(null==e&&(e=!1),t>=this.length-1)return[this.leaves.last,this.leaves.last.length];for(n=this.leaves.first;null!=n;){if(t0;){if(a=s.next,r&&s.formats[n]!==r||!r&&null!=s.formats[n]){if(g=s.node,null!=s.formats[n]){for(c(g).splitBefore(this.node);!o.match(g);)g=g.parentNode;c(g).split(s.length)}l>0&&(f=c(g).split(l),u=f[0],g=f[1]),s.length>l+e&&(p=c(g).split(e),g=p[0],d=p[1]),o.add(g,r)}e-=s.length-l,l=0,s=a}return this.rebuild()}},e.prototype._insert=function(t,e,n){var r,o,s,l,u,h;return u=this.findLeafAt(t),r=u[0],o=u[1],e=a.reduce(n,function(t){return function(e,n,r){var o;return o=t.doc.formats[r],null==o||o.isType(i.types.LINE)||(e=o.add(e,n)),e}}(this),e),h=c(r.node).split(o),l=h[0],s=h[1],s&&(s=c(s).splitBefore(this.node).get()),this.node.insertBefore(e,s),this.rebuild()},e.prototype.insertEmbed=function(t,e){var n,r,o,s,l,u,h,f;return h=this.findLeafAt(t),r=h[0],o=h[1],f=c(r.node).split(o),u=f[0],s=f[1],n=a.find(Object.keys(e),function(t){return function(e){return t.doc.formats[e].isType(i.types.EMBED)}}(this)),l=this.doc.formats[n].add({},e[n]),e=a.clone(e),delete e[n],this._insert(t,l,e)},e.prototype.insertText=function(t,e,n){var r,i,o;return null==n&&(n={}),e.length>0?(o=this.findLeafAt(t),r=o[0],i=o[1],a.isEqual(r.formats,n)?(r.insertText(i,e),this.resetContent()):this._insert(t,document.createTextNode(e),n)):void 0},e.prototype.optimize=function(){return u.optimizeLine(this.node),this.rebuild()},e.prototype.rebuild=function(t){return null==t&&(t=!1),!t&&null!=this.outerHTML&&this.outerHTML===this.node.outerHTML&&a.all(this.leaves.toArray(),function(t){return function(e){return c(e.node).isAncestor(t.node)}}(this))?!1:(this.node=this.doc.normalizer.normalizeNode(this.node),0!==c(this.node).length()||this.node.querySelector(c.DEFAULT_BREAK_TAG)||this.node.appendChild(document.createElement(c.DEFAULT_BREAK_TAG)),this.leaves=new l,this.formats=a.reduce(this.doc.formats,function(t){return function(e,n,r){return n.isType(i.types.LINE)&&(n.match(t.node)?e[r]=n.value(t.node):delete e[r]),e}}(this),this.formats),this.buildLeaves(this.node,{}),this.resetContent(),!0)},e.prototype.resetContent=function(){return c(this.node).data(e.DATA_KEY,this),this.outerHTML=this.node.outerHTML,this.length=1,this.delta=new r,a.each(this.leaves.toArray(),function(t){return function(e){return t.length+=e.length,null!=c.EMBED_TAGS[e.node.tagName]?t.delta.insert(1,e.formats):t.delta.insert(e.text,e.formats)}}(this)),this.delta.insert("\n",this.formats)},e}(l.Node),e.exports=s},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./leaf":11,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],13:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../lib/dom"),o=function(t){return t=t.replace(/(?:^|[-_])(\w)/g,function(t,e){return e?e.toUpperCase():""}),t.charAt(0).toLowerCase()+t.slice(1)},r=function(){function t(){this.whitelist={styles:{},tags:{}},this.whitelist.tags[s.DEFAULT_BREAK_TAG]=!0,this.whitelist.tags[s.DEFAULT_BLOCK_TAG]=!0,this.whitelist.tags[s.DEFAULT_INLINE_TAG]=!0}return t.ALIASES={STRONG:"B",EM:"I",DEL:"S",STRIKE:"S"},t.ATTRIBUTES={color:"color",face:"fontFamily",size:"fontSize"},t.prototype.addFormat=function(t){return null!=t.tag&&(this.whitelist.tags[t.tag]=!0),null!=t.parentTag&&(this.whitelist.tags[t.parentTag]=!0),null!=t.style?this.whitelist.styles[t.style]=!0:void 0},t.prototype.normalizeLine=function(e){return e=t.wrapInline(e),e=t.handleBreaks(e),"LI"===e.tagName&&t.flattenList(e),e=t.pullBlocks(e),e=this.normalizeNode(e),t.unwrapText(e),null!=e&&null!=s.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalizeNode=function(e){return s(e).isTextNode()?e:(i.each(t.ATTRIBUTES,function(t,n){var r;return e.hasAttribute(n)?(r=e.getAttribute(n),"size"===n&&(r=s.convertFontSize(r)),e.style[t]=r,e.removeAttribute(n)):void 0}),("bold"===e.style.fontWeight||e.style.fontWeight>500)&&(e.style.fontWeight="",s(e).wrap(document.createElement("b")),e=e.parentNode),this.whitelistStyles(e),this.whitelistTags(e))},t.prototype.whitelistStyles=function(t){var e,n;return e=s(t).styles(),n=i.omit(e,function(t){return function(e,n){return null==t.whitelist.styles[o(n)]}}(this)),Object.keys(n).length0?s(t).styles(n,!0):t.removeAttribute("style"):void 0},t.prototype.whitelistTags=function(e){return s(e).isElement()?(null!=t.ALIASES[e.tagName]?e=s(e).switchTag(t.ALIASES[e.tagName]).get():null==this.whitelist.tags[e.tagName]&&(e=null!=s.BLOCK_TAGS[e.tagName]?s(e).switchTag(s.DEFAULT_BLOCK_TAG).get():e.hasAttributes()||null==e.firstChild?s(e).switchTag(s.DEFAULT_INLINE_TAG).get():s(e).unwrap()),e):e},t.flattenList=function(t){var e,n,r;return r=t.nextSibling,e=i.map(t.querySelectorAll("li")),e.forEach(function(e){return t.parentNode.insertBefore(e,r),r=e.nextSibling}),n=i.map(t.querySelectorAll(Object.keys(s.LIST_TAGS).join(","))),n.forEach(function(t){return s(t).remove()})},t.handleBreaks=function(t){var e;return e=i.map(t.querySelectorAll(s.DEFAULT_BREAK_TAG)),i.each(e,function(e){return function(e){return null==e.nextSibling||s.isIE(10)&&null==e.previousSibling?void 0:s(e.nextSibling).splitBefore(t.parentNode)}}(this)),t},t.optimizeLine=function(t){var e,n,r,o;for(t.normalize(),e=s(t).length(),r=s(t).descendants(),o=[];r.length>0;)n=r.pop(),null!=(null!=n?n.parentNode:void 0)&&null==s.EMBED_TAGS[n.tagName]&&(n.tagName===s.DEFAULT_BREAK_TAG?o.push(0!==e?s(n).remove():void 0):0===s(n).length()?(r.push(n.nextSibling),o.push(s(n).unwrap())):null!=n.previousSibling&&n.tagName===n.previousSibling.tagName&&i.isEqual(s(n).attributes(),s(n.previousSibling).attributes())?(r.push(n.firstChild),o.push(s(n.previousSibling).merge(n))):o.push(void 0));return o},t.pullBlocks=function(e){var n;for(n=e.firstChild;null!=n;){if(null!=s.BLOCK_TAGS[n.tagName]&&"LI"!==n.tagName){s(n).isolate(e.parentNode),null!=s.LIST_TAGS[n.tagName]&&n.firstChild?(s(n.parentNode).unwrap(),null==e.parentNode&&(e=n)):(s(n).unwrap(),t.pullBlocks(e));break}n=n.nextSibling}return e},t.stripComments=function(t){return t.replace(//g,"")},t.stripWhitespace=function(t){return t=t.trim(),t=t.replace(/(\r?\n|\r)+/g," "),t=t.replace(/\>\s+\<")},t.wrapInline=function(t){var e,n;if(null!=s.BLOCK_TAGS[t.tagName])return t;for(e=document.createElement(s.DEFAULT_BLOCK_TAG),t.parentNode.insertBefore(e,t);null!=t&&null==s.BLOCK_TAGS[t.tagName];)n=t.nextSibling,e.appendChild(t),t=n;return e},t.unwrapText=function(t){var e;return e=i.map(t.querySelectorAll(s.DEFAULT_INLINE_TAG)),i.each(e,function(t){return t.hasAttributes()?void 0:s(t).unwrap()})},t}(),e.exports=r},{"../lib/dom":17,lodash:1}],14:[function(t,e,n){var r,i,o,s,l,u;l=t("lodash"),u=t("../lib/dom"),r=t("./leaf"),i=t("./normalizer"),o=t("../lib/range"),s=function(){function t(t,e){this.doc=t,this.emitter=e,this.focus=!1,this.range=new o(0,0),this.nullDelay=!1,this.update("silent")}return t.prototype.checkFocus=function(){return document.activeElement===this.doc.root},t.prototype.getRange=function(t){var e,n,r;return null==t&&(t=!1),this.checkFocus()?(n=this._getNativeRange(),null==n?null:(r=this._positionToIndex(n.startContainer,n.startOffset),e=n.startContainer===n.endContainer&&n.startOffset===n.endOffset?r:this._positionToIndex(n.endContainer,n.endOffset),new o(Math.min(r,e),Math.max(r,e)))):t?this.range:null},t.prototype.preserve=function(t){var e,n,r,i,o,s,l,u,a;return r=this._getNativeRange(),null!=r&&this.checkFocus()?(i=this._encodePosition(r.startContainer,r.startOffset),u=i[0],a=i[1],o=this._encodePosition(r.endContainer,r.endOffset),e=o[0],n=o[1],t(),s=this._decodePosition(u,a),u=s[0],a=s[1],l=this._decodePosition(e,n),e=l[0],n=l[1],this._setNativeRange(u,a,e,n)):t()},t.prototype.scrollIntoView=function(){var t,e,n,r,i,o,s,l,u;if(this.range)return n=this.emitter.editor,u=n.getBounds(this.range.start),r=this.range.isCollapsed()?u:n.getBounds(this.range.end),t=n.root.parentNode.getBoundingClientRect(),e=t.bottom-t.top,e0&&(t=e.getRangeAt(0),u(t.startContainer).isAncestor(this.doc.root,!0)&&(t.startContainer===t.endContainer||u(t.endContainer).isAncestor(this.doc.root,!0)))?t:null},t.prototype._indexToPosition=function(t){var e,n,r;return 0===this.doc.lines.length?[this.doc.root,0]:(r=this.doc.findLeafAt(t,!0),e=r[0],n=r[1],this._decodePosition(e.node,n))},t.prototype._positionToIndex=function(t,e){var n,r,i,o,s,l;if(u.isIE(10)&&"BR"===t.tagName&&1===e&&(e=0),l=this._encodePosition(t,e),r=l[0],e=l[1],o=this.doc.findLine(r),null==o)return 0;for(n=o.findLeaf(r),s=0;null!=o.prev;)o=o.prev,s+=o.length;if(null==n)return s;for(i=0;null!=n.prev;)n=n.prev,i+=n.length;return s+i+e},t.prototype._setNativeRange=function(t,e,n,r){var i,o;if(o=document.getSelection())if(null!=t){if(this.checkFocus()||this.doc.root.focus(),i=this._getNativeRange(),null==i||t!==i.startContainer||e!==i.startOffset||n!==i.endContainer||r!==i.endOffset)return o.removeAllRanges(),i=document.createRange(),i.setStart(t,e),i.setEnd(n,r),o.addRange(i)}else if(o.removeAllRanges(),this.doc.root.blur(),u.isIE(11)&&!u.isIE(9))return document.body.focus()},t}(),e.exports=s},{"../lib/dom":17,"../lib/range":20,"./leaf":11,"./normalizer":13,lodash:1}],15:[function(t,e,n){t("./modules/authorship"),t("./modules/image-tooltip"),t("./modules/keyboard"),t("./modules/link-tooltip"),t("./modules/multi-cursor"),t("./modules/paste-manager"),t("./modules/toolbar"),t("./modules/tooltip"),t("./modules/undo-manager"),e.exports=t("./quill")},{"./modules/authorship":21,"./modules/image-tooltip":22,"./modules/keyboard":23,"./modules/link-tooltip":24,"./modules/multi-cursor":25,"./modules/paste-manager":26,"./modules/toolbar":27,"./modules/tooltip":28,"./modules/undo-manager":29,"./quill":30}],16:[function(t,e,n){var r,i,o,s=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;o=t("./dom"),i=t("./picker"),r=function(t){function e(){e.__super__.constructor.apply(this,arguments),o(this.container).addClass("ql-color-picker")}return s(e,t),e.prototype.buildItem=function(t,n,r){var i;return i=e.__super__.buildItem.call(this,t,n,r),i.style.backgroundColor=n.value,i},e}(i),e.exports=r},{"./dom":17,"./picker":19}],17:[function(t,e,n){var r,i,o,s,l,u=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;o=t("lodash"),l=null,i=function(){function t(t){this.node=t,this.trigger=u(this.trigger,this)}return t.prototype.addClass=function(t){return this.hasClass(t)?void 0:(null!=this.node.classList?this.node.classList.add(t):null!=this.node.className&&(this.node.className=(this.node.className+" "+t).trim()),this)},t.prototype.attributes=function(t){var e,n,r,i,s,l;if(t)return o.each(t,function(t){return function(e,n){return t.node.setAttribute(n,e)}}(this)),this;if(null==this.node.attributes)return{};for(t={},s=this.node.attributes,n=r=0,i=s.length;i>r;n=++r)l=s[n],e=this.node.attributes[n],t[e.name]=e.value;return t},t.prototype.child=function(t){var e,n;for(e=this.node.firstChild,n=s(e).length();null!=e&&!(n>t);)t-=n,e=e.nextSibling,n=s(e).length();return null==e&&(e=this.node.lastChild,t=s(e).length()),[e,t]},t.prototype.childNodes=function(){return o.map(this.node.childNodes)},t.prototype.classes=function(){return this.node.className.split(/\s+/)},t.prototype.data=function(t,e){var n;return null!=e?(null==this.node["ql-data"]&&(this.node["ql-data"]={}),this.node["ql-data"][t]=e,this):null!=(n=this.node["ql-data"])?n[t]:void 0},t.prototype.descendants=function(){return o.map(this.node.getElementsByTagName("*"))},t.prototype.get=function(){return this.node},t.prototype.hasClass=function(t){return null!=this.node.classList?this.node.classList.contains(t):null!=this.node.className?this.classes().indexOf(t)>-1:!1},t.prototype.isAncestor=function(t,e){var n;if(null==e&&(e=!1),t===this.node)return e;for(n=this.node;n;){if(n===t)return!0;n=n.parentNode}return!1},t.prototype.isElement=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===s.ELEMENT_NODE},t.prototype.isTextNode=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===s.TEXT_NODE},t.prototype.isolate=function(t){return null!=this.node.nextSibling&&s(this.node.nextSibling).splitBefore(t),this.splitBefore(t),this},t.prototype.length=function(){var t;return null==this.node?0:(t=this.text().length,this.isElement()&&(t+=this.node.querySelectorAll(Object.keys(s.EMBED_TAGS).join(",")).length),t)},t.prototype.merge=function(t){var e;return e=s(t),this.isElement()?(e.moveChildren(this.node),this.normalize()):this.text(this.text()+e.text()),e.remove(),this},t.prototype.moveChildren=function(t){return o.each(this.childNodes(),function(e){return t.appendChild(e)}),this},t.prototype.nextLineNode=function(t){var e;return e=this.node.nextSibling,null==e&&this.node.parentNode!==t&&(e=this.node.parentNode.nextSibling),null!=e&&null!=s.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalize=function(){var t,e,n,r;for(e=this.node.firstChild;null!=e;)r=e.nextSibling,t=s(e),null!=r&&s(r).isTextNode()&&(0===t.text().length?t.remove():t.isTextNode()&&(n=r.nextSibling,t.merge(r),r=n)),e=r;return this},t.prototype.on=function(t,e){return this.node.addEventListener(t,function(n){return function(r){var i,o;return i=!l||"keydown"!==t&&"keyup"!==t?r:l,o=e.call(n.node,i),o||(r.preventDefault(),r.stopPropagation()),o}}(this)),this},t.prototype.remove=function(){var t;return null!=(t=this.node.parentNode)&&t.removeChild(this.node),this.node=null,null},t.prototype.removeClass=function(t){var e;if(this.hasClass(t))return null!=this.node.classList?this.node.classList.remove(t):null!=this.node.className&&(e=this.classes(),e.splice(e.indexOf(t),1),this.node.className=e.join(" ")),this.node.getAttribute("class")||this.node.removeAttribute("class"),this},t.prototype.replace=function(t){return this.node.parentNode.replaceChild(t,this.node),this.node=t,this},t.prototype.splitBefore=function(t,e){var n,r,i,o;if(null==e&&(e=!1),this.node===t||this.node.parentNode===t)return this;if(null!=this.node.previousSibling||e){for(i=this.node.parentNode,r=i.cloneNode(!1),i.parentNode.insertBefore(r,i.nextSibling),o=this.node;null!=o;)n=o.nextSibling,r.appendChild(o),o=n;return s(r).splitBefore(t)}return s(this.node.parentNode).splitBefore(t)},t.prototype.split=function(t,e){var n,r,i,o,l,u,a,c,h,f;if(null==e&&(e=!1),a=this.length(),t=Math.max(0,t),t=Math.min(t,a),!e&&0===t)return[this.node.previousSibling,this.node,!1];if(!e&&t===a)return[this.node,this.node.nextSibling,!1];if(this.node.nodeType===s.TEXT_NODE)return n=this.node.splitText(t),[this.node,n,!0];for(l=this.node,f=this.node.cloneNode(!1),this.node.parentNode.insertBefore(f,l.nextSibling),c=this.child(t),r=c[0],t=c[1],h=s(r).split(t),i=h[0],o=h[1];null!==o;)u=o.nextSibling,f.appendChild(o),o=u;return[l,f,!0]},t.prototype.styles=function(t,e){var n,r;return null==e&&(e=!1),t?(e||(t=o.defaults(t,this.styles())),r=o.map(t,function(t,e){return e+": "+t}).join("; ")+";",this.node.setAttribute("style",r),this):(r=this.node.getAttribute("style")||"",n=o.reduce(r.split(";"),function(t,e){var n,r,i;return r=e.split(":"),n=r[0],i=r[1],n&&i&&(n=n.trim(),i=i.trim(),t[n.toLowerCase()]=i),t},{}))},t.prototype.switchTag=function(t){var e,n;return t=t.toUpperCase(),this.node.tagName===t?this:(n=document.createElement(t),e=this.attributes(),null==s.VOID_TAGS[t]&&this.moveChildren(n),this.replace(n),this.node=n,this.attributes(e))},t.prototype.text=function(t){if(null!=t){switch(this.node.nodeType){case s.ELEMENT_NODE:this.node.textContent=t;break;case s.TEXT_NODE:this.node.data=t}return this}switch(this.node.nodeType){case s.ELEMENT_NODE:return this.node.tagName===s.DEFAULT_BREAK_TAG?"":null!=s.EMBED_TAGS[this.node.tagName]?s.EMBED_TEXT:null!=this.node.textContent?this.node.textContent:"";case s.TEXT_NODE:return this.node.data||"";default:return""}},t.prototype.textNodes=function(){var t,e,n;for(n=document.createTreeWalker(this.node,NodeFilter.SHOW_TEXT,null,!1),e=[];t=n.nextNode();)e.push(t);return e},t.prototype.toggleClass=function(t,e){return null==e&&(e=!this.hasClass(t)),e?this.addClass(t):this.removeClass(t),this},t.prototype.trigger=function(t,e){var n,r,i;return null==e&&(e={}),["keypress","keydown","keyup"].indexOf(t)<0?(n=document.createEvent("Event"),n.initEvent(t,e.bubbles,e.cancelable)):(n=document.createEvent("KeyboardEvent"),l=o.clone(e),l.which=o.isNumber(e.key)?e.key:o.isString(e.key)?e.key.toUpperCase().charCodeAt(0):0,s.isIE(10)?(i=[],e.altKey&&i.push("Alt"),e.ctrlKey&&i.push("Control"),e.metaKey&&i.push("Meta"),e.shiftKey&&i.push("Shift"),n.initKeyboardEvent(t,e.bubbles,e.cancelable,window,0,0,i.join(" "),null,null)):(r=o.isFunction(n.initKeyboardEvent)?"initKeyboardEvent":"initKeyEvent",n[r](t,e.bubbles,e.cancelable,window,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,0))),this.node.dispatchEvent(n),l=null,this},t.prototype.unwrap=function(){var t,e;return e=this.node.firstChild,t=this.node.nextSibling,o.each(this.childNodes(),function(e){return function(n){return e.node.parentNode.insertBefore(n,t)}}(this)),this.remove(),e},t.prototype.wrap=function(t){var e;for(null!=this.node.parentNode&&this.node.parentNode.insertBefore(t,this.node),e=t;null!=e.firstChild;)e=t.firstChild;return e.appendChild(this.node),this},t}(),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype["default"]=function(){return this.node.querySelector("option[selected]")},e.prototype.option=function(t,e){var n,r,i,s,l,u;if(null==e&&(e=!0),u=o.isElement(t)?t.value:t){for(u=u.replace(/[^\w]+/g,""),l=this.node.children,r=i=0,s=l.length;s>i;r=++i)if(n=l[r],n.value.replace(/[^\w]+/g,"")===u){this.node.selectedIndex=r;break}}else this.node.selectedIndex=-1;return e&&this.trigger("change"),this},e.prototype.reset=function(t){var e;return null==t&&(t=!0),e=this["default"](),null!=e?e.selected=!0:this.node.selectedIndex=0,t&&this.trigger("change"),this},e.prototype.value=function(){return this.node.selectedIndex>-1?this.node.options[this.node.selectedIndex].value:""},e}(i),s=function(t){return"SELECT"===(null!=t?t.tagName:void 0)?new r(t):new i(t)},s=o.extend(s,{ELEMENT_NODE:1,NOBREAK_SPACE:" ",TEXT_NODE:3,ZERO_WIDTH_NOBREAK_SPACE:"\ufeff",DEFAULT_BLOCK_TAG:"DIV",DEFAULT_BREAK_TAG:"BR",DEFAULT_INLINE_TAG:"SPAN",EMBED_TEXT:"!",FONT_SIZES:{"10px":1,"13px":2,"16px":3,"18px":4,"24px":5,"32px":6,"48px":7},KEYS:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},BLOCK_TAGS:{ADDRESS:"ADDRESS",ARTICLE:"ARTICLE",ASIDE:"ASIDE",AUDIO:"AUDIO",BLOCKQUOTE:"BLOCKQUOTE",CANVAS:"CANVAS",DD:"DD",DIV:"DIV",DL:"DL",FIGCAPTION:"FIGCAPTION",FIGURE:"FIGURE",FOOTER:"FOOTER",FORM:"FORM",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HEADER:"HEADER",HGROUP:"HGROUP",LI:"LI",OL:"OL",OUTPUT:"OUTPUT",P:"P",PRE:"PRE",SECTION:"SECTION",TABLE:"TABLE",TBODY:"TBODY",TD:"TD",TFOOT:"TFOOT",TH:"TH",THEAD:"THEAD",TR:"TR",UL:"UL",VIDEO:"VIDEO"},EMBED_TAGS:{IMG:"IMG"},LINE_TAGS:{DIV:"DIV",LI:"LI"},LIST_TAGS:{OL:"OL",UL:"UL"},VOID_TAGS:{AREA:"AREA",BASE:"BASE",BR:"BR",COL:"COL",COMMAND:"COMMAND",EMBED:"EMBED",HR:"HR",IMG:"IMG",INPUT:"INPUT",KEYGEN:"KEYGEN",LINK:"LINK",META:"META",PARAM:"PARAM",SOURCE:"SOURCE",TRACK:"TRACK",WBR:"WBR"},convertFontSize:function(t){var e,n,r,i;o.isString(t)&&t.indexOf("px")>-1?(r=Object.keys(s.FONT_SIZES),i=o.values(s.FONT_SIZES)):(i=Object.keys(s.FONT_SIZES),r=o.values(s.FONT_SIZES));for(e in r)if(n=r[e],parseInt(t)<=parseInt(n))return i[e];return o.last(i)},isIE:function(t){var e;return e=document.documentMode,e&&t>=e},isIOS:function(){return/iPhone|iPad/i.test(navigator.userAgent)},isMac:function(){return/Mac/i.test(navigator.platform)}}),e.exports=s},{lodash:1}],18:[function(t,e,n){var r,i;i=function(){function t(t){this.data=t,this.prev=this.next=null}return t}(),r=function(){function t(){this.length=0,this.first=this.last=null}return t.Node=i,t.prototype.append=function(t){return null!=this.first?(t.next=null,this.last.next=t):this.first=t,t.prev=this.last,this.last=t,this.length+=1},t.prototype.insertAfter=function(t,e){return e.prev=t,null!=t?(e.next=t.next,null!=t.next&&(t.next.prev=e),t.next=e,t===this.last&&(this.last=e)):(e.next=this.first,this.first.prev=e,this.first=e),this.length+=1},t.prototype.remove=function(t){return this.length>1?(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.first&&(this.first=t.next),t===this.last&&(this.last=t.prev)):this.first=this.last=null,t.prev=t.next=null,this.length-=1},t.prototype.toArray=function(){var t,e;for(t=[],e=this.first;null!=e;)t.push(e),e=e.next;return t},t}(),e.exports=r},{}],19:[function(t,e,n){var r,i,o;i=t("lodash"),o=t("./dom"),r=function(){function t(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),o(this.container).addClass("ql-picker"),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),o(document).on("click",function(t){return function(){return t.close(),!0}}(this)),o(this.label).on("click",function(t){return function(){return i.defer(function(){return o(t.container).toggleClass("ql-expanded")}),!1}}(this)),o(this.select).on("change",function(t){return function(){var e,n;return t.select.selectedIndex>-1&&(e=t.container.querySelectorAll(".ql-picker-item")[t.select.selectedIndex],n=t.select.options[t.select.selectedIndex]),t.selectItem(e,!1),o(t.label).toggleClass("ql-active",n!==o(t.select)["default"]())}}(this))}return t.TEMPLATE='',t.prototype.buildItem=function(t,e,n){var r;return r=document.createElement("span"),r.setAttribute("data-value",e.getAttribute("value")),o(r).addClass("ql-picker-item").text(o(e).text()).on("click",function(t){return function(){return t.selectItem(r,!0),t.close()}}(this)),this.select.selectedIndex===n&&this.selectItem(r,!1),r},t.prototype.buildPicker=function(){var e;return i.each(o(this.select).attributes(),function(t){return function(e,n){return t.container.setAttribute(n,e)}}(this)),this.container.innerHTML=t.TEMPLATE,this.label=this.container.querySelector(".ql-picker-label"),e=this.container.querySelector(".ql-picker-options"),i.each(this.select.options,function(t){return function(n,r){var i;return i=t.buildItem(e,n,r),e.appendChild(i)}}(this))},t.prototype.close=function(){return o(this.container).removeClass("ql-expanded")},t.prototype.selectItem=function(t,e){var n,r;return n=this.container.querySelector(".ql-selected"),null!=n&&o(n).removeClass("ql-selected"),null!=t?(r=t.getAttribute("data-value"),o(t).addClass("ql-selected"),o(this.label).text(o(t).text()),o(this.select).option(r,e),this.label.setAttribute("data-value",r)):(this.label.innerHTML=" ",this.label.removeAttribute("data-value"))},t}(),e.exports=r},{"./dom":17,lodash:1}],20:[function(t,e,n){var r,i;i=t("lodash"),r=function(){function t(t,e){this.start=t,this.end=e}return t.compare=function(t,e){return t===e?!0:null==t||null==e?!1:t.equals(e)},t.prototype.equals=function(t){return null==t?!1:this.start===t.start&&this.end===t.end},t.prototype.shift=function(t,e){var n;return n=i.map([this.start,this.end],function(n){return t>n?n:e>=0?n+e:Math.max(t,n+e)}),this.start=n[0],this.end=n[1],n},t.prototype.isCollapsed=function(){return this.start===this.end},t}(),e.exports=r},{lodash:1}],21:[function(t,e,n){var r,i,o,s,l;o=t("../quill"),s=o.require("lodash"),l=o.require("dom"),i=o.require("delta"),r=function(){function t(t,e){this.quill=t,this.options=e,null!=this.options.button&&this.attachButton(this.options.button),this.options.enabled&&this.enable(),this.quill.addFormat("author",{"class":"author-"}),null!=this.options.authorId&&(this.quill.on(this.quill.constructor.events.PRE_EVENT,function(t){return function(e,n,r){var l,u;return e===t.quill.constructor.events.TEXT_CHANGE&&"user"===r?(l=new i,u={author:t.options.authorId},s.each(n.ops,function(e){return null==e["delete"]?null!=e.insert||null!=e.retain&&null!=e.attributes?(e.attributes||(e.attributes={}),e.attributes.author=t.options.authorId,l.retain(e.retain||e.insert.length||1,u)):l.retain(e.retain):void 0}),t.quill.updateContents(l,o.sources.SILENT)):void 0}}(this)),this.addAuthor(this.options.authorId,this.options.color))}return t.DEFAULTS={authorId:null,color:"transparent",enabled:!1},t.prototype.addAuthor=function(t,e){var n;return n={},n[".authorship .author-"+t]={"background-color":""+e},this.quill.theme.addStyles(n)},t.prototype.attachButton=function(t){var e;return e=l(t),e.on("click",function(t){return function(){return e.toggleClass("ql-on"),t.enable($dom.hasClass("ql-on"))}}(this))},t.prototype.enable=function(t){return null==t&&(t=!0),l(this.quill.root).toggleClass("authorship",t)},t.prototype.disable=function(){return this.enable(!1)},t}(),o.registerModule("authorship",r),e.exports=r},{"../quill":30}],22:[function(t,e,n){var r,i,o,s,l,u,a,c=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;o=t("../quill"),l=t("./tooltip"),u=o.require("lodash"),a=o.require("dom"),r=o.require("delta"),s=o.require("range"),i=function(t){function e(t,n){this.quill=t,this.options=n,this.options=u.defaults(this.options,l.DEFAULTS),e.__super__.constructor.call(this,this.quill,this.options),this.preview=this.container.querySelector(".preview"),this.textbox=this.container.querySelector(".input"),a(this.container).addClass("ql-image-tooltip"),this.initListeners()}return c(e,t),e.DEFAULTS={template:'
Preview
Cancel Insert'},e.prototype.initListeners=function(){return a(this.quill.root).on("focus",u.bind(this.hide,this)),a(this.container.querySelector(".insert")).on("click",u.bind(this.insertImage,this)),a(this.container.querySelector(".cancel")).on("click",u.bind(this.hide,this)),a(this.textbox).on("input",u.bind(this._preview,this)),this.initTextbox(this.textbox,this.insertImage,this.hide),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e,e.initFormat("image",u.bind(t._onToolbar,t))}}(this))},e.prototype.insertImage=function(){var t,e;return e=this._normalizeURL(this.textbox.value),null==this.range&&(this.range=new s(0,0)),this.range&&(this.preview.innerHTML="Preview",this.textbox.value="",t=this.range.end,this.quill.insertEmbed(t,"image",e,"user"),this.quill.setSelection(t+1,t+1)),this.hide()},e.prototype._onToolbar=function(t,e){return e?(this.textbox.value||(this.textbox.value="http://"),this.show(),this.textbox.focus(),u.defer(function(t){return function(){return t.textbox.setSelectionRange(t.textbox.value.length,t.textbox.value.length)}}(this))):(this.quill.deleteText(t,"user"),this.toolbar.setActive("image",!1))},e.prototype._preview=function(){var t;if(this._matchImageURL(this.textbox.value))return"IMG"===this.preview.firstChild.tagName?this.preview.firstChild.setAttribute("src",this.textbox.value):(t=document.createElement("img"),t.setAttribute("src",this.textbox.value),this.preview.replaceChild(t,this.preview.firstChild))},e.prototype._matchImageURL=function(t){return/^https?:\/\/.+\.(jpe?g|gif|png)$/.test(t)},e.prototype._normalizeURL=function(t){return/^https?:\/\//.test(t)||(t="http://"+t),t},e}(l),o.registerModule("image-tooltip",i),e.exports=i},{"../quill":30,"./tooltip":28}],23:[function(t,e,n){var r,i,o,s,l;o=t("../quill"),s=o.require("lodash"),l=o.require("dom"),r=o.require("delta"),i=function(){function t(t,e){this.quill=t,this.hotkeys={},this._initListeners(),this._initHotkeys(),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e}}(this))}return t.hotkeys={BOLD:{key:"B",metaKey:!0},INDENT:{key:l.KEYS.TAB},ITALIC:{key:"I",metaKey:!0},OUTDENT:{key:l.KEYS.TAB,shiftKey:!0},UNDERLINE:{key:"U",metaKey:!0}},t.prototype.addHotkey=function(t,e){return Array.isArray(t)||(t=[t]),s.each(t,function(t){return function(n){var r,i;return n=s.isObject(n)?s.clone(n):{key:n},n.callback=e,i=s.isNumber(n.key)?n.key:n.key.toUpperCase().charCodeAt(0),null==(r=t.hotkeys)[i]&&(r[i]=[]),t.hotkeys[i].push(n)}}(this))},t.prototype.removeHotkeys=function(e,n){var r,i,o,l,u;return e=s.isString(e)?e.toUpperCase():e,e=t.hotkeys[e]?t.hotkeys[e]:e,e=s.isObject(e)?e:{key:e},u=s.isNumber(e.key)?e.key:e.key.charCodeAt(0),null==(r=this.hotkeys)[u]&&(r[u]=[]),o=s.partition(this.hotkeys[u],function(t){return s.isEqual(e,s.omit(t,"callback"))&&(!n||n===t.callback)}),l=o[0],i=o[1],this.hotkeys[u]=i,s.map(l,"callback")},t.prototype.toggleFormat=function(t,e){var n,r;return n=t.isCollapsed()?this.quill.getContents(Math.max(0,t.start-1),t.end):this.quill.getContents(t),r=0===n.ops.length||!s.all(n.ops,function(t){var n;return null!=(n=t.attributes)?n[e]:void 0}),t.isCollapsed()?this.quill.prepareFormat(e,r,o.sources.USER):this.quill.formatText(t,e,r,o.sources.USER),null!=this.toolbar?this.toolbar.setActive(e,r):void 0},t.prototype._initEnter=function(){var t;return t=[{key:l.KEYS.ENTER},{key:l.KEYS.ENTER,shiftKey:!0}],this.addHotkey(t,function(t){return function(e,n){var i,l,u,a,c,h;return null==e?!0:(c=t.quill.editor.doc.findLineAt(e.start),u=c[0],a=c[1],h=u.findLeafAt(a),l=h[0],a=h[1],i=(new r).retain(e.start).insert("\n",u.formats)["delete"](e.end-e.start),t.quill.updateContents(i,o.sources.USER),s.each(l.formats,function(e,n){t.quill.prepareFormat(n,e),null!=t.toolbar&&t.toolbar.setActive(n,e)}),t.quill.editor.selection.scrollIntoView(),!1)}}(this))},t.prototype._initDeletes=function(){return this.addHotkey([l.KEYS.DELETE,l.KEYS.BACKSPACE],function(t){return function(e,n){var r,i,s,u;return null!=e&&t.quill.getLength()>0&&(e.start!==e.end?t.quill.deleteText(e.start,e.end,o.sources.USER):n.key===l.KEYS.BACKSPACE?(u=t.quill.editor.doc.findLineAt(e.start),i=u[0],s=u[1],0===s&&(i.formats.bullet||i.formats.list)?(r=i.formats.bullet?"bullet":"list",t.quill.formatLine(e.start,e.start,r,!1,o.sources.USER)):e.start>0&&t.quill.deleteText(e.start-1,e.start,o.sources.USER)):e.startVisit URL:   -  Change Remove Done'},e.hotkeys={LINK:{key:"K",metaKey:!0}},e.prototype.initListeners=function(){return this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(t){return function(e){var n;if(null!=e&&e.isCollapsed())return n=t._findAnchor(e),n?(t.setMode(n.href,!1),t.show(n)):t.container.style.left!==o.HIDE_MARGIN?(t.range=null,t.hide()):void 0}}(this)),l(this.container.querySelector(".done")).on("click",s.bind(this.saveLink,this)),l(this.container.querySelector(".remove")).on("click",function(t){return function(){return t.removeLink(t.range)}}(this)),l(this.container.querySelector(".change")).on("click",function(t){return function(){return t.setMode(t.link.href,!0)}}(this)),this.initTextbox(this.textbox,this.saveLink,this.hide),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e,e.initFormat("link",s.bind(t._onToolbar,t))}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(n){return n.addHotkey(e.hotkeys.LINK,s.bind(t._onKeyboard,t))}}(this))},e.prototype.saveLink=function(){var t,e,n;return n=this._normalizeURL(this.textbox.value),null!=this.range&&(e=this.range.end,this.range.isCollapsed()?(t=this._findAnchor(this.range),null!=t&&(t.href=n)):this.quill.formatText(this.range,"link",n,"user"),this.quill.setSelection(e,e)),this.setMode(n,!1)},e.prototype.removeLink=function(t){return t.isCollapsed()&&(t=this._expandRange(t)),this.hide(),this.quill.formatText(t,"link",!1,"user"),null!=this.toolbar?this.toolbar.setActive("link",!1):void 0},e.prototype.setMode=function(t,e){var n;return null==e&&(e=!1),e?(this.textbox.value=t,s.defer(function(e){return function(){return e.textbox.focus(),e.textbox.setSelectionRange(0,t.length)}}(this))):(this.link.href=t,t=this.link.href,n=t.length>this.options.maxLength?t.slice(0,this.options.maxLength)+"...":t,l(this.link).text(n)),l(this.container).toggleClass("editing",e)},e.prototype._findAnchor=function(t){var e,n,r,i;for(i=this.quill.editor.doc.findLeafAt(t.start,!0),e=i[0],r=i[1],null!=e&&(n=e.node);null!=n&&n!==this.quill.root;){if("A"===n.tagName)return n;n=n.parentNode}return null},e.prototype._expandRange=function(t){var e,n,r,i,o;return i=this.quill.editor.doc.findLeafAt(t.start,!0),n=i[0],r=i[1],o=t.start-r,e=o+n.length,{start:o,end:e}},e.prototype._onToolbar=function(t,e){return this._toggle(t,e)},e.prototype._onKeyboard=function(){var t;return t=this.quill.getSelection(),this._toggle(t,!this._findAnchor(t))},e.prototype._toggle=function(t,e){var n;if(t)return e?t.isCollapsed()?void 0:(this.setMode(this._suggestURL(t),!0),n=this.quill.editor.selection._getNativeRange(),this.show(n)):this.removeLink(t)},e.prototype._normalizeURL=function(t){return/^(https?:\/\/|mailto:)/.test(t)||(t="http://"+t),t},e.prototype._suggestURL=function(t){var e;return e=this.quill.getText(t),this._normalizeURL(e)},e}(o),i.registerModule("link-tooltip",r),e.exports=r},{"../quill":30,"./tooltip":28}],25:[function(t,e,n){var r,i,o,s,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;o=t("../quill"),r=t("eventemitter2").EventEmitter2,s=o.require("lodash"),l=o.require("dom"),i=function(t){function e(t,e){this.quill=t,this.options=e,this.cursors={},this.container=this.quill.addContainer("ql-multi-cursor",!0),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,s.bind(this._applyDelta,this))}return u(e,t),e.DEFAULTS={template:' ',timeout:2500},e.events={CURSOR_ADDED:"cursor-addded",CURSOR_MOVED:"cursor-moved",CURSOR_REMOVED:"cursor-removed"},e.prototype.clearCursors=function(){return s.each(Object.keys(this.cursors),s.bind(this.removeCursor,this)),this.cursors={}},e.prototype.moveCursor=function(t,e){var n;return n=this.cursors[t],null!=n?(n.index=e,l(n.elem).removeClass("hidden"),clearTimeout(n.timer),n.timer=setTimeout(function(t){return function(){return l(n.elem).addClass("hidden"),n.timer=null}}(this),this.options.timeout),this._updateCursor(n),n):void 0},e.prototype.removeCursor=function(t){var n;return n=this.cursors[t],this.emit(e.events.CURSOR_REMOVED,n),null!=n&&n.elem.parentNode.removeChild(n.elem),delete this.cursors[t]},e.prototype.setCursor=function(t,n,r,i){var o;return null==this.cursors[t]&&(this.cursors[t]=o={userId:t,index:n,color:i,elem:this._buildCursor(r,i)},this.emit(e.events.CURSOR_ADDED,o)),s.defer(function(e){return function(){return e.moveCursor(t,n)}}(this)),this.cursors[t]},e.prototype.shiftCursors=function(t,e,n){return null==n&&(n=null),s.each(this.cursors,function(r){return function(i,o){var s;if(i)return s=Math.max(e,t-i.index),i.userId===n?r.moveCursor(n,i.index+s):i.index>t?i.index+=s:void 0}}(this))},e.prototype.update=function(){return s.each(this.cursors,function(t){return function(e,n){return null!=e?(t._updateCursor(e),!0):void 0}}(this))},e.prototype._applyDelta=function(t){var e;return e=0,s.each(t.ops,function(t){return function(n){var r,i;return r=0,null!=n.insert?(r=n.insert.length||1,t.shiftCursors(e,r,null!=(i=n.attributes)?i.author:void 0)):null!=n["delete"]?t.shiftCursors(e,-1*n["delete"],null):null!=n.retain&&(t.shiftCursors(e,0,null),r=n.retain),e+=r}}(this)),this.update()},e.prototype._buildCursor=function(t,e){var n,r,i,o;return n=document.createElement("span"),l(n).addClass("cursor"),n.innerHTML=this.options.template,i=n.querySelector(".cursor-flag"),o=n.querySelector(".cursor-name"),l(o).text(t),r=n.querySelector(".cursor-caret"),r.style.backgroundColor=o.style.backgroundColor=e,this.container.appendChild(n),n},e.prototype._updateCursor=function(t){ var n,r;return n=this.quill.getBounds(t.index),null==n?this.removeCursor(t.userId):(t.elem.style.top=n.top+this.quill.container.scrollTop+"px",t.elem.style.left=n.left+"px",t.elem.style.height=n.height+"px",r=t.elem.querySelector(".cursor-flag"),l(t.elem).toggleClass("top",parseInt(t.elem.style.top)<=r.offsetHeight).toggleClass("left",parseInt(t.elem.style.left)<=r.offsetWidth).toggleClass("right",this.quill.root.offsetWidth-parseInt(t.elem.style.left)<=r.offsetWidth),this.emit(e.events.CURSOR_MOVED,t))},e}(r),o.registerModule("multi-cursor",i),e.exports=i},{"../quill":30,eventemitter2:2}],26:[function(t,e,n){var r,i,o,s,l,u,a=function(t,e){return function(){return t.apply(e,arguments)}};s=t("../quill"),i=t("../core/document"),l=s.require("lodash"),u=s.require("dom"),r=s.require("delta"),o=function(){function t(e,n){var r;this.quill=e,this._onConvert=a(this._onConvert,this),this.container=this.quill.addContainer("ql-paste-manager"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex","-1"),u(this.quill.root).on("paste",l.bind(this._paste,this)),this.options=l.defaults(n,t.DEFAULTS),null==(r=this.options).onConvert&&(r.onConvert=this._onConvert)}return t.DEFAULTS={onConvert:null},t.prototype._onConvert=function(t){var e,n,o;return n=new i(t,this.quill.options),e=n.toDelta(),o=e.length(),0===o?e:e.compose((new r).retain(o-1)["delete"](1))},t.prototype._paste=function(){var t,e;return t=this.quill.getLength(),e=this.quill.getSelection(),null!=e?(this.container.focus(),l.defer(function(t){return function(){var n,r;return n=t.options.onConvert(t.container),r=n.length(),r>0&&(e.start>0&&n.ops.unshift({retain:e.start}),n["delete"](e.end-e.start),t.quill.updateContents(n,"user")),t.quill.setSelection(e.start+r,e.start+r),t.quill.editor.selection.scrollIntoView(),t.container.innerHTML=""}}(this))):void 0},t}(),s.registerModule("paste-manager",o),e.exports=o},{"../core/document":8,"../quill":30}],27:[function(t,e,n){var r,i,o,s;r=t("../quill"),o=r.require("lodash"),s=r.require("dom"),i=function(){function t(e,n){if(this.quill=e,this.options=n,(o.isString(this.options)||o.isElement(this.options))&&(this.options={container:this.options}),null==this.options.container)throw new Error("container required for toolbar",this.options);this.container=o.isString(this.options.container)?document.querySelector(this.options.container):this.options.container,this.inputs={},this.preventUpdate=!1,this.triggering=!1,o.each(this.quill.options.formats,function(e){return function(n){return null==t.formats.TOOLTIP[n]?e.initFormat(n,o.bind(e._applyFormat,e,n)):void 0}}(this)),this.quill.on(r.events.FORMAT_INIT,function(e){return function(n){return null==t.formats.TOOLTIP[n]?e.initFormat(n,o.bind(e._applyFormat,e,n)):void 0}}(this)),this.quill.on(r.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?t.updateActive(e):void 0}}(this)),this.quill.on(r.events.TEXT_CHANGE,function(t){return function(){return t.updateActive()}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(e){return e.addHotkey([s.KEYS.BACKSPACE,s.KEYS.DELETE],function(){return o.defer(o.bind(t.updateActive,t))})}}(this)),s(this.container).addClass("ql-toolbar"),s.isIOS()&&s(this.container).addClass("ios")}return t.DEFAULTS={container:null},t.formats={LINE:{align:"align",bullet:"bullet",list:"list"},SELECT:{align:"align",background:"background",color:"color",font:"font",size:"size"},TOGGLE:{bold:"bold",bullet:"bullet",image:"image",italic:"italic",link:"link",list:"list",strike:"strike",underline:"underline"},TOOLTIP:{image:"image",link:"link"}},t.prototype.initFormat=function(e,n){var r,i,o;return o=".ql-"+e,null!=t.formats.SELECT[e]?(o="select"+o,r="change"):r="click",i=this.container.querySelector(o),null!=i?(this.inputs[e]=i,s(i).on(r,function(t){return function(){var e,o;return o="change"===r?s(i).value():!s(i).hasClass("ql-active"),t.preventUpdate=!0,t.quill.focus(),e=t.quill.getSelection(),null!=e&&n(e,o),s.isIE(11)&&t.quill.editor.selection.scrollIntoView(),t.preventUpdate=!1,!1}}(this))):void 0},t.prototype.setActive=function(t,e){var n,r,i,o;return"image"===t&&(e=!1),r=this.inputs[t],null!=r?(n=s(r),"SELECT"===r.tagName?(this.triggering=!0,o=n.value(r),null==e&&(e=null!=(i=n["default"]())?i.value:void 0),Array.isArray(e)&&(e=""),e!==o&&(null!=e?n.option(e):n.reset()),this.triggering=!1):n.toggleClass("ql-active",e||!1)):void 0},t.prototype.updateActive=function(t,e){var n;return null==e&&(e=null),t||(t=this.quill.getSelection()),null==t||this.preventUpdate?void 0:(n=this._getActive(t),o.each(this.inputs,function(t){return function(r,i){return(!Array.isArray(e)||e.indexOf(i)>-1)&&t.setActive(i,n[i]),!0}}(this)))},t.prototype._applyFormat=function(e,n,r){return this.triggering?void 0:(n.isCollapsed()?this.quill.prepareFormat(e,r,"user"):null!=t.formats.LINE[e]?this.quill.formatLine(n,e,r,"user"):this.quill.formatText(n,e,r,"user"),o.defer(function(t){return function(){return t.updateActive(n,["bullet","list"]),t.setActive(e,r)}}(this)))},t.prototype._getActive=function(t){var e,n;return e=this._getLeafActive(t),n=this._getLineActive(t),o.defaults({},e,n)},t.prototype._getLeafActive=function(t){var e,n,r,i,s;return t.isCollapsed()?(s=this.quill.editor.doc.findLineAt(t.start),r=s[0],i=s[1],e=0===i?this.quill.getContents(t.start,t.end+1):this.quill.getContents(t.start-1,t.end)):e=this.quill.getContents(t),n=o.map(e.ops,"attributes"),this._intersectFormats(n)},t.prototype._getLineActive=function(t){var e,n,r,i,s,l;for(n=[],s=this.quill.editor.doc.findLineAt(t.start),e=s[0],i=s[1],l=this.quill.editor.doc.findLineAt(t.end),r=l[0],i=l[1],null!=r&&r===e&&(r=r.next);null!=e&&e!==r;)n.push(o.clone(e.formats)),e=e.next;return this._intersectFormats(n)},t.prototype._intersectFormats=function(e){return o.reduce(e.slice(1),function(e,n){var r,i,s,l,u;return null==n&&(n={}),r=Object.keys(e),s=null!=n?Object.keys(n):{},l=o.intersection(r,s),u=o.difference(r,s),i=o.difference(s,r),o.each(l,function(r){if(null!=t.formats.SELECT[r])if(Array.isArray(e[r])){if(e[r].indexOf(n[r])<0)return e[r].push(n[r])}else if(e[r]!==n[r])return e[r]=[e[r],n[r]]}),o.each(u,function(n){return null!=t.formats.TOGGLE[n]?delete e[n]:null==t.formats.SELECT[n]||Array.isArray(e[n])?void 0:e[n]=[e[n]]}),o.each(i,function(r){return null!=t.formats.SELECT[r]?e[r]=[n[r]]:void 0}),e},e[0]||{})},t}(),r.registerModule("toolbar",i),e.exports=i},{"../quill":30}],28:[function(t,e,n){var r,i,o,s;r=t("../quill"),o=r.require("lodash"),s=r.require("dom"),i=function(){function t(e,n){this.quill=e,this.options=n,this.container=this.quill.addContainer("ql-tooltip"),this.container.innerHTML=this.options.template,this.hide(),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(e){return function(n,r){return e.container.style.left!==t.HIDE_MARGIN?(e.range=null,e.hide()):void 0}}(this))}return t.DEFAULTS={offset:10,template:""},t.HIDE_MARGIN="-10000px",t.prototype.initTextbox=function(t,e,n){return s(t).on("keydown",function(t){return function(r){switch(r.which){case s.KEYS.ENTER:return r.preventDefault(),e.call(t);case s.KEYS.ESCAPE:return r.preventDefault(),n.call(t);default:return!0}}}(this))},t.prototype.hide=function(){return this.container.style.left=t.HIDE_MARGIN,this.range&&this.quill.setSelection(this.range),this.range=null},t.prototype.position=function(t){var e,n,r,i,o,s,l;return null!=t?(s=t.getBoundingClientRect(),o=this.quill.container.getBoundingClientRect(),r=s.left-o.left,i=s.top-o.top,n=s.bottom-o.bottom,e=r+s.width/2-this.container.offsetWidth/2,l=i+s.height+this.options.offset,l+this.container.offsetHeight>this.quill.container.offsetHeight&&(l=i-this.container.offsetHeight-this.options.offset),e=Math.max(0,Math.min(e,this.quill.container.offsetWidth-this.container.offsetWidth)),l=Math.max(0,Math.min(l,this.quill.container.offsetHeight-this.container.offsetHeight))):(e=this.quill.container.offsetWidth/2-this.container.offsetWidth/2,l=this.quill.container.offsetHeight/2-this.container.offsetHeight/2),l+=this.quill.container.scrollTop,[e,l]},t.prototype.show=function(t){var e,n,r;return this.range=this.quill.getSelection(),n=this.position(t),e=n[0],r=n[1],this.container.style.left=e+"px",this.container.style.top=r+"px",this.container.focus()},t}(),r.registerModule("tooltip",i),e.exports=i},{"../quill":30}],29:[function(t,e,n){var r,i,o,s;i=t("../quill"),s=i.require("lodash"),r=i.require("delta"),o=function(){function t(t,e){this.quill=t,this.options=null!=e?e:{},this.lastRecorded=0,this.ignoreChange=!1,this.clear(),this.initListeners()}return t.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.hotkeys={UNDO:{key:"Z",metaKey:!0},REDO:{key:"Z",metaKey:!0,shiftKey:!0}},t.prototype.initListeners=function(){return this.quill.onModuleLoad("keyboard",function(e){return function(n){var r;return n.addHotkey(t.hotkeys.UNDO,function(){return e.quill.editor.checkUpdate(),e.undo(),!1}),r=[t.hotkeys.REDO],navigator.platform.indexOf("Win")>-1&&r.push({key:"Y",metaKey:!0}),n.addHotkey(r,function(){return e.quill.editor.checkUpdate(),e.redo(),!1})}}(this)),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(t){return function(e,n){return t.ignoreChange?void 0:(t.options.userOnly&&n!==i.sources.USER?t._transform(e):t.record(e,t.oldDelta),t.oldDelta=t.quill.getContents())}}(this))},t.prototype.clear=function(){return this.stack={undo:[],redo:[]},this.oldDelta=this.quill.getContents()},t.prototype.record=function(t,e){var n,r,i,o;if(t.ops.length>0){this.stack.redo=[];try{if(o=this.quill.getContents().diff(this.oldDelta),i=(new Date).getTime(),this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0?(n=this.stack.undo.pop(),o=o.compose(n.undo),t=n.redo.compose(t)):this.lastRecorded=i,this.stack.undo.push({redo:t,undo:o}),this.stack.undo.length>this.options.maxStack)return this.stack.undo.unshift()}catch(s){return r=s,console.warn("Could not record change... clearing undo stack."),this.clear()}}},t.prototype.redo=function(){return this._change("redo","undo")},t.prototype.undo=function(){return this._change("undo","redo")},t.prototype._getLastChangeIndex=function(t){var e,n;return n=0,e=0,s.each(t.ops,function(t){return null!=t.insert?n=Math.max(e+(t.insert.length||1),n):null!=t["delete"]?n=Math.max(e,n):null!=t.retain?(null!=t.attributes&&(n=Math.max(e+t.retain,n)),e+=t.retain):void 0}),n},t.prototype._change=function(t,e){var n,r;return this.stack[t].length>0?(n=this.stack[t].pop(),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],i.sources.USER),this.ignoreChange=!1,r=this._getLastChangeIndex(n[t]),this.quill.setSelection(r,r),this.oldDelta=this.quill.getContents(),this.stack[e].push(n)):void 0},t.prototype._transform=function(t){var e,n,r,i,o,s,l,u;for(this.oldDelta=t.transform(this.oldDelta,!0),s=this.stack.undo,n=0,i=s.length;i>n;n++)e=s[n],e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0);for(l=this.stack.redo,u=[],r=0,o=l.length;o>r;r++)e=l[r],e.undo=t.transform(e.undo,!0),u.push(e.redo=t.transform(e.redo,!0));return u},t}(),i.registerModule("undo-manager",o),e.exports=o},{"../quill":30}],30:[function(t,e,n){var r,i,o,s,l,u,a,c,h,f,p,d=function(t,e){function n(){this.constructor=t}for(var r in e)g.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty,v=[].slice;h=t("lodash"),p=t("../package.json"),r=t("rich-text/lib/delta"),s=t("eventemitter2").EventEmitter2,f=t("./lib/dom"),i=t("./core/document"),o=t("./core/editor"),l=t("./core/format"),u=t("./core/normalizer"),c=t("./lib/range"),a=function(t){function e(t,n){var r,i,s;if(this.container=t,null==n&&(n={}),h.isString(this.container)&&(this.container=document.querySelector(this.container)),null==this.container)throw new Error("Invalid Quill container");if(i=h.defaults(n.modules||{},e.DEFAULTS.modules),r=this.container.innerHTML,this.container.innerHTML="",this.options=h.defaults(n,e.DEFAULTS),this.options.modules=i,this.options.id=this.id="ql-editor-"+(e.editors.length+1),this.modules={},this.root=this.addContainer("ql-editor"),this.editor=new o(this.root,this,this.options),e.editors.push(this),this.setHTML(r,e.sources.SILENT),s=e.themes[this.options.theme],null==s)throw new Error("Cannot load "+this.options.theme+" theme. Are you sure you registered it?");this.theme=new s(this,this.options),h.each(this.options.modules,function(t){return function(e,n){return t.addModule(n,e)}}(this))}return d(e,t),e.version=p.version,e.editors=[],e.modules=[],e.themes=[],e.DEFAULTS={formats:["align","bold","italic","strike","underline","color","background","font","size","link","image","bullet","list"],modules:{keyboard:!0,"paste-manager":!0,"undo-manager":!0},pollInterval:100,readOnly:!1,styles:{},theme:"base"},e.events={FORMAT_INIT:"format-init",MODULE_INIT:"module-init",POST_EVENT:"post-event",PRE_EVENT:"pre-event",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},e.sources=o.sources,e.registerModule=function(t,n){return null!=e.modules[t]&&console.warn("Overwriting "+t+" module"),e.modules[t]=n},e.registerTheme=function(t,n){return null!=e.themes[t]&&console.warn("Overwriting "+t+" theme"),e.themes[t]=n},e.require=function(t){switch(t){case"lodash":return h;case"delta":return r;case"format":return l;case"normalizer":return u;case"dom":return f;case"document":return i;case"range":return c;default:return null}},e.prototype.destroy=function(){var t;return t=this.getHTML(),h.each(this.modules,function(t,e){return h.isFunction(t.destroy)?t.destroy():void 0}),this.editor.destroy(),this.removeAllListeners(),e.editors.splice(h.indexOf(e.editors,this),1),this.container.innerHTML=t},e.prototype.addContainer=function(t,e){var n,r;return null==e&&(e=!1),r=e?this.root:null,n=document.createElement("div"),f(n).addClass(t),this.container.insertBefore(n,r),n},e.prototype.addFormat=function(t,n){return this.editor.doc.addFormat(t,n),this.emit(e.events.FORMAT_INIT,t)},e.prototype.addModule=function(t,n){var r;if(r=e.modules[t],null==r)throw new Error("Cannot load "+t+" module. Are you sure you registered it?");return n===!0&&(n={}),n=h.defaults(n,this.theme.constructor.OPTIONS[t]||{},r.DEFAULTS||{}),this.modules[t]=new r(this,n),this.emit(e.events.MODULE_INIT,t,this.modules[t]),this.modules[t]},e.prototype.deleteText=function(t,n,i){var o,s,l;return null==i&&(i=e.sources.API),l=this._buildParams(t,n,{},i),t=l[0],n=l[1],s=l[2],i=l[3],n>t?(o=(new r).retain(t)["delete"](n-t),this.editor.applyDelta(o,i)):void 0},e.prototype.emit=function(){var t,n;return n=arguments[0],t=2<=arguments.length?v.call(arguments,1):[],e.__super__.emit.apply(this,[e.events.PRE_EVENT,n].concat(v.call(t))),e.__super__.emit.apply(this,[n].concat(v.call(t))),e.__super__.emit.apply(this,[e.events.POST_EVENT,n].concat(v.call(t)))},e.prototype.focus=function(){return this.editor.focus()},e.prototype.formatLine=function(t,e,n,r,i){var o,s,l,u,a;return u=this._buildParams(t,e,n,r,i),t=u[0],e=u[1],o=u[2],i=u[3],a=this.editor.doc.findLineAt(e),s=a[0],l=a[1],null!=s&&(e+=s.length-l),this.formatText(t,e,o,i)},e.prototype.formatText=function(t,e,n,i,o){var s,l,u;return u=this._buildParams(t,e,n,i,o),t=u[0],e=u[1],l=u[2],o=u[3],l=h.reduce(l,function(t){return function(e,n,r){var i;return i=t.editor.doc.formats[r],n&&n!==i.config["default"]||(e[r]=null),e}}(this),l),s=(new r).retain(t).retain(e-t,l),this.editor.applyDelta(s,o)},e.prototype.getBounds=function(t){return this.editor.getBounds(t)},e.prototype.getContents=function(t,e){return null==t&&(t=0),null==e&&(e=null),h.isObject(t)&&(e=t.end,t=t.start),this.editor.delta.slice(t,e)},e.prototype.getHTML=function(){return this.editor.doc.getHTML()},e.prototype.getLength=function(){return this.editor.length},e.prototype.getModule=function(t){return this.modules[t]},e.prototype.getSelection=function(){return this.editor.checkUpdate(),this.editor.selection.getRange()},e.prototype.getText=function(t,e){return null==t&&(t=0),null==e&&(e=null),h.map(this.getContents(t,e).ops,function(t){return h.isString(t.insert)?t.insert:""}).join("")},e.prototype.insertEmbed=function(t,e,n,i){var o,s,l,u;return u=this._buildParams(t,0,e,n,i),t=u[0],s=u[1],l=u[2],i=u[3],o=(new r).retain(t).insert(1,l),this.editor.applyDelta(o,i)},e.prototype.insertText=function(t,e,n,i,o){var s,l,u,a;return a=this._buildParams(t,0,n,i,o),t=a[0],l=a[1],u=a[2],o=a[3],e.length>0?(s=(new r).retain(t).insert(e,u),this.editor.applyDelta(s,o)):void 0},e.prototype.onModuleLoad=function(t,n){return this.modules[t]?n(this.modules[t]):this.on(e.events.MODULE_INIT,function(e,r){return e===t?n(r):void 0})},e.prototype.prepareFormat=function(t,n,r){var i,o;return null==r&&(r=e.sources.API),i=this.editor.doc.formats[t],null!=i&&(o=this.getSelection(),null!=o?o.isCollapsed():void 0)?i.isType(l.types.LINE)?this.formatLine(o,t,n,r):i.prepare(n):void 0},e.prototype.setContents=function(t,n){var i;return null==n&&(n=e.sources.API),t=new r(Array.isArray(t)?t.slice():t.ops.slice()),i=h.last(t.slice(t.length()-1).ops),t["delete"](this.getLength()-1),null!=i&&h.isString(i.insert)&&"\n"===h.last(i.insert)&&t["delete"](1),this.updateContents(t,n)},e.prototype.setHTML=function(t,n){return null==n&&(n=e.sources.API),t.trim()||(t="<"+f.DEFAULT_BLOCK_TAG+"><"+f.DEFAULT_BREAK_TAG+">"),this.editor.doc.setHTML(t),this.editor.checkUpdate(n)},e.prototype.setSelection=function(t,n,r){var i;return null==r&&(r=e.sources.API),h.isNumber(t)&&h.isNumber(n)?i=new c(t,n):(i=t,r=n||r),this.editor.selection.setRange(i,r)},e.prototype.setText=function(t,n){var i;return null==n&&(n=e.sources.API),i=(new r).insert(t),this.setContents(i,n)},e.prototype.updateContents=function(t,n){return null==n&&(n=e.sources.API),Array.isArray(t)&&(t={ops:t}),this.editor.applyDelta(t,n)},e.prototype._buildParams=function(){var t,n;return n=1<=arguments.length?v.call(arguments,0):[],h.isObject(n[0])&&n.splice(0,1,n[0].start,n[0].end),h.isString(n[2])&&(t={},t[n[2]]=n[3],n.splice(2,2,t)),null==n[3]&&(n[3]=e.sources.API),n},e}(s),a.registerTheme("base",t("./themes/base")),a.registerTheme("snow",t("./themes/snow")),e.exports=a},{"../package.json":7,"./core/document":8,"./core/editor":9,"./core/format":10,"./core/normalizer":13,"./lib/dom":17,"./lib/range":20,"./themes/base":32,"./themes/snow":33,eventemitter2:2,lodash:1,"rich-text/lib/delta":3}],31:[function(t,e,n){e.exports='.ql-image-tooltip{padding:10px;width:300px}.ql-image-tooltip:after{clear:both;content:"";display:table}.ql-image-tooltip a{border:1px solid #000;box-sizing:border-box;display:inline-block;float:left;padding:5px;text-align:center;width:50%}.ql-image-tooltip img{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.ql-image-tooltip .input{box-sizing:border-box;width:100%}.ql-image-tooltip .preview{margin:10px 0;position:relative;border:1px dashed #000;height:200px}.ql-image-tooltip .preview span{display:inline-block;position:absolute;text-align:center;top:40%;width:100%}.ql-link-tooltip{padding:5px 10px}.ql-link-tooltip input.input{width:170px}.ql-link-tooltip a.done,.ql-link-tooltip input.input{display:none}.ql-link-tooltip a.change{margin-right:4px}.ql-link-tooltip.editing a.done,.ql-link-tooltip.editing input.input{display:inline-block}.ql-link-tooltip.editing a.change,.ql-link-tooltip.editing a.remove,.ql-link-tooltip.editing a.url{display:none}.ql-multi-cursor{position:absolute;left:0;top:0;z-index:1000}.ql-multi-cursor .cursor{margin-left:-1px;position:absolute}.ql-multi-cursor .cursor-flag{bottom:100%;position:absolute;white-space:nowrap}.ql-multi-cursor .cursor-name{display:inline-block;color:#fff;padding:2px 8px}.ql-multi-cursor .cursor-caret{height:100%;position:absolute;width:2px}.ql-multi-cursor .cursor.hidden .cursor-flag{display:none}.ql-multi-cursor .cursor.top .cursor-flag{bottom:auto;top:100%}.ql-multi-cursor .cursor.right .cursor-flag{right:-2px}.ql-paste-manager{left:-100000px;position:absolute;top:50%}.ql-toolbar{box-sizing:border-box}.ql-tooltip{background-color:#fff;border:1px solid #000;box-sizing:border-box;position:absolute;top:0;white-space:nowrap;z-index:2000}.ql-tooltip a{cursor:pointer;text-decoration:none}.ql-container{box-sizing:border-box;cursor:text;font-family:Helvetica,Arial,sans-serif;height:100%;line-height:1.42;margin:0;overflow-x:hidden;overflow-y:auto;padding:12px 15px;position:relative}.ql-editor{box-sizing:border-box;min-height:100%;outline:0;tab-size:4;white-space:pre-wrap}.ql-editor div{margin:0;padding:0}.ql-editor a{text-decoration:underline}.ql-editor b{font-weight:700;font-style:bold}.ql-editor i{font-style:italic}.ql-editor s{text-decoration:line-through}.ql-editor u{text-decoration:underline}.ql-editor a,.ql-editor b,.ql-editor i,.ql-editor s,.ql-editor span,.ql-editor u{background-color:inherit}.ql-editor img{max-width:100%}.ql-editor blockquote,.ql-editor ol,.ql-editor ul{margin:0 0 0 2em;padding:0}.ql-editor ol{list-style-type:decimal}.ql-editor ul{list-style-type:disc}.ql-editor.ql-ie-10 br,.ql-editor.ql-ie-9 br{display:none}'},{}],32:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../../lib/dom"),o=t("./base.styl"),r=function(){function t(e,n){var r;this.quill=e,this.options=n,s(this.quill.container).addClass("ql-container"),this.options.styles&&this.addStyles(o+t.objToCss(this.options.styles)),s.isIE(10)&&(r=s.isIE(9)?"9":"10",s(this.quill.root).addClass("ql-ie-"+r))}return t.OPTIONS={},t.objToCss=function(t){return i.map(t,function(t,e){var n;return n=i.map(t,function(t,e){return e+": "+t+";"}).join(" "),e+" { "+n+" }"}).join("\n")},t.prototype.addStyles=function(e){var n;return i.isObject(e)&&(e=t.objToCss(e)),n=document.createElement("style"),n.type="text/css",n.appendChild(document.createTextNode(e)),document.head.appendChild(n)},t}(),e.exports=r},{"../../lib/dom":17,"./base.styl":31,lodash:1}],33:[function(t,e,n){var r,i,o,s,l,u,a=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("lodash"),i=t("../../lib/color-picker"),r=t("../base"),u=t("../../lib/dom"),o=t("../../lib/picker"),s=function(t){function e(t,n){this.quill=t,this.options=n,e.__super__.constructor.apply(this,arguments),u(this.quill.container).addClass("ql-snow"),this.pickers=[],this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?l.invoke(t.pickers,"close"):void 0}}(this)),this.quill.onModuleLoad("multi-cursor",l.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",l.bind(this.extendToolbar,this))}return a(e,t),e.COLORS=["#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"],e.OPTIONS={"multi-cursor":{template:' '}},e.prototype.extendMultiCursor=function(t){return t.on(t.constructor.events.CURSOR_ADDED,function(t){var e,n;return e=t.elem.querySelector(".cursor-triangle.bottom"),n=t.elem.querySelector(".cursor-triangle.top"),e.style.borderTopColor=n.style.borderBottomColor=t.color})},e.prototype.extendToolbar=function(t){return u(t.container).addClass("ql-snow"),l.each(["color","background","font","size","align"],function(e){return function(n){var r,s;if(s=t.container.querySelector(".ql-"+n),null!=s){switch(n){case"font":case"size":case"align":r=new o(s);break;case"color":case"background":r=new i(s),l.each(r.container.querySelectorAll(".ql-picker-item"),function(t,e){return 7>e?u(t).addClass("ql-primary-color"):void 0})}return null!=r?e.pickers.push(r):void 0}}}(this)),l.each(u(t.container).textNodes(),function(t){return 0===u(t).text().trim().length?u(t).remove():void 0})},e}(r),e.exports=s},{"../../lib/color-picker":16,"../../lib/dom":17,"../../lib/picker":19,"../base":32,lodash:1}]},{},[15])(15)});