diff --git a/Yavsc/Settings/SiteSettings.cs b/Yavsc/Settings/SiteSettings.cs index 7801060f..b360fa63 100644 --- a/Yavsc/Settings/SiteSettings.cs +++ b/Yavsc/Settings/SiteSettings.cs @@ -30,7 +30,7 @@ namespace Yavsc /// User's files directory /// /// - public ThirdPartyFiles UserFiles { get; set; } + public ThirdPartyFiles UserFiles { get; set; } public string BusinessName { get; set; } public string Street { get; set; } diff --git a/Yavsc/Startup/Startup.cs b/Yavsc/Startup/Startup.cs index e06782e9..55729918 100755 --- a/Yavsc/Startup/Startup.cs +++ b/Yavsc/Startup/Startup.cs @@ -235,7 +235,7 @@ namespace Yavsc // TODO implement an installation & upgrade procedure // Create required directories - foreach (string dir in new string[] { Startup.UserFilesDirName, Startup.UserBillsDirName, SiteSetup.TempDir }) + foreach (string dir in new string[] { UserFilesDirName, UserBillsDirName, SiteSetup.TempDir }) { DirectoryInfo di = new DirectoryInfo(dir); if (!di.Exists) di.Create(); diff --git a/Yavsc/appsettings.json b/Yavsc/appsettings.json index 04c8b10c..718b347b 100755 --- a/Yavsc/appsettings.json +++ b/Yavsc/appsettings.json @@ -27,12 +27,11 @@ }, "UserFiles": { "DirName": "UserFiles", - "Quota": "200M" - }, - "DirNames": { + "Quota": "200M", "Bills":"Bills", "Blog":"Blog" - } + }, + "TempDir": "Temp" }, "Smtp": { "Host": "[YOURSMTPHOST]", diff --git a/Yavsc/wwwroot/js/site.min.js b/Yavsc/wwwroot/js/site.min.js index 17cafbd9..40d7a194 100644 --- a/Yavsc/wwwroot/js/site.min.js +++ b/Yavsc/wwwroot/js/site.min.js @@ -21,5 +21,6 @@ n.start(t)))},t.reconnectDelay)}},handleParseFailure:function(e,i,n,s,r){var o=l si[ze]=si[je]=si[We]=si[Be]=si[$e]=si[Ue]=si[Ke]=si[Ye]=si[Ge]=!0,si[Ee]=si[Se]=si[qe]=si[De]=si[Ae]=si[Ie]=si[Ne]=si[Pe]=si[Le]=si[Me]=si[Oe]=si[Fe]=si[Re]=si[He]=!1;var ri={};ri[Ee]=ri[Se]=ri[qe]=ri[De]=ri[Ae]=ri[ze]=ri[je]=ri[We]=ri[Be]=ri[$e]=ri[Le]=ri[Me]=ri[Oe]=ri[Re]=ri[Ue]=ri[Ke]=ri[Ye]=ri[Ge]=!0,ri[Ie]=ri[Ne]=ri[Pe]=ri[Fe]=ri[He]=!1;var oi={"function":!0,object:!0},ai=oi[typeof n]&&n&&!n.nodeType&&n,li=oi[typeof i]&&i&&!i.nodeType&&i,ui=ai&&li&&"object"==typeof e&&e&&e.Object&&e,ci=oi[typeof self]&&self&&self.Object&&self,hi=oi[typeof window]&&window&&window.Object&&window,di=li&&li.exports===ai&&ai,pi=ui||hi!==(this&&this.window)&&hi||ci||this,fi=Object.prototype,gi=(gi=pi.window)?gi.document:null,mi=Function.prototype.toString,vi=fi.hasOwnProperty,bi=0,yi=fi.toString,_i=RegExp("^"+ne(mi.call(vi)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wi=_t(pi,"ArrayBuffer"),xi=_t(wi&&new wi(0),"slice"),Ci=Math.floor,ki=_t(Object,"getPrototypeOf"),Ti=_t(pi,"Set"),Ei=_t(pi,"Uint8Array"),Si=_t(pi,"WeakMap"),Di=function(){try{var t=_t(pi,"Float64Array"),e=new t(new wi(10),0,1)&&t}catch(i){}return e||null}(),Ai=_t(Object,"create"),Ii=_t(Array,"isArray"),Ni=_t(Object,"keys"),Pi=Math.max,Li=Math.min,Mi=_t(Date,"now"),Oi=Number.POSITIVE_INFINITY,Fi=4294967295,Ri=Fi-1,Hi=Fi>>>1,qi=Di?Di.BYTES_PER_ELEMENT:0,zi=9007199254740991,ji=Si&&new Si,Wi={},Bi=h.support={};!function(t){var e=function(){this.x=t},i=[];e.prototype={valueOf:t,y:t};for(var n in new e)i.push(n);try{Bi.dom=11===gi.createDocumentFragment().nodeType}catch(s){Bi.dom=!1}}(1,0);var $i=function(){function t(){}return function(e){if(Vt(e)){t.prototype=e;var i=new t;t.prototype=null}return i||{}}}(),Ui=it(O),Ki=nt(),Yi=ji?function(t,e){return ji.set(t,e),t}:oe;xi||(Q=wi&&Ei?function(t){var e=t.byteLength,i=Di?Ci(e/qi):0,n=i*qi,s=new wi(e);if(i){var r=new Di(s,0,i);r.set(new Di(t,0,i))}return e!=n&&(r=new Ei(s,n),r.set(new Ei(t,n))),s}:re(null));var Gi=Ai&&Ti?function(t){return new f(t)}:re(null),Vi=ji?function(t){return ji.get(t)}:le,Xi=B("length"),Qi=function(){var t=0,e=0;return function(i,n){var s=on(),r=Ce-(s-e);if(e=s,r>0){if(++t>=xe)return i}else t=0;return Yi(i,n)}}(),Ji=$t(function(t,e){return Tt(t)?I(t,L(e,!1,!0)):[]}),Zi=$t(function(t){for(var e=t.length,i=e,n=Array(h),s=bt(),o=s==r,a=[];i--;){var l=t[i]=Tt(l=t[i])?l:[];n[i]=o&&l.length>=120?Gi(i&&l):null}var u=t[0],c=-1,h=u?u.length:0,d=n[0];t:for(;++cs;s++)t&&t.push(i._listeners[s]);return[i]}if("*"===f||"**"===f||i[f]){if("*"===f){for(a in i)"_listeners"!==a&&i.hasOwnProperty(a)&&(d=d.concat(o(t,e,i[a],n+1)));return d}if("**"===f){h=n+1===p||n+2===p&&"*"===g,h&&i._listeners&&(d=d.concat(o(t,e,i,p)));for(a in i)"_listeners"!==a&&i.hasOwnProperty(a)&&("*"===a||"**"===a?(i[a]._listeners&&!h&&(d=d.concat(o(t,e,i[a],p))),d=d.concat(o(t,e,i[a],n))):d=d.concat(a===g?o(t,e,i[a],n+2):o(t,e,i[a],n)));return d}d=d.concat(o(t,e,i[f],n+1))}if(l=i["*"],l&&o(t,e,l,n+1),u=i["**"])if(p>n){u._listeners&&o(t,e,u,p);for(a in u)"_listeners"!==a&&u.hasOwnProperty(a)&&(a===g?o(t,e,u[a],n+2):a===f?o(t,e,u[a],n+1):(c={},c[a]=u[a],o(t,e,{"**":c},n+1)))}else u._listeners?o(t,e,u,p):u["*"]&&u["*"]._listeners&&o(t,e,u["*"],p);return d}function a(t,e){t="string"==typeof t?t.split(this.delimiter):t.slice();for(var i=0,n=t.length;n>i+1;i++)if("**"===t[i]&&"**"===t[i+1])return;for(var s=this.listenerTree,r=t.shift();r;){if(s[r]||(s[r]={}),s=s[r],0===t.length){if(s._listeners){if("function"==typeof s._listeners)s._listeners=[s._listeners,e];else if(l(s._listeners)&&(s._listeners.push(e),!s._listeners.warned)){var o=u;"undefined"!=typeof this._events.maxListeners&&(o=this._events.maxListeners),o>0&&s._listeners.length>o&&(s._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",s._listeners.length),console.trace())}}else s._listeners=e;return!0}r=t.shift()}return!0}var l=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=10;r.prototype.delimiter=".",r.prototype.setMaxListeners=function(t){this._events||i.call(this),this._events.maxListeners=t,this._conf||(this._conf={}),this._conf.maxListeners=t},r.prototype.event="",r.prototype.once=function(t,e){return this.many(t,1,e),this},r.prototype.many=function(t,e,i){function n(){0===--e&&s.off(t,n),i.apply(this,arguments)}var s=this;if("function"!=typeof i)throw new Error("many only accepts instances of Function");return n._origin=i,this.on(t,n),s},r.prototype.emit=function(){this._events||i.call(this);var t=arguments[0];if("newListener"===t&&!this.newListener&&!this._events.newListener)return!1;if(this._all){for(var e=arguments.length,n=new Array(e-1),s=1;e>s;s++)n[s-1]=arguments[s];for(s=0,e=this._all.length;e>s;s++)this.event=t,this._all[s].apply(this,n)}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 r;if(this.wildcard){r=[];var a="string"==typeof t?t.split(this.delimiter):t.slice();o.call(this,r,a,this.listenerTree,0)}else r=this._events[t];if("function"==typeof r){if(this.event=t,1===arguments.length)r.call(this);else if(arguments.length>1)switch(arguments.length){case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(var e=arguments.length,n=new Array(e-1),s=1;e>s;s++)n[s-1]=arguments[s];r.apply(this,n)}return!0}if(r){for(var e=arguments.length,n=new Array(e-1),s=1;e>s;s++)n[s-1]=arguments[s];for(var l=r.slice(),s=0,e=l.length;e>s;s++)this.event=t,l[s].apply(this,n);return l.length>0||!!this._all}return!!this._all},r.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||i.call(this),this.emit("newListener",t,e),this.wildcard)return a.call(this,t,e),this;if(this._events[t]){if("function"==typeof this._events[t])this._events[t]=[this._events[t],e];else if(l(this._events[t])&&(this._events[t].push(e),!this._events[t].warned)){var n=u;"undefined"!=typeof this._events.maxListeners&&(n=this._events.maxListeners),n>0&&this._events[t].length>n&&(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},r.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},r.prototype.addListener=r.prototype.on,r.prototype.off=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");var i,n=[];if(this.wildcard){var s="string"==typeof t?t.split(this.delimiter):t.slice();n=o.call(this,null,s,this.listenerTree,0)}else{if(!this._events[t])return this;i=this._events[t],n.push({_listeners:i})}for(var r=0;rc;c++)if(i[c]===e||i[c].listener&&i[c].listener===e||i[c]._origin&&i[c]._origin===e){u=c;break}if(0>u)continue;return this.wildcard?a._listeners.splice(u,1):this._events[t].splice(u,1),0===i.length&&(this.wildcard?delete a._listeners:delete this._events[t]),this}(i===e||i.listener&&i.listener===e||i._origin&&i._origin===e)&&(this.wildcard?delete a._listeners:delete this._events[t])}return this},r.prototype.offAny=function(t){var e,i=0,n=0;if(t&&this._all&&this._all.length>0){for(e=this._all,i=0,n=e.length;n>i;i++)if(t===e[i])return e.splice(i,1),this}else this._all=[];return this},r.prototype.removeListener=r.prototype.off,r.prototype.removeAllListeners=function(t){if(0===arguments.length)return!this._events||i.call(this),this;if(this.wildcard)for(var e="string"==typeof t?t.split(this.delimiter):t.slice(),n=o.call(this,null,e,this.listenerTree,0),s=0;s0&&(i.attributes=e),this.push(i))},a.prototype["delete"]=function(t){return 0>=t?this:this.push({"delete":t})},a.prototype.retain=function(t,e){if(0>=t)return this;var i={retain:t};return s.object(e)&&Object.keys(e).length>0&&(i.attributes=e),this.push(i)},a.prototype.push=function(t){var e=this.ops.length,i=this.ops[e-1];if(t=r.clone(t),s.object(i)){if(s.number(t["delete"])&&s.number(i["delete"]))return this.ops[e-1]={"delete":i["delete"]+t["delete"]},this;if(s.number(i["delete"])&&null!=t.insert&&(e-=1,i=this.ops[e-1],!s.object(i)))return this.ops.unshift(t),this;if(s.equal(t.attributes,i.attributes)){if(s.string(t.insert)&&s.string(i.insert))return this.ops[e-1]={insert:i.insert+t.insert},s.object(t.attributes)&&(this.ops[e-1].attributes=t.attributes),this;if(s.number(t.retain)&&s.number(i.retain))return this.ops[e-1]={retain:i.retain+t.retain},s.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},a.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},a.prototype.length=function(){return this.ops.reduce(function(t,e){return t+r.length(e)},0)},a.prototype.slice=function(t,e){t=t||0,s.number(e)||(e=1/0);for(var i=new a,n=r.iterator(this.ops),o=0;e>o&&n.hasNext();){var l;t>o?l=n.next(t-o):(l=n.next(e-o),i.push(l)),o+=r.length(l)}return i},a.prototype.compose=function(t){for(var e=r.iterator(this.ops),i=r.iterator(t.ops),n=new a;e.hasNext()||i.hasNext();)if("insert"===i.peekType())n.push(i.next());else if("delete"===e.peekType())n.push(e.next());else{var o=Math.min(e.peekLength(),i.peekLength()),l=e.next(o),u=i.next(o);if(s.number(u.retain)){var c={};s.number(l.retain)?c.retain=o:c.insert=l.insert;var h=r.attributes.compose(l.attributes,u.attributes,s.number(l.retain));h&&(c.attributes=h),n.push(c)}else s.number(u["delete"])&&s.number(l.retain)&&n.push(u)}return n.chop()},a.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},a.prototype.diff=function(t){var e=new a;if(this.ops===t.ops)return e;var i=[this.ops,t.ops].map(function(e){return e.map(function(i){if(null!=i.insert)return s.string(i.insert)?i.insert:o;var n=e===t.ops?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),l=n(i[0],i[1]),u=r.iterator(this.ops),c=r.iterator(t.ops);return l.forEach(function(t){for(var i=t[1].length;i>0;){var o=0;switch(t[0]){case n.INSERT:o=Math.min(c.peekLength(),i),e.push(c.next(o));break;case n.DELETE:o=Math.min(i,u.peekLength()),u.next(o),e["delete"](o);break;case n.EQUAL:o=Math.min(u.peekLength(),c.peekLength(),i);var a=u.next(o),l=c.next(o);s.equal(a.insert,l.insert)?e.retain(o,r.attributes.diff(a.attributes,l.attributes)):e.push(l)["delete"](o)}i-=o}}),e.chop()},a.prototype.transform=function(t,e){if(e=!!e,s.number(t))return this.transformPosition(t,e);for(var i=r.iterator(this.ops),n=r.iterator(t.ops),o=new a;i.hasNext()||n.hasNext();)if("insert"!==i.peekType()||!e&&"insert"===n.peekType())if("insert"===n.peekType())o.push(n.next());else{var l=Math.min(i.peekLength(),n.peekLength()),u=i.next(l),c=n.next(l);if(u["delete"])continue;c["delete"]?o.push(c):o.retain(l,r.attributes.transform(u.attributes,c.attributes,e))}else o.retain(r.length(i.next()));return o.chop()},a.prototype.transformPosition=function(t,e){e=!!e;for(var i=r.iterator(this.ops),n=0;i.hasNext()&&t>=n;){var s=i.peekLength(),o=i.peekType();i.next(),"delete"!==o?("insert"===o&&(t>n||!e)&&(t+=s),n+=s):t-=Math.min(s,t-n)}return t},e.exports=a},{"./is":4,"./op":5,"fast-diff":6}],4:[function(t,e,i){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 i in t)if(t[i]!==e[i])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,i){function n(t){this.ops=t,this.index=0,this.offset=0}var s=t("./is"),r={attributes:{clone:function(t,e){return s.object(t)?Object.keys(t).reduce(function(i,n){return void 0===t[n]||null===t[n]&&!e||(i[n]=t[n]),i},{}):{}},compose:function(t,e,i){s.object(t)||(t={}),s.object(e)||(e={});var n=this.clone(e,i);for(var r in t)void 0!==t[r]&&void 0===e[r]&&(n[r]=t[r]);return Object.keys(n).length>0?n:void 0},diff:function(t,e){s.object(t)||(t={}),s.object(e)||(e={});var i=Object.keys(t).concat(Object.keys(e)).reduce(function(i,n){return t[n]!==e[n]&&(i[n]=void 0===e[n]?null:e[n]),i},{});return Object.keys(i).length>0?i:void 0},transform:function(t,e,i){if(!s.object(t))return e;if(!s.object(e))return void 0;if(!i)return e;var n=Object.keys(e).reduce(function(i,n){return void 0===t[n]&&(i[n]=e[n]),i},{});return Object.keys(n).length>0?n:void 0}},clone:function(t){var e=this.attributes.clone(t);return s.object(e.attributes)&&(e.attributes=this.attributes.clone(e.attributes,!0)),e},iterator:function(t){return new n(t)},length:function(t){return s.number(t["delete"])?t["delete"]:s.number(t.retain)?t.retain:s.string(t.insert)?t.insert.length:1}};n.prototype.hasNext=function(){return this.peekLength()<1/0},n.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var i=this.offset,n=r.length(e);if(t>=n-i?(t=n-i,this.index+=1,this.offset=0):this.offset+=t,s.number(e["delete"]))return{"delete":t};var o={};return e.attributes&&(o.attributes=e.attributes),s.number(e.retain)?o.retain=t:o.insert=s.string(e.insert)?e.insert.substr(i,t):e.insert,o}return{retain:1/0}},n.prototype.peekLength=function(){return this.ops[this.index]?r.length(this.ops[this.index])-this.offset:1/0},n.prototype.peekType=function(){return this.ops[this.index]?s.number(this.ops[this.index]["delete"])?"delete":s.number(this.ops[this.index].retain)?"retain":"insert":"retain"},e.exports=r},{"./is":4}],6:[function(t,e,i){function n(t,e){if(t==e)return t?[[p,t]]:[];var i=a(t,e),n=t.substring(0,i);t=t.substring(i),e=e.substring(i),i=l(t,e);var r=t.substring(t.length-i);t=t.substring(0,t.length-i),e=e.substring(0,e.length-i);var o=s(t,e);return n&&o.unshift([p,n]),r&&o.push([p,r]),c(o),o}function s(t,e){var i;if(!t)return[[d,e]];if(!e)return[[h,t]];var s=t.length>e.length?t:e,o=t.length>e.length?e:t,a=s.indexOf(o);if(-1!=a)return i=[[d,s.substring(0,a)],[p,o],[d,s.substring(a+o.length)]],t.length>e.length&&(i[0][0]=i[2][0]=h),i;if(1==o.length)return[[h,t],[d,e]];var l=u(t,e);if(l){var c=l[0],f=l[1],g=l[2],m=l[3],v=l[4],b=n(c,g),y=n(f,m);return b.concat([[p,v]],y)}return r(t,e)}function r(t,e){for(var i=t.length,n=e.length,s=Math.ceil((i+n)/2),r=s,a=2*s,l=new Array(a),u=new Array(a),c=0;a>c;c++)l[c]=-1,u[c]=-1;l[r+1]=0,u[r+1]=0;for(var p=i-n,f=p%2!=0,g=0,m=0,v=0,b=0,y=0;s>y;y++){for(var _=-y+g;y-m>=_;_+=2){var w,x=r+_;w=_==-y||_!=y&&l[x-1]w&&n>C&&t.charAt(w)==e.charAt(C);)w++,C++;if(l[x]=w,w>i)m+=2;else if(C>n)g+=2;else if(f){var k=r+p-_;if(k>=0&&a>k&&-1!=u[k]){var T=i-u[k];if(w>=T)return o(t,e,w,C)}}}for(var E=-y+v;y-b>=E;E+=2){var T,k=r+E;T=E==-y||E!=y&&u[k-1]T&&n>S&&t.charAt(i-T-1)==e.charAt(n-S-1);)T++,S++;if(u[k]=T,T>i)b+=2;else if(S>n)v+=2;else if(!f){var x=r+p-E;if(x>=0&&a>x&&-1!=l[x]){var w=l[x],C=r+w-x;if(T=i-T,w>=T)return o(t,e,w,C)}}}}return[[h,t],[d,e]]}function o(t,e,i,s){var r=t.substring(0,i),o=e.substring(0,s),a=t.substring(i),l=e.substring(s),u=n(r,o),c=n(a,l);return u.concat(c)}function a(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var i=0,n=Math.min(t.length,e.length),s=n,r=0;s>i;)t.substring(r,s)==e.substring(r,s)?(i=s,r=i):n=s,s=Math.floor((n-i)/2+i);return s}function l(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var i=0,n=Math.min(t.length,e.length),s=n,r=0;s>i;)t.substring(t.length-s,t.length-r)==e.substring(e.length-s,e.length-r)?(i=s,r=i):n=s,s=Math.floor((n-i)/2+i);return s}function u(t,e){function i(t,e,i){for(var n,s,r,o,u=t.substring(i,i+Math.floor(t.length/4)),c=-1,h="";-1!=(c=e.indexOf(u,c+1));){var d=a(t.substring(i),e.substring(c)),p=l(t.substring(0,i),e.substring(0,c));h.length=t.length?[n,s,r,o,h]:null}var n=t.length>e.length?t:e,s=t.length>e.length?e:t;if(n.length<4||2*s.lengthu[4].length?o:u:o;var c,h,d,p;t.length>e.length?(c=r[0],h=r[1],d=r[2],p=r[3]):(d=r[0],p=r[1],c=r[2],h=r[3]);var f=r[4];return[c,h,d,p,f]}function c(t){t.push([p,""]);for(var e,i=0,n=0,s=0,r="",o="";i1?(0!==n&&0!==s&&(e=a(o,r),0!==e&&(i-n-s>0&&t[i-n-s-1][0]==p?t[i-n-s-1][1]+=o.substring(0,e):(t.splice(0,0,[p,o.substring(0,e)]),i++),o=o.substring(e),r=r.substring(e)),e=l(o,r),0!==e&&(t[i][1]=o.substring(o.length-e)+t[i][1],o=o.substring(0,o.length-e),r=r.substring(0,r.length-e))),0===n?t.splice(i-s,n+s,[d,o]):0===s?t.splice(i-n,n+s,[h,r]):t.splice(i-n-s,n+s,[h,r],[d,o]),i=i-n-s+(n?1:0)+(s?1:0)+1):0!==i&&t[i-1][0]==p?(t[i-1][1]+=t[i][1],t.splice(i,1)):i++,s=0,n=0,r="",o=""}""===t[t.length-1][1]&&t.pop();var u=!1;for(i=1;i0))return[void 0,t];if(i=this.toDelta().length(),t===i)return[this.lines.last,this.lines.last.length];if(t>i)return[void 0,t-i];for(e=this.lines.first;null!=e;){if(t\s+\ <")},t.prototype.insertLineBefore=function(t,e){var i;return i=new o(this,t),null!=e?(c(t.parentNode).isElement()||this.root.insertBefore(t,e.node),this.lines.insertAfter(e.prev,i)):(c(t.parentNode).isElement()||this.root.appendChild(t),this.lines.append(i)),i},t.prototype.mergeLines=function(t,e){return e.length>1&&(1===t.length&&c(t.leaves.last.node).remove(),u.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 u.each(this.lines.toArray(),function(t,e){return t.optimize(),!0})},t.prototype.rebuild=function(){var t,e,i;for(e=this.lines.toArray(),t=this.root.firstChild,null!=t&&null!=c.LIST_TAGS[t.tagName]&&(t=t.firstChild),u.each(e,function(e){return function(i,n){for(var s,r;i.node!==t;){if(i.node.parentNode!==e.root&&(null!=(r=i.node.parentNode)?r.parentNode:void 0)!==e.root)return e.removeLine(i);t=e.normalizer.normalizeLine(t),s=e.insertLineBefore(t,i),t=c(t).nextLineNode(e.root)}return i.outerHTML!==t.outerHTML&&(i.node=e.normalizer.normalizeLine(i.node),i.rebuild()),t=c(t).nextLineNode(e.root)}}(this)),i=[];null!=t;)t=this.normalizer.normalizeLine(t),this.appendLine(t),i.push(t=c(t).nextLineNode(this.root));return i},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=l.stripComments(t),t=l.stripWhitespace(t),this.root.innerHTML=t,this.lines=new a,this.rebuild()},t.prototype.splitLine=function(t,e){var i,n,s,r;return e=Math.min(e,t.length-1),r=c(t.node).split(e,!0),i=r[0],n=r[1],t.node=i,t.rebuild(),s=this.insertLineBefore(n,t.next),s.formats=u.clone(t.formats),s.resetContent(),s},t.prototype.toDelta=function(){var t,e;return e=this.lines.toArray(),t=new n,u.each(e,function(e){return u.each(e.delta.ops,function(e){return t.push(e)})}),t},t}(),e.exports=s},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],9:[function(t,e,i){var n,s,r,o,a,l,u;l=t("lodash"),n=t("rich-text/lib/delta"),u=t("../lib/dom"),s=t("./document"),o=t("./line"),a=t("./selection"),r=function(){function t(t,e,i){this.root=t,this.quill=e,this.options=null!=i?i:{},this.root.setAttribute("id",this.options.id),this.doc=new s(this.root,this.options),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.selection=new a(this.doc,this.quill),this.timer=setInterval(l.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,i){var n;return n=this._update(),n&&(e=n.transform(e,!0),n=e.transform(n,!1)),e.ops.length>0&&(e=this._trackDelta(function(t){return function(){var i;return i=0,l.each(e.ops,function(e){return l.isString(e.insert)?(t._insertAt(i,e.insert,e.attributes),i+=e.insert.length):l.isNumber(e.insert)?(t._insertEmbed(i,e.attributes),i+=1):l.isNumber(e["delete"])?t._deleteAt(i,e["delete"]):l.isNumber(e.retain)?(l.each(e.attributes,function(n,s){return t._formatAt(i,e.retain,s,n)}),i+=e.retain):void 0}),t.selection.shiftAfter(0,0,l.bind(t.doc.optimizeLines,t.doc))}}(this)),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.innerHTML=this.root.innerHTML,e&&i!==t.sources.SILENT&&this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,e,i)),n&&n.ops.length>0&&i!==t.sources.SILENT?this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,n,t.sources.USER):void 0},t.prototype.checkUpdate=function(e){var i;return null==e&&(e="user"),null==this.root.parentNode?clearInterval(this.timer):(i=this._update(),i&&(this.delta=this.delta.compose(i),this.length=this.delta.length(),this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,i,e)),i&&(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,i,n,s,r,o,a;return this.checkUpdate(),o=this.doc.findLeafAt(t,!0),n=o[0],s=o[1],null==n?null:(i=this.root.parentNode.getBoundingClientRect(),a="left",0===n.length?e=n.node.parentNode.getBoundingClientRect():u.VOID_TAGS[n.node.tagName]?(e=n.node.getBoundingClientRect(),1===s&&(a="right")):(r=document.createRange(),s=e?void 0:this.selection.shiftAfter(t,-1*e,function(i){return function(){var n,s,r,o,a,l,u;for(u=i.doc.findLineAt(t),r=u[0],l=u[1],n=r,o=r.length-l<=e&&l>0;null!=n&&e>0;)a=n.next,s=Math.min(n.length-l,e),0===l&&e>=n.length?i.doc.removeLine(n):n.deleteText(l,s),e-=s,n=a,l=0;return o&&r.next?i.doc.mergeLines(r,r.next):void 0}}(this))},t.prototype._formatAt=function(t,e,i,n){return this.selection.shiftAfter(t,0,function(s){return function(){var r,o,a,l,u;for(l=s.doc.findLineAt(t),o=l[0],a=l[1],u=[];null!=o&&e>0;)r=Math.min(e,o.length-a-1),o.formatText(a,r,i,n),e-=r,e>0&&o.format(i,n),e-=1,a=0,u.push(o=o.next);return u}}(this))},t.prototype._insertEmbed=function(t,e){return this.selection.shiftAfter(t,1,function(i){return function(){var n,s,r;return r=i.doc.findLineAt(t),n=r[0],s=r[1],n.insertEmbed(s,e)}}(this))},t.prototype._insertAt=function(t,e,i){return null==i&&(i={}),this.selection.shiftAfter(t,e.length,function(n){return function(){var s,r,o,a;return e=e.replace(/\r\n?/g,"\n"),r=e.split("\n"),a=n.doc.findLineAt(t),s=a[0],o=a[1],l.each(r,function(t,e){var a;return null==s||s.length<=o?(e0)&&(s=n.doc.appendLine(document.createElement(u.DEFAULT_BLOCK_TAG)),o=0,s.insertText(o,t,i),s.format(i),a=null):(s.insertText(o,t,i),e0?t:!1)},t}(),e.exports=r},{"../lib/dom":17,"./document":8,"./line":12,"./selection":14,lodash:1,"rich-text/lib/delta":3}],10:[function(t,e,i){var n,s,r;s=t("lodash"),r=t("../lib/dom"),n=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,r.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,i){var n,o,a,l,u;return i?this.value(e)===i?e:(s.isString(this.config.parentTag)&&(a=e.parentNode, a.tagName!==this.config.parentTag&&(a=document.createElement(this.config.parentTag),r(e).wrap(a)),e.parentNode.tagName===(null!=(l=e.parentNode.previousSibling)?l.tagName:void 0)&&r(e.parentNode.previousSibling).merge(e.parentNode),e.parentNode.tagName===(null!=(u=e.parentNode.nextSibling)?u.tagName:void 0)&&r(e.parentNode).merge(e.parentNode.nextSibling)),s.isString(this.config.tag)&&e.tagName!==this.config.tag&&(n=document.createElement(this.config.tag),null!=r.VOID_TAGS[n.tagName]?(null!=e.parentNode&&r(e).replace(n),e=n):this.isType(t.types.LINE)?e=r(e).switchTag(this.config.tag).get():(r(e).wrap(n),e=n)),(s.isString(this.config.style)||s.isString(this.config.attribute)||s.isString(this.config["class"]))&&(s.isString(this.config["class"])&&(e=this.remove(e)),r(e).isTextNode()&&(o=document.createElement(r.DEFAULT_INLINE_TAG),r(e).wrap(o),e=o),s.isString(this.config.style)&&i!==this.config["default"]&&(e.style[this.config.style]=i),s.isString(this.config.attribute)&&e.setAttribute(this.config.attribute,i),s.isString(this.config["class"])&&r(e).addClass(this.config["class"]+i)),s.isFunction(this.config.add)&&(e=this.config.add(e,i)),e):this.remove(e)},t.prototype.isType=function(t){return t===this.config.type},t.prototype.match=function(t){var e,i,n,o,a;if(!r(t).isElement())return!1;if(s.isString(this.config.parentTag)&&(null!=(o=t.parentNode)?o.tagName:void 0)!==this.config.parentTag)return!1;if(s.isString(this.config.tag)&&t.tagName!==this.config.tag)return!1;if(s.isString(this.config.style)&&(!t.style[this.config.style]||t.style[this.config.style]===this.config["default"]))return!1;if(s.isString(this.config.attribute)&&!t.hasAttribute(this.config.attribute))return!1;if(s.isString(this.config["class"])){for(a=r(t).classes(),i=0,n=a.length;n>i;i++)if(e=a[i],0===e.indexOf(this.config["class"]))return!0;return!1}return!0},t.prototype.prepare=function(t){return s.isString(this.config.prepare)?document.execCommand(this.config.prepare,!1,t):s.isFunction(this.config.prepare)?this.config.prepare(t):void 0},t.prototype.remove=function(e){var i,n,o,a;if(!this.match(e))return e;if(s.isString(this.config.style)&&(e.style[this.config.style]="",e.getAttribute("style")||e.removeAttribute("style")),s.isString(this.config.attribute)&&e.removeAttribute(this.config.attribute),s.isString(this.config["class"]))for(a=r(e).classes(),n=0,o=a.length;o>n;n++)i=a[n],0===i.indexOf(this.config["class"])&&r(e).removeClass(i);if(s.isString(this.config.tag))if(this.isType(t.types.LINE))s.isString(this.config.parentTag)&&(null!=e.previousSibling&&r(e).splitBefore(e.parentNode.parentNode),null!=e.nextSibling&&r(e.nextSibling).splitBefore(e.parentNode.parentNode)),e=r(e).switchTag(r.DEFAULT_BLOCK_TAG).get();else{if(this.isType(t.types.EMBED))return void r(e).remove();e=r(e).switchTag(r.DEFAULT_INLINE_TAG).get()}return s.isString(this.config.parentTag)&&r(e.parentNode).unwrap(),s.isFunction(this.config.remove)&&(e=this.config.remove(e)),e.tagName!==r.DEFAULT_INLINE_TAG||e.hasAttributes()||(e=r(e).unwrap()),e},t.prototype.value=function(t){var e,i,n,o;if(!this.match(t))return void 0;if(this.config.value)return this.config.value(t);if(s.isString(this.config.attribute))return t.getAttribute(this.config.attribute)||void 0;if(s.isString(this.config.style))return t.style[this.config.style]||void 0;if(s.isString(this.config["class"])){for(o=r(t).classes(),i=0,n=o.length;n>i;i++)if(e=o[i],0===e.indexOf(this.config["class"]))return e.slice(this.config["class"].length)}else if(s.isString(this.config.tag))return!0;return void 0},t}(),e.exports=n},{"../lib/dom":17,lodash:1}],11:[function(t,e,i){var n,s,r,o,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;o=t("lodash"),a=t("../lib/dom"),n=t("./format"),r=t("../lib/linked-list"),s=function(t){function e(t,i){this.node=t,this.formats=o.clone(i),this.text=a(this.node).text(),this.length=this.text.length,a(this.node).data(e.DATA_KEY,this)}return l(e,t),e.DATA_KEY="leaf",e.isLeafNode=function(t){return a(t).isTextNode()||null==t.firstChild},e.prototype.deleteText=function(t,i){var n;if(i>0)return this.text=this.text.slice(0,t)+this.text.slice(t+i),this.length=this.text.length,null!=a.EMBED_TAGS[this.node.tagName]?(n=document.createTextNode(this.text),a(n).data(e.DATA_KEY,this),this.node=a(this.node).replace(n).get()):a(this.node).text(this.text)},e.prototype.insertText=function(t,i){var n;return this.text=this.text.slice(0,t)+i+this.text.slice(t),a(this.node).isTextNode()?a(this.node).text(this.text):(n=document.createTextNode(i),a(n).data(e.DATA_KEY,this),this.node.tagName===a.DEFAULT_BREAK_TAG?this.node=a(this.node).replace(n).get():(this.node.appendChild(n),this.node=n)),this.length=this.text.length},e}(r.Node),e.exports=s},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,lodash:1}],12:[function(t,e,i){var n,s,r,o,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;u=t("lodash"),n=t("rich-text/lib/delta"),c=t("../lib/dom"),s=t("./format"),r=t("./leaf"),o=t("./line"),a=t("../lib/linked-list"),l=t("./normalizer"),o=function(t){function e(t,i){this.doc=t,this.node=i,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 u.each(c(t).childNodes(),function(t){return function(i){var n;return i=t.doc.normalizer.normalizeNode(i),n=u.clone(e),u.each(t.doc.formats,function(t,e){return!t.isType(s.types.LINE)&&t.match(i)?n[e]=t.value(i):void 0}),r.isLeafNode(i)?t.leaves.append(new r(i,n)):t.buildLeaves(i,n)}}(this))},e.prototype.deleteText=function(t,e){var i,n,s;if(e>0){for(s=this.findLeafAt(t),n=s[0],t=s[1];null!=n&&e>0;)i=Math.min(e,n.length-t),n.deleteText(t,i),e-=i,n=n.next,t=0;return this.rebuild()}},e.prototype.findLeaf=function(t){return null!=t?c(t).data(r.DATA_KEY):void 0},e.prototype.findLeafAt=function(t,e){var i;if(null==e&&(e=!1),t>=this.length-1)return[this.leaves.last,this.leaves.last.length];for(i=this.leaves.first;null!=i;){if(t0;){if(u=o.next,n&&o.formats[i]!==n||!n&&null!=o.formats[i]){if(g=o.node,null!=o.formats[i]){for(c(g).splitBefore(this.node);!r.match(g);)g=g.parentNode;c(g).split(o.length)}a>0&&(d=c(g).split(a),l=d[0],g=d[1]),o.length>a+e&&(p=c(g).split(e),g=p[0],f=p[1]),r.add(g,n)}e-=o.length-a,a=0,o=u}return this.rebuild()}},e.prototype._insert=function(t,e,i){var n,r,o,a,l,h;return l=this.findLeafAt(t),n=l[0],r=l[1],e=u.reduce(i,function(t){return function(e,i,n){var r;return r=t.doc.formats[n],null==r||r.isType(s.types.LINE)||(e=r.add(e,i)),e}}(this),e),h=c(n.node).split(r),a=h[0],o=h[1],o&&(o=c(o).splitBefore(this.node).get()),this.node.insertBefore(e,o),this.rebuild()},e.prototype.insertEmbed=function(t,e){var i,n,r,o,a,l,h,d;return h=this.findLeafAt(t),n=h[0],r=h[1],d=c(n.node).split(r),l=d[0],o=d[1],i=u.find(Object.keys(e),function(t){return function(e){return t.doc.formats[e].isType(s.types.EMBED)}}(this)),a=this.doc.formats[i].add({},e[i]),e=u.clone(e),delete e[i],this._insert(t,a,e)},e.prototype.insertText=function(t,e,i){var n,s,r;return null==i&&(i={}),e.length>0?(r=this.findLeafAt(t),n=r[0],s=r[1],u.isEqual(n.formats,i)?(n.insertText(s,e),this.resetContent()):this._insert(t,document.createTextNode(e),i)):void 0},e.prototype.optimize=function(){return l.optimizeLine(this.node),this.rebuild()},e.prototype.rebuild=function(t){return null==t&&(t=!1),!t&&null!=this.outerHTML&&this.outerHTML===this.node.outerHTML&&u.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 a,this.formats=u.reduce(this.doc.formats,function(t){return function(e,i,n){return i.isType(s.types.LINE)&&(i.match(t.node)?e[n]=i.value(t.node):delete e[n]),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 n,u.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}(a.Node),e.exports=o},{"../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,i){var n,s,r,o;s=t("lodash"),o=t("../lib/dom"),r=function(t){return t=t.replace(/(?:^|[-_])(\w)/g,function(t,e){return e?e.toUpperCase():""}),t.charAt(0).toLowerCase()+t.slice(1)},n=function(){function t(){this.whitelist={styles:{},tags:{}},this.whitelist.tags[o.DEFAULT_BREAK_TAG]=!0,this.whitelist.tags[o.DEFAULT_BLOCK_TAG]=!0,this.whitelist.tags[o.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!=o.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalizeNode=function(e){return o(e).isTextNode()?e:(s.each(t.ATTRIBUTES,function(t,i){var n;return e.hasAttribute(i)?(n=e.getAttribute(i),"size"===i&&(n=o.convertFontSize(n)),e.style[t]=n,e.removeAttribute(i)):void 0}),("bold"===e.style.fontWeight||e.style.fontWeight>500)&&(e.style.fontWeight="",o(e).wrap(document.createElement("b")),e=e.parentNode),this.whitelistStyles(e),this.whitelistTags(e))},t.prototype.whitelistStyles=function(t){var e,i;return e=o(t).styles(),i=s.omit(e,function(t){return function(e,i){return null==t.whitelist.styles[r(i)]}}(this)),Object.keys(i).length0?o(t).styles(i,!0):t.removeAttribute("style"):void 0},t.prototype.whitelistTags=function(e){return o(e).isElement()?(null!=t.ALIASES[e.tagName]?e=o(e).switchTag(t.ALIASES[e.tagName]).get():null==this.whitelist.tags[e.tagName]&&(e=null!=o.BLOCK_TAGS[e.tagName]?o(e).switchTag(o.DEFAULT_BLOCK_TAG).get():e.hasAttributes()||null==e.firstChild?o(e).switchTag(o.DEFAULT_INLINE_TAG).get():o(e).unwrap()),e):e},t.flattenList=function(t){var e,i,n;return n=t.nextSibling,e=s.map(t.querySelectorAll("li")),e.forEach(function(e){return t.parentNode.insertBefore(e,n),n=e.nextSibling}),i=s.map(t.querySelectorAll(Object.keys(o.LIST_TAGS).join(","))),i.forEach(function(t){return o(t).remove()})},t.handleBreaks=function(t){var e;return e=s.map(t.querySelectorAll(o.DEFAULT_BREAK_TAG)),s.each(e,function(e){return function(e){return null==e.nextSibling||o.isIE(10)&&null==e.previousSibling?void 0:o(e.nextSibling).splitBefore(t.parentNode)}}(this)),t},t.optimizeLine=function(t){var e,i,n,r;for(t.normalize(),e=o(t).length(),n=o(t).descendants(),r=[];n.length>0;)i=n.pop(),null!=(null!=i?i.parentNode:void 0)&&null==o.EMBED_TAGS[i.tagName]&&(i.tagName===o.DEFAULT_BREAK_TAG?r.push(0!==e?o(i).remove():void 0):0===o(i).length()?(n.push(i.nextSibling),r.push(o(i).unwrap())):null!=i.previousSibling&&i.tagName===i.previousSibling.tagName&&s.isEqual(o(i).attributes(),o(i.previousSibling).attributes())?(n.push(i.firstChild),r.push(o(i.previousSibling).merge(i))):r.push(void 0));return r},t.pullBlocks=function(e){var i;for(i=e.firstChild;null!=i;){if(null!=o.BLOCK_TAGS[i.tagName]&&"LI"!==i.tagName){o(i).isolate(e.parentNode),null!=o.LIST_TAGS[i.tagName]&&i.firstChild?(o(i.parentNode).unwrap(),null==e.parentNode&&(e=i)):(o(i).unwrap(),t.pullBlocks(e));break}i=i.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,i;if(null!=o.BLOCK_TAGS[t.tagName])return t;for(e=document.createElement(o.DEFAULT_BLOCK_TAG),t.parentNode.insertBefore(e,t);null!=t&&null==o.BLOCK_TAGS[t.tagName];)i=t.nextSibling,e.appendChild(t),t=i;return e},t.unwrapText=function(t){var e;return e=s.map(t.querySelectorAll(o.DEFAULT_INLINE_TAG)),s.each(e,function(t){return t.hasAttributes()?void 0:o(t).unwrap()})},t}(),e.exports=n},{"../lib/dom":17,lodash:1}],14:[function(t,e,i){var n,s,r,o,a,l;a=t("lodash"),l=t("../lib/dom"),n=t("./leaf"),s=t("./normalizer"),r=t("../lib/range"),o=function(){function t(t,e){this.doc=t,this.emitter=e,this.focus=!1,this.range=new r(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,i,n;return null==t&&(t=!1),this.checkFocus()?(i=this._getNativeRange(),null==i?null:(n=this._positionToIndex(i.startContainer,i.startOffset),e=i.startContainer===i.endContainer&&i.startOffset===i.endOffset?n:this._positionToIndex(i.endContainer,i.endOffset),new r(Math.min(n,e),Math.max(n,e)))):t?this.range:null},t.prototype.preserve=function(t){var e,i,n,s,r,o,a,l,u;return n=this._getNativeRange(),null!=n&&this.checkFocus()?(s=this._encodePosition(n.startContainer,n.startOffset),l=s[0],u=s[1],r=this._encodePosition(n.endContainer,n.endOffset),e=r[0],i=r[1],t(),o=this._decodePosition(l,u),l=o[0],u=o[1],a=this._decodePosition(e,i),e=a[0],i=a[1],this._setNativeRange(l,u,e,i)):t()},t.prototype.scrollIntoView=function(){var t,e,i,n,s,r,o,a,l;if(this.range)return i=this.emitter.editor,l=i.getBounds(this.range.start),n=this.range.isCollapsed()?l:i.getBounds(this.range.end),t=i.root.parentNode.getBoundingClientRect(),e=t.bottom-t.top,e0&&(t=e.getRangeAt(0),l(t.startContainer).isAncestor(this.doc.root,!0)&&(t.startContainer===t.endContainer||l(t.endContainer).isAncestor(this.doc.root,!0)))?t:null},t.prototype._indexToPosition=function(t){var e,i,n;return 0===this.doc.lines.length?[this.doc.root,0]:(n=this.doc.findLeafAt(t,!0),e=n[0],i=n[1],this._decodePosition(e.node,i))},t.prototype._positionToIndex=function(t,e){var i,n,s,r,o,a;if(l.isIE(10)&&"BR"===t.tagName&&1===e&&(e=0),a=this._encodePosition(t,e),n=a[0],e=a[1],r=this.doc.findLine(n),null==r)return 0;for(i=r.findLeaf(n),o=0;null!=r.prev;)r=r.prev,o+=r.length;if(null==i)return o;for(s=0;null!=i.prev;)i=i.prev,s+=i.length;return o+s+e},t.prototype._setNativeRange=function(t,e,i,n){var s,r;if(r=document.getSelection())if(null!=t){if(this.checkFocus()||this.doc.root.focus(),s=this._getNativeRange(),null==s||t!==s.startContainer||e!==s.startOffset||i!==s.endContainer||n!==s.endOffset)return r.removeAllRanges(),s=document.createRange(),s.setStart(t,e),s.setEnd(i,n),r.addRange(s)}else if(r.removeAllRanges(),this.doc.root.blur(),l.isIE(11)&&!l.isIE(9))return document.body.focus()},t}(),e.exports=o},{"../lib/dom":17,"../lib/range":20,"./leaf":11,"./normalizer":13,lodash:1}],15:[function(t,e,i){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,i){var n,s,r,o=function(t,e){function i(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},a={}.hasOwnProperty;r=t("./dom"),s=t("./picker"),n=function(t){function e(){e.__super__.constructor.apply(this,arguments),r(this.container).addClass("ql-color-picker")}return o(e,t),e.prototype.buildItem=function(t,i,n){var s;return s=e.__super__.buildItem.call(this,t,i,n),s.style.backgroundColor=i.value,s},e}(s),e.exports=n},{"./dom":17,"./picker":19}],17:[function(t,e,i){var n,s,r,o,a,l=function(t,e){return function(){return t.apply(e,arguments)}},u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;r=t("lodash"),a=null,s=function(){function t(t){this.node=t,this.trigger=l(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,i,n,s,o,a;if(t)return r.each(t,function(t){return function(e,i){return t.node.setAttribute(i,e)}}(this)),this;if(null==this.node.attributes)return{};for(t={},o=this.node.attributes,i=n=0,s=o.length;s>n;i=++n)a=o[i],e=this.node.attributes[i],t[e.name]=e.value;return t},t.prototype.child=function(t){var e,i;for(e=this.node.firstChild,i=o(e).length();null!=e&&!(i>t);)t-=i,e=e.nextSibling,i=o(e).length();return null==e&&(e=this.node.lastChild,t=o(e).length()),[e,t]},t.prototype.childNodes=function(){return r.map(this.node.childNodes)},t.prototype.classes=function(){return this.node.className.split(/\s+/)},t.prototype.data=function(t,e){var i;return null!=e?(null==this.node["ql-data"]&&(this.node["ql-data"]={}),this.node["ql-data"][t]=e,this):null!=(i=this.node["ql-data"])?i[t]:void 0},t.prototype.descendants=function(){return r.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 i;if(null==e&&(e=!1),t===this.node)return e;for(i=this.node;i;){if(i===t)return!0;i=i.parentNode}return!1},t.prototype.isElement=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===o.ELEMENT_NODE},t.prototype.isTextNode=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===o.TEXT_NODE},t.prototype.isolate=function(t){return null!=this.node.nextSibling&&o(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(o.EMBED_TAGS).join(",")).length),t)},t.prototype.merge=function(t){var e;return e=o(t),this.isElement()?(e.moveChildren(this.node),this.normalize()):this.text(this.text()+e.text()),e.remove(),this},t.prototype.moveChildren=function(t){return r.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!=o.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalize=function(){var t,e,i,n;for(e=this.node.firstChild;null!=e;)n=e.nextSibling,t=o(e),null!=n&&o(n).isTextNode()&&(0===t.text().length?t.remove():t.isTextNode()&&(i=n.nextSibling,t.merge(n),n=i)),e=n;return this},t.prototype.on=function(t,e){return this.node.addEventListener(t,function(i){return function(n){var s,r;return s=!a||"keydown"!==t&&"keyup"!==t?n:a,r=e.call(i.node,s),r||(n.preventDefault(),n.stopPropagation()),r}}(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 i,n,s,r;if(null==e&&(e=!1),this.node===t||this.node.parentNode===t)return this;if(null!=this.node.previousSibling||e){for(s=this.node.parentNode,n=s.cloneNode(!1),s.parentNode.insertBefore(n,s.nextSibling),r=this.node;null!=r;)i=r.nextSibling,n.appendChild(r),r=i;return o(n).splitBefore(t)}return o(this.node.parentNode).splitBefore(t)},t.prototype.split=function(t,e){var i,n,s,r,a,l,u,c,h,d;if(null==e&&(e=!1),u=this.length(),t=Math.max(0,t),t=Math.min(t,u),!e&&0===t)return[this.node.previousSibling,this.node,!1];if(!e&&t===u)return[this.node,this.node.nextSibling,!1];if(this.node.nodeType===o.TEXT_NODE)return i=this.node.splitText(t),[this.node,i,!0];for(a=this.node,d=this.node.cloneNode(!1),this.node.parentNode.insertBefore(d,a.nextSibling),c=this.child(t),n=c[0],t=c[1],h=o(n).split(t),s=h[0],r=h[1];null!==r;)l=r.nextSibling,d.appendChild(r),r=l;return[a,d,!0]},t.prototype.styles=function(t,e){var i,n;return null==e&&(e=!1),t?(e||(t=r.defaults(t,this.styles())),n=r.map(t,function(t,e){return e+": "+t}).join("; ")+";",this.node.setAttribute("style",n),this):(n=this.node.getAttribute("style")||"",i=r.reduce(n.split(";"),function(t,e){var i,n,s;return n=e.split(":"),i=n[0],s=n[1],i&&s&&(i=i.trim(),s=s.trim(),t[i.toLowerCase()]=s),t},{}))},t.prototype.switchTag=function(t){var e,i;return t=t.toUpperCase(),this.node.tagName===t?this:(i=document.createElement(t),e=this.attributes(),null==o.VOID_TAGS[t]&&this.moveChildren(i),this.replace(i),this.node=i,this.attributes(e))},t.prototype.text=function(t){if(null!=t){switch(this.node.nodeType){case o.ELEMENT_NODE:this.node.textContent=t;break;case o.TEXT_NODE:this.node.data=t}return this}switch(this.node.nodeType){case o.ELEMENT_NODE:return this.node.tagName===o.DEFAULT_BREAK_TAG?"":null!=o.EMBED_TAGS[this.node.tagName]?o.EMBED_TEXT:null!=this.node.textContent?this.node.textContent:"";case o.TEXT_NODE:return this.node.data||"";default:return""}},t.prototype.textNodes=function(){var t,e,i;for(i=document.createTreeWalker(this.node,NodeFilter.SHOW_TEXT,null,!1),e=[];t=i.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 i,n,s;return null==e&&(e={}),["keypress","keydown","keyup"].indexOf(t)<0?(i=document.createEvent("Event"),i.initEvent(t,e.bubbles,e.cancelable)):(i=document.createEvent("KeyboardEvent"),a=r.clone(e),a.which=r.isNumber(e.key)?e.key:r.isString(e.key)?e.key.toUpperCase().charCodeAt(0):0,o.isIE(10)?(s=[],e.altKey&&s.push("Alt"),e.ctrlKey&&s.push("Control"),e.metaKey&&s.push("Meta"),e.shiftKey&&s.push("Shift"),i.initKeyboardEvent(t,e.bubbles,e.cancelable,window,0,0,s.join(" "),null,null)):(n=r.isFunction(i.initKeyboardEvent)?"initKeyboardEvent":"initKeyEvent",i[n](t,e.bubbles,e.cancelable,window,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,0))),this.node.dispatchEvent(i),a=null,this},t.prototype.unwrap=function(){var t,e;return e=this.node.firstChild,t=this.node.nextSibling,r.each(this.childNodes(),function(e){return function(i){return e.node.parentNode.insertBefore(i,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}(),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype["default"]=function(){return this.node.querySelector("option[selected]")},e.prototype.option=function(t,e){var i,n,s,o,a,l;if(null==e&&(e=!0),l=r.isElement(t)?t.value:t){for(l=l.replace(/[^\w]+/g,""),a=this.node.children,n=s=0,o=a.length;o>s;n=++s)if(i=a[n],i.value.replace(/[^\w]+/g,"")===l){this.node.selectedIndex=n;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}(s),o=function(t){return"SELECT"===(null!=t?t.tagName:void 0)?new n(t):new s(t)},o=r.extend(o,{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,i,n,s;r.isString(t)&&t.indexOf("px")>-1?(n=Object.keys(o.FONT_SIZES),s=r.values(o.FONT_SIZES)):(s=Object.keys(o.FONT_SIZES),n=r.values(o.FONT_SIZES));for(e in n)if(i=n[e],parseInt(t)<=parseInt(i))return s[e];return r.last(s)},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=o},{lodash:1}],18:[function(t,e,i){var n,s;s=function(){function t(t){this.data=t,this.prev=this.next=null}return t}(),n=function(){function t(){this.length=0,this.first=this.last=null}return t.Node=s,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=n},{}],19:[function(t,e,i){var n,s,r;s=t("lodash"),r=t("./dom"),n=function(){function t(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),r(this.container).addClass("ql-picker"),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),r(document).on("click",function(t){return function(){return t.close(),!0}}(this)),r(this.label).on("click",function(t){return function(){return s.defer(function(){return r(t.container).toggleClass("ql-expanded")}),!1}}(this)),r(this.select).on("change",function(t){return function(){var e,i;return t.select.selectedIndex>-1&&(e=t.container.querySelectorAll(".ql-picker-item")[t.select.selectedIndex],i=t.select.options[t.select.selectedIndex]),t.selectItem(e,!1),r(t.label).toggleClass("ql-active",i!==r(t.select)["default"]())}}(this))}return t.TEMPLATE='',t.prototype.buildItem=function(t,e,i){var n;return n=document.createElement("span"),n.setAttribute("data-value",e.getAttribute("value")),r(n).addClass("ql-picker-item").text(r(e).text()).on("click",function(t){return function(){return t.selectItem(n,!0),t.close()}}(this)),this.select.selectedIndex===i&&this.selectItem(n,!1),n},t.prototype.buildPicker=function(){var e;return s.each(r(this.select).attributes(),function(t){return function(e,i){return t.container.setAttribute(i,e)}}(this)),this.container.innerHTML=t.TEMPLATE,this.label=this.container.querySelector(".ql-picker-label"),e=this.container.querySelector(".ql-picker-options"),s.each(this.select.options,function(t){return function(i,n){var s;return s=t.buildItem(e,i,n),e.appendChild(s)}}(this))},t.prototype.close=function(){return r(this.container).removeClass("ql-expanded")},t.prototype.selectItem=function(t,e){var i,n;return i=this.container.querySelector(".ql-selected"),null!=i&&r(i).removeClass("ql-selected"),null!=t?(n=t.getAttribute("data-value"),r(t).addClass("ql-selected"),r(this.label).text(r(t).text()),r(this.select).option(n,e),this.label.setAttribute("data-value",n)):(this.label.innerHTML=" ",this.label.removeAttribute("data-value"))},t}(),e.exports=n},{"./dom":17,lodash:1}],20:[function(t,e,i){var n,s;s=t("lodash"),n=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 i;return i=s.map([this.start,this.end],function(i){return t>i?i:e>=0?i+e:Math.max(t,i+e)}),this.start=i[0],this.end=i[1],i},t.prototype.isCollapsed=function(){ return this.start===this.end},t}(),e.exports=n},{lodash:1}],21:[function(t,e,i){var n,s,r,o,a;r=t("../quill"),o=r.require("lodash"),a=r.require("dom"),s=r.require("delta"),n=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,i,n){var a,l;return e===t.quill.constructor.events.TEXT_CHANGE&&"user"===n?(a=new s,l={author:t.options.authorId},o.each(i.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,a.retain(e.retain||e.insert.length||1,l)):a.retain(e.retain):void 0}),t.quill.updateContents(a,r.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 i;return i={},i[".authorship .author-"+t]={"background-color":""+e},this.quill.theme.addStyles(i)},t.prototype.attachButton=function(t){var e;return e=a(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),a(this.quill.root).toggleClass("authorship",t)},t.prototype.disable=function(){return this.enable(!1)},t}(),r.registerModule("authorship",n),e.exports=n},{"../quill":30}],22:[function(t,e,i){var n,s,r,o,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;r=t("../quill"),a=t("./tooltip"),l=r.require("lodash"),u=r.require("dom"),n=r.require("delta"),o=r.require("range"),s=function(t){function e(t,i){this.quill=t,this.options=i,this.options=l.defaults(this.options,a.DEFAULTS),e.__super__.constructor.call(this,this.quill,this.options),this.preview=this.container.querySelector(".preview"),this.textbox=this.container.querySelector(".input"),u(this.container).addClass("ql-image-tooltip"),this.initListeners()}return c(e,t),e.DEFAULTS={template:'
Preview
Cancel Insert'},e.prototype.initListeners=function(){return u(this.quill.root).on("focus",l.bind(this.hide,this)),u(this.container.querySelector(".insert")).on("click",l.bind(this.insertImage,this)),u(this.container.querySelector(".cancel")).on("click",l.bind(this.hide,this)),u(this.textbox).on("input",l.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",l.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 o(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(),l.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}(a),r.registerModule("image-tooltip",s),e.exports=s},{"../quill":30,"./tooltip":28}],23:[function(t,e,i){var n,s,r,o,a;r=t("../quill"),o=r.require("lodash"),a=r.require("dom"),n=r.require("delta"),s=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:a.KEYS.TAB},ITALIC:{key:"I",metaKey:!0},OUTDENT:{key:a.KEYS.TAB,shiftKey:!0},UNDERLINE:{key:"U",metaKey:!0}},t.prototype.addHotkey=function(t,e){return Array.isArray(t)||(t=[t]),o.each(t,function(t){return function(i){var n,s;return i=o.isObject(i)?o.clone(i):{key:i},i.callback=e,s=o.isNumber(i.key)?i.key:i.key.toUpperCase().charCodeAt(0),null==(n=t.hotkeys)[s]&&(n[s]=[]),t.hotkeys[s].push(i)}}(this))},t.prototype.removeHotkeys=function(e,i){var n,s,r,a,l;return e=o.isString(e)?e.toUpperCase():e,e=t.hotkeys[e]?t.hotkeys[e]:e,e=o.isObject(e)?e:{key:e},l=o.isNumber(e.key)?e.key:e.key.charCodeAt(0),null==(n=this.hotkeys)[l]&&(n[l]=[]),r=o.partition(this.hotkeys[l],function(t){return o.isEqual(e,o.omit(t,"callback"))&&(!i||i===t.callback)}),a=r[0],s=r[1],this.hotkeys[l]=s,o.map(a,"callback")},t.prototype.toggleFormat=function(t,e){var i,n;return i=t.isCollapsed()?this.quill.getContents(Math.max(0,t.start-1),t.end):this.quill.getContents(t),n=0===i.ops.length||!o.all(i.ops,function(t){var i;return null!=(i=t.attributes)?i[e]:void 0}),t.isCollapsed()?this.quill.prepareFormat(e,n,r.sources.USER):this.quill.formatText(t,e,n,r.sources.USER),null!=this.toolbar?this.toolbar.setActive(e,n):void 0},t.prototype._initEnter=function(){var t;return t=[{key:a.KEYS.ENTER},{key:a.KEYS.ENTER,shiftKey:!0}],this.addHotkey(t,function(t){return function(e,i){var s,a,l,u,c,h;return null==e?!0:(c=t.quill.editor.doc.findLineAt(e.start),l=c[0],u=c[1],h=l.findLeafAt(u),a=h[0],u=h[1],s=(new n).retain(e.start).insert("\n",l.formats)["delete"](e.end-e.start),t.quill.updateContents(s,r.sources.USER),o.each(a.formats,function(e,i){t.quill.prepareFormat(i,e),null!=t.toolbar&&t.toolbar.setActive(i,e)}),t.quill.editor.selection.scrollIntoView(),!1)}}(this))},t.prototype._initDeletes=function(){return this.addHotkey([a.KEYS.DELETE,a.KEYS.BACKSPACE],function(t){return function(e,i){var n,s,o,l;return null!=e&&t.quill.getLength()>0&&(e.start!==e.end?t.quill.deleteText(e.start,e.end,r.sources.USER):i.key===a.KEYS.BACKSPACE?(l=t.quill.editor.doc.findLineAt(e.start),s=l[0],o=l[1],0===o&&(s.formats.bullet||s.formats.list)?(n=s.formats.bullet?"bullet":"list",t.quill.formatLine(e.start,e.start,n,!1,r.sources.USER)):e.start>0&&t.quill.deleteText(e.start-1,e.start,r.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 i;if(null!=e&&e.isCollapsed())return i=t._findAnchor(e),i?(t.setMode(i.href,!1),t.show(i)):t.container.style.left!==r.HIDE_MARGIN?(t.range=null,t.hide()):void 0}}(this)),a(this.container.querySelector(".done")).on("click",o.bind(this.saveLink,this)),a(this.container.querySelector(".remove")).on("click",function(t){return function(){return t.removeLink(t.range)}}(this)),a(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",o.bind(t._onToolbar,t))}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(i){return i.addHotkey(e.hotkeys.LINK,o.bind(t._onKeyboard,t))}}(this))},e.prototype.saveLink=function(){var t,e,i;return i=this._normalizeURL(this.textbox.value),null!=this.range&&(e=this.range.end,this.range.isCollapsed()?(t=this._findAnchor(this.range),null!=t&&(t.href=i)):this.quill.formatText(this.range,"link",i,"user"),this.quill.setSelection(e,e)),this.setMode(i,!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 i;return null==e&&(e=!1),e?(this.textbox.value=t,o.defer(function(e){return function(){return e.textbox.focus(),e.textbox.setSelectionRange(0,t.length)}}(this))):(this.link.href=t,t=this.link.href,i=t.length>this.options.maxLength?t.slice(0,this.options.maxLength)+"...":t,a(this.link).text(i)),a(this.container).toggleClass("editing",e)},e.prototype._findAnchor=function(t){var e,i,n,s;for(s=this.quill.editor.doc.findLeafAt(t.start,!0),e=s[0],n=s[1],null!=e&&(i=e.node);null!=i&&i!==this.quill.root;){if("A"===i.tagName)return i;i=i.parentNode}return null},e.prototype._expandRange=function(t){var e,i,n,s,r;return s=this.quill.editor.doc.findLeafAt(t.start,!0),i=s[0],n=s[1],r=t.start-n,e=r+i.length,{start:r,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 i;if(t)return e?t.isCollapsed()?void 0:(this.setMode(this._suggestURL(t),!0),i=this.quill.editor.selection._getNativeRange(),this.show(i)):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}(r),s.registerModule("link-tooltip",n),e.exports=n},{"../quill":30,"./tooltip":28}],25:[function(t,e,i){var n,s,r,o,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=t("../quill"),n=t("eventemitter2").EventEmitter2,o=r.require("lodash"),a=r.require("dom"),s=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,o.bind(this._applyDelta,this))}return l(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 o.each(Object.keys(this.cursors),o.bind(this.removeCursor,this)),this.cursors={}},e.prototype.moveCursor=function(t,e){var i;return i=this.cursors[t],null!=i?(i.index=e,a(i.elem).removeClass("hidden"),clearTimeout(i.timer),i.timer=setTimeout(function(t){return function(){return a(i.elem).addClass("hidden"),i.timer=null}}(this),this.options.timeout),this._updateCursor(i),i):void 0},e.prototype.removeCursor=function(t){var i;return i=this.cursors[t],this.emit(e.events.CURSOR_REMOVED,i),null!=i&&i.elem.parentNode.removeChild(i.elem),delete this.cursors[t]},e.prototype.setCursor=function(t,i,n,s){var r;return null==this.cursors[t]&&(this.cursors[t]=r={userId:t,index:i,color:s,elem:this._buildCursor(n,s)},this.emit(e.events.CURSOR_ADDED,r)),o.defer(function(e){return function(){return e.moveCursor(t,i)}}(this)),this.cursors[t]},e.prototype.shiftCursors=function(t,e,i){return null==i&&(i=null),o.each(this.cursors,function(n){return function(s,r){var o;if(s)return o=Math.max(e,t-s.index),s.userId===i?n.moveCursor(i,s.index+o):s.index>t?s.index+=o:void 0}}(this))},e.prototype.update=function(){return o.each(this.cursors,function(t){return function(e,i){return null!=e?(t._updateCursor(e),!0):void 0}}(this))},e.prototype._applyDelta=function(t){var e;return e=0,o.each(t.ops,function(t){return function(i){var n,s;return n=0,null!=i.insert?(n=i.insert.length||1,t.shiftCursors(e,n,null!=(s=i.attributes)?s.author:void 0)):null!=i["delete"]?t.shiftCursors(e,-1*i["delete"],null):null!=i.retain&&(t.shiftCursors(e,0,null),n=i.retain),e+=n}}(this)),this.update()},e.prototype._buildCursor=function(t,e){var i,n,s,r;return i=document.createElement("span"),a(i).addClass("cursor"),i.innerHTML=this.options.template,s=i.querySelector(".cursor-flag"),r=i.querySelector(".cursor-name"),a(r).text(t),n=i.querySelector(".cursor-caret"),n.style.backgroundColor=r.style.backgroundColor=e,this.container.appendChild(i),i},e.prototype._updateCursor=function(t){var i,n;return i=this.quill.getBounds(t.index),null==i?this.removeCursor(t.userId):(t.elem.style.top=i.top+this.quill.container.scrollTop+"px",t.elem.style.left=i.left+"px",t.elem.style.height=i.height+"px",n=t.elem.querySelector(".cursor-flag"),a(t.elem).toggleClass("top",parseInt(t.elem.style.top)<=n.offsetHeight).toggleClass("left",parseInt(t.elem.style.left)<=n.offsetWidth).toggleClass("right",this.quill.root.offsetWidth-parseInt(t.elem.style.left)<=n.offsetWidth),this.emit(e.events.CURSOR_MOVED,t))},e}(n),r.registerModule("multi-cursor",s),e.exports=s},{"../quill":30,eventemitter2:2}],26:[function(t,e,i){var n,s,r,o,a,l,u=function(t,e){return function(){return t.apply(e,arguments)}};o=t("../quill"),s=t("../core/document"),a=o.require("lodash"),l=o.require("dom"),n=o.require("delta"),r=function(){function t(e,i){var n;this.quill=e,this._onConvert=u(this._onConvert,this),this.container=this.quill.addContainer("ql-paste-manager"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex","-1"),l(this.quill.root).on("paste",a.bind(this._paste,this)),this.options=a.defaults(i,t.DEFAULTS),null==(n=this.options).onConvert&&(n.onConvert=this._onConvert)}return t.DEFAULTS={onConvert:null},t.prototype._onConvert=function(t){var e,i,r;return i=new s(t,this.quill.options),e=i.toDelta(),r=e.length(),0===r?e:e.compose((new n).retain(r-1)["delete"](1))},t.prototype._paste=function(){var t,e;return t=this.quill.getLength(),e=this.quill.getSelection(),null!=e?(this.container.focus(),a.defer(function(t){return function(){var i,n;return i=t.options.onConvert(t.container),n=i.length(),n>0&&(e.start>0&&i.ops.unshift({retain:e.start}),i["delete"](e.end-e.start),t.quill.updateContents(i,"user")),t.quill.setSelection(e.start+n,e.start+n),t.quill.editor.selection.scrollIntoView(),t.container.innerHTML=""}}(this))):void 0},t}(),o.registerModule("paste-manager",r),e.exports=r},{"../core/document":8,"../quill":30}],27:[function(t,e,i){var n,s,r,o;n=t("../quill"),r=n.require("lodash"),o=n.require("dom"),s=function(){function t(e,i){if(this.quill=e,this.options=i,(r.isString(this.options)||r.isElement(this.options))&&(this.options={container:this.options}),null==this.options.container)throw new Error("container required for toolbar",this.options);this.container=r.isString(this.options.container)?document.querySelector(this.options.container):this.options.container,this.inputs={},this.preventUpdate=!1,this.triggering=!1,r.each(this.quill.options.formats,function(e){return function(i){return null==t.formats.TOOLTIP[i]?e.initFormat(i,r.bind(e._applyFormat,e,i)):void 0}}(this)),this.quill.on(n.events.FORMAT_INIT,function(e){return function(i){return null==t.formats.TOOLTIP[i]?e.initFormat(i,r.bind(e._applyFormat,e,i)):void 0}}(this)),this.quill.on(n.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?t.updateActive(e):void 0}}(this)),this.quill.on(n.events.TEXT_CHANGE,function(t){return function(){return t.updateActive()}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(e){return e.addHotkey([o.KEYS.BACKSPACE,o.KEYS.DELETE],function(){return r.defer(r.bind(t.updateActive,t))})}}(this)),o(this.container).addClass("ql-toolbar"),o.isIOS()&&o(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,i){var n,s,r;return r=".ql-"+e,null!=t.formats.SELECT[e]?(r="select"+r,n="change"):n="click",s=this.container.querySelector(r),null!=s?(this.inputs[e]=s,o(s).on(n,function(t){return function(){var e,r;return r="change"===n?o(s).value():!o(s).hasClass("ql-active"),t.preventUpdate=!0,t.quill.focus(),e=t.quill.getSelection(),null!=e&&i(e,r),o.isIE(11)&&t.quill.editor.selection.scrollIntoView(),t.preventUpdate=!1,!1}}(this))):void 0},t.prototype.setActive=function(t,e){var i,n,s,r;return"image"===t&&(e=!1),n=this.inputs[t],null!=n?(i=o(n),"SELECT"===n.tagName?(this.triggering=!0,r=i.value(n),null==e&&(e=null!=(s=i["default"]())?s.value:void 0),Array.isArray(e)&&(e=""),e!==r&&(null!=e?i.option(e):i.reset()),this.triggering=!1):i.toggleClass("ql-active",e||!1)):void 0},t.prototype.updateActive=function(t,e){var i;return null==e&&(e=null),t||(t=this.quill.getSelection()),null==t||this.preventUpdate?void 0:(i=this._getActive(t),r.each(this.inputs,function(t){return function(n,s){return(!Array.isArray(e)||e.indexOf(s)>-1)&&t.setActive(s,i[s]),!0}}(this)))},t.prototype._applyFormat=function(e,i,n){return this.triggering?void 0:(i.isCollapsed()?this.quill.prepareFormat(e,n,"user"):null!=t.formats.LINE[e]?this.quill.formatLine(i,e,n,"user"):this.quill.formatText(i,e,n,"user"),r.defer(function(t){return function(){return t.updateActive(i,["bullet","list"]),t.setActive(e,n)}}(this)))},t.prototype._getActive=function(t){var e,i;return e=this._getLeafActive(t),i=this._getLineActive(t),r.defaults({},e,i)},t.prototype._getLeafActive=function(t){var e,i,n,s,o;return t.isCollapsed()?(o=this.quill.editor.doc.findLineAt(t.start),n=o[0],s=o[1],e=0===s?this.quill.getContents(t.start,t.end+1):this.quill.getContents(t.start-1,t.end)):e=this.quill.getContents(t),i=r.map(e.ops,"attributes"),this._intersectFormats(i)},t.prototype._getLineActive=function(t){var e,i,n,s,o,a;for(i=[],o=this.quill.editor.doc.findLineAt(t.start),e=o[0],s=o[1],a=this.quill.editor.doc.findLineAt(t.end),n=a[0],s=a[1],null!=n&&n===e&&(n=n.next);null!=e&&e!==n;)i.push(r.clone(e.formats)),e=e.next;return this._intersectFormats(i)},t.prototype._intersectFormats=function(e){return r.reduce(e.slice(1),function(e,i){var n,s,o,a,l;return null==i&&(i={}),n=Object.keys(e),o=null!=i?Object.keys(i):{},a=r.intersection(n,o),l=r.difference(n,o),s=r.difference(o,n),r.each(a,function(n){if(null!=t.formats.SELECT[n])if(Array.isArray(e[n])){if(e[n].indexOf(i[n])<0)return e[n].push(i[n])}else if(e[n]!==i[n])return e[n]=[e[n],i[n]]}),r.each(l,function(i){return null!=t.formats.TOGGLE[i]?delete e[i]:null==t.formats.SELECT[i]||Array.isArray(e[i])?void 0:e[i]=[e[i]]}),r.each(s,function(n){return null!=t.formats.SELECT[n]?e[n]=[i[n]]:void 0}),e},e[0]||{})},t}(),n.registerModule("toolbar",s),e.exports=s},{"../quill":30}],28:[function(t,e,i){var n,s,r,o;n=t("../quill"),r=n.require("lodash"),o=n.require("dom"),s=function(){function t(e,i){this.quill=e,this.options=i,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(i,n){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,i){return o(t).on("keydown",function(t){return function(n){switch(n.which){case o.KEYS.ENTER:return n.preventDefault(),e.call(t);case o.KEYS.ESCAPE:return n.preventDefault(),i.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,i,n,s,r,o,a;return null!=t?(o=t.getBoundingClientRect(),r=this.quill.container.getBoundingClientRect(),n=o.left-r.left,s=o.top-r.top,i=o.bottom-r.bottom,e=n+o.width/2-this.container.offsetWidth/2,a=s+o.height+this.options.offset,a+this.container.offsetHeight>this.quill.container.offsetHeight&&(a=s-this.container.offsetHeight-this.options.offset),e=Math.max(0,Math.min(e,this.quill.container.offsetWidth-this.container.offsetWidth)),a=Math.max(0,Math.min(a,this.quill.container.offsetHeight-this.container.offsetHeight))):(e=this.quill.container.offsetWidth/2-this.container.offsetWidth/2,a=this.quill.container.offsetHeight/2-this.container.offsetHeight/2),a+=this.quill.container.scrollTop,[e,a]},t.prototype.show=function(t){var e,i,n;return this.range=this.quill.getSelection(),i=this.position(t),e=i[0],n=i[1],this.container.style.left=e+"px",this.container.style.top=n+"px",this.container.focus()},t}(),n.registerModule("tooltip",s),e.exports=s},{"../quill":30}],29:[function(t,e,i){var n,s,r,o;s=t("../quill"),o=s.require("lodash"),n=s.require("delta"),r=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(i){var n;return i.addHotkey(t.hotkeys.UNDO,function(){return e.quill.editor.checkUpdate(),e.undo(),!1}),n=[t.hotkeys.REDO],navigator.platform.indexOf("Win")>-1&&n.push({key:"Y",metaKey:!0}),i.addHotkey(n,function(){return e.quill.editor.checkUpdate(),e.redo(),!1})}}(this)),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(t){return function(e,i){return t.ignoreChange?void 0:(t.options.userOnly&&i!==s.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 i,n,s,r;if(t.ops.length>0){this.stack.redo=[];try{if(r=this.quill.getContents().diff(this.oldDelta),s=(new Date).getTime(),this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0?(i=this.stack.undo.pop(),r=r.compose(i.undo),t=i.redo.compose(t)):this.lastRecorded=s,this.stack.undo.push({redo:t,undo:r}),this.stack.undo.length>this.options.maxStack)return this.stack.undo.unshift()}catch(o){return n=o,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,i;return i=0,e=0,o.each(t.ops,function(t){return null!=t.insert?i=Math.max(e+(t.insert.length||1),i):null!=t["delete"]?i=Math.max(e,i):null!=t.retain?(null!=t.attributes&&(i=Math.max(e+t.retain,i)),e+=t.retain):void 0}),i},t.prototype._change=function(t,e){var i,n;return this.stack[t].length>0?(i=this.stack[t].pop(),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i[t],s.sources.USER),this.ignoreChange=!1,n=this._getLastChangeIndex(i[t]),this.quill.setSelection(n,n),this.oldDelta=this.quill.getContents(),this.stack[e].push(i)):void 0},t.prototype._transform=function(t){var e,i,n,s,r,o,a,l;for(this.oldDelta=t.transform(this.oldDelta,!0),o=this.stack.undo,i=0,s=o.length;s>i;i++)e=o[i],e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0);for(a=this.stack.redo,l=[],n=0,r=a.length;r>n;n++)e=a[n],e.undo=t.transform(e.undo,!0),l.push(e.redo=t.transform(e.redo,!0));return l},t}(),s.registerModule("undo-manager",r),e.exports=r},{"../quill":30}],30:[function(t,e,i){var n,s,r,o,a,l,u,c,h,d,p,f=function(t,e){function i(){this.constructor=t}for(var n in e)g.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},g={}.hasOwnProperty,m=[].slice;h=t("lodash"),p=t("../package.json"),n=t("rich-text/lib/delta"),o=t("eventemitter2").EventEmitter2,d=t("./lib/dom"),s=t("./core/document"),r=t("./core/editor"),a=t("./core/format"),l=t("./core/normalizer"),c=t("./lib/range"),u=function(t){function e(t,i){var n,s,o;if(this.container=t,null==i&&(i={}),h.isString(this.container)&&(this.container=document.querySelector(this.container)),null==this.container)throw new Error("Invalid Quill container");if(s=h.defaults(i.modules||{},e.DEFAULTS.modules),n=this.container.innerHTML,this.container.innerHTML="",this.options=h.defaults(i,e.DEFAULTS),this.options.modules=s,this.options.id=this.id="ql-editor-"+(e.editors.length+1),this.modules={},this.root=this.addContainer("ql-editor"),this.editor=new r(this.root,this,this.options),e.editors.push(this),this.setHTML(n,e.sources.SILENT),o=e.themes[this.options.theme],null==o)throw new Error("Cannot load "+this.options.theme+" theme. Are you sure you registered it?");this.theme=new o(this,this.options),h.each(this.options.modules,function(t){return function(e,i){return t.addModule(i,e)}}(this))}return f(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=r.sources,e.registerModule=function(t,i){return null!=e.modules[t]&&console.warn("Overwriting "+t+" module"),e.modules[t]=i},e.registerTheme=function(t,i){return null!=e.themes[t]&&console.warn("Overwriting "+t+" theme"),e.themes[t]=i},e.require=function(t){switch(t){case"lodash":return h;case"delta":return n;case"format":return a;case"normalizer":return l;case"dom":return d;case"document":return s;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 i,n;return null==e&&(e=!1),n=e?this.root:null,i=document.createElement("div"),d(i).addClass(t),this.container.insertBefore(i,n),i},e.prototype.addFormat=function(t,i){return this.editor.doc.addFormat(t,i),this.emit(e.events.FORMAT_INIT,t)},e.prototype.addModule=function(t,i){var n;if(n=e.modules[t],null==n)throw new Error("Cannot load "+t+" module. Are you sure you registered it?");return i===!0&&(i={}),i=h.defaults(i,this.theme.constructor.OPTIONS[t]||{},n.DEFAULTS||{}),this.modules[t]=new n(this,i),this.emit(e.events.MODULE_INIT,t,this.modules[t]),this.modules[t]},e.prototype.deleteText=function(t,i,s){var r,o,a;return null==s&&(s=e.sources.API),a=this._buildParams(t,i,{},s),t=a[0],i=a[1],o=a[2],s=a[3],i>t?(r=(new n).retain(t)["delete"](i-t),this.editor.applyDelta(r,s)):void 0},e.prototype.emit=function(){var t,i;return i=arguments[0],t=2<=arguments.length?m.call(arguments,1):[],e.__super__.emit.apply(this,[e.events.PRE_EVENT,i].concat(m.call(t))),e.__super__.emit.apply(this,[i].concat(m.call(t))),e.__super__.emit.apply(this,[e.events.POST_EVENT,i].concat(m.call(t)))},e.prototype.focus=function(){return this.editor.focus()},e.prototype.formatLine=function(t,e,i,n,s){var r,o,a,l,u;return l=this._buildParams(t,e,i,n,s),t=l[0],e=l[1],r=l[2],s=l[3],u=this.editor.doc.findLineAt(e),o=u[0],a=u[1],null!=o&&(e+=o.length-a),this.formatText(t,e,r,s)},e.prototype.formatText=function(t,e,i,s,r){var o,a,l;return l=this._buildParams(t,e,i,s,r),t=l[0],e=l[1],a=l[2],r=l[3],a=h.reduce(a,function(t){return function(e,i,n){var s;return s=t.editor.doc.formats[n],i&&i!==s.config["default"]||(e[n]=null),e}}(this),a),o=(new n).retain(t).retain(e-t,a),this.editor.applyDelta(o,r)},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,i,s){var r,o,a,l;return l=this._buildParams(t,0,e,i,s),t=l[0],o=l[1],a=l[2],s=l[3],r=(new n).retain(t).insert(1,a),this.editor.applyDelta(r,s)},e.prototype.insertText=function(t,e,i,s,r){var o,a,l,u;return u=this._buildParams(t,0,i,s,r),t=u[0],a=u[1],l=u[2],r=u[3],e.length>0?(o=(new n).retain(t).insert(e,l),this.editor.applyDelta(o,r)):void 0},e.prototype.onModuleLoad=function(t,i){return this.modules[t]?i(this.modules[t]):this.on(e.events.MODULE_INIT,function(e,n){return e===t?i(n):void 0})},e.prototype.prepareFormat=function(t,i,n){var s,r;return null==n&&(n=e.sources.API),s=this.editor.doc.formats[t],null!=s&&(r=this.getSelection(),null!=r?r.isCollapsed():void 0)?s.isType(a.types.LINE)?this.formatLine(r,t,i,n):s.prepare(i):void 0},e.prototype.setContents=function(t,i){var s;return null==i&&(i=e.sources.API),t=new n(Array.isArray(t)?t.slice():t.ops.slice()),s=h.last(t.slice(t.length()-1).ops),t["delete"](this.getLength()-1),null!=s&&h.isString(s.insert)&&"\n"===h.last(s.insert)&&t["delete"](1),this.updateContents(t,i)},e.prototype.setHTML=function(t,i){return null==i&&(i=e.sources.API), -t.trim()||(t="<"+d.DEFAULT_BLOCK_TAG+"><"+d.DEFAULT_BREAK_TAG+">"),this.editor.doc.setHTML(t),this.editor.checkUpdate(i)},e.prototype.setSelection=function(t,i,n){var s;return null==n&&(n=e.sources.API),h.isNumber(t)&&h.isNumber(i)?s=new c(t,i):(s=t,n=i||n),this.editor.selection.setRange(s,n)},e.prototype.setText=function(t,i){var s;return null==i&&(i=e.sources.API),s=(new n).insert(t),this.setContents(s,i)},e.prototype.updateContents=function(t,i){return null==i&&(i=e.sources.API),Array.isArray(t)&&(t={ops:t}),this.editor.applyDelta(t,i)},e.prototype._buildParams=function(){var t,i;return i=1<=arguments.length?m.call(arguments,0):[],h.isObject(i[0])&&i.splice(0,1,i[0].start,i[0].end),h.isString(i[2])&&(t={},t[i[2]]=i[3],i.splice(2,2,t)),null==i[3]&&(i[3]=e.sources.API),i},e}(o),u.registerTheme("base",t("./themes/base")),u.registerTheme("snow",t("./themes/snow")),e.exports=u},{"../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,i){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,i){var n,s,r,o;s=t("lodash"),o=t("../../lib/dom"),r=t("./base.styl"),n=function(){function t(e,i){var n;this.quill=e,this.options=i,o(this.quill.container).addClass("ql-container"),this.options.styles&&this.addStyles(r+t.objToCss(this.options.styles)),o.isIE(10)&&(n=o.isIE(9)?"9":"10",o(this.quill.root).addClass("ql-ie-"+n))}return t.OPTIONS={},t.objToCss=function(t){return s.map(t,function(t,e){var i;return i=s.map(t,function(t,e){return e+": "+t+";"}).join(" "),e+" { "+i+" }"}).join("\n")},t.prototype.addStyles=function(e){var i;return s.isObject(e)&&(e=t.objToCss(e)),i=document.createElement("style"),i.type="text/css",i.appendChild(document.createTextNode(e)),document.head.appendChild(i)},t}(),e.exports=n},{"../../lib/dom":17,"./base.styl":31,lodash:1}],33:[function(t,e,i){var n,s,r,o,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("lodash"),s=t("../../lib/color-picker"),n=t("../base"),l=t("../../lib/dom"),r=t("../../lib/picker"),o=function(t){function e(t,i){this.quill=t,this.options=i,e.__super__.constructor.apply(this,arguments),l(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?a.invoke(t.pickers,"close"):void 0}}(this)),this.quill.onModuleLoad("multi-cursor",a.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",a.bind(this.extendToolbar,this))}return u(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,i;return e=t.elem.querySelector(".cursor-triangle.bottom"),i=t.elem.querySelector(".cursor-triangle.top"),e.style.borderTopColor=i.style.borderBottomColor=t.color})},e.prototype.extendToolbar=function(t){return l(t.container).addClass("ql-snow"),a.each(["color","background","font","size","align"],function(e){return function(i){var n,o;if(o=t.container.querySelector(".ql-"+i),null!=o){switch(i){case"font":case"size":case"align":n=new r(o);break;case"color":case"background":n=new s(o),a.each(n.container.querySelectorAll(".ql-picker-item"),function(t,e){return 7>e?l(t).addClass("ql-primary-color"):void 0})}return null!=n?e.pickers.push(n):void 0}}}(this)),a.each(l(t.container).textNodes(),function(t){return 0===l(t).text().trim().length?l(t).remove():void 0})},e}(n),e.exports=o},{"../../lib/color-picker":16,"../../lib/dom":17,"../../lib/picker":19,"../base":32,lodash:1}]},{},[15])(15)}),function(){function t(t){"use strict";var e={omitExtraWLInCodeBlocks:{"default":!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{"default":!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{"default":!1,describe:"Specify a prefix to generated header ids",type:"string"},headerLevelStart:{"default":!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{"default":!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{"default":!1,describe:"Turn on/off GFM autolink style",type:"boolean"},literalMidWordUnderscores:{"default":!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},strikethrough:{"default":!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{"default":!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{"default":!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{"default":!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{"default":!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{"default":!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"}};if(t===!1)return JSON.parse(JSON.stringify(e));var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]["default"]);return i}function e(t,e){"use strict";var i=e?"Error in "+e+" extension->":"Error in unnamed extension",s={valid:!0,error:""};n.helper.isArray(t)||(t=[t]);for(var r=0;r-1))return t;d=""}else d=i.gUrls[h],n.helper.isUndefined(i.gTitles[h])||(p=i.gTitles[h]);d=n.helper.escapeCharacters(d,"*_",!1);var f='"};return t=t.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,s),t=t.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,s),t=t.replace(/(\[([^\[\]]+)\])()()()()()/g,s)}),n.subParser("autoLinks",function(t,e){"use strict";function i(t,e){var i=n.subParser("unescapeSpecialChars")(e);return n.subParser("encodeEmailAddress")(i)}var s=/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/gi,r=/<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi,o=/\b(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)\b/gi,a=/<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;return t=t.replace(r,'$1'),t=t.replace(a,i),e.simplifiedAutoLink&&(t=t.replace(s,'$1'),t=t.replace(o,i)),t}),n.subParser("blockGamut",function(t,e,i){"use strict";t=n.subParser("blockQuotes")(t,e,i),t=n.subParser("headers")(t,e,i);var s=n.subParser("hashBlock")("
",e,i);return t=t.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,s),t=t.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,s),t=t.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,s),t=n.subParser("lists")(t,e,i),t=n.subParser("codeBlocks")(t,e,i),t=n.subParser("tables")(t,e,i),t=n.subParser("hashHTMLBlocks")(t,e,i),t=n.subParser("paragraphs")(t,e,i)}),n.subParser("blockQuotes",function(t,e,i){"use strict";return t=t.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(t,s){var r=s;return r=r.replace(/^[ \t]*>[ \t]?/gm,"~0"),r=r.replace(/~0/g,""),r=r.replace(/^[ \t]+$/gm,""),r=n.subParser("githubCodeBlocks")(r,e,i),r=n.subParser("blockGamut")(r,e,i),r=r.replace(/(^|\n)/g,"$1 "),r=r.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(t,e){var i=e;return i=i.replace(/^  /gm,"~0"),i=i.replace(/~0/g,"")}),n.subParser("hashBlock")("
\n"+r+"\n
",e,i)})}),n.subParser("codeBlocks",function(t,e,i){"use strict";t+="~0";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g;return t=t.replace(s,function(t,s,r){var o=s,a=r,l="\n";return o=n.subParser("outdent")(o),o=n.subParser("encodeCode")(o),o=n.subParser("detab")(o),o=o.replace(/^\n+/g,""),o=o.replace(/\n+$/g,""),e.omitExtraWLInCodeBlocks&&(l=""),o="
"+o+l+"
",n.subParser("hashBlock")(o,e,i)+a}),t=t.replace(/~0/,"")}),n.subParser("codeSpans",function(t){"use strict";return t=t.replace(/(<]*?>)([^]*?)<\/code>/g,function(t,e,i){return i=i.replace(/^([ \t]*)/g,""),i=i.replace(/[ \t]*$/g,""),i=n.subParser("encodeCode")(i),e+i+""}),t=t.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(t,e,i,s){var r=s;return r=r.replace(/^([ \t]*)/g,""),r=r.replace(/[ \t]*$/g,""),r=n.subParser("encodeCode")(r),e+""+r+""})}),n.subParser("detab",function(t){"use strict";return t=t.replace(/\t(?=\t)/g," "),t=t.replace(/\t/g,"~A~B"),t=t.replace(/~B(.+?)~A/g,function(t,e){for(var i=e,n=4-i.length%4,s=0;n>s;s++)i+=" ";return i}),t=t.replace(/~A/g," "),t=t.replace(/~B/g,"")}),n.subParser("encodeAmpsAndAngles",function(t){"use strict";return t=t.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),t=t.replace(/<(?![a-z\/?\$!])/gi,"<")}),n.subParser("encodeBackslashEscapes",function(t){"use strict";return t=t.replace(/\\(\\)/g,n.helper.escapeCharactersCallback),t=t.replace(/\\([`*_{}\[\]()>#+-.!])/g,n.helper.escapeCharactersCallback)}),n.subParser("encodeCode",function(t){"use strict";return t=t.replace(/&/g,"&"),t=t.replace(//g,">"),t=n.helper.escapeCharacters(t,"*_{}[]\\",!1)}),n.subParser("encodeEmailAddress",function(t){"use strict";var e=[function(t){return"&#"+t.charCodeAt(0)+";"},function(t){return"&#x"+t.charCodeAt(0).toString(16)+";"},function(t){return t}];return t="mailto:"+t,t=t.replace(/./g,function(t){if("@"===t)t=e[Math.floor(2*Math.random())](t);else if(":"!==t){var i=Math.random();t=i>.9?e[2](t):i>.45?e[1](t):e[0](t)}return t}),t=''+t+"",t=t.replace(/">.+:/g,'">')}),n.subParser("escapeSpecialCharsWithinTagAttributes",function(t){"use strict";var e=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return t=t.replace(e,function(t){var e=t.replace(/(.)<\/?code>(?=.)/g,"$1`");return e=n.helper.escapeCharacters(e,"\\`*_",!1)})}),n.subParser("githubCodeBlocks",function(t,e,i){"use strict";return e.ghCodeBlocks?(t+="~0",t=t.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(t,s,r){var o=e.omitExtraWLInCodeBlocks?"":"\n";return r=n.subParser("encodeCode")(r),r=n.subParser("detab")(r),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="
"+r+o+"
",n.subParser("hashBlock")(r,e,i)}),t=t.replace(/~0/,"")):t}),n.subParser("hashBlock",function(t,e,i){"use strict";return t=t.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(i.gHtmlBlocks.push(t)-1)+"K\n\n"}),n.subParser("hashElement",function(t,e,i){"use strict";return function(t,e){var n=e;return n=n.replace(/\n\n/g,"\n"),n=n.replace(/^\n/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(i.gHtmlBlocks.push(n)-1)+"K\n\n"}}),n.subParser("hashHTMLBlocks",function(t,e,i){"use strict";return t=t.replace(/\n/g,"\n\n"),t=t.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,n.subParser("hashElement")(t,e,i)),t=t.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside|address|audio|canvas|figure|hgroup|output|video)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,n.subParser("hashElement")(t,e,i)),t=t.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(t,e,i)),t=t.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(t,e,i)),t=t.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(t,e,i)),t=t.replace(/\n\n/g,"\n")}),n.subParser("headers",function(t,e,i){"use strict";function s(t){var e,s=t.replace(/[^\w]/g,"").toLowerCase();return i.hashLinkCounts[s]?e=s+"-"+i.hashLinkCounts[s]++:(e=s,i.hashLinkCounts[s]=1),r===!0&&(r="section"),n.helper.isString(r)?r+e:e}var r=e.prefixHeaderId,o=isNaN(parseInt(e.headerLevelStart))?1:parseInt(e.headerLevelStart),a=e.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,l=e.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;return t=t.replace(a,function(t,r){var a=n.subParser("spanGamut")(r,e,i),l=e.noHeaderId?"":' id="'+s(r)+'"',u=o,c=""+a+"";return n.subParser("hashBlock")(c,e,i)}),t=t.replace(l,function(t,r){var a=n.subParser("spanGamut")(r,e,i),l=e.noHeaderId?"":' id="'+s(r)+'"',u=o+1,c=""+a+"";return n.subParser("hashBlock")(c,e,i)}),t=t.replace(/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm,function(t,r,a){var l=n.subParser("spanGamut")(a,e,i),u=e.noHeaderId?"":' id="'+s(a)+'"',c=o-1+r.length,h=""+l+"";return n.subParser("hashBlock")(h,e,i)})}),n.subParser("images",function(t,e,i){"use strict";function s(t,e,s,r,o,a,l,u){var c=i.gUrls,h=i.gTitles,d=i.gDimensions;if(s=s.toLowerCase(),u||(u=""),""===r||null===r){if((""===s||null===s)&&(s=e.toLowerCase().replace(/ ?\n/g," ")),r="#"+s,n.helper.isUndefined(c[s]))return t;r=c[s],n.helper.isUndefined(h[s])||(u=h[s]),n.helper.isUndefined(d[s])||(o=d[s].width,a=d[s].height)}var p="img";if(e.match(/^video:/)?(e=e.substring(6),p="video"):e.match(/^audio:/)?(e=e.substring(6),p="audio"):e.match(/^image:/)&&(e=e.substring(6)),e=e.replace(/"/g,"""),e=n.helper.escapeCharacters(e,"*_",!1),r=n.helper.escapeCharacters(r,"*_",!1),"img"===p){var f=''+e+'',g+=""}var r=/!\[(.*?)]\s?\([ \t]*()?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g,o=/!\[(.*?)][ ]?(?:\n[ ]*)?\[(.*?)]()()()()()/g;return t=t.replace(o,s),t=t.replace(r,s)}),n.subParser("italicsAndBold",function(t,e){"use strict";return e.literalMidWordUnderscores?(t=t.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm,"$1$2"),t=t.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm,"$1$2"),t=t.replace(/\*\*(?=\S)([^]+?)\*\*/g,"$1"),t=t.replace(/\*(?=\S)([^]+?)\*/g,"$1")):(t=t.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),t=t.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")),t}),n.subParser("lists",function(t,e,i){"use strict";function s(t,s){i.gListLevel++,t=t.replace(/\n{2,}$/,"\n"),t+="~0";var r=/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+((\[(x| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!~0)/.test(t);return t=t.replace(r,function(t,s,r,a,l,u,c){c=c&&""!==c.trim();var h=n.subParser("outdent")(l,e,i),d="";return u&&e.tasklists&&(d=' class="task-list-item" style="list-style-type: none;"',h=h.replace(/^[ \t]*\[(x| )?]/m,function(){var t='-1?(h=n.subParser("githubCodeBlocks")(h,e,i),h=n.subParser("blockGamut")(h,e,i)):(h=n.subParser("lists")(h,e,i),h=h.replace(/\n$/,""),h=o?n.subParser("paragraphs")(h,e,i):n.subParser("spanGamut")(h,e,i)),h="\n"+h+"\n"}),t=t.replace(/~0/g,""),i.gListLevel--,s&&(t=t.replace(/\s+$/,"")),t}function r(t,e,i){var n="ul"===e?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,r=[],o="";if(-1!==t.search(n)){!function l(t){var r=t.search(n);-1!==r?(o+="\n\n<"+e+">"+s(t.slice(0,r),!!i)+"\n\n",e="ul"===e?"ol":"ul",n="ul"===e?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,l(t.slice(r))):o+="\n\n<"+e+">"+s(t,!!i)+"\n\n"}(t);for(var a=0;a"+s(t,!!i)+"\n\n";return o}t+="~0";var o=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return i.gListLevel?t=t.replace(o,function(t,e,i){var n=i.search(/[*+-]/g)>-1?"ul":"ol";return r(e,n,!0)}):(o=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,t=t.replace(o,function(t,e,i,n){var s=n.search(/[*+-]/g)>-1?"ul":"ol";return r(i,s)})),t=t.replace(/~0/,"")}),n.subParser("outdent",function(t){"use strict";return t=t.replace(/^(\t|[ ]{1,4})/gm,"~0"),t=t.replace(/~0/g,"")}),n.subParser("paragraphs",function(t,e,i){"use strict";t=t.replace(/^\n+/g,""),t=t.replace(/\n+$/g,"");for(var s=t.split(/\n{2,}/g),r=[],o=s.length,a=0;o>a;a++){var l=s[a];l.search(/~K(\d+)K/g)>=0?r.push(l):l.search(/\S/)>=0&&(l=n.subParser("spanGamut")(l,e,i),l=l.replace(/^([ \t]*)/g,"

"),l+="

",r.push(l))}for(o=r.length,a=0;o>a;a++)for(;r[a].search(/~K(\d+)K/)>=0;){var u=i.gHtmlBlocks[RegExp.$1];u=u.replace(/\$/g,"$$$$"),r[a]=r[a].replace(/~K\d+K/,u)}return r.join("\n\n")}),n.subParser("runExtension",function(t,e,i,n){"use strict";if(t.filter)e=t.filter(e,n.converter,i);else if(t.regex){var s=t.regex;!s instanceof RegExp&&(s=new RegExp(s,"g")),e=e.replace(s,t.replace)}return e}),n.subParser("spanGamut",function(t,e,i){"use strict";return t=n.subParser("codeSpans")(t,e,i),t=n.subParser("escapeSpecialCharsWithinTagAttributes")(t,e,i),t=n.subParser("encodeBackslashEscapes")(t,e,i),t=n.subParser("images")(t,e,i),t=n.subParser("anchors")(t,e,i),t=n.subParser("autoLinks")(t,e,i),t=n.subParser("encodeAmpsAndAngles")(t,e,i),t=n.subParser("italicsAndBold")(t,e,i),t=n.subParser("strikethrough")(t,e,i),t=t.replace(/ +\n/g,"
\n")}),n.subParser("strikethrough",function(t,e){"use strict";return e.strikethrough&&(t=t.replace(/(?:~T){2}([^~]+)(?:~T){2}/g,"$1")),t}),n.subParser("stripBlankLines",function(t){"use strict";return t.replace(/^[ \t]+$/gm,"")}),n.subParser("stripLinkDefinitions",function(t,e,i){"use strict";var s=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm;return t+="~0",t=t.replace(s,function(t,s,r,o,a,l,u){return s=s.toLowerCase(),i.gUrls[s]=n.subParser("encodeAmpsAndAngles")(r),l?l+u:(u&&(i.gTitles[s]=u.replace(/"|'/g,""")),e.parseImgDimensions&&o&&a&&(i.gDimensions[s]={width:o,height:a}),"")}),t=t.replace(/~0/,"")}),n.subParser("tables",function(t,e,i){"use strict";var s=function(){var t,s={};return s.th=function(t,s){var r="";return t=t.trim(),""===t?"":(e.tableHeaderId&&(r=' id="'+t.replace(/ /g,"_").toLowerCase()+'"'),t=n.subParser("spanGamut")(t,e,i),s=s&&""!==s.trim()?' style="'+s+'"':"",""+t+"")},s.td=function(t,s){var r=n.subParser("spanGamut")(t.trim(),e,i);return s=s&&""!==s.trim()?' style="'+s+'"':"",""+r+""},s.ths=function(){var t="",e=0,i=[].slice.apply(arguments[0]),n=[].slice.apply(arguments[1]);for(e;e\n",t+="\n"},s.tr=function(){var t,e=[].slice.apply(arguments[0]),i=[].slice.apply(arguments[1]);return t="\n",t+=s.tds.apply(this,[e,i]),t+="\n"},t=function(t){var e,i,n=0,r=t.split("\n"),o=[];for(n;n"),i=e.substring(1,e.length-1).split("|"),0===u.length)for(c=0;c");e.trim().match(/^[|].*[|]$/);)e=e.trim(),a.push(s.tr.apply(this,[e.substring(1,e.length-1).split("|"),u])),e=r[++n];a.push(""),a.push(""),o.push(a.join("\n"));continue}e=r[--n]}o.push(e)}return o.join("\n")},{parse:t}};if(e.tables){var r=s();return r.parse(t)}return t}),n.subParser("unescapeSpecialChars",function(t){"use strict";return t=t.replace(/~E(\d+)E/g,function(t,e){var i=parseInt(e);return String.fromCharCode(i)})});var l=this;"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define("showdown",function(){"use strict";return n}):l.showdown=n}.call(this),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.toMarkdown=t()}}(function(){return function t(e,i,n){function s(o,a){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[o]={exports:{}};e[o][0].call(c.exports,function(t){var i=e[o][1][t];return s(i?i:t)},c,c.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o-1?e.documentElement.innerHTML=t:e.body.innerHTML=t,e},t}function l(t){var e=(new T).parseFromString(t,"text/html");return w(e,s),e}function u(t){for(var e,i,n,s=[t],r=[];s.length>0;)for(e=s.shift(),r.push(e),i=e.childNodes,n=0;n<",">"+e+"<")}function d(t,e){if("string"==typeof e)return e===t.nodeName.toLowerCase();if(Array.isArray(e))return-1!==e.indexOf(t.nodeName.toLowerCase());if("function"==typeof e)return e.call(m,t);throw new TypeError("`filter` needs to be a string, array, or function")}function p(t,e){var i,n,r;return"left"===t?(i=e.previousSibling,n=/ $/):(i=e.nextSibling,n=/^ /),i&&(3===i.nodeType?r=n.test(i.nodeValue):1!==i.nodeType||s(i)||(r=n.test(i.textContent))),r}function f(t){var e="",i="";if(!s(t)){var n=/^[ \r\n\t]/.test(t.innerHTML),r=/[ \r\n\t]$/.test(t.innerHTML);n&&!p("left",t)&&(e=" "),r&&!p("right",t)&&(i=" ")}return{leading:e,trailing:i}}function g(t){var e,i=c(t);if(!r(t)&&!/A/.test(t.nodeName)&&/^\s*$/i.test(i))return void(t._replacement="");for(var s=0;s=0;r--)g(s[r]);return i=c(n),i.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g,"").replace(/\n\s+\n/g,"\n\n").replace(/\n{3,}/g,"\n\n")},m.isBlock=s,m.isVoid=r,m.trim=n,m.outer=h,e.exports=m},{"./lib/gfm-converters":2,"./lib/md-converters":3,"collapse-whitespace":4,jsdom:7}],2:[function(t,e,i){"use strict";function n(t,e){var i=Array.prototype.indexOf.call(e.parentNode.childNodes,e),n=" ";return 0===i&&(n="| "),n+t+" |"}var s=/highlight highlight-(\S+)/;e.exports=[{filter:"br",replacement:function(){return"\n"}},{filter:["del","s","strike"],replacement:function(t){return"~~"+t+"~~"}},{filter:function(t){return"checkbox"===t.type&&"LI"===t.parentNode.nodeName},replacement:function(t,e){return(e.checked?"[x]":"[ ]")+" "}},{filter:["th","td"],replacement:function(t,e){return n(t,e)}},{filter:"tr",replacement:function(t,e){var i="",s={left:":--",right:"--:",center:":-:"};if("THEAD"===e.parentNode.nodeName)for(var r=0;rs;s++)n+="#";return"\n\n"+n+" "+t+"\n\n"}},{filter:"hr",replacement:function(){return"\n\n* * *\n\n"}},{filter:["em","i"],replacement:function(t){return"*"+t+"*"}},{filter:["u"],replacement:function(t){return"_"+t+"_"}},{filter:["strong","b"],replacement:function(t){return"**"+t+"**"}},{filter:["strike","s"],replacement:function(t){return"~~"+t+"~~"}},{filter:function(t){var e=t.previousSibling||t.nextSibling,i="PRE"===t.parentNode.nodeName&&!e;return"CODE"===t.nodeName&&!i},replacement:function(t){return"`"+t+"`"}},{filter:function(t){return"A"===t.nodeName&&t.getAttribute("href")},replacement:function(t,e){var i=e.title?' "'+e.title+'"':"";return"["+t+"]("+e.getAttribute("href")+i+")"}},{filter:"video",replacement:function(t,e){for(var i,n=e.getAttribute("alt")||"",s=0;s "),"\n\n"+t+"\n\n"}},{filter:"li",replacement:function(t,e){t=t.replace(/^\s+/,"").replace(/\n/gm,"\n ");var i="* ",n=e.parentNode,s=Array.prototype.indexOf.call(n.children,e)+1;return i=/ol/i.test(n.nodeName)?s+". ":"* ",i+t}},{filter:["ul","ol"],replacement:function(t,e){for(var i=[],n=0;n<"+d.DEFAULT_BREAK_TAG+">"),this.editor.doc.setHTML(t),this.editor.checkUpdate(i)},e.prototype.setSelection=function(t,i,n){var s;return null==n&&(n=e.sources.API),h.isNumber(t)&&h.isNumber(i)?s=new c(t,i):(s=t,n=i||n),this.editor.selection.setRange(s,n)},e.prototype.setText=function(t,i){var s;return null==i&&(i=e.sources.API),s=(new n).insert(t),this.setContents(s,i)},e.prototype.updateContents=function(t,i){return null==i&&(i=e.sources.API),Array.isArray(t)&&(t={ops:t}),this.editor.applyDelta(t,i)},e.prototype._buildParams=function(){var t,i;return i=1<=arguments.length?m.call(arguments,0):[],h.isObject(i[0])&&i.splice(0,1,i[0].start,i[0].end),h.isString(i[2])&&(t={},t[i[2]]=i[3],i.splice(2,2,t)),null==i[3]&&(i[3]=e.sources.API),i},e}(o),u.registerTheme("base",t("./themes/base")),u.registerTheme("snow",t("./themes/snow")),e.exports=u},{"../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,i){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,i){var n,s,r,o;s=t("lodash"),o=t("../../lib/dom"),r=t("./base.styl"),n=function(){function t(e,i){var n;this.quill=e,this.options=i,o(this.quill.container).addClass("ql-container"),this.options.styles&&this.addStyles(r+t.objToCss(this.options.styles)),o.isIE(10)&&(n=o.isIE(9)?"9":"10",o(this.quill.root).addClass("ql-ie-"+n))}return t.OPTIONS={},t.objToCss=function(t){return s.map(t,function(t,e){var i;return i=s.map(t,function(t,e){return e+": "+t+";"}).join(" "),e+" { "+i+" }"}).join("\n")},t.prototype.addStyles=function(e){var i;return s.isObject(e)&&(e=t.objToCss(e)),i=document.createElement("style"),i.type="text/css",i.appendChild(document.createTextNode(e)),document.head.appendChild(i)},t}(),e.exports=n},{"../../lib/dom":17,"./base.styl":31,lodash:1}],33:[function(t,e,i){var n,s,r,o,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("lodash"),s=t("../../lib/color-picker"),n=t("../base"),l=t("../../lib/dom"),r=t("../../lib/picker"),o=function(t){function e(t,i){this.quill=t,this.options=i,e.__super__.constructor.apply(this,arguments),l(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?a.invoke(t.pickers,"close"):void 0}}(this)),this.quill.onModuleLoad("multi-cursor",a.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",a.bind(this.extendToolbar,this))}return u(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,i;return e=t.elem.querySelector(".cursor-triangle.bottom"),i=t.elem.querySelector(".cursor-triangle.top"),e.style.borderTopColor=i.style.borderBottomColor=t.color})},e.prototype.extendToolbar=function(t){return l(t.container).addClass("ql-snow"),a.each(["color","background","font","size","align"],function(e){return function(i){var n,o;if(o=t.container.querySelector(".ql-"+i),null!=o){switch(i){case"font":case"size":case"align":n=new r(o);break;case"color":case"background":n=new s(o),a.each(n.container.querySelectorAll(".ql-picker-item"),function(t,e){return 7>e?l(t).addClass("ql-primary-color"):void 0})}return null!=n?e.pickers.push(n):void 0}}}(this)),a.each(l(t.container).textNodes(),function(t){return 0===l(t).text().trim().length?l(t).remove():void 0})},e}(n),e.exports=o},{"../../lib/color-picker":16,"../../lib/dom":17,"../../lib/picker":19,"../base":32,lodash:1}]},{},[15])(15)}),function(){function t(t){"use strict";var e={omitExtraWLInCodeBlocks:{"default":!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{"default":!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{"default":!1,describe:"Specify a prefix to generated header ids",type:"string"},headerLevelStart:{"default":!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{"default":!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{"default":!1,describe:"Turn on/off GFM autolink style",type:"boolean"},literalMidWordUnderscores:{"default":!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},strikethrough:{"default":!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{"default":!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{"default":!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{"default":!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{"default":!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{"default":!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"}};if(t===!1)return JSON.parse(JSON.stringify(e));var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]["default"]);return i}function e(t,e){"use strict";var i=e?"Error in "+e+" extension->":"Error in unnamed extension",s={valid:!0,error:""};n.helper.isArray(t)||(t=[t]);for(var r=0;r-1))return t;d=""}else d=i.gUrls[h],n.helper.isUndefined(i.gTitles[h])||(p=i.gTitles[h]);d=n.helper.escapeCharacters(d,"*_",!1);var f='"};return t=t.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,s),t=t.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,s),t=t.replace(/(\[([^\[\]]+)\])()()()()()/g,s)}),n.subParser("autoLinks",function(t,e){"use strict";function i(t,e){var i=n.subParser("unescapeSpecialChars")(e);return n.subParser("encodeEmailAddress")(i)}var s=/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/gi,r=/<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi,o=/\b(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)\b/gi,a=/<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;return t=t.replace(r,'$1'),t=t.replace(a,i),e.simplifiedAutoLink&&(t=t.replace(s,'$1'),t=t.replace(o,i)),t}),n.subParser("blockGamut",function(t,e,i){"use strict";t=n.subParser("blockQuotes")(t,e,i),t=n.subParser("headers")(t,e,i);var s=n.subParser("hashBlock")("
",e,i);return t=t.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,s),t=t.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,s),t=t.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,s),t=n.subParser("lists")(t,e,i),t=n.subParser("codeBlocks")(t,e,i),t=n.subParser("tables")(t,e,i),t=n.subParser("hashHTMLBlocks")(t,e,i),t=n.subParser("paragraphs")(t,e,i)}),n.subParser("blockQuotes",function(t,e,i){"use strict";return t=t.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(t,s){var r=s;return r=r.replace(/^[ \t]*>[ \t]?/gm,"~0"),r=r.replace(/~0/g,""),r=r.replace(/^[ \t]+$/gm,""),r=n.subParser("githubCodeBlocks")(r,e,i),r=n.subParser("blockGamut")(r,e,i),r=r.replace(/(^|\n)/g,"$1 "),r=r.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(t,e){var i=e;return i=i.replace(/^  /gm,"~0"),i=i.replace(/~0/g,"")}),n.subParser("hashBlock")("
\n"+r+"\n
",e,i)})}),n.subParser("codeBlocks",function(t,e,i){"use strict";t+="~0";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g;return t=t.replace(s,function(t,s,r){var o=s,a=r,l="\n";return o=n.subParser("outdent")(o),o=n.subParser("encodeCode")(o),o=n.subParser("detab")(o),o=o.replace(/^\n+/g,""),o=o.replace(/\n+$/g,""),e.omitExtraWLInCodeBlocks&&(l=""),o="
"+o+l+"
",n.subParser("hashBlock")(o,e,i)+a}),t=t.replace(/~0/,"")}),n.subParser("codeSpans",function(t){"use strict";return t=t.replace(/(<]*?>)([^]*?)<\/code>/g,function(t,e,i){return i=i.replace(/^([ \t]*)/g,""),i=i.replace(/[ \t]*$/g,""),i=n.subParser("encodeCode")(i),e+i+""}),t=t.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(t,e,i,s){var r=s;return r=r.replace(/^([ \t]*)/g,""),r=r.replace(/[ \t]*$/g,""),r=n.subParser("encodeCode")(r),e+""+r+""})}),n.subParser("detab",function(t){"use strict";return t=t.replace(/\t(?=\t)/g," "),t=t.replace(/\t/g,"~A~B"),t=t.replace(/~B(.+?)~A/g,function(t,e){for(var i=e,n=4-i.length%4,s=0;n>s;s++)i+=" ";return i}),t=t.replace(/~A/g," "),t=t.replace(/~B/g,"")}),n.subParser("encodeAmpsAndAngles",function(t){"use strict";return t=t.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),t=t.replace(/<(?![a-z\/?\$!])/gi,"<")}),n.subParser("encodeBackslashEscapes",function(t){"use strict";return t=t.replace(/\\(\\)/g,n.helper.escapeCharactersCallback),t=t.replace(/\\([`*_{}\[\]()>#+-.!])/g,n.helper.escapeCharactersCallback)}),n.subParser("encodeCode",function(t){"use strict";return t=t.replace(/&/g,"&"),t=t.replace(//g,">"),t=n.helper.escapeCharacters(t,"*_{}[]\\",!1)}),n.subParser("encodeEmailAddress",function(t){"use strict";var e=[function(t){return"&#"+t.charCodeAt(0)+";"},function(t){return"&#x"+t.charCodeAt(0).toString(16)+";"},function(t){return t}];return t="mailto:"+t,t=t.replace(/./g,function(t){if("@"===t)t=e[Math.floor(2*Math.random())](t);else if(":"!==t){var i=Math.random();t=i>.9?e[2](t):i>.45?e[1](t):e[0](t)}return t}),t=''+t+"",t=t.replace(/">.+:/g,'">')}),n.subParser("escapeSpecialCharsWithinTagAttributes",function(t){"use strict";var e=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return t=t.replace(e,function(t){var e=t.replace(/(.)<\/?code>(?=.)/g,"$1`");return e=n.helper.escapeCharacters(e,"\\`*_",!1)})}),n.subParser("githubCodeBlocks",function(t,e,i){"use strict";return e.ghCodeBlocks?(t+="~0",t=t.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(t,s,r){var o=e.omitExtraWLInCodeBlocks?"":"\n";return r=n.subParser("encodeCode")(r),r=n.subParser("detab")(r),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="
"+r+o+"
",n.subParser("hashBlock")(r,e,i)}),t=t.replace(/~0/,"")):t}),n.subParser("hashBlock",function(t,e,i){"use strict";return t=t.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(i.gHtmlBlocks.push(t)-1)+"K\n\n"}),n.subParser("hashElement",function(t,e,i){"use strict";return function(t,e){var n=e;return n=n.replace(/\n\n/g,"\n"),n=n.replace(/^\n/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(i.gHtmlBlocks.push(n)-1)+"K\n\n"}}),n.subParser("hashHTMLBlocks",function(t,e,i){"use strict";return t=t.replace(/\n/g,"\n\n"),t=t.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,n.subParser("hashElement")(t,e,i)),t=t.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside|address|audio|canvas|figure|hgroup|output|video)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,n.subParser("hashElement")(t,e,i)),t=t.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(t,e,i)),t=t.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(t,e,i)),t=t.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(t,e,i)),t=t.replace(/\n\n/g,"\n")}),n.subParser("headers",function(t,e,i){"use strict";function s(t){var e,s=t.replace(/[^\w]/g,"").toLowerCase();return i.hashLinkCounts[s]?e=s+"-"+i.hashLinkCounts[s]++:(e=s,i.hashLinkCounts[s]=1),r===!0&&(r="section"),n.helper.isString(r)?r+e:e}var r=e.prefixHeaderId,o=isNaN(parseInt(e.headerLevelStart))?1:parseInt(e.headerLevelStart),a=e.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,l=e.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;return t=t.replace(a,function(t,r){var a=n.subParser("spanGamut")(r,e,i),l=e.noHeaderId?"":' id="'+s(r)+'"',u=o,c=""+a+"";return n.subParser("hashBlock")(c,e,i)}),t=t.replace(l,function(t,r){var a=n.subParser("spanGamut")(r,e,i),l=e.noHeaderId?"":' id="'+s(r)+'"',u=o+1,c=""+a+"";return n.subParser("hashBlock")(c,e,i)}),t=t.replace(/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm,function(t,r,a){var l=n.subParser("spanGamut")(a,e,i),u=e.noHeaderId?"":' id="'+s(a)+'"',c=o-1+r.length,h=""+l+"";return n.subParser("hashBlock")(h,e,i)})}),n.subParser("images",function(t,e,i){"use strict";function s(t,e,s,r,o,a,l,u){var c=i.gUrls,h=i.gTitles,d=i.gDimensions;if(s=s.toLowerCase(),u||(u=""),""===r||null===r){if((""===s||null===s)&&(s=e.toLowerCase().replace(/ ?\n/g," ")),r="#"+s,n.helper.isUndefined(c[s]))return t;r=c[s],n.helper.isUndefined(h[s])||(u=h[s]),n.helper.isUndefined(d[s])||(o=d[s].width,a=d[s].height)}var p="img";if(e.match(/^video:/)?(e=e.substring(6),p="video"):e.match(/^audio:/)?(e=e.substring(6),p="audio"):e.match(/^image:/)&&(e=e.substring(6)),e=e.replace(/"/g,"""),e=n.helper.escapeCharacters(e,"*_",!1),r=n.helper.escapeCharacters(r,"*_",!1),"img"===p){var f=''+e+'',g+=""}var r=/!\[(.*?)]\s?\([ \t]*()?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g,o=/!\[(.*?)][ ]?(?:\n[ ]*)?\[(.*?)]()()()()()/g;return t=t.replace(o,s),t=t.replace(r,s)}),n.subParser("italicsAndBold",function(t,e){"use strict";return e.literalMidWordUnderscores?(t=t.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm,"$1$2"),t=t.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm,"$1$2"),t=t.replace(/\*\*(?=\S)([^]+?)\*\*/g,"$1"),t=t.replace(/\*(?=\S)([^]+?)\*/g,"$1")):(t=t.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),t=t.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")),t}),n.subParser("lists",function(t,e,i){"use strict";function s(t,s){i.gListLevel++,t=t.replace(/\n{2,}$/,"\n"),t+="~0";var r=/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+((\[(x| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!~0)/.test(t);return t=t.replace(r,function(t,s,r,a,l,u,c){c=c&&""!==c.trim();var h=n.subParser("outdent")(l,e,i),d="";return u&&e.tasklists&&(d=' class="task-list-item" style="list-style-type: none;"',h=h.replace(/^[ \t]*\[(x| )?]/m,function(){var t='-1?(h=n.subParser("githubCodeBlocks")(h,e,i),h=n.subParser("blockGamut")(h,e,i)):(h=n.subParser("lists")(h,e,i),h=h.replace(/\n$/,""),h=o?n.subParser("paragraphs")(h,e,i):n.subParser("spanGamut")(h,e,i)),h="\n"+h+"\n"}),t=t.replace(/~0/g,""),i.gListLevel--,s&&(t=t.replace(/\s+$/,"")),t}function r(t,e,i){var n="ul"===e?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,r=[],o="";if(-1!==t.search(n)){!function l(t){var r=t.search(n);-1!==r?(o+="\n\n<"+e+">"+s(t.slice(0,r),!!i)+"\n\n",e="ul"===e?"ol":"ul",n="ul"===e?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,l(t.slice(r))):o+="\n\n<"+e+">"+s(t,!!i)+"\n\n"}(t);for(var a=0;a"+s(t,!!i)+"\n\n";return o}t+="~0";var o=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return i.gListLevel?t=t.replace(o,function(t,e,i){var n=i.search(/[*+-]/g)>-1?"ul":"ol";return r(e,n,!0)}):(o=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,t=t.replace(o,function(t,e,i,n){var s=n.search(/[*+-]/g)>-1?"ul":"ol";return r(i,s)})),t=t.replace(/~0/,"")}),n.subParser("outdent",function(t){"use strict";return t=t.replace(/^(\t|[ ]{1,4})/gm,"~0"),t=t.replace(/~0/g,"")}),n.subParser("paragraphs",function(t,e,i){"use strict";t=t.replace(/^\n+/g,""),t=t.replace(/\n+$/g,"");for(var s=t.split(/\n{2,}/g),r=[],o=s.length,a=0;o>a;a++){var l=s[a];l.search(/~K(\d+)K/g)>=0?r.push(l):l.search(/\S/)>=0&&(l=n.subParser("spanGamut")(l,e,i),l=l.replace(/^([ \t]*)/g,"

"),l+="

",r.push(l))}for(o=r.length,a=0;o>a;a++)for(;r[a].search(/~K(\d+)K/)>=0;){var u=i.gHtmlBlocks[RegExp.$1];u=u.replace(/\$/g,"$$$$"),r[a]=r[a].replace(/~K\d+K/,u)}return r.join("\n\n")}),n.subParser("runExtension",function(t,e,i,n){"use strict";if(t.filter)e=t.filter(e,n.converter,i);else if(t.regex){var s=t.regex;!s instanceof RegExp&&(s=new RegExp(s,"g")),e=e.replace(s,t.replace)}return e}),n.subParser("spanGamut",function(t,e,i){"use strict";return t=n.subParser("codeSpans")(t,e,i),t=n.subParser("escapeSpecialCharsWithinTagAttributes")(t,e,i),t=n.subParser("encodeBackslashEscapes")(t,e,i),t=n.subParser("images")(t,e,i),t=n.subParser("anchors")(t,e,i),t=n.subParser("autoLinks")(t,e,i),t=n.subParser("encodeAmpsAndAngles")(t,e,i),t=n.subParser("italicsAndBold")(t,e,i),t=n.subParser("strikethrough")(t,e,i),t=t.replace(/ +\n/g,"
\n")}),n.subParser("strikethrough",function(t,e){"use strict";return e.strikethrough&&(t=t.replace(/(?:~T){2}([^~]+)(?:~T){2}/g,"$1")),t}),n.subParser("stripBlankLines",function(t){"use strict";return t.replace(/^[ \t]+$/gm,"")}),n.subParser("stripLinkDefinitions",function(t,e,i){"use strict";var s=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm;return t+="~0",t=t.replace(s,function(t,s,r,o,a,l,u){return s=s.toLowerCase(),i.gUrls[s]=n.subParser("encodeAmpsAndAngles")(r),l?l+u:(u&&(i.gTitles[s]=u.replace(/"|'/g,""")),e.parseImgDimensions&&o&&a&&(i.gDimensions[s]={width:o,height:a}),"")}),t=t.replace(/~0/,"")}),n.subParser("tables",function(t,e,i){"use strict";var s=function(){var t,s={};return s.th=function(t,s){var r="";return t=t.trim(),""===t?"":(e.tableHeaderId&&(r=' id="'+t.replace(/ /g,"_").toLowerCase()+'"'),t=n.subParser("spanGamut")(t,e,i),s=s&&""!==s.trim()?' style="'+s+'"':"",""+t+"")},s.td=function(t,s){var r=n.subParser("spanGamut")(t.trim(),e,i);return s=s&&""!==s.trim()?' style="'+s+'"':"",""+r+""},s.ths=function(){var t="",e=0,i=[].slice.apply(arguments[0]),n=[].slice.apply(arguments[1]);for(e;e\n",t+="\n"},s.tr=function(){var t,e=[].slice.apply(arguments[0]),i=[].slice.apply(arguments[1]);return t="\n",t+=s.tds.apply(this,[e,i]),t+="\n"},t=function(t){var e,i,n=0,r=t.split("\n"),o=[];for(n;n"),i=e.substring(1,e.length-1).split("|"),0===u.length)for(c=0;c");e.trim().match(/^[|].*[|]$/);)e=e.trim(),a.push(s.tr.apply(this,[e.substring(1,e.length-1).split("|"),u])),e=r[++n];a.push(""),a.push(""),o.push(a.join("\n"));continue}e=r[--n]}o.push(e)}return o.join("\n")},{parse:t}};if(e.tables){var r=s();return r.parse(t)}return t}),n.subParser("unescapeSpecialChars",function(t){"use strict";return t=t.replace(/~E(\d+)E/g,function(t,e){var i=parseInt(e);return String.fromCharCode(i)})});var l=this;"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define("showdown",function(){"use strict";return n}):l.showdown=n}.call(this),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.toMarkdown=t()}}(function(){return function t(e,i,n){function s(o,a){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[o]={exports:{}};e[o][0].call(c.exports,function(t){var i=e[o][1][t];return s(i?i:t)},c,c.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o0;)for(e=s.shift(),r.push(e),i=e.childNodes,n=0;n<",">"+e+"<")}function u(t,e){if("string"==typeof e)return e===t.nodeName.toLowerCase();if(Array.isArray(e))return-1!==e.indexOf(t.nodeName.toLowerCase());if("function"==typeof e)return e.call(p,t); + +throw new TypeError("`filter` needs to be a string, array, or function")}function c(t,e){var i,s,r;return"left"===t?(i=e.previousSibling,s=/ $/):(i=e.nextSibling,s=/^ /),i&&(3===i.nodeType?r=s.test(i.nodeValue):1!==i.nodeType||n(i)||(r=s.test(i.textContent))),r}function h(t,e){var i="",s="";if(!n(t)){var r=/^[ \r\n\t]/.test(e),o=/[ \r\n\t]$/.test(e);r&&!c("left",t)&&(i=" "),o&&!c("right",t)&&(s=" ")}return{leading:i,trailing:s}}function d(t){var e,i=a(t);if(!s(t)&&!/A|TH|TD/.test(t.nodeName)&&/^\s*$/i.test(i))return void(t._replacement="");for(var n=0;n=0;l--)d(s[l]);return i=a(n),i.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g,"").replace(/\n\s+\n/g,"\n\n").replace(/\n{3,}/g,"\n\n")},p.isBlock=n,p.isVoid=s,p.outer=l,e.exports=p},{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":7}],2:[function(t,e,i){"use strict";function n(t,e){var i=Array.prototype.indexOf.call(e.parentNode.childNodes,e),n=" ";return 0===i&&(n="| "),n+t+" |"}var s=/highlight highlight-(\S+)/;e.exports=[{filter:"br",replacement:function(){return"\n"}},{filter:["del","s","strike"],replacement:function(t){return"~~"+t+"~~"}},{filter:function(t){return"checkbox"===t.type&&"LI"===t.parentNode.nodeName},replacement:function(t,e){return(e.checked?"[x]":"[ ]")+" "}},{filter:["th","td"],replacement:function(t,e){return n(t,e)}},{filter:"tr",replacement:function(t,e){var i="",s={left:":--",right:"--:",center:":-:"};if("THEAD"===e.parentNode.nodeName)for(var r=0;rs;s++)n+="#";return"\n\n"+n+" "+t+"\n\n"}},{filter:"hr",replacement:function(){return"\n\n* * *\n\n"}},{filter:["em","i"],replacement:function(t){return"_"+t+"_"}},{filter:["strong","b"],replacement:function(t){return"**"+t+"**"}},{filter:["u"],replacement:function(t){return"_"+t+"_"}},{filter:["del","s","strike"],replacement:function(t){return"~~"+t+"~~"}},{filter:"div",replacement:function(t){return t+"\n\n"}},{filter:function(t){var e=t.previousSibling||t.nextSibling,i="PRE"===t.parentNode.nodeName&&!e;return"CODE"===t.nodeName&&!i},replacement:function(t){return"`"+t+"`"}},{filter:function(t){return"A"===t.nodeName&&t.getAttribute("href")},replacement:function(t,e){var i=e.title?' "'+e.title+'"':"";return"["+t+"]("+e.getAttribute("href")+i+")"}},{filter:"video",replacement:function(t,e){for(var i,n=e.getAttribute("alt")||"",s=0;s "),"\n\n"+t+"\n\n"}},{filter:"li",replacement:function(t,e){t=t.replace(/^\s+/,"").replace(/\n/gm,"\n ");var i="* ",n=e.parentNode,s=Array.prototype.indexOf.call(n.children,e)+1;return i=/ol/i.test(n.nodeName)?s+". ":"* ",i+t}},{filter:["ul","ol"],replacement:function(t,e){for(var i=[],n=0;n