import{aj as Se,ak as Ar,d as an,b as hr,al as wr,r as Me,i as nn,n as rr,am as Tr,a9 as gt,P as dr,Q as Yn,an as kr,M as Nr,o as Ce,c as qt,q as tt,e as se,x as vr,t as rn,k as oe,X as pr,V as Sr,ao as xr,a7 as Mt,R as ir,Y as Pr,m as de,w as Je,p as or,I as Vn,J as Gn,y as et,U as ar,Z as Lr,N as lr,B as qr,C as Rr,$ as jr,W as Ir,v as Mr}from"./index.js";import{a as Dr}from"./el-upload.js";/* empty css */import{E as Br,a as Cr}from"./el-radio.js";import{_ as Fr}from"./index31.js";import{E as Ur,a as Hr}from"./el-table-column.js";import"./el-checkbox.js";/* empty css */import{_ as zr}from"./index32.js";import{E as Kr}from"./el-row.js";import{_ as $r}from"./index33.js";import{E as Vr}from"./el-col.js";import{E as Gr}from"./el-card.js";import{E as Zr,a as Wr}from"./el-form-item.js";import{a as Yr,E as Qr}from"./el-select.js";import"./isEqual.js";import"./_Uint8Array.js";import"./el-tree.js";import"./strings.js";var Qn={},Xr={get exports(){return Qn},set exports(q){Qn=q}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */(function(q,C){(function(p,c){q.exports=c()})(typeof self<"u"?self:Se,function(){return function(m){var p={};function c(E){if(p[E])return p[E].exports;var b=p[E]={i:E,l:!1,exports:{}};return m[E].call(b.exports,b,b.exports,c),b.l=!0,b.exports}return c.m=m,c.c=p,c.d=function(E,b,_){c.o(E,b)||Object.defineProperty(E,b,{configurable:!1,enumerable:!0,get:_})},c.n=function(E){var b=E&&E.__esModule?function(){return E.default}:function(){return E};return c.d(b,"a",b),b},c.o=function(E,b){return Object.prototype.hasOwnProperty.call(E,b)},c.p="",c(c.s=109)}([function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(17),b=c(18),_=c(19),y=c(45),g=c(46),h=c(47),i=c(48),e=c(49),t=c(12),s=c(32),u=c(33),a=c(31),r=c(1),o={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:E.default,Format:b.default,Leaf:_.default,Embed:i.default,Scroll:y.default,Block:h.default,Inline:g.default,Text:e.default,Attributor:{Attribute:t.default,Class:s.default,Style:u.default,Store:a.default}};p.default=o},function(m,p,c){var E=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var f in o)o.hasOwnProperty(f)&&(r[f]=o[f])};return function(r,o){a(r,o);function f(){this.constructor=r}r.prototype=o===null?Object.create(o):(f.prototype=o.prototype,new f)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=function(a){E(r,a);function r(o){var f=this;return o="[Parchment] "+o,f=a.call(this,o)||this,f.message=o,f.name=f.constructor.name,f}return r}(Error);p.ParchmentError=b;var _={},y={},g={},h={};p.DATA_KEY="__blot";var i;(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"})(i=p.Scope||(p.Scope={}));function e(a,r){var o=s(a);if(o==null)throw new b("Unable to create "+a+" blot");var f=o,n=a instanceof Node||a.nodeType===Node.TEXT_NODE?a:f.create(r);return new f(n,r)}p.create=e;function t(a,r){return r===void 0&&(r=!1),a==null?null:a[p.DATA_KEY]!=null?a[p.DATA_KEY].blot:r?t(a.parentNode,r):null}p.find=t;function s(a,r){r===void 0&&(r=i.ANY);var o;if(typeof a=="string")o=h[a]||_[a];else if(a instanceof Text||a.nodeType===Node.TEXT_NODE)o=h.text;else if(typeof a=="number")a&i.LEVEL&i.BLOCK?o=h.block:a&i.LEVEL&i.INLINE&&(o=h.inline);else if(a instanceof HTMLElement){var f=(a.getAttribute("class")||"").split(/\s+/);for(var n in f)if(o=y[f[n]],o)break;o=o||g[a.tagName]}return o==null?null:r&i.LEVEL&o.scope&&r&i.TYPE&o.scope?o:null}p.query=s;function u(){for(var a=[],r=0;r1)return a.map(function(n){return u(n)});var o=a[0];if(typeof o.blotName!="string"&&typeof o.attrName!="string")throw new b("Invalid definition");if(o.blotName==="abstract")throw new b("Cannot register abstract class");if(h[o.blotName||o.attrName]=o,typeof o.keyName=="string")_[o.keyName]=o;else if(o.className!=null&&(y[o.className]=o),o.tagName!=null){Array.isArray(o.tagName)?o.tagName=o.tagName.map(function(n){return n.toUpperCase()}):o.tagName=o.tagName.toUpperCase();var f=Array.isArray(o.tagName)?o.tagName:[o.tagName];f.forEach(function(n){(g[n]==null||o.className==null)&&(g[n]=o)})}return o}p.register=u},function(m,p,c){var E=c(51),b=c(11),_=c(3),y=c(20),g=String.fromCharCode(0),h=function(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]};h.prototype.insert=function(i,e){var t={};return i.length===0?this:(t.insert=i,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t))},h.prototype.delete=function(i){return i<=0?this:this.push({delete:i})},h.prototype.retain=function(i,e){if(i<=0)return this;var t={retain:i};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t)},h.prototype.push=function(i){var e=this.ops.length,t=this.ops[e-1];if(i=_(!0,{},i),typeof t=="object"){if(typeof i.delete=="number"&&typeof t.delete=="number")return this.ops[e-1]={delete:t.delete+i.delete},this;if(typeof t.delete=="number"&&i.insert!=null&&(e-=1,t=this.ops[e-1],typeof t!="object"))return this.ops.unshift(i),this;if(b(i.attributes,t.attributes)){if(typeof i.insert=="string"&&typeof t.insert=="string")return this.ops[e-1]={insert:t.insert+i.insert},typeof i.attributes=="object"&&(this.ops[e-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof t.retain=="number")return this.ops[e-1]={retain:t.retain+i.retain},typeof i.attributes=="object"&&(this.ops[e-1].attributes=i.attributes),this}}return e===this.ops.length?this.ops.push(i):this.ops.splice(e,0,i),this},h.prototype.chop=function(){var i=this.ops[this.ops.length-1];return i&&i.retain&&!i.attributes&&this.ops.pop(),this},h.prototype.filter=function(i){return this.ops.filter(i)},h.prototype.forEach=function(i){this.ops.forEach(i)},h.prototype.map=function(i){return this.ops.map(i)},h.prototype.partition=function(i){var e=[],t=[];return this.forEach(function(s){var u=i(s)?e:t;u.push(s)}),[e,t]},h.prototype.reduce=function(i,e){return this.ops.reduce(i,e)},h.prototype.changeLength=function(){return this.reduce(function(i,e){return e.insert?i+y.length(e):e.delete?i-e.delete:i},0)},h.prototype.length=function(){return this.reduce(function(i,e){return i+y.length(e)},0)},h.prototype.slice=function(i,e){i=i||0,typeof e!="number"&&(e=1/0);for(var t=[],s=y.iterator(this.ops),u=0;u0&&t.next(u.retain-a)}for(var r=new h(s);e.hasNext()||t.hasNext();)if(t.peekType()==="insert")r.push(t.next());else if(e.peekType()==="delete")r.push(e.next());else{var o=Math.min(e.peekLength(),t.peekLength()),f=e.next(o),n=t.next(o);if(typeof n.retain=="number"){var d={};typeof f.retain=="number"?d.retain=o:d.insert=f.insert;var N=y.attributes.compose(f.attributes,n.attributes,typeof f.retain=="number");if(N&&(d.attributes=N),r.push(d),!t.hasNext()&&b(r.ops[r.ops.length-1],d)){var w=new h(e.rest());return r.concat(w).chop()}}else typeof n.delete=="number"&&typeof f.retain=="number"&&r.push(n)}return r.chop()},h.prototype.concat=function(i){var e=new h(this.ops.slice());return i.ops.length>0&&(e.push(i.ops[0]),e.ops=e.ops.concat(i.ops.slice(1))),e},h.prototype.diff=function(i,e){if(this.ops===i.ops)return new h;var t=[this,i].map(function(o){return o.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:g;var n=o===i?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),s=new h,u=E(t[0],t[1],e),a=y.iterator(this.ops),r=y.iterator(i.ops);return u.forEach(function(o){for(var f=o[1].length;f>0;){var n=0;switch(o[0]){case E.INSERT:n=Math.min(r.peekLength(),f),s.push(r.next(n));break;case E.DELETE:n=Math.min(f,a.peekLength()),a.next(n),s.delete(n);break;case E.EQUAL:n=Math.min(a.peekLength(),r.peekLength(),f);var d=a.next(n),N=r.next(n);b(d.insert,N.insert)?s.retain(n,y.attributes.diff(d.attributes,N.attributes)):s.push(N).delete(n);break}f-=n}}),s.chop()},h.prototype.eachLine=function(i,e){e=e||` `;for(var t=y.iterator(this.ops),s=new h,u=0;t.hasNext();){if(t.peekType()!=="insert")return;var a=t.peek(),r=y.length(a)-t.peekLength(),o=typeof a.insert=="string"?a.insert.indexOf(e,r)-r:-1;if(o<0)s.push(t.next());else if(o>0)s.push(t.next(o));else{if(i(s,t.next(1).attributes||{},u)===!1)return;u+=1,s=new h}}s.length()>0&&i(s,{},u)},h.prototype.transform=function(i,e){if(e=!!e,typeof i=="number")return this.transformPosition(i,e);for(var t=y.iterator(this.ops),s=y.iterator(i.ops),u=new h;t.hasNext()||s.hasNext();)if(t.peekType()==="insert"&&(e||s.peekType()!=="insert"))u.retain(y.length(t.next()));else if(s.peekType()==="insert")u.push(s.next());else{var a=Math.min(t.peekLength(),s.peekLength()),r=t.next(a),o=s.next(a);if(r.delete)continue;o.delete?u.push(o):u.retain(a,y.attributes.transform(r.attributes,o.attributes,e))}return u.chop()},h.prototype.transformPosition=function(i,e){e=!!e;for(var t=y.iterator(this.ops),s=0;t.hasNext()&&s<=i;){var u=t.peekLength(),a=t.peekType();if(t.next(),a==="delete"){i-=Math.min(u,i-s);continue}else a==="insert"&&(s"u"||c.call(t,a)},h=function(t,s){b&&s.name==="__proto__"?b(t,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):t[s.name]=s.newValue},i=function(t,s){if(s==="__proto__")if(c.call(t,s)){if(_)return _(t,s).value}else return;return t[s]};m.exports=function e(){var t,s,u,a,r,o,f=arguments[0],n=1,d=arguments.length,N=!1;for(typeof f=="boolean"&&(N=f,f=arguments[1]||{},n=2),(f==null||typeof f!="object"&&typeof f!="function")&&(f={});n0&&(P1&&arguments[1]!==void 0?arguments[1]:!1;if(M&&(P===0||P>=this.length()-w)){var z=this.clone();return P===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var V=b(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"split",this).call(this,P,M);return this.cache={},V}}}]),O}(e.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[a.default,e.default.Embed,o.default];function A(v){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v==null||(typeof v.formats=="function"&&(O=(0,y.default)(O,v.formats())),v.parent==null||v.parent.blotName=="scroll"||v.parent.statics.scope!==v.statics.scope)?O:A(v.parent,O)}p.bubbleFormats=A,p.BlockEmbed=k,p.default=L},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.overload=p.expandConfig=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},b=function(){function H(I,S){var j=[],D=!0,$=!1,F=void 0;try{for(var R=I[Symbol.iterator](),U;!(D=(U=R.next()).done)&&(j.push(U.value),!(S&&j.length===S));D=!0);}catch(G){$=!0,F=G}finally{try{!D&&R.return&&R.return()}finally{if($)throw F}}return j}return function(I,S){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return H(I,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(I,S){for(var j=0;j2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof S!="string"){var F=S.attrName||S.blotName;typeof F=="string"?this.register("formats/"+F,S,j):Object.keys(S).forEach(function(R){D.register(R,S[R],j)})}else this.imports[S]!=null&&!$&&T.warn("Overwriting "+S+" with",j),this.imports[S]=j,(S.startsWith("blots/")||S.startsWith("formats/"))&&j.blotName!=="abstract"?r.default.register(j):S.startsWith("modules")&&typeof j.register=="function"&&j.register()}}]);function H(I){var S=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(O(this,H),this.options=M(I,j),this.container=this.options.container,this.container==null)return T.error("Invalid Quill container",I);this.options.debug&&H.debug(this.options.debug);var D=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 t.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new i.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(t.default.events.EDITOR_CHANGE,function(F){F===t.default.events.TEXT_CHANGE&&S.root.classList.toggle("ql-blank",S.editor.isBlank())}),this.emitter.on(t.default.events.SCROLL_UPDATE,function(F,R){var U=S.selection.lastRange,G=U&&U.length===0?U.index:void 0;z.call(S,function(){return S.editor.update(null,R,G)},F)});var $=this.clipboard.convert(`
`+D+"


");this.setContents($),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return _(H,[{key:"addContainer",value:function(S){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof S=="string"){var D=S;S=document.createElement("div"),S.classList.add(D)}return this.container.insertBefore(S,j),S}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(S,j,D){var $=this,F=V(S,j,D),R=b(F,4);return S=R[0],j=R[1],D=R[3],z.call(this,function(){return $.editor.deleteText(S,j)},D,S,-1*j)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(S),this.container.classList.toggle("ql-disabled",!S)}},{key:"focus",value:function(){var S=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=S,this.scrollIntoView()}},{key:"format",value:function(S,j){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.default.sources.API;return z.call(this,function(){var F=D.getSelection(!0),R=new g.default;if(F==null)return R;if(r.default.query(S,r.default.Scope.BLOCK))R=D.editor.formatLine(F.index,F.length,v({},S,j));else{if(F.length===0)return D.selection.format(S,j),R;R=D.editor.formatText(F.index,F.length,v({},S,j))}return D.setSelection(F,t.default.sources.SILENT),R},$)}},{key:"formatLine",value:function(S,j,D,$,F){var R=this,U=void 0,G=V(S,j,D,$,F),Z=b(G,4);return S=Z[0],j=Z[1],U=Z[2],F=Z[3],z.call(this,function(){return R.editor.formatLine(S,j,U)},F,S,0)}},{key:"formatText",value:function(S,j,D,$,F){var R=this,U=void 0,G=V(S,j,D,$,F),Z=b(G,4);return S=Z[0],j=Z[1],U=Z[2],F=Z[3],z.call(this,function(){return R.editor.formatText(S,j,U)},F,S,0)}},{key:"getBounds",value:function(S){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=void 0;typeof S=="number"?D=this.selection.getBounds(S,j):D=this.selection.getBounds(S.index,S.length);var $=this.container.getBoundingClientRect();return{bottom:D.bottom-$.top,height:D.height,left:D.left-$.left,right:D.right-$.left,top:D.top-$.top,width:D.width}}},{key:"getContents",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-S,D=V(S,j),$=b(D,2);return S=$[0],j=$[1],this.editor.getContents(S,j)}},{key:"getFormat",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof S=="number"?this.editor.getFormat(S,j):this.editor.getFormat(S.index,S.length)}},{key:"getIndex",value:function(S){return S.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(S){return this.scroll.leaf(S)}},{key:"getLine",value:function(S){return this.scroll.line(S)}},{key:"getLines",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof S!="number"?this.scroll.lines(S.index,S.length):this.scroll.lines(S,j)}},{key:"getModule",value:function(S){return this.theme.modules[S]}},{key:"getSelection",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return S&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-S,D=V(S,j),$=b(D,2);return S=$[0],j=$[1],this.editor.getText(S,j)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(S,j,D){var $=this,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return z.call(this,function(){return $.editor.insertEmbed(S,j,D)},F,S)}},{key:"insertText",value:function(S,j,D,$,F){var R=this,U=void 0,G=V(S,0,D,$,F),Z=b(G,4);return S=Z[0],U=Z[2],F=Z[3],z.call(this,function(){return R.editor.insertText(S,j,U)},F,S,j.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(S,j,D){this.clipboard.dangerouslyPasteHTML(S,j,D)}},{key:"removeFormat",value:function(S,j,D){var $=this,F=V(S,j,D),R=b(F,4);return S=R[0],j=R[1],D=R[3],z.call(this,function(){return $.editor.removeFormat(S,j)},D,S)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(S){var j=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){S=new g.default(S);var $=j.getLength(),F=j.editor.deleteText(0,$),R=j.editor.applyDelta(S),U=R.ops[R.ops.length-1];U!=null&&typeof U.insert=="string"&&U.insert[U.insert.length-1]===` `&&(j.editor.deleteText(j.getLength()-1,1),R.delete(1));var G=F.compose(R);return G},D)}},{key:"setSelection",value:function(S,j,D){if(S==null)this.selection.setRange(null,j||H.sources.API);else{var $=V(S,j,D),F=b($,4);S=F[0],j=F[1],D=F[3],this.selection.setRange(new o.Range(S,j),D),D!==t.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(S){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API,D=new g.default().insert(S);return this.setContents(D,j)}},{key:"update",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.default.sources.USER,j=this.scroll.update(S);return this.selection.update(S),j}},{key:"updateContents",value:function(S){var j=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){return S=new g.default(S),j.editor.applyDelta(S,D)},D,!0)}}]),H}();P.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},P.events=t.default.events,P.sources=t.default.sources,P.version="1.3.7",P.imports={delta:g.default,parchment:r.default,"core/module":u.default,"core/theme":L.default};function M(H,I){if(I=(0,d.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},I),!I.theme||I.theme===P.DEFAULTS.theme)I.theme=L.default;else if(I.theme=P.import("themes/"+I.theme),I.theme==null)throw new Error("Invalid theme "+I.theme+". Did you register it?");var S=(0,d.default)(!0,{},I.theme.DEFAULTS);[S,I].forEach(function($){$.modules=$.modules||{},Object.keys($.modules).forEach(function(F){$.modules[F]===!0&&($.modules[F]={})})});var j=Object.keys(S.modules).concat(Object.keys(I.modules)),D=j.reduce(function($,F){var R=P.import("modules/"+F);return R==null?T.error("Cannot load "+F+" module. Are you sure you registered it?"):$[F]=R.DEFAULTS||{},$},{});return I.modules!=null&&I.modules.toolbar&&I.modules.toolbar.constructor!==Object&&(I.modules.toolbar={container:I.modules.toolbar}),I=(0,d.default)(!0,{},P.DEFAULTS,{modules:D},S,I),["bounds","container","scrollingContainer"].forEach(function($){typeof I[$]=="string"&&(I[$]=document.querySelector(I[$]))}),I.modules=Object.keys(I.modules).reduce(function($,F){return I.modules[F]&&($[F]=I.modules[F]),$},{}),I}function z(H,I,S,j){if(this.options.strict&&!this.isEnabled()&&I===t.default.sources.USER)return new g.default;var D=S==null?null:this.getSelection(),$=this.editor.delta,F=H();if(D!=null&&(S===!0&&(S=D.index),j==null?D=X(D,F,I):j!==0&&(D=X(D,S,j,I)),this.setSelection(D,t.default.sources.SILENT)),F.length()>0){var R,U=[t.default.events.TEXT_CHANGE,F,$,I];if((R=this.emitter).emit.apply(R,[t.default.events.EDITOR_CHANGE].concat(U)),I!==t.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,U)}}return F}function V(H,I,S,j,D){var $={};return typeof H.index=="number"&&typeof H.length=="number"?typeof I!="number"?(D=j,j=S,S=I,I=H.length,H=H.index):(I=H.length,H=H.index):typeof I!="number"&&(D=j,j=S,S=I,I=0),(typeof S>"u"?"undefined":E(S))==="object"?($=S,D=j):typeof S=="string"&&(j!=null?$[S]=j:D=S),D=D||t.default.sources.API,[H,I,$,D]}function X(H,I,S,j){if(H==null)return null;var D=void 0,$=void 0;if(I instanceof g.default){var F=[H.index,H.index+H.length].map(function(Z){return I.transformPosition(Z,j!==t.default.sources.USER)}),R=b(F,2);D=R[0],$=R[1]}else{var U=[H.index,H.index+H.length].map(function(Z){return Z=0?Z+S:Math.max(I,Z+S)}),G=b(U,2);D=G[0],$=G[1]}return new o.Range(D,$-D)}p.expandConfig=M,p.overload=V,p.default=P},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function a(r,o){for(var f=0;f0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(f,n){var d=r.order.indexOf(f),N=r.order.indexOf(n);return d>=0||N>=0?d-N:f===n?0:f1?N-1:0),k=1;k1&&arguments[1]!==void 0?arguments[1]:{};E(this,_),this.quill=y,this.options=g};b.DEFAULTS={},p.default=b},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=["error","warn","log","info"],b="warn";function _(g){if(E.indexOf(g)<=E.indexOf(b)){for(var h,i=arguments.length,e=Array(i>1?i-1:0),t=1;t0&&typeof e[0]!="number")}function i(e,t,s){var u,a;if(g(e)||g(t)||e.prototype!==t.prototype)return!1;if(_(e))return _(t)?(e=E.call(e),t=E.call(t),y(e,t,s)):!1;if(h(e)){if(!h(t)||e.length!==t.length)return!1;for(u=0;u=0;u--)if(r[u]!=o[u])return!1;for(u=r.length-1;u>=0;u--)if(a=r[u],!y(e[a],t[a],s))return!1;return typeof e==typeof t}},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(1),b=function(){function _(y,g,h){h===void 0&&(h={}),this.attrName=y,this.keyName=g;var i=E.Scope.TYPE&E.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&E.Scope.LEVEL|i:this.scope=E.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return _.keys=function(y){return[].map.call(y.attributes,function(g){return g.name})},_.prototype.add=function(y,g){return this.canAdd(y,g)?(y.setAttribute(this.keyName,g),!0):!1},_.prototype.canAdd=function(y,g){var h=E.query(y,E.Scope.BLOT&(this.scope|E.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof g=="string"?this.whitelist.indexOf(g.replace(/["']/g,""))>-1:this.whitelist.indexOf(g)>-1},_.prototype.remove=function(y){y.removeAttribute(this.keyName)},_.prototype.value=function(y){var g=y.getAttribute(this.keyName);return this.canAdd(y,g)&&g?g:""},_}();p.default=b},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.Code=void 0;var E=function(){function k(L,A){var v=[],O=!0,T=!1,P=void 0;try{for(var M=L[Symbol.iterator](),z;!(O=(z=M.next()).done)&&(v.push(z.value),!(A&&v.length===A));O=!0);}catch(V){T=!0,P=V}finally{try{!O&&M.return&&M.return()}finally{if(T)throw P}}return v}return function(L,A){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return k(L,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(){function k(L,A){for(var v=0;v=v+O)){var z=this.newlineIndex(v,!0)+1,V=M-z+1,X=this.isolate(z,V),H=X.next;X.format(T,P),H instanceof L&&H.formatAt(0,v-z+O-V,T,P)}}}},{key:"insertAt",value:function(v,O,T){if(T==null){var P=this.descendant(r.default,v),M=E(P,2),z=M[0],V=M[1];z.insertAt(V,O)}}},{key:"length",value:function(){var v=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?v:v+1}},{key:"newlineIndex",value:function(v){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(O)return this.domNode.textContent.slice(0,v).lastIndexOf(` `);var T=this.domNode.textContent.slice(v).indexOf(` `);return T>-1?v+T:-1}},{key:"optimize",value:function(v){this.domNode.textContent.endsWith(` `)||this.appendChild(i.default.create("text",` `)),_(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,v);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===O.statics.formats(O.domNode)&&(O.optimize(v),O.moveChildren(this),O.remove())}},{key:"replace",value:function(v){_(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,v),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(O){var T=i.default.find(O);T==null?O.parentNode.removeChild(O):T instanceof i.default.Embed?T.remove():T.unwrap()})}}],[{key:"create",value:function(v){var O=_(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,v);return O.setAttribute("spellcheck",!1),O}},{key:"formats",value:function(){return!0}}]),L}(t.default);w.blotName="code-block",w.tagName="PRE",w.TAB=" ",p.Code=N,p.default=w},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},b=function(){function H(I,S){var j=[],D=!0,$=!1,F=void 0;try{for(var R=I[Symbol.iterator](),U;!(D=(U=R.next()).done)&&(j.push(U.value),!(S&&j.length===S));D=!0);}catch(G){$=!0,F=G}finally{try{!D&&R.return&&R.return()}finally{if($)throw F}}return j}return function(I,S){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return H(I,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(I,S){for(var j=0;j=$&&!Z.endsWith(` `)&&(D=!0),j.scroll.insertAt(F,Z);var Q=j.scroll.line(F),ne=b(Q,2),ie=ne[0],ae=ne[1],ue=(0,v.default)({},(0,o.bubbleFormats)(ie));if(ie instanceof f.default){var ve=ie.descendant(t.default.Leaf,ae),Oe=b(ve,1),_e=Oe[0];ue=(0,v.default)(ue,(0,o.bubbleFormats)(_e))}G=i.default.attributes.diff(ue,G)||{}}else if(E(R.insert)==="object"){var K=Object.keys(R.insert)[0];if(K==null)return F;j.scroll.insertAt(F,K,R.insert[K])}$+=U}return Object.keys(G).forEach(function(Y){j.scroll.formatAt(F,U,Y,G[Y])}),F+U},0),S.reduce(function(F,R){return typeof R.delete=="number"?(j.scroll.deleteAt(F,R.delete),F):F+(R.retain||R.insert.length||1)},0),this.scroll.batchEnd(),this.update(S)}},{key:"deleteText",value:function(S,j){return this.scroll.deleteAt(S,j),this.update(new g.default().retain(S).delete(j))}},{key:"formatLine",value:function(S,j){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys($).forEach(function(F){if(!(D.scroll.whitelist!=null&&!D.scroll.whitelist[F])){var R=D.scroll.lines(S,Math.max(j,1)),U=j;R.forEach(function(G){var Z=G.length();if(!(G instanceof u.default))G.format(F,$[F]);else{var Q=S-G.offset(D.scroll),ne=G.newlineIndex(Q+U)-Q+1;G.formatAt(Q,ne,F,$[F])}U-=Z})}}),this.scroll.optimize(),this.update(new g.default().retain(S).retain(j,(0,w.default)($)))}},{key:"formatText",value:function(S,j){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys($).forEach(function(F){D.scroll.formatAt(S,j,F,$[F])}),this.update(new g.default().retain(S).retain(j,(0,w.default)($)))}},{key:"getContents",value:function(S,j){return this.delta.slice(S,S+j)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(S,j){return S.concat(j.delta())},new g.default)}},{key:"getFormat",value:function(S){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=[],$=[];j===0?this.scroll.path(S).forEach(function(R){var U=b(R,1),G=U[0];G instanceof f.default?D.push(G):G instanceof t.default.Leaf&&$.push(G)}):(D=this.scroll.lines(S,j),$=this.scroll.descendants(t.default.Leaf,S,j));var F=[D,$].map(function(R){if(R.length===0)return{};for(var U=(0,o.bubbleFormats)(R.shift());Object.keys(U).length>0;){var G=R.shift();if(G==null)return U;U=V((0,o.bubbleFormats)(G),U)}return U});return v.default.apply(v.default,F)}},{key:"getText",value:function(S,j){return this.getContents(S,j).filter(function(D){return typeof D.insert=="string"}).map(function(D){return D.insert}).join("")}},{key:"insertEmbed",value:function(S,j,D){return this.scroll.insertAt(S,j,D),this.update(new g.default().retain(S).insert(T({},j,D)))}},{key:"insertText",value:function(S,j){var D=this,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return j=j.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(S,j),Object.keys($).forEach(function(F){D.scroll.formatAt(S,j.length,F,$[F])}),this.update(new g.default().retain(S).insert(j,(0,w.default)($)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var S=this.scroll.children.head;return S.statics.blotName!==f.default.blotName||S.children.length>1?!1:S.children.head instanceof d.default}},{key:"removeFormat",value:function(S,j){var D=this.getText(S,j),$=this.scroll.line(S+j),F=b($,2),R=F[0],U=F[1],G=0,Z=new g.default;R!=null&&(R instanceof u.default?G=R.newlineIndex(U)-U+1:G=R.length()-U,Z=R.delta().slice(U,U+G-1).insert(` `));var Q=this.getContents(S,j+G),ne=Q.diff(new g.default().insert(D).concat(Z)),ie=new g.default().retain(S).concat(ne);return this.applyDelta(ie)}},{key:"update",value:function(S){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,$=this.delta;if(j.length===1&&j[0].type==="characterData"&&j[0].target.data.match(M)&&t.default.find(j[0].target)){var F=t.default.find(j[0].target),R=(0,o.bubbleFormats)(F),U=F.offset(this.scroll),G=j[0].oldValue.replace(r.default.CONTENTS,""),Z=new g.default().insert(G),Q=new g.default().insert(F.value()),ne=new g.default().retain(U).concat(Z.diff(Q,D));S=ne.reduce(function(ie,ae){return ae.insert?ie.insert(ae.insert,R):ie.push(ae)},new g.default),this.delta=$.compose(S)}else this.delta=this.getDelta(),(!S||!(0,L.default)($.compose(S),this.delta))&&(S=$.diff(this.delta,D));return S}}]),H}();function V(H,I){return Object.keys(I).reduce(function(S,j){return H[j]==null||(I[j]===H[j]?S[j]=I[j]:Array.isArray(I[j])?I[j].indexOf(H[j])<0&&(S[j]=I[j].concat([H[j]])):S[j]=[I[j],H[j]]),S},{})}function X(H){return H.reduce(function(I,S){if(S.insert===1){var j=(0,w.default)(S.attributes);return delete j.image,I.insert({image:S.attributes.image},j)}if(S.attributes!=null&&(S.attributes.list===!0||S.attributes.bullet===!0)&&(S=(0,w.default)(S),S.attributes.list?S.attributes.list="ordered":(S.attributes.list="bullet",delete S.attributes.bullet)),typeof S.insert=="string"){var D=S.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return I.insert(D,S.attributes)}return I.push(S)},new g.default)}p.default=z},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.Range=void 0;var E=function(){function k(L,A){var v=[],O=!0,T=!1,P=void 0;try{for(var M=L[Symbol.iterator](),z;!(O=(z=M.next()).done)&&(v.push(z.value),!(A&&v.length===A));O=!0);}catch(V){T=!0,P=V}finally{try{!O&&M.return&&M.return()}finally{if(T)throw P}}return v}return function(L,A){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return k(L,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(){function k(L,A){for(var v=0;v1&&arguments[1]!==void 0?arguments[1]:0;f(this,k),this.index=L,this.length=A},N=function(){function k(L,A){var v=this;f(this,k),this.emitter=A,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new d(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){v.mouseDown||setTimeout(v.update.bind(v,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(O,T){O===s.default.events.TEXT_CHANGE&&T.length()>0&&v.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(v.hasFocus()){var O=v.getNativeRange();O!=null&&O.start.node!==v.cursor.textNode&&v.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{v.setNativeRange(O.start.node,O.start.offset,O.end.node,O.end.offset)}catch{}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(O,T){if(T.range){var P=T.range,M=P.startNode,z=P.startOffset,V=P.endNode,X=P.endOffset;v.setNativeRange(M,z,V,X)}}),this.update(s.default.sources.SILENT)}return b(k,[{key:"handleComposition",value:function(){var A=this;this.root.addEventListener("compositionstart",function(){A.composing=!0}),this.root.addEventListener("compositionend",function(){if(A.composing=!1,A.cursor.parent){var v=A.cursor.restore();if(!v)return;setTimeout(function(){A.setNativeRange(v.startNode,v.startOffset,v.endNode,v.endOffset)},1)}})}},{key:"handleDragging",value:function(){var A=this;this.emitter.listenDOM("mousedown",document.body,function(){A.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){A.mouseDown=!1,A.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(A,v){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[A])){this.scroll.update();var O=this.getNativeRange();if(!(O==null||!O.native.collapsed||y.default.query(A,y.default.Scope.BLOCK))){if(O.start.node!==this.cursor.textNode){var T=y.default.find(O.start.node,!1);if(T==null)return;if(T instanceof y.default.Leaf){var P=T.split(O.start.offset);T.parent.insertBefore(this.cursor,P)}else T.insertBefore(this.cursor,O.start.node);this.cursor.attach()}this.cursor.format(A,v),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(A){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,O=this.scroll.length();A=Math.min(A,O-1),v=Math.min(A+v,O-1)-A;var T=void 0,P=this.scroll.leaf(A),M=E(P,2),z=M[0],V=M[1];if(z==null)return null;var X=z.position(V,!0),H=E(X,2);T=H[0],V=H[1];var I=document.createRange();if(v>0){I.setStart(T,V);var S=this.scroll.leaf(A+v),j=E(S,2);if(z=j[0],V=j[1],z==null)return null;var D=z.position(V,!0),$=E(D,2);return T=$[0],V=$[1],I.setEnd(T,V),I.getBoundingClientRect()}else{var F="left",R=void 0;return T instanceof Text?(V0&&(F="right")),{bottom:R.top+R.height,height:R.height,left:R[F],right:R[F],top:R.top,width:0}}}},{key:"getNativeRange",value:function(){var A=document.getSelection();if(A==null||A.rangeCount<=0)return null;var v=A.getRangeAt(0);if(v==null)return null;var O=this.normalizeNative(v);return n.info("getNativeRange",O),O}},{key:"getRange",value:function(){var A=this.getNativeRange();if(A==null)return[null,null];var v=this.normalizedToRange(A);return[v,A]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(A){var v=this,O=[[A.start.node,A.start.offset]];A.native.collapsed||O.push([A.end.node,A.end.offset]);var T=O.map(function(z){var V=E(z,2),X=V[0],H=V[1],I=y.default.find(X,!0),S=I.offset(v.scroll);return H===0?S:I instanceof y.default.Container?S+I.length():S+I.index(X,H)}),P=Math.min(Math.max.apply(Math,o(T)),this.scroll.length()-1),M=Math.min.apply(Math,[P].concat(o(T)));return new d(M,P-M)}},{key:"normalizeNative",value:function(A){if(!w(this.root,A.startContainer)||!A.collapsed&&!w(this.root,A.endContainer))return null;var v={start:{node:A.startContainer,offset:A.startOffset},end:{node:A.endContainer,offset:A.endOffset},native:A};return[v.start,v.end].forEach(function(O){for(var T=O.node,P=O.offset;!(T instanceof Text)&&T.childNodes.length>0;)if(T.childNodes.length>P)T=T.childNodes[P],P=0;else if(T.childNodes.length===P)T=T.lastChild,P=T instanceof Text?T.data.length:T.childNodes.length+1;else break;O.node=T,O.offset=P}),v}},{key:"rangeToNative",value:function(A){var v=this,O=A.collapsed?[A.index]:[A.index,A.index+A.length],T=[],P=this.scroll.length();return O.forEach(function(M,z){M=Math.min(P-1,M);var V=void 0,X=v.scroll.leaf(M),H=E(X,2),I=H[0],S=H[1],j=I.position(S,z!==0),D=E(j,2);V=D[0],S=D[1],T.push(V,S)}),T.length<2&&(T=T.concat(T)),T}},{key:"scrollIntoView",value:function(A){var v=this.lastRange;if(v!=null){var O=this.getBounds(v.index,v.length);if(O!=null){var T=this.scroll.length()-1,P=this.scroll.line(Math.min(v.index,T)),M=E(P,1),z=M[0],V=z;if(v.length>0){var X=this.scroll.line(Math.min(v.index+v.length,T)),H=E(X,1);V=H[0]}if(!(z==null||V==null)){var I=A.getBoundingClientRect();O.topI.bottom&&(A.scrollTop+=O.bottom-I.bottom)}}}}},{key:"setNativeRange",value:function(A,v){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:v,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",A,v,O,T),!(A!=null&&(this.root.parentNode==null||A.parentNode==null||O.parentNode==null))){var M=document.getSelection();if(M!=null)if(A!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||P||A!==z.startContainer||v!==z.startOffset||O!==z.endContainer||T!==z.endOffset){A.tagName=="BR"&&(v=[].indexOf.call(A.parentNode.childNodes,A),A=A.parentNode),O.tagName=="BR"&&(T=[].indexOf.call(O.parentNode.childNodes,O),O=O.parentNode);var V=document.createRange();V.setStart(A,v),V.setEnd(O,T),M.removeAllRanges(),M.addRange(V)}}else M.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(A){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s.default.sources.API;if(typeof v=="string"&&(O=v,v=!1),n.info("setRange",A),A!=null){var T=this.rangeToNative(A);this.setNativeRange.apply(this,o(T).concat([v]))}else this.setNativeRange(null);this.update(O)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.default.sources.USER,v=this.lastRange,O=this.getRange(),T=E(O,2),P=T[0],M=T[1];if(this.lastRange=P,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,e.default)(v,this.lastRange)){var z;!this.composing&&M!=null&&M.native.collapsed&&M.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[s.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(v),A];if((z=this.emitter).emit.apply(z,[s.default.events.EDITOR_CHANGE].concat(V)),A!==s.default.sources.SILENT){var X;(X=this.emitter).emit.apply(X,V)}}}}]),k}();function w(k,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),k.contains(L)}p.Range=d,p.default=N},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function s(u,a){for(var r=0;r0&&(t+=1),[this.parent.domNode,t]},h.prototype.value=function(){var i;return i={},i[this.statics.blotName]=this.statics.value(this.domNode)||!0,i},h.scope=_.Scope.INLINE_BLOT,h}(b.default);p.default=y},function(m,p,c){var E=c(11),b=c(3),_={attributes:{compose:function(g,h,i){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var e=b(!0,{},h);i||(e=Object.keys(e).reduce(function(s,u){return e[u]!=null&&(s[u]=e[u]),s},{}));for(var t in g)g[t]!==void 0&&h[t]===void 0&&(e[t]=g[t]);return Object.keys(e).length>0?e:void 0},diff:function(g,h){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var i=Object.keys(g).concat(Object.keys(h)).reduce(function(e,t){return E(g[t],h[t])||(e[t]=h[t]===void 0?null:h[t]),e},{});return Object.keys(i).length>0?i:void 0},transform:function(g,h,i){if(typeof g!="object")return h;if(typeof h=="object"){if(!i)return h;var e=Object.keys(h).reduce(function(t,s){return g[s]===void 0&&(t[s]=h[s]),t},{});return Object.keys(e).length>0?e:void 0}}},iterator:function(g){return new y(g)},length:function(g){return typeof g.delete=="number"?g.delete:typeof g.retain=="number"?g.retain:typeof g.insert=="string"?g.insert.length:1}};function y(g){this.ops=g,this.index=0,this.offset=0}y.prototype.hasNext=function(){return this.peekLength()<1/0},y.prototype.next=function(g){g||(g=1/0);var h=this.ops[this.index];if(h){var i=this.offset,e=_.length(h);if(g>=e-i?(g=e-i,this.index+=1,this.offset=0):this.offset+=g,typeof h.delete=="number")return{delete:g};var t={};return h.attributes&&(t.attributes=h.attributes),typeof h.retain=="number"?t.retain=g:typeof h.insert=="string"?t.insert=h.insert.substr(i,g):t.insert=h.insert,t}else return{retain:1/0}},y.prototype.peek=function(){return this.ops[this.index]},y.prototype.peekLength=function(){return this.ops[this.index]?_.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 g=this.offset,h=this.index,i=this.next(),e=this.ops.slice(this.index);return this.offset=g,this.index=h,[i].concat(e)}else return[]},m.exports=_},function(m,p){var c=function(){function E(u,a){return a!=null&&u instanceof a}var b;try{b=Map}catch{b=function(){}}var _;try{_=Set}catch{_=function(){}}var y;try{y=Promise}catch{y=function(){}}function g(u,a,r,o,f){typeof a=="object"&&(r=a.depth,o=a.prototype,f=a.includeNonEnumerable,a=a.circular);var n=[],d=[],N=typeof Buffer<"u";typeof a>"u"&&(a=!0),typeof r>"u"&&(r=1/0);function w(k,L){if(k===null)return null;if(L===0)return k;var A,v;if(typeof k!="object")return k;if(E(k,b))A=new b;else if(E(k,_))A=new _;else if(E(k,y))A=new y(function(I,S){k.then(function(j){I(w(j,L-1))},function(j){S(w(j,L-1))})});else if(g.__isArray(k))A=[];else if(g.__isRegExp(k))A=new RegExp(k.source,s(k)),k.lastIndex&&(A.lastIndex=k.lastIndex);else if(g.__isDate(k))A=new Date(k.getTime());else{if(N&&Buffer.isBuffer(k))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(k.length):A=new Buffer(k.length),k.copy(A),A;E(k,Error)?A=Object.create(k):typeof o>"u"?(v=Object.getPrototypeOf(k),A=Object.create(v)):(A=Object.create(o),v=o)}if(a){var O=n.indexOf(k);if(O!=-1)return d[O];n.push(k),d.push(A)}E(k,b)&&k.forEach(function(I,S){var j=w(S,L-1),D=w(I,L-1);A.set(j,D)}),E(k,_)&&k.forEach(function(I){var S=w(I,L-1);A.add(S)});for(var T in k){var P;v&&(P=Object.getOwnPropertyDescriptor(v,T)),!(P&&P.set==null)&&(A[T]=w(k[T],L-1))}if(Object.getOwnPropertySymbols)for(var M=Object.getOwnPropertySymbols(k),T=0;T0){if(V instanceof e.BlockEmbed||S instanceof e.BlockEmbed){this.optimize();return}if(V instanceof r.default){var j=V.newlineIndex(V.length(),!0);if(j>-1&&(V=V.split(j+1),V===S)){this.optimize();return}}else if(S instanceof r.default){var D=S.newlineIndex(0);D>-1&&S.split(D+1)}var $=S.children.head instanceof u.default?null:S.children.head;V.moveChildren(S,$),V.remove()}this.optimize()}},{key:"enable",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",T)}},{key:"formatAt",value:function(T,P,M,z){this.whitelist!=null&&!this.whitelist[M]||(_(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"formatAt",this).call(this,T,P,M,z),this.optimize())}},{key:"insertAt",value:function(T,P,M){if(!(M!=null&&this.whitelist!=null&&!this.whitelist[P])){if(T>=this.length())if(M==null||g.default.query(P,g.default.Scope.BLOCK)==null){var z=g.default.create(this.statics.defaultChild);this.appendChild(z),M==null&&P.endsWith(` `)&&(P=P.slice(0,-1)),z.insertAt(0,P,M)}else{var V=g.default.create(P,M);this.appendChild(V)}else _(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertAt",this).call(this,T,P,M);this.optimize()}}},{key:"insertBefore",value:function(T,P){if(T.statics.scope===g.default.Scope.INLINE_BLOT){var M=g.default.create(this.statics.defaultChild);M.appendChild(T),T=M}_(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,T,P)}},{key:"leaf",value:function(T){return this.path(T).pop()||[null,-1]}},{key:"line",value:function(T){return T===this.length()?this.line(T-1):this.descendant(k,T)}},{key:"lines",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,M=function z(V,X,H){var I=[],S=H;return V.children.forEachAt(X,H,function(j,D,$){k(j)?I.push(j):j instanceof g.default.Container&&(I=I.concat(z(j,D,S))),S-=$}),I};return M(this,T,P)}},{key:"optimize",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(_(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,T,P),T.length>0&&this.emitter.emit(i.default.events.SCROLL_OPTIMIZE,T,P))}},{key:"path",value:function(T){return _(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"path",this).call(this,T).slice(1)}},{key:"update",value:function(T){if(this.batch!==!0){var P=i.default.sources.USER;typeof T=="string"&&(P=T),Array.isArray(T)||(T=this.observer.takeRecords()),T.length>0&&this.emitter.emit(i.default.events.SCROLL_BEFORE_UPDATE,P,T),_(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"update",this).call(this,T.concat([])),T.length>0&&this.emitter.emit(i.default.events.SCROLL_UPDATE,P,T)}}}]),v}(g.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[t.default,e.BlockEmbed,f.default],p.default=L},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.SHORTKEY=p.default=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},b=function(){function R(U,G){var Z=[],Q=!0,ne=!1,ie=void 0;try{for(var ae=U[Symbol.iterator](),ue;!(Q=(ue=ae.next()).done)&&(Z.push(ue.value),!(G&&Z.length===G));Q=!0);}catch(ve){ne=!0,ie=ve}finally{try{!Q&&ae.return&&ae.return()}finally{if(ne)throw ie}}return Z}return function(U,G){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return R(U,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function R(U,G){for(var Z=0;Z1&&arguments[1]!==void 0?arguments[1]:{},ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=F(Z);if(ie==null||ie.key==null)return M.warn("Attempted to add invalid keyboard binding",ie);typeof Q=="function"&&(Q={handler:Q}),typeof ne=="function"&&(ne={handler:ne}),ie=(0,t.default)(ie,Q,ne),this.bindings[ie.key]=this.bindings[ie.key]||[],this.bindings[ie.key].push(ie)}},{key:"listen",value:function(){var Z=this;this.quill.root.addEventListener("keydown",function(Q){if(!Q.defaultPrevented){var ne=Q.which||Q.keyCode,ie=(Z.bindings[ne]||[]).filter(function(ye){return U.match(Q,ye)});if(ie.length!==0){var ae=Z.quill.getSelection();if(!(ae==null||!Z.quill.hasFocus())){var ue=Z.quill.getLine(ae.index),ve=b(ue,2),Oe=ve[0],_e=ve[1],K=Z.quill.getLeaf(ae.index),Y=b(K,2),ee=Y[0],te=Y[1],J=ae.length===0?[ee,te]:Z.quill.getLeaf(ae.index+ae.length),he=b(J,2),le=he[0],fe=he[1],xe=ee instanceof f.default.Text?ee.value().slice(0,te):"",we=le instanceof f.default.Text?le.value().slice(fe):"",me={collapsed:ae.length===0,empty:ae.length===0&&Oe.length()<=1,format:Z.quill.getFormat(ae),offset:_e,prefix:xe,suffix:we},nt=ie.some(function(ye){if(ye.collapsed!=null&&ye.collapsed!==me.collapsed||ye.empty!=null&&ye.empty!==me.empty||ye.offset!=null&&ye.offset!==me.offset)return!1;if(Array.isArray(ye.format)){if(ye.format.every(function(Be){return me.format[Be]==null}))return!1}else if(E(ye.format)==="object"&&!Object.keys(ye.format).every(function(Be){return ye.format[Be]===!0?me.format[Be]!=null:ye.format[Be]===!1?me.format[Be]==null:(0,i.default)(ye.format[Be],me.format[Be])}))return!1;return ye.prefix!=null&&!ye.prefix.test(me.prefix)||ye.suffix!=null&&!ye.suffix.test(me.suffix)?!1:ye.handler.call(Z,ae,me)!==!0});nt&&Q.preventDefault()}}}})}}]),U}(L.default);V.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},V.DEFAULTS={bindings:{bold:$("bold"),italic:$("italic"),underline:$("underline"),indent:{key:V.keys.TAB,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:V.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:V.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(U,G){G.format.indent!=null?this.quill.format("indent","-1",d.default.sources.USER):G.format.list!=null&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":D(!0),"outdent code-block":D(!1),"remove tab":{key:V.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(U){this.quill.deleteText(U.index-1,1,d.default.sources.USER)}},tab:{key:V.keys.TAB,handler:function(U){this.quill.history.cutoff();var G=new u.default().retain(U.index).delete(U.length).insert(" ");this.quill.updateContents(G,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,d.default.sources.SILENT)}},"list empty enter":{key:V.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(U,G){this.quill.format("list",!1,d.default.sources.USER),G.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:V.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(U){var G=this.quill.getLine(U.index),Z=b(G,2),Q=Z[0],ne=Z[1],ie=(0,t.default)({},Q.formats(),{list:"checked"}),ae=new u.default().retain(U.index).insert(` `,ie).retain(Q.length()-ne-1).retain(1,{list:"unchecked"});this.quill.updateContents(ae,d.default.sources.USER),this.quill.setSelection(U.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:V.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(U,G){var Z=this.quill.getLine(U.index),Q=b(Z,2),ne=Q[0],ie=Q[1],ae=new u.default().retain(U.index).insert(` `,G.format).retain(ne.length()-ie-1).retain(1,{header:null});this.quill.updateContents(ae,d.default.sources.USER),this.quill.setSelection(U.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(U,G){var Z=G.prefix.length,Q=this.quill.getLine(U.index),ne=b(Q,2),ie=ne[0],ae=ne[1];if(ae>Z)return!0;var ue=void 0;switch(G.prefix.trim()){case"[]":case"[ ]":ue="unchecked";break;case"[x]":ue="checked";break;case"-":case"*":ue="bullet";break;default:ue="ordered"}this.quill.insertText(U.index," ",d.default.sources.USER),this.quill.history.cutoff();var ve=new u.default().retain(U.index-ae).delete(Z+1).retain(ie.length()-2-ae).retain(1,{list:ue});this.quill.updateContents(ve,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index-Z,d.default.sources.SILENT)}},"code exit":{key:V.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(U){var G=this.quill.getLine(U.index),Z=b(G,2),Q=Z[0],ne=Z[1],ie=new u.default().retain(U.index+Q.length()-ne-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ie,d.default.sources.USER)}},"embed left":X(V.keys.LEFT,!1),"embed left shift":X(V.keys.LEFT,!0),"embed right":X(V.keys.RIGHT,!1),"embed right shift":X(V.keys.RIGHT,!0)}};function X(R,U){var G,Z=R===V.keys.LEFT?"prefix":"suffix";return G={key:R,shiftKey:U,altKey:null},v(G,Z,/^$/),v(G,"handler",function(ne){var ie=ne.index;R===V.keys.RIGHT&&(ie+=ne.length+1);var ae=this.quill.getLeaf(ie),ue=b(ae,1),ve=ue[0];return ve instanceof f.default.Embed?(R===V.keys.LEFT?U?this.quill.setSelection(ne.index-1,ne.length+1,d.default.sources.USER):this.quill.setSelection(ne.index-1,d.default.sources.USER):U?this.quill.setSelection(ne.index,ne.length+1,d.default.sources.USER):this.quill.setSelection(ne.index+ne.length+1,d.default.sources.USER),!1):!0}),G}function H(R,U){if(!(R.index===0||this.quill.getLength()<=1)){var G=this.quill.getLine(R.index),Z=b(G,1),Q=Z[0],ne={};if(U.offset===0){var ie=this.quill.getLine(R.index-1),ae=b(ie,1),ue=ae[0];if(ue!=null&&ue.length()>1){var ve=Q.formats(),Oe=this.quill.getFormat(R.index-1,1);ne=r.default.attributes.diff(ve,Oe)||{}}}var _e=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(U.prefix)?2:1;this.quill.deleteText(R.index-_e,_e,d.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(R.index-_e,_e,ne,d.default.sources.USER),this.quill.focus()}}function I(R,U){var G=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(U.suffix)?2:1;if(!(R.index>=this.quill.getLength()-G)){var Z={},Q=0,ne=this.quill.getLine(R.index),ie=b(ne,1),ae=ie[0];if(U.offset>=ae.length()-1){var ue=this.quill.getLine(R.index+1),ve=b(ue,1),Oe=ve[0];if(Oe){var _e=ae.formats(),K=this.quill.getFormat(R.index,1);Z=r.default.attributes.diff(_e,K)||{},Q=Oe.length()}}this.quill.deleteText(R.index,G,d.default.sources.USER),Object.keys(Z).length>0&&this.quill.formatLine(R.index+Q-1,G,Z,d.default.sources.USER)}}function S(R){var U=this.quill.getLines(R),G={};if(U.length>1){var Z=U[0].formats(),Q=U[U.length-1].formats();G=r.default.attributes.diff(Q,Z)||{}}this.quill.deleteText(R,d.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(R.index,1,G,d.default.sources.USER),this.quill.setSelection(R.index,d.default.sources.SILENT),this.quill.focus()}function j(R,U){var G=this;R.length>0&&this.quill.scroll.deleteAt(R.index,R.length);var Z=Object.keys(U.format).reduce(function(Q,ne){return f.default.query(ne,f.default.Scope.BLOCK)&&!Array.isArray(U.format[ne])&&(Q[ne]=U.format[ne]),Q},{});this.quill.insertText(R.index,` `,Z,d.default.sources.USER),this.quill.setSelection(R.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(U.format).forEach(function(Q){Z[Q]==null&&(Array.isArray(U.format[Q])||Q!=="link"&&G.quill.format(Q,U.format[Q],d.default.sources.USER))})}function D(R){return{key:V.keys.TAB,shiftKey:!R,format:{"code-block":!0},handler:function(G){var Z=f.default.query("code-block"),Q=G.index,ne=G.length,ie=this.quill.scroll.descendant(Z,Q),ae=b(ie,2),ue=ae[0],ve=ae[1];if(ue!=null){var Oe=this.quill.getIndex(ue),_e=ue.newlineIndex(ve,!0)+1,K=ue.newlineIndex(Oe+ve+ne),Y=ue.domNode.textContent.slice(_e,K).split(` `);ve=0,Y.forEach(function(ee,te){R?(ue.insertAt(_e+ve,Z.TAB),ve+=Z.TAB.length,te===0?Q+=Z.TAB.length:ne+=Z.TAB.length):ee.startsWith(Z.TAB)&&(ue.deleteAt(_e+ve,Z.TAB.length),ve-=Z.TAB.length,te===0?Q-=Z.TAB.length:ne-=Z.TAB.length),ve+=ee.length+1}),this.quill.update(d.default.sources.USER),this.quill.setSelection(Q,ne,d.default.sources.SILENT)}}}}function $(R){return{key:R[0].toUpperCase(),shortKey:!0,handler:function(G,Z){this.quill.format(R,!Z.format[R],d.default.sources.USER)}}}function F(R){if(typeof R=="string"||typeof R=="number")return F({key:R});if((typeof R>"u"?"undefined":E(R))==="object"&&(R=(0,g.default)(R,!1)),typeof R.key=="string")if(V.keys[R.key.toUpperCase()]!=null)R.key=V.keys[R.key.toUpperCase()];else if(R.key.length===1)R.key=R.key.toUpperCase().charCodeAt(0);else return null;return R.shortKey&&(R[z]=R.shortKey,delete R.shortKey),R}p.default=V,p.SHORTKEY=z},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function r(o,f){var n=[],d=!0,N=!1,w=void 0;try{for(var k=o[Symbol.iterator](),L;!(d=(L=k.next()).done)&&(n.push(L.value),!(f&&n.length===f));d=!0);}catch(A){N=!0,w=A}finally{try{!d&&k.return&&k.return()}finally{if(N)throw w}}return n}return function(o,f){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return r(o,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function r(o,f,n){o===null&&(o=Function.prototype);var d=Object.getOwnPropertyDescriptor(o,f);if(d===void 0){var N=Object.getPrototypeOf(o);return N===null?void 0:r(N,f,n)}else{if("value"in d)return d.value;var w=d.get;return w===void 0?void 0:w.call(n)}},_=function(){function r(o,f){for(var n=0;n-1}p.default=t,p.sanitize=s},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=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},b=function(){function a(r,o){for(var f=0;f1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(o!==n&&(n!=null&&n.classList.remove("ql-selected"),o!=null&&(o.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(o.parentNode.children,o),o.hasAttribute("data-value")?this.label.setAttribute("data-value",o.getAttribute("data-value")):this.label.removeAttribute("data-value"),o.hasAttribute("data-label")?this.label.setAttribute("data-label",o.getAttribute("data-label")):this.label.removeAttribute("data-label"),f))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":E(Event))==="object"){var d=document.createEvent("Event");d.initEvent("change",!0,!0),this.select.dispatchEvent(d)}this.close()}}},{key:"update",value:function(){var o=void 0;if(this.select.selectedIndex>-1){var f=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];o=this.select.options[this.select.selectedIndex],this.selectItem(f)}else this.selectItem(null);var n=o!=null&&o!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),a}();p.default=u},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(0),b=M(E),_=c(5),y=M(_),g=c(4),h=M(g),i=c(16),e=M(i),t=c(25),s=M(t),u=c(24),a=M(u),r=c(35),o=M(r),f=c(6),n=M(f),d=c(22),N=M(d),w=c(7),k=M(w),L=c(55),A=M(L),v=c(42),O=M(v),T=c(23),P=M(T);function M(z){return z&&z.__esModule?z:{default:z}}y.default.register({"blots/block":h.default,"blots/block/embed":g.BlockEmbed,"blots/break":e.default,"blots/container":s.default,"blots/cursor":a.default,"blots/embed":o.default,"blots/inline":n.default,"blots/scroll":N.default,"blots/text":k.default,"modules/clipboard":A.default,"modules/history":O.default,"modules/keyboard":P.default}),b.default.register(h.default,e.default,a.default,n.default,N.default,k.default),p.default=y.default},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(1),b=function(){function _(y){this.domNode=y,this.domNode[E.DATA_KEY]={blot:this}}return Object.defineProperty(_.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),_.create=function(y){if(this.tagName==null)throw new E.ParchmentError("Blot definition missing tagName");var g;return Array.isArray(this.tagName)?(typeof y=="string"&&(y=y.toUpperCase(),parseInt(y).toString()===y&&(y=parseInt(y))),typeof y=="number"?g=document.createElement(this.tagName[y-1]):this.tagName.indexOf(y)>-1?g=document.createElement(y):g=document.createElement(this.tagName[0])):g=document.createElement(this.tagName),this.className&&g.classList.add(this.className),g},_.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},_.prototype.clone=function(){var y=this.domNode.cloneNode(!1);return E.create(y)},_.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[E.DATA_KEY]},_.prototype.deleteAt=function(y,g){var h=this.isolate(y,g);h.remove()},_.prototype.formatAt=function(y,g,h,i){var e=this.isolate(y,g);if(E.query(h,E.Scope.BLOT)!=null&&i)e.wrap(h,i);else if(E.query(h,E.Scope.ATTRIBUTE)!=null){var t=E.create(this.statics.scope);e.wrap(t),t.format(h,i)}},_.prototype.insertAt=function(y,g,h){var i=h==null?E.create("text",g):E.create(g,h),e=this.split(y);this.parent.insertBefore(i,e)},_.prototype.insertInto=function(y,g){g===void 0&&(g=null),this.parent!=null&&this.parent.children.remove(this);var h=null;y.children.insertBefore(this,g),g!=null&&(h=g.domNode),(this.domNode.parentNode!=y.domNode||this.domNode.nextSibling!=h)&&y.domNode.insertBefore(this.domNode,h),this.parent=y,this.attach()},_.prototype.isolate=function(y,g){var h=this.split(y);return h.split(g),h},_.prototype.length=function(){return 1},_.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)},_.prototype.optimize=function(y){this.domNode[E.DATA_KEY]!=null&&delete this.domNode[E.DATA_KEY].mutations},_.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},_.prototype.replace=function(y){y.parent!=null&&(y.parent.insertBefore(this,y.next),y.remove())},_.prototype.replaceWith=function(y,g){var h=typeof y=="string"?E.create(y,g):y;return h.replace(this),h},_.prototype.split=function(y,g){return y===0?this:this.next},_.prototype.update=function(y,g){},_.prototype.wrap=function(y,g){var h=typeof y=="string"?E.create(y,g):y;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},_.blotName="abstract",_}();p.default=b},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(12),b=c(32),_=c(33),y=c(1),g=function(){function h(i){this.attributes={},this.domNode=i,this.build()}return h.prototype.attribute=function(i,e){e?i.add(this.domNode,e)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])},h.prototype.build=function(){var i=this;this.attributes={};var e=E.default.keys(this.domNode),t=b.default.keys(this.domNode),s=_.default.keys(this.domNode);e.concat(t).concat(s).forEach(function(u){var a=y.query(u,y.Scope.ATTRIBUTE);a instanceof E.default&&(i.attributes[a.attrName]=a)})},h.prototype.copy=function(i){var e=this;Object.keys(this.attributes).forEach(function(t){var s=e.attributes[t].value(e.domNode);i.format(t,s)})},h.prototype.move=function(i){var e=this;this.copy(i),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},h.prototype.values=function(){var i=this;return Object.keys(this.attributes).reduce(function(e,t){return e[t]=i.attributes[t].value(i.domNode),e},{})},h}();p.default=g},function(m,p,c){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,i){h.__proto__=i}||function(h,i){for(var e in i)i.hasOwnProperty(e)&&(h[e]=i[e])};return function(h,i){g(h,i);function e(){this.constructor=h}h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(12);function _(g,h){var i=g.getAttribute("class")||"";return i.split(/\s+/).filter(function(e){return e.indexOf(h+"-")===0})}var y=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(i){return(i.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},h.prototype.add=function(i,e){return this.canAdd(i,e)?(this.remove(i),i.classList.add(this.keyName+"-"+e),!0):!1},h.prototype.remove=function(i){var e=_(i,this.keyName);e.forEach(function(t){i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")},h.prototype.value=function(i){var e=_(i,this.keyName)[0]||"",t=e.slice(this.keyName.length+1);return this.canAdd(i,t)?t:""},h}(b.default);p.default=y},function(m,p,c){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,i){h.__proto__=i}||function(h,i){for(var e in i)i.hasOwnProperty(e)&&(h[e]=i[e])};return function(h,i){g(h,i);function e(){this.constructor=h}h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(12);function _(g){var h=g.split("-"),i=h.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return h[0]+i}var y=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(i){return(i.getAttribute("style")||"").split(";").map(function(e){var t=e.split(":");return t[0].trim()})},h.prototype.add=function(i,e){return this.canAdd(i,e)?(i.style[_(this.keyName)]=e,!0):!1},h.prototype.remove=function(i){i.style[_(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")},h.prototype.value=function(i){var e=i.style[_(this.keyName)];return this.canAdd(i,e)?e:""},h}(b.default);p.default=y},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function y(g,h){for(var i=0;iL&&this.stack.undo.length>0){var A=this.stack.undo.pop();k=k.compose(A.undo),N=A.redo.compose(N)}else this.lastRecorded=L;this.stack.undo.push({redo:N,undo:k}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(N){this.stack.undo.forEach(function(w){w.undo=N.transform(w.undo,!0),w.redo=N.transform(w.redo,!0)}),this.stack.redo.forEach(function(w){w.undo=N.transform(w.undo,!0),w.redo=N.transform(w.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(i.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(d){return _.default.query(d,_.default.Scope.BLOCK)!=null}):!1}function o(f){var n=f.reduce(function(N,w){return N+=w.delete||0,N},0),d=f.length()-n;return r(f)&&(d-=1),d}p.default=a,p.getLastChangeIndex=o},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.BaseTooltip=void 0;var E=function(){function j(D,$){for(var F=0;F<$.length;F++){var R=$[F];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(D,R.key,R)}}return function(D,$,F){return $&&j(D.prototype,$),F&&j(D,F),D}}(),b=function j(D,$,F){D===null&&(D=Function.prototype);var R=Object.getOwnPropertyDescriptor(D,$);if(R===void 0){var U=Object.getPrototypeOf(D);return U===null?void 0:j(U,$,F)}else{if("value"in R)return R.value;var G=R.get;return G===void 0?void 0:G.call(F)}},_=c(3),y=L(_),g=c(2),h=L(g),i=c(8),e=L(i),t=c(23),s=L(t),u=c(34),a=L(u),r=c(59),o=L(r),f=c(60),n=L(f),d=c(28),N=L(d),w=c(61),k=L(w);function L(j){return j&&j.__esModule?j:{default:j}}function A(j,D){if(!(j instanceof D))throw new TypeError("Cannot call a class as a function")}function v(j,D){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:j}function O(j,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);j.prototype=Object.create(D&&D.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(j,D):j.__proto__=D)}var T=[!1,"center","right","justify"],P=["#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"],M=[!1,"serif","monospace"],z=["1","2","3",!1],V=["small",!1,"large","huge"],X=function(j){O(D,j);function D($,F){A(this,D);var R=v(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,$,F)),U=function G(Z){if(!document.body.contains($.root))return document.body.removeEventListener("click",G);R.tooltip!=null&&!R.tooltip.root.contains(Z.target)&&document.activeElement!==R.tooltip.textbox&&!R.quill.hasFocus()&&R.tooltip.hide(),R.pickers!=null&&R.pickers.forEach(function(Q){Q.container.contains(Z.target)||Q.close()})};return $.emitter.listenDOM("click",document.body,U),R}return E(D,[{key:"addModule",value:function(F){var R=b(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"addModule",this).call(this,F);return F==="toolbar"&&this.extendToolbar(R),R}},{key:"buildButtons",value:function(F,R){F.forEach(function(U){var G=U.getAttribute("class")||"";G.split(/\s+/).forEach(function(Z){if(Z.startsWith("ql-")&&(Z=Z.slice(3),R[Z]!=null))if(Z==="direction")U.innerHTML=R[Z][""]+R[Z].rtl;else if(typeof R[Z]=="string")U.innerHTML=R[Z];else{var Q=U.value||"";Q!=null&&R[Z][Q]&&(U.innerHTML=R[Z][Q])}})})}},{key:"buildPickers",value:function(F,R){var U=this;this.pickers=F.map(function(Z){if(Z.classList.contains("ql-align"))return Z.querySelector("option")==null&&S(Z,T),new n.default(Z,R.align);if(Z.classList.contains("ql-background")||Z.classList.contains("ql-color")){var Q=Z.classList.contains("ql-background")?"background":"color";return Z.querySelector("option")==null&&S(Z,P,Q==="background"?"#ffffff":"#000000"),new o.default(Z,R[Q])}else return Z.querySelector("option")==null&&(Z.classList.contains("ql-font")?S(Z,M):Z.classList.contains("ql-header")?S(Z,z):Z.classList.contains("ql-size")&&S(Z,V)),new N.default(Z)});var G=function(){U.pickers.forEach(function(Q){Q.update()})};this.quill.on(e.default.events.EDITOR_CHANGE,G)}}]),D}(a.default);X.DEFAULTS=(0,y.default)(!0,{},a.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var D=this,$=this.container.querySelector("input.ql-image[type=file]");$==null&&($=document.createElement("input"),$.setAttribute("type","file"),$.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),$.classList.add("ql-image"),$.addEventListener("change",function(){if($.files!=null&&$.files[0]!=null){var F=new FileReader;F.onload=function(R){var U=D.quill.getSelection(!0);D.quill.updateContents(new h.default().retain(U.index).delete(U.length).insert({image:R.target.result}),e.default.sources.USER),D.quill.setSelection(U.index+1,e.default.sources.SILENT),$.value=""},F.readAsDataURL($.files[0])}}),this.container.appendChild($)),$.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var H=function(j){O(D,j);function D($,F){A(this,D);var R=v(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,$,F));return R.textbox=R.root.querySelector('input[type="text"]'),R.listen(),R}return E(D,[{key:"listen",value:function(){var F=this;this.textbox.addEventListener("keydown",function(R){s.default.match(R,"enter")?(F.save(),R.preventDefault()):s.default.match(R,"escape")&&(F.cancel(),R.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),R!=null?this.textbox.value=R:F!==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-"+F)||""),this.root.setAttribute("data-mode",F)}},{key:"restoreFocus",value:function(){var F=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=F}},{key:"save",value:function(){var F=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var R=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",F,e.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",F,e.default.sources.USER)),this.quill.root.scrollTop=R;break}case"video":F=I(F);case"formula":{if(!F)break;var U=this.quill.getSelection(!0);if(U!=null){var G=U.index+U.length;this.quill.insertEmbed(G,this.root.getAttribute("data-mode"),F,e.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(G+1," ",e.default.sources.USER),this.quill.setSelection(G+2,e.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),D}(k.default);function I(j){var D=j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return D?(D[1]||"https")+"://www.youtube.com/embed/"+D[2]+"?showinfo=0":(D=j.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(D[1]||"https")+"://player.vimeo.com/video/"+D[2]+"/":j}function S(j,D){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D.forEach(function(F){var R=document.createElement("option");F===$?R.setAttribute("selected","selected"):R.setAttribute("value",F),j.appendChild(R)})}p.BaseTooltip=H,p.default=X},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function b(){this.head=this.tail=null,this.length=0}return b.prototype.append=function(){for(var _=[],y=0;y1&&this.append.apply(this,_.slice(1))},b.prototype.contains=function(_){for(var y,g=this.iterator();y=g();)if(y===_)return!0;return!1},b.prototype.insertBefore=function(_,y){_&&(_.next=y,y!=null?(_.prev=y.prev,y.prev!=null&&(y.prev.next=_),y.prev=_,y===this.head&&(this.head=_)):this.tail!=null?(this.tail.next=_,_.prev=this.tail,this.tail=_):(_.prev=null,this.head=this.tail=_),this.length+=1)},b.prototype.offset=function(_){for(var y=0,g=this.head;g!=null;){if(g===_)return y;y+=g.length(),g=g.next}return-1},b.prototype.remove=function(_){this.contains(_)&&(_.prev!=null&&(_.prev.next=_.next),_.next!=null&&(_.next.prev=_.prev),_===this.head&&(this.head=_.next),_===this.tail&&(this.tail=_.prev),this.length-=1)},b.prototype.iterator=function(_){return _===void 0&&(_=this.head),function(){var y=_;return _!=null&&(_=_.next),y}},b.prototype.find=function(_,y){y===void 0&&(y=!1);for(var g,h=this.iterator();g=h();){var i=g.length();if(_s?g(t,_-s,Math.min(y,s+a-_)):g(t,0,Math.min(a,_+y-s)),s+=a}},b.prototype.map=function(_){return this.reduce(function(y,g){return y.push(_(g)),y},[])},b.prototype.reduce=function(_,y){for(var g,h=this.iterator();g=h();)y=_(y,g);return y},b}();p.default=E},function(m,p,c){var E=this&&this.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(e,t){i(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(17),_=c(1),y={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},g=100,h=function(i){E(e,i);function e(t){var s=i.call(this,t)||this;return s.scroll=s,s.observer=new MutationObserver(function(u){s.update(u)}),s.observer.observe(s.domNode,y),s.attach(),s}return e.prototype.detach=function(){i.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(t,s){this.update(),t===0&&s===this.length()?this.children.forEach(function(u){u.remove()}):i.prototype.deleteAt.call(this,t,s)},e.prototype.formatAt=function(t,s,u,a){this.update(),i.prototype.formatAt.call(this,t,s,u,a)},e.prototype.insertAt=function(t,s,u){this.update(),i.prototype.insertAt.call(this,t,s,u)},e.prototype.optimize=function(t,s){var u=this;t===void 0&&(t=[]),s===void 0&&(s={}),i.prototype.optimize.call(this,s);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)t.push(a.pop());for(var r=function(d,N){N===void 0&&(N=!0),!(d==null||d===u)&&d.domNode.parentNode!=null&&(d.domNode[_.DATA_KEY].mutations==null&&(d.domNode[_.DATA_KEY].mutations=[]),N&&r(d.parent))},o=function(d){d.domNode[_.DATA_KEY]==null||d.domNode[_.DATA_KEY].mutations==null||(d instanceof b.default&&d.children.forEach(o),d.optimize(s))},f=t,n=0;f.length>0;n+=1){if(n>=g)throw new Error("[Parchment] Maximum optimize iterations reached");for(f.forEach(function(d){var N=_.find(d.target,!0);N!=null&&(N.domNode===d.target&&(d.type==="childList"?(r(_.find(d.previousSibling,!1)),[].forEach.call(d.addedNodes,function(w){var k=_.find(w,!1);r(k,!1),k instanceof b.default&&k.children.forEach(function(L){r(L,!1)})})):d.type==="attributes"&&r(N.prev)),r(N))}),this.children.forEach(o),f=[].slice.call(this.observer.takeRecords()),a=f.slice();a.length>0;)t.push(a.pop())}},e.prototype.update=function(t,s){var u=this;s===void 0&&(s={}),t=t||this.observer.takeRecords(),t.map(function(a){var r=_.find(a.target,!0);return r==null?null:r.domNode[_.DATA_KEY].mutations==null?(r.domNode[_.DATA_KEY].mutations=[a],r):(r.domNode[_.DATA_KEY].mutations.push(a),null)}).forEach(function(a){a==null||a===u||a.domNode[_.DATA_KEY]==null||a.update(a.domNode[_.DATA_KEY].mutations||[],s)}),this.domNode[_.DATA_KEY].mutations!=null&&i.prototype.update.call(this,this.domNode[_.DATA_KEY].mutations,s),this.optimize(t,s)},e.blotName="scroll",e.defaultChild="block",e.scope=_.Scope.BLOCK_BLOT,e.tagName="DIV",e}(b.default);p.default=h},function(m,p,c){var E=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t])};return function(i,e){h(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(18),_=c(1);function y(h,i){if(Object.keys(h).length!==Object.keys(i).length)return!1;for(var e in h)if(h[e]!==i[e])return!1;return!0}var g=function(h){E(i,h);function i(){return h!==null&&h.apply(this,arguments)||this}return i.formats=function(e){if(e.tagName!==i.tagName)return h.formats.call(this,e)},i.prototype.format=function(e,t){var s=this;e===this.statics.blotName&&!t?(this.children.forEach(function(u){u instanceof b.default||(u=u.wrap(i.blotName,!0)),s.attributes.copy(u)}),this.unwrap()):h.prototype.format.call(this,e,t)},i.prototype.formatAt=function(e,t,s,u){if(this.formats()[s]!=null||_.query(s,_.Scope.ATTRIBUTE)){var a=this.isolate(e,t);a.format(s,u)}else h.prototype.formatAt.call(this,e,t,s,u)},i.prototype.optimize=function(e){h.prototype.optimize.call(this,e);var t=this.formats();if(Object.keys(t).length===0)return this.unwrap();var s=this.next;s instanceof i&&s.prev===this&&y(t,s.formats())&&(s.moveChildren(this),s.remove())},i.blotName="inline",i.scope=_.Scope.INLINE_BLOT,i.tagName="SPAN",i}(b.default);p.default=g},function(m,p,c){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,i){h.__proto__=i}||function(h,i){for(var e in i)i.hasOwnProperty(e)&&(h[e]=i[e])};return function(h,i){g(h,i);function e(){this.constructor=h}h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(18),_=c(1),y=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.formats=function(i){var e=_.query(h.blotName).tagName;if(i.tagName!==e)return g.formats.call(this,i)},h.prototype.format=function(i,e){_.query(i,_.Scope.BLOCK)!=null&&(i===this.statics.blotName&&!e?this.replaceWith(h.blotName):g.prototype.format.call(this,i,e))},h.prototype.formatAt=function(i,e,t,s){_.query(t,_.Scope.BLOCK)!=null?this.format(t,s):g.prototype.formatAt.call(this,i,e,t,s)},h.prototype.insertAt=function(i,e,t){if(t==null||_.query(e,_.Scope.INLINE)!=null)g.prototype.insertAt.call(this,i,e,t);else{var s=this.split(i),u=_.create(e,t);s.parent.insertBefore(u,s)}},h.prototype.update=function(i,e){navigator.userAgent.match(/Trident/)?this.build():g.prototype.update.call(this,i,e)},h.blotName="block",h.scope=_.Scope.BLOCK_BLOT,h.tagName="P",h}(b.default);p.default=y},function(m,p,c){var E=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,h){g.__proto__=h}||function(g,h){for(var i in h)h.hasOwnProperty(i)&&(g[i]=h[i])};return function(g,h){y(g,h);function i(){this.constructor=g}g.prototype=h===null?Object.create(h):(i.prototype=h.prototype,new i)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(19),_=function(y){E(g,y);function g(){return y!==null&&y.apply(this,arguments)||this}return g.formats=function(h){},g.prototype.format=function(h,i){y.prototype.formatAt.call(this,0,this.length(),h,i)},g.prototype.formatAt=function(h,i,e,t){h===0&&i===this.length()?this.format(e,t):y.prototype.formatAt.call(this,h,i,e,t)},g.prototype.formats=function(){return this.statics.formats(this.domNode)},g}(b.default);p.default=_},function(m,p,c){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,i){h.__proto__=i}||function(h,i){for(var e in i)i.hasOwnProperty(e)&&(h[e]=i[e])};return function(h,i){g(h,i);function e(){this.constructor=h}h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}();Object.defineProperty(p,"__esModule",{value:!0});var b=c(19),_=c(1),y=function(g){E(h,g);function h(i){var e=g.call(this,i)||this;return e.text=e.statics.value(e.domNode),e}return h.create=function(i){return document.createTextNode(i)},h.value=function(i){var e=i.data;return e.normalize&&(e=e.normalize()),e},h.prototype.deleteAt=function(i,e){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+e)},h.prototype.index=function(i,e){return this.domNode===i?e:-1},h.prototype.insertAt=function(i,e,t){t==null?(this.text=this.text.slice(0,i)+e+this.text.slice(i),this.domNode.data=this.text):g.prototype.insertAt.call(this,i,e,t)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(i){g.prototype.optimize.call(this,i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(i,e){return[this.domNode,i]},h.prototype.split=function(i,e){if(e===void 0&&(e=!1),!e){if(i===0)return this;if(i===this.length())return this.next}var t=_.create(this.domNode.splitText(i));return this.parent.insertBefore(t,this.next),this.text=this.statics.value(this.domNode),t},h.prototype.update=function(i,e){var t=this;i.some(function(s){return s.type==="characterData"&&s.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=_.Scope.INLINE_BLOT,h}(b.default);p.default=y},function(m,p,c){var E=document.createElement("div");if(E.classList.toggle("test-class",!1),E.classList.contains("test-class")){var b=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(_,y){return arguments.length>1&&!this.contains(_)==!y?y:b.call(this,_)}}String.prototype.startsWith||(String.prototype.startsWith=function(_,y){return y=y||0,this.substr(y,_.length)===_}),String.prototype.endsWith||(String.prototype.endsWith=function(_,y){var g=this.toString();(typeof y!="number"||!isFinite(y)||Math.floor(y)!==y||y>g.length)&&(y=g.length),y-=_.length;var h=g.indexOf(_,y);return h!==-1&&h===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 g=Object(this),h=g.length>>>0,i=arguments[1],e,t=0;td.length?n:d,k=n.length>d.length?d:n,L=w.indexOf(k);if(L!=-1)return N=[[E,w.substring(0,L)],[b,k],[E,w.substring(L+k.length)]],n.length>d.length&&(N[0][0]=N[2][0]=c),N;if(k.length==1)return[[c,n],[E,d]];var A=t(n,d);if(A){var v=A[0],O=A[1],T=A[2],P=A[3],M=A[4],z=_(v,T),V=_(O,P);return z.concat([[b,M]],V)}return g(n,d)}function g(n,d){for(var N=n.length,w=d.length,k=Math.ceil((N+w)/2),L=k,A=2*k,v=new Array(A),O=new Array(A),T=0;TN)V+=2;else if($>w)z+=2;else if(M){var F=L+P-S;if(F>=0&&F=R)return h(n,d,D,$)}}}for(var U=-I+X;U<=I-H;U+=2){var F=L+U,R;U==-I||U!=I&&O[F-1]N)H+=2;else if(G>w)X+=2;else if(!M){var j=L+P-U;if(j>=0&&j=R)return h(n,d,D,$)}}}}return[[c,n],[E,d]]}function h(n,d,N,w){var k=n.substring(0,N),L=d.substring(0,w),A=n.substring(N),v=d.substring(w),O=_(k,L),T=_(A,v);return O.concat(T)}function i(n,d){if(!n||!d||n.charAt(0)!=d.charAt(0))return 0;for(var N=0,w=Math.min(n.length,d.length),k=w,L=0;Nd.length?n:d,w=n.length>d.length?d:n;if(N.length<4||w.length*2=V.length?[D,$,F,R,j]:null}var L=k(N,w,Math.ceil(N.length/4)),A=k(N,w,Math.ceil(N.length/2)),v;if(!L&&!A)return null;A?L?v=L[4].length>A[4].length?L:A:v=A:v=L;var O,T,P,M;n.length>d.length?(O=v[0],T=v[1],P=v[2],M=v[3]):(P=v[0],M=v[1],O=v[2],T=v[3]);var z=v[4];return[O,T,P,M,z]}function s(n){n.push([b,""]);for(var d=0,N=0,w=0,k="",L="",A;d1?(N!==0&&w!==0&&(A=i(L,k),A!==0&&(d-N-w>0&&n[d-N-w-1][0]==b?n[d-N-w-1][1]+=L.substring(0,A):(n.splice(0,0,[b,L.substring(0,A)]),d++),L=L.substring(A),k=k.substring(A)),A=e(L,k),A!==0&&(n[d][1]=L.substring(L.length-A)+n[d][1],L=L.substring(0,L.length-A),k=k.substring(0,k.length-A))),N===0?n.splice(d-w,N+w,[E,L]):w===0?n.splice(d-N,N+w,[c,k]):n.splice(d-N-w,N+w,[c,k],[E,L]),d=d-N-w+(N?1:0)+(w?1:0)+1):d!==0&&n[d-1][0]==b?(n[d-1][1]+=n[d][1],n.splice(d,1)):d++,w=0,N=0,k="",L="";break}n[n.length-1][1]===""&&n.pop();var v=!1;for(d=1;d0&&w.splice(k+2,0,[A[0],v]),f(w,k,3)}else return n}function o(n){for(var d=!1,N=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},w=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},k=2;k0&&L.push(n[k]);return L}function f(n,d,N){for(var w=d+N-1;w>=0&&w>=d-1;w--)if(w+1\r?\n +\<"),this.convert();var J=this.quill.getFormat(this.quill.selection.savedRange.index);if(J[w.default.blotName]){var he=this.container.innerText;return this.container.innerHTML="",new i.default().insert(he,T({},w.default.blotName,J[w.default.blotName]))}var le=this.prepareMatching(),fe=b(le,2),xe=fe[0],we=fe[1],me=U(this.container,xe,we);return F(me,` `)&&me.ops[me.ops.length-1].attributes==null&&(me=me.compose(new i.default().retain(me.length()-1).delete(1))),V.log("convert",this.container.innerHTML,me),this.container.innerHTML="",me}},{key:"dangerouslyPasteHTML",value:function(te,J){var he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;if(typeof te=="string")this.quill.setContents(this.convert(te),J),this.quill.setSelection(0,u.default.sources.SILENT);else{var le=this.convert(J);this.quill.updateContents(new i.default().retain(te).concat(le),he),this.quill.setSelection(te+le.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(te){var J=this;if(!(te.defaultPrevented||!this.quill.isEnabled())){var he=this.quill.getSelection(),le=new i.default().retain(he.index),fe=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){le=le.concat(J.convert()).delete(he.length),J.quill.updateContents(le,u.default.sources.USER),J.quill.setSelection(le.length()-he.length,u.default.sources.SILENT),J.quill.scrollingContainer.scrollTop=fe,J.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var te=this,J=[],he=[];return this.matchers.forEach(function(le){var fe=b(le,2),xe=fe[0],we=fe[1];switch(xe){case Node.TEXT_NODE:he.push(we);break;case Node.ELEMENT_NODE:J.push(we);break;default:[].forEach.call(te.container.querySelectorAll(xe),function(me){me[X]=me[X]||[],me[X].push(we)});break}}),[J,he]}}]),Y}(f.default);j.DEFAULTS={matchers:[],matchVisual:!0};function D(K,Y,ee){return(typeof Y>"u"?"undefined":E(Y))==="object"?Object.keys(Y).reduce(function(te,J){return D(te,J,Y[J])},K):K.reduce(function(te,J){return J.attributes&&J.attributes[Y]?te.push(J):te.insert(J.insert,(0,g.default)({},T({},Y,ee),J.attributes))},new i.default)}function $(K){if(K.nodeType!==Node.ELEMENT_NODE)return{};var Y="__ql-computed-style";return K[Y]||(K[Y]=window.getComputedStyle(K))}function F(K,Y){for(var ee="",te=K.ops.length-1;te>=0&&ee.length-1}function U(K,Y,ee){return K.nodeType===K.TEXT_NODE?ee.reduce(function(te,J){return J(K,te)},new i.default):K.nodeType===K.ELEMENT_NODE?[].reduce.call(K.childNodes||[],function(te,J){var he=U(J,Y,ee);return J.nodeType===K.ELEMENT_NODE&&(he=Y.reduce(function(le,fe){return fe(J,le)},he),he=(J[X]||[]).reduce(function(le,fe){return fe(J,le)},he)),te.concat(he)},new i.default):new i.default}function G(K,Y,ee){return D(ee,K,!0)}function Z(K,Y){var ee=t.default.Attributor.Attribute.keys(K),te=t.default.Attributor.Class.keys(K),J=t.default.Attributor.Style.keys(K),he={};return ee.concat(te).concat(J).forEach(function(le){var fe=t.default.query(le,t.default.Scope.ATTRIBUTE);fe!=null&&(he[fe.attrName]=fe.value(K),he[fe.attrName])||(fe=I[le],fe!=null&&(fe.attrName===le||fe.keyName===le)&&(he[fe.attrName]=fe.value(K)||void 0),fe=S[le],fe!=null&&(fe.attrName===le||fe.keyName===le)&&(fe=S[le],he[fe.attrName]=fe.value(K)||void 0))}),Object.keys(he).length>0&&(Y=D(Y,he)),Y}function Q(K,Y){var ee=t.default.query(K);if(ee==null)return Y;if(ee.prototype instanceof t.default.Embed){var te={},J=ee.value(K);J!=null&&(te[ee.blotName]=J,Y=new i.default().insert(te,ee.formats(K)))}else typeof ee.formats=="function"&&(Y=D(Y,ee.blotName,ee.formats(K)));return Y}function ne(K,Y){return F(Y,` `)||Y.insert(` `),Y}function ie(){return new i.default}function ae(K,Y){var ee=t.default.query(K);if(ee==null||ee.blotName!=="list-item"||!F(Y,` `))return Y;for(var te=-1,J=K.parentNode;!J.classList.contains("ql-clipboard");)(t.default.query(J)||{}).blotName==="list"&&(te+=1),J=J.parentNode;return te<=0?Y:Y.compose(new i.default().retain(Y.length()-1).retain(1,{indent:te}))}function ue(K,Y){return F(Y,` `)||(R(K)||Y.length()>0&&K.nextSibling&&R(K.nextSibling))&&Y.insert(` `),Y}function ve(K,Y){if(R(K)&&K.nextElementSibling!=null&&!F(Y,` `)){var ee=K.offsetHeight+parseFloat($(K).marginTop)+parseFloat($(K).marginBottom);K.nextElementSibling.offsetTop>K.offsetTop+ee*1.5&&Y.insert(` `)}return Y}function Oe(K,Y){var ee={},te=K.style||{};return te.fontStyle&&$(K).fontStyle==="italic"&&(ee.italic=!0),te.fontWeight&&($(K).fontWeight.startsWith("bold")||parseInt($(K).fontWeight)>=700)&&(ee.bold=!0),Object.keys(ee).length>0&&(Y=D(Y,ee)),parseFloat(te.textIndent||0)>0&&(Y=new i.default().insert(" ").concat(Y)),Y}function _e(K,Y){var ee=K.data;if(K.parentNode.tagName==="O:P")return Y.insert(ee.trim());if(ee.trim().length===0&&K.parentNode.classList.contains("ql-clipboard"))return Y;if(!$(K.parentNode).whiteSpace.startsWith("pre")){var te=function(he,le){return le=le.replace(/[^\u00a0]/g,""),le.length<1&&he?" ":le};ee=ee.replace(/\r\n/g," ").replace(/\n/g," "),ee=ee.replace(/\s\s+/g,te.bind(te,!0)),(K.previousSibling==null&&R(K.parentNode)||K.previousSibling!=null&&R(K.previousSibling))&&(ee=ee.replace(/^\s+/,te.bind(te,!1))),(K.nextSibling==null&&R(K.parentNode)||K.nextSibling!=null&&R(K.nextSibling))&&(ee=ee.replace(/\s+$/,te.bind(te,!1)))}return Y.insert(ee)}p.default=j,p.matchAttributor=Z,p.matchBlot=Q,p.matchNewline=ue,p.matchSpacing=ve,p.matchText=_e},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function s(u,a){for(var r=0;r '},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function s(u,a){for(var r=0;rt.right&&(u=t.right-s.right,this.root.style.left=i+u+"px"),s.leftt.bottom){var a=s.bottom-s.top,r=h.bottom-h.top+a;this.root.style.top=e-r+"px",this.root.classList.add("ql-flip")}return u}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),y}();p.default=_},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function A(v,O){var T=[],P=!0,M=!1,z=void 0;try{for(var V=v[Symbol.iterator](),X;!(P=(X=V.next()).done)&&(T.push(X.value),!(O&&T.length===O));P=!0);}catch(H){M=!0,z=H}finally{try{!P&&V.return&&V.return()}finally{if(M)throw z}}return T}return function(v,O){if(Array.isArray(v))return v;if(Symbol.iterator in Object(v))return A(v,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function A(v,O,T){v===null&&(v=Function.prototype);var P=Object.getOwnPropertyDescriptor(v,O);if(P===void 0){var M=Object.getPrototypeOf(v);return M===null?void 0:A(M,O,T)}else{if("value"in P)return P.value;var z=P.get;return z===void 0?void 0:z.call(T)}},_=function(){function A(v,O){for(var T=0;T','','',''].join(""),p.default=k},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(29),b=J(E),_=c(36),y=c(38),g=c(64),h=c(65),i=J(h),e=c(66),t=J(e),s=c(67),u=J(s),a=c(37),r=c(26),o=c(39),f=c(40),n=c(56),d=J(n),N=c(68),w=J(N),k=c(27),L=J(k),A=c(69),v=J(A),O=c(70),T=J(O),P=c(71),M=J(P),z=c(72),V=J(z),X=c(73),H=J(X),I=c(13),S=J(I),j=c(74),D=J(j),$=c(75),F=J($),R=c(57),U=J(R),G=c(41),Z=J(G),Q=c(28),ne=J(Q),ie=c(59),ae=J(ie),ue=c(60),ve=J(ue),Oe=c(61),_e=J(Oe),K=c(108),Y=J(K),ee=c(62),te=J(ee);function J(he){return he&&he.__esModule?he:{default:he}}b.default.register({"attributors/attribute/direction":y.DirectionAttribute,"attributors/class/align":_.AlignClass,"attributors/class/background":a.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":y.DirectionClass,"attributors/class/font":o.FontClass,"attributors/class/size":f.SizeClass,"attributors/style/align":_.AlignStyle,"attributors/style/background":a.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":y.DirectionStyle,"attributors/style/font":o.FontStyle,"attributors/style/size":f.SizeStyle},!0),b.default.register({"formats/align":_.AlignClass,"formats/direction":y.DirectionClass,"formats/indent":g.IndentClass,"formats/background":a.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":o.FontClass,"formats/size":f.SizeClass,"formats/blockquote":i.default,"formats/code-block":S.default,"formats/header":t.default,"formats/list":u.default,"formats/bold":d.default,"formats/code":I.Code,"formats/italic":w.default,"formats/link":L.default,"formats/script":v.default,"formats/strike":T.default,"formats/underline":M.default,"formats/image":V.default,"formats/video":H.default,"formats/list/item":s.ListItem,"modules/formula":D.default,"modules/syntax":F.default,"modules/toolbar":U.default,"themes/bubble":Y.default,"themes/snow":te.default,"ui/icons":Z.default,"ui/picker":ne.default,"ui/icon-picker":ve.default,"ui/color-picker":ae.default,"ui/tooltip":_e.default},!0),p.default=b.default},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.IndentClass=void 0;var E=function(){function u(a,r){for(var o=0;o0&&this.children.tail.format(w,k)}},{key:"formats",value:function(){return s({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(w,k){if(w instanceof o)b(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"insertBefore",this).call(this,w,k);else{var L=k==null?this.length():k.offset(this),A=this.split(L);A.parent.insertBefore(w,A)}}},{key:"optimize",value:function(w){b(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"optimize",this).call(this,w);var k=this.next;k!=null&&k.prev===this&&k.statics.blotName===this.statics.blotName&&k.domNode.tagName===this.domNode.tagName&&k.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(k.moveChildren(this),k.remove())}},{key:"replace",value:function(w){if(w.statics.blotName!==this.statics.blotName){var k=y.default.create(this.statics.defaultChild);w.moveChildren(k),this.appendChild(k)}b(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"replace",this).call(this,w)}}]),d}(e.default);f.blotName="list",f.scope=y.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[o],p.ListItem=o,p.default=f},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=c(56),b=_(E);function _(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 h(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 i=function(e){h(t,e);function t(){return y(this,t),g(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(b.default);i.blotName="italic",i.tagName=["EM","I"],p.default=i},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function s(u,a){for(var r=0;r-1?n?this.domNode.setAttribute(f,n):this.domNode.removeAttribute(f):b(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,f,n)}}],[{key:"create",value:function(f){var n=b(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 s.reduce(function(n,d){return f.hasAttribute(d)&&(n[d]=f.getAttribute(d)),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,g.sanitize)(f,["http","https","data"])?f:"//:0"}},{key:"value",value:function(f){return f.getAttribute("src")}}]),r}(y.default.Embed);u.blotName="image",u.tagName="IMG",p.default=u},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0});var E=function(){function a(r,o){for(var f=0;f-1?n?this.domNode.setAttribute(f,n):this.domNode.removeAttribute(f):b(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,f,n)}}],[{key:"create",value:function(f){var n=b(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 s.reduce(function(n,d){return f.hasAttribute(d)&&(n[d]=f.getAttribute(d)),n},{})}},{key:"sanitize",value:function(f){return g.default.sanitize(f)}},{key:"value",value:function(f){return f.getAttribute("src")}}]),r}(_.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",p.default=u},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.FormulaBlot=void 0;var E=function(){function f(n,d){for(var N=0;N0||this.cachedText==null)&&(this.domNode.innerHTML=L(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),w}(s.default);f.className="ql-syntax";var n=new y.default.Attributor.Class("token","hljs",{scope:y.default.Scope.INLINE}),d=function(N){o(w,N),E(w,null,[{key:"register",value:function(){h.default.register(n,!0),h.default.register(f,!0)}}]);function w(k,L){a(this,w);var A=r(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,k,L));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var v=null;return A.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(v),v=setTimeout(function(){A.highlight(),v=null},A.options.interval)}),A.highlight(),A}return E(w,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var A=this.quill.getSelection();this.quill.scroll.descendants(f).forEach(function(v){v.highlight(L.options.highlight)}),this.quill.update(h.default.sources.SILENT),A!=null&&this.quill.setSelection(A,h.default.sources.SILENT)}}}]),w}(e.default);d.DEFAULTS={highlight:function(){return window.hljs==null?null:function(N){var w=window.hljs.highlightAuto(N);return w.value}}(),interval:1e3},p.CodeBlock=f,p.CodeToken=n,p.default=d},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p){m.exports=' '},function(m,p,c){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.BubbleTooltip=void 0;var E=function w(k,L,A){k===null&&(k=Function.prototype);var v=Object.getOwnPropertyDescriptor(k,L);if(v===void 0){var O=Object.getPrototypeOf(k);return O===null?void 0:w(O,L,A)}else{if("value"in v)return v.value;var T=v.get;return T===void 0?void 0:T.call(A)}},b=function(){function w(k,L){for(var A=0;A0&&M===h.default.sources.USER){v.show(),v.root.style.left="0px",v.root.style.width="",v.root.style.width=v.root.offsetWidth+"px";var z=v.quill.getLines(T.index,T.length);if(z.length===1)v.position(v.quill.getBounds(T));else{var V=z[z.length-1],X=v.quill.getIndex(V),H=Math.min(V.length()-1,T.index+T.length-X),I=v.quill.getBounds(new t.Range(X,H));v.position(I)}}else document.activeElement!==v.textbox&&v.quill.hasFocus()&&v.hide()}),v}return b(k,[{key:"listen",value:function(){var A=this;E(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var v=A.quill.getSelection();v!=null&&A.position(A.quill.getBounds(v))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var v=E(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"position",this).call(this,A),O=this.root.querySelector(".ql-tooltip-arrow");if(O.style.marginLeft="",v===0)return v;O.style.marginLeft=-1*v-O.offsetWidth/2+"px"}}]),k}(i.BaseTooltip);N.TEMPLATE=['','
','','',"
"].join(""),p.BubbleTooltip=N,p.default=d},function(m,p,c){m.exports=c(63)}]).default})})(Xr);const on=Ar(Qn);var Ve=-1,He=1,De=0;function Rt(q,C,m,p){if(q===C)return q?[[De,q]]:[];if(m!=null){var c=ri(q,C,m);if(c)return c}var E=Jn(q,C),b=q.substring(0,E);q=q.substring(E),C=C.substring(E),E=er(q,C);var _=q.substring(q.length-E);q=q.substring(0,q.length-E),C=C.substring(0,C.length-E);var y=Jr(q,C);return b&&y.unshift([De,b]),_&&y.push([De,_]),yr(y,p),y}function Jr(q,C){var m;if(!q)return[[He,C]];if(!C)return[[Ve,q]];var p=q.length>C.length?q:C,c=q.length>C.length?C:q,E=p.indexOf(c);if(E!==-1)return m=[[He,p.substring(0,E)],[De,c],[He,p.substring(E+c.length)]],q.length>C.length&&(m[0][0]=m[2][0]=Ve),m;if(c.length===1)return[[Ve,q],[He,C]];var b=ti(q,C);if(b){var _=b[0],y=b[1],g=b[2],h=b[3],i=b[4],e=Rt(_,g),t=Rt(y,h);return e.concat([[De,i]],t)}return ei(q,C)}function ei(q,C){for(var m=q.length,p=C.length,c=Math.ceil((m+p)/2),E=c,b=2*c,_=new Array(b),y=new Array(b),g=0;gm)t+=2;else if(n>p)e+=2;else if(i){var d=E+h-r;if(d>=0&&d=N)return ur(q,C,f,n)}}}for(var w=-a+s;w<=a-u;w+=2){var d=E+w,N;w===-a||w!==a&&y[d-1]m)u+=2;else if(k>p)s+=2;else if(!i){var o=E+h-w;if(o>=0&&o=N)return ur(q,C,f,n)}}}}return[[Ve,q],[He,C]]}function ur(q,C,m,p){var c=q.substring(0,m),E=C.substring(0,p),b=q.substring(m),_=C.substring(p),y=Rt(c,E),g=Rt(b,_);return y.concat(g)}function Jn(q,C){if(!q||!C||q.charAt(0)!==C.charAt(0))return 0;for(var m=0,p=Math.min(q.length,C.length),c=p,E=0;mC.length?q:C,p=q.length>C.length?C:q;if(m.length<4||p.length*2=t.length?[f,n,d,N,o]:null}var E=c(m,p,Math.ceil(m.length/4)),b=c(m,p,Math.ceil(m.length/2)),_;if(!E&&!b)return null;b?E?_=E[4].length>b[4].length?E:b:_=b:_=E;var y,g,h,i;q.length>C.length?(y=_[0],g=_[1],h=_[2],i=_[3]):(h=_[0],i=_[1],y=_[2],g=_[3]);var e=_[4];return[y,g,h,i,e]}function yr(q,C){q.push([De,""]);for(var m=0,p=0,c=0,E="",b="",_;m=0&&_r(q[y][1])){var g=q[y][1].slice(-1);if(q[y][1]=q[y][1].slice(0,-1),E=g+E,b=g+b,!q[y][1]){q.splice(y,1),m--;var h=y-1;q[h]&&q[h][0]===He&&(c++,b=q[h][1]+b,h--),q[h]&&q[h][0]===Ve&&(p++,E=q[h][1]+E,h--),y=h}}if(br(q[m][1])){var g=q[m][1].charAt(0);q[m][1]=q[m][1].slice(1),E+=g,b+=g}}if(m0||b.length>0){E.length>0&&b.length>0&&(_=Jn(b,E),_!==0&&(y>=0?q[y][1]+=b.substring(0,_):(q.splice(0,0,[De,b.substring(0,_)]),m++),b=b.substring(_),E=E.substring(_)),_=er(b,E),_!==0&&(q[m][1]=b.substring(b.length-_)+q[m][1],b=b.substring(0,b.length-_),E=E.substring(0,E.length-_)));var i=c+p;E.length===0&&b.length===0?(q.splice(m-i,i),m=m-i):E.length===0?(q.splice(m-i,i,[He,b]),m=m-i+1):b.length===0?(q.splice(m-i,i,[Ve,E]),m=m-i+1):(q.splice(m-i,i,[Ve,E],[He,b]),m=m-i+2)}m!==0&&q[m-1][0]===De?(q[m-1][1]+=q[m][1],q.splice(m,1)):m++,c=0,p=0,E="",b="";break}}q[q.length-1][1]===""&&q.pop();var e=!1;for(m=1;m=55296&&q<=56319}function mr(q){return q>=56320&&q<=57343}function br(q){return mr(q.charCodeAt(0))}function _r(q){return gr(q.charCodeAt(q.length-1))}function ni(q){for(var C=[],m=0;m0&&C.push(q[m]);return C}function Zn(q,C,m,p){return _r(q)||br(p)?null:ni([[De,q],[Ve,C],[He,m],[De,p]])}function ri(q,C,m){var p=typeof m=="number"?{index:m,length:0}:m.oldRange,c=typeof m=="number"?null:m.newRange,E=q.length,b=C.length;if(p.length===0&&(c===null||c.length===0)){var _=p.index,y=q.slice(0,_),g=q.slice(_),h=c?c.index:null;e:{var i=_+b-E;if(h!==null&&h!==i||i<0||i>b)break e;var e=C.slice(0,i),t=C.slice(i);if(t!==g)break e;var s=Math.min(_,i),u=y.slice(0,s),a=e.slice(0,s);if(u!==a)break e;var r=y.slice(s),o=e.slice(s);return Zn(u,r,o,g)}e:{if(h!==null&&h!==_)break e;var f=_,e=C.slice(0,f),t=C.slice(f);if(e!==y)break e;var n=Math.min(E-f,b-f),d=g.slice(g.length-n),N=t.slice(t.length-n);if(d!==N)break e;var r=g.slice(0,g.length-n),o=t.slice(0,t.length-n);return Zn(y,r,o,d)}}if(p.length>0&&c&&c.length===0)e:{var u=q.slice(0,p.index),d=q.slice(p.index+p.length),s=u.length,n=d.length;if(b-1}function yn(l,x){var B=this.__data__,W=dt(B,l);return W<0?B.push([l,x]):B[W][1]=x,this}Te.prototype.clear=hn,Te.prototype.delete=dn,Te.prototype.get=vn,Te.prototype.has=pn,Te.prototype.set=yn;function Pe(l){var x=-1,B=l?l.length:0;for(this.clear();++x-1&&l%1==0&&l-1&&l%1==0&&l<=c}function $e(l){var x=typeof l;return!!l&&(x=="object"||x=="function")}function Yt(l){return!!l&&typeof l=="object"}function Pt(l){return yt(l)?ht(l):Ln(l)}function Kn(){return[]}function $n(){return!1}q.exports=Vt})(oi,jt);var It={},ai={get exports(){return It},set exports(q){It=q}};(function(q,C){var m=200,p="__lodash_hash_undefined__",c=1,E=2,b=9007199254740991,_="[object Arguments]",y="[object Array]",g="[object AsyncFunction]",h="[object Boolean]",i="[object Date]",e="[object Error]",t="[object Function]",s="[object GeneratorFunction]",u="[object Map]",a="[object Number]",r="[object Null]",o="[object Object]",f="[object Promise]",n="[object Proxy]",d="[object RegExp]",N="[object Set]",w="[object String]",k="[object Symbol]",L="[object Undefined]",A="[object WeakMap]",v="[object ArrayBuffer]",O="[object DataView]",T="[object Float32Array]",P="[object Float64Array]",M="[object Int8Array]",z="[object Int16Array]",V="[object Int32Array]",X="[object Uint8Array]",H="[object Uint8ClampedArray]",I="[object Uint16Array]",S="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,F={};F[T]=F[P]=F[M]=F[z]=F[V]=F[X]=F[H]=F[I]=F[S]=!0,F[_]=F[y]=F[v]=F[h]=F[O]=F[i]=F[e]=F[t]=F[u]=F[a]=F[o]=F[d]=F[N]=F[w]=F[A]=!1;var R=typeof Se=="object"&&Se&&Se.Object===Object&&Se,U=typeof self=="object"&&self&&self.Object===Object&&self,G=R||U||Function("return this")(),Z=C&&!C.nodeType&&C,Q=Z&&!0&&q&&!q.nodeType&&q,ne=Q&&Q.exports===Z,ie=ne&&R.process,ae=function(){try{return ie&&ie.binding&&ie.binding("util")}catch{}}(),ue=ae&&ae.isTypedArray;function ve(l,x){for(var B=-1,W=l==null?0:l.length,ce=0,re=[];++B-1}function On(l,x){var B=this.__data__,W=vt(B,l);return W<0?(++this.size,B.push([l,x])):B[W][1]=x,this}Pe.prototype.clear=gn,Pe.prototype.delete=mn,Pe.prototype.get=bn,Pe.prototype.has=_n,Pe.prototype.set=On;function je(l){var x=-1,B=l==null?0:l.length;for(this.clear();++xge))return!1;var be=re.get(l);if(be&&re.get(x))return be==x;var Le=-1,Ie=!0,Ae=B&E?new ht:void 0;for(re.set(l,x),re.set(x,l);++Le-1&&l%1==0&&l-1&&l%1==0&&l<=b}function Wt(l){var x=typeof l;return l!=null&&(x=="object"||x=="function")}function $e(l){return l!=null&&typeof l=="object"}var Yt=ue?Y(ue):jn;function Pt(l){return St(l)?Ln(l):In(l)}function Kn(){return[]}function $n(){return!1}q.exports=zn})(ai,It);var tr={},Or=Se&&Se.__importDefault||function(q){return q&&q.__esModule?q:{default:q}};Object.defineProperty(tr,"__esModule",{value:!0});var li=Or(jt),ui=Or(It),Xn;(function(q){function C(E,b,_){E===void 0&&(E={}),b===void 0&&(b={}),typeof E!="object"&&(E={}),typeof b!="object"&&(b={});var y=li.default(b);_||(y=Object.keys(y).reduce(function(h,i){return y[i]!=null&&(h[i]=y[i]),h},{}));for(var g in E)E[g]!==void 0&&b[g]===void 0&&(y[g]=E[g]);return Object.keys(y).length>0?y:void 0}q.compose=C;function m(E,b){E===void 0&&(E={}),b===void 0&&(b={}),typeof E!="object"&&(E={}),typeof b!="object"&&(b={});var _=Object.keys(E).concat(Object.keys(b)).reduce(function(y,g){return ui.default(E[g],b[g])||(y[g]=b[g]===void 0?null:b[g]),y},{});return Object.keys(_).length>0?_:void 0}q.diff=m;function p(E,b){E===void 0&&(E={}),b===void 0&&(b={}),E=E||{};var _=Object.keys(b).reduce(function(y,g){return b[g]!==E[g]&&E[g]!==void 0&&(y[g]=b[g]),y},{});return Object.keys(E).reduce(function(y,g){return E[g]!==b[g]&&b[g]===void 0&&(y[g]=null),y},_)}q.invert=p;function c(E,b,_){if(_===void 0&&(_=!1),typeof E!="object")return b;if(typeof b=="object"){if(!_)return b;var y=Object.keys(b).reduce(function(g,h){return E[h]===void 0&&(g[h]=b[h]),g},{});return Object.keys(y).length>0?y:void 0}}q.transform=c})(Xn||(Xn={}));tr.default=Xn;var Jt={},en={},sr;function si(){if(sr)return en;sr=1;var q=Se&&Se.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(en,"__esModule",{value:!0});var C=q(Er()),m=function(){function p(c){this.ops=c,this.index=0,this.offset=0}return p.prototype.hasNext=function(){return this.peekLength()<1/0},p.prototype.next=function(c){c||(c=1/0);var E=this.ops[this.index];if(E){var b=this.offset,_=C.default.length(E);if(c>=_-b?(c=_-b,this.index+=1,this.offset=0):this.offset+=c,typeof E.delete=="number")return{delete:c};var y={};return E.attributes&&(y.attributes=E.attributes),typeof E.retain=="number"?y.retain=c:typeof E.insert=="string"?y.insert=E.insert.substr(b,c):y.insert=E.insert,y}else return{retain:1/0}},p.prototype.peek=function(){return this.ops[this.index]},p.prototype.peekLength=function(){return this.ops[this.index]?C.default.length(this.ops[this.index])-this.offset:1/0},p.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"},p.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var c=this.offset,E=this.index,b=this.next(),_=this.ops.slice(this.index);return this.offset=c,this.index=E,[b].concat(_)}else return[]},p}();return en.default=m,en}var fr;function Er(){if(fr)return Jt;fr=1;var q=Se&&Se.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Jt,"__esModule",{value:!0});var C=q(si()),m;return function(p){function c(b){return new C.default(b)}p.iterator=c;function E(b){return typeof b.delete=="number"?b.delete:typeof b.retain=="number"?b.retain:typeof b.insert=="string"?b.insert.length:1}p.length=E}(m||(m={})),Jt.default=m,Jt}var Dt=Se&&Se.__importDefault||function(q){return q&&q.__esModule?q:{default:q}},tn=Dt(ii),fi=Dt(jt),Wn=Dt(It),Lt=Dt(tr),Ne=Dt(Er()),ci=String.fromCharCode(0),hi=function(){function q(C){Array.isArray(C)?this.ops=C:C!=null&&Array.isArray(C.ops)?this.ops=C.ops:this.ops=[]}return q.prototype.insert=function(C,m){var p={};return typeof C=="string"&&C.length===0?this:(p.insert=C,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(p.attributes=m),this.push(p))},q.prototype.delete=function(C){return C<=0?this:this.push({delete:C})},q.prototype.retain=function(C,m){if(C<=0)return this;var p={retain:C};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(p.attributes=m),this.push(p)},q.prototype.push=function(C){var m=this.ops.length,p=this.ops[m-1];if(C=fi.default(C),typeof p=="object"){if(typeof C.delete=="number"&&typeof p.delete=="number")return this.ops[m-1]={delete:p.delete+C.delete},this;if(typeof p.delete=="number"&&C.insert!=null&&(m-=1,p=this.ops[m-1],typeof p!="object"))return this.ops.unshift(C),this;if(Wn.default(C.attributes,p.attributes)){if(typeof C.insert=="string"&&typeof p.insert=="string")return this.ops[m-1]={insert:p.insert+C.insert},typeof C.attributes=="object"&&(this.ops[m-1].attributes=C.attributes),this;if(typeof C.retain=="number"&&typeof p.retain=="number")return this.ops[m-1]={retain:p.retain+C.retain},typeof C.attributes=="object"&&(this.ops[m-1].attributes=C.attributes),this}}return m===this.ops.length?this.ops.push(C):this.ops.splice(m,0,C),this},q.prototype.chop=function(){var C=this.ops[this.ops.length-1];return C&&C.retain&&!C.attributes&&this.ops.pop(),this},q.prototype.filter=function(C){return this.ops.filter(C)},q.prototype.forEach=function(C){this.ops.forEach(C)},q.prototype.map=function(C){return this.ops.map(C)},q.prototype.partition=function(C){var m=[],p=[];return this.forEach(function(c){var E=C(c)?m:p;E.push(c)}),[m,p]},q.prototype.reduce=function(C,m){return this.ops.reduce(C,m)},q.prototype.changeLength=function(){return this.reduce(function(C,m){return m.insert?C+Ne.default.length(m):m.delete?C-m.delete:C},0)},q.prototype.length=function(){return this.reduce(function(C,m){return C+Ne.default.length(m)},0)},q.prototype.slice=function(C,m){C===void 0&&(C=0),m===void 0&&(m=1/0);for(var p=[],c=Ne.default.iterator(this.ops),E=0;E0&&p.next(E.retain-b)}for(var _=new q(c);m.hasNext()||p.hasNext();)if(p.peekType()==="insert")_.push(p.next());else if(m.peekType()==="delete")_.push(m.next());else{var y=Math.min(m.peekLength(),p.peekLength()),g=m.next(y),h=p.next(y);if(typeof h.retain=="number"){var i={};typeof g.retain=="number"?i.retain=y:i.insert=g.insert;var e=Lt.default.compose(g.attributes,h.attributes,typeof g.retain=="number");if(e&&(i.attributes=e),_.push(i),!p.hasNext()&&Wn.default(_.ops[_.ops.length-1],i)){var t=new q(m.rest());return _.concat(t).chop()}}else typeof h.delete=="number"&&typeof g.retain=="number"&&_.push(h)}return _.chop()},q.prototype.concat=function(C){var m=new q(this.ops.slice());return C.ops.length>0&&(m.push(C.ops[0]),m.ops=m.ops.concat(C.ops.slice(1))),m},q.prototype.diff=function(C,m){if(this.ops===C.ops)return new q;var p=[this,C].map(function(y){return y.map(function(g){if(g.insert!=null)return typeof g.insert=="string"?g.insert:ci;var h=y===C?"on":"with";throw new Error("diff() called "+h+" non-document")}).join("")}),c=new q,E=tn.default(p[0],p[1],m),b=Ne.default.iterator(this.ops),_=Ne.default.iterator(C.ops);return E.forEach(function(y){for(var g=y[1].length;g>0;){var h=0;switch(y[0]){case tn.default.INSERT:h=Math.min(_.peekLength(),g),c.push(_.next(h));break;case tn.default.DELETE:h=Math.min(g,b.peekLength()),b.next(h),c.delete(h);break;case tn.default.EQUAL:h=Math.min(b.peekLength(),_.peekLength(),g);var i=b.next(h),e=_.next(h);Wn.default(i.insert,e.insert)?c.retain(h,Lt.default.diff(i.attributes,e.attributes)):c.push(e).delete(h);break}g-=h}}),c.chop()},q.prototype.eachLine=function(C,m){m===void 0&&(m=` `);for(var p=Ne.default.iterator(this.ops),c=new q,E=0;p.hasNext();){if(p.peekType()!=="insert")return;var b=p.peek(),_=Ne.default.length(b)-p.peekLength(),y=typeof b.insert=="string"?b.insert.indexOf(m,_)-_:-1;if(y<0)c.push(p.next());else if(y>0)c.push(p.next(y));else{if(C(c,p.next(1).attributes||{},E)===!1)return;E+=1,c=new q}}c.length()>0&&C(c,{},E)},q.prototype.invert=function(C){var m=new q;return this.reduce(function(p,c){if(c.insert)m.delete(Ne.default.length(c));else{if(c.retain&&c.attributes==null)return m.retain(c.retain),p+c.retain;if(c.delete||c.retain&&c.attributes){var E=c.delete||c.retain,b=C.slice(p,p+E);return b.forEach(function(_){c.delete?m.push(_):c.retain&&c.attributes&&m.retain(Ne.default.length(_),Lt.default.invert(c.attributes,_.attributes))}),p+E}}return p},0),m.chop()},q.prototype.transform=function(C,m){if(m===void 0&&(m=!1),m=!!m,typeof C=="number")return this.transformPosition(C,m);for(var p=C,c=Ne.default.iterator(this.ops),E=Ne.default.iterator(p.ops),b=new q;c.hasNext()||E.hasNext();)if(c.peekType()==="insert"&&(m||E.peekType()!=="insert"))b.retain(Ne.default.length(c.next()));else if(E.peekType()==="insert")b.push(E.next());else{var _=Math.min(c.peekLength(),E.peekLength()),y=c.next(_),g=E.next(_);if(y.delete)continue;g.delete?b.push(g):b.retain(_,Lt.default.transform(y.attributes,g.attributes,m))}return b.chop()},q.prototype.transformPosition=function(C,m){m===void 0&&(m=!1),m=!!m;for(var p=Ne.default.iterator(this.ops),c=0;p.hasNext()&&c<=C;){var E=p.peekLength(),b=p.peekType();if(p.next(),b==="delete"){C-=Math.min(E,C-c);continue}else b==="insert"&&(c["delta","html","text"].includes(q)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:q=>["snow","bubble",""].includes(q)},toolbar:{type:[String,Array,Object],required:!1,validator:q=>typeof q=="string"&&q!==""?q.charAt(0)==="#"?!0:Object.keys(cr).indexOf(q)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(q,C)=>{hr(()=>{E()}),wr(()=>{m=null});let m,p;const c=Me(),E=()=>{var v;if(c.value){if(p=b(),q.modules)if(Array.isArray(q.modules))for(const O of q.modules)on.register(`modules/${O.name}`,O.module);else on.register(`modules/${q.modules.name}`,q.modules.module);m=new on(c.value,p),f(q.content),m.on("text-change",i),m.on("selection-change",t),m.on("editor-change",s),q.theme!=="bubble"&&c.value.classList.remove("ql-bubble"),q.theme!=="snow"&&c.value.classList.remove("ql-snow"),(v=m.getModule("toolbar"))===null||v===void 0||v.container.addEventListener("mousedown",O=>{O.preventDefault()}),C.emit("ready",m)}},b=()=>{const v={};if(q.theme!==""&&(v.theme=q.theme),q.readOnly&&(v.readOnly=q.readOnly),q.placeholder&&(v.placeholder=q.placeholder),q.toolbar&&q.toolbar!==""&&(v.modules={toolbar:(()=>{if(typeof q.toolbar=="object")return q.toolbar;if(typeof q.toolbar=="string")return q.toolbar.charAt(0)==="#"?q.toolbar:cr[q.toolbar]})()}),q.modules){const O=(()=>{var T,P;const M={};if(Array.isArray(q.modules))for(const z of q.modules)M[z.name]=(T=z.options)!==null&&T!==void 0?T:{};else M[q.modules.name]=(P=q.modules.options)!==null&&P!==void 0?P:{};return M})();v.modules=Object.assign({},v.modules,O)}return Object.assign({},q.globalOptions,q.options,v)},_=v=>typeof v=="object"&&v?v.slice():v,y=v=>Object.values(v.ops).some(O=>!O.retain||Object.keys(O).length!==1);let g;const h=v=>{if(typeof g==typeof v){if(v===g)return!0;if(typeof v=="object"&&v&&typeof g=="object"&&g)return!y(g.diff(v))}return!1},i=(v,O,T)=>{g=_(o()),h(q.content)||C.emit("update:content",g),C.emit("textChange",{delta:v,oldContents:O,source:T})},e=Me(),t=(v,O,T)=>{e.value=!!(m!=null&&m.hasFocus()),C.emit("selectionChange",{range:v,oldRange:O,source:T})};nn(e,v=>{v?C.emit("focus",c):C.emit("blur",c)});const s=(...v)=>{v[0]==="text-change"&&C.emit("editorChange",{name:v[0],delta:v[1],oldContents:v[2],source:v[3]}),v[0]==="selection-change"&&C.emit("editorChange",{name:v[0],range:v[1],oldRange:v[2],source:v[3]})},u=()=>c.value,a=()=>{var v;return(v=m==null?void 0:m.getModule("toolbar"))===null||v===void 0?void 0:v.container},r=()=>{if(m)return m;throw`The quill editor hasn't been instantiated yet, make sure to call this method when the editor ready or use v-on:ready="onReady(quill)" event instead.`},o=(v,O)=>q.contentType==="html"?N():q.contentType==="text"?n(v,O):m==null?void 0:m.getContents(v,O),f=(v,O="api")=>{const T=v||(q.contentType==="delta"?new di:"");q.contentType==="html"?w(T):q.contentType==="text"?d(T,O):m==null||m.setContents(T,O),g=_(T)},n=(v,O)=>{var T;return(T=m==null?void 0:m.getText(v,O))!==null&&T!==void 0?T:""},d=(v,O="api")=>{m==null||m.setText(v,O)},N=()=>{var v;return(v=m==null?void 0:m.root.innerHTML)!==null&&v!==void 0?v:""},w=v=>{m&&(m.root.innerHTML=v)},k=(v,O="api")=>{const T=m==null?void 0:m.clipboard.convert(v);T&&(m==null||m.setContents(T,O))},L=()=>{m==null||m.focus()},A=()=>{rr(()=>{var v;!C.slots.toolbar&&m&&((v=m.getModule("toolbar"))===null||v===void 0||v.container.remove()),E()})};return nn(()=>q.content,v=>{if(!m||!v||h(v))return;const O=m.getSelection();O&&rr(()=>m==null?void 0:m.setSelection(O)),f(v)},{deep:!0}),nn(()=>q.enable,v=>{m&&m.enable(v)}),{editor:c,getEditor:u,getToolbar:a,getQuill:r,getContents:o,setContents:f,getHTML:N,setHTML:w,pasteHTML:k,focus:L,getText:n,setText:d,reinit:A}},render(){var q,C;return[(C=(q=this.$slots).toolbar)===null||C===void 0?void 0:C.call(q),Tr("div",{ref:"editor",...this.$attrs})]}});const pi={class:"editor"},yi=an({__name:"index",props:{modelValue:gt.string,height:gt.number.def(400),minHeight:gt.number.def(400),readOnly:gt.bool.def(!1),fileSize:gt.number.def(5),type:gt.string.def("url")},setup(q){const C=q,{proxy:m}=dr(),p=Yn({headers:kr(),url:"/prod-api/resource/oss/upload"}),c=Me(),E=Me({theme:"snow",bounds:document.body,debug:"warn",modules:{toolbar:{container:[["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{align:[]}],["clean"],["link","image","video"]],handlers:{image:function(i){var e;i?(e=document.querySelector(".editor-img-uploader>.el-upload"))==null||e.click():on.format("image",!0)}}}},placeholder:"请输入内容",readOnly:C.readOnly}),b=Nr(()=>{let i={};return C.minHeight&&(i.minHeight=`${C.minHeight}px`),C.height&&(i.height=`${C.height}px`),i}),_=Me("");nn(()=>C.modelValue,i=>{i!==_.value&&(_.value=i===void 0?"

":i)},{immediate:!0});const y=i=>{if(i.code===200){let e=xr(c.value).getQuill(),t=e.selection.savedRange.index;e.insertEmbed(t,"image",i.data.url),e.setSelection(t+1),m==null||m.$modal.closeLoading()}else m==null||m.$modal.loading(i.msg),m==null||m.$modal.closeLoading()},g=i=>["image/jpeg","image/jpg","image/png","image/svg"].includes(i.type)?C.fileSize&&!(i.size/1024/1024{console.error(i),m==null||m.$modal.msgError("上传文件失败")};return(i,e)=>{const t=Dr;return Ce(),qt("div",null,[q.type==="url"?(Ce(),tt(t,{key:0,action:se(p).url,"before-upload":g,"on-success":y,"on-error":h,class:"editor-img-uploader",name:"file","show-file-list":!1,headers:se(p).headers,ref:"uploadRef"},null,8,["action","headers"])):vr("",!0),rn("div",pi,[oe(se(vi),{ref_key:"quillEditorRef",ref:c,content:se(_),"onUpdate:content":e[0]||(e[0]=s=>pr(_)?_.value=s:null),contentType:"html",onTextChange:e[1]||(e[1]=s=>i.$emit("update:modelValue",se(_))),options:se(E),style:Sr(se(b))},null,8,["content","options","style"])])])}}});function gi(q){return Mt({url:"/system/notice/list",method:"get",params:q})}function mi(q){return Mt({url:"/system/notice/"+q,method:"get"})}function bi(q){return Mt({url:"/system/notice",method:"post",data:q})}function _i(q){return Mt({url:"/system/notice",method:"put",data:q})}function Oi(q){return Mt({url:"/system/notice/"+q,method:"delete"})}const Ei={class:"p-2"},Ai={class:"mb-[10px]"},wi={class:"dialog-footer"},Ti=an({name:"Notice"}),$i=an({...Ti,setup(q){const{proxy:C}=dr(),{sys_notice_status:m,sys_notice_type:p}=ir(C==null?void 0:C.useDict("sys_notice_status","sys_notice_type")),c=Me([]),E=Me(!0),b=Me(!0),_=Me([]),y=Me(!0),g=Me(!0),h=Me(0),i=Me(),e=Me(),t=Yn({visible:!1,title:""}),s={noticeId:void 0,noticeTitle:"",noticeType:"",noticeContent:"",status:"0",remark:"",createByName:""},u=Yn({form:{...s},queryParams:{pageNum:1,pageSize:10,noticeTitle:"",createByName:"",status:"",noticeType:""},rules:{noticeTitle:[{required:!0,message:"公告标题不能为空",trigger:"blur"}],noticeType:[{required:!0,message:"公告类型不能为空",trigger:"change"}]}}),{queryParams:a,form:r,rules:o}=ir(u),f=async()=>{E.value=!0;const T=await gi(a.value);c.value=T.rows,h.value=T.total,E.value=!1},n=()=>{d(),t.visible=!1},d=()=>{var T;r.value={...s},(T=e.value)==null||T.resetFields()},N=()=>{a.value.pageNum=1,f()},w=()=>{var T;(T=i.value)==null||T.resetFields(),N()},k=T=>{_.value=T.map(P=>P.noticeId),y.value=T.length!=1,g.value=!T.length},L=()=>{d(),t.visible=!0,t.title="添加公告"},A=async T=>{d();const P=(T==null?void 0:T.noticeId)||_.value[0],{data:M}=await mi(P);Object.assign(r.value,M),t.visible=!0,t.title="修改公告"},v=()=>{var T;(T=e.value)==null||T.validate(async P=>{P&&(r.value.noticeId?await _i(r.value):await bi(r.value),C==null||C.$modal.msgSuccess("修改成功"),t.visible=!1,await f())})},O=async T=>{const P=(T==null?void 0:T.noticeId)||_.value;await(C==null?void 0:C.$modal.confirm('是否确认删除公告编号为"'+P+'"的数据项?')),await Oi(P),await f(),C==null||C.$modal.msgSuccess("删除成功")};return hr(()=>{f()}),(T,P)=>{var Oe,_e;const M=qr,z=Zr,V=Yr,X=Qr,H=Rr,I=Wr,S=Gr,j=Vr,D=$r,$=Kr,F=Ur,R=zr,U=jr,G=Hr,Z=Fr,Q=Br,ne=Cr,ie=yi,ae=Ir,ue=Pr("hasPermi"),ve=Mr;return Ce(),qt("div",Ei,[oe(Lr,{"enter-active-class":(Oe=se(C))==null?void 0:Oe.animate.searchAnimate.enter,"leave-active-class":(_e=se(C))==null?void 0:_e.animate.searchAnimate.leave},{default:de(()=>[Je(rn("div",Ai,[oe(S,{shadow:"hover"},{default:de(()=>[oe(I,{model:se(a),ref_key:"queryFormRef",ref:i,inline:!0,"label-width":"68px"},{default:de(()=>[oe(z,{label:"公告标题",prop:"noticeTitle"},{default:de(()=>[oe(M,{modelValue:se(a).noticeTitle,"onUpdate:modelValue":P[0]||(P[0]=K=>se(a).noticeTitle=K),placeholder:"请输入公告标题",clearable:"",style:{width:"200px"},onKeyup:or(N,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),oe(z,{label:"操作人员",prop:"createByName"},{default:de(()=>[oe(M,{modelValue:se(a).createByName,"onUpdate:modelValue":P[1]||(P[1]=K=>se(a).createByName=K),placeholder:"请输入操作人员",clearable:"",style:{width:"200px"},onKeyup:or(N,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),oe(z,{label:"类型",prop:"noticeType"},{default:de(()=>[oe(X,{modelValue:se(a).noticeType,"onUpdate:modelValue":P[2]||(P[2]=K=>se(a).noticeType=K),placeholder:"公告类型",clearable:"",style:{width:"200px"}},{default:de(()=>[(Ce(!0),qt(Vn,null,Gn(se(p),K=>(Ce(),tt(V,{key:K.value,label:K.label,value:K.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),oe(z,null,{default:de(()=>[oe(H,{type:"primary",icon:"Search",onClick:N},{default:de(()=>[et("搜索")]),_:1}),oe(H,{icon:"Refresh",onClick:w},{default:de(()=>[et("重置")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})],512),[[ar,se(b)]])]),_:1},8,["enter-active-class","leave-active-class"]),oe(S,{shadow:"hover"},{header:de(()=>[oe($,{gutter:10,class:"mb8"},{default:de(()=>[oe(j,{span:1.5},{default:de(()=>[Je((Ce(),tt(H,{type:"primary",plain:"",icon:"Plus",onClick:L},{default:de(()=>[et("新增")]),_:1})),[[ue,["system:notice:add"]]])]),_:1},8,["span"]),oe(j,{span:1.5},{default:de(()=>[Je((Ce(),tt(H,{type:"success",plain:"",icon:"Edit",disabled:se(y),onClick:P[3]||(P[3]=K=>A())},{default:de(()=>[et("修改")]),_:1},8,["disabled"])),[[ue,["system:notice:edit"]]])]),_:1},8,["span"]),oe(j,{span:1.5},{default:de(()=>[Je((Ce(),tt(H,{type:"danger",plain:"",icon:"Delete",disabled:se(g),onClick:P[4]||(P[4]=K=>O())},{default:de(()=>[et(" 删除 ")]),_:1},8,["disabled"])),[[ue,["system:notice:remove"]]])]),_:1},8,["span"]),oe(D,{showSearch:se(b),"onUpdate:showSearch":P[5]||(P[5]=K=>pr(b)?b.value=K:null),onQueryTable:f},null,8,["showSearch"])]),_:1})]),default:de(()=>[Je((Ce(),tt(G,{data:se(c),onSelectionChange:k},{default:de(()=>[oe(F,{type:"selection",width:"55",align:"center"}),vr("",!0),oe(F,{label:"公告标题",align:"center",prop:"noticeTitle","show-overflow-tooltip":!0}),oe(F,{label:"公告类型",align:"center",prop:"noticeType",width:"100"},{default:de(K=>[oe(R,{options:se(p),value:K.row.noticeType},null,8,["options","value"])]),_:1}),oe(F,{label:"状态",align:"center",prop:"status",width:"100"},{default:de(K=>[oe(R,{options:se(m),value:K.row.status},null,8,["options","value"])]),_:1}),oe(F,{label:"创建者",align:"center",prop:"createByName",width:"100"}),oe(F,{label:"创建时间",align:"center",prop:"createTime",width:"100"},{default:de(K=>[rn("span",null,lr(T.parseTime(K.row.createTime,"{y}-{m}-{d}")),1)]),_:1}),oe(F,{label:"操作",align:"center","class-name":"small-padding fixed-width"},{default:de(K=>[oe(U,{content:"修改",placement:"top"},{default:de(()=>[Je(oe(H,{link:"",type:"primary",icon:"Edit",onClick:Y=>A(K.row)},null,8,["onClick"]),[[ue,["system:notice:edit"]]])]),_:2},1024),oe(U,{content:"删除",placement:"top"},{default:de(()=>[Je(oe(H,{link:"",type:"primary",icon:"Delete",onClick:Y=>O(K.row)},null,8,["onClick"]),[[ue,["system:notice:remove"]]])]),_:2},1024)]),_:1})]),_:1},8,["data"])),[[ve,se(E)]]),Je(oe(Z,{total:se(h),page:se(a).pageNum,"onUpdate:page":P[6]||(P[6]=K=>se(a).pageNum=K),limit:se(a).pageSize,"onUpdate:limit":P[7]||(P[7]=K=>se(a).pageSize=K),onPagination:f},null,8,["total","page","limit"]),[[ar,se(h)>0]])]),_:1}),oe(ae,{title:se(t).title,modelValue:se(t).visible,"onUpdate:modelValue":P[12]||(P[12]=K=>se(t).visible=K),width:"780px","append-to-body":""},{footer:de(()=>[rn("div",wi,[oe(H,{type:"primary",onClick:v},{default:de(()=>[et("确 定")]),_:1}),oe(H,{onClick:n},{default:de(()=>[et("取 消")]),_:1})])]),default:de(()=>[oe(I,{ref_key:"noticeFormRef",ref:e,model:se(r),rules:se(o),"label-width":"80px"},{default:de(()=>[oe($,null,{default:de(()=>[oe(j,{span:12},{default:de(()=>[oe(z,{label:"公告标题",prop:"noticeTitle"},{default:de(()=>[oe(M,{modelValue:se(r).noticeTitle,"onUpdate:modelValue":P[8]||(P[8]=K=>se(r).noticeTitle=K),placeholder:"请输入公告标题"},null,8,["modelValue"])]),_:1})]),_:1}),oe(j,{span:12},{default:de(()=>[oe(z,{label:"公告类型",prop:"noticeType"},{default:de(()=>[oe(X,{modelValue:se(r).noticeType,"onUpdate:modelValue":P[9]||(P[9]=K=>se(r).noticeType=K),placeholder:"请选择"},{default:de(()=>[(Ce(!0),qt(Vn,null,Gn(se(p),K=>(Ce(),tt(V,{key:K.value,label:K.label,value:K.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),oe(j,{span:24},{default:de(()=>[oe(z,{label:"状态"},{default:de(()=>[oe(ne,{modelValue:se(r).status,"onUpdate:modelValue":P[10]||(P[10]=K=>se(r).status=K)},{default:de(()=>[(Ce(!0),qt(Vn,null,Gn(se(m),K=>(Ce(),tt(Q,{key:K.value,label:K.value},{default:de(()=>[et(lr(K.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),oe(j,{span:24},{default:de(()=>[oe(z,{label:"内容"},{default:de(()=>[oe(ie,{modelValue:se(r).noticeContent,"onUpdate:modelValue":P[11]||(P[11]=K=>se(r).noticeContent=K),"min-height":192},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}});export{$i as default};