import{cC as In,eb as zt}from"./B3Hm6diO.js";var Ce={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */var Cn=Ce.exports,kn;function Fn(){return kn||(kn=1,function(ft,dt){(function(O,m){ft.exports=m()})(typeof self<"u"?self:Cn,function(){return function(F){var O={};function m(L){if(O[L])return O[L].exports;var S=O[L]={i:L,l:!1,exports:{}};return F[L].call(S.exports,S,S.exports,m),S.l=!0,S.exports}return m.m=F,m.c=O,m.d=function(L,S,N){m.o(L,S)||Object.defineProperty(L,S,{configurable:!1,enumerable:!0,get:N})},m.n=function(L){var S=L&&L.__esModule?function(){return L.default}:function(){return L};return m.d(S,"a",S),S},m.o=function(L,S){return Object.prototype.hasOwnProperty.call(L,S)},m.p="",m(m.s=109)}([function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(17),S=m(18),N=m(19),y=m(45),d=m(46),f=m(47),i=m(48),t=m(49),n=m(12),h=m(32),u=m(33),c=m(31),a=m(1),o={Scope:a.Scope,create:a.create,find:a.find,query:a.query,register:a.register,Container:L.default,Format:S.default,Leaf:N.default,Embed:i.default,Scroll:y.default,Block:f.default,Inline:d.default,Text:t.default,Attributor:{Attribute:n.default,Class:h.default,Style:u.default,Store:c.default}};O.default=o},function(F,O,m){var L=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var r in o)o.hasOwnProperty(r)&&(a[r]=o[r])};return function(a,o){c(a,o);function r(){this.constructor=a}a.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=function(c){L(a,c);function a(o){var r=this;return o="[Parchment] "+o,r=c.call(this,o)||this,r.message=o,r.name=r.constructor.name,r}return a}(Error);O.ParchmentError=S;var N={},y={},d={},f={};O.DATA_KEY="__blot";var i;(function(c){c[c.TYPE=3]="TYPE",c[c.LEVEL=12]="LEVEL",c[c.ATTRIBUTE=13]="ATTRIBUTE",c[c.BLOT=14]="BLOT",c[c.INLINE=7]="INLINE",c[c.BLOCK=11]="BLOCK",c[c.BLOCK_BLOT=10]="BLOCK_BLOT",c[c.INLINE_BLOT=6]="INLINE_BLOT",c[c.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",c[c.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",c[c.ANY=15]="ANY"})(i=O.Scope||(O.Scope={}));function t(c,a){var o=h(c);if(o==null)throw new S("Unable to create "+c+" blot");var r=o,e=c instanceof Node||c.nodeType===Node.TEXT_NODE?c:r.create(a);return new r(e,a)}O.create=t;function n(c,a){return a===void 0&&(a=!1),c==null?null:c[O.DATA_KEY]!=null?c[O.DATA_KEY].blot:a?n(c.parentNode,a):null}O.find=n;function h(c,a){a===void 0&&(a=i.ANY);var o;if(typeof c=="string")o=f[c]||N[c];else if(c instanceof Text||c.nodeType===Node.TEXT_NODE)o=f.text;else if(typeof c=="number")c&i.LEVEL&i.BLOCK?o=f.block:c&i.LEVEL&i.INLINE&&(o=f.inline);else if(c instanceof HTMLElement){var r=(c.getAttribute("class")||"").split(/\s+/);for(var e in r)if(o=y[r[e]],o)break;o=o||d[c.tagName]}return o==null?null:a&i.LEVEL&o.scope&&a&i.TYPE&o.scope?o:null}O.query=h;function u(){for(var c=[],a=0;a1)return c.map(function(e){return u(e)});var o=c[0];if(typeof o.blotName!="string"&&typeof o.attrName!="string")throw new S("Invalid definition");if(o.blotName==="abstract")throw new S("Cannot register abstract class");if(f[o.blotName||o.attrName]=o,typeof o.keyName=="string")N[o.keyName]=o;else if(o.className!=null&&(y[o.className]=o),o.tagName!=null){Array.isArray(o.tagName)?o.tagName=o.tagName.map(function(e){return e.toUpperCase()}):o.tagName=o.tagName.toUpperCase();var r=Array.isArray(o.tagName)?o.tagName:[o.tagName];r.forEach(function(e){(d[e]==null||o.className==null)&&(d[e]=o)})}return o}O.register=u},function(F,O,m){var L=m(51),S=m(11),N=m(3),y=m(20),d="\0",f=function(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]};f.prototype.insert=function(i,t){var n={};return i.length===0?this:(n.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},f.prototype.delete=function(i){return i<=0?this:this.push({delete:i})},f.prototype.retain=function(i,t){if(i<=0)return this;var n={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},f.prototype.push=function(i){var t=this.ops.length,n=this.ops[t-1];if(i=N(!0,{},i),typeof n=="object"){if(typeof i.delete=="number"&&typeof n.delete=="number")return this.ops[t-1]={delete:n.delete+i.delete},this;if(typeof n.delete=="number"&&i.insert!=null&&(t-=1,n=this.ops[t-1],typeof n!="object"))return this.ops.unshift(i),this;if(S(i.attributes,n.attributes)){if(typeof i.insert=="string"&&typeof n.insert=="string")return this.ops[t-1]={insert:n.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof n.retain=="number")return this.ops[t-1]={retain:n.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this},f.prototype.chop=function(){var i=this.ops[this.ops.length-1];return i&&i.retain&&!i.attributes&&this.ops.pop(),this},f.prototype.filter=function(i){return this.ops.filter(i)},f.prototype.forEach=function(i){this.ops.forEach(i)},f.prototype.map=function(i){return this.ops.map(i)},f.prototype.partition=function(i){var t=[],n=[];return this.forEach(function(h){var u=i(h)?t:n;u.push(h)}),[t,n]},f.prototype.reduce=function(i,t){return this.ops.reduce(i,t)},f.prototype.changeLength=function(){return this.reduce(function(i,t){return t.insert?i+y.length(t):t.delete?i-t.delete:i},0)},f.prototype.length=function(){return this.reduce(function(i,t){return i+y.length(t)},0)},f.prototype.slice=function(i,t){i=i||0,typeof t!="number"&&(t=1/0);for(var n=[],h=y.iterator(this.ops),u=0;u0&&n.next(u.retain-c)}for(var a=new f(h);t.hasNext()||n.hasNext();)if(n.peekType()==="insert")a.push(n.next());else if(t.peekType()==="delete")a.push(t.next());else{var o=Math.min(t.peekLength(),n.peekLength()),r=t.next(o),e=n.next(o);if(typeof e.retain=="number"){var l={};typeof r.retain=="number"?l.retain=o:l.insert=r.insert;var E=y.attributes.compose(r.attributes,e.attributes,typeof r.retain=="number");if(E&&(l.attributes=E),a.push(l),!n.hasNext()&&S(a.ops[a.ops.length-1],l)){var b=new f(t.rest());return a.concat(b).chop()}}else typeof e.delete=="number"&&typeof r.retain=="number"&&a.push(e)}return a.chop()},f.prototype.concat=function(i){var t=new f(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t},f.prototype.diff=function(i,t){if(this.ops===i.ops)return new f;var n=[this,i].map(function(o){return o.map(function(r){if(r.insert!=null)return typeof r.insert=="string"?r.insert:d;var e=o===i?"on":"with";throw new Error("diff() called "+e+" non-document")}).join("")}),h=new f,u=L(n[0],n[1],t),c=y.iterator(this.ops),a=y.iterator(i.ops);return u.forEach(function(o){for(var r=o[1].length;r>0;){var e=0;switch(o[0]){case L.INSERT:e=Math.min(a.peekLength(),r),h.push(a.next(e));break;case L.DELETE:e=Math.min(r,c.peekLength()),c.next(e),h.delete(e);break;case L.EQUAL:e=Math.min(c.peekLength(),a.peekLength(),r);var l=c.next(e),E=a.next(e);S(l.insert,E.insert)?h.retain(e,y.attributes.diff(l.attributes,E.attributes)):h.push(E).delete(e);break}r-=e}}),h.chop()},f.prototype.eachLine=function(i,t){t=t||` `;for(var n=y.iterator(this.ops),h=new f,u=0;n.hasNext();){if(n.peekType()!=="insert")return;var c=n.peek(),a=y.length(c)-n.peekLength(),o=typeof c.insert=="string"?c.insert.indexOf(t,a)-a:-1;if(o<0)h.push(n.next());else if(o>0)h.push(n.next(o));else{if(i(h,n.next(1).attributes||{},u)===!1)return;u+=1,h=new f}}h.length()>0&&i(h,{},u)},f.prototype.transform=function(i,t){if(t=!!t,typeof i=="number")return this.transformPosition(i,t);for(var n=y.iterator(this.ops),h=y.iterator(i.ops),u=new f;n.hasNext()||h.hasNext();)if(n.peekType()==="insert"&&(t||h.peekType()!=="insert"))u.retain(y.length(n.next()));else if(h.peekType()==="insert")u.push(h.next());else{var c=Math.min(n.peekLength(),h.peekLength()),a=n.next(c),o=h.next(c);if(a.delete)continue;o.delete?u.push(o):u.retain(c,y.attributes.transform(a.attributes,o.attributes,t))}return u.chop()},f.prototype.transformPosition=function(i,t){t=!!t;for(var n=y.iterator(this.ops),h=0;n.hasNext()&&h<=i;){var u=n.peekLength(),c=n.peekType();if(n.next(),c==="delete"){i-=Math.min(u,i-h);continue}else c==="insert"&&(h"u"||m.call(n,c)},f=function(n,h){S&&h.name==="__proto__"?S(n,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):n[h.name]=h.newValue},i=function(n,h){if(h==="__proto__")if(m.call(n,h)){if(N)return N(n,h).value}else return;return n[h]};F.exports=function t(){var n,h,u,c,a,o,r=arguments[0],e=1,l=arguments.length,E=!1;for(typeof r=="boolean"&&(E=r,r=arguments[1]||{},e=2),(r==null||typeof r!="object"&&typeof r!="function")&&(r={});e0&&(x1&&arguments[1]!==void 0?arguments[1]:!1;if(I&&(x===0||x>=this.length()-b)){var U=this.clone();return x===0?(this.parent.insertBefore(U,this),this):(this.parent.insertBefore(U,this.next),U)}else{var z=S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"split",this).call(this,x,I);return this.cache={},z}}}]),_}(t.default.Block);T.blotName="block",T.tagName="P",T.defaultChild="break",T.allowedChildren=[c.default,t.default.Embed,o.default];function p(v){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v==null||(typeof v.formats=="function"&&(_=(0,y.default)(_,v.formats())),v.parent==null||v.parent.blotName=="scroll"||v.parent.statics.scope!==v.statics.scope)?_:p(v.parent,_)}O.bubbleFormats=p,O.BlockEmbed=g,O.default=T},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.overload=O.expandConfig=void 0;var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},S=function(){function C(q,A){var R=[],j=!0,H=!1,M=void 0;try{for(var P=q[Symbol.iterator](),B;!(j=(B=P.next()).done)&&(R.push(B.value),!(A&&R.length===A));j=!0);}catch(K){H=!0,M=K}finally{try{!j&&P.return&&P.return()}finally{if(H)throw M}}return R}return function(q,A){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return C(q,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N=function(){function C(q,A){for(var R=0;R2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof A!="string"){var M=A.attrName||A.blotName;typeof M=="string"?this.register("formats/"+M,A,R):Object.keys(A).forEach(function(P){j.register(P,A[P],R)})}else this.imports[A]!=null&&!H&&w.warn("Overwriting "+A+" with",R),this.imports[A]=R,(A.startsWith("blots/")||A.startsWith("formats/"))&&R.blotName!=="abstract"?a.default.register(R):A.startsWith("modules")&&typeof R.register=="function"&&R.register()}}]);function C(q){var A=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_(this,C),this.options=I(q,R),this.container=this.options.container,this.container==null)return w.error("Invalid Quill container",q);this.options.debug&&C.debug(this.options.debug);var j=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new n.default,this.scroll=a.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new i.default(this.scroll),this.selection=new r.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(n.default.events.EDITOR_CHANGE,function(M){M===n.default.events.TEXT_CHANGE&&A.root.classList.toggle("ql-blank",A.editor.isBlank())}),this.emitter.on(n.default.events.SCROLL_UPDATE,function(M,P){var B=A.selection.lastRange,K=B&&B.length===0?B.index:void 0;U.call(A,function(){return A.editor.update(null,P,K)},M)});var H=this.clipboard.convert(`
`+j+"


");this.setContents(H),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return N(C,[{key:"addContainer",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof A=="string"){var j=A;A=document.createElement("div"),A.classList.add(j)}return this.container.insertBefore(A,R),A}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(A,R,j){var H=this,M=z(A,R,j),P=S(M,4);return A=P[0],R=P[1],j=P[3],U.call(this,function(){return H.editor.deleteText(A,R)},j,A,-1*R)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(A),this.container.classList.toggle("ql-disabled",!A)}},{key:"focus",value:function(){var A=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=A,this.scrollIntoView()}},{key:"format",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n.default.sources.API;return U.call(this,function(){var M=j.getSelection(!0),P=new d.default;if(M==null)return P;if(a.default.query(A,a.default.Scope.BLOCK))P=j.editor.formatLine(M.index,M.length,v({},A,R));else{if(M.length===0)return j.selection.format(A,R),P;P=j.editor.formatText(M.index,M.length,v({},A,R))}return j.setSelection(M,n.default.sources.SILENT),P},H)}},{key:"formatLine",value:function(A,R,j,H,M){var P=this,B=void 0,K=z(A,R,j,H,M),G=S(K,4);return A=G[0],R=G[1],B=G[2],M=G[3],U.call(this,function(){return P.editor.formatLine(A,R,B)},M,A,0)}},{key:"formatText",value:function(A,R,j,H,M){var P=this,B=void 0,K=z(A,R,j,H,M),G=S(K,4);return A=G[0],R=G[1],B=G[2],M=G[3],U.call(this,function(){return P.editor.formatText(A,R,B)},M,A,0)}},{key:"getBounds",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=void 0;typeof A=="number"?j=this.selection.getBounds(A,R):j=this.selection.getBounds(A.index,A.length);var H=this.container.getBoundingClientRect();return{bottom:j.bottom-H.top,height:j.height,left:j.left-H.left,right:j.right-H.left,top:j.top-H.top,width:j.width}}},{key:"getContents",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,j=z(A,R),H=S(j,2);return A=H[0],R=H[1],this.editor.getContents(A,R)}},{key:"getFormat",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof A=="number"?this.editor.getFormat(A,R):this.editor.getFormat(A.index,A.length)}},{key:"getIndex",value:function(A){return A.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(A){return this.scroll.leaf(A)}},{key:"getLine",value:function(A){return this.scroll.line(A)}},{key:"getLines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof A!="number"?this.scroll.lines(A.index,A.length):this.scroll.lines(A,R)}},{key:"getModule",value:function(A){return this.theme.modules[A]}},{key:"getSelection",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return A&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,j=z(A,R),H=S(j,2);return A=H[0],R=H[1],this.editor.getText(A,R)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(A,R,j){var H=this,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C.sources.API;return U.call(this,function(){return H.editor.insertEmbed(A,R,j)},M,A)}},{key:"insertText",value:function(A,R,j,H,M){var P=this,B=void 0,K=z(A,0,j,H,M),G=S(K,4);return A=G[0],B=G[2],M=G[3],U.call(this,function(){return P.editor.insertText(A,R,B)},M,A,R.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(A,R,j){this.clipboard.dangerouslyPasteHTML(A,R,j)}},{key:"removeFormat",value:function(A,R,j){var H=this,M=z(A,R,j),P=S(M,4);return A=P[0],R=P[1],j=P[3],U.call(this,function(){return H.editor.removeFormat(A,R)},j,A)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(A){var R=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.default.sources.API;return U.call(this,function(){A=new d.default(A);var H=R.getLength(),M=R.editor.deleteText(0,H),P=R.editor.applyDelta(A),B=P.ops[P.ops.length-1];B!=null&&typeof B.insert=="string"&&B.insert[B.insert.length-1]===` `&&(R.editor.deleteText(R.getLength()-1,1),P.delete(1));var K=M.compose(P);return K},j)}},{key:"setSelection",value:function(A,R,j){if(A==null)this.selection.setRange(null,R||C.sources.API);else{var H=z(A,R,j),M=S(H,4);A=M[0],R=M[1],j=M[3],this.selection.setRange(new o.Range(A,R),j),j!==n.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.default.sources.API,j=new d.default().insert(A);return this.setContents(j,R)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n.default.sources.USER,R=this.scroll.update(A);return this.selection.update(A),R}},{key:"updateContents",value:function(A){var R=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.default.sources.API;return U.call(this,function(){return A=new d.default(A),R.editor.applyDelta(A,j)},j,!0)}}]),C}();x.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},x.events=n.default.events,x.sources=n.default.sources,x.version="1.3.7",x.imports={delta:d.default,parchment:a.default,"core/module":u.default,"core/theme":T.default};function I(C,q){if(q=(0,l.default)(!0,{container:C,modules:{clipboard:!0,keyboard:!0,history:!0}},q),!q.theme||q.theme===x.DEFAULTS.theme)q.theme=T.default;else if(q.theme=x.import("themes/"+q.theme),q.theme==null)throw new Error("Invalid theme "+q.theme+". Did you register it?");var A=(0,l.default)(!0,{},q.theme.DEFAULTS);[A,q].forEach(function(H){H.modules=H.modules||{},Object.keys(H.modules).forEach(function(M){H.modules[M]===!0&&(H.modules[M]={})})});var R=Object.keys(A.modules).concat(Object.keys(q.modules)),j=R.reduce(function(H,M){var P=x.import("modules/"+M);return P==null?w.error("Cannot load "+M+" module. Are you sure you registered it?"):H[M]=P.DEFAULTS||{},H},{});return q.modules!=null&&q.modules.toolbar&&q.modules.toolbar.constructor!==Object&&(q.modules.toolbar={container:q.modules.toolbar}),q=(0,l.default)(!0,{},x.DEFAULTS,{modules:j},A,q),["bounds","container","scrollingContainer"].forEach(function(H){typeof q[H]=="string"&&(q[H]=document.querySelector(q[H]))}),q.modules=Object.keys(q.modules).reduce(function(H,M){return q.modules[M]&&(H[M]=q.modules[M]),H},{}),q}function U(C,q,A,R){if(this.options.strict&&!this.isEnabled()&&q===n.default.sources.USER)return new d.default;var j=A==null?null:this.getSelection(),H=this.editor.delta,M=C();if(j!=null&&(A===!0&&(A=j.index),R==null?j=Z(j,M,q):R!==0&&(j=Z(j,A,R,q)),this.setSelection(j,n.default.sources.SILENT)),M.length()>0){var P,B=[n.default.events.TEXT_CHANGE,M,H,q];if((P=this.emitter).emit.apply(P,[n.default.events.EDITOR_CHANGE].concat(B)),q!==n.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,B)}}return M}function z(C,q,A,R,j){var H={};return typeof C.index=="number"&&typeof C.length=="number"?typeof q!="number"?(j=R,R=A,A=q,q=C.length,C=C.index):(q=C.length,C=C.index):typeof q!="number"&&(j=R,R=A,A=q,q=0),(typeof A>"u"?"undefined":L(A))==="object"?(H=A,j=R):typeof A=="string"&&(R!=null?H[A]=R:j=A),j=j||n.default.sources.API,[C,q,H,j]}function Z(C,q,A,R){if(C==null)return null;var j=void 0,H=void 0;if(q instanceof d.default){var M=[C.index,C.index+C.length].map(function(G){return q.transformPosition(G,R!==n.default.sources.USER)}),P=S(M,2);j=P[0],H=P[1]}else{var B=[C.index,C.index+C.length].map(function(G){return G=0?G+A:Math.max(q,G+A)}),K=S(B,2);j=K[0],H=K[1]}return new o.Range(j,H-j)}O.expandConfig=I,O.overload=z,O.default=x},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function c(a,o){for(var r=0;r0){var e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}],[{key:"compare",value:function(r,e){var l=a.order.indexOf(r),E=a.order.indexOf(e);return l>=0||E>=0?l-E:r===e?0:r1?E-1:0),g=1;g1&&arguments[1]!==void 0?arguments[1]:{};L(this,N),this.quill=y,this.options=d};S.DEFAULTS={},O.default=S},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=["error","warn","log","info"],S="warn";function N(d){if(L.indexOf(d)<=L.indexOf(S)){for(var f,i=arguments.length,t=Array(i>1?i-1:0),n=1;n0&&typeof t[0]!="number")}function i(t,n,h){var u,c;if(d(t)||d(n)||t.prototype!==n.prototype)return!1;if(N(t))return N(n)?(t=L.call(t),n=L.call(n),y(t,n,h)):!1;if(f(t)){if(!f(n)||t.length!==n.length)return!1;for(u=0;u=0;u--)if(a[u]!=o[u])return!1;for(u=a.length-1;u>=0;u--)if(c=a[u],!y(t[c],n[c],h))return!1;return typeof t==typeof n}},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(1),S=function(){function N(y,d,f){f===void 0&&(f={}),this.attrName=y,this.keyName=d;var i=L.Scope.TYPE&L.Scope.ATTRIBUTE;f.scope!=null?this.scope=f.scope&L.Scope.LEVEL|i:this.scope=L.Scope.ATTRIBUTE,f.whitelist!=null&&(this.whitelist=f.whitelist)}return N.keys=function(y){return[].map.call(y.attributes,function(d){return d.name})},N.prototype.add=function(y,d){return this.canAdd(y,d)?(y.setAttribute(this.keyName,d),!0):!1},N.prototype.canAdd=function(y,d){var f=L.query(y,L.Scope.BLOT&(this.scope|L.Scope.TYPE));return f==null?!1:this.whitelist==null?!0:typeof d=="string"?this.whitelist.indexOf(d.replace(/["']/g,""))>-1:this.whitelist.indexOf(d)>-1},N.prototype.remove=function(y){y.removeAttribute(this.keyName)},N.prototype.value=function(y){var d=y.getAttribute(this.keyName);return this.canAdd(y,d)&&d?d:""},N}();O.default=S},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.Code=void 0;var L=function(){function g(T,p){var v=[],_=!0,w=!1,x=void 0;try{for(var I=T[Symbol.iterator](),U;!(_=(U=I.next()).done)&&(v.push(U.value),!(p&&v.length===p));_=!0);}catch(z){w=!0,x=z}finally{try{!_&&I.return&&I.return()}finally{if(w)throw x}}return v}return function(T,p){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return g(T,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function g(T,p){for(var v=0;v=v+_)){var U=this.newlineIndex(v,!0)+1,z=I-U+1,Z=this.isolate(U,z),C=Z.next;Z.format(w,x),C instanceof T&&C.formatAt(0,v-U+_-z,w,x)}}}},{key:"insertAt",value:function(v,_,w){if(w==null){var x=this.descendant(a.default,v),I=L(x,2),U=I[0],z=I[1];U.insertAt(z,_)}}},{key:"length",value:function(){var v=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?v:v+1}},{key:"newlineIndex",value:function(v){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_)return this.domNode.textContent.slice(0,v).lastIndexOf(` `);var w=this.domNode.textContent.slice(v).indexOf(` `);return w>-1?v+w:-1}},{key:"optimize",value:function(v){this.domNode.textContent.endsWith(` `)||this.appendChild(i.default.create("text",` `)),N(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,v);var _=this.next;_!=null&&_.prev===this&&_.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===_.statics.formats(_.domNode)&&(_.optimize(v),_.moveChildren(this),_.remove())}},{key:"replace",value:function(v){N(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replace",this).call(this,v),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(_){var w=i.default.find(_);w==null?_.parentNode.removeChild(_):w instanceof i.default.Embed?w.remove():w.unwrap()})}}],[{key:"create",value:function(v){var _=N(T.__proto__||Object.getPrototypeOf(T),"create",this).call(this,v);return _.setAttribute("spellcheck",!1),_}},{key:"formats",value:function(){return!0}}]),T}(n.default);b.blotName="code-block",b.tagName="PRE",b.TAB=" ",O.Code=E,O.default=b},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},S=function(){function C(q,A){var R=[],j=!0,H=!1,M=void 0;try{for(var P=q[Symbol.iterator](),B;!(j=(B=P.next()).done)&&(R.push(B.value),!(A&&R.length===A));j=!0);}catch(K){H=!0,M=K}finally{try{!j&&P.return&&P.return()}finally{if(H)throw M}}return R}return function(q,A){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return C(q,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N=function(){function C(q,A){for(var R=0;R=H&&!G.endsWith(` `)&&(j=!0),R.scroll.insertAt(M,G);var Y=R.scroll.line(M),tt=S(Y,2),nt=tt[0],it=tt[1],ut=(0,v.default)({},(0,o.bubbleFormats)(nt));if(nt instanceof r.default){var st=nt.descendant(n.default.Leaf,it),mt=S(st,1),gt=mt[0];ut=(0,v.default)(ut,(0,o.bubbleFormats)(gt))}K=i.default.attributes.diff(ut,K)||{}}else if(L(P.insert)==="object"){var $=Object.keys(P.insert)[0];if($==null)return M;R.scroll.insertAt(M,$,P.insert[$])}H+=B}return Object.keys(K).forEach(function(W){R.scroll.formatAt(M,B,W,K[W])}),M+B},0),A.reduce(function(M,P){return typeof P.delete=="number"?(R.scroll.deleteAt(M,P.delete),M):M+(P.retain||P.insert.length||1)},0),this.scroll.batchEnd(),this.update(A)}},{key:"deleteText",value:function(A,R){return this.scroll.deleteAt(A,R),this.update(new d.default().retain(A).delete(R))}},{key:"formatLine",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(H).forEach(function(M){if(!(j.scroll.whitelist!=null&&!j.scroll.whitelist[M])){var P=j.scroll.lines(A,Math.max(R,1)),B=R;P.forEach(function(K){var G=K.length();if(!(K instanceof u.default))K.format(M,H[M]);else{var Y=A-K.offset(j.scroll),tt=K.newlineIndex(Y+B)-Y+1;K.formatAt(Y,tt,M,H[M])}B-=G})}}),this.scroll.optimize(),this.update(new d.default().retain(A).retain(R,(0,b.default)(H)))}},{key:"formatText",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(H).forEach(function(M){j.scroll.formatAt(A,R,M,H[M])}),this.update(new d.default().retain(A).retain(R,(0,b.default)(H)))}},{key:"getContents",value:function(A,R){return this.delta.slice(A,A+R)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(A,R){return A.concat(R.delta())},new d.default)}},{key:"getFormat",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=[],H=[];R===0?this.scroll.path(A).forEach(function(P){var B=S(P,1),K=B[0];K instanceof r.default?j.push(K):K instanceof n.default.Leaf&&H.push(K)}):(j=this.scroll.lines(A,R),H=this.scroll.descendants(n.default.Leaf,A,R));var M=[j,H].map(function(P){if(P.length===0)return{};for(var B=(0,o.bubbleFormats)(P.shift());Object.keys(B).length>0;){var K=P.shift();if(K==null)return B;B=z((0,o.bubbleFormats)(K),B)}return B});return v.default.apply(v.default,M)}},{key:"getText",value:function(A,R){return this.getContents(A,R).filter(function(j){return typeof j.insert=="string"}).map(function(j){return j.insert}).join("")}},{key:"insertEmbed",value:function(A,R,j){return this.scroll.insertAt(A,R,j),this.update(new d.default().retain(A).insert(w({},R,j)))}},{key:"insertText",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return R=R.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(A,R),Object.keys(H).forEach(function(M){j.scroll.formatAt(A,R.length,M,H[M])}),this.update(new d.default().retain(A).insert(R,(0,b.default)(H)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var A=this.scroll.children.head;return A.statics.blotName!==r.default.blotName||A.children.length>1?!1:A.children.head instanceof l.default}},{key:"removeFormat",value:function(A,R){var j=this.getText(A,R),H=this.scroll.line(A+R),M=S(H,2),P=M[0],B=M[1],K=0,G=new d.default;P!=null&&(P instanceof u.default?K=P.newlineIndex(B)-B+1:K=P.length()-B,G=P.delta().slice(B,B+K-1).insert(` `));var Y=this.getContents(A,R+K),tt=Y.diff(new d.default().insert(j).concat(G)),nt=new d.default().retain(A).concat(tt);return this.applyDelta(nt)}},{key:"update",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,H=this.delta;if(R.length===1&&R[0].type==="characterData"&&R[0].target.data.match(I)&&n.default.find(R[0].target)){var M=n.default.find(R[0].target),P=(0,o.bubbleFormats)(M),B=M.offset(this.scroll),K=R[0].oldValue.replace(a.default.CONTENTS,""),G=new d.default().insert(K),Y=new d.default().insert(M.value()),tt=new d.default().retain(B).concat(G.diff(Y,j));A=tt.reduce(function(nt,it){return it.insert?nt.insert(it.insert,P):nt.push(it)},new d.default),this.delta=H.compose(A)}else this.delta=this.getDelta(),(!A||!(0,T.default)(H.compose(A),this.delta))&&(A=H.diff(this.delta,j));return A}}]),C}();function z(C,q){return Object.keys(q).reduce(function(A,R){return C[R]==null||(q[R]===C[R]?A[R]=q[R]:Array.isArray(q[R])?q[R].indexOf(C[R])<0&&(A[R]=q[R].concat([C[R]])):A[R]=[q[R],C[R]]),A},{})}function Z(C){return C.reduce(function(q,A){if(A.insert===1){var R=(0,b.default)(A.attributes);return delete R.image,q.insert({image:A.attributes.image},R)}if(A.attributes!=null&&(A.attributes.list===!0||A.attributes.bullet===!0)&&(A=(0,b.default)(A),A.attributes.list?A.attributes.list="ordered":(A.attributes.list="bullet",delete A.attributes.bullet)),typeof A.insert=="string"){var j=A.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return q.insert(j,A.attributes)}return q.push(A)},new d.default)}O.default=U},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.Range=void 0;var L=function(){function g(T,p){var v=[],_=!0,w=!1,x=void 0;try{for(var I=T[Symbol.iterator](),U;!(_=(U=I.next()).done)&&(v.push(U.value),!(p&&v.length===p));_=!0);}catch(z){w=!0,x=z}finally{try{!_&&I.return&&I.return()}finally{if(w)throw x}}return v}return function(T,p){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return g(T,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function g(T,p){for(var v=0;v1&&arguments[1]!==void 0?arguments[1]:0;r(this,g),this.index=T,this.length=p},E=function(){function g(T,p){var v=this;r(this,g),this.emitter=p,this.scroll=T,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new l(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){v.mouseDown||setTimeout(v.update.bind(v,h.default.sources.USER),1)}),this.emitter.on(h.default.events.EDITOR_CHANGE,function(_,w){_===h.default.events.TEXT_CHANGE&&w.length()>0&&v.update(h.default.sources.SILENT)}),this.emitter.on(h.default.events.SCROLL_BEFORE_UPDATE,function(){if(v.hasFocus()){var _=v.getNativeRange();_!=null&&_.start.node!==v.cursor.textNode&&v.emitter.once(h.default.events.SCROLL_UPDATE,function(){try{v.setNativeRange(_.start.node,_.start.offset,_.end.node,_.end.offset)}catch{}})}}),this.emitter.on(h.default.events.SCROLL_OPTIMIZE,function(_,w){if(w.range){var x=w.range,I=x.startNode,U=x.startOffset,z=x.endNode,Z=x.endOffset;v.setNativeRange(I,U,z,Z)}}),this.update(h.default.sources.SILENT)}return S(g,[{key:"handleComposition",value:function(){var p=this;this.root.addEventListener("compositionstart",function(){p.composing=!0}),this.root.addEventListener("compositionend",function(){if(p.composing=!1,p.cursor.parent){var v=p.cursor.restore();if(!v)return;setTimeout(function(){p.setNativeRange(v.startNode,v.startOffset,v.endNode,v.endOffset)},1)}})}},{key:"handleDragging",value:function(){var p=this;this.emitter.listenDOM("mousedown",document.body,function(){p.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){p.mouseDown=!1,p.update(h.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(p,v){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[p])){this.scroll.update();var _=this.getNativeRange();if(!(_==null||!_.native.collapsed||y.default.query(p,y.default.Scope.BLOCK))){if(_.start.node!==this.cursor.textNode){var w=y.default.find(_.start.node,!1);if(w==null)return;if(w instanceof y.default.Leaf){var x=w.split(_.start.offset);w.parent.insertBefore(this.cursor,x)}else w.insertBefore(this.cursor,_.start.node);this.cursor.attach()}this.cursor.format(p,v),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=this.scroll.length();p=Math.min(p,_-1),v=Math.min(p+v,_-1)-p;var w=void 0,x=this.scroll.leaf(p),I=L(x,2),U=I[0],z=I[1];if(U==null)return null;var Z=U.position(z,!0),C=L(Z,2);w=C[0],z=C[1];var q=document.createRange();if(v>0){q.setStart(w,z);var A=this.scroll.leaf(p+v),R=L(A,2);if(U=R[0],z=R[1],U==null)return null;var j=U.position(z,!0),H=L(j,2);return w=H[0],z=H[1],q.setEnd(w,z),q.getBoundingClientRect()}else{var M="left",P=void 0;return w instanceof Text?(z0&&(M="right")),{bottom:P.top+P.height,height:P.height,left:P[M],right:P[M],top:P.top,width:0}}}},{key:"getNativeRange",value:function(){var p=document.getSelection();if(p==null||p.rangeCount<=0)return null;var v=p.getRangeAt(0);if(v==null)return null;var _=this.normalizeNative(v);return e.info("getNativeRange",_),_}},{key:"getRange",value:function(){var p=this.getNativeRange();if(p==null)return[null,null];var v=this.normalizedToRange(p);return[v,p]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(p){var v=this,_=[[p.start.node,p.start.offset]];p.native.collapsed||_.push([p.end.node,p.end.offset]);var w=_.map(function(U){var z=L(U,2),Z=z[0],C=z[1],q=y.default.find(Z,!0),A=q.offset(v.scroll);return C===0?A:q instanceof y.default.Container?A+q.length():A+q.index(Z,C)}),x=Math.min(Math.max.apply(Math,o(w)),this.scroll.length()-1),I=Math.min.apply(Math,[x].concat(o(w)));return new l(I,x-I)}},{key:"normalizeNative",value:function(p){if(!b(this.root,p.startContainer)||!p.collapsed&&!b(this.root,p.endContainer))return null;var v={start:{node:p.startContainer,offset:p.startOffset},end:{node:p.endContainer,offset:p.endOffset},native:p};return[v.start,v.end].forEach(function(_){for(var w=_.node,x=_.offset;!(w instanceof Text)&&w.childNodes.length>0;)if(w.childNodes.length>x)w=w.childNodes[x],x=0;else if(w.childNodes.length===x)w=w.lastChild,x=w instanceof Text?w.data.length:w.childNodes.length+1;else break;_.node=w,_.offset=x}),v}},{key:"rangeToNative",value:function(p){var v=this,_=p.collapsed?[p.index]:[p.index,p.index+p.length],w=[],x=this.scroll.length();return _.forEach(function(I,U){I=Math.min(x-1,I);var z=void 0,Z=v.scroll.leaf(I),C=L(Z,2),q=C[0],A=C[1],R=q.position(A,U!==0),j=L(R,2);z=j[0],A=j[1],w.push(z,A)}),w.length<2&&(w=w.concat(w)),w}},{key:"scrollIntoView",value:function(p){var v=this.lastRange;if(v!=null){var _=this.getBounds(v.index,v.length);if(_!=null){var w=this.scroll.length()-1,x=this.scroll.line(Math.min(v.index,w)),I=L(x,1),U=I[0],z=U;if(v.length>0){var Z=this.scroll.line(Math.min(v.index+v.length,w)),C=L(Z,1);z=C[0]}if(!(U==null||z==null)){var q=p.getBoundingClientRect();_.topq.bottom&&(p.scrollTop+=_.bottom-q.bottom)}}}}},{key:"setNativeRange",value:function(p,v){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:v,x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(e.info("setNativeRange",p,v,_,w),!(p!=null&&(this.root.parentNode==null||p.parentNode==null||_.parentNode==null))){var I=document.getSelection();if(I!=null)if(p!=null){this.hasFocus()||this.root.focus();var U=(this.getNativeRange()||{}).native;if(U==null||x||p!==U.startContainer||v!==U.startOffset||_!==U.endContainer||w!==U.endOffset){p.tagName=="BR"&&(v=[].indexOf.call(p.parentNode.childNodes,p),p=p.parentNode),_.tagName=="BR"&&(w=[].indexOf.call(_.parentNode.childNodes,_),_=_.parentNode);var z=document.createRange();z.setStart(p,v),z.setEnd(_,w),I.removeAllRanges(),I.addRange(z)}}else I.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.default.sources.API;if(typeof v=="string"&&(_=v,v=!1),e.info("setRange",p),p!=null){var w=this.rangeToNative(p);this.setNativeRange.apply(this,o(w).concat([v]))}else this.setNativeRange(null);this.update(_)}},{key:"update",value:function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.default.sources.USER,v=this.lastRange,_=this.getRange(),w=L(_,2),x=w[0],I=w[1];if(this.lastRange=x,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,t.default)(v,this.lastRange)){var U;!this.composing&&I!=null&&I.native.collapsed&&I.start.node!==this.cursor.textNode&&this.cursor.restore();var z=[h.default.events.SELECTION_CHANGE,(0,f.default)(this.lastRange),(0,f.default)(v),p];if((U=this.emitter).emit.apply(U,[h.default.events.EDITOR_CHANGE].concat(z)),p!==h.default.sources.SILENT){var Z;(Z=this.emitter).emit.apply(Z,z)}}}}]),g}();function b(g,T){try{T.parentNode}catch{return!1}return T instanceof Text&&(T=T.parentNode),g.contains(T)}O.Range=l,O.default=E},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function h(u,c){for(var a=0;a0&&(n+=1),[this.parent.domNode,n]},f.prototype.value=function(){var i;return i={},i[this.statics.blotName]=this.statics.value(this.domNode)||!0,i},f.scope=N.Scope.INLINE_BLOT,f}(S.default);O.default=y},function(F,O,m){var L=m(11),S=m(3),N={attributes:{compose:function(d,f,i){typeof d!="object"&&(d={}),typeof f!="object"&&(f={});var t=S(!0,{},f);i||(t=Object.keys(t).reduce(function(h,u){return t[u]!=null&&(h[u]=t[u]),h},{}));for(var n in d)d[n]!==void 0&&f[n]===void 0&&(t[n]=d[n]);return Object.keys(t).length>0?t:void 0},diff:function(d,f){typeof d!="object"&&(d={}),typeof f!="object"&&(f={});var i=Object.keys(d).concat(Object.keys(f)).reduce(function(t,n){return L(d[n],f[n])||(t[n]=f[n]===void 0?null:f[n]),t},{});return Object.keys(i).length>0?i:void 0},transform:function(d,f,i){if(typeof d!="object")return f;if(typeof f=="object"){if(!i)return f;var t=Object.keys(f).reduce(function(n,h){return d[h]===void 0&&(n[h]=f[h]),n},{});return Object.keys(t).length>0?t:void 0}}},iterator:function(d){return new y(d)},length:function(d){return typeof d.delete=="number"?d.delete:typeof d.retain=="number"?d.retain:typeof d.insert=="string"?d.insert.length:1}};function y(d){this.ops=d,this.index=0,this.offset=0}y.prototype.hasNext=function(){return this.peekLength()<1/0},y.prototype.next=function(d){d||(d=1/0);var f=this.ops[this.index];if(f){var i=this.offset,t=N.length(f);if(d>=t-i?(d=t-i,this.index+=1,this.offset=0):this.offset+=d,typeof f.delete=="number")return{delete:d};var n={};return f.attributes&&(n.attributes=f.attributes),typeof f.retain=="number"?n.retain=d:typeof f.insert=="string"?n.insert=f.insert.substr(i,d):n.insert=f.insert,n}else return{retain:1/0}},y.prototype.peek=function(){return this.ops[this.index]},y.prototype.peekLength=function(){return this.ops[this.index]?N.length(this.ops[this.index])-this.offset:1/0},y.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},y.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var d=this.offset,f=this.index,i=this.next(),t=this.ops.slice(this.index);return this.offset=d,this.index=f,[i].concat(t)}else return[]},F.exports=N},function(F,O){var m=function(){function L(u,c){return c!=null&&u instanceof c}var S;try{S=Map}catch{S=function(){}}var N;try{N=Set}catch{N=function(){}}var y;try{y=Promise}catch{y=function(){}}function d(u,c,a,o,r){typeof c=="object"&&(a=c.depth,o=c.prototype,r=c.includeNonEnumerable,c=c.circular);var e=[],l=[],E=typeof Buffer<"u";typeof c>"u"&&(c=!0),typeof a>"u"&&(a=1/0);function b(g,T){if(g===null)return null;if(T===0)return g;var p,v;if(typeof g!="object")return g;if(L(g,S))p=new S;else if(L(g,N))p=new N;else if(L(g,y))p=new y(function(q,A){g.then(function(R){q(b(R,T-1))},function(R){A(b(R,T-1))})});else if(d.__isArray(g))p=[];else if(d.__isRegExp(g))p=new RegExp(g.source,h(g)),g.lastIndex&&(p.lastIndex=g.lastIndex);else if(d.__isDate(g))p=new Date(g.getTime());else{if(E&&Buffer.isBuffer(g))return Buffer.allocUnsafe?p=Buffer.allocUnsafe(g.length):p=new Buffer(g.length),g.copy(p),p;L(g,Error)?p=Object.create(g):typeof o>"u"?(v=Object.getPrototypeOf(g),p=Object.create(v)):(p=Object.create(o),v=o)}if(c){var _=e.indexOf(g);if(_!=-1)return l[_];e.push(g),l.push(p)}L(g,S)&&g.forEach(function(q,A){var R=b(A,T-1),j=b(q,T-1);p.set(R,j)}),L(g,N)&&g.forEach(function(q){var A=b(q,T-1);p.add(A)});for(var w in g){var x;v&&(x=Object.getOwnPropertyDescriptor(v,w)),!(x&&x.set==null)&&(p[w]=b(g[w],T-1))}if(Object.getOwnPropertySymbols)for(var I=Object.getOwnPropertySymbols(g),w=0;w0){if(z instanceof t.BlockEmbed||A instanceof t.BlockEmbed){this.optimize();return}if(z instanceof a.default){var R=z.newlineIndex(z.length(),!0);if(R>-1&&(z=z.split(R+1),z===A)){this.optimize();return}}else if(A instanceof a.default){var j=A.newlineIndex(0);j>-1&&A.split(j+1)}var H=A.children.head instanceof u.default?null:A.children.head;z.moveChildren(A,H),z.remove()}this.optimize()}},{key:"enable",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",w)}},{key:"formatAt",value:function(w,x,I,U){this.whitelist!=null&&!this.whitelist[I]||(N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"formatAt",this).call(this,w,x,I,U),this.optimize())}},{key:"insertAt",value:function(w,x,I){if(!(I!=null&&this.whitelist!=null&&!this.whitelist[x])){if(w>=this.length())if(I==null||d.default.query(x,d.default.Scope.BLOCK)==null){var U=d.default.create(this.statics.defaultChild);this.appendChild(U),I==null&&x.endsWith(` `)&&(x=x.slice(0,-1)),U.insertAt(0,x,I)}else{var z=d.default.create(x,I);this.appendChild(z)}else N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertAt",this).call(this,w,x,I);this.optimize()}}},{key:"insertBefore",value:function(w,x){if(w.statics.scope===d.default.Scope.INLINE_BLOT){var I=d.default.create(this.statics.defaultChild);I.appendChild(w),w=I}N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,w,x)}},{key:"leaf",value:function(w){return this.path(w).pop()||[null,-1]}},{key:"line",value:function(w){return w===this.length()?this.line(w-1):this.descendant(g,w)}},{key:"lines",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,I=function U(z,Z,C){var q=[],A=C;return z.children.forEachAt(Z,C,function(R,j,H){g(R)?q.push(R):R instanceof d.default.Container&&(q=q.concat(U(R,j,A))),A-=H}),q};return I(this,w,x)}},{key:"optimize",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,w,x),w.length>0&&this.emitter.emit(i.default.events.SCROLL_OPTIMIZE,w,x))}},{key:"path",value:function(w){return N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"path",this).call(this,w).slice(1)}},{key:"update",value:function(w){if(this.batch!==!0){var x=i.default.sources.USER;typeof w=="string"&&(x=w),Array.isArray(w)||(w=this.observer.takeRecords()),w.length>0&&this.emitter.emit(i.default.events.SCROLL_BEFORE_UPDATE,x,w),N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"update",this).call(this,w.concat([])),w.length>0&&this.emitter.emit(i.default.events.SCROLL_UPDATE,x,w)}}}]),v}(d.default.Scroll);T.blotName="scroll",T.className="ql-editor",T.tagName="DIV",T.defaultChild="block",T.allowedChildren=[n.default,t.BlockEmbed,r.default],O.default=T},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.SHORTKEY=O.default=void 0;var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},S=function(){function P(B,K){var G=[],Y=!0,tt=!1,nt=void 0;try{for(var it=B[Symbol.iterator](),ut;!(Y=(ut=it.next()).done)&&(G.push(ut.value),!(K&&G.length===K));Y=!0);}catch(st){tt=!0,nt=st}finally{try{!Y&&it.return&&it.return()}finally{if(tt)throw nt}}return G}return function(B,K){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return P(B,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N=function(){function P(B,K){for(var G=0;G1&&arguments[1]!==void 0?arguments[1]:{},tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nt=M(G);if(nt==null||nt.key==null)return I.warn("Attempted to add invalid keyboard binding",nt);typeof Y=="function"&&(Y={handler:Y}),typeof tt=="function"&&(tt={handler:tt}),nt=(0,n.default)(nt,Y,tt),this.bindings[nt.key]=this.bindings[nt.key]||[],this.bindings[nt.key].push(nt)}},{key:"listen",value:function(){var G=this;this.quill.root.addEventListener("keydown",function(Y){if(!Y.defaultPrevented){var tt=Y.which||Y.keyCode,nt=(G.bindings[tt]||[]).filter(function(ct){return B.match(Y,ct)});if(nt.length!==0){var it=G.quill.getSelection();if(!(it==null||!G.quill.hasFocus())){var ut=G.quill.getLine(it.index),st=S(ut,2),mt=st[0],gt=st[1],$=G.quill.getLeaf(it.index),W=S($,2),Q=W[0],J=W[1],X=it.length===0?[Q,J]:G.quill.getLeaf(it.index+it.length),at=S(X,2),rt=at[0],ot=at[1],wt=Q instanceof r.default.Text?Q.value().slice(0,J):"",Ot=rt instanceof r.default.Text?rt.value().slice(ot):"",pt={collapsed:it.length===0,empty:it.length===0&&mt.length()<=1,format:G.quill.getFormat(it),offset:gt,prefix:wt,suffix:Ot},Kt=nt.some(function(ct){if(ct.collapsed!=null&&ct.collapsed!==pt.collapsed||ct.empty!=null&&ct.empty!==pt.empty||ct.offset!=null&&ct.offset!==pt.offset)return!1;if(Array.isArray(ct.format)){if(ct.format.every(function(Lt){return pt.format[Lt]==null}))return!1}else if(L(ct.format)==="object"&&!Object.keys(ct.format).every(function(Lt){return ct.format[Lt]===!0?pt.format[Lt]!=null:ct.format[Lt]===!1?pt.format[Lt]==null:(0,i.default)(ct.format[Lt],pt.format[Lt])}))return!1;return ct.prefix!=null&&!ct.prefix.test(pt.prefix)||ct.suffix!=null&&!ct.suffix.test(pt.suffix)?!1:ct.handler.call(G,it,pt)!==!0});Kt&&Y.preventDefault()}}}})}}]),B}(T.default);z.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},z.DEFAULTS={bindings:{bold:H("bold"),italic:H("italic"),underline:H("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(B,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","+1",l.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(B,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","-1",l.default.sources.USER)}},"outdent backspace":{key:z.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(B,K){K.format.indent!=null?this.quill.format("indent","-1",l.default.sources.USER):K.format.list!=null&&this.quill.format("list",!1,l.default.sources.USER)}},"indent code-block":j(!0),"outdent code-block":j(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(B){this.quill.deleteText(B.index-1,1,l.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(B){this.quill.history.cutoff();var K=new u.default().retain(B.index).delete(B.length).insert(" ");this.quill.updateContents(K,l.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index+1,l.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(B,K){this.quill.format("list",!1,l.default.sources.USER),K.format.indent&&this.quill.format("indent",!1,l.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(B){var K=this.quill.getLine(B.index),G=S(K,2),Y=G[0],tt=G[1],nt=(0,n.default)({},Y.formats(),{list:"checked"}),it=new u.default().retain(B.index).insert(` `,nt).retain(Y.length()-tt-1).retain(1,{list:"unchecked"});this.quill.updateContents(it,l.default.sources.USER),this.quill.setSelection(B.index+1,l.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(B,K){var G=this.quill.getLine(B.index),Y=S(G,2),tt=Y[0],nt=Y[1],it=new u.default().retain(B.index).insert(` `,K.format).retain(tt.length()-nt-1).retain(1,{header:null});this.quill.updateContents(it,l.default.sources.USER),this.quill.setSelection(B.index+1,l.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(B,K){var G=K.prefix.length,Y=this.quill.getLine(B.index),tt=S(Y,2),nt=tt[0],it=tt[1];if(it>G)return!0;var ut=void 0;switch(K.prefix.trim()){case"[]":case"[ ]":ut="unchecked";break;case"[x]":ut="checked";break;case"-":case"*":ut="bullet";break;default:ut="ordered"}this.quill.insertText(B.index," ",l.default.sources.USER),this.quill.history.cutoff();var st=new u.default().retain(B.index-it).delete(G+1).retain(nt.length()-2-it).retain(1,{list:ut});this.quill.updateContents(st,l.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index-G,l.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(B){var K=this.quill.getLine(B.index),G=S(K,2),Y=G[0],tt=G[1],nt=new u.default().retain(B.index+Y.length()-tt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(nt,l.default.sources.USER)}},"embed left":Z(z.keys.LEFT,!1),"embed left shift":Z(z.keys.LEFT,!0),"embed right":Z(z.keys.RIGHT,!1),"embed right shift":Z(z.keys.RIGHT,!0)}};function Z(P,B){var K,G=P===z.keys.LEFT?"prefix":"suffix";return K={key:P,shiftKey:B,altKey:null},v(K,G,/^$/),v(K,"handler",function(tt){var nt=tt.index;P===z.keys.RIGHT&&(nt+=tt.length+1);var it=this.quill.getLeaf(nt),ut=S(it,1),st=ut[0];return st instanceof r.default.Embed?(P===z.keys.LEFT?B?this.quill.setSelection(tt.index-1,tt.length+1,l.default.sources.USER):this.quill.setSelection(tt.index-1,l.default.sources.USER):B?this.quill.setSelection(tt.index,tt.length+1,l.default.sources.USER):this.quill.setSelection(tt.index+tt.length+1,l.default.sources.USER),!1):!0}),K}function C(P,B){if(!(P.index===0||this.quill.getLength()<=1)){var K=this.quill.getLine(P.index),G=S(K,1),Y=G[0],tt={};if(B.offset===0){var nt=this.quill.getLine(P.index-1),it=S(nt,1),ut=it[0];if(ut!=null&&ut.length()>1){var st=Y.formats(),mt=this.quill.getFormat(P.index-1,1);tt=a.default.attributes.diff(st,mt)||{}}}var gt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(B.prefix)?2:1;this.quill.deleteText(P.index-gt,gt,l.default.sources.USER),Object.keys(tt).length>0&&this.quill.formatLine(P.index-gt,gt,tt,l.default.sources.USER),this.quill.focus()}}function q(P,B){var K=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(B.suffix)?2:1;if(!(P.index>=this.quill.getLength()-K)){var G={},Y=0,tt=this.quill.getLine(P.index),nt=S(tt,1),it=nt[0];if(B.offset>=it.length()-1){var ut=this.quill.getLine(P.index+1),st=S(ut,1),mt=st[0];if(mt){var gt=it.formats(),$=this.quill.getFormat(P.index,1);G=a.default.attributes.diff(gt,$)||{},Y=mt.length()}}this.quill.deleteText(P.index,K,l.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(P.index+Y-1,K,G,l.default.sources.USER)}}function A(P){var B=this.quill.getLines(P),K={};if(B.length>1){var G=B[0].formats(),Y=B[B.length-1].formats();K=a.default.attributes.diff(Y,G)||{}}this.quill.deleteText(P,l.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(P.index,1,K,l.default.sources.USER),this.quill.setSelection(P.index,l.default.sources.SILENT),this.quill.focus()}function R(P,B){var K=this;P.length>0&&this.quill.scroll.deleteAt(P.index,P.length);var G=Object.keys(B.format).reduce(function(Y,tt){return r.default.query(tt,r.default.Scope.BLOCK)&&!Array.isArray(B.format[tt])&&(Y[tt]=B.format[tt]),Y},{});this.quill.insertText(P.index,` `,G,l.default.sources.USER),this.quill.setSelection(P.index+1,l.default.sources.SILENT),this.quill.focus(),Object.keys(B.format).forEach(function(Y){G[Y]==null&&(Array.isArray(B.format[Y])||Y!=="link"&&K.quill.format(Y,B.format[Y],l.default.sources.USER))})}function j(P){return{key:z.keys.TAB,shiftKey:!P,format:{"code-block":!0},handler:function(K){var G=r.default.query("code-block"),Y=K.index,tt=K.length,nt=this.quill.scroll.descendant(G,Y),it=S(nt,2),ut=it[0],st=it[1];if(ut!=null){var mt=this.quill.getIndex(ut),gt=ut.newlineIndex(st,!0)+1,$=ut.newlineIndex(mt+st+tt),W=ut.domNode.textContent.slice(gt,$).split(` `);st=0,W.forEach(function(Q,J){P?(ut.insertAt(gt+st,G.TAB),st+=G.TAB.length,J===0?Y+=G.TAB.length:tt+=G.TAB.length):Q.startsWith(G.TAB)&&(ut.deleteAt(gt+st,G.TAB.length),st-=G.TAB.length,J===0?Y-=G.TAB.length:tt-=G.TAB.length),st+=Q.length+1}),this.quill.update(l.default.sources.USER),this.quill.setSelection(Y,tt,l.default.sources.SILENT)}}}}function H(P){return{key:P[0].toUpperCase(),shortKey:!0,handler:function(K,G){this.quill.format(P,!G.format[P],l.default.sources.USER)}}}function M(P){if(typeof P=="string"||typeof P=="number")return M({key:P});if((typeof P>"u"?"undefined":L(P))==="object"&&(P=(0,d.default)(P,!1)),typeof P.key=="string")if(z.keys[P.key.toUpperCase()]!=null)P.key=z.keys[P.key.toUpperCase()];else if(P.key.length===1)P.key=P.key.toUpperCase().charCodeAt(0);else return null;return P.shortKey&&(P[U]=P.shortKey,delete P.shortKey),P}O.default=z,O.SHORTKEY=U},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function a(o,r){var e=[],l=!0,E=!1,b=void 0;try{for(var g=o[Symbol.iterator](),T;!(l=(T=g.next()).done)&&(e.push(T.value),!(r&&e.length===r));l=!0);}catch(p){E=!0,b=p}finally{try{!l&&g.return&&g.return()}finally{if(E)throw b}}return e}return function(o,r){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return a(o,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function a(o,r,e){o===null&&(o=Function.prototype);var l=Object.getOwnPropertyDescriptor(o,r);if(l===void 0){var E=Object.getPrototypeOf(o);return E===null?void 0:a(E,r,e)}else{if("value"in l)return l.value;var b=l.get;return b===void 0?void 0:b.call(e)}},N=function(){function a(o,r){for(var e=0;e-1}O.default=n,O.sanitize=h},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},S=function(){function c(a,o){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:!1,e=this.container.querySelector(".ql-selected");if(o!==e&&(e!=null&&e.classList.remove("ql-selected"),o!=null&&(o.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(o.parentNode.children,o),o.hasAttribute("data-value")?this.label.setAttribute("data-value",o.getAttribute("data-value")):this.label.removeAttribute("data-value"),o.hasAttribute("data-label")?this.label.setAttribute("data-label",o.getAttribute("data-label")):this.label.removeAttribute("data-label"),r))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":L(Event))==="object"){var l=document.createEvent("Event");l.initEvent("change",!0,!0),this.select.dispatchEvent(l)}this.close()}}},{key:"update",value:function(){var o=void 0;if(this.select.selectedIndex>-1){var r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];o=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);var e=o!=null&&o!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}]),c}();O.default=u},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(0),S=I(L),N=m(5),y=I(N),d=m(4),f=I(d),i=m(16),t=I(i),n=m(25),h=I(n),u=m(24),c=I(u),a=m(35),o=I(a),r=m(6),e=I(r),l=m(22),E=I(l),b=m(7),g=I(b),T=m(55),p=I(T),v=m(42),_=I(v),w=m(23),x=I(w);function I(U){return U&&U.__esModule?U:{default:U}}y.default.register({"blots/block":f.default,"blots/block/embed":d.BlockEmbed,"blots/break":t.default,"blots/container":h.default,"blots/cursor":c.default,"blots/embed":o.default,"blots/inline":e.default,"blots/scroll":E.default,"blots/text":g.default,"modules/clipboard":p.default,"modules/history":_.default,"modules/keyboard":x.default}),S.default.register(f.default,t.default,c.default,e.default,E.default,g.default),O.default=y.default},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(1),S=function(){function N(y){this.domNode=y,this.domNode[L.DATA_KEY]={blot:this}}return Object.defineProperty(N.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),N.create=function(y){if(this.tagName==null)throw new L.ParchmentError("Blot definition missing tagName");var d;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?d=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?d=document.createElement(y):d=document.createElement(this.tagName[0])):d=document.createElement(this.tagName),this.className&&d.classList.add(this.className),d},N.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},N.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return L.create(y)},N.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[L.DATA_KEY]},N.prototype.deleteAt=function(y,d){var f=this.isolate(y,d);f.remove()},N.prototype.formatAt=function(y,d,f,i){var t=this.isolate(y,d);if(L.query(f,L.Scope.BLOT)!=null&&i)t.wrap(f,i);else if(L.query(f,L.Scope.ATTRIBUTE)!=null){var n=L.create(this.statics.scope);t.wrap(n),n.format(f,i)}},N.prototype.insertAt=function(y,d,f){var i=f==null?L.create("text",d):L.create(d,f),t=this.split(y);this.parent.insertBefore(i,t)},N.prototype.insertInto=function(y,d){d===void 0&&(d=null),this.parent!=null&&this.parent.children.remove(this);var f=null;y.children.insertBefore(this,d),d!=null&&(f=d.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=f)&&y.domNode.insertBefore(this.domNode,f),this.parent=y,this.attach()},N.prototype.isolate=function(y,d){var f=this.split(y);return f.split(d),f},N.prototype.length=function(){return 1},N.prototype.offset=function(y){return y===void 0&&(y=this.parent),this.parent==null||this==y?0:this.parent.children.offset(this)+this.parent.offset(y)},N.prototype.optimize=function(y){this.domNode[L.DATA_KEY]!=null&&delete this.domNode[L.DATA_KEY].mutations},N.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},N.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},N.prototype.replaceWith=function(y,d){var f=typeof y=="string"?L.create(y,d):y;return f.replace(this),f},N.prototype.split=function(y,d){return y===0?this:this.next},N.prototype.update=function(y,d){},N.prototype.wrap=function(y,d){var f=typeof y=="string"?L.create(y,d):y;return this.parent!=null&&this.parent.insertBefore(f,this.next),f.appendChild(this),f},N.blotName="abstract",N}();O.default=S},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(12),S=m(32),N=m(33),y=m(1),d=function(){function f(i){this.attributes={},this.domNode=i,this.build()}return f.prototype.attribute=function(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])},f.prototype.build=function(){var i=this;this.attributes={};var t=L.default.keys(this.domNode),n=S.default.keys(this.domNode),h=N.default.keys(this.domNode);t.concat(n).concat(h).forEach(function(u){var c=y.query(u,y.Scope.ATTRIBUTE);c instanceof L.default&&(i.attributes[c.attrName]=c)})},f.prototype.copy=function(i){var t=this;Object.keys(this.attributes).forEach(function(n){var h=t.attributes[n].value(t.domNode);i.format(n,h)})},f.prototype.move=function(i){var t=this;this.copy(i),Object.keys(this.attributes).forEach(function(n){t.attributes[n].remove(t.domNode)}),this.attributes={}},f.prototype.values=function(){var i=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=i.attributes[n].value(i.domNode),t},{})},f}();O.default=d},function(F,O,m){var L=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var t in i)i.hasOwnProperty(t)&&(f[t]=i[t])};return function(f,i){d(f,i);function t(){this.constructor=f}f.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(12);function N(d,f){var i=d.getAttribute("class")||"";return i.split(/\s+/).filter(function(t){return t.indexOf(f+"-")===0})}var y=function(d){L(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.keys=function(i){return(i.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},f.prototype.add=function(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(this.keyName+"-"+t),!0):!1},f.prototype.remove=function(i){var t=N(i,this.keyName);t.forEach(function(n){i.classList.remove(n)}),i.classList.length===0&&i.removeAttribute("class")},f.prototype.value=function(i){var t=N(i,this.keyName)[0]||"",n=t.slice(this.keyName.length+1);return this.canAdd(i,n)?n:""},f}(S.default);O.default=y},function(F,O,m){var L=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var t in i)i.hasOwnProperty(t)&&(f[t]=i[t])};return function(f,i){d(f,i);function t(){this.constructor=f}f.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(12);function N(d){var f=d.split("-"),i=f.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return f[0]+i}var y=function(d){L(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.keys=function(i){return(i.getAttribute("style")||"").split(";").map(function(t){var n=t.split(":");return n[0].trim()})},f.prototype.add=function(i,t){return this.canAdd(i,t)?(i.style[N(this.keyName)]=t,!0):!1},f.prototype.remove=function(i){i.style[N(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")},f.prototype.value=function(i){var t=i.style[N(this.keyName)];return this.canAdd(i,t)?t:""},f}(S.default);O.default=y},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function y(d,f){for(var i=0;iT&&this.stack.undo.length>0){var p=this.stack.undo.pop();g=g.compose(p.undo),E=p.redo.compose(E)}else this.lastRecorded=T;this.stack.undo.push({redo:E,undo:g}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(E){this.stack.undo.forEach(function(b){b.undo=E.transform(b.undo,!0),b.redo=E.transform(b.redo,!0)}),this.stack.redo.forEach(function(b){b.undo=E.transform(b.undo,!0),b.redo=E.transform(b.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(i.default);c.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function a(r){var e=r.ops[r.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(` `):e.attributes!=null?Object.keys(e.attributes).some(function(l){return N.default.query(l,N.default.Scope.BLOCK)!=null}):!1}function o(r){var e=r.reduce(function(E,b){return E+=b.delete||0,E},0),l=r.length()-e;return a(r)&&(l-=1),l}O.default=c,O.getLastChangeIndex=o},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.BaseTooltip=void 0;var L=function(){function R(j,H){for(var M=0;M0&&arguments[0]!==void 0?arguments[0]:"link",P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),P!=null?this.textbox.value=P:M!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+M)||""),this.root.setAttribute("data-mode",M)}},{key:"restoreFocus",value:function(){var M=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=M}},{key:"save",value:function(){var M=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var P=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",M,t.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",M,t.default.sources.USER)),this.quill.root.scrollTop=P;break}case"video":M=q(M);case"formula":{if(!M)break;var B=this.quill.getSelection(!0);if(B!=null){var K=B.index+B.length;this.quill.insertEmbed(K,this.root.getAttribute("data-mode"),M,t.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(K+1," ",t.default.sources.USER),this.quill.setSelection(K+2,t.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),j}(g.default);function q(R){var j=R.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||R.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return j?(j[1]||"https")+"://www.youtube.com/embed/"+j[2]+"?showinfo=0":(j=R.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(j[1]||"https")+"://player.vimeo.com/video/"+j[2]+"/":R}function A(R,j){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;j.forEach(function(M){var P=document.createElement("option");M===H?P.setAttribute("selected","selected"):P.setAttribute("value",M),R.appendChild(P)})}O.BaseTooltip=C,O.default=Z},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function S(){this.head=this.tail=null,this.length=0}return S.prototype.append=function(){for(var N=[],y=0;y1&&this.append.apply(this,N.slice(1))},S.prototype.contains=function(N){for(var y,d=this.iterator();y=d();)if(y===N)return!0;return!1},S.prototype.insertBefore=function(N,y){N&&(N.next=y,y!=null?(N.prev=y.prev,y.prev!=null&&(y.prev.next=N),y.prev=N,y===this.head&&(this.head=N)):this.tail!=null?(this.tail.next=N,N.prev=this.tail,this.tail=N):(N.prev=null,this.head=this.tail=N),this.length+=1)},S.prototype.offset=function(N){for(var y=0,d=this.head;d!=null;){if(d===N)return y;y+=d.length(),d=d.next}return-1},S.prototype.remove=function(N){this.contains(N)&&(N.prev!=null&&(N.prev.next=N.next),N.next!=null&&(N.next.prev=N.prev),N===this.head&&(this.head=N.next),N===this.tail&&(this.tail=N.prev),this.length-=1)},S.prototype.iterator=function(N){return N===void 0&&(N=this.head),function(){var y=N;return N!=null&&(N=N.next),y}},S.prototype.find=function(N,y){y===void 0&&(y=!1);for(var d,f=this.iterator();d=f();){var i=d.length();if(Nh?d(n,N-h,Math.min(y,h+c-N)):d(n,0,Math.min(c,N+y-h)),h+=c}},S.prototype.map=function(N){return this.reduce(function(y,d){return y.push(N(d)),y},[])},S.prototype.reduce=function(N,y){for(var d,f=this.iterator();d=f();)y=N(y,d);return y},S}();O.default=L},function(F,O,m){var L=this&&this.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var h in n)n.hasOwnProperty(h)&&(t[h]=n[h])};return function(t,n){i(t,n);function h(){this.constructor=t}t.prototype=n===null?Object.create(n):(h.prototype=n.prototype,new h)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(17),N=m(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},d=100,f=function(i){L(t,i);function t(n){var h=i.call(this,n)||this;return h.scroll=h,h.observer=new MutationObserver(function(u){h.update(u)}),h.observer.observe(h.domNode,y),h.attach(),h}return t.prototype.detach=function(){i.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(n,h){this.update(),n===0&&h===this.length()?this.children.forEach(function(u){u.remove()}):i.prototype.deleteAt.call(this,n,h)},t.prototype.formatAt=function(n,h,u,c){this.update(),i.prototype.formatAt.call(this,n,h,u,c)},t.prototype.insertAt=function(n,h,u){this.update(),i.prototype.insertAt.call(this,n,h,u)},t.prototype.optimize=function(n,h){var u=this;n===void 0&&(n=[]),h===void 0&&(h={}),i.prototype.optimize.call(this,h);for(var c=[].slice.call(this.observer.takeRecords());c.length>0;)n.push(c.pop());for(var a=function(l,E){E===void 0&&(E=!0),!(l==null||l===u)&&l.domNode.parentNode!=null&&(l.domNode[N.DATA_KEY].mutations==null&&(l.domNode[N.DATA_KEY].mutations=[]),E&&a(l.parent))},o=function(l){l.domNode[N.DATA_KEY]==null||l.domNode[N.DATA_KEY].mutations==null||(l instanceof S.default&&l.children.forEach(o),l.optimize(h))},r=n,e=0;r.length>0;e+=1){if(e>=d)throw new Error("[Parchment] Maximum optimize iterations reached");for(r.forEach(function(l){var E=N.find(l.target,!0);E!=null&&(E.domNode===l.target&&(l.type==="childList"?(a(N.find(l.previousSibling,!1)),[].forEach.call(l.addedNodes,function(b){var g=N.find(b,!1);a(g,!1),g instanceof S.default&&g.children.forEach(function(T){a(T,!1)})})):l.type==="attributes"&&a(E.prev)),a(E))}),this.children.forEach(o),r=[].slice.call(this.observer.takeRecords()),c=r.slice();c.length>0;)n.push(c.pop())}},t.prototype.update=function(n,h){var u=this;h===void 0&&(h={}),n=n||this.observer.takeRecords(),n.map(function(c){var a=N.find(c.target,!0);return a==null?null:a.domNode[N.DATA_KEY].mutations==null?(a.domNode[N.DATA_KEY].mutations=[c],a):(a.domNode[N.DATA_KEY].mutations.push(c),null)}).forEach(function(c){c==null||c===u||c.domNode[N.DATA_KEY]==null||c.update(c.domNode[N.DATA_KEY].mutations||[],h)}),this.domNode[N.DATA_KEY].mutations!=null&&i.prototype.update.call(this,this.domNode[N.DATA_KEY].mutations,h),this.optimize(n,h)},t.blotName="scroll",t.defaultChild="block",t.scope=N.Scope.BLOCK_BLOT,t.tagName="DIV",t}(S.default);O.default=f},function(F,O,m){var L=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,t){i.__proto__=t}||function(i,t){for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n])};return function(i,t){f(i,t);function n(){this.constructor=i}i.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(18),N=m(1);function y(f,i){if(Object.keys(f).length!==Object.keys(i).length)return!1;for(var t in f)if(f[t]!==i[t])return!1;return!0}var d=function(f){L(i,f);function i(){return f!==null&&f.apply(this,arguments)||this}return i.formats=function(t){if(t.tagName!==i.tagName)return f.formats.call(this,t)},i.prototype.format=function(t,n){var h=this;t===this.statics.blotName&&!n?(this.children.forEach(function(u){u instanceof S.default||(u=u.wrap(i.blotName,!0)),h.attributes.copy(u)}),this.unwrap()):f.prototype.format.call(this,t,n)},i.prototype.formatAt=function(t,n,h,u){if(this.formats()[h]!=null||N.query(h,N.Scope.ATTRIBUTE)){var c=this.isolate(t,n);c.format(h,u)}else f.prototype.formatAt.call(this,t,n,h,u)},i.prototype.optimize=function(t){f.prototype.optimize.call(this,t);var n=this.formats();if(Object.keys(n).length===0)return this.unwrap();var h=this.next;h instanceof i&&h.prev===this&&y(n,h.formats())&&(h.moveChildren(this),h.remove())},i.blotName="inline",i.scope=N.Scope.INLINE_BLOT,i.tagName="SPAN",i}(S.default);O.default=d},function(F,O,m){var L=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var t in i)i.hasOwnProperty(t)&&(f[t]=i[t])};return function(f,i){d(f,i);function t(){this.constructor=f}f.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(18),N=m(1),y=function(d){L(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.formats=function(i){var t=N.query(f.blotName).tagName;if(i.tagName!==t)return d.formats.call(this,i)},f.prototype.format=function(i,t){N.query(i,N.Scope.BLOCK)!=null&&(i===this.statics.blotName&&!t?this.replaceWith(f.blotName):d.prototype.format.call(this,i,t))},f.prototype.formatAt=function(i,t,n,h){N.query(n,N.Scope.BLOCK)!=null?this.format(n,h):d.prototype.formatAt.call(this,i,t,n,h)},f.prototype.insertAt=function(i,t,n){if(n==null||N.query(t,N.Scope.INLINE)!=null)d.prototype.insertAt.call(this,i,t,n);else{var h=this.split(i),u=N.create(t,n);h.parent.insertBefore(u,h)}},f.prototype.update=function(i,t){navigator.userAgent.match(/Trident/)?this.build():d.prototype.update.call(this,i,t)},f.blotName="block",f.scope=N.Scope.BLOCK_BLOT,f.tagName="P",f}(S.default);O.default=y},function(F,O,m){var L=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var i in f)f.hasOwnProperty(i)&&(d[i]=f[i])};return function(d,f){y(d,f);function i(){this.constructor=d}d.prototype=f===null?Object.create(f):(i.prototype=f.prototype,new i)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(19),N=function(y){L(d,y);function d(){return y!==null&&y.apply(this,arguments)||this}return d.formats=function(f){},d.prototype.format=function(f,i){y.prototype.formatAt.call(this,0,this.length(),f,i)},d.prototype.formatAt=function(f,i,t,n){f===0&&i===this.length()?this.format(t,n):y.prototype.formatAt.call(this,f,i,t,n)},d.prototype.formats=function(){return this.statics.formats(this.domNode)},d}(S.default);O.default=N},function(F,O,m){var L=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var t in i)i.hasOwnProperty(t)&&(f[t]=i[t])};return function(f,i){d(f,i);function t(){this.constructor=f}f.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=m(19),N=m(1),y=function(d){L(f,d);function f(i){var t=d.call(this,i)||this;return t.text=t.statics.value(t.domNode),t}return f.create=function(i){return document.createTextNode(i)},f.value=function(i){var t=i.data;return t.normalize&&(t=t.normalize()),t},f.prototype.deleteAt=function(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)},f.prototype.index=function(i,t){return this.domNode===i?t:-1},f.prototype.insertAt=function(i,t,n){n==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):d.prototype.insertAt.call(this,i,t,n)},f.prototype.length=function(){return this.text.length},f.prototype.optimize=function(i){d.prototype.optimize.call(this,i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof f&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},f.prototype.position=function(i,t){return[this.domNode,i]},f.prototype.split=function(i,t){if(t===void 0&&(t=!1),!t){if(i===0)return this;if(i===this.length())return this.next}var n=N.create(this.domNode.splitText(i));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},f.prototype.update=function(i,t){var n=this;i.some(function(h){return h.type==="characterData"&&h.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},f.prototype.value=function(){return this.text},f.blotName="text",f.scope=N.Scope.INLINE_BLOT,f}(S.default);O.default=y},function(F,O,m){var L=document.createElement("div");if(L.classList.toggle("test-class",!1),L.classList.contains("test-class")){var S=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(N,y){return arguments.length>1&&!this.contains(N)==!y?y:S.call(this,N)}}String.prototype.startsWith||(String.prototype.startsWith=function(N,y){return y=y||0,this.substr(y,N.length)===N}),String.prototype.endsWith||(String.prototype.endsWith=function(N,y){var d=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>d.length)&&(y=d.length),y-=N.length;var f=d.indexOf(N,y);return f!==-1&&f===y}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(y){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof y!="function")throw new TypeError("predicate must be a function");for(var d=Object(this),f=d.length>>>0,i=arguments[1],t,n=0;nl.length?e:l,g=e.length>l.length?l:e,T=b.indexOf(g);if(T!=-1)return E=[[L,b.substring(0,T)],[S,g],[L,b.substring(T+g.length)]],e.length>l.length&&(E[0][0]=E[2][0]=m),E;if(g.length==1)return[[m,e],[L,l]];var p=n(e,l);if(p){var v=p[0],_=p[1],w=p[2],x=p[3],I=p[4],U=N(v,w),z=N(_,x);return U.concat([[S,I]],z)}return d(e,l)}function d(e,l){for(var E=e.length,b=l.length,g=Math.ceil((E+b)/2),T=g,p=2*g,v=new Array(p),_=new Array(p),w=0;wE)z+=2;else if(H>b)U+=2;else if(I){var M=T+x-A;if(M>=0&&M=P)return f(e,l,j,H)}}}for(var B=-q+Z;B<=q-C;B+=2){var M=T+B,P;B==-q||B!=q&&_[M-1]<_[M+1]?P=_[M+1]:P=_[M-1]+1;for(var K=P-B;PE)C+=2;else if(K>b)Z+=2;else if(!I){var R=T+x-B;if(R>=0&&R=P)return f(e,l,j,H)}}}}return[[m,e],[L,l]]}function f(e,l,E,b){var g=e.substring(0,E),T=l.substring(0,b),p=e.substring(E),v=l.substring(b),_=N(g,T),w=N(p,v);return _.concat(w)}function i(e,l){if(!e||!l||e.charAt(0)!=l.charAt(0))return 0;for(var E=0,b=Math.min(e.length,l.length),g=b,T=0;El.length?e:l,b=e.length>l.length?l:e;if(E.length<4||b.length*2=z.length?[j,H,M,P,R]:null}var T=g(E,b,Math.ceil(E.length/4)),p=g(E,b,Math.ceil(E.length/2)),v;if(!T&&!p)return null;p?T?v=T[4].length>p[4].length?T:p:v=p:v=T;var _,w,x,I;e.length>l.length?(_=v[0],w=v[1],x=v[2],I=v[3]):(x=v[0],I=v[1],_=v[2],w=v[3]);var U=v[4];return[_,w,x,I,U]}function h(e){e.push([S,""]);for(var l=0,E=0,b=0,g="",T="",p;l1?(E!==0&&b!==0&&(p=i(T,g),p!==0&&(l-E-b>0&&e[l-E-b-1][0]==S?e[l-E-b-1][1]+=T.substring(0,p):(e.splice(0,0,[S,T.substring(0,p)]),l++),T=T.substring(p),g=g.substring(p)),p=t(T,g),p!==0&&(e[l][1]=T.substring(T.length-p)+e[l][1],T=T.substring(0,T.length-p),g=g.substring(0,g.length-p))),E===0?e.splice(l-b,E+b,[L,T]):b===0?e.splice(l-E,E+b,[m,g]):e.splice(l-E-b,E+b,[m,g],[L,T]),l=l-E-b+(E?1:0)+(b?1:0)+1):l!==0&&e[l-1][0]==S?(e[l-1][1]+=e[l][1],e.splice(l,1)):l++,b=0,E=0,g="",T="";break}e[e.length-1][1]===""&&e.pop();var v=!1;for(l=1;l0&&b.splice(g+2,0,[p[0],v]),r(b,g,3)}else return e}function o(e){for(var l=!1,E=function(p){return p.charCodeAt(0)>=56320&&p.charCodeAt(0)<=57343},b=function(p){return p.charCodeAt(p.length-1)>=55296&&p.charCodeAt(p.length-1)<=56319},g=2;g0&&T.push(e[g]);return T}function r(e,l,E){for(var b=l+E-1;b>=0&&b>=l-1;b--)if(b+1\r?\n +\<"),this.convert();var X=this.quill.getFormat(this.quill.selection.savedRange.index);if(X[b.default.blotName]){var at=this.container.innerText;return this.container.innerHTML="",new i.default().insert(at,w({},b.default.blotName,X[b.default.blotName]))}var rt=this.prepareMatching(),ot=S(rt,2),wt=ot[0],Ot=ot[1],pt=B(this.container,wt,Ot);return M(pt,` `)&&pt.ops[pt.ops.length-1].attributes==null&&(pt=pt.compose(new i.default().retain(pt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,pt),this.container.innerHTML="",pt}},{key:"dangerouslyPasteHTML",value:function(J,X){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;if(typeof J=="string")this.quill.setContents(this.convert(J),X),this.quill.setSelection(0,u.default.sources.SILENT);else{var rt=this.convert(X);this.quill.updateContents(new i.default().retain(J).concat(rt),at),this.quill.setSelection(J+rt.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(J){var X=this;if(!(J.defaultPrevented||!this.quill.isEnabled())){var at=this.quill.getSelection(),rt=new i.default().retain(at.index),ot=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){rt=rt.concat(X.convert()).delete(at.length),X.quill.updateContents(rt,u.default.sources.USER),X.quill.setSelection(rt.length()-at.length,u.default.sources.SILENT),X.quill.scrollingContainer.scrollTop=ot,X.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var J=this,X=[],at=[];return this.matchers.forEach(function(rt){var ot=S(rt,2),wt=ot[0],Ot=ot[1];switch(wt){case Node.TEXT_NODE:at.push(Ot);break;case Node.ELEMENT_NODE:X.push(Ot);break;default:[].forEach.call(J.container.querySelectorAll(wt),function(pt){pt[Z]=pt[Z]||[],pt[Z].push(Ot)});break}}),[X,at]}}]),W}(r.default);R.DEFAULTS={matchers:[],matchVisual:!0};function j($,W,Q){return(typeof W>"u"?"undefined":L(W))==="object"?Object.keys(W).reduce(function(J,X){return j(J,X,W[X])},$):$.reduce(function(J,X){return X.attributes&&X.attributes[W]?J.push(X):J.insert(X.insert,(0,d.default)({},w({},W,Q),X.attributes))},new i.default)}function H($){if($.nodeType!==Node.ELEMENT_NODE)return{};var W="__ql-computed-style";return $[W]||($[W]=window.getComputedStyle($))}function M($,W){for(var Q="",J=$.ops.length-1;J>=0&&Q.length-1}function B($,W,Q){return $.nodeType===$.TEXT_NODE?Q.reduce(function(J,X){return X($,J)},new i.default):$.nodeType===$.ELEMENT_NODE?[].reduce.call($.childNodes||[],function(J,X){var at=B(X,W,Q);return X.nodeType===$.ELEMENT_NODE&&(at=W.reduce(function(rt,ot){return ot(X,rt)},at),at=(X[Z]||[]).reduce(function(rt,ot){return ot(X,rt)},at)),J.concat(at)},new i.default):new i.default}function K($,W,Q){return j(Q,$,!0)}function G($,W){var Q=n.default.Attributor.Attribute.keys($),J=n.default.Attributor.Class.keys($),X=n.default.Attributor.Style.keys($),at={};return Q.concat(J).concat(X).forEach(function(rt){var ot=n.default.query(rt,n.default.Scope.ATTRIBUTE);ot!=null&&(at[ot.attrName]=ot.value($),at[ot.attrName])||(ot=q[rt],ot!=null&&(ot.attrName===rt||ot.keyName===rt)&&(at[ot.attrName]=ot.value($)||void 0),ot=A[rt],ot!=null&&(ot.attrName===rt||ot.keyName===rt)&&(ot=A[rt],at[ot.attrName]=ot.value($)||void 0))}),Object.keys(at).length>0&&(W=j(W,at)),W}function Y($,W){var Q=n.default.query($);if(Q==null)return W;if(Q.prototype instanceof n.default.Embed){var J={},X=Q.value($);X!=null&&(J[Q.blotName]=X,W=new i.default().insert(J,Q.formats($)))}else typeof Q.formats=="function"&&(W=j(W,Q.blotName,Q.formats($)));return W}function tt($,W){return M(W,` `)||W.insert(` `),W}function nt(){return new i.default}function it($,W){var Q=n.default.query($);if(Q==null||Q.blotName!=="list-item"||!M(W,` `))return W;for(var J=-1,X=$.parentNode;!X.classList.contains("ql-clipboard");)(n.default.query(X)||{}).blotName==="list"&&(J+=1),X=X.parentNode;return J<=0?W:W.compose(new i.default().retain(W.length()-1).retain(1,{indent:J}))}function ut($,W){return M(W,` `)||(P($)||W.length()>0&&$.nextSibling&&P($.nextSibling))&&W.insert(` `),W}function st($,W){if(P($)&&$.nextElementSibling!=null&&!M(W,` `)){var Q=$.offsetHeight+parseFloat(H($).marginTop)+parseFloat(H($).marginBottom);$.nextElementSibling.offsetTop>$.offsetTop+Q*1.5&&W.insert(` `)}return W}function mt($,W){var Q={},J=$.style||{};return J.fontStyle&&H($).fontStyle==="italic"&&(Q.italic=!0),J.fontWeight&&(H($).fontWeight.startsWith("bold")||parseInt(H($).fontWeight)>=700)&&(Q.bold=!0),Object.keys(Q).length>0&&(W=j(W,Q)),parseFloat(J.textIndent||0)>0&&(W=new i.default().insert(" ").concat(W)),W}function gt($,W){var Q=$.data;if($.parentNode.tagName==="O:P")return W.insert(Q.trim());if(Q.trim().length===0&&$.parentNode.classList.contains("ql-clipboard"))return W;if(!H($.parentNode).whiteSpace.startsWith("pre")){var J=function(at,rt){return rt=rt.replace(/[^\u00a0]/g,""),rt.length<1&&at?" ":rt};Q=Q.replace(/\r\n/g," ").replace(/\n/g," "),Q=Q.replace(/\s\s+/g,J.bind(J,!0)),($.previousSibling==null&&P($.parentNode)||$.previousSibling!=null&&P($.previousSibling))&&(Q=Q.replace(/^\s+/,J.bind(J,!1))),($.nextSibling==null&&P($.parentNode)||$.nextSibling!=null&&P($.nextSibling))&&(Q=Q.replace(/\s+$/,J.bind(J,!1)))}return W.insert(Q)}O.default=R,O.matchAttributor=G,O.matchBlot=Y,O.matchNewline=ut,O.matchSpacing=st,O.matchText=gt},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function h(u,c){for(var a=0;a '},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function h(u,c){for(var a=0;an.right&&(u=n.right-h.right,this.root.style.left=i+u+"px"),h.leftn.bottom){var c=h.bottom-h.top,a=f.bottom-f.top+c;this.root.style.top=t-a+"px",this.root.classList.add("ql-flip")}return u}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),y}();O.default=N},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function p(v,_){var w=[],x=!0,I=!1,U=void 0;try{for(var z=v[Symbol.iterator](),Z;!(x=(Z=z.next()).done)&&(w.push(Z.value),!(_&&w.length===_));x=!0);}catch(C){I=!0,U=C}finally{try{!x&&z.return&&z.return()}finally{if(I)throw U}}return w}return function(v,_){if(Array.isArray(v))return v;if(Symbol.iterator in Object(v))return p(v,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function p(v,_,w){v===null&&(v=Function.prototype);var x=Object.getOwnPropertyDescriptor(v,_);if(x===void 0){var I=Object.getPrototypeOf(v);return I===null?void 0:p(I,_,w)}else{if("value"in x)return x.value;var U=x.get;return U===void 0?void 0:U.call(w)}},N=function(){function p(v,_){for(var w=0;w<_.length;w++){var x=_[w];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(v,x.key,x)}}return function(v,_,w){return _&&p(v.prototype,_),w&&p(v,w),v}}(),y=m(3),d=r(y),f=m(8),i=r(f),t=m(43),n=r(t),h=m(27),u=r(h),c=m(15),a=m(41),o=r(a);function r(p){return p&&p.__esModule?p:{default:p}}function e(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function l(p,v){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:p}function E(p,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);p.prototype=Object.create(v&&v.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(p,v):p.__proto__=v)}var b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],g=function(p){E(v,p);function v(_,w){e(this,v),w.modules.toolbar!=null&&w.modules.toolbar.container==null&&(w.modules.toolbar.container=b);var x=l(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,_,w));return x.quill.container.classList.add("ql-snow"),x}return N(v,[{key:"extendToolbar",value:function(w){w.container.classList.add("ql-snow"),this.buildButtons([].slice.call(w.container.querySelectorAll("button")),o.default),this.buildPickers([].slice.call(w.container.querySelectorAll("select")),o.default),this.tooltip=new T(this.quill,this.options.bounds),w.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(x,I){w.handlers.link.call(w,!I.format.link)})}}]),v}(n.default);g.DEFAULTS=(0,d.default)(!0,{},n.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(v){if(v){var _=this.quill.getSelection();if(_==null||_.length==0)return;var w=this.quill.getText(_);/^\S+@\S+\.\S+$/.test(w)&&w.indexOf("mailto:")!==0&&(w="mailto:"+w);var x=this.quill.theme.tooltip;x.edit("link",w)}else this.quill.format("link",!1)}}}}});var T=function(p){E(v,p);function v(_,w){e(this,v);var x=l(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,_,w));return x.preview=x.root.querySelector("a.ql-preview"),x}return N(v,[{key:"listen",value:function(){var w=this;S(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(x){w.root.classList.contains("ql-editing")?w.save():w.edit("link",w.preview.textContent),x.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(x){if(w.linkRange!=null){var I=w.linkRange;w.restoreFocus(),w.quill.formatText(I,"link",!1,i.default.sources.USER),delete w.linkRange}x.preventDefault(),w.hide()}),this.quill.on(i.default.events.SELECTION_CHANGE,function(x,I,U){if(x!=null){if(x.length===0&&U===i.default.sources.USER){var z=w.quill.scroll.descendant(u.default,x.index),Z=L(z,2),C=Z[0],q=Z[1];if(C!=null){w.linkRange=new c.Range(x.index-q,C.length());var A=u.default.formats(C.domNode);w.preview.textContent=A,w.preview.setAttribute("href",A),w.show(),w.position(w.quill.getBounds(w.linkRange));return}}else delete w.linkRange;w.hide()}})}},{key:"show",value:function(){S(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),v}(t.BaseTooltip);T.TEMPLATE=['','','',''].join(""),O.default=g},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(29),S=X(L),N=m(36),y=m(38),d=m(64),f=m(65),i=X(f),t=m(66),n=X(t),h=m(67),u=X(h),c=m(37),a=m(26),o=m(39),r=m(40),e=m(56),l=X(e),E=m(68),b=X(E),g=m(27),T=X(g),p=m(69),v=X(p),_=m(70),w=X(_),x=m(71),I=X(x),U=m(72),z=X(U),Z=m(73),C=X(Z),q=m(13),A=X(q),R=m(74),j=X(R),H=m(75),M=X(H),P=m(57),B=X(P),K=m(41),G=X(K),Y=m(28),tt=X(Y),nt=m(59),it=X(nt),ut=m(60),st=X(ut),mt=m(61),gt=X(mt),$=m(108),W=X($),Q=m(62),J=X(Q);function X(at){return at&&at.__esModule?at:{default:at}}S.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":N.AlignClass,"attributors/class/background":c.BackgroundClass,"attributors/class/color":a.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":o.FontClass,"attributors/class/size":r.SizeClass,"attributors/style/align":N.AlignStyle,"attributors/style/background":c.BackgroundStyle,"attributors/style/color":a.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":o.FontStyle,"attributors/style/size":r.SizeStyle},!0),S.default.register({"formats/align":N.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":d.IndentClass,"formats/background":c.BackgroundStyle,"formats/color":a.ColorStyle,"formats/font":o.FontClass,"formats/size":r.SizeClass,"formats/blockquote":i.default,"formats/code-block":A.default,"formats/header":n.default,"formats/list":u.default,"formats/bold":l.default,"formats/code":q.Code,"formats/italic":b.default,"formats/link":T.default,"formats/script":v.default,"formats/strike":w.default,"formats/underline":I.default,"formats/image":z.default,"formats/video":C.default,"formats/list/item":h.ListItem,"modules/formula":j.default,"modules/syntax":M.default,"modules/toolbar":B.default,"themes/bubble":W.default,"themes/snow":J.default,"ui/icons":G.default,"ui/picker":tt.default,"ui/icon-picker":st.default,"ui/color-picker":it.default,"ui/tooltip":gt.default},!0),O.default=S.default},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.IndentClass=void 0;var L=function(){function u(c,a){for(var o=0;o0&&this.children.tail.format(b,g)}},{key:"formats",value:function(){return h({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(b,g){if(b instanceof o)S(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"insertBefore",this).call(this,b,g);else{var T=g==null?this.length():g.offset(this),p=this.split(T);p.parent.insertBefore(b,p)}}},{key:"optimize",value:function(b){S(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"optimize",this).call(this,b);var g=this.next;g!=null&&g.prev===this&&g.statics.blotName===this.statics.blotName&&g.domNode.tagName===this.domNode.tagName&&g.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(g.moveChildren(this),g.remove())}},{key:"replace",value:function(b){if(b.statics.blotName!==this.statics.blotName){var g=y.default.create(this.statics.defaultChild);b.moveChildren(g),this.appendChild(g)}S(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"replace",this).call(this,b)}}]),l}(t.default);r.blotName="list",r.scope=y.default.Scope.BLOCK_BLOT,r.tagName=["OL","UL"],r.defaultChild="list-item",r.allowedChildren=[o],O.ListItem=o,O.default=r},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(56),S=N(L);function N(t){return t&&t.__esModule?t:{default:t}}function y(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function d(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:t}function f(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}var i=function(t){f(n,t);function n(){return y(this,n),d(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return n}(S.default);i.blotName="italic",i.tagName=["EM","I"],O.default=i},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function h(u,c){for(var a=0;a-1?e?this.domNode.setAttribute(r,e):this.domNode.removeAttribute(r):S(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"format",this).call(this,r,e)}}],[{key:"create",value:function(r){var e=S(a.__proto__||Object.getPrototypeOf(a),"create",this).call(this,r);return typeof r=="string"&&e.setAttribute("src",this.sanitize(r)),e}},{key:"formats",value:function(r){return h.reduce(function(e,l){return r.hasAttribute(l)&&(e[l]=r.getAttribute(l)),e},{})}},{key:"match",value:function(r){return/\.(jpe?g|gif|png)$/.test(r)||/^data:image\/.+;base64/.test(r)}},{key:"sanitize",value:function(r){return(0,d.sanitize)(r,["http","https","data"])?r:"//:0"}},{key:"value",value:function(r){return r.getAttribute("src")}}]),a}(y.default.Embed);u.blotName="image",u.tagName="IMG",O.default=u},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function c(a,o){for(var r=0;r-1?e?this.domNode.setAttribute(r,e):this.domNode.removeAttribute(r):S(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"format",this).call(this,r,e)}}],[{key:"create",value:function(r){var e=S(a.__proto__||Object.getPrototypeOf(a),"create",this).call(this,r);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen",!0),e.setAttribute("src",this.sanitize(r)),e}},{key:"formats",value:function(r){return h.reduce(function(e,l){return r.hasAttribute(l)&&(e[l]=r.getAttribute(l)),e},{})}},{key:"sanitize",value:function(r){return d.default.sanitize(r)}},{key:"value",value:function(r){return r.getAttribute("src")}}]),a}(N.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",O.default=u},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.FormulaBlot=void 0;var L=function(){function r(e,l){for(var E=0;E0||this.cachedText==null)&&(this.domNode.innerHTML=T(p),this.domNode.normalize(),this.attach()),this.cachedText=p)}}]),b}(h.default);r.className="ql-syntax";var e=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),l=function(E){o(b,E),L(b,null,[{key:"register",value:function(){f.default.register(e,!0),f.default.register(r,!0)}}]);function b(g,T){c(this,b);var p=a(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,g,T));if(typeof p.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var v=null;return p.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(v),v=setTimeout(function(){p.highlight(),v=null},p.options.interval)}),p.highlight(),p}return L(b,[{key:"highlight",value:function(){var T=this;if(!this.quill.selection.composing){this.quill.update(f.default.sources.USER);var p=this.quill.getSelection();this.quill.scroll.descendants(r).forEach(function(v){v.highlight(T.options.highlight)}),this.quill.update(f.default.sources.SILENT),p!=null&&this.quill.setSelection(p,f.default.sources.SILENT)}}}]),b}(t.default);l.DEFAULTS={highlight:function(){return window.hljs==null?null:function(E){var b=window.hljs.highlightAuto(E);return b.value}}(),interval:1e3},O.CodeBlock=r,O.CodeToken=e,O.default=l},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O){F.exports=' '},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.BubbleTooltip=void 0;var L=function b(g,T,p){g===null&&(g=Function.prototype);var v=Object.getOwnPropertyDescriptor(g,T);if(v===void 0){var _=Object.getPrototypeOf(g);return _===null?void 0:b(_,T,p)}else{if("value"in v)return v.value;var w=v.get;return w===void 0?void 0:w.call(p)}},S=function(){function b(g,T){for(var p=0;p0&&I===f.default.sources.USER){v.show(),v.root.style.left="0px",v.root.style.width="",v.root.style.width=v.root.offsetWidth+"px";var U=v.quill.getLines(w.index,w.length);if(U.length===1)v.position(v.quill.getBounds(w));else{var z=U[U.length-1],Z=v.quill.getIndex(z),C=Math.min(z.length()-1,w.index+w.length-Z),q=v.quill.getBounds(new n.Range(Z,C));v.position(q)}}else document.activeElement!==v.textbox&&v.quill.hasFocus()&&v.hide()}),v}return S(g,[{key:"listen",value:function(){var p=this;L(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){p.root.classList.remove("ql-editing")}),this.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!p.root.classList.contains("ql-hidden")){var v=p.quill.getSelection();v!=null&&p.position(p.quill.getBounds(v))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(p){var v=L(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"position",this).call(this,p),_=this.root.querySelector(".ql-tooltip-arrow");if(_.style.marginLeft="",v===0)return v;_.style.marginLeft=-1*v-_.offsetWidth/2+"px"}}]),g}(i.BaseTooltip);E.TEMPLATE=['','
','','',"
"].join(""),O.BubbleTooltip=E,O.default=l},function(F,O,m){F.exports=m(63)}]).default})}(Ce)),Ce.exports}var Un=Fn();const Zn=In(Un);var Tn,Sn;function Hn(){if(Sn)return Tn;Sn=1;var ft=-1,dt=1,F=0;function O(r,e,l,E){if(r===e)return r?[[F,r]]:[];if(l!=null){var b=a(r,e,l);if(b)return b}var g=N(r,e),T=r.substring(0,g);r=r.substring(g),e=e.substring(g),g=y(r,e);var p=r.substring(r.length-g);r=r.substring(0,r.length-g),e=e.substring(0,e.length-g);var v=m(r,e);return T&&v.unshift([F,T]),p&&v.push([F,p]),f(v,E),v}function m(r,e){var l;if(!r)return[[dt,e]];if(!e)return[[ft,r]];var E=r.length>e.length?r:e,b=r.length>e.length?e:r,g=E.indexOf(b);if(g!==-1)return l=[[dt,E.substring(0,g)],[F,b],[dt,E.substring(g+b.length)]],r.length>e.length&&(l[0][0]=l[2][0]=ft),l;if(b.length===1)return[[ft,r],[dt,e]];var T=d(r,e);if(T){var p=T[0],v=T[1],_=T[2],w=T[3],x=T[4],I=O(p,_),U=O(v,w);return I.concat([[F,x]],U)}return L(r,e)}function L(r,e){for(var l=r.length,E=e.length,b=Math.ceil((l+E)/2),g=b,T=2*b,p=new Array(T),v=new Array(T),_=0;_l)U+=2;else if(j>E)I+=2;else if(x){var H=g+w-q;if(H>=0&&H=M)return S(r,e,R,j)}}}for(var P=-C+z;P<=C-Z;P+=2){var H=g+P,M;P===-C||P!==C&&v[H-1]l)Z+=2;else if(B>E)z+=2;else if(!x){var A=g+w-P;if(A>=0&&A=M)return S(r,e,R,j)}}}}return[[ft,r],[dt,e]]}function S(r,e,l,E){var b=r.substring(0,l),g=e.substring(0,E),T=r.substring(l),p=e.substring(E),v=O(b,g),_=O(T,p);return v.concat(_)}function N(r,e){if(!r||!e||r.charAt(0)!==e.charAt(0))return 0;for(var l=0,E=Math.min(r.length,e.length),b=E,g=0;le.length?r:e,E=r.length>e.length?e:r;if(l.length<4||E.length*2=U.length?[R,j,H,M,A]:null}var g=b(l,E,Math.ceil(l.length/4)),T=b(l,E,Math.ceil(l.length/2)),p;if(!g&&!T)return null;T?g?p=g[4].length>T[4].length?g:T:p=T:p=g;var v,_,w,x;r.length>e.length?(v=p[0],_=p[1],w=p[2],x=p[3]):(w=p[0],x=p[1],v=p[2],_=p[3]);var I=p[4];return[v,_,w,x,I]}function f(r,e){r.push([F,""]);for(var l=0,E=0,b=0,g="",T="",p;l=0&&h(r[v][1])){var _=r[v][1].slice(-1);if(r[v][1]=r[v][1].slice(0,-1),g=_+g,T=_+T,!r[v][1]){r.splice(v,1),l--;var w=v-1;r[w]&&r[w][0]===dt&&(b++,T=r[w][1]+T,w--),r[w]&&r[w][0]===ft&&(E++,g=r[w][1]+g,w--),v=w}}if(n(r[l][1])){var _=r[l][1].charAt(0);r[l][1]=r[l][1].slice(1),g+=_,T+=_}}if(l0||T.length>0){g.length>0&&T.length>0&&(p=N(T,g),p!==0&&(v>=0?r[v][1]+=T.substring(0,p):(r.splice(0,0,[F,T.substring(0,p)]),l++),T=T.substring(p),g=g.substring(p)),p=y(T,g),p!==0&&(r[l][1]=T.substring(T.length-p)+r[l][1],T=T.substring(0,T.length-p),g=g.substring(0,g.length-p)));var x=b+E;g.length===0&&T.length===0?(r.splice(l-x,x),l=l-x):g.length===0?(r.splice(l-x,x,[dt,T]),l=l-x+1):T.length===0?(r.splice(l-x,x,[ft,g]),l=l-x+1):(r.splice(l-x,x,[ft,g],[dt,T]),l=l-x+2)}l!==0&&r[l-1][0]===F?(r[l-1][1]+=r[l][1],r.splice(l,1)):l++,b=0,E=0,g="",T="";break}}r[r.length-1][1]===""&&r.pop();var I=!1;for(l=1;l=55296&&r<=56319}function t(r){return r>=56320&&r<=57343}function n(r){return t(r.charCodeAt(0))}function h(r){return i(r.charCodeAt(r.length-1))}function u(r){for(var e=[],l=0;l0&&e.push(r[l]);return e}function c(r,e,l,E){return h(r)||n(E)?null:u([[F,r],[ft,e],[dt,l],[F,E]])}function a(r,e,l){var E=typeof l=="number"?{index:l,length:0}:l.oldRange,b=typeof l=="number"?null:l.newRange,g=r.length,T=e.length;if(E.length===0&&(b===null||b.length===0)){var p=E.index,v=r.slice(0,p),_=r.slice(p),w=b?b.index:null;t:{var x=p+T-g;if(w!==null&&w!==x||x<0||x>T)break t;var I=e.slice(0,x),U=e.slice(x);if(U!==_)break t;var z=Math.min(p,x),Z=v.slice(0,z),C=I.slice(0,z);if(Z!==C)break t;var q=v.slice(z),A=I.slice(z);return c(Z,q,A,_)}t:{if(w!==null&&w!==p)break t;var R=p,I=e.slice(0,R),U=e.slice(R);if(I!==v)break t;var j=Math.min(g-R,T-R),H=_.slice(_.length-j),M=U.slice(U.length-j);if(H!==M)break t;var q=_.slice(0,_.length-j),A=U.slice(0,U.length-j);return c(v,q,A,H)}}if(E.length>0&&b&&b.length===0)t:{var Z=r.slice(0,E.index),H=r.slice(E.index+E.length),z=Z.length,j=H.length;if(T-1}function Ze(s,k){var D=this.__data__,V=ee(D,s);return V<0?D.push([s,k]):D[V][1]=k,this}Et.prototype.clear=Ke,Et.prototype.delete=Ge,Et.prototype.get=$e,Et.prototype.has=Ve,Et.prototype.set=Ze;function Tt(s){var k=-1,D=s?s.length:0;for(this.clear();++k-1&&s%1==0&&s-1&&s%1==0&&s<=m}function Mt(s){var k=typeof s;return!!s&&(k=="object"||k=="function")}function Me(s){return!!s&&typeof s=="object"}function _e(s){return ie(s)?te(s):sn(s)}function An(){return[]}function wn(){return!1}ft.exports=qe}(Ee,Ee.exports)),Ee.exports}var Ae={exports:{}};Ae.exports;var Pn;function Dn(){return Pn||(Pn=1,function(ft,dt){var F=200,O="__lodash_hash_undefined__",m=1,L=2,S=9007199254740991,N="[object Arguments]",y="[object Array]",d="[object AsyncFunction]",f="[object Boolean]",i="[object Date]",t="[object Error]",n="[object Function]",h="[object GeneratorFunction]",u="[object Map]",c="[object Number]",a="[object Null]",o="[object Object]",r="[object Promise]",e="[object Proxy]",l="[object RegExp]",E="[object Set]",b="[object String]",g="[object Symbol]",T="[object Undefined]",p="[object WeakMap]",v="[object ArrayBuffer]",_="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",I="[object Int8Array]",U="[object Int16Array]",z="[object Int32Array]",Z="[object Uint8Array]",C="[object Uint8ClampedArray]",q="[object Uint16Array]",A="[object Uint32Array]",R=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,M={};M[w]=M[x]=M[I]=M[U]=M[z]=M[Z]=M[C]=M[q]=M[A]=!0,M[N]=M[y]=M[v]=M[f]=M[_]=M[i]=M[t]=M[n]=M[u]=M[c]=M[o]=M[l]=M[E]=M[b]=M[p]=!1;var P=typeof zt=="object"&&zt&&zt.Object===Object&&zt,B=typeof self=="object"&&self&&self.Object===Object&&self,K=P||B||Function("return this")(),G=dt&&!dt.nodeType&&dt,Y=G&&!0&&ft&&!ft.nodeType&&ft,tt=Y&&Y.exports===G,nt=tt&&P.process,it=function(){try{return nt&&nt.binding&&nt.binding("util")}catch{}}(),ut=it&&it.isTypedArray;function st(s,k){for(var D=-1,V=s==null?0:s.length,lt=0,et=[];++D-1}function Je(s,k){var D=this.__data__,V=ne(D,s);return V<0?(++this.size,D.push([s,k])):D[V][1]=k,this}Tt.prototype.clear=We,Tt.prototype.delete=Ye,Tt.prototype.get=Xe,Tt.prototype.has=Qe,Tt.prototype.set=Je;function xt(s){var k=-1,D=s==null?0:s.length;for(this.clear();++kht))return!1;var yt=et.get(s);if(yt&&et.get(k))return yt==k;var Nt=-1,Pt=!0,_t=D&L?new te:void 0;for(et.set(s,k),et.set(k,s);++Nt-1&&s%1==0&&s-1&&s%1==0&&s<=S}function Ie(s){var k=typeof s;return s!=null&&(k=="object"||k=="function")}function Mt(s){return s!=null&&typeof s=="object"}var Me=ut?W(ut):dn;function _e(s){return me(s)?sn(s):vn(s)}function An(){return[]}function wn(){return!1}ft.exports=En}(Ae,Ae.exports)),Ae.exports}var oe={},Ln;function zn(){if(Ln)return oe;Ln=1;var ft=oe&&oe.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(oe,"__esModule",{value:!0});var dt=ft(Mn()),F=ft(Dn()),O;return function(m){function L(d,f,i){d===void 0&&(d={}),f===void 0&&(f={}),typeof d!="object"&&(d={}),typeof f!="object"&&(f={});var t=dt.default(f);i||(t=Object.keys(t).reduce(function(h,u){return t[u]!=null&&(h[u]=t[u]),h},{}));for(var n in d)d[n]!==void 0&&f[n]===void 0&&(t[n]=d[n]);return Object.keys(t).length>0?t:void 0}m.compose=L;function S(d,f){d===void 0&&(d={}),f===void 0&&(f={}),typeof d!="object"&&(d={}),typeof f!="object"&&(f={});var i=Object.keys(d).concat(Object.keys(f)).reduce(function(t,n){return F.default(d[n],f[n])||(t[n]=f[n]===void 0?null:f[n]),t},{});return Object.keys(i).length>0?i:void 0}m.diff=S;function N(d,f){d===void 0&&(d={}),f===void 0&&(f={}),d=d||{};var i=Object.keys(f).reduce(function(t,n){return f[n]!==d[n]&&d[n]!==void 0&&(t[n]=f[n]),t},{});return Object.keys(d).reduce(function(t,n){return d[n]!==f[n]&&f[n]===void 0&&(t[n]=null),t},i)}m.invert=N;function y(d,f,i){if(i===void 0&&(i=!1),typeof d!="object")return f;if(typeof f=="object"){if(!i)return f;var t=Object.keys(f).reduce(function(n,h){return d[h]===void 0&&(n[h]=f[h]),n},{});return Object.keys(t).length>0?t:void 0}}m.transform=y}(O||(O={})),oe.default=O,oe}var ae={},le={},qn;function Kn(){if(qn)return le;qn=1;var ft=le&&le.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(le,"__esModule",{value:!0});var dt=ft(Bn()),F=function(){function O(m){this.ops=m,this.index=0,this.offset=0}return O.prototype.hasNext=function(){return this.peekLength()<1/0},O.prototype.next=function(m){m||(m=1/0);var L=this.ops[this.index];if(L){var S=this.offset,N=dt.default.length(L);if(m>=N-S?(m=N-S,this.index+=1,this.offset=0):this.offset+=m,typeof L.delete=="number")return{delete:m};var y={};return L.attributes&&(y.attributes=L.attributes),typeof L.retain=="number"?y.retain=m:typeof L.insert=="string"?y.insert=L.insert.substr(S,m):y.insert=L.insert,y}else return{retain:1/0}},O.prototype.peek=function(){return this.ops[this.index]},O.prototype.peekLength=function(){return this.ops[this.index]?dt.default.length(this.ops[this.index])-this.offset:1/0},O.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},O.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var m=this.offset,L=this.index,S=this.next(),N=this.ops.slice(this.index);return this.offset=m,this.index=L,[S].concat(N)}else return[]},O}();return le.default=F,le}var Rn;function Bn(){if(Rn)return ae;Rn=1;var ft=ae&&ae.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(ae,"__esModule",{value:!0});var dt=ft(Kn()),F;return function(O){function m(S){return new dt.default(S)}O.iterator=m;function L(S){return typeof S.delete=="number"?S.delete:typeof S.retain=="number"?S.retain:typeof S.insert=="string"?S.insert.length:1}O.length=L}(F||(F={})),ae.default=F,ae}var Oe,jn;function Gn(){if(jn)return Oe;jn=1;var ft=Oe&&Oe.__importDefault||function(y){return y&&y.__esModule?y:{default:y}},dt=ft(Hn()),F=ft(Mn()),O=ft(Dn()),m=ft(zn()),L=ft(Bn()),S="\0",N=function(){function y(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]}return y.prototype.insert=function(d,f){var i={};return typeof d=="string"&&d.length===0?this:(i.insert=d,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(i.attributes=f),this.push(i))},y.prototype.delete=function(d){return d<=0?this:this.push({delete:d})},y.prototype.retain=function(d,f){if(d<=0)return this;var i={retain:d};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(i.attributes=f),this.push(i)},y.prototype.push=function(d){var f=this.ops.length,i=this.ops[f-1];if(d=F.default(d),typeof i=="object"){if(typeof d.delete=="number"&&typeof i.delete=="number")return this.ops[f-1]={delete:i.delete+d.delete},this;if(typeof i.delete=="number"&&d.insert!=null&&(f-=1,i=this.ops[f-1],typeof i!="object"))return this.ops.unshift(d),this;if(O.default(d.attributes,i.attributes)){if(typeof d.insert=="string"&&typeof i.insert=="string")return this.ops[f-1]={insert:i.insert+d.insert},typeof d.attributes=="object"&&(this.ops[f-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof i.retain=="number")return this.ops[f-1]={retain:i.retain+d.retain},typeof d.attributes=="object"&&(this.ops[f-1].attributes=d.attributes),this}}return f===this.ops.length?this.ops.push(d):this.ops.splice(f,0,d),this},y.prototype.chop=function(){var d=this.ops[this.ops.length-1];return d&&d.retain&&!d.attributes&&this.ops.pop(),this},y.prototype.filter=function(d){return this.ops.filter(d)},y.prototype.forEach=function(d){this.ops.forEach(d)},y.prototype.map=function(d){return this.ops.map(d)},y.prototype.partition=function(d){var f=[],i=[];return this.forEach(function(t){var n=d(t)?f:i;n.push(t)}),[f,i]},y.prototype.reduce=function(d,f){return this.ops.reduce(d,f)},y.prototype.changeLength=function(){return this.reduce(function(d,f){return f.insert?d+L.default.length(f):f.delete?d-f.delete:d},0)},y.prototype.length=function(){return this.reduce(function(d,f){return d+L.default.length(f)},0)},y.prototype.slice=function(d,f){d===void 0&&(d=0),f===void 0&&(f=1/0);for(var i=[],t=L.default.iterator(this.ops),n=0;n0&&i.next(n.retain-h)}for(var u=new y(t);f.hasNext()||i.hasNext();)if(i.peekType()==="insert")u.push(i.next());else if(f.peekType()==="delete")u.push(f.next());else{var c=Math.min(f.peekLength(),i.peekLength()),a=f.next(c),o=i.next(c);if(typeof o.retain=="number"){var r={};typeof a.retain=="number"?r.retain=c:r.insert=a.insert;var e=m.default.compose(a.attributes,o.attributes,typeof a.retain=="number");if(e&&(r.attributes=e),u.push(r),!i.hasNext()&&O.default(u.ops[u.ops.length-1],r)){var l=new y(f.rest());return u.concat(l).chop()}}else typeof o.delete=="number"&&typeof a.retain=="number"&&u.push(o)}return u.chop()},y.prototype.concat=function(d){var f=new y(this.ops.slice());return d.ops.length>0&&(f.push(d.ops[0]),f.ops=f.ops.concat(d.ops.slice(1))),f},y.prototype.diff=function(d,f){if(this.ops===d.ops)return new y;var i=[this,d].map(function(c){return c.map(function(a){if(a.insert!=null)return typeof a.insert=="string"?a.insert:S;var o=c===d?"on":"with";throw new Error("diff() called "+o+" non-document")}).join("")}),t=new y,n=dt.default(i[0],i[1],f),h=L.default.iterator(this.ops),u=L.default.iterator(d.ops);return n.forEach(function(c){for(var a=c[1].length;a>0;){var o=0;switch(c[0]){case dt.default.INSERT:o=Math.min(u.peekLength(),a),t.push(u.next(o));break;case dt.default.DELETE:o=Math.min(a,h.peekLength()),h.next(o),t.delete(o);break;case dt.default.EQUAL:o=Math.min(h.peekLength(),u.peekLength(),a);var r=h.next(o),e=u.next(o);O.default(r.insert,e.insert)?t.retain(o,m.default.diff(r.attributes,e.attributes)):t.push(e).delete(o);break}a-=o}}),t.chop()},y.prototype.eachLine=function(d,f){f===void 0&&(f=` `);for(var i=L.default.iterator(this.ops),t=new y,n=0;i.hasNext();){if(i.peekType()!=="insert")return;var h=i.peek(),u=L.default.length(h)-i.peekLength(),c=typeof h.insert=="string"?h.insert.indexOf(f,u)-u:-1;if(c<0)t.push(i.next());else if(c>0)t.push(i.next(c));else{if(d(t,i.next(1).attributes||{},n)===!1)return;n+=1,t=new y}}t.length()>0&&d(t,{},n)},y.prototype.invert=function(d){var f=new y;return this.reduce(function(i,t){if(t.insert)f.delete(L.default.length(t));else{if(t.retain&&t.attributes==null)return f.retain(t.retain),i+t.retain;if(t.delete||t.retain&&t.attributes){var n=t.delete||t.retain,h=d.slice(i,i+n);return h.forEach(function(u){t.delete?f.push(u):t.retain&&t.attributes&&f.retain(L.default.length(u),m.default.invert(t.attributes,u.attributes))}),i+n}}return i},0),f.chop()},y.prototype.transform=function(d,f){if(f===void 0&&(f=!1),f=!!f,typeof d=="number")return this.transformPosition(d,f);for(var i=d,t=L.default.iterator(this.ops),n=L.default.iterator(i.ops),h=new y;t.hasNext()||n.hasNext();)if(t.peekType()==="insert"&&(f||n.peekType()!=="insert"))h.retain(L.default.length(t.next()));else if(n.peekType()==="insert")h.push(n.next());else{var u=Math.min(t.peekLength(),n.peekLength()),c=t.next(u),a=n.next(u);if(c.delete)continue;a.delete?h.push(a):h.retain(u,m.default.transform(c.attributes,a.attributes,f))}return h.chop()},y.prototype.transformPosition=function(d,f){f===void 0&&(f=!1),f=!!f;for(var i=L.default.iterator(this.ops),t=0;i.hasNext()&&t<=d;){var n=i.peekLength(),h=i.peekType();if(i.next(),h==="delete"){d-=Math.min(n,d-t);continue}else h==="insert"&&(t