PageSourceSearch

https://www.famileo.com/web-family/chunk-WPQTRAML.js

js famileo.com collected 2026-09-24 23:06:42 UTC 154,507 bytes, 44 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aa59721d-7399-53a5-b56c-0e2c9c8f1b4d")}catch(e){}}();
3var Bu=Object.create;var hr=Object.defineProperty,Ru=Object.defineProperties,Du=Object.getOwnPropertyDescriptor,Mu=Object.getOwnPropertyDescriptors,ju=Object.getOwnPropertyNames,cr=Object.getOwnPropertySymbols,Pu=Object.getPrototypeOf,xn=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var Ws=(e,t,r)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t)=>{for(var r in t||={})xn.call(t,r)&&Ws(e,r,t[r]);if(cr)for(var r of cr(t))Vs.call(t,r)&&Ws(e,r,t[r]);return e},Bt=(e,t)=>Ru(e,Mu(t));var Hx=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var vn=(e,t)=>{var r={};for(var n in e)xn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cr)for(var n of cr(e))t.indexOf(n)<0&&Vs.call(e,n)&&(r[n]=e[n]);return r};var Rt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},ku=(e,t)=>{for(var r in t)hr(e,r,{get:t[r],enumerable:!0})},qu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ju(t))!xn.call(e,s)&&s!==r&&hr(e,s,{get:()=>t[s],enumerable:!(n=Du(t,s))||n.enumerable});return e};var ft=(e,t,r)=>(r=e!=null?Bu(Pu(e)):{},qu(t||!e||!e.__esModule?hr(r,"default",{value:e,enumerable:!0}):r,e));var $x=(e,t,r)=>new Promise((n,s)=>{var i=l=>{try{a(r.next(l))}catch(u){s(u)}},o=l=>{try{a(r.throw(l))}catch(u){s(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,o);a((r=r.apply(e,t)).next())});var la=Rt((N_,Mn)=>{"use strict";var Nm=Object.prototype.hasOwnProperty,H="~";function Xe(){}Object.create&&(Xe.prototype=Object.create(null),new Xe().__proto__||(H=!1));function Am(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function aa(e,t,r,n,s){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new Am(r,n||e,s),o=H?H+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Ur(e,t){--e._eventsCount===0?e._events=new Xe:delete e._events[t]}function F(){this._events=new Xe,this._eventsCount=0}F.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)Nm.call(r,n)&&t.push(H?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};F.prototype.listeners=function(t){var r=H?H+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,i=n.length,o=new Array(i);s<i;s++)o[s]=n[s].fn;return o};F.prototype.listenerCount=function(t){var r=H?H+t:t,n=this._events[r];return n?n.fn?1:n.length:0};F.prototype.emit=function(t,r,n,s,i,o){var a=H?H+t:t;if(!this._events[a])return!1;var l=this._events[a],u=arguments.length,f,c;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,r),!0;case 3:return l.fn.call(l.context,r,n),!0;case 4:return l.fn.call(l.context,r,n,s),!0;case 5:return l.fn.call(l.context,r,n,s,i),!0;case 6:return l.fn.call(l.context,r,n,s,i,o),!0}for(c=1,f=new Array(u-1);c<u;c++)f[c-1]=arguments[c];l.fn.apply(l.context,f)}else{var h=l.length,d;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),u){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,r);break;case 3:l[c].fn.call(l[c].context,r,n);break;case 4:l[c].fn.call(l[c].context,r,n,s);break;default:if(!f)for(d=1,f=new Array(u-1);d<u;d++)f[d-1]=arguments[d];l[c].fn.apply(l[c].context,f)}}return!0};F.prototype.on=function(t,r,n){return aa(this,t,r,n,!1)};F.prototype.once=function(t,r,n){return aa(this,t,r,n,!0)};F.prototype.removeListener=function(t,r,n,s){var i=H?H+t:t;if(!this._events[i])return this;if(!r)return Ur(this,i),this;var o=this._events[i];if(o.fn)o.fn===r&&(!s||o.once)&&(!n||o.context===n)&&Ur(this,i);else{for(var a=0,l=[],u=o.length;a<u;a++)(o[a].fn!==r||s&&!o[a].once||n&&o[a].context!==n)&&l.push(o[a]);l.length?this._events[i]=l.length===1?l[0]:l:Ur(this,i)}return this};F.prototype.removeAllListeners=function(t){var r;return t?(r=H?H+t:t,this._events[r]&&Ur(this,r)):(this._events=new Xe,this._eventsCount=0),this};F.prototype.off=F.prototype.removeListener;F.prototype.addListener=F.prototype.on;F.prefixed=H;F.EventEmitter=F;typeof Mn<"u"&&(Mn.exports=F)});var Ea=Rt((P_,va)=>{"use strict";var tt=-1,G=1,M=0;function Qe(e,t,r,n,s){if(e===t)return e?[[M,e]]:[];if(r!=null){var i=jm(e,t,r);if(i)return i}var o=$n(e,t),a=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=Fr(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var u=Sm(e,t);return a&&u.unshift([M,a]),l&&u.push([M,l]),Gn(u,s),n&&Im(u),u}function Sm(e,t){var r;if(!e)return[[G,t]];if(!t)return[[tt,e]];var n=e.length>t.length?e:t,s=e.length>t.length?t:e,i=n.indexOf(s);if(i!==-1)return r=[[G,n.substring(0,i)],[M,s],[G,n.substring(i+s.length)]],e.length>t.length&&(r[0][0]=r[2][0]=tt),r;if(s.length===1)return[[tt,e],[G,t]];var o=Lm(e,t);if(o){var a=o[0],l=o[1],u=o[2],f=o[3],c=o[4],h=Qe(a,u),d=Qe(l,f);return h.concat([[M,c]],d)}return Cm(e,t)}function Cm(e,t){for(var r=e.length,n=t.length,s=Math.ceil((r+n)/2),i=s,o=2*s,a=new Array(o),l=new Array(o),u=0;u<o;u++)a[u]=-1,l[u]=-1;a[i+1]=0,l[i+1]=0;for(var f=r-n,c=f%2!==0,h=0,d=0,p=0,y=0,x=0;x<s;x++){for(var m=-x+h;m<=x-d;m+=2){var E=i+m,T;m===-x||m!==x&&a[E-1]<a[E+1]?T=a[E+1]:T=a[E-1]+1;for(var N=T-m;T<r&&N<n&&e.charAt(T)===t.charAt(N);)T++,N++;if(a[E]=T,T>r)d+=2;else if(N>n)h+=2;else if(c){var A=i+f-m;if(A>=0&&A<o&&l[A]!==-1){var L=r-l[A];if(T>=L)return ca(e,t,T,N)}}}for(var W=-x+p;W<=x-y;W+=2){var A=i+W,L;W===-x||W!==x&&l[A-1]<l[A+1]?L=l[A+1]:L=l[A-1]+1;for(var ot=L-W;L<r&&ot<n&&e.charAt(r-L-1)===t.charAt(n-ot-1);)L++,ot++;if(l[A]=L,L>r)y+=2;else if(ot>n)p+=2;else if(!c){var E=i+f-W;if(E>=0&&E<o&&a[E]!==-1){var T=a[E],N=i+T-E;if(L=r-L,T>=L)return ca(e,t,T,N)}}}}return[[tt,e],[G,t]]}function ca(e,t,r,n){var s=e.substring(0,r),i=t.substring(0,n),o=e.substring(r),a=t.substring(n),l=Qe(s,i),u=Qe(o,a);return l.concat(u)}function $n(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var r=0,n=Math.min(e.length,t.length),s=n,i=0;r<s;)e.substring(i,s)==t.substring(i,s)?(r=s,i=r):n=s,s=Math.floor((n-r)/2+r);return ga(e.charCodeAt(s-1))&&s--,s}function ha(e,t){var r=e.length,n=t.length;if(r==0||n==0)return 0;r>
3n?e=e.substring(r-n):r<n&&(t=t.substring(0,r));var s=Math.min(r,n);if(e==t)return s;for(var i=0,o=1;;){var a=e.substring(s-o),l=t.indexOf(a);if(l==-1)return i;o+=l,(l==0||e.substring(s-o)==t.substring(0,o))&&(i=o,o++)}}function Fr(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var r=0,n=Math.min(e.length,t.length),s=n,i=0;r<s;)e.substring(e.length-s,e.length-i)==t.substring(t.length-s,t.length-i)?(r=s,i=r):n=s,s=Math.floor((n-r)/2+r);return ba(e.charCodeAt(e.length-s))&&s--,s}function Lm(e,t){var r=e.length>t.length?e:t,n=e.length>t.length?t:e;if(r.length<4||n.length*2<r.length)return null;function s(d,p,y){for(var x=d.substring(y,y+Math.floor(d.length/4)),m=-1,E="",T,N,A,L;(m=p.indexOf(x,m+1))!==-1;){var W=$n(d.substring(y),p.substring(m)),ot=Fr(d.substring(0,y),p.substring(0,m));E.length<ot+W&&(E=p.substring(m-ot,m)+p.substring(m,m+W),T=d.substring(0,y-ot),N=d.substring(y+W),A=p.substring(0,m-ot),L=p.substring(m+W))}return E.length*2>=d.length?[T,N,A,L,E]:null}var i=s(r,n,Math.ceil(r.length/4)),o=s(r,n,Math.ceil(r.length/2)),a;if(!i&&!o)return null;o?i?a=i[4].length>o[4].length?i:o:a=o:a=i;var l,u,f,c;e.length>t.length?(l=a[0],u=a[1],f=a[2],c=a[3]):(f=a[0],c=a[1],l=a[2],u=a[3]);var h=a[4];return[l,u,f,c,h]}function Im(e){for(var t=!1,r=[],n=0,s=null,i=0,o=0,a=0,l=0,u=0;i<e.length;)e[i][0]==M?(r[n++]=i,o=l,a=u,l=0,u=0,s=e[i][1]):(e[i][0]==G?l+=e[i][1].length:u+=e[i][1].length,s&&s.length<=Math.max(o,a)&&s.length<=Math.max(l,u)&&(e.splice(r[n-1],0,[tt,s]),e[r[n-1]+1][0]=G,n--,n--,i=n>0?r[n-1]:-1,o=0,a=0,l=0,u=0,s=null,t=!0)),i++;for(t&&Gn(e),Dm(e),i=1;i<e.length;){if(e[i-1][0]==tt&&e[i][0]==G){var f=e[i-1][1],c=e[i][1],h=ha(f,c),d=ha(c,f);h>=d?(h>=f.length/2||h>=c.length/2)&&(e.splice(i,0,[M,c.substring(0,h)]),e[i-1][1]=f.substring(0,f.length-h),e[i+1][1]=c.substring(h),i++):(d>=f.length/2||d>=c.length/2)&&(e.splice(i,0,[M,f.substring(0,d)]),e[i-1][0]=G,e[i-1][1]=c.substring(0,c.length-d),e[i+1][0]=tt,e[i+1][1]=f.substring(d),i++),i++}i++}}var da=/[^a-zA-Z0-9]/,pa=/\s/,ma=/[\r\n]/,Bm=/\n\r?\n$/,Rm=/^\r?\n\r?\n/;function Dm(e){function t(d,p){if(!d||!p)return 6;var y=d.charAt(d.length-1),x=p.charAt(0),m=y.match(da),E=x.match(da),T=m&&y.match(pa),N=E&&x.match(pa),A=T&&y.match(ma),L=N&&x.match(ma),W=A&&d.match(Bm),ot=L&&p.match(Rm);return W||ot?5:A||L?4:m&&!T&&N?3:T||N?2:m||E?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==M&&e[r+1][0]==M){var n=e[r-1][1],s=e[r][1],i=e[r+1][1],o=Fr(n,s);if(o){var a=s.substring(s.length-o);n=n.substring(0,n.length-o),s=a+s.substring(0,s.length-o),i=a+i}for(var l=n,u=s,f=i,c=t(n,s)+t(s,i);s.charAt(0)===i.charAt(0);){n+=s.charAt(0),s=s.substring(1)+i.charAt(0),i=i.substring(1);var h=t(n,s)+t(s,i);h>=c&&(c=h,l=n,u=s,f=i)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=u,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}}function Gn(e,t){e.push([M,""]);for(var r=0,n=0,s=0,i="",o="",a;r<e.length;){if(r<e.length-1&&!e[r][1]){e.splice(r,1);continue}switch(e[r][0]){case G:s++,o+=e[r][1],r++;break;case tt:n++,i+=e[r][1],r++;break;case M:var l=r-s-n-1;if(t){if(l>=0&&xa(e[l][1])){var u=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),i=u+i,o=u+o,!e[l][1]){e.splice(l,1),r--;var f=l-1;e[f]&&e[f][0]===G&&(s++,o=e[f][1]+o,f--),e[f]&&e[f][0]===tt&&(n++,i=e[f][1]+i,f--),l=f}}if(ya(e[r][1])){var u=e[r][1].charAt(0);e[r][1]=e[r][1].slice(1),i+=u,o+=u}}if(r<e.length-1&&!e[r][1]){e.splice(r,1);break}if(i.length>0||o.length>0){i.length>0&&o.length>0&&(a=$n(o,i),a!==0&&(l>=0?e[l][1]+=o.substring(0,a):(e.splice(0,0,[M,o.substring(0,a)]),r++),o=o.substring(a),i=i.substring(a)),a=Fr(o,i),a!==0&&(e[r][1]=o.substring(o.length-a)+e[r][1],o=o.substring(0,o.length-a),i=i.substring(0,i.length-a)));var c=s+n;i.length===0&&o.length===0?(e.splice(r-c,c),r=r-c):i.length===0?(e.splice(r-c,c,[G,o]),r=r-c+1):o.length===0?(e.splice(r-c,c,[tt,i]),r=r-c+1):(e.splice(r-c,c,[tt,i],[G,o]),r=r-c+2)}r!==0&&e[r-1][0]===M?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,n=0,i="",o="";break}}e[e.length-1][1]===""&&e.pop();var h=!1;for(r=1;r<e.length-1;)e[r-1][0]===M&&e[r+1][0]===M&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)===e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),h=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),h=!0)),r++;h&&Gn(e,t)}function ga(e){return e>=55296&&e<=56319}function ba(e){return e>=56320&&e<=57343}function ya(e){return ba(e.charCodeAt(0))}function xa(e){return ga(e.charCodeAt(e.length-1))}function Mm(e){for(var t=[],r=0;r<e.length;r++)e[r][1].length>0&&t.push(e[r]);return t}function Hn(e,t,r,n){return xa(e)||ya(n)?null:Mm([[M,e],[tt,t],[G,r],[M,n]])}function jm(e,t,r){var n=typeof r=="number"?{index:r,length:0}:r.oldRange,s=typeof r=="number"?null:r.newRange,i=e.length,o=t.length;if(n.length===0&&(s===null||s.length===0)){var a=n.index,l=e.slice(0,a),u=e.slice(a),f=s?s.index:null;t:{var c=a+o-i;
3if(f!==null&&f!==c||c<0||c>o)break t;var h=t.slice(0,c),d=t.slice(c);if(d!==u)break t;var p=Math.min(a,c),y=l.slice(0,p),x=h.slice(0,p);if(y!==x)break t;var m=l.slice(p),E=h.slice(p);return Hn(y,m,E,u)}t:{if(f!==null&&f!==a)break t;var T=a,h=t.slice(0,T),d=t.slice(T);if(h!==l)break t;var N=Math.min(i-T,o-T),A=u.slice(u.length-N),L=d.slice(d.length-N);if(A!==L)break t;var m=u.slice(0,u.length-N),E=d.slice(0,d.length-N);return Hn(l,m,E,A)}}if(n.length>0&&s&&s.length===0)t:{var y=e.slice(0,n.index),A=e.slice(n.index+n.length),p=y.length,N=A.length;if(o<p+N)break t;var x=t.slice(0,p),L=t.slice(o-N);if(y!==x||A!==L)break t;var m=e.slice(p,i-N),E=t.slice(p,o-N);return Hn(y,m,E,A)}return null}function Kr(e,t,r,n){return Qe(e,t,r,n,!0)}Kr.INSERT=G;Kr.DELETE=tt;Kr.EQUAL=M;va.exports=Kr});var as=Rt((Ze,Ce)=>{"use strict";var Pm=200,Ra="__lodash_hash_undefined__",Da=9007199254740991,ts="[object Arguments]",km="[object Array]",Ma="[object Boolean]",ja="[object Date]",qm="[object Error]",es="[object Function]",Pa="[object GeneratorFunction]",zr="[object Map]",ka="[object Number]",rs="[object Object]",Ta="[object Promise]",qa="[object RegExp]",Hr="[object Set]",Ua="[object String]",Fa="[object Symbol]",Vn="[object WeakMap]",Ka="[object ArrayBuffer]",$r="[object DataView]",za="[object Float32Array]",Ha="[object Float64Array]",$a="[object Int8Array]",Ga="[object Int16Array]",Wa="[object Int32Array]",Va="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Ya="[object Uint16Array]",Qa="[object Uint32Array]",Um=/[\\^$.*+?()[\]{}|]/g,Fm=/\w*$/,Km=/^\[object .+?Constructor\]$/,zm=/^(?:0|[1-9]\d*)$/,w={};w[ts]=w[km]=w[Ka]=w[$r]=w[Ma]=w[ja]=w[za]=w[Ha]=w[$a]=w[Ga]=w[Wa]=w[zr]=w[ka]=w[rs]=w[qa]=w[Hr]=w[Ua]=w[Fa]=w[Va]=w[Xa]=w[Ya]=w[Qa]=!0;w[qm]=w[es]=w[Vn]=!1;var Hm=typeof global=="object"&&global&&global.Object===Object&&global,$m=typeof self=="object"&&self&&self.Object===Object&&self,At=Hm||$m||Function("return this")(),Za=typeof Ze=="object"&&Ze&&!Ze.nodeType&&Ze,Na=Za&&typeof Ce=="object"&&Ce&&!Ce.nodeType&&Ce,Gm=Na&&Na.exports===Za;function Wm(e,t){return e.set(t[0],t[1]),e}function Vm(e,t){return e.add(t),e}function Xm(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Ym(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}function Ja(e,t,r,n){var s=-1,i=e?e.length:0;for(n&&i&&(r=e[++s]);++s<i;)r=t(r,e[s],s,e);return r}function Qm(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Zm(e,t){return e?.[t]}function tl(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Aa(e){var t=-1,r=Array(e.size);return e.forEach(function(n,s){r[++t]=[s,n]}),r}function ns(e,t){return function(r){return e(t(r))}}function _a(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Jm=Array.prototype,tg=Function.prototype,Gr=Object.prototype,Wn=At["__core-js_shared__"],wa=(function(){var e=/[^.]+$/.exec(Wn&&Wn.keys&&Wn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),el=tg.toString,Ht=Gr.hasOwnProperty,Wr=Gr.toString,eg=RegExp("^"+el.call(Ht).replace(Um,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oa=Gm?At.Buffer:void 0,Sa=At.Symbol,Ca=At.Uint8Array,rg=ns(Object.getPrototypeOf,Object),ng=Object.create,sg=Gr.propertyIsEnumerable,ig=Jm.splice,La=Object.getOwnPropertySymbols,og=Oa?Oa.isBuffer:void 0,ag=ns(Object.keys,Object),Xn=Be(At,"DataView"),Je=Be(At,"Map"),Yn=Be(At,"Promise"),Qn=Be(At,"Set"),Zn=Be(At,"WeakMap"),tr=Be(Object,"create"),lg=ee(Xn),ug=ee(Je),fg=ee(Yn),cg=ee(Qn),hg=ee(Zn),Ia=Sa?Sa.prototype:void 0,Ba=Ia?Ia.valueOf
3:void 0;function te(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dg(){this.__data__=tr?tr(null):{}}function pg(e){return this.has(e)&&delete this.__data__[e]}function mg(e){var t=this.__data__;if(tr){var r=t[e];return r===Ra?void 0:r}return Ht.call(t,e)?t[e]:void 0}function gg(e){var t=this.__data__;return tr?t[e]!==void 0:Ht.call(t,e)}function bg(e,t){var r=this.__data__;return r[e]=tr&&t===void 0?Ra:t,this}te.prototype.clear=dg;te.prototype.delete=pg;te.prototype.get=mg;te.prototype.has=gg;te.prototype.set=bg;function _t(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function yg(){this.__data__=[]}function xg(e){var t=this.__data__,r=Vr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ig.call(t,r,1),!0}function vg(e){var t=this.__data__,r=Vr(t,e);return r<0?void 0:t[r][1]}function Eg(e){return Vr(this.__data__,e)>-1}function Tg(e,t){var r=this.__data__,n=Vr(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}_t.prototype.clear=yg;_t.prototype.delete=xg;_t.prototype.get=vg;_t.prototype.has=Eg;_t.prototype.set=Tg;function Le(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ng(){this.__data__={hash:new te,map:new(Je||_t),string:new te}}function Ag(e){return Xr(this,e).delete(e)}function _g(e){return Xr(this,e).get(e)}function wg(e){return Xr(this,e).has(e)}function Og(e,t){return Xr(this,e).set(e,t),this}Le.prototype.clear=Ng;Le.prototype.delete=Ag;Le.prototype.get=_g;Le.prototype.has=wg;Le.prototype.set=Og;function Ie(e){this.__data__=new _t(e)}function Sg(){this.__data__=new _t}function Cg(e){return this.__data__.delete(e)}function Lg(e){return this.__data__.get(e)}function Ig(e){return this.__data__.has(e)}function Bg(e,t){var r=this.__data__;if(r instanceof _t){var n=r.__data__;if(!Je||n.length<Pm-1)return n.push([e,t]),this;r=this.__data__=new Le(n)}return r.set(e,t),this}Ie.prototype.clear=Sg;Ie.prototype.delete=Cg;Ie.prototype.get=Lg;Ie.prototype.has=Ig;Ie.prototype.set=Bg;function Rg(e,t){var r=is(e)||nb(e)?Qm(e.length,String):[],n=r.length,s=!!n;for(var i in e)(t||Ht.call(e,i))&&!(s&&(i=="length"||Jg(i,n)))&&r.push(i);return r}function rl(e,t,r){var n=e[t];(!(Ht.call(e,t)&&ol(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function Vr(e,t){for(var r=e.length;r--;)if(ol(e[r][0],t))return r;return-1}function Dg(e,t){return e&&nl(t,os(t),e)}function Jn(e,t,r,n,s,i,o){var a;if(n&&(a=i?n(e,s,i,o):n(e)),a!==void 0)return a;if(!Yr(e))return e;var l=is(e);if(l){if(a=Yg(e),!t)return Wg(e,a)}else{var u=Jt(e),f=u==es||u==Pa;if(ib(e))return Ug(e,t);if(u==rs||u==ts||f&&!i){if(tl(e))return i?e:{};if(a=Qg(f?{}:e),!t)return Vg(e,Dg(a,e))}else{if(!w[u])return i?e:{};a=Zg(e,u,Jn,t)}}o||(o=new Ie);var c=o.get(e);if(c)return c;if(o.set(e,a),!l)var h=r?Xg(e):os(e);return Xm(h||e,function(d,p){h&&(p=d,d=e[p]),rl(a,p,Jn(d,t,r,n,p,e,o))}),a}function Mg(e){return Yr(e)?ng(e):{}}function jg(e,t,r){var n=t(e);return is(e)?n:Ym(n,r(e))}function Pg(e){return Wr.call(e)}function kg(e){if(!Yr(e)||eb(e))return!1;var t=ll(e)||tl(e)?eg:Km;return t.test(ee(e))}function qg(e){if(!il(e))return ag(e);var t=[];for(var r in Object(e))Ht.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ug(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function ss(e){var t=new e.constructor(e.byteLength);return new Ca(t).set(new Ca(e)),t}function Fg(e,t){var r=t?ss(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Kg(e,t,r){var n=t?r(Aa(e),!0):Aa(e);return Ja(n,Wm,new e.constructor)}function zg(e){var t=new e.constructor(e.source,Fm.exec(e));return t.lastIndex=e.lastIndex,t}function Hg(e,t,r){var n=t?r(_a(e),!0):_a(e);return Ja(n,Vm,new e.constructor)}function $g(e){return Ba?Object(Ba.call(e)):{}}function Gg(e,t){var r=t?ss(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Wg(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function nl(e,t,r,n){r||(r={});for(var s=-1,i=t.length;++s<i;){var o=t[s],a=n?n(r[o],e[o],o,r,e):void 0;rl(r,o,a===void 0?e[o]:a)}return r}function Vg(e,t){return nl(e,sl(e),t)}function Xg(e){return jg(e,os,sl)}function Xr(e,t){var r=e.__data__;return tb(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Be(e,t){var r=Zm(e,t);return kg(r)?r:void 0}var sl=La?ns(La,Object):lb,Jt=Pg;(Xn&&Jt(new Xn(new ArrayBuffer(1)))!=$r||Je&&Jt(new Je)!=zr||Yn&&Jt(Yn.resolve())!=Ta||Qn&&Jt(new Qn)!=Hr||Zn&&Jt(new Zn)!=Vn)&&(Jt=function(e){var t=Wr.call(e),r=t==rs?e.constructor:void 0,n=r?ee(r):void 0;if(n)switch(n){case lg:return $r;case ug:return zr;case fg:return Ta;case cg:return Hr;case hg:return Vn}return t});function Yg(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&Ht.call(e,"index")&&(r.index=e.index,r.input
3=e.input),r}function Qg(e){return typeof e.constructor=="function"&&!il(e)?Mg(rg(e)):{}}function Zg(e,t,r,n){var s=e.constructor;switch(t){case Ka:return ss(e);case Ma:case ja:return new s(+e);case $r:return Fg(e,n);case za:case Ha:case $a:case Ga:case Wa:case Va:case Xa:case Ya:case Qa:return Gg(e,n);case zr:return Kg(e,n,r);case ka:case Ua:return new s(e);case qa:return zg(e);case Hr:return Hg(e,n,r);case Fa:return $g(e)}}function Jg(e,t){return t=t??Da,!!t&&(typeof e=="number"||zm.test(e))&&e>-1&&e%1==0&&e<t}function tb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function eb(e){return!!wa&&wa in e}function il(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Gr;return e===r}function ee(e){if(e!=null){try{return el.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function rb(e){return Jn(e,!0,!0)}function ol(e,t){return e===t||e!==e&&t!==t}function nb(e){return sb(e)&&Ht.call(e,"callee")&&(!sg.call(e,"callee")||Wr.call(e)==ts)}var is=Array.isArray;function al(e){return e!=null&&ob(e.length)&&!ll(e)}function sb(e){return ab(e)&&al(e)}var ib=og||ub;function ll(e){var t=Yr(e)?Wr.call(e):"";return t==es||t==Pa}function ob(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Da}function Yr(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ab(e){return!!e&&typeof e=="object"}function os(e){return al(e)?Rg(e):qg(e)}function lb(){return[]}function ub(){return!1}Ce.exports=rb});var xs=Rt((er,De)=>{"use strict";var fb=200,ys="__lodash_hash_undefined__",sn=1,vl=2,El=9007199254740991,Qr="[object Arguments]",cs="[object Array]",cb="[object AsyncFunction]",Tl="[object Boolean]",Nl="[object Date]",Al="[object Error]",_l="[object Function]",hb="[object GeneratorFunction]",Zr="[object Map]",wl="[object Number]",db="[object Null]",Re="[object Object]",ul="[object Promise]",pb="[object Proxy]",Ol="[object RegExp]",Jr="[object Set]",Sl="[object String]",mb="[object Symbol]",gb="[object Undefined]",hs="[object WeakMap]",Cl="[object ArrayBuffer]",tn="[object DataView]",bb="[object Float32Array]",yb="[object Float64Array]",xb="[object Int8Array]",vb="[object Int16Array]",Eb="[object Int32Array]",Tb="[object Uint8Array]",Nb="[object Uint8ClampedArray]",Ab="[object Uint16Array]",_b="[object Uint32Array]",wb=/[\\^$.*+?()[\]{}|]/g,Ob=/^\[object .+?Constructor\]$/,Sb=/^(?:0|[1-9]\d*)$/,C={};C[bb]=C[yb]=C[xb]=C[vb]=C[Eb]=C[Tb]=C[Nb]=C[Ab]=C[_b]=!0;C[Qr]=C[cs]=C[Cl]=C[Tl]=C[tn]=C[Nl]=C[Al]=C[_l]=C[Zr]=C[wl]=C[Re]=C[Ol]=C[Jr]=C[Sl]=C[hs]=!1;var Ll=typeof global=="object"&&global&&global.Object===Object&&global,Cb=typeof self=="object"&&self&&self.Object===Object&&self,wt=Ll||Cb||Function("return this")(),Il=typeof er=="object"&&er&&!er.nodeType&&er,fl=Il&&typeof De=="object"&&De&&!De.nodeType&&De,Bl=fl&&fl.exports===Il,ls=Bl&&Ll.process,cl=(function(){try{return ls&&ls.binding&&ls.binding("util")}catch(e){}})(),hl=cl&&cl.isTypedArray;
vendor: 4,863 bytes, line 3
3function Lb(e,t){for(var r=-1,n=e==null?0:e.length,s=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[s++]=o)}return i}function Ib(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}function Bb(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Rb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Db(e){return function(t){return e(t)}}function Mb(e,t){return e.has(t)}function jb(e,t){return e?.[t]}function Pb(e){var t=-1,r=Array(e.size);return e.forEach(function(n,s){r[++t]=[s,n]}),r}function kb(e,t){return function(r){return e(t(r))}}function qb(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ub=Array.prototype,Fb=Function.prototype,on=Object.prototype,us=wt["__core-js_shared__"],Rl=Fb.toString,gt=on.hasOwnProperty,dl=(function(){var e=/[^.]+$/.exec(us&&us.keys&&us.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Dl=on.toString,Kb=RegExp("^"+Rl.call(gt).replace(wb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pl=Bl?wt.Buffer:void 0,en=wt.Symbol,ml=wt.Uint8Array,Ml=on.propertyIsEnumerable,zb=Ub.splice,re=en?en.toStringTag:void 0,gl=Object.getOwnPropertySymbols,Hb=pl?pl.isBuffer:void 0,$b=kb(Object.keys,Object),ds=Me(wt,"DataView"),rr=Me(wt,"Map"),ps=Me(wt,"Promise"),ms=Me(wt,"Set"),gs=Me(wt,"WeakMap"),nr=Me(Object,"create"),Gb=ie(ds),Wb=ie(rr),Vb=ie(ps),Xb=ie(ms),Yb=ie(gs),bl=en?en.prototype:void 0,fs=bl?bl.valueOf:void 0;function ne(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qb(){this.__data__=nr?nr(null):{},this.size=0}function Zb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Jb(e){var t=this.__data__;if(nr){var r=t[e];return r===ys?void 0:r}return gt.call(t,e)?t[e]:void 0}function ty(e){var t=this.__data__;return nr?t[e]!==void 0:gt.call(t,e)}function ey(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nr&&t===void 0?ys:t,this}ne.prototype.clear=Qb;ne.prototype.delete=Zb;ne.prototype.get=Jb;ne.prototype.has=ty;ne.prototype.set=ey;function Ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ry(){this.__data__=[],this.size=0}function ny(e){var t=this.__data__,r=an(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zb.call(t,r,1),--this.size,!0}function sy(e){var t=this.__data__,r=an(t,e);return r<0?void 0:t[r][1]}function iy(e){return an(this.__data__,e)>-1}function oy(e,t){var r=this.__data__,n=an(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Ot.prototype.clear=ry;Ot.prototype.delete=ny;Ot.prototype.get=sy;Ot.prototype.has=iy;Ot.prototype.set=oy;function se(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ay(){this.size=0,this.__data__={hash:new ne,map:new(rr||Ot),string:new ne}}function ly(e){var t=ln(this,e).delete(e);return this.size-=t?1:0,t}function uy(e){return ln(this,e).get(e)}function fy(e){return ln(this,e).has(e)}function cy(e,t){var r=ln(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}se.prototype.clear=ay;se.prototype.delete=ly;se.prototype.get=uy;se.prototype.has=fy;se.prototype.set=cy;function rn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new se;++t<r;)this.add(e[t])}function hy(e){return this.__data__.set(e,ys),this}function dy(e){return this.__data__.has(e)}rn.prototype.add=rn.prototype.push=hy;rn.prototype.has=dy;function Gt(e){var t=this.__data__=new Ot(e);this.size=t.size}function py(){this.__data__=new Ot,this.size=0}function my(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function gy(e){return this.__data__.get(e)}function by(e){return this.__data__.has(e)}function yy(e,t){var r=this.__data__;if(r instanceof Ot){var n=r.__data__;if(!rr||n.length<fb-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(e,t),this.size=r.size,this}Gt.prototype.clear=py;Gt.prototype.delete=my;Gt.prototype.get=gy;Gt.prototype.has=by;Gt.prototype.set=yy;function xy(e,t){var r=nn(e),n=!r&&Dy(e),s=!r&&!n&&bs(e),i=!r&&!n&&!s&&Kl(e),o=r||n||s||i,a=o?Rb(e.length,String):[],l=a.length;for(var u in e)(t||gt.call(e,u))&&!(o&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Cy(u,l)))&&a.push(u);return a}function an(e,t){for(var r=e.length;r--;)if(kl(e[r][0],t))return r;return-1}function vy(e,t,r){var n=t(e);return nn(e)?n:Ib(n,r(e))}function ir(e){return e==null?e===void 0?gb:db:re&&re in Object(e)?Oy(e):Ry(e)}function yl(e){return sr(e)&&ir(e)==Qr}function jl(e,t,r,n,s){return e===t?!0:e==null||t==null||!sr(e)&&!sr(t)?e!==e&&t!==t:Ey(e,t,r,n,jl,s)}function Ey(e,t,r,n,s,i){var o=nn(e),a=nn(t),l=o?cs:$t(e),u=a?cs:$t(t);l=l==Qr?Re:l,u=u==Qr?Re:u;var f=l==Re,c=u==Re,h=l==u;if(h&&bs(e)){if(!bs(t))return!1;o=!0,f=!1}
3if(h&&!f)return i||(i=new Gt),o||Kl(e)?Pl(e,t,r,n,s,i):_y(e,t,l,r,n,s,i);if(!(r&sn)){var d=f&&gt.call(e,"__wrapped__"),p=c&&gt.call(t,"__wrapped__");if(d||p){var y=d?e.value():e,x=p?t.value():t;return i||(i=new Gt),s(y,x,r,n,i)}}return h?(i||(i=new Gt),wy(e,t,r,n,s,i)):!1}function Ty(e){if(!Fl(e)||Iy(e))return!1;var t=ql(e)?Kb:Ob;return t.test(ie(e))}function Ny(e){return sr(e)&&Ul(e.length)&&!!C[ir(e)]}function Ay(e){if(!By(e))return $b(e);var t=[];for(var r in Object(e))gt.call(e,r)&&r!="constructor"&&t.push(r);return t}function Pl(e,t,r,n,s,i){var o=r&sn,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var f=-1,c=!0,h=r&vl?new rn:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var d=e[f],p=t[f];if(n)var y=o?n(p,d,f,t,e,i):n(d,p,f,e,t,i);if(y!==void 0){if(y)continue;c=!1;break}if(h){if(!Bb(t,function(x,m){if(!Mb(h,m)&&(d===x||s(d,x,r,n,i)))return h.push(m)})){c=!1;break}}else if(!(d===p||s(d,p,r,n,i))){c=!1;break}}return i.delete(e),i.delete(t),c}function _y(e,t,r,n,s,i,o){switch(r){case tn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Cl:return!(e.byteLength!=t.byteLength||!i(new ml(e),new ml(t)));case Tl:case Nl:case wl:return kl(+e,+t);case Al:return e.name==t.name&&e.message==t.message;case Ol:case Sl:return e==t+"";case Zr:var a=Pb;case Jr:var l=n&sn;if(a||(a=qb),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=vl,o.set(e,t);var f=Pl(a(e),a(t),n,s,i,o);return o.delete(e),f;case mb:if(fs)return fs.call(e)==fs.call(t)}return!1}function wy(e,t,r,n,s,i){var o=r&sn,a=xl(e),l=a.length,u=xl(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var h=a[c];if(!(o?h in t:gt.call(t,h)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var p=!0;i.set(e,t),i.set(t,e);for(var y=o;++c<l;){h=a[c];var x=e[h],m=t[h];if(n)var E=o?n(m,x,h,t,e,i):n(x,m,h,e,t,i);if(!(E===void 0?x===m||s(x,m,r,n,i):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var T=e.constructor,N=t.constructor;T!=N&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof N=="function"&&N instanceof N)&&(p=!1)}return i.delete(e),i.delete(t),p}function xl(e){return vy(e,Py,Sy)}function ln(e,t){var r=e.__data__;return Ly(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Me(e,t){var r=jb(e,t);return Ty(r)?r:void 0}function Oy(e){var t=gt.call(e,re),r=e[re];try{e[re]=void 0;var n=!0}catch(i){}var s=Dl.call(e);return n&&(t?e[re]=r:delete e[re]),s}var Sy=gl?function(e){return e==null?[]:(e=Object(e),Lb(gl(e),function(t){return Ml.call(e,t)}))}:ky,$t=ir;(ds&&$t(new ds(new ArrayBuffer(1)))!=tn||rr&&$t(new rr)!=Zr||ps&&$t(ps.resolve())!=ul||ms&&$t(new ms)!=Jr||gs&&$t(new gs)!=hs)&&($t=function(e){var t=ir(e),r=t==Re?e.constructor:void 0,n=r?ie(r):"";if(n)switch(n){case Gb:return tn;case Wb:return Zr;case Vb:return ul;case Xb:return Jr;case Yb:return hs}return t});function Cy(e,t){return t=t??El,!!t&&(typeof e=="number"||Sb.test(e))&&e>-1&&e%1==0&&e<t}function Ly(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Iy(e){return!!dl&&dl in e}function By(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||on;return e===r}function Ry(e){return Dl.call(e)}function ie(e){if(e!=null){try{return Rl.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function kl(e,t){return e===t||e!==e&&t!==t}var Dy=yl((function(){return arguments})())?yl:function(e){return sr(e)&&gt.call(e,"callee")&&!Ml.call(e,"callee")},nn=Array.isArray;function My(e){return e!=null&&Ul(e.length)&&!ql(e)}var bs=Hb||qy;function jy(e,t){return jl(e,t)}function ql(e){if(!Fl(e))return!1;var t=ir(e);return t==_l||t==hb||t==cb||t==pb}function Ul(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=El}function Fl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function sr(e){return e!=null&&typeof e=="object"}var Kl=hl?Db(hl):Ny;function Py(e){return My(e)?xy(e):Ay(e)}function ky(){return[]}function qy(){return!1}De.exports=jy});var zl=Rt(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var Uy=as(),Fy=xs(),vs;(function(e){function t(i={},o={},a=!1){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let l=Uy(o);a||(l=Object.keys(l).reduce((u,f)=>(l[f]!=null&&(u[f]=l[f]),u),{}));for(let u in i)i[u]!==void 0&&o[u]===void 0&&(l[u]=i[u]);return Object.keys(l).length>0?l:void 0}e.compose=t;function r(i={},o={}){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let a=Object.keys(i).concat(Object.keys(o)).reduce((l,u)=>(Fy(i[u],o[u])||(l[u]=o[u]===void 0?null:o[u]),l),{});return Object.keys(a).length>0?a:void 0}e.diff=r;function n(i={},o={}){i=i||{};let a=Object.keys(o).reduce((l,u)=>(o[u]!==i[u]&&i[u]!==void 0&&(l[u]=o[u]),l),{});return Object.keys(i).reduce((l,u)=>(i[u]!==o[u]&&o[u]===void 0&&(l[u]=null),l),a)}e.invert=n;function s(i,o,a=!1){if(typeof i!="object")return o;if(typeof o!="object")return;if(!a)return o;let l=Object.keys(o).reduce((u,f)=>(i[f]===void 0&&(u[f]=o[f]),u),{});return Object.keys(l).length>0?l:void 0}e.transform=s})(vs||(vs={}));Es.default=vs});var As=Rt(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var Ts;(function(e){function t(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}e.length=t})(Ts||(Ts={}));Ns.default=Ts});var $l=Rt(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var Hl=As(),_s=class{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);let r=this.ops[this.index];if(r){let n=this.offset,s=Hl.default.length(r);if(t>=s-n?(t=s-n,this.index+=1,this.offset=0):this.offset+=t,typeof r.delete=="number")return{delete:t};{let i={};return r.attributes&&(i.attributes=r.attributes),typeof r.retain=="number"?i.retain=t:typeof r.retain=="object"&&r.retain!==null?i.retain=r.retain:typeof r.insert=="string"?i.insert=r.insert.substr(n,t):i.insert=r.insert,i}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Hl.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let t=this.offset,r=this.index,n=this.next(),s=this.ops.slice(this.index);return this.offset=t,this.index=r,[n].concat(s)}}else return[]}};ws.default=_s});var bt=Rt((Ct,fn)=>{"use strict";
3Object.defineProperty(Ct,"__esModule",{value:!0});Ct.AttributeMap=Ct.OpIterator=Ct.Op=void 0;var un=Ea(),Ky=as(),Os=xs(),oe=zl();Ct.AttributeMap=oe.default;var St=As();Ct.Op=St.default;var st=$l();Ct.OpIterator=st.default;var zy="\0",Gl=(e,t)=>{if(typeof e!="object"||e===null)throw new Error(`cannot retain a ${typeof e}`);if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);let r=Object.keys(e)[0];if(!r||r!==Object.keys(t)[0])throw new Error(`embed types not matched: ${r} != ${Object.keys(t)[0]}`);return[r,e[r],t[r]]},Lt=class e{constructor(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}static registerEmbed(t,r){this.handlers[t]=r}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){let r=this.handlers[t];if(!r)throw new Error(`no handlers for embed type "${t}"`);return r}insert(t,r){let n={};return typeof t=="string"&&t.length===0?this:(n.insert=t,r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,r){if(typeof t=="number"&&t<=0)return this;let n={retain:t};return r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n)}push(t){let r=this.ops.length,n=this.ops[r-1];if(t=Ky(t),typeof n=="object"){if(typeof t.delete=="number"&&typeof n.delete=="number")return this.ops[r-1]={delete:n.delete+t.delete},this;if(typeof n.delete=="number"&&t.insert!=null&&(r-=1,n=this.ops[r-1],typeof n!="object"))return this.ops.unshift(t),this;if(Os(t.attributes,n.attributes)){if(typeof t.insert=="string"&&typeof n.insert=="string")return this.ops[r-1]={insert:n.insert+t.insert},typeof t.attributes=="object"&&(this.ops[r-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof n.retain=="number")return this.ops[r-1]={retain:n.retain+t.retain},typeof t.attributes=="object"&&(this.ops[r-1].attributes=t.attributes),this}}return r===this.ops.length?this.ops.push(t):this.ops.splice(r,0,t),this}chop(){let t=this.ops[this.ops.length-1];return t&&typeof t.retain=="number"&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){let r=[],n=[];return this.forEach(s=>{(t(s)?r:n).push(s)}),[r,n]}reduce(t,r){return this.ops.reduce(t,r)}changeLength(){return this.reduce((t,r)=>r.insert?t+St.default.length(r):r.delete?t-r.delete:t,0)}length(){return this.reduce((t,r)=>t+St.default.length(r),0)}slice(t=0,r=1/0){let n=[],s=new st.default(this.ops),i=0;for(;i<r&&s.hasNext();){let o;i<t?o=s.next(t-i):(o=s.next(r-i),n.push(o)),i+=St.default.length(o)}return new e(n)}compose(t){let r=new st.default(this.ops),n=new st.default(t.ops),s=[],i=n.peek();if(i!=null&&typeof i.retain=="number"&&i.attributes==null){let a=i.retain;for(;r.peekType()==="insert"&&r.peekLength()<=a;)a-=r.peekLength(),s.push(r.next());i.retain-a>0&&n.next(i.retain-a)}let o=new e(s);for(;r.hasNext()||n.hasNext();)if(n.peekType()==="insert")o.push(n.next());else if(r.peekType()==="delete")o.push(r.next());else{let a=Math.min(r.peekLength(),n.peekLength()),l=r.next(a),u=n.next(a);if(u.retain){let f={};if(typeof l.retain=="number")f.retain=typeof u.retain=="number"?a:u.retain;else if(typeof u.retain=="number")l.retain==null?f.insert=l.insert:f.retain=l.retain;else{let h=l.retain==null?"insert":"retain",[d,p,y]=Gl(l[h],u.retain),x=e.getHandler(d);f[h]={[d]:x.compose(p,y,h==="retain")}}let c=oe.default.compose(l.attributes,u.attributes,typeof l.retain=="number");if(c&&(f.attributes=c),o.push(f),!n.hasNext()&&Os(o.ops[o.ops.length-1],f)){let h=new e(r.rest());return o.concat(h).chop()}}else typeof u.delete=="number"&&(typeof l.retain=="number"||typeof l.retain=="object"&&l.retain!==null)&&o.push(u)}return o.chop()}concat(t){let r=new e(this.ops.slice());return t.ops.length>0&&(r.push(t.ops[0]),r.ops=r.ops.concat(t.ops.slice(1))),r}diff(t,r){if(this.ops===t.ops)return new e;let n=[this,t].map(l=>l.map(u=>{if(u.insert!=null)return typeof u.insert=="string"?u.insert:zy;let f=l===t?"on":"with";throw new Error("diff() called "+f+" non-document")}).join("")),s=new e,i=un(n[0],n[1],r,!0),o=new st.default(this.ops),a=new st.default(t.ops);
3return i.forEach(l=>{let u=l[1].length;for(;u>0;){let f=0;switch(l[0]){case un.INSERT:f=Math.min(a.peekLength(),u),s.push(a.next(f));break;case un.DELETE:f=Math.min(u,o.peekLength()),o.next(f),s.delete(f);break;case un.EQUAL:f=Math.min(o.peekLength(),a.peekLength(),u);let c=o.next(f),h=a.next(f);Os(c.insert,h.insert)?s.retain(f,oe.default.diff(c.attributes,h.attributes)):s.push(h).delete(f);break}u-=f}}),s.chop()}eachLine(t,r=`
4`){let n=new st.default(this.ops),s=new e,i=0;for(;n.hasNext();){if(n.peekType()!=="insert")return;let o=n.peek(),a=St.default.length(o)-n.peekLength(),l=typeof o.insert=="string"?o.insert.indexOf(r,a)-a:-1;if(l<0)s.push(n.next());else if(l>0)s.push(n.next(l));else{if(t(s,n.next(1).attributes||{},i)===!1)return;i+=1,s=new e}}s.length()>0&&t(s,{},i)}invert(t){let r=new e;return this.reduce((n,s)=>{if(s.insert)r.delete(St.default.length(s));else{if(typeof s.retain=="number"&&s.attributes==null)return r.retain(s.retain),n+s.retain;if(s.delete||typeof s.retain=="number"){let i=s.delete||s.retain;return t.slice(n,n+i).forEach(a=>{s.delete?r.push(a):s.retain&&s.attributes&&r.retain(St.default.length(a),oe.default.invert(s.attributes,a.attributes))}),n+i}else if(typeof s.retain=="object"&&s.retain!==null){let i=t.slice(n,n+1),o=new st.default(i.ops).next(),[a,l,u]=Gl(s.retain,o.insert),f=e.getHandler(a);return r.retain({[a]:f.invert(l,u)},oe.default.invert(s.attributes,o.attributes)),n+1}}return n},0),r.chop()}transform(t,r=!1){if(r=!!r,typeof t=="number")return this.transformPosition(t,r);let n=t,s=new st.default(this.ops),i=new st.default(n.ops),o=new e;for(;s.hasNext()||i.hasNext();)if(s.peekType()==="insert"&&(r||i.peekType()!=="insert"))o.retain(St.default.length(s.next()));else if(i.peekType()==="insert")o.push(i.next());else{let a=Math.min(s.peekLength(),i.peekLength()),l=s.next(a),u=i.next(a);if(l.delete)continue;if(u.delete)o.push(u);else{let f=l.retain,c=u.retain,h=typeof c=="object"&&c!==null?c:a;if(typeof f=="object"&&f!==null&&typeof c=="object"&&c!==null){let d=Object.keys(f)[0];if(d===Object.keys(c)[0]){let p=e.getHandler(d);p&&(h={[d]:p.transform(f[d],c[d],r)})}}o.retain(h,oe.default.transform(l.attributes,u.attributes,r))}}return o.chop()}transformPosition(t,r=!1){r=!!r;let n=new st.default(this.ops),s=0;for(;n.hasNext()&&s<=t;){let i=n.peekLength(),o=n.peekType();if(n.next(),o==="delete"){t-=Math.min(i,t-s);continue}else o==="insert"&&(s<t||!r)&&(t+=i);s+=i}return t}};Lt.Op=St.default;Lt.OpIterator=st.default;Lt.AttributeMap=oe.default;Lt.handlers={};Ct.default=Lt;typeof fn=="object"&&(fn.exports=Lt,fn.exports.default=Lt)});var pr={};ku(pr,{Attributor:()=>z,AttributorStore:()=>Fe,BlockBlot:()=>Yt,ClassAttributor:()=>q,ContainerBlot:()=>he,EmbedBlot:()=>D,InlineBlot:()=>dr,LeafBlot:()=>B,ParentBlot:()=>V,Registry:()=>jt,Scope:()=>b,ScrollBlot:()=>Ke,StyleAttributor:()=>X,TextBlot:()=>de});var b=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(b||{}),z=class{constructor(t,r,n={}){this.attrName=t,this.keyName=r;let s=b.TYPE&b.ATTRIBUTE;this.scope=n.scope!=null?n.scope&b.LEVEL|s:b.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map(r=>r.name)}add(t,r){return this.canAdd(t,r)?(t.setAttribute(this.keyName,r),!0):!1}canAdd(t,r){return this.whitelist==null?!0:typeof r=="string"?this.whitelist.indexOf(r.replace(/["']/g,""))>-1:this.whitelist.indexOf(r)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){let r=t.getAttribute(this.keyName);return this.canAdd(t,r)&&r?r:""}},Mt=class extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}},Uu=(()=>{let e=class Tn{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(r,n=!1){if(r==null)return null;if(this.blots.has(r))return this.blots.get(r)||null;if(n){let s=null;try{s=r.parentNode}catch(i){return null}return this.find(s,n)}return null}create(r,n,s){let i=this.query(n);if(i==null)throw new Mt(`Unable to create ${n} blot`);let o=i,a=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:o.create(s),l=new o(r,a,s);return Tn.blots.set(l.domNode,l),l}find(r,n=!1){return Tn.find(r,n)}query(r,n=b.ANY){let s;return typeof r=="string"?s=this.types[r]||this.attributes[r]:r instanceof Text||r.nodeType===Node.TEXT_NODE?s=this.types.text:typeof r=="number"?r&b.LEVEL&b.BLOCK?s=this.types.block:r&b.LEVEL&b.INLINE&&(s=this.types.inline):r instanceof Element&&((r.getAttribute("class")||"").split(/\s+/).some(i=>(s=this.classes[i],!!s)),s=s||this.tags[r.tagName]),s==null?null:"scope"in s&&n&b.LEVEL&s.scope&&n&b.TYPE&s.scope?s:null}register(...r){return r.map(n=>{let s="blotName"in n,i="attrName"in n;if(!s&&!i)throw new Mt("Invalid definition");if(s&&n.blotName==="abstract")throw new Mt("Cannot register abstract class");let o=s?n.blotName:i?n.attrName:void 0;return this.types[o]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):s&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(a=>a.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEac
4h(a=>{(this.tags[a]==null||n.className==null)&&(this.tags[a]=n)}))),n})}};return e.blots=new WeakMap,e})(),jt=Uu;function Xs(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(r=>r.indexOf(`${t}-`)===0)}var Nn=class extends z{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(r=>r.split("-").slice(0,-1).join("-"))}add(t,r){return this.canAdd(t,r)?(this.remove(t),t.classList.add(`${this.keyName}-${r}`),!0):!1}remove(t){Xs(t,this.keyName).forEach(r=>{t.classList.remove(r)}),t.classList.length===0&&t.removeAttribute("class")}value(t){let r=(Xs(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,r)?r:""}},q=Nn;function En(e){let t=e.split("-"),r=t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return t[0]+r}var An=class extends z{static keys(t){return(t.getAttribute("style")||"").split(";").map(r=>r.split(":")[0].trim())}add(t,r){return this.canAdd(t,r)?(t.style[En(this.keyName)]=r,!0):!1}remove(t){t.style[En(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){let r=t.style[En(this.keyName)];return this.canAdd(t,r)?r:""}},X=An,_n=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,r){r?t.add(this.domNode,r)&&(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={};let t=jt.find(this.domNode);if(t==null)return;let r=z.keys(this.domNode),n=q.keys(this.domNode),s=X.keys(this.domNode);r.concat(n).concat(s).forEach(i=>{let o=t.scroll.query(i,b.ATTRIBUTE);o instanceof z&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(r=>{let n=this.attributes[r].value(this.domNode);t.format(r,n)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(r=>{this.attributes[r].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,r)=>(t[r]=this.attributes[r].value(this.domNode),t),{})}},Fe=_n,Qs=class{constructor(t,r){this.scroll=t,this.domNode=r,jt.blots.set(r,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Mt("Blot definition missing tagName");let r,n;return Array.isArray(this.tagName)?(typeof t=="string"?(n=t.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof t=="number"&&(n=t),typeof n=="number"?r=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?r=document.createElement(n):r=document.createElement(this.tagName[0])):r=document.createElement(this.tagName),this.className&&r.classList.add(this.className),r}get statics(){return this.constructor}attach(){}clone(){let t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),jt.blots.delete(this.domNode)}deleteAt(t,r){this.isolate(t,r).remove()}formatAt(t,r,n,s){let i=this.isolate(t,r);if(this.scroll.query(n,b.BLOT)!=null&&s)i.wrap(n,s);else if(this.scroll.query(n,b.ATTRIBUTE)!=null){let o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(n,s)}}insertAt(t,r,n){let s=n==null?this.scroll.create("text",r):this.scroll.create(r,n),i=this.split(t);this.parent.insertBefore(s,i||void 0)}isolate(t,r){let n=this.split(t);if(n==null)throw new Error("Attempt to isolate at end");return n.split(r),n}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,r){let n=typeof t=="string"?this.scroll.create(t,r):t;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(t,r){return t===0?this:this.next}update(t,r){}wrap(t,r){let n=typeof t=="string"?this.scroll.create(t,r):t;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new Mt(`Cannot wrap ${t}`);return n.appendChild(this),n}};Qs.blotName="abstract";var Zs=Qs,Js=class extends Zs{static value(t){return!0}index(t,r){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(r,1):-1}position(t,r){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Js.scope=b.INLINE_BLOT;var Fu=Js,B=Fu,wn=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){let r=t.slice(1);this.append(...r)}}at(t){let r=this.iterator(),n=r();for(;n&&t>0;)t-=1,n=r();return n}contains(t){let r=this.iterator(),n=r();for(;n;){if(n===t)return!0;n=r()}return!1}indexOf(t){let r=this.iterator(),n=r(),s=0;for(;n;){if(n===t)return s;s+=1,n=r()}return-1}insertBefore(t,r){t!=null&&(this.remove(t),t.next=r,r!=null?(t.prev=r.prev,r.prev!=null&&(r.prev.next=t),r.prev=t,r===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 r=0,n=this.head;for(;n!=null;){if(n===t)return r;r+=n.length(),n=n.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()=>{let r=t;return t!=null&&(t=t.next),r}}find(t,r=!1){let n=this.iterator(),s=n();for(;s;){let i=s.length();if(t<i||r&&t===i&&(s.next==null||s.next.length()!==0))return[s,t];t-=i,s=n()}return[null,0]}forEach(t){let r=this.iterator(),n=r();for(;n;)t(n),n=r()}forEachAt(t,r,n){if(r<=0)return;let[s,i]=this.find(t),o=t-i,a=this.iterator(s),l=a();for(;l&&o<t+r;){let u=l.length();t>o?n(l,t-o,Math.min(r,o+u-t)):n(l,0,Math.min(u,t+r-o)),o+=u,l=a()}}map(t){return this.reduce((r,n)=>(r.push(t(n)),r),[])}reduce(t,r){let n=this.iterator(),s=n();for(;s;)r=t(r,s),s=n();return r}};function Ys(e,t){let r=t.find(e);if(r)return r;try{return t.create(e)}catch(n){let s=t.create(b.INLINE);
4return Array.from(e.childNodes).forEach(i=>{s.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(s.domNode,e),s.attach(),s}}var Ku=(()=>{let e=class Dt extends Zs{constructor(r,n){super(r,n),this.uiNode=null,this.build()}appendChild(r){this.insertBefore(r)}attach(){super.attach(),this.children.forEach(r=>{r.attach()})}attachUI(r){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=r,Dt.uiClass&&this.uiNode.classList.add(Dt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new wn,Array.from(this.domNode.childNodes).filter(r=>r!==this.uiNode).reverse().forEach(r=>{try{let n=Ys(r,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Mt)return;throw n}})}deleteAt(r,n){if(r===0&&n===this.length())return this.remove();this.children.forEachAt(r,n,(s,i,o)=>{s.deleteAt(i,o)})}descendant(r,n=0){let[s,i]=this.children.find(n);return r.blotName==null&&r(s)||r.blotName!=null&&s instanceof r?[s,i]:s instanceof Dt?s.descendant(r,i):[null,-1]}descendants(r,n=0,s=Number.MAX_VALUE){let i=[],o=s;return this.children.forEachAt(n,s,(a,l,u)=>{(r.blotName==null&&r(a)||r.blotName!=null&&a instanceof r)&&i.push(a),a instanceof Dt&&(i=i.concat(a.descendants(r,l,o))),o-=u}),i}detach(){this.children.forEach(r=>{r.detach()}),super.detach()}enforceAllowedChildren(){let r=!1;this.children.forEach(n=>{r||this.statics.allowedChildren.some(s=>n instanceof s)||(n.statics.scope===b.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),r=!0):n instanceof Dt?n.unwrap():n.remove())})}formatAt(r,n,s,i){this.children.forEachAt(r,n,(o,a,l)=>{o.formatAt(a,l,s,i)})}insertAt(r,n,s){let[i,o]=this.children.find(r);if(i)i.insertAt(o,n,s);else{let a=s==null?this.scroll.create("text",n):this.scroll.create(n,s);this.appendChild(a)}}insertBefore(r,n){r.parent!=null&&r.parent.children.remove(r);let s=null;this.children.insertBefore(r,n||null),r.parent=this,n!=null&&(s=n.domNode),(this.domNode.parentNode!==r.domNode||this.domNode.nextSibling!==s)&&this.domNode.insertBefore(r.domNode,s),r.attach()}length(){return this.children.reduce((r,n)=>r+n.length(),0)}moveChildren(r,n){this.children.forEach(s=>{r.insertBefore(s,n)})}optimize(r){if(super.optimize(r),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){let n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(r,n=!1){let[s,i]=this.children.find(r,n),o=[[this,r]];return s instanceof Dt?o.concat(s.path(i,n)):(s!=null&&o.push([s,i]),o)}removeChild(r){this.children.remove(r)}replaceWith(r,n){let s=typeof r=="string"?this.scroll.create(r,n):r;return s instanceof Dt&&this.moveChildren(s),super.replaceWith(s)}split(r,n=!1){if(!n){if(r===0)return this;if(r===this.length())return this.next}let s=this.clone();return this.parent&&this.parent.insertBefore(s,this.next||void 0),this.children.forEachAt(r,this.length(),(i,o,a)=>{let l=i.split(o,n);l!=null&&s.appendChild(l)}),s}splitAfter(r){let n=this.clone();for(;r.next!=null;)n.appendChild(r.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(r,n){let s=[],i=[];r.forEach(o=>{o.target===this.domNode&&o.type==="childList"&&(s.push(...o.addedNodes),i.push(...o.removedNodes))}
4),i.forEach(o=>{if(o.parentNode!=null&&o.tagName!=="IFRAME"&&document.body.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let a=this.scroll.find(o);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),s.filter(o=>o.parentNode===this.domNode&&o!==this.uiNode).sort((o,a)=>o===a?0:o.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(o=>{let a=null;o.nextSibling!=null&&(a=this.scroll.find(o.nextSibling));let l=Ys(o,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};return e.uiClass="",e})(),zu=Ku,V=zu;function Hu(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}var le=class ue extends V{static create(t){return super.create(t)}static formats(t,r){let n=r.query(ue.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,r){super(t,r),this.attributes=new Fe(this.domNode)}format(t,r){if(t===this.statics.blotName&&!r)this.children.forEach(n=>{n instanceof ue||(n=n.wrap(ue.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{let n=this.scroll.query(t,b.INLINE);if(n==null)return;n instanceof z?this.attributes.attribute(n,r):r&&(t!==this.statics.blotName||this.formats()[t]!==r)&&this.replaceWith(t,r)}}formats(){let t=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(t[this.statics.blotName]=r),t}formatAt(t,r,n,s){this.formats()[n]!=null||this.scroll.query(n,b.ATTRIBUTE)?this.isolate(t,r).format(n,s):super.formatAt(t,r,n,s)}optimize(t){super.optimize(t);let r=this.formats();if(Object.keys(r).length===0)return this.unwrap();let n=this.next;n instanceof ue&&n.prev===this&&Hu(r,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(t,r){let n=super.replaceWith(t,r);return this.attributes.copy(n),n}update(t,r){super.update(t,r),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(t,r){let n=super.wrap(t,r);return n instanceof ue&&this.attributes.move(n),n}};le.allowedChildren=[le,B],le.blotName="inline",le.scope=b.INLINE_BLOT,le.tagName="SPAN";var $u=le,dr=$u,fe=class On extends V{static create(t){return super.create(t)}static formats(t,r){let n=r.query(On.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,r){super(t,r),this.attributes=new Fe(this.domNode)}format(t,r){let n=this.scroll.query(t,b.BLOCK);n!=null&&(n instanceof z?this.attributes.attribute(n,r):t===this.statics.blotName&&!r?this.replaceWith(On.blotName):r&&(t!==this.statics.blotName||this.formats()[t]!==r)&&this.replaceWith(t,r))}formats(){let t=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(t[this.statics.blotName]=r),t}formatAt(t,r,n,s){this.scroll.query(n,b.BLOCK)!=null?this.format(n,s):super.formatAt(t,r,n,s)}insertAt(t,r,n){if(n==null||this.scroll.query(r,b.INLINE)!=null)super.insertAt(t,r,n);else{let s=this.split(t);if(s!=null){let i=this.scroll.create(r,n);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,r){let n=super.replaceWith(t,r);return this.attributes.copy(n),n}update(t,r){super.update(t,r),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};fe.blotName="block",fe.scope=b.BLOCK_BLOT,fe.tagName="P",fe.allowedChildren=[dr,fe,B];var Gu=fe,Yt=Gu,Sn=class extends V{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,r){super.deleteAt(t,r),this.enforceAllowedChildren()}formatAt(t,r,n,s){super.formatAt(t,r,n,s),this.enforceAllowedChildren()}insertAt(t,r,n){super.insertAt(t,r,n),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Sn.blotName="container",Sn.scope=b.BLOCK_BLOT;var Wu=Sn,he=Wu,Cn=class extends B{static formats(t,r){}format(t,r){super.formatAt(0,this.length(),t,r)}formatAt(t,r,n,s){t===0&&r===this.length()?this.format(n,s):super.formatAt(t,r,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}},D=Cn,Vu={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Xu=100,ce=class extends V{constructor(t,r){super(null,r),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,Vu),this.attach()}create(t,r){return this.registry.create(this,t,r)}find(t,r=!1){let n=this.registry.find(t,r);return n?n.scroll===this?n:r?this.find(n.scroll.domNode.parentNode,!0):null:null}query(t,r=b.ANY){return this.registry.query(t,r)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,r){this.update(),t===0&&r===this.length()?this.children.forEac
4h(n=>{n.remove()}):super.deleteAt(t,r)}formatAt(t,r,n,s){this.update(),super.formatAt(t,r,n,s)}insertAt(t,r,n){this.update(),super.insertAt(t,r,n)}optimize(t=[],r={}){super.optimize(r);let n=r.mutationsMap||new WeakMap,s=Array.from(this.observer.takeRecords());for(;s.length>0;)t.push(s.pop());let i=(l,u=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(n.has(l.domNode)||n.set(l.domNode,[]),u&&i(l.parent))},o=l=>{n.has(l.domNode)&&(l instanceof V&&l.children.forEach(o),n.delete(l.domNode),l.optimize(r))},a=t;for(let l=0;a.length>0;l+=1){if(l>=Xu)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(u=>{let f=this.find(u.target,!0);f!=null&&(f.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(c=>{let h=this.find(c,!1);i(h,!1),h instanceof V&&h.children.forEach(d=>{i(d,!1)})})):u.type==="attributes"&&i(f.prev)),i(f))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),s=a.slice();s.length>0;)t.push(s.pop())}}update(t,r={}){t=t||this.observer.takeRecords();let n=new WeakMap;t.map(s=>{let i=this.find(s.target,!0);return i==null?null:n.has(i.domNode)?(n.get(i.domNode).push(s),null):(n.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&n.has(s.domNode)&&s.update(n.get(s.domNode)||[],r)}),r.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),r),this.optimize(t,r)}};ce.blotName="scroll",ce.defaultChild=Yt,ce.allowedChildren=[Yt,he],ce.scope=b.BLOCK_BLOT,ce.tagName="DIV";var Yu=ce,Ke=Yu,Ln=class ti extends B{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,r){super(t,r),this.text=this.statics.value(this.domNode)}deleteAt(t,r){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+r)}index(t,r){return this.domNode===t?r:-1}insertAt(t,r,n){n==null?(this.text=this.text.slice(0,t)+r+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,r,n)}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 ti&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,r=!1){return[this.domNode,t]}split(t,r=!1){if(!r){if(t===0)return this;if(t===this.length())return this.next}let n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,r){t.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Ln.blotName="text",Ln.scope=b.INLINE_BLOT;var Qu=Ln,de=Qu;var Zu=typeof global=="object"&&global&&global.Object===Object&&global,mr=Zu;var Ju=typeof self=="object"&&self&&self.Object===Object&&self,tf=mr||Ju||Function("return this")(),R=tf;var ef=R.Symbol,rt=ef;var ei=Object.prototype,rf=ei.hasOwnProperty,nf=ei.toString,ze=rt?rt.toStringTag:void 0;function sf(e){var t=rf.call(e,ze),r=e[ze];try{e[ze]=void 0;var n=!0}catch(i){}var s=nf.call(e);return n&&(t?e[ze]=r:delete e[ze]),s}var ri=sf;var of=Object.prototype,af=of.toString;function lf(e){return af.call(e)}var ni=lf;var uf="[object Null]",ff="[object Undefined]",si=rt?rt.toStringTag:void 0;function cf(e){return e==null?e===void 0?ff:uf:si&&si in Object(e)?ri(e):ni(e)}var at=cf;function hf(e){return e!=null&&typeof e=="object"}var P=hf;var df=Array.isArray,nt=df;function pf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var U=pf;function mf(e){return e}var gr=mf;var gf="[object AsyncFunction]",bf="[object Function]",yf="[object GeneratorFunction]",xf="[object Proxy]";function vf(e){if(!U(e))return!1;var t=at(e);return t==bf||t==yf||t==gf||t==xf}var pe=vf;var Ef=R["__core-js_shared__"],br=Ef;var ii=(function(){var e=/[^.]+$/.exec(br&&br.keys&&br.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Tf(e){return!!ii&&ii in e}var oi=Tf;var Nf=Function.prototype,Af=Nf.toString;function _f(e){if(e!=null){try{return Af.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var xt=_f;var wf=/[\\^$.*+?()[\]{}|]/g,Of=/^\[object .+?Constructor\]$/,Sf=Function.prototype,Cf=Object.prototype,Lf=Sf.toString,If=Cf.hasOwnProperty,Bf=RegExp("^"+Lf.call(If).replace(wf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rf(e){if(!U(e)||oi(e))return!1;var t=pe(e)?Bf:Of;return t.test(xt(e))}var ai=Rf;function Df(e,t){return e?.[t]}var li=Df;function Mf(e,t){var r=li(e,t);return ai(r)?r:void 0}var Y=Mf;var jf=Y(R,"WeakMap"),yr=jf;var ui=Object.create,Pf=(function(){function e(){}return function(t){if(!U(t))return{};
4if(ui)return ui(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),fi=Pf;function kf(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ci=kf;function qf(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var xr=qf;var Uf=800,Ff=16,Kf=Date.now;function zf(e){var t=0,r=0;return function(){var n=Kf(),s=Ff-(n-r);if(r=n,s>0){if(++t>=Uf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var hi=zf;function Hf(e){return function(){return e}}var di=Hf;var $f=(function(){try{var e=Y(Object,"defineProperty");return e({},"",{}),e}catch(t){}})(),me=$f;var Gf=me?function(e,t){return me(e,"toString",{configurable:!0,enumerable:!1,value:di(t),writable:!0})}:gr,pi=Gf;var Wf=hi(pi),mi=Wf;function Vf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var gi=Vf;var Xf=9007199254740991,Yf=/^(?:0|[1-9]\d*)$/;function Qf(e,t){var r=typeof e;return t=t??Xf,!!t&&(r=="number"||r!="symbol"&&Yf.test(e))&&e>-1&&e%1==0&&e<t}var vr=Qf;function Zf(e,t,r){t=="__proto__"&&me?me(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ge=Zf;function Jf(e,t){return e===t||e!==e&&t!==t}var ct=Jf;var tc=Object.prototype,ec=tc.hasOwnProperty;function rc(e,t,r){var n=e[t];(!(ec.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&ge(e,t,r)}var Er=rc;function nc(e,t,r,n){var s=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var a=t[i],l=n?n(r[a],e[a],a,r,e):void 0;l===void 0&&(l=e[a]),s?ge(r,a,l):Er(r,a,l)}return r}var ht=nc;var bi=Math.max;function sc(e,t,r){return t=bi(t===void 0?e.length-1:t,0),function(){for(var n=arguments,s=-1,i=bi(n.length-t,0),o=Array(i);++s<i;)o[s]=n[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=n[s];return a[t]=r(o),ci(e,this,a)}}var yi=sc;function ic(e,t){return mi(yi(e,t,gr),e+"")}var xi=ic;var oc=9007199254740991;function ac(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oc}var Tr=ac;function lc(e){return e!=null&&Tr(e.length)&&!pe(e)}var Pt=lc;function uc(e,t,r){if(!U(r))return!1;var n=typeof t;return(n=="number"?Pt(r)&&vr(t,r.length):n=="string"&&t in r)?ct(r[t],e):!1}var vi=uc;function fc(e){return xi(function(t,r){var n=-1,s=r.length,i=s>1?r[s-1]:void 0,o=s>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(s--,i):void 0,o&&vi(r[0],r[1],o)&&(i=s<3?void 0:i,s=1),t=Object(t);++n<s;){var a=r[n];a&&e(t,a,n,i)}return t})}var Ei=fc;var cc=Object.prototype;function hc(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||cc;return e===r}var be=hc;function dc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Ti=dc;var pc="[object Arguments]";function mc(e){return P(e)&&at(e)==pc}var In=mc;var Ni=Object.prototype,gc=Ni.hasOwnProperty,bc=Ni.propertyIsEnumerable,yc=In((function(){return arguments})())?In:function(e){return P(e)&&gc.call(e,"callee")&&!bc.call(e,"callee")},He=yc;function xc(){return!1}var Ai=xc;var Oi=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_i=Oi&&typeof module=="object"&&module&&!module.nodeType&&module,vc=_i&&_i.exports===Oi,wi=vc?R.Buffer:void 0,Ec=wi?wi.isBuffer:void 0,Tc=Ec||Ai,vt=Tc;var Nc="[object Arguments]",Ac="[object Array]",_c="[object Boolean]",wc="[object Date]",Oc="[object Error]",Sc="[object Function]",Cc="[object Map]",Lc="[object Number]",Ic="[object Object]",Bc="[object RegExp]",Rc="[object Set]",Dc="[object String]",Mc="[object WeakMap]",jc="[object ArrayBuffer]",Pc="[object DataView]",kc="[object Float32Array]",qc="[object Float64Array]",Uc="[object Int8Array]",Fc="[object Int16Array]",Kc="[object Int32Array]",zc="[object Uint8Array]",Hc="[object Uint8ClampedArray]",$c="[object Uint16Array]",Gc="[object Uint32Array]",S={};S[kc]=S[qc]=S[Uc]=S[Fc]=S[Kc]=S[zc]=S[Hc]=S[$c]=S[Gc]=!0;S[Nc]=S[Ac]=S[jc]=S[_c]=S[Pc]=S[wc]=S[Oc]=S[Sc]=S[Cc]=S[Lc]=S[Ic]=S[Bc]=S[Rc]=S[Dc]=S[Mc]=!1;function Wc(e){return P(e)&&Tr(e.length)&&!!S[at(e)]}var Si=Wc;function Vc(e){return function(t){return e(t)}}var ye=Vc;var Ci=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$e=Ci&&typeof module=="object"&&module&&!module.nodeType&&module,Xc=$e&&$e.exports===Ci,Bn=Xc&&mr.process,Yc=(function(){try{var e=$e&&$e.require&&$e.require("util").t
4ypes;return e||Bn&&Bn.binding&&Bn.binding("util")}catch(t){}})(),Et=Yc;var Li=Et&&Et.isTypedArray,Qc=Li?ye(Li):Si,xe=Qc;var Zc=Object.prototype,Jc=Zc.hasOwnProperty;function th(e,t){var r=nt(e),n=!r&&He(e),s=!r&&!n&&vt(e),i=!r&&!n&&!s&&xe(e),o=r||n||s||i,a=o?Ti(e.length,String):[],l=a.length;for(var u in e)(t||Jc.call(e,u))&&!(o&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||vr(u,l)))&&a.push(u);return a}var Nr=th;function eh(e,t){return function(r){return e(t(r))}}var Ar=eh;var rh=Ar(Object.keys,Object),Ii=rh;var nh=Object.prototype,sh=nh.hasOwnProperty;function ih(e){if(!be(e))return Ii(e);var t=[];for(var r in Object(e))sh.call(e,r)&&r!="constructor"&&t.push(r);return t}var Bi=ih;function oh(e){return Pt(e)?Nr(e):Bi(e)}var ve=oh;function ah(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ri=ah;var lh=Object.prototype,uh=lh.hasOwnProperty;function fh(e){if(!U(e))return Ri(e);var t=be(e),r=[];for(var n in e)n=="constructor"&&(t||!uh.call(e,n))||r.push(n);return r}var Di=fh;function ch(e){return Pt(e)?Nr(e,!0):Di(e)}var dt=ch;var hh=Y(Object,"create"),Tt=hh;function dh(){this.__data__=Tt?Tt(null):{},this.size=0}var Mi=dh;function ph(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ji=ph;var mh="__lodash_hash_undefined__",gh=Object.prototype,bh=gh.hasOwnProperty;function yh(e){var t=this.__data__;if(Tt){var r=t[e];return r===mh?void 0:r}return bh.call(t,e)?t[e]:void 0}var Pi=yh;var xh=Object.prototype,vh=xh.hasOwnProperty;function Eh(e){var t=this.__data__;return Tt?t[e]!==void 0:vh.call(t,e)}var ki=Eh;var Th="__lodash_hash_undefined__";function Nh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tt&&t===void 0?Th:t,this}var qi=Nh;function Ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ee.prototype.clear=Mi;Ee.prototype.delete=ji;Ee.prototype.get=Pi;Ee.prototype.has=ki;Ee.prototype.set=qi;var Rn=Ee;function Ah(){this.__data__=[],this.size=0}var Ui=Ah;function _h(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}var kt=_h;var wh=Array.prototype,Oh=wh.splice;function Sh(e){var t=this.__data__,r=kt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Oh.call(t,r,1),--this.size,!0}var Fi=Sh;function Ch(e){var t=this.__data__,r=kt(t,e);return r<0?void 0:t[r][1]}var Ki=Ch;function Lh(e){return kt(this.__data__,e)>-1}var zi=Lh;function Ih(e,t){var r=this.__data__,n=kt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Hi=Ih;function Te(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Te.prototype.clear=Ui;Te.prototype.delete=Fi;Te.prototype.get=Ki;Te.prototype.has=zi;Te.prototype.set=Hi;var qt=Te;var Bh=Y(R,"Map"),Ut=Bh;function Rh(){this.size=0,this.__data__={hash:new Rn,map:new(Ut||qt),string:new Rn}}var $i=Rh;function Dh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Gi=Dh;function Mh(e,t){var r=e.__data__;return Gi(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ft=Mh;function jh(e){var t=Ft(this,e).delete(e);return this.size-=t?1:0,t}var Wi=jh;function Ph(e){return Ft(this,e).get(e)}var Vi=Ph;function kh(e){return Ft(this,e).has(e)}var Xi=kh;function qh(e,t){var r=Ft(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Yi=qh;function Ne(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ne.prototype.clear=$i;Ne.prototype.delete=Wi;Ne.prototype.get=Vi;Ne.prototype.has=Xi;Ne.prototype.set=Yi;var _r=Ne;function Uh(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var wr=Uh;var Fh=Ar(Object.getPrototypeOf,Object),Ae=Fh;var Kh="[object Object]",zh=Function.prototype,Hh=Object.prototype,Qi=zh.toString,$h=Hh.hasOwnProperty,Gh=Qi.call(Object);function Wh(e){if(!P(e)||at(e)!=Kh)return!1;var t=Ae(e);if(t===null)return!0;var r=$h.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Qi.call(r)==Gh}var Zi=Wh;function Vh(){this.__data__=new qt,this.size=0}var Ji=Vh;function Xh(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var to=Xh;function Yh(e){return this.__data__.get(e)}var eo=Yh;function Qh(e){return this.__data__.has(e)}var ro=Qh;var Zh=200;function Jh(e,t){var r=this.__data__;if(r instanceof qt){var n=r.__data__;if(!Ut||n.length<Zh-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new _r(n)}return r.set(e,t),this.size=r.size,this}var no=Jh;function _e(e){var t=this.__data__=new qt(e);this.size=t.size}_e.prototype.clear=Ji;_e.prototype.delete=to;_e.prototype.get=eo;_e.prototype.has=ro;_e.prototype.set=no;var Kt=_e;function td(e,t){return e&&ht(t,ve(t),e)}var so=td;function ed(e,t){return e&&ht(t,dt(t),e)}var io=ed;var uo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oo=uo&&typeof module=="object"&&module&&!module.nodeType&&module,rd=oo&&oo.exports===uo,ao=rd?R.Buffer:void 0,lo=ao?ao.allocUnsafe:void 0;
4function nd(e,t){if(t)return e.slice();var r=e.length,n=lo?lo(r):new e.constructor(r);return e.copy(n),n}var Or=nd;function sd(e,t){for(var r=-1,n=e==null?0:e.length,s=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[s++]=o)}return i}var fo=sd;function id(){return[]}var Sr=id;var od=Object.prototype,ad=od.propertyIsEnumerable,co=Object.getOwnPropertySymbols,ld=co?function(e){return e==null?[]:(e=Object(e),fo(co(e),function(t){return ad.call(e,t)}))}:Sr,we=ld;function ud(e,t){return ht(e,we(e),t)}var ho=ud;var fd=Object.getOwnPropertySymbols,cd=fd?function(e){for(var t=[];e;)wr(t,we(e)),e=Ae(e);return t}:Sr,Cr=cd;function hd(e,t){return ht(e,Cr(e),t)}var po=hd;function dd(e,t,r){var n=t(e);return nt(e)?n:wr(n,r(e))}var Lr=dd;function pd(e){return Lr(e,ve,we)}var Ge=pd;function md(e){return Lr(e,dt,Cr)}var mo=md;var gd=Y(R,"DataView"),Ir=gd;var bd=Y(R,"Promise"),Br=bd;var yd=Y(R,"Set"),Rr=yd;var go="[object Map]",xd="[object Object]",bo="[object Promise]",yo="[object Set]",xo="[object WeakMap]",vo="[object DataView]",vd=xt(Ir),Ed=xt(Ut),Td=xt(Br),Nd=xt(Rr),Ad=xt(yr),Qt=at;(Ir&&Qt(new Ir(new ArrayBuffer(1)))!=vo||Ut&&Qt(new Ut)!=go||Br&&Qt(Br.resolve())!=bo||Rr&&Qt(new Rr)!=yo||yr&&Qt(new yr)!=xo)&&(Qt=function(e){var t=at(e),r=t==xd?e.constructor:void 0,n=r?xt(r):"";if(n)switch(n){case vd:return vo;case Ed:return go;case Td:return bo;case Nd:return yo;case Ad:return xo}return t});var Nt=Qt;var _d=Object.prototype,wd=_d.hasOwnProperty;function Od(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&wd.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Eo=Od;var Sd=R.Uint8Array,Oe=Sd;function Cd(e){var t=new e.constructor(e.byteLength);return new Oe(t).set(new Oe(e)),t}var Se=Cd;function Ld(e,t){var r=t?Se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var To=Ld;var Id=/\w*$/;function Bd(e){var t=new e.constructor(e.source,Id.exec(e));return t.lastIndex=e.lastIndex,t}var No=Bd;var Ao=rt?rt.prototype:void 0,_o=Ao?Ao.valueOf:void 0;function Rd(e){return _o?Object(_o.call(e)):{}}var wo=Rd;function Dd(e,t){var r=t?Se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Dr=Dd;var Md="[object Boolean]",jd="[object Date]",Pd="[object Map]",kd="[object Number]",qd="[object RegExp]",Ud="[object Set]",Fd="[object String]",Kd="[object Symbol]",zd="[object ArrayBuffer]",Hd="[object DataView]",$d="[object Float32Array]",Gd="[object Float64Array]",Wd="[object Int8Array]",Vd="[object Int16Array]",Xd="[object Int32Array]",Yd="[object Uint8Array]",Qd="[object Uint8ClampedArray]",Zd="[object Uint16Array]",Jd="[object Uint32Array]";function tp(e,t,r){var n=e.constructor;switch(t){case zd:return Se(e);case Md:case jd:return new n(+e);case Hd:return To(e,r);case $d:case Gd:case Wd:case Vd:case Xd:case Yd:case Qd:case Zd:case Jd:return Dr(e,r);case Pd:return new n;case kd:case Fd:return new n(e);case qd:return No(e);case Ud:return new n;case Kd:return wo(e)}}var Oo=tp;function ep(e){return typeof e.constructor=="function"&&!be(e)?fi(Ae(e)):{}}var Mr=ep;var rp="[object Map]";function np(e){return P(e)&&Nt(e)==rp}var So=np;var Co=Et&&Et.isMap,sp=Co?ye(Co):So,Lo=sp;var ip="[object Set]";function op(e){return P(e)&&Nt(e)==ip}var Io=op;var Bo=Et&&Et.isSet,ap=Bo?ye(Bo):Io,Ro=ap;var lp=1,up=2,fp=4,Do="[object Arguments]",cp="[object Array]",hp="[object Boolean]",dp="[object Date]",pp="[object Error]",Mo="[object Function]",mp="[object GeneratorFunction]",gp="[object Map]",bp="[object Number]",jo="[object Object]",yp="[object RegExp]",xp="[object Set]",vp="[object String]",Ep="[object Symbol]",Tp="[object WeakMap]",Np="[object ArrayBuffer]",Ap="[object DataView]",_p="[object Float32Array]",wp="[object Float64Array]",Op="[object Int8Array]",Sp="[object Int16Array]",Cp="[object Int32Array]",Lp="[object Uint8Array]",Ip="[object Uint8ClampedArray]",Bp="[object Uint16Array]",Rp="[object Uint32Array]",_={};_[Do]=_[cp]=_[Np]=_[Ap]=_[hp]=_[dp]=_[_p]=_[wp]=_[Op]=_[Sp]=_[Cp]=_[gp]=_[bp]=_[jo]=_[yp]=_[xp]=_[vp]=_[Ep]=_[Lp]=_[Ip]=_[Bp]=_[Rp]=!0;_[pp]=_[Mo]=_[Tp]=!1;function jr(e,t,r,n,s,i){var o,a=t&lp,l=t&up,u=t&fp;if(r&&(o=s?r(e,n,s,i):r(e)),o!==void 0)return o;if(!U(e))return e;var f=nt(e);if(f){if(o=Eo(e),!a)return xr(e,o)}else{var c=Nt(e),h=c==Mo||c==mp;if(vt(e))return Or(e,a);if(c==jo||c==Do||h&&!s){if(o=l||h?{}:Mr(e),!a)return l?po(e,io(o,e)):ho(e,so(o,e))}else{if(!_[c])return s?e:{};o=Oo(e,c,a)}}i||(i=new Kt);var d=i.get(e);if(d)return d;i.set(e,o),Ro(e)?e.forEach(function(x){o.add(jr(x,t,r,x,e,i))}):Lo(e)&&e.forEach(function(x,m){o.set(m,jr(x,t,r,m,e,i))});var p=u?l?mo:Ge:l?dt:ve,y=f?void 0:p(e);
vendor: 3,254 bytes, line 4
4return gi(y||e,function(x,m){y&&(m=x,x=e[m]),Er(o,m,jr(x,t,r,m,e,i))}),o}var Po=jr;var Dp=1,Mp=4;function jp(e){return Po(e,Dp|Mp)}var pt=jp;var Pp="__lodash_hash_undefined__";function kp(e){return this.__data__.set(e,Pp),this}var ko=kp;function qp(e){return this.__data__.has(e)}var qo=qp;function Pr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new _r;++t<r;)this.add(e[t])}Pr.prototype.add=Pr.prototype.push=ko;Pr.prototype.has=qo;var Uo=Pr;function Up(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Fo=Up;function Fp(e,t){return e.has(t)}var Ko=Fp;var Kp=1,zp=2;function Hp(e,t,r,n,s,i){var o=r&Kp,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var c=-1,h=!0,d=r&zp?new Uo:void 0;for(i.set(e,t),i.set(t,e);++c<a;){var p=e[c],y=t[c];if(n)var x=o?n(y,p,c,t,e,i):n(p,y,c,e,t,i);if(x!==void 0){if(x)continue;h=!1;break}if(d){if(!Fo(t,function(m,E){if(!Ko(d,E)&&(p===m||s(p,m,r,n,i)))return d.push(E)})){h=!1;break}}else if(!(p===y||s(p,y,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var kr=Hp;function $p(e){var t=-1,r=Array(e.size);return e.forEach(function(n,s){r[++t]=[s,n]}),r}var zo=$p;function Gp(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ho=Gp;var Wp=1,Vp=2,Xp="[object Boolean]",Yp="[object Date]",Qp="[object Error]",Zp="[object Map]",Jp="[object Number]",tm="[object RegExp]",em="[object Set]",rm="[object String]",nm="[object Symbol]",sm="[object ArrayBuffer]",im="[object DataView]",$o=rt?rt.prototype:void 0,Dn=$o?$o.valueOf:void 0;function om(e,t,r,n,s,i,o){switch(r){case im:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sm:return!(e.byteLength!=t.byteLength||!i(new Oe(e),new Oe(t)));case Xp:case Yp:case Jp:return ct(+e,+t);case Qp:return e.name==t.name&&e.message==t.message;case tm:case rm:return e==t+"";case Zp:var a=zo;case em:var l=n&Wp;if(a||(a=Ho),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=Vp,o.set(e,t);var f=kr(a(e),a(t),n,s,i,o);return o.delete(e),f;case nm:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}var Go=om;var am=1,lm=Object.prototype,um=lm.hasOwnProperty;function fm(e,t,r,n,s,i){var o=r&am,a=Ge(e),l=a.length,u=Ge(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var h=a[c];if(!(o?h in t:um.call(t,h)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var y=!0;i.set(e,t),i.set(t,e);for(var x=o;++c<l;){h=a[c];var m=e[h],E=t[h];if(n)var T=o?n(E,m,h,t,e,i):n(m,E,h,e,t,i);if(!(T===void 0?m===E||s(m,E,r,n,i):T)){y=!1;break}x||(x=h=="constructor")}if(y&&!x){var N=e.constructor,A=t.constructor;N!=A&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof A=="function"&&A instanceof A)&&(y=!1)}return i.delete(e),i.delete(t),y}var Wo=fm;var cm=1,Vo="[object Arguments]",Xo="[object Array]",qr="[object Object]",hm=Object.prototype,Yo=hm.hasOwnProperty;function dm(e,t,r,n,s,i){var o=nt(e),a=nt(t),l=o?Xo:Nt(e),u=a?Xo:Nt(t);l=l==Vo?qr:l,u=u==Vo?qr:u;var f=l==qr,c=u==qr,h=l==u;if(h&&vt(e)){if(!vt(t))return!1;o=!0,f=!1}if(h&&!f)return i||(i=new Kt),o||xe(e)?kr(e,t,r,n,s,i):Go(e,t,l,r,n,s,i);if(!(r&cm)){var d=f&&Yo.call(e,"__wrapped__"),p=c&&Yo.call(t,"__wrapped__");
4if(d||p){var y=d?e.value():e,x=p?t.value():t;return i||(i=new Kt),s(y,x,r,n,i)}}return h?(i||(i=new Kt),Wo(e,t,r,n,s,i)):!1}var Qo=dm;function Zo(e,t,r,n,s){return e===t?!0:e==null||t==null||!P(e)&&!P(t)?e!==e&&t!==t:Qo(e,t,r,n,Zo,s)}var Jo=Zo;function pm(e){return function(t,r,n){for(var s=-1,i=Object(t),o=n(t),a=o.length;a--;){var l=o[e?a:++s];if(r(i[l],l,i)===!1)break}return t}}var ta=pm;var mm=ta(),ea=mm;function gm(e,t,r){(r!==void 0&&!ct(e[t],r)||r===void 0&&!(t in e))&&ge(e,t,r)}var We=gm;function bm(e){return P(e)&&Pt(e)}var ra=bm;function ym(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ve=ym;function xm(e){return ht(e,dt(e))}var na=xm;function vm(e,t,r,n,s,i,o){var a=Ve(e,r),l=Ve(t,r),u=o.get(l);if(u){We(e,r,u);return}var f=i?i(a,l,r+"",e,t,o):void 0,c=f===void 0;if(c){var h=nt(l),d=!h&&vt(l),p=!h&&!d&&xe(l);f=l,h||d||p?nt(a)?f=a:ra(a)?f=xr(a):d?(c=!1,f=Or(l,!0)):p?(c=!1,f=Dr(l,!0)):f=[]:Zi(l)||He(l)?(f=a,He(a)?f=na(a):(!U(a)||pe(a))&&(f=Mr(l))):c=!1}c&&(o.set(l,f),s(f,l,n,i,o),o.delete(l)),We(e,r,f)}var sa=vm;function ia(e,t,r,n,s){e!==t&&ea(t,function(i,o){if(s||(s=new Kt),U(i))sa(e,t,o,r,ia,n,s);else{var a=n?n(Ve(e,o),i,o+"",e,t,s):void 0;a===void 0&&(a=i),We(e,o,a)}},dt)}var oa=ia;function Em(e,t){return Jo(e,t)}var Zt=Em;var Tm=Ei(function(e,t,r){oa(e,t,r)}),zt=Tm;var jn=ft(la(),1);var Ye=new WeakMap;var Pn=["error","warn","log","info"],kn="warn";function ua(e){if(kn&&Pn.indexOf(e)<=Pn.indexOf(kn)){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console[e](...r)}}function qn(e){return Pn.reduce((t,r)=>(t[r]=ua.bind(console,r,e),t),{})}qn.level=e=>{kn=e};ua.level=qn.level;var lt=qn;var Un=lt("quill:events"),_m=["selectionchange","mousedown","mouseup","click"];_m.forEach(e=>{document.addEventListener(e,function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{let i=Ye.get(s);i&&i.emitter&&i.emitter.handleDOM(...r)})})});var wm=(()=>{class e extends jn.default{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",Un.error)}emit(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return Un.log.call(Un,...n),super.emit(...n)}handleDOM(r){for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];(this.domListeners[r.type]||[]).forEach(o=>{let{node:a,handler:l}=o;(r.target===a||a.contains(r.target))&&l(r,...s)})}listenDOM(r,n,s){this.domListeners[r]||(this.domListeners[r]=[]),this.domListeners[r].push({node:n,handler:s})}}return e})(),v=wm;var Fn=lt("quill:selection"),mt=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=r}},zn=class{constructor(t,r){this.emitter=r,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new mt(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,v.sources.USER),1)}),this.emitter.on(v.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let n=this.getNativeRange();n!=null&&n.start.node!==this.cursor.textNode&&this.emitter.once(v.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(n.start.node)&&this.root.contains(n.end.node)&&this.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset);let o=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?v.sources.SILENT:s)}catch(o){}})}),this.emitter.on(v.events.SCROLL_OPTIMIZE,(n,s)=>
4{if(s.range){let{startNode:i,startOffset:o,endNode:a,endOffset:l}=s.range;this.setNativeRange(i,o,a,l),this.update(v.sources.SILENT)}}),this.update(v.sources.SILENT)}handleComposition(){this.emitter.on(v.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(v.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let 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(v.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,r){this.scroll.update();let n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(t,b.BLOCK))){if(n.start.node!==this.cursor.textNode){let s=this.scroll.find(n.start.node,!1);if(s==null)return;if(s instanceof B){let i=s.split(n.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,r),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),r=Math.min(t+r,n-1)-t;let s,[i,o]=this.scroll.leaf(t);if(i==null)return null;if(r>0&&o===i.length()){let[f]=this.scroll.leaf(t+1);if(f){let[c]=this.scroll.line(t),[h]=this.scroll.line(t+1);c===h&&(i=f,o=0)}}[s,o]=i.position(o,!0);let a=document.createRange();if(r>0)return a.setStart(s,o),[i,o]=this.scroll.leaf(t+r),i==null?null:([s,o]=i.position(o,!0),a.setEnd(s,o),a.getBoundingClientRect());let l="left",u;if(s instanceof Text){if(!s.data.length)return null;o<s.data.length?(a.setStart(s,o),a.setEnd(s,o+1)):(a.setStart(s,o-1),a.setEnd(s,o),l="right"),u=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:u.top+u.height,height:u.height,left:u[l],right:u[l],top:u.top,width:0}}getNativeRange(){let t=document.getSelection();if(t==null||t.rangeCount<=0)return null;let r=t.getRangeAt(0);if(r==null)return null;let n=this.normalizeNative(r);return Fn.info("getNativeRange",n),n}getRange(){let t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];let r=this.getNativeRange();return r==null?[null,null]:[this.normalizedToRange(r),r]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Kn(this.root,document.activeElement)}normalizedToRange(t){let r=[[t.start.node,t.start.offset]];t.native.collapsed||r.push([t.end.node,t.end.offset]);let n=r.map(o=>{let[a,l]=o,u=this.scroll.find(a,!0),f=u.offset(this.scroll);return l===0?f:u instanceof B?f+u.index(a,l):f+u.length()}),s=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(s,...n);return new mt(i,s-i)}normalizeNative(t){if(!Kn(this.root,t.startContainer)||!t.collapsed&&!Kn(this.root,t.endContainer))return null;let r={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[r.start,r.end].forEach(n=>{let{node:s,offset:i}=n;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;n.node=s,n.offset=i}),r}rangeToNative(t){let r=this.scroll.length(),n=(s,i)=>{s=Math.min(r-1,s);let[o,a]=this.scroll.leaf(s);return o?o.position(a,i):[null,-1]};return[...n(t.index,!1),...n(t.index+t.length,!0)]}setNativeRange(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Fn.info("setNativeRange",t,r,n,s),t!=null&&(this.root.parentNode==null||t.parentNode==null||n.parentNode==null))return;let o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:a}=this.getNativeRange()||{};if(a==null||i||t!==a.startContainer||r!==a.startOffset||n!==a.endContainer||s!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(r=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),n instanceof Element&&n.tagName==="BR"&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);
4let l=document.createRange();l.setStart(t,r),l.setEnd(n,s),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.sources.API;if(typeof r=="string"&&(n=r,r=!1),Fn.info("setRange",t),t!=null){let s=this.rangeToNative(t);this.setNativeRange(...s,r)}else this.setNativeRange(null);this.update(n)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.sources.USER,r=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!Zt(r,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){let o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}let i=[v.events.SELECTION_CHANGE,pt(this.lastRange),pt(r),t];this.emitter.emit(v.events.EDITOR_CHANGE,...i),t!==v.sources.SILENT&&this.emitter.emit(...i)}}};function Kn(e,t){try{t.parentNode}catch(r){return!1}return e.contains(t)}var fa=zn;var Om=(()=>{class e{static DEFAULTS={};constructor(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=r,this.options=n}}return e})(),$=Om;var Wt=ft(bt(),1);var I=ft(bt(),1);var Ss=ft(bt(),1);var Hy=(()=>{class e extends D{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}return e.blotName="break",e.tagName="BR",e})(),Q=Hy;var j=class extends de{};function cn(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}var $y=(()=>{class e extends dr{static allowedChildren=[e,Q,D,j];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(r,n){let s=e.order.indexOf(r),i=e.order.indexOf(n);return s>=0||i>=0?s-i:r===n?0:r<n?-1:1}formatAt(r,n,s,i){if(e.compare(this.statics.blotName,s)<0&&this.scroll.query(s,b.BLOT)){let o=this.isolate(r,n);i&&o.wrap(s,i)}else super.formatAt(r,n,s,i)}optimize(r){if(super.optimize(r),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){let n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}return e})(),je=$y;var Wl=1,et=(()=>{class e extends Yt{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=Gy(this)),this.cache.delta}deleteAt(r,n){super.deleteAt(r,n),this.cache={}}formatAt(r,n,s,i){n<=0||(this.scroll.query(s,b.BLOCK)?r+n===this.length()&&this.format(s,i):super.formatAt(r,Math.min(n,this.length()-r-1),s,i),this.cache={})}insertAt(r,n,s){if(s!=null){super.insertAt(r,n,s),this.cache={};return}if(n.length===0)return;let i=n.split(`
5`),o=i.shift();o.length>0&&(r<this.length()-1||this.children.tail==null?super.insertAt(Math.min(r,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((l,u)=>(a=a.split(l,!0),a.insertAt(0,u),u.length),r+o.length)}insertBefore(r,n){let{head:s}=this.children;super.insertBefore(r,n),s instanceof Q&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Wl),this.cache.length}moveChildren(r,n){super.moveChildren(r,n),this.cache={}}optimize(r){super.optimize(r),this.cache={}}path(r){return super.path(r,!0)}removeChild(r){super.removeChild(r),this.cache={}}split(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(r===0||r>=this.length()-Wl)){let i=this.clone();return r===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}let s=super.split(r,n);return this.cache={},s}}return e.blotName="block",e.tagName="P",e.defaultChild=Q,e.allowedChildren=[Q,je,D,j],e})(),k=class extends D{attach(){super.attach(),this.attributes=new Fe(this.domNode)}delta(){return new Ss.default().insert(this.value(),O(O({},this.formats()),this.attributes.values()))}format(t,r){let n=this.scroll.query(t,b.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,r)}formatAt(t,r,n,s){this.format(n,s)}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n);return}let s=r.split(`
6`),i=s.pop(),o=s.map(l=>{let u=this.scroll.create(et.blotName);return u.insertAt(0,l),u}),a=this.split(t);o.forEach(l=>{this.parent.insertBefore(l,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}};k.scope=b.BLOCK_BLOT;function Gy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(B).reduce((r,n)=>n.length()===0?r:r.insert(n.value(),Z(n,{},t)),new Ss.default).insert(`
7`,Z(e))}function Z(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||("formats"in e&&typeof e.formats=="function"&&(t=O(O({},t),e.formats()),r&&delete t["code-token"]),e.parent==null||e.parent.statics.blotName==="scroll"||e.parent.statics.scope!==e.statics.scope)?t:Z(e.parent,t,r)}var Wy=(()=>{class e extends D{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(r,n,s){super(r,n),this.selection=s,this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(r,n){if(this.savedLength!==0){super.format(r,n);return}let s=this,i=0;for(;s!=null&&s.statics.scope!==b.BLOCK_BLOT;)i+=s.offset(s.parent),s=s.parent;s!=null&&(this.savedLength=e.CONTENTS.length,s.optimize(),s.formatAt(i,e.CONTENTS.length,r,n),this.savedLength=0)}index(r,n){return r===this.textNode?0:super.index(r,n)}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;let r=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let n=this.prev instanceof j?this.prev:null,s=n?n.length():0,i=this.next instanceof j?this.next:null,o=i?i.text:"",{textNode:a}=this,l=a.data.split(e.CONTENTS).join("");a.data=e.CONTENTS;let u;if(n)u=n,(l||i)&&(n.insertAt(n.length(),l+o),i&&i.remove());else if(i)u=i,i.insertAt(0,l);else{let f=document.createTextNode(l);u=this.scroll.create(f),this.parent.insertBefore(u,this)}if(this.remove(),r){let f=(d,p)=>n&&d===n.domNode?p:d===a?s+p-1:i&&d===i.domNode?s+l.length+p:null,c=f(r.start.node,r.start.offset),h=f(r.end.node,r.end.offset);if(c!==null&&h!==null)return{startNode:u.domNode,startOffset:c,endNode:u.domNode,endOffset:h}}return null}update(r,n){if(r.some(s=>s.type==="characterData"&&s.target===this.textNode)){let s=this.restore(
7);s&&(n.range=s)}}optimize(r){super.optimize(r);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=e.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}}return e})(),Pe=Wy;var Vy=/^[ -~]*$/,Ls=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let r=this.scroll.length();this.scroll.batchStart();let n=Vl(t),s=new I.default;return Yy(n.ops.slice()).reduce((o,a)=>{let l=I.Op.length(a),u=a.attributes||{},f=!1,c=!1;if(a.insert!=null){if(s.retain(l),typeof a.insert=="string"){let p=a.insert;c=!p.endsWith(`
8`)&&(r<=o||!!this.scroll.descendant(k,o)[0]),this.scroll.insertAt(o,p);let[y,x]=this.scroll.line(o),m=zt({},Z(y));if(y instanceof et){let[E]=y.descendant(B,x);E&&(m=zt(m,Z(E)))}u=I.AttributeMap.diff(m,u)||{}}else if(typeof a.insert=="object"){let p=Object.keys(a.insert)[0];if(p==null)return o;let y=this.scroll.query(p,b.INLINE)!=null;if(y)(r<=o||this.scroll.descendant(k,o)[0])&&(c=!0);else if(o>0){let[x,m]=this.scroll.descendant(B,o-1);x instanceof j?x.value()[m]!==`
9`&&(f=!0):x instanceof D&&x.statics.scope===b.INLINE_BLOT&&(f=!0)}if(this.scroll.insertAt(o,p,a.insert[p]),y){let[x]=this.scroll.descendant(B,o);if(x){let m=zt({},Z(x));u=I.AttributeMap.diff(m,u)||{}}}}r+=l}else if(s.push(a),a.retain!==null&&typeof a.retain=="object"){let p=Object.keys(a.retain)[0];if(p==null)return o;this.scroll.updateEmbedAt(o,p,a.retain[p])}Object.keys(u).forEach(p=>{this.scroll.formatAt(o,l,p,u[p])});let h=f?1:0,d=c?1:0;return r+=h+d,s.retain(h),s.delete(d),o+l+h+d},0),s.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+I.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(t,r){return this.scroll.deleteAt(t,r),this.update(new I.default().retain(t).delete(r))}formatLine(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(i=>{this.scroll.lines(t,Math.max(r,1)).forEach(o=>{o.format(i,n[i])})}),this.scroll.optimize();let s=new I.default().retain(t).retain(r,pt(n));return this.update(s)}formatText(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(i=>{this.scroll.formatAt(t,r,i,n[i])});let s=new I.default().retain(t).retain(r,pt(n));return this.update(s)}getContents(t,r){return this.delta.slice(t,t+r)}getDelta(){return this.scroll.lines().reduce((t,r)=>t.concat(r.delta()),new I.default)}getFormat(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],s=[];r===0?this.scroll.path(t).forEach(a=>{let[l]=a;l instanceof et?n.push(l):l instanceof B&&s.push(l)}):(n=this.scroll.lines(t,r),s=this.scroll.descendants(B,t,r));let[i,o]=[n,s].map(a=>{let l=a.shift();if(l==null)return{};let u=Z(l);for(;Object.keys(u).length>0;){let f=a.shift();if(f==null)return u;u=Xy(Z(f),u)}return u});return O(O({},i),o)}getHTML(t,r){let[n,s]=this.scroll.line(t);if(n){let i=n.length();return n.length()>=s+r&&!(s===0&&r===i)?or(n,s,r,!0):or(this.scroll,t,r,!0)}return""}getText(t,r){return this.getContents(t,r).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(t,r){let n=Vl(r),s=new I.default().retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(s)}insertEmbed(t,r,n){return this.scroll.insertAt(t,r,n),this.update(new I.default().retain(t).insert({[r]:n}))}insertText(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return r=r.replace(/\r\n/g,`
10`).replace(/\r/g,`
11`),this.scroll.insertAt(t,r),Object.keys(n).forEach(s=>{this.scroll.formatAt(t,r.length,s,n[s])}),this.update(new I.default().retain(t).insert(r,pt(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let t=this.scroll.children.head;if(t?.statics.blotName!==et.blotName)return!1;let r=t;return r.children.length>1?!1:r.children.head instanceof Q}removeFormat(t,r){let n=this.getText(t,r),[s,i]=this.scroll.line(t+r),o=0,a=new I.default;s!=null&&(o=s.length()-i,a=s.delta().slice(i,i+o-1).insert(`
12`));
12let u=this.getContents(t,r+o).diff(new I.default().insert(n).concat(a)),f=new I.default().retain(t).concat(u);return this.applyDelta(f)}update(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this.delta;if(r.length===1&&r[0].type==="characterData"&&r[0].target.data.match(Vy)&&this.scroll.find(r[0].target)){let i=this.scroll.find(r[0].target),o=Z(i),a=i.offset(this.scroll),l=r[0].oldValue.replace(Pe.CONTENTS,""),u=new I.default().insert(l),f=new I.default().insert(i.value()),c=n&&{oldRange:Xl(n.oldRange,-a),newRange:Xl(n.newRange,-a)};t=new I.default().retain(a).concat(u.diff(f,c)).reduce((d,p)=>p.insert?d.insert(p.insert,o):d.push(p),new I.default),this.delta=s.compose(t)}else this.delta=this.getDelta(),(!t||!Zt(s.compose(t),this.delta))&&(t=s.diff(this.delta,n));return t}};function ke(e,t,r){if(e.length===0){let[d]=Cs(r.pop());return t<=0?`</li></${d}>`:`</li></${d}>${ke([],t-1,r)}`}let[{child:n,offset:s,length:i,indent:o,type:a},...l]=e,[u,f]=Cs(a);if(o>t)return r.push(a),o===t+1?`<${u}><li${f}>${or(n,s,i)}${ke(l,o,r)}`:`<${u}><li>${ke(e,t+1,r)}`;let c=r[r.length-1];if(o===t&&a===c)return`</li><li${f}>${or(n,s,i)}${ke(l,o,r)}`;let[h]=Cs(r.pop());return`</li></${h}>${ke(e,t-1,r)}`}function or(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in e&&typeof e.html=="function")return e.html(t,r);if(e instanceof j)return cn(e.value().slice(t,t+r));if(e instanceof V){if(e.statics.blotName==="list-container"){let u=[];return e.children.forEachAt(t,r,(f,c,h)=>{let d="formats"in f&&typeof f.formats=="function"?f.formats():{};u.push({child:f,offset:c,length:h,indent:d.indent||0,type:d.list})}),ke(u,-1,[])}let s=[];if(e.children.forEachAt(t,r,(u,f,c)=>{s.push(or(u,f,c))}),n||e.statics.blotName==="list")return s.join("");let{outerHTML:i,innerHTML:o}=e.domNode,[a,l]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${l}`:`${a}>${s.join("")}<${l}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function Xy(e,t){return Object.keys(t).reduce((r,n)=>{if(e[n]==null)return r;let s=t[n];return s===e[n]?r[n]=s:Array.isArray(s)?s.indexOf(e[n])<0?r[n]=s.concat([e[n]]):r[n]=s:r[n]=[s,e[n]],r},{})}function Cs(e){let t=e==="ordered"?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Vl(e){return e.reduce((t,r)=>{if(typeof r.insert=="string"){let n=r.insert.replace(/\r\n/g,`
13`).replace(/\r/g,`
14`);return t.insert(n,r.attributes)}return t.push(r)},new I.default)}function Xl(e,t){let{index:r,length:n}=e;return new mt(r+t,n)}function Yy(e){let t=[];return e.forEach(r=>{typeof r.insert=="string"?r.insert.split(`
15`).forEach((s,i)=>
15{i&&t.push({insert:`
16`,attributes:r.attributes}),s&&t.push({insert:s,attributes:r.attributes})}):t.push(r)}),t}var Yl=Ls;var hn="\uFEFF",Is=class extends D{constructor(t,r){super(t,r),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(hn),this.rightGuard=document.createTextNode(hn),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,r){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,r)}restore(t){let r=null,n,s=t.data.split(hn).join("");if(t===this.leftGuard)if(this.prev instanceof j){let i=this.prev.length();this.prev.insertAt(i,s),r={startNode:this.prev.domNode,startOffset:i+s.length}}else n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this),r={startNode:n,startOffset:s.length};else t===this.rightGuard&&(this.next instanceof j?(this.next.insertAt(0,s),r={startNode:this.next.domNode,startOffset:s.length}):(n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this.next),r={startNode:n,startOffset:s.length}));return t.data=hn,r}update(t,r){t.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){let s=this.restore(n.target);s&&(r.range=s)}})}},dn=Is;var Bs=class{isComposing=!1;constructor(t,r){this.scroll=t,this.emitter=r,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){let r=t.target instanceof Node?this.scroll.find(t.target,!0):null;r&&!(r instanceof dn)&&(this.emitter.emit(v.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(v.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(v.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(v.events.COMPOSITION_END,t),this.isComposing=!1}},Ql=Bs;var Qy=(()=>{class e{static DEFAULTS={modules:{}};static themes={default:e};modules={};constructor(r,n){this.quill=r,this.options=n}init(){Object.keys(this.options.modules).forEach(r=>{this.modules[r]==null&&this.addModule(r)})}addModule(r){let n=this.quill.constructor.import(`modules/${r}`);return this.modules[r]=new n(this.quill,this.options.modules[r]||{}),this.modules[r]}}return e})(),Rs=Qy;var Zy=e=>e.parentElement||e.getRootNode().host||null,Jy=e=>{let t=e.getBoundingClientRect(),r="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,n="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*r,bottom:t.top+e.clientHeight*n,left:t.left}},pn=e=>{let t=parseInt(e,10);return Number.isNaN(t)?0:t},Zl=(e,t,r,n,s,i)=>e<r&&t>n?0:e<r?-(r-e+s):t>n?t-e>n-r?e+s-r:t-n+i:0,tx=(e,t)=>{let r=e.ownerDocument,n=t,s=e;for(;s;){let i=s===r.body,o=i?{top:0,right:window.visualViewport?.width??r.documentElement.clientWidth,bottom:window.visualViewport?.height??r.documentElement.clientHeight,left:0}:Jy(s),a=getComputedStyle(s),l=Zl(n.left,n.right,o.left,o.right,pn(a.scrollPaddingLeft),pn(a.scrollPaddingRight)),u=Zl(n.top,n.bottom,o.top,o.bottom,pn(a.scrollPaddingTop),pn(a.scrollPaddingBottom));if(l||u)if(i)r.defaultView?.scrollBy(l,u);else{let{scrollLeft:f,scrollTop:c}=s;u&&(s.scrollTop+=u),l&&(s.scrollLeft+=l);let h=s.scrollLeft-f,d=s.scrollTop-c;n={left:n.left-h,top:n.top-d,right:n.right-h,bottom:n.bottom-d}}s=i||a.position==="fixed"?null:Zy(s)}},Jl=tx;var ex=100,rx=["block","break","cursor","inline","scroll","text"],nx=(e,t,r)=>{let n=new jt;return rx.forEach(s=>{let i=t.query(s);i&&n.register(i)}),e.forEach(s=>{let i=t.query(s);i||r.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(n.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>ex){r.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),n},tu=nx;var qe=lt("quill"),mn=new jt;V.uiClass="ql-ui";var g=class e{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:mn,theme:"default"};static events=v.events;static sources=v.sources;static version="2.0.2";static imports={delta:Wt.default,parchment:pr,"core/module":$,"core/theme":Rs};static debug(t){t===!0&&(t="log"),lt.level(t)}static find(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ye.get(t)||mn.find(t,r)}static import(t){return this.imports[t]==null&&qe.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"){let t=arguments.length<=0?void 0:arguments[0],r=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in t?t.attrName:t.blotName;typeof n=="string"?this.register(`formats/${n}`,t,r):Object.keys(t).forEach(s=>{this.register(s,t[s],r)})}else{let t=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!n&&qe.warn(`Overwriting ${t} with`,r),this.imports[t]=r,(t.startsWith("blots/")||t.startsWith("formats/"))&&r&&typeof r!="boolean"&&r.blotName!=="abstract"&&mn.register(r),typeof r.register=="function"&&r.register(mn)}}constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=sx(t,r),this.container=this.options.container,this.container==null){qe.error("Invalid Quill container",t);return}this.options.debug&&e.debug(this.options.debug);let n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Ye.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new v;let s=Ke.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);
16if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Yl(this.scroll),this.selection=new fa(this.scroll,this.emitter),this.composition=new Ql(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(v.events.EDITOR_CHANGE,o=>{o===v.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(v.events.SCROLL_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),f=l&&u?{oldRange:l,newRange:u}:void 0;ut.call(this,()=>this.editor.update(null,a,f),o)}),this.emitter.on(v.events.SCROLL_EMBED_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),f=l&&u?{oldRange:l,newRange:u}:void 0;ut.call(this,()=>{let c=new Wt.default().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(c,[],f)},e.sources.USER)}),n){let o=this.clipboard.convert({html:`${n}<p><br></p>`,text:`
17`});this.setContents(o)}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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){let n=t;t=document.createElement("div"),t.classList.add(n)}return this.container.insertBefore(t,r),t}blur(){this.selection.setRange(null)}deleteText(t,r,n){return[t,r,,n]=It(t,r,n),ut.call(this,()=>this.editor.deleteText(t,r),n,t,-1*r)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;let r=t();return this.allowReadOnlyEdits=!1,r}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,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.sources.API;return ut.call(this,()=>{let s=this.getSelection(!0),i=new Wt.default;if(s==null)return i;if(this.scroll.query(t,b.BLOCK))i=this.editor.formatLine(s.index,s.length,{[t]:r});else{if(s.length===0)return this.selection.format(t,r),i;i=this.editor.formatText(s.index,s.length,{[t]:r})}return this.setSelection(s,v.sources.SILENT),i},n)}formatLine(t,r,n,s,i){let o;return[t,r,o,i]=It(t,r,n,s,i),ut.call(this,()=>this.editor.formatLine(t,r,o),i,t,0)}formatText(t,r,n,s,i){let o;return[t,r,o,i]=It(t,r,n,s,i),ut.call(this,()=>this.editor.formatText(t,r,o),i,t,0)}getBounds(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof t=="number"?n=this.selection.getBounds(t,r):n=this.selection.getBounds(t.index,t.length),!n)return null;let s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,r]=It(t,r),this.editor.getContents(t,r)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,r):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,r=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,r)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(r=r??this.getLength()-t),[t,r]=It(t,r),this.editor.getHTML(t,r)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(r=r??this.getLength()-t),[t,r]=It(t,r),this.editor.getText(t,r)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,r,n){let s=arguments.length>
173&&arguments[3]!==void 0?arguments[3]:e.sources.API;return ut.call(this,()=>this.editor.insertEmbed(t,r,n),s,t)}insertText(t,r,n,s,i){let o;return[t,,o,i]=It(t,0,n,s,i),ut.call(this,()=>this.editor.insertText(t,r,o),i,t,r.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,r,n){return[t,r,,n]=It(t,r,n),ut.call(this,()=>this.editor.removeFormat(t,r),n,t)}scrollRectIntoView(t){Jl(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(){let t=this.selection.lastRange,r=t&&this.selection.getBounds(t.index,t.length);r&&this.scrollRectIntoView(r)}setContents(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.sources.API;return ut.call(this,()=>{t=new Wt.default(t);let n=this.getLength(),s=this.editor.deleteText(0,n),i=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(o)},r)}setSelection(t,r,n){t==null?this.selection.setRange(null,r||e.sources.API):([t,r,,n]=It(t,r,n),this.selection.setRange(new mt(Math.max(0,t),r),n),n!==v.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.sources.API,n=new Wt.default().insert(t);return this.setContents(n,r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.sources.USER,r=this.scroll.update(t);return this.selection.update(t),r}updateContents(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.sources.API;return ut.call(this,()=>(t=new Wt.default(t),this.editor.applyDelta(t)),r,!0)}};function eu(e){return typeof e=="string"?document.querySelector(e):e}function Ds(e){return Object.entries(e??{}).reduce((t,r)=>{let[n,s]=r;return Bt(O({},t),{[n]:s===!0?{}:s})},{})}function ru(e){return Object.fromEntries(Object.entries(e).filter(t=>t[1]!==void 0))}function sx(e,t){let r=eu(e);if(!r)throw new Error("Invalid Quill container");let s=!t.theme||t.theme===g.DEFAULTS.theme?Rs:g.import(`themes/${t.theme}`);if(!s)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);let d=g.DEFAULTS,{modules:i}=d,o=vn(d,["modules"]),p=s.DEFAULTS,{modules:a}=p,l=vn(p,["modules"]),u=Ds(t.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u=Bt(O({},u),{toolbar:{container:u.toolbar}}));let f=zt({},Ds(i),Ds(a),u),c=O(O(O({},o),ru(l)),ru(t)),h=t.registry;return h?t.formats&&qe.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?tu(t.formats,c.registry,qe):c.registry,Bt(O({},c),{registry:h,container:r,theme:s,modules:Object.entries(f).reduce((y,x)=>{let[m,E]=x;if(!E)return y;let T=g.import(`modules/${m}`);return T==null?(qe.error(`Cannot load ${m} module. Are you sure you registered it?`),y):Bt(O({},y),{[m]:zt({},T.DEFAULTS||{},E)})},{}),bounds:eu(c.bounds)})}function ut(e,t,r,n){if(!this.isEnabled()&&t===v.sources.USER&&!this.allowReadOnlyEdits)return new Wt.default;let s=r==null?null:this.getSelection(),i=this.editor.delta,o=e();if(s!=null&&(r===!0&&(r=s.index),n==null?s=nu(s,o,t):n!==0&&(s=nu(s,r,n,t)),this.setSelection(s,v.sources.SILENT)),o.length()>0){let a=[v.events.TEXT_CHANGE,o,i,t];this.emitter.emit(v.events.EDITOR_CHANGE,...a),t!==v.sources.SILENT&&this.emitter.emit(...a)}return o}function It(e,t,r,n,s){let i={};return typeof e.index=="number"&&typeof e.length=="number"?typeof t!="number"?(s=n,n=r,r=t,t=e.length,e=e.index):(t=e.length,e=e.index):typeof t!="number"&&(s=n,n=r,r=t,t=0),typeof r=="object"?(i=r,s=n):typeof r=="string"&&(n!=null?i[r]=n:s=r),s=s||v.sources.API,[e,t,i,s]}function nu(e,t,r,n){let s=typeof r=="number"?r:0;if(e==null)return null;let i,o;return t&&typeof t.transformPosition=="function"?[i,o]=[e.index,e.index+e.length].map(a=>t.transformPosition(a,n!==v.sources.USER)):[i,o]=[e.index,e.index+e.length].map(a=>a<t||a===t&&n===v.sources.USER?a:s>=0?a+s:Math.max(t,a+s)),new mt(i,o-i)}var Ms={scope:b.BLOCK,whitelist:["right","center","justify"]},su=new z("align","align",Ms),Pw=new q("align","ql-align",Ms),iu=new X("align","text-align",Ms);var ar=class extends X{value(t){let r=super.value(t);return r.startsWith("rgb(")?(r=r.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${r.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):r}},Uw=new q("color","ql-color",{scope:b.INLINE}),ou=new ar("color","color",{scope:b.INLINE});var Hw=new q("background","ql-bg",{scope:b.INLINE}),au=new ar("background","background-color",{scope:b.INLINE});var js=class extends he{},Ue=js;var Vt=class extends Ue{static create(t){let r=super.create(t);
17return r.setAttribute("spellcheck","false"),r}code(t,r){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
18`).slice(t,t+r)}html(t,r){return`<pre>
19${cn(this.code(t,r))}
20</pre>`}},yt=(()=>{class e extends et{static TAB="  ";static register(){g.register(Vt)}}return e})(),eO=(()=>{class e extends je{}return e.blotName="code",e.tagName="CODE",e})();yt.blotName="code-block";yt.className="ql-code-block";yt.tagName="DIV";Vt.blotName="code-block-container";Vt.className="ql-code-block-container";Vt.tagName="DIV";Vt.allowedChildren=[yt];yt.allowedChildren=[j,Q,Pe];yt.requiredContainer=Vt;var Ps={scope:b.BLOCK,whitelist:["rtl"]},lu=new z("direction","dir",Ps),sO=new q("direction","ql-direction",Ps),uu=new X("direction","direction",Ps);var fu={scope:b.INLINE,whitelist:["serif","monospace"]},aO=new q("font","ql-font",fu),ks=class extends X{value(t){return super.value(t).replace(/["']/g,"")}},cu=new ks("font","font-family",fu);var fO=new q("size","ql-size",{scope:b.INLINE,whitelist:["small","large","huge"]}),hu=new X("size","font-size",{scope:b.INLINE,whitelist:["10px","18px","32px"]});var it=ft(bt(),1);function du(e){return e instanceof et||e instanceof k}function pu(e){return typeof e.updateContent=="function"}var ix=(()=>{class e extends Ke{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=et;static allowedChildren=[et,k,Ue];constructor(r,n,s){let{emitter:i}=s;super(r,n),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",o=>this.handleDragStart(o))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let r=this.batch;this.batch=!1,this.update(r)}emitMount(r){this.emitter.emit(v.events.SCROLL_BLOT_MOUNT,r)}emitUnmount(r){this.emitter.emit(v.events.SCROLL_BLOT_UNMOUNT,r)}emitEmbedUpdate(r,n){this.emitter.emit(v.events.SCROLL_EMBED_UPDATE,r,n)}deleteAt(r,n){let[s,i]=this.line(r),[o]=this.line(r+n);if(super.deleteAt(r,n),o!=null&&s!==o&&i>0){if(s instanceof k||o instanceof k){this.optimize();return}let a=o.children.head instanceof Q?null:o.children.head;s.moveChildren(o,a),s.remove()}this.optimize()}enable(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",r?"true":"false")}formatAt(r,n,s,i){super.formatAt(r,n,s,i),this.optimize()}insertAt(r,n,s){if(r>=this.length())if(s==null||this.scroll.query(n,b.BLOCK)==null){let i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),s==null&&n.endsWith(`
21`)?i.insertAt(0,n.slice(0,-1),s):i.insertAt(0,n,s)}else{let i=this.scroll.create(n,s);this.appendChild(i)}else super.insertAt(r,n,s);this.optimize()}insertBefore(r,n){if(r.statics.scope===b.INLINE_BLOT){let s=this.scroll.create(this.statics.defaultChild.blotName);s.appendChild(r),super.insertBefore(s,n)}else super.insertBefore(r,n)}insertContents(r,n){let s=this.deltaToRenderBlocks(n.concat(new it.default().insert(`
22`))),i=s.pop();if(i==null)return;this.batchStart();let o=s.shift();if(o){let u=o.type==="block"&&(o.delta.length()===0||!this.descendant(k,r)[0]&&r<this.length()),f=o.type==="block"?o.delta:new it.default().insert({[o.key]:o.value});qs(this,r,f);let c=o.type==="block"?1:0,h=r+f.length()+c;u&&this.insertAt(h-1,`
23`);let d=Z(this.line(r)[0]),p=it.AttributeMap.diff(d,o.attributes)||{};Object.keys(p).forEach(y=>{this.formatAt(h-1,1,y,p[y])}),r=h}let[a,l]=this.children.find(r);
23if(s.length&&(a&&(a=a.split(l),l=0),s.forEach(u=>{if(u.type==="block"){let f=this.createBlock(u.attributes,a||void 0);qs(f,0,u.delta)}else{let f=this.create(u.key,u.value);this.insertBefore(f,a||void 0),Object.keys(u.attributes).forEach(c=>{f.format(c,u.attributes[c])})}})),i.type==="block"&&i.delta.length()){let u=a?a.offset(a.scroll)+l:this.length();qs(this,u,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(r){let n=this.path(r).pop();if(!n)return[null,-1];let[s,i]=n;return s instanceof B?[s,i]:[null,-1]}line(r){return r===this.length()?this.line(r-1):this.descendant(du,r)}lines(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,s=(i,o,a)=>{let l=[],u=a;return i.children.forEachAt(o,a,(f,c,h)=>{du(f)?l.push(f):f instanceof he&&(l=l.concat(s(f,c,u))),u-=h}),l};return s(this,r,n)}optimize(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(r,n),r.length>0&&this.emitter.emit(v.events.SCROLL_OPTIMIZE,r,n))}path(r){return super.path(r).slice(1)}remove(){}update(r){if(this.batch){Array.isArray(r)&&(this.batch=this.batch.concat(r));return}let n=v.sources.USER;typeof r=="string"&&(n=r),Array.isArray(r)||(r=this.observer.takeRecords()),r=r.filter(s=>{let{target:i}=s,o=this.find(i,!0);return o&&!pu(o)}),r.length>0&&this.emitter.emit(v.events.SCROLL_BEFORE_UPDATE,n,r),super.update(r.concat([])),r.length>0&&this.emitter.emit(v.events.SCROLL_UPDATE,n,r)}updateEmbedAt(r,n,s){let[i]=this.descendant(o=>o instanceof k,r);i&&i.statics.blotName===n&&pu(i)&&i.updateContent(s)}handleDragStart(r){r.preventDefault()}deltaToRenderBlocks(r){let n=[],s=new it.default;return r.forEach(i=>{let o=i?.insert;if(o)if(typeof o=="string"){let a=o.split(`
24`);a.slice(0,-1).forEach(u=>{s.insert(u,i.attributes),n.push({type:"block",delta:s,attributes:i.attributes??{}}),s=new it.default});let l=a[a.length-1];l&&s.insert(l,i.attributes)}else{let a=Object.keys(o)[0];if(!a)return;this.query(a,b.INLINE)?s.push(i):(s.length()&&n.push({type:"block",delta:s,attributes:{}}),s=new it.default,n.push({type:"blockEmbed",key:a,value:o[a],attributes:i.attributes??{}}))}}),s.length()&&n.push({type:"block",delta:s,attributes:{}}),n}createBlock(r,n){let s,i={};Object.entries(r).forEach(l=>{let[u,f]=l;this.query(u,b.BLOCK&b.BLOT)!=null?s=u:i[u]=f});let o=this.create(s||this.statics.defaultChild.blotName,s?r[s]:void 0);this.insertBefore(o,n||void 0);let a=o.length();return Object.entries(i).forEach(l=>{let[u,f]=l;o.formatAt(0,a,u,f)}),o}}return e})();function qs(e,t,r){r.reduce((n,s)=>{let i=it.Op.length(s),o=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){let a=s.insert;e.insertAt(n,a);let[l]=e.descendant(B,n),u=Z(l);o=it.AttributeMap.diff(u,o)||{}}else if(typeof s.insert=="object"){let a=Object.keys(s.insert)[0];if(a==null)return n;if(e.insertAt(n,a,s.insert[a]),e.scroll.query(a,b.INLINE)!=null){let[u]=e.descendant(B,n),f=Z(u);o=it.AttributeMap.diff(f,o)||{}}}}return Object.keys(o).forEach(a=>{e.formatAt(n,i,a,o[a])}),n+i},t)}var mu=ix;var J=ft(bt(),1);var K=ft(bt(),1);var ox=lt("quill:keyboard"),ax=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",lr=class e extends ${static match(t,r){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!r[n]!==t[n]&&r[n]!==null)?!1:r.key===t.key||r.key===t.which}constructor(t,r){super(t,r),this.bindings={},Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),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,
24shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=ux(t);if(s==null){ox.warn("Attempted to add invalid keyboard binding",s);return}typeof r=="function"&&(r={handler:r}),typeof n=="function"&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach(o=>{let a=O(O(Bt(O({},s),{key:o}),r),n);this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;let s=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(m=>e.match(t,m));if(s.length===0)return;let i=g.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;let o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;let[a,l]=this.quill.getLine(o.index),[u,f]=this.quill.getLeaf(o.index),[c,h]=o.length===0?[u,f]:this.quill.getLeaf(o.index+o.length),d=u instanceof de?u.value().slice(0,f):"",p=c instanceof de?c.value().slice(h):"",y={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:d,suffix:p,event:t};s.some(m=>{if(m.collapsed!=null&&m.collapsed!==y.collapsed||m.empty!=null&&m.empty!==y.empty||m.offset!=null&&m.offset!==y.offset)return!1;if(Array.isArray(m.format)){if(m.format.every(E=>y.format[E]==null))return!1}else if(typeof m.format=="object"&&!Object.keys(m.format).every(E=>m.format[E]===!0?y.format[E]!=null:m.format[E]===!1?y.format[E]==null:Zt(m.format[E],y.format[E])))return!1;return m.prefix!=null&&!m.prefix.test(y.prefix)||m.suffix!=null&&!m.suffix.test(y.suffix
24)?!1:m.handler.call(this,o,y,m)!==!0})&&t.preventDefault()})}handleBackspace(t,r){let n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(r.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let s={},[i]=this.quill.getLine(t.index),o=new K.default().retain(t.index-n).delete(n);if(r.offset===0){let[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){let u=i.formats(),f=this.quill.getFormat(t.index-1,1);if(s=K.AttributeMap.diff(u,f)||{},Object.keys(s).length>0){let c=new K.default().retain(t.index+i.length()-2).retain(1,s);o=o.compose(c)}}}this.quill.updateContents(o,g.sources.USER),this.quill.focus()}handleDelete(t,r){let n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(r.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let s={},[i]=this.quill.getLine(t.index),o=new K.default().retain(t.index).delete(n);if(r.offset>=i.length()-1){let[a]=this.quill.getLine(t.index+1);if(a){let l=i.formats(),u=this.quill.getFormat(t.index,1);s=K.AttributeMap.diff(l,u)||{},Object.keys(s).length>0&&(o=o.retain(a.length()-1).retain(1,s))}}this.quill.updateContents(o,g.sources.USER),this.quill.focus()}handleDeleteRange(t){ur({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,r){let n=Object.keys(r.format).reduce((i,o)=>(this.quill.scroll.query(o,b.BLOCK)&&!Array.isArray(r.format[o])&&(i[o]=r.format[o]),i),{}),s=new K.default().retain(t.index).delete(t.length).insert(`
25`,n);this.quill.updateContents(s,g.sources.USER),this.quill.setSelection(t.index+1,g.sources.SILENT),this.quill.focus()}},lx={bindings:{bold:Us("bold"),italic:Us("italic"),underline:Us("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",g.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",g.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){t.format.indent!=null?this.quill.format("indent","-1",g.sources.USER):t.format.list!=null&&this.quill.format("list",!1,g.sources.USER)}},"indent code-block":gu(!0),"outdent code-block":gu(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,g.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();let r=new K.default().retain(e.index).delete(e.length).insert("	");return this.quill.updateContents(r,g.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,g.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,g.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){let r={list:!1};t.format.indent&&(r.indent=!1),this.quill.formatLine(e.index,e.length,r,g.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"}
25,handler(e){let[t,r]=this.quill.getLine(e.index),n=Bt(O({},t.formats()),{list:"checked"}),s=new K.default().retain(e.index).insert(`
26`,n).retain(t.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,g.sources.USER),this.quill.setSelection(e.index+1,g.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){let[r,n]=this.quill.getLine(e.index),s=new K.default().retain(e.index).insert(`
27`,t.format).retain(r.length()-n-1).retain(1,{header:null});this.quill.updateContents(s,g.sources.USER),this.quill.setSelection(e.index+1,g.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(e){let t=this.quill.getModule("table");if(t){let[r,n,s,i]=t.getTable(e),o=fx(r,n,s,i);if(o==null)return;let a=r.offset();if(o<0){let l=new K.default().retain(a).insert(`
28`);this.quill.updateContents(l,g.sources.USER),this.quill.setSelection(e.index+1,e.length,g.sources.SILENT)}else if(o>0){a+=r.length();let l=new K.default().retain(a).insert(`
29`);this.quill.updateContents(l,g.sources.USER),this.quill.setSelection(a,g.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){let{event:r,line:n}=t,s=n.offset(this.quill.scroll);r.shiftKey?this.quill.setSelection(s-1,g.sources.USER):this.quill.setSelection(s+n.length(),g.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;let{length:r}=t.prefix,[n,s]=this.quill.getLine(e.index);if(s>r)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(e.index," ",g.sources.USER),this.quill.history.cutoff();let o=new K.default().retain(e.index-s).delete(r+1).retain(n.length()-2-s).retain(1,{list:i});return this.quill.updateContents(o,g.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-r,g.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){let[t,r]=this.quill.getLine(e.index),n=2,s=t;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,n-=1,n<=0){let i=new K.default().retain(e.index+t.length()-r-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,g.sources.USER),this.quill.setSelection(e.index-1,g.sources.SILENT),!1}return!0}},"embed left":gn("ArrowLeft",!1),"embed left shift":gn("ArrowLeft",!0),"embed right":gn("ArrowRight",!1),"embed right shift":gn("ArrowRight",!0),"table down":bu(!1),"table up":bu(!0)}};lr.DEFAULTS=lx;function gu(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,r){let{event:n}=r,s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(t.length===0&&!n.shiftKey){this.quill.insertText(t.index,i,g.sources.USER),this.quill.setSelection(t.index+i.length,g.sources.SILENT);return}let o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t),{index:a,length:l}=t;o.forEach((u,f)=>{e?(u.insertAt(0,i),f===0?a+=i.length:l+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),f===0?a-=i.length:l-=i.length)}),this.quill.update(g.sources.USER),this.quill.setSelection(a,l,g.sources.SILENT)}}}function gn(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;e==="ArrowRight"&&(s+=n.length+1);let[i]=this.quill.getLeaf(s);return i instanceof D?(e==="ArrowLeft"?t?this.quill.setSelection(n.index-1,n.length+1,g.sources.USER):this.quill.setSelection(n.index-1,g.sources.USER):t?this.quill.setSelection(n.index,n.length+1,g.sources.USER):this.quill.setSelection(n.index+n.length+1,g.sources.USER),!1):!0}}}function Us(e){return{key:e[0],shortKey:!0,handler(t,r){this.quill.format(e,!r.format[e],g.sources.USER)}}}function bu(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,r){let n=e?"prev":"next",s=r.line,i=s.parent[n];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=s;for(;a.prev!=null;)a=a.prev,o=o.next;let l=o.offset(this.quill.scroll)+Math.min(r.offset,o.length()-1);this.quill.setSelection(l,0,g.sources.USER)}}else{let o=s.table()[n];o!=null&&(e?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,g.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,g.sources.USER))}return!1}}}function ux(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=pt(e);else return null;return e.shortKey&&(e[ax]=e.shortKey,delete e.shortKey),e}function ur(e){let{quill:t,range:r}=e,n=t.getLines(r),s={};if(n.length>1){let i=n[0].formats(),o=n[n.length-1].formats();s=K.AttributeMap.diff(o,i)||{}}t.deleteText(r,g.sources.USER),Object.keys(s).length>0&&t.formatLine(r.index,1,s,g.sources.USER),t.setSelection(r.index,g.sources.SILENT)}function fx(e,t,r,n){return t.prev==null&&t.next==null?r.prev==null&&r.next==null?n===0?-1:1:r.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}
29var cx=/font-weight:\s*normal/,hx=["P","OL","UL"],yu=e=>e&&hx.includes(e.tagName),dx=e=>{Array.from(e.querySelectorAll("br")).filter(t=>yu(t.previousElementSibling)&&yu(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},px=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(cx)).forEach(t=>{let r=e.createDocumentFragment();r.append(...t.childNodes),t.parentNode?.replaceChild(r,t)})};function Fs(e){e.querySelector('[id^="docs-internal-guid-"]')&&(px(e),dx(e))}var mx=/\bmso-list:[^;]*ignore/i,gx=/\bmso-list:[^;]*\bl(\d+)/i,bx=/\bmso-list:[^;]*\blevel(\d+)/i,yx=(e,t)=>{let r=e.getAttribute("style"),n=r?.match(gx);if(!n)return null;let s=Number(n[1]),i=r?.match(bx),o=i?Number(i[1]):1,a=new RegExp(`@list l${s}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),u=l&&l[1]==="bullet"?"bullet":"ordered";return{id:s,indent:o,type:u,element:e}},xx=e=>{let t=Array.from(e.querySelectorAll("[style*=mso-list]")),r=[],n=[];t.forEach(o=>{(o.getAttribute("style")||"").match(mx)?r.push(o):n.push(o)}),r.forEach(o=>o.parentNode?.removeChild(o));let s=e.documentElement.innerHTML,i=n.map(o=>yx(o,s)).filter(o=>o);for(;i.length;){let o=[],a=i.shift();for(;a;)o.push(a),a=i.length&&i[0]?.element===a.element.nextElementSibling&&i[0].id===a.id?i.shift():null;let l=document.createElement("ul");o.forEach(c=>{let h=document.createElement("li");h.setAttribute("data-list",c.type),c.indent>1&&h.setAttribute("class",`ql-indent-${c.indent-1}`),h.innerHTML=c.element.innerHTML,l.appendChild(h)});let u=o[0]?.element,{parentNode:f}=u??{};u&&f?.replaceChild(l,u),o.slice(1).forEach(c=>{let{element:h}=c;f?.removeChild(h)})}};function Ks(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&xx(e)}var vx=[Ks,Fs],Ex=e=>{e.documentElement&&vx.forEach(t=>{t(e)})},xu=Ex;var Tx=lt("quill:clipboard"),Nx=[[Node.TEXT_NODE,Mx],[Node.TEXT_NODE,Eu],["br",Sx],[Node.ELEMENT_NODE,Eu],[Node.ELEMENT_NODE,Ox],[Node.ELEMENT_NODE,wx],[Node.ELEMENT_NODE,Rx],["li",Ix],["ol, ul",Bx],["pre",Cx],["tr",Dx],["b",zs("bold")],["i",zs("italic")],["strike",zs("strike")],["style",Lx]],Ax=[su,lu].reduce((e,t)=>(e[t.keyName]=t,e),{}),vu=[iu,au,ou,uu,cu,hu].reduce((e,t)=>(e[t.keyName]=t,e),{}),Tu=(()=>{class e extends ${static DEFAULTS={matchers:[]};constructor(r,n){super(r,n),this.quill.root.addEventListener("copy",s=>this.onCaptureCopy(s,!1)),this.quill.root.addEventListener("cut",s=>this.onCaptureCopy(s,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],Nx.concat(this.options.matchers??[]).forEach(s=>{let[i,o]=s;this.addMatcher(i,o)})}addMatcher(r,n){this.matchers.push([r,n])}convert(r){let{html:n,text:s}=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[yt.blotName])return new J.default().insert(s||"",{[yt.blotName]:i[yt.blotName]});if(!n)return new J.default().insert(s||"",i);let o=this.convertHTML(n);return fr(o,`
30`)&&(o.ops[o.ops.length-1].attributes==null||i.table)?o.compose(new J.default().retain(o.length()-1).delete(1)):o}normalizeHTML(r){xu(r)}convertHTML(r){let n=new DOMParser().parseFromString(r,"text/html");this.normalizeHTML(n);let s=n.body,i=new WeakMap,[o,a]=this.prepareMatching(s,i);return Au(this.quill.scroll,s,o,a,i)}dangerouslyPasteHTML(r,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.sources.API;if(typeof r=="string"){let i=this.convert({html:r,text:""});this.quill.setContents(i,n),this.quill.setSelection(0,g.sources.SILENT)}else{let i=this.convert({html:n,text:""});this.quill.updateContents(new J.default().retain(r).concat(i),s),this.quill.setSelection(r+i.length(),g.sources.SILENT)}}onCaptureCopy(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r.defaultPrevented)return;r.preventDefault();let[s]=this.quill.selection.getRange();if(s==null)return;let{html:i,text:o}=this.onCopy(s,n);r.clipboardData?.setData("text/plain",o),r.clipboardData?.setData("text/html",i),n&&ur({range:s,quill:this.quill})}normalizeURIList(r){return r.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
31`)}onCapturePaste(r){if(r.defaultPrevented||!this.quill.isEnabled())return;r.preventDefault();let n=this.quill.getSelection(!0);if(n==null)return;let s=r.clipboardData?.getData("text/html"),i=r.clipboardData?.getData("text/plain");
31if(!s&&!i){let a=r.clipboardData?.getData("text/uri-list");a&&(i=this.normalizeURIList(a))}let o=Array.from(r.clipboardData?.files||[]);if(!s&&o.length>0){this.quill.uploader.upload(n,o);return}if(s&&o.length>0){let a=new DOMParser().parseFromString(s,"text/html");if(a.body.childElementCount===1&&a.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(n,o);return}}this.onPaste(n,{html:s,text:i})}onCopy(r){let n=this.quill.getText(r);return{html:this.quill.getSemanticHTML(r),text:n}}onPaste(r,n){let{text:s,html:i}=n,o=this.quill.getFormat(r.index),a=this.convert({text:s,html:i},o);Tx.log("onPaste",a,{text:s,html:i});let l=new J.default().retain(r.index).delete(r.length).concat(a);this.quill.updateContents(l,g.sources.USER),this.quill.setSelection(l.length()-r.length,g.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(r,n){let s=[],i=[];return this.matchers.forEach(o=>{let[a,l]=o;switch(a){case Node.TEXT_NODE:i.push(l);break;case Node.ELEMENT_NODE:s.push(l);break;default:Array.from(r.querySelectorAll(a)).forEach(u=>{n.has(u)?n.get(u)?.push(l):n.set(u,[l])});break}}),[s,i]}}return e})();function ae(e,t,r,n){return n.query(t)?e.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[t])return s.push(i);let o=r?{[t]:r}:{};return s.insert(i.insert,O(O({},o),i.attributes))},new J.default):e}function fr(e,t){let r="";for(let n=e.ops.length-1;n>=0&&r.length<t.length;--n){let s=e.ops[n];if(typeof s.insert!="string")break;r=s.insert+r}return r.slice(-1*t.length)===t}function Xt(e,t){if(!(e instanceof Element))return!1;let r=t.query(e);return r&&r.prototype instanceof D?!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(e.tagName.toLowerCase())}function _x(e,t){return e.previousElementSibling&&e.nextElementSibling&&!Xt(e.previousElementSibling,t)&&!Xt(e.nextElementSibling,t)}var bn=new WeakMap;function Nu(e){return e==null?!1:(bn.has(e)||(e.tagName==="PRE"?bn.set(e,!0):bn.set(e,Nu(e.parentNode))),bn.get(e))}function Au(e,t,r,n,s){return t.nodeType===t.TEXT_NODE?n.reduce((i,o)=>o(t,i,e),new J.default):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,o)=>{let a=Au(e,o,r,n,s);return o.nodeType===t.ELEMENT_NODE&&(a=r.reduce((l,u)=>u(o,l,e),a),a=(s.get(o)||[]).reduce((l,u)=>u(o,l,e),a)),i.concat(a)},new J.default):new J.default}function zs(e){return(t,r,n)=>ae(r,e,!0,n)}function wx(e,t,r){let n=z.keys(e),s=q.keys(e),i=X.keys(e),o={};return n.concat(s).concat(i).forEach(a=>{let l=r.query(a,b.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(e),o[l.attrName])||(l=Ax[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(e)||void 0),l=vu[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=vu[a],o[l.attrName]=l.value(e)||void 0))}),Object.entries(o).reduce((a,l)=>{let[u,f]=l;return ae(a,u,f,r)},t)}function Ox(e,t,r){let n=r.query(e);if(n==null)return t;if(n.prototype instanceof D){let s={},i=n.value(e);if(i!=null)return s[n.blotName]=i,new J.default().insert(s,n.formats(e,r))}else if(n.prototype instanceof Yt&&!fr(t,`
32`)&&t.insert(`
33`),"blotName"in n&&"formats"in n&&typeof n.formats=="function")return ae(t,n.blotName,n.formats(e,r),r);return t}function Sx(e,t){return fr(t,`
34`)||t.insert(`
35`),t}function Cx(e,t,r){let n=r.query("code-block"),s=n&&"formats"in n&&typeof n.formats=="function"?n.formats(e,r):!0;return ae(t,"code-block",s,r)}function Lx(){return new J.default}function Ix(e,t,r){let n=r.query(e);if(n==null||n.blotName!=="list"||!fr(t,`
36`))return t;let s=-1,i=e.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,O({indent:s},a.attributes||{})):o,new J.default)}function Bx(e,t,r){let n=e,s=n.tagName==="OL"?"ordered":"bullet",i=n.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),ae(t,"list",s,r)}function Eu(e,t,r){if(!fr(t,`
37`)){if(Xt(e,r)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
38`);if(t.length()>0&&e.nextSibling){let n=e.nextSibling;for(;n!=null;){if(Xt(n,r))return t.insert(`
39`);let s=r.query(n);if(s&&s.prototype instanceof k)return t.insert(`
40`);n=n.firstChild}}}return t}function Rx(e,t,r){let n={},s=e.style||{};return s.fontStyle==="italic"&&(n.italic=!0),s.textDecoration==="underline"&&(n.underline=!0),s.textDecoration==="line-through"&&(n.strike=!0),(s.fontWeight?.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(n.bold=!0),t=Object.entries(n).reduce((i,o)=>{let[a,l]=o;return ae(i,a,l,r)},t),parseFloat(s.textIndent||0)>0?new J.default().insert("	").concat(t):t}function Dx(e,t,r){let n=e.parentElement?.tagName==="TABLE"?e.parentElement:e.parentElement?.parentElement;if(n!=null){let i=Array.from(n.querySelectorAll("tr")).indexOf(e)+1;return ae(t,"table",i,r)}return t}function Mx(e,t,r){let n=e.data;if(e.parentElement?.tagName==="O:P")return t.insert(n.trim());if(!Nu(e)){if(n.trim().length===0&&n.includes(`
41`)&&!_x(e,r))return t;let s=(i,o)=>
41{let a=o.replace(/[^\u00a0]/g,"");return a.length<1&&i?" ":a};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,s.bind(s,!0)),(e.previousSibling==null&&e.parentElement!=null&&Xt(e.parentElement,r)||e.previousSibling instanceof Element&&Xt(e.previousSibling,r))&&(n=n.replace(/^\s+/,s.bind(s,!1))),(e.nextSibling==null&&e.parentElement!=null&&Xt(e.parentElement,r)||e.nextSibling instanceof Element&&Xt(e.nextSibling,r))&&(n=n.replace(/\s+$/,s.bind(s,!1)))}return t.insert(n)}var wu=(()=>{class e extends ${static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(r,n){super(r,n),this.quill.on(g.events.EDITOR_CHANGE,(s,i,o,a)=>{s===g.events.SELECTION_CHANGE?i&&a!==g.sources.SILENT&&(this.currentRange=i):s===g.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===g.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=Hs(this.currentRange,i))}),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",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(r,n){if(this.stack[r].length===0)return;let s=this.stack[r].pop();if(!s)return;let i=this.quill.getContents(),o=s.delta.invert(i);this.stack[n].push({delta:o,range:Hs(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,g.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(r,n){if(r.ops.length===0)return;this.stack.redo=[];let s=r.invert(n),i=this.currentRange,o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){let a=this.stack.undo.pop();a&&(s=s.compose(a.delta),i=a.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(r){_u(this.stack.undo,r),_u(this.stack.redo,r)}undo(){this.change("undo","redo")}restoreSelection(r){if(r.range)this.quill.setSelection(r.range,g.sources.USER);else{let n=Px(this.quill.scroll,r.delta);this.quill.setSelection(n,g.sources.USER)}}}return e})();function _u(e,t){let r=t;for(let n=e.length-1;n>=0;n-=1){let s=e[n];e[n]={delta:r.transform(s.delta,!0),range:s.range&&Hs(s.range,r)},r=s.delta.transform(r),e[n].delta.length()===0&&e.splice(n,1)}}function jx(e,t){let r=t.ops[t.ops.length-1];return r==null?!1:r.insert!=null?typeof r.insert=="string"&&r.insert.endsWith(`
42`):r.attributes!=null?Object.keys(r.attributes).some(n=>e.query(n,b.BLOCK)!=null):!1}function Px(e,t){let r=t.reduce((s,i)=>s+(i.delete||0),0),n=t.length()-r;return jx(e,t)&&(n-=1),n}function Hs(e,t){if(!e)return e;let r=t.transformPosition(e.index),n=t.transformPosition(e.index+e.length);return{index:r,length:n-r}}var Ou=ft(bt(),1);var kx=(()=>{class e extends ${constructor(r,n){super(r,n),r.root.addEventListener("drop",s=>{s.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(s.clientX,s.clientY);else if(document.caretPositionFromPoint){let a=document.caretPositionFromPoint(s.clientX,s.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}let o=i&&r.selection.normalizeNative(i);if(o){let a=r.selection.normalizedToRange(o);s.dataTransfer?.files&&this.upload(a,s.dataTransfer.files)}})}upload(r,n){let s=[];Array.from(n).forEach(i=>{i&&this.options.mimetypes?.includes(i.type)&&s.push(i)}),s.length>0&&this.options.handler.call(this,r,s)}}return e.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,r){if(!this.quill.scroll.query("image"))return;let n=r.map(s=>new Promise(i=>{let o=new FileReader;o.onload=()=>{i(o.result)},o.readAsDataURL(s)}));Promise.all(n).then(s=>{let i=s.reduce((o,a)=>o.insert({image:a}),new Ou.default().retain(t.index).delete(t.length));this.quill.updateContents(i,v.sources.USER),this.quill.setSelection(t.index+s.length,v.sources.SILENT)})}},e})(),Su=kx;var yn=ft(bt(),1);var Cu=ft(bt(),1);var qx=["insertText","insertReplacementText"],$s=class extends ${constructor(t,r){super(t,r),t.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||t.on(g.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){ur({range:t,quill:this.quill})}replaceText(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(r){let n=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new Cu.default().retain(t.index).insert(r,n),g.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+r.length,0,g.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!qx.includes(t.inputType))return;let r=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!r||r.collapsed===!0)return;let n=Ux(t);if(n==null)return;let s=this.quill.selection.normalizeNative(r),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&t.preventDefault()}handleCompositionStart(){let t=this.quill.getSelection();t&&this.replaceText(t)}};
42function Ux(e){return typeof e.data=="string"?e.data:e.dataTransfer?.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}var Lu=$s;var Fx=/Mac/i.test(navigator.platform),Kx=100,zx=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||Fx&&e.key==="a"&&e.ctrlKey===!0),Gs=class extends ${isListening=!1;selectionChangeDeadline=0;constructor(t,r){super(t,r),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:s}=r;if(!(n instanceof V)||!n.uiNode)return!0;let i=getComputedStyle(n.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),g.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&zx(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Kx,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof V)||!n.uiNode)return;let s=document.createRange();s.setStartAfter(n.uiNode),s.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(s)}},Iu=Gs;g.register({"blots/block":et,"blots/block/embed":k,"blots/break":Q,"blots/container":Ue,"blots/cursor":Pe,"blots/embed":dn,"blots/inline":je,"blots/scroll":mu,"blots/text":j,"modules/clipboard":Tu,"modules/history":wu,"modules/keyboard":lr,"modules/uploader":Su,"modules/input":Lu,"modules/uiNode":Iu});var TS=g;export{O as a,Bt as b,Hx as c,vn as d,Rt as e,ft as f,$x as g,zt as h,b as i,q as j,D as k,bt as l,Q as m,j as n,cn as o,je as p,et as q,k as r,Gy as s,Pe as t,lt as u,v,mt as w,$ as x,dn as y,Rs as z,g as A,Ue as B,Pw as C,iu as D,Uw as E,ou as F,Hw as G,au as H,Vt as I,yt as J,eO as K,lu as L,sO as M,uu as N,aO as O,cu as P,fO as Q,hu as R,Au as S,TS as T};
43
44//# debugId=aa59721d-7399-53a5-b56c-0e2c9c8f1b4d

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.