Editor.17682c4e.js
244 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var Mt=Object.defineProperty;var Ct=(z,L,m)=>L in z?Mt(z,L,{enumerable:!0,configurable:!0,writable:!0,value:m}):z[L]=m;var kt=(z,L,m)=>(Ct(z,typeof L!="symbol"?L+"":L,m),m);import{a as wt}from"./vuex.esm.8fdeb4b6.js";import{c as jt,a as Bt}from"./_commonjsHelpers.f84db168.js";import{f as Dt}from"./Caret.19b10233.js";import{n as xt}from"./_plugin-vue2_normalizer.61652a7c.js";import{S as Ft}from"./index.3c70e00e.js";const Ht=z=>{const{invalidClosingTags:L,invalidOpeningTags:m,tagNamePattern:c}=St(z);let s=z;return L.forEach(k=>{s=`<${k.match(c)[1]}>`+s}),m.forEach(k=>{const O=k.match(c)[1];s=s+`</${O}>`}),s},Ut=(z,L)=>{const{invalidClosingTags:m,invalidOpeningTags:c,tagNamePattern:s}=St(z);return m.forEach(k=>{const O=k.match(s)[1],g=new RegExp(`^<${O}>`);L=L.replace(g,"")}),c.forEach(k=>{const O=k.match(s)[1],g=new RegExp(`<\\/${O}>$`);L=L.replace(g,"")}),L},St=z=>{const L=new RegExp(/(<[^<>]*>)/),m=new RegExp(/<\s?\/[^<>]*>/),c=new RegExp(/<\s?\/?([^<\s>]*).*>/),s=z.split(L),k=[];s.forEach(v=>{v.match(L)&&k.push(v)});const O=[];k.forEach((v,d)=>{if(!v)return;if(v.match(m)){O.push(v),k[d]="";return}const o=v.match(c)[1];let t=!1;k.forEach((e,u)=>{if(d===u||!e||t||!e.match(m))return;const l=e.match(c)[1];if(o===l){k[d]="",k[u]="",t=!0;return}O.push(v),k[d]=""})});const g=[],y=[];return O.forEach(v=>{if(v.match(L)){if(v.match(m)){y.push(v);return}g.push(v)}}),{invalidClosingTags:y,invalidOpeningTags:g,tagNamePattern:c}};var Ot={},$t={get exports(){return Ot},set exports(z){Ot=z}};/*!
* Quill Editor v1.3.7
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/(function(z,L){(function(c,s){z.exports=s()})(typeof self<"u"?self:jt,function(){return function(m){var c={};function s(k){if(c[k])return c[k].exports;var O=c[k]={i:k,l:!1,exports:{}};return m[k].call(O.exports,O,O.exports,s),O.l=!0,O.exports}return s.m=m,s.c=c,s.d=function(k,O,g){s.o(k,O)||Object.defineProperty(k,O,{configurable:!1,enumerable:!0,get:g})},s.n=function(k){var O=k&&k.__esModule?function(){return k.default}:function(){return k};return s.d(O,"a",O),O},s.o=function(k,O){return Object.prototype.hasOwnProperty.call(k,O)},s.p="",s(s.s=109)}([function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(17),O=s(18),g=s(19),y=s(45),v=s(46),d=s(47),o=s(48),t=s(49),e=s(12),u=s(32),l=s(33),a=s(31),r=s(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:k.default,Format:O.default,Leaf:g.default,Embed:o.default,Scroll:y.default,Block:d.default,Inline:v.default,Text:t.default,Attributor:{Attribute:e.default,Class:u.default,Style:l.default,Store:a.default}};c.default=i},function(m,c,s){var k=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var f in i)i.hasOwnProperty(f)&&(r[f]=i[f])};return function(r,i){a(r,i);function f(){this.constructor=r}r.prototype=i===null?Object.create(i):(f.prototype=i.prototype,new f)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=function(a){k(r,a);function r(i){var f=this;return i="[Parchment] "+i,f=a.call(this,i)||this,f.message=i,f.name=f.constructor.name,f}return r}(Error);c.ParchmentError=O;var g={},y={},v={},d={};c.DATA_KEY="__blot";var o;(function(a){a[a.TYPE=3]="TYPE",a[a.LEVEL=12]="LEVEL",a[a.ATTRIBUTE=13]="ATTRIBUTE",a[a.BLOT=14]="BLOT",a[a.INLINE=7]="INLINE",a[a.BLOCK=11]="BLOCK",a[a.BLOCK_BLOT=10]="BLOCK_BLOT",a[a.INLINE_BLOT=6]="INLINE_BLOT",a[a.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",a[a.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",a[a.ANY=15]="ANY"})(o=c.Scope||(c.Scope={}));function t(a,r){var i=u(a);if(i==null)throw new O("Unable to create "+a+" blot");var f=i,n=a instanceof Node||a.nodeType===Node.TEXT_NODE?a:f.create(r);return new f(n,r)}c.create=t;function e(a,r){return r===void 0&&(r=!1),a==null?null:a[c.DATA_KEY]!=null?a[c.DATA_KEY].blot:r?e(a.parentNode,r):null}c.find=e;function u(a,r){r===void 0&&(r=o.ANY);var i;if(typeof a=="string")i=d[a]||g[a];else if(a instanceof Text||a.nodeType===Node.TEXT_NODE)i=d.text;else if(typeof a=="number")a&o.LEVEL&o.BLOCK?i=d.block:a&o.LEVEL&o.INLINE&&(i=d.inline);else if(a instanceof HTMLElement){var f=(a.getAttribute("class")||"").split(/\s+/);for(var n in f)if(i=y[f[n]],i)break;i=i||v[a.tagName]}return i==null?null:r&o.LEVEL&i.scope&&r&o.TYPE&i.scope?i:null}c.query=u;function l(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];if(a.length>1)return a.map(function(n){return l(n)});var i=a[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new O("Invalid definition");if(i.blotName==="abstract")throw new O("Cannot register abstract class");if(d[i.blotName||i.attrName]=i,typeof i.keyName=="string")g[i.keyName]=i;else if(i.className!=null&&(y[i.className]=i),i.tagName!=null){Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(n){return n.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var f=Array.isArray(i.tagName)?i.tagName:[i.tagName];f.forEach(function(n){(v[n]==null||i.className==null)&&(v[n]=i)})}return i}c.register=l},function(m,c,s){var k=s(51),O=s(11),g=s(3),y=s(20),v=String.fromCharCode(0),d=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};d.prototype.insert=function(o,t){var e={};return o.length===0?this:(e.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(e.attributes=t),this.push(e))},d.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},d.prototype.retain=function(o,t){if(o<=0)return this;var e={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(e.attributes=t),this.push(e)},d.prototype.push=function(o){var t=this.ops.length,e=this.ops[t-1];if(o=g(!0,{},o),typeof e=="object"){if(typeof o.delete=="number"&&typeof e.delete=="number")return this.ops[t-1]={delete:e.delete+o.delete},this;if(typeof e.delete=="number"&&o.insert!=null&&(t-=1,e=this.ops[t-1],typeof e!="object"))return this.ops.unshift(o),this;if(O(o.attributes,e.attributes)){if(typeof o.insert=="string"&&typeof e.insert=="string")return this.ops[t-1]={insert:e.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof e.retain=="number")return this.ops[t-1]={retain:e.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this},d.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},d.prototype.filter=function(o){return this.ops.filter(o)},d.prototype.forEach=function(o){this.ops.forEach(o)},d.prototype.map=function(o){return this.ops.map(o)},d.prototype.partition=function(o){var t=[],e=[];return this.forEach(function(u){var l=o(u)?t:e;l.push(u)}),[t,e]},d.prototype.reduce=function(o,t){return this.ops.reduce(o,t)},d.prototype.changeLength=function(){return this.reduce(function(o,t){return t.insert?o+y.length(t):t.delete?o-t.delete:o},0)},d.prototype.length=function(){return this.reduce(function(o,t){return o+y.length(t)},0)},d.prototype.slice=function(o,t){o=o||0,typeof t!="number"&&(t=1/0);for(var e=[],u=y.iterator(this.ops),l=0;l<t&&u.hasNext();){var a;l<o?a=u.next(o-l):(a=u.next(t-l),e.push(a)),l+=y.length(a)}return new d(e)},d.prototype.compose=function(o){var t=y.iterator(this.ops),e=y.iterator(o.ops),u=[],l=e.peek();if(l!=null&&typeof l.retain=="number"&&l.attributes==null){for(var a=l.retain;t.peekType()==="insert"&&t.peekLength()<=a;)a-=t.peekLength(),u.push(t.next());l.retain-a>0&&e.next(l.retain-a)}for(var r=new d(u);t.hasNext()||e.hasNext();)if(e.peekType()==="insert")r.push(e.next());else if(t.peekType()==="delete")r.push(t.next());else{var i=Math.min(t.peekLength(),e.peekLength()),f=t.next(i),n=e.next(i);if(typeof n.retain=="number"){var h={};typeof f.retain=="number"?h.retain=i:h.insert=f.insert;var A=y.attributes.compose(f.attributes,n.attributes,typeof f.retain=="number");if(A&&(h.attributes=A),r.push(h),!e.hasNext()&&O(r.ops[r.ops.length-1],h)){var E=new d(t.rest());return r.concat(E).chop()}}else typeof n.delete=="number"&&typeof f.retain=="number"&&r.push(n)}return r.chop()},d.prototype.concat=function(o){var t=new d(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t},d.prototype.diff=function(o,t){if(this.ops===o.ops)return new d;var e=[this,o].map(function(i){return i.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:v;var n=i===o?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),u=new d,l=k(e[0],e[1],t),a=y.iterator(this.ops),r=y.iterator(o.ops);return l.forEach(function(i){for(var f=i[1].length;f>0;){var n=0;switch(i[0]){case k.INSERT:n=Math.min(r.peekLength(),f),u.push(r.next(n));break;case k.DELETE:n=Math.min(f,a.peekLength()),a.next(n),u.delete(n);break;case k.EQUAL:n=Math.min(a.peekLength(),r.peekLength(),f);var h=a.next(n),A=r.next(n);O(h.insert,A.insert)?u.retain(n,y.attributes.diff(h.attributes,A.attributes)):u.push(A).delete(n);break}f-=n}}),u.chop()},d.prototype.eachLine=function(o,t){t=t||`
`;for(var e=y.iterator(this.ops),u=new d,l=0;e.hasNext();){if(e.peekType()!=="insert")return;var a=e.peek(),r=y.length(a)-e.peekLength(),i=typeof a.insert=="string"?a.insert.indexOf(t,r)-r:-1;if(i<0)u.push(e.next());else if(i>0)u.push(e.next(i));else{if(o(u,e.next(1).attributes||{},l)===!1)return;l+=1,u=new d}}u.length()>0&&o(u,{},l)},d.prototype.transform=function(o,t){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);for(var e=y.iterator(this.ops),u=y.iterator(o.ops),l=new d;e.hasNext()||u.hasNext();)if(e.peekType()==="insert"&&(t||u.peekType()!=="insert"))l.retain(y.length(e.next()));else if(u.peekType()==="insert")l.push(u.next());else{var a=Math.min(e.peekLength(),u.peekLength()),r=e.next(a),i=u.next(a);if(r.delete)continue;i.delete?l.push(i):l.retain(a,y.attributes.transform(r.attributes,i.attributes,t))}return l.chop()},d.prototype.transformPosition=function(o,t){t=!!t;for(var e=y.iterator(this.ops),u=0;e.hasNext()&&u<=o;){var l=e.peekLength(),a=e.peekType();if(e.next(),a==="delete"){o-=Math.min(l,o-u);continue}else a==="insert"&&(u<o||!t)&&(o+=l);u+=l}return o},m.exports=d},function(m,c){var s=Object.prototype.hasOwnProperty,k=Object.prototype.toString,O=Object.defineProperty,g=Object.getOwnPropertyDescriptor,y=function(e){return typeof Array.isArray=="function"?Array.isArray(e):k.call(e)==="[object Array]"},v=function(e){if(!e||k.call(e)!=="[object Object]")return!1;var u=s.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&s.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!u&&!l)return!1;var a;for(a in e);return typeof a>"u"||s.call(e,a)},d=function(e,u){O&&u.name==="__proto__"?O(e,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):e[u.name]=u.newValue},o=function(e,u){if(u==="__proto__")if(s.call(e,u)){if(g)return g(e,u).value}else return;return e[u]};m.exports=function t(){var e,u,l,a,r,i,f=arguments[0],n=1,h=arguments.length,A=!1;for(typeof f=="boolean"&&(A=f,f=arguments[1]||{},n=2),(f==null||typeof f!="object"&&typeof f!="function")&&(f={});n<h;++n)if(e=arguments[n],e!=null)for(u in e)l=o(f,u),a=o(e,u),f!==a&&(A&&a&&(v(a)||(r=y(a)))?(r?(r=!1,i=l&&y(l)?l:[]):i=l&&v(l)?l:{},d(f,{name:u,newValue:t(A,i,a)})):typeof a<"u"&&d(f,{name:u,newValue:a}));return f}},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.BlockEmbed=c.bubbleFormats=void 0;var k=function(){function p(b,w){for(var S=0;S<w.length;S++){var R=w[S];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(b,R.key,R)}}return function(b,w,S){return w&&p(b.prototype,w),S&&p(b,S),b}}(),O=function p(b,w,S){b===null&&(b=Function.prototype);var R=Object.getOwnPropertyDescriptor(b,w);if(R===void 0){var D=Object.getPrototypeOf(b);return D===null?void 0:p(D,w,S)}else{if("value"in R)return R.value;var F=R.get;return F===void 0?void 0:F.call(S)}},g=s(3),y=f(g),v=s(2),d=f(v),o=s(0),t=f(o),e=s(16),u=f(e),l=s(6),a=f(l),r=s(7),i=f(r);function f(p){return p&&p.__esModule?p:{default:p}}function n(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function h(p,b){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:p}function A(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);p.prototype=Object.create(b&&b.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(p,b):p.__proto__=b)}var E=1,T=function(p){A(b,p);function b(){return n(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return k(b,[{key:"attach",value:function(){O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"attach",this).call(this),this.attributes=new t.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,y.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(S,R){var D=t.default.query(S,t.default.Scope.BLOCK_ATTRIBUTE);D!=null&&this.attributes.attribute(D,R)}},{key:"formatAt",value:function(S,R,D,F){this.format(D,F)}},{key:"insertAt",value:function(S,R,D){if(typeof R=="string"&&R.endsWith(`
`)){var F=t.default.create(x.blotName);this.parent.insertBefore(F,S===0?this:this.next),F.insertAt(0,R.slice(0,-1))}else O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,S,R,D)}}]),b}(t.default.Embed);T.scope=t.default.Scope.BLOCK_BLOT;var x=function(p){A(b,p);function b(w){n(this,b);var S=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,w));return S.cache={},S}return k(b,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(t.default.Leaf).reduce(function(S,R){return R.length()===0?S:S.insert(R.value(),_(R))},new d.default).insert(`
`,_(this))),this.cache.delta}},{key:"deleteAt",value:function(S,R){O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"deleteAt",this).call(this,S,R),this.cache={}}},{key:"formatAt",value:function(S,R,D,F){R<=0||(t.default.query(D,t.default.Scope.BLOCK)?S+R===this.length()&&this.format(D,F):O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,S,Math.min(R,this.length()-S-1),D,F),this.cache={})}},{key:"insertAt",value:function(S,R,D){if(D!=null)return O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,S,R,D);if(R.length!==0){var F=R.split(`
`),Z=F.shift();Z.length>0&&(S<this.length()-1||this.children.tail==null?O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,Math.min(S,this.length()-1),Z):this.children.tail.insertAt(this.children.tail.length(),Z),this.cache={});var j=this;F.reduce(function(M,N){return j=j.split(M,!0),j.insertAt(0,N),N.length},S+Z.length)}}},{key:"insertBefore",value:function(S,R){var D=this.children.head;O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,S,R),D instanceof u.default&&D.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"length",this).call(this)+E),this.cache.length}},{key:"moveChildren",value:function(S,R){O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"moveChildren",this).call(this,S,R),this.cache={}}},{key:"optimize",value:function(S){O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,S),this.cache={}}},{key:"path",value:function(S){return O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,S,!0)}},{key:"removeChild",value:function(S){O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"removeChild",this).call(this,S),this.cache={}}},{key:"split",value:function(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(R&&(S===0||S>=this.length()-E)){var D=this.clone();return S===0?(this.parent.insertBefore(D,this),this):(this.parent.insertBefore(D,this.next),D)}else{var F=O(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"split",this).call(this,S,R);return this.cache={},F}}}]),b}(t.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[a.default,t.default.Embed,i.default];function _(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return p==null||(typeof p.formats=="function"&&(b=(0,y.default)(b,p.formats())),p.parent==null||p.parent.blotName=="scroll"||p.parent.statics.scope!==p.statics.scope)?b:_(p.parent,b)}c.bubbleFormats=_,c.BlockEmbed=T,c.default=x},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.overload=c.expandConfig=void 0;var k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},O=function(){function j(M,N){var q=[],I=!0,H=!1,B=void 0;try{for(var P=M[Symbol.iterator](),C;!(I=(C=P.next()).done)&&(q.push(C.value),!(N&&q.length===N));I=!0);}catch(U){H=!0,B=U}finally{try{!I&&P.return&&P.return()}finally{if(H)throw B}}return q}return function(M,N){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return j(M,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(){function j(M,N){for(var q=0;q<N.length;q++){var I=N[q];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(M,I.key,I)}}return function(M,N,q){return N&&j(M.prototype,N),q&&j(M,q),M}}();s(50);var y=s(2),v=_(y),d=s(14),o=_(d),t=s(8),e=_(t),u=s(9),l=_(u),a=s(0),r=_(a),i=s(15),f=_(i),n=s(3),h=_(n),A=s(10),E=_(A),T=s(34),x=_(T);function _(j){return j&&j.__esModule?j:{default:j}}function p(j,M,N){return M in j?Object.defineProperty(j,M,{value:N,enumerable:!0,configurable:!0,writable:!0}):j[M]=N,j}function b(j,M){if(!(j instanceof M))throw new TypeError("Cannot call a class as a function")}var w=(0,E.default)("quill"),S=function(){g(j,null,[{key:"debug",value:function(N){N===!0&&(N="log"),E.default.level(N)}},{key:"find",value:function(N){return N.__quill||r.default.find(N)}},{key:"import",value:function(N){return this.imports[N]==null&&w.error("Cannot import "+N+". Are you sure it was registered?"),this.imports[N]}},{key:"register",value:function(N,q){var I=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof N!="string"){var B=N.attrName||N.blotName;typeof B=="string"?this.register("formats/"+B,N,q):Object.keys(N).forEach(function(P){I.register(P,N[P],q)})}else this.imports[N]!=null&&!H&&w.warn("Overwriting "+N+" with",q),this.imports[N]=q,(N.startsWith("blots/")||N.startsWith("formats/"))&&q.blotName!=="abstract"?r.default.register(q):N.startsWith("modules")&&typeof q.register=="function"&&q.register()}}]);function j(M){var N=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(b(this,j),this.options=R(M,q),this.container=this.options.container,this.container==null)return w.error("Invalid Quill container",M);this.options.debug&&j.debug(this.options.debug);var I=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 e.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new f.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(e.default.events.EDITOR_CHANGE,function(B){B===e.default.events.TEXT_CHANGE&&N.root.classList.toggle("ql-blank",N.editor.isBlank())}),this.emitter.on(e.default.events.SCROLL_UPDATE,function(B,P){var C=N.selection.lastRange,U=C&&C.length===0?C.index:void 0;D.call(N,function(){return N.editor.update(null,P,U)},B)});var H=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+I+"<p><br></p></div>");this.setContents(H),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return g(j,[{key:"addContainer",value:function(N){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof N=="string"){var I=N;N=document.createElement("div"),N.classList.add(I)}return this.container.insertBefore(N,q),N}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(N,q,I){var H=this,B=F(N,q,I),P=O(B,4);return N=P[0],q=P[1],I=P[3],D.call(this,function(){return H.editor.deleteText(N,q)},I,N,-1*q)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(N),this.container.classList.toggle("ql-disabled",!N)}},{key:"focus",value:function(){var N=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=N,this.scrollIntoView()}},{key:"format",value:function(N,q){var I=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.default.sources.API;return D.call(this,function(){var B=I.getSelection(!0),P=new v.default;if(B==null)return P;if(r.default.query(N,r.default.Scope.BLOCK))P=I.editor.formatLine(B.index,B.length,p({},N,q));else{if(B.length===0)return I.selection.format(N,q),P;P=I.editor.formatText(B.index,B.length,p({},N,q))}return I.setSelection(B,e.default.sources.SILENT),P},H)}},{key:"formatLine",value:function(N,q,I,H,B){var P=this,C=void 0,U=F(N,q,I,H,B),$=O(U,4);return N=$[0],q=$[1],C=$[2],B=$[3],D.call(this,function(){return P.editor.formatLine(N,q,C)},B,N,0)}},{key:"formatText",value:function(N,q,I,H,B){var P=this,C=void 0,U=F(N,q,I,H,B),$=O(U,4);return N=$[0],q=$[1],C=$[2],B=$[3],D.call(this,function(){return P.editor.formatText(N,q,C)},B,N,0)}},{key:"getBounds",value:function(N){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=void 0;typeof N=="number"?I=this.selection.getBounds(N,q):I=this.selection.getBounds(N.index,N.length);var H=this.container.getBoundingClientRect();return{bottom:I.bottom-H.top,height:I.height,left:I.left-H.left,right:I.right-H.left,top:I.top-H.top,width:I.width}}},{key:"getContents",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,I=F(N,q),H=O(I,2);return N=H[0],q=H[1],this.editor.getContents(N,q)}},{key:"getFormat",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof N=="number"?this.editor.getFormat(N,q):this.editor.getFormat(N.index,N.length)}},{key:"getIndex",value:function(N){return N.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(N){return this.scroll.leaf(N)}},{key:"getLine",value:function(N){return this.scroll.line(N)}},{key:"getLines",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof N!="number"?this.scroll.lines(N.index,N.length):this.scroll.lines(N,q)}},{key:"getModule",value:function(N){return this.theme.modules[N]}},{key:"getSelection",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return N&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,I=F(N,q),H=O(I,2);return N=H[0],q=H[1],this.editor.getText(N,q)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(N,q,I){var H=this,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j.sources.API;return D.call(this,function(){return H.editor.insertEmbed(N,q,I)},B,N)}},{key:"insertText",value:function(N,q,I,H,B){var P=this,C=void 0,U=F(N,0,I,H,B),$=O(U,4);return N=$[0],C=$[2],B=$[3],D.call(this,function(){return P.editor.insertText(N,q,C)},B,N,q.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(N,q,I){this.clipboard.dangerouslyPasteHTML(N,q,I)}},{key:"removeFormat",value:function(N,q,I){var H=this,B=F(N,q,I),P=O(B,4);return N=P[0],q=P[1],I=P[3],D.call(this,function(){return H.editor.removeFormat(N,q)},I,N)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(N){var q=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API;return D.call(this,function(){N=new v.default(N);var H=q.getLength(),B=q.editor.deleteText(0,H),P=q.editor.applyDelta(N),C=P.ops[P.ops.length-1];C!=null&&typeof C.insert=="string"&&C.insert[C.insert.length-1]===`
`&&(q.editor.deleteText(q.getLength()-1,1),P.delete(1));var U=B.compose(P);return U},I)}},{key:"setSelection",value:function(N,q,I){if(N==null)this.selection.setRange(null,q||j.sources.API);else{var H=F(N,q,I),B=O(H,4);N=B[0],q=B[1],I=B[3],this.selection.setRange(new i.Range(N,q),I),I!==e.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(N){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API,I=new v.default().insert(N);return this.setContents(I,q)}},{key:"update",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.default.sources.USER,q=this.scroll.update(N);return this.selection.update(N),q}},{key:"updateContents",value:function(N){var q=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API;return D.call(this,function(){return N=new v.default(N),q.editor.applyDelta(N,I)},I,!0)}}]),j}();S.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},S.events=e.default.events,S.sources=e.default.sources,S.version="1.3.7",S.imports={delta:v.default,parchment:r.default,"core/module":l.default,"core/theme":x.default};function R(j,M){if(M=(0,h.default)(!0,{container:j,modules:{clipboard:!0,keyboard:!0,history:!0}},M),!M.theme||M.theme===S.DEFAULTS.theme)M.theme=x.default;else if(M.theme=S.import("themes/"+M.theme),M.theme==null)throw new Error("Invalid theme "+M.theme+". Did you register it?");var N=(0,h.default)(!0,{},M.theme.DEFAULTS);[N,M].forEach(function(H){H.modules=H.modules||{},Object.keys(H.modules).forEach(function(B){H.modules[B]===!0&&(H.modules[B]={})})});var q=Object.keys(N.modules).concat(Object.keys(M.modules)),I=q.reduce(function(H,B){var P=S.import("modules/"+B);return P==null?w.error("Cannot load "+B+" module. Are you sure you registered it?"):H[B]=P.DEFAULTS||{},H},{});return M.modules!=null&&M.modules.toolbar&&M.modules.toolbar.constructor!==Object&&(M.modules.toolbar={container:M.modules.toolbar}),M=(0,h.default)(!0,{},S.DEFAULTS,{modules:I},N,M),["bounds","container","scrollingContainer"].forEach(function(H){typeof M[H]=="string"&&(M[H]=document.querySelector(M[H]))}),M.modules=Object.keys(M.modules).reduce(function(H,B){return M.modules[B]&&(H[B]=M.modules[B]),H},{}),M}function D(j,M,N,q){if(this.options.strict&&!this.isEnabled()&&M===e.default.sources.USER)return new v.default;var I=N==null?null:this.getSelection(),H=this.editor.delta,B=j();if(I!=null&&(N===!0&&(N=I.index),q==null?I=Z(I,B,M):q!==0&&(I=Z(I,N,q,M)),this.setSelection(I,e.default.sources.SILENT)),B.length()>0){var P,C=[e.default.events.TEXT_CHANGE,B,H,M];if((P=this.emitter).emit.apply(P,[e.default.events.EDITOR_CHANGE].concat(C)),M!==e.default.sources.SILENT){var U;(U=this.emitter).emit.apply(U,C)}}return B}function F(j,M,N,q,I){var H={};return typeof j.index=="number"&&typeof j.length=="number"?typeof M!="number"?(I=q,q=N,N=M,M=j.length,j=j.index):(M=j.length,j=j.index):typeof M!="number"&&(I=q,q=N,N=M,M=0),(typeof N>"u"?"undefined":k(N))==="object"?(H=N,I=q):typeof N=="string"&&(q!=null?H[N]=q:I=N),I=I||e.default.sources.API,[j,M,H,I]}function Z(j,M,N,q){if(j==null)return null;var I=void 0,H=void 0;if(M instanceof v.default){var B=[j.index,j.index+j.length].map(function($){return M.transformPosition($,q!==e.default.sources.USER)}),P=O(B,2);I=P[0],H=P[1]}else{var C=[j.index,j.index+j.length].map(function($){return $<M||$===M&&q===e.default.sources.USER?$:N>=0?$+N:Math.max(M,$+N)}),U=O(C,2);I=U[0],H=U[1]}return new i.Range(I,H-I)}c.expandConfig=R,c.overload=F,c.default=S},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function a(r,i){for(var f=0;f<i.length;f++){var n=i[f];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}return function(r,i,f){return i&&a(r.prototype,i),f&&a(r,f),r}}(),O=function a(r,i,f){r===null&&(r=Function.prototype);var n=Object.getOwnPropertyDescriptor(r,i);if(n===void 0){var h=Object.getPrototypeOf(r);return h===null?void 0:a(h,i,f)}else{if("value"in n)return n.value;var A=n.get;return A===void 0?void 0:A.call(f)}},g=s(7),y=o(g),v=s(0),d=o(v);function o(a){return a&&a.__esModule?a:{default:a}}function t(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function e(a,r){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:a}function u(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);a.prototype=Object.create(r&&r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(a,r):a.__proto__=r)}var l=function(a){u(r,a);function r(){return t(this,r),e(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return k(r,[{key:"formatAt",value:function(f,n,h,A){if(r.compare(this.statics.blotName,h)<0&&d.default.query(h,d.default.Scope.BLOT)){var E=this.isolate(f,n);A&&E.wrap(h,A)}else O(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"formatAt",this).call(this,f,n,h,A)}},{key:"optimize",value:function(f){if(O(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"optimize",this).call(this,f),this.parent instanceof r&&r.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(f,n){var h=r.order.indexOf(f),A=r.order.indexOf(n);return h>=0||A>=0?h-A:f===n?0:f<n?-1:1}}]),r}(d.default.Inline);l.allowedChildren=[l,d.default.Embed,y.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],c.default=l},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(0),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(t){d(e,t);function e(){return y(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(O.default.Text);c.default=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function i(f,n){for(var h=0;h<n.length;h++){var A=n[h];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(f,A.key,A)}}return function(f,n,h){return n&&i(f.prototype,n),h&&i(f,h),f}}(),O=function i(f,n,h){f===null&&(f=Function.prototype);var A=Object.getOwnPropertyDescriptor(f,n);if(A===void 0){var E=Object.getPrototypeOf(f);return E===null?void 0:i(E,n,h)}else{if("value"in A)return A.value;var T=A.get;return T===void 0?void 0:T.call(h)}},g=s(54),y=o(g),v=s(10),d=o(v);function o(i){return i&&i.__esModule?i:{default:i}}function t(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}function e(i,f){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:i}function u(i,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);i.prototype=Object.create(f&&f.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(i,f):i.__proto__=f)}var l=(0,d.default)("quill:events"),a=["selectionchange","mousedown","mouseup","click"];a.forEach(function(i){document.addEventListener(i,function(){for(var f=arguments.length,n=Array(f),h=0;h<f;h++)n[h]=arguments[h];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(A){if(A.__quill&&A.__quill.emitter){var E;(E=A.__quill.emitter).handleDOM.apply(E,n)}})})});var r=function(i){u(f,i);function f(){t(this,f);var n=e(this,(f.__proto__||Object.getPrototypeOf(f)).call(this));return n.listeners={},n.on("error",l.error),n}return k(f,[{key:"emit",value:function(){l.log.apply(l,arguments),O(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(h){for(var A=arguments.length,E=Array(A>1?A-1:0),T=1;T<A;T++)E[T-1]=arguments[T];(this.listeners[h.type]||[]).forEach(function(x){var _=x.node,p=x.handler;(h.target===_||_.contains(h.target))&&p.apply(void 0,[h].concat(E))})}},{key:"listenDOM",value:function(h,A,E){this.listeners[h]||(this.listeners[h]=[]),this.listeners[h].push({node:A,handler:E})}}]),f}(y.default);r.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},r.sources={API:"api",SILENT:"silent",USER:"user"},c.default=r},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});function k(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}var O=function g(y){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};k(this,g),this.quill=y,this.options=v};O.DEFAULTS={},c.default=O},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=["error","warn","log","info"],O="warn";function g(v){if(k.indexOf(v)<=k.indexOf(O)){for(var d,o=arguments.length,t=Array(o>1?o-1:0),e=1;e<o;e++)t[e-1]=arguments[e];(d=console)[v].apply(d,t)}}function y(v){return k.reduce(function(d,o){return d[o]=g.bind(console,o,v),d},{})}g.level=y.level=function(v){O=v},c.default=y},function(m,c,s){var k=Array.prototype.slice,O=s(52),g=s(53),y=m.exports=function(t,e,u){return u||(u={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||typeof t!="object"&&typeof e!="object"?u.strict?t===e:t==e:o(t,e,u)};function v(t){return t==null}function d(t){return!(!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number")}function o(t,e,u){var l,a;if(v(t)||v(e)||t.prototype!==e.prototype)return!1;if(g(t))return g(e)?(t=k.call(t),e=k.call(e),y(t,e,u)):!1;if(d(t)){if(!d(e)||t.length!==e.length)return!1;for(l=0;l<t.length;l++)if(t[l]!==e[l])return!1;return!0}try{var r=O(t),i=O(e)}catch{return!1}if(r.length!=i.length)return!1;for(r.sort(),i.sort(),l=r.length-1;l>=0;l--)if(r[l]!=i[l])return!1;for(l=r.length-1;l>=0;l--)if(a=r[l],!y(t[a],e[a],u))return!1;return typeof t==typeof e}},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(1),O=function(){function g(y,v,d){d===void 0&&(d={}),this.attrName=y,this.keyName=v;var o=k.Scope.TYPE&k.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&k.Scope.LEVEL|o:this.scope=k.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return g.keys=function(y){return[].map.call(y.attributes,function(v){return v.name})},g.prototype.add=function(y,v){return this.canAdd(y,v)?(y.setAttribute(this.keyName,v),!0):!1},g.prototype.canAdd=function(y,v){var d=k.query(y,k.Scope.BLOT&(this.scope|k.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof v=="string"?this.whitelist.indexOf(v.replace(/["']/g,""))>-1:this.whitelist.indexOf(v)>-1},g.prototype.remove=function(y){y.removeAttribute(this.keyName)},g.prototype.value=function(y){var v=y.getAttribute(this.keyName);return this.canAdd(y,v)&&v?v:""},g}();c.default=O},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.Code=void 0;var k=function(){function T(x,_){var p=[],b=!0,w=!1,S=void 0;try{for(var R=x[Symbol.iterator](),D;!(b=(D=R.next()).done)&&(p.push(D.value),!(_&&p.length===_));b=!0);}catch(F){w=!0,S=F}finally{try{!b&&R.return&&R.return()}finally{if(w)throw S}}return p}return function(x,_){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function T(x,_){for(var p=0;p<_.length;p++){var b=_[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,_,p){return _&&T(x.prototype,_),p&&T(x,p),x}}(),g=function T(x,_,p){x===null&&(x=Function.prototype);var b=Object.getOwnPropertyDescriptor(x,_);if(b===void 0){var w=Object.getPrototypeOf(x);return w===null?void 0:T(w,_,p)}else{if("value"in b)return b.value;var S=b.get;return S===void 0?void 0:S.call(p)}},y=s(2),v=i(y),d=s(0),o=i(d),t=s(4),e=i(t),u=s(6),l=i(u),a=s(7),r=i(a);function i(T){return T&&T.__esModule?T:{default:T}}function f(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function n(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function h(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var A=function(T){h(x,T);function x(){return f(this,x),n(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return x}(l.default);A.blotName="code",A.tagName="CODE";var E=function(T){h(x,T);function x(){return f(this,x),n(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return O(x,[{key:"delta",value:function(){var p=this,b=this.domNode.textContent;return b.endsWith(`
`)&&(b=b.slice(0,-1)),b.split(`
`).reduce(function(w,S){return w.insert(S).insert(`
`,p.formats())},new v.default)}},{key:"format",value:function(p,b){if(!(p===this.statics.blotName&&b)){var w=this.descendant(r.default,this.length()-1),S=k(w,1),R=S[0];R!=null&&R.deleteAt(R.length()-1,1),g(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,p,b)}}},{key:"formatAt",value:function(p,b,w,S){if(b!==0&&!(o.default.query(w,o.default.Scope.BLOCK)==null||w===this.statics.blotName&&S===this.statics.formats(this.domNode))){var R=this.newlineIndex(p);if(!(R<0||R>=p+b)){var D=this.newlineIndex(p,!0)+1,F=R-D+1,Z=this.isolate(D,F),j=Z.next;Z.format(w,S),j instanceof x&&j.formatAt(0,p-D+b-F,w,S)}}}},{key:"insertAt",value:function(p,b,w){if(w==null){var S=this.descendant(r.default,p),R=k(S,2),D=R[0],F=R[1];D.insertAt(F,b)}}},{key:"length",value:function(){var p=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
`)?p:p+1}},{key:"newlineIndex",value:function(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(b)return this.domNode.textContent.slice(0,p).lastIndexOf(`
`);var w=this.domNode.textContent.slice(p).indexOf(`
`);return w>-1?p+w:-1}},{key:"optimize",value:function(p){this.domNode.textContent.endsWith(`
`)||this.appendChild(o.default.create("text",`
`)),g(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,p);var b=this.next;b!=null&&b.prev===this&&b.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===b.statics.formats(b.domNode)&&(b.optimize(p),b.moveChildren(this),b.remove())}},{key:"replace",value:function(p){g(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,p),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(b){var w=o.default.find(b);w==null?b.parentNode.removeChild(b):w instanceof o.default.Embed?w.remove():w.unwrap()})}}],[{key:"create",value:function(p){var b=g(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,p);return b.setAttribute("spellcheck",!1),b}},{key:"formats",value:function(){return!0}}]),x}(e.default);E.blotName="code-block",E.tagName="PRE",E.TAB=" ",c.Code=A,c.default=E},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},O=function(){function j(M,N){var q=[],I=!0,H=!1,B=void 0;try{for(var P=M[Symbol.iterator](),C;!(I=(C=P.next()).done)&&(q.push(C.value),!(N&&q.length===N));I=!0);}catch(U){H=!0,B=U}finally{try{!I&&P.return&&P.return()}finally{if(H)throw B}}return q}return function(M,N){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return j(M,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(){function j(M,N){for(var q=0;q<N.length;q++){var I=N[q];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(M,I.key,I)}}return function(M,N,q){return N&&j(M.prototype,N),q&&j(M,q),M}}(),y=s(2),v=b(y),d=s(20),o=b(d),t=s(0),e=b(t),u=s(13),l=b(u),a=s(24),r=b(a),i=s(4),f=b(i),n=s(16),h=b(n),A=s(21),E=b(A),T=s(11),x=b(T),_=s(3),p=b(_);function b(j){return j&&j.__esModule?j:{default:j}}function w(j,M,N){return M in j?Object.defineProperty(j,M,{value:N,enumerable:!0,configurable:!0,writable:!0}):j[M]=N,j}function S(j,M){if(!(j instanceof M))throw new TypeError("Cannot call a class as a function")}var R=/^[ -~]*$/,D=function(){function j(M){S(this,j),this.scroll=M,this.delta=this.getDelta()}return g(j,[{key:"applyDelta",value:function(N){var q=this,I=!1;this.scroll.update();var H=this.scroll.length();return this.scroll.batchStart(),N=Z(N),N.reduce(function(B,P){var C=P.retain||P.delete||P.insert.length||1,U=P.attributes||{};if(P.insert!=null){if(typeof P.insert=="string"){var $=P.insert;$.endsWith(`
`)&&I&&(I=!1,$=$.slice(0,-1)),B>=H&&!$.endsWith(`
`)&&(I=!0),q.scroll.insertAt(B,$);var W=q.scroll.line(B),X=O(W,2),J=X[0],tt=X[1],ot=(0,p.default)({},(0,i.bubbleFormats)(J));if(J instanceof f.default){var lt=J.descendant(e.default.Leaf,tt),ft=O(lt,1),ut=ft[0];ot=(0,p.default)(ot,(0,i.bubbleFormats)(ut))}U=o.default.attributes.diff(ot,U)||{}}else if(k(P.insert)==="object"){var V=Object.keys(P.insert)[0];if(V==null)return B;q.scroll.insertAt(B,V,P.insert[V])}H+=C}return Object.keys(U).forEach(function(K){q.scroll.formatAt(B,C,K,U[K])}),B+C},0),N.reduce(function(B,P){return typeof P.delete=="number"?(q.scroll.deleteAt(B,P.delete),B):B+(P.retain||P.insert.length||1)},0),this.scroll.batchEnd(),this.update(N)}},{key:"deleteText",value:function(N,q){return this.scroll.deleteAt(N,q),this.update(new v.default().retain(N).delete(q))}},{key:"formatLine",value:function(N,q){var I=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(H).forEach(function(B){if(!(I.scroll.whitelist!=null&&!I.scroll.whitelist[B])){var P=I.scroll.lines(N,Math.max(q,1)),C=q;P.forEach(function(U){var $=U.length();if(!(U instanceof l.default))U.format(B,H[B]);else{var W=N-U.offset(I.scroll),X=U.newlineIndex(W+C)-W+1;U.formatAt(W,X,B,H[B])}C-=$})}}),this.scroll.optimize(),this.update(new v.default().retain(N).retain(q,(0,E.default)(H)))}},{key:"formatText",value:function(N,q){var I=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(H).forEach(function(B){I.scroll.formatAt(N,q,B,H[B])}),this.update(new v.default().retain(N).retain(q,(0,E.default)(H)))}},{key:"getContents",value:function(N,q){return this.delta.slice(N,N+q)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(N,q){return N.concat(q.delta())},new v.default)}},{key:"getFormat",value:function(N){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=[],H=[];q===0?this.scroll.path(N).forEach(function(P){var C=O(P,1),U=C[0];U instanceof f.default?I.push(U):U instanceof e.default.Leaf&&H.push(U)}):(I=this.scroll.lines(N,q),H=this.scroll.descendants(e.default.Leaf,N,q));var B=[I,H].map(function(P){if(P.length===0)return{};for(var C=(0,i.bubbleFormats)(P.shift());Object.keys(C).length>0;){var U=P.shift();if(U==null)return C;C=F((0,i.bubbleFormats)(U),C)}return C});return p.default.apply(p.default,B)}},{key:"getText",value:function(N,q){return this.getContents(N,q).filter(function(I){return typeof I.insert=="string"}).map(function(I){return I.insert}).join("")}},{key:"insertEmbed",value:function(N,q,I){return this.scroll.insertAt(N,q,I),this.update(new v.default().retain(N).insert(w({},q,I)))}},{key:"insertText",value:function(N,q){var I=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return q=q.replace(/\r\n/g,`
`).replace(/\r/g,`
`),this.scroll.insertAt(N,q),Object.keys(H).forEach(function(B){I.scroll.formatAt(N,q.length,B,H[B])}),this.update(new v.default().retain(N).insert(q,(0,E.default)(H)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var N=this.scroll.children.head;return N.statics.blotName!==f.default.blotName||N.children.length>1?!1:N.children.head instanceof h.default}},{key:"removeFormat",value:function(N,q){var I=this.getText(N,q),H=this.scroll.line(N+q),B=O(H,2),P=B[0],C=B[1],U=0,$=new v.default;P!=null&&(P instanceof l.default?U=P.newlineIndex(C)-C+1:U=P.length()-C,$=P.delta().slice(C,C+U-1).insert(`
`));var W=this.getContents(N,q+U),X=W.diff(new v.default().insert(I).concat($)),J=new v.default().retain(N).concat(X);return this.applyDelta(J)}},{key:"update",value:function(N){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,H=this.delta;if(q.length===1&&q[0].type==="characterData"&&q[0].target.data.match(R)&&e.default.find(q[0].target)){var B=e.default.find(q[0].target),P=(0,i.bubbleFormats)(B),C=B.offset(this.scroll),U=q[0].oldValue.replace(r.default.CONTENTS,""),$=new v.default().insert(U),W=new v.default().insert(B.value()),X=new v.default().retain(C).concat($.diff(W,I));N=X.reduce(function(J,tt){return tt.insert?J.insert(tt.insert,P):J.push(tt)},new v.default),this.delta=H.compose(N)}else this.delta=this.getDelta(),(!N||!(0,x.default)(H.compose(N),this.delta))&&(N=H.diff(this.delta,I));return N}}]),j}();function F(j,M){return Object.keys(M).reduce(function(N,q){return j[q]==null||(M[q]===j[q]?N[q]=M[q]:Array.isArray(M[q])?M[q].indexOf(j[q])<0&&(N[q]=M[q].concat([j[q]])):N[q]=[M[q],j[q]]),N},{})}function Z(j){return j.reduce(function(M,N){if(N.insert===1){var q=(0,E.default)(N.attributes);return delete q.image,M.insert({image:N.attributes.image},q)}if(N.attributes!=null&&(N.attributes.list===!0||N.attributes.bullet===!0)&&(N=(0,E.default)(N),N.attributes.list?N.attributes.list="ordered":(N.attributes.list="bullet",delete N.attributes.bullet)),typeof N.insert=="string"){var I=N.insert.replace(/\r\n/g,`
`).replace(/\r/g,`
`);return M.insert(I,N.attributes)}return M.push(N)},new v.default)}c.default=D},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.Range=void 0;var k=function(){function T(x,_){var p=[],b=!0,w=!1,S=void 0;try{for(var R=x[Symbol.iterator](),D;!(b=(D=R.next()).done)&&(p.push(D.value),!(_&&p.length===_));b=!0);}catch(F){w=!0,S=F}finally{try{!b&&R.return&&R.return()}finally{if(w)throw S}}return p}return function(x,_){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function T(x,_){for(var p=0;p<_.length;p++){var b=_[p];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,_,p){return _&&T(x.prototype,_),p&&T(x,p),x}}(),g=s(0),y=r(g),v=s(21),d=r(v),o=s(11),t=r(o),e=s(8),u=r(e),l=s(10),a=r(l);function r(T){return T&&T.__esModule?T:{default:T}}function i(T){if(Array.isArray(T)){for(var x=0,_=Array(T.length);x<T.length;x++)_[x]=T[x];return _}else return Array.from(T)}function f(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}var n=(0,a.default)("quill:selection"),h=function T(x){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;f(this,T),this.index=x,this.length=_},A=function(){function T(x,_){var p=this;f(this,T),this.emitter=_,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){p.mouseDown||setTimeout(p.update.bind(p,u.default.sources.USER),1)}),this.emitter.on(u.default.events.EDITOR_CHANGE,function(b,w){b===u.default.events.TEXT_CHANGE&&w.length()>0&&p.update(u.default.sources.SILENT)}),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,function(){if(p.hasFocus()){var b=p.getNativeRange();b!=null&&b.start.node!==p.cursor.textNode&&p.emitter.once(u.default.events.SCROLL_UPDATE,function(){try{p.setNativeRange(b.start.node,b.start.offset,b.end.node,b.end.offset)}catch{}})}}),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,function(b,w){if(w.range){var S=w.range,R=S.startNode,D=S.startOffset,F=S.endNode,Z=S.endOffset;p.setNativeRange(R,D,F,Z)}}),this.update(u.default.sources.SILENT)}return O(T,[{key:"handleComposition",value:function(){var _=this;this.root.addEventListener("compositionstart",function(){_.composing=!0}),this.root.addEventListener("compositionend",function(){if(_.composing=!1,_.cursor.parent){var p=_.cursor.restore();if(!p)return;setTimeout(function(){_.setNativeRange(p.startNode,p.startOffset,p.endNode,p.endOffset)},1)}})}},{key:"handleDragging",value:function(){var _=this;this.emitter.listenDOM("mousedown",document.body,function(){_.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){_.mouseDown=!1,_.update(u.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(_,p){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[_])){this.scroll.update();var b=this.getNativeRange();if(!(b==null||!b.native.collapsed||y.default.query(_,y.default.Scope.BLOCK))){if(b.start.node!==this.cursor.textNode){var w=y.default.find(b.start.node,!1);if(w==null)return;if(w instanceof y.default.Leaf){var S=w.split(b.start.offset);w.parent.insertBefore(this.cursor,S)}else w.insertBefore(this.cursor,b.start.node);this.cursor.attach()}this.cursor.format(_,p),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(_){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=this.scroll.length();_=Math.min(_,b-1),p=Math.min(_+p,b-1)-_;var w=void 0,S=this.scroll.leaf(_),R=k(S,2),D=R[0],F=R[1];if(D==null)return null;var Z=D.position(F,!0),j=k(Z,2);w=j[0],F=j[1];var M=document.createRange();if(p>0){M.setStart(w,F);var N=this.scroll.leaf(_+p),q=k(N,2);if(D=q[0],F=q[1],D==null)return null;var I=D.position(F,!0),H=k(I,2);return w=H[0],F=H[1],M.setEnd(w,F),M.getBoundingClientRect()}else{var B="left",P=void 0;return w instanceof Text?(F<w.data.length?(M.setStart(w,F),M.setEnd(w,F+1)):(M.setStart(w,F-1),M.setEnd(w,F),B="right"),P=M.getBoundingClientRect()):(P=D.domNode.getBoundingClientRect(),F>0&&(B="right")),{bottom:P.top+P.height,height:P.height,left:P[B],right:P[B],top:P.top,width:0}}}},{key:"getNativeRange",value:function(){var _=document.getSelection();if(_==null||_.rangeCount<=0)return null;var p=_.getRangeAt(0);if(p==null)return null;var b=this.normalizeNative(p);return n.info("getNativeRange",b),b}},{key:"getRange",value:function(){var _=this.getNativeRange();if(_==null)return[null,null];var p=this.normalizedToRange(_);return[p,_]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(_){var p=this,b=[[_.start.node,_.start.offset]];_.native.collapsed||b.push([_.end.node,_.end.offset]);var w=b.map(function(D){var F=k(D,2),Z=F[0],j=F[1],M=y.default.find(Z,!0),N=M.offset(p.scroll);return j===0?N:M instanceof y.default.Container?N+M.length():N+M.index(Z,j)}),S=Math.min(Math.max.apply(Math,i(w)),this.scroll.length()-1),R=Math.min.apply(Math,[S].concat(i(w)));return new h(R,S-R)}},{key:"normalizeNative",value:function(_){if(!E(this.root,_.startContainer)||!_.collapsed&&!E(this.root,_.endContainer))return null;var p={start:{node:_.startContainer,offset:_.startOffset},end:{node:_.endContainer,offset:_.endOffset},native:_};return[p.start,p.end].forEach(function(b){for(var w=b.node,S=b.offset;!(w instanceof Text)&&w.childNodes.length>0;)if(w.childNodes.length>S)w=w.childNodes[S],S=0;else if(w.childNodes.length===S)w=w.lastChild,S=w instanceof Text?w.data.length:w.childNodes.length+1;else break;b.node=w,b.offset=S}),p}},{key:"rangeToNative",value:function(_){var p=this,b=_.collapsed?[_.index]:[_.index,_.index+_.length],w=[],S=this.scroll.length();return b.forEach(function(R,D){R=Math.min(S-1,R);var F=void 0,Z=p.scroll.leaf(R),j=k(Z,2),M=j[0],N=j[1],q=M.position(N,D!==0),I=k(q,2);F=I[0],N=I[1],w.push(F,N)}),w.length<2&&(w=w.concat(w)),w}},{key:"scrollIntoView",value:function(_){var p=this.lastRange;if(p!=null){var b=this.getBounds(p.index,p.length);if(b!=null){var w=this.scroll.length()-1,S=this.scroll.line(Math.min(p.index,w)),R=k(S,1),D=R[0],F=D;if(p.length>0){var Z=this.scroll.line(Math.min(p.index+p.length,w)),j=k(Z,1);F=j[0]}if(!(D==null||F==null)){var M=_.getBoundingClientRect();b.top<M.top?_.scrollTop-=M.top-b.top:b.bottom>M.bottom&&(_.scrollTop+=b.bottom-M.bottom)}}}}},{key:"setNativeRange",value:function(_,p){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p,S=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",_,p,b,w),!(_!=null&&(this.root.parentNode==null||_.parentNode==null||b.parentNode==null))){var R=document.getSelection();if(R!=null)if(_!=null){this.hasFocus()||this.root.focus();var D=(this.getNativeRange()||{}).native;if(D==null||S||_!==D.startContainer||p!==D.startOffset||b!==D.endContainer||w!==D.endOffset){_.tagName=="BR"&&(p=[].indexOf.call(_.parentNode.childNodes,_),_=_.parentNode),b.tagName=="BR"&&(w=[].indexOf.call(b.parentNode.childNodes,b),b=b.parentNode);var F=document.createRange();F.setStart(_,p),F.setEnd(b,w),R.removeAllRanges(),R.addRange(F)}}else R.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(_){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;if(typeof p=="string"&&(b=p,p=!1),n.info("setRange",_),_!=null){var w=this.rangeToNative(_);this.setNativeRange.apply(this,i(w).concat([p]))}else this.setNativeRange(null);this.update(b)}},{key:"update",value:function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u.default.sources.USER,p=this.lastRange,b=this.getRange(),w=k(b,2),S=w[0],R=w[1];if(this.lastRange=S,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,t.default)(p,this.lastRange)){var D;!this.composing&&R!=null&&R.native.collapsed&&R.start.node!==this.cursor.textNode&&this.cursor.restore();var F=[u.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(p),_];if((D=this.emitter).emit.apply(D,[u.default.events.EDITOR_CHANGE].concat(F)),_!==u.default.sources.SILENT){var Z;(Z=this.emitter).emit.apply(Z,F)}}}}]),T}();function E(T,x){try{x.parentNode}catch{return!1}return x instanceof Text&&(x=x.parentNode),T.contains(x)}c.Range=h,c.default=A},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function u(l,a){for(var r=0;r<a.length;r++){var i=a[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,a,r){return a&&u(l.prototype,a),r&&u(l,r),l}}(),O=function u(l,a,r){l===null&&(l=Function.prototype);var i=Object.getOwnPropertyDescriptor(l,a);if(i===void 0){var f=Object.getPrototypeOf(l);return f===null?void 0:u(f,a,r)}else{if("value"in i)return i.value;var n=i.get;return n===void 0?void 0:n.call(r)}},g=s(0),y=v(g);function v(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function o(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function t(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var e=function(u){t(l,u);function l(){return d(this,l),o(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return k(l,[{key:"insertInto",value:function(r,i){r.children.length===0?O(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"insertInto",this).call(this,r,i):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),l}(y.default.Embed);e.blotName="break",e.tagName="BR",c.default=e},function(m,c,s){var k=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var u in e)e.hasOwnProperty(u)&&(t[u]=e[u])};return function(t,e){o(t,e);function u(){this.constructor=t}t.prototype=e===null?Object.create(e):(u.prototype=e.prototype,new u)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(44),g=s(30),y=s(1),v=function(o){k(t,o);function t(e){var u=o.call(this,e)||this;return u.build(),u}return t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){o.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new O.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(u){try{var l=d(u);e.insertBefore(l,e.children.head||void 0)}catch(a){if(a instanceof y.ParchmentError)return;throw a}})},t.prototype.deleteAt=function(e,u){if(e===0&&u===this.length())return this.remove();this.children.forEachAt(e,u,function(l,a,r){l.deleteAt(a,r)})},t.prototype.descendant=function(e,u){var l=this.children.find(u),a=l[0],r=l[1];return e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e?[a,r]:a instanceof t?a.descendant(e,r):[null,-1]},t.prototype.descendants=function(e,u,l){u===void 0&&(u=0),l===void 0&&(l=Number.MAX_VALUE);var a=[],r=l;return this.children.forEachAt(u,l,function(i,f,n){(e.blotName==null&&e(i)||e.blotName!=null&&i instanceof e)&&a.push(i),i instanceof t&&(a=a.concat(i.descendants(e,f,r))),r-=n}),a},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),o.prototype.detach.call(this)},t.prototype.formatAt=function(e,u,l,a){this.children.forEachAt(e,u,function(r,i,f){r.formatAt(i,f,l,a)})},t.prototype.insertAt=function(e,u,l){var a=this.children.find(e),r=a[0],i=a[1];if(r)r.insertAt(i,u,l);else{var f=l==null?y.create("text",u):y.create(u,l);this.appendChild(f)}},t.prototype.insertBefore=function(e,u){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(l){return e instanceof l}))throw new y.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,u)},t.prototype.length=function(){return this.children.reduce(function(e,u){return e+u.length()},0)},t.prototype.moveChildren=function(e,u){this.children.forEach(function(l){e.insertBefore(l,u)})},t.prototype.optimize=function(e){if(o.prototype.optimize.call(this,e),this.children.length===0)if(this.statics.defaultChild!=null){var u=y.create(this.statics.defaultChild);this.appendChild(u),u.optimize(e)}else this.remove()},t.prototype.path=function(e,u){u===void 0&&(u=!1);var l=this.children.find(e,u),a=l[0],r=l[1],i=[[this,e]];return a instanceof t?i.concat(a.path(r,u)):(a!=null&&i.push([a,r]),i)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(e){e instanceof t&&e.moveChildren(this),o.prototype.replace.call(this,e)},t.prototype.split=function(e,u){if(u===void 0&&(u=!1),!u){if(e===0)return this;if(e===this.length())return this.next}var l=this.clone();return this.parent.insertBefore(l,this.next),this.children.forEachAt(e,this.length(),function(a,r,i){a=a.split(r,u),l.appendChild(a)}),l},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,u){var l=this,a=[],r=[];e.forEach(function(i){i.target===l.domNode&&i.type==="childList"&&(a.push.apply(a,i.addedNodes),r.push.apply(r,i.removedNodes))}),r.forEach(function(i){if(!(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var f=y.find(i);f!=null&&(f.domNode.parentNode==null||f.domNode.parentNode===l.domNode)&&f.detach()}}),a.filter(function(i){return i.parentNode==l.domNode}).sort(function(i,f){return i===f?0:i.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(i){var f=null;i.nextSibling!=null&&(f=y.find(i.nextSibling));var n=d(i);(n.next!=f||n.next==null)&&(n.parent!=null&&n.parent.removeChild(l),l.insertBefore(n,f||void 0))})},t}(g.default);function d(o){var t=y.find(o);if(t==null)try{t=y.create(o)}catch{t=y.create(y.Scope.INLINE),[].slice.call(o.childNodes).forEach(function(u){t.domNode.appendChild(u)}),o.parentNode&&o.parentNode.replaceChild(t.domNode,o),t.attach()}return t}c.default=v},function(m,c,s){var k=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var u in e)e.hasOwnProperty(u)&&(t[u]=e[u])};return function(t,e){o(t,e);function u(){this.constructor=t}t.prototype=e===null?Object.create(e):(u.prototype=e.prototype,new u)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(12),g=s(31),y=s(17),v=s(1),d=function(o){k(t,o);function t(e){var u=o.call(this,e)||this;return u.attributes=new g.default(u.domNode),u}return t.formats=function(e){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()},t.prototype.format=function(e,u){var l=v.query(e);l instanceof O.default?this.attributes.attribute(l,u):u&&l!=null&&(e!==this.statics.blotName||this.formats()[e]!==u)&&this.replaceWith(e,u)},t.prototype.formats=function(){var e=this.attributes.values(),u=this.statics.formats(this.domNode);return u!=null&&(e[this.statics.blotName]=u),e},t.prototype.replaceWith=function(e,u){var l=o.prototype.replaceWith.call(this,e,u);return this.attributes.copy(l),l},t.prototype.update=function(e,u){var l=this;o.prototype.update.call(this,e,u),e.some(function(a){return a.target===l.domNode&&a.type==="attributes"})&&this.attributes.build()},t.prototype.wrap=function(e,u){var l=o.prototype.wrap.call(this,e,u);return l instanceof t&&l.statics.scope===this.statics.scope&&this.attributes.move(l),l},t}(y.default);c.default=d},function(m,c,s){var k=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,o){d.__proto__=o}||function(d,o){for(var t in o)o.hasOwnProperty(t)&&(d[t]=o[t])};return function(d,o){v(d,o);function t(){this.constructor=d}d.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(30),g=s(1),y=function(v){k(d,v);function d(){return v!==null&&v.apply(this,arguments)||this}return d.value=function(o){return!0},d.prototype.index=function(o,t){return this.domNode===o||this.domNode.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},d.prototype.position=function(o,t){var e=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return o>0&&(e+=1),[this.parent.domNode,e]},d.prototype.value=function(){var o;return o={},o[this.statics.blotName]=this.statics.value(this.domNode)||!0,o},d.scope=g.Scope.INLINE_BLOT,d}(O.default);c.default=y},function(m,c,s){var k=s(11),O=s(3),g={attributes:{compose:function(v,d,o){typeof v!="object"&&(v={}),typeof d!="object"&&(d={});var t=O(!0,{},d);o||(t=Object.keys(t).reduce(function(u,l){return t[l]!=null&&(u[l]=t[l]),u},{}));for(var e in v)v[e]!==void 0&&d[e]===void 0&&(t[e]=v[e]);return Object.keys(t).length>0?t:void 0},diff:function(v,d){typeof v!="object"&&(v={}),typeof d!="object"&&(d={});var o=Object.keys(v).concat(Object.keys(d)).reduce(function(t,e){return k(v[e],d[e])||(t[e]=d[e]===void 0?null:d[e]),t},{});return Object.keys(o).length>0?o:void 0},transform:function(v,d,o){if(typeof v!="object")return d;if(typeof d=="object"){if(!o)return d;var t=Object.keys(d).reduce(function(e,u){return v[u]===void 0&&(e[u]=d[u]),e},{});return Object.keys(t).length>0?t:void 0}}},iterator:function(v){return new y(v)},length:function(v){return typeof v.delete=="number"?v.delete:typeof v.retain=="number"?v.retain:typeof v.insert=="string"?v.insert.length:1}};function y(v){this.ops=v,this.index=0,this.offset=0}y.prototype.hasNext=function(){return this.peekLength()<1/0},y.prototype.next=function(v){v||(v=1/0);var d=this.ops[this.index];if(d){var o=this.offset,t=g.length(d);if(v>=t-o?(v=t-o,this.index+=1,this.offset=0):this.offset+=v,typeof d.delete=="number")return{delete:v};var e={};return d.attributes&&(e.attributes=d.attributes),typeof d.retain=="number"?e.retain=v:typeof d.insert=="string"?e.insert=d.insert.substr(o,v):e.insert=d.insert,e}else return{retain:1/0}},y.prototype.peek=function(){return this.ops[this.index]},y.prototype.peekLength=function(){return this.ops[this.index]?g.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 v=this.offset,d=this.index,o=this.next(),t=this.ops.slice(this.index);return this.offset=v,this.index=d,[o].concat(t)}else return[]},m.exports=g},function(m,c){var s=function(){function k(l,a){return a!=null&&l instanceof a}var O;try{O=Map}catch{O=function(){}}var g;try{g=Set}catch{g=function(){}}var y;try{y=Promise}catch{y=function(){}}function v(l,a,r,i,f){typeof a=="object"&&(r=a.depth,i=a.prototype,f=a.includeNonEnumerable,a=a.circular);var n=[],h=[],A=typeof Buffer<"u";typeof a>"u"&&(a=!0),typeof r>"u"&&(r=1/0);function E(T,x){if(T===null)return null;if(x===0)return T;var _,p;if(typeof T!="object")return T;if(k(T,O))_=new O;else if(k(T,g))_=new g;else if(k(T,y))_=new y(function(M,N){T.then(function(q){M(E(q,x-1))},function(q){N(E(q,x-1))})});else if(v.__isArray(T))_=[];else if(v.__isRegExp(T))_=new RegExp(T.source,u(T)),T.lastIndex&&(_.lastIndex=T.lastIndex);else if(v.__isDate(T))_=new Date(T.getTime());else{if(A&&Buffer.isBuffer(T))return Buffer.allocUnsafe?_=Buffer.allocUnsafe(T.length):_=new Buffer(T.length),T.copy(_),_;k(T,Error)?_=Object.create(T):typeof i>"u"?(p=Object.getPrototypeOf(T),_=Object.create(p)):(_=Object.create(i),p=i)}if(a){var b=n.indexOf(T);if(b!=-1)return h[b];n.push(T),h.push(_)}k(T,O)&&T.forEach(function(M,N){var q=E(N,x-1),I=E(M,x-1);_.set(q,I)}),k(T,g)&&T.forEach(function(M){var N=E(M,x-1);_.add(N)});for(var w in T){var S;p&&(S=Object.getOwnPropertyDescriptor(p,w)),!(S&&S.set==null)&&(_[w]=E(T[w],x-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(T),w=0;w<R.length;w++){var D=R[w],F=Object.getOwnPropertyDescriptor(T,D);F&&!F.enumerable&&!f||(_[D]=E(T[D],x-1),F.enumerable||Object.defineProperty(_,D,{enumerable:!1}))}if(f)for(var Z=Object.getOwnPropertyNames(T),w=0;w<Z.length;w++){var j=Z[w],F=Object.getOwnPropertyDescriptor(T,j);F&&F.enumerable||(_[j]=E(T[j],x-1),Object.defineProperty(_,j,{enumerable:!1}))}return _}return E(l,r)}v.clonePrototype=function(a){if(a===null)return null;var r=function(){};return r.prototype=a,new r};function d(l){return Object.prototype.toString.call(l)}v.__objToStr=d;function o(l){return typeof l=="object"&&d(l)==="[object Date]"}v.__isDate=o;function t(l){return typeof l=="object"&&d(l)==="[object Array]"}v.__isArray=t;function e(l){return typeof l=="object"&&d(l)==="[object RegExp]"}v.__isRegExp=e;function u(l){var a="";return l.global&&(a+="g"),l.ignoreCase&&(a+="i"),l.multiline&&(a+="m"),a}return v.__getRegExpFlags=u,v}();typeof m=="object"&&m.exports&&(m.exports=s)},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function _(p,b){var w=[],S=!0,R=!1,D=void 0;try{for(var F=p[Symbol.iterator](),Z;!(S=(Z=F.next()).done)&&(w.push(Z.value),!(b&&w.length===b));S=!0);}catch(j){R=!0,D=j}finally{try{!S&&F.return&&F.return()}finally{if(R)throw D}}return w}return function(p,b){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return _(p,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function _(p,b){for(var w=0;w<b.length;w++){var S=b[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,b,w){return b&&_(p.prototype,b),w&&_(p,w),p}}(),g=function _(p,b,w){p===null&&(p=Function.prototype);var S=Object.getOwnPropertyDescriptor(p,b);if(S===void 0){var R=Object.getPrototypeOf(p);return R===null?void 0:_(R,b,w)}else{if("value"in S)return S.value;var D=S.get;return D===void 0?void 0:D.call(w)}},y=s(0),v=n(y),d=s(8),o=n(d),t=s(4),e=n(t),u=s(16),l=n(u),a=s(13),r=n(a),i=s(25),f=n(i);function n(_){return _&&_.__esModule?_:{default:_}}function h(_,p){if(!(_ instanceof p))throw new TypeError("Cannot call a class as a function")}function A(_,p){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:_}function E(_,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);_.prototype=Object.create(p&&p.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(_,p):_.__proto__=p)}function T(_){return _ instanceof e.default||_ instanceof t.BlockEmbed}var x=function(_){E(p,_);function p(b,w){h(this,p);var S=A(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,b));return S.emitter=w.emitter,Array.isArray(w.whitelist)&&(S.whitelist=w.whitelist.reduce(function(R,D){return R[D]=!0,R},{})),S.domNode.addEventListener("DOMNodeInserted",function(){}),S.optimize(),S.enable(),S}return O(p,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(w,S){var R=this.line(w),D=k(R,2),F=D[0],Z=D[1],j=this.line(w+S),M=k(j,1),N=M[0];if(g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"deleteAt",this).call(this,w,S),N!=null&&F!==N&&Z>0){if(F instanceof t.BlockEmbed||N instanceof t.BlockEmbed){this.optimize();return}if(F instanceof r.default){var q=F.newlineIndex(F.length(),!0);if(q>-1&&(F=F.split(q+1),F===N)){this.optimize();return}}else if(N instanceof r.default){var I=N.newlineIndex(0);I>-1&&N.split(I+1)}var H=N.children.head instanceof l.default?null:N.children.head;F.moveChildren(N,H),F.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,S,R,D){this.whitelist!=null&&!this.whitelist[R]||(g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"formatAt",this).call(this,w,S,R,D),this.optimize())}},{key:"insertAt",value:function(w,S,R){if(!(R!=null&&this.whitelist!=null&&!this.whitelist[S])){if(w>=this.length())if(R==null||v.default.query(S,v.default.Scope.BLOCK)==null){var D=v.default.create(this.statics.defaultChild);this.appendChild(D),R==null&&S.endsWith(`
`)&&(S=S.slice(0,-1)),D.insertAt(0,S,R)}else{var F=v.default.create(S,R);this.appendChild(F)}else g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertAt",this).call(this,w,S,R);this.optimize()}}},{key:"insertBefore",value:function(w,S){if(w.statics.scope===v.default.Scope.INLINE_BLOT){var R=v.default.create(this.statics.defaultChild);R.appendChild(w),w=R}g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertBefore",this).call(this,w,S)}},{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(T,w)}},{key:"lines",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,R=function D(F,Z,j){var M=[],N=j;return F.children.forEachAt(Z,j,function(q,I,H){T(q)?M.push(q):q instanceof v.default.Container&&(M=M.concat(D(q,I,N))),N-=H}),M};return R(this,w,S)}},{key:"optimize",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,w,S),w.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,w,S))}},{key:"path",value:function(w){return g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"path",this).call(this,w).slice(1)}},{key:"update",value:function(w){if(this.batch!==!0){var S=o.default.sources.USER;typeof w=="string"&&(S=w),Array.isArray(w)||(w=this.observer.takeRecords()),w.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,S,w),g(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"update",this).call(this,w.concat([])),w.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,S,w)}}}]),p}(v.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[e.default,t.BlockEmbed,f.default],c.default=x},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.SHORTKEY=c.default=void 0;var k=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},O=function(){function P(C,U){var $=[],W=!0,X=!1,J=void 0;try{for(var tt=C[Symbol.iterator](),ot;!(W=(ot=tt.next()).done)&&($.push(ot.value),!(U&&$.length===U));W=!0);}catch(lt){X=!0,J=lt}finally{try{!W&&tt.return&&tt.return()}finally{if(X)throw J}}return $}return function(C,U){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return P(C,U);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(){function P(C,U){for(var $=0;$<U.length;$++){var W=U[$];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(C,W.key,W)}}return function(C,U,$){return U&&P(C.prototype,U),$&&P(C,$),C}}(),y=s(21),v=_(y),d=s(11),o=_(d),t=s(3),e=_(t),u=s(2),l=_(u),a=s(20),r=_(a),i=s(0),f=_(i),n=s(5),h=_(n),A=s(10),E=_(A),T=s(9),x=_(T);function _(P){return P&&P.__esModule?P:{default:P}}function p(P,C,U){return C in P?Object.defineProperty(P,C,{value:U,enumerable:!0,configurable:!0,writable:!0}):P[C]=U,P}function b(P,C){if(!(P instanceof C))throw new TypeError("Cannot call a class as a function")}function w(P,C){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:P}function S(P,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);P.prototype=Object.create(C&&C.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(P,C):P.__proto__=C)}var R=(0,E.default)("quill:keyboard"),D=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",F=function(P){S(C,P),g(C,null,[{key:"match",value:function($,W){return W=B(W),["altKey","ctrlKey","metaKey","shiftKey"].some(function(X){return!!W[X]!==$[X]&&W[X]!==null})?!1:W.key===($.which||$.keyCode)}}]);function C(U,$){b(this,C);var W=w(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,U,$));return W.bindings={},Object.keys(W.options.bindings).forEach(function(X){X==="list autofill"&&U.scroll.whitelist!=null&&!U.scroll.whitelist.list||W.options.bindings[X]&&W.addBinding(W.options.bindings[X])}),W.addBinding({key:C.keys.ENTER,shiftKey:null},q),W.addBinding({key:C.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(W.addBinding({key:C.keys.BACKSPACE},{collapsed:!0},j),W.addBinding({key:C.keys.DELETE},{collapsed:!0},M)):(W.addBinding({key:C.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},j),W.addBinding({key:C.keys.DELETE},{collapsed:!0,suffix:/^.?$/},M)),W.addBinding({key:C.keys.BACKSPACE},{collapsed:!1},N),W.addBinding({key:C.keys.DELETE},{collapsed:!1},N),W.addBinding({key:C.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},j),W.listen(),W}return g(C,[{key:"addBinding",value:function($){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=B($);if(J==null||J.key==null)return R.warn("Attempted to add invalid keyboard binding",J);typeof W=="function"&&(W={handler:W}),typeof X=="function"&&(X={handler:X}),J=(0,e.default)(J,W,X),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var $=this;this.quill.root.addEventListener("keydown",function(W){if(!W.defaultPrevented){var X=W.which||W.keyCode,J=($.bindings[X]||[]).filter(function(st){return C.match(W,st)});if(J.length!==0){var tt=$.quill.getSelection();if(!(tt==null||!$.quill.hasFocus())){var ot=$.quill.getLine(tt.index),lt=O(ot,2),ft=lt[0],ut=lt[1],V=$.quill.getLeaf(tt.index),K=O(V,2),Y=K[0],Q=K[1],G=tt.length===0?[Y,Q]:$.quill.getLeaf(tt.index+tt.length),nt=O(G,2),rt=nt[0],it=nt[1],ct=Y instanceof f.default.Text?Y.value().slice(0,Q):"",ht=rt instanceof f.default.Text?rt.value().slice(it):"",at={collapsed:tt.length===0,empty:tt.length===0&&ft.length()<=1,format:$.quill.getFormat(tt),offset:ut,prefix:ct,suffix:ht},Rt=J.some(function(st){if(st.collapsed!=null&&st.collapsed!==at.collapsed||st.empty!=null&&st.empty!==at.empty||st.offset!=null&&st.offset!==at.offset)return!1;if(Array.isArray(st.format)){if(st.format.every(function(pt){return at.format[pt]==null}))return!1}else if(k(st.format)==="object"&&!Object.keys(st.format).every(function(pt){return st.format[pt]===!0?at.format[pt]!=null:st.format[pt]===!1?at.format[pt]==null:(0,o.default)(st.format[pt],at.format[pt])}))return!1;return st.prefix!=null&&!st.prefix.test(at.prefix)||st.suffix!=null&&!st.suffix.test(at.suffix)?!1:st.handler.call($,tt,at)!==!0});Rt&&W.preventDefault()}}}})}}]),C}(x.default);F.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},F.DEFAULTS={bindings:{bold:H("bold"),italic:H("italic"),underline:H("underline"),indent:{key:F.keys.TAB,format:["blockquote","indent","list"],handler:function(C,U){if(U.collapsed&&U.offset!==0)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:F.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(C,U){if(U.collapsed&&U.offset!==0)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:F.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(C,U){U.format.indent!=null?this.quill.format("indent","-1",h.default.sources.USER):U.format.list!=null&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":I(!0),"outdent code-block":I(!1),"remove tab":{key:F.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(C){this.quill.deleteText(C.index-1,1,h.default.sources.USER)}},tab:{key:F.keys.TAB,handler:function(C){this.quill.history.cutoff();var U=new l.default().retain(C.index).delete(C.length).insert(" ");this.quill.updateContents(U,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(C.index+1,h.default.sources.SILENT)}},"list empty enter":{key:F.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(C,U){this.quill.format("list",!1,h.default.sources.USER),U.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:F.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(C){var U=this.quill.getLine(C.index),$=O(U,2),W=$[0],X=$[1],J=(0,e.default)({},W.formats(),{list:"checked"}),tt=new l.default().retain(C.index).insert(`
`,J).retain(W.length()-X-1).retain(1,{list:"unchecked"});this.quill.updateContents(tt,h.default.sources.USER),this.quill.setSelection(C.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:F.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(C,U){var $=this.quill.getLine(C.index),W=O($,2),X=W[0],J=W[1],tt=new l.default().retain(C.index).insert(`
`,U.format).retain(X.length()-J-1).retain(1,{header:null});this.quill.updateContents(tt,h.default.sources.USER),this.quill.setSelection(C.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(C,U){var $=U.prefix.length,W=this.quill.getLine(C.index),X=O(W,2),J=X[0],tt=X[1];if(tt>$)return!0;var ot=void 0;switch(U.prefix.trim()){case"[]":case"[ ]":ot="unchecked";break;case"[x]":ot="checked";break;case"-":case"*":ot="bullet";break;default:ot="ordered"}this.quill.insertText(C.index," ",h.default.sources.USER),this.quill.history.cutoff();var lt=new l.default().retain(C.index-tt).delete($+1).retain(J.length()-2-tt).retain(1,{list:ot});this.quill.updateContents(lt,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(C.index-$,h.default.sources.SILENT)}},"code exit":{key:F.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(C){var U=this.quill.getLine(C.index),$=O(U,2),W=$[0],X=$[1],J=new l.default().retain(C.index+W.length()-X-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,h.default.sources.USER)}},"embed left":Z(F.keys.LEFT,!1),"embed left shift":Z(F.keys.LEFT,!0),"embed right":Z(F.keys.RIGHT,!1),"embed right shift":Z(F.keys.RIGHT,!0)}};function Z(P,C){var U,$=P===F.keys.LEFT?"prefix":"suffix";return U={key:P,shiftKey:C,altKey:null},p(U,$,/^$/),p(U,"handler",function(X){var J=X.index;P===F.keys.RIGHT&&(J+=X.length+1);var tt=this.quill.getLeaf(J),ot=O(tt,1),lt=ot[0];return lt instanceof f.default.Embed?(P===F.keys.LEFT?C?this.quill.setSelection(X.index-1,X.length+1,h.default.sources.USER):this.quill.setSelection(X.index-1,h.default.sources.USER):C?this.quill.setSelection(X.index,X.length+1,h.default.sources.USER):this.quill.setSelection(X.index+X.length+1,h.default.sources.USER),!1):!0}),U}function j(P,C){if(!(P.index===0||this.quill.getLength()<=1)){var U=this.quill.getLine(P.index),$=O(U,1),W=$[0],X={};if(C.offset===0){var J=this.quill.getLine(P.index-1),tt=O(J,1),ot=tt[0];if(ot!=null&&ot.length()>1){var lt=W.formats(),ft=this.quill.getFormat(P.index-1,1);X=r.default.attributes.diff(lt,ft)||{}}}var ut=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(C.prefix)?2:1;this.quill.deleteText(P.index-ut,ut,h.default.sources.USER),Object.keys(X).length>0&&this.quill.formatLine(P.index-ut,ut,X,h.default.sources.USER),this.quill.focus()}}function M(P,C){var U=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(C.suffix)?2:1;if(!(P.index>=this.quill.getLength()-U)){var $={},W=0,X=this.quill.getLine(P.index),J=O(X,1),tt=J[0];if(C.offset>=tt.length()-1){var ot=this.quill.getLine(P.index+1),lt=O(ot,1),ft=lt[0];if(ft){var ut=tt.formats(),V=this.quill.getFormat(P.index,1);$=r.default.attributes.diff(ut,V)||{},W=ft.length()}}this.quill.deleteText(P.index,U,h.default.sources.USER),Object.keys($).length>0&&this.quill.formatLine(P.index+W-1,U,$,h.default.sources.USER)}}function N(P){var C=this.quill.getLines(P),U={};if(C.length>1){var $=C[0].formats(),W=C[C.length-1].formats();U=r.default.attributes.diff(W,$)||{}}this.quill.deleteText(P,h.default.sources.USER),Object.keys(U).length>0&&this.quill.formatLine(P.index,1,U,h.default.sources.USER),this.quill.setSelection(P.index,h.default.sources.SILENT),this.quill.focus()}function q(P,C){var U=this;P.length>0&&this.quill.scroll.deleteAt(P.index,P.length);var $=Object.keys(C.format).reduce(function(W,X){return f.default.query(X,f.default.Scope.BLOCK)&&!Array.isArray(C.format[X])&&(W[X]=C.format[X]),W},{});this.quill.insertText(P.index,`
`,$,h.default.sources.USER),this.quill.setSelection(P.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(C.format).forEach(function(W){$[W]==null&&(Array.isArray(C.format[W])||W!=="link"&&U.quill.format(W,C.format[W],h.default.sources.USER))})}function I(P){return{key:F.keys.TAB,shiftKey:!P,format:{"code-block":!0},handler:function(U){var $=f.default.query("code-block"),W=U.index,X=U.length,J=this.quill.scroll.descendant($,W),tt=O(J,2),ot=tt[0],lt=tt[1];if(ot!=null){var ft=this.quill.getIndex(ot),ut=ot.newlineIndex(lt,!0)+1,V=ot.newlineIndex(ft+lt+X),K=ot.domNode.textContent.slice(ut,V).split(`
`);lt=0,K.forEach(function(Y,Q){P?(ot.insertAt(ut+lt,$.TAB),lt+=$.TAB.length,Q===0?W+=$.TAB.length:X+=$.TAB.length):Y.startsWith($.TAB)&&(ot.deleteAt(ut+lt,$.TAB.length),lt-=$.TAB.length,Q===0?W-=$.TAB.length:X-=$.TAB.length),lt+=Y.length+1}),this.quill.update(h.default.sources.USER),this.quill.setSelection(W,X,h.default.sources.SILENT)}}}}function H(P){return{key:P[0].toUpperCase(),shortKey:!0,handler:function(U,$){this.quill.format(P,!$.format[P],h.default.sources.USER)}}}function B(P){if(typeof P=="string"||typeof P=="number")return B({key:P});if((typeof P>"u"?"undefined":k(P))==="object"&&(P=(0,v.default)(P,!1)),typeof P.key=="string")if(F.keys[P.key.toUpperCase()]!=null)P.key=F.keys[P.key.toUpperCase()];else if(P.key.length===1)P.key=P.key.toUpperCase().charCodeAt(0);else return null;return P.shortKey&&(P[D]=P.shortKey,delete P.shortKey),P}c.default=F,c.SHORTKEY=D},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function r(i,f){var n=[],h=!0,A=!1,E=void 0;try{for(var T=i[Symbol.iterator](),x;!(h=(x=T.next()).done)&&(n.push(x.value),!(f&&n.length===f));h=!0);}catch(_){A=!0,E=_}finally{try{!h&&T.return&&T.return()}finally{if(A)throw E}}return n}return function(i,f){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function r(i,f,n){i===null&&(i=Function.prototype);var h=Object.getOwnPropertyDescriptor(i,f);if(h===void 0){var A=Object.getPrototypeOf(i);return A===null?void 0:r(A,f,n)}else{if("value"in h)return h.value;var E=h.get;return E===void 0?void 0:E.call(n)}},g=function(){function r(i,f){for(var n=0;n<f.length;n++){var h=f[n];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(i,h.key,h)}}return function(i,f,n){return f&&r(i.prototype,f),n&&r(i,n),i}}(),y=s(0),v=t(y),d=s(7),o=t(d);function t(r){return r&&r.__esModule?r:{default:r}}function e(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function u(r,i){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:r}function l(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);r.prototype=Object.create(i&&i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i)}var a=function(r){l(i,r),g(i,null,[{key:"value",value:function(){}}]);function i(f,n){e(this,i);var h=u(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,f));return h.selection=n,h.textNode=document.createTextNode(i.CONTENTS),h.domNode.appendChild(h.textNode),h._length=0,h}return g(i,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(n,h){if(this._length!==0)return O(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"format",this).call(this,n,h);for(var A=this,E=0;A!=null&&A.statics.scope!==v.default.Scope.BLOCK_BLOT;)E+=A.offset(A.parent),A=A.parent;A!=null&&(this._length=i.CONTENTS.length,A.optimize(),A.formatAt(E,i.CONTENTS.length,n,h),this._length=0)}},{key:"index",value:function(n,h){return n===this.textNode?0:O(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"index",this).call(this,n,h)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){O(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var n=this.textNode,h=this.selection.getNativeRange(),A=void 0,E=void 0,T=void 0;if(h!=null&&h.start.node===n&&h.end.node===n){var x=[n,h.start.offset,h.end.offset];A=x[0],E=x[1],T=x[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==i.CONTENTS){var _=this.textNode.data.split(i.CONTENTS).join("");this.next instanceof o.default?(A=this.next.domNode,this.next.insertAt(0,_),this.textNode.data=i.CONTENTS):(this.textNode.data=_,this.parent.insertBefore(v.default.create(this.textNode),this),this.textNode=document.createTextNode(i.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),E!=null){var p=[E,T].map(function(w){return Math.max(0,Math.min(A.data.length,w-1))}),b=k(p,2);return E=b[0],T=b[1],{startNode:A,startOffset:E,endNode:A,endOffset:T}}}}},{key:"update",value:function(n,h){var A=this;if(n.some(function(T){return T.type==="characterData"&&T.target===A.textNode})){var E=this.restore();E&&(h.range=E)}}},{key:"value",value:function(){return""}}]),i}(v.default.Embed);a.blotName="cursor",a.className="ql-cursor",a.tagName="span",a.CONTENTS="\uFEFF",c.default=a},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(0),O=v(k),g=s(4),y=v(g);function v(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function o(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function t(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var e=function(u){t(l,u);function l(){return d(this,l),o(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return l}(O.default.Container);e.allowedChildren=[y.default,g.BlockEmbed,e],c.default=e},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.ColorStyle=c.ColorClass=c.ColorAttributor=void 0;var k=function(){function a(r,i){for(var f=0;f<i.length;f++){var n=i[f];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}return function(r,i,f){return i&&a(r.prototype,i),f&&a(r,f),r}}(),O=function a(r,i,f){r===null&&(r=Function.prototype);var n=Object.getOwnPropertyDescriptor(r,i);if(n===void 0){var h=Object.getPrototypeOf(r);return h===null?void 0:a(h,i,f)}else{if("value"in n)return n.value;var A=n.get;return A===void 0?void 0:A.call(f)}},g=s(0),y=v(g);function v(a){return a&&a.__esModule?a:{default:a}}function d(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function o(a,r){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:a}function t(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);a.prototype=Object.create(r&&r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(a,r):a.__proto__=r)}var e=function(a){t(r,a);function r(){return d(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return k(r,[{key:"value",value:function(f){var n=O(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"value",this).call(this,f);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(h){return("00"+parseInt(h).toString(16)).slice(-2)}).join("")):n}}]),r}(y.default.Attributor.Style),u=new y.default.Attributor.Class("color","ql-color",{scope:y.default.Scope.INLINE}),l=new e("color","color",{scope:y.default.Scope.INLINE});c.ColorAttributor=e,c.ColorClass=u,c.ColorStyle=l},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.sanitize=c.default=void 0;var k=function(){function l(a,r){for(var i=0;i<r.length;i++){var f=r[i];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,r,i){return r&&l(a.prototype,r),i&&l(a,i),a}}(),O=function l(a,r,i){a===null&&(a=Function.prototype);var f=Object.getOwnPropertyDescriptor(a,r);if(f===void 0){var n=Object.getPrototypeOf(a);return n===null?void 0:l(n,r,i)}else{if("value"in f)return f.value;var h=f.get;return h===void 0?void 0:h.call(i)}},g=s(6),y=v(g);function v(l){return l&&l.__esModule?l:{default:l}}function d(l,a){if(!(l instanceof a))throw new TypeError("Cannot call a class as a function")}function o(l,a){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:l}function t(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);l.prototype=Object.create(a&&a.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(l,a):l.__proto__=a)}var e=function(l){t(a,l);function a(){return d(this,a),o(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return k(a,[{key:"format",value:function(i,f){if(i!==this.statics.blotName||!f)return O(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"format",this).call(this,i,f);f=this.constructor.sanitize(f),this.domNode.setAttribute("href",f)}}],[{key:"create",value:function(i){var f=O(a.__proto__||Object.getPrototypeOf(a),"create",this).call(this,i);return i=this.sanitize(i),f.setAttribute("href",i),f.setAttribute("rel","noopener noreferrer"),f.setAttribute("target","_blank"),f}},{key:"formats",value:function(i){return i.getAttribute("href")}},{key:"sanitize",value:function(i){return u(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}}]),a}(y.default);e.blotName="link",e.tagName="A",e.SANITIZED_URL="about:blank",e.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function u(l,a){var r=document.createElement("a");r.href=l;var i=r.href.slice(0,r.href.indexOf(":"));return a.indexOf(i)>-1}c.default=e,c.sanitize=u},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},O=function(){function a(r,i){for(var f=0;f<i.length;f++){var n=i[f];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}return function(r,i,f){return i&&a(r.prototype,i),f&&a(r,f),r}}(),g=s(23),y=o(g),v=s(107),d=o(v);function o(a){return a&&a.__esModule?a:{default:a}}function t(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}var e=0;function u(a,r){a.setAttribute(r,a.getAttribute(r)!=="true")}var l=function(){function a(r){var i=this;t(this,a),this.select=r,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){i.togglePicker()}),this.label.addEventListener("keydown",function(f){switch(f.keyCode){case y.default.keys.ENTER:i.togglePicker();break;case y.default.keys.ESCAPE:i.escape(),f.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return O(a,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(i){var f=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),i.hasAttribute("value")&&n.setAttribute("data-value",i.getAttribute("value")),i.textContent&&n.setAttribute("data-label",i.textContent),n.addEventListener("click",function(){f.selectItem(n,!0)}),n.addEventListener("keydown",function(h){switch(h.keyCode){case y.default.keys.ENTER:f.selectItem(n,!0),h.preventDefault();break;case y.default.keys.ESCAPE:f.escape(),h.preventDefault();break}}),n}},{key:"buildLabel",value:function(){var i=document.createElement("span");return i.classList.add("ql-picker-label"),i.innerHTML=d.default,i.tabIndex="0",i.setAttribute("role","button"),i.setAttribute("aria-expanded","false"),this.container.appendChild(i),i}},{key:"buildOptions",value:function(){var i=this,f=document.createElement("span");f.classList.add("ql-picker-options"),f.setAttribute("aria-hidden","true"),f.tabIndex="-1",f.id="ql-picker-options-"+e,e+=1,this.label.setAttribute("aria-controls",f.id),this.options=f,[].slice.call(this.select.options).forEach(function(n){var h=i.buildItem(n);f.appendChild(h),n.selected===!0&&i.selectItem(h)}),this.container.appendChild(f)}},{key:"buildPicker",value:function(){var i=this;[].slice.call(this.select.attributes).forEach(function(f){i.container.setAttribute(f.name,f.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var i=this;this.close(),setTimeout(function(){return i.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(i){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(i!==n&&(n!=null&&n.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(i.parentNode.children,i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),f))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":k(Event))==="object"){var h=document.createEvent("Event");h.initEvent("change",!0,!0),this.select.dispatchEvent(h)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var f=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(f)}else this.selectItem(null);var n=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),a}();c.default=l},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(0),O=R(k),g=s(5),y=R(g),v=s(4),d=R(v),o=s(16),t=R(o),e=s(25),u=R(e),l=s(24),a=R(l),r=s(35),i=R(r),f=s(6),n=R(f),h=s(22),A=R(h),E=s(7),T=R(E),x=s(55),_=R(x),p=s(42),b=R(p),w=s(23),S=R(w);function R(D){return D&&D.__esModule?D:{default:D}}y.default.register({"blots/block":d.default,"blots/block/embed":v.BlockEmbed,"blots/break":t.default,"blots/container":u.default,"blots/cursor":a.default,"blots/embed":i.default,"blots/inline":n.default,"blots/scroll":A.default,"blots/text":T.default,"modules/clipboard":_.default,"modules/history":b.default,"modules/keyboard":S.default}),O.default.register(d.default,t.default,a.default,n.default,A.default,T.default),c.default=y.default},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(1),O=function(){function g(y){this.domNode=y,this.domNode[k.DATA_KEY]={blot:this}}return Object.defineProperty(g.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),g.create=function(y){if(this.tagName==null)throw new k.ParchmentError("Blot definition missing tagName");var v;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?v=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?v=document.createElement(y):v=document.createElement(this.tagName[0])):v=document.createElement(this.tagName),this.className&&v.classList.add(this.className),v},g.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},g.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return k.create(y)},g.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[k.DATA_KEY]},g.prototype.deleteAt=function(y,v){var d=this.isolate(y,v);d.remove()},g.prototype.formatAt=function(y,v,d,o){var t=this.isolate(y,v);if(k.query(d,k.Scope.BLOT)!=null&&o)t.wrap(d,o);else if(k.query(d,k.Scope.ATTRIBUTE)!=null){var e=k.create(this.statics.scope);t.wrap(e),e.format(d,o)}},g.prototype.insertAt=function(y,v,d){var o=d==null?k.create("text",v):k.create(v,d),t=this.split(y);this.parent.insertBefore(o,t)},g.prototype.insertInto=function(y,v){v===void 0&&(v=null),this.parent!=null&&this.parent.children.remove(this);var d=null;y.children.insertBefore(this,v),v!=null&&(d=v.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=d)&&y.domNode.insertBefore(this.domNode,d),this.parent=y,this.attach()},g.prototype.isolate=function(y,v){var d=this.split(y);return d.split(v),d},g.prototype.length=function(){return 1},g.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)},g.prototype.optimize=function(y){this.domNode[k.DATA_KEY]!=null&&delete this.domNode[k.DATA_KEY].mutations},g.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},g.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},g.prototype.replaceWith=function(y,v){var d=typeof y=="string"?k.create(y,v):y;return d.replace(this),d},g.prototype.split=function(y,v){return y===0?this:this.next},g.prototype.update=function(y,v){},g.prototype.wrap=function(y,v){var d=typeof y=="string"?k.create(y,v):y;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},g.blotName="abstract",g}();c.default=O},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(12),O=s(32),g=s(33),y=s(1),v=function(){function d(o){this.attributes={},this.domNode=o,this.build()}return d.prototype.attribute=function(o,t){t?o.add(this.domNode,t)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])},d.prototype.build=function(){var o=this;this.attributes={};var t=k.default.keys(this.domNode),e=O.default.keys(this.domNode),u=g.default.keys(this.domNode);t.concat(e).concat(u).forEach(function(l){var a=y.query(l,y.Scope.ATTRIBUTE);a instanceof k.default&&(o.attributes[a.attrName]=a)})},d.prototype.copy=function(o){var t=this;Object.keys(this.attributes).forEach(function(e){var u=t.attributes[e].value(t.domNode);o.format(e,u)})},d.prototype.move=function(o){var t=this;this.copy(o),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},d.prototype.values=function(){var o=this;return Object.keys(this.attributes).reduce(function(t,e){return t[e]=o.attributes[e].value(o.domNode),t},{})},d}();c.default=v},function(m,c,s){var k=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,o){d.__proto__=o}||function(d,o){for(var t in o)o.hasOwnProperty(t)&&(d[t]=o[t])};return function(d,o){v(d,o);function t(){this.constructor=d}d.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(12);function g(v,d){var o=v.getAttribute("class")||"";return o.split(/\s+/).filter(function(t){return t.indexOf(d+"-")===0})}var y=function(v){k(d,v);function d(){return v!==null&&v.apply(this,arguments)||this}return d.keys=function(o){return(o.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},d.prototype.add=function(o,t){return this.canAdd(o,t)?(this.remove(o),o.classList.add(this.keyName+"-"+t),!0):!1},d.prototype.remove=function(o){var t=g(o,this.keyName);t.forEach(function(e){o.classList.remove(e)}),o.classList.length===0&&o.removeAttribute("class")},d.prototype.value=function(o){var t=g(o,this.keyName)[0]||"",e=t.slice(this.keyName.length+1);return this.canAdd(o,e)?e:""},d}(O.default);c.default=y},function(m,c,s){var k=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,o){d.__proto__=o}||function(d,o){for(var t in o)o.hasOwnProperty(t)&&(d[t]=o[t])};return function(d,o){v(d,o);function t(){this.constructor=d}d.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(12);function g(v){var d=v.split("-"),o=d.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return d[0]+o}var y=function(v){k(d,v);function d(){return v!==null&&v.apply(this,arguments)||this}return d.keys=function(o){return(o.getAttribute("style")||"").split(";").map(function(t){var e=t.split(":");return e[0].trim()})},d.prototype.add=function(o,t){return this.canAdd(o,t)?(o.style[g(this.keyName)]=t,!0):!1},d.prototype.remove=function(o){o.style[g(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")},d.prototype.value=function(o){var t=o.style[g(this.keyName)];return this.canAdd(o,t)?t:""},d}(O.default);c.default=y},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function y(v,d){for(var o=0;o<d.length;o++){var t=d[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(v,t.key,t)}}return function(v,d,o){return d&&y(v.prototype,d),o&&y(v,o),v}}();function O(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}var g=function(){function y(v,d){O(this,y),this.quill=v,this.options=d,this.modules={}}return k(y,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(o){d.modules[o]==null&&d.addModule(o)})}},{key:"addModule",value:function(d){var o=this.quill.constructor.import("modules/"+d);return this.modules[d]=new o(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),y}();g.DEFAULTS={modules:{}},g.themes={default:g},c.default=g},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function r(i,f){for(var n=0;n<f.length;n++){var h=f[n];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(i,h.key,h)}}return function(i,f,n){return f&&r(i.prototype,f),n&&r(i,n),i}}(),O=function r(i,f,n){i===null&&(i=Function.prototype);var h=Object.getOwnPropertyDescriptor(i,f);if(h===void 0){var A=Object.getPrototypeOf(i);return A===null?void 0:r(A,f,n)}else{if("value"in h)return h.value;var E=h.get;return E===void 0?void 0:E.call(n)}},g=s(0),y=o(g),v=s(7),d=o(v);function o(r){return r&&r.__esModule?r:{default:r}}function t(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function e(r,i){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:r}function u(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);r.prototype=Object.create(i&&i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i)}var l="\uFEFF",a=function(r){u(i,r);function i(f){t(this,i);var n=e(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,f));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(h){n.contentNode.appendChild(h)}),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return k(i,[{key:"index",value:function(n,h){return n===this.leftGuard?0:n===this.rightGuard?1:O(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"index",this).call(this,n,h)}},{key:"restore",value:function(n){var h=void 0,A=void 0,E=n.data.split(l).join("");if(n===this.leftGuard)if(this.prev instanceof d.default){var T=this.prev.length();this.prev.insertAt(T,E),h={startNode:this.prev.domNode,startOffset:T+E.length}}else A=document.createTextNode(E),this.parent.insertBefore(y.default.create(A),this),h={startNode:A,startOffset:E.length};else n===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,E),h={startNode:this.next.domNode,startOffset:E.length}):(A=document.createTextNode(E),this.parent.insertBefore(y.default.create(A),this.next),h={startNode:A,startOffset:E.length}));return n.data=l,h}},{key:"update",value:function(n,h){var A=this;n.forEach(function(E){if(E.type==="characterData"&&(E.target===A.leftGuard||E.target===A.rightGuard)){var T=A.restore(E.target);T&&(h.range=T)}})}}]),i}(y.default.Embed);c.default=a},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.AlignStyle=c.AlignClass=c.AlignAttribute=void 0;var k=s(0),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}var y={scope:O.default.Scope.BLOCK,whitelist:["right","center","justify"]},v=new O.default.Attributor.Attribute("align","align",y),d=new O.default.Attributor.Class("align","ql-align",y),o=new O.default.Attributor.Style("align","text-align",y);c.AlignAttribute=v,c.AlignClass=d,c.AlignStyle=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.BackgroundStyle=c.BackgroundClass=void 0;var k=s(0),O=y(k),g=s(26);function y(o){return o&&o.__esModule?o:{default:o}}var v=new O.default.Attributor.Class("background","ql-bg",{scope:O.default.Scope.INLINE}),d=new g.ColorAttributor("background","background-color",{scope:O.default.Scope.INLINE});c.BackgroundClass=v,c.BackgroundStyle=d},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.DirectionStyle=c.DirectionClass=c.DirectionAttribute=void 0;var k=s(0),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}var y={scope:O.default.Scope.BLOCK,whitelist:["rtl"]},v=new O.default.Attributor.Attribute("direction","dir",y),d=new O.default.Attributor.Class("direction","ql-direction",y),o=new O.default.Attributor.Style("direction","direction",y);c.DirectionAttribute=v,c.DirectionClass=d,c.DirectionStyle=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.FontClass=c.FontStyle=void 0;var k=function(){function r(i,f){for(var n=0;n<f.length;n++){var h=f[n];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(i,h.key,h)}}return function(i,f,n){return f&&r(i.prototype,f),n&&r(i,n),i}}(),O=function r(i,f,n){i===null&&(i=Function.prototype);var h=Object.getOwnPropertyDescriptor(i,f);if(h===void 0){var A=Object.getPrototypeOf(i);return A===null?void 0:r(A,f,n)}else{if("value"in h)return h.value;var E=h.get;return E===void 0?void 0:E.call(n)}},g=s(0),y=v(g);function v(r){return r&&r.__esModule?r:{default:r}}function d(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i&&(typeof i=="object"||typeof i=="function")?i:r}function t(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);r.prototype=Object.create(i&&i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i)}var e={scope:y.default.Scope.INLINE,whitelist:["serif","monospace"]},u=new y.default.Attributor.Class("font","ql-font",e),l=function(r){t(i,r);function i(){return d(this,i),o(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return k(i,[{key:"value",value:function(n){return O(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"value",this).call(this,n).replace(/["']/g,"")}}]),i}(y.default.Attributor.Style),a=new l("font","font-family",e);c.FontStyle=a,c.FontClass=u},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.SizeStyle=c.SizeClass=void 0;var k=s(0),O=g(k);function g(d){return d&&d.__esModule?d:{default:d}}var y=new O.default.Attributor.Class("size","ql-size",{scope:O.default.Scope.INLINE,whitelist:["small","large","huge"]}),v=new O.default.Attributor.Style("size","font-size",{scope:O.default.Scope.INLINE,whitelist:["10px","18px","32px"]});c.SizeClass=y,c.SizeStyle=v},function(m,c,s){m.exports={align:{"":s(76),center:s(77),right:s(78),justify:s(79)},background:s(80),blockquote:s(81),bold:s(82),clean:s(83),code:s(58),"code-block":s(58),color:s(84),direction:{"":s(85),rtl:s(86)},float:{center:s(87),full:s(88),left:s(89),right:s(90)},formula:s(91),header:{1:s(92),2:s(93)},italic:s(94),image:s(95),indent:{"+1":s(96),"-1":s(97)},link:s(98),list:{ordered:s(99),bullet:s(100),check:s(101)},script:{sub:s(102),super:s(103)},strike:s(104),underline:s(105),video:s(106)}},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.getLastChangeIndex=c.default=void 0;var k=function(){function f(n,h){for(var A=0;A<h.length;A++){var E=h[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}return function(n,h,A){return h&&f(n.prototype,h),A&&f(n,A),n}}(),O=s(0),g=t(O),y=s(5),v=t(y),d=s(9),o=t(d);function t(f){return f&&f.__esModule?f:{default:f}}function e(f,n){if(!(f instanceof n))throw new TypeError("Cannot call a class as a function")}function u(f,n){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:f}function l(f,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);f.prototype=Object.create(n&&n.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(f,n):f.__proto__=n)}var a=function(f){l(n,f);function n(h,A){e(this,n);var E=u(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,h,A));return E.lastRecorded=0,E.ignoreChange=!1,E.clear(),E.quill.on(v.default.events.EDITOR_CHANGE,function(T,x,_,p){T!==v.default.events.TEXT_CHANGE||E.ignoreChange||(!E.options.userOnly||p===v.default.sources.USER?E.record(x,_):E.transform(x))}),E.quill.keyboard.addBinding({key:"Z",shortKey:!0},E.undo.bind(E)),E.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},E.redo.bind(E)),/Win/i.test(navigator.platform)&&E.quill.keyboard.addBinding({key:"Y",shortKey:!0},E.redo.bind(E)),E}return k(n,[{key:"change",value:function(A,E){if(this.stack[A].length!==0){var T=this.stack[A].pop();this.stack[E].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[A],v.default.sources.USER),this.ignoreChange=!1;var x=i(T[A]);this.quill.setSelection(x)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(A,E){if(A.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(E),x=Date.now();if(this.lastRecorded+this.options.delay>x&&this.stack.undo.length>0){var _=this.stack.undo.pop();T=T.compose(_.undo),A=_.redo.compose(A)}else this.lastRecorded=x;this.stack.undo.push({redo:A,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(A){this.stack.undo.forEach(function(E){E.undo=A.transform(E.undo,!0),E.redo=A.transform(E.redo,!0)}),this.stack.redo.forEach(function(E){E.undo=A.transform(E.undo,!0),E.redo=A.transform(E.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(o.default);a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(f){var n=f.ops[f.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
`):n.attributes!=null?Object.keys(n.attributes).some(function(h){return g.default.query(h,g.default.Scope.BLOCK)!=null}):!1}function i(f){var n=f.reduce(function(A,E){return A+=E.delete||0,A},0),h=f.length()-n;return r(f)&&(h-=1),h}c.default=a,c.getLastChangeIndex=i},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.BaseTooltip=void 0;var k=function(){function q(I,H){for(var B=0;B<H.length;B++){var P=H[B];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(I,P.key,P)}}return function(I,H,B){return H&&q(I.prototype,H),B&&q(I,B),I}}(),O=function q(I,H,B){I===null&&(I=Function.prototype);var P=Object.getOwnPropertyDescriptor(I,H);if(P===void 0){var C=Object.getPrototypeOf(I);return C===null?void 0:q(C,H,B)}else{if("value"in P)return P.value;var U=P.get;return U===void 0?void 0:U.call(B)}},g=s(3),y=x(g),v=s(2),d=x(v),o=s(8),t=x(o),e=s(23),u=x(e),l=s(34),a=x(l),r=s(59),i=x(r),f=s(60),n=x(f),h=s(28),A=x(h),E=s(61),T=x(E);function x(q){return q&&q.__esModule?q:{default:q}}function _(q,I){if(!(q instanceof I))throw new TypeError("Cannot call a class as a function")}function p(q,I){if(!q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:q}function b(q,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);q.prototype=Object.create(I&&I.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(q,I):q.__proto__=I)}var w=[!1,"center","right","justify"],S=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],R=[!1,"serif","monospace"],D=["1","2","3",!1],F=["small",!1,"large","huge"],Z=function(q){b(I,q);function I(H,B){_(this,I);var P=p(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,H,B)),C=function U($){if(!document.body.contains(H.root))return document.body.removeEventListener("click",U);P.tooltip!=null&&!P.tooltip.root.contains($.target)&&document.activeElement!==P.tooltip.textbox&&!P.quill.hasFocus()&&P.tooltip.hide(),P.pickers!=null&&P.pickers.forEach(function(W){W.container.contains($.target)||W.close()})};return H.emitter.listenDOM("click",document.body,C),P}return k(I,[{key:"addModule",value:function(B){var P=O(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"addModule",this).call(this,B);return B==="toolbar"&&this.extendToolbar(P),P}},{key:"buildButtons",value:function(B,P){B.forEach(function(C){var U=C.getAttribute("class")||"";U.split(/\s+/).forEach(function($){if($.startsWith("ql-")&&($=$.slice(3),P[$]!=null))if($==="direction")C.innerHTML=P[$][""]+P[$].rtl;else if(typeof P[$]=="string")C.innerHTML=P[$];else{var W=C.value||"";W!=null&&P[$][W]&&(C.innerHTML=P[$][W])}})})}},{key:"buildPickers",value:function(B,P){var C=this;this.pickers=B.map(function($){if($.classList.contains("ql-align"))return $.querySelector("option")==null&&N($,w),new n.default($,P.align);if($.classList.contains("ql-background")||$.classList.contains("ql-color")){var W=$.classList.contains("ql-background")?"background":"color";return $.querySelector("option")==null&&N($,S,W==="background"?"#ffffff":"#000000"),new i.default($,P[W])}else return $.querySelector("option")==null&&($.classList.contains("ql-font")?N($,R):$.classList.contains("ql-header")?N($,D):$.classList.contains("ql-size")&&N($,F)),new A.default($)});var U=function(){C.pickers.forEach(function(W){W.update()})};this.quill.on(t.default.events.EDITOR_CHANGE,U)}}]),I}(a.default);Z.DEFAULTS=(0,y.default)(!0,{},a.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var I=this,H=this.container.querySelector("input.ql-image[type=file]");H==null&&(H=document.createElement("input"),H.setAttribute("type","file"),H.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),H.classList.add("ql-image"),H.addEventListener("change",function(){if(H.files!=null&&H.files[0]!=null){var B=new FileReader;B.onload=function(P){var C=I.quill.getSelection(!0);I.quill.updateContents(new d.default().retain(C.index).delete(C.length).insert({image:P.target.result}),t.default.sources.USER),I.quill.setSelection(C.index+1,t.default.sources.SILENT),H.value=""},B.readAsDataURL(H.files[0])}}),this.container.appendChild(H)),H.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var j=function(q){b(I,q);function I(H,B){_(this,I);var P=p(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,H,B));return P.textbox=P.root.querySelector('input[type="text"]'),P.listen(),P}return k(I,[{key:"listen",value:function(){var B=this;this.textbox.addEventListener("keydown",function(P){u.default.match(P,"enter")?(B.save(),P.preventDefault()):u.default.match(P,"escape")&&(B.cancel(),P.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var B=arguments.length>0&&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:B!==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-"+B)||""),this.root.setAttribute("data-mode",B)}},{key:"restoreFocus",value:function(){var B=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=B}},{key:"save",value:function(){var B=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",B,t.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",B,t.default.sources.USER)),this.quill.root.scrollTop=P;break}case"video":B=M(B);case"formula":{if(!B)break;var C=this.quill.getSelection(!0);if(C!=null){var U=C.index+C.length;this.quill.insertEmbed(U,this.root.getAttribute("data-mode"),B,t.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(U+1," ",t.default.sources.USER),this.quill.setSelection(U+2,t.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),I}(T.default);function M(q){var I=q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return I?(I[1]||"https")+"://www.youtube.com/embed/"+I[2]+"?showinfo=0":(I=q.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(I[1]||"https")+"://player.vimeo.com/video/"+I[2]+"/":q}function N(q,I){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;I.forEach(function(B){var P=document.createElement("option");B===H?P.setAttribute("selected","selected"):P.setAttribute("value",B),q.appendChild(P)})}c.BaseTooltip=j,c.default=Z},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function O(){this.head=this.tail=null,this.length=0}return O.prototype.append=function(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];this.insertBefore(g[0],null),g.length>1&&this.append.apply(this,g.slice(1))},O.prototype.contains=function(g){for(var y,v=this.iterator();y=v();)if(y===g)return!0;return!1},O.prototype.insertBefore=function(g,y){g&&(g.next=y,y!=null?(g.prev=y.prev,y.prev!=null&&(y.prev.next=g),y.prev=g,y===this.head&&(this.head=g)):this.tail!=null?(this.tail.next=g,g.prev=this.tail,this.tail=g):(g.prev=null,this.head=this.tail=g),this.length+=1)},O.prototype.offset=function(g){for(var y=0,v=this.head;v!=null;){if(v===g)return y;y+=v.length(),v=v.next}return-1},O.prototype.remove=function(g){this.contains(g)&&(g.prev!=null&&(g.prev.next=g.next),g.next!=null&&(g.next.prev=g.prev),g===this.head&&(this.head=g.next),g===this.tail&&(this.tail=g.prev),this.length-=1)},O.prototype.iterator=function(g){return g===void 0&&(g=this.head),function(){var y=g;return g!=null&&(g=g.next),y}},O.prototype.find=function(g,y){y===void 0&&(y=!1);for(var v,d=this.iterator();v=d();){var o=v.length();if(g<o||y&&g===o&&(v.next==null||v.next.length()!==0))return[v,g];g-=o}return[null,0]},O.prototype.forEach=function(g){for(var y,v=this.iterator();y=v();)g(y)},O.prototype.forEachAt=function(g,y,v){if(!(y<=0))for(var d=this.find(g),o=d[0],t=d[1],e,u=g-t,l=this.iterator(o);(e=l())&&u<g+y;){var a=e.length();g>u?v(e,g-u,Math.min(y,u+a-g)):v(e,0,Math.min(a,g+y-u)),u+=a}},O.prototype.map=function(g){return this.reduce(function(y,v){return y.push(g(v)),y},[])},O.prototype.reduce=function(g,y){for(var v,d=this.iterator();v=d();)y=g(y,v);return y},O}();c.default=k},function(m,c,s){var k=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var u in e)e.hasOwnProperty(u)&&(t[u]=e[u])};return function(t,e){o(t,e);function u(){this.constructor=t}t.prototype=e===null?Object.create(e):(u.prototype=e.prototype,new u)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(17),g=s(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},v=100,d=function(o){k(t,o);function t(e){var u=o.call(this,e)||this;return u.scroll=u,u.observer=new MutationObserver(function(l){u.update(l)}),u.observer.observe(u.domNode,y),u.attach(),u}return t.prototype.detach=function(){o.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(e,u){this.update(),e===0&&u===this.length()?this.children.forEach(function(l){l.remove()}):o.prototype.deleteAt.call(this,e,u)},t.prototype.formatAt=function(e,u,l,a){this.update(),o.prototype.formatAt.call(this,e,u,l,a)},t.prototype.insertAt=function(e,u,l){this.update(),o.prototype.insertAt.call(this,e,u,l)},t.prototype.optimize=function(e,u){var l=this;e===void 0&&(e=[]),u===void 0&&(u={}),o.prototype.optimize.call(this,u);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)e.push(a.pop());for(var r=function(h,A){A===void 0&&(A=!0),!(h==null||h===l)&&h.domNode.parentNode!=null&&(h.domNode[g.DATA_KEY].mutations==null&&(h.domNode[g.DATA_KEY].mutations=[]),A&&r(h.parent))},i=function(h){h.domNode[g.DATA_KEY]==null||h.domNode[g.DATA_KEY].mutations==null||(h instanceof O.default&&h.children.forEach(i),h.optimize(u))},f=e,n=0;f.length>0;n+=1){if(n>=v)throw new Error("[Parchment] Maximum optimize iterations reached");for(f.forEach(function(h){var A=g.find(h.target,!0);A!=null&&(A.domNode===h.target&&(h.type==="childList"?(r(g.find(h.previousSibling,!1)),[].forEach.call(h.addedNodes,function(E){var T=g.find(E,!1);r(T,!1),T instanceof O.default&&T.children.forEach(function(x){r(x,!1)})})):h.type==="attributes"&&r(A.prev)),r(A))}),this.children.forEach(i),f=[].slice.call(this.observer.takeRecords()),a=f.slice();a.length>0;)e.push(a.pop())}},t.prototype.update=function(e,u){var l=this;u===void 0&&(u={}),e=e||this.observer.takeRecords(),e.map(function(a){var r=g.find(a.target,!0);return r==null?null:r.domNode[g.DATA_KEY].mutations==null?(r.domNode[g.DATA_KEY].mutations=[a],r):(r.domNode[g.DATA_KEY].mutations.push(a),null)}).forEach(function(a){a==null||a===l||a.domNode[g.DATA_KEY]==null||a.update(a.domNode[g.DATA_KEY].mutations||[],u)}),this.domNode[g.DATA_KEY].mutations!=null&&o.prototype.update.call(this,this.domNode[g.DATA_KEY].mutations,u),this.optimize(e,u)},t.blotName="scroll",t.defaultChild="block",t.scope=g.Scope.BLOCK_BLOT,t.tagName="DIV",t}(O.default);c.default=d},function(m,c,s){var k=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var e in t)t.hasOwnProperty(e)&&(o[e]=t[e])};return function(o,t){d(o,t);function e(){this.constructor=o}o.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(18),g=s(1);function y(d,o){if(Object.keys(d).length!==Object.keys(o).length)return!1;for(var t in d)if(d[t]!==o[t])return!1;return!0}var v=function(d){k(o,d);function o(){return d!==null&&d.apply(this,arguments)||this}return o.formats=function(t){if(t.tagName!==o.tagName)return d.formats.call(this,t)},o.prototype.format=function(t,e){var u=this;t===this.statics.blotName&&!e?(this.children.forEach(function(l){l instanceof O.default||(l=l.wrap(o.blotName,!0)),u.attributes.copy(l)}),this.unwrap()):d.prototype.format.call(this,t,e)},o.prototype.formatAt=function(t,e,u,l){if(this.formats()[u]!=null||g.query(u,g.Scope.ATTRIBUTE)){var a=this.isolate(t,e);a.format(u,l)}else d.prototype.formatAt.call(this,t,e,u,l)},o.prototype.optimize=function(t){d.prototype.optimize.call(this,t);var e=this.formats();if(Object.keys(e).length===0)return this.unwrap();var u=this.next;u instanceof o&&u.prev===this&&y(e,u.formats())&&(u.moveChildren(this),u.remove())},o.blotName="inline",o.scope=g.Scope.INLINE_BLOT,o.tagName="SPAN",o}(O.default);c.default=v},function(m,c,s){var k=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,o){d.__proto__=o}||function(d,o){for(var t in o)o.hasOwnProperty(t)&&(d[t]=o[t])};return function(d,o){v(d,o);function t(){this.constructor=d}d.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(18),g=s(1),y=function(v){k(d,v);function d(){return v!==null&&v.apply(this,arguments)||this}return d.formats=function(o){var t=g.query(d.blotName).tagName;if(o.tagName!==t)return v.formats.call(this,o)},d.prototype.format=function(o,t){g.query(o,g.Scope.BLOCK)!=null&&(o===this.statics.blotName&&!t?this.replaceWith(d.blotName):v.prototype.format.call(this,o,t))},d.prototype.formatAt=function(o,t,e,u){g.query(e,g.Scope.BLOCK)!=null?this.format(e,u):v.prototype.formatAt.call(this,o,t,e,u)},d.prototype.insertAt=function(o,t,e){if(e==null||g.query(t,g.Scope.INLINE)!=null)v.prototype.insertAt.call(this,o,t,e);else{var u=this.split(o),l=g.create(t,e);u.parent.insertBefore(l,u)}},d.prototype.update=function(o,t){navigator.userAgent.match(/Trident/)?this.build():v.prototype.update.call(this,o,t)},d.blotName="block",d.scope=g.Scope.BLOCK_BLOT,d.tagName="P",d}(O.default);c.default=y},function(m,c,s){var k=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,d){v.__proto__=d}||function(v,d){for(var o in d)d.hasOwnProperty(o)&&(v[o]=d[o])};return function(v,d){y(v,d);function o(){this.constructor=v}v.prototype=d===null?Object.create(d):(o.prototype=d.prototype,new o)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(19),g=function(y){k(v,y);function v(){return y!==null&&y.apply(this,arguments)||this}return v.formats=function(d){},v.prototype.format=function(d,o){y.prototype.formatAt.call(this,0,this.length(),d,o)},v.prototype.formatAt=function(d,o,t,e){d===0&&o===this.length()?this.format(t,e):y.prototype.formatAt.call(this,d,o,t,e)},v.prototype.formats=function(){return this.statics.formats(this.domNode)},v}(O.default);c.default=g},function(m,c,s){var k=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,o){d.__proto__=o}||function(d,o){for(var t in o)o.hasOwnProperty(t)&&(d[t]=o[t])};return function(d,o){v(d,o);function t(){this.constructor=d}d.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(c,"__esModule",{value:!0});var O=s(19),g=s(1),y=function(v){k(d,v);function d(o){var t=v.call(this,o)||this;return t.text=t.statics.value(t.domNode),t}return d.create=function(o){return document.createTextNode(o)},d.value=function(o){var t=o.data;return t.normalize&&(t=t.normalize()),t},d.prototype.deleteAt=function(o,t){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+t)},d.prototype.index=function(o,t){return this.domNode===o?t:-1},d.prototype.insertAt=function(o,t,e){e==null?(this.text=this.text.slice(0,o)+t+this.text.slice(o),this.domNode.data=this.text):v.prototype.insertAt.call(this,o,t,e)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(o){v.prototype.optimize.call(this,o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(o,t){return[this.domNode,o]},d.prototype.split=function(o,t){if(t===void 0&&(t=!1),!t){if(o===0)return this;if(o===this.length())return this.next}var e=g.create(this.domNode.splitText(o));return this.parent.insertBefore(e,this.next),this.text=this.statics.value(this.domNode),e},d.prototype.update=function(o,t){var e=this;o.some(function(u){return u.type==="characterData"&&u.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=g.Scope.INLINE_BLOT,d}(O.default);c.default=y},function(m,c,s){var k=document.createElement("div");if(k.classList.toggle("test-class",!1),k.classList.contains("test-class")){var O=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(g,y){return arguments.length>1&&!this.contains(g)==!y?y:O.call(this,g)}}String.prototype.startsWith||(String.prototype.startsWith=function(g,y){return y=y||0,this.substr(y,g.length)===g}),String.prototype.endsWith||(String.prototype.endsWith=function(g,y){var v=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>v.length)&&(y=v.length),y-=g.length;var d=v.indexOf(g,y);return d!==-1&&d===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 v=Object(this),d=v.length>>>0,o=arguments[1],t,e=0;e<d;e++)if(t=v[e],y.call(o,t,e,v))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(m,c){var s=-1,k=1,O=0;function g(n,h,A){if(n==h)return n?[[O,n]]:[];(A<0||n.length<A)&&(A=null);var E=o(n,h),T=n.substring(0,E);n=n.substring(E),h=h.substring(E),E=t(n,h);var x=n.substring(n.length-E);n=n.substring(0,n.length-E),h=h.substring(0,h.length-E);var _=y(n,h);return T&&_.unshift([O,T]),x&&_.push([O,x]),u(_),A!=null&&(_=r(_,A)),_=i(_),_}function y(n,h){var A;if(!n)return[[k,h]];if(!h)return[[s,n]];var E=n.length>h.length?n:h,T=n.length>h.length?h:n,x=E.indexOf(T);if(x!=-1)return A=[[k,E.substring(0,x)],[O,T],[k,E.substring(x+T.length)]],n.length>h.length&&(A[0][0]=A[2][0]=s),A;if(T.length==1)return[[s,n],[k,h]];var _=e(n,h);if(_){var p=_[0],b=_[1],w=_[2],S=_[3],R=_[4],D=g(p,w),F=g(b,S);return D.concat([[O,R]],F)}return v(n,h)}function v(n,h){for(var A=n.length,E=h.length,T=Math.ceil((A+E)/2),x=T,_=2*T,p=new Array(_),b=new Array(_),w=0;w<_;w++)p[w]=-1,b[w]=-1;p[x+1]=0,b[x+1]=0;for(var S=A-E,R=S%2!=0,D=0,F=0,Z=0,j=0,M=0;M<T;M++){for(var N=-M+D;N<=M-F;N+=2){var q=x+N,I;N==-M||N!=M&&p[q-1]<p[q+1]?I=p[q+1]:I=p[q-1]+1;for(var H=I-N;I<A&&H<E&&n.charAt(I)==h.charAt(H);)I++,H++;if(p[q]=I,I>A)F+=2;else if(H>E)D+=2;else if(R){var B=x+S-N;if(B>=0&&B<_&&b[B]!=-1){var P=A-b[B];if(I>=P)return d(n,h,I,H)}}}for(var C=-M+Z;C<=M-j;C+=2){var B=x+C,P;C==-M||C!=M&&b[B-1]<b[B+1]?P=b[B+1]:P=b[B-1]+1;for(var U=P-C;P<A&&U<E&&n.charAt(A-P-1)==h.charAt(E-U-1);)P++,U++;if(b[B]=P,P>A)j+=2;else if(U>E)Z+=2;else if(!R){var q=x+S-C;if(q>=0&&q<_&&p[q]!=-1){var I=p[q],H=x+I-q;if(P=A-P,I>=P)return d(n,h,I,H)}}}}return[[s,n],[k,h]]}function d(n,h,A,E){var T=n.substring(0,A),x=h.substring(0,E),_=n.substring(A),p=h.substring(E),b=g(T,x),w=g(_,p);return b.concat(w)}function o(n,h){if(!n||!h||n.charAt(0)!=h.charAt(0))return 0;for(var A=0,E=Math.min(n.length,h.length),T=E,x=0;A<T;)n.substring(x,T)==h.substring(x,T)?(A=T,x=A):E=T,T=Math.floor((E-A)/2+A);return T}function t(n,h){if(!n||!h||n.charAt(n.length-1)!=h.charAt(h.length-1))return 0;for(var A=0,E=Math.min(n.length,h.length),T=E,x=0;A<T;)n.substring(n.length-T,n.length-x)==h.substring(h.length-T,h.length-x)?(A=T,x=A):E=T,T=Math.floor((E-A)/2+A);return T}function e(n,h){var A=n.length>h.length?n:h,E=n.length>h.length?h:n;if(A.length<4||E.length*2<A.length)return null;function T(F,Z,j){for(var M=F.substring(j,j+Math.floor(F.length/4)),N=-1,q="",I,H,B,P;(N=Z.indexOf(M,N+1))!=-1;){var C=o(F.substring(j),Z.substring(N)),U=t(F.substring(0,j),Z.substring(0,N));q.length<U+C&&(q=Z.substring(N-U,N)+Z.substring(N,N+C),I=F.substring(0,j-U),H=F.substring(j+C),B=Z.substring(0,N-U),P=Z.substring(N+C))}return q.length*2>=F.length?[I,H,B,P,q]:null}var x=T(A,E,Math.ceil(A.length/4)),_=T(A,E,Math.ceil(A.length/2)),p;if(!x&&!_)return null;_?x?p=x[4].length>_[4].length?x:_:p=_:p=x;var b,w,S,R;n.length>h.length?(b=p[0],w=p[1],S=p[2],R=p[3]):(S=p[0],R=p[1],b=p[2],w=p[3]);var D=p[4];return[b,w,S,R,D]}function u(n){n.push([O,""]);for(var h=0,A=0,E=0,T="",x="",_;h<n.length;)switch(n[h][0]){case k:E++,x+=n[h][1],h++;break;case s:A++,T+=n[h][1],h++;break;case O:A+E>1?(A!==0&&E!==0&&(_=o(x,T),_!==0&&(h-A-E>0&&n[h-A-E-1][0]==O?n[h-A-E-1][1]+=x.substring(0,_):(n.splice(0,0,[O,x.substring(0,_)]),h++),x=x.substring(_),T=T.substring(_)),_=t(x,T),_!==0&&(n[h][1]=x.substring(x.length-_)+n[h][1],x=x.substring(0,x.length-_),T=T.substring(0,T.length-_))),A===0?n.splice(h-E,A+E,[k,x]):E===0?n.splice(h-A,A+E,[s,T]):n.splice(h-A-E,A+E,[s,T],[k,x]),h=h-A-E+(A?1:0)+(E?1:0)+1):h!==0&&n[h-1][0]==O?(n[h-1][1]+=n[h][1],n.splice(h,1)):h++,E=0,A=0,T="",x="";break}n[n.length-1][1]===""&&n.pop();var p=!1;for(h=1;h<n.length-1;)n[h-1][0]==O&&n[h+1][0]==O&&(n[h][1].substring(n[h][1].length-n[h-1][1].length)==n[h-1][1]?(n[h][1]=n[h-1][1]+n[h][1].substring(0,n[h][1].length-n[h-1][1].length),n[h+1][1]=n[h-1][1]+n[h+1][1],n.splice(h-1,1),p=!0):n[h][1].substring(0,n[h+1][1].length)==n[h+1][1]&&(n[h-1][1]+=n[h+1][1],n[h][1]=n[h][1].substring(n[h+1][1].length)+n[h+1][1],n.splice(h+1,1),p=!0)),h++;p&&u(n)}var l=g;l.INSERT=k,l.DELETE=s,l.EQUAL=O,m.exports=l;function a(n,h){if(h===0)return[O,n];for(var A=0,E=0;E<n.length;E++){var T=n[E];if(T[0]===s||T[0]===O){var x=A+T[1].length;if(h===x)return[E+1,n];if(h<x){n=n.slice();var _=h-A,p=[T[0],T[1].slice(0,_)],b=[T[0],T[1].slice(_)];return n.splice(E,1,p,b),[E+1,n]}else A=x}}throw new Error("cursor_pos is out of bounds!")}function r(n,h){var A=a(n,h),E=A[1],T=A[0],x=E[T],_=E[T+1];if(x==null)return n;if(x[0]!==O)return n;if(_!=null&&x[1]+_[1]===_[1]+x[1])return E.splice(T,2,_,x),f(E,T,2);if(_!=null&&_[1].indexOf(x[1])===0){E.splice(T,2,[_[0],x[1]],[0,x[1]]);var p=_[1].slice(x[1].length);return p.length>0&&E.splice(T+2,0,[_[0],p]),f(E,T,3)}else return n}function i(n){for(var h=!1,A=function(_){return _.charCodeAt(0)>=56320&&_.charCodeAt(0)<=57343},E=function(_){return _.charCodeAt(_.length-1)>=55296&&_.charCodeAt(_.length-1)<=56319},T=2;T<n.length;T+=1)n[T-2][0]===O&&E(n[T-2][1])&&n[T-1][0]===s&&A(n[T-1][1])&&n[T][0]===k&&A(n[T][1])&&(h=!0,n[T-1][1]=n[T-2][1].slice(-1)+n[T-1][1],n[T][1]=n[T-2][1].slice(-1)+n[T][1],n[T-2][1]=n[T-2][1].slice(0,-1));if(!h)return n;for(var x=[],T=0;T<n.length;T+=1)n[T][1].length>0&&x.push(n[T]);return x}function f(n,h,A){for(var E=h+A-1;E>=0&&E>=h-1;E--)if(E+1<n.length){var T=n[E],x=n[E+1];T[0]===x[1]&&n.splice(E,2,[T[0],T[1]+x[1]])}return n}},function(m,c){c=m.exports=typeof Object.keys=="function"?Object.keys:s,c.shim=s;function s(k){var O=[];for(var g in k)O.push(g);return O}},function(m,c){var s=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";c=m.exports=s?k:O,c.supported=k;function k(g){return Object.prototype.toString.call(g)=="[object Arguments]"}c.unsupported=O;function O(g){return g&&typeof g=="object"&&typeof g.length=="number"&&Object.prototype.hasOwnProperty.call(g,"callee")&&!Object.prototype.propertyIsEnumerable.call(g,"callee")||!1}},function(m,c){var s=Object.prototype.hasOwnProperty,k="~";function O(){}Object.create&&(O.prototype=Object.create(null),new O().__proto__||(k=!1));function g(v,d,o){this.fn=v,this.context=d,this.once=o||!1}function y(){this._events=new O,this._eventsCount=0}y.prototype.eventNames=function(){var d=[],o,t;if(this._eventsCount===0)return d;for(t in o=this._events)s.call(o,t)&&d.push(k?t.slice(1):t);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(o)):d},y.prototype.listeners=function(d,o){var t=k?k+d:d,e=this._events[t];if(o)return!!e;if(!e)return[];if(e.fn)return[e.fn];for(var u=0,l=e.length,a=new Array(l);u<l;u++)a[u]=e[u].fn;return a},y.prototype.emit=function(d,o,t,e,u,l){var a=k?k+d:d;if(!this._events[a])return!1;var r=this._events[a],i=arguments.length,f,n;if(r.fn){switch(r.once&&this.removeListener(d,r.fn,void 0,!0),i){case 1:return r.fn.call(r.context),!0;case 2:return r.fn.call(r.context,o),!0;case 3:return r.fn.call(r.context,o,t),!0;case 4:return r.fn.call(r.context,o,t,e),!0;case 5:return r.fn.call(r.context,o,t,e,u),!0;case 6:return r.fn.call(r.context,o,t,e,u,l),!0}for(n=1,f=new Array(i-1);n<i;n++)f[n-1]=arguments[n];r.fn.apply(r.context,f)}else{var h=r.length,A;for(n=0;n<h;n++)switch(r[n].once&&this.removeListener(d,r[n].fn,void 0,!0),i){case 1:r[n].fn.call(r[n].context);break;case 2:r[n].fn.call(r[n].context,o);break;case 3:r[n].fn.call(r[n].context,o,t);break;case 4:r[n].fn.call(r[n].context,o,t,e);break;default:if(!f)for(A=1,f=new Array(i-1);A<i;A++)f[A-1]=arguments[A];r[n].fn.apply(r[n].context,f)}}return!0},y.prototype.on=function(d,o,t){var e=new g(o,t||this),u=k?k+d:d;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],e]:this._events[u].push(e):(this._events[u]=e,this._eventsCount++),this},y.prototype.once=function(d,o,t){var e=new g(o,t||this,!0),u=k?k+d:d;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],e]:this._events[u].push(e):(this._events[u]=e,this._eventsCount++),this},y.prototype.removeListener=function(d,o,t,e){var u=k?k+d:d;if(!this._events[u])return this;if(!o)return--this._eventsCount===0?this._events=new O:delete this._events[u],this;var l=this._events[u];if(l.fn)l.fn===o&&(!e||l.once)&&(!t||l.context===t)&&(--this._eventsCount===0?this._events=new O:delete this._events[u]);else{for(var a=0,r=[],i=l.length;a<i;a++)(l[a].fn!==o||e&&!l[a].once||t&&l[a].context!==t)&&r.push(l[a]);r.length?this._events[u]=r.length===1?r[0]:r:--this._eventsCount===0?this._events=new O:delete this._events[u]}return this},y.prototype.removeAllListeners=function(d){var o;return d?(o=k?k+d:d,this._events[o]&&(--this._eventsCount===0?this._events=new O:delete this._events[o])):(this._events=new O,this._eventsCount=0),this},y.prototype.off=y.prototype.removeListener,y.prototype.addListener=y.prototype.on,y.prototype.setMaxListeners=function(){return this},y.prefixed=k,y.EventEmitter=y,typeof m<"u"&&(m.exports=y)},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.matchText=c.matchSpacing=c.matchNewline=c.matchBlot=c.matchAttributor=c.default=void 0;var k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},O=function(){function V(K,Y){var Q=[],G=!0,nt=!1,rt=void 0;try{for(var it=K[Symbol.iterator](),ct;!(G=(ct=it.next()).done)&&(Q.push(ct.value),!(Y&&Q.length===Y));G=!0);}catch(ht){nt=!0,rt=ht}finally{try{!G&&it.return&&it.return()}finally{if(nt)throw rt}}return Q}return function(K,Y){if(Array.isArray(K))return K;if(Symbol.iterator in Object(K))return V(K,Y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(){function V(K,Y){for(var Q=0;Q<Y.length;Q++){var G=Y[Q];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(K,G.key,G)}}return function(K,Y,Q){return Y&&V(K.prototype,Y),Q&&V(K,Q),K}}(),y=s(3),v=b(y),d=s(2),o=b(d),t=s(0),e=b(t),u=s(5),l=b(u),a=s(10),r=b(a),i=s(9),f=b(i),n=s(36),h=s(37),A=s(13),E=b(A),T=s(26),x=s(38),_=s(39),p=s(40);function b(V){return V&&V.__esModule?V:{default:V}}function w(V,K,Y){return K in V?Object.defineProperty(V,K,{value:Y,enumerable:!0,configurable:!0,writable:!0}):V[K]=Y,V}function S(V,K){if(!(V instanceof K))throw new TypeError("Cannot call a class as a function")}function R(V,K){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K&&(typeof K=="object"||typeof K=="function")?K:V}function D(V,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof K);V.prototype=Object.create(K&&K.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),K&&(Object.setPrototypeOf?Object.setPrototypeOf(V,K):V.__proto__=K)}var F=(0,r.default)("quill:clipboard"),Z="__ql-matcher",j=[[Node.TEXT_NODE,ut],[Node.TEXT_NODE,ot],["br",X],[Node.ELEMENT_NODE,ot],[Node.ELEMENT_NODE,W],[Node.ELEMENT_NODE,lt],[Node.ELEMENT_NODE,$],[Node.ELEMENT_NODE,ft],["li",tt],["b",U.bind(U,"bold")],["i",U.bind(U,"italic")],["style",J]],M=[n.AlignAttribute,x.DirectionAttribute].reduce(function(V,K){return V[K.keyName]=K,V},{}),N=[n.AlignStyle,h.BackgroundStyle,T.ColorStyle,x.DirectionStyle,_.FontStyle,p.SizeStyle].reduce(function(V,K){return V[K.keyName]=K,V},{}),q=function(V){D(K,V);function K(Y,Q){S(this,K);var G=R(this,(K.__proto__||Object.getPrototypeOf(K)).call(this,Y,Q));return G.quill.root.addEventListener("paste",G.onPaste.bind(G)),G.container=G.quill.addContainer("ql-clipboard"),G.container.setAttribute("contenteditable",!0),G.container.setAttribute("tabindex",-1),G.matchers=[],j.concat(G.options.matchers).forEach(function(nt){var rt=O(nt,2),it=rt[0],ct=rt[1];!Q.matchVisual&&ct===lt||G.addMatcher(it,ct)}),G}return g(K,[{key:"addMatcher",value:function(Q,G){this.matchers.push([Q,G])}},{key:"convert",value:function(Q){if(typeof Q=="string")return this.container.innerHTML=Q.replace(/\>\r?\n +\</g,"><"),this.convert();var G=this.quill.getFormat(this.quill.selection.savedRange.index);if(G[E.default.blotName]){var nt=this.container.innerText;return this.container.innerHTML="",new o.default().insert(nt,w({},E.default.blotName,G[E.default.blotName]))}var rt=this.prepareMatching(),it=O(rt,2),ct=it[0],ht=it[1],at=C(this.container,ct,ht);return B(at,`
`)&&at.ops[at.ops.length-1].attributes==null&&(at=at.compose(new o.default().retain(at.length()-1).delete(1))),F.log("convert",this.container.innerHTML,at),this.container.innerHTML="",at}},{key:"dangerouslyPasteHTML",value:function(Q,G){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l.default.sources.API;if(typeof Q=="string")this.quill.setContents(this.convert(Q),G),this.quill.setSelection(0,l.default.sources.SILENT);else{var rt=this.convert(G);this.quill.updateContents(new o.default().retain(Q).concat(rt),nt),this.quill.setSelection(Q+rt.length(),l.default.sources.SILENT)}}},{key:"onPaste",value:function(Q){var G=this;if(!(Q.defaultPrevented||!this.quill.isEnabled())){var nt=this.quill.getSelection(),rt=new o.default().retain(nt.index),it=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l.default.sources.SILENT),setTimeout(function(){rt=rt.concat(G.convert()).delete(nt.length),G.quill.updateContents(rt,l.default.sources.USER),G.quill.setSelection(rt.length()-nt.length,l.default.sources.SILENT),G.quill.scrollingContainer.scrollTop=it,G.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Q=this,G=[],nt=[];return this.matchers.forEach(function(rt){var it=O(rt,2),ct=it[0],ht=it[1];switch(ct){case Node.TEXT_NODE:nt.push(ht);break;case Node.ELEMENT_NODE:G.push(ht);break;default:[].forEach.call(Q.container.querySelectorAll(ct),function(at){at[Z]=at[Z]||[],at[Z].push(ht)});break}}),[G,nt]}}]),K}(f.default);q.DEFAULTS={matchers:[],matchVisual:!0};function I(V,K,Y){return(typeof K>"u"?"undefined":k(K))==="object"?Object.keys(K).reduce(function(Q,G){return I(Q,G,K[G])},V):V.reduce(function(Q,G){return G.attributes&&G.attributes[K]?Q.push(G):Q.insert(G.insert,(0,v.default)({},w({},K,Y),G.attributes))},new o.default)}function H(V){if(V.nodeType!==Node.ELEMENT_NODE)return{};var K="__ql-computed-style";return V[K]||(V[K]=window.getComputedStyle(V))}function B(V,K){for(var Y="",Q=V.ops.length-1;Q>=0&&Y.length<K.length;--Q){var G=V.ops[Q];if(typeof G.insert!="string")break;Y=G.insert+Y}return Y.slice(-1*K.length)===K}function P(V){if(V.childNodes.length===0)return!1;var K=H(V);return["block","list-item"].indexOf(K.display)>-1}function C(V,K,Y){return V.nodeType===V.TEXT_NODE?Y.reduce(function(Q,G){return G(V,Q)},new o.default):V.nodeType===V.ELEMENT_NODE?[].reduce.call(V.childNodes||[],function(Q,G){var nt=C(G,K,Y);return G.nodeType===V.ELEMENT_NODE&&(nt=K.reduce(function(rt,it){return it(G,rt)},nt),nt=(G[Z]||[]).reduce(function(rt,it){return it(G,rt)},nt)),Q.concat(nt)},new o.default):new o.default}function U(V,K,Y){return I(Y,V,!0)}function $(V,K){var Y=e.default.Attributor.Attribute.keys(V),Q=e.default.Attributor.Class.keys(V),G=e.default.Attributor.Style.keys(V),nt={};return Y.concat(Q).concat(G).forEach(function(rt){var it=e.default.query(rt,e.default.Scope.ATTRIBUTE);it!=null&&(nt[it.attrName]=it.value(V),nt[it.attrName])||(it=M[rt],it!=null&&(it.attrName===rt||it.keyName===rt)&&(nt[it.attrName]=it.value(V)||void 0),it=N[rt],it!=null&&(it.attrName===rt||it.keyName===rt)&&(it=N[rt],nt[it.attrName]=it.value(V)||void 0))}),Object.keys(nt).length>0&&(K=I(K,nt)),K}function W(V,K){var Y=e.default.query(V);if(Y==null)return K;if(Y.prototype instanceof e.default.Embed){var Q={},G=Y.value(V);G!=null&&(Q[Y.blotName]=G,K=new o.default().insert(Q,Y.formats(V)))}else typeof Y.formats=="function"&&(K=I(K,Y.blotName,Y.formats(V)));return K}function X(V,K){return B(K,`
`)||K.insert(`
`),K}function J(){return new o.default}function tt(V,K){var Y=e.default.query(V);if(Y==null||Y.blotName!=="list-item"||!B(K,`
`))return K;for(var Q=-1,G=V.parentNode;!G.classList.contains("ql-clipboard");)(e.default.query(G)||{}).blotName==="list"&&(Q+=1),G=G.parentNode;return Q<=0?K:K.compose(new o.default().retain(K.length()-1).retain(1,{indent:Q}))}function ot(V,K){return B(K,`
`)||(P(V)||K.length()>0&&V.nextSibling&&P(V.nextSibling))&&K.insert(`
`),K}function lt(V,K){if(P(V)&&V.nextElementSibling!=null&&!B(K,`
`)){var Y=V.offsetHeight+parseFloat(H(V).marginTop)+parseFloat(H(V).marginBottom);V.nextElementSibling.offsetTop>V.offsetTop+Y*1.5&&K.insert(`
`)}return K}function ft(V,K){var Y={},Q=V.style||{};return Q.fontStyle&&H(V).fontStyle==="italic"&&(Y.italic=!0),Q.fontWeight&&(H(V).fontWeight.startsWith("bold")||parseInt(H(V).fontWeight)>=700)&&(Y.bold=!0),Object.keys(Y).length>0&&(K=I(K,Y)),parseFloat(Q.textIndent||0)>0&&(K=new o.default().insert(" ").concat(K)),K}function ut(V,K){var Y=V.data;if(V.parentNode.tagName==="O:P")return K.insert(Y.trim());if(Y.trim().length===0&&V.parentNode.classList.contains("ql-clipboard"))return K;if(!H(V.parentNode).whiteSpace.startsWith("pre")){var Q=function(nt,rt){return rt=rt.replace(/[^\u00a0]/g,""),rt.length<1&&nt?" ":rt};Y=Y.replace(/\r\n/g," ").replace(/\n/g," "),Y=Y.replace(/\s\s+/g,Q.bind(Q,!0)),(V.previousSibling==null&&P(V.parentNode)||V.previousSibling!=null&&P(V.previousSibling))&&(Y=Y.replace(/^\s+/,Q.bind(Q,!1))),(V.nextSibling==null&&P(V.parentNode)||V.nextSibling!=null&&P(V.nextSibling))&&(Y=Y.replace(/\s+$/,Q.bind(Q,!1)))}return K.insert(Y)}c.default=q,c.matchAttributor=$,c.matchBlot=W,c.matchNewline=ot,c.matchSpacing=lt,c.matchText=ut},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function u(l,a){for(var r=0;r<a.length;r++){var i=a[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,a,r){return a&&u(l.prototype,a),r&&u(l,r),l}}(),O=function u(l,a,r){l===null&&(l=Function.prototype);var i=Object.getOwnPropertyDescriptor(l,a);if(i===void 0){var f=Object.getPrototypeOf(l);return f===null?void 0:u(f,a,r)}else{if("value"in i)return i.value;var n=i.get;return n===void 0?void 0:n.call(r)}},g=s(6),y=v(g);function v(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function o(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function t(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var e=function(u){t(l,u);function l(){return d(this,l),o(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return k(l,[{key:"optimize",value:function(r){O(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"optimize",this).call(this,r),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return O(l.__proto__||Object.getPrototypeOf(l),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),l}(y.default);e.blotName="bold",e.tagName=["STRONG","B"],c.default=e},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.addControls=c.default=void 0;var k=function(){function p(b,w){var S=[],R=!0,D=!1,F=void 0;try{for(var Z=b[Symbol.iterator](),j;!(R=(j=Z.next()).done)&&(S.push(j.value),!(w&&S.length===w));R=!0);}catch(M){D=!0,F=M}finally{try{!R&&Z.return&&Z.return()}finally{if(D)throw F}}return S}return function(b,w){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return p(b,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function p(b,w){for(var S=0;S<w.length;S++){var R=w[S];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(b,R.key,R)}}return function(b,w,S){return w&&p(b.prototype,w),S&&p(b,S),b}}(),g=s(2),y=r(g),v=s(0),d=r(v),o=s(5),t=r(o),e=s(10),u=r(e),l=s(9),a=r(l);function r(p){return p&&p.__esModule?p:{default:p}}function i(p,b,w){return b in p?Object.defineProperty(p,b,{value:w,enumerable:!0,configurable:!0,writable:!0}):p[b]=w,p}function f(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function n(p,b){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:p}function h(p,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);p.prototype=Object.create(b&&b.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(p,b):p.__proto__=b)}var A=(0,u.default)("quill:toolbar"),E=function(p){h(b,p);function b(w,S){f(this,b);var R=n(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,w,S));if(Array.isArray(R.options.container)){var D=document.createElement("div");x(D,R.options.container),w.container.parentNode.insertBefore(D,w.container),R.container=D}else typeof R.options.container=="string"?R.container=document.querySelector(R.options.container):R.container=R.options.container;if(!(R.container instanceof HTMLElement)){var F;return F=A.error("Container required for toolbar",R.options),n(R,F)}return R.container.classList.add("ql-toolbar"),R.controls=[],R.handlers={},Object.keys(R.options.handlers).forEach(function(Z){R.addHandler(Z,R.options.handlers[Z])}),[].forEach.call(R.container.querySelectorAll("button, select"),function(Z){R.attach(Z)}),R.quill.on(t.default.events.EDITOR_CHANGE,function(Z,j){Z===t.default.events.SELECTION_CHANGE&&R.update(j)}),R.quill.on(t.default.events.SCROLL_OPTIMIZE,function(){var Z=R.quill.selection.getRange(),j=k(Z,1),M=j[0];R.update(M)}),R}return O(b,[{key:"addHandler",value:function(S,R){this.handlers[S]=R}},{key:"attach",value:function(S){var R=this,D=[].find.call(S.classList,function(Z){return Z.indexOf("ql-")===0});if(D){if(D=D.slice(3),S.tagName==="BUTTON"&&S.setAttribute("type","button"),this.handlers[D]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[D]==null){A.warn("ignoring attaching to disabled format",D,S);return}if(d.default.query(D)==null){A.warn("ignoring attaching to nonexistent format",D,S);return}}var F=S.tagName==="SELECT"?"change":"click";S.addEventListener(F,function(Z){var j=void 0;if(S.tagName==="SELECT"){if(S.selectedIndex<0)return;var M=S.options[S.selectedIndex];M.hasAttribute("selected")?j=!1:j=M.value||!1}else S.classList.contains("ql-active")?j=!1:j=S.value||!S.hasAttribute("value"),Z.preventDefault();R.quill.focus();var N=R.quill.selection.getRange(),q=k(N,1),I=q[0];if(R.handlers[D]!=null)R.handlers[D].call(R,j);else if(d.default.query(D).prototype instanceof d.default.Embed){if(j=prompt("Enter "+D),!j)return;R.quill.updateContents(new y.default().retain(I.index).delete(I.length).insert(i({},D,j)),t.default.sources.USER)}else R.quill.format(D,j,t.default.sources.USER);R.update(I)}),this.controls.push([D,S])}}},{key:"update",value:function(S){var R=S==null?{}:this.quill.getFormat(S);this.controls.forEach(function(D){var F=k(D,2),Z=F[0],j=F[1];if(j.tagName==="SELECT"){var M=void 0;if(S==null)M=null;else if(R[Z]==null)M=j.querySelector("option[selected]");else if(!Array.isArray(R[Z])){var N=R[Z];typeof N=="string"&&(N=N.replace(/\"/g,'\\"')),M=j.querySelector('option[value="'+N+'"]')}M==null?(j.value="",j.selectedIndex=-1):M.selected=!0}else if(S==null)j.classList.remove("ql-active");else if(j.hasAttribute("value")){var q=R[Z]===j.getAttribute("value")||R[Z]!=null&&R[Z].toString()===j.getAttribute("value")||R[Z]==null&&!j.getAttribute("value");j.classList.toggle("ql-active",q)}else j.classList.toggle("ql-active",R[Z]!=null)})}}]),b}(a.default);E.DEFAULTS={};function T(p,b,w){var S=document.createElement("button");S.setAttribute("type","button"),S.classList.add("ql-"+b),w!=null&&(S.value=w),p.appendChild(S)}function x(p,b){Array.isArray(b[0])||(b=[b]),b.forEach(function(w){var S=document.createElement("span");S.classList.add("ql-formats"),w.forEach(function(R){if(typeof R=="string")T(S,R);else{var D=Object.keys(R)[0],F=R[D];Array.isArray(F)?_(S,D,F):T(S,D,F)}}),p.appendChild(S)})}function _(p,b,w){var S=document.createElement("select");S.classList.add("ql-"+b),w.forEach(function(R){var D=document.createElement("option");R!==!1?D.setAttribute("value",R):D.setAttribute("selected","selected"),S.appendChild(D)}),p.appendChild(S)}E.DEFAULTS={container:null,handlers:{clean:function(){var b=this,w=this.quill.getSelection();if(w!=null)if(w.length==0){var S=this.quill.getFormat();Object.keys(S).forEach(function(R){d.default.query(R,d.default.Scope.INLINE)!=null&&b.quill.format(R,!1)})}else this.quill.removeFormat(w,t.default.sources.USER)},direction:function(b){var w=this.quill.getFormat().align;b==="rtl"&&w==null?this.quill.format("align","right",t.default.sources.USER):!b&&w==="right"&&this.quill.format("align",!1,t.default.sources.USER),this.quill.format("direction",b,t.default.sources.USER)},indent:function(b){var w=this.quill.getSelection(),S=this.quill.getFormat(w),R=parseInt(S.indent||0);if(b==="+1"||b==="-1"){var D=b==="+1"?1:-1;S.direction==="rtl"&&(D*=-1),this.quill.format("indent",R+D,t.default.sources.USER)}},link:function(b){b===!0&&(b=prompt("Enter link URL:")),this.quill.format("link",b,t.default.sources.USER)},list:function(b){var w=this.quill.getSelection(),S=this.quill.getFormat(w);b==="check"?S.list==="checked"||S.list==="unchecked"?this.quill.format("list",!1,t.default.sources.USER):this.quill.format("list","unchecked",t.default.sources.USER):this.quill.format("list",b,t.default.sources.USER)}}},c.default=E,c.addControls=x},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function u(l,a){for(var r=0;r<a.length;r++){var i=a[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,a,r){return a&&u(l.prototype,a),r&&u(l,r),l}}(),O=function u(l,a,r){l===null&&(l=Function.prototype);var i=Object.getOwnPropertyDescriptor(l,a);if(i===void 0){var f=Object.getPrototypeOf(l);return f===null?void 0:u(f,a,r)}else{if("value"in i)return i.value;var n=i.get;return n===void 0?void 0:n.call(r)}},g=s(28),y=v(g);function v(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function o(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function t(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var e=function(u){t(l,u);function l(a,r){d(this,l);var i=o(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,a));return i.label.innerHTML=r,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(f){f.classList.add("ql-primary")}),i}return k(l,[{key:"buildItem",value:function(r){var i=O(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"buildItem",this).call(this,r);return i.style.backgroundColor=r.getAttribute("value")||"",i}},{key:"selectItem",value:function(r,i){O(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"selectItem",this).call(this,r,i);var f=this.label.querySelector(".ql-color-label"),n=r&&r.getAttribute("data-value")||"";f&&(f.tagName==="line"?f.style.stroke=n:f.style.fill=n)}}]),l}(y.default);c.default=e},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function u(l,a){for(var r=0;r<a.length;r++){var i=a[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,a,r){return a&&u(l.prototype,a),r&&u(l,r),l}}(),O=function u(l,a,r){l===null&&(l=Function.prototype);var i=Object.getOwnPropertyDescriptor(l,a);if(i===void 0){var f=Object.getPrototypeOf(l);return f===null?void 0:u(f,a,r)}else{if("value"in i)return i.value;var n=i.get;return n===void 0?void 0:n.call(r)}},g=s(28),y=v(g);function v(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function o(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function t(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var e=function(u){t(l,u);function l(a,r){d(this,l);var i=o(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,a));return i.container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),function(f){f.innerHTML=r[f.getAttribute("data-value")||""]}),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}return k(l,[{key:"selectItem",value:function(r,i){O(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"selectItem",this).call(this,r,i),r=r||this.defaultItem,this.label.innerHTML=r.innerHTML}}]),l}(y.default);c.default=e},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function y(v,d){for(var o=0;o<d.length;o++){var t=d[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(v,t.key,t)}}return function(v,d,o){return d&&y(v.prototype,d),o&&y(v,o),v}}();function O(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}var g=function(){function y(v,d){var o=this;O(this,y),this.quill=v,this.boundsContainer=d||document.body,this.root=v.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){o.root.style.marginTop=-1*o.quill.root.scrollTop+"px"}),this.hide()}return k(y,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var o=d.left+d.width/2-this.root.offsetWidth/2,t=d.bottom+this.quill.root.scrollTop;this.root.style.left=o+"px",this.root.style.top=t+"px",this.root.classList.remove("ql-flip");var e=this.boundsContainer.getBoundingClientRect(),u=this.root.getBoundingClientRect(),l=0;if(u.right>e.right&&(l=e.right-u.right,this.root.style.left=o+l+"px"),u.left<e.left&&(l=e.left-u.left,this.root.style.left=o+l+"px"),u.bottom>e.bottom){var a=u.bottom-u.top,r=d.bottom-d.top+a;this.root.style.top=t-r+"px",this.root.classList.add("ql-flip")}return l}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),y}();c.default=g},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function _(p,b){var w=[],S=!0,R=!1,D=void 0;try{for(var F=p[Symbol.iterator](),Z;!(S=(Z=F.next()).done)&&(w.push(Z.value),!(b&&w.length===b));S=!0);}catch(j){R=!0,D=j}finally{try{!S&&F.return&&F.return()}finally{if(R)throw D}}return w}return function(p,b){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return _(p,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function _(p,b,w){p===null&&(p=Function.prototype);var S=Object.getOwnPropertyDescriptor(p,b);if(S===void 0){var R=Object.getPrototypeOf(p);return R===null?void 0:_(R,b,w)}else{if("value"in S)return S.value;var D=S.get;return D===void 0?void 0:D.call(w)}},g=function(){function _(p,b){for(var w=0;w<b.length;w++){var S=b[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,b,w){return b&&_(p.prototype,b),w&&_(p,w),p}}(),y=s(3),v=f(y),d=s(8),o=f(d),t=s(43),e=f(t),u=s(27),l=f(u),a=s(15),r=s(41),i=f(r);function f(_){return _&&_.__esModule?_:{default:_}}function n(_,p){if(!(_ instanceof p))throw new TypeError("Cannot call a class as a function")}function h(_,p){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:_}function A(_,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);_.prototype=Object.create(p&&p.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(_,p):_.__proto__=p)}var E=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(_){A(p,_);function p(b,w){n(this,p),w.modules.toolbar!=null&&w.modules.toolbar.container==null&&(w.modules.toolbar.container=E);var S=h(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,b,w));return S.quill.container.classList.add("ql-snow"),S}return g(p,[{key:"extendToolbar",value:function(w){w.container.classList.add("ql-snow"),this.buildButtons([].slice.call(w.container.querySelectorAll("button")),i.default),this.buildPickers([].slice.call(w.container.querySelectorAll("select")),i.default),this.tooltip=new x(this.quill,this.options.bounds),w.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(S,R){w.handlers.link.call(w,!R.format.link)})}}]),p}(e.default);T.DEFAULTS=(0,v.default)(!0,{},e.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(p){if(p){var b=this.quill.getSelection();if(b==null||b.length==0)return;var w=this.quill.getText(b);/^\S+@\S+\.\S+$/.test(w)&&w.indexOf("mailto:")!==0&&(w="mailto:"+w);var S=this.quill.theme.tooltip;S.edit("link",w)}else this.quill.format("link",!1)}}}}});var x=function(_){A(p,_);function p(b,w){n(this,p);var S=h(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,b,w));return S.preview=S.root.querySelector("a.ql-preview"),S}return g(p,[{key:"listen",value:function(){var w=this;O(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(S){w.root.classList.contains("ql-editing")?w.save():w.edit("link",w.preview.textContent),S.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(S){if(w.linkRange!=null){var R=w.linkRange;w.restoreFocus(),w.quill.formatText(R,"link",!1,o.default.sources.USER),delete w.linkRange}S.preventDefault(),w.hide()}),this.quill.on(o.default.events.SELECTION_CHANGE,function(S,R,D){if(S!=null){if(S.length===0&&D===o.default.sources.USER){var F=w.quill.scroll.descendant(l.default,S.index),Z=k(F,2),j=Z[0],M=Z[1];if(j!=null){w.linkRange=new a.Range(S.index-M,j.length());var N=l.default.formats(j.domNode);w.preview.textContent=N,w.preview.setAttribute("href",N),w.show(),w.position(w.quill.getBounds(w.linkRange));return}}else delete w.linkRange;w.hide()}})}},{key:"show",value:function(){O(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),p}(t.BaseTooltip);x.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),c.default=T},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(29),O=G(k),g=s(36),y=s(38),v=s(64),d=s(65),o=G(d),t=s(66),e=G(t),u=s(67),l=G(u),a=s(37),r=s(26),i=s(39),f=s(40),n=s(56),h=G(n),A=s(68),E=G(A),T=s(27),x=G(T),_=s(69),p=G(_),b=s(70),w=G(b),S=s(71),R=G(S),D=s(72),F=G(D),Z=s(73),j=G(Z),M=s(13),N=G(M),q=s(74),I=G(q),H=s(75),B=G(H),P=s(57),C=G(P),U=s(41),$=G(U),W=s(28),X=G(W),J=s(59),tt=G(J),ot=s(60),lt=G(ot),ft=s(61),ut=G(ft),V=s(108),K=G(V),Y=s(62),Q=G(Y);function G(nt){return nt&&nt.__esModule?nt:{default:nt}}O.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":g.AlignClass,"attributors/class/background":a.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":f.SizeClass,"attributors/style/align":g.AlignStyle,"attributors/style/background":a.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":f.SizeStyle},!0),O.default.register({"formats/align":g.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":v.IndentClass,"formats/background":a.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":f.SizeClass,"formats/blockquote":o.default,"formats/code-block":N.default,"formats/header":e.default,"formats/list":l.default,"formats/bold":h.default,"formats/code":M.Code,"formats/italic":E.default,"formats/link":x.default,"formats/script":p.default,"formats/strike":w.default,"formats/underline":R.default,"formats/image":F.default,"formats/video":j.default,"formats/list/item":u.ListItem,"modules/formula":I.default,"modules/syntax":B.default,"modules/toolbar":C.default,"themes/bubble":K.default,"themes/snow":Q.default,"ui/icons":$.default,"ui/picker":X.default,"ui/icon-picker":lt.default,"ui/color-picker":tt.default,"ui/tooltip":ut.default},!0),c.default=O.default},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.IndentClass=void 0;var k=function(){function l(a,r){for(var i=0;i<r.length;i++){var f=r[i];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,r,i){return r&&l(a.prototype,r),i&&l(a,i),a}}(),O=function l(a,r,i){a===null&&(a=Function.prototype);var f=Object.getOwnPropertyDescriptor(a,r);if(f===void 0){var n=Object.getPrototypeOf(a);return n===null?void 0:l(n,r,i)}else{if("value"in f)return f.value;var h=f.get;return h===void 0?void 0:h.call(i)}},g=s(0),y=v(g);function v(l){return l&&l.__esModule?l:{default:l}}function d(l,a){if(!(l instanceof a))throw new TypeError("Cannot call a class as a function")}function o(l,a){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:l}function t(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);l.prototype=Object.create(a&&a.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(l,a):l.__proto__=a)}var e=function(l){t(a,l);function a(){return d(this,a),o(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return k(a,[{key:"add",value:function(i,f){if(f==="+1"||f==="-1"){var n=this.value(i)||0;f=f==="+1"?n+1:n-1}return f===0?(this.remove(i),!0):O(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"add",this).call(this,i,f)}},{key:"canAdd",value:function(i,f){return O(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"canAdd",this).call(this,i,f)||O(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"canAdd",this).call(this,i,parseInt(f))}},{key:"value",value:function(i){return parseInt(O(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"value",this).call(this,i))||void 0}}]),a}(y.default.Attributor.Class),u=new e("indent","ql-indent",{scope:y.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});c.IndentClass=u},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(4),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(t){d(e,t);function e(){return y(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(O.default);o.blotName="blockquote",o.tagName="blockquote",c.default=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function e(u,l){for(var a=0;a<l.length;a++){var r=l[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(u,r.key,r)}}return function(u,l,a){return l&&e(u.prototype,l),a&&e(u,a),u}}(),O=s(4),g=y(O);function y(e){return e&&e.__esModule?e:{default:e}}function v(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}function d(e,u){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:e}function o(e,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);e.prototype=Object.create(u&&u.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(e,u):e.__proto__=u)}var t=function(e){o(u,e);function u(){return v(this,u),d(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return k(u,null,[{key:"formats",value:function(a){return this.tagName.indexOf(a.tagName)+1}}]),u}(g.default);t.blotName="header",t.tagName=["H1","H2","H3","H4","H5","H6"],c.default=t},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.ListItem=void 0;var k=function(){function n(h,A){for(var E=0;E<A.length;E++){var T=A[E];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(h,T.key,T)}}return function(h,A,E){return A&&n(h.prototype,A),E&&n(h,E),h}}(),O=function n(h,A,E){h===null&&(h=Function.prototype);var T=Object.getOwnPropertyDescriptor(h,A);if(T===void 0){var x=Object.getPrototypeOf(h);return x===null?void 0:n(x,A,E)}else{if("value"in T)return T.value;var _=T.get;return _===void 0?void 0:_.call(E)}},g=s(0),y=e(g),v=s(4),d=e(v),o=s(25),t=e(o);function e(n){return n&&n.__esModule?n:{default:n}}function u(n,h,A){return h in n?Object.defineProperty(n,h,{value:A,enumerable:!0,configurable:!0,writable:!0}):n[h]=A,n}function l(n,h){if(!(n instanceof h))throw new TypeError("Cannot call a class as a function")}function a(n,h){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:n}function r(n,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);n.prototype=Object.create(h&&h.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(n,h):n.__proto__=h)}var i=function(n){r(h,n);function h(){return l(this,h),a(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return k(h,[{key:"format",value:function(E,T){E===f.blotName&&!T?this.replaceWith(y.default.create(this.statics.scope)):O(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,E,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():O(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(E,T){return this.parent.isolate(this.offset(this.parent),this.length()),E===this.parent.statics.blotName?(this.parent.replaceWith(E,T),this):(this.parent.unwrap(),O(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"replaceWith",this).call(this,E,T))}}],[{key:"formats",value:function(E){return E.tagName===this.tagName?void 0:O(h.__proto__||Object.getPrototypeOf(h),"formats",this).call(this,E)}}]),h}(d.default);i.blotName="list-item",i.tagName="LI";var f=function(n){r(h,n),k(h,null,[{key:"create",value:function(E){var T=E==="ordered"?"OL":"UL",x=O(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,T);return(E==="checked"||E==="unchecked")&&x.setAttribute("data-checked",E==="checked"),x}},{key:"formats",value:function(E){if(E.tagName==="OL")return"ordered";if(E.tagName==="UL")return E.hasAttribute("data-checked")?E.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function h(A){l(this,h);var E=a(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,A)),T=function(_){if(_.target.parentNode===A){var p=E.statics.formats(A),b=y.default.find(_.target);p==="checked"?b.format("list","unchecked"):p==="unchecked"&&b.format("list","checked")}};return A.addEventListener("touchstart",T),A.addEventListener("mousedown",T),E}return k(h,[{key:"format",value:function(E,T){this.children.length>0&&this.children.tail.format(E,T)}},{key:"formats",value:function(){return u({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(E,T){if(E instanceof i)O(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"insertBefore",this).call(this,E,T);else{var x=T==null?this.length():T.offset(this),_=this.split(x);_.parent.insertBefore(E,_)}}},{key:"optimize",value:function(E){O(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"optimize",this).call(this,E);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(E){if(E.statics.blotName!==this.statics.blotName){var T=y.default.create(this.statics.defaultChild);E.moveChildren(T),this.appendChild(T)}O(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"replace",this).call(this,E)}}]),h}(t.default);f.blotName="list",f.scope=y.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[i],c.ListItem=i,c.default=f},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(56),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(t){d(e,t);function e(){return y(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(O.default);o.blotName="italic",o.tagName=["EM","I"],c.default=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function u(l,a){for(var r=0;r<a.length;r++){var i=a[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,i.key,i)}}return function(l,a,r){return a&&u(l.prototype,a),r&&u(l,r),l}}(),O=function u(l,a,r){l===null&&(l=Function.prototype);var i=Object.getOwnPropertyDescriptor(l,a);if(i===void 0){var f=Object.getPrototypeOf(l);return f===null?void 0:u(f,a,r)}else{if("value"in i)return i.value;var n=i.get;return n===void 0?void 0:n.call(r)}},g=s(6),y=v(g);function v(u){return u&&u.__esModule?u:{default:u}}function d(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function o(u,l){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l&&(typeof l=="object"||typeof l=="function")?l:u}function t(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(u,l):u.__proto__=l)}var e=function(u){t(l,u);function l(){return d(this,l),o(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return k(l,null,[{key:"create",value:function(r){return r==="super"?document.createElement("sup"):r==="sub"?document.createElement("sub"):O(l.__proto__||Object.getPrototypeOf(l),"create",this).call(this,r)}},{key:"formats",value:function(r){if(r.tagName==="SUB")return"sub";if(r.tagName==="SUP")return"super"}}]),l}(y.default);e.blotName="script",e.tagName=["SUB","SUP"],c.default=e},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(6),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(t){d(e,t);function e(){return y(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(O.default);o.blotName="strike",o.tagName="S",c.default=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=s(6),O=g(k);function g(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(t){d(e,t);function e(){return y(this,e),v(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(O.default);o.blotName="underline",o.tagName="U",c.default=o},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function a(r,i){for(var f=0;f<i.length;f++){var n=i[f];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}return function(r,i,f){return i&&a(r.prototype,i),f&&a(r,f),r}}(),O=function a(r,i,f){r===null&&(r=Function.prototype);var n=Object.getOwnPropertyDescriptor(r,i);if(n===void 0){var h=Object.getPrototypeOf(r);return h===null?void 0:a(h,i,f)}else{if("value"in n)return n.value;var A=n.get;return A===void 0?void 0:A.call(f)}},g=s(0),y=d(g),v=s(27);function d(a){return a&&a.__esModule?a:{default:a}}function o(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function t(a,r){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:a}function e(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);a.prototype=Object.create(r&&r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(a,r):a.__proto__=r)}var u=["alt","height","width"],l=function(a){e(r,a);function r(){return o(this,r),t(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return k(r,[{key:"format",value:function(f,n){u.indexOf(f)>-1?n?this.domNode.setAttribute(f,n):this.domNode.removeAttribute(f):O(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,f,n)}}],[{key:"create",value:function(f){var n=O(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,f);return typeof f=="string"&&n.setAttribute("src",this.sanitize(f)),n}},{key:"formats",value:function(f){return u.reduce(function(n,h){return f.hasAttribute(h)&&(n[h]=f.getAttribute(h)),n},{})}},{key:"match",value:function(f){return/\.(jpe?g|gif|png)$/.test(f)||/^data:image\/.+;base64/.test(f)}},{key:"sanitize",value:function(f){return(0,v.sanitize)(f,["http","https","data"])?f:"//:0"}},{key:"value",value:function(f){return f.getAttribute("src")}}]),r}(y.default.Embed);l.blotName="image",l.tagName="IMG",c.default=l},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0});var k=function(){function a(r,i){for(var f=0;f<i.length;f++){var n=i[f];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}return function(r,i,f){return i&&a(r.prototype,i),f&&a(r,f),r}}(),O=function a(r,i,f){r===null&&(r=Function.prototype);var n=Object.getOwnPropertyDescriptor(r,i);if(n===void 0){var h=Object.getPrototypeOf(r);return h===null?void 0:a(h,i,f)}else{if("value"in n)return n.value;var A=n.get;return A===void 0?void 0:A.call(f)}},g=s(4),y=s(27),v=d(y);function d(a){return a&&a.__esModule?a:{default:a}}function o(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function t(a,r){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:a}function e(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);a.prototype=Object.create(r&&r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(a,r):a.__proto__=r)}var u=["height","width"],l=function(a){e(r,a);function r(){return o(this,r),t(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return k(r,[{key:"format",value:function(f,n){u.indexOf(f)>-1?n?this.domNode.setAttribute(f,n):this.domNode.removeAttribute(f):O(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,f,n)}}],[{key:"create",value:function(f){var n=O(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,f);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(f)),n}},{key:"formats",value:function(f){return u.reduce(function(n,h){return f.hasAttribute(h)&&(n[h]=f.getAttribute(h)),n},{})}},{key:"sanitize",value:function(f){return v.default.sanitize(f)}},{key:"value",value:function(f){return f.getAttribute("src")}}]),r}(g.BlockEmbed);l.blotName="video",l.className="ql-video",l.tagName="IFRAME",c.default=l},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.FormulaBlot=void 0;var k=function(){function f(n,h){for(var A=0;A<h.length;A++){var E=h[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}return function(n,h,A){return h&&f(n.prototype,h),A&&f(n,A),n}}(),O=function f(n,h,A){n===null&&(n=Function.prototype);var E=Object.getOwnPropertyDescriptor(n,h);if(E===void 0){var T=Object.getPrototypeOf(n);return T===null?void 0:f(T,h,A)}else{if("value"in E)return E.value;var x=E.get;return x===void 0?void 0:x.call(A)}},g=s(35),y=e(g),v=s(5),d=e(v),o=s(9),t=e(o);function e(f){return f&&f.__esModule?f:{default:f}}function u(f,n){if(!(f instanceof n))throw new TypeError("Cannot call a class as a function")}function l(f,n){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:f}function a(f,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);f.prototype=Object.create(n&&n.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(f,n):f.__proto__=n)}var r=function(f){a(n,f);function n(){return u(this,n),l(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return k(n,null,[{key:"create",value:function(A){var E=O(n.__proto__||Object.getPrototypeOf(n),"create",this).call(this,A);return typeof A=="string"&&(window.katex.render(A,E,{throwOnError:!1,errorColor:"#f00"}),E.setAttribute("data-value",A)),E}},{key:"value",value:function(A){return A.getAttribute("data-value")}}]),n}(y.default);r.blotName="formula",r.className="ql-formula",r.tagName="SPAN";var i=function(f){a(n,f),k(n,null,[{key:"register",value:function(){d.default.register(r,!0)}}]);function n(){u(this,n);var h=l(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return h}return n}(t.default);c.FormulaBlot=r,c.default=i},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.CodeToken=c.CodeBlock=void 0;var k=function(){function A(E,T){for(var x=0;x<T.length;x++){var _=T[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(E,_.key,_)}}return function(E,T,x){return T&&A(E.prototype,T),x&&A(E,x),E}}(),O=function A(E,T,x){E===null&&(E=Function.prototype);var _=Object.getOwnPropertyDescriptor(E,T);if(_===void 0){var p=Object.getPrototypeOf(E);return p===null?void 0:A(p,T,x)}else{if("value"in _)return _.value;var b=_.get;return b===void 0?void 0:b.call(x)}},g=s(0),y=l(g),v=s(5),d=l(v),o=s(9),t=l(o),e=s(13),u=l(e);function l(A){return A&&A.__esModule?A:{default:A}}function a(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function r(A,E){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:A}function i(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(A,E):A.__proto__=E)}var f=function(A){i(E,A);function E(){return a(this,E),r(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return k(E,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var _=this.domNode.textContent;this.cachedText!==_&&((_.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(_),this.domNode.normalize(),this.attach()),this.cachedText=_)}}]),E}(u.default);f.className="ql-syntax";var n=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),h=function(A){i(E,A),k(E,null,[{key:"register",value:function(){d.default.register(n,!0),d.default.register(f,!0)}}]);function E(T,x){a(this,E);var _=r(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,T,x));if(typeof _.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var p=null;return _.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(p),p=setTimeout(function(){_.highlight(),p=null},_.options.interval)}),_.highlight(),_}return k(E,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var _=this.quill.getSelection();this.quill.scroll.descendants(f).forEach(function(p){p.highlight(x.options.highlight)}),this.quill.update(d.default.sources.SILENT),_!=null&&this.quill.setSelection(_,d.default.sources.SILENT)}}}]),E}(t.default);h.DEFAULTS={highlight:function(){return window.hljs==null?null:function(A){var E=window.hljs.highlightAuto(A);return E.value}}(),interval:1e3},c.CodeBlock=f,c.CodeToken=n,c.default=h},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(m,c){m.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(m,c){m.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(m,c){m.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(m,c){m.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(m,c){m.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(m,c,s){Object.defineProperty(c,"__esModule",{value:!0}),c.default=c.BubbleTooltip=void 0;var k=function E(T,x,_){T===null&&(T=Function.prototype);var p=Object.getOwnPropertyDescriptor(T,x);if(p===void 0){var b=Object.getPrototypeOf(T);return b===null?void 0:E(b,x,_)}else{if("value"in p)return p.value;var w=p.get;return w===void 0?void 0:w.call(_)}},O=function(){function E(T,x){for(var _=0;_<x.length;_++){var p=x[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(T,p.key,p)}}return function(T,x,_){return x&&E(T.prototype,x),_&&E(T,_),T}}(),g=s(3),y=a(g),v=s(8),d=a(v),o=s(43),t=a(o),e=s(15),u=s(41),l=a(u);function a(E){return E&&E.__esModule?E:{default:E}}function r(E,T){if(!(E instanceof T))throw new TypeError("Cannot call a class as a function")}function i(E,T){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:E}function f(E,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);E.prototype=Object.create(T&&T.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(E,T):E.__proto__=T)}var n=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],h=function(E){f(T,E);function T(x,_){r(this,T),_.modules.toolbar!=null&&_.modules.toolbar.container==null&&(_.modules.toolbar.container=n);var p=i(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,_));return p.quill.container.classList.add("ql-bubble"),p}return O(T,[{key:"extendToolbar",value:function(_){this.tooltip=new A(this.quill,this.options.bounds),this.tooltip.root.appendChild(_.container),this.buildButtons([].slice.call(_.container.querySelectorAll("button")),l.default),this.buildPickers([].slice.call(_.container.querySelectorAll("select")),l.default)}}]),T}(t.default);h.DEFAULTS=(0,y.default)(!0,{},t.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var A=function(E){f(T,E);function T(x,_){r(this,T);var p=i(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,x,_));return p.quill.on(d.default.events.EDITOR_CHANGE,function(b,w,S,R){if(b===d.default.events.SELECTION_CHANGE)if(w!=null&&w.length>0&&R===d.default.sources.USER){p.show(),p.root.style.left="0px",p.root.style.width="",p.root.style.width=p.root.offsetWidth+"px";var D=p.quill.getLines(w.index,w.length);if(D.length===1)p.position(p.quill.getBounds(w));else{var F=D[D.length-1],Z=p.quill.getIndex(F),j=Math.min(F.length()-1,w.index+w.length-Z),M=p.quill.getBounds(new e.Range(Z,j));p.position(M)}}else document.activeElement!==p.textbox&&p.quill.hasFocus()&&p.hide()}),p}return O(T,[{key:"listen",value:function(){var _=this;k(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){_.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!_.root.classList.contains("ql-hidden")){var p=_.quill.getSelection();p!=null&&_.position(_.quill.getBounds(p))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(_){var p=k(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,_),b=this.root.querySelector(".ql-tooltip-arrow");if(b.style.marginLeft="",p===0)return p;b.style.marginLeft=-1*p-b.offsetWidth/2+"px"}}]),T}(o.BaseTooltip);A.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),c.BubbleTooltip=A,c.default=h},function(m,c,s){m.exports=s(63)}]).default})})($t);const et=Bt(Ot);class zt{constructor(L,m){this.quill=L,this.options={defaultLength:1,...m},this.container=m.container,L.on("text-change",this.update.bind(this)),this.update()}update(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild);const L=this.quill.getLines();if(this.options.defaultLength>L.length)for(let s=L.length;this.options.defaultLength>s;s++)L.push({});let m=0;for(let s=0;s<L.length;s++){const k=L[s].domNode?L[s].domNode.offsetHeight:25,O=document.createElement("div");O.style.minHeight=`${k}px`,O.innerHTML=s+1,this.container.appendChild(O),m+=k}const c=this.quill.container.querySelector(".ql-editor");if(c){const s=window.getComputedStyle(c);c.style.minHeight=`${m+parseInt(s.getPropertyValue("padding-top"))+parseInt(s.getPropertyValue("padding-bottom"))}px`}}}et.register("modules/lineNumbers",zt,!0);const Vt=(z,L,m)=>{const c=z;return Object.keys(L).forEach(s=>{-1<m.indexOf(s)?c.dataset[s]=L[s]:delete c.dataset[s]}),c},At=(z,L)=>L.reduce((m,c)=>{const s=z.lastIndexOf(c);return s>m.mentionCharIndex?{mentionChar:c,mentionCharIndex:s}:{mentionChar:m.mentionChar,mentionCharIndex:m.mentionCharIndex}},{mentionChar:null,mentionCharIndex:-1}),Kt=(z,L)=>L.test(z),Wt=(z,L,m)=>-1<z?!(m&&!(z===0||L[z-1].match(/\s/g))):!1,Zt=et.import("blots/embed");class vt extends Zt{constructor(L){super(L),this.clickHandler=this.clickHandler.bind(this),L.addEventListener("click",this.clickHandler)}static getQuillInstance(L){let m=et.find(L);if(m){for(;m.parent;)m=m.parent;return m.domNode.parentNode?et.find(m.domNode.parentNode):null}}clickHandler(){const L=vt.getQuillInstance(this.domNode),m=L.getModule("mention");if(m.currentBlot=this,m.currentNode=this.domNode,m.isOpen)return this.domNode.querySelector(".aioseo-tag .tag-toggle svg").classList.remove("rotated"),m.hideMentionList();this.domNode.querySelector(".aioseo-tag .tag-toggle svg").classList.add("rotated"),m.mentionCharPos=this.offset(L.scroll),m.options.source("",m.renderList.bind(m,this.domNode.dataset.denotationChar),this.domNode.dataset.denotationChar)}static create(L){const m=super.create(),c=document.createElement("span");if(c.className="ql-mention-denotation-char",c.innerHTML=L.denotationChar,m.appendChild(c),m.innerHTML+=L.value,L.custom&&L.customValue){let s=m.querySelector(".tag-custom");if(!s){s=document.createElement("span"),s.classList.add("tag-custom");const k=m.querySelector(".tag-name");k.parentNode.insertBefore(s,k.nextSibling)}s.innerText=" - "+(L.customValue||"")}return setTimeout(()=>{const s=vt.getQuillInstance(m);if(s){const k=s.getModule("mention");k.currentNode=m}},0),vt.setDataValues(m,L)}static setDataValues(L,m){const c=L;return Object.keys(m).forEach(s=>{c.dataset[s]=m[s]}),c}static value(L){return L.dataset}format(L,m){L==="customValue"&&m?this.domNode.dataset.customValue=m:super.format(L,m)}}vt.blotName="mention";vt.tagName="span";vt.className="mention";et.register(vt);const dt={TAB:9,ENTER:13,ESCAPE:27,UP:38,DOWN:40};class Gt{constructor(L,m){this.isOpen=!1,this.itemIndex=0,this.mentionCharPos=null,this.cursorPos=null,this.values=[],this.suspendMouseEnter=!1,this.activeElement=null,this.currentBlot=null,this.currentNode=null,this.quill=L,this.silentInsert=!1,this.insertingCustomItem=!1,this.options={source:null,renderItem(g){return`${g.value}`},onSelect(g,y){y(g)},mentionDenotationChars:["@"],showDenotationChar:!0,allowedChars:/^[a-zA-Z0-9_]*$/,minChars:0,maxChars:1e3,offsetTop:2,offsetLeft:0,isolateCharacter:!1,fixMentionsToQuill:!1,defaultMenuOrientation:"bottom",dataAttributes:["id","value","denotationChar","link","target"],linkTarget:"_blank",onOpen(){return!0},onClose(){return!0},listItemClass:"ql-mention-list-item",mentionContainerClass:"ql-mention-list-container",mentionListClass:"ql-mention-list",spaceAfterInsert:!0},Object.assign(this.options,m,{dataAttributes:Array.isArray(m.dataAttributes)?this.options.dataAttributes.concat(m.dataAttributes):this.options.dataAttributes}),this.mentionContainer=document.createElement("div"),this.mentionContainer.className=this.options.mentionContainerClass?this.options.mentionContainerClass:"",this.mentionContainer.style.cssText="display: none; position: absolute;",this.mentionContainer.onmousemove=this.onContainerMouseMove.bind(this),this.options.fixMentionsToQuill&&(this.mentionContainer.style.width="auto"),this.customFieldInput=document.createElement("div"),this.customFieldInput.className=this.options.mentionPrependClassCustom?this.options.mentionPrependClassCustom:"",this.customFieldInput.innerHTML=this.options.customFieldInput||"",this.mentionContainer.appendChild(this.customFieldInput),this.mentionSearch=document.createElement("div"),this.mentionSearch.className=this.options.mentionPrependClass?this.options.mentionPrependClass:"",this.mentionSearch.innerHTML=this.options.prependMentionList||"",this.mentionContainer.appendChild(this.mentionSearch);const c=this.mentionSearch.querySelector(".aioseo-trash");c&&c.addEventListener("click",()=>{this.currentBlot.remove(),this.hideMentionList(),this.removeOrphanedMentionChar()}),this.customFieldInput.addEventListener("click",g=>{this.activeElement=g.target;const y=g.target.querySelector("input");y&&setTimeout(()=>{y.focus()},0)});const s=this.customFieldInput.querySelector("input");s&&s.addEventListener("input",g=>{if(this.currentNode){let y=this.currentNode.querySelector(".tag-custom");if(!y){y=document.createElement("span"),y.classList.add("tag-custom");const v=this.currentNode.querySelector(".tag-name");v.parentNode.insertBefore(y,v.nextSibling)}y.innerText=g.target.value?" - "+g.target.value:"",this.currentBlot=et.find(this.currentNode),this.currentBlot.format("customValue",g.target.value)}}),this.customFieldInput.addEventListener("keydown",g=>{g.keyCode===13&&(this.hideMentionList(),this.removeOrphanedMentionChar()),g.keyCode===27&&(this.hideMentionList(),this.removeOrphanedMentionChar()),g.keyCode===32&&g.preventDefault()}),this.mentionSearch.addEventListener("click",g=>{this.activeElement=g.target}),this.mentionSearch.addEventListener("keydown",g=>{g.keyCode===40&&this.nextItem(),g.keyCode===38&&this.prevItem(),g.keyCode===13&&this.selectItem(),g.keyCode===27&&this.hideMentionList()});const k=this.mentionSearch.querySelector("input");k&&k.addEventListener("input",g=>{const y=this.getTextBeforeCursor(),{mentionChar:v}=At(y,this.options.mentionDenotationChars);if(!v&&!this.currentBlot)return;const d=v||this.currentBlot.domNode.dataset.denotationChar;this.options.source(g.target.value,this.renderList.bind(this,d),d)}),this.mentionList=document.createElement("ul"),this.mentionList.className=this.options.mentionListClass?this.options.mentionListClass:"",this.mentionContainer.appendChild(this.mentionList);const O=document.createElement("div");O.className="aioseo-documentation-link",O.innerHTML=this.options.documentationDiv||"",O.addEventListener("click",g=>{this.activeElement=g.target}),this.mentionContainer.appendChild(O),this.quill.container.appendChild(this.mentionContainer),L.on("text-change",this.onTextChange.bind(this)),L.on("selection-change",this.onSelectionChange.bind(this)),L.keyboard.addBinding({key:dt.TAB},this.selectHandler.bind(this)),L.keyboard.bindings[dt.TAB].unshift(L.keyboard.bindings[dt.TAB].pop()),L.keyboard.addBinding({key:dt.ENTER},this.selectHandler.bind(this)),L.keyboard.bindings[dt.ENTER].unshift(L.keyboard.bindings[dt.ENTER].pop()),L.keyboard.addBinding({key:dt.ESCAPE},this.escapeHandler.bind(this)),L.keyboard.addBinding({key:dt.UP},this.upHandler.bind(this)),L.keyboard.addBinding({key:dt.DOWN},this.downHandler.bind(this)),L.clipboard.addMatcher(Node.TEXT_NODE,this.clipboardHandler.bind(this))}selectHandler(){return this.isOpen?(this.selectItem(),!1):!0}escapeHandler(){return this.isOpen?(this.hideMentionList(),this.removeOrphanedMentionChar(),!1):!0}removeOrphanedMentionChar(){let L=!1;this.quill.hasFocus()||(this.quill.focus(),L=!0);const m=this.getTextBeforeCursor();m.charAt(m.length-1)==="#"&&this.quill.deleteText(this.quill.getSelection().index-1,1,et.sources.USER),L&&this.quill.blur()}upHandler(){return this.isOpen?(this.prevItem(),!1):!0}downHandler(){return this.isOpen?(this.nextItem(),!1):!0}clipboardHandler(L,m){if(typeof L.data!="string")return;const c=new RegExp(`${this.options.mentionDenotationChars.join("|")}[A-Za-z_-]+`,"g"),s=L.data.match(c);if(s&&0<s.length){const k=[];let O=L.data;this.mentionCharPos=0,s.forEach(g=>{const y=g.charAt(0),v=g.substr(1).split("-"),d=v[0];delete v[0];const o=v.filter(a=>a).join("-"),t=this.options.source(d,this.renderList.bind(this,y),y,!0,o||null);if(!t)return;const e={denotationChar:this.options.showDenotationChar?y:"",...t};o!==void 0&&(e.customValue=o);const u=O.split(g),l=u.shift();k.push({insert:l}),k.push({insert:{mention:e}}),O=u.join(g)}),k.push({insert:O}),m.ops=k}return m}showMentionList(){if(this.mentionContainer.style.visibility="hidden",this.mentionContainer.style.display="",this.setMentionContainerPosition(),this.customFieldInput.style.display="none",this.currentNode&&this.currentNode.dataset.custom){this.customFieldInput.style.display="block";const m=this.customFieldInput&&this.customFieldInput.querySelector("input"),c=this.currentNode.querySelector(".tag-custom");m&&c&&(m.value=c.innerText.replace(" - ",""))}const L=this.mentionSearch.querySelector(".aioseo-trash");L&&(L.style.display="block",this.currentBlot||(L.style.display="none")),this.setIsOpen(!0)}hideMentionList(){document.querySelectorAll(".aioseo-tag .tag-toggle svg").forEach(s=>{s.classList.remove("rotated")});const m=this.mentionSearch&&this.mentionSearch.querySelector("input");m&&(m.value="");const c=this.customFieldInput&&this.customFieldInput.querySelector("input");c&&(c.value=""),this.currentBlot=null,this.currentNode=null,this.mentionContainer.style.display="none",this.setIsOpen(!1)}highlightItem(L=!0){if(this.mentionList.childNodes[this.itemIndex]){for(let m=0;m<this.mentionList.childNodes.length;m+=1)this.mentionList.childNodes[m].classList.remove("selected");if(this.mentionList.childNodes[this.itemIndex].classList.add("selected"),L){const m=this.mentionList.childNodes[this.itemIndex].offsetHeight,c=this.itemIndex*m,s=this.mentionContainer.scrollTop,k=s+this.mentionContainer.offsetHeight;c<s?this.mentionContainer.scrollTop=c:c>k-m&&(this.mentionContainer.scrollTop+=c-k+m)}}}getItemData(){const{link:L}=this.mentionList.childNodes[this.itemIndex].dataset,m=typeof L<"u",c=this.mentionList.childNodes[this.itemIndex].dataset.target;return m&&(this.mentionList.childNodes[this.itemIndex].dataset.value=`<a href="${L}" target=${c||this.options.linkTarget}>${this.mentionList.childNodes[this.itemIndex].dataset.value}`),this.mentionList.childNodes[this.itemIndex].dataset}onContainerMouseMove(){this.suspendMouseEnter=!1}selectItem(){const L=this.getItemData();if(!L.id)return this.hideMentionList();this.options.onSelect(L,m=>{this.insertItem(m)}),L.custom||this.hideMentionList()}insertItem(L){const m=L;if(m===null)return;this.options.showDenotationChar||(m.denotationChar=""),L.custom&&(this.insertingCustomItem=!0,setTimeout(()=>{this.insertingCustomItem=!1},50),this.customFieldInput.style.display="block",this.customFieldInput.click());const c=this.mentionCharPos;this.quill.deleteText(this.mentionCharPos,this.cursorPos-this.mentionCharPos,et.sources.USER),this.quill.insertEmbed(c,"mention",m,et.sources.USER),this.options.spaceAfterInsert?(this.quill.insertText(c+1," ",et.sources.USER),this.quill.setSelection(c+2,et.sources.USER)):this.quill.setSelection(c+1,et.sources.USER),L.custom||this.hideMentionList()}onItemMouseEnter(L){if(this.suspendMouseEnter)return;const m=Number(L.target.dataset.index);!Number.isNaN(m)&&m!==this.itemIndex&&(this.itemIndex=m,this.highlightItem(!1))}onItemClick(L){L.preventDefault(),L.stopImmediatePropagation(),this.itemIndex=L.currentTarget.dataset.index,this.highlightItem(),this.selectItem()}renderList(L,m,c,s=!1,k=!1){if(this.mentionList.innerHTML="",m&&0<m.length){if(this.values=m,this.values.length===1&&(this.values[0].name===c||this.values[0].id===c)){if(s)return this.values[0];this.insertItem(this.values[0]);return}else if(s){const O=this.values.find(g=>g.name===c||g.id===c);if(O)return O}else if(k){const O=this.values.find(g=>g.name===c||g.id===c);O&&this.insertItem(O)}for(let O=0;O<m.length;O+=1){const g=document.createElement("li");g.className=this.options.listItemClass?this.options.listItemClass:"",g.dataset.index=O,g.innerHTML=this.options.renderItem(m[O],c),g.onmouseenter=this.onItemMouseEnter.bind(this),g.dataset.denotationChar=L,g.onclick=this.onItemClick.bind(this),this.mentionList.appendChild(Vt(g,m[O],this.options.dataAttributes))}this.itemIndex=0,this.highlightItem()}else{const O=document.createElement("li");O.className=this.options.listItemClassNoMatch?this.options.listItemClassNoMatch:"",O.innerHTML=this.options.renderItemNoMatch(),this.mentionList.appendChild(O)}this.showMentionList()}nextItem(){this.itemIndex=(this.itemIndex+1)%this.values.length,this.suspendMouseEnter=!0,this.highlightItem()}prevItem(){this.itemIndex=(this.itemIndex+this.values.length-1)%this.values.length,this.suspendMouseEnter=!0,this.highlightItem()}containerBottomIsNotVisible(){return this.mentionContainer.getBoundingClientRect().bottom>window.innerHeight}containerRightIsNotVisible(L,m){return this.options.fixMentionsToQuill?!1:m.width<L+this.mentionContainer.offsetWidth}setIsOpen(L){this.isOpen!==L&&(L?this.options.onOpen():this.options.onClose(),this.isOpen=L)}setMentionContainerPosition(){const L=this.quill.container.getBoundingClientRect(),m=this.quill.getBounds(this.mentionCharPos),c=this.mentionContainer.offsetHeight;let s=this.options.offsetTop,k=this.options.offsetLeft;if(this.options.fixMentionsToQuill?this.mentionContainer.style.right=`${0}px`:k+=m.left,this.containerRightIsNotVisible(k,L)){const O=this.mentionContainer.offsetWidth+this.options.offsetLeft;k=L.width-O}if(this.options.defaultMenuOrientation==="top"){if(this.options.fixMentionsToQuill?s=-1*(c+this.options.offsetTop):s=m.top-(c+this.options.offsetTop),0>=s+L.top){let O=this.options.offsetTop;this.options.fixMentionsToQuill?O+=L.height:O+=m.bottom,s=O}}else if(this.options.fixMentionsToQuill?s+=L.height:s+=m.bottom,this.containerBottomIsNotVisible(s,L)){let O=this.options.offsetTop*-1;this.options.fixMentionsToQuill||(O+=m.top),s=O-c}0<=s?this.options.mentionContainerClass.split(" ").forEach(O=>{this.mentionContainer.classList.add(`${O}-bottom`),this.mentionContainer.classList.remove(`${O}-top`)}):this.options.mentionContainerClass.split(" ").forEach(O=>{this.mentionContainer.classList.add(`${O}-top`),this.mentionContainer.classList.remove(`${O}-bottom`)}),this.mentionContainer.style.top=`${s}px`,this.mentionContainer.style.left=`${k}px`,this.mentionContainer.style.visibility="visible"}getTextBeforeCursor(){const L=Math.max(0,this.cursorPos-this.options.maxChars);return this.quill.getText(L,this.cursorPos-L)}onSomethingChange(){const L=this.quill.getSelection();if(L===null||this.insertingCustomItem)return;this.cursorPos=L.index;const m=this.getTextBeforeCursor(),{mentionChar:c,mentionCharIndex:s}=At(m,this.options.mentionDenotationChars);if(Wt(s,m,this.options.isolateCharacter)){const k=this.cursorPos-(m.length-s);this.mentionCharPos=k;const O=m.substring(s+c.length);O.length>=this.options.minChars&&Kt(O,this.options.allowedChars)?this.options.source(O,this.renderList.bind(this,c),c):this.hideMentionList()}else this.hideMentionList()}onTextChange(L,m,c){c==="user"&&this.onSomethingChange()}onSelectionChange(L){L&&L.length===0?this.onSomethingChange():setTimeout(()=>{this.activeElement?this.activeElement.classList.contains("aioseo-tag-custom")||(this.activeElement=null):this.hideMentionList()},0)}}et.register("modules/mention",Gt);const Yt=et.import("modules/clipboard"),bt=et.import("formats/code"),yt=et.import("delta");class Qt extends Yt{onPaste(L){const m=this,c=this.options,s=this.quill.getSelection(),k=this.quill.scrollingContainer.scrollTop;let O=new yt().retain(s.index);L.defaultPrevented||!this.quill.isEnabled()||(this.container.focus(),this.quill.selection.update(et.sources.SILENT),setTimeout(function(){O=O.concat(m.convert()).delete(s.length),c.newLines===!1&&O.ops.map(function(g){return typeof g.insert=="string"&&(g.insert=g.insert.replace(/(\r\n|\n|\r)/gm," ")),g}),m.quill.updateContents(O,et.sources.USER),m.quill.setSelection(O.length()-s.length,et.sources.SILENT),m.quill.scrollingContainer.scrollTop=k,m.quill.focus()},1))}convert(L){if(typeof L=="string")return this.container.innerHTML=L.replace(/>\r?\n +</g,"><"),this.convert();const m=this.quill.getFormat(this.quill.selection.savedRange.index);if(m[bt.blotName]){const O=this.container.innerText;return this.container.innerHTML="",new yt().insert(O,{[bt.blotName]:m[bt.blotName]})}const[c,s]=this.prepareMatching();s[0]=te;let k=Lt(this.container,c,s);return Jt(k,`
`)&&k.ops[k.ops.length-1].attributes===null&&(k=k.compose(new yt().retain(k.length()-1).delete(1))),this.container.innerHTML="",k}}const Xt="__ql-matcher";function Lt(z,L,m){return z.nodeType===z.TEXT_NODE?m.reduce(function(s,k){return k(z,s)},new yt):z.nodeType===z.ELEMENT_NODE?[].reduce.call(z.childNodes||[],(c,s)=>{let k=Lt(s,L,m);return s.nodeType===z.ELEMENT_NODE&&(k=L.reduce(function(O,g){return g(s,O)},k),k=(s[Xt]||[]).reduce(function(O,g){return g(s,O)},k)),c.concat(k)},new yt):new yt}function Jt(z,L){let m="";for(let c=z.ops.length-1;0<=c&&m.length<L.length;--c){const s=z.ops[c];if(typeof s.insert!="string")break;m=s.insert+m}return m.slice(-1*L.length)===L}function te(z,L){let m=z.data;if(z.parentNode.tagName==="O:P")return L.insert(m.trim());if(!Pt(z.parentNode).whiteSpace.startsWith("pre")){const c=function(s,k){return k=k.replace(/[^\u00a0]/g,""),1>k.length&&s?" ":k};m=m.replace(/\r\n/g," ").replace(/\n/g," "),m=m.replace(/\s\s+/g,c.bind(c,!0)),(z.previousSibling===null&&mt(z.parentNode)||z.previousSibling!==null&&mt(z.previousSibling))&&(m=m.replace(/^\s+/,c.bind(c,!1))),(z.nextSibling===null&&mt(z.parentNode)||z.nextSibling!==null&&mt(z.nextSibling))&&(m=m.replace(/\s+$/,c.bind(c,!1)))}return L.insert(m)}function Pt(z){if(z.nodeType!==Node.ELEMENT_NODE)return{};const L="__ql-computed-style";return z[L]||(z[L]=window.getComputedStyle(z))}function mt(z){if(z.childNodes.length===0)return!1;const L=Pt(z);return-1<["block","list-item"].indexOf(L.display)}et.register("modules/clipboard",Qt,!0);class ee{constructor(L,m){this.quill=L,this.options=m,this.container=document.querySelector(m.container),L.on("text-change",this.update.bind(this)),this.update()}calculate(){let L=this.quill.getText()?this.quill.root.innerHTML:"";const m=document.createRange().createContextualFragment(L),c=document.createRange().createContextualFragment("");m.childNodes.forEach(k=>{if(k.tagName!=="P")return;k.childNodes.forEach(g=>{if(g.nodeType===3){c.appendChild(g.cloneNode(!0));return}if(g.tagName==="SPAN"){const y=g.querySelector(".aioseo-tag .tag-name");if(y){const v=this.options.tags.find(o=>o.name===y.textContent),d=document.createTextNode(this.decodeHTMLEntities(v.valueText));c.appendChild(d)}}});const O=document.createElement("br");c.appendChild(O)}),c.normalize();const s=document.createElement("div");return s.appendChild(c.cloneNode(!0)),L=s.innerHTML.replace(/ /gi," ").replace(/<br\s*[/]?>/gi,this.single?"":`
`).trim(),{length:this.decodeHTMLEntities(L).length,text:L}}update(){const{length:L}=this.calculate();let m=this.options.unit;L!==1&&(m+="s"),this.container&&(this.container.innerText=L+" "+m)}decodeHTMLEntities(L){const m=document.createElement("div");return L&&typeof L=="string"&&(L=L.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),L=L.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,""),m.innerHTML=L,L=m.textContent),L}}et.register("modules/counter",ee);const ne=et.import("modules/toolbar");class qt extends ne{}qt.DEFAULTS.handlers.autoLink=function(){const z=this.quill.getSelection(),L=this.quill.getModule("autoLink"),m=this.quill.getContents();m.ops.forEach(c=>{c.attributes&&c.attributes.link&&delete c.attributes.link}),this.quill.setContents(m,et.sources.SILENT),this.quill.setSelection(z,et.sources.SILENT),this.quill.format("link",L.options.url,et.sources.USER)};et.register("modules/toolbar",qt,!0);class re{constructor(L,m){this.quill=L,this.options=m,this.container=document.querySelector(m.container)}}et.register("modules/autoLink",re,!0);const Et=(z,L,m)=>(z.forEach(c=>{m[c]&&L.setAttribute(c,m[c]),c==="data-*"&&Object.keys(m).forEach(s=>{s.indexOf("data-")===0&&L.setAttribute(s,m[s])})}),L),Tt=(z,L)=>z.reduce((m,c)=>(L.hasAttribute(c)&&(m[c]=L.getAttribute(c)),c==="data-*"&&Object.keys(L.dataset).forEach(s=>{s="data-"+s.replace(/[A-Z]/g,k=>`-${k.toLowerCase()}`),m[s]=L.getAttribute(s)}),m),{}),ie=et.import("formats/link"),_t=["href","rel","target","class","data-*","style"];class It extends ie{static create(L){typeof L=="string"&&(L=this.linkAttributesCache);const m=Et(_t,super.create(L),L);return _t.forEach(c=>{c==="href"&&(L[c]=this.sanitize(L[c]),m.setAttribute(c,L[c]))}),this.linkAttributesCache=L,m}static formats(L){return Tt(_t,L)}}kt(It,"linkAttributesCache",{});et.register("formats/link",It,!0);const gt=["style","class","data-*"],oe=et.import("blots/inline");class Nt extends oe{static create(L){return Et(gt,super.create(L),L)}static formats(L){return Tt(gt,L)}}Nt.blotName="aioseoInline";Nt.tagName="aioseo-inline";et.register("formats/aioseoInline",Nt,!0);const le=et.import("formats/italic");class ae extends le{static create(L){return Et(gt,super.create(L),L)}static formats(L){return Tt(gt,L)}}et.register("formats/italic",ae,!0);class se{constructor(L){L.container.style.whiteSpace="pre-line"}}et.register("modules/preserveWhiteSpace",se);const ue={};var fe=function(){var L=this,m=L._self._c;return m("svg",{staticClass:"aioseo-plus",attrs:{viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[m("path",{attrs:{d:"M6 0.00115967H4V4.00116H0V6.00116H4V10.0012H6V6.00116H10V4.00116H6V0.00115967Z",fill:"currentColor"}})])},ce=[],he=xt(ue,fe,ce,!1,null,null,null,null);const de=he.exports;const pe={components:{SvgCaret:Dt,SvgPlus:de,SvgTrash:Ft},props:{value:{type:String,default:""},minimumLineNumbers:{type:Number,default(){return 5}},single:Boolean,lineNumbers:Boolean,allowTags:Boolean,disabled:Boolean,tagsContext:String,forceUpdates:Boolean,monospace:Boolean,defaultMenuOrientation:String,description:Boolean,showToolbar:Boolean,preserveWhitespace:Boolean,autoLink:{type:[Object,Boolean],default(){return!1}}},data(){return{localTags:[],quill:null,html:"",insertExact:!1,cachedPhrase:"",strings:{searchPlaceholder:this.$t.__("Search for an item...",this.$td),enterCustomFieldName:this.$t.__("Enter a custom field name...",this.$td),learnMoreSmartTags:this.$t.__("Learn more about Smart Tags",this.$td),removeSmartTag:this.$t.__("Remove Smart Tag",this.$td)}}},watch:{disabled(){this.disabled?this.quill.disable():this.quill.enable()},value(){this.forceUpdates&&this.startup(!0)},liveTags:{deep:!0,handler(){this.localTags=this.getTags();const z=this.quill.getModule("counter");z&&(z.options.tags=this.localTags,this.$emit("counter",z.calculate()))}},tags:{deep:!0,handler(){const z=this.getTags();JSON.stringify(this.localTags)!==JSON.stringify(z)&&(this.localTags=z,this.startup(!0))}}},computed:{...wt(["currentPost","tags"]),...wt("live-tags",["liveTags"])},methods:{emitPasteEvent(z){this.$emit("paste",z)},getTags(){return(this.tagsContext?[...this.$tags.context(this.tagsContext)]:[...this.tags.tags].filter(L=>!L.deprecated)).map((L,m)=>{const c=this.currentPost&&this.liveTags[L.id]||L.value;return{...L,valueText:c,value:this.$refs["select-template"][m]?this.$refs["select-template"][m].innerHTML:"",menuHtml:this.$refs["menu-template"][m]?this.$refs["menu-template"][m].innerHTML:""}})},update(){if(this.allowTags){const s=this.quill.getModule("counter");this.$emit("counter",s.calculate())}let z=this.quill.getText()?this.quill.root.innerHTML:"";const L=document.createRange().createContextualFragment(z),m=document.createRange().createContextualFragment("");L.childNodes.forEach(s=>{if(s.tagName!=="P")return;s.childNodes.forEach(O=>{if(O.nodeType===3){m.appendChild(O.cloneNode(!0));return}if(O.tagName==="SPAN"&&this.allowTags){const g=O.querySelector(".aioseo-tag");if(g){const y=g.querySelector(".tag-name");if(y){const v=this.localTags.find(o=>o.name===y.textContent);if(v.custom){const o=g.querySelector(".tag-custom");if(o){const t=document.createTextNode(`#${v.id}-${o.innerText.replace(" - ","")}`);m.appendChild(t);return}}const d=document.createTextNode(`#${v.id}`);m.appendChild(d)}}}});const k=document.createElement("br");m.appendChild(k)}),m.normalize();const c=document.createElement("div");c.appendChild(m.cloneNode(!0)),z=c.innerHTML.replace(/<br\s*[/]?>/gi,this.single?"":`
`).trim(),z=z.replace(/ /gi," ").trim(),this.$emit("input",z)},insertToCursor(z){this.quill.focus(),this.quill.insertText(this.quill.getSelection().index,z,et.sources.USER),this.quill.setSelection(this.quill.getSelection().index+z.length,et.sources.USER)},insertTag(z){const L=this.quill.getModule("mention");L.removeOrphanedMentionChar();const m=L.getTextBeforeCursor();this.insertExact=!0;const c=z?this.localTags.find(O=>O.id===z):null;let s=c?`#${c.id}`:m.charAt(m.length-1)==="#"?"":"#";const k=this.quill.getContents(0,L.cursorPos);k.ops.length&&(typeof k.ops.pop().insert!="string"||!m.match(/\s$/))&&(s=" "+s),this.quill.focus(),z&&L.removeOrphanedMentionChar(),this.quill.insertText(this.quill.getSelection().index,s,et.sources.USER),this.quill.setSelection(this.quill.getSelection().index+s.length,et.sources.USER),this.insertExact=!1,z?L.hideMentionList():setTimeout(()=>{L.mentionCharPos=this.quill.getSelection().index-1,L.silentInsert=!0,L.showMentionList()},0)},maybeCloseMenu(z){const L=z.target;if(L.classList.contains("aioseo-tag")||L.closest(".aioseo-tag")||L.closest(".add-tags"))return;if(L.classList.contains("ql-mention-list-container")||L.closest(".ql-mention-list-container")){const c=L.classList.contains("prepend-icon")?L:L.closest(".prepend-icon");c&&c.nextSibling.focus();return}const m=this.quill.getModule("mention");m.isOpen&&(m.hideMentionList(),m.removeOrphanedMentionChar())},async startup(z=!1){if(this.allowTags&&!this.$refs["tag-search"])return;const L=document.documentElement.scrollTop;this.quill=new et(this.$refs.quill,{modules:{toolbar:this.showToolbar?["bold","italic","underline","autoLink"]:[],lineNumbers:this.lineNumbers?{container:this.$refs["line-numbers"],defaultLength:this.minimumLineNumbers}:null,mention:this.allowTags?{defaultMenuOrientation:this.defaultMenuOrientation||"bottom",dataAttributes:["id","value","denotationChar","link","target","custom","customValue"],allowedChars:/^[A-Za-z\s_]*$/,mentionDenotationChars:["#"],spaceAfterInsert:!0,mentionPrependClass:"aioseo-tag-search",mentionPrependClassCustom:"aioseo-tag-custom",prependMentionList:this.$refs["tag-search"].innerHTML,customFieldInput:this.$refs["tag-custom"].innerHTML,documentationDiv:this.$refs["documentation-div"].innerHTML,listItemClassNoMatch:"aioseo-tag-no-match",renderItemNoMatch(){return"No matches found"},renderItem(s){return`${s.menuHtml}`},source:(s,k,O,g=!1,y="")=>{const v=[...this.localTags];if(v[0].custom&&(v[0].customValue=y),s.length===0)return k(v,s,g,this.insertExact);const d=[];for(let o=0;o<v.length;o++)(~v[o].name.toLowerCase().indexOf(s.toLowerCase())||~v[o].id.toLowerCase().indexOf(s.toLowerCase()))&&d.push(v[o]);return k(d,s,g,this.insertExact)}}:{},counter:this.allowTags?{tags:this.localTags}:null,clipboard:{newLines:!this.single},autoLink:{enabled:!!this.autoLink,...this.autoLink},keyboard:{bindings:{enter:{key:13,handler:()=>!this.single}}},preserveWhiteSpace:this.preserveWhitespace},theme:"snow",formats:this.showToolbar?["bold","underline","italic","link","list","autoLink","aioseoInline"]:["mention"]}),z&&this.quill.setText("");let m=this.value;m&&m.length&&m.match(/#[^\s]*$/)&&(m=m.trim()+" "),m=m&&(this.single?m.replace(`
`," "):"<p>"+m.split(`
`).map(s=>s===""?"<br>":s).join("</p><p>")+"</p>"),this.quill.clipboard.dangerouslyPasteHTML(0,m,et.sources.API),this.quill.blur();const c=this.quill.getModule("mention");if(c&&c.removeOrphanedMentionChar(),document.documentElement.scrollTop=L,this.allowTags){const s=this.quill.getModule("counter");this.$emit("counter",s.calculate())}this.removeTrailingNewLine(),await this.$nextTick(),this.quill.on("text-change",()=>this.update()),this.quill.on("selection-change",(s,k,O)=>{O==="api"&&this.update(),s?this.$emit("focus",this.quill):this.$emit("blur",this.quill),this.$emit("selection-change",{range:s,oldRange:k,source:O})}),document.addEventListener("click",this.maybeCloseMenu),this.disabled&&this.quill.disable(),z||this.quill.history.clear()},setPhrase(z){this.cachedPhrase=z,z=Ht(z),z=z.replace(/<span([^>]*)>/g,"<aioseo-inline$1>").replace(/<\/span>/g,"</aioseo-inline>"),this.quill.clipboard.dangerouslyPasteHTML(z)},getPhrase(){return this.quill.getText()},getPhraseWithFormats(){return this.quill.getContents()},getPhraseHtml(){let z=this.quill.root.childNodes[0].innerHTML;return z=z.replace(/<aioseo-inline([^>]*)>/g,"<span$1>").replace(/<\/aioseo-inline>/g,"</span>"),z=Ut(this.cachedPhrase,z),z},removeTrailingNewLine(){const z=document.querySelector(".aioseo-editor-description .ql-editor");this.description&&z&&(z.innerHTML=z.innerHTML.replace(/<p><br><\/p>$/i,""))}},mounted(){this.localTags=this.getTags(),this.startup(!0),this.tagsContext&&this.$bus.$on("updateEditor"+this.tagsContext,z=>{z!==this._uid&&this.startup(!0)})},beforeDestroy(){document.removeEventListener("click",this.maybeCloseMenu)},destroyed(){this.tagsContext&&this.$bus.$emit("updateEditor"+this.tagsContext,this._uid)}};var ve=function(){var L=this,m=L._self._c;return m("div",{staticClass:"aioseo-editor"},[m("div",{ref:"quill",class:[{"aioseo-editor-line-numbers":L.lineNumbers},{"aioseo-editor-single":L.single},{"aioseo-editor-monospace":L.monospace},{"aioseo-editor-description":L.description}],on:{paste:L.emitPasteEvent}}),L.lineNumbers?m("div",{ref:"line-numbers",staticClass:"aioseo-line-numbers"}):L._e(),L.$slots["append-icon"]?m("div",{staticClass:"aioseo-append-icon"},[L._t("append-icon")],2):L._e(),L.$slots["append-button"]?m("div",{staticClass:"aioseo-append-button"},[L._t("append-button")],2):L._e(),L._l(L.$tags.context(L.tagsContext),function(c,s){return[m("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:s,ref:"select-template",refInFor:!0},[m("span",{staticClass:"aioseo-tag"},[m("span",{staticClass:"tag-name"},[L._v(L._s(c.name))]),c.custom&&c.customValue?m("span",{staticClass:"tag-custom"},[L._v(" - "+L._s(c.customValue)+" ")]):L._e(),m("span",{staticClass:"tag-toggle"},[m("svg-caret")],1)])]),m("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:`menu-${s}`,ref:"menu-template",refInFor:!0},[m("div",{staticClass:"aioseo-tag-item"},[m("div",[m("svg-plus")],1),m("div",[m("div",{staticClass:"aioseo-tag-title"},[L._v(" "+L._s(c.name)+" ")]),m("div",{staticClass:"aioseo-tag-description"},[L._v(" "+L._s(c.description)+" ")])])])])]}),m("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"tag-search"},[m("base-input",{attrs:{size:"medium",placeholder:L.strings.searchPlaceholder,prependIcon:"search"}}),m("svg-trash")],1),m("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"tag-custom"},[m("base-input",{attrs:{size:"small",placeholder:L.strings.enterCustomFieldName}})],1),m("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"documentation-div",domProps:{innerHTML:L._s(L.$links.getDocLink(L.strings.learnMoreSmartTags,"smartTags",!0))}})],2)},ye=[],me=xt(pe,ve,ye,!1,null,null,null,null);const Ne=me.exports;export{Ne as B,de as S};