L&&r>q&&t.charAt(n-L-1)==e.charAt(r-q-1);)L++,q++;if(a[x]=L,L>n)y+=2;else if(q>r)m+=2;else if(!d){var T=o+p-N;if(T>=0&&l>T&&-1!=u[T]){var E=u[T],A=o+E-T;if(L=n-L,E>=L)return s(t,e,E,A)}}}}return[[h,t],[f,e]]}function s(t,e,n,i){var o=t.substring(0,n),s=e.substring(0,i),l=t.substring(n),u=e.substring(i),a=r(o,s),c=r(l,u);return a.concat(c)}function l(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;i>n;)t.substring(o,i)==e.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function u(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;i>n;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function a(t,e){function n(t,e,n){for(var r,i,o,s,a=t.substring(n,n+Math.floor(t.length/4)),c=-1,h="";-1!=(c=e.indexOf(a,c+1));){var f=l(t.substring(n),e.substring(c)),p=u(t.substring(0,n),e.substring(0,c));h.length=t.length?[r,i,o,s,h]:null}var r=t.length>e.length?t:e,i=t.length>e.length?e:t;if(r.length<4||2*i.lengtha[4].length?s:a:s;var c,h,f,p;t.length>e.length?(c=o[0],h=o[1],f=o[2],p=o[3]):(f=o[0],p=o[1],c=o[2],h=o[3]);var d=o[4];return[c,h,f,p,d]}function c(t){t.push([p,""]);for(var e,n=0,r=0,i=0,o="",s="";n1?(0!==r&&0!==i&&(e=l(s,o),0!==e&&(n-r-i>0&&t[n-r-i-1][0]==p?t[n-r-i-1][1]+=s.substring(0,e):(t.splice(0,0,[p,s.substring(0,e)]),n++),s=s.substring(e),o=o.substring(e)),e=u(s,o),0!==e&&(t[n][1]=s.substring(s.length-e)+t[n][1],s=s.substring(0,s.length-e),o=o.substring(0,o.length-e))),0===r?t.splice(n-i,r+i,[f,s]):0===i?t.splice(n-r,r+i,[h,o]):t.splice(n-r-i,r+i,[h,o],[f,s]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&t[n-1][0]==p?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(n=1;n0))return[void 0,t];if(n=this.toDelta().length(),t===n)return[this.lines.last,this.lines.last.length];if(t>n)return[void 0,t-n];for(e=this.lines.first;null!=e;){if(t\s+\ <")},t.prototype.insertLineBefore=function(t,e){var n;return n=new s(this,t),null!=e?(c(t.parentNode).isElement()||this.root.insertBefore(t,e.node),this.lines.insertAfter(e.prev,n)):(c(t.parentNode).isElement()||this.root.appendChild(t),this.lines.append(n)),n},t.prototype.mergeLines=function(t,e){return e.length>1&&(1===t.length&&c(t.leaves.last.node).remove(),a.each(c(e.node).childNodes(),function(e){return e.tagName!==c.DEFAULT_BREAK_TAG?t.node.appendChild(e):void 0})),this.removeLine(e),t.rebuild()},t.prototype.optimizeLines=function(){return a.each(this.lines.toArray(),function(t,e){return t.optimize(),!0})},t.prototype.rebuild=function(){var t,e,n;for(e=this.lines.toArray(),t=this.root.firstChild,null!=t&&null!=c.LIST_TAGS[t.tagName]&&(t=t.firstChild),a.each(e,function(e){return function(n,r){for(var i,o;n.node!==t;){if(n.node.parentNode!==e.root&&(null!=(o=n.node.parentNode)?o.parentNode:void 0)!==e.root)return e.removeLine(n);t=e.normalizer.normalizeLine(t),i=e.insertLineBefore(t,n),t=c(t).nextLineNode(e.root)}return n.outerHTML!==t.outerHTML&&(n.node=e.normalizer.normalizeLine(n.node),n.rebuild()),t=c(t).nextLineNode(e.root)}}(this)),n=[];null!=t;)t=this.normalizer.normalizeLine(t),this.appendLine(t),n.push(t=c(t).nextLineNode(this.root));return n},t.prototype.removeLine=function(t){return null!=t.node.parentNode&&(c.LIST_TAGS[t.node.parentNode.tagName]&&1===t.node.parentNode.childNodes.length?c(t.node.parentNode).remove():c(t.node).remove()),this.lines.remove(t)},t.prototype.setHTML=function(t){return t=u.stripComments(t),t=u.stripWhitespace(t),this.root.innerHTML=t,this.lines=new l,this.rebuild()},t.prototype.splitLine=function(t,e){var n,r,i,o;return e=Math.min(e,t.length-1),o=c(t.node).split(e,!0),n=o[0],r=o[1],t.node=n,t.rebuild(),i=this.insertLineBefore(r,t.next),i.formats=a.clone(t.formats),i.resetContent(),i},t.prototype.toDelta=function(){var t,e;return e=this.lines.toArray(),t=new r,a.each(e,function(e){return a.each(e.delta.ops,function(e){return t.push(e)})}),t},t}(),e.exports=i},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],9:[function(t,e,n){var r,i,o,s,l,u,a;u=t("lodash"),r=t("rich-text/lib/delta"),a=t("../lib/dom"),i=t("./document"),s=t("./line"),l=t("./selection"),o=function(){function t(t,e,n){this.root=t,this.quill=e,this.options=null!=n?n:{},this.root.setAttribute("id",this.options.id),this.doc=new i(this.root,this.options),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.selection=new l(this.doc,this.quill),this.timer=setInterval(u.bind(this.checkUpdate,this),this.options.pollInterval),this.savedRange=null,this.quill.on("selection-change",function(t){return function(e){return t.savedRange=e}}(this)),this.options.readOnly||this.enable()}return t.sources={API:"api",SILENT:"silent",USER:"user"},t.prototype.destroy=function(){return clearInterval(this.timer)},t.prototype.disable=function(){return this.enable(!1)},t.prototype.enable=function(t){return null==t&&(t=!0),this.root.setAttribute("contenteditable",t)},t.prototype.applyDelta=function(e,n){var r;return r=this._update(),r&&(e=r.transform(e,!0),r=e.transform(r,!1)),e.ops.length>0&&(e=this._trackDelta(function(t){return function(){var n;return n=0,u.each(e.ops,function(e){return u.isString(e.insert)?(t._insertAt(n,e.insert,e.attributes),n+=e.insert.length):u.isNumber(e.insert)?(t._insertEmbed(n,e.attributes),n+=1):u.isNumber(e["delete"])?t._deleteAt(n,e["delete"]):u.isNumber(e.retain)?(u.each(e.attributes,function(r,i){return t._formatAt(n,e.retain,i,r)}),n+=e.retain):void 0}),t.selection.shiftAfter(0,0,u.bind(t.doc.optimizeLines,t.doc))}}(this)),this.delta=this.doc.toDelta(),this.length=this.delta.length(),this.innerHTML=this.root.innerHTML,e&&n!==t.sources.SILENT&&this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,e,n)),r&&r.ops.length>0&&n!==t.sources.SILENT?this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,r,t.sources.USER):void 0},t.prototype.checkUpdate=function(e){var n;return null==e&&(e="user"),null==this.root.parentNode?clearInterval(this.timer):(n=this._update(),n&&(this.delta=this.delta.compose(n),this.length=this.delta.length(),this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,n,e)),n&&(e=t.sources.SILENT),this.selection.update(e))},t.prototype.focus=function(){return null!=this.selection.range?this.selection.setRange(this.selection.range):this.root.focus()},t.prototype.getBounds=function(t){var e,n,r,i,o,s,l;return this.checkUpdate(),s=this.doc.findLeafAt(t,!0),r=s[0],i=s[1],null==r?null:(n=this.root.parentNode.getBoundingClientRect(),l="left",0===r.length?e=r.node.parentNode.getBoundingClientRect():a.VOID_TAGS[r.node.tagName]?(e=r.node.getBoundingClientRect(),1===i&&(l="right")):(o=document.createRange(),i=e?void 0:this.selection.shiftAfter(t,-1*e,function(n){return function(){var r,i,o,s,l,u,a;for(a=n.doc.findLineAt(t),o=a[0],u=a[1],r=o,s=o.length-u<=e&&u>0;null!=r&&e>0;)l=r.next,i=Math.min(r.length-u,e),0===u&&e>=r.length?n.doc.removeLine(r):r.deleteText(u,i),e-=i,r=l,u=0;return s&&o.next?n.doc.mergeLines(o,o.next):void 0}}(this))},t.prototype._formatAt=function(t,e,n,r){return this.selection.shiftAfter(t,0,function(i){return function(){var o,s,l,u,a;for(u=i.doc.findLineAt(t),s=u[0],l=u[1],a=[];null!=s&&e>0;)o=Math.min(e,s.length-l-1),s.formatText(l,o,n,r),e-=o,e>0&&s.format(n,r),e-=1,l=0,a.push(s=s.next);return a}}(this))},t.prototype._insertEmbed=function(t,e){return this.selection.shiftAfter(t,1,function(n){return function(){var r,i,o;return o=n.doc.findLineAt(t),r=o[0],i=o[1],r.insertEmbed(i,e)}}(this))},t.prototype._insertAt=function(t,e,n){return null==n&&(n={}),this.selection.shiftAfter(t,e.length,function(r){return function(){var i,o,s,l;return e=e.replace(/\r\n?/g,"\n"),o=e.split("\n"),l=r.doc.findLineAt(t),i=l[0],s=l[1],u.each(o,function(t,e){var l;return null==i||i.length<=s?(e0)&&(i=r.doc.appendLine(document.createElement(a.DEFAULT_BLOCK_TAG)),s=0,i.insertText(s,t,n),i.format(n),l=null):(i.insertText(s,t,n),e0?t:!1)},t}(),e.exports=o},{"../lib/dom":17,"./document":8,"./line":12,"./selection":14,lodash:1,"rich-text/lib/delta":3}],10:[function(t,e,n){var r,i,o;i=t("lodash"),o=t("../lib/dom"),r=function(){function t(t){this.config=t}return t.types={LINE:"line",EMBED:"embed"},t.FORMATS={bold:{tag:"B",prepare:"bold"},italic:{tag:"I",prepare:"italic"},underline:{tag:"U",prepare:"underline"},strike:{tag:"S",prepare:"strikeThrough"},color:{style:"color","default":"rgb(0, 0, 0)",prepare:"foreColor"},background:{style:"backgroundColor","default":"rgb(255, 255, 255)",prepare:"backColor"},font:{style:"fontFamily","default":"'Helvetica', 'Arial', sans-serif",prepare:"fontName"},size:{style:"fontSize","default":"13px",prepare:function(t){return document.execCommand("fontSize",!1,o.convertFontSize(t))}},link:{tag:"A",add:function(t,e){return t.setAttribute("href",e),t},remove:function(t){return t.removeAttribute("href"),t},value:function(t){return t.getAttribute("href")}},image:{type:t.types.EMBED,tag:"IMG",attribute:"src"},align:{type:t.types.LINE,style:"textAlign","default":"left"},bullet:{type:t.types.LINE,exclude:"list",parentTag:"UL",tag:"LI"},list:{type:t.types.LINE,exclude:"bullet",parentTag:"OL",tag:"LI"}},t.prototype.add=function(e,n){var r,s,l,u,a;return n?this.value(e)===n?e:(i.isString(this.config.parentTag)&&(l=e.parentNode,l.tagName!==this.config.parentTag&&(l=document.createElement(this.config.parentTag),o(e).wrap(l)),e.parentNode.tagName===(null!=(u=e.parentNode.previousSibling)?u.tagName:void 0)&&o(e.parentNode.previousSibling).merge(e.parentNode),e.parentNode.tagName===(null!=(a=e.parentNode.nextSibling)?a.tagName:void 0)&&o(e.parentNode).merge(e.parentNode.nextSibling)),i.isString(this.config.tag)&&e.tagName!==this.config.tag&&(r=document.createElement(this.config.tag),null!=o.VOID_TAGS[r.tagName]?(null!=e.parentNode&&o(e).replace(r),e=r):this.isType(t.types.LINE)?e=o(e).switchTag(this.config.tag).get():(o(e).wrap(r),e=r)),(i.isString(this.config.style)||i.isString(this.config.attribute)||i.isString(this.config["class"]))&&(i.isString(this.config["class"])&&(e=this.remove(e)),o(e).isTextNode()&&(s=document.createElement(o.DEFAULT_INLINE_TAG),o(e).wrap(s),e=s),i.isString(this.config.style)&&n!==this.config["default"]&&(e.style[this.config.style]=n),i.isString(this.config.attribute)&&e.setAttribute(this.config.attribute,n),i.isString(this.config["class"])&&o(e).addClass(this.config["class"]+n)),i.isFunction(this.config.add)&&(e=this.config.add(e,n)),e):this.remove(e)},t.prototype.isType=function(t){return t===this.config.type},t.prototype.match=function(t){var e,n,r,s,l;if(!o(t).isElement())return!1;if(i.isString(this.config.parentTag)&&(null!=(s=t.parentNode)?s.tagName:void 0)!==this.config.parentTag)return!1;if(i.isString(this.config.tag)&&t.tagName!==this.config.tag)return!1;if(i.isString(this.config.style)&&(!t.style[this.config.style]||t.style[this.config.style]===this.config["default"]))return!1;if(i.isString(this.config.attribute)&&!t.hasAttribute(this.config.attribute))return!1;if(i.isString(this.config["class"])){for(l=o(t).classes(),n=0,r=l.length;r>n;n++)if(e=l[n],0===e.indexOf(this.config["class"]))return!0;return!1}return!0},t.prototype.prepare=function(t){return i.isString(this.config.prepare)?document.execCommand(this.config.prepare,!1,t):i.isFunction(this.config.prepare)?this.config.prepare(t):void 0},t.prototype.remove=function(e){var n,r,s,l;if(!this.match(e))return e;if(i.isString(this.config.style)&&(e.style[this.config.style]="",e.getAttribute("style")||e.removeAttribute("style")),i.isString(this.config.attribute)&&e.removeAttribute(this.config.attribute),i.isString(this.config["class"]))for(l=o(e).classes(),r=0,s=l.length;s>r;r++)n=l[r],0===n.indexOf(this.config["class"])&&o(e).removeClass(n);if(i.isString(this.config.tag))if(this.isType(t.types.LINE))i.isString(this.config.parentTag)&&(null!=e.previousSibling&&o(e).splitBefore(e.parentNode.parentNode),null!=e.nextSibling&&o(e.nextSibling).splitBefore(e.parentNode.parentNode)),e=o(e).switchTag(o.DEFAULT_BLOCK_TAG).get();else{if(this.isType(t.types.EMBED))return void o(e).remove();e=o(e).switchTag(o.DEFAULT_INLINE_TAG).get()}return i.isString(this.config.parentTag)&&o(e.parentNode).unwrap(),i.isFunction(this.config.remove)&&(e=this.config.remove(e)),e.tagName!==o.DEFAULT_INLINE_TAG||e.hasAttributes()||(e=o(e).unwrap()),e},t.prototype.value=function(t){var e,n,r,s;if(!this.match(t))return void 0;if(this.config.value)return this.config.value(t);if(i.isString(this.config.attribute))return t.getAttribute(this.config.attribute)||void 0;if(i.isString(this.config.style))return t.style[this.config.style]||void 0;if(i.isString(this.config["class"])){for(s=o(t).classes(),n=0,r=s.length;r>n;n++)if(e=s[n],0===e.indexOf(this.config["class"]))return e.slice(this.config["class"].length)}else if(i.isString(this.config.tag))return!0;return void 0},t}(),e.exports=r},{"../lib/dom":17,lodash:1}],11:[function(t,e,n){var r,i,o,s,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;s=t("lodash"),l=t("../lib/dom"),r=t("./format"),o=t("../lib/linked-list"),i=function(t){function e(t,n){this.node=t,this.formats=s.clone(n),this.text=l(this.node).text(),this.length=this.text.length,l(this.node).data(e.DATA_KEY,this)}return u(e,t),e.DATA_KEY="leaf",e.isLeafNode=function(t){return l(t).isTextNode()||null==t.firstChild},e.prototype.deleteText=function(t,n){var r;if(n>0)return this.text=this.text.slice(0,t)+this.text.slice(t+n),this.length=this.text.length,null!=l.EMBED_TAGS[this.node.tagName]?(r=document.createTextNode(this.text),l(r).data(e.DATA_KEY,this),this.node=l(this.node).replace(r).get()):l(this.node).text(this.text)},e.prototype.insertText=function(t,n){var r;return this.text=this.text.slice(0,t)+n+this.text.slice(t),l(this.node).isTextNode()?l(this.node).text(this.text):(r=document.createTextNode(n),l(r).data(e.DATA_KEY,this),this.node.tagName===l.DEFAULT_BREAK_TAG?this.node=l(this.node).replace(r).get():(this.node.appendChild(r),this.node=r)),this.length=this.text.length},e}(o.Node),e.exports=i},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,lodash:1}],12:[function(t,e,n){var r,i,o,s,l,u,a,c,h=function(t,e){function n(){this.constructor=t}for(var r in e)f.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;a=t("lodash"),r=t("rich-text/lib/delta"),c=t("../lib/dom"),i=t("./format"),o=t("./leaf"),s=t("./line"),l=t("../lib/linked-list"),u=t("./normalizer"),s=function(t){function e(t,n){this.doc=t,this.node=n,this.formats={},this.rebuild(),e.__super__.constructor.call(this,this.node)}return h(e,t),e.DATA_KEY="line",e.prototype.buildLeaves=function(t,e){return a.each(c(t).childNodes(),function(t){return function(n){var r;return n=t.doc.normalizer.normalizeNode(n),r=a.clone(e),a.each(t.doc.formats,function(t,e){return!t.isType(i.types.LINE)&&t.match(n)?r[e]=t.value(n):void 0}),o.isLeafNode(n)?t.leaves.append(new o(n,r)):t.buildLeaves(n,r)}}(this))},e.prototype.deleteText=function(t,e){var n,r,i;if(e>0){for(i=this.findLeafAt(t),r=i[0],t=i[1];null!=r&&e>0;)n=Math.min(e,r.length-t),r.deleteText(t,n),e-=n,r=r.next,t=0;return this.rebuild()}},e.prototype.findLeaf=function(t){return null!=t?c(t).data(o.DATA_KEY):void 0},e.prototype.findLeafAt=function(t,e){var n;if(null==e&&(e=!1),t>=this.length-1)return[this.leaves.last,this.leaves.last.length];for(n=this.leaves.first;null!=n;){if(t0;){if(a=s.next,r&&s.formats[n]!==r||!r&&null!=s.formats[n]){if(g=s.node,null!=s.formats[n]){for(c(g).splitBefore(this.node);!o.match(g);)g=g.parentNode;c(g).split(s.length)}l>0&&(f=c(g).split(l),u=f[0],g=f[1]),s.length>l+e&&(p=c(g).split(e),g=p[0],d=p[1]),o.add(g,r)}e-=s.length-l,l=0,s=a}return this.rebuild()}},e.prototype._insert=function(t,e,n){var r,o,s,l,u,h;return u=this.findLeafAt(t),r=u[0],o=u[1],e=a.reduce(n,function(t){return function(e,n,r){var o;return o=t.doc.formats[r],null==o||o.isType(i.types.LINE)||(e=o.add(e,n)),e}}(this),e),h=c(r.node).split(o),l=h[0],s=h[1],s&&(s=c(s).splitBefore(this.node).get()),this.node.insertBefore(e,s),this.rebuild()},e.prototype.insertEmbed=function(t,e){var n,r,o,s,l,u,h,f;return h=this.findLeafAt(t),r=h[0],o=h[1],f=c(r.node).split(o),u=f[0],s=f[1],n=a.find(Object.keys(e),function(t){return function(e){return t.doc.formats[e].isType(i.types.EMBED)}}(this)),l=this.doc.formats[n].add({},e[n]),e=a.clone(e),delete e[n],this._insert(t,l,e)},e.prototype.insertText=function(t,e,n){var r,i,o;return null==n&&(n={}),e.length>0?(o=this.findLeafAt(t),r=o[0],i=o[1],a.isEqual(r.formats,n)?(r.insertText(i,e),this.resetContent()):this._insert(t,document.createTextNode(e),n)):void 0},e.prototype.optimize=function(){return u.optimizeLine(this.node),this.rebuild()},e.prototype.rebuild=function(t){return null==t&&(t=!1),!t&&null!=this.outerHTML&&this.outerHTML===this.node.outerHTML&&a.all(this.leaves.toArray(),function(t){return function(e){return c(e.node).isAncestor(t.node)}}(this))?!1:(this.node=this.doc.normalizer.normalizeNode(this.node),0!==c(this.node).length()||this.node.querySelector(c.DEFAULT_BREAK_TAG)||this.node.appendChild(document.createElement(c.DEFAULT_BREAK_TAG)),this.leaves=new l,this.formats=a.reduce(this.doc.formats,function(t){return function(e,n,r){return n.isType(i.types.LINE)&&(n.match(t.node)?e[r]=n.value(t.node):delete e[r]),e}}(this),this.formats),this.buildLeaves(this.node,{}),this.resetContent(),!0)},e.prototype.resetContent=function(){return c(this.node).data(e.DATA_KEY,this),this.outerHTML=this.node.outerHTML,this.length=1,this.delta=new r,a.each(this.leaves.toArray(),function(t){return function(e){return t.length+=e.length,null!=c.EMBED_TAGS[e.node.tagName]?t.delta.insert(1,e.formats):t.delta.insert(e.text,e.formats)}}(this)),this.delta.insert("\n",this.formats)},e}(l.Node),e.exports=s},{"../lib/dom":17,"../lib/linked-list":18,"./format":10,"./leaf":11,"./line":12,"./normalizer":13,lodash:1,"rich-text/lib/delta":3}],13:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../lib/dom"),o=function(t){return t=t.replace(/(?:^|[-_])(\w)/g,function(t,e){return e?e.toUpperCase():""}),t.charAt(0).toLowerCase()+t.slice(1)},r=function(){function t(){this.whitelist={styles:{},tags:{}},this.whitelist.tags[s.DEFAULT_BREAK_TAG]=!0,this.whitelist.tags[s.DEFAULT_BLOCK_TAG]=!0,this.whitelist.tags[s.DEFAULT_INLINE_TAG]=!0}return t.ALIASES={STRONG:"B",EM:"I",DEL:"S",STRIKE:"S"},t.ATTRIBUTES={color:"color",face:"fontFamily",size:"fontSize"},t.prototype.addFormat=function(t){return null!=t.tag&&(this.whitelist.tags[t.tag]=!0),null!=t.parentTag&&(this.whitelist.tags[t.parentTag]=!0),null!=t.style?this.whitelist.styles[t.style]=!0:void 0},t.prototype.normalizeLine=function(e){return e=t.wrapInline(e),e=t.handleBreaks(e),"LI"===e.tagName&&t.flattenList(e),e=t.pullBlocks(e),e=this.normalizeNode(e),t.unwrapText(e),null!=e&&null!=s.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalizeNode=function(e){return s(e).isTextNode()?e:(i.each(t.ATTRIBUTES,function(t,n){var r;return e.hasAttribute(n)?(r=e.getAttribute(n),"size"===n&&(r=s.convertFontSize(r)),e.style[t]=r,e.removeAttribute(n)):void 0}),("bold"===e.style.fontWeight||e.style.fontWeight>500)&&(e.style.fontWeight="",s(e).wrap(document.createElement("b")),e=e.parentNode),this.whitelistStyles(e),this.whitelistTags(e))},t.prototype.whitelistStyles=function(t){var e,n;return e=s(t).styles(),n=i.omit(e,function(t){return function(e,n){return null==t.whitelist.styles[o(n)]}}(this)),Object.keys(n).length0?s(t).styles(n,!0):t.removeAttribute("style"):void 0},t.prototype.whitelistTags=function(e){return s(e).isElement()?(null!=t.ALIASES[e.tagName]?e=s(e).switchTag(t.ALIASES[e.tagName]).get():null==this.whitelist.tags[e.tagName]&&(e=null!=s.BLOCK_TAGS[e.tagName]?s(e).switchTag(s.DEFAULT_BLOCK_TAG).get():e.hasAttributes()||null==e.firstChild?s(e).switchTag(s.DEFAULT_INLINE_TAG).get():s(e).unwrap()),e):e},t.flattenList=function(t){var e,n,r;return r=t.nextSibling,e=i.map(t.querySelectorAll("li")),e.forEach(function(e){return t.parentNode.insertBefore(e,r),r=e.nextSibling}),n=i.map(t.querySelectorAll(Object.keys(s.LIST_TAGS).join(","))),n.forEach(function(t){return s(t).remove()})},t.handleBreaks=function(t){var e;return e=i.map(t.querySelectorAll(s.DEFAULT_BREAK_TAG)),i.each(e,function(e){return function(e){return null==e.nextSibling||s.isIE(10)&&null==e.previousSibling?void 0:s(e.nextSibling).splitBefore(t.parentNode)}}(this)),t},t.optimizeLine=function(t){var e,n,r,o;for(t.normalize(),e=s(t).length(),r=s(t).descendants(),o=[];r.length>0;)n=r.pop(),null!=(null!=n?n.parentNode:void 0)&&null==s.EMBED_TAGS[n.tagName]&&(n.tagName===s.DEFAULT_BREAK_TAG?o.push(0!==e?s(n).remove():void 0):0===s(n).length()?(r.push(n.nextSibling),o.push(s(n).unwrap())):null!=n.previousSibling&&n.tagName===n.previousSibling.tagName&&i.isEqual(s(n).attributes(),s(n.previousSibling).attributes())?(r.push(n.firstChild),o.push(s(n.previousSibling).merge(n))):o.push(void 0));return o},t.pullBlocks=function(e){var n;for(n=e.firstChild;null!=n;){if(null!=s.BLOCK_TAGS[n.tagName]&&"LI"!==n.tagName){s(n).isolate(e.parentNode),null!=s.LIST_TAGS[n.tagName]&&n.firstChild?(s(n.parentNode).unwrap(),null==e.parentNode&&(e=n)):(s(n).unwrap(),t.pullBlocks(e));break}n=n.nextSibling}return e},t.stripComments=function(t){return t.replace(//g,"")},t.stripWhitespace=function(t){return t=t.trim(),t=t.replace(/(\r?\n|\r)+/g," "),t=t.replace(/\>\s+\<")},t.wrapInline=function(t){var e,n;if(null!=s.BLOCK_TAGS[t.tagName])return t;for(e=document.createElement(s.DEFAULT_BLOCK_TAG),t.parentNode.insertBefore(e,t);null!=t&&null==s.BLOCK_TAGS[t.tagName];)n=t.nextSibling,e.appendChild(t),t=n;return e},t.unwrapText=function(t){var e;return e=i.map(t.querySelectorAll(s.DEFAULT_INLINE_TAG)),i.each(e,function(t){return t.hasAttributes()?void 0:s(t).unwrap()})},t}(),e.exports=r},{"../lib/dom":17,lodash:1}],14:[function(t,e,n){var r,i,o,s,l,u;l=t("lodash"),u=t("../lib/dom"),r=t("./leaf"),i=t("./normalizer"),o=t("../lib/range"),s=function(){function t(t,e){this.doc=t,this.emitter=e,this.focus=!1,this.range=new o(0,0),this.nullDelay=!1,this.update("silent")}return t.prototype.checkFocus=function(){return document.activeElement===this.doc.root},t.prototype.getRange=function(t){var e,n,r;return null==t&&(t=!1),this.checkFocus()?(n=this._getNativeRange(),null==n?null:(r=this._positionToIndex(n.startContainer,n.startOffset),e=n.startContainer===n.endContainer&&n.startOffset===n.endOffset?r:this._positionToIndex(n.endContainer,n.endOffset),new o(Math.min(r,e),Math.max(r,e)))):t?this.range:null},t.prototype.preserve=function(t){var e,n,r,i,o,s,l,u,a;return r=this._getNativeRange(),null!=r&&this.checkFocus()?(i=this._encodePosition(r.startContainer,r.startOffset),u=i[0],a=i[1],o=this._encodePosition(r.endContainer,r.endOffset),e=o[0],n=o[1],t(),s=this._decodePosition(u,a),u=s[0],a=s[1],l=this._decodePosition(e,n),e=l[0],n=l[1],this._setNativeRange(u,a,e,n)):t()},t.prototype.scrollIntoView=function(){var t,e,n,r,i,o,s,l,u;if(this.range)return n=this.emitter.editor,u=n.getBounds(this.range.start),r=this.range.isCollapsed()?u:n.getBounds(this.range.end),t=n.root.parentNode.getBoundingClientRect(),e=t.bottom-t.top,e0&&(t=e.getRangeAt(0),u(t.startContainer).isAncestor(this.doc.root,!0)&&(t.startContainer===t.endContainer||u(t.endContainer).isAncestor(this.doc.root,!0)))?t:null},t.prototype._indexToPosition=function(t){var e,n,r;return 0===this.doc.lines.length?[this.doc.root,0]:(r=this.doc.findLeafAt(t,!0),e=r[0],n=r[1],this._decodePosition(e.node,n))},t.prototype._positionToIndex=function(t,e){var n,r,i,o,s,l;if(u.isIE(10)&&"BR"===t.tagName&&1===e&&(e=0),l=this._encodePosition(t,e),r=l[0],e=l[1],o=this.doc.findLine(r),null==o)return 0;for(n=o.findLeaf(r),s=0;null!=o.prev;)o=o.prev,s+=o.length;if(null==n)return s;for(i=0;null!=n.prev;)n=n.prev,i+=n.length;return s+i+e},t.prototype._setNativeRange=function(t,e,n,r){var i,o;if(o=document.getSelection())if(null!=t){if(this.checkFocus()||this.doc.root.focus(),i=this._getNativeRange(),null==i||t!==i.startContainer||e!==i.startOffset||n!==i.endContainer||r!==i.endOffset)return o.removeAllRanges(),i=document.createRange(),i.setStart(t,e),i.setEnd(n,r),o.addRange(i)}else if(o.removeAllRanges(),this.doc.root.blur(),u.isIE(11)&&!u.isIE(9))return document.body.focus()},t}(),e.exports=s},{"../lib/dom":17,"../lib/range":20,"./leaf":11,"./normalizer":13,lodash:1}],15:[function(t,e,n){t("./modules/authorship"),t("./modules/image-tooltip"),t("./modules/keyboard"),t("./modules/link-tooltip"),t("./modules/multi-cursor"),t("./modules/paste-manager"),t("./modules/toolbar"),t("./modules/tooltip"),t("./modules/undo-manager"),e.exports=t("./quill")},{"./modules/authorship":21,"./modules/image-tooltip":22,"./modules/keyboard":23,"./modules/link-tooltip":24,"./modules/multi-cursor":25,"./modules/paste-manager":26,"./modules/toolbar":27,"./modules/tooltip":28,"./modules/undo-manager":29,"./quill":30}],16:[function(t,e,n){var r,i,o,s=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;o=t("./dom"),i=t("./picker"),r=function(t){function e(){e.__super__.constructor.apply(this,arguments),o(this.container).addClass("ql-color-picker")}return s(e,t),e.prototype.buildItem=function(t,n,r){var i;return i=e.__super__.buildItem.call(this,t,n,r),i.style.backgroundColor=n.value,i},e}(i),e.exports=r},{"./dom":17,"./picker":19}],17:[function(t,e,n){var r,i,o,s,l,u=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;o=t("lodash"),l=null,i=function(){function t(t){this.node=t,this.trigger=u(this.trigger,this)}return t.prototype.addClass=function(t){return this.hasClass(t)?void 0:(null!=this.node.classList?this.node.classList.add(t):null!=this.node.className&&(this.node.className=(this.node.className+" "+t).trim()),this)},t.prototype.attributes=function(t){var e,n,r,i,s,l;if(t)return o.each(t,function(t){return function(e,n){return t.node.setAttribute(n,e)}}(this)),this;if(null==this.node.attributes)return{};for(t={},s=this.node.attributes,n=r=0,i=s.length;i>r;n=++r)l=s[n],e=this.node.attributes[n],t[e.name]=e.value;return t},t.prototype.child=function(t){var e,n;for(e=this.node.firstChild,n=s(e).length();null!=e&&!(n>t);)t-=n,e=e.nextSibling,n=s(e).length();return null==e&&(e=this.node.lastChild,t=s(e).length()),[e,t]},t.prototype.childNodes=function(){return o.map(this.node.childNodes)},t.prototype.classes=function(){return this.node.className.split(/\s+/)},t.prototype.data=function(t,e){var n;return null!=e?(null==this.node["ql-data"]&&(this.node["ql-data"]={}),this.node["ql-data"][t]=e,this):null!=(n=this.node["ql-data"])?n[t]:void 0},t.prototype.descendants=function(){return o.map(this.node.getElementsByTagName("*"))},t.prototype.get=function(){return this.node},t.prototype.hasClass=function(t){return null!=this.node.classList?this.node.classList.contains(t):null!=this.node.className?this.classes().indexOf(t)>-1:!1},t.prototype.isAncestor=function(t,e){var n;if(null==e&&(e=!1),t===this.node)return e;for(n=this.node;n;){if(n===t)return!0;n=n.parentNode}return!1},t.prototype.isElement=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===s.ELEMENT_NODE},t.prototype.isTextNode=function(){var t;return(null!=(t=this.node)?t.nodeType:void 0)===s.TEXT_NODE},t.prototype.isolate=function(t){return null!=this.node.nextSibling&&s(this.node.nextSibling).splitBefore(t),this.splitBefore(t),this},t.prototype.length=function(){var t;return null==this.node?0:(t=this.text().length,this.isElement()&&(t+=this.node.querySelectorAll(Object.keys(s.EMBED_TAGS).join(",")).length),t)},t.prototype.merge=function(t){var e;return e=s(t),this.isElement()?(e.moveChildren(this.node),this.normalize()):this.text(this.text()+e.text()),e.remove(),this},t.prototype.moveChildren=function(t){return o.each(this.childNodes(),function(e){return t.appendChild(e)}),this},t.prototype.nextLineNode=function(t){var e;return e=this.node.nextSibling,null==e&&this.node.parentNode!==t&&(e=this.node.parentNode.nextSibling),null!=e&&null!=s.LIST_TAGS[e.tagName]&&(e=e.firstChild),e},t.prototype.normalize=function(){var t,e,n,r;for(e=this.node.firstChild;null!=e;)r=e.nextSibling,t=s(e),null!=r&&s(r).isTextNode()&&(0===t.text().length?t.remove():t.isTextNode()&&(n=r.nextSibling,t.merge(r),r=n)),e=r;return this},t.prototype.on=function(t,e){return this.node.addEventListener(t,function(n){return function(r){var i,o;return i=!l||"keydown"!==t&&"keyup"!==t?r:l,o=e.call(n.node,i),o||(r.preventDefault(),r.stopPropagation()),o}}(this)),this},t.prototype.remove=function(){var t;return null!=(t=this.node.parentNode)&&t.removeChild(this.node),this.node=null,null},t.prototype.removeClass=function(t){var e;if(this.hasClass(t))return null!=this.node.classList?this.node.classList.remove(t):null!=this.node.className&&(e=this.classes(),e.splice(e.indexOf(t),1),this.node.className=e.join(" ")),this.node.getAttribute("class")||this.node.removeAttribute("class"),this},t.prototype.replace=function(t){return this.node.parentNode.replaceChild(t,this.node),this.node=t,this},t.prototype.splitBefore=function(t,e){var n,r,i,o;if(null==e&&(e=!1),this.node===t||this.node.parentNode===t)return this;if(null!=this.node.previousSibling||e){for(i=this.node.parentNode,r=i.cloneNode(!1),i.parentNode.insertBefore(r,i.nextSibling),o=this.node;null!=o;)n=o.nextSibling,r.appendChild(o),o=n;return s(r).splitBefore(t)}return s(this.node.parentNode).splitBefore(t)},t.prototype.split=function(t,e){var n,r,i,o,l,u,a,c,h,f;if(null==e&&(e=!1),a=this.length(),t=Math.max(0,t),t=Math.min(t,a),!e&&0===t)return[this.node.previousSibling,this.node,!1];if(!e&&t===a)return[this.node,this.node.nextSibling,!1];if(this.node.nodeType===s.TEXT_NODE)return n=this.node.splitText(t),[this.node,n,!0];for(l=this.node,f=this.node.cloneNode(!1),this.node.parentNode.insertBefore(f,l.nextSibling),c=this.child(t),r=c[0],t=c[1],h=s(r).split(t),i=h[0],o=h[1];null!==o;)u=o.nextSibling,f.appendChild(o),o=u;return[l,f,!0]},t.prototype.styles=function(t,e){var n,r;return null==e&&(e=!1),t?(e||(t=o.defaults(t,this.styles())),r=o.map(t,function(t,e){return e+": "+t}).join("; ")+";",this.node.setAttribute("style",r),this):(r=this.node.getAttribute("style")||"",n=o.reduce(r.split(";"),function(t,e){var n,r,i;return r=e.split(":"),n=r[0],i=r[1],n&&i&&(n=n.trim(),i=i.trim(),t[n.toLowerCase()]=i),t},{}))},t.prototype.switchTag=function(t){var e,n;return t=t.toUpperCase(),this.node.tagName===t?this:(n=document.createElement(t),e=this.attributes(),null==s.VOID_TAGS[t]&&this.moveChildren(n),this.replace(n),this.node=n,this.attributes(e))},t.prototype.text=function(t){if(null!=t){switch(this.node.nodeType){case s.ELEMENT_NODE:this.node.textContent=t;break;case s.TEXT_NODE:this.node.data=t}return this}switch(this.node.nodeType){case s.ELEMENT_NODE:return this.node.tagName===s.DEFAULT_BREAK_TAG?"":null!=s.EMBED_TAGS[this.node.tagName]?s.EMBED_TEXT:null!=this.node.textContent?this.node.textContent:"";case s.TEXT_NODE:return this.node.data||"";default:return""}},t.prototype.textNodes=function(){var t,e,n;for(n=document.createTreeWalker(this.node,NodeFilter.SHOW_TEXT,null,!1),e=[];t=n.nextNode();)e.push(t);return e},t.prototype.toggleClass=function(t,e){return null==e&&(e=!this.hasClass(t)),e?this.addClass(t):this.removeClass(t),this},t.prototype.trigger=function(t,e){var n,r,i;return null==e&&(e={}),["keypress","keydown","keyup"].indexOf(t)<0?(n=document.createEvent("Event"),n.initEvent(t,e.bubbles,e.cancelable)):(n=document.createEvent("KeyboardEvent"),l=o.clone(e),l.which=o.isNumber(e.key)?e.key:o.isString(e.key)?e.key.toUpperCase().charCodeAt(0):0,s.isIE(10)?(i=[],e.altKey&&i.push("Alt"),e.ctrlKey&&i.push("Control"),e.metaKey&&i.push("Meta"),e.shiftKey&&i.push("Shift"),n.initKeyboardEvent(t,e.bubbles,e.cancelable,window,0,0,i.join(" "),null,null)):(r=o.isFunction(n.initKeyboardEvent)?"initKeyboardEvent":"initKeyEvent",n[r](t,e.bubbles,e.cancelable,window,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,0))),this.node.dispatchEvent(n),l=null,this},t.prototype.unwrap=function(){var t,e;return e=this.node.firstChild,t=this.node.nextSibling,o.each(this.childNodes(),function(e){return function(n){return e.node.parentNode.insertBefore(n,t)}}(this)),this.remove(),e},t.prototype.wrap=function(t){var e;for(null!=this.node.parentNode&&this.node.parentNode.insertBefore(t,this.node),e=t;null!=e.firstChild;)e=t.firstChild;return e.appendChild(this.node),this},t}(),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype["default"]=function(){return this.node.querySelector("option[selected]")},e.prototype.option=function(t,e){var n,r,i,s,l,u;if(null==e&&(e=!0),u=o.isElement(t)?t.value:t){for(u=u.replace(/[^\w]+/g,""),l=this.node.children,r=i=0,s=l.length;s>i;r=++i)if(n=l[r],n.value.replace(/[^\w]+/g,"")===u){this.node.selectedIndex=r;break}}else this.node.selectedIndex=-1;return e&&this.trigger("change"),this},e.prototype.reset=function(t){var e;return null==t&&(t=!0),e=this["default"](),null!=e?e.selected=!0:this.node.selectedIndex=0,t&&this.trigger("change"),this},e.prototype.value=function(){return this.node.selectedIndex>-1?this.node.options[this.node.selectedIndex].value:""},e}(i),s=function(t){return"SELECT"===(null!=t?t.tagName:void 0)?new r(t):new i(t)},s=o.extend(s,{ELEMENT_NODE:1,NOBREAK_SPACE:" ",TEXT_NODE:3,ZERO_WIDTH_NOBREAK_SPACE:"\ufeff",DEFAULT_BLOCK_TAG:"DIV",DEFAULT_BREAK_TAG:"BR",DEFAULT_INLINE_TAG:"SPAN",EMBED_TEXT:"!",FONT_SIZES:{"10px":1,"13px":2,"16px":3,"18px":4,"24px":5,"32px":6,"48px":7},KEYS:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},BLOCK_TAGS:{ADDRESS:"ADDRESS",ARTICLE:"ARTICLE",ASIDE:"ASIDE",AUDIO:"AUDIO",BLOCKQUOTE:"BLOCKQUOTE",CANVAS:"CANVAS",DD:"DD",DIV:"DIV",DL:"DL",FIGCAPTION:"FIGCAPTION",FIGURE:"FIGURE",FOOTER:"FOOTER",FORM:"FORM",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HEADER:"HEADER",HGROUP:"HGROUP",LI:"LI",OL:"OL",OUTPUT:"OUTPUT",P:"P",PRE:"PRE",SECTION:"SECTION",TABLE:"TABLE",TBODY:"TBODY",TD:"TD",TFOOT:"TFOOT",TH:"TH",THEAD:"THEAD",TR:"TR",UL:"UL",VIDEO:"VIDEO"},EMBED_TAGS:{IMG:"IMG"},LINE_TAGS:{DIV:"DIV",LI:"LI"},LIST_TAGS:{OL:"OL",UL:"UL"},VOID_TAGS:{AREA:"AREA",BASE:"BASE",BR:"BR",COL:"COL",COMMAND:"COMMAND",EMBED:"EMBED",HR:"HR",IMG:"IMG",INPUT:"INPUT",KEYGEN:"KEYGEN",LINK:"LINK",META:"META",PARAM:"PARAM",SOURCE:"SOURCE",TRACK:"TRACK",WBR:"WBR"},convertFontSize:function(t){var e,n,r,i;o.isString(t)&&t.indexOf("px")>-1?(r=Object.keys(s.FONT_SIZES),i=o.values(s.FONT_SIZES)):(i=Object.keys(s.FONT_SIZES),r=o.values(s.FONT_SIZES));for(e in r)if(n=r[e],parseInt(t)<=parseInt(n))return i[e];return o.last(i)},isIE:function(t){var e;return e=document.documentMode,e&&t>=e},isIOS:function(){return/iPhone|iPad/i.test(navigator.userAgent)},isMac:function(){return/Mac/i.test(navigator.platform)}}),e.exports=s},{lodash:1}],18:[function(t,e,n){var r,i;i=function(){function t(t){this.data=t,this.prev=this.next=null}return t}(),r=function(){function t(){this.length=0,this.first=this.last=null}return t.Node=i,t.prototype.append=function(t){return null!=this.first?(t.next=null,this.last.next=t):this.first=t,t.prev=this.last,this.last=t,this.length+=1},t.prototype.insertAfter=function(t,e){return e.prev=t,null!=t?(e.next=t.next,null!=t.next&&(t.next.prev=e),t.next=e,t===this.last&&(this.last=e)):(e.next=this.first,this.first.prev=e,this.first=e),this.length+=1},t.prototype.remove=function(t){return this.length>1?(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.first&&(this.first=t.next),t===this.last&&(this.last=t.prev)):this.first=this.last=null,t.prev=t.next=null,this.length-=1},t.prototype.toArray=function(){var t,e;for(t=[],e=this.first;null!=e;)t.push(e),e=e.next;return t},t}(),e.exports=r},{}],19:[function(t,e,n){var r,i,o;i=t("lodash"),o=t("./dom"),r=function(){function t(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),o(this.container).addClass("ql-picker"),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),o(document).on("click",function(t){return function(){return t.close(),!0}}(this)),o(this.label).on("click",function(t){return function(){return i.defer(function(){return o(t.container).toggleClass("ql-expanded")}),!1}}(this)),o(this.select).on("change",function(t){return function(){var e,n;return t.select.selectedIndex>-1&&(e=t.container.querySelectorAll(".ql-picker-item")[t.select.selectedIndex],n=t.select.options[t.select.selectedIndex]),t.selectItem(e,!1),o(t.label).toggleClass("ql-active",n!==o(t.select)["default"]())}}(this))}return t.TEMPLATE='',t.prototype.buildItem=function(t,e,n){var r;return r=document.createElement("span"),r.setAttribute("data-value",e.getAttribute("value")),o(r).addClass("ql-picker-item").text(o(e).text()).on("click",function(t){return function(){return t.selectItem(r,!0),t.close()}}(this)),this.select.selectedIndex===n&&this.selectItem(r,!1),r},t.prototype.buildPicker=function(){var e;return i.each(o(this.select).attributes(),function(t){return function(e,n){return t.container.setAttribute(n,e)}}(this)),this.container.innerHTML=t.TEMPLATE,this.label=this.container.querySelector(".ql-picker-label"),e=this.container.querySelector(".ql-picker-options"),i.each(this.select.options,function(t){return function(n,r){var i;return i=t.buildItem(e,n,r),e.appendChild(i)}}(this))},t.prototype.close=function(){return o(this.container).removeClass("ql-expanded")},t.prototype.selectItem=function(t,e){var n,r;return n=this.container.querySelector(".ql-selected"),null!=n&&o(n).removeClass("ql-selected"),null!=t?(r=t.getAttribute("data-value"),o(t).addClass("ql-selected"),o(this.label).text(o(t).text()),o(this.select).option(r,e),this.label.setAttribute("data-value",r)):(this.label.innerHTML=" ",this.label.removeAttribute("data-value"))},t}(),e.exports=r},{"./dom":17,lodash:1}],20:[function(t,e,n){var r,i;i=t("lodash"),r=function(){function t(t,e){this.start=t,this.end=e}return t.compare=function(t,e){return t===e?!0:null==t||null==e?!1:t.equals(e)},t.prototype.equals=function(t){return null==t?!1:this.start===t.start&&this.end===t.end},t.prototype.shift=function(t,e){var n;return n=i.map([this.start,this.end],function(n){return t>n?n:e>=0?n+e:Math.max(t,n+e)}),this.start=n[0],this.end=n[1],n},t.prototype.isCollapsed=function(){return this.start===this.end},t}(),e.exports=r},{lodash:1}],21:[function(t,e,n){var r,i,o,s,l;o=t("../quill"),s=o.require("lodash"),l=o.require("dom"),i=o.require("delta"),r=function(){function t(t,e){this.quill=t,this.options=e,null!=this.options.button&&this.attachButton(this.options.button),this.options.enabled&&this.enable(),this.quill.addFormat("author",{"class":"author-"}),null!=this.options.authorId&&(this.quill.on(this.quill.constructor.events.PRE_EVENT,function(t){return function(e,n,r){var l,u;return e===t.quill.constructor.events.TEXT_CHANGE&&"user"===r?(l=new i,u={author:t.options.authorId},s.each(n.ops,function(e){return null==e["delete"]?null!=e.insert||null!=e.retain&&null!=e.attributes?(e.attributes||(e.attributes={}),e.attributes.author=t.options.authorId,l.retain(e.retain||e.insert.length||1,u)):l.retain(e.retain):void 0}),t.quill.updateContents(l,o.sources.SILENT)):void 0}}(this)),this.addAuthor(this.options.authorId,this.options.color))}return t.DEFAULTS={authorId:null,color:"transparent",enabled:!1},t.prototype.addAuthor=function(t,e){var n;return n={},n[".authorship .author-"+t]={"background-color":""+e},this.quill.theme.addStyles(n)},t.prototype.attachButton=function(t){var e;return e=l(t),e.on("click",function(t){return function(){return e.toggleClass("ql-on"),t.enable($dom.hasClass("ql-on"))}}(this))},t.prototype.enable=function(t){return null==t&&(t=!0),l(this.quill.root).toggleClass("authorship",t)},t.prototype.disable=function(){return this.enable(!1)},t}(),o.registerModule("authorship",r),e.exports=r},{"../quill":30}],22:[function(t,e,n){var r,i,o,s,l,u,a,c=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;o=t("../quill"),l=t("./tooltip"),u=o.require("lodash"),a=o.require("dom"),r=o.require("delta"),s=o.require("range"),i=function(t){function e(t,n){this.quill=t,this.options=n,this.options=u.defaults(this.options,l.DEFAULTS),e.__super__.constructor.call(this,this.quill,this.options),this.preview=this.container.querySelector(".preview"),this.textbox=this.container.querySelector(".input"),a(this.container).addClass("ql-image-tooltip"),this.initListeners()}return c(e,t),e.DEFAULTS={template:' Preview
Cancel Insert'},e.prototype.initListeners=function(){return a(this.quill.root).on("focus",u.bind(this.hide,this)),a(this.container.querySelector(".insert")).on("click",u.bind(this.insertImage,this)),a(this.container.querySelector(".cancel")).on("click",u.bind(this.hide,this)),a(this.textbox).on("input",u.bind(this._preview,this)),this.initTextbox(this.textbox,this.insertImage,this.hide),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e,e.initFormat("image",u.bind(t._onToolbar,t))}}(this))},e.prototype.insertImage=function(){var t,e;return e=this._normalizeURL(this.textbox.value),null==this.range&&(this.range=new s(0,0)),this.range&&(this.preview.innerHTML="Preview",this.textbox.value="",t=this.range.end,this.quill.insertEmbed(t,"image",e,"user"),this.quill.setSelection(t+1,t+1)),this.hide()},e.prototype._onToolbar=function(t,e){return e?(this.textbox.value||(this.textbox.value="http://"),this.show(),this.textbox.focus(),u.defer(function(t){return function(){return t.textbox.setSelectionRange(t.textbox.value.length,t.textbox.value.length)}}(this))):(this.quill.deleteText(t,"user"),this.toolbar.setActive("image",!1))},e.prototype._preview=function(){var t;if(this._matchImageURL(this.textbox.value))return"IMG"===this.preview.firstChild.tagName?this.preview.firstChild.setAttribute("src",this.textbox.value):(t=document.createElement("img"),t.setAttribute("src",this.textbox.value),this.preview.replaceChild(t,this.preview.firstChild))},e.prototype._matchImageURL=function(t){return/^https?:\/\/.+\.(jpe?g|gif|png)$/.test(t)},e.prototype._normalizeURL=function(t){return/^https?:\/\//.test(t)||(t="http://"+t),t},e}(l),o.registerModule("image-tooltip",i),e.exports=i},{"../quill":30,"./tooltip":28}],23:[function(t,e,n){var r,i,o,s,l;o=t("../quill"),s=o.require("lodash"),l=o.require("dom"),r=o.require("delta"),i=function(){function t(t,e){this.quill=t,this.hotkeys={},this._initListeners(),this._initHotkeys(),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e}}(this))}return t.hotkeys={BOLD:{key:"B",metaKey:!0},INDENT:{key:l.KEYS.TAB},ITALIC:{key:"I",metaKey:!0},OUTDENT:{key:l.KEYS.TAB,shiftKey:!0},UNDERLINE:{key:"U",metaKey:!0}},t.prototype.addHotkey=function(t,e){return Array.isArray(t)||(t=[t]),s.each(t,function(t){return function(n){var r,i;return n=s.isObject(n)?s.clone(n):{key:n},n.callback=e,i=s.isNumber(n.key)?n.key:n.key.toUpperCase().charCodeAt(0),null==(r=t.hotkeys)[i]&&(r[i]=[]),t.hotkeys[i].push(n)}}(this))},t.prototype.removeHotkeys=function(e,n){var r,i,o,l,u;return e=s.isString(e)?e.toUpperCase():e,e=t.hotkeys[e]?t.hotkeys[e]:e,e=s.isObject(e)?e:{key:e},u=s.isNumber(e.key)?e.key:e.key.charCodeAt(0),null==(r=this.hotkeys)[u]&&(r[u]=[]),o=s.partition(this.hotkeys[u],function(t){return s.isEqual(e,s.omit(t,"callback"))&&(!n||n===t.callback)}),l=o[0],i=o[1],this.hotkeys[u]=i,s.map(l,"callback")},t.prototype.toggleFormat=function(t,e){var n,r;return n=t.isCollapsed()?this.quill.getContents(Math.max(0,t.start-1),t.end):this.quill.getContents(t),r=0===n.ops.length||!s.all(n.ops,function(t){var n;return null!=(n=t.attributes)?n[e]:void 0}),t.isCollapsed()?this.quill.prepareFormat(e,r,o.sources.USER):this.quill.formatText(t,e,r,o.sources.USER),null!=this.toolbar?this.toolbar.setActive(e,r):void 0},t.prototype._initEnter=function(){var t;return t=[{key:l.KEYS.ENTER},{key:l.KEYS.ENTER,shiftKey:!0}],this.addHotkey(t,function(t){return function(e,n){var i,l,u,a,c,h;return null==e?!0:(c=t.quill.editor.doc.findLineAt(e.start),u=c[0],a=c[1],h=u.findLeafAt(a),l=h[0],a=h[1],i=(new r).retain(e.start).insert("\n",u.formats)["delete"](e.end-e.start),t.quill.updateContents(i,o.sources.USER),s.each(l.formats,function(e,n){t.quill.prepareFormat(n,e),null!=t.toolbar&&t.toolbar.setActive(n,e)}),t.quill.editor.selection.scrollIntoView(),!1)}}(this))},t.prototype._initDeletes=function(){return this.addHotkey([l.KEYS.DELETE,l.KEYS.BACKSPACE],function(t){return function(e,n){var r,i,s,u;return null!=e&&t.quill.getLength()>0&&(e.start!==e.end?t.quill.deleteText(e.start,e.end,o.sources.USER):n.key===l.KEYS.BACKSPACE?(u=t.quill.editor.doc.findLineAt(e.start),i=u[0],s=u[1],0===s&&(i.formats.bullet||i.formats.list)?(r=i.formats.bullet?"bullet":"list",t.quill.formatLine(e.start,e.start,r,!1,o.sources.USER)):e.start>0&&t.quill.deleteText(e.start-1,e.start,o.sources.USER)):e.startVisit URL: - Change Remove Done'},e.hotkeys={LINK:{key:"K",metaKey:!0}},e.prototype.initListeners=function(){return this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(t){return function(e){var n;if(null!=e&&e.isCollapsed())return n=t._findAnchor(e),n?(t.setMode(n.href,!1),t.show(n)):t.container.style.left!==o.HIDE_MARGIN?(t.range=null,t.hide()):void 0}}(this)),l(this.container.querySelector(".done")).on("click",s.bind(this.saveLink,this)),l(this.container.querySelector(".remove")).on("click",function(t){return function(){return t.removeLink(t.range)}}(this)),l(this.container.querySelector(".change")).on("click",function(t){return function(){return t.setMode(t.link.href,!0)}}(this)),this.initTextbox(this.textbox,this.saveLink,this.hide),this.quill.onModuleLoad("toolbar",function(t){return function(e){return t.toolbar=e,e.initFormat("link",s.bind(t._onToolbar,t))}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(n){return n.addHotkey(e.hotkeys.LINK,s.bind(t._onKeyboard,t))}}(this))},e.prototype.saveLink=function(){var t,e,n;return n=this._normalizeURL(this.textbox.value),null!=this.range&&(e=this.range.end,this.range.isCollapsed()?(t=this._findAnchor(this.range),null!=t&&(t.href=n)):this.quill.formatText(this.range,"link",n,"user"),this.quill.setSelection(e,e)),this.setMode(n,!1)},e.prototype.removeLink=function(t){return t.isCollapsed()&&(t=this._expandRange(t)),this.hide(),this.quill.formatText(t,"link",!1,"user"),null!=this.toolbar?this.toolbar.setActive("link",!1):void 0},e.prototype.setMode=function(t,e){var n;return null==e&&(e=!1),e?(this.textbox.value=t,s.defer(function(e){return function(){return e.textbox.focus(),e.textbox.setSelectionRange(0,t.length)}}(this))):(this.link.href=t,t=this.link.href,n=t.length>this.options.maxLength?t.slice(0,this.options.maxLength)+"...":t,l(this.link).text(n)),l(this.container).toggleClass("editing",e)},e.prototype._findAnchor=function(t){var e,n,r,i;for(i=this.quill.editor.doc.findLeafAt(t.start,!0),e=i[0],r=i[1],null!=e&&(n=e.node);null!=n&&n!==this.quill.root;){if("A"===n.tagName)return n;n=n.parentNode}return null},e.prototype._expandRange=function(t){var e,n,r,i,o;return i=this.quill.editor.doc.findLeafAt(t.start,!0),n=i[0],r=i[1],o=t.start-r,e=o+n.length,{start:o,end:e}},e.prototype._onToolbar=function(t,e){return this._toggle(t,e)},e.prototype._onKeyboard=function(){var t;return t=this.quill.getSelection(),this._toggle(t,!this._findAnchor(t))},e.prototype._toggle=function(t,e){var n;if(t)return e?t.isCollapsed()?void 0:(this.setMode(this._suggestURL(t),!0),n=this.quill.editor.selection._getNativeRange(),this.show(n)):this.removeLink(t)},e.prototype._normalizeURL=function(t){return/^(https?:\/\/|mailto:)/.test(t)||(t="http://"+t),t},e.prototype._suggestURL=function(t){var e;return e=this.quill.getText(t),this._normalizeURL(e)},e}(o),i.registerModule("link-tooltip",r),e.exports=r},{"../quill":30,"./tooltip":28}],25:[function(t,e,n){var r,i,o,s,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;o=t("../quill"),r=t("eventemitter2").EventEmitter2,s=o.require("lodash"),l=o.require("dom"),i=function(t){function e(t,e){this.quill=t,this.options=e,this.cursors={},this.container=this.quill.addContainer("ql-multi-cursor",!0),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,s.bind(this._applyDelta,this))}return u(e,t),e.DEFAULTS={template:' ',timeout:2500},e.events={CURSOR_ADDED:"cursor-addded",CURSOR_MOVED:"cursor-moved",CURSOR_REMOVED:"cursor-removed"},e.prototype.clearCursors=function(){return s.each(Object.keys(this.cursors),s.bind(this.removeCursor,this)),this.cursors={}},e.prototype.moveCursor=function(t,e){var n;return n=this.cursors[t],null!=n?(n.index=e,l(n.elem).removeClass("hidden"),clearTimeout(n.timer),n.timer=setTimeout(function(t){return function(){return l(n.elem).addClass("hidden"),n.timer=null}}(this),this.options.timeout),this._updateCursor(n),n):void 0},e.prototype.removeCursor=function(t){var n;return n=this.cursors[t],this.emit(e.events.CURSOR_REMOVED,n),null!=n&&n.elem.parentNode.removeChild(n.elem),delete this.cursors[t]},e.prototype.setCursor=function(t,n,r,i){var o;return null==this.cursors[t]&&(this.cursors[t]=o={userId:t,index:n,color:i,elem:this._buildCursor(r,i)},this.emit(e.events.CURSOR_ADDED,o)),s.defer(function(e){return function(){return e.moveCursor(t,n)}}(this)),this.cursors[t]},e.prototype.shiftCursors=function(t,e,n){return null==n&&(n=null),s.each(this.cursors,function(r){return function(i,o){var s;if(i)return s=Math.max(e,t-i.index),i.userId===n?r.moveCursor(n,i.index+s):i.index>t?i.index+=s:void 0}}(this))},e.prototype.update=function(){return s.each(this.cursors,function(t){return function(e,n){return null!=e?(t._updateCursor(e),!0):void 0}}(this))},e.prototype._applyDelta=function(t){var e;return e=0,s.each(t.ops,function(t){return function(n){var r,i;return r=0,null!=n.insert?(r=n.insert.length||1,t.shiftCursors(e,r,null!=(i=n.attributes)?i.author:void 0)):null!=n["delete"]?t.shiftCursors(e,-1*n["delete"],null):null!=n.retain&&(t.shiftCursors(e,0,null),r=n.retain),e+=r}}(this)),this.update()},e.prototype._buildCursor=function(t,e){var n,r,i,o;return n=document.createElement("span"),l(n).addClass("cursor"),n.innerHTML=this.options.template,i=n.querySelector(".cursor-flag"),o=n.querySelector(".cursor-name"),l(o).text(t),r=n.querySelector(".cursor-caret"),r.style.backgroundColor=o.style.backgroundColor=e,this.container.appendChild(n),n},e.prototype._updateCursor=function(t){
+var n,r;return n=this.quill.getBounds(t.index),null==n?this.removeCursor(t.userId):(t.elem.style.top=n.top+this.quill.container.scrollTop+"px",t.elem.style.left=n.left+"px",t.elem.style.height=n.height+"px",r=t.elem.querySelector(".cursor-flag"),l(t.elem).toggleClass("top",parseInt(t.elem.style.top)<=r.offsetHeight).toggleClass("left",parseInt(t.elem.style.left)<=r.offsetWidth).toggleClass("right",this.quill.root.offsetWidth-parseInt(t.elem.style.left)<=r.offsetWidth),this.emit(e.events.CURSOR_MOVED,t))},e}(r),o.registerModule("multi-cursor",i),e.exports=i},{"../quill":30,eventemitter2:2}],26:[function(t,e,n){var r,i,o,s,l,u,a=function(t,e){return function(){return t.apply(e,arguments)}};s=t("../quill"),i=t("../core/document"),l=s.require("lodash"),u=s.require("dom"),r=s.require("delta"),o=function(){function t(e,n){var r;this.quill=e,this._onConvert=a(this._onConvert,this),this.container=this.quill.addContainer("ql-paste-manager"),this.container.setAttribute("contenteditable",!0),this.container.setAttribute("tabindex","-1"),u(this.quill.root).on("paste",l.bind(this._paste,this)),this.options=l.defaults(n,t.DEFAULTS),null==(r=this.options).onConvert&&(r.onConvert=this._onConvert)}return t.DEFAULTS={onConvert:null},t.prototype._onConvert=function(t){var e,n,o;return n=new i(t,this.quill.options),e=n.toDelta(),o=e.length(),0===o?e:e.compose((new r).retain(o-1)["delete"](1))},t.prototype._paste=function(){var t,e;return t=this.quill.getLength(),e=this.quill.getSelection(),null!=e?(this.container.focus(),l.defer(function(t){return function(){var n,r;return n=t.options.onConvert(t.container),r=n.length(),r>0&&(e.start>0&&n.ops.unshift({retain:e.start}),n["delete"](e.end-e.start),t.quill.updateContents(n,"user")),t.quill.setSelection(e.start+r,e.start+r),t.quill.editor.selection.scrollIntoView(),t.container.innerHTML=""}}(this))):void 0},t}(),s.registerModule("paste-manager",o),e.exports=o},{"../core/document":8,"../quill":30}],27:[function(t,e,n){var r,i,o,s;r=t("../quill"),o=r.require("lodash"),s=r.require("dom"),i=function(){function t(e,n){if(this.quill=e,this.options=n,(o.isString(this.options)||o.isElement(this.options))&&(this.options={container:this.options}),null==this.options.container)throw new Error("container required for toolbar",this.options);this.container=o.isString(this.options.container)?document.querySelector(this.options.container):this.options.container,this.inputs={},this.preventUpdate=!1,this.triggering=!1,o.each(this.quill.options.formats,function(e){return function(n){return null==t.formats.TOOLTIP[n]?e.initFormat(n,o.bind(e._applyFormat,e,n)):void 0}}(this)),this.quill.on(r.events.FORMAT_INIT,function(e){return function(n){return null==t.formats.TOOLTIP[n]?e.initFormat(n,o.bind(e._applyFormat,e,n)):void 0}}(this)),this.quill.on(r.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?t.updateActive(e):void 0}}(this)),this.quill.on(r.events.TEXT_CHANGE,function(t){return function(){return t.updateActive()}}(this)),this.quill.onModuleLoad("keyboard",function(t){return function(e){return e.addHotkey([s.KEYS.BACKSPACE,s.KEYS.DELETE],function(){return o.defer(o.bind(t.updateActive,t))})}}(this)),s(this.container).addClass("ql-toolbar"),s.isIOS()&&s(this.container).addClass("ios")}return t.DEFAULTS={container:null},t.formats={LINE:{align:"align",bullet:"bullet",list:"list"},SELECT:{align:"align",background:"background",color:"color",font:"font",size:"size"},TOGGLE:{bold:"bold",bullet:"bullet",image:"image",italic:"italic",link:"link",list:"list",strike:"strike",underline:"underline"},TOOLTIP:{image:"image",link:"link"}},t.prototype.initFormat=function(e,n){var r,i,o;return o=".ql-"+e,null!=t.formats.SELECT[e]?(o="select"+o,r="change"):r="click",i=this.container.querySelector(o),null!=i?(this.inputs[e]=i,s(i).on(r,function(t){return function(){var e,o;return o="change"===r?s(i).value():!s(i).hasClass("ql-active"),t.preventUpdate=!0,t.quill.focus(),e=t.quill.getSelection(),null!=e&&n(e,o),s.isIE(11)&&t.quill.editor.selection.scrollIntoView(),t.preventUpdate=!1,!1}}(this))):void 0},t.prototype.setActive=function(t,e){var n,r,i,o;return"image"===t&&(e=!1),r=this.inputs[t],null!=r?(n=s(r),"SELECT"===r.tagName?(this.triggering=!0,o=n.value(r),null==e&&(e=null!=(i=n["default"]())?i.value:void 0),Array.isArray(e)&&(e=""),e!==o&&(null!=e?n.option(e):n.reset()),this.triggering=!1):n.toggleClass("ql-active",e||!1)):void 0},t.prototype.updateActive=function(t,e){var n;return null==e&&(e=null),t||(t=this.quill.getSelection()),null==t||this.preventUpdate?void 0:(n=this._getActive(t),o.each(this.inputs,function(t){return function(r,i){return(!Array.isArray(e)||e.indexOf(i)>-1)&&t.setActive(i,n[i]),!0}}(this)))},t.prototype._applyFormat=function(e,n,r){return this.triggering?void 0:(n.isCollapsed()?this.quill.prepareFormat(e,r,"user"):null!=t.formats.LINE[e]?this.quill.formatLine(n,e,r,"user"):this.quill.formatText(n,e,r,"user"),o.defer(function(t){return function(){return t.updateActive(n,["bullet","list"]),t.setActive(e,r)}}(this)))},t.prototype._getActive=function(t){var e,n;return e=this._getLeafActive(t),n=this._getLineActive(t),o.defaults({},e,n)},t.prototype._getLeafActive=function(t){var e,n,r,i,s;return t.isCollapsed()?(s=this.quill.editor.doc.findLineAt(t.start),r=s[0],i=s[1],e=0===i?this.quill.getContents(t.start,t.end+1):this.quill.getContents(t.start-1,t.end)):e=this.quill.getContents(t),n=o.map(e.ops,"attributes"),this._intersectFormats(n)},t.prototype._getLineActive=function(t){var e,n,r,i,s,l;for(n=[],s=this.quill.editor.doc.findLineAt(t.start),e=s[0],i=s[1],l=this.quill.editor.doc.findLineAt(t.end),r=l[0],i=l[1],null!=r&&r===e&&(r=r.next);null!=e&&e!==r;)n.push(o.clone(e.formats)),e=e.next;return this._intersectFormats(n)},t.prototype._intersectFormats=function(e){return o.reduce(e.slice(1),function(e,n){var r,i,s,l,u;return null==n&&(n={}),r=Object.keys(e),s=null!=n?Object.keys(n):{},l=o.intersection(r,s),u=o.difference(r,s),i=o.difference(s,r),o.each(l,function(r){if(null!=t.formats.SELECT[r])if(Array.isArray(e[r])){if(e[r].indexOf(n[r])<0)return e[r].push(n[r])}else if(e[r]!==n[r])return e[r]=[e[r],n[r]]}),o.each(u,function(n){return null!=t.formats.TOGGLE[n]?delete e[n]:null==t.formats.SELECT[n]||Array.isArray(e[n])?void 0:e[n]=[e[n]]}),o.each(i,function(r){return null!=t.formats.SELECT[r]?e[r]=[n[r]]:void 0}),e},e[0]||{})},t}(),r.registerModule("toolbar",i),e.exports=i},{"../quill":30}],28:[function(t,e,n){var r,i,o,s;r=t("../quill"),o=r.require("lodash"),s=r.require("dom"),i=function(){function t(e,n){this.quill=e,this.options=n,this.container=this.quill.addContainer("ql-tooltip"),this.container.innerHTML=this.options.template,this.hide(),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(e){return function(n,r){return e.container.style.left!==t.HIDE_MARGIN?(e.range=null,e.hide()):void 0}}(this))}return t.DEFAULTS={offset:10,template:""},t.HIDE_MARGIN="-10000px",t.prototype.initTextbox=function(t,e,n){return s(t).on("keydown",function(t){return function(r){switch(r.which){case s.KEYS.ENTER:return r.preventDefault(),e.call(t);case s.KEYS.ESCAPE:return r.preventDefault(),n.call(t);default:return!0}}}(this))},t.prototype.hide=function(){return this.container.style.left=t.HIDE_MARGIN,this.range&&this.quill.setSelection(this.range),this.range=null},t.prototype.position=function(t){var e,n,r,i,o,s,l;return null!=t?(s=t.getBoundingClientRect(),o=this.quill.container.getBoundingClientRect(),r=s.left-o.left,i=s.top-o.top,n=s.bottom-o.bottom,e=r+s.width/2-this.container.offsetWidth/2,l=i+s.height+this.options.offset,l+this.container.offsetHeight>this.quill.container.offsetHeight&&(l=i-this.container.offsetHeight-this.options.offset),e=Math.max(0,Math.min(e,this.quill.container.offsetWidth-this.container.offsetWidth)),l=Math.max(0,Math.min(l,this.quill.container.offsetHeight-this.container.offsetHeight))):(e=this.quill.container.offsetWidth/2-this.container.offsetWidth/2,l=this.quill.container.offsetHeight/2-this.container.offsetHeight/2),l+=this.quill.container.scrollTop,[e,l]},t.prototype.show=function(t){var e,n,r;return this.range=this.quill.getSelection(),n=this.position(t),e=n[0],r=n[1],this.container.style.left=e+"px",this.container.style.top=r+"px",this.container.focus()},t}(),r.registerModule("tooltip",i),e.exports=i},{"../quill":30}],29:[function(t,e,n){var r,i,o,s;i=t("../quill"),s=i.require("lodash"),r=i.require("delta"),o=function(){function t(t,e){this.quill=t,this.options=null!=e?e:{},this.lastRecorded=0,this.ignoreChange=!1,this.clear(),this.initListeners()}return t.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.hotkeys={UNDO:{key:"Z",metaKey:!0},REDO:{key:"Z",metaKey:!0,shiftKey:!0}},t.prototype.initListeners=function(){return this.quill.onModuleLoad("keyboard",function(e){return function(n){var r;return n.addHotkey(t.hotkeys.UNDO,function(){return e.quill.editor.checkUpdate(),e.undo(),!1}),r=[t.hotkeys.REDO],navigator.platform.indexOf("Win")>-1&&r.push({key:"Y",metaKey:!0}),n.addHotkey(r,function(){return e.quill.editor.checkUpdate(),e.redo(),!1})}}(this)),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(t){return function(e,n){return t.ignoreChange?void 0:(t.options.userOnly&&n!==i.sources.USER?t._transform(e):t.record(e,t.oldDelta),t.oldDelta=t.quill.getContents())}}(this))},t.prototype.clear=function(){return this.stack={undo:[],redo:[]},this.oldDelta=this.quill.getContents()},t.prototype.record=function(t,e){var n,r,i,o;if(t.ops.length>0){this.stack.redo=[];try{if(o=this.quill.getContents().diff(this.oldDelta),i=(new Date).getTime(),this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0?(n=this.stack.undo.pop(),o=o.compose(n.undo),t=n.redo.compose(t)):this.lastRecorded=i,this.stack.undo.push({redo:t,undo:o}),this.stack.undo.length>this.options.maxStack)return this.stack.undo.unshift()}catch(s){return r=s,console.warn("Could not record change... clearing undo stack."),this.clear()}}},t.prototype.redo=function(){return this._change("redo","undo")},t.prototype.undo=function(){return this._change("undo","redo")},t.prototype._getLastChangeIndex=function(t){var e,n;return n=0,e=0,s.each(t.ops,function(t){return null!=t.insert?n=Math.max(e+(t.insert.length||1),n):null!=t["delete"]?n=Math.max(e,n):null!=t.retain?(null!=t.attributes&&(n=Math.max(e+t.retain,n)),e+=t.retain):void 0}),n},t.prototype._change=function(t,e){var n,r;return this.stack[t].length>0?(n=this.stack[t].pop(),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],i.sources.USER),this.ignoreChange=!1,r=this._getLastChangeIndex(n[t]),this.quill.setSelection(r,r),this.oldDelta=this.quill.getContents(),this.stack[e].push(n)):void 0},t.prototype._transform=function(t){var e,n,r,i,o,s,l,u;for(this.oldDelta=t.transform(this.oldDelta,!0),s=this.stack.undo,n=0,i=s.length;i>n;n++)e=s[n],e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0);for(l=this.stack.redo,u=[],r=0,o=l.length;o>r;r++)e=l[r],e.undo=t.transform(e.undo,!0),u.push(e.redo=t.transform(e.redo,!0));return u},t}(),i.registerModule("undo-manager",o),e.exports=o},{"../quill":30}],30:[function(t,e,n){var r,i,o,s,l,u,a,c,h,f,p,d=function(t,e){function n(){this.constructor=t}for(var r in e)g.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty,v=[].slice;h=t("lodash"),p=t("../package.json"),r=t("rich-text/lib/delta"),s=t("eventemitter2").EventEmitter2,f=t("./lib/dom"),i=t("./core/document"),o=t("./core/editor"),l=t("./core/format"),u=t("./core/normalizer"),c=t("./lib/range"),a=function(t){function e(t,n){var r,i,s;if(this.container=t,null==n&&(n={}),h.isString(this.container)&&(this.container=document.querySelector(this.container)),null==this.container)throw new Error("Invalid Quill container");if(i=h.defaults(n.modules||{},e.DEFAULTS.modules),r=this.container.innerHTML,this.container.innerHTML="",this.options=h.defaults(n,e.DEFAULTS),this.options.modules=i,this.options.id=this.id="ql-editor-"+(e.editors.length+1),this.modules={},this.root=this.addContainer("ql-editor"),this.editor=new o(this.root,this,this.options),e.editors.push(this),this.setHTML(r,e.sources.SILENT),s=e.themes[this.options.theme],null==s)throw new Error("Cannot load "+this.options.theme+" theme. Are you sure you registered it?");this.theme=new s(this,this.options),h.each(this.options.modules,function(t){return function(e,n){return t.addModule(n,e)}}(this))}return d(e,t),e.version=p.version,e.editors=[],e.modules=[],e.themes=[],e.DEFAULTS={formats:["align","bold","italic","strike","underline","color","background","font","size","link","image","bullet","list"],modules:{keyboard:!0,"paste-manager":!0,"undo-manager":!0},pollInterval:100,readOnly:!1,styles:{},theme:"base"},e.events={FORMAT_INIT:"format-init",MODULE_INIT:"module-init",POST_EVENT:"post-event",PRE_EVENT:"pre-event",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},e.sources=o.sources,e.registerModule=function(t,n){return null!=e.modules[t]&&console.warn("Overwriting "+t+" module"),e.modules[t]=n},e.registerTheme=function(t,n){return null!=e.themes[t]&&console.warn("Overwriting "+t+" theme"),e.themes[t]=n},e.require=function(t){switch(t){case"lodash":return h;case"delta":return r;case"format":return l;case"normalizer":return u;case"dom":return f;case"document":return i;case"range":return c;default:return null}},e.prototype.destroy=function(){var t;return t=this.getHTML(),h.each(this.modules,function(t,e){return h.isFunction(t.destroy)?t.destroy():void 0}),this.editor.destroy(),this.removeAllListeners(),e.editors.splice(h.indexOf(e.editors,this),1),this.container.innerHTML=t},e.prototype.addContainer=function(t,e){var n,r;return null==e&&(e=!1),r=e?this.root:null,n=document.createElement("div"),f(n).addClass(t),this.container.insertBefore(n,r),n},e.prototype.addFormat=function(t,n){return this.editor.doc.addFormat(t,n),this.emit(e.events.FORMAT_INIT,t)},e.prototype.addModule=function(t,n){var r;if(r=e.modules[t],null==r)throw new Error("Cannot load "+t+" module. Are you sure you registered it?");return n===!0&&(n={}),n=h.defaults(n,this.theme.constructor.OPTIONS[t]||{},r.DEFAULTS||{}),this.modules[t]=new r(this,n),this.emit(e.events.MODULE_INIT,t,this.modules[t]),this.modules[t]},e.prototype.deleteText=function(t,n,i){var o,s,l;return null==i&&(i=e.sources.API),l=this._buildParams(t,n,{},i),t=l[0],n=l[1],s=l[2],i=l[3],n>t?(o=(new r).retain(t)["delete"](n-t),this.editor.applyDelta(o,i)):void 0},e.prototype.emit=function(){var t,n;return n=arguments[0],t=2<=arguments.length?v.call(arguments,1):[],e.__super__.emit.apply(this,[e.events.PRE_EVENT,n].concat(v.call(t))),e.__super__.emit.apply(this,[n].concat(v.call(t))),e.__super__.emit.apply(this,[e.events.POST_EVENT,n].concat(v.call(t)))},e.prototype.focus=function(){return this.editor.focus()},e.prototype.formatLine=function(t,e,n,r,i){var o,s,l,u,a;return u=this._buildParams(t,e,n,r,i),t=u[0],e=u[1],o=u[2],i=u[3],a=this.editor.doc.findLineAt(e),s=a[0],l=a[1],null!=s&&(e+=s.length-l),this.formatText(t,e,o,i)},e.prototype.formatText=function(t,e,n,i,o){var s,l,u;return u=this._buildParams(t,e,n,i,o),t=u[0],e=u[1],l=u[2],o=u[3],l=h.reduce(l,function(t){return function(e,n,r){var i;return i=t.editor.doc.formats[r],n&&n!==i.config["default"]||(e[r]=null),e}}(this),l),s=(new r).retain(t).retain(e-t,l),this.editor.applyDelta(s,o)},e.prototype.getBounds=function(t){return this.editor.getBounds(t)},e.prototype.getContents=function(t,e){return null==t&&(t=0),null==e&&(e=null),h.isObject(t)&&(e=t.end,t=t.start),this.editor.delta.slice(t,e)},e.prototype.getHTML=function(){return this.editor.doc.getHTML()},e.prototype.getLength=function(){return this.editor.length},e.prototype.getModule=function(t){return this.modules[t]},e.prototype.getSelection=function(){return this.editor.checkUpdate(),this.editor.selection.getRange()},e.prototype.getText=function(t,e){return null==t&&(t=0),null==e&&(e=null),h.map(this.getContents(t,e).ops,function(t){return h.isString(t.insert)?t.insert:""}).join("")},e.prototype.insertEmbed=function(t,e,n,i){var o,s,l,u;return u=this._buildParams(t,0,e,n,i),t=u[0],s=u[1],l=u[2],i=u[3],o=(new r).retain(t).insert(1,l),this.editor.applyDelta(o,i)},e.prototype.insertText=function(t,e,n,i,o){var s,l,u,a;return a=this._buildParams(t,0,n,i,o),t=a[0],l=a[1],u=a[2],o=a[3],e.length>0?(s=(new r).retain(t).insert(e,u),this.editor.applyDelta(s,o)):void 0},e.prototype.onModuleLoad=function(t,n){return this.modules[t]?n(this.modules[t]):this.on(e.events.MODULE_INIT,function(e,r){return e===t?n(r):void 0})},e.prototype.prepareFormat=function(t,n,r){var i,o;return null==r&&(r=e.sources.API),i=this.editor.doc.formats[t],null!=i&&(o=this.getSelection(),null!=o?o.isCollapsed():void 0)?i.isType(l.types.LINE)?this.formatLine(o,t,n,r):i.prepare(n):void 0},e.prototype.setContents=function(t,n){var i;return null==n&&(n=e.sources.API),t=new r(Array.isArray(t)?t.slice():t.ops.slice()),i=h.last(t.slice(t.length()-1).ops),t["delete"](this.getLength()-1),null!=i&&h.isString(i.insert)&&"\n"===h.last(i.insert)&&t["delete"](1),this.updateContents(t,n)},e.prototype.setHTML=function(t,n){return null==n&&(n=e.sources.API),t.trim()||(t="<"+f.DEFAULT_BLOCK_TAG+"><"+f.DEFAULT_BREAK_TAG+">"+f.DEFAULT_BLOCK_TAG+">"),this.editor.doc.setHTML(t),this.editor.checkUpdate(n)},e.prototype.setSelection=function(t,n,r){var i;return null==r&&(r=e.sources.API),h.isNumber(t)&&h.isNumber(n)?i=new c(t,n):(i=t,r=n||r),this.editor.selection.setRange(i,r)},e.prototype.setText=function(t,n){var i;return null==n&&(n=e.sources.API),i=(new r).insert(t),this.setContents(i,n)},e.prototype.updateContents=function(t,n){return null==n&&(n=e.sources.API),Array.isArray(t)&&(t={ops:t}),this.editor.applyDelta(t,n)},e.prototype._buildParams=function(){var t,n;return n=1<=arguments.length?v.call(arguments,0):[],h.isObject(n[0])&&n.splice(0,1,n[0].start,n[0].end),h.isString(n[2])&&(t={},t[n[2]]=n[3],n.splice(2,2,t)),null==n[3]&&(n[3]=e.sources.API),n},e}(s),a.registerTheme("base",t("./themes/base")),a.registerTheme("snow",t("./themes/snow")),e.exports=a},{"../package.json":7,"./core/document":8,"./core/editor":9,"./core/format":10,"./core/normalizer":13,"./lib/dom":17,"./lib/range":20,"./themes/base":32,"./themes/snow":33,eventemitter2:2,lodash:1,"rich-text/lib/delta":3}],31:[function(t,e,n){e.exports='.ql-image-tooltip{padding:10px;width:300px}.ql-image-tooltip:after{clear:both;content:"";display:table}.ql-image-tooltip a{border:1px solid #000;box-sizing:border-box;display:inline-block;float:left;padding:5px;text-align:center;width:50%}.ql-image-tooltip img{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.ql-image-tooltip .input{box-sizing:border-box;width:100%}.ql-image-tooltip .preview{margin:10px 0;position:relative;border:1px dashed #000;height:200px}.ql-image-tooltip .preview span{display:inline-block;position:absolute;text-align:center;top:40%;width:100%}.ql-link-tooltip{padding:5px 10px}.ql-link-tooltip input.input{width:170px}.ql-link-tooltip a.done,.ql-link-tooltip input.input{display:none}.ql-link-tooltip a.change{margin-right:4px}.ql-link-tooltip.editing a.done,.ql-link-tooltip.editing input.input{display:inline-block}.ql-link-tooltip.editing a.change,.ql-link-tooltip.editing a.remove,.ql-link-tooltip.editing a.url{display:none}.ql-multi-cursor{position:absolute;left:0;top:0;z-index:1000}.ql-multi-cursor .cursor{margin-left:-1px;position:absolute}.ql-multi-cursor .cursor-flag{bottom:100%;position:absolute;white-space:nowrap}.ql-multi-cursor .cursor-name{display:inline-block;color:#fff;padding:2px 8px}.ql-multi-cursor .cursor-caret{height:100%;position:absolute;width:2px}.ql-multi-cursor .cursor.hidden .cursor-flag{display:none}.ql-multi-cursor .cursor.top .cursor-flag{bottom:auto;top:100%}.ql-multi-cursor .cursor.right .cursor-flag{right:-2px}.ql-paste-manager{left:-100000px;position:absolute;top:50%}.ql-toolbar{box-sizing:border-box}.ql-tooltip{background-color:#fff;border:1px solid #000;box-sizing:border-box;position:absolute;top:0;white-space:nowrap;z-index:2000}.ql-tooltip a{cursor:pointer;text-decoration:none}.ql-container{box-sizing:border-box;cursor:text;font-family:Helvetica,Arial,sans-serif;height:100%;line-height:1.42;margin:0;overflow-x:hidden;overflow-y:auto;padding:12px 15px;position:relative}.ql-editor{box-sizing:border-box;min-height:100%;outline:0;tab-size:4;white-space:pre-wrap}.ql-editor div{margin:0;padding:0}.ql-editor a{text-decoration:underline}.ql-editor b{font-weight:700;font-style:bold}.ql-editor i{font-style:italic}.ql-editor s{text-decoration:line-through}.ql-editor u{text-decoration:underline}.ql-editor a,.ql-editor b,.ql-editor i,.ql-editor s,.ql-editor span,.ql-editor u{background-color:inherit}.ql-editor img{max-width:100%}.ql-editor blockquote,.ql-editor ol,.ql-editor ul{margin:0 0 0 2em;padding:0}.ql-editor ol{list-style-type:decimal}.ql-editor ul{list-style-type:disc}.ql-editor.ql-ie-10 br,.ql-editor.ql-ie-9 br{display:none}'},{}],32:[function(t,e,n){var r,i,o,s;i=t("lodash"),s=t("../../lib/dom"),o=t("./base.styl"),r=function(){function t(e,n){var r;this.quill=e,this.options=n,s(this.quill.container).addClass("ql-container"),this.options.styles&&this.addStyles(o+t.objToCss(this.options.styles)),s.isIE(10)&&(r=s.isIE(9)?"9":"10",s(this.quill.root).addClass("ql-ie-"+r))}return t.OPTIONS={},t.objToCss=function(t){return i.map(t,function(t,e){var n;return n=i.map(t,function(t,e){return e+": "+t+";"}).join(" "),e+" { "+n+" }"}).join("\n")},t.prototype.addStyles=function(e){var n;return i.isObject(e)&&(e=t.objToCss(e)),n=document.createElement("style"),n.type="text/css",n.appendChild(document.createTextNode(e)),document.head.appendChild(n)},t}(),e.exports=r},{"../../lib/dom":17,"./base.styl":31,lodash:1}],33:[function(t,e,n){var r,i,o,s,l,u,a=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("lodash"),i=t("../../lib/color-picker"),r=t("../base"),u=t("../../lib/dom"),o=t("../../lib/picker"),s=function(t){function e(t,n){this.quill=t,this.options=n,e.__super__.constructor.apply(this,arguments),u(this.quill.container).addClass("ql-snow"),this.pickers=[],this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(t){return function(e){return null!=e?l.invoke(t.pickers,"close"):void 0}}(this)),this.quill.onModuleLoad("multi-cursor",l.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",l.bind(this.extendToolbar,this))}return a(e,t),e.COLORS=["#000000","#e60000","#ff9900","#ffff00","#008A00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],e.OPTIONS={"multi-cursor":{template:' '}},e.prototype.extendMultiCursor=function(t){return t.on(t.constructor.events.CURSOR_ADDED,function(t){var e,n;return e=t.elem.querySelector(".cursor-triangle.bottom"),n=t.elem.querySelector(".cursor-triangle.top"),e.style.borderTopColor=n.style.borderBottomColor=t.color})},e.prototype.extendToolbar=function(t){return u(t.container).addClass("ql-snow"),l.each(["color","background","font","size","align"],function(e){return function(n){var r,s;if(s=t.container.querySelector(".ql-"+n),null!=s){switch(n){case"font":case"size":case"align":r=new o(s);break;case"color":case"background":r=new i(s),l.each(r.container.querySelectorAll(".ql-picker-item"),function(t,e){return 7>e?u(t).addClass("ql-primary-color"):void 0})}return null!=r?e.pickers.push(r):void 0}}}(this)),l.each(u(t.container).textNodes(),function(t){return 0===u(t).text().trim().length?u(t).remove():void 0})},e}(r),e.exports=s},{"../../lib/color-picker":16,"../../lib/dom":17,"../../lib/picker":19,"../base":32,lodash:1}]},{},[15])(15)});
\ No newline at end of file
diff --git a/Yavsc/wwwroot/jslib/showdown.min.js b/Yavsc/wwwroot/jslib/showdown.min.js
new file mode 100644
index 00000000..afb239f0
--- /dev/null
+++ b/Yavsc/wwwroot/jslib/showdown.min.js
@@ -0,0 +1 @@
+(function(){function e(e){"use strict";var r={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(e===!1)return JSON.parse(JSON.stringify(r));var t={};for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n]["default"]);return t}function r(e,r){"use strict";var t=r?"Error in "+r+" extension->":"Error in unnamed extension",s={valid:!0,error:""};n.helper.isArray(e)||(e=[e]);for(var a=0;a-1))return e;h=""}else h=t.gUrls[p],n.helper.isUndefined(t.gTitles[p])||(d=t.gTitles[p]);h=n.helper.escapeCharacters(h,"*_",!1);var f='"+c+""};return e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,s),e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,s),e=e.replace(/(\[([^\[\]]+)\])()()()()()/g,s)}),n.subParser("autoLinks",function(e,r){"use strict";function t(e,r){var t=n.subParser("unescapeSpecialChars")(r);return n.subParser("encodeEmailAddress")(t)}var s=/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/gi,a=/<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi,i=/\b(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)\b/gi,o=/<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;return e=e.replace(a,'$1'),e=e.replace(o,t),r.simplifiedAutoLink&&(e=e.replace(s,'$1'),e=e.replace(i,t)),e}),n.subParser("blockGamut",function(e,r,t){"use strict";e=n.subParser("blockQuotes")(e,r,t),e=n.subParser("headers")(e,r,t);var s=n.subParser("hashBlock")("
",r,t);return e=e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,s),e=e.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,s),e=e.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,s),e=n.subParser("lists")(e,r,t),e=n.subParser("codeBlocks")(e,r,t),e=n.subParser("tables")(e,r,t),e=n.subParser("hashHTMLBlocks")(e,r,t),e=n.subParser("paragraphs")(e,r,t)}),n.subParser("blockQuotes",function(e,r,t){"use strict";return e=e.replace(/((^[ \t]{0,3}>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,s){var a=s;return a=a.replace(/^[ \t]*>[ \t]?/gm,"~0"),a=a.replace(/~0/g,""),a=a.replace(/^[ \t]+$/gm,""),a=n.subParser("githubCodeBlocks")(a,r,t),a=n.subParser("blockGamut")(a,r,t),a=a.replace(/(^|\n)/g,"$1 "),a=a.replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,r){var t=r;return t=t.replace(/^ /gm,"~0"),t=t.replace(/~0/g,"")}),n.subParser("hashBlock")("\n"+a+"\n
",r,t)})}),n.subParser("codeBlocks",function(e,r,t){"use strict";e+="~0";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g;return e=e.replace(s,function(e,s,a){var i=s,o=a,u="\n";return i=n.subParser("outdent")(i),i=n.subParser("encodeCode")(i),i=n.subParser("detab")(i),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),r.omitExtraWLInCodeBlocks&&(u=""),i=""+i+u+"
",n.subParser("hashBlock")(i,r,t)+o}),e=e.replace(/~0/,"")}),n.subParser("codeSpans",function(e){"use strict";return e=e.replace(/(<]*?>)([^]*?)<\/code>/g,function(e,r,t){return t=t.replace(/^([ \t]*)/g,""),t=t.replace(/[ \t]*$/g,""),t=n.subParser("encodeCode")(t),r+t+"
"}),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,r,t,s){var a=s;return a=a.replace(/^([ \t]*)/g,""),a=a.replace(/[ \t]*$/g,""),a=n.subParser("encodeCode")(a),r+""+a+"
"})}),n.subParser("detab",function(e){"use strict";return e=e.replace(/\t(?=\t)/g," "),e=e.replace(/\t/g,"~A~B"),e=e.replace(/~B(.+?)~A/g,function(e,r){for(var t=r,n=4-t.length%4,s=0;n>s;s++)t+=" ";return t}),e=e.replace(/~A/g," "),e=e.replace(/~B/g,"")}),n.subParser("encodeAmpsAndAngles",function(e){"use strict";return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?\$!])/gi,"<")}),n.subParser("encodeBackslashEscapes",function(e){"use strict";return e=e.replace(/\\(\\)/g,n.helper.escapeCharactersCallback),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,n.helper.escapeCharactersCallback)}),n.subParser("encodeCode",function(e){"use strict";return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=n.helper.escapeCharacters(e,"*_{}[]\\",!1)}),n.subParser("encodeEmailAddress",function(e){"use strict";var r=[function(e){return""+e.charCodeAt(0)+";"},function(e){return""+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e="mailto:"+e,e=e.replace(/./g,function(e){if("@"===e)e=r[Math.floor(2*Math.random())](e);else if(":"!==e){var t=Math.random();e=t>.9?r[2](e):t>.45?r[1](e):r[0](e)}return e}),e=''+e+"",e=e.replace(/">.+:/g,'">')}),n.subParser("escapeSpecialCharsWithinTagAttributes",function(e){"use strict";var r=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return e=e.replace(r,function(e){var r=e.replace(/(.)<\/?code>(?=.)/g,"$1`");return r=n.helper.escapeCharacters(r,"\\`*_",!1)})}),n.subParser("githubCodeBlocks",function(e,r,t){"use strict";return r.ghCodeBlocks?(e+="~0",e=e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(e,s,a){var i=r.omitExtraWLInCodeBlocks?"":"\n";return a=n.subParser("encodeCode")(a),a=n.subParser("detab")(a),a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,""),a=""+a+i+"
",n.subParser("hashBlock")(a,r,t)}),e=e.replace(/~0/,"")):e}),n.subParser("hashBlock",function(e,r,t){"use strict";return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(t.gHtmlBlocks.push(e)-1)+"K\n\n"}),n.subParser("hashElement",function(e,r,t){"use strict";return function(e,r){var n=r;return n=n.replace(/\n\n/g,"\n"),n=n.replace(/^\n/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(t.gHtmlBlocks.push(n)-1)+"K\n\n"}}),n.subParser("hashHTMLBlocks",function(e,r,t){"use strict";return e=e.replace(/\n/g,"\n\n"),e=e.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")(e,r,t)),e=e.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")(e,r,t)),e=e.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,r,t)),e=e.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,r,t)),e=e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,r,t)),e=e.replace(/\n\n/g,"\n")}),n.subParser("headers",function(e,r,t){"use strict";function s(e){var r,s=e.replace(/[^\w]/g,"").toLowerCase();return t.hashLinkCounts[s]?r=s+"-"+t.hashLinkCounts[s]++:(r=s,t.hashLinkCounts[s]=1),a===!0&&(a="section"),n.helper.isString(a)?a+r:r}var a=r.prefixHeaderId,i=isNaN(parseInt(r.headerLevelStart))?1:parseInt(r.headerLevelStart),o=r.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,u=r.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;return e=e.replace(o,function(e,a){var o=n.subParser("spanGamut")(a,r,t),u=r.noHeaderId?"":' id="'+s(a)+'"',l=i,c=""+o+"";return n.subParser("hashBlock")(c,r,t)}),e=e.replace(u,function(e,a){var o=n.subParser("spanGamut")(a,r,t),u=r.noHeaderId?"":' id="'+s(a)+'"',l=i+1,c=""+o+"";return n.subParser("hashBlock")(c,r,t)}),e=e.replace(/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm,function(e,a,o){var u=n.subParser("spanGamut")(o,r,t),l=r.noHeaderId?"":' id="'+s(o)+'"',c=i-1+a.length,p=""+u+"";return n.subParser("hashBlock")(p,r,t)})}),n.subParser("images",function(e,r,t){"use strict";function s(e,r,s,a,i,o,u,l){var c=t.gUrls,p=t.gTitles,h=t.gDimensions;if(s=s.toLowerCase(),l||(l=""),""===a||null===a){if((""===s||null===s)&&(s=r.toLowerCase().replace(/ ?\n/g," ")),a="#"+s,n.helper.isUndefined(c[s]))return e;a=c[s],n.helper.isUndefined(p[s])||(l=p[s]),n.helper.isUndefined(h[s])||(i=h[s].width,o=h[s].height)}var d="img";if(r.match(/^video:/)?(r=r.substring(6),d="video"):r.match(/^audio:/)?(r=r.substring(6),d="audio"):r.match(/^image:/)&&(r=r.substring(6)),r=r.replace(/"/g,"""),r=n.helper.escapeCharacters(r,"*_",!1),a=n.helper.escapeCharacters(a,"*_",!1),"img"===d){var f='
"}var g="<"+d+' alt="'+r+'"';return l&&(l=l.replace(/"/g,"""),l=n.helper.escapeCharacters(l,"*_",!1),g+=' title="'+l+'"'),i&&o&&(i="*"===i?"auto":i,o="*"===o?"auto":o,g+=' width="'+i+'"',g+=' height="'+o+'"'),g+=" controls>",g+='',g+=""+d+">"}var a=/!\[(.*?)]\s?\([ \t]*()(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(['"])(.*?)\6[ \t]*)?\)/g,i=/!\[(.*?)][ ]?(?:\n[ ]*)?\[(.*?)]()()()()()/g;return e=e.replace(i,s),e=e.replace(a,s)}),n.subParser("italicsAndBold",function(e,r){"use strict";return r.literalMidWordUnderscores?(e=e.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm,"$1$2"),e=e.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm,"$1$2"),e=e.replace(/\*\*(?=\S)([^]+?)\*\*/g,"$1"),e=e.replace(/\*(?=\S)([^]+?)\*/g,"$1")):(e=e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),e=e.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")),e}),n.subParser("lists",function(e,r,t){"use strict";function s(e,s){t.gListLevel++,e=e.replace(/\n{2,}$/,"\n"),e+="~0";var a=/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+((\[(x| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,i=/\n[ \t]*\n(?!~0)/.test(e);return e=e.replace(a,function(e,s,a,o,u,l,c){c=c&&""!==c.trim();var p=n.subParser("outdent")(u,r,t),h="";return l&&r.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',p=p.replace(/^[ \t]*\[(x| )?]/m,function(){var e='"})),s||p.search(/\n{2,}/)>-1?(p=n.subParser("githubCodeBlocks")(p,r,t),p=n.subParser("blockGamut")(p,r,t)):(p=n.subParser("lists")(p,r,t),p=p.replace(/\n$/,""),p=i?n.subParser("paragraphs")(p,r,t):n.subParser("spanGamut")(p,r,t)),p="\n"+p+"\n"}),e=e.replace(/~0/g,""),t.gListLevel--,s&&(e=e.replace(/\s+$/,"")),e}function a(e,r,t){var n="ul"===r?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,a=[],i="";if(-1!==e.search(n)){!function u(e){var a=e.search(n);-1!==a?(i+="\n\n<"+r+">"+s(e.slice(0,a),!!t)+""+r+">\n\n",r="ul"===r?"ol":"ul",n="ul"===r?/^ {0,2}\d+\.[ \t]/gm:/^ {0,2}[*+-][ \t]/gm,u(e.slice(a))):i+="\n\n<"+r+">"+s(e,!!t)+""+r+">\n\n"}(e);for(var o=0;o"+s(e,!!t)+""+r+">\n\n";return i}e+="~0";var i=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return t.gListLevel?e=e.replace(i,function(e,r,t){var n=t.search(/[*+-]/g)>-1?"ul":"ol";return a(r,n,!0)}):(i=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,e=e.replace(i,function(e,r,t,n){var s=n.search(/[*+-]/g)>-1?"ul":"ol";return a(t,s)})),e=e.replace(/~0/,"")}),n.subParser("outdent",function(e){"use strict";return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,"")}),n.subParser("paragraphs",function(e,r,t){"use strict";e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");for(var s=e.split(/\n{2,}/g),a=[],i=s.length,o=0;i>o;o++){var u=s[o];u.search(/~K(\d+)K/g)>=0?a.push(u):u.search(/\S/)>=0&&(u=n.subParser("spanGamut")(u,r,t),u=u.replace(/^([ \t]*)/g,""),u+="
",a.push(u))}for(i=a.length,o=0;i>o;o++)for(;a[o].search(/~K(\d+)K/)>=0;){var l=t.gHtmlBlocks[RegExp.$1];l=l.replace(/\$/g,"$$$$"),a[o]=a[o].replace(/~K\d+K/,l)}return a.join("\n\n")}),n.subParser("runExtension",function(e,r,t,n){"use strict";if(e.filter)r=e.filter(r,n.converter,t);else if(e.regex){var s=e.regex;!s instanceof RegExp&&(s=new RegExp(s,"g")),r=r.replace(s,e.replace)}return r}),n.subParser("spanGamut",function(e,r,t){"use strict";return e=n.subParser("codeSpans")(e,r,t),e=n.subParser("escapeSpecialCharsWithinTagAttributes")(e,r,t),e=n.subParser("encodeBackslashEscapes")(e,r,t),e=n.subParser("images")(e,r,t),e=n.subParser("anchors")(e,r,t),e=n.subParser("autoLinks")(e,r,t),e=n.subParser("encodeAmpsAndAngles")(e,r,t),e=n.subParser("italicsAndBold")(e,r,t),e=n.subParser("strikethrough")(e,r,t),e=e.replace(/ +\n/g,"
\n")}),n.subParser("strikethrough",function(e,r){"use strict";return r.strikethrough&&(e=e.replace(/(?:~T){2}([^~]+)(?:~T){2}/g,"$1")),e}),n.subParser("stripBlankLines",function(e){"use strict";return e.replace(/^[ \t]+$/gm,"")}),n.subParser("stripLinkDefinitions",function(e,r,t){"use strict";var s=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=~0))/gm;return e+="~0",e=e.replace(s,function(e,s,a,i,o,u,l){return s=s.toLowerCase(),t.gUrls[s]=n.subParser("encodeAmpsAndAngles")(a),u?u+l:(l&&(t.gTitles[s]=l.replace(/"|'/g,""")),r.parseImgDimensions&&i&&o&&(t.gDimensions[s]={width:i,height:o}),"")}),e=e.replace(/~0/,"")}),n.subParser("tables",function(e,r,t){"use strict";var s=function(){var e,s={};return s.th=function(e,s){var a="";return e=e.trim(),""===e?"":(r.tableHeaderId&&(a=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),e=n.subParser("spanGamut")(e,r,t),s=s&&""!==s.trim()?' style="'+s+'"':"",""+e+" | ")},s.td=function(e,s){var a=n.subParser("spanGamut")(e.trim(),r,t);return s=s&&""!==s.trim()?' style="'+s+'"':"",""+a+" | "},s.ths=function(){var e="",r=0,t=[].slice.apply(arguments[0]),n=[].slice.apply(arguments[1]);for(r;r\n",e+=s.ths.apply(this,[r,t]),e+="