1import{c as di,a as pi,b as gi,d as mi}from"./yjs-x-pGFQhv.js";var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ao(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Lp(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){var s=!1;try{s=this instanceof r}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),e}var wo=typeof global=="object"&&global&&global.Object===Object&&global,xa=typeof self=="object"&&self&&self.Object===Object&&self,fr=wo||xa||Function("return this")(),Ir=fr.Symbol,No=Object.prototype,Sa=No.hasOwnProperty,Oa=No.toString,gn=Ir?Ir.toStringTag:void 0;function La(n){var t=Sa.call(n,gn),e=n[gn];try{n[gn]=void 0;var r=!0}catch{}var s=Oa.call(n);return r&&(t?n[gn]=e:delete n[gn]),s}var Ca=Object.prototype,qa=Ca.toString;function Ra(n){return qa.call(n)}var Ia="[object Null]",ka="[object Undefined]",bi=Ir?Ir.toStringTag:void 0;function un(n){return n==null?n===void 0?ka:Ia:bi&&bi in Object(n)?La(n):Ra(n)}function br(n){return n!=null&&typeof n=="object"}var $r=Array.isArray;function Mr(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function To(n){return n}var Ma="[object AsyncFunction]",ja="[object Function]",Ba="[object GeneratorFunction]",Da="[object Proxy]";function Vs(n){if(!Mr(n))return!1;var t=un(n);return t==ja||t==Ba||t==Ma||t==Da}var gs=fr["__core-js_shared__"],yi=(function(){var n=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function Pa(n){return!!yi&&yi in n}var $a=Function.prototype,Ua=$a.toString;function Hr(n){if(n!=null){try{return Ua.call(n)}catch{}try{return n+""}catch{}}return""}var Fa=/[\\^$.*+?()[\]{}|]/g,Ha=/^\[object .+?Constructor\]$/,za=Function.prototype,Ga=Object.prototype,Va=za.toString,Ka=Ga.hasOwnProperty,Wa=RegExp("^"+Va.call(Ka).replace(Fa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Za(n){if(!Mr(n)||Pa(n))return!1;var t=Vs(n)?Wa:Ha;return t.test(Hr(n))}function Xa(n,t){return n?.[t]}function zr(n,t){var e=Xa(n,t);return Za(e)?e:void 0}var Cs=zr(fr,"WeakMap"),vi=Object.create,Ya=(function(){function n(){}return function(t){if(!Mr(t))return{};if(vi)return vi(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}})();function Qa(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Ja(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t}var tl=800,el=16,rl=Date.now;function nl(n){var t=0,e=0;return function(){var r=rl(),s=el-(r-e);if(e=r,s>0){if(++t>=tl)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function sl(n){return function(){return n}}var Qn=(function(){try{var n=zr(Object,"defineProperty");return n({},"",{}),n}catch{}})(),il=Qn?function(n,t){return Qn(n,"toString",{configurable:!0,enumerable:!1,value:sl(t),writable:!0})}:To,ol=nl(il);function al(n,t){for(var e=-1,r=n==null?0:n.length;++e<r&&t(n[e],e,n)!==!1;);return n}var ll=9007199254740991,cl=/^(?:0|[1-9]\d*)$/;function xo(n,t){var e=typeof n;return t=t??ll,!!t&&(e=="number"||e!="symbol"&&cl.test(n))&&n>-1&&n%1==0&&n<t}function Ks(n,t,e){t=="__proto__"&&Qn?Qn(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function On(n,t){return n===t||n!==n&&t!==t}var ul=Object.prototype,hl=ul.hasOwnProperty;function So(n,t,e){var r=n[t];(!(hl.call(n,t)&&On(r,e))||e===void 0&&!(t in n))&&Ks(n,t,e)}function fl(n,t,e,r){var s=!e;e||(e={});for(var i=-1,a=t.length;++i<a;){var l=t[i],c=void 0;c===void 0&&(c=n[l]),s?Ks(e,l,c):So(e,l,c)}return e}var _i=Math.max;function dl(n,t,e){return t=_i(t===void 0?n.length-1:t,0),function(){for(var r=arguments,s=-1,i=_i(r.length-t,0),a=Array(i);++s<i;)a[s]=r[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=r[s];
vendor: 8,396 bytes, line 1
1return l[t]=e(a),Qa(n,this,l)}}function pl(n,t){return ol(dl(n,t,To),n+"")}var gl=9007199254740991;function Oo(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=gl}function ss(n){return n!=null&&Oo(n.length)&&!Vs(n)}function ml(n,t,e){if(!Mr(e))return!1;var r=typeof t;return(r=="number"?ss(e)&&xo(t,e.length):r=="string"&&t in e)?On(e[t],n):!1}function bl(n){return pl(function(t,e){var r=-1,s=e.length,i=s>1?e[s-1]:void 0,a=s>2?e[2]:void 0;for(i=n.length>3&&typeof i=="function"?(s--,i):void 0,a&&ml(e[0],e[1],a)&&(i=s<3?void 0:i,s=1),t=Object(t);++r<s;){var l=e[r];l&&n(t,l,r,i)}return t})}var yl=Object.prototype;function Ws(n){var t=n&&n.constructor,e=typeof t=="function"&&t.prototype||yl;return n===e}function vl(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}var _l="[object Arguments]";function Ei(n){return br(n)&&un(n)==_l}var Lo=Object.prototype,El=Lo.hasOwnProperty,Al=Lo.propertyIsEnumerable,qs=Ei((function(){return arguments})())?Ei:function(n){return br(n)&&El.call(n,"callee")&&!Al.call(n,"callee")};function wl(){return!1}var Co=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ai=Co&&typeof module=="object"&&module&&!module.nodeType&&module,Nl=Ai&&Ai.exports===Co,wi=Nl?fr.Buffer:void 0,Tl=wi?wi.isBuffer:void 0,An=Tl||wl,xl="[object Arguments]",Sl="[object Array]",Ol="[object Boolean]",Ll="[object Date]",Cl="[object Error]",ql="[object Function]",Rl="[object Map]",Il="[object Number]",kl="[object Object]",Ml="[object RegExp]",jl="[object Set]",Bl="[object String]",Dl="[object WeakMap]",Pl="[object ArrayBuffer]",$l="[object DataView]",Ul="[object Float32Array]",Fl="[object Float64Array]",Hl="[object Int8Array]",zl="[object Int16Array]",Gl="[object Int32Array]",Vl="[object Uint8Array]",Kl="[object Uint8ClampedArray]",Wl="[object Uint16Array]",Zl="[object Uint32Array]",Ht={};Ht[Ul]=Ht[Fl]=Ht[Hl]=Ht[zl]=Ht[Gl]=Ht[Vl]=Ht[Kl]=Ht[Wl]=Ht[Zl]=!0;Ht[xl]=Ht[Sl]=Ht[Pl]=Ht[Ol]=Ht[$l]=Ht[Ll]=Ht[Cl]=Ht[ql]=Ht[Rl]=Ht[Il]=Ht[kl]=Ht[Ml]=Ht[jl]=Ht[Bl]=Ht[Dl]=!1;function Xl(n){return br(n)&&Oo(n.length)&&!!Ht[un(n)]}function Zs(n){return function(t){return n(t)}}var qo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_n=qo&&typeof module=="object"&&module&&!module.nodeType&&module,Yl=_n&&_n.exports===qo,ms=Yl&&wo.process,ln=(function(){try{var n=_n&&_n.require&&_n.require("util").types;return n||ms&&ms.binding&&ms.binding("util")}catch{}})(),Ni=ln&&ln.isTypedArray,Xs=Ni?Zs(Ni):Xl,Ql=Object.prototype,Jl=Ql.hasOwnProperty;function Ro(n,t){var e=$r(n),r=!e&&qs(n),s=!e&&!r&&An(n),i=!e&&!r&&!s&&Xs(n),a=e||r||s||i,l=a?vl(n.length,String):[],c=l.length;for(var u in n)(t||Jl.call(n,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||xo(u,c)))&&l.push(u);return l}function Io(n,t){return function(e){return n(t(e))}}var tc=Io(Object.keys,Object),ec=Object.prototype,rc=ec.hasOwnProperty;function nc(n){if(!Ws(n))return tc(n);var t=[];for(var e in Object(n))rc.call(n,e)&&e!="constructor"&&t.push(e);return t}function sc(n){return ss(n)?Ro(n):nc(n)}function ic(n){var t=[];if(n!=null)for(var e in Object(n))t.push(e);return t}var oc=Object.prototype,ac=oc.hasOwnProperty;function lc(n){if(!Mr(n))return ic(n);var t=Ws(n),e=[];for(var r in n)r=="constructor"&&(t||!ac.call(n,r))||e.push(r);return e}function ko(n){return ss(n)?Ro(n,!0):lc(n)}var wn=zr(Object,"create");function cc(){this.__data__=wn?wn(null):{},this.size=0}function uc(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var hc="__lodash_hash_undefined__",fc=Object.prototype,dc=fc.hasOwnProperty;function pc(n){var t=this.__data__;if(wn){var e=t[n];return e===hc?void 0:e}return dc.call(t,n)?t[n]:void 0}var gc=Object.prototype,mc=gc.hasOwnProperty;function bc(n){var t=this.__data__;return wn?t[n]!==void 0:mc.call(t,n)}var yc="__lodash_hash_undefined__";function vc(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=wn&&t===void 0?yc:t,this}function Ur(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}Ur.prototype.clear=cc;Ur.prototype.delete=uc;Ur.prototype.get=pc;Ur.prototype.has=bc;Ur.prototype.set=vc;function _c(){this.__data__=[],this.size=0}function is(n,t){for(var e=n.length;e--;)if(On(n[e][0],t))return e;return-1}var Ec=Array.prototype,Ac=Ec.splice;function wc(n){var t=this.__data__,e=is(t,n);if(e<0)return!1;var r=t.length-1;return e==r?t.pop():Ac.call(t,e,1),--this.size,!0}function Nc(n){var t=this.__data__,e=is(t,n);return e<0?void 0:t[e][1]}function Tc(n){return is(this.__data__,n)>-1}function xc(n,t){var e=this.__data__,r=is(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}function vr(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}vr.prototype.clear=_c;vr.prototype.delete=wc;vr.prototype.get=Nc;vr.prototype.has=Tc;vr.prototype.set=xc;var Nn=zr(fr,"Map");function Sc(){this.size=0,this.__data__={hash:new Ur,map:new(Nn||vr),string:new Ur}}function Oc(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function os(n,t){var e=n.__data__;return Oc(t)?e[typeof t=="string"?"string":"hash"]:e.map}function Lc(n){var t=os(this,n).delete(n);return this.size-=t?1:0,t}function Cc(n){return os(this,n).get(n)}function qc(n){return os(this,n).has(n)}function Rc(n,t){var e=os(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this}function Gr(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}Gr.prototype.clear=Sc;Gr.prototype.delete=Lc;Gr.prototype.get=Cc;Gr.prototype.has=qc;Gr.prototype.set=Rc;function Ic(n,t){for(var e=-1,r=t.length,s=n.length;++e<r;)n[s+e]=t[e];return n}var Mo=Io(Object.getPrototypeOf,Object),kc="[object Object]",Mc=Function.prototype,jc=Object.prototype,jo=Mc.toString,Bc=jc.hasOwnProperty,Dc=jo.call(Object);function Pc(n){if(!br(n)||un(n)!=kc)return!1;var t=Mo(n);if(t===null)return!0;var e=Bc.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&jo.call(e)==Dc}function $c(){this.__data__=new vr,this.size=0}function Uc(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e}function Fc(n){return this.__data__.get(n)}function Hc(n){return this.__data__.has(n)}var zc=200;function Gc(n,t){var e=this.__data__;if(e instanceof vr){var r=e.__data__;if(!Nn||r.length<zc-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new Gr(r)}return e.set(n,t),this.size=e.size,this}function ur(n){var t=this.__data__=new vr(n);this.size=t.size}ur.prototype.clear=$c;ur.prototype.delete=Uc;ur.prototype.get=Fc;ur.prototype.has=Hc;ur.prototype.set=Gc;var Bo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ti=Bo&&typeof module=="object"&&module&&!module.nodeType&&module,Vc=Ti&&Ti.exports===Bo,xi=Vc?fr.Buffer:void 0,Si=xi?xi.allocUnsafe:void 0;function Do(n,t){if(t)return n.slice();var e=n.length,r=Si?Si(e):new n.constructor(e);return n.copy(r),r}function Kc(n,t){for(var e=-1,r=n==null?0:n.length,s=0,i=[];++e<r;){var a=n[e];t(a,e,n)&&(i[s++]=a)}return i}function Wc(){return[]}var Zc=Object.prototype,Xc=Zc.propertyIsEnumerable,Oi=Object.getOwnPropertySymbols,Yc=Oi?function(n){return n==null?[]:(n=Object(n),Kc(Oi(n),function(t){return Xc.call(n,t)}))}:Wc;function Qc(n,t,e){var r=t(n);return $r(n)?r:Ic(r,e(n))}function Rs(n){return Qc(n,sc,Yc)}var Is=zr(fr,"DataView"),ks=zr(fr,"Promise"),Ms=zr(fr,"Set"),Li="[object Map]",Jc="[object Object]",Ci="[object Promise]",qi="[object Set]",Ri="[object WeakMap]",Ii="[object DataView]",tu=Hr(Is),eu=Hr(Nn),ru=Hr(ks),nu=Hr(Ms),su=Hr(Cs),Ze=un;(Is&&Ze(new Is(new ArrayBuffer(1)))!=Ii||Nn&&Ze(new Nn)!=Li||ks&&Ze(ks.resolve())!=Ci||Ms&&Ze(new Ms)!=qi||Cs&&Ze(new Cs)!=Ri)&&(Ze=function(n){var t=un(n),e=t==Jc?n.constructor:void 0,r=e?Hr(e):"";if(r)switch(r){case tu:return Ii;case eu:return Li;case ru:return Ci;case nu:return qi;case su:return Ri}return t});var iu=Object.prototype,ou=iu.hasOwnProperty;function au(n){var t=n.length,e=new n.constructor(t);return t&&typeof n[0]=="string"&&ou.call(n,"index")&&(e.index=n.index,e.input=n.input),e}var Jn=fr.Uint8Array;function Ys(n){var t=new n.constructor(n.byteLength);return new Jn(t).set(new Jn(n)),t}function lu(n,t){var e=Ys(n.buffer);return new n.constructor(e,n.byteOffset,n.byteLength)}var cu=/\w*$/;function uu(n){var t=new n.constructor(n.source,cu.exec(n));return t.lastIndex=n.lastIndex,t}
vendor: 5,458 bytes, line 1
1var ki=Ir?Ir.prototype:void 0,Mi=ki?ki.valueOf:void 0;function hu(n){return Mi?Object(Mi.call(n)):{}}function Po(n,t){var e=t?Ys(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}var fu="[object Boolean]",du="[object Date]",pu="[object Map]",gu="[object Number]",mu="[object RegExp]",bu="[object Set]",yu="[object String]",vu="[object Symbol]",_u="[object ArrayBuffer]",Eu="[object DataView]",Au="[object Float32Array]",wu="[object Float64Array]",Nu="[object Int8Array]",Tu="[object Int16Array]",xu="[object Int32Array]",Su="[object Uint8Array]",Ou="[object Uint8ClampedArray]",Lu="[object Uint16Array]",Cu="[object Uint32Array]";function qu(n,t,e){var r=n.constructor;switch(t){case _u:return Ys(n);case fu:case du:return new r(+n);case Eu:return lu(n);case Au:case wu:case Nu:case Tu:case xu:case Su:case Ou:case Lu:case Cu:return Po(n,e);case pu:return new r;case gu:case yu:return new r(n);case mu:return uu(n);case bu:return new r;case vu:return hu(n)}}function $o(n){return typeof n.constructor=="function"&&!Ws(n)?Ya(Mo(n)):{}}var Ru="[object Map]";function Iu(n){return br(n)&&Ze(n)==Ru}var ji=ln&&ln.isMap,ku=ji?Zs(ji):Iu,Mu="[object Set]";function ju(n){return br(n)&&Ze(n)==Mu}var Bi=ln&&ln.isSet,Bu=Bi?Zs(Bi):ju,Du=1,Uo="[object Arguments]",Pu="[object Array]",$u="[object Boolean]",Uu="[object Date]",Fu="[object Error]",Fo="[object Function]",Hu="[object GeneratorFunction]",zu="[object Map]",Gu="[object Number]",Ho="[object Object]",Vu="[object RegExp]",Ku="[object Set]",Wu="[object String]",Zu="[object Symbol]",Xu="[object WeakMap]",Yu="[object ArrayBuffer]",Qu="[object DataView]",Ju="[object Float32Array]",th="[object Float64Array]",eh="[object Int8Array]",rh="[object Int16Array]",nh="[object Int32Array]",sh="[object Uint8Array]",ih="[object Uint8ClampedArray]",oh="[object Uint16Array]",ah="[object Uint32Array]",Ut={};Ut[Uo]=Ut[Pu]=Ut[Yu]=Ut[Qu]=Ut[$u]=Ut[Uu]=Ut[Ju]=Ut[th]=Ut[eh]=Ut[rh]=Ut[nh]=Ut[zu]=Ut[Gu]=Ut[Ho]=Ut[Vu]=Ut[Ku]=Ut[Wu]=Ut[Zu]=Ut[sh]=Ut[ih]=Ut[oh]=Ut[ah]=!0;Ut[Fu]=Ut[Fo]=Ut[Xu]=!1;function Yn(n,t,e,r,s,i){var a,l=t&Du;if(a!==void 0)return a;if(!Mr(n))return n;var c=$r(n);if(c)a=au(n);else{var u=Ze(n),p=u==Fo||u==Hu;if(An(n))return Do(n,l);if(u==Ho||u==Uo||p&&!s)a=p?{}:$o(n);else{if(!Ut[u])return s?n:{};a=qu(n,u,l)}}i||(i=new ur);var m=i.get(n);if(m)return m;i.set(n,a),Bu(n)?n.forEach(function(_){a.add(Yn(_,t,e,_,n,i))}):ku(n)&&n.forEach(function(_,x){a.set(x,Yn(_,t,e,x,n,i))});var f=Rs,g=c?void 0:f(n);return al(g||n,function(_,x){g&&(x=_,_=n[x]),So(a,x,Yn(_,t,e,x,n,i))}),a}var lh=1,ch=4;function sn(n){return Yn(n,lh|ch)}var uh="__lodash_hash_undefined__";function hh(n){return this.__data__.set(n,uh),this}function fh(n){return this.__data__.has(n)}function ts(n){var t=-1,e=n==null?0:n.length;for(this.__data__=new Gr;++t<e;)this.add(n[t])}ts.prototype.add=ts.prototype.push=hh;ts.prototype.has=fh;function dh(n,t){for(var e=-1,r=n==null?0:n.length;++e<r;)if(t(n[e],e,n))return!0;return!1}function ph(n,t){return n.has(t)}var gh=1,mh=2;function zo(n,t,e,r,s,i){var a=e&gh,l=n.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var u=i.get(n),p=i.get(t);if(u&&p)return u==t&&p==n;var m=-1,f=!0,g=e&mh?new ts:void 0;for(i.set(n,t),i.set(t,n);++m<l;){var _=n[m],x=t[m];if(r)var L=a?r(x,_,m,t,n,i):r(_,x,m,n,t,i);if(L!==void 0){if(L)continue;f=!1;break}if(g){if(!dh(t,function(w,b){if(!ph(g,b)&&(_===w||s(_,w,e,r,i)))return g.push(b)})){f=!1;break}}else if(!(_===x||s(_,x,e,r,i))){f=!1;break}}return i.delete(n),i.delete(t),f}function bh(n){var t=-1,e=Array(n.size);return n.forEach(function(r,s){e[++t]=[s,r]}),e}function yh(n){var t=-1,e=Array(n.size);return n.forEach(function(r){e[++t]=r}),e}var vh=1,_h=2,Eh="[object Boolean]",Ah="[object Date]",wh="[object Error]",Nh="[object Map]",Th="[object Number]",xh="[object RegExp]",Sh="[object Set]",Oh="[object String]",Lh="[object Symbol]",Ch="[object ArrayBuffer]",qh="[object DataView]",Di=Ir?Ir.prototype:void 0,bs=Di?Di.valueOf:void 0;function Rh(n,t,e,r,s,i,a){switch(e){case qh:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case Ch:return!(n.byteLength!=t.byteLength||!i(new Jn(n),new Jn(t)));case Eh:case Ah:case Th:return On(+n,+t);case wh:return n.name==t.name&&n.message==t.message;case xh:case Oh:return n==t+"";case Nh:var l=bh;case Sh:var c=r&vh;if(l||(l=yh),n.size!=t.size&&!c)return!1;var u=a.get(n);if(u)return u==t;r|=_h,a.set(n,t);var p=zo(l(n),l(t),r,s,i,a);return a.delete(n),p;case Lh:if(bs)return bs.call(n)==bs.call(t)}return!1}var Ih=1,kh=Object.prototype,Mh=kh.hasOwnProperty;function jh(n,t,e,r,s,i){var a=e&Ih,l=Rs(n),c=l.length,u=Rs(t),p=u.length;if(c!=p&&!a)return!1;for(var m=c;m--;){var f=l[m];if(!(a?f in t:Mh.call(t,f)))return!1}var g=i.get(n),_=i.get(t);if(g&&_)return g==t&&_==n;var x=!0;i.set(n,t),i.set(t,n);for(var L=a;++m<c;){f=l[m];var w=n[f],b=t[f];if(r)var h=a?r(b,w,f,t,n,i):r(w,b,f,n,t,i);if(!(h===void 0?w===b||s(w,b,e,r,i):h)){x=!1;break}L||(L=f=="constructor")}if(x&&!L){var y=n.constructor,A=t.constructor;y!=A&&"constructor"in n&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof A=="function"&&A instanceof A)&&(x=!1)}return i.delete(n),i.delete(t),x}var Bh=1,Pi="[object Arguments]",$i="[object Array]",$n="[object Object]",Dh=Object.prototype,Ui=Dh.hasOwnProperty;function Ph(n,t,e,r,s,i){var a=$r(n),l=$r(t),c=a?$i:Ze(n),u=l?$i:Ze(t);c=c==Pi?$n:c,u=u==Pi?$n:u;var p=c==$n,m=u==$n,f=c==u;if(f&&An(n)){if(!An(t))return!1;a=!0,p=!1}
1if(f&&!p)return i||(i=new ur),a||Xs(n)?zo(n,t,e,r,s,i):Rh(n,t,c,e,r,s,i);if(!(e&Bh)){var g=p&&Ui.call(n,"__wrapped__"),_=m&&Ui.call(t,"__wrapped__");if(g||_){var x=g?n.value():n,L=_?t.value():t;return i||(i=new ur),s(x,L,e,r,i)}}return f?(i||(i=new ur),jh(n,t,e,r,s,i)):!1}function Go(n,t,e,r,s){return n===t?!0:n==null||t==null||!br(n)&&!br(t)?n!==n&&t!==t:Ph(n,t,e,r,Go,s)}function $h(n){return function(t,e,r){for(var s=-1,i=Object(t),a=r(t),l=a.length;l--;){var c=a[++s];if(e(i[c],c,i)===!1)break}return t}}var Uh=$h();function js(n,t,e){(e!==void 0&&!On(n[t],e)||e===void 0&&!(t in n))&&Ks(n,t,e)}function Fh(n){return br(n)&&ss(n)}function Bs(n,t){if(!(t==="constructor"&&typeof n[t]=="function")&&t!="__proto__")return n[t]}function Hh(n){return fl(n,ko(n))}function zh(n,t,e,r,s,i,a){var l=Bs(n,e),c=Bs(t,e),u=a.get(c);if(u){js(n,e,u);return}var p=i?i(l,c,e+"",n,t,a):void 0,m=p===void 0;if(m){var f=$r(c),g=!f&&An(c),_=!f&&!g&&Xs(c);p=c,f||g||_?$r(l)?p=l:Fh(l)?p=Ja(l):g?(m=!1,p=Do(c,!0)):_?(m=!1,p=Po(c,!0)):p=[]:Pc(c)||qs(c)?(p=l,qs(l)?p=Hh(l):(!Mr(l)||Vs(l))&&(p=$o(c))):m=!1}m&&(a.set(c,p),s(p,c,r,i,a),a.delete(c)),js(n,e,p)}function Vo(n,t,e,r,s){n!==t&&Uh(t,function(i,a){if(s||(s=new ur),Mr(i))zh(n,t,a,e,Vo,r,s);else{var l=r?r(Bs(n,a),i,a+"",n,t,s):void 0;l===void 0&&(l=i),js(n,a,l)}},ko)}function Qs(n,t){return Go(n,t)}var qr=bl(function(n,t,e){Vo(n,t,e)}),it=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(it||{});class hr{constructor(t,e,r={}){this.attrName=t,this.keyName=e;const s=it.TYPE&it.ATTRIBUTE;this.scope=r.scope!=null?r.scope&it.LEVEL|s:it.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(e=>e.name)}add(t,e){return this.canAdd(t,e)?(t.setAttribute(this.keyName,e),!0):!1}canAdd(t,e){return this.whitelist==null?!0:typeof e=="string"?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class on extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Ko=class Ds{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,e)}return null}create(t,e,r){const s=this.query(e);if(s==null)throw new on(`Unable to create ${e} blot`);const i=s,a=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:i.create(r),l=new i(t,a,r);return Ds.blots.set(l.domNode,l),l}find(t,e=!1){return Ds.find(t,e)}query(t,e=it.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&it.LEVEL&it.BLOCK?r=this.types.block:t&it.LEVEL&it.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(s=>(r=this.classes[s],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&e&it.LEVEL&r.scope&&e&it.TYPE&r.scope?r:null}register(...t){return t.map(e=>{const r="blotName"in e,s="attrName"in e;if(!r&&!s)throw new on("Invalid definition");if(r&&e.blotName==="abstract")throw new on("Cannot register abstract class");const i=r?e.blotName:s?e.attrName:void 0;return this.types[i]=e,s?typeof e.keyName=="string"&&(this.attributes[e.keyName]=e):r&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(a=>a.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(a=>{(this.tags[a]==null||e.className==null)&&(this.tags[a]=e)}))),e})}};Ko.blots=new WeakMap;let cn=Ko;function Fi(n,t){return(n.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}class Gh extends hr{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(e=>e.split("-").slice(0,-1).join("-"))}add(t,e){return this.canAdd(t,e)?(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0):!1}
vendor: 17,829 bytes, line 1
1remove(t){Fi(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const e=(Fi(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}const tr=Gh;function ys(n){const t=n.split("-"),e=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+e}class Vh extends hr{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[ys(this.keyName)]=e,!0):!1}remove(t){t.style[ys(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[ys(this.keyName)];return this.canAdd(t,e)?e:""}}const jr=Vh;class Kh{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=cn.find(this.domNode);if(t==null)return;const e=hr.keys(this.domNode),r=tr.keys(this.domNode),s=jr.keys(this.domNode);e.concat(r).concat(s).forEach(i=>{const a=t.scroll.query(i,it.ATTRIBUTE);a instanceof hr&&(this.attributes[a.attrName]=a)})}copy(t){Object.keys(this.attributes).forEach(e=>{const r=this.attributes[e].value(this.domNode);t.format(e,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t),{})}}const as=Kh,Wo=class{constructor(t,e){this.scroll=t,this.domNode=e,cn.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new on("Blot definition missing tagName");let e,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?e=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?e=document.createElement(r):e=document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),cn.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,r,s){const i=this.isolate(t,e);if(this.scroll.query(r,it.BLOT)!=null&&s)i.wrap(r,s);else if(this.scroll.query(r,it.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);i.wrap(a),a.format(r,s)}}insertAt(t,e,r){const s=r==null?this.scroll.create("text",e):this.scroll.create(e,r),i=this.split(t);this.parent.insertBefore(s,i||void 0)}isolate(t,e){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(e),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const r=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){const r=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new on(`Cannot wrap ${t}`);return r.appendChild(this),r}};Wo.blotName="abstract";let Zo=Wo;const Xo=class extends Zo{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Xo.scope=it.INLINE_BLOT;let Wh=Xo;const Ae=Wh;class Zh{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let r=e();for(;r&&t>0;)t-=1,r=e();return r}contains(t){const e=this.iterator();let r=e();for(;r;){if(r===t)return!0;r=e()}return!1}indexOf(t){const e=this.iterator();let r=e(),s=0;for(;r;){if(r===t)return s;s+=1,r=e()}return-1}insertBefore(t,e){t!=null&&(this.remove(t),t.next=e,e!=null?(t.prev=e.prev,e.prev!=null&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,r=this.head;for(;r!=null;){if(r===t)return e;e+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){const r=this.iterator();let s=r();for(;s;){const i=s.length();if(t<i||e&&t===i&&(s.next==null||s.next.length()!==0))return[s,t];t-=i,s=r()}return[null,0]}forEach(t){const e=this.iterator();let r=e();for(;r;)t(r),r=e()}forEachAt(t,e,r){if(e<=0)return;const[s,i]=this.find(t);let a=t-i;const l=this.iterator(s);let c=l();for(;c&&a<t+e;){const u=c.length();t>a?r(c,t-a,Math.min(e,a+u-t)):r(c,0,Math.min(u,t+e-a)),a+=u,c=l()}}map(t){return this.reduce((e,r)=>(e.push(t(r)),e),[])}reduce(t,e){const r=this.iterator();let s=r();for(;s;)e=t(e,s),s=r();return e}}function Hi(n,t){const e=t.find(n);if(e)return e;try{return t.create(n)}catch{const r=t.create(it.INLINE);return Array.from(n.childNodes).forEach(s=>{r.domNode.appendChild(s)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const Yo=class Or extends Zo{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Or.uiClass&&this.uiNode.classList.add(Or.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Zh,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const e=Hi(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof on)return;throw e}})}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,(r,s,i)=>{r.deleteAt(s,i)})}descendant(t,e=0){const[r,s]=this.children.find(e);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,s]:r instanceof Or?r.descendant(t,s):[null,-1]}descendants(t,e=0,r=Number.MAX_VALUE){let s=[],i=r;return this.children.forEachAt(e,r,(a,l,c)=>{(t.blotName==null&&t(a)||t.blotName!=null&&a instanceof t)&&s.push(a),a instanceof Or&&(s=s.concat(a.descendants(t,l,i))),i-=c}),s}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(e=>{t||this.statics.allowedChildren.some(r=>e instanceof r)||(e.statics.scope===it.BLOCK_BLOT?(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev),e.parent.unwrap(),t=!0):e instanceof Or?e.unwrap():e.remove())})}formatAt(t,e,r,s){this.children.forEachAt(t,e,(i,a,l)=>{i.formatAt(a,l,r,s)})}insertAt(t,e,r){const[s,i]=this.children.find(t);if(s)s.insertAt(i,e,r);else{const a=r==null?this.scroll.create("text",e):this.scroll.create(e,r);this.appendChild(a)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(r=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,e)=>t+e.length(),0)}moveChildren(t,e){this.children.forEach(r=>{t.insertBefore(r,e)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,e=!1){const[r,s]=this.children.find(t,e),i=[[this,t]];return r instanceof Or?i.concat(r.path(s,e)):(r!=null&&i.push([r,s]),i)}removeChild(t){this.children.remove(t)}replaceWith(t,e){const r=typeof t=="string"?this.scroll.create(t,e):t;return r instanceof Or&&this.moveChildren(r),super.replaceWith(r)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(s,i,a)=>{const l=s.split(i,e);l!=null&&r.appendChild(l)}),r}splitAfter(t){const e=this.clone();for(;t.next!=null;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const r=[],s=[];t.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(r.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(i);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),r.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,a)=>i===a?0:i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let a=null;i.nextSibling!=null&&(a=this.scroll.find(i.nextSibling));const l=Hi(i,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};Yo.uiClass="";let Xh=Yo;const Qe=Xh;function Yh(n,t){if(Object.keys(n).length!==Object.keys(t).length)return!1;for(const e in n)if(n[e]!==t[e])return!1;return!0}const Jr=class tn extends Qe{static create(t){return super.create(t)}static formats(t,e){const r=e.query(tn.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new as(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(r=>{r instanceof tn||(r=r.wrap(tn.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,it.INLINE);if(r==null)return;r instanceof hr?this.attributes.attribute(r,e):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e)}}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,r,s){this.formats()[r]!=null||this.scroll.query(r,it.ATTRIBUTE)?this.isolate(t,e).format(r,s):super.formatAt(t,e,r,s)}optimize(t){super.optimize(t);const e=this.formats();if(Object.keys(e).length===0)return this.unwrap();const r=this.next;r instanceof tn&&r.prev===this&&Yh(e,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,e){const r=super.replaceWith(t,e);return this.attributes.copy(r),r}update(t,e){super.update(t,e),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,e){const r=super.wrap(t,e);return r instanceof tn&&this.attributes.move(r),r}};Jr.allowedChildren=[Jr,Ae],Jr.blotName="inline",Jr.scope=it.INLINE_BLOT,Jr.tagName="SPAN";let Qh=Jr;const Js=Qh,en=class Ps extends Qe{static create(t){return super.create(t)}static formats(t,e){const r=e.query(Ps.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new as(this.domNode)}format(t,e){const r=this.scroll.query(t,it.BLOCK);r!=null&&(r instanceof hr?this.attributes.attribute(r,e):t===this.statics.blotName&&!e?this.replaceWith(Ps.blotName):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,r,s){this.scroll.query(r,it.BLOCK)!=null?this.format(r,s):super.formatAt(t,e,r,s)}insertAt(t,e,r){if(r==null||this.scroll.query(e,it.INLINE)!=null)super.insertAt(t,e,r);else{const s=this.split(t);if(s!=null){const i=this.scroll.create(e,r);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){const r=super.replaceWith(t,e);return this.attributes.copy(r),r}update(t,e){super.update(t,e),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};en.blotName="block",en.scope=it.BLOCK_BLOT,en.tagName="P",en.allowedChildren=[Js,en,Ae];let Jh=en;const Tn=Jh,$s=class extends Qe{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,r,s){super.formatAt(t,e,r,s),this.enforceAllowedChildren()}insertAt(t,e,r){super.insertAt(t,e,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};$s.blotName="container",$s.scope=it.BLOCK_BLOT;let tf=$s;const ls=tf;class ef extends Ae{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,r,s){t===0&&e===this.length()?this.format(r,s):super.formatAt(t,e,r,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Be=ef,rf={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},nf=100,rn=class extends Qe{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,rf),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const r=this.registry.find(t,e);return r?r.scroll===this?r:e?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,e=it.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),t===0&&e===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,e)}formatAt(t,e,r,s){this.update(),super.formatAt(t,e,r,s)}insertAt(t,e,r){this.update(),super.insertAt(t,e,r)}optimize(t=[],e={}){super.optimize(e);const r=e.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)t.push(s.pop());const i=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&i(c.parent))},a=c=>{r.has(c.domNode)&&(c instanceof Qe&&c.children.forEach(a),r.delete(c.domNode),c.optimize(e))};let l=t;for(let c=0;l.length>0;c+=1){if(c>=nf)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const p=this.find(u.target,!0);p!=null&&(p.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(m=>{const f=this.find(m,!1);i(f,!1),f instanceof Qe&&f.children.forEach(g=>{i(g,!1)})})):u.type==="attributes"&&i(p.prev)),i(p))}),this.children.forEach(a),l=Array.from(this.observer.takeRecords()),s=l.slice();s.length>0;)t.push(s.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(s=>{const i=this.find(s.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(s),null):(r.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&r.has(s.domNode)&&s.update(r.get(s.domNode)||[],e)}),e.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),e),this.optimize(t,e)}};rn.blotName="scroll",rn.defaultChild=Tn,rn.allowedChildren=[Tn,ls],rn.scope=it.BLOCK_BLOT,rn.tagName="DIV";let sf=rn;const ti=sf,Us=class Qo extends Ae{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,r){r==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Qo&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,e){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Us.blotName="text",Us.scope=it.INLINE_BLOT;let of=Us;const es=of,Jo=Object.freeze(Object.defineProperty({__proto__:null,Attributor:hr,AttributorStore:as,BlockBlot:Tn,ClassAttributor:tr,ContainerBlot:ls,EmbedBlot:Be,InlineBlot:Js,LeafBlot:Ae,ParentBlot:Qe,Registry:cn,Scope:it,ScrollBlot:ti,StyleAttributor:jr,TextBlot:es},Symbol.toStringTag,{value:"Module"}));var Un={exports:{}},vs,zi;function af(){if(zi)return vs;zi=1;var n=-1,t=1,e=0;
vendor: 7,116 bytes, line 1
1function r(v,B,E,R,C){if(v===B)return v?[[e,v]]:[];if(E!=null){var S=K(v,B,E);if(S)return S}var I=l(v,B),D=v.substring(0,I);v=v.substring(I),B=B.substring(I),I=u(v,B);var z=v.substring(v.length-I);v=v.substring(0,v.length-I),B=B.substring(0,B.length-I);var U=s(v,B);return D&&U.unshift([e,D]),z&&U.push([e,z]),b(U,C),R&&m(U),U}function s(v,B){var E;if(!v)return[[t,B]];if(!B)return[[n,v]];var R=v.length>B.length?v:B,C=v.length>B.length?B:v,S=R.indexOf(C);if(S!==-1)return E=[[t,R.substring(0,S)],[e,C],[t,R.substring(S+C.length)]],v.length>B.length&&(E[0][0]=E[2][0]=n),E;if(C.length===1)return[[n,v],[t,B]];var I=p(v,B);if(I){var D=I[0],z=I[1],U=I[2],tt=I[3],Q=I[4],V=r(D,U),ft=r(z,tt);return V.concat([[e,Q]],ft)}return i(v,B)}function i(v,B){for(var E=v.length,R=B.length,C=Math.ceil((E+R)/2),S=C,I=2*C,D=new Array(I),z=new Array(I),U=0;U<I;U++)D[U]=-1,z[U]=-1;D[S+1]=0,z[S+1]=0;for(var tt=E-R,Q=tt%2!==0,V=0,ft=0,Y=0,nt=0,ct=0;ct<C;ct++){for(var Z=-ct+V;Z<=ct-ft;Z+=2){var lt=S+Z,ut;Z===-ct||Z!==ct&&D[lt-1]<D[lt+1]?ut=D[lt+1]:ut=D[lt-1]+1;for(var st=ut-Z;ut<E&&st<R&&v.charAt(ut)===B.charAt(st);)ut++,st++;if(D[lt]=ut,ut>E)ft+=2;else if(st>R)V+=2;else if(Q){var dt=S+tt-Z;if(dt>=0&&dt<I&&z[dt]!==-1){var pt=E-z[dt];if(ut>=pt)return a(v,B,ut,st)}}}for(var gt=-ct+Y;gt<=ct-nt;gt+=2){var dt=S+gt,pt;gt===-ct||gt!==ct&&z[dt-1]<z[dt+1]?pt=z[dt+1]:pt=z[dt-1]+1;for(var St=pt-gt;pt<E&&St<R&&v.charAt(E-pt-1)===B.charAt(R-St-1);)pt++,St++;if(z[dt]=pt,pt>E)nt+=2;else if(St>R)Y+=2;else if(!Q){var lt=S+tt-gt;if(lt>=0&<<I&&D[lt]!==-1){var ut=D[lt],st=S+ut-lt;if(pt=E-pt,ut>=pt)return a(v,B,ut,st)}}}}return[[n,v],[t,B]]}function a(v,B,E,R){var C=v.substring(0,E),S=B.substring(0,R),I=v.substring(E),D=B.substring(R),z=r(C,S),U=r(I,D);return z.concat(U)}function l(v,B){if(!v||!B||v.charAt(0)!==B.charAt(0))return 0;for(var E=0,R=Math.min(v.length,B.length),C=R,S=0;E<C;)v.substring(S,C)==B.substring(S,C)?(E=C,S=E):R=C,C=Math.floor((R-E)/2+E);return h(v.charCodeAt(C-1))&&C--,C}function c(v,B){var E=v.length,R=B.length;if(E==0||R==0)return 0;E>R?v=v.substring(E-R):E<R&&(B=B.substring(0,E));var C=Math.min(E,R);if(v==B)return C;for(var S=0,I=1;;){var D=v.substring(C-I),z=B.indexOf(D);if(z==-1)return S;I+=z,(z==0||v.substring(C-I)==B.substring(0,I))&&(S=I,I++)}}function u(v,B){if(!v||!B||v.slice(-1)!==B.slice(-1))return 0;for(var E=0,R=Math.min(v.length,B.length),C=R,S=0;E<C;)v.substring(v.length-C,v.length-S)==B.substring(B.length-C,B.length-S)?(E=C,S=E):R=C,C=Math.floor((R-E)/2+E);return y(v.charCodeAt(v.length-C))&&C--,C}function p(v,B){var E=v.length>B.length?v:B,R=v.length>B.length?B:v;if(E.length<4||R.length*2<E.length)return null;function C(ft,Y,nt){for(var ct=ft.substring(nt,nt+Math.floor(ft.length/4)),Z=-1,lt="",ut,st,dt,pt;(Z=Y.indexOf(ct,Z+1))!==-1;){var gt=l(ft.substring(nt),Y.substring(Z)),St=u(ft.substring(0,nt),Y.substring(0,Z));lt.length<St+gt&&(lt=Y.substring(Z-St,Z)+Y.substring(Z,Z+gt),ut=ft.substring(0,nt-St),st=ft.substring(nt+gt),dt=Y.substring(0,Z-St),pt=Y.substring(Z+gt))}return lt.length*2>=ft.length?[ut,st,dt,pt,lt]:null}var S=C(E,R,Math.ceil(E.length/4)),I=C(E,R,Math.ceil(E.length/2)),D;if(!S&&!I)return null;I?S?D=S[4].length>I[4].length?S:I:D=I:D=S;var z,U,tt,Q;v.length>B.length?(z=D[0],U=D[1],tt=D[2],Q=D[3]):(tt=D[0],Q=D[1],z=D[2],U=D[3]);var V=D[4];return[z,U,tt,Q,V]}function m(v){for(var B=!1,E=[],R=0,C=null,S=0,I=0,D=0,z=0,U=0;S<v.length;)v[S][0]==e?(E[R++]=S,I=z,D=U,z=0,U=0,C=v[S][1]):(v[S][0]==t?z+=v[S][1].length:U+=v[S][1].length,C&&C.length<=Math.max(I,D)&&C.length<=Math.max(z,U)&&(v.splice(E[R-1],0,[n,C]),v[E[R-1]+1][0]=t,R--,R--,S=R>0?E[R-1]:-1,I=0,D=0,z=0,U=0,C=null,B=!0)),S++;for(B&&b(v),w(v),S=1;S<v.length;){if(v[S-1][0]==n&&v[S][0]==t){var tt=v[S-1][1],Q=v[S][1],V=c(tt,Q),ft=c(Q,tt);V>=ft?(V>=tt.length/2||V>=Q.length/2)&&(v.splice(S,0,[e,Q.substring(0,V)]),v[S-1][1]=tt.substring(0,tt.length-V),v[S+1][1]=Q.substring(V),S++):(ft>=tt.length/2||ft>=Q.length/2)&&(v.splice(S,0,[e,tt.substring(0,ft)]),v[S-1][0]=t,v[S-1][1]=Q.substring(0,Q.length-ft),v[S+1][0]=n,v[S+1][1]=tt.substring(ft),S++),S++}S++}}var f=/[^a-zA-Z0-9]/,g=/\s/,_=/[\r\n]/,x=/\n\r?\n$/,L=/^\r?\n\r?\n/;function w(v){function B(ft,Y){if(!ft||!Y)return 6;var nt=ft.charAt(ft.length-1),ct=Y.charAt(0),Z=nt.match(f),lt=ct.match(f),ut=Z&&nt.match(g),st=lt&&ct.match(g),dt=ut&&nt.match(_),pt=st&&ct.match(_),gt=dt&&ft.match(x),St=pt&&Y.match(L);return gt||St?5:dt||pt?4:Z&&!ut&&st?3:ut||st?2:Z||lt?1:0}for(var E=1;E<v.length-1;){if(v[E-1][0]==e&&v[E+1][0]==e){var R=v[E-1][1],C=v[E][1],S=v[E+1][1],I=u(R,C);if(I){var D=C.substring(C.length-I);R=R.substring(0,R.length-I),C=D+C.substring(0,C.length-I),S=D+S}for(var z=R,U=C,tt=S,Q=B(R,C)+B(C,S);C.charAt(0)===S.charAt(0);){R+=C.charAt(0),C=C.substring(1)+S.charAt(0),S=S.substring(1);var V=B(R,C)+B(C,S);V>=Q&&(Q=V,z=R,U=C,tt=S)}v[E-1][1]!=z&&(z?v[E-1][1]=z:(v.splice(E-1,1),E--),v[E][1]=U,tt?v[E+1][1]=tt:(v.splice(E+1,1),E--))}E++}}function b(v,B){v.push([e,""]);for(var E=0,R=0,C=0,S="",I="",D;E<v.length;){if(E<v.length-1&&!v[E][1]){v.splice(E,1);continue}switch(v[E][0]){case t:C++,I+=v[E][1],E++;break;case n:R++,S+=v[E][1],E++;break;case e:var z=E-C-R-1;if(B){if(z>=0&&T(v[z][1])){var U=v[z][1].slice(-1);if(v[z][1]=v[z][1].slice(0,-1),S=U+S,I=U+I,!v[z][1]){v.splice(z,1),E--;var tt=z-1;v[tt]&&v[tt][0]===t&&(C++,I=v[tt][1]+I,tt--),v[tt]&&v[tt][0]===n&&(R++,S=v[tt][1]+S,tt--),z=tt}}if(A(v[E][1])){var U=v[E][1].charAt(0);v[E][1]=v[E][1].slice(1),S+=U,I+=U}}if(E<v.length-1&&!v[E][1]){v.splice(E,1);break}if(S.length>0||I.length>0){S.length>0&&I.length>0&&(D=l(I,S),D!==0&&(z>=0?v[z][1]+=I.substring(0,D):(v.splice(0,0,[e,I.substring(0,D)]),E++),I=I.substring(D),S=S.substring(D)),D=u(I,S),D!==0&&(v[E][1]=I.substring(I.length-D)+v[E][1],I=I.substring(0,I.length-D),S=S.substring(0,S.length-D)));var Q=C+R;S.length===0&&I.length===0?(v.splice(E-Q,Q),E=E-Q):S.length===0?(v.splice(E-Q,Q,[t,I]),E=E-Q+1):I.length===0?(v.splice(E-Q,Q,[n,S]),E=E-Q+1):(v.splice(E-Q,Q,[n,S],[t,I]),E=E-Q+2)}E!==0&&v[E-1][0]===e?(v[E-1][1]+=v[E][1],v.splice(E,1)):E++,C=0,R=0,S="",I="";break}}v[v.length-1][1]===""&&v.pop();var V=!1;for(E=1;E<v.length-1;)v[E-1][0]===e&&v[E+1][0]===e&&(v[E][1].substring(v[E][1].length-v[E-1][1].length)===v[E-1][1]?(v[E][1]=v[E-1][1]+v[E][1].substring(0,v[E][1].length-v[E-1][1].length),v[E+1][1]=v[E-1][1]+v[E+1][1],v.splice(E-1,1),V=!0):v[E][1].substring(0,v[E+1][1].length)==v[E+1][1]&&(v[E-1][1]+=v[E+1][1],v[E][1]=v[E][1].substring(v[E+1][1].length)+v[E+1][1],v.splice(E+1,1),V=!0)),E++;V&&b(v,B)}function h(v){return v>=55296&&v<=56319}function y(v){return v>=56320&&v<=57343}function A(v){return y(v.charCodeAt(0))}function T(v){return h(v.charCodeAt(v.length-1))}function M(v){for(var B=[],E=0;E<v.length;E++)v[E][1].length>0&&B.push(v[E]);return B}function F(v,B,E,R){return T(v)||A(R)?null:M([[e,v],[n,B],[t,E],[e,R]])}function K(v,B,E){var R=typeof E=="number"?{index:E,length:0}:E.oldRange,C=typeof E=="number"?null:E.newRange,S=v.length,I=B.length;if(R.length===0&&(C===null||C.length===0)){var D=R.index,z=v.slice(0,D),U=v.slice(D),tt=C?C.index:null;t:{var Q=D+I-S;if(tt!==null&&tt!==Q||Q<0||Q>I)break t;
1var V=B.slice(0,Q),ft=B.slice(Q);if(ft!==U)break t;var Y=Math.min(D,Q),nt=z.slice(0,Y),ct=V.slice(0,Y);if(nt!==ct)break t;var Z=z.slice(Y),lt=V.slice(Y);return F(nt,Z,lt,U)}t:{if(tt!==null&&tt!==D)break t;var ut=D,V=B.slice(0,ut),ft=B.slice(ut);if(V!==z)break t;var st=Math.min(S-ut,I-ut),dt=U.slice(U.length-st),pt=ft.slice(ft.length-st);if(dt!==pt)break t;var Z=U.slice(0,U.length-st),lt=ft.slice(0,ft.length-st);return F(z,Z,lt,dt)}}if(R.length>0&&C&&C.length===0)t:{var nt=v.slice(0,R.index),dt=v.slice(R.index+R.length),Y=nt.length,st=dt.length;if(I<Y+st)break t;var ct=B.slice(0,Y),pt=B.slice(I-st);if(nt!==ct||dt!==pt)break t;var Z=v.slice(Y,S-st),lt=B.slice(Y,I-st);return F(nt,Z,lt,dt)}return null}function W(v,B,E,R){return r(v,B,E,R,!0)}return W.INSERT=t,W.DELETE=n,W.EQUAL=e,vs=W,vs}var bn={exports:{}};bn.exports;var Gi;function ta(){return Gi||(Gi=1,(function(n,t){var e=200,r="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",p="[object Function]",m="[object GeneratorFunction]",f="[object Map]",g="[object Number]",_="[object Object]",x="[object Promise]",L="[object RegExp]",w="[object Set]",b="[object String]",h="[object Symbol]",y="[object WeakMap]",A="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",F="[object Float64Array]",K="[object Int8Array]",W="[object Int16Array]",v="[object Int32Array]",B="[object Uint8Array]",E="[object Uint8ClampedArray]",R="[object Uint16Array]",C="[object Uint32Array]",S=/[\\^$.*+?()[\]{}|]/g,I=/\w*$/,D=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,U={};U[i]=U[a]=U[A]=U[T]=U[l]=U[c]=U[M]=U[F]=U[K]=U[W]=U[v]=U[f]=U[g]=U[_]=U[L]=U[w]=U[b]=U[h]=U[B]=U[E]=U[R]=U[C]=!0,U[u]=U[p]=U[y]=!1;var tt=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,Q=typeof self=="object"&&self&&self.Object===Object&&self,V=tt||Q||Function("return this")(),ft=t&&!t.nodeType&&t,Y=ft&&!0&&n&&!n.nodeType&&n,nt=Y&&Y.exports===ft;function ct(o,d){return o.set(d[0],d[1]),o}function Z(o,d){return o.add(d),o}function lt(o,d){for(var N=-1,P=o?o.length:0;++N<P&&d(o[N],N,o)!==!1;);return o}function ut(o,d){for(var N=-1,P=d.length,yt=o.length;++N<P;)o[yt+N]=d[N];return o}function st(o,d,N,P){for(var yt=-1,at=o?o.length:0;++yt<at;)N=d(N,o[yt],yt,o);return N}function dt(o,d){for(var N=-1,P=Array(o);++N<o;)P[N]=d(N);return P}function pt(o,d){return o?.[d]}function gt(o){var d=!1;if(o!=null&&typeof o.toString!="function")try{d=!!(o+"")}catch{}return d}function St(o){var d=-1,N=Array(o.size);return o.forEach(function(P,yt){N[++d]=[yt,P]}),N}function Zt(o,d){return function(N){return o(d(N))}}function ue(o){var d=-1,N=Array(o.size);return o.forEach(function(P){N[++d]=P}),N}var ee=Array.prototype,Xt=Function.prototype,zt=Object.prototype,oe=V["__core-js_shared__"],Vt=(function(){var o=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Bt=Xt.toString,wt=zt.hasOwnProperty,Kt=zt.toString,Dt=RegExp("^"+Bt.call(wt).replace(S,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=nt?V.Buffer:void 0,Lt=V.Symbol,Wt=V.Uint8Array,Ct=Zt(Object.getPrototypeOf,Object),nr=Object.create,De=zt.propertyIsEnumerable,Br=ee.splice,sr=Object.getOwnPropertySymbols,ir=Rt?Rt.isBuffer:void 0,Er=Zt(Object.keys,Object),Pe=fe(V,"DataView"),me=fe(V,"Map"),re=fe(V,"Promise"),ae=fe(V,"Set"),ne=fe(V,"WeakMap"),Yt=fe(Object,"create"),$e=Jt(Pe),le=Jt(me),Ue=Jt(re),Me=Jt(ae),or=Jt(ne),Le=Lt?Lt.prototype:void 0,ar=Le?Le.valueOf:void 0;function Qt(o){var d=-1,N=o?o.length:0;for(this.clear();++d<N;){var P=o[d];this.set(P[0],P[1])}}function ce(){this.__data__=Yt?Yt(null):{}}function he(o){return this.has(o)&&delete this.__data__[o]}function Fe(o){var d=this.__data__;if(Yt){var N=d[o];return N===r?void 0:N}return wt.call(d,o)?d[o]:void 0}function be(o){var d=this.__data__;return Yt?d[o]!==void 0:wt.call(d,o)}function He(o,d){var N=this.__data__;return N[o]=Yt&&d===void 0?r:d,this}Qt.prototype.clear=ce,Qt.prototype.delete=he,Qt.prototype.get=Fe,Qt.prototype.has=be,Qt.prototype.set=He;function It(o){var d=-1,N=o?o.length:0;for(this.clear();++d<N;){var P=o[d];this.set(P[0],P[1])}}function lr(){this.__data__=[]}function Ar(o){var d=this.__data__,N=X(d,o);if(N<0)return!1;var P=d.length-1;return N==P?d.pop():Br.call(d,N,1),!0}function je(o){var d=this.__data__,N=X(d,o);return N<0?void 0:d[N][1]}function Ce(o){return X(this.__data__,o)>-1}function dr(o,d){var N=this.__data__,P=X(N,o);return P<0?N.push([o,d]):N[P][1]=d,this}It.prototype.clear=lr,It.prototype.delete=Ar,It.prototype.get=je,It.prototype.has=Ce,It.prototype.set=dr;function kt(o){var d=-1,N=o?o.length:0;for(this.clear();++d<N;){var P=o[d];this.set(P[0],P[1])}}function wr(){this.__data__={hash:new Qt,map:new(me||It),string:new Qt}}function ze(o){return ve(this,o).delete(o)}function qe(o){return ve(this,o).get(o)}function Nr(o){return ve(this,o).has(o)}function q(o,d){return ve(this,o).set(o,d),this}kt.prototype.clear=wr,kt.prototype.delete=ze,kt.prototype.get=qe,kt.prototype.has=Nr,kt.prototype.set=q;function k(o){this.__data__=new It(o)}function H(){this.__data__=new It}function J(o){return this.__data__.delete(o)}function At(o){return this.__data__.get(o)}function mt(o){return this.__data__.has(o)}function O(o,d){var N=this.__data__;if(N instanceof It){var P=N.__data__;if(!me||P.length<e-1)return P.push([o,d]),this;N=this.__data__=new kt(P)}return N.set(o,d),this}k.prototype.clear=H,k.prototype.delete=J,k.prototype.get=At,k.prototype.has=mt,k.prototype.set=O;function j(o,d){var N=fn(o)||Yr(o)?dt(o.length,String):[],P=N.length,yt=!!P;
vendor: 4,180 bytes, line 1
1for(var at in o)wt.call(o,at)&&!(yt&&(at=="length"||Tr(at,P)))&&N.push(at);return N}function G(o,d,N){var P=o[d];(!(wt.call(o,d)&&kn(P,N))||N===void 0&&!(d in o))&&(o[d]=N)}function X(o,d){for(var N=o.length;N--;)if(kn(o[N][0],d))return N;return-1}function ht(o,d){return o&&Gt(d,pn(d),o)}function Nt(o,d,N,P,yt,at,Ot){var xt;if(P&&(xt=at?P(o,yt,at,Ot):P(o)),xt!==void 0)return xt;if(!cr(o))return o;var te=fn(o);if(te){if(xt=Zr(o),!d)return _t(o,xt)}else{var qt=se(o),_e=qt==p||qt==m;if(Mn(o))return ye(o,d);if(qt==_||qt==i||_e&&!at){if(gt(o))return at?o:{};if(xt=Te(_e?{}:o),!d)return $t(o,ht(xt,o))}else{if(!U[qt])return at?o:{};xt=Dr(o,qt,Nt,d)}}Ot||(Ot=new k);var ke=Ot.get(o);if(ke)return ke;if(Ot.set(o,xt),!te)var ie=N?Ne(o):pn(o);return lt(ie||o,function(Ee,pe){ie&&(pe=Ee,Ee=o[pe]),G(xt,pe,Nt(Ee,d,N,P,pe,o,Ot))}),xt}function Mt(o){return cr(o)?nr(o):{}}function vt(o,d,N){var P=d(o);return fn(o)?P:ut(P,N(o))}function Ft(o){return Kt.call(o)}function jt(o){if(!cr(o)||Xr(o))return!1;var d=dn(o)||gt(o)?Dt:D;return d.test(Jt(o))}function Re(o){if(!pr(o))return Er(o);var d=[];for(var N in Object(o))wt.call(o,N)&&N!="constructor"&&d.push(N);return d}function ye(o,d){if(d)return o.slice();var N=new o.constructor(o.length);return o.copy(N),N}function Ie(o){var d=new o.constructor(o.byteLength);return new Wt(d).set(new Wt(o)),d}function ot(o,d){var N=d?Ie(o.buffer):o.buffer;return new o.constructor(N,o.byteOffset,o.byteLength)}function Tt(o,d,N){var P=d?N(St(o),!0):St(o);return st(P,ct,new o.constructor)}function Pt(o){var d=new o.constructor(o.source,I.exec(o));return d.lastIndex=o.lastIndex,d}function bt(o,d,N){var P=d?N(ue(o),!0):ue(o);return st(P,Z,new o.constructor)}function Et(o){return ar?Object(ar.call(o)):{}}function we(o,d){var N=d?Ie(o.buffer):o.buffer;return new o.constructor(N,o.byteOffset,o.length)}function _t(o,d){var N=-1,P=o.length;for(d||(d=Array(P));++N<P;)d[N]=o[N];return d}function Gt(o,d,N,P){N||(N={});for(var yt=-1,at=d.length;++yt<at;){var Ot=d[yt],xt=void 0;G(N,Ot,xt===void 0?o[Ot]:xt)}return N}function $t(o,d){return Gt(o,de(o),d)}function Ne(o){return vt(o,pn,de)}function ve(o,d){var N=o.__data__;return xr(d)?N[typeof d=="string"?"string":"hash"]:N.map}function fe(o,d){var N=pt(o,d);return jt(N)?N:void 0}var de=sr?Zt(sr,Object):ds,se=Ft;(Pe&&se(new Pe(new ArrayBuffer(1)))!=T||me&&se(new me)!=f||re&&se(re.resolve())!=x||ae&&se(new ae)!=w||ne&&se(new ne)!=y)&&(se=function(o){var d=Kt.call(o),N=d==_?o.constructor:void 0,P=N?Jt(N):void 0;if(P)switch(P){case $e:return T;case le:return f;case Ue:return x;case Me:return w;case or:return y}return d});function Zr(o){var d=o.length,N=o.constructor(d);return d&&typeof o[0]=="string"&&wt.call(o,"index")&&(N.index=o.index,N.input=o.input),N}function Te(o){return typeof o.constructor=="function"&&!pr(o)?Mt(Ct(o)):{}}function Dr(o,d,N,P){var yt=o.constructor;switch(d){case A:return Ie(o);case l:case c:return new yt(+o);case T:return ot(o,P);case M:case F:case K:case W:case v:case B:case E:case R:case C:return we(o,P);case f:return Tt(o,P,N);case g:case b:return new yt(o);case L:return Pt(o);case w:return bt(o,P,N);case h:return Et(o)}}function Tr(o,d){return d=d??s,!!d&&(typeof o=="number"||z.test(o))&&o>-1&&o%1==0&&o<d}function xr(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function Xr(o){return!!Vt&&Vt in o}function pr(o){var d=o&&o.constructor,N=typeof d=="function"&&d.prototype||zt;return o===N}function Jt(o){if(o!=null){try{return Bt.call(o)}catch{}try{return o+""}catch{}}return""}function In(o){return Nt(o,!0,!0)}function kn(o,d){return o===d||o!==o&&d!==d}function Yr(o){return fs(o)&&wt.call(o,"callee")&&(!De.call(o,"callee")||Kt.call(o)==i)}var fn=Array.isArray;function Qr(o){return o!=null&&jn(o.length)&&!dn(o)}function fs(o){return Bn(o)&&Qr(o)}var Mn=ir||ps;function dn(o){var d=cr(o)?Kt.call(o):"";return d==p||d==m}function jn(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=s}function cr(o){var d=typeof o;return!!o&&(d=="object"||d=="function")}function Bn(o){return!!o&&typeof o=="object"}function pn(o){return Qr(o)?j(o):Re(o)}function ds(){return[]}function ps(){return!1}n.exports=In}
vendor: 11,201 bytes, line 1
1)(bn,bn.exports)),bn.exports}var yn={exports:{}};yn.exports;var Vi;function ea(){return Vi||(Vi=1,(function(n,t){var e=200,r="__lodash_hash_undefined__",s=1,i=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",p="[object Boolean]",m="[object Date]",f="[object Error]",g="[object Function]",_="[object GeneratorFunction]",x="[object Map]",L="[object Number]",w="[object Null]",b="[object Object]",h="[object Promise]",y="[object Proxy]",A="[object RegExp]",T="[object Set]",M="[object String]",F="[object Symbol]",K="[object Undefined]",W="[object WeakMap]",v="[object ArrayBuffer]",B="[object DataView]",E="[object Float32Array]",R="[object Float64Array]",C="[object Int8Array]",S="[object Int16Array]",I="[object Int32Array]",D="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",tt="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,ft=/^(?:0|[1-9]\d*)$/,Y={};Y[E]=Y[R]=Y[C]=Y[S]=Y[I]=Y[D]=Y[z]=Y[U]=Y[tt]=!0,Y[l]=Y[c]=Y[v]=Y[p]=Y[B]=Y[m]=Y[f]=Y[g]=Y[x]=Y[L]=Y[b]=Y[A]=Y[T]=Y[M]=Y[W]=!1;var nt=typeof Lr=="object"&&Lr&&Lr.Object===Object&&Lr,ct=typeof self=="object"&&self&&self.Object===Object&&self,Z=nt||ct||Function("return this")(),lt=t&&!t.nodeType&&t,ut=lt&&!0&&n&&!n.nodeType&&n,st=ut&&ut.exports===lt,dt=st&&nt.process,pt=(function(){try{return dt&&dt.binding&&dt.binding("util")}catch{}})(),gt=pt&&pt.isTypedArray;function St(o,d){for(var N=-1,P=o==null?0:o.length,yt=0,at=[];++N<P;){var Ot=o[N];d(Ot,N,o)&&(at[yt++]=Ot)}return at}function Zt(o,d){for(var N=-1,P=d.length,yt=o.length;++N<P;)o[yt+N]=d[N];return o}function ue(o,d){for(var N=-1,P=o==null?0:o.length;++N<P;)if(d(o[N],N,o))return!0;return!1}function ee(o,d){for(var N=-1,P=Array(o);++N<o;)P[N]=d(N);return P}function Xt(o){return function(d){return o(d)}}function zt(o,d){return o.has(d)}function oe(o,d){return o?.[d]}function Vt(o){var d=-1,N=Array(o.size);return o.forEach(function(P,yt){N[++d]=[yt,P]}),N}function Bt(o,d){return function(N){return o(d(N))}}function wt(o){var d=-1,N=Array(o.size);return o.forEach(function(P){N[++d]=P}),N}var Kt=Array.prototype,Dt=Function.prototype,Rt=Object.prototype,Lt=Z["__core-js_shared__"],Wt=Dt.toString,Ct=Rt.hasOwnProperty,nr=(function(){var o=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),De=Rt.toString,Br=RegExp("^"+Wt.call(Ct).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sr=st?Z.Buffer:void 0,ir=Z.Symbol,Er=Z.Uint8Array,Pe=Rt.propertyIsEnumerable,me=Kt.splice,re=ir?ir.toStringTag:void 0,ae=Object.getOwnPropertySymbols,ne=sr?sr.isBuffer:void 0,Yt=Bt(Object.keys,Object),$e=de(Z,"DataView"),le=de(Z,"Map"),Ue=de(Z,"Promise"),Me=de(Z,"Set"),or=de(Z,"WeakMap"),Le=de(Object,"create"),ar=Jt($e),Qt=Jt(le),ce=Jt(Ue),he=Jt(Me),Fe=Jt(or),be=ir?ir.prototype:void 0,He=be?be.valueOf:void 0;function It(o){var d=-1,N=o==null?0:o.length;for(this.clear();++d<N;){var P=o[d];this.set(P[0],P[1])}}function lr(){this.__data__=Le?Le(null):{},this.size=0}function Ar(o){var d=this.has(o)&&delete this.__data__[o];return this.size-=d?1:0,d}function je(o){var d=this.__data__;if(Le){var N=d[o];return N===r?void 0:N}return Ct.call(d,o)?d[o]:void 0}function Ce(o){var d=this.__data__;return Le?d[o]!==void 0:Ct.call(d,o)}function dr(o,d){var N=this.__data__;return this.size+=this.has(o)?0:1,N[o]=Le&&d===void 0?r:d,this}It.prototype.clear=lr,It.prototype.delete=Ar,It.prototype.get=je,It.prototype.has=Ce,It.prototype.set=dr;function kt(o){var d=-1,N=o==null?0:o.length;for(this.clear();++d<N;){var P=o[d];this.set(P[0],P[1])}}function wr(){this.__data__=[],this.size=0}function ze(o){var d=this.__data__,N=ye(d,o);if(N<0)return!1;var P=d.length-1;return N==P?d.pop():me.call(d,N,1),--this.size,!0}function qe(o){var d=this.__data__,N=ye(d,o);return N<0?void 0:d[N][1]}function Nr(o){return ye(this.__data__,o)>-1}function q(o,d){var N=this.__data__,P=ye(N,o);return P<0?(++this.size,N.push([o,d])):N[P][1]=d,this}kt.prototype.clear=wr,kt.prototype.delete=ze,kt.prototype.get=qe,kt.prototype.has=Nr,kt.prototype.set=q;function k(o){var d=-1,N=o==null?0:o.length;for(this.clear();++d<N;){var P=o[d];this.set(P[0],P[1])}}function H(){this.size=0,this.__data__={hash:new It,map:new(le||kt),string:new It}}function J(o){var d=fe(this,o).delete(o);return this.size-=d?1:0,d}function At(o){return fe(this,o).get(o)}function mt(o){return fe(this,o).has(o)}function O(o,d){var N=fe(this,o),P=N.size;return N.set(o,d),this.size+=N.size==P?0:1,this}k.prototype.clear=H,k.prototype.delete=J,k.prototype.get=At,k.prototype.has=mt,k.prototype.set=O;function j(o){var d=-1,N=o==null?0:o.length;for(this.__data__=new k;++d<N;)this.add(o[d])}function G(o){return this.__data__.set(o,r),this}function X(o){return this.__data__.has(o)}j.prototype.add=j.prototype.push=G,j.prototype.has=X;function ht(o){var d=this.__data__=new kt(o);this.size=d.size}function Nt(){this.__data__=new kt,this.size=0}function Mt(o){var d=this.__data__,N=d.delete(o);return this.size=d.size,N}function vt(o){return this.__data__.get(o)}function Ft(o){return this.__data__.has(o)}function jt(o,d){var N=this.__data__;if(N instanceof kt){var P=N.__data__;if(!le||P.length<e-1)return P.push([o,d]),this.size=++N.size,this;N=this.__data__=new k(P)}return N.set(o,d),this.size=N.size,this}ht.prototype.clear=Nt,ht.prototype.delete=Mt,ht.prototype.get=vt,ht.prototype.has=Ft,ht.prototype.set=jt;function Re(o,d){var N=Yr(o),P=!N&&kn(o),yt=!N&&!P&&Qr(o),at=!N&&!P&&!yt&&Bn(o),Ot=N||P||yt||at,xt=Ot?ee(o.length,String):[],te=xt.length;for(var qt in o)Ct.call(o,qt)&&!(Ot&&(qt=="length"||yt&&(qt=="offset"||qt=="parent")||at&&(qt=="buffer"||qt=="byteLength"||qt=="byteOffset")||Dr(qt,te)))&&xt.push(qt);return xt}function ye(o,d){for(var N=o.length;N--;)if(In(o[N][0],d))return N;return-1}function Ie(o,d,N){var P=d(o);return Yr(o)?P:Zt(P,N(o))}function ot(o){return o==null?o===void 0?K:w:re&&re in Object(o)?se(o):pr(o)}function Tt(o){return cr(o)&&ot(o)==l}function Pt(o,d,N,P,yt){return o===d?!0:o==null||d==null||!cr(o)&&!cr(d)?o!==o&&d!==d:bt(o,d,N,P,Pt,yt)}function bt(o,d,N,P,yt,at){var Ot=Yr(o),xt=Yr(d),te=Ot?c:Te(o),qt=xt?c:Te(d);te=te==l?b:te,qt=qt==l?b:qt;var _e=te==b,ke=qt==b,ie=te==qt;if(ie&&Qr(o)){if(!Qr(d))return!1;Ot=!0,_e=!1}if(ie&&!_e)return at||(at=new ht),Ot||Bn(o)?Gt(o,d,N,P,yt,at):$t(o,d,te,N,P,yt,at);if(!(N&s)){var Ee=_e&&Ct.call(o,"__wrapped__"),pe=ke&&Ct.call(d,"__wrapped__");if(Ee||pe){var Sr=Ee?o.value():o,gr=pe?d.value():d;return at||(at=new ht),yt(Sr,gr,N,P,at)}}return ie?(at||(at=new ht),Ne(o,d,N,P,yt,at)):!1}function Et(o){if(!jn(o)||xr(o))return!1;var d=Mn(o)?Br:V;return d.test(Jt(o))}function we(o){return cr(o)&&dn(o.length)&&!!Y[ot(o)]}function _t(o){if(!Xr(o))return Yt(o);var d=[];for(var N in Object(o))Ct.call(o,N)&&N!="constructor"&&d.push(N);return d}function Gt(o,d,N,P,yt,at){var Ot=N&s,xt=o.length,te=d.length;if(xt!=te&&!(Ot&&te>xt))return!1;var qt=at.get(o);if(qt&&at.get(d))return qt==d;var _e=-1,ke=!0,ie=N&i?new j:void 0;for(at.set(o,d),at.set(d,o);++_e<xt;){var Ee=o[_e],pe=d[_e];if(P)var Sr=Ot?P(pe,Ee,_e,d,o,at):P(Ee,pe,_e,o,d,at);if(Sr!==void 0){if(Sr)continue;ke=!1;break}if(ie){if(!ue(d,function(gr,Pr){if(!zt(ie,Pr)&&(Ee===gr||yt(Ee,gr,N,P,at)))return ie.push(Pr)})){ke=!1;break}}else if(!(Ee===pe||yt(Ee,pe,N,P,at))){ke=!1;break}}return at.delete(o),at.delete(d),ke}function $t(o,d,N,P,yt,at,Ot){switch(N){case B:if(o.byteLength!=d.byteLength||o.byteOffset!=d.byteOffset)return!1;o=o.buffer,d=d.buffer;case v:return!(o.byteLength!=d.byteLength||!at(new Er(o),new Er(d)));case p:case m:case L:return In(+o,+d);case f:return o.name==d.name&&o.message==d.message;case A:case M:return o==d+"";case x:var xt=Vt;case T:var te=P&s;if(xt||(xt=wt),o.size!=d.size&&!te)return!1;var qt=Ot.get(o);if(qt)return qt==d;P|=i,Ot.set(o,d);var _e=Gt(xt(o),xt(d),P,yt,at,Ot);return Ot.delete(o),_e;case F:if(He)return He.call(o)==He.call(d)}return!1}function Ne(o,d,N,P,yt,at){var Ot=N&s,xt=ve(o),te=xt.length,qt=ve(d),_e=qt.length;if(te!=_e&&!Ot)return!1;for(var ke=te;ke--;){var ie=xt[ke];if(!(Ot?ie in d:Ct.call(d,ie)))return!1}var Ee=at.get(o);if(Ee&&at.get(d))return Ee==d;var pe=!0;at.set(o,d),at.set(d,o);for(var Sr=Ot;++ke<te;){ie=xt[ke];var gr=o[ie],Pr=d[ie];if(P)var fi=Ot?P(Pr,gr,ie,d,o,at):P(gr,Pr,ie,o,d,at);if(!(fi===void 0?gr===Pr||yt(gr,Pr,N,P,at):fi)){pe=!1;break}Sr||(Sr=ie=="constructor")}if(pe&&!Sr){var Dn=o.constructor,Pn=d.constructor;Dn!=Pn&&"constructor"in o&&"constructor"in d&&!(typeof Dn=="function"&&Dn instanceof Dn&&typeof Pn=="function"&&Pn instanceof Pn)&&(pe=!1)}return at.delete(o),at.delete(d),pe}function ve(o){return Ie(o,pn,Zr)}function fe(o,d){var N=o.__data__;return Tr(d)?N[typeof d=="string"?"string":"hash"]:N.map}function de(o,d){var N=oe(o,d);return Et(N)?N:void 0}function se(o){var d=Ct.call(o,re),N=o[re];try{o[re]=void 0;var P=!0}catch{}var yt=De.call(o);return P&&(d?o[re]=N:delete o[re]),yt}var Zr=ae?function(o){return o==null?[]:(o=Object(o),St(ae(o),function(d){return Pe.call(o,d)}))}:ds,Te=ot;($e&&Te(new $e(new ArrayBuffer(1)))!=B||le&&Te(new le)!=x||Ue&&Te(Ue.resolve())!=h||Me&&Te(new Me)!=T||or&&Te(new or)!=W)&&(Te=function(o){var d=ot(o),N=d==b?o.constructor:void 0,P=N?Jt(N):"";if(P)switch(P){case ar:return B;case Qt:return x;case ce:return h;case he:return T;case Fe:return W}return d});function Dr(o,d){return d=d??a,!!d&&(typeof o=="number"||ft.test(o))&&o>-1&&o%1==0&&o<d}function Tr(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function xr(o){return!!nr&&nr in o}function Xr(o){var d=o&&o.constructor,N=typeof d=="function"&&d.prototype||Rt;return o===N}function pr(o){return De.call(o)}function Jt(o){if(o!=null){try{return Wt.call(o)}catch{}try{return o+""}catch{}}return""}function In(o,d){return o===d||o!==o&&d!==d}var kn=Tt((function(){return arguments})())?Tt:function(o){return cr(o)&&Ct.call(o,"callee")&&!Pe.call(o,"callee")},Yr=Array.isArray;function fn(o){return o!=null&&dn(o.length)&&!Mn(o)}var Qr=ne||ps;function fs(o,d){return Pt(o,d)}function Mn(o){if(!jn(o))return!1;var d=ot(o);return d==g||d==_||d==u||d==y}function dn(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=a}function jn(o){var d=typeof o;return o!=null&&(d=="object"||d=="function")}function cr(o){return o!=null&&typeof o=="object"}var Bn=gt?Xt(gt):we;function pn(o){return fn(o)?Re(o):_t(o)}function ds(){return[]}function ps(){return!1}n.exports=fs})(yn,yn.exports)),yn.exports}var Fn={},Ki;function lf(){if(Ki)return Fn;Ki=1,Object.defineProperty(Fn,"__esModule",{value:!0});const n=ta(),t=ea();var e;return(function(r){function s(c={},u={},p=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let m=n(u);p||(m=Object.keys(m).reduce((f,g)=>(m[g]!=null&&(f[g]=m[g]),f),{}));for(const f in c)c[f]!==void 0&&u[f]===void 0&&(m[f]=c[f]);return Object.keys(m).length>0?m:void 0}r.compose=s;function i(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const p=Object.keys(c).concat(Object.keys(u)).reduce((m,f)=>(t(c[f],u[f])||(m[f]=u[f]===void 0?null:u[f]),m),{});return Object.keys(p).length>0?p:void 0}r.diff=i;function a(c={},u={}){c=c||{};const p=Object.keys(u).reduce((m,f)=>
1(u[f]!==c[f]&&c[f]!==void 0&&(m[f]=u[f]),m),{});return Object.keys(c).reduce((m,f)=>(c[f]!==u[f]&&u[f]===void 0&&(m[f]=null),m),p)}r.invert=a;function l(c,u,p=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!p)return u;const m=Object.keys(u).reduce((f,g)=>(c[g]===void 0&&(f[g]=u[g]),f),{});return Object.keys(m).length>0?m:void 0}r.transform=l})(e||(e={})),Fn.default=e,Fn}var Hn={},Wi;function ra(){if(Wi)return Hn;Wi=1,Object.defineProperty(Hn,"__esModule",{value:!0});var n;return(function(t){function e(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}t.length=e})(n||(n={})),Hn.default=n,Hn}var zn={},Zi;function cf(){if(Zi)return zn;Zi=1,Object.defineProperty(zn,"__esModule",{value:!0});const n=ra();class t{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const s=this.ops[this.index];if(s){const i=this.offset,a=n.default.length(s);if(r>=a-i?(r=a-i,this.index+=1,this.offset=0):this.offset+=r,typeof s.delete=="number")return{delete:r};{const l={};return s.attributes&&(l.attributes=s.attributes),typeof s.retain=="number"?l.retain=r:typeof s.retain=="object"&&s.retain!==null?l.retain=s.retain:typeof s.insert=="string"?l.insert=s.insert.substr(i,r):l.insert=s.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,s=this.index,i=this.next(),a=this.ops.slice(this.index);return this.offset=r,this.index=s,[i].concat(a)}}else return[]}}return zn.default=t,zn}var Xi;function uf(){return Xi||(Xi=1,(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const e=af(),r=ta(),s=ea(),i=lf();t.AttributeMap=i.default;const a=ra();t.Op=a.default;const l=cf();t.OpIterator=l.default;const c="\0",u=(m,f)=>{if(typeof m!="object"||m===null)throw new Error(`cannot retain a ${typeof m}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const g=Object.keys(m)[0];if(!g||g!==Object.keys(f)[0])throw new Error(`embed types not matched: ${g} != ${Object.keys(f)[0]}`);return[g,m[g],f[g]]};class p{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,g){this.handlers[f]=g}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const g=this.handlers[f];if(!g)throw new Error(`no handlers for embed type "${f}"`);return g}insert(f,g){const _={};return typeof f=="string"&&f.length===0?this:(_.insert=f,g!=null&&typeof g=="object"&&Object.keys(g).length>0&&(_.attributes=g),this.push(_))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,g){if(typeof f=="number"&&f<=0)return this;const _={retain:f};return g!=null&&typeof g=="object"&&Object.keys(g).length>0&&(_.attributes=g),this.push(_)}push(f){let g=this.ops.length,_=this.ops[g-1];if(f=r(f),typeof _=="object"){if(typeof f.delete=="number"&&typeof _.delete=="number")return this.ops[g-1]={delete:_.delete+f.delete},this;if(typeof _.delete=="number"&&f.insert!=null&&(g-=1,_=this.ops[g-1],typeof _!="object"))return this.ops.unshift(f),this;if(s(f.attributes,_.attributes)){if(typeof f.insert=="string"&&typeof _.insert=="string")return this.ops[g-1]={insert:_.insert+f.insert},typeof f.attributes=="object"&&(this.ops[g-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof _.retain=="number")return this.ops[g-1]={retain:_.retain+f.retain},typeof f.attributes=="object"&&(this.ops[g-1].attributes=f.attributes),this}}return g===this.ops.length?this.ops.push(f):this.ops.splice(g,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const g=[],_=[];return this.forEach(x=>{(f(x)?g:_).push(x)}),[g,_]}reduce(f,g){return this.ops.reduce(f,g)}changeLength(){return this.reduce((f,g)=>g.insert?f+a.default.length(g):g.delete?f-g.delete:f,0)}length(){return this.reduce((f,g)=>f+a.default.length(g),0)}slice(f=0,g=1/0){const _=[],x=new l.default(this.ops);let L=0;for(;L<g&&x.hasNext();){let w;L<f?w=x.next(f-L):(w=x.next(g-L),_.push(w)),L+=a.default.length(w)}return new p(_)}compose(f){const g=new l.default(this.ops),_=new l.default(f.ops),x=[],L=_.peek();if(L!=null&&typeof L.retain=="number"&&L.attributes==null){let b=L.retain;for(;g.peekType()==="insert"&&g.peekLength()<=b;)b-=g.peekLength(),x.push(g.next());L.retain-b>0&&_.next(L.retain-b)}const w=new p(x);for(;g.hasNext()||_.hasNext();
1)if(_.peekType()==="insert")w.push(_.next());else if(g.peekType()==="delete")w.push(g.next());else{const b=Math.min(g.peekLength(),_.peekLength()),h=g.next(b),y=_.next(b);if(y.retain){const A={};if(typeof h.retain=="number")A.retain=typeof y.retain=="number"?b:y.retain;else if(typeof y.retain=="number")h.retain==null?A.insert=h.insert:A.retain=h.retain;else{const M=h.retain==null?"insert":"retain",[F,K,W]=u(h[M],y.retain),v=p.getHandler(F);A[M]={[F]:v.compose(K,W,M==="retain")}}const T=i.default.compose(h.attributes,y.attributes,typeof h.retain=="number");if(T&&(A.attributes=T),w.push(A),!_.hasNext()&&s(w.ops[w.ops.length-1],A)){const M=new p(g.rest());return w.concat(M).chop()}}else typeof y.delete=="number"&&(typeof h.retain=="number"||typeof h.retain=="object"&&h.retain!==null)&&w.push(y)}return w.chop()}concat(f){const g=new p(this.ops.slice());return f.ops.length>0&&(g.push(f.ops[0]),g.ops=g.ops.concat(f.ops.slice(1))),g}diff(f,g){if(this.ops===f.ops)return new p;const _=[this,f].map(h=>h.map(y=>{if(y.insert!=null)return typeof y.insert=="string"?y.insert:c;const A=h===f?"on":"with";throw new Error("diff() called "+A+" non-document")}).join("")),x=new p,L=e(_[0],_[1],g,!0),w=new l.default(this.ops),b=new l.default(f.ops);return L.forEach(h=>{let y=h[1].length;for(;y>0;){let A=0;switch(h[0]){case e.INSERT:A=Math.min(b.peekLength(),y),x.push(b.next(A));break;case e.DELETE:A=Math.min(y,w.peekLength()),w.next(A),x.delete(A);break;case e.EQUAL:A=Math.min(w.peekLength(),b.peekLength(),y);const T=w.next(A),M=b.next(A);s(T.insert,M.insert)?x.retain(A,i.default.diff(T.attributes,M.attributes)):x.push(M).delete(A);break}y-=A}}),x.chop()}eachLine(f,g=` 2`){const _=new l.default(this.ops);let x=new p,L=0;for(;_.hasNext();){if(_.peekType()!=="insert")return;const w=_.peek(),b=a.default.length(w)-_.peekLength(),h=typeof w.insert=="string"?w.insert.indexOf(g,b)-b:-1;if(h<0)x.push(_.next());else if(h>0)x.push(_.next(h));else{if(f(x,_.next(1).attributes||{},L)===!1)return;L+=1,x=new p}}x.length()>0&&f(x,{},L)}invert(f){const g=new p;return this.reduce((_,x)=>{if(x.insert)g.delete(a.default.length(x));else{if(typeof x.retain=="number"&&x.attributes==null)return g.retain(x.retain),_+x.retain;if(x.delete||typeof x.retain=="number"){const L=x.delete||x.retain;return f.slice(_,_+L).forEach(b=>{x.delete?g.push(b):x.retain&&x.attributes&&g.retain(a.default.length(b),i.default.invert(x.attributes,b.attributes))}),_+L}else if(typeof x.retain=="object"&&x.retain!==null){const L=f.slice(_,_+1),w=new l.default(L.ops).next(),[b,h,y]=u(x.retain,w.insert),A=p.getHandler(b);return g.retain({[b]:A.invert(h,y)},i.default.invert(x.attributes,w.attributes)),_+1}}return _},0),g.chop()}transform(f,g=!1){if(g=!!g,typeof f=="number")return this.transformPosition(f,g);const _=f,x=new l.default(this.ops),L=new l.default(_.ops),w=new p;for(;x.hasNext()||L.hasNext();)if(x.peekType()==="insert"&&(g||L.peekType()!=="insert"))w.retain(a.default.length(x.next()));else if(L.peekType()==="insert")w.push(L.next());else{const b=Math.min(x.peekLength(),L.peekLength()),h=x.next(b),y=L.next(b);if(h.delete)continue;if(y.delete)w.push(y);else{const A=h.retain,T=y.retain;let M=typeof T=="object"&&T!==null?T:b;if(typeof A=="object"&&A!==null&&typeof T=="object"&&T!==null){const F=Object.keys(A)[0];if(F===Object.keys(T)[0]){const K=p.getHandler(F);K&&(M={[F]:K.transform(A[F],T[F],g)})}}w.retain(M,i.default.transform(h.attributes,y.attributes,g))}}return w.chop()}transformPosition(f,g=!1){g=!!g;const _=new l.default(this.ops);let x=0;for(;_.hasNext()&&x<=f;){const L=_.peekLength(),w=_.peekType();if(_.next(),w==="delete"){f-=Math.min(L,f-x);continue}else w==="insert"&&(x<f||!g)&&(f+=L);x+=L}return f}}p.Op=a.default,p.OpIterator=l.default,p.AttributeMap=i.default,p.handlers={},t.default=p,n.exports=p,n.exports.default=p})(Un,Un.exports)),Un.exports}var Se=uf();const rt=Ao(Se);class er extends Be{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}er.blotName="break";er.tagName="BR";let Je=class extends es{};const hf={"&":"&","<":"<",">":">",'"':""","'":"'"};function cs(n){return n.replace(/[&<>"']/g,t=>hf[t])}class xe extends Js{static allowedChildren=[xe,er,Be,Je];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const r=xe.order.indexOf(t),s=xe.order.indexOf(e);return r>=0||s>=0?r-s:t===e?0:t<e?-1:1}formatAt(t,e,r,s){if(xe.compare(this.statics.blotName,r)<0&&this.scroll.query(r,it.BLOT)){const i=this.isolate(t,e);s&&i.wrap(r,s)}else super.formatAt(t,e,r,s)}optimize(t){if(super.optimize(t),this.parent instanceof xe&&xe.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}const Yi=1;class ge extends Tn{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=na(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,r,s){e<=0||(this.scroll.query(r,it.BLOCK)?t+e===this.length()&&this.format(r,s):super.formatAt(t,Math.min(e,this.length()-t-1),r,s),this.cache={})}insertAt(t,e,r){if(r!=null){super.insertAt(t,e,r),this.cache={};return}if(e.length===0)return;const s=e.split(` 3`),i=s.shift();i.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),t+i.length)}insertBefore(t,e){const{head:r}=this.children;super.insertBefore(t,e),r instanceof er&&r.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Yi),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e&&(t===0||t>=this.length()-Yi)){const s=this.clone();return t===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const r=super.split(t,e);return this.cache={},r}}ge.blotName="block";ge.tagName="P";ge.defaultChild=er;ge.allowedChildren=[er,xe,Be,Je];class Ke extends Be{attach(){super.attach(),this.attributes=new as(this.domNode)}delta(){return new rt().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const r=this.scroll.query(t,it.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,e)}formatAt(t,e,r,s){this.format(r,s)}insertAt(t,e,r){if(r!=null){super.insertAt(t,e,r);return}const s=e.split(` 4`),i=s.pop(),a=s.map(c=>{const u=this.scroll.create(ge.blotName);return u.insertAt(0,c),u}),l=this.split(t);a.forEach(c=>{this.parent.insertBefore(c,l)}),i&&this.parent.insertBefore(this.scroll.create("text",i),l)}}Ke.scope=it.BLOCK_BLOT;function na(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.descendants(Ae).reduce((e,r)=>r.length()===0?e:e.insert(r.value(),Ge(r,{},t)),new rt).insert(` 5`,Ge(n))}function Ge(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n==null||("formats"in n&&typeof n.formats=="function"&&(t={...t,...n.formats()},e&&delete t["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?t:Ge(n.parent,t,e)}class Xe extends Be{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(t,e,r){super(t,e),this.selection=r,this.textNode=document.createTextNode(Xe.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let r=this,s=0;for(;r!=null&&r.statics.scope!==it.BLOCK_BLOT;)s+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Xe.CONTENTS.length,r.optimize(),r.formatAt(s,Xe.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof Je?this.prev:null,r=e?e.length():0,s=this.next instanceof Je?this.next:null,i=s?s.text:"",{textNode:a}=this,l=a.data.split(Xe.CONTENTS).join("");a.data=Xe.CONTENTS;let c;if(e)c=e,(l||s)&&(e.insertAt(e.length(),l+i),s&&s.remove());else if(s)c=s,s.insertAt(0,l);else{const u=document.createTextNode(l);c=this.scroll.create(u),this.parent.insertBefore(c,this)}if(this.remove(),t){const u=(f,g)=>e&&f===e.domNode?g:f===a?r+g-1:s&&f===s.domNode?r+l.length+g:null,p=u(t.start.node,t.start.offset),m=u(t.end.node,t.end.offset);if(p!==null&&m!==null)return{startNode:c.domNode,startOffset:p,endNode:c.domNode,endOffset:m}}return null}update(t,e){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore(
vendor: 3,149 bytes, line 5
5);r&&(e.range=r)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if(e.domNode.tagName==="A"){this.savedLength=Xe.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}var _s={exports:{}},Qi;function ff(){return Qi||(Qi=1,(function(n){var t=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function s(c,u,p){this.fn=c,this.context=u,this.once=p||!1}function i(c,u,p,m,f){if(typeof p!="function")throw new TypeError("The listener must be a function");var g=new s(p,m||c,f),_=e?e+u:u;return c._events[_]?c._events[_].fn?c._events[_]=[c._events[_],g]:c._events[_].push(g):(c._events[_]=g,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],p,m;if(this._eventsCount===0)return u;for(m in p=this._events)t.call(p,m)&&u.push(e?m.slice(1):m);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(p)):u},l.prototype.listeners=function(u){var p=e?e+u:u,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var f=0,g=m.length,_=new Array(g);f<g;f++)_[f]=m[f].fn;return _},l.prototype.listenerCount=function(u){var p=e?e+u:u,m=this._events[p];return m?m.fn?1:m.length:0},l.prototype.emit=function(u,p,m,f,g,_){var x=e?e+u:u;if(!this._events[x])return!1;var L=this._events[x],w=arguments.length,b,h;if(L.fn){switch(L.once&&this.removeListener(u,L.fn,void 0,!0),w){case 1:return L.fn.call(L.context),!0;case 2:return L.fn.call(L.context,p),!0;case 3:return L.fn.call(L.context,p,m),!0;case 4:return L.fn.call(L.context,p,m,f),!0;case 5:return L.fn.call(L.context,p,m,f,g),!0;case 6:return L.fn.call(L.context,p,m,f,g,_),!0}for(h=1,b=new Array(w-1);h<w;h++)b[h-1]=arguments[h];L.fn.apply(L.context,b)}else{var y=L.length,A;for(h=0;h<y;h++)switch(L[h].once&&this.removeListener(u,L[h].fn,void 0,!0),w){case 1:L[h].fn.call(L[h].context);break;case 2:L[h].fn.call(L[h].context,p);break;case 3:L[h].fn.call(L[h].context,p,m);break;case 4:L[h].fn.call(L[h].context,p,m,f);break;default:if(!b)for(A=1,b=new Array(w-1);A<w;A++)b[A-1]=arguments[A];L[h].fn.apply(L[h].context,b)}}return!0},l.prototype.on=function(u,p,m){return i(this,u,p,m,!1)},l.prototype.once=function(u,p,m){return i(this,u,p,m,!0)},l.prototype.removeListener=function(u,p,m,f){var g=e?e+u:u;if(!this._events[g])return this;if(!p)return a(this,g),this;var _=this._events[g];if(_.fn)_.fn===p&&(!f||_.once)&&(!m||_.context===m)&&a(this,g);else{for(var x=0,L=[],w=_.length;x<w;x++)(_[x].fn!==p||f&&!_[x].once||m&&_[x].context!==m)&&L.push(_[x]);L.length?this._events[g]=L.length===1?L[0]:L:a(this,g)}return this},l.prototype.removeAllListeners=function(u){var p;return u?(p=e?e+u:u,this._events[p]&&a(this,p)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,n.exports=l})(_s)),_s.exports}var df=ff();const pf=Ao(df),Fs=new WeakMap,Hs=["error","warn","log","info"];let zs="warn";
5function sa(n){if(zs&&Hs.indexOf(n)<=Hs.indexOf(zs)){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];console[n](...e)}}function _r(n){return Hs.reduce((t,e)=>(t[e]=sa.bind(console,e,n),t),{})}_r.level=n=>{zs=n};sa.level=_r.level;const Es=_r("quill:events"),gf=["selectionchange","mousedown","mouseup","click"];gf.forEach(n=>{document.addEventListener(n,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=Fs.get(s);i&&i.emitter&&i.emitter.handleDOM(...e)})})});class et extends pf{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",Es.error)}emit(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Es.log.call(Es,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),s=1;s<e;s++)r[s-1]=arguments[s];(this.domListeners[t.type]||[]).forEach(i=>{let{node:a,handler:l}=i;(t.target===a||a.contains(t.target))&&l(t,...r)})}listenDOM(t,e,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:r})}}const As=_r("quill:selection");class kr{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=e}}class mf{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new kr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,et.sources.USER),1)}),this.emitter.on(et.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(et.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const a=i.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(a?et.sources.SILENT:s)}catch{}})}),this.emitter.on(et.events.SCROLL_OPTIMIZE,(r,s)=>{if(s.range){const{startNode:i,startOffset:a,endNode:l,endOffset:c}=s.range;this.setNativeRange(i,a,l,c),this.update(et.sources.SILENT)}}),this.update(et.sources.SILENT)}handleComposition(){this.emitter.on(et.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(et.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(et.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(t,it.BLOCK))){if(r.start.node!==this.cursor.textNode){const s=this.scroll.find(r.start.node,!1);if(s==null)return;if(s instanceof Ae){const i=s.split(r.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();t=Math.min(t,r-1),e=Math.min(t+e,r-1)-t;let s,[i,a]=this.scroll.leaf(t);if(i==null)return null;if(e>0&&a===i.length()){const[p]=this.scroll.leaf(t+1);if(p){const[m]=this.scroll.line(t),[f]=this.scroll.line(t+1);m===f&&(i=p,a=0)}}[s,a]=i.position(a,!0);const l=document.createRange();if(e>0)return l.setStart(s,a),[i,a]=this.scroll.leaf(t+e),i==null?null:([s,a]=i.position(a,!0),l.setEnd(s,a),l.getBoundingClientRect());let c="left",u;if(s instanceof Text){if(!s.data.length)return null;a<s.data.length?(l.setStart(s,a),l.setEnd(s,a+1)):(l.setStart(s,a-1),l.setEnd(s,a),c="right"),u=l.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),a>0&&(c="right")}return{bottom:u.top+u.height,height:u.height,left:u[c],right:u[c],top:u.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(e==null)return null;const r=this.normalizeNative(e);return As.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;
5if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();return e==null?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&ws(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const r=e.map(a=>{const[l,c]=a,u=this.scroll.find(l,!0),p=u.offset(this.scroll);return c===0?p:u instanceof Ae?p+u.index(l,c):p+u.length()}),s=Math.min(Math.max(...r),this.scroll.length()-1),i=Math.min(s,...r);return new kr(i,s-i)}normalizeNative(t){if(!ws(this.root,t.startContainer)||!t.collapsed&&!ws(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(r=>{let{node:s,offset:i}=r;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;r.node=s,r.offset=i}),e}rangeToNative(t){const e=this.scroll.length(),r=(s,i)=>{s=Math.min(e-1,s);const[a,l]=this.scroll.leaf(s);return a?a.position(l,i):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(As.info("setNativeRange",t,e,r,s),t!=null&&(this.root.parentNode==null||t.parentNode==null||r.parentNode==null))return;const a=document.getSelection();if(a!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:l}=this.getNativeRange()||{};if(l==null||i||t!==l.startContainer||e!==l.startOffset||r!==l.endContainer||s!==l.endOffset){t instanceof Element&&t.tagName==="BR"&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&r.tagName==="BR"&&(s=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const c=document.createRange();c.setStart(t,e),c.setEnd(r,s),a.removeAllRanges(),a.addRange(c)}}else a.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:et.sources.API;if(typeof e=="string"&&(r=e,e=!1),As.info("setRange",t),t!=null){const s=this.rangeToNative(t);this.setNativeRange(...s,e)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:et.sources.USER;const e=this.lastRange,[r,s]=this.getRange();if(this.lastRange=r,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!Qs(e,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const i=[et.events.SELECTION_CHANGE,sn(this.lastRange),sn(e),t];this.emitter.emit(et.events.EDITOR_CHANGE,...i),t!==et.sources.SILENT&&this.emitter.emit(...i)}}}function ws(n,t){try{t.parentNode}catch{return!1}return n.contains(t)}const bf=/^[ -~]*$/;class yf{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const r=Ji(t),s=new rt;return _f(r.ops.slice()).reduce((a,l)=>{const c=Se.Op.length(l);let u=l.attributes||{},p=!1,m=!1;if(l.insert!=null){if(s.retain(c),typeof l.insert=="string"){const _=l.insert;m=!_.endsWith(` 6`)&&(e<=a||!!this.scroll.descendant(Ke,a)[0]),this.scroll.insertAt(a,_);const[x,L]=this.scroll.line(a);let w=qr({},Ge(x));if(x instanceof ge){const[b]=x.descendant(Ae,L);b&&(w=qr(w,Ge(b)))}u=Se.AttributeMap.diff(w,u)||{}}else if(typeof l.insert=="object"){const _=Object.keys(l.insert)[0];if(_==null)return a;const x=this.scroll.query(_,it.INLINE)!=null;if(x)(e<=a||this.scroll.descendant(Ke,a)[0])&&(m=!0);else if(a>0){const[L,w]=this.scroll.descendant(Ae,a-1);
6L instanceof Je?L.value()[w]!==` 7`&&(p=!0):L instanceof Be&&L.statics.scope===it.INLINE_BLOT&&(p=!0)}if(this.scroll.insertAt(a,_,l.insert[_]),x){const[L]=this.scroll.descendant(Ae,a);if(L){const w=qr({},Ge(L));u=Se.AttributeMap.diff(w,u)||{}}}}e+=c}else if(s.push(l),l.retain!==null&&typeof l.retain=="object"){const _=Object.keys(l.retain)[0];if(_==null)return a;this.scroll.updateEmbedAt(a,_,l.retain[_])}Object.keys(u).forEach(_=>{this.scroll.formatAt(a,c,_,u[_])});const f=p?1:0,g=m?1:0;return e+=f+g,s.retain(f),s.delete(g),a+c+f+g},0),s.reduce((a,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(a,l.delete),a):a+Se.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new rt().retain(t).delete(e))}formatLine(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(i=>{this.scroll.lines(t,Math.max(e,1)).forEach(a=>{a.format(i,r[i])})}),this.scroll.optimize();const s=new rt().retain(t).retain(e,sn(r));return this.update(s)}formatText(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(i=>{this.scroll.formatAt(t,e,i,r[i])});const s=new rt().retain(t).retain(e,sn(r));return this.update(s)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new rt)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],s=[];e===0?this.scroll.path(t).forEach(l=>{const[c]=l;c instanceof ge?r.push(c):c instanceof Ae&&s.push(c)}):(r=this.scroll.lines(t,e),s=this.scroll.descendants(Ae,t,e));const[i,a]=[r,s].map(l=>{const c=l.shift();if(c==null)return{};let u=Ge(c);for(;Object.keys(u).length>0;){const p=l.shift();if(p==null)return u;u=vf(Ge(p),u)}return u});return{...i,...a}}getHTML(t,e){const[r,s]=this.scroll.line(t);if(r){const i=r.length();return r.length()>=s+e&&!(s===0&&e===i)?xn(r,s,e,!0):xn(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,e){const r=Ji(e),s=new rt().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(s)}insertEmbed(t,e,r){return this.scroll.insertAt(t,e,r),this.update(new rt().retain(t).insert({[e]:r}))}insertText(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,` 8`).replace(/\r/g,` 9`),this.scroll.insertAt(t,e),Object.keys(r).forEach(s=>{this.scroll.formatAt(t,e.length,s,r[s])}),this.update(new rt().retain(t).insert(e,sn(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==ge.blotName)return!1;const e=t;return e.children.length>1?!1:e.children.head instanceof er}removeFormat(t,e){const r=this.getText(t,e),[s,i]=this.scroll.line(t+e);let a=0,l=new rt;s!=null&&(a=s.length()-i,l=s.delta().slice(i,i+a-1).insert(` 10`));const u=this.getContents(t,e+a).diff(new rt().insert(r).concat(l)),p=new rt().retain(t).concat(u);return this.applyDelta(p)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(bf)&&this.scroll.find(e[0].target)){const i=this.scroll.find(e[0].target),a=Ge(i),l=i.offset(this.scroll),c=e[0].oldValue.replace(Xe.CONTENTS,""),u=new rt().insert(c),p=new rt().insert(i.value()),m=r&&{oldRange:to(r.oldRange,-l),newRange:to(r.newRange,-l)};t=new rt().retain(l).concat(u.diff(p,m)).reduce((g,_)=>_.insert?g.insert(_.insert,a):g.push(_),new rt),this.delta=s.compose(t)}else this.delta=this.getDelta(),(!t||!Qs(s.compose(t),this.delta))&&(t=s.diff(this.delta,r));return t}}function nn(n,t,e){if(n.length===0){const[g]=Ns(e.pop());return t<=0?`</li></${g}>`:`</li></${g}>${nn([],t-1,e)}`}const[{child:r,offset:s,length:i,indent:a,type:l},...c]=n,[u,p]=Ns(l);if(a>t)return e.push(l),a===t+1?`<${u}><li${p}>${xn(r,s,i)}${nn(c,a,e)}`:`<${u}><li>${nn(n,t+1,e)}`;const m=e[e.length-1];if(a===t&&l===m)return`</li><li${p}>${xn(r,s,i)}${nn(c,a,e)}`;const[f]=Ns(e.pop());return`</li></${f}>${nn(n,t-1,e)}`}function xn(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in n&&typeof n.html=="function")return n.html(t,e);if(n instanceof Je)return cs(n.value().slice(t,t+e)).replaceAll(" "," ");if(n instanceof Qe){if(n.statics.blotName==="list-container"){const u=[];
10return n.children.forEachAt(t,e,(p,m,f)=>{const g="formats"in p&&typeof p.formats=="function"?p.formats():{};u.push({child:p,offset:m,length:f,indent:g.indent||0,type:g.list})}),nn(u,-1,[])}const s=[];if(n.children.forEachAt(t,e,(u,p,m)=>{s.push(xn(u,p,m))}),r||n.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:a}=n.domNode,[l,c]=i.split(`>${a}<`);return l==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${c}`:`${l}>${s.join("")}<${c}`}return n.domNode instanceof Element?n.domNode.outerHTML:""}function vf(n,t){return Object.keys(t).reduce((e,r)=>{if(n[r]==null)return e;const s=t[r];return s===n[r]?e[r]=s:Array.isArray(s)?s.indexOf(n[r])<0?e[r]=s.concat([n[r]]):e[r]=s:e[r]=[s,n[r]],e},{})}function Ns(n){const t=n==="ordered"?"ol":"ul";switch(n){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Ji(n){return n.reduce((t,e)=>{if(typeof e.insert=="string"){const r=e.insert.replace(/\r\n/g,` 11`).replace(/\r/g,` 12`);return t.insert(r,e.attributes)}return t.push(e)},new rt)}function to(n,t){let{index:e,length:r}=n;return new kr(e+t,r)}function _f(n){const t=[];return n.forEach(e=>{typeof e.insert=="string"?e.insert.split(` 13`).forEach((s,i)=>
13{i&&t.push({insert:` 14`,attributes:e.attributes}),s&&t.push({insert:s,attributes:e.attributes})}):t.push(e)}),t}class rr{static DEFAULTS={};constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=e}}const Gn="\uFEFF";class ei extends Be{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Gn),this.rightGuard=document.createTextNode(Gn),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,r;const s=t.data.split(Gn).join("");if(t===this.leftGuard)if(this.prev instanceof Je){const i=this.prev.length();this.prev.insertAt(i,s),e={startNode:this.prev.domNode,startOffset:i+s.length}}else r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this),e={startNode:r,startOffset:s.length};else t===this.rightGuard&&(this.next instanceof Je?(this.next.insertAt(0,s),e={startNode:this.next.domNode,startOffset:s.length}):(r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this.next),e={startNode:r,startOffset:s.length}));return t.data=Gn,e}update(t,e){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const s=this.restore(r.target);s&&(e.range=s)}})}}class Ef{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof ei)&&(this.emitter.emit(et.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(et.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(et.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(et.events.COMPOSITION_END,t),this.isComposing=!1}}class hn{static DEFAULTS={modules:{}};static themes={default:hn};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}const Af=n=>n.parentElement||n.getRootNode().host||null,wf=n=>{const t=n.getBoundingClientRect(),e="offsetWidth"in n&&Math.abs(t.width)/n.offsetWidth||1,r="offsetHeight"in n&&Math.abs(t.height)/n.offsetHeight||1;return{top:t.top,right:t.left+n.clientWidth*e,bottom:t.top+n.clientHeight*r,left:t.left}},Vn=n=>{const t=parseInt(n,10);return Number.isNaN(t)?0:t},eo=(n,t,e,r,s,i)=>n<e&&t>r?0:n<e?-(e-n+s):t>r?t-n>r-e?n+s-e:t-r+i:0,Nf=(n,t)=>{const e=n.ownerDocument;let r=t,s=n;for(;s;){const i=s===e.body,a=i?{top:0,right:window.visualViewport?.width??e.documentElement.clientWidth,bottom:window.visualViewport?.height??e.documentElement.clientHeight,left:0}:wf(s),l=getComputedStyle(s),c=eo(r.left,r.right,a.left,a.right,Vn(l.scrollPaddingLeft),Vn(l.scrollPaddingRight)),u=eo(r.top,r.bottom,a.top,a.bottom,Vn(l.scrollPaddingTop),Vn(l.scrollPaddingBottom));if(c||u)if(i)e.defaultView?.scrollBy(c,u);else{const{scrollLeft:p,scrollTop:m}=s;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);const f=s.scrollLeft-p,g=s.scrollTop-m;r={left:r.left-f,top:r.top-g,right:r.right-f,bottom:r.bottom-g}}s=i||l.position==="fixed"?null:Af(s)}},Tf=100,xf=["block","break","cursor","inline","scroll","text"],Sf=(n,t,e)=>{const r=new cn;return xf.forEach(s=>{const i=t.query(s);i&&r.register(i)}),n.forEach(s=>{let i=t.query(s);i||e.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;i;)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,a+=1,a>Tf){e.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),r},an=_r("quill"),Kn=new cn;Qe.uiClass="ql-ui";class ${static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Kn,theme:"default"};static events=et.events;static sources=et.sources;static version="2.0.3";static imports={delta:rt,parchment:Jo,"core/module":rr,"core/theme":hn};static debug(t){t===!0&&(t="log"),_r.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Fs.get(t)||Kn.find(t,e)}static import(t){return this.imports[t]==null&&an.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,e):Object.keys(t).forEach(s=>{this.register(s,t[s],e)})}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&an.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!="boolean"&&e.blotName!=="abstract"&&Kn.register(e),typeof e.register=="function"&&e.register(Kn)}}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Of(t,e),this.container=this.options.container,this.container==null){an.error("Invalid Quill container",t);return}this.options.debug&&$.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Fs.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new et;const s=ti.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);
vendor: 5,536 bytes, lines 14-15
14if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new yf(this.scroll),this.selection=new mf(this.scroll,this.emitter),this.composition=new Ef(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.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(et.events.EDITOR_CHANGE,a=>{a===et.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(et.events.SCROLL_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),p=c&&u?{oldRange:c,newRange:u}:void 0;We.call(this,()=>this.editor.update(null,l,p),a)}),this.emitter.on(et.events.SCROLL_EMBED_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),p=c&&u?{oldRange:c,newRange:u}:void 0;We.call(this,()=>{const m=new rt().retain(a.offset(this)).retain({[a.statics.blotName]:l});return this.editor.update(m,[],p)},$.sources.USER)}),r){const a=this.clipboard.convert({html:`${r}<p><br></p>`,text:` 15`});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,r){return[t,e,,r]=mr(t,e,r),We.call(this,()=>this.editor.deleteText(t,e),r,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:et.sources.API;return We.call(this,()=>{const s=this.getSelection(!0);let i=new rt;if(s==null)return i;if(this.scroll.query(t,it.BLOCK))i=this.editor.formatLine(s.index,s.length,{[t]:e});else{if(s.length===0)return this.selection.format(t,e),i;i=this.editor.formatText(s.index,s.length,{[t]:e})}return this.setSelection(s,et.sources.SILENT),i},r)}formatLine(t,e,r,s,i){let a;return[t,e,a,i]=mr(t,e,r,s,i),We.call(this,()=>this.editor.formatLine(t,e,a),i,t,0)}formatText(t,e,r,s,i){let a;return[t,e,a,i]=mr(t,e,r,s,i),We.call(this,()=>this.editor.formatText(t,e,a),i,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,e):r=this.selection.getBounds(t.index,t.length),!r)return null;const s=this.container.getBoundingClientRect();return{bottom:r.bottom-s.top,height:r.height,left:r.left-s.left,right:r.right-s.left,top:r.top-s.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=mr(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=mr(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=mr(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$.sources.API;return We.call(this,()=>this.editor.insertEmbed(t,e,r),s,t)}insertText(t,e,r,s,i){let a;return[t,,a,i]=mr(t,0,r,s,i),We.call(this,()=>this.editor.insertText(t,e,a),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,r){return[t,e,,r]=mr(t,e,r),We.call(this,()=>this.editor.removeFormat(t,e),r,t)}scrollRectIntoView(t){Nf(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.
15index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et.sources.API;return We.call(this,()=>{t=new rt(t);const r=this.getLength(),s=this.editor.deleteText(0,r),i=this.editor.insertContents(0,t),a=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(a)},e)}setSelection(t,e,r){t==null?this.selection.setRange(null,e||$.sources.API):([t,e,,r]=mr(t,e,r),this.selection.setRange(new kr(Math.max(0,t),e),r),r!==et.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et.sources.API;const r=new rt().insert(t);return this.setContents(r,e)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:et.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et.sources.API;return We.call(this,()=>(t=new rt(t),this.editor.applyDelta(t)),e,!0)}}function ro(n){return typeof n=="string"?document.querySelector(n):n}function Ts(n){return Object.entries(n??{}).reduce((t,e)=>{let[r,s]=e;return{...t,[r]:s===!0?{}:s}},{})}function no(n){return Object.fromEntries(Object.entries(n).filter(t=>t[1]!==void 0))}function Of(n,t){const e=ro(n);if(!e)throw new Error("Invalid Quill container");const s=!t.theme||t.theme===$.DEFAULTS.theme?hn:$.import(`themes/${t.theme}`);if(!s)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:i,...a}=$.DEFAULTS,{modules:l,...c}=s.DEFAULTS;let u=Ts(t.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});const p=qr({},Ts(i),Ts(l),u),m={...a,...no(c),...no(t)};let f=t.registry;return f?t.formats&&an.warn('Ignoring "formats" option because "registry" is specified'):f=t.formats?Sf(t.formats,m.registry,an):m.registry,{...m,registry:f,container:e,theme:s,modules:Object.entries(p).reduce((g,_)=>{let[x,L]=_;if(!L)return g;const w=$.import(`modules/${x}`);return w==null?(an.error(`Cannot load ${x} module. Are you sure you registered it?`),g):{...g,[x]:qr({},w.DEFAULTS||{},L)}},{}),bounds:ro(m.bounds)}}function We(n,t,e,r){if(!this.isEnabled()&&t===et.sources.USER&&!this.allowReadOnlyEdits)return new rt;let s=e==null?null:this.getSelection();const i=this.editor.delta,a=n();if(s!=null&&(e===!0&&(e=s.index),r==null?s=so(s,a,t):r!==0&&(s=so(s,e,r,t)),this.setSelection(s,et.sources.SILENT)),a.length()>0){const l=[et.events.TEXT_CHANGE,a,i,t];this.emitter.emit(et.events.EDITOR_CHANGE,...l),t!==et.sources.SILENT&&this.emitter.emit(...l)}return a}function mr(n,t,e,r,s){let i={};return typeof n.index=="number"&&typeof n.length=="number"?typeof t!="number"?(s=r,r=e,e=t,t=n.length,n=n.index):(t=n.length,n=n.index):typeof t!="number"&&(s=r,r=e,e=t,t=0),typeof e=="object"?(i=e,s=r):typeof e=="string"&&(r!=null?i[e]=r:s=e),s=s||et.sources.API,[n,t,i,s]}function so(n,t,e,r){const s=typeof e=="number"?e:0;if(n==null)return null;let i,a;return t&&typeof t.transformPosition=="function"?[i,a]=[n.index,n.index+n.length].map(l=>t.transformPosition(l,r!==et.sources.USER)):[i,a]=[n.index,n.index+n.length].map(l=>l<t||l===t&&r===et.sources.USER?l:s>=0?l+s:Math.max(t,l+s)),new kr(i,a-i)}class Vr extends ls{}function io(n){return n instanceof ge||n instanceof Ke}function oo(n){return typeof n.updateContent=="function"}class Lf extends ti{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=ge;static allowedChildren=[ge,Ke,Vr];constructor(t,e,r){let{emitter:s}
15=r;super(t,e),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(et.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(et.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(et.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[r,s]=this.line(t),[i]=this.line(t+e);if(super.deleteAt(t,e),i!=null&&r!==i&&s>0){if(r instanceof Ke||i instanceof Ke){this.optimize();return}const a=i.children.head instanceof er?null:i.children.head;r.moveChildren(i,a),r.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,r,s){super.formatAt(t,e,r,s),this.optimize()}insertAt(t,e,r){if(t>=this.length())if(r==null||this.scroll.query(e,it.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),r==null&&e.endsWith(` 16`)?s.insertAt(0,e.slice(0,-1),r):s.insertAt(0,e,r)}else{const s=this.scroll.create(e,r);this.appendChild(s)}else super.insertAt(t,e,r);this.optimize()}insertBefore(t,e){if(t.statics.scope===it.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,e)}else super.insertBefore(t,e)}insertContents(t,e){const r=this.deltaToRenderBlocks(e.concat(new rt().insert(` 17`))),s=r.pop();if(s==null)return;this.batchStart();const i=r.shift();if(i){const c=i.type==="block"&&(i.delta.length()===0||!this.descendant(Ke,t)[0]&&t<this.length()),u=i.type==="block"?i.delta:new rt().insert({[i.key]:i.value});xs(this,t,u);const p=i.type==="block"?1:0,m=t+u.length()+p;c&&this.insertAt(m-1,` 18`);const f=Ge(this.line(t)[0]),g=Se.AttributeMap.diff(f,i.attributes)||{};Object.keys(g).forEach(_=>{this.formatAt(m-1,1,_,g[_])}),t=m}let[a,l]=this.children.find(t);if(r.length&&(a&&(a=a.split(l),l=0),r.forEach(c=>{if(c.type==="block"){const u=this.createBlock(c.attributes,a||void 0);xs(u,0,c.delta)}else{const u=this.create(c.key,c.value);this.insertBefore(u,a||void 0),Object.keys(c.attributes).forEach(p=>{u.format(p,c.attributes[p])})}})),s.type==="block"&&s.delta.length()){const c=a?a.offset(a.scroll)+l:this.length();xs(this,c,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[r,s]=e;return r instanceof Ae?[r,s]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(io,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(s,i,a)=>{let l=[],c=a;return s.children.forEachAt(i,a,(u,p,m)=>{io(u)?l.push(u):u instanceof ls&&(l=l.concat(r(u,p,c))),c-=m}),l};return r(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(et.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let e=et.sources.USER;typeof t=="string"&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:s}=r;const i=this.find(s,!0);return i&&!oo(i)}),t.length>0&&this.emitter.emit(et.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(et.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,r){const[s]=this.descendant(i=>i instanceof Ke,t);s&&s.statics.blotName===e&&oo(s)&&s.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let r=new rt;return t.forEach(s=>{const i=s?.insert;if(i)if(typeof i=="string"){const a=i.split(` 19`);a.slice(0,-1).forEach(c=>{r.insert(c,s.attributes),e.push({type:"block",delta:r,attributes:s.attributes??{}}),r=new rt});const l=a[a.length-1];l&&r.insert(l,s.attributes)}else{const a=Object.keys(i)[0];if(!a)return;this.query(a,it.INLINE)?r.push(s):(r.length()&&e.push({type:"block",delta:r,attributes:{}}),r=new rt,e.push({type:"blockEmbed",key:a,value:i[a],attributes:s.attributes??{}}))}}),r.length()&&e.push({type:"block",delta:r,attributes:{}}),e}createBlock(t,e){let r;const s={};Object.entries(t).forEach(l=>{let[c,u]=l;this.query(c,it.BLOCK&it.BLOT)!=null?r=c:s[c]=u});const i=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(i,e||void 0);const a=i.length();
19return Object.entries(s).forEach(l=>{let[c,u]=l;i.formatAt(0,a,c,u)}),i}}function xs(n,t,e){e.reduce((r,s)=>{const i=Se.Op.length(s);let a=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const l=s.insert;n.insertAt(r,l);const[c]=n.descendant(Ae,r),u=Ge(c);a=Se.AttributeMap.diff(u,a)||{}}else if(typeof s.insert=="object"){const l=Object.keys(s.insert)[0];if(l==null)return r;if(n.insertAt(r,l,s.insert[l]),n.scroll.query(l,it.INLINE)!=null){const[u]=n.descendant(Ae,r),p=Ge(u);a=Se.AttributeMap.diff(p,a)||{}}}}return Object.keys(a).forEach(l=>{n.formatAt(r,i,l,a[l])}),r+i},t)}const ri={scope:it.BLOCK,whitelist:["right","center","justify"]},Cf=new hr("align","align",ri),ia=new tr("align","ql-align",ri),oa=new jr("align","text-align",ri);class aa extends jr{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):e}}const qf=new tr("color","ql-color",{scope:it.INLINE}),ni=new aa("color","color",{scope:it.INLINE}),Rf=new tr("background","ql-bg",{scope:it.INLINE}),si=new aa("background","background-color",{scope:it.INLINE});class Kr extends Vr{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(` 20`).slice(t,t+e)}html(t,e){return`<pre> 21${cs(this.code(t,e))} 22</pre>`}}class Oe extends ge{static TAB=" ";static register(){$.register(Kr)}}class ii extends xe{}ii.blotName="code";ii.tagName="CODE";Oe.blotName="code-block";Oe.className="ql-code-block";Oe.tagName="DIV";Kr.blotName="code-block-container";Kr.className="ql-code-block-container";Kr.tagName="DIV";Kr.allowedChildren=[Oe];Oe.allowedChildren=[Je,er,Xe];Oe.requiredContainer=Kr;const oi={scope:it.BLOCK,whitelist:["rtl"]},la=new hr("direction","dir",oi),ca=new tr("direction","ql-direction",oi),ua=new jr("direction","direction",oi),ha={scope:it.INLINE,whitelist:["serif","monospace"]},fa=new tr("font","ql-font",ha);class If extends jr{value(t){return super.value(t).replace(/["']/g,"")}}const da=new If("font","font-family",ha),pa=new tr("size","ql-size",{scope:it.INLINE,whitelist:["small","large","huge"]}),ga=new jr("size","font-size",{scope:it.INLINE,whitelist:["10px","18px","32px"]}),kf=_r("quill:keyboard"),Mf=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class us extends rr{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!e[r]!==t[r]&&e[r]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=Bf(t);if(s==null){kf.warn("Attempted to add invalid keyboard binding",s);return}typeof e=="function"&&(e={handler:e}),typeof r=="function"&&(r={handler:r}),(Array.isArray(s.key)?s.key:[s.key]).forEach(a=>{const l={...s,key:a,...e,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const s=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(w=>us.match(t,w));if(s.length===0)return;const i=$.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[l,c]=this.quill.getLine(a.index),[u,p]=this.quill.getLeaf(a.index),[m,f]=a.length===0?[u,p]:this.quill.getLeaf(a.index+a.length),g=u instanceof es?u.value().slice(0,p):"",_=m instanceof es?m.value().slice(f):"",x={collapsed:a.length===0,empty:a.length===0&&l.length()<=1,format:this.quill.getFormat(a),line:l,offset:c,prefix:g,suffix:_,event:t};s.some(w=>{if(w.collapsed!=null&&w.collapsed!==x.collapsed||w.empty!=null&&w.empty!==x.empty||w.offset!=null&&w.offset!==x.offset)return!1;if(Array.isArray(w.format)){if(w.format.every(b=>x.format[b]==null))return!1}else if(typeof w.format=="object"&&!Object.keys(w.format).every(b=>w.format[b]===!0?x.format[b]!=null:w.format[b]===!1?x.format[b]==null:Qs(w.format[b],x.format[b])))return!1;return w.prefix!=null&&!w.prefix.test(x.prefix)||w.suffix!=null&&!w.suffix.test(x.suffix)?!1:w.handler.call(this,a,x,w)!==!0})&&t.preventDefault()})}handleBackspace(t,e){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(t.index);let a=new rt().retain(t.index-r).delete(r);if(e.offset===0){const[l]=this.quill.getLine(t.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){const u=i.formats(),p=this.quill.getFormat(t.index-1,1);if(s=Se.AttributeMap.diff(u,p)||{},Object.keys(s).length>0){const m=new rt().retain(t.index+i.length()-2).retain(1,s);a=a.compose(m)}}}this.quill.updateContents(a,$.sources.USER),this.quill.focus()}handleDelete(t,e){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let s={};const[i]=this.quill.getLine(t.index);let a=new rt().retain(t.index).delete(r);if(e.offset>=i.length()-1){const[l]=this.quill.getLine(t.index+1);if(l){const c=i.formats(),u=this.quill.getFormat(t.index,1);s=Se.AttributeMap.diff(c,u)||{},Object.keys(s).length>0&&(a=a.retain(l.length()-1).retain(1,s))}}this.quill.updateContents(a,$.sources.USER),this.quill.focus()}handleDeleteRange(t){ai({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const r=Object.keys(e.format).reduce((i,a)=>(this.quill.scroll.query(a,it.BLOCK)&&!Array.isArray(e.format[a])&&
22(i[a]=e.format[a]),i),{}),s=new rt().retain(t.index).delete(t.length).insert(` 23`,r);this.quill.updateContents(s,$.sources.USER),this.quill.setSelection(t.index+1,$.sources.SILENT),this.quill.focus()}}const jf={bindings:{bold:Ss("bold"),italic:Ss("italic"),underline:Ss("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(n,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",$.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(n,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",$.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(n,t){t.format.indent!=null?this.quill.format("indent","-1",$.sources.USER):t.format.list!=null&&this.quill.format("list",!1,$.sources.USER)}},"indent code-block":ao(!0),"outdent code-block":ao(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(n){this.quill.deleteText(n.index-1,1,$.sources.USER)}},tab:{key:"Tab",handler(n,t){if(t.format.table)return!0;this.quill.history.cutoff();const e=new rt().retain(n.index).delete(n.length).insert(" ");return this.quill.updateContents(e,$.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index+1,$.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,$.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(n,t){const e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(n.index,n.length,e,$.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(n){const[t,e]=this.quill.getLine(n.index),r={...t.formats(),list:"checked"},s=new rt().retain(n.index).insert(` 24`,r).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,$.sources.USER),this.quill.setSelection(n.index+1,$.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(n,t){const[e,r]=this.quill.getLine(n.index),s=new rt().retain(n.index).insert(` 25`,t.format).retain(e.length()-r-1).retain(1,{header:null});this.quill.updateContents(s,$.sources.USER),this.quill.setSelection(n.index+1,$.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(n){const t=this.quill.getModule("table");if(t){const[e,r,s,i]=t.getTable(n),a=Df(e,r,s,i);if(a==null)return;let l=e.offset();if(a<0){const c=new rt().retain(l).insert(` 26`);this.quill.updateContents(c,$.sources.USER),this.quill.setSelection(n.index+1,n.length,$.sources.SILENT)}else if(a>0){l+=e.length();const c=new rt().retain(l).insert(` 27`);this.quill.updateContents(c,$.sources.USER),this.quill.setSelection(l,$.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(n,t){const{event:e,line:r}=t,s=r.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(s-1,$.sources.USER):this.quill.setSelection(s+r.length(),$.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(n,t){if(this.quill.scroll.query("list")==null)return!0;const{length:e}=t.prefix,[r,s]=this.quill.getLine(n.index);if(s>e)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(n.index," ",$.sources.USER),this.quill.history.cutoff();const a=new rt().retain(n.index-s).delete(e+1).retain(r.length()-2-s).retain(1,{list:i});return this.quill.updateContents(a,$.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index-e,$.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(n){const[t,e]=this.quill.getLine(n.index);let r=2,s=t;
27for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,r-=1,r<=0){const i=new rt().retain(n.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,$.sources.USER),this.quill.setSelection(n.index-1,$.sources.SILENT),!1}return!0}},"embed left":Wn("ArrowLeft",!1),"embed left shift":Wn("ArrowLeft",!0),"embed right":Wn("ArrowRight",!1),"embed right shift":Wn("ArrowRight",!0),"table down":lo(!1),"table up":lo(!0)}};us.DEFAULTS=jf;function ao(n){return{key:"Tab",shiftKey:!n,format:{"code-block":!0},handler(t,e){let{event:r}=e;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,i,$.sources.USER),this.quill.setSelection(t.index+i.length,$.sources.SILENT);return}const a=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:l,length:c}=t;a.forEach((u,p)=>{n?(u.insertAt(0,i),p===0?l+=i.length:c+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),p===0?l-=i.length:c-=i.length)}),this.quill.update($.sources.USER),this.quill.setSelection(l,c,$.sources.SILENT)}}}function Wn(n,t){return{key:n,shiftKey:t,altKey:null,[n==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:s}=r;n==="ArrowRight"&&(s+=r.length+1);const[i]=this.quill.getLeaf(s);return i instanceof Be?(n==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,$.sources.USER):this.quill.setSelection(r.index-1,$.sources.USER):t?this.quill.setSelection(r.index,r.length+1,$.sources.USER):this.quill.setSelection(r.index+r.length+1,$.sources.USER),!1):!0}}}function Ss(n){return{key:n[0],shortKey:!0,handler(t,e){this.quill.format(n,!e.format[n],$.sources.USER)}}}function lo(n){return{key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){const r=n?"prev":"next",s=e.line,i=s.parent[r];if(i!=null){if(i.statics.blotName==="table-row"){let a=i.children.head,l=s;for(;l.prev!=null;)l=l.prev,a=a.next;const c=a.offset(this.quill.scroll)+Math.min(e.offset,a.length()-1);this.quill.setSelection(c,0,$.sources.USER)}}else{const a=s.table()[r];a!=null&&(n?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,$.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,$.sources.USER))}return!1}}}function Bf(n){if(typeof n=="string"||typeof n=="number")n={key:n};else if(typeof n=="object")n=sn(n);else return null;return n.shortKey&&(n[Mf]=n.shortKey,delete n.shortKey),n}function ai(n){let{quill:t,range:e}=n;const r=t.getLines(e);let s={};if(r.length>1){const i=r[0].formats(),a=r[r.length-1].formats();s=Se.AttributeMap.diff(a,i)||{}}t.deleteText(e,$.sources.USER),Object.keys(s).length>0&&t.formatLine(e.index,1,s,$.sources.USER),t.setSelection(e.index,$.sources.SILENT)}function Df(n,t,e,r){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?r===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const Pf=/font-weight:\s*normal/,$f=["P","OL","UL"],co=n=>n&&$f.includes(n.tagName),Uf=n=>{Array.from(n.querySelectorAll("br")).filter(t=>co(t.previousElementSibling)&&co(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},Ff=n=>{Array.from(n.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(Pf)).forEach(t=>{const e=n.createDocumentFragment();e.append(...t.childNodes),t.parentNode?.replaceChild(e,t)})};function Hf(n){n.querySelector('[id^="docs-internal-guid-"]')&&(Ff(n),Uf(n))}const zf=/\bmso-list:[^;]*ignore/i,Gf=/\bmso-list:[^;]*\bl(\d+)/i,Vf=/\bmso-list:[^;]*\blevel(\d+)/i,Kf=(n,t)=>{const e=n.getAttribute("style"),r=e?.match(Gf);if(!r)return null;const s=Number(r[1]),i=e?.match(Vf),a=i?Number(i[1]):1,l=new RegExp(`@list l${s}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),c=t.match(l),u=c&&c[1]==="bullet"?"bullet":"ordered";return{id:s,indent:a,type:u,element:n}},Wf=n=>{const t=Array.from(n.querySelectorAll("[style*=mso-list]")),e=[],r=[];t.forEach(a=>{(a.getAttribute("style")||"").match(zf)?e.push(a):r.push(a)}),e.forEach(a=>a.parentNode?.removeChild(a));const s=n.documentElement.innerHTML,i=r.map(a=>Kf(a,s)).filter(a=>a);for(;i.length;){const a=[];let l=i.shift();for(;l;)a.push(l),l=i.length&&i[0]?.element===l.element.nextElementSibling&&i[0].id===l.id?i.shift():null;const c=document.createElement("ul");a.forEach(m=>{const f=document.createElement("li");f.setAttribute("data-list",m.type),m.indent>1&&f.setAttribute("class",`ql-indent-${m.indent-1}`),f.innerHTML=m.element.innerHTML,c.appendChild(f)});const u=a[0]?.element,{parentNode:p}=u??{};
27u&&p?.replaceChild(c,u),a.slice(1).forEach(m=>{let{element:f}=m;p?.removeChild(f)})}};function Zf(n){n.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&Wf(n)}const Xf=[Zf,Hf],Yf=n=>{n.documentElement&&Xf.forEach(t=>{t(n)})},Qf=_r("quill:clipboard"),Jf=[[Node.TEXT_NODE,fd],[Node.TEXT_NODE,ho],["br",id],[Node.ELEMENT_NODE,ho],[Node.ELEMENT_NODE,sd],[Node.ELEMENT_NODE,nd],[Node.ELEMENT_NODE,ud],["li",ld],["ol, ul",cd],["pre",od],["tr",hd],["b",Os("bold")],["i",Os("italic")],["strike",Os("strike")],["style",ad]],td=[Cf,la].reduce((n,t)=>(n[t.keyName]=t,n),{}),uo=[oa,si,ni,ua,da,ga].reduce((n,t)=>(n[t.keyName]=t,n),{});class ed extends rr{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],Jf.concat(this.options.matchers??[]).forEach(r=>{let[s,i]=r;this.addMatcher(s,i)})}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:r}=t,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[Oe.blotName])return new rt().insert(r||"",{[Oe.blotName]:s[Oe.blotName]});if(!e)return new rt().insert(r||"",s);const i=this.convertHTML(e);return Ln(i,` 28`)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new rt().retain(i.length()-1).delete(1)):i}normalizeHTML(t){Yf(t)}convertHTML(t){const e=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(e);const r=e.body,s=new WeakMap,[i,a]=this.prepareMatching(r,s);return li(this.quill.scroll,r,i,a,s)}dangerouslyPasteHTML(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$.sources.API;if(typeof t=="string"){const s=this.convert({html:t,text:""});this.quill.setContents(s,e),this.quill.setSelection(0,$.sources.SILENT)}else{const s=this.convert({html:e,text:""});this.quill.updateContents(new rt().retain(t).concat(s),r),this.quill.setSelection(t+s.length(),$.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:s,text:i}=this.onCopy(r,e);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",s),e&&ai({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(e=>e[0]!=="#").join(` 29`)}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(e==null)return;const r=t.clipboardData?.getData("text/html");let s=t.clipboardData?.getData("text/plain");if(!r&&!s){const a=t.clipboardData?.getData("text/uri-list");a&&(s=this.normalizeURIList(a))}const i=Array.from(t.clipboardData?.files||[]);if(!r&&i.length>0){this.quill.uploader.upload(e,i);return}if(r&&i.length>0){const a=new DOMParser().parseFromString(r,"text/html");if(a.body.childElementCount===1&&a.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(e,i);return}}this.onPaste(e,{html:r,text:s})}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:r,html:s}=e;const i=this.quill.getFormat(t.index),a=this.convert({text:r,html:s},i);Qf.log("onPaste",a,{text:r,html:s});const l=new rt().retain(t.index).delete(t.length).concat(a);this.quill.updateContents(l,$.sources.USER),this.quill.setSelection(l.length()-t.length,$.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const r=[],s=[];return this.matchers.forEach(i=>{const[a,l]=i;switch(a){case Node.TEXT_NODE:s.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(t.querySelectorAll(a)).forEach(c=>{e.has(c)?e.get(c)?.push(l):e.set(c,[l])});break}}),[r,s]}}function Wr(n,t,e,r){return r.query(t)?n.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[t])return s.push(i);const a=e?{[t]:e}:{};return s.insert(i.insert,{...a,...i.attributes})},new rt):n}function Ln(n,t){let e="";for(let r=n.ops.length-1;r>=0&&e.length<t.length;--r){const s=n.ops[r];if(typeof s.insert!="string")break;e=s.insert+e}return e.slice(-1*t.length)===t}function Cr(n,t){if(!(n instanceof Element))return!1;const e=t.query(n);return e&&e.prototype instanceof Be?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(n.tagName.toLowerCase())}function rd(n,t){return n.previousElementSibling&&n.nextElementSibling&&!Cr(n.previousElementSibling,t)&&!Cr(n.nextElementSibling,t)}const Zn=new WeakMap;function ma(n){return n==null?!1:(Zn.has(n)||(n.tagName==="PRE"?Zn.set(n,!0):Zn.set(n,ma(n.parentNode))),Zn.get(n))}function li(n,t,e,r,s){return t.nodeType===t.TEXT_NODE?r.reduce((i,a)=>a(t,i,n),new rt):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,a)=>{let l=li(n,a,e,r,s);return a.nodeType===t.ELEMENT_NODE&&(l=e.reduce((c,u)=>u(a,c,n),l),l=(s.get(a)||[]).reduce((c,u)=>u(a,c,n),l)),i.concat(l)},new rt):new rt}function Os(n){return(t,e,r)=>Wr(e,n,!0,r)}
vendor: 5,378 bytes, lines 29-39
29function nd(n,t,e){const r=hr.keys(n),s=tr.keys(n),i=jr.keys(n),a={};return r.concat(s).concat(i).forEach(l=>{let c=e.query(l,it.ATTRIBUTE);c!=null&&(a[c.attrName]=c.value(n),a[c.attrName])||(c=td[l],c!=null&&(c.attrName===l||c.keyName===l)&&(a[c.attrName]=c.value(n)||void 0),c=uo[l],c!=null&&(c.attrName===l||c.keyName===l)&&(c=uo[l],a[c.attrName]=c.value(n)||void 0))}),Object.entries(a).reduce((l,c)=>{let[u,p]=c;return Wr(l,u,p,e)},t)}function sd(n,t,e){const r=e.query(n);if(r==null)return t;if(r.prototype instanceof Be){const s={},i=r.value(n);if(i!=null)return s[r.blotName]=i,new rt().insert(s,r.formats(n,e))}else if(r.prototype instanceof Tn&&!Ln(t,` 30`)&&t.insert(` 31`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Wr(t,r.blotName,r.formats(n,e),e);return t}function id(n,t){return Ln(t,` 32`)||t.insert(` 33`),t}function od(n,t,e){const r=e.query("code-block"),s=r&&"formats"in r&&typeof r.formats=="function"?r.formats(n,e):!0;return Wr(t,"code-block",s,e)}function ad(){return new rt}function ld(n,t,e){const r=e.query(n);if(r==null||r.blotName!=="list"||!Ln(t,` 34`))return t;let s=-1,i=n.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?t:t.reduce((a,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?a.push(l):a.insert(l.insert,{indent:s,...l.attributes||{}}):a,new rt)}function cd(n,t,e){const r=n;let s=r.tagName==="OL"?"ordered":"bullet";const i=r.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),Wr(t,"list",s,e)}function ho(n,t,e){if(!Ln(t,` 35`)){if(Cr(n,e)&&(n.childNodes.length>0||n instanceof HTMLParagraphElement))return t.insert(` 36`);if(t.length()>0&&n.nextSibling){let r=n.nextSibling;for(;r!=null;){if(Cr(r,e))return t.insert(` 37`);const s=e.query(r);if(s&&s.prototype instanceof Ke)return t.insert(` 38`);r=r.firstChild}}}return t}function ud(n,t,e){const r={},s=n.style||{};return s.fontStyle==="italic"&&(r.italic=!0),s.textDecoration==="underline"&&(r.underline=!0),s.textDecoration==="line-through"&&(r.strike=!0),(s.fontWeight?.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((i,a)=>{let[l,c]=a;return Wr(i,l,c,e)},t),parseFloat(s.textIndent||0)>0?new rt().insert(" ").concat(t):t}function hd(n,t,e){const r=n.parentElement?.tagName==="TABLE"?n.parentElement:n.parentElement?.parentElement;if(r!=null){const i=Array.from(r.querySelectorAll("tr")).indexOf(n)+1;return Wr(t,"table",i,e)}return t}function fd(n,t,e){let r=n.data;if(n.parentElement?.tagName==="O:P")return t.insert(r.trim());if(!ma(n)){if(r.trim().length===0&&r.includes(` 39`)&&!rd(n,e))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&Cr(n.parentElement,e)||n.previousSibling instanceof Element&&Cr(n.previousSibling,e))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&Cr(n.parentElement,e)||n.nextSibling instanceof Element&&Cr(n.nextSibling,e))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class dd extends rr{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on($.events.EDITOR_CHANGE,(r,s,i,a)=>{r===$.events.SELECTION_CHANGE?s&&a!==$.sources.SILENT&&(this.currentRange=s):r===$.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===$.sources.USER?this.record(s,i):this.transform(s)),this.currentRange=Gs(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",r=>{r.inputType==="historyUndo"?(this.undo(),r.preventDefault()):r.inputType==="historyRedo"&&(this.redo(),r.preventDefault())})}change(t,e){if(this.stack[t].length===0)return;const r=this.stack[t].pop();if(!r)return;const s=this.quill.getContents(),i=r.delta.invert(s);this.stack[e].push({delta:i,range:Gs(r.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(r.delta,$.sources.USER),this.ignoreChange=!1,this.restoreSelection(r)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(t.ops.length===0)return;this.stack.redo=[];let r=t.invert(e),s=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(r=r.compose(a.delta),s=a.range)}else this.lastRecorded=i;r.length()!==0&&(this.stack.undo.push({delta:r,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){fo(this.stack.undo,t),fo(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,$.sources.USER);else{const e=gd(this.quill.scroll,t.delta);this.quill.setSelection(e,$.sources.USER)}}}function fo(n,t){let e=t;for(let r=n.length-1;r>=0;r-=1){const s=n[r];n[r]={delta:e.transform(s.delta,!0),range:s.range&&Gs(s.range,e)},e=s.delta.transform(e),n[r].delta.length()===0&&n.splice(r,1)}}function pd(n,t){const e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(`
40`):e.attributes!=null?Object.keys(e.attributes).some(r=>n.query(r,it.BLOCK)!=null):!1}function gd(n,t){const e=t.reduce((s,i)=>s+(i.delete||0),0);let r=t.length()-e;return pd(n,t)&&(r-=1),r}function Gs(n,t){if(!n)return n;const e=t.transformPosition(n.index),r=t.transformPosition(n.index+n.length);return{index:e,length:r-e}}class ba extends rr{constructor(t,e){super(t,e),t.root.addEventListener("drop",r=>{r.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&t.selection.normalizeNative(s);if(i){const a=t.selection.normalizedToRange(i);r.dataTransfer?.files&&this.upload(a,r.dataTransfer.files)}})}upload(t,e){const r=[];Array.from(e).forEach(s=>{s&&this.options.mimetypes?.includes(s.type)&&r.push(s)}),r.length>0&&this.options.handler.call(this,t,r)}}ba.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,t){if(!this.quill.scroll.query("image"))return;const e=t.map(r=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(r)}));Promise.all(e).then(r=>{const s=r.reduce((i,a)=>i.insert({image:a}),new rt().retain(n.index).delete(n.length));this.quill.updateContents(s,et.sources.USER),this.quill.setSelection(n.index+r.length,et.sources.SILENT)})}};const md=["insertText","insertReplacementText"];class bd extends rr{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on($.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){ai({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new rt().retain(t.index).insert(e,r),$.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,$.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!md.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;const r=yd(t);if(r==null)return;const s=this.quill.selection.normalizeNative(e),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}
40function yd(n){return typeof n.data=="string"?n.data:n.dataTransfer?.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const vd=/Mac/i.test(navigator.platform),_d=100,Ed=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||vd&&n.key==="a"&&n.ctrlKey===!0);class Ad extends rr{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:r,event:s}=e;if(!(r instanceof Qe)||!r.uiNode)return!0;const i=getComputedStyle(r.domNode).direction==="rtl";return i&&s.key!=="ArrowRight"||!i&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(s.shiftKey?1:0),$.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&Ed(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+_d,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(e.collapsed!==!0||e.startOffset!==0)return;const r=this.quill.scroll.find(e.startContainer);if(!(r instanceof Qe)||!r.uiNode)return;const s=document.createRange();s.setStartAfter(r.uiNode),s.setEndAfter(r.uiNode),t.removeAllRanges(),t.addRange(s)}}$.register({"blots/block":ge,"blots/block/embed":Ke,"blots/break":er,"blots/container":Vr,"blots/cursor":Xe,"blots/embed":ei,"blots/inline":xe,"blots/scroll":Lf,"blots/text":Je,"modules/clipboard":ed,"modules/history":dd,"modules/keyboard":us,"modules/uploader":ba,"modules/input":bd,"modules/uiNode":Ad});class wd extends tr{add(t,e){let r=0;if(e==="+1"||e==="-1"){const s=this.value(t)||0;r=e==="+1"?s+1:s-1}else typeof e=="number"&&(r=e);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}const Nd=new wd("indent","ql-indent",{scope:it.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Td extends ge{static blotName="blockquote";static tagName="blockquote"}class xd extends ge{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}class Cn extends Vr{}Cn.blotName="list-container";Cn.tagName="OL";class qn extends ge{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){$.register(Cn)}constructor(t,e){super(t,e);const r=e.ownerDocument.createElement("span"),s=i=>{if(!t.isEnabled())return;const a=this.statics.formats(e,t);a==="checked"?(this.format("list","unchecked"),i.preventDefault()):a==="unchecked"&&(this.format("list","checked"),i.preventDefault())};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),this.attachUI(r)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}qn.blotName="list";qn.tagName="LI";Cn.allowedChildren=[qn];qn.requiredContainer=Cn;class ci extends xe{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}class Sd extends ci{static blotName="italic";static tagName=["EM","I"]}class rs extends xe{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return ya(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t!==this.statics.blotName||!e?super.format(t,e):this.domNode.setAttribute("href",this.constructor.sanitize(e))}}function ya(n,t){const e=document.createElement("a");e.href=n;const r=e.href.slice(0,e.href.indexOf(":"));return t.indexOf(r)>-1}class Od extends xe{static blotName="script";static tagName=["SUB","SUP"];static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}class Ld extends ci{static blotName="strike";static tagName=["S","STRIKE"]}class Cd extends xe{static blotName="underline";static tagName="U"}class qd extends ei{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const e=super.create(t);return typeof t=="string"&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}const po=["alt","height","width"];class Rd extends Be{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return po.reduce((e,r)=>(t.hasAttribute(r)&&(e[r]=t.getAttribute(r)),e),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}
40static sanitize(t){return ya(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){po.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}const go=["height","width"];class Id extends Ke{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return go.reduce((e,r)=>(t.hasAttribute(r)&&(e[r]=t.getAttribute(r)),e),{})}static sanitize(t){return rs.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){go.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}const vn=new tr("code-token","hljs",{scope:it.INLINE});class yr extends xe{static formats(t,e){for(;t!=null&&t!==e.domNode;){if(t.classList&&t.classList.contains(Oe.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,r){super(t,e,r),vn.add(this.domNode,r)}format(t,e){t!==yr.blotName?super.format(t,e):e?vn.add(this.domNode,e):(vn.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),vn.value(this.domNode)||this.unwrap()}}yr.blotName="code-token";yr.className="ql-token";class Ve extends Oe{static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("data-language",t),e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-language",e):super.format(t,e)}replaceWith(t,e){return this.formatAt(0,this.length(),yr.blotName,!1),super.replaceWith(t,e)}}class En extends Kr{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===Ve.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(t,e)}))}formatAt(t,e,r,s){r===Ve.blotName&&(this.forceNext=!0),super.formatAt(t,e,r,s)}highlight(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(` 41`)} 42`,i=Ve.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const a=this.children.reduce((c,u)=>c.concat(na(u,!1)),new rt),l=t(s,i);a.diff(l).reduce((c,u)=>{let{retain:p,attributes:m}=u;return p?(m&&Object.keys(m).forEach(f=>{[Ve.blotName,yr.blotName].includes(f)&&this.formatAt(c,p,f,m[f])}),c+p):c},0)}this.cachedText=s,this.forceNext=!1}}html(t,e){const[r]=this.children.find(t);return`<pre data-language="${r?Ve.formats(r.domNode):"plain"}"> 43${cs(this.code(t,e))} 44</pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const e=Ve.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}En.allowedChildren=[Ve];Ve.requiredContainer=En;Ve.allowedChildren=[yr,Xe,Je,er];const kd=(n,t,e)=>{if(typeof n.versionString=="string"){const r=n.versionString.split(".")[0];if(parseInt(r,10)>=11)return n.highlight(e,{language:t}).value}return n.highlight(t,e).value};class va extends rr{static register(){$.register(yr,!0),$.register(Ve,!0),$.register(En,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,s)=>{let{key:i}=s;return r[i]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on($.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof En))return;const e=this.quill.root.ownerDocument.createElement("select");
44this.options.languages.forEach(r=>{let{key:s,label:i}=r;const a=e.ownerDocument.createElement("option");a.textContent=i,a.setAttribute("value",s),e.appendChild(a)}),e.addEventListener("change",()=>{t.format(Ve.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=Ve.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on($.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update($.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(En):[t]).forEach(i=>{i.highlight(this.highlightBlot,e)}),this.quill.update($.sources.SILENT),r!=null&&this.quill.setSelection(r,$.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return cs(t).split(` 45`).reduce((s,i,a)=>(a!==0&&s.insert(` 46`,{[Oe.blotName]:e}),s.insert(i)),new rt);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Oe.className),r.innerHTML=kd(this.options.hljs,e,t),li(this.quill.scroll,r,[(s,i)=>{const a=vn.value(s);return a?i.compose(new rt().retain(i.length(),{[yr.blotName]:a})):i}],[(s,i)=>s.data.split(` 47`).reduce((a,l,c)=>(c!==0&&a.insert(` 48`,{[Oe.blotName]:e}),a.insert(l)),i)],new WeakMap)}}va.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class Ye extends ge{static blotName="table";static tagName="TD";static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",ui()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===Ye.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class Fr extends Vr{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),e=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return t.table===e.table&&t.table===r.table&&t.table===s.table}return!1}optimize(t){super.optimize(t),this.children.forEach(e=>{if(e.next==null)return;const r=e.formats(),s=e.next.formats();if(r.table!==s.table){const i=this.splitAfter(e);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class Rr extends Vr{static blotName="table-body";static tagName="TBODY"}class ns extends Vr{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(Fr),e=t.reduce((r,s)=>Math.max(s.children.length,r),0);t.forEach(r=>{new Array(e-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=Ye.formats(r.children.head.domNode));const i=this.scroll.create(Ye.blotName,s);r.appendChild(i),i.optimize()})})}cells(t){return this.rows().map(e=>e.children.at(t))}deleteColumn(t){const[e]=this.descendant(Rr);e==null||e.children.head==null||e.children.forEach(r=>{const s=r.children.at(t);s?.remove()})}insertColumn(t){const[e]=this.descendant(Rr);e==null||e.children.head==null||e.children.forEach(r=>{const s=r.children.at(t),i=Ye.formats(r.children.head.domNode),a=this.scroll.create(Ye.blotName,i);r.insertBefore(a,s)})}insertRow(t){const[e]=this.descendant(Rr);if(e==null||e.children.head==null)return;const r=ui(),s=this.scroll.create(Fr.blotName);
48e.children.head.children.forEach(()=>{const a=this.scroll.create(Ye.blotName,r);s.appendChild(a)});const i=e.children.at(t);e.insertBefore(s,i)}rows(){const t=this.children.head;return t==null?[]:t.children.map(e=>e)}}ns.allowedChildren=[Rr];Rr.requiredContainer=ns;Rr.allowedChildren=[Fr];Fr.requiredContainer=Rr;Fr.allowedChildren=[Ye];Ye.requiredContainer=Fr;function ui(){return`row-${Math.random().toString(36).slice(2,6)}`}class Md extends rr{static register(){$.register(Ye),$.register(Fr),$.register(Rr),$.register(ns)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(ns).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update($.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update($.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const e=t.offset();t.remove(),this.quill.update($.sources.USER),this.quill.setSelection(e,$.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[e,r]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==Ye.blotName)return[null,null,null,-1];const s=e.parent;return[s.parent.parent,s,e,r]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[r,s,i]=this.getTable(e);if(i==null)return;const a=i.cellOffset();r.insertColumn(a+t),this.quill.update($.sources.USER);let l=s.rowOffset();t===0&&(l+=1),this.quill.setSelection(e.index+l,e.length,$.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[r,s,i]=this.getTable(e);if(i==null)return;const a=s.rowOffset();r.insertRow(a+t),this.quill.update($.sources.USER),t>0?this.quill.setSelection(e,$.sources.SILENT):this.quill.setSelection(e.index+s.children.length,e.length,$.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const r=this.quill.getSelection();if(r==null)return;const s=new Array(t).fill(0).reduce(i=>{const a=new Array(e).fill(` 49`).join("");return i.insert(a,{table:ui()})},new rt().retain(r.index));this.quill.updateContents(s,$.sources.USER),this.quill.setSelection(r.index,$.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on($.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once($.events.TEXT_CHANGE,(r,s,i)=>{i===$.sources.USER&&this.balanceTables()}),!0):!1)})}}const mo=_r("quill:toolbar");class hi extends rr{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const r=document.createElement("div");r.setAttribute("role","toolbar"),jd(r,this.options.container),t.container?.parentNode?.insertBefore(r,t.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){mo.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{const s=this.options.handlers?.[r];s&&this.addHandler(r,s)}),Array.from(this.container.querySelectorAll("button, select")).forEac
49h(r=>{this.attach(r)}),this.quill.on($.events.EDITOR_CHANGE,()=>{const[r]=this.quill.selection.getRange();this.update(r)})}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find(s=>s.indexOf("ql-")===0);if(!e)return;if(e=e.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[e]==null&&this.quill.scroll.query(e)==null){mo.warn("ignoring attaching to nonexistent format",e,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,s=>{let i;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const l=t.options[t.selectedIndex];l.hasAttribute("selected")?i=!1:i=l.value||!1}else t.classList.contains("ql-active")?i=!1:i=t.value||!t.hasAttribute("value"),s.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[e]!=null)this.handlers[e].call(this,i);else if(this.quill.scroll.query(e).prototype instanceof Be){if(i=prompt(`Enter ${e}`),!i)return;this.quill.updateContents(new rt().retain(a.index).delete(a.length).insert({[e]:i}),$.sources.USER)}else this.quill.format(e,i,$.sources.USER);this.update(a)}),this.controls.push([e,t])}update(t){const e=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[s,i]=r;if(i.tagName==="SELECT"){let a=null;if(t==null)a=null;else if(e[s]==null)a=i.querySelector("option[selected]");else if(!Array.isArray(e[s])){let l=e[s];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),a=i.querySelector(`option[value="${l}"]`)}a==null?(i.value="",i.selectedIndex=-1):a.selected=!0}else if(t==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const a=e[s],l=a===i.getAttribute("value")||a!=null&&a.toString()===i.getAttribute("value")||a==null&&!i.getAttribute("value");i.classList.toggle("ql-active",l),i.setAttribute("aria-pressed",l.toString())}else{const a=e[s]!=null;i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}})}}hi.DEFAULTS={};function bo(n,t,e){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),e!=null?(r.value=e,r.setAttribute("aria-label",`${t}: ${e}`)):r.setAttribute("aria-label",t),n.appendChild(r)}function jd(n,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{const r=document.createElement("span");r.classList.add("ql-formats"),e.forEach(s=>{if(typeof s=="string")bo(r,s);else{const i=Object.keys(s)[0],a=s[i];Array.isArray(a)?Bd(r,i,a):bo(r,i,a)}}),n.appendChild(r)})}function Bd(n,t,e){const r=document.createElement("select");r.classList.add(`ql-${t}`),e.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),r.appendChild(i)}),n.appendChild(r)}hi.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,it.INLINE)!=null&&this.quill.format(e,!1,$.sources.USER)})}else this.quill.removeFormat(n.index,n.length,$.sources.USER)},direction(n){const{align:t}=this.quill.getFormat();n==="rtl"&&t==null?this.quill.format("align","right",$.sources.USER):!n&&t==="right"&&this.quill.format("align",!1,$.sources.USER),this.quill.format("direction",n,$.sources.USER)},indent(n){const t=this.quill.getSelection(),e=this.quill.getFormat(t),r=parseInt(e.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;e.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,$.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,$.sources.USER)},list(n){const t=this.quill.getSelection(),e=this.quill.getFormat(t);n==="check"?e.list==="checked"||e.list==="unchecked"?this.quill.format("list",!1,$.sources.USER):this.quill.format("list","unchecked",$.sources.USER):this.quill.format("list",n,$.sources.USER)}}};const Dd='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',Pd='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',$d='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Ud='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Fd='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/>
49<path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Hd='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',zd='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Gd='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',yo='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Vd='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Kd='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Wd='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Zd='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',Xd='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',Yd='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Qd='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816
49H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Jd='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',tp='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',ep='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',rp='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',np='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',sp='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',ip='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',op='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',ap='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',lp='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',cp='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/>
49<path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',up='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',hp='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',fp='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',dp='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',pp='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',gp='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Sn={align:{"":Dd,center:Pd,right:$d,justify:Ud},background:Fd,blockquote:Hd,bold:zd,clean:Gd,code:yo,"code-block":yo,color:Vd,direction:{"":Kd,rtl:Wd},formula:Zd,header:{1:Xd,2:Yd,3:Qd,4:Jd,5:tp,6:ep},italic:rp,image:np,indent:{"+1":sp,"-1":ip},link:op,list:{bullet:ap,check:lp,ordered:cp},script:{sub:up,super:hp},strike:fp,table:dp,underline:pp,video:gp},mp='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let vo=0;function _o(n,t){n.setAttribute(t,`${n.getAttribute(t)!=="true"}`)}class hs{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),_o(this.label,"aria-expanded"),_o(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&e.setAttribute("data-value",r),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",()=>{this.selectItem(e,!0)}),e.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(e,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),e}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=mp,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","fal
49se"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${vo}`,vo+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(e=>{const r=this.buildItem(e);t.appendChild(r),e.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const e=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}class _a extends hs{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);const r=this.label.querySelector(".ql-color-label"),s=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class Ea extends hs{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=e[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const bp=n=>{const{overflowY:t}=getComputedStyle(n,null);return t!=="visible"&&t!=="clip"};class Aa{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,bp(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const e=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let a=0;if(i.right>s.right&&(a=s.right-i.right,this.root.style.left=`${e+a}px`),i.left<s.left&&(a=s.left-i.left,this.root.style.left=`${e+a}px`),i.bottom>s.bottom){const l=i.bottom-i.top,c=t.bottom-t.top+l;this.root.style.top=`${r-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const yp=[!1,"center","right","justify"],vp=["#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"],_p=[!1,"serif","monospace"],Ep=["1","2","3",!1],Ap=["small",!1,"large","huge"];class Rn extends hn{constructor(t,e){super(t,e);const r=s=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEac
49h(i=>{i.container.contains(s.target)||i.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const e=super.addModule(t);return t==="toolbar"&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),e[i]!=null))if(i==="direction")r.innerHTML=e[i][""]+e[i].rtl;else if(typeof e[i]=="string")r.innerHTML=e[i];else{const a=r.value||"";a!=null&&e[i][a]&&(r.innerHTML=e[i][a])}})})}buildPickers(t,e){this.pickers=Array.from(t).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&mn(s,yp),typeof e.align=="object"))return new Ea(s,e.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&mn(s,vp,i==="background"?"#ffffff":"#000000"),new _a(s,e[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?mn(s,_p):s.classList.contains("ql-header")?mn(s,Ep):s.classList.contains("ql-size")&&mn(s,Ap)),new hs(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(et.events.EDITOR_CHANGE,r)}}Rn.DEFAULTS=qr({},hn.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class wa extends Aa{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;e!=null?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,et.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,et.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=wp(t);case"formula":{if(!t)break;const e=this.quill.getSelection(!0);if(e!=null){const r=e.index+e.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,et.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",et.sources.USER),this.quill.setSelection(r+2,et.sources.USER)}break}}this.textbox.value="",this.hide()}}function wp(n){let t=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:n}function mn(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const s=document.createElement("option");r===e?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const Np=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Tp extends wa{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,e){super(t,e),this.quill.on(et.events.EDITOR_CHANGE,(r,s,i,a)=>
49{if(r===et.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&a===et.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const l=this.quill.getLines(s.index,s.length);if(l.length===1){const c=this.quill.getBounds(s);c!=null&&this.position(c)}else{const c=l[l.length-1],u=this.quill.getIndex(c),p=Math.min(c.length()-1,s.index+s.length-u),m=this.quill.getBounds(new kr(u,p));m!=null&&this.position(m)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(et.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const e=this.quill.getBounds(t);e!=null&&this.position(e)}},1)})}cancel(){this.show()}position(t){const e=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",e!==0&&(r.style.marginLeft=`${-1*e-r.offsetWidth/2}px`),e}}class Na extends Rn{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=Np),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Tp(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Sn),this.buildPickers(t.container.querySelectorAll("select"),Sn))}}Na.DEFAULTS=qr({},Rn.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,$.sources.USER)}}}}});const xp=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Sp extends wa{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,et.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(et.events.SELECTION_CHANGE,(t,e,r)=>{if(t!=null){if(t.length===0&&r===et.sources.USER){const[s,i]=this.quill.scroll.descendant(rs,t.index);if(s!=null){this.linkRange=new kr(t.index-i,s.length());const a=rs.formats(s.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class Ta extends Rn{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=xp),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Sn),this.buildPickers(t.container.querySelectorAll("select"),Sn),this.tooltip=new Sp(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(e,r)=>{t.handlers.link.call(t,!r.format.link)}))}}Ta.DEFAULTS=qr({},Rn.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const t=this.quill.getSelection();if(t==null||t.length===0)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&e.indexOf("mailto:")!==0&&(e=`mailto:${e}`);const{tooltip:r}=this.quill.theme;r.edit("link",e)}else this.quill.format("link",!1,$.sources.USER)}}}}});$.register({"attributors/attribute/direction":la,"attributors/class/align":ia,"attributors/class/background":Rf,"attributors/class/color":qf,"attributors/class/direction":ca,"attributors/class/font":fa,"attributors/class/size":pa,"attributors/style/align":oa,"attributors/style/background":si,"attributors/style/color":ni,"attributors/style/direction":ua,"attributors/style/font":da,"attributors/style/size":ga},!0);$.register({"formats/align":ia,"formats/direction":ca,"formats/indent":Nd,"formats/background":si,"formats/color":ni,"formats/font":fa,"formats/size":pa,"formats/blockquote":Td,"formats/code-block":Oe,"formats/header":xd,"formats/list":qn,"formats/bold":ci,"formats/code":ii,"formats/ital
49ic":Sd,"formats/link":rs,"formats/script":Od,"formats/strike":Ld,"formats/underline":Cd,"formats/formula":qd,"formats/image":Rd,"formats/video":Id,"modules/syntax":va,"modules/table":Md,"modules/toolbar":hi,"themes/bubble":Na,"themes/snow":Ta,"ui/icons":Sn,"ui/picker":hs,"ui/icon-picker":Ea,"ui/color-picker":_a,"ui/tooltip":Aa},!0);const Mp=Object.freeze(Object.defineProperty({__proto__:null,AttributeMap:Se.AttributeMap,Delta:rt,Module:rr,Op:Se.Op,OpIterator:Se.OpIterator,Parchment:Jo,Range:kr,default:$},Symbol.toStringTag,{value:"Module"})),Xn=(n,t,e,r,s)=>{try{if(t&&t.cursor&&e!==r.clientID){const i=t.user||{},a=i.color||"#ffa500",l=i.name||`User: ${e}`;n.createCursor(e.toString(),l,a);const c=gi(mi(t.cursor.anchor),r),u=gi(mi(t.cursor.head),r);c&&u&&c.type===s&&n.moveCursor(e.toString(),{index:c.index,length:u.index-c.index})}else n.removeCursor(e.toString())}catch(i){console.error(i)}};class jp{constructor(t,e,r){const s=t.doc;this.type=t,this.doc=s,this.quill=e;const i=e.getModule("cursors")||null;this.quillCursors=i,this._negatedUsedFormats={},this.awareness=r,this._awarenessChange=({added:a,removed:l,updated:c})=>{const u=r.getStates();a.forEach(p=>{Xn(i,u.get(p),p,s,t)}),c.forEach(p=>{Xn(i,u.get(p),p,s,t)}),l.forEach(p=>{i.removeCursor(p.toString())})},this._typeObserver=a=>{if(a.transaction.origin!==this){const l=a.delta,c=[];for(let u=0;u<l.length;u++){const p=l[u];p.insert!==void 0?c.push(Object.assign({},p,{attributes:Object.assign({},this._negatedUsedFormats,p.attributes||{})})):c.push(p)}e.updateContents(c,this)}},t.observe(this._typeObserver),this._quillObserver=(a,l,c,u)=>{if(l&&l.ops){const p=l.ops;p.forEach(m=>{if(m.attributes!==void 0)for(const f in m.attributes)this._negatedUsedFormats[f]===void 0&&(this._negatedUsedFormats[f]=!1)}),u!==this&&s.transact(()=>{t.applyDelta(p)},this)}if(r&&i){const p=e.getSelection(),m=r.getLocalState();if(p===null)r.getLocalState()!==null&&r.setLocalStateField("cursor",null);else{const f=di(t,p.index),g=di(t,p.index+p.length);(!m||!m.cursor||!pi(f,m.cursor.anchor)||!pi(g,m.cursor.head))&&r.setLocalStateField("cursor",{anchor:f,head:g})}
49r.getStates().forEach((f,g)=>{Xn(i,f,g,s,t)})}},e.on("editor-change",this._quillObserver),e.setContents(t.toDelta(),this),i!==null&&r&&(r.getStates().forEach((a,l)=>{Xn(i,a,l,s,t)}),r.on("change",this._awarenessChange))}destroy(){this.type.unobserve(this._typeObserver),this.quill.off("editor-change",this._quillObserver),this.awareness&&this.awareness.off("change",this._awarenessChange)}}var Ls={exports:{}};var Eo;function Bp(){return Eo||(Eo=1,(function(n,t){(function(e,r){n.exports=r()})(self,(()=>(()=>{var e={582:(a,l,c)=>{c.d(l,{Z:()=>g});var u=c(81),p=c.n(u),m=c(645),f=c.n(m)()(p());f.push([a.id,".ql-container{position:relative;overflow:hidden}@media(pointer: coarse){.ql-cursor-caret-container{z-index:-1}}.ql-cursor.hidden{display:none}.ql-cursor .ql-cursor-caret-container,.ql-cursor .ql-cursor-flag{position:absolute}.ql-cursor .ql-cursor-flag{z-index:1;transform:translate3d(-1px, -100%, 0);opacity:0;visibility:hidden;color:#fff;padding-bottom:2px;border-radius:0 3px 3px 0}.ql-cursor .ql-cursor-flag.flag-flipped{border-radius:3px 0 0 3px;transform:translate3d(calc(-100% + 1px ), -100%, 0)}@media screen{.ql-cursor .ql-cursor-flag{transition:opacity 0ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms,visibility 0ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms}}.ql-cursor .ql-cursor-flag .ql-cursor-name{margin-left:5px;margin-right:5px;display:inline-block;margin-top:-2px;white-space:nowrap}.ql-cursor .ql-cursor-flag.no-delay[style]{transition-delay:unset !important}.ql-cursor .ql-cursor-caret-container{cursor:text;margin-left:-9px;padding:0 9px}.ql-cursor .ql-cursor-caret-container.hover+.ql-cursor-flag{opacity:1;visibility:visible;transition:none}.ql-cursor .ql-cursor-caret-container.no-pointer{pointer-events:none}.ql-cursor .ql-cursor-caret-container .ql-cursor-caret{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background-color:attr(data-color)}.ql-cursor .ql-cursor-selection-block{position:absolute;pointer-events:none}",""]);const g=f},645:a=>{a.exports=function(l){var c=[];return c.toString=function(){return this.map((function(u){var p="",m=u[5]!==void 0;return u[4]&&(p+="@supports (".concat(u[4],") {")),u[2]&&(p+="@media ".concat(u[2]," {")),m&&(p+="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {")),p+=l(u),m&&(p+="}"),u[2]&&(p+="}"),u[4]&&(p+="}"),p})).join("")},c.i=function(u,p,m,f,g){typeof u=="string"&&(u=[[null,u,void 0]]);var _={};if(m)for(var x=0;x<this.length;x++){var L=this[x][0];L!=null&&(_[L]=!0)}for(var w=0;w<u.length;w++){var b=[].concat(u[w]);m&&_[b[0]]||(g!==void 0&&(b[5]===void 0||(b[1]="@layer".concat(b[5].length>0?" ".concat(b[5]):""," {").concat(b[1],"}")),b[5]=g),p&&(b[2]&&(b[1]="@media ".concat(b[2]," {").concat(b[1],"}")),b[2]=p),f&&(b[4]?(b[1]="@supports (".concat(b[4],") {").concat(b[1],"}"),b[4]=f):b[4]="".concat(f)),c.push(b))}},c}},81:a=>{a.exports=function(l){return l[1]}},529:a=>{var l=-1;function c(h,y,A,T){if(h===y)return h?[[0,h]]:[];if(A!=null){var M=(function(B,E,R){var C=typeof R=="number"?{index:R,length:0}:R.oldRange,S=typeof R=="number"?null:R.newRange,I=B.length,D=E.length;if(C.length===0&&(S===null||S.length===0)){var z=C.index,U=B.slice(0,z),tt=B.slice(z),Q=S?S.index:null,V=z+D-I;if((Q===null||Q===V)&&!(V<0||V>D)){var ft=E.slice(0,V);if((ct=E.slice(V))===tt){var Y=Math.min(z,V);if((lt=U.slice(0,Y))===(st=ft.slice(0,Y)))return w(lt,U.slice(Y),ft.slice(Y),tt)}}if(Q===null||Q===z){var nt=z,ct=(ft=E.slice(0,nt),E.slice(nt));if(ft===U){var Z=Math.min(I-nt,D-nt);if((ut=tt.slice(tt.length-Z))===(dt=ct.slice(ct.length-Z)))return w(U,tt.slice(0,tt.length-Z),ct.slice(0,ct.length-Z),ut)}}}if(C.length>0&&S&&S.length===0){var lt=B.slice(0,C.index),ut=B.slice(C.index+C.length);if(!(D<(Y=lt.length)+(Z=ut.length))){var st=E.slice(0,Y),dt=E.slice(D-Z);if(lt===st&&ut===dt)return w(lt,B.slice(Y,I-Z),E.slice(Y,D-Z),ut)}}return null})(h,y,A);if(M)return M}var F=p(h,y),K=h.substring(0,F);F=m(h=h.substring(F),y=y.substring(F));var W=h.substring(h.length-F),v=(function(B,E){var R;if(!B)return[[1,E]];if(!E)return[[l,B]];var C=B.length>E.length?B:E,S=B.length>E.length?E:B,I=C.indexOf(S);if(I!==-1)return R=[[1,C.substring(0,I)],[0,S],[1,C.substring(I+S.length)]],B.length>E.length&&(R[0][0]=R[2][0]=l),R;if(S.length===1)return[[l,B],[1,E]];var D=(function(nt,ct){var Z=nt.length>ct.length?nt:ct,lt=nt.length>ct.length?ct:nt;if(Z.length<4||2*lt.length<Z.length)return null;function ut(ee,Xt,zt){for(var oe,Vt,Bt,wt,Kt=ee.substring(zt,zt+Math.floor(ee.length/4)),Dt=-1,Rt="";(Dt=Xt.indexOf(Kt,Dt+1))!==-1;){var Lt=p(ee.substring(zt),Xt.substring(Dt)),Wt=m(ee.substring(0,zt),Xt.substring(0,Dt));Rt.length<Wt+Lt&&(Rt=Xt.substring(Dt-Wt,Dt)+Xt.substring(Dt,Dt+Lt),oe=ee.substring(0,zt-Wt),Vt=ee.substring(zt+Lt),Bt=Xt.substring(0,Dt-Wt),wt=Xt.substring(Dt+Lt))}return 2*Rt.length>=ee.length?[oe,Vt,Bt,wt,Rt]:null}
49var st,dt,pt,gt,St,Zt=ut(Z,lt,Math.ceil(Z.length/4)),ue=ut(Z,lt,Math.ceil(Z.length/2));return Zt||ue?(st=ue?Zt&&Zt[4].length>ue[4].length?Zt:ue:Zt,nt.length>ct.length?(dt=st[0],pt=st[1],gt=st[2],St=st[3]):(gt=st[0],St=st[1],dt=st[2],pt=st[3]),[dt,pt,gt,St,st[4]]):null})(B,E);if(D){var z=D[0],U=D[1],tt=D[2],Q=D[3],V=D[4],ft=c(z,tt),Y=c(U,Q);return ft.concat([[0,V]],Y)}return(function(nt,ct){for(var Z=nt.length,lt=ct.length,ut=Math.ceil((Z+lt)/2),st=ut,dt=2*ut,pt=new Array(dt),gt=new Array(dt),St=0;St<dt;St++)pt[St]=-1,gt[St]=-1;pt[st+1]=0,gt[st+1]=0;for(var Zt=Z-lt,ue=Zt%2!=0,ee=0,Xt=0,zt=0,oe=0,Vt=0;Vt<ut;Vt++){for(var Bt=-Vt+ee;Bt<=Vt-Xt;Bt+=2){for(var wt=st+Bt,Kt=(Ct=Bt===-Vt||Bt!==Vt&&pt[wt-1]<pt[wt+1]?pt[wt+1]:pt[wt-1]+1)-Bt;Ct<Z&&Kt<lt&&nt.charAt(Ct)===ct.charAt(Kt);)Ct++,Kt++;if(pt[wt]=Ct,Ct>Z)Xt+=2;else if(Kt>lt)ee+=2;else if(ue&&(Lt=st+Zt-Bt)>=0&&Lt<dt&>[Lt]!==-1&&Ct>=(Rt=Z-gt[Lt]))return u(nt,ct,Ct,Kt)}for(var Dt=-Vt+zt;Dt<=Vt-oe;Dt+=2){for(var Rt,Lt=st+Dt,Wt=(Rt=Dt===-Vt||Dt!==Vt&>[Lt-1]<gt[Lt+1]?gt[Lt+1]:gt[Lt-1]+1)-Dt;Rt<Z&&Wt<lt&&nt.charAt(Z-Rt-1)===ct.charAt(lt-Wt-1);)Rt++,Wt++;if(gt[Lt]=Rt,Rt>Z)oe+=2;else if(Wt>lt)zt+=2;else if(!ue){var Ct;if((wt=st+Zt-Dt)>=0&&wt<dt&&pt[wt]!==-1&&(Kt=st+(Ct=pt[wt])-wt,Ct>=(Rt=Z-Rt)))return u(nt,ct,Ct,Kt)}}}return[[l,nt],[1,ct]]})(B,E)})(h=h.substring(0,h.length-F),y=y.substring(0,y.length-F));return K&&v.unshift([0,K]),W&&v.push([0,W]),f(v,T),v}function u(h,y,A,T){var M=h.substring(0,A),F=y.substring(0,T),K=h.substring(A),W=y.substring(T),v=c(M,F),B=c(K,W);return v.concat(B)}function p(h,y){if(!h||!y||h.charAt(0)!==y.charAt(0))return 0;for(var A=0,T=Math.min(h.length,y.length),M=T,F=0;A<M;)h.substring(F,M)==y.substring(F,M)?F=A=M:T=M,M=Math.floor((T-A)/2+A);return g(h.charCodeAt(M-1))&&M--,M}function m(h,y){if(!h||!y||h.slice(-1)!==y.slice(-1))return 0;for(var A=0,T=Math.min(h.length,y.length),M=T,F=0;A<M;)h.substring(h.length-M,h.length-F)==y.substring(y.length-M,y.length-F)?F=A=M:T=M,M=Math.floor((T-A)/2+A);return _(h.charCodeAt(h.length-M))&&M--,M}function f(h,y){h.push([0,""]);for(var A,T=0,M=0,F=0,K="",W="";T<h.length;)if(T<h.length-1&&!h[T][1])h.splice(T,1);else switch(h[T][0]){case 1:F++,W+=h[T][1],T++;break;case l:M++,K+=h[T][1],T++;break;case 0:var v=T-F-M-1;if(y){if(v>=0&&L(h[v][1])){var B=h[v][1].slice(-1);if(h[v][1]=h[v][1].slice(0,-1),K=B+K,W=B+W,!h[v][1]){h.splice(v,1),T--;var E=v-1;h[E]&&h[E][0]===1&&(F++,W=h[E][1]+W,E--),h[E]&&h[E][0]===l&&(M++,K=h[E][1]+K,E--),v=E}}x(h[T][1])&&(B=h[T][1].charAt(0),h[T][1]=h[T][1].slice(1),K+=B,W+=B)}if(T<h.length-1&&!h[T][1]){h.splice(T,1);break}if(K.length>0||W.length>0){K.length>0&&W.length>0&&((A=p(W,K))!==0&&(v>=0?h[v][1]+=W.substring(0,A):(h.splice(0,0,[0,W.substring(0,A)]),T++),W=W.substring(A),K=K.substring(A)),(A=m(W,K))!==0&&(h[T][1]=W.substring(W.length-A)+h[T][1],W=W.substring(0,W.length-A),K=K.substring(0,K.length-A)));var R=F+M;K.length===0&&W.length===0?(h.splice(T-R,R),T-=R):K.length===0?(h.splice(T-R,R,[1,W]),T=T-R+1):W.length===0?(h.splice(T-R,R,[l,K]),T=T-R+1):(h.splice(T-R,R,[l,K],[1,W]),T=T-R+2)}T!==0&&h[T-1][0]===0?(h[T-1][1]+=h[T][1],h.splice(T,1)):T++,F=0,M=0,K="",W=""}h[h.length-1][1]===""&&h.pop();var C=!1;for(T=1;T<h.length-1;)h[T-1][0]===0&&h[T+1][0]===0&&(h[T][1].substring(h[T][1].length-h[T-1][1].length)===h[T-1][1]?(h[T][1]=h[T-1][1]+h[T][1].substring(0,h[T][1].length-h[T-1][1].length),h[T+1][1]=h[T-1][1]+h[T+1][1],h.splice(T-1,1),C=!0):h[T][1].substring(0,h[T+1][1].length)==h[T+1][1]&&(h[T-1][1]+=h[T+1][1],h[T][1]=h[T][1].substring(h[T+1][1].length)+h[T+1][1],h.splice(T+1,1),C=!0)),T++;C&&f(h,y)}function g(h){return h>=55296&&h<=56319}function _(h){return h>=56320&&h<=57343}function x(h){return _(h.charCodeAt(0))}function L(h){return g(h.charCodeAt(h.length-1))}function w(h,y,A,T){return L(h)||x(T)?null:(function(M){for(var F=[],K=0;K<M.length;K++)M[K][1].length>0&&F.push(M[K]);return F})([[0,h],[l,y],[1,A],[0,T]])}function b(h,y,A){return c(h,y,A,!0)}b.INSERT=1,b.DELETE=l,b.EQUAL=0,a.exports=b},465:(a,l,c)=>{a=c.nmd(a);var u="__lodash_hash_undefined__",p=9007199254740991,m="[object Arguments]",f="[object Boolean]",g="[object Date]",_="[object Function]",x="[object GeneratorFunction]",L="[object Map]",w="[object Number]",b="[object Object]",h="[object Promise]",y="[object RegExp]",A="[object Set]",T="[object String]",M="[object Symbol]",F="[object WeakMap]",K="[object ArrayBuffer]",W="[object DataView]",v="[object Float32Array]",B="[object Float64Array
49]",E="[object Int8Array]",R="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",I="[object Uint8ClampedArray]",D="[object Uint16Array]",z="[object Uint32Array]",U=/\w*$/,tt=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,V={};V[m]=V["[object Array]"]=V[K]=V[W]=V[f]=V[g]=V[v]=V[B]=V[E]=V[R]=V[C]=V[L]=V[w]=V[b]=V[y]=V[A]=V[T]=V[M]=V[S]=V[I]=V[D]=V[z]=!0,V["[object Error]"]=V[_]=V[F]=!1;var ft=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g,Y=typeof self=="object"&&self&&self.Object===Object&&self,nt=ft||Y||Function("return this")(),ct=l&&!l.nodeType&&l,Z=ct&&a&&!a.nodeType&&a,lt=Z&&Z.exports===ct;function ut(O,j){return O.set(j[0],j[1]),O}function st(O,j){return O.add(j),O}function dt(O,j,G,X){var ht=-1,Nt=O?O.length:0;for(X;++ht<Nt;)G=j(G,O[ht],ht,O);return G}function pt(O){var j=!1;if(O!=null&&typeof O.toString!="function")try{j=!!(O+"")}catch{}return j}function gt(O){var j=-1,G=Array(O.size);return O.forEach((function(X,ht){G[++j]=[ht,X]})),G}function St(O,j){return function(G){return O(j(G))}}function Zt(O){var j=-1,G=Array(O.size);return O.forEach((function(X){G[++j]=X})),G}var ue,ee=Array.prototype,Xt=Function.prototype,zt=Object.prototype,oe=nt["__core-js_shared__"],Vt=(ue=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||""))?"Symbol(src)_1."+ue:"",Bt=Xt.toString,wt=zt.hasOwnProperty,Kt=zt.toString,Dt=RegExp("^"+Bt.call(wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=lt?nt.Buffer:void 0,Lt=nt.Symbol,Wt=nt.Uint8Array,Ct=St(Object.getPrototypeOf,Object),nr=Object.create,De=zt.propertyIsEnumerable,Br=ee.splice,sr=Object.getOwnPropertySymbols,ir=Rt?Rt.isBuffer:void 0,Er=St(Object.keys,Object),Pe=Ce(nt,"DataView"),me=Ce(nt,"Map"),re=Ce(nt,"Promise"),ae=Ce(nt,"Set"),ne=Ce(nt,"WeakMap"),Yt=Ce(Object,"create"),$e=qe(Pe),le=qe(me),Ue=qe(re),Me=qe(ae),or=qe(ne),Le=Lt?Lt.prototype:void 0,ar=Le?Le.valueOf:void 0;function Qt(O){var j=-1,G=O?O.length:0;for(this.clear();++j<G;){var X=O[j];this.set(X[0],X[1])}}function ce(O){var j=-1,G=O?O.length:0;for(this.clear();++j<G;){var X=O[j];this.set(X[0],X[1])}}function he(O){var j=-1,G=O?O.length:0;for(this.clear();++j<G;){var X=O[j];this.set(X[0],X[1])}}function Fe(O){this.__data__=new ce(O)}function be(O,j,G){var X=O[j];wt.call(O,j)&&Nr(X,G)&&(G!==void 0||j in O)||(O[j]=G)}function He(O,j){for(var G=O.length;G--;)if(Nr(O[G][0],j))return G;return-1}function It(O,j,G,X,ht,Nt,Mt){var vt;if(X&&(vt=Nt?X(O,ht,Nt,Mt):X(O)),vt!==void 0)return vt;if(!At(O))return O;var Ft=q(O);if(Ft){if(vt=(function(ot){var Tt=ot.length,Pt=ot.constructor(Tt);return Tt&&typeof ot[0]=="string"&&wt.call(ot,"index")&&(Pt.index=ot.index,Pt.input=ot.input),Pt})(O),!j)return(function(ot,Tt){var Pt=-1,bt=ot.length;for(Tt||(Tt=Array(bt));++Pt<bt;)Tt[Pt]=ot[Pt];return Tt})(O,vt)}else{var jt=kt(O),Re=jt==_||jt==x;if(H(O))return(function(ot,Tt){if(Tt)return ot.slice();var Pt=new ot.constructor(ot.length);return ot.copy(Pt),Pt})(O,j);if(jt==b||jt==m||Re&&!Nt){if(pt(O))return Nt?O:{};if(vt=(function(ot){return typeof ot.constructor!="function"||ze(ot)?{}:At(Tt=Ct(ot))?nr(Tt):{};var Tt})(Re?{}:O),!j)return(function(ot,Tt){return Ar(ot,dr(ot),Tt)})(O,(function(ot,Tt){return ot&&Ar(Tt,mt(Tt),ot)})(vt,O))}else{if(!V[jt])return Nt?O:{};vt=(function(ot,Tt,Pt,bt){var Et,we=ot.constructor;switch(Tt){case K:return lr(ot);case f:case g:return new we(+ot);case W:return(function(_t,Gt){var $t=Gt?lr(_t.buffer):_t.buffer;return new _t.constructor($t,_t.byteOffset,_t.byteLength)})(ot,bt);case v:case B:case E:case R:case C:case S:case I:case D:case z:return(function(_t,Gt){var $t=Gt?lr(_t.buffer):_t.buffer;return new _t.constructor($t,_t.byteOffset,_t.length)})(ot,bt);case L:return(function(_t,Gt,$t){return dt(Gt?$t(gt(_t),!0):gt(_t),ut,new _t.constructor)})(ot,bt,Pt);case w:case T:return new we(ot);case y:return(function(_t){var Gt=new _t.constructor(_t.source,U.exec(_t));return Gt.lastIndex=_t.lastIndex,Gt})(ot);case A:return(function(_t,Gt,$t){return dt(Gt?$t(Zt(_t),!0):Zt(_t),st,new _t.constructor)})(ot,bt,Pt);case M:return Et=ot,ar?Object(ar.call(Et)):{}}})(O,jt,It,j)}}Mt||(Mt=new Fe);var ye=Mt.get(O);if(ye)return ye;if(Mt.set(O,vt),!Ft)var Ie=G?(function(ot){return(function(Tt,Pt,bt){var Et=Pt(Tt);return q(Tt)?Et:(function(we,_t){for(var Gt=-1,$t=_t.length,Ne=we.length;++Gt<$t;)we[Ne+Gt]=_t[Gt];return we})(Et,bt(Tt))})(ot,mt,dr)})(O):mt(O);return(function(ot,Tt){for(var Pt=-1,bt=ot?ot.length:0;++Pt<bt&&Tt(ot[Pt],Pt)!==!1;);})(Ie||O,(function(ot,Tt){Ie&&(ot=O[Tt=ot]),be(vt,Tt,It(ot,j,G,X,Tt,O,Mt))})),vt}function lr(O){var j=new O.constructor(O.byteLength);return new Wt(j).set(new Wt(O)),j}function Ar(O,j,G,X){G||(G={});for(var ht=-1,Nt=j.length;++ht<Nt;){var Mt=j[ht],vt=void 0;be(G,Mt,vt===void 0?O[Mt]:vt)}return G}function je(O,j){var G,X,ht=O.__data__;return((X=typeof(G=j))=="string"||X=="number"||X=="symbol"||X=="boolean"?G!=="__proto__":G===null)?ht[typeof j=="string"?"string":"hash"]:ht.map}function Ce(O,j){var G=(function(X,ht){return X?.[ht]})(O,j);return(function(X){return!(!At(X)||(ht=X,Vt&&Vt in ht))&&(J(X)||pt(X)?Dt:tt).test(qe(X));var ht})(G)?G:void 0}Qt.prototype.clear=function(){this.__data__=Yt?Yt(null):{}},Qt.prototype.delete=function(O){return this.has(O)&&delete this.__data__[O]},Qt.prototype.get=function(O){var j=this.__data__;if(Yt){var G=j[O];return G===u?void 0:G}return wt.call(j,O)?j[O]:void 0},Qt.prototype.has=function(O){var j=this.__data__;return Yt?j[O]!==void 0:wt.call(j,O)},Qt.prototype.set=function(O,j){return this.__data__[O]=Yt&&j===void 0?u:j,this},ce.prototype.clear=function(){this.__data__=[]},ce.prototype.delete=function(O){var j=this.__data__,G=He(j,O);return!(G<0||(G==j.length-1?j.pop():Br.call(j,G,1),0))},ce.prototype.get=function(O){var j=this.__data__,G=He(j,O);return G<0?void 0:j[G][1]},ce.prototype.has=function(O){return He(this.__data__,O)>-1},ce.prototype.set=function(O,j){var G=this.__data__,X=He(G,O);return X<0?G.push([O,j]):G[X][1]=j,this},he.prototype.clear=function(){this.__data__={hash:new Qt,map:new(me||ce),string:new Qt}},he.prototype.delete=function(O){return je(this,O).delete(O)},he.prototype.get=function(O){return je(this,O).get(O)},he.prototype.has=function(O){return je(this,O).has(O)},he.prototype.set=function(O,j){return je(this,O).set(O,j),this},Fe.prototype.clear=function(){this.__data__=new ce},Fe.prototype.delete=function(O){return this.__data__.delete(O)},Fe.prototype.get=function(O){return this.__data__.get(O)},Fe.prototype.has=function(O){return this.__data__.has(O)},Fe.prototype.set=function(O,j){var G=this.__data__;if(G instanceof ce){var X=G.__data__;if(!me||X.length<199)return X.push([O,j]),this;G=this.__data__=new he(X)}return G.set(O,j),this};var dr=sr?St(sr,Object):function(){return[]},kt=function(O){return Kt.call(O)};function wr(O,j){return!!(j=j??p)&&(typeof O=="number"||Q.test(O))&&O>-1&&O%1==0&&O<j}function ze(O){var j=O&&O.constructor;return O===(typeof j=="function"&&j.prototype||zt)}function qe(O){if(O!=null){try{return Bt.call(O)}catch{}try{return O+""}catch{}}return""}function Nr(O,j){return O===j||O!=O&&j!=j}(Pe&&kt(new Pe(new ArrayBuffer(1)))!=W||me&&kt(new me)!=L||re&&kt(re.resolve())!=h||ae&&kt(new ae)!=A||ne&&kt(new ne)!=F)&&(kt=function(O){var j=Kt.call(O),G=j==b?O.constructor:void 0,X=G?qe(G):void 0;if(X)switch(X){case $e:return W;case le:return L;case Ue:return h;case Me:return A;case or:return F}return j});var q=Array.isArray;function k(O){return O!=null&&(function(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=p})(O.length)&&!J(O)}var H=ir||function(){return!1};function J(O){var j=At(O)?Kt.call(O):"";return j==_||j==x}function At(O){var j=typeof O;return!!O&&(j=="object"||j=="function")}function mt(O){return k(O)?(function(j,G){var X=q(j)||(function(vt){return(function(Ft){return(function(jt){return!!jt&&typeof jt=="object"})(Ft)&&k(Ft)}
49)(vt)&&wt.call(vt,"callee")&&(!De.call(vt,"callee")||Kt.call(vt)==m)})(j)?(function(vt,Ft){for(var jt=-1,Re=Array(vt);++jt<vt;)Re[jt]=Ft(jt);return Re})(j.length,String):[],ht=X.length,Nt=!!ht;for(var Mt in j)!wt.call(j,Mt)||Nt&&(Mt=="length"||wr(Mt,ht))||X.push(Mt);return X})(O):(function(j){if(!ze(j))return Er(j);var G=[];for(var X in Object(j))wt.call(j,X)&&X!="constructor"&&G.push(X);return G})(O)}a.exports=function(O){return It(O,!0,!0)}},307:(a,l,c)=>{a=c.nmd(a);var u="__lodash_hash_undefined__",p=9007199254740991,m="[object Arguments]",f="[object Array]",g="[object Boolean]",_="[object Date]",x="[object Error]",L="[object Function]",w="[object Map]",b="[object Number]",h="[object Object]",y="[object Promise]",A="[object RegExp]",T="[object Set]",M="[object String]",F="[object WeakMap]",K="[object ArrayBuffer]",W="[object DataView]",v=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,E={};E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E[m]=E[f]=E[K]=E[g]=E[W]=E[_]=E[x]=E[L]=E[w]=E[b]=E[h]=E[A]=E[T]=E[M]=E[F]=!1;var R=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g,C=typeof self=="object"&&self&&self.Object===Object&&self,S=R||C||Function("return this")(),I=l&&!l.nodeType&&l,D=I&&a&&!a.nodeType&&a,z=D&&D.exports===I,U=z&&R.process,tt=(function(){try{return U&&U.binding&&U.binding("util")}catch{}})(),Q=tt&&tt.isTypedArray;function V(q,k){for(var H=-1,J=q==null?0:q.length;++H<J;)if(k(q[H],H,q))return!0;return!1}function ft(q){var k=-1,H=Array(q.size);return q.forEach((function(J,At){H[++k]=[At,J]})),H}function Y(q){var k=-1,H=Array(q.size);return q.forEach((function(J){H[++k]=J})),H}var nt,ct,Z,lt=Array.prototype,ut=Function.prototype,st=Object.prototype,dt=S["__core-js_shared__"],pt=ut.toString,gt=st.hasOwnProperty,St=(nt=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+nt:"",Zt=st.toString,ue=RegExp("^"+pt.call(gt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=z?S.Buffer:void 0,Xt=S.Symbol,zt=S.Uint8Array,oe=st.propertyIsEnumerable,Vt=lt.splice,Bt=Xt?Xt.toStringTag:void 0,wt=Object.getOwnPropertySymbols,Kt=ee?ee.isBuffer:void 0,Dt=(ct=Object.keys,Z=Object,function(q){return ct(Z(q))}),Rt=he(S,"DataView"),Lt=he(S,"Map"),Wt=he(S,"Promise"),Ct=he(S,"Set"),nr=he(S,"WeakMap"),De=he(Object,"create"),Br=It(Rt),sr=It(Lt),ir=It(Wt),Er=It(Ct),Pe=It(nr),me=Xt?Xt.prototype:void 0,re=me?me.valueOf:void 0;function ae(q){var k=-1,H=q==null?0:q.length;for(this.clear();++k<H;){var J=q[k];this.set(J[0],J[1])}}function ne(q){var k=-1,H=q==null?0:q.length;for(this.clear();++k<H;){var J=q[k];this.set(J[0],J[1])}}function Yt(q){var k=-1,H=q==null?0:q.length;for(this.clear();++k<H;){var J=q[k];this.set(J[0],J[1])}}function $e(q){var k=-1,H=q==null?0:q.length;for(this.__data__=new Yt;++k<H;)this.add(q[k])}function le(q){var k=this.__data__=new ne(q);this.size=k.size}function Ue(q,k){for(var H=q.length;H--;)if(lr(q[H][0],k))return H;return-1}function Me(q){return q==null?q===void 0?"[object Undefined]":"[object Null]":Bt&&Bt in Object(q)?(function(k){var H=gt.call(k,Bt),J=k[Bt];try{k[Bt]=void 0;var At=!0}catch{}var mt=Zt.call(k);return At&&(H?k[Bt]=J:delete k[Bt]),mt})(q):(function(k){return Zt.call(k)})(q)}function or(q){return ze(q)&&Me(q)==m}function Le(q,k,H,J,At){return q===k||(q==null||k==null||!ze(q)&&!ze(k)?q!=q&&k!=k:(function(mt,O,j,G,X,ht){var Nt=je(mt),Mt=je(O),vt=Nt?f:be(mt),Ft=Mt?f:be(O),jt=(vt=vt==m?h:vt)==h,Re=(Ft=Ft==m?h:Ft)==h,ye=vt==Ft;if(ye&&Ce(mt)){if(!Ce(O))return!1;Nt=!0,jt=!1}if(ye&&!jt)return ht||(ht=new le),Nt||qe(mt)?ar(mt,O,j,G,X,ht):(function(bt,Et,we,_t,Gt,$t,Ne){switch(we){case W:if(bt.byteLength!=Et.byteLength||bt.byteOffset!=Et.byteOffset)return!1;bt=bt.buffer,Et=Et.buffer;case K:return!(bt.byteLength!=Et.byteLength||!$t(new zt(bt),new zt(Et)));case g:case _:case b:return lr(+bt,+Et);case x:return bt.name==Et.name&&bt.message==Et.message;case A:case M:return bt==Et+"";case w:var ve=ft;case T:var fe=1&_t;if(ve||(ve=Y),bt.size!=Et.size&&!fe)return!1;var de=Ne.get(bt);if(de)return de==Et;_t|=2,Ne.set(bt,Et);var se=ar(ve(bt),ve(Et),_t,Gt,$t,Ne);return Ne.delete(bt),se;case"[object Symbol]":if(re)return re.call(bt)==re.call(Et)}return!1})(mt,O,vt,j,G,X,ht);if(!(1&j)){var Ie=jt&>.call(mt,"__wrapped__"),ot=Re&>.call(O,"__wrapped__");
49if(Ie||ot){var Tt=Ie?mt.value():mt,Pt=ot?O.value():O;return ht||(ht=new le),X(Tt,Pt,j,G,ht)}}return!!ye&&(ht||(ht=new le),(function(bt,Et,we,_t,Gt,$t){var Ne=1&we,ve=Qt(bt),fe=ve.length;if(fe!=Qt(Et).length&&!Ne)return!1;for(var de=fe;de--;){var se=ve[de];if(!(Ne?se in Et:gt.call(Et,se)))return!1}var Zr=$t.get(bt);if(Zr&&$t.get(Et))return Zr==Et;var Te=!0;$t.set(bt,Et),$t.set(Et,bt);for(var Dr=Ne;++de<fe;){var Tr=bt[se=ve[de]],xr=Et[se];if(_t)var Xr=Ne?_t(xr,Tr,se,Et,bt,$t):_t(Tr,xr,se,bt,Et,$t);if(!(Xr===void 0?Tr===xr||Gt(Tr,xr,we,_t,$t):Xr)){Te=!1;break}Dr||(Dr=se=="constructor")}if(Te&&!Dr){var pr=bt.constructor,Jt=Et.constructor;pr==Jt||!("constructor"in bt)||!("constructor"in Et)||typeof pr=="function"&&pr instanceof pr&&typeof Jt=="function"&&Jt instanceof Jt||(Te=!1)}return $t.delete(bt),$t.delete(Et),Te})(mt,O,j,G,X,ht))})(q,k,H,J,Le,At))}function ar(q,k,H,J,At,mt){var O=1&H,j=q.length,G=k.length;if(j!=G&&!(O&&G>j))return!1;var X=mt.get(q);if(X&&mt.get(k))return X==k;var ht=-1,Nt=!0,Mt=2&H?new $e:void 0;for(mt.set(q,k),mt.set(k,q);++ht<j;){var vt=q[ht],Ft=k[ht];if(J)var jt=O?J(Ft,vt,ht,k,q,mt):J(vt,Ft,ht,q,k,mt);if(jt!==void 0){if(jt)continue;Nt=!1;break}if(Mt){if(!V(k,(function(Re,ye){if(Ie=ye,!Mt.has(Ie)&&(vt===Re||At(vt,Re,H,J,mt)))return Mt.push(ye);var Ie}))){Nt=!1;break}}else if(vt!==Ft&&!At(vt,Ft,H,J,mt)){Nt=!1;break}}return mt.delete(q),mt.delete(k),Nt}function Qt(q){return(function(k,H,J){var At=H(k);return je(k)?At:(function(mt,O){for(var j=-1,G=O.length,X=mt.length;++j<G;)mt[X+j]=O[j];return mt})(At,J(k))})(q,Nr,Fe)}function ce(q,k){var H,J,At=q.__data__;return((J=typeof(H=k))=="string"||J=="number"||J=="symbol"||J=="boolean"?H!=="__proto__":H===null)?At[typeof k=="string"?"string":"hash"]:At.map}function he(q,k){var H=(function(J,At){return J?.[At]})(q,k);return(function(J){return!(!wr(J)||(function(At){return!!St&&St in At})(J))&&(dr(J)?ue:v).test(It(J))})(H)?H:void 0}ae.prototype.clear=function(){this.__data__=De?De(null):{},this.size=0},ae.prototype.delete=function(q){var k=this.has(q)&&delete this.__data__[q];return this.size-=k?1:0,k},ae.prototype.get=function(q){var k=this.__data__;if(De){var H=k[q];return H===u?void 0:H}return gt.call(k,q)?k[q]:void 0},ae.prototype.has=function(q){var k=this.__data__;return De?k[q]!==void 0:gt.call(k,q)},ae.prototype.set=function(q,k){var H=this.__data__;return this.size+=this.has(q)?0:1,H[q]=De&&k===void 0?u:k,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(q){var k=this.__data__,H=Ue(k,q);return!(H<0||(H==k.length-1?k.pop():Vt.call(k,H,1),--this.size,0))},ne.prototype.get=function(q){var k=this.__data__,H=Ue(k,q);return H<0?void 0:k[H][1]},ne.prototype.has=function(q){return Ue(this.__data__,q)>-1},ne.prototype.set=function(q,k){var H=this.__data__,J=Ue(H,q);return J<0?(++this.size,H.push([q,k])):H[J][1]=k,this},Yt.prototype.clear=function(){this.size=0,this.__data__={hash:new ae,map:new(Lt||ne),string:new ae}},Yt.prototype.delete=function(q){var k=ce(this,q).delete(q);return this.size-=k?1:0,k},Yt.prototype.get=function(q){return ce(this,q).get(q)},Yt.prototype.has=function(q){return ce(this,q).has(q)},Yt.prototype.set=function(q,k){var H=ce(this,q),J=H.size;return H.set(q,k),this.size+=H.size==J?0:1,this},$e.prototype.add=$e.prototype.push=function(q){return this.__data__.set(q,u),this},$e.prototype.has=function(q){return this.__data__.has(q)},le.prototype.clear=function(){this.__data__=new ne,this.size=0},le.prototype.delete=function(q){var k=this.__data__,H=k.delete(q);return this.size=k.size,H},le.prototype.get=function(q){return this.__data__.get(q)},le.prototype.has=function(q){return this.__data__.has(q)},le.prototype.set=function(q,k){var H=this.__data__;if(H instanceof ne){var J=H.__data__;if(!Lt||J.length<199)return J.push([q,k]),this.size=++H.size,this;H=this.__data__=new Yt(J)}return H.set(q,k),this.size=H.size,this};var Fe=wt?function(q){return q==null?[]:(q=Object(q),(function(k,H){for(var J=-1,At=k==null?0:k.length,mt=0,O=[];++J<At;){var j=k[J];G=j,oe.call(q,G)&&(O[mt++]=j)}var G;return O})(wt(q)))}:function(){return[]},be=Me;function He(q,k){return!!(k=k??p)&&(typeof q=="number"||B.test(q))&&q>-1&&q%1==0&&q<k}function It(q){if(q!=null){try{return pt.call(q)}catch{}try{return q+""}catch{}}return""}
49function lr(q,k){return q===k||q!=q&&k!=k}(Rt&&be(new Rt(new ArrayBuffer(1)))!=W||Lt&&be(new Lt)!=w||Wt&&be(Wt.resolve())!=y||Ct&&be(new Ct)!=T||nr&&be(new nr)!=F)&&(be=function(q){var k=Me(q),H=k==h?q.constructor:void 0,J=H?It(H):"";if(J)switch(J){case Br:return W;case sr:return w;case ir:return y;case Er:return T;case Pe:return F}return k});var Ar=or((function(){return arguments})())?or:function(q){return ze(q)&>.call(q,"callee")&&!oe.call(q,"callee")},je=Array.isArray,Ce=Kt||function(){return!1};function dr(q){if(!wr(q))return!1;var k=Me(q);return k==L||k=="[object GeneratorFunction]"||k=="[object AsyncFunction]"||k=="[object Proxy]"}function kt(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=p}function wr(q){var k=typeof q;return q!=null&&(k=="object"||k=="function")}function ze(q){return q!=null&&typeof q=="object"}var qe=Q?(function(q){return function(k){return q(k)}})(Q):function(q){return ze(q)&&kt(q.length)&&!!E[Me(q)]};function Nr(q){return(k=q)!=null&&kt(k.length)&&!dr(k)?(function(H,J){var At=je(H),mt=!At&&Ar(H),O=!At&&!mt&&Ce(H),j=!At&&!mt&&!O&&qe(H),G=At||mt||O||j,X=G?(function(Mt,vt){for(var Ft=-1,jt=Array(Mt);++Ft<Mt;)jt[Ft]=vt(Ft);return jt})(H.length,String):[],ht=X.length;for(var Nt in H)!gt.call(H,Nt)||G&&(Nt=="length"||O&&(Nt=="offset"||Nt=="parent")||j&&(Nt=="buffer"||Nt=="byteLength"||Nt=="byteOffset")||He(Nt,ht))||X.push(Nt);return X})(q):(function(H){if(At=(J=H)&&J.constructor,J!==(typeof At=="function"&&At.prototype||st))return Dt(H);var J,At,mt=[];for(var O in Object(H))gt.call(H,O)&&O!="constructor"&&mt.push(O);return mt})(q);var k}a.exports=function(q,k){return Le(q,k)}},210:function(a,l,c){var u=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(l,"__esModule",{value:!0});var p,m=u(c(465)),f=u(c(307));(function(g){g.compose=function(_,x,L){_===void 0&&(_={}),x===void 0&&(x={}),typeof _!="object"&&(_={}),typeof x!="object"&&(x={});var w=m.default(x);for(var b in L||(w=Object.keys(w).reduce((function(h,y){return w[y]!=null&&(h[y]=w[y]),h}),{})),_)_[b]!==void 0&&x[b]===void 0&&(w[b]=_[b]);return Object.keys(w).length>0?w:void 0},g.diff=function(_,x){_===void 0&&(_={}),x===void 0&&(x={}),typeof _!="object"&&(_={}),typeof x!="object"&&(x={});var L=Object.keys(_).concat(Object.keys(x)).reduce((function(w,b){return f.default(_[b],x[b])||(w[b]=x[b]===void 0?null:x[b]),w}),{});return Object.keys(L).length>0?L:void 0},g.invert=function(_,x){_===void 0&&(_={}),x===void 0&&(x={}),_=_||{};var L=Object.keys(x).reduce((function(w,b){return x[b]!==_[b]&&_[b]!==void 0&&(w[b]=x[b]),w}),{});return Object.keys(_).reduce((function(w,b){return _[b]!==x[b]&&x[b]===void 0&&(w[b]=null),w}),L)},g.transform=function(_,x,L){if(L===void 0&&(L=!1),typeof _!="object")return x;if(typeof x=="object"){if(!L)return x;var w=Object.keys(x).reduce((function(b,h){return _[h]===void 0&&(b[h]=x[h]),b}),{});return Object.keys(w).length>0?w:void 0}}})(p||(p={})),l.default=p},895:function(a,l,c){var u=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}},p=u(c(529)),m=u(c(465)),f=u(c(307)),g=u(c(210)),_=u(c(430)),x="\0",L=(function(){function w(b){Array.isArray(b)?this.ops=b:b!=null&&Array.isArray(b.ops)?this.ops=b.ops:this.ops=[]}return w.prototype.insert=function(b,h){var y={};return typeof b=="string"&&b.length===0?this:(y.insert=b,h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(y.attributes=h),this.push(y))},w.prototype.delete=function(b){return b<=0?this:this.push({delete:b})},w.prototype.retain=function(b,h){if(b<=0)return this;var y={retain:b};return h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(y.attributes=h),this.push(y)},w.prototype.push=function(b){var h=this.ops.length,y=this.ops[h-1];if(b=m.default(b),typeof y=="object"){if(typeof b.delete=="number"&&typeof y.delete=="number")return this.ops[h-1]={delete:y.delete+b.delete},this;if(typeof y.delete=="number"&&b.insert!=null&&(h-=1,typeof(y=this.ops[h-1])!="object"))return this.ops.unshift(b),this;if(f.default(b.attributes,y.attributes)){if(typeof b.insert=="string"&&typeof y.insert=="string")return this.ops[h-1]={insert:y.insert+b.insert},typeof b.attributes=="object"&&(this.ops[h-1].attributes=b.attributes),this;if(typeof b.retain=="number"&&typeof y.retain=="number")return this.ops[h-1]={retain:y.retain+b.retain},typeof b.attributes=="object"&&(this.ops[h-1].attributes=b.attributes),this}}return h===this.ops.length?this.ops.push(b):this.ops.splice(h,0,b),this},w.prototype.chop=function(){var b=this.ops[this.ops.length-1];return b&&b.retain&&!b.attributes&&this.ops.pop(),this},w.prototype.filter=function(b){return this.ops.filter(b)},w.prototype.forEach=function(b){this.ops.forEach(b)},w.prototype.map=function(b){return this.ops.map(b)},w.prototype.partition=function(b){var h=[],y=[];return this.forEach((function(A){(b(A)?h:y).push(A)})),[h,y]},w.prototype.reduce=function(b,h){return this.ops.reduce(b,h)},w.prototype.changeLength=function(){return this.reduce((function(b,h){return h.insert?b+_.default.length(h):h.delete?b-h.delete:b}),0)},w.prototype.length=function(){return this.reduce((function(b,h){return b+_.default.length(h)}),0)},w.prototype.slice=function(b,h){b===void 0&&(b=0),h===void 0&&(h=1/0);for(var y=[],A=_.default.iterator(this.ops),T=0;T<h&&A.hasNext();){var M=void 0;T<b?M=A.next(b-T):(M=A.next(h-T),y.push(M)),T+=_.default.length(M)}return new w(y)},w.prototype.compose=function(b){var h=_.default.iterator(this.ops),y=_.default.iterator(b.ops),A=[],T=y.peek();if(T!=null&&typeof T.retain=="number"&&T.attributes==null){for(var M=T.retain;h.peekType()==="insert"&&h.peekLength()<=M;)M-=h.peekLength(),A.push(h.next());T.retain-M>0&&y.next(T.retain-M)}for(var F=new w(A);h.hasNext()||y.hasNext();)if(y.peekType()==="insert")F.push(y.next());else if(h.peekType()==="delete")F.push(h.next());else{var K=Math.min(h.peekLength(),y.peekLength()),W=h.next(K),v=y.next(K);if(typeof v.retain=="number"){var B={};typeof W.retain=="number"?B.retain=K:B.insert=W.insert;var E=g.default.compose(W.attributes,v.attributes,typeof W.retain=="number");if(E&&(B.attributes=E),F.push(B),!y.hasNext()&&f.default(F.ops[F.ops.length-1],B)){var R=new w(h.rest());return F.concat(R).chop()}}else typeof v.delete=="number"&&typeof W.retain=="number"&&F.push(v)}return F.chop()},w.prototype.concat=function(b){var h=new w(this.ops.slice());return b.ops.length>0&&(h.push(b.ops[0]),h.ops=h.ops.concat(b.ops.slice(1))),h},w.prototype.diff=function(b,h){if(this.ops===b.ops)return new w;var y=[this,b].map((function(K){return K.map((function(W){if(W.insert!=null)return typeof W.insert=="string"?W.insert:x;throw new Error("diff() called "+(K===b?"on":"with")+" non-document")})).join("")})),A=new w,T=p.default(y[0],y[1],h),M=_.default.iterator(this.ops),F=_.default.iterator(b.ops);return T.forEach((function(K){for(var W=K[1].length;W>0;){var v=0;switch(K[0]){case p.default.INSERT:v=Math.min(F.peekLength(),W),A.push(F.next(v));break;case p.default.DELETE:v=Math.min(W,M.peekLength()),M.next(v),A.delete(v);break;case p.default.EQUAL:v=Math.min(M.peekLength(),F.peekLength(),W);var B=M.next(v),E=F.next(v);f.default(B.insert,E.insert)?A.retain(v,g.default.diff(B.attributes,E.attributes)):A.push(E).delete(v)}W-=v}})),A.chop()},w.prototype.eachLine=function(b,h){h===void 0&&(h=` 50`);for(var y=_.default.iterator(this.ops),A=new w,T=0;y.hasNext();){if(y.peekType()!=="insert")return;var M=y.peek(),F=_.default.length(M)-y.peekLength(),K=typeof M.insert=="string"?M.insert.indexOf(h,F)-F:-1;if(K<0)A.push(y.next());else if(K>0)A.push(y.next(K));else{if(b(A,y.next(1).attributes||{},T)===!1)return;T+=1,A=new w}}A.length()>0&&b(A,{},T)},w.prototype.invert=function(b){var h=new w;return this.reduce((function(y,A){if(A.insert)h.delete(_.default.length(A));else{if(A.retain&&A.attributes==null)return h.retain(A.retain),y+A.retain;if(A.delete||A.retain&&A.attributes){var T=A.delete||A.retain;return b.slice(y,y+T).forEach((function(M){A.delete?h.push(M):A.retain&&A.attributes&&h.retain(_.default.length(M),g.default.invert(A.attributes,M.attributes))})),y+T}}return y}),0),h.chop()},w.prototype.transform=function(b,h){if(h===void 0&&(h=!1),h=!!h,typeof b=="number")return this.transformPosition(b,h);for(var y=b,A=_.default.iterator(this.ops),T=_.default.iterator(y.ops),M=new w;A.hasNext()||T.hasNext();
50)if(A.peekType()!=="insert"||!h&&T.peekType()==="insert")if(T.peekType()==="insert")M.push(T.next());else{var F=Math.min(A.peekLength(),T.peekLength()),K=A.next(F),W=T.next(F);if(K.delete)continue;W.delete?M.push(W):M.retain(F,g.default.transform(K.attributes,W.attributes,h))}else M.retain(_.default.length(A.next()));return M.chop()},w.prototype.transformPosition=function(b,h){h===void 0&&(h=!1),h=!!h;for(var y=_.default.iterator(this.ops),A=0;y.hasNext()&&A<=b;){var T=y.peekLength(),M=y.peekType();y.next(),M!=="delete"?(M==="insert"&&(A<b||!h)&&(b+=T),A+=T):b-=Math.min(T,b-A)}return b},w.Op=_.default,w.AttributeMap=g.default,w})();a.exports=L},977:function(a,l,c){var u=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(l,"__esModule",{value:!0});var p=u(c(430)),m=(function(){function f(g){this.ops=g,this.index=0,this.offset=0}return f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(g){g||(g=1/0);var _=this.ops[this.index];if(_){var x=this.offset,L=p.default.length(_);if(g>=L-x?(g=L-x,this.index+=1,this.offset=0):this.offset+=g,typeof _.delete=="number")return{delete:g};var w={};return _.attributes&&(w.attributes=_.attributes),typeof _.retain=="number"?w.retain=g:typeof _.insert=="string"?w.insert=_.insert.substr(x,g):w.insert=_.insert,w}return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?p.default.length(this.ops[this.index])-this.offset:1/0},f.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"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var g=this.offset,_=this.index,x=this.next(),L=this.ops.slice(this.index);return this.offset=g,this.index=_,[x].concat(L)}return[]},f})();l.default=m},430:function(a,l,c){var u=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(l,"__esModule",{value:!0});var p,m=u(c(977));(function(f){f.iterator=function(g){return new m.default(g)},f.length=function(g){return typeof g.delete=="number"?g.delete:typeof g.retain=="number"?g.retain:typeof g.insert=="string"?g.insert.length:1}})(p||(p={})),l.default=p},165:function(a,l,c){var u,p;(p=typeof(u=function(){var m,f={};function g(L,w,b){var h=L.getClientRects();if(h.length===2){var y=L.getBoundingClientRect();return h[w][b]<y[b]}return!1}function _(L){if(!L||screen.deviceXDPI===screen.logicalXDPI)return L;if("length"in L)return Array.prototype.map.call(L,_);var w=screen.deviceXDPI/screen.logicalXDPI;return{top:L.top/w,bottom:L.bottom/w,left:L.left/w,right:L.right/w,width:L.width/w,height:L.height/w}}function x(L,w){var b,h=0,y=1024;if(y>=w.length)return Array.prototype.push.apply(L,w);for(;h<w.length;)b=Array.prototype.push.apply(L,Array.prototype.slice.call(w,h,h+y)),h+=y;return b}return f.isBroken=function(){if(m===void 0){var L=document.createElement("p"),w=document.createElement("span"),b=document.createTextNode("aa"),h=document.createTextNode("aa"),y=document.createElement("img");y.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=");var A=document.createRange();if(m={},L.appendChild(b),L.appendChild(w),w.appendChild(y),w.appendChild(h),document.body.appendChild(L),A.setStart(b,1),A.setEnd(w,0),m.getClientRects=m.getBoundingClientRect=A.getClientRects().length>1,m.getClientRects||(A.setEnd(h,1),m.getClientRects=m.getBoundingClientRect=A.getClientRects().length===2),!m.getBoundingClientRect){A.setEnd(A.startContainer,A.startOffset);var T=A.getBoundingClientRect();m.getBoundingClientRect=T.top===0&&T.left===0}if(document.body.removeChild(L),!m.getBoundingClientRect){var M=document.createElement("p");M.style.width="0px",M.style.fontSize="20px",M.style.whiteSpace="normal",M.style.wordBreak="normal";var F=document.createTextNode("m mm");M.appendChild(F),document.body.appendChild(M),A.setStart(F,1),A.setEnd(F,2),g(A,1,"left")?m.getBoundingClientRect=!0:(A.setStart(F,1),A.setEnd(F,3),g(A,0,"top")&&(m.getBoundingClientRect=!0)),document.body.removeChild(M)}var K=window.ActiveXObject&&new Function("/*@cc_on return @_jscript_version; @*/")();m.ieZoom=!!K&&K<=10}return m},f.getClientRects=function(L){var w=this.isBroken();if(w.ieZoom)return _(L.getClientRects());if(!w.getClientRects)return L.getClientRects();var b=[],h=[],y=L.endContainer,A=L.endOffset,T=document.createRange();function M(F){for(var K=0;F=F.previousSibling;)K++;return K}for(;y!==L.commonAncestorContainer;)T.setStart(y,0),T.setEnd(y,A),x(h,T.getClientRects()),A=M(y),y=y.parentNode;return(T=L.cloneRange()).setEnd(y,A),x(b,T.getClientRects()),x(b,h),b},f.getBoundingClientRect=function(L){var w=this.getClientRects(L);if(w.length===0)return null;var b,h=L.getBoundingClientRect(),y=this.isBroken();if(y.ieZoom)return _(h);if(!y.getBoundingClientRect)return h;if(h.width===0&&h.height===0)return w[0];for(var A=0,T=w.length;A<T;A++){var M=w[A];b?(b.left=Math.min(b.left,M.left),b.top=Math.min(b.top,M.top),b.right=Math.max(b.right,M.right),b.bottom=Math.max(b.bottom,M.bottom)):b={left:M.left,top:M.top,right:M.right,bottom:M.bottom}}return b&&(b.width=b.right-b.left,b.height=b.bottom-b.top),b},f})=="function"?u.call(l,c,l,a):u)===void 0||(a.exports=p)},33:(a,l,c)=>{c.r(l),c.d(l,{default:()=>E});var u=(function(){if(typeof Map<"u")return Map;function R(C,S){var I=-1;return C.some((function(D,z){return D[0]===S&&(I=z,!0)})),I}return(function(){function C(){this.__entries__=[]}return Object.defineProperty(C.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),C.prototype.get=function(S){var I=R(this.__entries__,S),D=this.__entries__[I];return D&&D[1]},C.prototype.set=function(S,I){var D=R(this.__entries__,S);~D?this.__entries__[D][1]=I:this.__entries__.push([S,I])},C.prototype.delete=function(S){var I=this.__entries__,D=R(I,S);~D&&I.splice(D,1)},C.prototype.has=function(S){return!!~R(this.__entries__,S)},C.prototype.clear=function(){this.__entries__.splice(0)},C.prototype.forEach=function(S,I){I===void 0&&(I=null);for(var D=0,z=this.__entries__;D<z.length;D++){var U=z[D];S.call(I,U[1],U[0])}},C})()})(),p=typeof window<"u"&&typeof document<"u"&&window.document===document,m=c.g!==void 0&&c.g.Math===Math?c.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),f=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(m):function(R){return setTimeout((function(){return R(Date.now())}),1e3/60)},g=["top","right","bottom","left","width","height","size","weight"],_=typeof MutationObserver<"u",x=(function(){function R(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(function(C,S){var I=!1,D=!1,z=0;function U(){I&&(I=!1,C()),D&&Q()}function tt(){f(U)}function Q(){var V=Date.now();
50if(I){if(V-z<2)return;D=!0}else I=!0,D=!1,setTimeout(tt,20);z=V}return Q})(this.refresh.bind(this))}return R.prototype.addObserver=function(C){~this.observers_.indexOf(C)||this.observers_.push(C),this.connected_||this.connect_()},R.prototype.removeObserver=function(C){var S=this.observers_,I=S.indexOf(C);~I&&S.splice(I,1),!S.length&&this.connected_&&this.disconnect_()},R.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},R.prototype.updateObservers_=function(){var C=this.observers_.filter((function(S){return S.gatherActive(),S.hasActive()}));return C.forEach((function(S){return S.broadcastActive()})),C.length>0},R.prototype.connect_=function(){p&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),_?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},R.prototype.disconnect_=function(){p&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},R.prototype.onTransitionEnd_=function(C){var S=C.propertyName,I=S===void 0?"":S;g.some((function(D){return!!~I.indexOf(D)}))&&this.refresh()},R.getInstance=function(){return this.instance_||(this.instance_=new R),this.instance_},R.instance_=null,R})(),L=function(R,C){for(var S=0,I=Object.keys(C);S<I.length;S++){var D=I[S];Object.defineProperty(R,D,{value:C[D],enumerable:!1,writable:!1,configurable:!0})}return R},w=function(R){return R&&R.ownerDocument&&R.ownerDocument.defaultView||m},b=M(0,0,0,0);function h(R){return parseFloat(R)||0}function y(R){for(var C=[],S=1;S<arguments.length;S++)C[S-1]=arguments[S];return C.reduce((function(I,D){return I+h(R["border-"+D+"-width"])}),0)}var A=typeof SVGGraphicsElement<"u"?function(R){return R instanceof w(R).SVGGraphicsElement}:function(R){return R instanceof w(R).SVGElement&&typeof R.getBBox=="function"};function T(R){return p?A(R)?(function(C){var S=C.getBBox();return M(0,0,S.width,S.height)})(R):(function(C){var S=C.clientWidth,I=C.clientHeight;if(!S&&!I)return b;var D=w(C).getComputedStyle(C),z=(function(nt){for(var ct={},Z=0,lt=["top","right","bottom","left"];Z<lt.length;Z++){var ut=lt[Z],st=nt["padding-"+ut];ct[ut]=h(st)}return ct})(D),U=z.left+z.right,tt=z.top+z.bottom,Q=h(D.width),V=h(D.height);if(D.boxSizing==="border-box"&&(Math.round(Q+U)!==S&&(Q-=y(D,"left","right")+U),Math.round(V+tt)!==I&&(V-=y(D,"top","bottom")+tt)),!(function(nt){return nt===w(nt).document.documentElement})(C)){var ft=Math.round(Q+U)-S,Y=Math.round(V+tt)-I;Math.abs(ft)!==1&&(Q-=ft),Math.abs(Y)!==1&&(V-=Y)}return M(z.left,z.top,Q,V)})(R):b}function M(R,C,S,I){return{x:R,y:C,width:S,height:I}}var F=(function(){function R(C){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=M(0,0,0,0),this.target=C}return R.prototype.isActive=function(){var C=T(this.target);return this.contentRect_=C,C.width!==this.broadcastWidth||C.height!==this.broadcastHeight},R.prototype.broadcastRect=function(){var C=this.contentRect_;return this.broadcastWidth=C.width,this.broadcastHeight=C.height,C},R})(),K=function(R,C){var S,I,D,z,U,tt,Q,V=(I=(S=C).x,D=S.y,z=S.width,U=S.height,tt=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,Q=Object.create(tt.prototype),L(Q,{x:I,y:D,width:z,height:U,top:D,right:I+z,bottom:U+D,left:I}),Q);L(this,{target:R,contentRect:V})},W=(function(){function R(C,S,I){if(this.activeObservations_=[],this.observations_=new u,typeof C!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=C,this.controller_=S,this.callbackCtx_=I}return R.prototype.observe=function(C){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(C instanceof w(C).Element))throw new TypeError('parameter 1 is not of type "Element".');var S=this.observations_;S.has(C)||(S.set(C,new F(C)),this.controller_.addObserver(this),this.controller_.refresh())}},R.prototype.unobserve=function(C){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(C instanceof w(C).Element))throw new TypeError('parameter 1 is not of type "Element".');var S=this.observations_;S.has(C)&&(S.delete(C),S.size||this.controller_.removeObserver(this))}},R.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},R.prototype.gatherActive=function(){var C=this;this.clearActive(),this.observations_.forEach((function(S){S.isActive()&&C.activeObservations_.push(S)}))},R.prototype.broadcastActive=function(){if(this.hasActive()){var C=this.callbackCtx_,S=this.activeObservations_.map((function(I){return new K(I.target,I.broadcastRect())}
50));this.callback_.call(C,S,C),this.clearActive()}},R.prototype.clearActive=function(){this.activeObservations_.splice(0)},R.prototype.hasActive=function(){return this.activeObservations_.length>0},R})(),v=typeof WeakMap<"u"?new WeakMap:new u,B=function R(C){if(!(this instanceof R))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var S=x.getInstance(),I=new W(C,S,this);v.set(this,I)};["observe","unobserve","disconnect"].forEach((function(R){B.prototype[R]=function(){var C;return(C=v.get(this))[R].apply(C,arguments)}}));const E=m.ResizeObserver!==void 0?m.ResizeObserver:B},413:(a,l,c)=>{c.r(l),c.d(l,{default:()=>M});var u=c(379),p=c.n(u),m=c(795),f=c.n(m),g=c(569),_=c.n(g),x=c(565),L=c.n(x),w=c(216),b=c.n(w),h=c(589),y=c.n(h),A=c(582),T={};T.styleTagTransform=y(),T.setAttributes=L(),T.insert=_().bind(null,"head"),T.domAPI=f(),T.insertStyleElement=b(),p()(A.Z,T);const M=A.Z&&A.Z.locals?A.Z.locals:void 0},379:a=>{var l=[];function c(m){for(var f=-1,g=0;g<l.length;g++)if(l[g].identifier===m){f=g;break}return f}function u(m,f){for(var g={},_=[],x=0;x<m.length;x++){var L=m[x],w=f.base?L[0]+f.base:L[0],b=g[w]||0,h="".concat(w," ").concat(b);g[w]=b+1;var y=c(h),A={css:L[1],media:L[2],sourceMap:L[3],supports:L[4],layer:L[5]};if(y!==-1)l[y].references++,l[y].updater(A);else{var T=p(A,f);f.byIndex=x,l.splice(x,0,{identifier:h,updater:T,references:1})}_.push(h)}return _}function p(m,f){var g=f.domAPI(f);return g.update(m),function(_){if(_){if(_.css===m.css&&_.media===m.media&&_.sourceMap===m.sourceMap&&_.supports===m.supports&&_.layer===m.layer)return;g.update(m=_)}else g.remove()}}a.exports=function(m,f){var g=u(m=m||[],f=f||{});return function(_){_=_||[];for(var x=0;x<g.length;x++){var L=c(g[x]);l[L].references--}for(var w=u(_,f),b=0;b<g.length;b++){var h=c(g[b]);l[h].references===0&&(l[h].updater(),l.splice(h,1))}g=w}}},569:a=>{var l={};a.exports=function(c,u){var p=(function(m){if(l[m]===void 0){var f=document.querySelector(m);if(window.HTMLIFrameElement&&f instanceof window.HTMLIFrameElement)try{f=f.contentDocument.head}catch{f=null}l[m]=f}return l[m]})(c);if(!p)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");p.appendChild(u)}},216:a=>{a.exports=function(l){var c=document.createElement("style");return l.setAttributes(c,l.attributes),l.insert(c,l.options),c}},565:(a,l,c)=>{a.exports=function(u){var p=c.nc;p&&u.setAttribute("nonce",p)}},795:a=>{a.exports=function(l){var c=l.insertStyleElement(l);return{update:function(u){(function(p,m,f){var g="";f.supports&&(g+="@supports (".concat(f.supports,") {")),f.media&&(g+="@media ".concat(f.media," {"));var _=f.layer!==void 0;_&&(g+="@layer".concat(f.layer.length>0?" ".concat(f.layer):""," {")),g+=f.css,_&&(g+="}"),f.media&&(g+="}"),f.supports&&(g+="}");var x=f.sourceMap;x&&typeof btoa<"u"&&(g+=` 51/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(x))))," */")),m.styleTagTransform(g,p,m.options)})(c,l,u)},remove:function(){(function(u){if(u.parentNode===null)return!1;u.parentNode.removeChild(u)})(c)}}}},589:a=>{a.exports=function(l,c){if(c.styleSheet)c.styleSheet.cssText=l;else{for(;c.firstChild;)c.removeChild(c.firstChild);c.appendChild(document.createTextNode(l))}}},607:function(a,l,c){var u=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(l,"__esModule",{value:!0}),l.Cursor=l.default=void 0;var p=u(c(678));l.default=p.default;var m=u(c(353));l.Cursor=m.default,c(413)},353:(a,l)=>{Object.defineProperty(l,"__esModule",{value:!0});var c=(function(){function u(p,m,f){this.id=p,this.name=m,this.color=f,this.toggleNearCursor=this.toggleNearCursor.bind(this),this._toggleOpenedCursor=this._toggleOpenedCursor.bind(this),this._setHoverState=this._setHoverState.bind(this)}return u.prototype.build=function(p){var m=document.createElement(u.CONTAINER_ELEMENT_TAG);m.classList.add(u.CURSOR_CLASS),m.id="ql-cursor-".concat(this.id),m.innerHTML=p.template;var f=m.getElementsByClassName(u.SELECTION_CLASS)[0],g=m.getElementsByClassName(u.CARET_CONTAINER_CLASS)[0],_=g.getElementsByClassName(u.CARET_CLASS)[0],x=m.getElementsByClassName(u.FLAG_CLASS)[0];return x.style.backgroundColor=this.color,_.style.backgroundColor=this.color,m.getElementsByClassName(u.NAME_CLASS)[0].textContent=this.name,this._hideDelay="".concat(p.hideDelayMs,"ms"),this._hideSpeedMs=p.hideSpeedMs,this._positionFlag=p.positionFlag,x.style.transitionDelay=this._hideDelay,x.style.transitionDuration="".concat(this._hideSpeedMs,"ms"),this._el=m,this._selectionEl=f,this._caretEl=g,this._flagEl=x,g.addEventListener("mouseover",this._setHoverState,{passive:!0}),this._el},u.prototype.show=function(){this._el.classList.remove(u.HIDDEN_CLASS)},u.prototype.hide=function(){this._el.classList.add(u.HIDDEN_CLASS)},u.prototype.remove=function(){this._el.parentNode.removeChild(this._el)},u.prototype.toggleNearCursor=function(p,m){var f=this._getCoordinates(),g=f.left,_=f.right,x=f.top,L=f.bottom,w=p>=g&&p<=_&&m>=x&&m<=L;return this._caretEl.classList.toggle(u.CONTAINER_HOVER_CLASS,w),w},u.prototype.toggleFlag=function(p){var m=this;this._caretEl.classList.toggle(u.CONTAINER_HOVER_CLASS,p)||(this._flagEl.classList.add(u.NO_DELAY_CLASS),setTimeout((function(){return m._flagEl.classList.remove(u.NO_DELAY_CLASS)}),this._hideSpeedMs))},u.prototype.updateCaret=function(p,m){this._caretEl.style.top="".concat(p.top,"px"),this._caretEl.style.left="".concat(p.left,"px"),this._caretEl.style.height="".concat(p.height,"px"),this._positionFlag?this._positionFlag(this._flagEl,p,m):this._updateCaretFlag(p,m)},u.prototype.updateSelection=function(p,m){var f=this;this._clearSelection(),p=p||[],p=Array.from(p),p=this._sanitize(p),(p=this._sortByDomPosition(p)).forEac
51h((function(g){return f._addSelection(g,m)}))},u.prototype._setHoverState=function(){document.addEventListener("mousemove",this._toggleOpenedCursor,{passive:!0})},u.prototype._toggleOpenedCursor=function(p){var m=this.toggleNearCursor(p.clientX,p.clientY);this._caretEl.classList.toggle(u.CONTAINER_NO_POINTER_CLASS,m),m||document.removeEventListener("mousemove",this._toggleOpenedCursor)},u.prototype._getCoordinates=function(){return this._caretEl.getBoundingClientRect()},u.prototype._updateCaretFlag=function(p,m){this._flagEl.style.width="";var f=this._flagEl.getBoundingClientRect();this._flagEl.classList.remove(u.FLAG_FLIPPED_CLASS),p.left>m.width-f.width&&this._flagEl.classList.add(u.FLAG_FLIPPED_CLASS),this._flagEl.style.left="".concat(p.left,"px"),this._flagEl.style.top="".concat(p.top,"px"),this._flagEl.style.width="".concat(Math.ceil(f.width),"px")},u.prototype._clearSelection=function(){this._selectionEl.innerHTML=""},u.prototype._addSelection=function(p,m){var f=this._selectionBlock(p,m);this._selectionEl.appendChild(f)},u.prototype._selectionBlock=function(p,m){var f=document.createElement(u.SELECTION_ELEMENT_TAG);return f.classList.add(u.SELECTION_BLOCK_CLASS),f.style.top="".concat(p.top-m.top,"px"),f.style.left="".concat(p.left-m.left,"px"),f.style.width="".concat(p.width,"px"),f.style.height="".concat(p.height,"px"),f.style.backgroundColor=this.color,f.style.opacity="0.3",f},u.prototype._sortByDomPosition=function(p){return p.sort((function(m,f){return m.top===f.top?m.left-f.left:m.top-f.top}))},u.prototype._sanitize=function(p){var m=this,f=new Set;return p.filter((function(g){if(!g.width||!g.height)return!1;var _=m._serialize(g);return!f.has(_)&&(f.add(_),!0)}))},u.prototype._serialize=function(p){return["top:".concat(p.top),"right:".concat(p.right),"bottom:".concat(p.bottom),"left:".concat(p.left)].join(";")},u.CONTAINER_ELEMENT_TAG="SPAN",u.SELECTION_ELEMENT_TAG="SPAN",u.CURSOR_CLASS="ql-cursor",u.SELECTION_CLASS="ql-cursor-selections",u.SELECTION_BLOCK_CLASS="ql-cursor-selection-block",u.CARET_CLASS="ql-cursor-caret",u.CARET_CONTAINER_CLASS="ql-cursor-caret-container",u.CONTAINER_HOVER_CLASS="hover",u.CONTAINER_NO_POINTER_CLASS="no-pointer",u.FLAG_CLASS="ql-cursor-flag",u.FLAG_FLIPPED_CLASS="flag-flipped",u.NAME_CLASS="ql-cursor-name",u.HIDDEN_CLASS="hidden",u.NO_DELAY_CLASS="no-delay",u})();l.default=c},678:function(a,l,c){var u=this&&this.__createBinding||(Object.create?function(h,y,A,T){T===void 0&&(T=A);var M=Object.getOwnPropertyDescriptor(y,A);M&&!("get"in M?!y.__esModule:M.writable||M.configurable)||(M={enumerable:!0,get:function(){return y[A]}}),Object.defineProperty(h,T,M)}:function(h,y,A,T){T===void 0&&(T=A),h[T]=y[A]}),p=this&&this.__setModuleDefault||(Object.create?function(h,y){Object.defineProperty(h,"default",{enumerable:!0,value:y})}:function(h,y){h.default=y}),m=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var y={};if(h!=null)for(var A in h)A!=="default"&&Object.prototype.hasOwnProperty.call(h,A)&&u(y,h,A);return p(y,h),y},f=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(l,"__esModule",{value:!0});var g=f(c(353)),_=m(c(165)),x=f(c(338)),L=f(c(33)),w=c(895),b=(function(){function h(y,A){A===void 0&&(A={}),this._cursors={},this._isObserving=!1,this._handleCursorTouch=this._handleCursorTouch.bind(this),this.quill=y,this.options=this._setDefaults(A),this._container=this.quill.addContainer(this.options.containerClass),this._boundsContainer=this.options.boundsContainer||this.quill.container,this._currentSelection=this.quill.getSelection(),this._registerSelectionChangeListeners(),this._registerTextChangeListener(),this._registerDomListeners()}return h.prototype.createCursor=function(y,A,T){var M=this._cursors[y];if(!M){M=new g.default(y,A,T),this._cursors[y]=M;var F=M.build(this.options);this._container.appendChild(F)}return M},h.prototype.moveCursor=function(y,A){var T=this._cursors[y];T&&(T.range=A,this._updateCursor(T))},h.prototype.removeCursor=function(y){var A=this._cursors[y];A&&(A.remove(),delete this._cursors[y])},h.prototype.update=function(){var y=this;
51this.cursors().forEach((function(A){return y._updateCursor(A)}))},h.prototype.clearCursors=function(){var y=this;this.cursors().forEach((function(A){return y.removeCursor(A.id)}))},h.prototype.toggleFlag=function(y,A){var T=this._cursors[y];T&&T.toggleFlag(A)},h.prototype.cursors=function(){var y=this;return Object.keys(this._cursors).map((function(A){return y._cursors[A]}))},h.prototype._registerSelectionChangeListeners=function(){var y=this;this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,(function(A){y._currentSelection=A}))},h.prototype._registerTextChangeListener=function(){var y=this;this.quill.on(this.quill.constructor.events.TEXT_CHANGE,(function(A){return y._handleTextChange(A)}))},h.prototype._registerDomListeners=function(){var y=this,A=this.quill.container.getElementsByClassName("ql-editor")[0];A.addEventListener("scroll",(function(){return y.update()}),{passive:!0}),A.addEventListener("touchstart",this._handleCursorTouch,{passive:!0})},h.prototype._handleCursorTouch=function(y){var A=this;
51this.cursors().forEach((function(T){T.toggleNearCursor(y.pageX,y.pageY),setTimeout((function(){return T.toggleFlag(!1)}),A.options.hideDelayMs)}))},h.prototype._registerResizeObserver=function(){var y=this;if(!this._isObserving){var A=this.quill.container.getElementsByClassName("ql-editor")[0],T=new L.default((function(M){if(!M[0].target.isConnected)return T.disconnect(),void(y._isObserving=!1);y.update()}));T.observe(A),this._isObserving=!0}},h.prototype._updateCursor=function(y){if(this._registerResizeObserver(),!y.range)return y.hide();var A=this._indexWithinQuillBounds(y.range.index),T=this._indexWithinQuillBounds(y.range.index+y.range.length),M=this.quill.getLeaf(A),F=this.quill.getLeaf(T);if(!this._leafIsValid(M)||!this._leafIsValid(F))return y.hide();y.show();var K=this._boundsContainer.getBoundingClientRect(),W=this.quill.getBounds(T);y.updateCaret(W,K);var v=this._lineRanges(y,M,F).reduce((function(B,E){return B.concat(Array.from(_.getClientRects(E)))}),[]);y.updateSelection(v,K)},h.prototype._indexWithinQuillBounds=function(y){var A=this.quill.getLength(),T=A?A-1:0;return y=Math.max(y,0),Math.min(y,T)},h.prototype._leafIsValid=function(y){return y&&y[0]&&y[0].domNode&&y[1]>=0},h.prototype._handleTextChange=function(y){var A=this;window.setTimeout((function(){A.options.transformOnTextChange&&A._transformCursors(y),A.options.selectionChangeSource&&(A._emitSelection(),A.update())}))},h.prototype._emitSelection=function(){this.quill.emitter.emit(this.quill.constructor.events.SELECTION_CHANGE,this.quill.getSelection(),this._currentSelection,this.options.selectionChangeSource)},h.prototype._setDefaults=function(y){return(y=Object.assign({},y)).template||(y.template=h.DEFAULTS.template),y.containerClass||(y.containerClass=h.DEFAULTS.containerClass),y.selectionChangeSource!==null&&(y.selectionChangeSource||(y.selectionChangeSource=h.DEFAULTS.selectionChangeSource)),y.hideDelayMs=Number.isInteger(y.hideDelayMs)?y.hideDelayMs:h.DEFAULTS.hideDelayMs,y.hideSpeedMs=Number.isInteger(y.hideSpeedMs)?y.hideSpeedMs:h.DEFAULTS.hideSpeedMs,y.transformOnTextChange=!!y.transformOnTextChange,y},h.prototype._lineRanges=function(y,A,T){var M=this.quill.getLines(y.range);return M.reduce((function(F,K,W){if(!K.children){var v=document.createRange();return v.selectNode(K.domNode),F.concat(v)}var B=W===0?A:K.path(0).pop(),E=B[0],R=B[1],C=W===M.length-1?T:K.path(K.length()-1).pop(),S=C[0],I=C[1],D=document.createRange();return E.domNode.nodeType===Node.TEXT_NODE?D.setStart(E.domNode,R):D.setStartBefore(E.domNode),S.domNode.nodeType===Node.TEXT_NODE?D.setEnd(S.domNode,I):D.setEndAfter(S.domNode),F.concat(D)}),[])},h.prototype._transformCursors=function(y){var A=this;y=new w(y),this.cursors().filter((function(T){return T.range})).forEach((function(T){T.range.index=y.transformPosition(T.range.index),A._updateCursor(T)}))},h.DEFAULTS={template:x.default,containerClass:"ql-cursors",selectionChangeSource:"api",hideDelayMs:3e3,hideSpeedMs:400},h})();l.default=b},338:function(a,l,c){var u=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(l,"__esModule",{value:!0});var p=u(c(353)),m=` 52 <span class="`.concat(p.default.SELECTION_CLASS,`"></span> 53 <span class="`).concat(p.default.CARET_CONTAINER_CLASS,`"> 54 <span class="`).concat(p.default.CARET_CLASS,`"></span> 55 </span> 56 <div class="`).concat(p.default.FLAG_CLASS,`"> 57 <small class="`).concat(p.default.NAME_CLASS,`"></small> 58 </div> 59`);l.default=m}},r={};function s(a){var l=r[a];if(l!==void 0)return l.exports;var c=r[a]={id:a,loaded:!1,exports:{}};return e[a].call(c.exports,c,c.exports,s),c.loaded=!0,c.exports}s.n=a=>{var l=a&&a.__esModule?()=>a.default:()=>a;return s.d(l,{a:l}),l},s.d=(a,l)=>{for(var c in l)s.o(l,c)&&!s.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:l[c]})},s.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),s.o=(a,l)=>Object.prototype.hasOwnProperty.call(a,l),s.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},s.nmd=a=>(a.paths=[],a.children||(a.children=[]),a),s.nc=void 0;
59var i=s(607);return i.default})()))})(Ls)),Ls.exports}export{$ as Q,Lp as a,jp as b,Ao as g,Mp as q,Bp as r};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.